]>
Commit | Line | Data |
---|---|---|
9756dfe1 | 1 | /* Access to locale-dependent parameters. |
04277e02 | 2 | Copyright (C) 1995-2019 Free Software Foundation, Inc. |
54d79e99 UD |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
54d79e99 UD |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
54d79e99 | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
933e73fa RM |
18 | |
19 | #ifndef _LANGINFO_H | |
20 | #define _LANGINFO_H 1 | |
21 | ||
9756dfe1 UD |
22 | /* Get the type definition. */ |
23 | #include <nl_types.h> | |
24 | ||
3e154a6f UD |
25 | #include <bits/locale.h> /* Define the __LC_* category names. */ |
26 | ||
9756dfe1 | 27 | |
933e73fa RM |
28 | __BEGIN_DECLS |
29 | ||
30 | /* Construct an `nl_item' value for `nl_langinfo' from a locale category | |
31 | (LC_*) and an item index within the category. Some code may depend on | |
32 | the item values within a category increasing monotonically with the | |
33 | indices. */ | |
34 | #define _NL_ITEM(category, index) (((category) << 16) | (index)) | |
35 | ||
36 | /* Extract the category and item index from a constructed `nl_item' value. */ | |
37 | #define _NL_ITEM_CATEGORY(item) ((int) (item) >> 16) | |
38 | #define _NL_ITEM_INDEX(item) ((int) (item) & 0xffff) | |
39 | ||
933e73fa | 40 | /* Enumeration of locale items that can be queried with `nl_langinfo'. */ |
9756dfe1 | 41 | enum |
933e73fa RM |
42 | { |
43 | /* LC_TIME category: date and time formatting. */ | |
44 | ||
45 | /* Abbreviated days of the week. */ | |
3e154a6f | 46 | ABDAY_1 = _NL_ITEM (__LC_TIME, 0), /* Sun */ |
74015205 | 47 | #define ABDAY_1 ABDAY_1 |
933e73fa | 48 | ABDAY_2, |
74015205 | 49 | #define ABDAY_2 ABDAY_2 |
933e73fa | 50 | ABDAY_3, |
74015205 | 51 | #define ABDAY_3 ABDAY_3 |
933e73fa | 52 | ABDAY_4, |
74015205 | 53 | #define ABDAY_4 ABDAY_4 |
933e73fa | 54 | ABDAY_5, |
74015205 | 55 | #define ABDAY_5 ABDAY_5 |
933e73fa | 56 | ABDAY_6, |
74015205 | 57 | #define ABDAY_6 ABDAY_6 |
933e73fa | 58 | ABDAY_7, |
74015205 | 59 | #define ABDAY_7 ABDAY_7 |
933e73fa RM |
60 | |
61 | /* Long-named days of the week. */ | |
62 | DAY_1, /* Sunday */ | |
74015205 | 63 | #define DAY_1 DAY_1 |
933e73fa | 64 | DAY_2, /* Monday */ |
74015205 | 65 | #define DAY_2 DAY_2 |
933e73fa | 66 | DAY_3, /* Tuesday */ |
74015205 | 67 | #define DAY_3 DAY_3 |
933e73fa | 68 | DAY_4, /* Wednesday */ |
74015205 | 69 | #define DAY_4 DAY_4 |
933e73fa | 70 | DAY_5, /* Thursday */ |
74015205 | 71 | #define DAY_5 DAY_5 |
933e73fa | 72 | DAY_6, /* Friday */ |
74015205 | 73 | #define DAY_6 DAY_6 |
933e73fa | 74 | DAY_7, /* Saturday */ |
74015205 | 75 | #define DAY_7 DAY_7 |
933e73fa | 76 | |
761a585c RL |
77 | /* Abbreviated month names, in the grammatical form used when the month |
78 | is a part of a complete date. */ | |
933e73fa | 79 | ABMON_1, /* Jan */ |
74015205 | 80 | #define ABMON_1 ABMON_1 |
933e73fa | 81 | ABMON_2, |
74015205 | 82 | #define ABMON_2 ABMON_2 |
933e73fa | 83 | ABMON_3, |
74015205 | 84 | #define ABMON_3 ABMON_3 |
933e73fa | 85 | ABMON_4, |
74015205 | 86 | #define ABMON_4 ABMON_4 |
933e73fa | 87 | ABMON_5, |
74015205 | 88 | #define ABMON_5 ABMON_5 |
933e73fa | 89 | ABMON_6, |
74015205 | 90 | #define ABMON_6 ABMON_6 |
933e73fa | 91 | ABMON_7, |
74015205 | 92 | #define ABMON_7 ABMON_7 |
933e73fa | 93 | ABMON_8, |
74015205 | 94 | #define ABMON_8 ABMON_8 |
933e73fa | 95 | ABMON_9, |
74015205 | 96 | #define ABMON_9 ABMON_9 |
933e73fa | 97 | ABMON_10, |
74015205 | 98 | #define ABMON_10 ABMON_10 |
933e73fa | 99 | ABMON_11, |
74015205 | 100 | #define ABMON_11 ABMON_11 |
933e73fa | 101 | ABMON_12, |
74015205 | 102 | #define ABMON_12 ABMON_12 |
933e73fa | 103 | |
95cb863a RL |
104 | /* Long month names, in the grammatical form used when the month |
105 | is a part of a complete date. */ | |
933e73fa | 106 | MON_1, /* January */ |
74015205 | 107 | #define MON_1 MON_1 |
933e73fa | 108 | MON_2, |
74015205 | 109 | #define MON_2 MON_2 |
933e73fa | 110 | MON_3, |
74015205 | 111 | #define MON_3 MON_3 |
933e73fa | 112 | MON_4, |
74015205 | 113 | #define MON_4 MON_4 |
933e73fa | 114 | MON_5, |
74015205 | 115 | #define MON_5 MON_5 |
933e73fa | 116 | MON_6, |
74015205 | 117 | #define MON_6 MON_6 |
933e73fa | 118 | MON_7, |
74015205 | 119 | #define MON_7 MON_7 |
933e73fa | 120 | MON_8, |
74015205 | 121 | #define MON_8 MON_8 |
933e73fa | 122 | MON_9, |
74015205 | 123 | #define MON_9 MON_9 |
933e73fa | 124 | MON_10, |
74015205 | 125 | #define MON_10 MON_10 |
933e73fa | 126 | MON_11, |
74015205 | 127 | #define MON_11 MON_11 |
933e73fa | 128 | MON_12, |
74015205 | 129 | #define MON_12 MON_12 |
933e73fa | 130 | |
24be813b | 131 | AM_STR, /* Ante meridiem string. */ |
74015205 | 132 | #define AM_STR AM_STR |
24be813b | 133 | PM_STR, /* Post meridiem string. */ |
74015205 | 134 | #define PM_STR PM_STR |
933e73fa RM |
135 | |
136 | D_T_FMT, /* Date and time format for strftime. */ | |
74015205 | 137 | #define D_T_FMT D_T_FMT |
933e73fa | 138 | D_FMT, /* Date format for strftime. */ |
74015205 | 139 | #define D_FMT D_FMT |
933e73fa | 140 | T_FMT, /* Time format for strftime. */ |
74015205 | 141 | #define T_FMT T_FMT |
933e73fa | 142 | T_FMT_AMPM, /* 12-hour time format for strftime. */ |
74015205 | 143 | #define T_FMT_AMPM T_FMT_AMPM |
933e73fa RM |
144 | |
145 | ERA, /* Alternate era. */ | |
74015205 | 146 | #define ERA ERA |
0ed99ce4 UD |
147 | __ERA_YEAR, /* Year in alternate era format. */ |
148 | #ifdef __USE_GNU | |
149 | # define ERA_YEAR __ERA_YEAR | |
150 | #endif | |
6c2f0507 | 151 | ERA_D_FMT, /* Date in alternate era format. */ |
74015205 | 152 | #define ERA_D_FMT ERA_D_FMT |
933e73fa | 153 | ALT_DIGITS, /* Alternate symbols for digits. */ |
74015205 | 154 | #define ALT_DIGITS ALT_DIGITS |
19bc17a9 | 155 | ERA_D_T_FMT, /* Date and time in alternate era format. */ |
74015205 | 156 | #define ERA_D_T_FMT ERA_D_T_FMT |
19bc17a9 | 157 | ERA_T_FMT, /* Time in alternate era format. */ |
74015205 | 158 | #define ERA_T_FMT ERA_T_FMT |
933e73fa | 159 | |
4a33c2f5 UD |
160 | _NL_TIME_ERA_NUM_ENTRIES, /* Number entries in the era arrays. */ |
161 | _NL_TIME_ERA_ENTRIES, /* Structure with era entries in usable form.*/ | |
162 | ||
163 | _NL_WABDAY_1, /* Sun */ | |
164 | _NL_WABDAY_2, | |
165 | _NL_WABDAY_3, | |
166 | _NL_WABDAY_4, | |
167 | _NL_WABDAY_5, | |
168 | _NL_WABDAY_6, | |
169 | _NL_WABDAY_7, | |
d64b6ad0 UD |
170 | |
171 | /* Long-named days of the week. */ | |
4a33c2f5 UD |
172 | _NL_WDAY_1, /* Sunday */ |
173 | _NL_WDAY_2, /* Monday */ | |
174 | _NL_WDAY_3, /* Tuesday */ | |
175 | _NL_WDAY_4, /* Wednesday */ | |
176 | _NL_WDAY_5, /* Thursday */ | |
177 | _NL_WDAY_6, /* Friday */ | |
178 | _NL_WDAY_7, /* Saturday */ | |
d64b6ad0 | 179 | |
761a585c RL |
180 | /* Abbreviated month names, in the grammatical form used when the month |
181 | is a part of a complete date. */ | |
4a33c2f5 UD |
182 | _NL_WABMON_1, /* Jan */ |
183 | _NL_WABMON_2, | |
184 | _NL_WABMON_3, | |
185 | _NL_WABMON_4, | |
186 | _NL_WABMON_5, | |
187 | _NL_WABMON_6, | |
188 | _NL_WABMON_7, | |
189 | _NL_WABMON_8, | |
190 | _NL_WABMON_9, | |
191 | _NL_WABMON_10, | |
192 | _NL_WABMON_11, | |
193 | _NL_WABMON_12, | |
d64b6ad0 | 194 | |
95cb863a RL |
195 | /* Long month names, in the grammatical form used when the month |
196 | is a part of a complete date. */ | |
4a33c2f5 UD |
197 | _NL_WMON_1, /* January */ |
198 | _NL_WMON_2, | |
199 | _NL_WMON_3, | |
200 | _NL_WMON_4, | |
201 | _NL_WMON_5, | |
202 | _NL_WMON_6, | |
203 | _NL_WMON_7, | |
204 | _NL_WMON_8, | |
205 | _NL_WMON_9, | |
206 | _NL_WMON_10, | |
207 | _NL_WMON_11, | |
208 | _NL_WMON_12, | |
209 | ||
24be813b RM |
210 | _NL_WAM_STR, /* Ante meridiem string. */ |
211 | _NL_WPM_STR, /* Post meridiem string. */ | |
4a33c2f5 UD |
212 | |
213 | _NL_WD_T_FMT, /* Date and time format for strftime. */ | |
214 | _NL_WD_FMT, /* Date format for strftime. */ | |
215 | _NL_WT_FMT, /* Time format for strftime. */ | |
216 | _NL_WT_FMT_AMPM, /* 12-hour time format for strftime. */ | |
217 | ||
218 | _NL_WERA_YEAR, /* Year in alternate era format. */ | |
219 | _NL_WERA_D_FMT, /* Date in alternate era format. */ | |
220 | _NL_WALT_DIGITS, /* Alternate symbols for digits. */ | |
221 | _NL_WERA_D_T_FMT, /* Date and time in alternate era format. */ | |
222 | _NL_WERA_T_FMT, /* Time in alternate era format. */ | |
4b10dd6c UD |
223 | |
224 | _NL_TIME_WEEK_NDAYS, | |
225 | _NL_TIME_WEEK_1STDAY, | |
226 | _NL_TIME_WEEK_1STWEEK, | |
227 | _NL_TIME_FIRST_WEEKDAY, | |
228 | _NL_TIME_FIRST_WORKDAY, | |
229 | _NL_TIME_CAL_DIRECTION, | |
230 | _NL_TIME_TIMEZONE, | |
d64b6ad0 | 231 | |
d8337213 UD |
232 | _DATE_FMT, /* strftime format for date. */ |
233 | #define _DATE_FMT _DATE_FMT | |
234 | _NL_W_DATE_FMT, | |
235 | ||
e7f21fa6 UD |
236 | _NL_TIME_CODESET, |
237 | ||
95cb863a RL |
238 | /* Long month names, in the grammatical form used when the month |
239 | is named by itself. */ | |
240 | __ALTMON_1, /* January */ | |
241 | __ALTMON_2, | |
242 | __ALTMON_3, | |
243 | __ALTMON_4, | |
244 | __ALTMON_5, | |
245 | __ALTMON_6, | |
246 | __ALTMON_7, | |
247 | __ALTMON_8, | |
248 | __ALTMON_9, | |
249 | __ALTMON_10, | |
250 | __ALTMON_11, | |
251 | __ALTMON_12, | |
252 | #ifdef __USE_GNU | |
253 | # define ALTMON_1 __ALTMON_1 | |
254 | # define ALTMON_2 __ALTMON_2 | |
255 | # define ALTMON_3 __ALTMON_3 | |
256 | # define ALTMON_4 __ALTMON_4 | |
257 | # define ALTMON_5 __ALTMON_5 | |
258 | # define ALTMON_6 __ALTMON_6 | |
259 | # define ALTMON_7 __ALTMON_7 | |
260 | # define ALTMON_8 __ALTMON_8 | |
261 | # define ALTMON_9 __ALTMON_9 | |
262 | # define ALTMON_10 __ALTMON_10 | |
263 | # define ALTMON_11 __ALTMON_11 | |
264 | # define ALTMON_12 __ALTMON_12 | |
265 | #endif | |
266 | ||
267 | /* Long month names, in the grammatical form used when the month | |
268 | is named by itself. */ | |
269 | _NL_WALTMON_1, /* January */ | |
270 | _NL_WALTMON_2, | |
271 | _NL_WALTMON_3, | |
272 | _NL_WALTMON_4, | |
273 | _NL_WALTMON_5, | |
274 | _NL_WALTMON_6, | |
275 | _NL_WALTMON_7, | |
276 | _NL_WALTMON_8, | |
277 | _NL_WALTMON_9, | |
278 | _NL_WALTMON_10, | |
279 | _NL_WALTMON_11, | |
280 | _NL_WALTMON_12, | |
281 | ||
761a585c RL |
282 | /* Abbreviated month names, in the grammatical form used when the month |
283 | is named by itself. */ | |
284 | _NL_ABALTMON_1, /* Jan */ | |
285 | _NL_ABALTMON_2, | |
286 | _NL_ABALTMON_3, | |
287 | _NL_ABALTMON_4, | |
288 | _NL_ABALTMON_5, | |
289 | _NL_ABALTMON_6, | |
290 | _NL_ABALTMON_7, | |
291 | _NL_ABALTMON_8, | |
292 | _NL_ABALTMON_9, | |
293 | _NL_ABALTMON_10, | |
294 | _NL_ABALTMON_11, | |
295 | _NL_ABALTMON_12, | |
296 | ||
297 | /* Abbreviated month names, in the grammatical form used when the month | |
298 | is named by itself. */ | |
299 | _NL_WABALTMON_1, /* Jan */ | |
300 | _NL_WABALTMON_2, | |
301 | _NL_WABALTMON_3, | |
302 | _NL_WABALTMON_4, | |
303 | _NL_WABALTMON_5, | |
304 | _NL_WABALTMON_6, | |
305 | _NL_WABALTMON_7, | |
306 | _NL_WABALTMON_8, | |
307 | _NL_WABALTMON_9, | |
308 | _NL_WABALTMON_10, | |
309 | _NL_WABALTMON_11, | |
310 | _NL_WABALTMON_12, | |
311 | ||
d8337213 | 312 | _NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */ |
933e73fa | 313 | |
19bc17a9 RM |
314 | /* LC_COLLATE category: text sorting. |
315 | This information is accessed by the strcoll and strxfrm functions. | |
316 | These `nl_langinfo' names are used only internally. */ | |
3e154a6f | 317 | _NL_COLLATE_NRULES = _NL_ITEM (__LC_COLLATE, 0), |
575b273b | 318 | _NL_COLLATE_RULESETS, |
b06c53e7 | 319 | _NL_COLLATE_TABLEMB, |
575b273b | 320 | _NL_COLLATE_WEIGHTMB, |
4a33c2f5 | 321 | _NL_COLLATE_EXTRAMB, |
450bf66e | 322 | _NL_COLLATE_INDIRECTMB, |
4c7d276e UD |
323 | _NL_COLLATE_GAP1, |
324 | _NL_COLLATE_GAP2, | |
325 | _NL_COLLATE_GAP3, | |
66ac0abe UD |
326 | _NL_COLLATE_TABLEWC, |
327 | _NL_COLLATE_WEIGHTWC, | |
328 | _NL_COLLATE_EXTRAWC, | |
329 | _NL_COLLATE_INDIRECTWC, | |
3216711f UD |
330 | _NL_COLLATE_SYMB_HASH_SIZEMB, |
331 | _NL_COLLATE_SYMB_TABLEMB, | |
332 | _NL_COLLATE_SYMB_EXTRAMB, | |
acb5ee2e UD |
333 | _NL_COLLATE_COLLSEQMB, |
334 | _NL_COLLATE_COLLSEQWC, | |
e7f21fa6 | 335 | _NL_COLLATE_CODESET, |
19bc17a9 RM |
336 | _NL_NUM_LC_COLLATE, |
337 | ||
933e73fa RM |
338 | /* LC_CTYPE category: character classification. |
339 | This information is accessed by the functions in <ctype.h>. | |
6c2f0507 | 340 | These `nl_langinfo' names are used only internally. */ |
3e154a6f | 341 | _NL_CTYPE_CLASS = _NL_ITEM (__LC_CTYPE, 0), |
4a33c2f5 | 342 | _NL_CTYPE_TOUPPER, |
8114530a | 343 | _NL_CTYPE_GAP1, |
4a33c2f5 | 344 | _NL_CTYPE_TOLOWER, |
8114530a | 345 | _NL_CTYPE_GAP2, |
19bc17a9 | 346 | _NL_CTYPE_CLASS32, |
8114530a | 347 | _NL_CTYPE_GAP3, |
4c7d276e UD |
348 | _NL_CTYPE_GAP4, |
349 | _NL_CTYPE_GAP5, | |
350 | _NL_CTYPE_GAP6, | |
19bc17a9 RM |
351 | _NL_CTYPE_CLASS_NAMES, |
352 | _NL_CTYPE_MAP_NAMES, | |
353 | _NL_CTYPE_WIDTH, | |
0200214b | 354 | _NL_CTYPE_MB_CUR_MAX, |
6990326c | 355 | _NL_CTYPE_CODESET_NAME, |
9756dfe1 | 356 | CODESET = _NL_CTYPE_CODESET_NAME, |
ae177b9c | 357 | #define CODESET CODESET |
49f2be5b UD |
358 | _NL_CTYPE_TOUPPER32, |
359 | _NL_CTYPE_TOLOWER32, | |
ef446144 UD |
360 | _NL_CTYPE_CLASS_OFFSET, |
361 | _NL_CTYPE_MAP_OFFSET, | |
4a33c2f5 | 362 | _NL_CTYPE_INDIGITS_MB_LEN, |
4b10dd6c UD |
363 | _NL_CTYPE_INDIGITS0_MB, |
364 | _NL_CTYPE_INDIGITS1_MB, | |
365 | _NL_CTYPE_INDIGITS2_MB, | |
366 | _NL_CTYPE_INDIGITS3_MB, | |
367 | _NL_CTYPE_INDIGITS4_MB, | |
368 | _NL_CTYPE_INDIGITS5_MB, | |
369 | _NL_CTYPE_INDIGITS6_MB, | |
370 | _NL_CTYPE_INDIGITS7_MB, | |
371 | _NL_CTYPE_INDIGITS8_MB, | |
372 | _NL_CTYPE_INDIGITS9_MB, | |
4a33c2f5 UD |
373 | _NL_CTYPE_INDIGITS_WC_LEN, |
374 | _NL_CTYPE_INDIGITS0_WC, | |
375 | _NL_CTYPE_INDIGITS1_WC, | |
376 | _NL_CTYPE_INDIGITS2_WC, | |
377 | _NL_CTYPE_INDIGITS3_WC, | |
378 | _NL_CTYPE_INDIGITS4_WC, | |
379 | _NL_CTYPE_INDIGITS5_WC, | |
380 | _NL_CTYPE_INDIGITS6_WC, | |
381 | _NL_CTYPE_INDIGITS7_WC, | |
382 | _NL_CTYPE_INDIGITS8_WC, | |
383 | _NL_CTYPE_INDIGITS9_WC, | |
4b10dd6c UD |
384 | _NL_CTYPE_OUTDIGIT0_MB, |
385 | _NL_CTYPE_OUTDIGIT1_MB, | |
386 | _NL_CTYPE_OUTDIGIT2_MB, | |
387 | _NL_CTYPE_OUTDIGIT3_MB, | |
388 | _NL_CTYPE_OUTDIGIT4_MB, | |
389 | _NL_CTYPE_OUTDIGIT5_MB, | |
390 | _NL_CTYPE_OUTDIGIT6_MB, | |
391 | _NL_CTYPE_OUTDIGIT7_MB, | |
392 | _NL_CTYPE_OUTDIGIT8_MB, | |
393 | _NL_CTYPE_OUTDIGIT9_MB, | |
4a33c2f5 UD |
394 | _NL_CTYPE_OUTDIGIT0_WC, |
395 | _NL_CTYPE_OUTDIGIT1_WC, | |
396 | _NL_CTYPE_OUTDIGIT2_WC, | |
397 | _NL_CTYPE_OUTDIGIT3_WC, | |
398 | _NL_CTYPE_OUTDIGIT4_WC, | |
399 | _NL_CTYPE_OUTDIGIT5_WC, | |
400 | _NL_CTYPE_OUTDIGIT6_WC, | |
401 | _NL_CTYPE_OUTDIGIT7_WC, | |
402 | _NL_CTYPE_OUTDIGIT8_WC, | |
403 | _NL_CTYPE_OUTDIGIT9_WC, | |
04fbc779 | 404 | _NL_CTYPE_TRANSLIT_TAB_SIZE, |
4a33c2f5 UD |
405 | _NL_CTYPE_TRANSLIT_FROM_IDX, |
406 | _NL_CTYPE_TRANSLIT_FROM_TBL, | |
407 | _NL_CTYPE_TRANSLIT_TO_IDX, | |
408 | _NL_CTYPE_TRANSLIT_TO_TBL, | |
1d96d74d | 409 | _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, |
a8e4c924 UD |
410 | _NL_CTYPE_TRANSLIT_DEFAULT_MISSING, |
411 | _NL_CTYPE_TRANSLIT_IGNORE_LEN, | |
412 | _NL_CTYPE_TRANSLIT_IGNORE, | |
f0c7c524 | 413 | _NL_CTYPE_MAP_TO_NONASCII, |
63fbc91b | 414 | _NL_CTYPE_NONASCII_CASE, |
a9706118 UD |
415 | _NL_CTYPE_EXTRA_MAP_1, |
416 | _NL_CTYPE_EXTRA_MAP_2, | |
417 | _NL_CTYPE_EXTRA_MAP_3, | |
418 | _NL_CTYPE_EXTRA_MAP_4, | |
419 | _NL_CTYPE_EXTRA_MAP_5, | |
420 | _NL_CTYPE_EXTRA_MAP_6, | |
421 | _NL_CTYPE_EXTRA_MAP_7, | |
422 | _NL_CTYPE_EXTRA_MAP_8, | |
423 | _NL_CTYPE_EXTRA_MAP_9, | |
424 | _NL_CTYPE_EXTRA_MAP_10, | |
425 | _NL_CTYPE_EXTRA_MAP_11, | |
426 | _NL_CTYPE_EXTRA_MAP_12, | |
427 | _NL_CTYPE_EXTRA_MAP_13, | |
428 | _NL_CTYPE_EXTRA_MAP_14, | |
933e73fa RM |
429 | _NL_NUM_LC_CTYPE, |
430 | ||
431 | /* LC_MONETARY category: formatting of monetary quantities. | |
432 | These items each correspond to a member of `struct lconv', | |
433 | defined in <locale.h>. */ | |
3e154a6f | 434 | __INT_CURR_SYMBOL = _NL_ITEM (__LC_MONETARY, 0), |
0ed99ce4 UD |
435 | #ifdef __USE_GNU |
436 | # define INT_CURR_SYMBOL __INT_CURR_SYMBOL | |
437 | #endif | |
438 | __CURRENCY_SYMBOL, | |
439 | #ifdef __USE_GNU | |
440 | # define CURRENCY_SYMBOL __CURRENCY_SYMBOL | |
441 | #endif | |
442 | __MON_DECIMAL_POINT, | |
443 | #ifdef __USE_GNU | |
444 | # define MON_DECIMAL_POINT __MON_DECIMAL_POINT | |
445 | #endif | |
446 | __MON_THOUSANDS_SEP, | |
447 | #ifdef __USE_GNU | |
448 | # define MON_THOUSANDS_SEP __MON_THOUSANDS_SEP | |
449 | #endif | |
450 | __MON_GROUPING, | |
451 | #ifdef __USE_GNU | |
452 | # define MON_GROUPING __MON_GROUPING | |
453 | #endif | |
454 | __POSITIVE_SIGN, | |
455 | #ifdef __USE_GNU | |
456 | # define POSITIVE_SIGN __POSITIVE_SIGN | |
457 | #endif | |
458 | __NEGATIVE_SIGN, | |
459 | #ifdef __USE_GNU | |
460 | # define NEGATIVE_SIGN __NEGATIVE_SIGN | |
461 | #endif | |
462 | __INT_FRAC_DIGITS, | |
463 | #ifdef __USE_GNU | |
464 | # define INT_FRAC_DIGITS __INT_FRAC_DIGITS | |
465 | #endif | |
466 | __FRAC_DIGITS, | |
467 | #ifdef __USE_GNU | |
468 | # define FRAC_DIGITS __FRAC_DIGITS | |
469 | #endif | |
470 | __P_CS_PRECEDES, | |
471 | #ifdef __USE_GNU | |
472 | # define P_CS_PRECEDES __P_CS_PRECEDES | |
473 | #endif | |
474 | __P_SEP_BY_SPACE, | |
475 | #ifdef __USE_GNU | |
476 | # define P_SEP_BY_SPACE __P_SEP_BY_SPACE | |
477 | #endif | |
478 | __N_CS_PRECEDES, | |
479 | #ifdef __USE_GNU | |
480 | # define N_CS_PRECEDES __N_CS_PRECEDES | |
481 | #endif | |
482 | __N_SEP_BY_SPACE, | |
483 | #ifdef __USE_GNU | |
484 | # define N_SEP_BY_SPACE __N_SEP_BY_SPACE | |
485 | #endif | |
486 | __P_SIGN_POSN, | |
487 | #ifdef __USE_GNU | |
488 | # define P_SIGN_POSN __P_SIGN_POSN | |
489 | #endif | |
490 | __N_SIGN_POSN, | |
491 | #ifdef __USE_GNU | |
492 | # define N_SIGN_POSN __N_SIGN_POSN | |
493 | #endif | |
a58a4763 | 494 | _NL_MONETARY_CRNCYSTR, |
9f835f5f | 495 | #define CRNCYSTR _NL_MONETARY_CRNCYSTR |
3446e2c3 UD |
496 | __INT_P_CS_PRECEDES, |
497 | #ifdef __USE_GNU | |
498 | # define INT_P_CS_PRECEDES __INT_P_CS_PRECEDES | |
499 | #endif | |
500 | __INT_P_SEP_BY_SPACE, | |
501 | #ifdef __USE_GNU | |
502 | # define INT_P_SEP_BY_SPACE __INT_P_SEP_BY_SPACE | |
503 | #endif | |
504 | __INT_N_CS_PRECEDES, | |
505 | #ifdef __USE_GNU | |
506 | # define INT_N_CS_PRECEDES __INT_N_CS_PRECEDES | |
507 | #endif | |
508 | __INT_N_SEP_BY_SPACE, | |
509 | #ifdef __USE_GNU | |
510 | # define INT_N_SEP_BY_SPACE __INT_N_SEP_BY_SPACE | |
511 | #endif | |
512 | __INT_P_SIGN_POSN, | |
513 | #ifdef __USE_GNU | |
514 | # define INT_P_SIGN_POSN __INT_P_SIGN_POSN | |
515 | #endif | |
516 | __INT_N_SIGN_POSN, | |
517 | #ifdef __USE_GNU | |
518 | # define INT_N_SIGN_POSN __INT_N_SIGN_POSN | |
519 | #endif | |
4b10dd6c UD |
520 | _NL_MONETARY_DUO_INT_CURR_SYMBOL, |
521 | _NL_MONETARY_DUO_CURRENCY_SYMBOL, | |
522 | _NL_MONETARY_DUO_INT_FRAC_DIGITS, | |
523 | _NL_MONETARY_DUO_FRAC_DIGITS, | |
524 | _NL_MONETARY_DUO_P_CS_PRECEDES, | |
525 | _NL_MONETARY_DUO_P_SEP_BY_SPACE, | |
526 | _NL_MONETARY_DUO_N_CS_PRECEDES, | |
527 | _NL_MONETARY_DUO_N_SEP_BY_SPACE, | |
528 | _NL_MONETARY_DUO_INT_P_CS_PRECEDES, | |
529 | _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, | |
530 | _NL_MONETARY_DUO_INT_N_CS_PRECEDES, | |
531 | _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, | |
532 | _NL_MONETARY_DUO_P_SIGN_POSN, | |
533 | _NL_MONETARY_DUO_N_SIGN_POSN, | |
534 | _NL_MONETARY_DUO_INT_P_SIGN_POSN, | |
535 | _NL_MONETARY_DUO_INT_N_SIGN_POSN, | |
536 | _NL_MONETARY_UNO_VALID_FROM, | |
537 | _NL_MONETARY_UNO_VALID_TO, | |
538 | _NL_MONETARY_DUO_VALID_FROM, | |
539 | _NL_MONETARY_DUO_VALID_TO, | |
4a33c2f5 | 540 | _NL_MONETARY_CONVERSION_RATE, |
4295702f UD |
541 | _NL_MONETARY_DECIMAL_POINT_WC, |
542 | _NL_MONETARY_THOUSANDS_SEP_WC, | |
e7f21fa6 | 543 | _NL_MONETARY_CODESET, |
933e73fa RM |
544 | _NL_NUM_LC_MONETARY, |
545 | ||
546 | /* LC_NUMERIC category: formatting of numbers. | |
547 | These also correspond to members of `struct lconv'; see <locale.h>. */ | |
3e154a6f | 548 | __DECIMAL_POINT = _NL_ITEM (__LC_NUMERIC, 0), |
0ed99ce4 UD |
549 | #ifdef __USE_GNU |
550 | # define DECIMAL_POINT __DECIMAL_POINT | |
551 | #endif | |
0ed99ce4 | 552 | RADIXCHAR = __DECIMAL_POINT, |
55fb4e9e | 553 | #define RADIXCHAR RADIXCHAR |
0ed99ce4 UD |
554 | __THOUSANDS_SEP, |
555 | #ifdef __USE_GNU | |
556 | # define THOUSANDS_SEP __THOUSANDS_SEP | |
557 | #endif | |
0ed99ce4 | 558 | THOUSEP = __THOUSANDS_SEP, |
44b60446 | 559 | #define THOUSEP THOUSEP |
0ed99ce4 UD |
560 | __GROUPING, |
561 | #ifdef __USE_GNU | |
562 | # define GROUPING __GROUPING | |
9756dfe1 | 563 | #endif |
4295702f UD |
564 | _NL_NUMERIC_DECIMAL_POINT_WC, |
565 | _NL_NUMERIC_THOUSANDS_SEP_WC, | |
e7f21fa6 | 566 | _NL_NUMERIC_CODESET, |
933e73fa RM |
567 | _NL_NUM_LC_NUMERIC, |
568 | ||
3e154a6f | 569 | __YESEXPR = _NL_ITEM (__LC_MESSAGES, 0), /* Regex matching ``yes'' input. */ |
55fb4e9e | 570 | #define YESEXPR __YESEXPR |
0ed99ce4 | 571 | __NOEXPR, /* Regex matching ``no'' input. */ |
55fb4e9e | 572 | #define NOEXPR __NOEXPR |
0ed99ce4 | 573 | __YESSTR, /* Output string for ``yes''. */ |
d0376ea7 | 574 | #if defined __USE_GNU || (defined __USE_XOPEN && !defined __USE_XOPEN2K) |
0ed99ce4 UD |
575 | # define YESSTR __YESSTR |
576 | #endif | |
577 | __NOSTR, /* Output string for ``no''. */ | |
d0376ea7 | 578 | #if defined __USE_GNU || (defined __USE_XOPEN && !defined __USE_XOPEN2K) |
44b60446 | 579 | # define NOSTR __NOSTR |
0ed99ce4 | 580 | #endif |
e7f21fa6 | 581 | _NL_MESSAGES_CODESET, |
933e73fa RM |
582 | _NL_NUM_LC_MESSAGES, |
583 | ||
3e154a6f | 584 | _NL_PAPER_HEIGHT = _NL_ITEM (__LC_PAPER, 0), |
4a33c2f5 | 585 | _NL_PAPER_WIDTH, |
e7f21fa6 | 586 | _NL_PAPER_CODESET, |
4b10dd6c UD |
587 | _NL_NUM_LC_PAPER, |
588 | ||
3e154a6f | 589 | _NL_NAME_NAME_FMT = _NL_ITEM (__LC_NAME, 0), |
4b10dd6c UD |
590 | _NL_NAME_NAME_GEN, |
591 | _NL_NAME_NAME_MR, | |
592 | _NL_NAME_NAME_MRS, | |
593 | _NL_NAME_NAME_MISS, | |
594 | _NL_NAME_NAME_MS, | |
e7f21fa6 | 595 | _NL_NAME_CODESET, |
4b10dd6c UD |
596 | _NL_NUM_LC_NAME, |
597 | ||
3e154a6f | 598 | _NL_ADDRESS_POSTAL_FMT = _NL_ITEM (__LC_ADDRESS, 0), |
4b10dd6c UD |
599 | _NL_ADDRESS_COUNTRY_NAME, |
600 | _NL_ADDRESS_COUNTRY_POST, | |
601 | _NL_ADDRESS_COUNTRY_AB2, | |
602 | _NL_ADDRESS_COUNTRY_AB3, | |
603 | _NL_ADDRESS_COUNTRY_CAR, | |
4a33c2f5 | 604 | _NL_ADDRESS_COUNTRY_NUM, |
4b10dd6c UD |
605 | _NL_ADDRESS_COUNTRY_ISBN, |
606 | _NL_ADDRESS_LANG_NAME, | |
607 | _NL_ADDRESS_LANG_AB, | |
608 | _NL_ADDRESS_LANG_TERM, | |
609 | _NL_ADDRESS_LANG_LIB, | |
e7f21fa6 | 610 | _NL_ADDRESS_CODESET, |
4b10dd6c UD |
611 | _NL_NUM_LC_ADDRESS, |
612 | ||
3e154a6f | 613 | _NL_TELEPHONE_TEL_INT_FMT = _NL_ITEM (__LC_TELEPHONE, 0), |
4b10dd6c UD |
614 | _NL_TELEPHONE_TEL_DOM_FMT, |
615 | _NL_TELEPHONE_INT_SELECT, | |
616 | _NL_TELEPHONE_INT_PREFIX, | |
e7f21fa6 | 617 | _NL_TELEPHONE_CODESET, |
4b10dd6c UD |
618 | _NL_NUM_LC_TELEPHONE, |
619 | ||
3e154a6f | 620 | _NL_MEASUREMENT_MEASUREMENT = _NL_ITEM (__LC_MEASUREMENT, 0), |
e7f21fa6 | 621 | _NL_MEASUREMENT_CODESET, |
4b10dd6c UD |
622 | _NL_NUM_LC_MEASUREMENT, |
623 | ||
3e154a6f | 624 | _NL_IDENTIFICATION_TITLE = _NL_ITEM (__LC_IDENTIFICATION, 0), |
4b10dd6c UD |
625 | _NL_IDENTIFICATION_SOURCE, |
626 | _NL_IDENTIFICATION_ADDRESS, | |
627 | _NL_IDENTIFICATION_CONTACT, | |
628 | _NL_IDENTIFICATION_EMAIL, | |
629 | _NL_IDENTIFICATION_TEL, | |
630 | _NL_IDENTIFICATION_FAX, | |
631 | _NL_IDENTIFICATION_LANGUAGE, | |
632 | _NL_IDENTIFICATION_TERRITORY, | |
633 | _NL_IDENTIFICATION_AUDIENCE, | |
634 | _NL_IDENTIFICATION_APPLICATION, | |
635 | _NL_IDENTIFICATION_ABBREVIATION, | |
636 | _NL_IDENTIFICATION_REVISION, | |
637 | _NL_IDENTIFICATION_DATE, | |
638 | _NL_IDENTIFICATION_CATEGORY, | |
e7f21fa6 | 639 | _NL_IDENTIFICATION_CODESET, |
4b10dd6c UD |
640 | _NL_NUM_LC_IDENTIFICATION, |
641 | ||
2b83a2a4 RM |
642 | /* This marks the highest value used. */ |
643 | _NL_NUM | |
9756dfe1 | 644 | }; |
933e73fa | 645 | |
500a1f28 RM |
646 | /* This macro produces an item you can pass to `nl_langinfo' or |
647 | `nl_langinfo_l' to get the name of the locale in use for CATEGORY. */ | |
4fb9241e UD |
648 | #define _NL_LOCALE_NAME(category) _NL_ITEM ((category), \ |
649 | _NL_ITEM_INDEX (-1)) | |
500a1f28 RM |
650 | #ifdef __USE_GNU |
651 | # define NL_LOCALE_NAME(category) _NL_LOCALE_NAME (category) | |
652 | #endif | |
653 | ||
933e73fa RM |
654 | |
655 | /* Return the current locale's value for ITEM. | |
656 | If ITEM is invalid, an empty string is returned. | |
657 | ||
658 | The string returned will not change until `setlocale' is called; | |
659 | it is usually in read-only memory and cannot be modified. */ | |
660 | ||
d8cf93f4 | 661 | extern char *nl_langinfo (nl_item __item) __THROW; |
933e73fa RM |
662 | |
663 | ||
085bbece | 664 | #ifdef __USE_XOPEN2K8 |
f0be25b6 ZW |
665 | /* POSIX.1-2008 extended locale interface (see locale.h). */ |
666 | # include <bits/types/locale_t.h> | |
c78ec91f UD |
667 | |
668 | /* Just like nl_langinfo but get the information from the locale object L. */ | |
af85385f | 669 | extern char *nl_langinfo_l (nl_item __item, locale_t __l); |
c78ec91f UD |
670 | #endif |
671 | ||
933e73fa RM |
672 | __END_DECLS |
673 | ||
674 | #endif /* langinfo.h */ |