diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-05-24 20:22:51 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-05-24 20:22:51 +0000 |
commit | acb5ee2e561276d64c6e26ef4b82f59a4db5ae90 (patch) | |
tree | 1f7ebfcaf8bf2874ae5cdb6348205dccfd9499c2 /posix/fnmatch.c | |
parent | b7cbee1cb029f6471aa069552a69f04a3d1b4d70 (diff) | |
download | glibc-acb5ee2e561276d64c6e26ef4b82f59a4db5ae90.tar.gz glibc-acb5ee2e561276d64c6e26ef4b82f59a4db5ae90.tar.xz glibc-acb5ee2e561276d64c6e26ef4b82f59a4db5ae90.zip |
Update.
2000-05-24 Ulrich Drepper <drepper@redhat.com> * locale/programs/ld-collate.c (struct element_t): Add mbseqorder and wcseqorder members. (struct locale_collate_t): Likewise. (collate_finish): Assign collation sequence value to each character. Create tables for output. (collate_output): Write out tables with collation sequence information. * locale/C-collate.c: Provide C locale data for collation sequence table. * locale/langinfo.h: Add _NL_COLLATE_COLLSEQMB and _NL_COLLATE_COLLSEQWC. * locale/categories.def: Add entries for _NL_COLLATE_COLLSEQMB and _NL_COLLATE_COLLSEQWC. * posix/fnmatch.c: Define SUFFIX and WIDE_CHAR_VERSION before include fnmatch_loop.c. * posix/fnmatch_loop.c: Don't use strcoll while determining whether character is matched by range expression. Use collation sequence table. Outside glibc fall back on simple character value comparison.
Diffstat (limited to 'posix/fnmatch.c')
-rw-r--r-- | posix/fnmatch.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/posix/fnmatch.c b/posix/fnmatch.c index 18abf5da27..c4b11080fe 100644 --- a/posix/fnmatch.c +++ b/posix/fnmatch.c @@ -48,6 +48,15 @@ # include <wctype.h> #endif +/* We need some of the locale data (the collation sequence information) + but there is no interface to get this information in general. Therefore + we support a correct implementation only in glibc. */ +#ifdef _LIBC +# include "../locale/localeinfo.h" + +# define CONCAT(a,b) __CONCAT(a,b) +#endif + /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling @@ -192,6 +201,7 @@ __wcschrnul (s, c) # define STRCHR(S, C) strchr (S, C) # define STRCHRNUL(S, C) __strchrnul (S, C) # define STRCOLL(S1, S2) strcoll (S1, S2) +# define SUFFIX MB # include "fnmatch_loop.c" @@ -209,7 +219,10 @@ __wcschrnul (s, c) # define BTOWC(C) (C) # define STRCHR(S, C) wcschr (S, C) # define STRCHRNUL(S, C) __wcschrnul (S, C) -# define STRCOLL(S1, S2) wcscoll (S1, S2) +# define STRCOLL(S1, S2) wcscoll (S1, S2) +# define SUFFIX WC +# define WIDE_CHAR_VERSION 1 + # undef IS_CHAR_CLASS # ifdef _LIBC |