1 /* Definition of all available locale categories and their items.
-*- C
-*-
2 Copyright (C
) 1995 Free Software Foundation
, Inc.
4 The GNU C Library is free software
; you can redistribute it and
/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation
; either version
2 of the
7 License
, or (at your option
) any later version.
9 The GNU C Library is distributed in the hope that it will be useful
,
10 but WITHOUT ANY WARRANTY
; without even the implied warranty of
11 MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library
; see the file COPYING.LIB. If
16 not
, write to the Free Software Foundation
, Inc.
, 675 Mass Ave
,
17 Cambridge
, MA
02139, USA.
*/
19 /* These definitions are used by the locale
-related files in the C library
20 and the programs `localedef
' and `locale'.
22 The general format of the descriptions is like this
:
24 DEFINE_CATEGORY (ID
, name
, ( items
), setlocale
-postload
,
25 locale
-input
, locale
-check
, locale
-output
)
27 where items itself is an array of entries in the form
29 { ID
, name
, standard
, value
-type
, min
, max
}
31 The usage of the load
, check
, output functions depends on the individual
32 program code which loads this file.
34 The various value types for the items are `string
', `stringarray', `byte
'
35 and `bytearray'. These cover all possible values in the current locale
36 definitions. `min
' and `max' can be individually used again.
*/
39 #define NO_POSTLOAD NULL
42 DEFINE_CATEGORY (LC_COLLATE
, "LC_COLLATE",
44 { 0 } /* No data encoding yet.
*/
45 ), NO_POSTLOAD
, collate_input
, NULL
, NULL
)
48 /* The actual definition of ctype is meaningless here. It is hard coded in
49 the code because it has to be handled very specially. Only the names of
50 the functions are important.
*/
51 DEFINE_CATEGORY (LC_CTYPE
, "LC_CTYPE",
53 { _NL_CTYPE_CLASS
, "ctype-class", std
, string
},
54 { _NL_CTYPE_TOUPPER_EB
, "ctype-toupper-eb", std
, string
},
55 { _NL_CTYPE_TOLOWER_EB
, "ctype-tolower-eb", std
, string
},
56 { _NL_CTYPE_TOUPPER_EL
, "ctype-toupper-el", std
, string
},
57 { _NL_CTYPE_TOLOWER_EL
, "ctype-tolower-el", std
, string
},
59 ), _nl_postload_ctype
,
60 ctype_input
, ctype_check
, ctype_output
)
63 DEFINE_CATEGORY (LC_MONETARY
, "LC_MONETARY",
65 { INT_CURR_SYMBOL
, "int_curr_symbol", std
, string
},
66 { CURRENCY_SYMBOL
, "currency_symbol", std
, string
},
67 { MON_DECIMAL_POINT
, "mon_decimal_point", std
, string
},
68 { MON_THOUSANDS_SEP
, "mon_thousands_sep", std
, string
},
69 { MON_GROUPING
, "mon_grouping", std
, bytearray
},
70 { POSITIVE_SIGN
, "positive_sign", std
, string
},
71 { NEGATIVE_SIGN
, "negative_sign", std
, string
},
72 { INT_FRAC_DIGITS
, "int_frac_digits", std
, byte
},
73 { FRAC_DIGITS
, "frac_digits", std
, byte
},
74 { P_CS_PRECEDES
, "p_cs_precedes", std
, byte
, 0, 1 },
75 { P_SEP_BY_SPACE
, "p_sep_by_space", std
, byte
, 0, 2 },
76 { N_CS_PRECEDES
, "n_cs_precedes", std
, byte
, 0, 1 },
77 { N_SEP_BY_SPACE
, "n_sep_by_space", std
, byte
, 0, 2 },
78 { P_SIGN_POSN
, "p_sign_posn", std
, byte
, 0, 4 },
79 { N_SIGN_POSN
, "n_sign_posn", std
, byte
, 0, 4 },
81 ), NO_POSTLOAD
, NULL
, monetary_check
, NULL
)
84 DEFINE_CATEGORY (LC_NUMERIC
, "LC_NUMERIC",
86 { DECIMAL_POINT
, "decimal_point", std
, string
},
87 { THOUSANDS_SEP
, "thousands_sep", std
, string
},
88 { GROUPING
, "grouping", std
, bytearray
},
90 ), NO_POSTLOAD
, NULL
, numeric_check
, NULL
)
93 DEFINE_CATEGORY (LC_TIME
, "LC_TIME",
95 { ABDAY_1
, "abday", std
, stringarray
, 7, 7 },
96 { DAY_1
, "day", std
, stringarray
, 7, 7 },
97 { ABMON_1
, "abmon", std
, stringarray
, 12, 12 },
98 { MON_1
, "mon", std
, stringarray
, 12, 12 },
99 { AM_STR
, "am_pm", std
, stringarray
, 2, 2 },
100 { D_T_FMT
, "d_t_fmt", std
, string
},
101 { D_FMT
, "d_fmt", std
, string
},
102 { T_FMT
, "t_fmt", std
, string
},
103 { T_FMT_AMPM
, "t_fmt_ampm", std
, string
},
104 { ERA
, "era", opt
, string
},
105 { ERA_YEAR
, "era_year", opt
, string
},
106 { ERA_D_FMT
, "era_d_fmt", opt
, string
},
107 { ALT_DIGITS
, "alt_digits", opt
, stringarray
, 0, 100 },
109 ), NO_POSTLOAD
, NULL
, NULL
, NULL
)
112 DEFINE_CATEGORY (LC_MESSAGES
, "LC_MESSAGES",
114 { YESEXPR
, "yesexpr", std
, string
},
115 { NOEXPR
, "noexpr", std
, string
},
116 { YESSTR
, "yesstr", opt
, string
},
117 { NOSTR
, "nostr", opt
, string
},
119 ), NO_POSTLOAD
, NULL
, messages_check
, NULL
)