chiark / gitweb /
util: rework word parsing and c unescaping code
[elogind.git] / src / shared / util.h
index 29e85bb7e14fb7a2dcb56d520b2173fedcd8764a..124c7c06d49348de85c44ad48db61d136ec51535 100644 (file)
@@ -1017,8 +1017,13 @@ int take_password_lock(const char *root);
 int is_symlink(const char *path);
 int is_dir(const char *path, bool follow);
 
-int unquote_first_word(const char **p, char **ret, bool relax);
-int unquote_many_words(const char **p, ...) _sentinel_;
+typedef enum UnquoteFlags{
+        UNQUOTE_RELAX     = 1,
+        UNQUOTE_CUNESCAPE = 2,
+} UnquoteFlags;
+
+int unquote_first_word(const char **p, char **ret, UnquoteFlags flags);
+int unquote_many_words(const char **p, UnquoteFlags flags, ...) _sentinel_;
 
 int free_and_strdup(char **p, const char *s);