1 /*
2 * Copyright (C) 2017 The Android Open Source Project
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in
12 * the documentation and/or other materials provided with the
13 * distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29 #include <langinfo.h>
30
31 #include "header_checks.h"
32
langinfo_h()33 static void langinfo_h() {
34 TYPE(locale_t);
35 TYPE(nl_item);
36
37 MACRO_TYPE(nl_item, CODESET);
38 MACRO_TYPE(nl_item, D_T_FMT);
39 MACRO_TYPE(nl_item, D_FMT);
40 MACRO_TYPE(nl_item, T_FMT);
41 MACRO_TYPE(nl_item, T_FMT_AMPM);
42 MACRO_TYPE(nl_item, AM_STR);
43 MACRO_TYPE(nl_item, PM_STR);
44 MACRO_TYPE(nl_item, DAY_1);
45 MACRO_TYPE(nl_item, DAY_2);
46 MACRO_TYPE(nl_item, DAY_3);
47 MACRO_TYPE(nl_item, DAY_4);
48 MACRO_TYPE(nl_item, DAY_5);
49 MACRO_TYPE(nl_item, DAY_6);
50 MACRO_TYPE(nl_item, DAY_7);
51 MACRO_TYPE(nl_item, ABDAY_1);
52 MACRO_TYPE(nl_item, ABDAY_2);
53 MACRO_TYPE(nl_item, ABDAY_3);
54 MACRO_TYPE(nl_item, ABDAY_4);
55 MACRO_TYPE(nl_item, ABDAY_5);
56 MACRO_TYPE(nl_item, ABDAY_6);
57 MACRO_TYPE(nl_item, ABDAY_7);
58 MACRO_TYPE(nl_item, MON_1);
59 MACRO_TYPE(nl_item, MON_2);
60 MACRO_TYPE(nl_item, MON_3);
61 MACRO_TYPE(nl_item, MON_4);
62 MACRO_TYPE(nl_item, MON_5);
63 MACRO_TYPE(nl_item, MON_6);
64 MACRO_TYPE(nl_item, MON_7);
65 MACRO_TYPE(nl_item, MON_8);
66 MACRO_TYPE(nl_item, MON_9);
67 MACRO_TYPE(nl_item, MON_10);
68 MACRO_TYPE(nl_item, MON_11);
69 MACRO_TYPE(nl_item, MON_12);
70 MACRO_TYPE(nl_item, ABMON_1);
71 MACRO_TYPE(nl_item, ABMON_2);
72 MACRO_TYPE(nl_item, ABMON_3);
73 MACRO_TYPE(nl_item, ABMON_4);
74 MACRO_TYPE(nl_item, ABMON_5);
75 MACRO_TYPE(nl_item, ABMON_6);
76 MACRO_TYPE(nl_item, ABMON_7);
77 MACRO_TYPE(nl_item, ABMON_8);
78 MACRO_TYPE(nl_item, ABMON_9);
79 MACRO_TYPE(nl_item, ABMON_10);
80 MACRO_TYPE(nl_item, ABMON_11);
81 MACRO_TYPE(nl_item, ABMON_12);
82 MACRO_TYPE(nl_item, ERA);
83 MACRO_TYPE(nl_item, ERA_D_FMT);
84 MACRO_TYPE(nl_item, ERA_D_T_FMT);
85 MACRO_TYPE(nl_item, ERA_T_FMT);
86 MACRO_TYPE(nl_item, ALT_DIGITS);
87 MACRO_TYPE(nl_item, RADIXCHAR);
88 MACRO_TYPE(nl_item, THOUSEP);
89 MACRO_TYPE(nl_item, YESEXPR);
90 MACRO_TYPE(nl_item, NOEXPR);
91 MACRO_TYPE(nl_item, CRNCYSTR);
92
93 FUNCTION(nl_langinfo, char* (*f)(nl_item));
94 FUNCTION(nl_langinfo_l, char* (*f)(nl_item, locale_t));
95 }
96