add macro function INI_STRING_IS_TRUE
parent
9f6022f9e8
commit
cb3dc49e2a
|
|
@ -1605,10 +1605,7 @@ bool iniGetBoolValue(const char *szSectionName, const char *szItemName, \
|
|||
}
|
||||
else
|
||||
{
|
||||
return strcasecmp(pValue, "true") == 0 ||
|
||||
strcasecmp(pValue, "yes") == 0 ||
|
||||
strcasecmp(pValue, "on") == 0 ||
|
||||
strcmp(pValue, "1") == 0;
|
||||
return INI_STRING_IS_TRUE(pValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@ typedef struct
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define INI_STRING_IS_TRUE(pValue) \
|
||||
(strcasecmp(pValue, "true") == 0 || \
|
||||
strcasecmp(pValue, "yes") == 0 || \
|
||||
strcasecmp(pValue, "on") == 0 || \
|
||||
strcmp(pValue, "1") == 0)
|
||||
|
||||
int iniSetAnnotationCallBack(AnnotationMap *map, int count);
|
||||
void iniDestroyAnnotationCallBack();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue