mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user