From a8c9e7810ca1b7b515c20c55e7d0bae7977bf7e5 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 23 Dec 2008 09:07:23 +0000 Subject: [PATCH] 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 --- xvaga/xvaga.cpp | 11 +++++++++++ xvaga/xvt.h | 1 + 2 files changed, 12 insertions(+) diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 8a76e74d6..729fadbb4 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -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) { diff --git a/xvaga/xvt.h b/xvaga/xvt.h index a4562b54c..525781f63 100755 --- a/xvaga/xvt.h +++ b/xvaga/xvt.h @@ -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();