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