1 | /* Definition of struct __locale_struct and __locale_t. |
2 | Copyright (C) 1997-2022 Free Software Foundation, Inc. |
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 |
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 |
16 | License along with the GNU C Library; if not, see |
17 | <https://www.gnu.org/licenses/>. */ |
18 | |
19 | #ifndef _BITS_TYPES___LOCALE_T_H |
20 | #define _BITS_TYPES___LOCALE_T_H 1 |
21 | |
22 | /* POSIX.1-2008: the locale_t type, representing a locale context |
23 | (implementation-namespace version). This type should be treated |
24 | as opaque by applications; some details are exposed for the sake of |
25 | efficiency in e.g. ctype functions. */ |
26 | |
27 | struct __locale_struct |
28 | { |
29 | /* Note: LC_ALL is not a valid index into this array. */ |
30 | struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ |
31 | |
32 | /* To increase the speed of this solution we add some special members. */ |
33 | const unsigned short int *__ctype_b; |
34 | const int *__ctype_tolower; |
35 | const int *__ctype_toupper; |
36 | |
37 | /* Note: LC_ALL is not a valid index into this array. */ |
38 | const char *__names[13]; |
39 | }; |
40 | |
41 | typedef struct __locale_struct *__locale_t; |
42 | |
43 | #endif /* bits/types/__locale_t.h */ |
44 | |