(collate_finish): Assign a wide char collation sequence value to multi

character collating elements, and avoid over writing by non-character elements.
This commit is contained in:
Ulrich Drepper 2002-02-01 20:24:50 +00:00
parent ae1e7a83b1
commit 0ee5ee3c3b

View File

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