summaryrefslogtreecommitdiff
path: root/source4/lib/util/util_strlist.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-27 17:21:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:53 -0500
commit4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a (patch)
treeb2465bb451c73232e640d2c2718a6af084be2345 /source4/lib/util/util_strlist.c
parent8a1d019f53ef6d1a6900a005b335bdc10d14bbe4 (diff)
downloadsamba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.tar.gz
samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.tar.bz2
samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.zip
r24710: Use standard boolean type for easier use by external users.
(This used to be commit 99f4124137d4a61216e8189f26d4da32882c0f4a)
Diffstat (limited to 'source4/lib/util/util_strlist.c')
-rw-r--r--source4/lib/util/util_strlist.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source4/lib/util/util_strlist.c b/source4/lib/util/util_strlist.c
index cd0e1cdac0..ab73fb2d15 100644
--- a/source4/lib/util/util_strlist.c
+++ b/source4/lib/util/util_strlist.c
@@ -217,7 +217,7 @@ _PUBLIC_ const 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)
+_PUBLIC_ bool str_list_equal(const char **list1, const char **list2)
{
int i;
@@ -227,13 +227,13 @@ _PUBLIC_ BOOL str_list_equal(const char **list1, const char **list2)
for (i=0;list1[i] && list2[i];i++) {
if (strcmp(list1[i], list2[i]) != 0) {
- return False;
+ return false;
}
}
if (list1[i] || list2[i]) {
- return False;
+ return false;
}
- return True;
+ return true;
}
@@ -275,50 +275,50 @@ _PUBLIC_ void str_list_remove(const char **list, const char *s)
/**
- return True if a string is in a list
+ return true if a string is in a list
*/
-_PUBLIC_ BOOL str_list_check(const char **list, const char *s)
+_PUBLIC_ bool str_list_check(const char **list, const char *s)
{
int i;
for (i=0;list[i];i++) {
- if (strcmp(list[i], s) == 0) return True;
+ if (strcmp(list[i], s) == 0) return true;
}
- return False;
+ return false;
}
/**
- return True if a string is in a list, case insensitively
+ return true if a string is in a list, case insensitively
*/
-_PUBLIC_ BOOL str_list_check_ci(const char **list, const char *s)
+_PUBLIC_ bool str_list_check_ci(const char **list, const char *s)
{
int i;
for (i=0;list[i];i++) {
- if (strcasecmp(list[i], s) == 0) return True;
+ if (strcasecmp(list[i], s) == 0) return true;
}
- return False;
+ return false;
}
/**
Check if a string is part of a list.
**/
-_PUBLIC_ BOOL in_list(const char *s, const char *list, BOOL casesensitive)
+_PUBLIC_ bool in_list(const char *s, const char *list, bool casesensitive)
{
pstring tok;
const char *p=list;
if (!list)
- return(False);
+ return false;
while (next_token(&p,tok,LIST_SEP,sizeof(tok))) {
if (casesensitive) {
if (strcmp(tok,s) == 0)
- return(True);
+ return true;
} else {
if (strcasecmp_m(tok,s) == 0)
- return(True);
+ return true;
}
}
- return(False);
+ return false;
}