mirror of git://sourceware.org/git/glibc.git
Update.
* stdlib/grouping.h: Accept ungrouped numbers even if locale defines grouping.
This commit is contained in:
parent
b1f25a7a9d
commit
733bb62a1e
|
|
@ -1,5 +1,8 @@
|
||||||
1998-04-28 Ulrich Drepper <drepper@cygnus.com>
|
1998-04-28 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* stdlib/grouping.h: Accept ungrouped numbers even if locale
|
||||||
|
defines grouping.
|
||||||
|
|
||||||
* intl/hash-string.h: Don't include values.h.
|
* intl/hash-string.h: Don't include values.h.
|
||||||
|
|
||||||
* inet/Makefile (tests): Add tst-ether_aton.
|
* inet/Makefile (tests): Add tst-ether_aton.
|
||||||
|
|
|
||||||
|
|
@ -2162,8 +2162,8 @@ END LC_MONETARY
|
||||||
|
|
||||||
LC_NUMERIC
|
LC_NUMERIC
|
||||||
decimal_point "<,>"
|
decimal_point "<,>"
|
||||||
thousands_sep ""
|
thousands_sep "<.>"
|
||||||
grouping 0;0
|
grouping 3;3
|
||||||
END LC_NUMERIC
|
END LC_NUMERIC
|
||||||
|
|
||||||
LC_TIME
|
LC_TIME
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* Internal header for proving correct grouping in strings of numbers.
|
/* Internal header for proving correct grouping in strings of numbers.
|
||||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
@ -53,6 +53,11 @@ correctly_grouped_prefix (const STRING_TYPE *begin, const STRING_TYPE *end,
|
||||||
while (cp >= begin && (wchar_t) *cp != thousands)
|
while (cp >= begin && (wchar_t) *cp != thousands)
|
||||||
--cp;
|
--cp;
|
||||||
|
|
||||||
|
/* We allow the representation to contain no grouping at all even if
|
||||||
|
the locale specifies we can have grouping. */
|
||||||
|
if (cp < begin)
|
||||||
|
return end;
|
||||||
|
|
||||||
if (end - cp == (int) *gp + 1)
|
if (end - cp == (int) *gp + 1)
|
||||||
{
|
{
|
||||||
/* This group matches the specification. */
|
/* This group matches the specification. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue