⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rcfile.cpp

📁 SIP 用户登陆用的对话框
💻 CPP
字号:
/*  josua - Jack'Open SIP User Agent is a softphone for SIP.    Copyright (C) 2002  Aymeric MOIZARD  - jack@atosc.org    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include "stdafx.h"#include "rcfile.h"//static list_t *elements = NULL;int josua_config_load(char *filename){/*  FILE *file;  char *s;   configelt_t *configelt;  elements = (list_t *) smalloc(sizeof(list_t));  list_init(elements);  file = fopen(filename, "r");  if (file==NULL) return -1;  s = (char *)smalloc(201*sizeof(char));  while (NULL!=fgets(s, 200, file))
    {    if ((strlen(s)==1)||(0==strncmp(s,"#",1)))      ;
*/	/* skip it *//*    else       {      configelt = (configelt_t *)smalloc(sizeof(configelt_t));      if (0<=josua_config_set_element((const char *)s,configelt))	list_add(elements,configelt,-1);      }    }  sfree(s);  fclose(file);*/  return 0; 
	/* ok */}intjosua_config_set_element(const char *s,configelt_t *configelt){//  char *tmp;//  tmp = strchr(s,61);  /* search "=" 61 *//*  configelt->name = (char *) smalloc(tmp-s+1);  configelt->value= (char *) smalloc(s+strlen(s)-tmp);  sstrncpy(configelt->name,s,tmp-s);  sstrncpy(configelt->value,tmp+1,s+strlen(s)-tmp-2);*/  return 1;}char *josua_config_get_element(char *name){/*  configelt_t *tmp;  int pos = 0;  while (0==list_eol(elements,pos))    {    tmp = (configelt_t *)list_get(elements,pos);    if (0==strcmp(tmp->name,name))      return tmp->value;    pos++;    }*/  return NULL;}voidjosua_config_unload(){/*  configelt_t *tmp;  if (elements==NULL) return;  while (0==list_eol(elements,0))    {    tmp = (configelt_t *)list_get(elements,0);    list_remove(elements,0);    sfree(tmp->name);    sfree(tmp->value);    sfree(tmp);    }  sfree(elements);  elements=NULL;*/  return;}///////////////////////////////////////////////////////////////////////

int load_config_file(char *filename)
{
/*	FILE *fp;
	char *s; 
	config_t *config;
    elements = (list_t *)smalloc(sizeof(list_t));
	list_init(elements);
	fp = fopen(filename, "r");
	if (file==NULL) return -1;
    s = (char *)smalloc(201*sizeof(char));
	while (NULL!=fgets(s, 200, file))
    {
		if ((strlen(s)==1)||(0==strncmp(s,"#",1)))
			;
		else 
		{
			configelt = (configelt_t *)smalloc(sizeof(configelt_t));
			if (0<=josua_config_set_element((const char *)s,configelt))
				list_add(elements,configelt,-1);
		}
    }
	sfree(s);
	fclose(file);*/
	return 0; 
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -