summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/lnumeric.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-02-10 01:38:18 +0000
committerache <ache@FreeBSD.org>2001-02-10 01:38:18 +0000
commit0ec6d3ee51e24e43ec6ad9463cbebee9edf3aa08 (patch)
treef9a7dda1c7bab98116393fa4c83958293ba8ffff /lib/libc/locale/lnumeric.c
parent55d37192a42331f1909034340592bfe742b45594 (diff)
downloadFreeBSD-src-0ec6d3ee51e24e43ec6ad9463cbebee9edf3aa08.zip
FreeBSD-src-0ec6d3ee51e24e43ec6ad9463cbebee9edf3aa08.tar.gz
Correct myself a bit: situation is broken not for _all_ numeric LC_MONETARY,
LC_NUMERIC fields, but only for *grouping fields - other fields are converted to a chars in localeconv(), so final change is: "-1" -> "127" 127 here is because CHAR_MAX supposed, which is _positive_ (SUSv2 requirement), not negative as 255. It is still a bit of hack. To find real CHAR_MAX will be better to sprintf() it once somewhere in static buffer. *grouping parsing still broken and missing and needs to be implemented.
Diffstat (limited to 'lib/libc/locale/lnumeric.c')
-rw-r--r--lib/libc/locale/lnumeric.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c
index bbf118c..cfe3f5b 100644
--- a/lib/libc/locale/lnumeric.c
+++ b/lib/libc/locale/lnumeric.c
@@ -26,7 +26,6 @@
* $FreeBSD$
*/
-#include <limits.h>
#include "lnumeric.h"
#include "ldpart.h"
@@ -34,7 +33,7 @@ extern int __nlocale_changed;
#define LCNUMERIC_SIZE (sizeof(struct lc_numeric_T) / sizeof(char *))
-static char numempty[] = { CHAR_MAX, '\0' };
+static char numempty[] = "127"; /* XXX: CHAR_MAX supposed here */
static const struct lc_numeric_T _C_numeric_locale = {
".", /* decimal_point */
OpenPOWER on IntegriCloud