summaryrefslogtreecommitdiffstats
path: root/include/util.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-23 21:49:16 -0400
committerLibravatar GitHub <noreply@github.com>2018-07-23 21:49:16 -0400
commit71774ecd3658653328f3c903869b52c51c62e237 (patch)
treebfc136252f81a5350f240c20161d2d0bfc2f80dd /include/util.h
parentMerge pull request #2342 from RyanDwyer/update-cursor (diff)
parentAddress review comments on parse_boolean (diff)
downloadsway-71774ecd3658653328f3c903869b52c51c62e237.tar.gz
sway-71774ecd3658653328f3c903869b52c51c62e237.tar.zst
sway-71774ecd3658653328f3c903869b52c51c62e237.zip
Merge pull request #2340 from RedSoxFan/parse_boolean
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..bda941ce 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, 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.