return 0;
}
+/// UNNEEDED by elogind
+#if 0
int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
int r;
char **s;
return 0;
}
+#endif // 0
char **strv_split(const char *s, const char *separator) {
const char *word, *state;
return l;
}
-#endif // 0
-int strv_split_quoted(char ***t, const char *s, UnquoteFlags flags) {
+int strv_split_extract(char ***t, const char *s, const char *separators, ExtractFlags flags) {
size_t n = 0, allocated = 0;
_cleanup_strv_free_ char **l = NULL;
int r;
for (;;) {
_cleanup_free_ char *word = NULL;
- r = unquote_first_word(&s, &word, flags);
+ r = extract_first_word(&s, &word, separators, flags);
if (r < 0)
return r;
- if (r == 0)
+ if (r == 0) {
break;
+ }
if (!GREEDY_REALLOC(l, allocated, n + 2))
return -ENOMEM;
return 0;
}
+#endif // 0
char *strv_join(char **l, const char *separator) {
char *r, *e;
return r;
}
+/// UNNEEDED by elogind
+#if 0
char *strv_join_quoted(char **l) {
char *buf = NULL;
char **s;
free(buf);
return NULL;
}
+#endif // 0
int strv_push(char ***l, char *value) {
char **c;
}
#endif // 0
+char **strv_shell_escape(char **l, const char *bad) {
+ char **s;
+
+ /* Escapes every character in every string in l that is in bad,
+ * edits in-place, does not roll-back on error. */
+
+ STRV_FOREACH(s, l) {
+ char *v;
+
+ v = shell_escape(*s, bad);
+ if (!v)
+ return NULL;
+
+ free(*s);
+ *s = v;
+ }
+
+ return l;
+}
+
bool strv_fnmatch(char* const* patterns, const char *s, int flags) {
char* const* p;