]>
Commit | Line | Data |
---|---|---|
5db91571 | 1 | /* C locale object. |
6d7e8eda | 2 | Copyright (C) 2001-2023 Free Software Foundation, Inc. |
5db91571 | 3 | This file is part of the GNU C Library. |
5db91571 UD |
4 | |
5 | The GNU C Library is free software; you can redistribute it and/or | |
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. | |
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 | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
59ba27a6 | 16 | License along with the GNU C Library; if not, see |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
5db91571 UD |
18 | |
19 | #include <locale.h> | |
20 | #include "localeinfo.h" | |
21 | ||
22 | #define DEFINE_CATEGORY(category, category_name, items, a) \ | |
f095bb72 | 23 | extern struct __locale_data _nl_C_##category; |
5db91571 UD |
24 | #include "categories.def" |
25 | #undef DEFINE_CATEGORY | |
26 | ||
27 | /* Defined in locale/C-ctype.c. */ | |
ab26a24a UD |
28 | extern const char _nl_C_LC_CTYPE_class[] attribute_hidden; |
29 | extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden; | |
30 | extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden; | |
5db91571 UD |
31 | |
32 | ||
4b5b009c | 33 | const struct __locale_struct _nl_C_locobj attribute_hidden = |
1a0d874e RM |
34 | { |
35 | .__locales = | |
36 | { | |
37 | #define DEFINE_CATEGORY(category, category_name, items, a) \ | |
38 | [category] = &_nl_C_##category, | |
39 | #include "categories.def" | |
1ce8aaae RM |
40 | #undef DEFINE_CATEGORY |
41 | }, | |
42 | .__names = | |
43 | { | |
44 | [LC_ALL] = _nl_C_name, | |
45 | #define DEFINE_CATEGORY(category, category_name, items, a) \ | |
46 | [category] = _nl_C_name, | |
47 | #include "categories.def" | |
1a0d874e RM |
48 | #undef DEFINE_CATEGORY |
49 | }, | |
50 | .__ctype_b = (const unsigned short int *) _nl_C_LC_CTYPE_class + 128, | |
51 | .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128, | |
52 | .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128 | |
53 | }; |