diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-01-26 02:20:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-01-26 02:20:01 +0000 |
commit | 9de4e2034072a876f16d9c1d7368cee533d91a6b (patch) | |
tree | e39d051ba9c09871a5cd0d7c2a9f80c41e4012db /posix/fnmatch_loop.c | |
parent | 14a6b4e45f4297a39b704557491fcc16ff863ef7 (diff) | |
download | glibc-9de4e2034072a876f16d9c1d7368cee533d91a6b.tar.gz glibc-9de4e2034072a876f16d9c1d7368cee533d91a6b.tar.xz glibc-9de4e2034072a876f16d9c1d7368cee533d91a6b.zip |
Update.
2000-01-24 Paul Eggert <eggert@twinsun.com> * posix/fnmatch_loop.c (FCT): Use locale's collating sequence when deciding whether a character falls within a character range. 2000-01-24 Paul Eggert <eggert@twinsun.com> * posix/fnmatch_loop.c (FCT): When matching [A-Z] and folding case, lower-case A too. 2000-01-24 Thorsten Kukuk <kukuk@suse.de> * sysdeps/unix/sysv/linux/i386/syscalls.list: Remove old[gs]etrlimit.
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r-- | posix/fnmatch_loop.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index a7fcac7c80..bfcdde6005 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -247,8 +247,9 @@ FCT (pattern, string, no_leading_period, flags) return FNM_NOMATCH; else { + c = FOLD (c); normal_bracket: - if (FOLD (c) == fn) + if (c == fn) goto matched; cold = c; @@ -257,14 +258,26 @@ FCT (pattern, string, no_leading_period, flags) if (c == L('-') && *p != L(']')) { /* It is a range. */ + CHAR lo[2]; + CHAR fc[2]; UCHAR cend = *p++; if (!(flags & FNM_NOESCAPE) && cend == L('\\')) cend = *p++; if (cend == L('\0')) return FNM_NOMATCH; - if (cold <= fn && fn <= FOLD (cend)) - goto matched; + lo[0] = cold; + lo[1] = L('\0'); + fc[0] = fn; + fc[1] = L('\0'); + if (STRCOLL (lo, fc) <= 0) + { + CHAR hi[2]; + hi[0] = FOLD (cend); + hi[1] = L('\0'); + if (STRCOLL (fc, hi) <= 0) + goto matched; + } c = *p++; } |