~ubuntu-branches/ubuntu/hardy/gnupg2/hardy

« back to all changes in this revision

Viewing changes to intl/gettextP.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia, Michael Bienia, Kees Cook
  • Date: 2006-12-07 00:28:23 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20061207002823-0i7ittrpmsm1nv0i
Tags: 2.0.1-0ubuntu1
[ Michael Bienia ]
* New upstream version.
* Remaining changes:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).
* g10/encr-data.c: remotely controllable function pointer (CVE-2006-6235)
* debian/control: add libcurl3-gnutls-dev to build-depends 
  (Closes Ubuntu: #62864)

[ Kees Cook ]
* debian/rules: include doc/ files as done with gnupg

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Header describing internals of libintl library.
2
 
   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
 
2
   Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
3
3
   Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
4
4
 
5
5
   This program is free software; you can redistribute it and/or modify it
14
14
 
15
15
   You should have received a copy of the GNU Library General Public
16
16
   License along with this program; if not, write to the Free Software
17
 
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
17
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18
18
   USA.  */
19
19
 
20
20
#ifndef _GETTEXTP_H
30
30
# endif
31
31
#endif
32
32
 
 
33
#ifdef _LIBC
 
34
extern char *__gettext (const char *__msgid);
 
35
extern char *__dgettext (const char *__domainname, const char *__msgid);
 
36
extern char *__dcgettext (const char *__domainname, const char *__msgid,
 
37
                          int __category);
 
38
extern char *__ngettext (const char *__msgid1, const char *__msgid2,
 
39
                         unsigned long int __n);
 
40
extern char *__dngettext (const char *__domainname,
 
41
                          const char *__msgid1, const char *__msgid2,
 
42
                          unsigned long int n);
 
43
extern char *__dcngettext (const char *__domainname,
 
44
                           const char *__msgid1, const char *__msgid2,
 
45
                           unsigned long int __n, int __category);
 
46
extern char *__dcigettext (const char *__domainname,
 
47
                           const char *__msgid1, const char *__msgid2,
 
48
                           int __plural, unsigned long int __n,
 
49
                           int __category);
 
50
extern char *__textdomain (const char *__domainname);
 
51
extern char *__bindtextdomain (const char *__domainname,
 
52
                               const char *__dirname);
 
53
extern char *__bind_textdomain_codeset (const char *__domainname,
 
54
                                        const char *__codeset);
 
55
extern void _nl_finddomain_subfreeres (void) attribute_hidden;
 
56
extern void _nl_unload_domain (struct loaded_domain *__domain)
 
57
     internal_function attribute_hidden;
 
58
#else
 
59
/* Declare the exported libintl_* functions, in a way that allows us to
 
60
   call them under their real name.  */
 
61
# undef _INTL_REDIRECT_INLINE
 
62
# undef _INTL_REDIRECT_MACROS
 
63
# define _INTL_REDIRECT_MACROS
 
64
# include "libgnuintl.h"
 
65
# ifdef IN_LIBGLOCALE
 
66
extern char *gl_dcigettext (const char *__domainname,
 
67
                            const char *__msgid1, const char *__msgid2,
 
68
                            int __plural, unsigned long int __n,
 
69
                            int __category,
 
70
                            const char *__localename, const char *__encoding);
 
71
# else
 
72
extern char *libintl_dcigettext (const char *__domainname,
 
73
                                 const char *__msgid1, const char *__msgid2,
 
74
                                 int __plural, unsigned long int __n,
 
75
                                 int __category);
 
76
# endif
 
77
#endif
 
78
 
33
79
#include "loadinfo.h"
34
80
 
35
81
#include "gmo.h"                /* Get nls_uint32.  */
77
123
  const char *pointer;
78
124
};
79
125
 
 
126
/* Cache of translated strings after charset conversion.
 
127
   Note: The strings are converted to the target encoding only on an as-needed
 
128
   basis.  */
 
129
struct converted_domain
 
130
{
 
131
  /* The target encoding name.  */
 
132
  const char *encoding;
 
133
  /* The descriptor for conversion from the message catalog's encoding to
 
134
     this target encoding.  */
 
135
#ifdef _LIBC
 
136
  __gconv_t conv;
 
137
#else
 
138
# if HAVE_ICONV
 
139
  iconv_t conv;
 
140
# endif
 
141
#endif
 
142
  /* The table of translated strings after charset conversion.  */
 
143
  char **conv_tab;
 
144
};
 
145
 
80
146
/* The representation of an opened message catalog.  */
81
147
struct loaded_domain
82
148
{
112
178
  /* 1 if the hash table uses a different endianness than this machine.  */
113
179
  int must_swap_hash_tab;
114
180
 
115
 
  int codeset_cntr;
116
 
#ifdef _LIBC
117
 
  __gconv_t conv;
118
 
#else
119
 
# if HAVE_ICONV
120
 
  iconv_t conv;
121
 
# endif
122
 
#endif
123
 
  char **conv_tab;
 
181
  /* Cache of charset conversions of the translated strings.  */
 
182
  struct converted_domain *conversions;
 
183
  size_t nconversions;
124
184
 
125
185
  struct expression *plural;
126
186
  unsigned long int nplurals;
140
200
{
141
201
  struct binding *next;
142
202
  char *dirname;
143
 
  int codeset_cntr;     /* Incremented each time codeset changes.  */
144
203
  char *codeset;
145
204
  char domainname[ZERO];
146
205
};
148
207
/* A counter which is incremented each time some previous translations
149
208
   become invalid.
150
209
   This variable is part of the external ABI of the GNU libintl.  */
151
 
extern int _nl_msg_cat_cntr;
 
210
#ifdef IN_LIBGLOCALE
 
211
# include <glocale/config.h>
 
212
extern LIBGLOCALE_DLL_EXPORTED int _nl_msg_cat_cntr;
 
213
#else
 
214
extern LIBINTL_DLL_EXPORTED int _nl_msg_cat_cntr;
 
215
#endif
152
216
 
153
217
#ifndef _LIBC
 
218
const char *_nl_language_preferences_default (void);
 
219
const char *_nl_locale_name_posix (int category, const char *categoryname);
 
220
const char *_nl_locale_name_default (void);
154
221
const char *_nl_locale_name (int category, const char *categoryname);
155
222
#endif
156
223
 
161
228
void _nl_load_domain (struct loaded_l10nfile *__domain,
162
229
                      struct binding *__domainbinding)
163
230
     internal_function;
164
 
void _nl_unload_domain (struct loaded_domain *__domain)
165
 
     internal_function;
166
 
const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
167
 
                                  struct loaded_domain *__domain,
168
 
                                  struct binding *__domainbinding)
169
 
     internal_function;
170
 
void _nl_free_domain_conv (struct loaded_domain *__domain)
171
 
     internal_function;
172
231
 
 
232
#ifdef IN_LIBGLOCALE
 
233
char *_nl_find_msg (struct loaded_l10nfile *domain_file,
 
234
                    struct binding *domainbinding, const char *encoding,
 
235
                    const char *msgid,
 
236
                    size_t *lengthp)
 
237
     internal_function;
 
238
#else
173
239
char *_nl_find_msg (struct loaded_l10nfile *domain_file,
174
240
                    struct binding *domainbinding, const char *msgid,
175
 
                    size_t *lengthp)
 
241
                    int convert, size_t *lengthp)
176
242
     internal_function;
177
 
 
178
 
#ifdef _LIBC
179
 
extern char *__gettext (const char *__msgid);
180
 
extern char *__dgettext (const char *__domainname, const char *__msgid);
181
 
extern char *__dcgettext (const char *__domainname, const char *__msgid,
182
 
                          int __category);
183
 
extern char *__ngettext (const char *__msgid1, const char *__msgid2,
184
 
                         unsigned long int __n);
185
 
extern char *__dngettext (const char *__domainname,
186
 
                          const char *__msgid1, const char *__msgid2,
187
 
                          unsigned long int n);
188
 
extern char *__dcngettext (const char *__domainname,
189
 
                           const char *__msgid1, const char *__msgid2,
190
 
                           unsigned long int __n, int __category);
191
 
extern char *__dcigettext (const char *__domainname,
192
 
                           const char *__msgid1, const char *__msgid2,
193
 
                           int __plural, unsigned long int __n,
194
 
                           int __category);
195
 
extern char *__textdomain (const char *__domainname);
196
 
extern char *__bindtextdomain (const char *__domainname,
197
 
                               const char *__dirname);
198
 
extern char *__bind_textdomain_codeset (const char *__domainname,
199
 
                                        const char *__codeset);
200
 
#else
201
 
/* Declare the exported libintl_* functions, in a way that allows us to
202
 
   call them under their real name.  */
203
 
# undef _INTL_REDIRECT_INLINE
204
 
# undef _INTL_REDIRECT_MACROS
205
 
# define _INTL_REDIRECT_MACROS
206
 
# include "libgnuintl.h"
207
 
extern char *libintl_dcigettext (const char *__domainname,
208
 
                                 const char *__msgid1, const char *__msgid2,
209
 
                                 int __plural, unsigned long int __n,
210
 
                                 int __category);
211
243
#endif
212
244
 
213
245
/* @@ begin of epilog @@ */