Root/package/libs/gettext/src/include/libintl.h

1/*
2 * This code is lifted from http://permalink.gmane.org/gmane.linux.gentoo.embedded/3218
3 */
4
5#ifndef _LIBINTL_H
6#define _LIBINTL_H 1
7
8#include <locale.h>
9
10/* Undef gettext macros, if any... */
11#undef gettext
12#undef dgettext
13#undef dcgettext
14#undef ngettext
15#undef dngettext
16#undef dcngettext
17#undef textdomain
18#undef bindtextdomain
19#undef bind_textdomain_codeset
20
21/* part of locale.h */
22/* #undef setlocale */
23
24#undef _
25#undef N_
26
27/* Define gettext stubs that map back to the original strings */
28#define gettext(String) (String)
29#define dgettext(Domain, String) (String)
30#define dcgettext(Domain, String, Type) (String)
31
32#define ngettext(Singular, Plural, Count) \
33    ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
34
35#define dngettext(Domain, Singular, Plural, Count) \
36    ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
37
38#define dcngettext(Domain, Singular, Plural, Count, Category) \
39    ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural))
40
41#define _(String) (String)
42#define N_(String) String
43
44#ifndef _LOCALE_H
45/* #define setlocale(Category, Locale) ((char *)NULL) */
46#endif
47
48/* No-ops for textdomain operations */
49#define bindtextdomain(Domain, Directory) (Domain)
50#define bind_textdomain_codeset(Domain, Codeset) (Codeset)
51#define textdomain(String) (String) ?: "messages"
52
53#endif /* _LIBINTL_H */
54

Archive Download this file



interactive