From 69c69fe11da745ee591a17570c2be5b529ec2fa6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Jul 2000 06:45:51 +0000 Subject: Update. 2000-07-28 Ulrich Drepper * stdio-common/_i18n_itoa.c: Removed. * stdio-common/_i18n_itoa.h: Removed. * stdio-common/_i18n_itowa.c: Removed. * stdio-common/_i18n_itowa.h: Removed. * stdio-common/_i18n_number.h: New file. * stdio-common/Depend: New file. * stdio-common/printf-parse.h: Handle I modifier correctly. Optimize. * stdio-common/vfprintf.c: Rewrite buffer handling for integer printing. Change printing of numbers with locale specific digits to use new code in _i18n_number.h. * stdio-common/bug13.c: Improve messages. * locale/programs/ld-ctype.c (ctype_read): Improve error message. (set_class_defaults): Always search also for Uxxxx names. Detect insufficient number of outdigits. * locale/Makefile (C-translit.h): Use mv not $(move-if-changed). --- locale/programs/ld-ctype.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'locale/programs/ld-ctype.c') diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index ebfc1e42a4..1c1c492cb0 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -2274,7 +2274,8 @@ ctype_read (struct linereader *ldfile, struct localedef_t *result, lr_error (ldfile, _("\ %s: field `%s' does not contain exactly ten entries"), "LC_CTYPE", "outdigit"); - goto err_label; + lr_ignore_rest (ldfile, 0); + break; } ctype->mboutdigits[ctype->outdigits_act] = seq; @@ -2779,6 +2780,12 @@ set_class_defaults (struct locale_ctype_t *ctype, struct charmap_t *charmap, tmp[0] = ch; seq = charmap_find_value (charmap, tmp, 1); + if (seq == NULL) + { + char buf[10]; + sprintf (buf, "U%08X", ch); + seq = charmap_find_value (charmap, buf, 9); + } if (seq == NULL) { if (!be_quiet) @@ -3131,6 +3138,12 @@ character `%s' not defined while needed as default value"), tmp[1] = (char) ch; seq_from = charmap_find_value (charmap, &tmp[1], 1); + if (seq_from == NULL) + { + char buf[10]; + sprintf (buf, "U%08X", ch); + seq_from = charmap_find_value (charmap, buf, 9); + } if (seq_from == NULL) { if (!be_quiet) @@ -3150,6 +3163,12 @@ character `%s' not defined while needed as default value"), /* This conversion is implementation defined. */ tmp[1] = (char) (ch + ('A' - 'a')); seq_to = charmap_find_value (charmap, &tmp[1], 1); + if (seq_to == NULL) + { + char buf[10]; + sprintf (buf, "U%08X", ch + ('A' - 'a')); + seq_to = charmap_find_value (charmap, buf, 9); + } if (seq_to == NULL) { if (!be_quiet) @@ -3191,9 +3210,13 @@ character `%s' not defined while needed as default value"), ctype->map256_collection[1][ctype->map256_collection[0][cnt]] = cnt; } - if (ctype->outdigits_act == 0) + if (ctype->outdigits_act != 10) { - for (cnt = 0; cnt < 10; ++cnt) + if (ctype->outdigits_act != 0) + error (0,0, _("%s: field `%s' does not contain exactly ten entries"), + "LC_CTYPE", "outdigit"); + + for (cnt = ctype->outdigits_act; cnt < 10; ++cnt) { ctype->mboutdigits[cnt] = charmap_find_symbol (charmap, digits + cnt, 1); -- cgit 1.4.1