annotate intl/intl-compat.c @ 717:97a262a5534d trunk

[svn] - convert to objective make
author nenolod
date Sun, 26 Feb 2006 20:27:45 -0800
parents cb178e5ad177
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 Library.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify it
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 under the terms of the GNU Library General Public License as published
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 by the Free Software Foundation; either version 2, or (at your option)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 Library General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 License along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 USA. */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 #ifdef HAVE_CONFIG_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 # include <config.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 #include "gettextP.h"
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 /* @@ end of prolog @@ */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 /* This file redirects the gettext functions (without prefix) to those
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 defined in the included GNU libintl library (with "libintl_" prefix).
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 It is compiled into libintl in order to make the AM_GNU_GETTEXT test
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 has the redirections primarily in the <libintl.h> include file.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 It is also compiled into libgnuintl so that libgnuintl.so can be used
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 as LD_PRELOADable library on glibc systems, to provide the extra
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 features that the functions in the libc don't have (namely, logging). */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 #undef gettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 #undef dgettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 #undef dcgettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41 #undef ngettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 #undef dngettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 #undef dcngettext
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 #undef textdomain
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 #undef bindtextdomain
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 #undef bind_textdomain_codeset
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 /* When building a DLL, we must export some functions. Note that because
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 the functions are only defined for binary backward compatibility, we
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 don't need to use __declspec(dllimport) in any case. */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 #if defined _MSC_VER && BUILDING_DLL
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 # define DLL_EXPORTED __declspec(dllexport)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 #else
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 # define DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 #endif
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 gettext (msgid)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 const char *msgid;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 return libintl_gettext (msgid);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 dgettext (domainname, msgid)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 const char *msgid;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 return libintl_dgettext (domainname, msgid);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 dcgettext (domainname, msgid, category)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82 const char *msgid;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 int category;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 return libintl_dcgettext (domainname, msgid, category);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
91 ngettext (msgid1, msgid2, n)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92 const char *msgid1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
93 const char *msgid2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
94 unsigned long int n;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
95 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
96 return libintl_ngettext (msgid1, msgid2, n);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
97 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
98
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
99
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
100 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
101 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
102 dngettext (domainname, msgid1, msgid2, n)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
103 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
104 const char *msgid1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
105 const char *msgid2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
106 unsigned long int n;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
107 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
108 return libintl_dngettext (domainname, msgid1, msgid2, n);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
109 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
110
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
111
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
112 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
113 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
114 dcngettext (domainname, msgid1, msgid2, n, category)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
115 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
116 const char *msgid1;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
117 const char *msgid2;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
118 unsigned long int n;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
119 int category;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
120 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
121 return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
122 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
123
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
124
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
125 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
126 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
127 textdomain (domainname)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
128 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
129 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
130 return libintl_textdomain (domainname);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
131 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
132
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
133
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
134 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
135 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
136 bindtextdomain (domainname, dirname)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
137 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
138 const char *dirname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
139 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
140 return libintl_bindtextdomain (domainname, dirname);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
141 }
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
142
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
143
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
144 DLL_EXPORTED
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
145 char *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
146 bind_textdomain_codeset (domainname, codeset)
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
147 const char *domainname;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
148 const char *codeset;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
149 {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
150 return libintl_bind_textdomain_codeset (domainname, codeset);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
151 }