Use POSIX version of version.c.
[glibc.git] / locale / locale.h
blob39b04d7270236e91317ceff557ea8bb77065c75a
1 /* Copyright (C) 1991, 1992, 1995, 1996 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>
23 #ifndef _LOCALE_H
25 #define _LOCALE_H 1
26 #include <features.h>
28 __BEGIN_DECLS
30 /* These are the possibilities for the first argument to setlocale.
31 The code assumes that LC_ALL is the highest value, and zero the lowest. */
32 #define LC_CTYPE 0
33 #define LC_NUMERIC 1
34 #define LC_TIME 2
35 #define LC_COLLATE 3
36 #define LC_MONETARY 4
37 #define LC_MESSAGES 5
38 #define LC_ALL 6
41 /* Structure giving information about numeric and monetary notation. */
42 struct lconv
44 /* Numeric (non-monetary) information. */
46 char *decimal_point; /* Decimal point character. */
47 char *thousands_sep; /* Thousands separator. */
48 /* Each element is the number of digits in each group;
49 elements with higher indices are farther left.
50 An element with value CHAR_MAX means that no further grouping is done.
51 An element with value 0 means that the previous element is used
52 for all groups farther left. */
53 char *grouping;
55 /* Monetary information. */
57 /* First three chars are a currency symbol from ISO 4217.
58 Fourth char is the separator. Fifth char is '\0'. */
59 char *int_curr_symbol;
60 char *currency_symbol; /* Local currency symbol. */
61 char *mon_decimal_point; /* Decimal point character. */
62 char *mon_thousands_sep; /* Thousands separator. */
63 char *mon_grouping; /* Like `grouping' element (above). */
64 char *positive_sign; /* Sign for positive values. */
65 char *negative_sign; /* Sign for negative values. */
66 char int_frac_digits; /* Int'l fractional digits. */
67 char frac_digits; /* Local fractional digits. */
68 /* 1 if currency_symbol precedes a positive value, 0 if succeeds. */
69 char p_cs_precedes;
70 /* 1 iff a space separates currency_symbol from a positive value. */
71 char p_sep_by_space;
72 /* 1 if currency_symbol precedes a negative value, 0 if succeeds. */
73 char n_cs_precedes;
74 /* 1 iff a space separates currency_symbol from a negative value. */
75 char n_sep_by_space;
76 /* Positive and negative sign positions:
77 0 Parentheses surround the quantity and currency_symbol.
78 1 The sign string precedes the quantity and currency_symbol.
79 2 The sign string succedes the quantity and currency_symbol.
80 3 The sign string immediately precedes the currency_symbol.
81 4 The sign string immediately succedes the currency_symbol. */
82 char p_sign_posn;
83 char n_sign_posn;
87 /* Set and/or return the current locale. */
88 extern char *setlocale __P ((int __category, __const char *__locale));
90 /* Return the numeric/monetary information for the current locale. */
91 extern struct lconv *localeconv __P ((void));
93 __END_DECLS
95 #endif /* locale.h */