chiark / gitweb /
binfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services that...
[elogind.git] / src / shared / strv.h
index 81e33356f91f367432cb91957abf3252100a8d23..b3802a7a3ff6b6fcf93c3554843e6d315f66fd81 100644 (file)
@@ -37,6 +37,7 @@ unsigned strv_length(char **l);
 char **strv_merge(char **a, char **b);
 char **strv_merge_concat(char **a, char **b, const char *suffix);
 char **strv_append(char **l, const char *s);
+int strv_extend(char ***l, const char *value);
 
 char **strv_remove(char **l, const char *s);
 char **strv_remove_prefix(char **l, const char *s);
@@ -60,18 +61,8 @@ char **strv_split_quoted(const char *s) _malloc_;
 
 char *strv_join(char **l, const char *separator) _malloc_;
 
-char **strv_env_merge(unsigned n_lists, ...);
-char **strv_env_delete(char **x, unsigned n_lists, ...);
-
-char **strv_env_set(char **x, const char *p);
-char **strv_env_unset(char **l, const char *p);
-
-char *strv_env_get_with_length(char **l, const char *name, size_t k);
-char *strv_env_get(char **x, const char *n);
-
-char **strv_env_clean(char **l);
-
 char **strv_parse_nulstr(const char *s, size_t l);
+char **strv_split_nulstr(const char *s);
 
 bool strv_overlap(char **a, char **b);
 
@@ -80,3 +71,10 @@ bool strv_overlap(char **a, char **b);
 
 #define STRV_FOREACH_BACKWARDS(s, l)            \
         for (; (l) && ((s) >= (l)); (s)--)
+
+#define STRV_FOREACH_PAIR(x, y, l)               \
+        for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2)
+
+
+char **strv_sort(char **l);
+void strv_print(char **l);