]> git.sur5r.net Git - i3/i3/blobdiff - include/util.h
Implement 'swap' command.
[i3/i3] / include / util.h
index cbe9778cf98169f469659b5719e0f4ce5f1cd3a8..6c5fc4c659eb1c5f7230a143ad314aa6dae2de64 100644 (file)
@@ -157,3 +157,10 @@ void start_nagbar(pid_t *nagbar_pid, char *argv[]);
  *
  */
 void kill_nagbar(pid_t *nagbar_pid, bool wait_for_it);
+
+/**
+ * Converts a string into a long using strtol().
+ * This is a convenience wrapper checking the parsing result. It returns true
+ * if the number could be parsed.
+ */
+bool parse_long(const char *str, long *out, int base);