mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
__printf_fphex always uses LC_NUMERIC
There is no hexadecimal currency printing. strfmon uses __printf_fp_l exclusively. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -103,9 +103,17 @@ __printf_fphex (FILE *fp,
|
|||||||
}
|
}
|
||||||
fpnum;
|
fpnum;
|
||||||
|
|
||||||
/* Locale-dependent representation of decimal point. */
|
/* This function always uses LC_NUMERIC. */
|
||||||
const char *decimal;
|
assert (info->extra == 0);
|
||||||
wchar_t decimalwc;
|
|
||||||
|
/* Locale-dependent representation of decimal point. Hexadecimal
|
||||||
|
formatting always using LC_NUMERIC (disregarding info->extra). */
|
||||||
|
const char *decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
|
||||||
|
wchar_t decimalwc = _NL_CURRENT_WORD (LC_NUMERIC,
|
||||||
|
_NL_NUMERIC_DECIMAL_POINT_WC);
|
||||||
|
|
||||||
|
/* The decimal point character must never be zero. */
|
||||||
|
assert (*decimal != '\0' && decimalwc != L'\0');
|
||||||
|
|
||||||
/* "NaN" or "Inf" for the special cases. */
|
/* "NaN" or "Inf" for the special cases. */
|
||||||
const char *special = NULL;
|
const char *special = NULL;
|
||||||
@ -147,22 +155,6 @@ __printf_fphex (FILE *fp,
|
|||||||
/* Nonzero if this is output on a wide character stream. */
|
/* Nonzero if this is output on a wide character stream. */
|
||||||
int wide = info->wide;
|
int wide = info->wide;
|
||||||
|
|
||||||
|
|
||||||
/* Figure out the decimal point character. */
|
|
||||||
if (info->extra == 0)
|
|
||||||
{
|
|
||||||
decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
|
|
||||||
decimalwc = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_DECIMAL_POINT_WC);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
decimal = _NL_CURRENT (LC_MONETARY, MON_DECIMAL_POINT);
|
|
||||||
decimalwc = _NL_CURRENT_WORD (LC_MONETARY,
|
|
||||||
_NL_MONETARY_DECIMAL_POINT_WC);
|
|
||||||
}
|
|
||||||
/* The decimal point character must never be zero. */
|
|
||||||
assert (*decimal != '\0' && decimalwc != L'\0');
|
|
||||||
|
|
||||||
#define PRINTF_FPHEX_FETCH(FLOAT, VAR) \
|
#define PRINTF_FPHEX_FETCH(FLOAT, VAR) \
|
||||||
{ \
|
{ \
|
||||||
(VAR) = *(const FLOAT *) args[0]; \
|
(VAR) = *(const FLOAT *) args[0]; \
|
||||||
|
Reference in New Issue
Block a user