chiark / gitweb /
basic: include only what we use
[elogind.git] / src / basic / strv.c
index 7401c29081b5d98c9ce2bb002ea5ded2821bc360..966cab75d5e79085d260af69ea66aedc0254add9 100644 (file)
 ***/
 
 #include <errno.h>
+#include <fnmatch.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "alloc-util.h"
 #include "escape.h"
+#include "extract-word.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
@@ -200,6 +203,7 @@ char **strv_new(const char *x, ...) {
         return r;
 }
 
+#if 0 /// UNNEEDED by elogind
 int strv_extend_strv(char ***a, char **b, bool filter_duplicates) {
         char **s, **t;
         size_t p, q, i = 0, j;
@@ -244,8 +248,6 @@ rollback:
         return -ENOMEM;
 }
 
-/// UNNEEDED by elogind
-#if 0
 int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
         int r;
         char **s;
@@ -299,8 +301,7 @@ char **strv_split(const char *s, const char *separator) {
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char **strv_split_newlines(const char *s) {
         char **l;
         unsigned n;
@@ -397,8 +398,7 @@ char *strv_join(char **l, const char *separator) {
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 char *strv_join_quoted(char **l) {
         char *buf = NULL;
         char **s;
@@ -530,8 +530,7 @@ int strv_consume(char ***l, char *value) {
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 int strv_consume_pair(char ***l, char *a, char *b) {
         int r;
 
@@ -580,8 +579,7 @@ char **strv_uniq(char **l) {
         return l;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool strv_is_uniq(char **l) {
         char **i;
 
@@ -676,8 +674,7 @@ char **strv_split_nulstr(const char *s) {
         return r;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#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;
@@ -739,8 +736,7 @@ char **strv_sort(char **l) {
         return l;
 }
 
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
 bool strv_equal(char **a, char **b) {
 
         if (strv_isempty(a))