diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-28 17:18:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-28 17:18:24 +0000 |
commit | 733bb62a1e04206c836cf47df1c237421df98c5f (patch) | |
tree | c38ab5f2db6dec7a36978e17af3fefb23299160a | |
parent | b1f25a7a9dd17a633570f05a3d0c5407cf4ea84b (diff) | |
download | glibc-733bb62a1e04206c836cf47df1c237421df98c5f.tar.gz glibc-733bb62a1e04206c836cf47df1c237421df98c5f.tar.xz glibc-733bb62a1e04206c836cf47df1c237421df98c5f.zip |
Update.
* stdlib/grouping.h: Accept ungrouped numbers even if locale defines grouping.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | localedata/locales/de_DE | 4 | ||||
-rw-r--r-- | stdlib/grouping.h | 7 |
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 1e518c794d..5d0580006c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 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. * inet/Makefile (tests): Add tst-ether_aton. diff --git a/localedata/locales/de_DE b/localedata/locales/de_DE index c3e90eb5e7..615a35e022 100644 --- a/localedata/locales/de_DE +++ b/localedata/locales/de_DE @@ -2162,8 +2162,8 @@ END LC_MONETARY LC_NUMERIC decimal_point "<,>" -thousands_sep "" -grouping 0;0 +thousands_sep "<.>" +grouping 3;3 END LC_NUMERIC LC_TIME diff --git a/stdlib/grouping.h b/stdlib/grouping.h index deb7a15cfb..71b89f9133 100644 --- a/stdlib/grouping.h +++ b/stdlib/grouping.h @@ -1,5 +1,5 @@ /* 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. 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) --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) { /* This group matches the specification. */ |