along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdlib.h>
+#include <errno.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <string.h>
-#include <errno.h>
-#include "util.h"
+#include "alloc-util.h"
+#include "escape.h"
+#include "string-util.h"
#include "strv.h"
+#include "util.h"
char *strv_find(char **l, const char *name) {
char **i;
return NULL;
}
+char **strv_free_erase(char **l) {
+ char **i;
+
+ STRV_FOREACH(i, l)
+ string_erase(*i);
+
+ return strv_free(l);
+}
+
char **strv_copy(char * const *l) {
char **r, **k;
return -ENOMEM;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
int r;
char **s;
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char **strv_split_newlines(const char *s) {
char **l;
unsigned n;
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char *strv_join_quoted(char **l) {
char *buf = NULL;
char **s;
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int strv_consume_pair(char ***l, char *a, char *b) {
int r;
return l;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
bool strv_is_uniq(char **l) {
char **i;
return r;
}
+#if 0 /// UNNEEDED by elogind
int strv_make_nulstr(char **l, char **p, size_t *q) {
size_t n_allocated = 0, n = 0;
_cleanup_free_ char *m = NULL;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
bool strv_overlap(char **a, char **b) {
char **i;
return false;
}
+#endif // 0
static int str_compare(const void *_a, const void *_b) {
const char **a = (const char**) _a, **b = (const char**) _b;
return l;
}
+#if 0 /// UNNEEDED by elogind
bool strv_equal(char **a, char **b) {
if (strv_isempty(a))
return l;
}
-#endif // 0
bool strv_fnmatch(char* const* patterns, const char *s, int flags) {
char* const* p;
nl[k] = NULL;
return -ENOMEM;
}
+#endif // 0