This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
IO::getline(): use CALLRUNOPS
[perl5.git] / locale_table.h
1 /*    locale_entry.h
2  *
3  *    Copyright (C) 2023 by Larry Wall and others
4  *
5  *    You may distribute under the terms of either the GNU General Public
6  *    License or the Artistic License, as specified in the README file.
7  *
8  * This defines a macro for each individual locale category used on the this
9  * system.  (The congomerate category LC_ALL is not included.)  This
10  * file will be #included as the interior of various parallel arrays and in
11  * other constructs; each usage will re-#define the macro to generate its
12  * appropriate data.
13  *
14  * This guarantees the arrays will be parallel, and populated in the order
15  * given here.  That order is mostly arbitrary.  LC_CTYPE is first because when
16  * we are setting multiple categories, CTYPE often needs to match the other(s),
17  * and the way the code is constructed, if we set the other category first, we
18  * might otherwise have to set CTYPE twice.
19  *
20  * Each entry takes the token giving the category name, and either the name of
21  * a function to call that does specialized set up for this category when it is
22  * changed into, or NULL if no such set up is needed
23  */
24
25 #ifdef LC_CTYPE
26 #  ifdef NO_LOCALE_CTYPE
27
28     PERL_LOCALE_TABLE_ENTRY(CTYPE, NULL)
29
30 #    define HAS_IGNORED_LOCALE_CATEGORIES_
31 #    define LC_CTYPE_AVAIL_  false
32 #  else
33
34     PERL_LOCALE_TABLE_ENTRY(CTYPE, S_new_ctype)
35
36 #    define LC_CTYPE_AVAIL_  true
37 #    define USE_LOCALE_CTYPE
38 #  endif
39 #endif
40 #ifdef LC_NUMERIC
41 #  ifdef NO_LOCALE_NUMERIC
42
43     PERL_LOCALE_TABLE_ENTRY(NUMERIC, NULL)
44
45 #    define HAS_IGNORED_LOCALE_CATEGORIES_
46 #    define LC_NUMERIC_AVAIL_  false
47 #  else
48
49     PERL_LOCALE_TABLE_ENTRY(NUMERIC, S_new_numeric)
50
51 #    define LC_NUMERIC_AVAIL_  true
52 #    define USE_LOCALE_NUMERIC
53 #  endif
54 #endif
55 #ifdef LC_COLLATE
56
57         /* Perl outsources all its collation efforts to the libc strxfrm(), so
58          * if it isn't available on the system, default "C" locale collation
59          * gets used */
60 #  if defined(NO_LOCALE_COLLATE) || ! defined(HAS_STRXFRM)
61
62     PERL_LOCALE_TABLE_ENTRY(COLLATE, NULL)
63
64 #    define HAS_IGNORED_LOCALE_CATEGORIES_
65 #    define LC_COLLATE_AVAIL_  false
66 #  else
67
68     PERL_LOCALE_TABLE_ENTRY(COLLATE, S_new_collate)
69
70 #    define LC_COLLATE_AVAIL_  true
71 #    define USE_LOCALE_COLLATE
72 #  endif
73 #endif
74 #ifdef LC_TIME
75
76     PERL_LOCALE_TABLE_ENTRY(TIME, NULL)
77
78 #  ifdef NO_LOCALE_TIME
79 #    define HAS_IGNORED_LOCALE_CATEGORIES_
80 #    define LC_TIME_AVAIL_  false
81 #  else
82 #    define LC_TIME_AVAIL_  true
83 #    define USE_LOCALE_TIME
84 #  endif
85 #endif
86 #ifdef LC_MESSAGES
87
88     PERL_LOCALE_TABLE_ENTRY(MESSAGES, NULL)
89
90 #  ifdef NO_LOCALE_MESSAGES
91 #    define HAS_IGNORED_LOCALE_CATEGORIES_
92 #    define LC_MESSAGES_AVAIL_  false
93 #  else
94 #    define LC_MESSAGES_AVAIL_  true
95 #    define USE_LOCALE_MESSAGES
96 #  endif
97 #endif
98 #ifdef LC_MONETARY
99
100     PERL_LOCALE_TABLE_ENTRY(MONETARY, NULL)
101
102 #  ifdef NO_LOCALE_MONETARY
103 #    define HAS_IGNORED_LOCALE_CATEGORIES_
104 #    define LC_MONETARY_AVAIL_  false
105 #  else
106 #    define LC_MONETARY_AVAIL_  true
107 #    define USE_LOCALE_MONETARY
108 #  endif
109 #endif
110 #ifdef LC_ADDRESS
111
112     PERL_LOCALE_TABLE_ENTRY(ADDRESS, NULL)
113
114 #  ifdef NO_LOCALE_ADDRESS
115 #    define HAS_IGNORED_LOCALE_CATEGORIES_
116 #    define LC_ADDRESS_AVAIL_  false
117 #  else
118 #    define LC_ADDRESS_AVAIL_  true
119 #    define USE_LOCALE_ADDRESS
120 #  endif
121 #endif
122 #ifdef LC_IDENTIFICATION
123
124     PERL_LOCALE_TABLE_ENTRY(IDENTIFICATION, NULL)
125
126 #  ifdef NO_LOCALE_IDENTIFICATION
127 #    define HAS_IGNORED_LOCALE_CATEGORIES_
128 #    define LC_IDENTIFICATION_AVAIL_  false
129 #  else
130 #    define LC_IDENTIFICATION_AVAIL_  true
131 #    define USE_LOCALE_IDENTIFICATION
132 #  endif
133 #endif
134 #ifdef LC_MEASUREMENT
135
136     PERL_LOCALE_TABLE_ENTRY(MEASUREMENT, NULL)
137
138 #  ifdef NO_LOCALE_MEASUREMENT
139 #    define HAS_IGNORED_LOCALE_CATEGORIES_
140 #    define LC_MEASUREMENT_AVAIL_  false
141 #  else
142 #    define LC_MEASUREMENT_AVAIL_  true
143 #    define USE_LOCALE_MEASUREMENT
144 #  endif
145 #endif
146 #ifdef LC_PAPER
147
148     PERL_LOCALE_TABLE_ENTRY(PAPER, NULL)
149
150 #  ifdef NO_LOCALE_PAPER
151 #    define HAS_IGNORED_LOCALE_CATEGORIES_
152 #    define LC_PAPER_AVAIL_  false
153 #  else
154 #    define LC_PAPER_AVAIL_  true
155 #    define USE_LOCALE_PAPER
156 #  endif
157 #endif
158 #ifdef LC_TELEPHONE
159
160     PERL_LOCALE_TABLE_ENTRY(TELEPHONE, NULL)
161
162 #  ifdef NO_LOCALE_TELEPHONE
163 #    define HAS_IGNORED_LOCALE_CATEGORIES_
164 #    define LC_TELEPHONE_AVAIL_  false
165 #  else
166 #    define LC_TELEPHONE_AVAIL_  true
167 #    define USE_LOCALE_TELEPHONE
168 #  endif
169 #endif
170 #ifdef LC_NAME
171
172     PERL_LOCALE_TABLE_ENTRY(NAME, NULL)
173
174 #  ifdef NO_LOCALE_NAME
175 #    define HAS_IGNORED_LOCALE_CATEGORIES_
176 #    define LC_NAME_AVAIL_  false
177 #  else
178 #    define LC_NAME_AVAIL_  true
179 #    define USE_LOCALE_NAME
180 #  endif
181 #endif
182 #ifdef LC_SYNTAX
183
184     PERL_LOCALE_TABLE_ENTRY(SYNTAX, NULL)
185
186 #  ifdef NO_LOCALE_SYNTAX
187 #    define HAS_IGNORED_LOCALE_CATEGORIES_
188 #    define LC_SYNTAX_AVAIL_  false
189 #  else
190 #    define LC_SYNTAX_AVAIL_  true
191 #    define USE_LOCALE_SYNTAX
192 #  endif
193 #endif
194 #ifdef LC_TOD
195
196     PERL_LOCALE_TABLE_ENTRY(TOD, NULL)
197
198 #  ifdef NO_LOCALE_TOD
199 #    define HAS_IGNORED_LOCALE_CATEGORIES_
200 #    define LC_TOD_AVAIL_  false
201 #  else
202 #    define LC_TOD_AVAIL_  true
203 #    define USE_LOCALE_TOD
204 #  endif
205 #endif