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