* intl/gmo.h: ... here.
* intl/Makefile (distribute): Add gmo.h, remove gettext.h.
* intl/gettextP.h: Update.
* intl/loadmsgcat.c: Update.
* intl/gettextP.h (PARAMS): Make more portable.
(attribute_hidden): Define as empty macro if not already defined.
* intl/hash-string.h (PARAMS): Make more portable.
* intl/loadinfo.h (PARAMS): Likewise.
* intl/plural-exp.h (PARAMS): Likewise.
(attribute_hidden): Move definition near the definition of
internal_function.
* intl/gettextP.h (_nl_locale_name) [!_LIBC]: New declaration.
* intl/plural-exp.h (plural_eval) [!_LIBC]: New declaration.
2002-07-13 Bruno Haible <bruno@clisp.org>
* intl/dcigettext.c (freea): New macro.
(FREE_BLOCKS): Free also the registered blocks.
(DCIGETTEXT): Free the 'search' variable.
Reported by Andreas Fischer <a.fischer@asentics.de>.
2002-04-27 Bruno Haible <bruno@clisp.org>
* intl/gettextP.h [! _LIBC]: Use prefix libintl_ instead of suffix __.
* intl/dcigettext.c: Likewise.
* intl/dcgettext.c: Likewise.
* intl/dgettext.c: Likewise.
* intl/gettext.c: Likewise.
* intl/dcngettext.c: Likewise.
* intl/dngettext.c: Likewise.
* intl/ngettext.c: Likewise.
* intl/textdomain.c: Likewise.
* intl/bindtextdom.c: Likewise.
* intl/plural-exp.h: Likewise.
2002-01-02 Bruno Haible <bruno@clisp.org>
* intl/loadmsgcat.c (_nl_init_domain_conv): Use PARAMS in extern decl.
2001-04-30 Bruno Haible <bruno@clisp.org>
* intl/dcigettext.c (getuid, getgid, geteuid, getegid): Provide
default macro definitions. Needed for mingw32.
+2002-12-11 Bruno Haible <bruno@clisp.org>
+
+ * intl/gettext.h: Renamed to ...
+ * intl/gmo.h: ... here.
+ * intl/Makefile (distribute): Add gmo.h, remove gettext.h.
+ * intl/gettextP.h: Update.
+ * intl/loadmsgcat.c: Update.
+
+ * intl/gettextP.h (PARAMS): Make more portable.
+ (attribute_hidden): Define as empty macro if not already defined.
+ * intl/hash-string.h (PARAMS): Make more portable.
+ * intl/loadinfo.h (PARAMS): Likewise.
+ * intl/plural-exp.h (PARAMS): Likewise.
+ (attribute_hidden): Move definition near the definition of
+ internal_function.
+
+ * intl/gettextP.h (_nl_locale_name) [!_LIBC]: New declaration.
+ * intl/plural-exp.h (plural_eval) [!_LIBC]: New declaration.
+
+2002-07-13 Bruno Haible <bruno@clisp.org>
+
+ * intl/dcigettext.c (freea): New macro.
+ (FREE_BLOCKS): Free also the registered blocks.
+ (DCIGETTEXT): Free the 'search' variable.
+ Reported by Andreas Fischer <a.fischer@asentics.de>.
+
+2002-04-27 Bruno Haible <bruno@clisp.org>
+
+ * intl/gettextP.h [! _LIBC]: Use prefix libintl_ instead of suffix __.
+ * intl/dcigettext.c: Likewise.
+ * intl/dcgettext.c: Likewise.
+ * intl/dgettext.c: Likewise.
+ * intl/gettext.c: Likewise.
+ * intl/dcngettext.c: Likewise.
+ * intl/dngettext.c: Likewise.
+ * intl/ngettext.c: Likewise.
+ * intl/textdomain.c: Likewise.
+ * intl/bindtextdom.c: Likewise.
+ * intl/plural-exp.h: Likewise.
+
+2002-01-02 Bruno Haible <bruno@clisp.org>
+
+ * intl/loadmsgcat.c (_nl_init_domain_conv): Use PARAMS in extern decl.
+
+2001-04-30 Bruno Haible <bruno@clisp.org>
+
+ * intl/dcigettext.c (getuid, getgid, geteuid, getegid): Provide
+ default macro definitions. Needed for mingw32.
+
2002-12-10 Ulrich Drepper <drepper@redhat.com>
* sysdeps/i386/bits/byteswap.h (__bswap_64): Apply
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
# define strdup(str) __strdup (str)
# endif
#else
-# define BINDTEXTDOMAIN bindtextdomain__
-# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
#endif
/* Prototypes for local functions. */
# define DCGETTEXT __dcgettext
# define DCIGETTEXT __dcigettext
#else
-# define DCGETTEXT dcgettext__
-# define DCIGETTEXT dcigettext__
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
some additional code emulating it. */
#ifdef HAVE_ALLOCA
/* Nothing has to be done. */
+# define freea(p) /* nothing */
# define ADD_BLOCK(list, address) /* nothing */
# define FREE_BLOCKS(list) /* nothing */
#else
while (list != NULL) { \
struct block_list *old = list; \
list = list->next; \
+ free (old->address); \
free (old); \
} \
} while (0)
# undef alloca
# define alloca(size) (malloc (size))
+# define freea(p) free (p)
#endif /* have alloca */
#ifdef _LIBC
# define DCIGETTEXT __dcigettext
#else
-# define DCIGETTEXT dcigettext__
+# define DCIGETTEXT libintl_dcigettext
#endif
/* Lock variable to protect the global data in the gettext implementation. */
# define ENABLE_SECURE __libc_enable_secure
# define DETERMINE_SECURE
#else
+# ifndef HAVE_GETUID
+# define getuid() 0
+# endif
+# ifndef HAVE_GETGID
+# define getgid() 0
+# endif
+# ifndef HAVE_GETEUID
+# define geteuid() getuid()
+# endif
+# ifndef HAVE_GETEGID
+# define getegid() getgid()
+# endif
static int enable_secure;
# define ENABLE_SECURE (enable_secure == 1)
# define DETERMINE_SECURE \
search->category = category;
foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+ freea (search);
if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
{
/* Now deal with plural. */
# define DCNGETTEXT __dcngettext
# define DCIGETTEXT __dcigettext
#else
-# define DCNGETTEXT dcngettext__
-# define DCIGETTEXT dcigettext__
+# define DCNGETTEXT libintl_dcngettext
+# define DCIGETTEXT libintl_dcigettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
# define DGETTEXT __dgettext
# define DCGETTEXT INTUSE(__dcgettext)
#else
-# define DGETTEXT dgettext__
-# define DCGETTEXT dcgettext__
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
# define DNGETTEXT __dngettext
# define DCNGETTEXT __dcngettext
#else
-# define DNGETTEXT dngettext__
-# define DCNGETTEXT dcngettext__
+# define DNGETTEXT libintl_dngettext
+# define DCNGETTEXT libintl_dcngettext
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
# define GETTEXT __gettext
# define DCGETTEXT INTUSE(__dcgettext)
#else
-# define GETTEXT gettext__
-# define DCGETTEXT dcgettext__
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
#endif
/* Look up MSGID in the current default message catalog for the current
#include "loadinfo.h"
-#include "gettext.h" /* Get nls_uint32. */
+#include "gmo.h" /* Get nls_uint32. */
/* @@ end of prolog @@ */
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# define internal_function
#endif
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
/* Tell the compiler when a conditional or integer expression is
almost always true or almost always false. */
#ifndef HAVE_BUILTIN_EXPECT
This variable is part of the external ABI of the GNU libintl. */
extern int _nl_msg_cat_cntr;
+#ifndef _LIBC
+const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
+#endif
+
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
char *__locale,
const char *__domainname,
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
const char *__codeset));
#else
-extern char *gettext__ PARAMS ((const char *__msgid));
-extern char *dgettext__ PARAMS ((const char *__domainname,
- const char *__msgid));
-extern char *dcgettext__ PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dcngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-extern char *dcigettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- int __plural, unsigned long int __n,
- int __category));
-extern char *textdomain__ PARAMS ((const char *__domainname));
-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
- const char *__codeset));
+extern char *libintl_gettext PARAMS ((const char *__msgid));
+extern char *libintl_dgettext PARAMS ((const char *__domainname,
+ const char *__msgid));
+extern char *libintl_dcgettext PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+extern char *libintl_ngettext PARAMS ((const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
+extern char *libintl_dngettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
+extern char *libintl_dcngettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n,
+ int __category));
+extern char *libintl_dcigettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ int __plural, unsigned long int __n,
+ int __category));
+extern char *libintl_textdomain PARAMS ((const char *__domainname));
+extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname,
+ const char *__codeset));
#endif
/* @@ begin of epilog @@ */
/* @@ end of prolog @@ */
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
#ifndef _LOADINFO_H
#define _LOADINFO_H 1
+/* Declarations of locale dependent catalog lookup functions.
+ Implemented in
+
+ localealias.c Possibly replace a locale name by another.
+ explodename.c Split a locale name into its various fields.
+ l10nflist.c Generate a list of filenames of possible message catalogs.
+ finddomain.c Find and open the relevant message catalogs.
+
+ The main function _nl_find_domain() in finddomain.c is declared
+ in gettextP.h.
+ */
+
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# include <inttypes.h>
#endif
-#include "gettext.h"
+#include "gmo.h"
#include "gettextP.h"
#include "hash-string.h"
#include "plural-exp.h"
outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
# else
# if HAVE_ICONV
- extern const char *locale_charset (void);
+ extern const char *locale_charset PARAMS ((void));
outcharset = locale_charset ();
# endif
# endif
# define NGETTEXT __ngettext
# define DCNGETTEXT __dcngettext
#else
-# define NGETTEXT ngettext__
-# define DCNGETTEXT dcngettext__
+# define NGETTEXT libintl_ngettext
+# define DCNGETTEXT libintl_dcngettext
#endif
/* Look up MSGID in the current default message catalog for the current
#define _PLURAL_EXP_H
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# define internal_function
#endif
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
/* This is the representation of the expressions to determine the
plural form. */
# define GERMANIC_PLURAL __gettext_germanic_plural
# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
#elif defined (IN_LIBINTL)
-# define FREE_EXPRESSION gettext_free_exp__
-# define PLURAL_PARSE gettextparse__
-# define GERMANIC_PLURAL gettext_germanic_plural__
-# define EXTRACT_PLURAL_EXPRESSION gettext_extract_plural__
+# define FREE_EXPRESSION libintl_gettext_free_exp
+# define PLURAL_PARSE libintl_gettextparse
+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
#else
# define FREE_EXPRESSION free_plural_expression
# define PLURAL_PARSE parse_plural_expression
# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
#endif
-#ifndef attribute_hidden
-# define attribute_hidden
-#endif
-
extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
internal_function;
extern int PLURAL_PARSE PARAMS ((void *arg));
unsigned long int *npluralsp))
internal_function;
+#if !defined (_LIBC) && !defined (IN_LIBINTL)
+extern unsigned long int plural_eval PARAMS ((struct expression *pexp,
+ unsigned long int n));
+#endif
+
#endif /* _PLURAL_EXP_H */
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
#endif
/* @@ end of prolog @@ */
# define strdup(str) __strdup (str)
# endif
#else
-# define TEXTDOMAIN textdomain__
+# define TEXTDOMAIN libintl_textdomain
#endif
/* Lock variable to protect the global data in the gettext implementation. */