Skip to content

Commit

Permalink
locale_header.h: Add explicit #define
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
khwilliamson committed Feb 27, 2024
1 parent 4110b0c commit 42e9f41
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions locale_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
# 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)
Expand All @@ -58,6 +60,8 @@
# define LC_NUMERIC_AVAIL_ 1
# define USE_LOCALE_NUMERIC
# endif
#else
# define LC_NUMERIC_AVAIL_ 0
#endif
#ifdef LC_COLLATE

Expand All @@ -77,6 +81,8 @@
# define LC_COLLATE_AVAIL_ 1
# define USE_LOCALE_COLLATE
# endif
#else
# define LC_COLLATE_AVAIL_ 0
#endif
#ifdef LC_TIME

Expand All @@ -89,6 +95,8 @@
# define LC_TIME_AVAIL_ 1
# define USE_LOCALE_TIME
# endif
#else
# define LC_TIME_AVAIL_ 0
#endif
#ifdef LC_MESSAGES

Expand All @@ -101,6 +109,8 @@
# define LC_MESSAGES_AVAIL_ 1
# define USE_LOCALE_MESSAGES
# endif
#else
# define LC_MESSAGES_AVAIL_ 0
#endif
#ifdef LC_MONETARY

Expand All @@ -113,6 +123,8 @@
# define LC_MONETARY_AVAIL_ 1
# define USE_LOCALE_MONETARY
# endif
#else
# define LC_MONETARY_AVAIL_ 0
#endif
#ifdef LC_ADDRESS

Expand All @@ -125,6 +137,8 @@
# define LC_ADDRESS_AVAIL_ 1
# define USE_LOCALE_ADDRESS
# endif
#else
# define LC_ADDRESS_AVAIL_ 0
#endif
#ifdef LC_IDENTIFICATION

Expand All @@ -137,6 +151,8 @@
# define LC_IDENTIFICATION_AVAIL_ 1
# define USE_LOCALE_IDENTIFICATION
# endif
#else
# define LC_IDENTIFICATION_AVAIL_ 0
#endif
#ifdef LC_MEASUREMENT

Expand All @@ -149,6 +165,8 @@
# define LC_MEASUREMENT_AVAIL_ 1
# define USE_LOCALE_MEASUREMENT
# endif
#else
# define LC_MEASUREMENT_AVAIL_ 0
#endif
#ifdef LC_PAPER

Expand All @@ -161,6 +179,8 @@
# define LC_PAPER_AVAIL_ 1
# define USE_LOCALE_PAPER
# endif
#else
# define LC_PAPER_AVAIL_ 0
#endif
#ifdef LC_TELEPHONE

Expand All @@ -173,6 +193,8 @@
# define LC_TELEPHONE_AVAIL_ 1
# define USE_LOCALE_TELEPHONE
# endif
#else
# define LC_TELEPHONE_AVAIL_ 0
#endif
#ifdef LC_NAME

Expand All @@ -185,6 +207,8 @@
# define LC_NAME_AVAIL_ 1
# define USE_LOCALE_NAME
# endif
#else
# define LC_NAME_AVAIL_ 0
#endif
#ifdef LC_SYNTAX

Expand All @@ -197,6 +221,8 @@
# define LC_SYNTAX_AVAIL_ 1
# define USE_LOCALE_SYNTAX
# endif
#else
# define LC_SYNTAX_AVAIL_ 0
#endif
#ifdef LC_TOD

Expand All @@ -209,6 +235,8 @@
# define LC_TOD_AVAIL_ 1
# define USE_LOCALE_TOD
# endif
#else
# define LC_TOD_AVAIL_ 0
#endif

/* ex: set ro ft=c: */
2 changes: 2 additions & 0 deletions regen/locale.pl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ sub open_print_header {
# define LC_${name}_AVAIL_ 1
# define USE_LOCALE_${name}
# endif
#else
# define LC_${name}_AVAIL_ 0
#endif
EOF
}
Expand Down

0 comments on commit 42e9f41

Please sign in to comment.