return val[i];
}
-bool mapBool(const char *p, bool dflt)
-{
+bool mapBool(const char *p, bool defaultValue) {
if (!p || *p == '\0')
- return dflt;
+ return defaultValue;
if (!strcasecmp(p, "false"))
return false;
if (!strcasecmp(p, "no"))
if (isdigit((int)*p))
return atoi(p) != 0;
else
- return dflt;
+ return defaultValue;
}
bool mapbool(const char *p)
UTILS_API char *Fgets(FILE *fp);
UTILS_API const char *safefile(const char *filename);
-UTILS_API bool mapBool(const char*, bool);
-UTILS_API bool mapbool(const char*);
+UTILS_API bool mapBool(const char *p, bool defaultValue);
+UTILS_API bool mapbool(const char *p);
UTILS_API int maptoken(char *, char **, int *);
UTILS_API bool findStopColor(char *colorlist, char *clrs[2], float *frac);