summaryrefslogtreecommitdiffstats
path: root/intl/libgettext.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-01-22 12:53:10 +0000
committerBruno Haible <bruno@clisp.org>2001-01-22 12:53:10 +0000
commitcc5960a0ef886784891b4c1a7316c1659b73a7b6 (patch)
tree01eb863630f5faa4d1af3dcafd97a353d23021ee /intl/libgettext.h
parent2769926e6e7cac7d7020bd38be90ff2fd4cbb602 (diff)
downloadexternal_gettext-cc5960a0ef886784891b4c1a7316c1659b73a7b6.zip
external_gettext-cc5960a0ef886784891b4c1a7316c1659b73a7b6.tar.gz
external_gettext-cc5960a0ef886784891b4c1a7316c1659b73a7b6.tar.bz2
Rename intlh.inst.in to libgnuintl.h.
libgettext.h is now merely a convenience header, not used inside libintl.
Diffstat (limited to 'intl/libgettext.h')
-rw-r--r--intl/libgettext.h152
1 files changed, 10 insertions, 142 deletions
diff --git a/intl/libgettext.h b/intl/libgettext.h
index 3834a08..553382c 100644
--- a/intl/libgettext.h
+++ b/intl/libgettext.h
@@ -1,4 +1,4 @@
-/* Message catalogs for internationalization.
+/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -15,144 +15,14 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* Because on some systems (e.g. Solaris) we sometimes have to include
- the systems libintl.h as well as this file we have more complex
- include protection above. But the systems header might perhaps also
- define _LIBINTL_H and therefore we have to protect the definition here. */
-
-#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
-#ifndef _LIBINTL_H
-# define _LIBINTL_H 1
-#endif
-#define _LIBGETTEXT_H 1
-
-/* We define an additional symbol to signal that we use the GNU
- implementation of gettext. */
-#define __USE_GNU_GETTEXT 1
-
-#include <sys/types.h>
-#include <locale.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__ || defined __cplusplus
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef NULL
-# if !defined __cplusplus || defined __GNUC__
-# define NULL ((void *) 0)
-# else
-# define NULL (0)
-# endif
-#endif
-
-#if !HAVE_LC_MESSAGES
-/* This value determines the behaviour of the gettext() and dgettext()
- function. But some system does not have this defined. Define it
- to a default value. */
-# define LC_MESSAGES (-1)
-#endif
-
-
-/* For automatical extraction of messages sometimes no real
- translation is needed. Instead the string itself is the result. */
-#define gettext_noop(Str) (Str)
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-extern char *gettext PARAMS ((const char *__msgid));
-extern char *gettext__ PARAMS ((const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- LC_MESSAGES locale. */
-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
-extern char *dgettext__ PARAMS ((const char *__domainname,
- const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
- int __category));
-extern char *dcgettext__ PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-
-
-/* Similar to `gettext' but select the plural form corresponding to the
- number N. */
-extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-
-/* Similar to `dgettext' but select the plural form corresponding to the
- number N. */
-extern char *dngettext PARAMS ((const char *__domainname, 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));
-
-/* Similar to `dcgettext' but select the plural form corresponding to the
- number N. */
-extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
- const char *__msgid2, unsigned long int __n,
- int __category));
-extern char *dcngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-extern char *textdomain PARAMS ((const char *__domainname));
-extern char *textdomain__ PARAMS ((const char *__domainname));
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-extern char *bindtextdomain PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
- const char *__dirname));
-
-/* Specify the character encoding in which the messages from the
- DOMAINNAME message catalog will be returned. */
-extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
- const char *__codeset));
-extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
- const char *__codeset));
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
-/* Solaris 2.3 has the gettext function but dcgettext is missing.
- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
- has dcgettext. */
-# if !HAVE_GETTEXT || HAVE_DCGETTEXT
-
-# define gettext(Msgid) \
- dgettext (NULL, Msgid)
-
-# define dgettext(Domainname, Msgid) \
- dcgettext (Domainname, Msgid, LC_MESSAGES)
-
-# define ngettext(Msgid1, Msgid2, N) \
- dngettext (NULL, Msgid1, Msgid2, N)
-
-# define dngettext(Domainname, Msgid1, Msgid2, N) \
- dcngettext (Domainname, Msgid1, Msgid2, N, LC_MESSAGES)
-
-# endif
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
#else
@@ -171,10 +41,8 @@ extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
#endif
-/* @@ begin of epilog @@ */
-
-#ifdef __cplusplus
-}
-#endif
+/* For automatical extraction of messages sometimes no real
+ translation is needed. Instead the string itself is the result. */
+#define gettext_noop(Str) (Str)
-#endif
+#endif /* _LIBGETTEXT_H */