util: Remove util/strlist.c and references to str_util_*()
authorMartin Schwenke <martin@meltin.net>
Thu, 4 Sep 2014 02:34:46 +0000 (12:34 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 27 Mar 2015 02:51:31 +0000 (13:51 +1100)
They're not used in CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit 5de4a97fe941c27080061480cdd7ed8f60f4438e)

Makefile.in
include/internal/includes.h
lib/util/strlist.c [deleted file]
lib/util/util.h
tests/src/ctdb_test.c
tests/src/ctdbd_test.c

index 925ea258d6ecb5b0c7ff8ffb86885b122cd551ea..01b9e50531b569d1258940c3a5996ef48289f874 100755 (executable)
@@ -81,7 +81,7 @@ LIB_FLAGS=@LDFLAGS@ -Llib @LIBS@ $(POPT_LIBS) $(TALLOC_LIBS) $(TEVENT_LIBS) $(TD
 
 CTDB_VERSION_H = include/ctdb_version.h
 
-UTIL_OBJ = lib/util/idtree.o lib/util/db_wrap.o lib/util/strlist.o lib/util/util.o \
+UTIL_OBJ = lib/util/idtree.o lib/util/db_wrap.o lib/util/util.o \
        lib/util/util_time.o lib/util/util_file.o lib/util/fault.o lib/util/substitute.o \
        lib/util/signal.o
 
index 37471982de2f1d07bff7b5c89f7ad2d529561d7c..698cb26efc5b119a7dbcc69b2bd98dda3e1583b8 100644 (file)
@@ -59,7 +59,6 @@ double timeval_delta(struct timeval *tv2, struct timeval *tv);
 char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
 char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
 uint8_t *hex_decode_talloc(TALLOC_CTX *mem_ctx, const char *hex_in, size_t *len);
-_PUBLIC_ const char **str_list_add(const char **list, const char *s);
 _PUBLIC_ int set_blocking(int fd, bool set);
 
 #include "lib/util/debug.h"
diff --git a/lib/util/strlist.c b/lib/util/strlist.c
deleted file mode 100644 (file)
index 48a6e45..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   
-   Copyright (C) Andrew Tridgell 2005
-   Copyright (C) Jelmer Vernooij 2005
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "system/locale.h"
-
-/**
-  return the number of elements in a string list
-*/
-_PUBLIC_ size_t str_list_length(const char **list)
-{
-       size_t ret;
-       for (ret=0;list && list[ret];ret++) /* noop */ ;
-       return ret;
-}
-
-
-/**
-  add an entry to a string list
-*/
-_PUBLIC_ const char **str_list_add(const char **list, const char *s)
-{
-       size_t len = str_list_length(list);
-       const char **ret;
-
-       ret = talloc_realloc(NULL, list, const char *, len+2);
-       if (ret == NULL) return NULL;
-
-       ret[len] = talloc_strdup(ret, s);
-       if (ret[len] == NULL) return NULL;
-
-       ret[len+1] = NULL;
-
-       return ret;
-}
index 467fba88ad6eec23980c201df4bd54a082ad3256..f8bb8711d76503c1bcdcfb898864736cbc4f7ad8 100644 (file)
@@ -282,73 +282,6 @@ _PUBLIC_ void string_replace(char *s, char oldc, char newc);
  **/
 _PUBLIC_ bool strequal(const char *s1, const char *s2);
 
-/* The following definitions come from lib/util/util_strlist.c  */
-#ifdef _SAMBA_BUILD_
-
-/* separators for lists */
-#ifndef LIST_SEP
-#define LIST_SEP " \t,\n\r"
-#endif
-
-/**
-  build a null terminated list of strings from a input string and a
-  separator list. The separator list must contain characters less than
-  or equal to 0x2f for this to work correctly on multi-byte strings
-*/
-_PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
-
-/**
- * build a null terminated list of strings from an argv-like input string 
- * Entries are seperated by spaces and can be enclosed by quotes. 
- * Does NOT support escaping
- */
-_PUBLIC_ const char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
-
-/**
- * join a list back to one string 
- */
-_PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char seperator);
-
-/** join a list back to one (shell-like) string; entries 
- * seperated by spaces, using quotes where necessary */
-_PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char sep);
-
-/**
-  return the number of elements in a string list
-*/
-_PUBLIC_ size_t str_list_length(const char * const *list);
-
-/**
-  copy a string list
-*/
-_PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list);
-
-/**
-   Return true if all the elements of the list match exactly.
- */
-_PUBLIC_ bool str_list_equal(const char **list1, const char **list2);
-
-/**
-  add an entry to a string list
-*/
-_PUBLIC_ const char **str_list_add(const char **list, const char *s);
-
-/**
-  remove an entry from a string list
-*/
-_PUBLIC_ void str_list_remove(const char **list, const char *s);
-
-/**
-  return true if a string is in a list
-*/
-_PUBLIC_ bool str_list_check(const char **list, const char *s);
-
-/**
-  return true if a string is in a list, case insensitively
-*/
-_PUBLIC_ bool str_list_check_ci(const char **list, const char *s);
-#endif
-
 /* The following definitions come from lib/util/util_file.c  */
 
 
index 015c9d10ae79b1f10295671807b6e9af0c1a0027..863c486bbed5814f6c00de198efb74542798b858 100644 (file)
@@ -84,7 +84,6 @@ struct tevent_context *tevent_context_init(TALLOC_CTX *mem_ctx);
 /* UTIL_OBJ */
 #include "lib/util/idtree.c"
 #include "lib/util/db_wrap.c"
-#include "lib/util/strlist.c"
 #include "lib/util/util.c"
 #include "lib/util/util_time.c"
 #include "lib/util/util_file.c"
index c20b1657ff6bf829b59d7584d3e3eecd1b554643..8e193f78a9e5ca2dbb2b58467e3af7006bfb9e33 100644 (file)
@@ -34,7 +34,6 @@ bool fast_start;
 /* UTIL_OBJ */
 #include "lib/util/idtree.c"
 #include "lib/util/db_wrap.c"
-#include "lib/util/strlist.c"
 #include "lib/util/util.c"
 #include "lib/util/util_time.c"
 #include "lib/util/util_file.c"