mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
parse-bool.c: add helpers to set bool/int iff valid boolean
This commit is contained in:
parent
ed8999456a
commit
ac1899ada5
3 changed files with 47 additions and 82 deletions
|
|
@ -13,4 +13,12 @@
|
|||
*/
|
||||
int parse_bool(const char *str, int default_value);
|
||||
|
||||
/**
|
||||
* set_bool() - Parse boolean text and set variable iff text is valid boolean
|
||||
* @string: Boolean text to interpret.
|
||||
* @variable: Variable to set.
|
||||
*/
|
||||
void set_bool(const char *str, bool *variable);
|
||||
void set_bool_as_int(const char *str, int *variable);
|
||||
|
||||
#endif /* __LABWC_PARSE_BOOL_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue