1 /* 2 * Copyright 2010-2012 Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _LANGINFO_H_ 6 #define _LANGINFO_H_ 7 8 9 #include <locale.h> 10 #include <nl_types.h> 11 #include <sys/cdefs.h> 12 13 14 enum { 15 CODESET, /* codeset name */ 16 D_T_FMT, /* string for formatting date and time */ 17 D_FMT, /* date format string */ 18 T_FMT, /* time format string */ 19 T_FMT_AMPM, /* a.m. or p.m. time formatting string */ 20 AM_STR, /* Ante Meridian affix */ 21 PM_STR, /* Post Meridian affix */ 22 23 /* week day names */ 24 DAY_1, 25 DAY_2, 26 DAY_3, 27 DAY_4, 28 DAY_5, 29 DAY_6, 30 DAY_7, 31 32 /* abbreviated week day names */ 33 ABDAY_1, 34 ABDAY_2, 35 ABDAY_3, 36 ABDAY_4, 37 ABDAY_5, 38 ABDAY_6, 39 ABDAY_7, 40 41 /* month names */ 42 MON_1, 43 MON_2, 44 MON_3, 45 MON_4, 46 MON_5, 47 MON_6, 48 MON_7, 49 MON_8, 50 MON_9, 51 MON_10, 52 MON_11, 53 MON_12, 54 55 /* abbreviated month names */ 56 ABMON_1, 57 ABMON_2, 58 ABMON_3, 59 ABMON_4, 60 ABMON_5, 61 ABMON_6, 62 ABMON_7, 63 ABMON_8, 64 ABMON_9, 65 ABMON_10, 66 ABMON_11, 67 ABMON_12, 68 69 ERA, /* era description segments */ 70 ERA_D_FMT, /* era date format string */ 71 ERA_D_T_FMT, /* era date and time format string */ 72 ERA_T_FMT, /* era time format string */ 73 ALT_DIGITS, /* alternative symbols for digits */ 74 75 RADIXCHAR, /* radix char */ 76 THOUSEP, /* separator for thousands */ 77 78 YESEXPR, /* affirmative response expression */ 79 NOEXPR, /* negative response expression */ 80 81 CRNCYSTR, /* currency symbol */ 82 83 _NL_LANGINFO_LAST 84 }; 85 86 /* According to the POSIX base specs v7, the above need to be available as 87 symbolic constants, so we define them individually to their respective 88 enumeration name. */ 89 #define CODESET CODESET 90 #define D_T_FMT D_T_FMT 91 #define D_FMT D_FMT 92 #define T_FMT T_FMT 93 #define T_FMT_AMPM T_FMT_AMPM 94 #define AM_STR AM_STR 95 #define PM_STR PM_STR 96 #define DAY_1 DAY_1 97 #define DAY_2 DAY_2 98 #define DAY_3 DAY_3 99 #define DAY_4 DAY_4 100 #define DAY_5 DAY_5 101 #define DAY_6 DAY_6 102 #define DAY_7 DAY_7 103 #define ABDAY_1 ABDAY_1 104 #define ABDAY_2 ABDAY_2 105 #define ABDAY_3 ABDAY_3 106 #define ABDAY_4 ABDAY_4 107 #define ABDAY_5 ABDAY_5 108 #define ABDAY_6 ABDAY_6 109 #define ABDAY_7 ABDAY_7 110 #define MON_1 MON_1 111 #define MON_2 MON_2 112 #define MON_3 MON_3 113 #define MON_4 MON_4 114 #define MON_5 MON_5 115 #define MON_6 MON_6 116 #define MON_7 MON_7 117 #define MON_8 MON_8 118 #define MON_9 MON_9 119 #define MON_10 MON_10 120 #define MON_11 MON_11 121 #define MON_12 MON_12 122 #define ABMON_1 ABMON_1 123 #define ABMON_2 ABMON_2 124 #define ABMON_3 ABMON_3 125 #define ABMON_4 ABMON_4 126 #define ABMON_5 ABMON_5 127 #define ABMON_6 ABMON_6 128 #define ABMON_7 ABMON_7 129 #define ABMON_8 ABMON_8 130 #define ABMON_9 ABMON_9 131 #define ABMON_10 ABMON_10 132 #define ABMON_11 ABMON_11 133 #define ABMON_12 ABMON_12 134 #define ERA ERA 135 #define ERA_D_FMT ERA_D_FMT 136 #define ERA_D_T_FMT ERA_D_T_FMT 137 #define ERA_T_FMT ERA_T_FMT 138 #define ALT_DIGITS ALT_DIGITS 139 #define RADIXCHAR RADIXCHAR 140 #define THOUSEP THOUSEP 141 #define YESEXPR YESEXPR 142 #define NOEXPR NOEXPR 143 #define CRNCYSTR CRNCYSTR 144 145 __BEGIN_DECLS 146 147 extern char* nl_langinfo(nl_item item); 148 extern char* nl_langinfo_l(nl_item item, locale_t locale); 149 150 __END_DECLS 151 152 153 #endif /* _LANGINFO_H_ */ 154