Mercurial > hg > th-libs
diff th_string.c @ 169:a06a87b771ce
Add on/off to valid boolean values.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 18 Feb 2015 21:44:28 +0200 |
parents | 7638fa9d191f |
children | 7d5707438333 |
line wrap: on
line diff
--- a/th_string.c Wed Feb 18 21:13:52 2015 +0200 +++ b/th_string.c Wed Feb 18 21:44:28 2015 +0200 @@ -577,6 +577,7 @@ BOOL th_get_boolean(const char *str, BOOL *value) { if (!th_strcasecmp(str, "yes") || + !th_strcasecmp(str, "on") || !th_strcasecmp(str, "true") || !th_strcasecmp(str, "1")) { @@ -585,6 +586,7 @@ } else if (!th_strcasecmp(str, "no") || + !th_strcasecmp(str, "off") || !th_strcasecmp(str, "false") || !th_strcasecmp(str, "0")) {