perl/locale_table.h
Karl Williamson 42e9f41908 locale_header.h: Add explicit #define
The previous commit made this a generated file.  Prior to this commit
one #define was omitted because it would be interpreted as 0 anyway, and
it was a pain to add to each of the entries.  But now, it is easy to
add, and tends to be clearer to have an explicit #define.
2024-02-27 07:41:28 -07:00

243 lines
6.0 KiB
C

/* -*- mode: C; buffer-read-only: t -*-
*
* locale_table.h
*
* Copyright (C) 2023, 2024 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
* This file is built by regen/locale.pl from data in regen/locale.pl.
* Any changes made here will be lost!
*/
/* This defines a macro for each individual locale category used on the this
* system. (The congomerate category LC_ALL is not included.) This
* file will be #included as the interior of various parallel arrays and in
* other constructs; each usage will re-#define the macro to generate its
* appropriate data.
*
* This guarantees the arrays will be parallel, and populated in the order
* given here. That order is mostly arbitrary. LC_CTYPE is first because when
* we are setting multiple categories, CTYPE often needs to match the other(s),
* and the way the code is constructed, if we set the other category first, we
* might otherwise have to set CTYPE twice.
*
* Each entry takes the token giving the category name, and either the name of
* a function to call that does specialized set up for this category when it is
* changed into, or NULL if no such set up is needed
*/
#ifdef LC_CTYPE
# if defined(NO_LOCALE) || defined(NO_LOCALE_CTYPE)
PERL_LOCALE_TABLE_ENTRY(CTYPE, NULL)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_CTYPE_AVAIL_ 0
# else
PERL_LOCALE_TABLE_ENTRY(CTYPE, S_new_ctype)
# define LC_CTYPE_AVAIL_ 1
# define USE_LOCALE_CTYPE
# endif
#else
# define LC_CTYPE_AVAIL_ 0
#endif
#ifdef LC_NUMERIC
# if defined(NO_LOCALE) || defined(NO_LOCALE_NUMERIC)
PERL_LOCALE_TABLE_ENTRY(NUMERIC, NULL)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_NUMERIC_AVAIL_ 0
# else
PERL_LOCALE_TABLE_ENTRY(NUMERIC, S_new_numeric)
# define LC_NUMERIC_AVAIL_ 1
# define USE_LOCALE_NUMERIC
# endif
#else
# define LC_NUMERIC_AVAIL_ 0
#endif
#ifdef LC_COLLATE
/* Perl outsources all its collation efforts to the libc strxfrm(), so
* if it isn't available on the system, default "C" locale collation
* gets used */
# if defined(NO_LOCALE) || defined(NO_LOCALE_COLLATE) || ! defined(HAS_STRXFRM)
PERL_LOCALE_TABLE_ENTRY(COLLATE, NULL)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_COLLATE_AVAIL_ 0
# else
PERL_LOCALE_TABLE_ENTRY(COLLATE, S_new_collate)
# define LC_COLLATE_AVAIL_ 1
# define USE_LOCALE_COLLATE
# endif
#else
# define LC_COLLATE_AVAIL_ 0
#endif
#ifdef LC_TIME
PERL_LOCALE_TABLE_ENTRY(TIME, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_TIME)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_TIME_AVAIL_ 0
# else
# define LC_TIME_AVAIL_ 1
# define USE_LOCALE_TIME
# endif
#else
# define LC_TIME_AVAIL_ 0
#endif
#ifdef LC_MESSAGES
PERL_LOCALE_TABLE_ENTRY(MESSAGES, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_MESSAGES)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_MESSAGES_AVAIL_ 0
# else
# define LC_MESSAGES_AVAIL_ 1
# define USE_LOCALE_MESSAGES
# endif
#else
# define LC_MESSAGES_AVAIL_ 0
#endif
#ifdef LC_MONETARY
PERL_LOCALE_TABLE_ENTRY(MONETARY, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_MONETARY)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_MONETARY_AVAIL_ 0
# else
# define LC_MONETARY_AVAIL_ 1
# define USE_LOCALE_MONETARY
# endif
#else
# define LC_MONETARY_AVAIL_ 0
#endif
#ifdef LC_ADDRESS
PERL_LOCALE_TABLE_ENTRY(ADDRESS, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_ADDRESS)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_ADDRESS_AVAIL_ 0
# else
# define LC_ADDRESS_AVAIL_ 1
# define USE_LOCALE_ADDRESS
# endif
#else
# define LC_ADDRESS_AVAIL_ 0
#endif
#ifdef LC_IDENTIFICATION
PERL_LOCALE_TABLE_ENTRY(IDENTIFICATION, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_IDENTIFICATION)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_IDENTIFICATION_AVAIL_ 0
# else
# define LC_IDENTIFICATION_AVAIL_ 1
# define USE_LOCALE_IDENTIFICATION
# endif
#else
# define LC_IDENTIFICATION_AVAIL_ 0
#endif
#ifdef LC_MEASUREMENT
PERL_LOCALE_TABLE_ENTRY(MEASUREMENT, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_MEASUREMENT)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_MEASUREMENT_AVAIL_ 0
# else
# define LC_MEASUREMENT_AVAIL_ 1
# define USE_LOCALE_MEASUREMENT
# endif
#else
# define LC_MEASUREMENT_AVAIL_ 0
#endif
#ifdef LC_PAPER
PERL_LOCALE_TABLE_ENTRY(PAPER, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_PAPER)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_PAPER_AVAIL_ 0
# else
# define LC_PAPER_AVAIL_ 1
# define USE_LOCALE_PAPER
# endif
#else
# define LC_PAPER_AVAIL_ 0
#endif
#ifdef LC_TELEPHONE
PERL_LOCALE_TABLE_ENTRY(TELEPHONE, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_TELEPHONE)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_TELEPHONE_AVAIL_ 0
# else
# define LC_TELEPHONE_AVAIL_ 1
# define USE_LOCALE_TELEPHONE
# endif
#else
# define LC_TELEPHONE_AVAIL_ 0
#endif
#ifdef LC_NAME
PERL_LOCALE_TABLE_ENTRY(NAME, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_NAME)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_NAME_AVAIL_ 0
# else
# define LC_NAME_AVAIL_ 1
# define USE_LOCALE_NAME
# endif
#else
# define LC_NAME_AVAIL_ 0
#endif
#ifdef LC_SYNTAX
PERL_LOCALE_TABLE_ENTRY(SYNTAX, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_SYNTAX)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_SYNTAX_AVAIL_ 0
# else
# define LC_SYNTAX_AVAIL_ 1
# define USE_LOCALE_SYNTAX
# endif
#else
# define LC_SYNTAX_AVAIL_ 0
#endif
#ifdef LC_TOD
PERL_LOCALE_TABLE_ENTRY(TOD, NULL)
# if defined(NO_LOCALE) || defined(NO_LOCALE_TOD)
# define HAS_IGNORED_LOCALE_CATEGORIES_
# define LC_TOD_AVAIL_ 0
# else
# define LC_TOD_AVAIL_ 1
# define USE_LOCALE_TOD
# endif
#else
# define LC_TOD_AVAIL_ 0
#endif
/* ex: set ro ft=c: */