aboutsummaryrefslogtreecommitdiffstats
path: root/include/util.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-23 15:04:46 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-07-23 21:33:17 -0400
commit863914ec9574eb58cb0746d59f216997c4863cdf (patch)
treeaaddd8ae854d1dde4b50cfd4ef470c1acf83b6ce /include/util.h
parentMerge pull request #2342 from RyanDwyer/update-cursor (diff)
downloadsway-863914ec9574eb58cb0746d59f216997c4863cdf.tar.gz
sway-863914ec9574eb58cb0746d59f216997c4863cdf.tar.zst
sway-863914ec9574eb58cb0746d59f216997c4863cdf.zip
Switch to using a function to parse booleans
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h8
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);
51uint32_t parse_color(const char *color); 51uint32_t parse_color(const char *color);
52 52
53/** 53/**
54 * Given a string that represents a boolean, return the boolean value. This
55 * function also takes in the current boolean value to support toggling. If
56 * toggling is not desired, pass in true for current so that toggling values
57 * get parsed as not true.
58 */
59bool parse_boolean(const char *boolean, const bool current);
60
61/**
54 * Given a path string, recurseively resolves any symlinks to their targets 62 * Given a path string, recurseively resolves any symlinks to their targets
55 * (which may be a file, directory) and returns the result. 63 * (which may be a file, directory) and returns the result.
56 * argument is returned. Caller must free the returned buffer. 64 * argument is returned. Caller must free the returned buffer.