7 #if !defined(__UCLIBC__) && 0
11 int main(int argc
, char **argv
)
14 const unsigned char *x
;
15 /* const unsigned char *y; */
16 const unsigned char *p
;
19 printf("invalid args\n");
28 if (!(x
= setlocale(LC_ALL
,l
))) {
29 printf("couldn't set locale %s\n", l
);
33 /* printf("\nsetlocale returned:\n "); */
35 /* printf("\\x%02x", *x); */
42 #define STR(X) __STR(X)
44 #define __PASTE2(A,B) A.B
47 printf( STR(X) " = %d\n", (int) nl_langinfo(X) );
49 printf( STR(X) " = \"%s\"\n", nl_langinfo(X) );
51 printf( STR(X) " = \"\\x%02x\"\n", *((unsigned char *) nl_langinfo(X)) );
57 DO_NL_I(_NL_CTYPE_INDIGITS_MB_LEN
);
58 DO_NL_S(_NL_CTYPE_INDIGITS0_MB
);
59 DO_NL_S(_NL_CTYPE_INDIGITS1_MB
);
60 DO_NL_S(_NL_CTYPE_INDIGITS2_MB
);
61 DO_NL_S(_NL_CTYPE_INDIGITS3_MB
);
62 DO_NL_S(_NL_CTYPE_INDIGITS4_MB
);
63 DO_NL_S(_NL_CTYPE_INDIGITS5_MB
);
64 DO_NL_S(_NL_CTYPE_INDIGITS6_MB
);
65 DO_NL_S(_NL_CTYPE_INDIGITS7_MB
);
66 DO_NL_S(_NL_CTYPE_INDIGITS8_MB
);
67 DO_NL_S(_NL_CTYPE_INDIGITS9_MB
);
69 DO_NL_S(_NL_CTYPE_OUTDIGIT0_MB
);
70 DO_NL_S(_NL_CTYPE_OUTDIGIT1_MB
);
71 DO_NL_S(_NL_CTYPE_OUTDIGIT2_MB
);
72 DO_NL_S(_NL_CTYPE_OUTDIGIT3_MB
);
73 DO_NL_S(_NL_CTYPE_OUTDIGIT4_MB
);
74 DO_NL_S(_NL_CTYPE_OUTDIGIT5_MB
);
75 DO_NL_S(_NL_CTYPE_OUTDIGIT6_MB
);
76 DO_NL_S(_NL_CTYPE_OUTDIGIT7_MB
);
77 DO_NL_S(_NL_CTYPE_OUTDIGIT8_MB
);
78 DO_NL_S(_NL_CTYPE_OUTDIGIT9_MB
);
83 DO_NL_S(RADIXCHAR
); /* DECIMAL_POINT */
84 DO_NL_S(THOUSEP
); /* THOUSANDS_SEP */
85 /* DO_NL_S(GROUPING); */
87 printf("GROUPING = \"");
88 for (p
= (unsigned char *) nl_langinfo(GROUPING
) ; *p
; p
++) {
89 printf("\\x%02x", *p
);
95 DO_NL_S(INT_CURR_SYMBOL
);
96 DO_NL_S(CURRENCY_SYMBOL
);
97 DO_NL_S(MON_DECIMAL_POINT
);
98 DO_NL_S(MON_THOUSANDS_SEP
);
99 /* DO_NL_S(MON_GROUPING); */
101 printf("MON_GROUPING = \"");
102 for (p
= (unsigned char *) nl_langinfo(MON_GROUPING
) ; *p
; p
++) {
103 printf("\\x%02x", *p
);
107 DO_NL_S(POSITIVE_SIGN
);
108 DO_NL_S(NEGATIVE_SIGN
);
109 DO_NL_C(INT_FRAC_DIGITS
);
110 DO_NL_C(FRAC_DIGITS
);
111 DO_NL_C(P_CS_PRECEDES
);
112 DO_NL_C(P_SEP_BY_SPACE
);
113 DO_NL_C(N_CS_PRECEDES
);
114 DO_NL_C(N_SEP_BY_SPACE
);
115 DO_NL_C(P_SIGN_POSN
);
116 DO_NL_C(N_SIGN_POSN
);
117 DO_NL_C(INT_P_CS_PRECEDES
);
118 DO_NL_C(INT_P_SEP_BY_SPACE
);
119 DO_NL_C(INT_N_CS_PRECEDES
);
120 DO_NL_C(INT_N_SEP_BY_SPACE
);
121 DO_NL_C(INT_P_SIGN_POSN
);
122 DO_NL_C(INT_N_SIGN_POSN
);
124 DO_NL_S(CRNCYSTR
); /* CURRENCY_SYMBOL */
180 const char *p
= nl_langinfo(ERA
);
182 printf("ERA = (none)\n");
186 for (i
=0 ; i
< 100 ; i
++) {
187 printf(" %3d: \"%s\"\n", i
, p
);
195 DO_NL_S(ERA_YEAR
); /* non SuSv3 */
197 /* DO_NL_S(ALT_DIGITS); */
199 const char *p
= nl_langinfo(ALT_DIGITS
);
201 printf("ALT_DIGITS = (none)\n");
204 printf("ALT_DIGITS:\n");
205 for (i
=0 ; i
< 100 ; i
++) {
206 printf(" %3d: \"%s\"\n", i
, p
);
212 DO_NL_S(ERA_D_T_FMT
);
216 DO_NL_C(_NL_TIME_WEEK_NDAYS
);
217 DO_NL_I(_NL_TIME_WEEK_1STDAY
); /* grr... this won't work with 16bit ptrs */
218 DO_NL_C(_NL_TIME_WEEK_1STWEEK
);
219 DO_NL_C(_NL_TIME_FIRST_WEEKDAY
);
220 DO_NL_C(_NL_TIME_FIRST_WORKDAY
);
221 DO_NL_C(_NL_TIME_CAL_DIRECTION
);
222 DO_NL_S(_NL_TIME_TIMEZONE
);
226 printf("messages\n");
237 DO_NL_I(_NL_PAPER_HEIGHT
);
238 DO_NL_I(_NL_PAPER_WIDTH
);
242 DO_NL_S(_NL_NAME_NAME_FMT
);
243 DO_NL_S(_NL_NAME_NAME_GEN
);
244 DO_NL_S(_NL_NAME_NAME_MR
);
245 DO_NL_S(_NL_NAME_NAME_MRS
);
246 DO_NL_S(_NL_NAME_NAME_MISS
);
247 DO_NL_S(_NL_NAME_NAME_MS
);
251 DO_NL_S(_NL_ADDRESS_POSTAL_FMT
);
252 DO_NL_S(_NL_ADDRESS_COUNTRY_NAME
);
253 DO_NL_S(_NL_ADDRESS_COUNTRY_POST
);
254 DO_NL_S(_NL_ADDRESS_COUNTRY_AB2
);
255 DO_NL_S(_NL_ADDRESS_COUNTRY_AB3
);
256 DO_NL_S(_NL_ADDRESS_COUNTRY_CAR
);
257 DO_NL_I(_NL_ADDRESS_COUNTRY_NUM
);
258 DO_NL_S(_NL_ADDRESS_COUNTRY_ISBN
);
259 DO_NL_S(_NL_ADDRESS_LANG_NAME
);
260 DO_NL_S(_NL_ADDRESS_LANG_AB
);
261 DO_NL_S(_NL_ADDRESS_LANG_TERM
);
262 DO_NL_S(_NL_ADDRESS_LANG_LIB
);
264 printf("telephone\n");
266 DO_NL_S(_NL_TELEPHONE_TEL_INT_FMT
);
267 DO_NL_S(_NL_TELEPHONE_TEL_DOM_FMT
);
268 DO_NL_S(_NL_TELEPHONE_INT_SELECT
);
269 DO_NL_S(_NL_TELEPHONE_INT_PREFIX
);
271 printf("measurement\n");
273 DO_NL_C(_NL_MEASUREMENT_MEASUREMENT
); /* 1 is metric, 2 is US */
275 printf("identification\n");
277 DO_NL_S(_NL_IDENTIFICATION_TITLE
);
278 DO_NL_S(_NL_IDENTIFICATION_SOURCE
);
279 DO_NL_S(_NL_IDENTIFICATION_ADDRESS
);
280 DO_NL_S(_NL_IDENTIFICATION_CONTACT
);
281 DO_NL_S(_NL_IDENTIFICATION_EMAIL
);
282 DO_NL_S(_NL_IDENTIFICATION_TEL
);
283 DO_NL_S(_NL_IDENTIFICATION_FAX
);
284 DO_NL_S(_NL_IDENTIFICATION_LANGUAGE
);
285 DO_NL_S(_NL_IDENTIFICATION_TERRITORY
);
286 DO_NL_S(_NL_IDENTIFICATION_AUDIENCE
);
287 DO_NL_S(_NL_IDENTIFICATION_APPLICATION
);
288 DO_NL_S(_NL_IDENTIFICATION_ABBREVIATION
);
289 DO_NL_S(_NL_IDENTIFICATION_REVISION
);
290 DO_NL_S(_NL_IDENTIFICATION_DATE
);
291 DO_NL_S(_NL_IDENTIFICATION_CATEGORY
);