aboutsummaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-16 07:14:28 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-16 07:14:28 +0000
commitf0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c (patch)
treef06d459ac9d5a2d7c02591cd5375dd7ad6ff7a1e /locale/programs
parent2def87644d44b41bb908d4ed150a110d4d9399ea (diff)
downloadglibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.tar
glibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.tar.gz
glibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.tar.bz2
glibc-f0c7c524bb92cdc42cc4e0f7ba1ddda865a4494c.zip
Update.
* posix/regex_internal.h: Add forward declaration of re_dfa_t. Replace last two parameters of re_string_allocate and re_string_construct with pointer to DFA. (re_dfa_t): Add map_notascii field. * posix/regcomp.c (re_compile_internal): Add call of re_string_construct. (init_dfa): Initialize mpa_notascii. * posix/regex_internal.c: Adjust definitions of re_string_allocate and re_string_construct. Pass DFA to re_string_construct. Adjust definition. Initialize map_notascii field. (build_wcs_upper_buffer): If map_notascii is zero use simplfied method to map ASCII values to upper case. * posix/regex.c: Include localeinfo.h. * posix/regexec.c: Adjust call of re_string_allocate. * locale/langinfo.h: Add _NL_CTYPE_MAP_TO_NONASCII. * locale/localeinfo.h (LIMAGIC): Change value. * locale/categories.def. Add entry for _NL_CTYPE_MAP_TO_NONASCII. * locale/C-ctype.h: Likewise. * locale/programs/ld-ctype.c: Compute whether any mapping maps from ASCII to non-ASCII value. Write out that value.
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-ctype.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 2a2c831481..499868237b 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -181,6 +181,8 @@ struct locale_ctype_t
const char *default_missing_file;
size_t default_missing_lineno;
+ uint32_t to_nonascii;
+
/* The arrays for the binary representation. */
char_class_t *ctype_b;
char_class32_t *ctype32_b;
@@ -1035,6 +1037,10 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len;
break;
+
+ CTYPE_DATA (_NL_CTYPE_MAP_TO_NONASCII,
+ &ctype->to_nonascii, sizeof (uint32_t));
+
case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS_MB_LEN):
iov[2 + elem + offset].iov_base = alloca (sizeof (uint32_t));
iov[2 + elem + offset].iov_len = sizeof (uint32_t);
@@ -2706,6 +2712,14 @@ with character code range values one must use the absolute ellipsis `...'"));
if (!ignore_content)
{
+ /* Check whether the mapping converts from an ASCII value
+ to a non-ASCII value. */
+ if (from_seq != NULL && from_seq->nbytes == 1
+ && isascii (from_seq->bytes[0])
+ && to_seq != NULL && (to_seq->nbytes != 1
+ || !isascii (to_seq->bytes[0])))
+ ctype->to_nonascii = 1;
+
if (mapidx < 2 && from_seq != NULL && to_seq != NULL
&& from_seq->nbytes == 1 && to_seq->nbytes == 1)
/* We can use this value. */