libintl.h
3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
* Copyright (C) 2008 Tor Lillqvist
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; see the file COPYING.LIB.txt. If
* not, write to the Free Software Foundation, Inc., 51 Franklin
* Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
#include <locale.h>
#ifndef LC_MESSAGES
# define LC_MESSAGES 1729 /* Use same value as in GNU gettext */
#endif
/* Define this to make configure checks successfully find gettext in libintl.
* This will cause the AM_GNU_GETTEXT([external]) macro to successfully detect
* that gettext is in -lintl, not in libc, and needs #include <libintl.h> */
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
# define __GNU_GETTEXT_SUPPORTED_REVISION
#endif
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
# define PROXY_LIBINTL_GNUC_FORMAT(arg_idx) __attribute__((__format_arg__(arg_idx)))
#else
# define PROXY_LIBINTL_GNUC_FORMAT(arg_idx)
#endif
#define gettext g_libintl_gettext
#define dgettext g_libintl_dgettext
#define dcgettext g_libintl_dcgettext
#define ngettext g_libintl_ngettext
#define dngettext g_libintl_dngettext
#define dcngettext g_libintl_dcngettext
#define textdomain g_libintl_textdomain
#define bindtextdomain g_libintl_bindtextdomain
#define bind_textdomain_codeset g_libintl_bind_textdomain_codeset
/* Define G_INTL_STATIC_COMPILATION to link statically */
#if defined(_WIN32) && !defined(G_INTL_STATIC_COMPILATION)
/* Export when producing library, import when linking against library */
# ifdef G_INTL_COMPILATION
# define G_INTL_EXPORT __declspec(dllexport)
# elif defined(_MSC_VER)
# define G_INTL_EXPORT __declspec(dllimport)
# else
# define G_INTL_EXPORT extern
# endif
#else
# define G_INTL_EXPORT extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
G_INTL_EXPORT char *g_libintl_gettext (const char *msgid) PROXY_LIBINTL_GNUC_FORMAT (1);
G_INTL_EXPORT char *g_libintl_dgettext (const char *domainname,
const char *msgid) PROXY_LIBINTL_GNUC_FORMAT (2);
G_INTL_EXPORT char *g_libintl_dcgettext (const char *domainname,
const char *msgid,
int category) PROXY_LIBINTL_GNUC_FORMAT (2);
G_INTL_EXPORT char *g_libintl_ngettext (const char *msgid1,
const char *msgid2,
unsigned long int n) PROXY_LIBINTL_GNUC_FORMAT (1) PROXY_LIBINTL_GNUC_FORMAT (2);
G_INTL_EXPORT char *g_libintl_dngettext (const char *domainname,
const char *msgid1,
const char *msgid2,
unsigned long int n) PROXY_LIBINTL_GNUC_FORMAT (2) PROXY_LIBINTL_GNUC_FORMAT (3);
G_INTL_EXPORT char *g_libintl_dcngettext (const char *domainname,
const char *msgid1,
const char *msgid2,
unsigned long int n,
int category) PROXY_LIBINTL_GNUC_FORMAT (2) PROXY_LIBINTL_GNUC_FORMAT (3);
G_INTL_EXPORT char *g_libintl_textdomain (const char *domainname);
G_INTL_EXPORT char *g_libintl_bindtextdomain (const char *domainname,
const char *dirname);
G_INTL_EXPORT char *g_libintl_bind_textdomain_codeset (const char *domainname,
const char *codeset);
#ifdef __cplusplus
}
#endif
#endif /* _LIBINTL_H */