From 76e680a87a3f24c4e200e1064c65d7269c4c189c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Nov 1999 05:51:45 +0000 Subject: Update. * string/stratcliff.c: Add one more strchr test for something which was reported to not work (which proofed to be wrong). --- locale/programs/ld-ctype.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'locale/programs') diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index 29ef15d0a5..c82a36b80c 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -551,9 +551,17 @@ character '%s' in class `%s' must not be in class `%s'"), nbytes) <= 0) { /* Find the UCS value for `bytes'. */ - uint32_t wch = repertoire_find_value (ctype->repertoire, bytes, - nbytes); int inner; + uint32_t wch; + struct charseq *seq = charmap_find_symbol (charmap, bytes, nbytes); + + if (seq == NULL) + wch = ILLEGAL_CHAR_VALUE; + else if (seq->ucs4 != UNINITIALIZED_CHAR_VALUE) + wch = seq->ucs4; + else + wch = repertoire_find_value (ctype->repertoire, seq->name, + strlen (seq->name)); if (wch != ILLEGAL_CHAR_VALUE) /* We are only interested in the side-effects of the @@ -1097,7 +1105,7 @@ find_idx (struct locale_ctype_t *ctype, uint32_t **table, size_t *max, (*max - old_max) * sizeof (uint32_t)); } - *act = cnt; + *act = cnt + 1; } return &(*table)[cnt]; @@ -3084,9 +3092,18 @@ Computing table size for character classes might take a while..."), nbytes) <= 0) { /* Find the UCS value for `bytes'. */ - uint32_t wch = repertoire_find_value (ctype->repertoire, bytes, - nbytes); int inner; + uint32_t wch; + struct charseq *seq = + charmap_find_symbol (charmap, bytes, nbytes); + + if (seq == NULL) + wch = ILLEGAL_CHAR_VALUE; + else if (seq->ucs4 != UNINITIALIZED_CHAR_VALUE) + wch = seq->ucs4; + else + wch = repertoire_find_value (ctype->repertoire, seq->name, + strlen (seq->name)); if (wch != ILLEGAL_CHAR_VALUE) { -- cgit v1.2.3