annotate intl/libgettext.h @ 1553:bf10d0673d34

[gaim-migrate @ 1563] modifying buddy lists doesn't exactly work. but it's somewhat closer. at least it occasionally changes. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 09 Mar 2001 12:34:39 +0000
parents d64101dc5c7e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
347
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /* Message catalogs for internationalization.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 any later version.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 GNU General Public License for more details.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 /* Because on some systems (e.g. Solaris) we sometimes have to include
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 the systems libintl.h as well as this file we have more complex
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20 include protection above. But the systems header might perhaps also
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 define _LIBINTL_H and therefore we have to protect the definition here. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 #if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 #ifndef _LIBINTL_H
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25 # define _LIBINTL_H 1
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 #define _LIBGETTEXT_H 1
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 /* We define an additional symbol to signal that we use the GNU
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 implementation of gettext. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31 #define __USE_GNU_GETTEXT 1
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 #include <sys/types.h>
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 #if HAVE_LOCALE_H
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 # include <locale.h>
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40 #ifdef __cplusplus
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 extern "C" {
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 /* @@ end of prolog @@ */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46 #ifndef PARAMS
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47 # if __STDC__ || defined __cplusplus
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 # define PARAMS(args) args
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49 # else
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 # define PARAMS(args) ()
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 # endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54 #ifndef NULL
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55 # if !defined __cplusplus || defined __GNUC__
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
56 # define NULL ((void *) 0)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57 # else
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58 # define NULL (0)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59 # endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 #if !HAVE_LC_MESSAGES
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63 /* This value determines the behaviour of the gettext() and dgettext()
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 function. But some system does not have this defined. Define it
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65 to a default value. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66 # define LC_MESSAGES (-1)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
69
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
70 /* Declarations for gettext-using-catgets interface. Derived from
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
71 Jim Meyering's libintl.h. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72 struct _msg_ent
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73 {
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74 const char *_msg;
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75 int _msg_number;
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 };
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79 #if HAVE_CATGETS
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
80 /* These two variables are defined in the automatically by po-to-tbl.sed
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81 generated file `cat-id-tbl.c'. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
82 extern const struct _msg_ent _msg_tbl[];
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
83 extern int _msg_tbl_length;
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
84 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87 /* For automatical extraction of messages sometimes no real
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88 translation is needed. Instead the string itself is the result. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
89 #define gettext_noop(Str) (Str)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91 /* Look up MSGID in the current default message catalog for the current
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
92 LC_MESSAGES locale. If not found, returns MSGID itself (the default
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 text). */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
94 extern char *gettext PARAMS ((const char *__msgid));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 extern char *gettext__ PARAMS ((const char *__msgid));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 /* Look up MSGID in the DOMAINNAME message catalog for the current
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 LC_MESSAGES locale. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99 extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 extern char *dgettext__ PARAMS ((const char *__domainname,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
101 const char *__msgid));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
102
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
103 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
104 locale. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
105 extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
106 int __category));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 extern char *dcgettext__ PARAMS ((const char *__domainname,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
108 const char *__msgid, int __category));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
109
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
110
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
111 /* Set the current default message catalog to DOMAINNAME.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
112 If DOMAINNAME is null, return the current default.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
113 If DOMAINNAME is "", reset to the default of "messages". */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
114 extern char *textdomain PARAMS ((const char *__domainname));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 extern char *textdomain__ PARAMS ((const char *__domainname));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
116
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
117 /* Specify that the DOMAINNAME message catalog will be found
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
118 in DIRNAME rather than in the system locale data base. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
119 extern char *bindtextdomain PARAMS ((const char *__domainname,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
120 const char *__dirname));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
121 extern char *bindtextdomain__ PARAMS ((const char *__domainname,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
122 const char *__dirname));
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
123
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
124 #if ENABLE_NLS
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
125
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
126 /* Solaris 2.3 has the gettext function but dcgettext is missing.
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
127 So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128 has dcgettext. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
129 # if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
130
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
131 # define gettext(Msgid) \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
132 dgettext (NULL, Msgid)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
133
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
134 # define dgettext(Domainname, Msgid) \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
135 dcgettext (Domainname, Msgid, LC_MESSAGES)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
136
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
137 # if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
138 /* This global variable is defined in loadmsgcat.c. We need a sign,
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
139 whether a new catalog was loaded, which can be associated with all
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
140 translations. */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
141 extern int _nl_msg_cat_cntr;
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
142
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
143 # define dcgettext(Domainname, Msgid, Category) \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
144 (__extension__ \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
145 ({ \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
146 char *__result; \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
147 if (__builtin_constant_p (Msgid)) \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
148 { \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
149 static char *__translation__; \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
150 static int __catalog_counter__; \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
151 if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
152 { \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
153 __translation__ = \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
154 dcgettext__ (Domainname, Msgid, Category); \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
155 __catalog_counter__ = _nl_msg_cat_cntr; \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
156 } \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
157 __result = __translation__; \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
158 } \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
159 else \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
160 __result = dcgettext__ (Domainname, Msgid, Category); \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
161 __result; \
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
162 }))
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
163 # endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
164 # endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
165
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
166 #else
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
167
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
168 # define gettext(Msgid) (Msgid)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
169 # define dgettext(Domainname, Msgid) (Msgid)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
170 # define dcgettext(Domainname, Msgid, Category) (Msgid)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
171 # define textdomain(Domainname) ((char *) Domainname)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
172 # define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
173
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
174 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
175
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
176 /* @@ begin of epilog @@ */
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
177
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
178 #ifdef __cplusplus
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
179 }
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
180 #endif
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
181
d64101dc5c7e [gaim-migrate @ 357]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
182 #endif