From 6906cea4cc14c72110dc35c625491d482d4caef1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 4 Aug 2001 08:05:56 +0000 Subject: Update. 2001-08-04 Ulrich Drepper * libio/genops.c (_IO_unbuffer_write): Force streams in narrow orientation so that conversion modules aren't used anymore. * malloc/set-freeres.c: Call _IO_cleanup before running subfreeres functions to avoid using wide streams afterwards. * iconvdata/Makefile: Add rules to build GEORGIAN-PS and GEORGIAN-ACADEMY. * iconvdata/georgian-ps.c: New file. * iconvdata/georgian-academy.c: New file. * iconvdata/gconv-modules: Add entries for GEORGIAN-PS and GEORGIAN-ACADEMY. * iconvdata/tst-tables.sh: Add GEORGIAN-PS and GEORGIAN-ACADEMY. --- locale/programs/ld-collate.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'locale') diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index e9e92e2..d19e3bb 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -939,24 +939,37 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen, { /* It's no character, so look through the collation elements and symbol list. */ - void *result; - - if (find_entry (&collate->sym_table, symstr, symlen, &result) == 0) + if (find_entry (&collate->elem_table, symstr, symlen, + (void **) &elem) != 0) { - /* It's a collation symbol. */ - struct symbol_t *sym = (struct symbol_t *) result; - elem = sym->order; + void *result; + struct symbol_t *sym = NULL; + + /* It's also collation element. Therefore it's either a + collating symbol or it's a character which is not + supported by the character set. In the later case we + simply create a dummy entry. */ + if (find_entry (&collate->sym_table, symstr, symlen, &result) == 0) + { + /* It's a collation symbol. */ + sym = (struct symbol_t *) result; + + elem = sym->order; + } if (elem == NULL) - elem = sym->order = new_element (collate, NULL, 0, NULL, - sym->name, strlen (sym->name), 0); - } - else if (find_entry (&collate->elem_table, symstr, symlen, - (void **) &elem) != 0) - { - /* It's also no collation element. Therefore ignore it. */ - lr_ignore_rest (ldfile, 0); - return 1; + { + elem = new_element (collate, NULL, 0, NULL, symstr, symlen, 0); + + if (sym != NULL) + sym->order = elem; + else + /* Enter a fake element in the sequence table. This + won't cause anything in the output since there is + no multibyte or wide character associated with + it. */ + insert_entry (&collate->seq_table, symstr, symlen, elem); + } } } else -- cgit v1.1