svn commit: samba r22373 - in branches/SAMBA_4_0/source/lib/util: .
metze at samba.org
metze at samba.org
Thu Apr 19 14:21:57 GMT 2007
Author: metze
Date: 2007-04-19 14:21:56 +0000 (Thu, 19 Apr 2007)
New Revision: 22373
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22373
Log:
move in_list() to util_strlist.c to remove the dependency
from util.o to next_token() and strcasecmp_m()
with this the pidl tests link better on some hosts
metze
Modified:
branches/SAMBA_4_0/source/lib/util/util_str.c
branches/SAMBA_4_0/source/lib/util/util_strlist.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/util_str.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/util_str.c 2007-04-19 14:14:11 UTC (rev 22372)
+++ branches/SAMBA_4_0/source/lib/util/util_str.c 2007-04-19 14:21:56 UTC (rev 22373)
@@ -25,7 +25,6 @@
#include "includes.h"
#include "libcli/raw/smb.h"
#include "pstring.h"
-#include "lib/ldb/include/ldb.h"
#include "system/locale.h"
/**
@@ -247,29 +246,6 @@
}
/**
- Check if a string is part of a list.
-**/
-_PUBLIC_ BOOL in_list(const char *s, const char *list, BOOL casesensitive)
-{
- pstring tok;
- const char *p=list;
-
- if (!list)
- return(False);
-
- while (next_token(&p,tok,LIST_SEP,sizeof(tok))) {
- if (casesensitive) {
- if (strcmp(tok,s) == 0)
- return(True);
- } else {
- if (strcasecmp_m(tok,s) == 0)
- return(True);
- }
- }
- return(False);
-}
-
-/**
Set a string value, allocing the space for the string
**/
static BOOL string_init(char **dest,const char *src)
Modified: branches/SAMBA_4_0/source/lib/util/util_strlist.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/util_strlist.c 2007-04-19 14:14:11 UTC (rev 22372)
+++ branches/SAMBA_4_0/source/lib/util/util_strlist.c 2007-04-19 14:21:56 UTC (rev 22373)
@@ -20,6 +20,8 @@
*/
#include "includes.h"
+#include "pstring.h"
+#include "system/locale.h"
/**
* @file
@@ -298,3 +300,26 @@
}
return False;
}
+
+/**
+ Check if a string is part of a list.
+**/
+_PUBLIC_ BOOL in_list(const char *s, const char *list, BOOL casesensitive)
+{
+ pstring tok;
+ const char *p=list;
+
+ if (!list)
+ return(False);
+
+ while (next_token(&p,tok,LIST_SEP,sizeof(tok))) {
+ if (casesensitive) {
+ if (strcmp(tok,s) == 0)
+ return(True);
+ } else {
+ if (strcasecmp_m(tok,s) == 0)
+ return(True);
+ }
+ }
+ return(False);
+}
More information about the samba-cvs
mailing list