xref: /illumos-gate/usr/src/head/iso/locale_iso.h (revision 59e9026779cf4a22e08153f0b7702f8167fb44c7)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24  * Copyright 2014 PALO, Richard.
25  *
26  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
27  * Use is subject to license terms.
28  */
29 
30 /*	Copyright (c) 1988 AT&T	*/
31 /*	  All Rights Reserved	*/
32 
33 
34 /*
35  * An application should not include this header directly.  Instead it
36  * should be included only through the inclusion of other Sun headers.
37  *
38  * The contents of this header is limited to identifiers specified in the
39  * C Standard.  Any new identifiers specified in future amendments to the
40  * C Standard must be placed in this header.  If these new identifiers
41  * are required to also be in the C++ Standard "std" namespace, then for
42  * anything other than macro definitions, corresponding "using" directives
43  * must also be added to <locale.h>.
44  */
45 
46 #ifndef	_ISO_LOCALE_ISO_H
47 #define	_ISO_LOCALE_ISO_H
48 
49 #include <sys/feature_tests.h>
50 #include <sys/null.h>
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 #if __cplusplus >= 199711L
57 namespace std {
58 #endif
59 
60 struct lconv {
61 	char *decimal_point;
62 	char *thousands_sep;
63 	char *grouping;
64 	char *int_curr_symbol;
65 	char *currency_symbol;
66 	char *mon_decimal_point;
67 	char *mon_thousands_sep;
68 	char *mon_grouping;
69 	char *positive_sign;
70 	char *negative_sign;
71 	char int_frac_digits;
72 	char frac_digits;
73 	char p_cs_precedes;
74 	char p_sep_by_space;
75 	char n_cs_precedes;
76 	char n_sep_by_space;
77 	char p_sign_posn;
78 	char n_sign_posn;
79 
80 /*
81  * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
82  * standard.  Namespace and binary compatibility dictate that visibility
83  * of these new members be limited.  Visibility is limited to a strictly
84  * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
85  */
86 #if (defined(_STRICT_STDC) && defined(_STDC_C99)) || defined(_LCONV_C99)
87 	char int_p_cs_precedes;
88 	char int_p_sep_by_space;
89 	char int_n_cs_precedes;
90 	char int_n_sep_by_space;
91 	char int_p_sign_posn;
92 	char int_n_sign_posn;
93 #endif
94 };
95 
96 #define	LC_CTYPE	0
97 #define	LC_NUMERIC	1
98 #define	LC_TIME		2
99 #define	LC_COLLATE	3
100 #define	LC_MONETARY	4
101 #define	LC_MESSAGES	5
102 #define	LC_ALL		6
103 
104 extern char	*setlocale(int, const char *);
105 extern struct lconv *localeconv(void);
106 
107 #if __cplusplus >= 199711L
108 }
109 #endif /* end of namespace std */
110 
111 #ifdef	__cplusplus
112 }
113 #endif
114 
115 #endif	/* _ISO_LOCALE_ISO_H */
116