mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
src/common/parse-bool.c: support on/off boolean values
This commit is contained in:
parent
bd6efe4849
commit
143714f1c9
2 changed files with 10 additions and 0 deletions
|
|
@ -13,10 +13,14 @@ parse_bool(const char *str, int default_value)
|
|||
return true;
|
||||
} else if (!strcasecmp(str, "true")) {
|
||||
return true;
|
||||
} else if (!strcasecmp(str, "on")) {
|
||||
return true;
|
||||
} else if (!strcasecmp(str, "no")) {
|
||||
return false;
|
||||
} else if (!strcasecmp(str, "false")) {
|
||||
return false;
|
||||
} else if (!strcasecmp(str, "off")) {
|
||||
return false;
|
||||
}
|
||||
error_not_a_boolean:
|
||||
wlr_log(WLR_ERROR, "(%s) is not a boolean value", str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue