chiark / gitweb /
util: remove unused FOREACH_WORD_SEPARATOR_QUOTED
[elogind.git] / src / shared / util.h
index bd8bbb268f37ac413078fc05b89aa7765bd65c8a..87ad317319315b07052f98bd3c0c719e7d3deca2 100644 (file)
@@ -128,6 +128,8 @@ bool streq_ptr(const char *a, const char *b) _pure_;
 
 #define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
 
+#define newa0(t, n) ((t*) alloca0(sizeof(t)*(n)))
+
 #define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
 
 #define malloc0(n) (calloc((n), 1))
@@ -246,9 +248,6 @@ const char* split(const char **state, size_t *l, const char *separator, bool quo
 #define FOREACH_WORD_QUOTED(word, length, s, state)                     \
         _FOREACH_WORD(word, length, s, WHITESPACE, true, state)
 
-#define FOREACH_WORD_SEPARATOR_QUOTED(word, length, s, separator, state)       \
-        _FOREACH_WORD(word, length, s, separator, true, state)
-
 #define _FOREACH_WORD(word, length, s, separator, quoted, state)        \
         for ((state) = (s), (word) = split(&(state), &(length), (separator), (quoted)); (word); (word) = split(&(state), &(length), (separator), (quoted)))
 
@@ -967,4 +966,7 @@ bool is_localhost(const char *hostname);
 
 int take_password_lock(const char *root);
 
-int is_symlink(const char *path);
\ No newline at end of file
+int is_symlink(const char *path);
+
+int unquote_first_word(const char **p, char **ret);
+int unquote_many_words(const char **p, ...) _sentinel_;