1 /* Header describing internals of gettext library
2 Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
3 Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
24 # include "../iconv/gconv_int.h"
33 /* @@ end of prolog @@ */
37 # define PARAMS(args) args
39 # define PARAMS(args) ()
43 #ifndef internal_function
44 # define internal_function
47 /* Tell the compiler when a conditional or integer expression is
48 almost always true or almost always false. */
49 #ifndef HAVE_BUILTIN_EXPECT
50 # define __builtin_expect(expr, val) (expr)
54 # define W(flag, data) ((flag) ? SWAP (data) : (data))
59 # include <byteswap.h>
60 # define SWAP(i) bswap_32 (i)
62 static nls_uint32 SWAP PARAMS ((nls_uint32 i));
64 static inline nls_uint32
68 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
73 /* This is the representation of the expressions to determine the
79 var, /* The variable "n". */
80 num, /* Decimal number. */
81 mult, /* Multiplication. */
82 divide, /* Division. */
83 module, /* Module operation. */
85 minus, /* Subtraction. */
86 equal, /* Comparision for equality. */
87 not_equal, /* Comparision for inequality. */
88 land, /* Logical AND. */
89 lor, /* Logical OR. */
90 qmop /* Question mark operator. */
94 unsigned long int num; /* Number value for `num'. */
97 struct expression *left; /* Left expression in binary operation. */
98 struct expression *right; /* Right expression in binary operation. */
102 struct expression *bexp; /* Boolean expression in ?: operation. */
103 struct expression *tbranch; /* True-branch in ?: operation. */
104 struct expression *fbranch; /* False-branch in ?: operation. */
109 /* This is the data structure to pass information to the parser and get
110 the result in a thread-safe way. */
114 struct expression *res;
125 struct string_desc *orig_tab;
126 struct string_desc *trans_tab;
127 nls_uint32 hash_size;
128 nls_uint32 *hash_tab;
138 struct expression *plural;
139 unsigned long int nplurals;
144 struct binding *next;
153 extern int _nl_msg_cat_cntr;
155 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
157 const char *__domainname))
159 void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
161 void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
165 extern char *__ngettext PARAMS ((const char *msgid1, const char *msgid2,
166 unsigned long int n));
167 extern char *__dngettext PARAMS ((const char *domainname, const char *msgid1,
168 const char *msgid2, unsigned long int n));
169 extern char *__dcngettext PARAMS ((const char *domainname, const char *msgid1,
170 const char *msgid2, unsigned long int n,
172 extern char *__dcigettext PARAMS ((const char *domainname, const char *msgid1,
173 const char *msgid2, int plural,
174 unsigned long int n, int category));
176 extern char *ngettext__ PARAMS ((const char *msgid1, const char *msgid2,
177 unsigned long int n));
178 extern char *dngettext__ PARAMS ((const char *domainname, const char *msgid1,
179 const char *msgid2, unsigned long int n));
180 extern char *dcngettext__ PARAMS ((const char *domainname, const char *msgid1,
181 const char *msgid2, unsigned long int n,
183 extern char *dcigettext__ PARAMS ((const char *domainname, const char *msgid1,
184 const char *msgid2, int plural,
185 unsigned long int n, int category));
188 extern int __gettextdebug;
189 extern void __gettext_free_exp (struct expression *exp) internal_function;
190 extern int __gettextparse (void *arg);
192 /* @@ begin of epilog @@ */
194 #endif /* gettextP.h */