]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(collate_finish): Assign a wide char collation sequence value to multi
authorUlrich Drepper <drepper@redhat.com>
Fri, 1 Feb 2002 20:24:50 +0000 (20:24 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 1 Feb 2002 20:24:50 +0000 (20:24 +0000)
character collating elements, and avoid over writing by non-character elements.

locale/programs/ld-collate.c

index 6d238a658e01f0f79c3820030a0b017ee4f17c82..915f618571737817baf11f38305bd62996387367 100644 (file)
@@ -1666,6 +1666,10 @@ collate_finish (struct localedef_t *locale, struct charmap_t *charmap)
 
          runp->wcseqorder = wcseqact++;
        }
+      else if (runp->mbs != NULL && runp->weights != NULL)
+        {
+          runp->wcseqorder = wcseqact++;
+        }
 
       /* Up to the next entry.  */
       runp = runp->next;
@@ -1700,8 +1704,9 @@ collate_finish (struct localedef_t *locale, struct charmap_t *charmap)
          struct element_t *lastp;
 
          /* Insert the collation sequence value.  */
-         collseq_table_add (&collate->wcseqorder, runp->wcs[0],
-                            runp->wcseqorder);
+         if (runp->is_character)
+           collseq_table_add (&collate->wcseqorder, runp->wcs[0],
+                              runp->wcseqorder);
 
          /* Find the point where to insert in the list.  */
          e = wchead_table_get (&collate->wcheads, runp->wcs[0]);