1 /* Copyright (C) 1991 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 Cambridge, MA 02139, USA. */
20 * ANSI Standard: 4.4 LOCALIZATION <locale.h>
29 /* These are the possibilities for the first argument to setlocale.
30 Note that although they are bit masks, they cannot be OR'd together
31 to form a new argument to pass. They must be used one at a time. */
32 #define LC_COLLATE (1 << 0)
33 #define LC_CTYPE (1 << 1)
34 #define LC_MONETARY (1 << 2)
35 #define LC_NUMERIC (1 << 3)
36 #define LC_TIME (1 << 4)
37 #define LC_RESPONSE (1 << 5)
38 #define LC_ALL (LC_COLLATE|LC_CTYPE|LC_MONETARY|LC_NUMERIC|LC_TIME|\
42 /* Structure giving information about numeric and monetary notation. */
45 /* Numeric (non-monetary) information. */
47 char *decimal_point; /* Decimal point character. */
48 char *thousands_sep; /* Thousands separator. */
49 /* Each element is the number of digits in each group;
50 elements with higher indices are farther left.
51 An element with value CHAR_MAX means that no further grouping is done.
52 An element with value 0 means that the previous element is used
53 for all groups farther left. */
56 /* Monetary information. */
58 /* First three chars are a currency symbol from ISO 4217.
59 Fourth char is the separator. Fifth char is '\0'. */
60 char *int_curr_symbol;
61 char *currency_symbol; /* Local currency symbol. */
62 char *mon_decimal_point; /* Decimal point character. */
63 char *mon_thousands_sep; /* Thousands separator. */
64 char *mon_grouping; /* Like `grouping' element (above). */
65 char *positive_sign; /* Sign for positive values. */
66 char *negative_sign; /* Sign for negative values. */
67 char int_frac_digits; /* Int'l fractional digits. */
68 char frac_digits; /* Local fractional digits. */
69 /* 1 if currency_symbol precedes a positive value, 0 if succeeds. */
71 /* 1 iff a space separates currency_symbol from a positive value. */
73 /* 1 if currency_symbol precedes a negative value, 0 if succeeds. */
75 /* 1 iff a space separates currency_symbol from a negative value. */
77 /* Positive and negative sign positions:
78 0 Parentheses surround the quantity and currency_symbol.
79 1 The sign string precedes the quantity and currency_symbol.
80 2 The sign string succedes the quantity and currency_symbol.
81 3 The sign string immediately precedes the currency_symbol.
82 4 The sign string immediately succedes the currency_symbol. */
88 /* Set and/or return the current locale. */
89 extern char *EXFUN(setlocale, (int __category, CONST char *__locale));
91 /* Return the numeric/monetary information for the current locale. */
92 extern struct lconv *EXFUN(localeconv, (NOARGS));