Mercurial > hg > th-libs
changeset 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 | a2cd862315c5 |
children | 9a1353862520 |
files | th_string.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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")) {