aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/printf-parse.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-29 06:45:51 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-29 06:45:51 +0000
commit69c69fe11da745ee591a17570c2be5b529ec2fa6 (patch)
treea6a20ad924fc78b78dc855d9c12cda1649f5ad71 /stdio-common/printf-parse.h
parent5e4633932782f08412e8cee75236f4f458591a3d (diff)
downloadglibc-69c69fe11da745ee591a17570c2be5b529ec2fa6.zip
glibc-69c69fe11da745ee591a17570c2be5b529ec2fa6.tar.gz
glibc-69c69fe11da745ee591a17570c2be5b529ec2fa6.tar.bz2
Update.
2000-07-28 Ulrich Drepper <drepper@redhat.com> * 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).
Diffstat (limited to 'stdio-common/printf-parse.h')
-rw-r--r--stdio-common/printf-parse.h78
1 files changed, 42 insertions, 36 deletions
diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h
index e9772ef..45bcc3a 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 = ' ';