From 733bb62a1e04206c836cf47df1c237421df98c5f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Apr 1998 17:18:24 +0000 Subject: Update. * stdlib/grouping.h: Accept ungrouped numbers even if locale defines grouping. --- stdlib/grouping.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'stdlib') 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 , 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. */ -- cgit v1.2.3-70-g09d2