/* Message catalogs for internationalization.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
This file is derived from the file libgettext.h in the GNU gettext package.
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however.
-
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
__const char *__msgid, int __category) __THROW;
+/* Similar to `gettext' but select the plural form corresponding to the
+ number N. */
+extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
+ unsigned long int __n)
+ __THROW __attribute__ ((__format_arg__ (1)));
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+ number N. */
+extern char *dngettext (__const char *__domainname, __const char *__msgid1,
+ __const char *__msgid2, unsigned long int __n)
+ __THROW __attribute__ ((__format_arg__ (2)));
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+ number N. */
+extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
+ __const char *__msgid2, unsigned long int __n,
+ int __category)
+ __THROW __attribute__ ((__format_arg__ (2)));
+
+
/* 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 *bindtextdomain (__const char *__domainname,
__const char *__dirname) __THROW;
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+extern char *bind_textdomain_codeset (__const char *__domainname,
+ __const char *__codeset) __THROW;
+
/* Optimized version of the function above. */
#if defined __OPTIMIZE__
# define dgettext(domainname, msgid) \
dcgettext (domainname, msgid, LC_MESSAGES)
-# if __GLIBC__ >= 2 && __GNUC_PREREQ (2,7)
-/* Variable defined in loadmsgcat.c which gets incremented every time a
- new catalog is loaded. */
-extern int _nl_msg_cat_cntr;
-
-# define dcgettext(domainname, msgid, category) \
- (__extension__ \
- ({ \
- char *__result; \
- if (__builtin_constant_p (msgid)) \
- { \
- static char *__translation__; \
- static int __catalog_counter__; \
- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
- { \
- __translation__ = \
- __dcgettext ((domainname), (msgid), (category)); \
- __catalog_counter__ = _nl_msg_cat_cntr; \
- } \
- __result = __translation__; \
- } \
- else \
- __result = __dcgettext ((domainname), (msgid), (category)); \
- __result; \
- }))
-# endif
-#endif /* Optimizing. */
+# define ngettext(msgid, n) dngettext (NULL, msgid, n)
+
+# define dngettext(domainname, msgid, n) \
+ dcngettext (domainname, msgid, n, LC_MESSAGES)
+#endif /* Optimizing. */
__END_DECLS