chiark / gitweb /
log: whitespace style fix
[elogind.git] / src / basic / strv.h
index 2a2003c3d7e01e1f18f33bd845ce5c8346b18cd1..5ab17acc9f94085c51794b9be163717e8ea10c67 100644 (file)
@@ -40,8 +40,8 @@ void strv_clear(char **l);
 char **strv_copy(char * const *l);
 unsigned strv_length(char * const *l) _pure_;
 
-int strv_extend_strv(char ***a, char **b);
-int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
+int strv_extend_strv(char ***a, char **b, bool filter_duplicates);
+// UNNEEDED int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
 int strv_extend(char ***l, const char *value);
 // UNNEEDED int strv_extendf(char ***l, const char *format, ...) _printf_(2,0);
 int strv_push(char ***l, char *value);
@@ -73,15 +73,16 @@ static inline bool strv_isempty(char * const *l) {
 char **strv_split(const char *s, const char *separator);
 // UNNEEDED char **strv_split_newlines(const char *s);
 
-int strv_split_quoted(char ***t, const char *s, UnquoteFlags flags);
+// UNNEEDED int strv_split_quoted(char ***t, const char *s, UnquoteFlags flags);
 
 char *strv_join(char **l, const char *separator);
-char *strv_join_quoted(char **l);
+// UNNEEDED char *strv_join_quoted(char **l);
 
 char **strv_parse_nulstr(const char *s, size_t l);
 char **strv_split_nulstr(const char *s);
+int strv_make_nulstr(char **l, char **p, size_t *n);
 
-bool strv_overlap(char **a, char **b) _pure_;
+// UNNEEDED bool strv_overlap(char **a, char **b) _pure_;
 
 #define STRV_FOREACH(s, l)                      \
         for ((s) = (l); (s) && *(s); (s)++)
@@ -94,8 +95,8 @@ bool strv_overlap(char **a, char **b) _pure_;
 #define STRV_FOREACH_PAIR(x, y, l)               \
         for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1))
 
-char **strv_sort(char **l);
-void strv_print(char **l);
+// UNNEEDED char **strv_sort(char **l);
+// UNNEEDED void strv_print(char **l);
 
 #define STRV_MAKE(...) ((char**) ((const char*[]) { __VA_ARGS__, NULL }))
 
@@ -145,6 +146,7 @@ void strv_print(char **l);
         }))
 
 // UNNEEDED char **strv_reverse(char **l);
+// UNNEEDED char **strv_shell_escape(char **l, const char *bad);
 
 bool strv_fnmatch(char* const* patterns, const char *s, int flags);
 
@@ -153,3 +155,9 @@ static inline bool strv_fnmatch_or_empty(char* const* patterns, const char *s, i
         return strv_isempty(patterns) ||
                strv_fnmatch(patterns, s, flags);
 }
+
+char ***strv_free_free(char ***l);
+
+char **strv_skip(char **l, size_t n);
+
+int strv_extend_n(char ***l, const char *value, size_t n);