1 /* Copyright (C) 1995 Free Software Foundation, Inc.
3 The GNU C Library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Library General Public License as
5 published by the Free Software Foundation; either version 2 of the
6 License, or (at your option) any later version.
8 The GNU C Library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public
14 License along with the GNU C Library; see the file COPYING.LIB. If
15 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
16 Cambridge, MA 02139, USA. */
22 #include "localedef.h"
24 /* These are defined in locfile-parse.c. */
25 extern struct cat_item LC_NUMERIC_desc
[];
26 extern char *LC_NUMERIC_values
[];
33 /* First general check for existence. */
34 for (item_no
= 0; item_no
< category
[LC_NUMERIC
].number
; ++item_no
)
35 if (LC_NUMERIC_values
[item_no
] == NULL
)
39 errcode
= LC_NUMERIC_desc
[item_no
].status
= std
? 5 : 0;
41 error (errcode
, 0, gettext ("item `%s' of category `%s' undefined"),
42 LC_NUMERIC_desc
[item_no
].name
, "LC_NUMERIC");
46 if (LC_NUMERIC_desc
[item_no
].item_id
== DECIMAL_POINT
47 && LC_NUMERIC_values
[item_no
][0] == '\0')
48 /* The decimal point must not be empty. This is not said
49 explicitly in POSIX but ANSI C (ISO/IEC 9899) says in
50 4.4.2.1 it has to be != "". */
52 gettext ("item `%s' in category `%s' must not be empty"),
53 LC_NUMERIC_desc
[item_no
].name
, "LC_NUMERIC");