mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
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).
This commit is contained in:
@ -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 = ' ';
|
||||
|
||||
|
Reference in New Issue
Block a user