diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-07-23 15:04:46 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-07-23 15:04:46 -0400 |
| commit | daaa4ad3b96dc9d6e720576e3e62099fe8d7b8ec (patch) | |
| tree | aaddd8ae854d1dde4b50cfd4ef470c1acf83b6ce /include/util.h | |
| parent | f9515af6777c27814b04f35d5544ad420c8daea9 (diff) | |
Switch to using a function to parse booleans
Diffstat (limited to 'include/util.h')
| -rw-r--r-- | include/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h index f68deae8..40f2c7b1 100644 --- a/include/util.h +++ b/include/util.h @@ -51,6 +51,14 @@ pid_t get_parent_pid(pid_t pid); uint32_t parse_color(const char *color); /** + * Given a string that represents a boolean, return the boolean value. This + * function also takes in the current boolean value to support toggling. If + * toggling is not desired, pass in true for current so that toggling values + * get parsed as not true. + */ +bool parse_boolean(const char *boolean, const bool current); + +/** * Given a path string, recurseively resolves any symlinks to their targets * (which may be a file, directory) and returns the result. * argument is returned. Caller must free the returned buffer. |
