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). --- stdio-common/printf-parse.h | 78 ++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 36 deletions(-) (limited to 'stdio-common/printf-parse.h') diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h index e9772ef666..45bcc3a9bb 100644 --- a/stdio-common/printf-parse.h +++ b/stdio-common/printf-parse.h @@ -172,42 +172,48 @@ parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, } /* Check for spec modifiers. */ - while (*format == L_(' ') || *format == L_('+') || *format == L_('-') || - *format == L_('#') || *format == L_('0') || *format == L_('\'')) - switch (*format++) - { - case L_(' '): - /* Output a space in place of a sign, when there is no sign. */ - spec->info.space = 1; - break; - case L_('+'): - /* Always output + or - for numbers. */ - spec->info.showsign = 1; - break; - case L_('-'): - /* Left-justify things. */ - spec->info.left = 1; - break; - case L_('#'): - /* Use the "alternate form": - Hex has 0x or 0X, FP always has a decimal point. */ - spec->info.alt = 1; - break; - case L_('0'): - /* Pad with 0s. */ - spec->info.pad = '0'; - break; - case L_('\''): - /* Show grouping in numbers if the locale information - indicates any. */ - spec->info.group = 1; - break; - case L_('I'): - /* Use the internationalized form of the output. Currently - means to use the `outdigits' of the current locale. */ - spec->info.i18n = 1; - break; - } + do + { + switch (*format) + { + case L_(' '): + /* Output a space in place of a sign, when there is no sign. */ + spec->info.space = 1; + continue; + case L_('+'): + /* Always output + or - for numbers. */ + spec->info.showsign = 1; + continue; + case L_('-'): + /* Left-justify things. */ + spec->info.left = 1; + continue; + case L_('#'): + /* Use the "alternate form": + Hex has 0x or 0X, FP always has a decimal point. */ + spec->info.alt = 1; + continue; + case L_('0'): + /* Pad with 0s. */ + spec->info.pad = '0'; + continue; + case L_('\''): + /* Show grouping in numbers if the locale information + indicates any. */ + spec->info.group = 1; + continue; + case L_('I'): + /* Use the internationalized form of the output. Currently + means to use the `outdigits' of the current locale. */ + spec->info.i18n = 1; + continue; + default: + break; + } + break; + } + while (*++format); + if (spec->info.left) spec->info.pad = ' '; -- cgit v1.2.3