Patch level : 10.0 200

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :
Aggiunta funzione xvt_sys_get_profile_int


git-svn-id: svn://10.65.10.50/trunk@17972 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-12-23 09:07:23 +00:00
parent 2a3e35827d
commit a8c9e7810c
2 changed files with 12 additions and 0 deletions

View File

@ -3742,6 +3742,17 @@ int xvt_sys_get_profile_string(const char* file, const char* paragraph, const ch
return len;
}
long xvt_sys_get_profile_int(const char* file, const char* paragraph, const char* name, long defval)
{
char defstr[16] = "", str[16] = "";
long value = defval;
if (defval != 0)
sprintf(defstr, "%ld", defval);
if (xvt_sys_get_profile_string(file, paragraph, name, defstr, str, sizeof(str)))
value = atol(str);
return value;
}
BOOLEAN xvt_sys_set_profile_string(const char* file, const char* paragraph, const char* name,
const char* value)
{

View File

@ -376,6 +376,7 @@ XVTDLL BOOLEAN xvt_sys_find_editor(const char* file, char* editor);
XVTDLL BOOLEAN xvt_sys_get_env(const char* varname, char* value, int max_size);
XVTDLL int xvt_sys_get_profile_string(const char* file, const char* paragraph, const char* name,
const char* defval, char* value, int maxsize);
XVTDLL long xvt_sys_get_profile_int(const char* file, const char* paragraph, const char* name, long defval);
XVTDLL BOOLEAN xvt_sys_set_profile_string(const char* file, const char* paragraph, const char* name,
const char* value);
XVTDLL int xvt_sys_get_session_id();