Debian Codegraph @

share/libc/langinfo.h

raw
1 /**************************************************************************/
2 /* */
3 /* This file is part of Frama-C. */
4 /* */
5 /* Copyright (C) 2007-2022 */
6 /* CEA (Commissariat à l'énergie atomique et aux énergies */
7 /* alternatives) */
8 /* */
9 /* you can redistribute it and/or modify it under the terms of the GNU */
10 /* Lesser General Public License as published by the Free Software */
11 /* Foundation, version 2.1. */
12 /* */
13 /* It is distributed in the hope that it will be useful, */
14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
16 /* GNU Lesser General Public License for more details. */
17 /* */
18 /* See the GNU Lesser General Public License version 2.1 */
19 /* for more details (enclosed in the file licenses/LGPLv2.1). */
20 /* */
21 /**************************************************************************/
22
23 #ifndef __FC_LANGINFO_H
24 #define __FC_LANGINFO_H
25 #include "features.h"
26 __PUSH_FC_STDLIB
27 #include "__fc_define_locale_t.h"
28 #include "nl_types.h"
29 #include "locale.h" // for LC_CTYPE and other constants
30 __BEGIN_DECLS
31
32
33 #define _NL_ITEM(category, index) (((category) << 16) | (index))
34
35 /* Extract the category and item index from a constructed `nl_item' value. */
36 #define _NL_ITEM_CATEGORY(item) ((int) (item) >> 16)
37 #define _NL_ITEM_INDEX(item) ((int) (item) & 0xffff)
38
39 enum
40 {
41 CODESET = (LC_CTYPE) << 16,
42 #define CODESET CODESET
43 ABDAY_1 = (LC_TIME) << 16,
44 #define ABDAY_1 ABDAY_1
45 ABDAY_2,
46 #define ABDAY_2 ABDAY_2
47 ABDAY_3,
48 #define ABDAY_3 ABDAY_3
49 ABDAY_4,
50 #define ABDAY_4 ABDAY_4
51 ABDAY_5,
52 #define ABDAY_5 ABDAY_5
53 ABDAY_6,
54 #define ABDAY_6 ABDAY_6
55 ABDAY_7,
56 #define ABDAY_7 ABDAY_7
57 DAY_1,
58 #define DAY_1 DAY_1
59 DAY_2,
60 #define DAY_2 DAY_2
61 DAY_3,
62 #define DAY_3 DAY_3
63 DAY_4,
64 #define DAY_4 DAY_4
65 DAY_5,
66 #define DAY_5 DAY_5
67 DAY_6,
68 #define DAY_6 DAY_6
69 DAY_7,
70 #define DAY_7 DAY_7
71 ABMON_1,
72 #define ABMON_1 ABMON_1
73 ABMON_2,
74 #define ABMON_2 ABMON_2
75 ABMON_3,
76 #define ABMON_3 ABMON_3
77 ABMON_4,
78 #define ABMON_4 ABMON_4
79 ABMON_5,
80 #define ABMON_5 ABMON_5
81 ABMON_6,
82 #define ABMON_6 ABMON_6
83 ABMON_7,
84 #define ABMON_7 ABMON_7
85 ABMON_8,
86 #define ABMON_8 ABMON_8
87 ABMON_9,
88 #define ABMON_9 ABMON_9
89 ABMON_10,
90 #define ABMON_10 ABMON_10
91 ABMON_11,
92 #define ABMON_11 ABMON_11
93 ABMON_12,
94 #define ABMON_12 ABMON_12
95 MON_1,
96 #define MON_1 MON_1
97 MON_2,
98 #define MON_2 MON_2
99 MON_3,
100 #define MON_3 MON_3
101 MON_4,
102 #define MON_4 MON_4
103 MON_5,
104 #define MON_5 MON_5
105 MON_6,
106 #define MON_6 MON_6
107 MON_7,
108 #define MON_7 MON_7
109 MON_8,
110 #define MON_8 MON_8
111 MON_9,
112 #define MON_9 MON_9
113 MON_10,
114 #define MON_10 MON_10
115 MON_11,
116 #define MON_11 MON_11
117 MON_12,
118 #define MON_12 MON_12
119 AM_STR,
120 #define AM_STR AM_STR
121 PM_STR,
122 #define PM_STR PM_STR
123 D_T_FMT,
124 #define D_T_FMT D_T_FMT
125 D_FMT,
126 #define D_FMT D_FMT
127 T_FMT,
128 #define T_FMT T_FMT
129 T_FMT_AMPM,
130 #define T_FMT_AMPM T_FMT_AMPM
131 ERA,
132 #define ERA ERA
133 ERA_YEAR, // Non-POSIX; GNU
134 #define ERA_YEAR ERA_YEAR
135 ERA_D_FMT,
136 #define ERA_D_FMT ERA_D_FMT
137 ALT_DIGITS,
138 #define ALT_DIGITS ALT_DIGITS
139 ERA_D_T_FMT,
140 #define ERA_D_T_FMT ERA_D_T_FMT
141 ERA_T_FMT,
142 #define ERA_T_FMT ERA_T_FMT
143 DECIMAL_POINT = (LC_NUMERIC) << 16, // Non-POSIX; GNU
144 #define DECIMAL_POINT DECIMAL_POINT
145 RADIXCHAR,
146 #define RADIXCHAR RADIXCHAR
147 THOUSEP,
148 #define THOUSEP THOUSEP
149 YESEXPR = (LC_MESSAGES) << 16,
150 #define YESEXPR YESEXPR
151 NOEXPR,
152 #define NOEXPR NOEXPR
153 CRNCYSTR = (LC_MONETARY) << 16,
154 #define CRNCYSTR CRNCYSTR
155 };
156
157 extern char *nl_langinfo(nl_item item);
158 extern char *nl_langinfo_l(nl_item item, locale_t locale);
159
160 __END_DECLS
161
162 __POP_FC_STDLIB
163 #endif