aboutsummaryrefslogtreecommitdiff
path: root/locale/programs/ld-collate.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-04 08:05:56 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-04 08:05:56 +0000
commit6906cea4cc14c72110dc35c625491d482d4caef1 (patch)
tree858973a2557a4ab9a3761e13ec401fa9bec9dfbf /locale/programs/ld-collate.c
parent03003424c30119b74deb19557d809a3142e5a70d (diff)
downloadglibc-6906cea4cc14c72110dc35c625491d482d4caef1.zip
glibc-6906cea4cc14c72110dc35c625491d482d4caef1.tar.gz
glibc-6906cea4cc14c72110dc35c625491d482d4caef1.tar.bz2
Update.
2001-08-04 Ulrich Drepper <drepper@redhat.com> * 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.
Diffstat (limited to 'locale/programs/ld-collate.c')
-rw-r--r--locale/programs/ld-collate.c43
1 files changed, 28 insertions, 15 deletions
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