fix api tests (add some obsolete symbols fix wchar tests)
[libc-test] / src / api / locale.c
1 #include <locale.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
6 {
7 T(locale_t)
8 {
9 struct lconv x;
10 F(char*,currency_symbol)
11 F(char*,decimal_point)
12 F(char,frac_digits)
13 F(char*,grouping)
14 F(char*,int_curr_symbol)
15 F(char,int_frac_digits)
16 F(char,int_n_cs_precedes)
17 F(char,int_n_sep_by_space)
18 F(char,int_n_sign_posn)
19 F(char,int_p_cs_precedes)
20 F(char,int_p_sep_by_space)
21 F(char,int_p_sign_posn)
22 F(char*,mon_decimal_point)
23 F(char*,mon_grouping)
24 F(char*,mon_thousands_sep)
25 F(char*,negative_sign)
26 F(char,n_cs_precedes)
27 F(char,n_sep_by_space)
28 F(char,n_sign_posn)
29 F(char*,positive_sign)
30 F(char,p_cs_precedes)
31 F(char,p_sep_by_space)
32 F(char,p_sign_posn)
33 F(char*,thousands_sep)
34 }
35 {void *x=NULL;}
36 C(LC_ALL)
37 C(LC_COLLATE)
38 C(LC_CTYPE)
39 #ifdef _POSIX_C_SOURCE
40 C(LC_MESSAGES)
41 #endif
42 C(LC_MONETARY)
43 C(LC_NUMERIC)
44 C(LC_TIME)
45 #ifdef _POSIX_C_SOURCE
46 C(LC_ALL_MASK)
47 C(LC_COLLATE_MASK)
48 C(LC_CTYPE_MASK)
49 C(LC_MESSAGES_MASK)
50 C(LC_MONETARY_MASK)
51 C(LC_NUMERIC_MASK)
52 C(LC_TIME_MASK)
53 {locale_t x = LC_GLOBAL_LOCALE;}
54 {locale_t(*p)(locale_t) = duplocale;}
55 {void(*p)(locale_t) = freelocale;}
56 {locale_t(*p)(int,const char*,locale_t) = newlocale;}
57 {locale_t(*p)(locale_t) = uselocale;}
58 #endif
59 {struct lconv*(*p)(void) = localeconv;}
60 {char*(*p)(int,const char*) = setlocale;}
61 }