about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-24 05:51:45 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-24 05:51:45 +0000
commit76e680a87a3f24c4e200e1064c65d7269c4c189c (patch)
treed69e34d7309125a0fca5632f5236008e6fd7129c /locale
parentbd979c005c2558ba492cdca8e3b1ad4bdbbda4b7 (diff)
downloadglibc-76e680a87a3f24c4e200e1064c65d7269c4c189c.tar.gz
glibc-76e680a87a3f24c4e200e1064c65d7269c4c189c.tar.xz
glibc-76e680a87a3f24c4e200e1064c65d7269c4c189c.zip
Update.
	* string/stratcliff.c: Add one more strchr test for something
	which was reported to not work
	(which proofed to be wrong).
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-ctype.c27
1 files changed, 22 insertions, 5 deletions
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)
 		{