| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
#ifndef _LIBINTL_H |
|---|
| 11 |
|
|---|
| 12 |
#include <locale.h> |
|---|
| 13 |
#undef gettext |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
#define LIBINTL_VERSION 0x001000 |
|---|
| 18 |
#define __USE_GNU_GETTEXT 1 |
|---|
| 19 |
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ |
|---|
| 20 |
((major) == 0 || (major) == 1 ? 1 : -1) |
|---|
| 21 |
|
|---|
| 22 |
#if defined(__cplusplus) |
|---|
| 23 |
extern "C" { |
|---|
| 24 |
#endif |
|---|
| 25 |
|
|---|
| 26 |
extern int libintl_version; |
|---|
| 27 |
|
|---|
| 28 |
#endif |
|---|
| 29 |
|
|---|
| 30 |
#if !defined(_LIBINTL_H) || defined(LIBINTL_REDEFINE) |
|---|
| 31 |
|
|---|
| 32 |
extern char *gettext(const char *) |
|---|
| 33 |
__attribute__((format_arg (1))); |
|---|
| 34 |
extern char *dgettext(const char *, const char *) |
|---|
| 35 |
__attribute__((format_arg (2))); |
|---|
| 36 |
extern char *dcgettext(const char *, const char *, int) |
|---|
| 37 |
__attribute__((format_arg (2))); |
|---|
| 38 |
extern char *ngettext(const char *, const char *, unsigned long) |
|---|
| 39 |
__attribute__((format_arg (1))) |
|---|
| 40 |
__attribute__((format_arg (2))); |
|---|
| 41 |
extern char *dngettext(const char *, const char *, const char *, unsigned long) |
|---|
| 42 |
__attribute__((format_arg (2))) |
|---|
| 43 |
__attribute__((format_arg (3))); |
|---|
| 44 |
extern char *dcngettext(const char *, const char *, const char *, |
|---|
| 45 |
unsigned long, int) |
|---|
| 46 |
__attribute__((format_arg (2))) |
|---|
| 47 |
__attribute__((format_arg (3))); |
|---|
| 48 |
extern char *dcigettext(const char *, const char *, const char *, |
|---|
| 49 |
int, unsigned long, int) |
|---|
| 50 |
__attribute__((format_arg (2))) |
|---|
| 51 |
__attribute__((format_arg (3))); |
|---|
| 52 |
extern char *textdomain(const char *); |
|---|
| 53 |
extern char *bindtextdomain(const char *, const char *); |
|---|
| 54 |
extern char *bind_textdomain_codeset(const char *, const char *); |
|---|
| 55 |
|
|---|
| 56 |
#ifdef LIBINTL_INTERNAL |
|---|
| 57 |
extern void gettext_free_exp(void *); |
|---|
| 58 |
extern int gettextparse(void *); |
|---|
| 59 |
#endif |
|---|
| 60 |
|
|---|
| 61 |
#endif |
|---|
| 62 |
|
|---|
| 63 |
#ifndef _LIBINTL_H |
|---|
| 64 |
#define _LIBINTL_H |
|---|
| 65 |
|
|---|
| 66 |
#ifdef LIBINTL_INTERNAL |
|---|
| 67 |
extern void libintl_set_relocation_prefix(const char *, const char *); |
|---|
| 68 |
extern void libintl_gettext_extract_plural(const char *, void *, |
|---|
| 69 |
unsigned long *); |
|---|
| 70 |
extern unsigned long libintl_hash_string(const char *); |
|---|
| 71 |
extern int libintl_once_singlethreaded(void *); |
|---|
| 72 |
extern const char *libintl_relocate(const char *) |
|---|
| 73 |
__attribute__((format_arg (1))); |
|---|
| 74 |
extern const char *locale_charset(void); |
|---|
| 75 |
#endif |
|---|
| 76 |
|
|---|
| 77 |
#if defined(__cplusplus) |
|---|
| 78 |
} |
|---|
| 79 |
#endif |
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
#if defined(__GNUC__) |
|---|
| 87 |
#define libintl_unconst(x) ({ \ |
|---|
| 88 |
union { \ |
|---|
| 89 |
const void *cptr; \ |
|---|
| 90 |
void *vptr; \ |
|---|
| 91 |
} __UC_v; \ |
|---|
| 92 |
\ |
|---|
| 93 |
__UC_v.cptr = (x); \ |
|---|
| 94 |
(__UC_v.vptr); \ |
|---|
| 95 |
}) |
|---|
| 96 |
#else |
|---|
| 97 |
#define libintl_unconst(x) ((char *)(x)) |
|---|
| 98 |
#endif |
|---|
| 99 |
|
|---|
| 100 |
#define gettext(s) libintl_unconst(s) |
|---|
| 101 |
#define dgettext(x,s) libintl_unconst(s) |
|---|
| 102 |
#define dcgettext(x,s,n) libintl_unconst(s) |
|---|
| 103 |
#define ngettext(s,t,n) libintl_unconst(s) |
|---|
| 104 |
#define dngettext(x,s,t,n) libintl_unconst(s) |
|---|
| 105 |
#define dcngettext(x,s,t,n,m) libintl_unconst(s) |
|---|
| 106 |
#define dcigettext(x,s,t,n,m,p) libintl_unconst(s) |
|---|
| 107 |
#define textdomain(x) libintl_unconst("messages") |
|---|
| 108 |
#define bindtextdomain(x,y) libintl_unconst(y) |
|---|
| 109 |
#define bind_textdomain_codeset(x,y) libintl_unconst(y) |
|---|
| 110 |
#define libintl_set_relocation_prefix(x,y) do { } while(0) |
|---|
| 111 |
|
|---|
| 112 |
#endif |
|---|