version 1.5, 2010/03/22 15:15:48
|
version 1.5.2.2, 2010/03/22 19:16:34
|
Line 8
|
Line 8
|
*************************************************************************/ |
*************************************************************************/ |
#include "global.h" |
#include "global.h" |
#include "aitcfg.h" |
#include "aitcfg.h" |
#include "tools.h" |
|
|
|
|
|
// cfgDbg() Debug/Log operation |
// cfgDbg() Debug/Log operation |
Line 119 int ReadConfig(FILE *f, sl_config * __restrict cfg)
|
Line 118 int ReadConfig(FILE *f, sl_config * __restrict cfg)
|
while (!feof(f)) { |
while (!feof(f)) { |
memset(szLine, 0, MAX_STR + 1); |
memset(szLine, 0, MAX_STR + 1); |
fgets((char*) szLine, MAX_STR, f); |
fgets((char*) szLine, MAX_STR, f); |
trim(szLine); | io_TrimStr(szLine); |
#ifdef __DEBUG |
#ifdef __DEBUG |
cfgDbg(stdout, "DEBUG:: RAW |%s|\n", szLine); |
cfgDbg(stdout, "DEBUG:: RAW |%s|\n", szLine); |
#endif |
#endif |
Line 185 int ReadConfig(FILE *f, sl_config * __restrict cfg)
|
Line 184 int ReadConfig(FILE *f, sl_config * __restrict cfg)
|
psAttr = szLine; |
psAttr = szLine; |
psVal = (szLine + pos + 1); |
psVal = (szLine + pos + 1); |
szLine[pos] = 0; |
szLine[pos] = 0; |
rtrim(psAttr); | io_RTrimStr(psAttr); |
ltrim(psVal); | io_LTrimStr(psVal); |
unquot(psVal); | io_UnquotStr(psVal); |
#ifdef __DEBUG |
#ifdef __DEBUG |
cfgDbg(stdout, "DEBUG:: Attr(%p) ->%s size=%d Value(%p) ->%s size=%d\n", |
cfgDbg(stdout, "DEBUG:: Attr(%p) ->%s size=%d Value(%p) ->%s size=%d\n", |
psAttr, psAttr, strlen((char*) psAttr), psVal, psVal, strlen((char*) psVal)); |
psAttr, psAttr, strlen((char*) psAttr), psVal, psVal, strlen((char*) psVal)); |