diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-04-06 07:42:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-04-06 07:42:24 +0000 |
commit | 723faa38f929acece94d98a5b389df17f13ddfe5 (patch) | |
tree | 1749dd3700b3d5a6d45e8ca74670ef0409306b64 /locale/programs/charmap.c | |
parent | a1303dc8dc57dbcd4605992dc177d11ae4d45aab (diff) | |
download | glibc-723faa38f929acece94d98a5b389df17f13ddfe5.tar.gz glibc-723faa38f929acece94d98a5b389df17f13ddfe5.tar.xz glibc-723faa38f929acece94d98a5b389df17f13ddfe5.zip |
Update.
2000-04-06 Ulrich Drepper <drepper@redhat.com> * locale/programs/charmap.c (parse_charmap): Recognize <Uxxxx> values as character names. * locale/programs/ld-ctype.c (get_character): Handle missing repertoire map correctly.
Diffstat (limited to 'locale/programs/charmap.c')
-rw-r--r-- | locale/programs/charmap.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c index 0c54c78ad4..37047a0407 100644 --- a/locale/programs/charmap.c +++ b/locale/programs/charmap.c @@ -441,7 +441,7 @@ character sets with locking states are not supported")); continue; } - if (nowtok != tok_bsymbol) + if (nowtok != tok_bsymbol && nowtok != tok_ucs4) { lr_error (cmfile, _("syntax error in %s definition: %s"), "CHARMAP", _("no symbolic name given")); @@ -455,9 +455,17 @@ character sets with locking states are not supported")); if (from_name != NULL) obstack_free (&result->mem_pool, from_name); - from_name = (char *) obstack_copy0 (&result->mem_pool, - now->val.str.startmb, - now->val.str.lenmb); + if (nowtok == tok_bsymbol) + from_name = (char *) obstack_copy0 (&result->mem_pool, + now->val.str.startmb, + now->val.str.lenmb); + else + { + obstack_printf (&result->mem_pool, "<%08X>", + cmfile->token.val.ucs4); + obstack_1grow (&result->mem_pool, '\0'); + from_name = (char *) obstack_finish (&result->mem_pool); + } to_name = NULL; state = 3; @@ -506,7 +514,7 @@ character sets with locking states are not supported")); continue; case 4: - if (nowtok != tok_bsymbol) + if (nowtok != tok_bsymbol && nowtok != tok_ucs4) { lr_error (cmfile, _("syntax error in %s definition: %s"), "CHARMAP", @@ -517,9 +525,17 @@ character sets with locking states are not supported")); } /* Copy the to-name in a safe place. */ - to_name = (char *) obstack_copy0 (&result->mem_pool, - cmfile->token.val.str.startmb, - cmfile->token.val.str.lenmb); + if (nowtok == tok_bsymbol) + to_name = (char *) obstack_copy0 (&result->mem_pool, + cmfile->token.val.str.startmb, + cmfile->token.val.str.lenmb); + else + { + obstack_printf (&result->mem_pool, "<%08X>", + cmfile->token.val.ucs4); + obstack_1grow (&result->mem_pool, '\0'); + to_name = (char *) obstack_finish (&result->mem_pool); + } state = 5; continue; |