Debian Codegraph @

local/nls.h

raw
1 /*
2 * This header was copied from util-linux at fall 2011.
3 */
4
5 #ifndef PROCPS_NG_NLS_H
6 #define PROCPS_NG_NLS_H
7
8 /* programs issuing textdomain() need PACKAGE string */
9 #include "config.h"
10
11 /* programs issuing bindtextdomain() also need LOCALEDIR string */
12 #ifndef LOCALEDIR
13 #define LOCALEDIR "/usr/share/locale"
14 #endif
15
16 #ifdef HAVE_LOCALE_H
17 # include <locale.h>
18 #else
19 # undef setlocale
20 # define setlocale(Category, Locale) /* empty */
21 #endif
22
23 #ifdef ENABLE_NLS
24 # include <libintl.h>
25 # define _(Text) gettext (Text)
26 # ifdef gettext_noop
27 # define N_(String) gettext_noop (String)
28 # else
29 # define N_(String) (String)
30 # endif
31 # define P_(Singular, Plural, n) ngettext (Singular, Plural, n)
32 #else
33 # undef bindtextdomain
34 # define bindtextdomain(Domain, Directory) /* empty */
35 # undef textdomain
36 # define textdomain(Domain) /* empty */
37 # define _(Text) (Text)
38 # define N_(Text) (Text)
39 # define P_(Singular, Plural, n) ((n) == 1 ? (Singular) : (Plural))
40 #endif /* ENABLE_NLS */
41
42 #ifdef HAVE_LANGINFO_H
43 # include <langinfo.h>
44 #else
45
46 typedef int nl_item;
47 extern char *langinfo_fallback(nl_item item);
48
49 # define nl_langinfo langinfo_fallback
50
51 enum {
52 CODESET = 1,
53 RADIXCHAR,
54 THOUSEP,
55 D_T_FMT,
56 D_FMT,
57 T_FMT,
58 T_FMT_AMPM,
59 AM_STR,
60 PM_STR,
61
62 DAY_1,
63 DAY_2,
64 DAY_3,
65 DAY_4,
66 DAY_5,
67 DAY_6,
68 DAY_7,
69
70 ABDAY_1,
71 ABDAY_2,
72 ABDAY_3,
73 ABDAY_4,
74 ABDAY_5,
75 ABDAY_6,
76 ABDAY_7,
77
78 MON_1,
79 MON_2,
80 MON_3,
81 MON_4,
82 MON_5,
83 MON_6,
84 MON_7,
85 MON_8,
86 MON_9,
87 MON_10,
88 MON_11,
89 MON_12,
90
91 ABMON_1,
92 ABMON_2,
93 ABMON_3,
94 ABMON_4,
95 ABMON_5,
96 ABMON_6,
97 ABMON_7,
98 ABMON_8,
99 ABMON_9,
100 ABMON_10,
101 ABMON_11,
102 ABMON_12,
103
104 ERA_D_FMT,
105 ERA_D_T_FMT,
106 ERA_T_FMT,
107 ALT_DIGITS,
108 CRNCYSTR,
109 YESEXPR,
110 NOEXPR
111 };
112
113 #endif /* !HAVE_LANGINFO_H */
114 #endif /* PROCPS_NG_NLS_H */