summaryrefslogtreecommitdiff
path: root/lib/util/ms_fnmatch.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-24 16:00:43 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-24 16:00:43 +0200
commitc3415b3e57717cfb96b9df7caa1a27fbc26bde21 (patch)
tree4217157469cf5162c97c515e0288b963cf457437 /lib/util/ms_fnmatch.c
parent264277b555a7bd9d2308ef6ec24ecef77fa1d401 (diff)
downloadsamba-c3415b3e57717cfb96b9df7caa1a27fbc26bde21.tar.gz
samba-c3415b3e57717cfb96b9df7caa1a27fbc26bde21.tar.bz2
samba-c3415b3e57717cfb96b9df7caa1a27fbc26bde21.zip
Add version of next_codepoint without iconv_convenience.
Diffstat (limited to 'lib/util/ms_fnmatch.c')
-rw-r--r--lib/util/ms_fnmatch.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/util/ms_fnmatch.c b/lib/util/ms_fnmatch.c
index 5e04ec1f4b..dde35268eb 100644
--- a/lib/util/ms_fnmatch.c
+++ b/lib/util/ms_fnmatch.c
@@ -64,9 +64,8 @@ static int ms_fnmatch_core(const char *p, const char *n,
codepoint_t c, c2;
int i;
size_t size, size_n;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
- while ((c = next_codepoint(iconv_convenience, p, &size))) {
+ while ((c = next_codepoint(p, &size))) {
p += size;
switch (c) {
@@ -76,7 +75,7 @@ static int ms_fnmatch_core(const char *p, const char *n,
return null_match(p);
}
for (i=0; n[i]; i += size_n) {
- next_codepoint(iconv_convenience, n+i, &size_n);
+ next_codepoint(n+i, &size_n);
if (ms_fnmatch_core(p, n+i, max_n+1, ldot) == 0) {
return 0;
}
@@ -95,7 +94,7 @@ static int ms_fnmatch_core(const char *p, const char *n,
return -1;
}
for (i=0; n[i]; i += size_n) {
- next_codepoint(iconv_convenience, n+i, &size_n);
+ next_codepoint(n+i, &size_n);
if (ms_fnmatch_core(p, n+i, max_n+1, ldot) == 0) return 0;
if (n+i == ldot) {
if (ms_fnmatch_core(p, n+i+size_n, max_n+1, ldot) == 0) return 0;
@@ -111,7 +110,7 @@ static int ms_fnmatch_core(const char *p, const char *n,
if (! *n) {
return -1;
}
- next_codepoint(iconv_convenience, n, &size_n);
+ next_codepoint(n, &size_n);
n += size_n;
break;
@@ -125,7 +124,7 @@ static int ms_fnmatch_core(const char *p, const char *n,
break;
}
if (! *n) return null_match(p);
- next_codepoint(iconv_convenience, n, &size_n);
+ next_codepoint(n, &size_n);
n += size_n;
break;
@@ -135,12 +134,12 @@ static int ms_fnmatch_core(const char *p, const char *n,
return 0;
}
if (*n != '.') return -1;
- next_codepoint(iconv_convenience, n, &size_n);
+ next_codepoint(n, &size_n);
n += size_n;
break;
default:
- c2 = next_codepoint(iconv_convenience, n, &size_n);
+ c2 = next_codepoint(n, &size_n);
if (c != c2 && codepoint_cmpi(c, c2) != 0) {
return -1;
}