]>
Commit | Line | Data |
---|---|---|
59d13433 | 1 | /** @file\r |
2 | Localization functions and macros.\r | |
3 | \r | |
4 | Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials are licensed and made available under\r | |
6 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
2aa62f2b | 12 | \r |
2aa62f2b | 13 | * Copyright (c) 1991, 1993\r |
14 | * The Regents of the University of California. All rights reserved.\r | |
15 | *\r | |
16 | * Redistribution and use in source and binary forms, with or without\r | |
17 | * modification, are permitted provided that the following conditions\r | |
18 | * are met:\r | |
19 | * 1. Redistributions of source code must retain the above copyright\r | |
20 | * notice, this list of conditions and the following disclaimer.\r | |
21 | * 2. Redistributions in binary form must reproduce the above copyright\r | |
22 | * notice, this list of conditions and the following disclaimer in the\r | |
23 | * documentation and/or other materials provided with the distribution.\r | |
24 | * 3. Neither the name of the University nor the names of its contributors\r | |
25 | * may be used to endorse or promote products derived from this software\r | |
26 | * without specific prior written permission.\r | |
27 | *\r | |
28 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r | |
29 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r | |
30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r | |
31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r | |
32 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r | |
33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r | |
34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r | |
35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r | |
36 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r | |
37 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r | |
38 | * SUCH DAMAGE.\r | |
39 | *\r | |
40 | * @(#)locale.h 8.1 (Berkeley) 6/2/93\r | |
59d13433 | 41 | * $NetBSD: locale.h,v 1.14 2005/02/03 04:39:32 perry Exp\r |
42 | **/\r | |
2aa62f2b | 43 | \r |
44 | #ifndef _LOCALE_H_\r | |
45 | #define _LOCALE_H_\r | |
46 | \r | |
59d13433 | 47 | /** This is a structure containing members pertaining to the formatting of numeric values.\r |
48 | There is no requirement for members of this structure to be in any particular order.\r | |
49 | **/\r | |
2aa62f2b | 50 | struct lconv {\r |
51 | char *decimal_point;\r | |
52 | char *thousands_sep;\r | |
53 | char *grouping;\r | |
54 | char *int_curr_symbol;\r | |
55 | char *currency_symbol;\r | |
56 | char *mon_decimal_point;\r | |
57 | char *mon_thousands_sep;\r | |
58 | char *mon_grouping;\r | |
59 | char *positive_sign;\r | |
60 | char *negative_sign;\r | |
61 | char int_frac_digits;\r | |
62 | char frac_digits;\r | |
63 | char p_cs_precedes;\r | |
64 | char p_sep_by_space;\r | |
65 | char n_cs_precedes;\r | |
66 | char n_sep_by_space;\r | |
67 | char p_sign_posn;\r | |
68 | char n_sign_posn;\r | |
69 | char int_p_cs_precedes;\r | |
70 | char int_n_cs_precedes;\r | |
71 | char int_p_sep_by_space;\r | |
72 | char int_n_sep_by_space;\r | |
73 | char int_p_sign_posn;\r | |
74 | char int_n_sign_posn;\r | |
75 | };\r | |
76 | \r | |
59d13433 | 77 | /** These macros expand to integer expressions suitable for use as the first\r |
78 | argument to the setlocale() function.\r | |
2aa62f2b | 79 | \r |
59d13433 | 80 | Only the first six macros are required by the C language specification.\r |
81 | Implementations are free to extend this list, as has been done with LC_MESSAGES,\r | |
82 | with additional macro definitions, beginning with the characters LC_ and\r | |
83 | an uppercase letter.\r | |
84 | @{\r | |
85 | **/\r | |
86 | #define LC_ALL 0 ///< The application's entire locale.\r | |
87 | #define LC_COLLATE 1 ///< Affects the behavior of the strcoll and strxfrm functions.\r | |
88 | #define LC_CTYPE 2 ///< Affects the behavior of the character handling, multibyte, and wide character functions.\r | |
89 | #define LC_MONETARY 3 ///< Affects monetary formatting information.\r | |
90 | #define LC_NUMERIC 4 ///< Affects the decimal-point character and non-monetary formatting information.\r | |
91 | #define LC_TIME 5 ///< Affects the behavior of the strftime and wcsftime functions.\r | |
92 | #define LC_MESSAGES 6\r | |
93 | #define _LC_LAST 7 ///< Number of defined macros. Marks end.\r | |
94 | /// @}\r | |
2aa62f2b | 95 | \r |
96 | #include <sys/EfiCdefs.h>\r | |
97 | \r | |
59d13433 | 98 | /** @fn char *setlocale(int, const char *)\r |
99 | **/\r | |
100 | \r | |
101 | /** @fn struct lconv *localeconv(void)\r | |
102 | **/\r | |
103 | \r | |
2aa62f2b | 104 | __BEGIN_DECLS\r |
2aa62f2b | 105 | #ifdef __SETLOCALE_SOURCE__\r |
106 | char *setlocale(int, const char *);\r | |
107 | char *__setlocale(int, const char *);\r | |
108 | #else /* !__SETLOCALE_SOURCE__ */\r | |
109 | char *setlocale(int, const char *) __RENAME(__setlocale_mb_len_max_32);\r | |
110 | #endif /* !__SETLOCALE_SOURCE__ */\r | |
59d13433 | 111 | struct lconv *localeconv(void);\r |
112 | char *__setlocale_mb_len_max_32(int, const char *);\r | |
2aa62f2b | 113 | __END_DECLS\r |
114 | \r | |
115 | #endif /* _LOCALE_H_ */\r |