diff --git a/src/ini_file_reader.c b/src/ini_file_reader.c index 616cbde..68d336c 100644 --- a/src/ini_file_reader.c +++ b/src/ini_file_reader.c @@ -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); } } diff --git a/src/ini_file_reader.h b/src/ini_file_reader.h index 2a586ee..412e7ac 100644 --- a/src/ini_file_reader.h +++ b/src/ini_file_reader.h @@ -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();