diff options
author | Bruno Haible <bruno@clisp.org> | 2000-06-16 18:35:02 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2000-06-16 18:35:02 +0000 |
commit | 9e638edc87d705d6b24e402a292e7d0dee9d297f (patch) | |
tree | 0699501e41a865c7bbe1c0e1f61ec50e9bd31057 /intl/intlh.inst.in | |
parent | 0946c585b62a1c599f93433531c322b3979c4d58 (diff) | |
download | external_gettext-9e638edc87d705d6b24e402a292e7d0dee9d297f.zip external_gettext-9e638edc87d705d6b24e402a292e7d0dee9d297f.tar.gz external_gettext-9e638edc87d705d6b24e402a292e7d0dee9d297f.tar.bz2 |
Keep the ngettext, dngettext, dcngettext, dcgettext declarations in synch
with libintl.glibc.
Diffstat (limited to 'intl/intlh.inst.in')
-rw-r--r-- | intl/intlh.inst.in | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/intl/intlh.inst.in b/intl/intlh.inst.in index e666b49..d263024 100644 --- a/intl/intlh.inst.in +++ b/intl/intlh.inst.in @@ -1,5 +1,5 @@ /* Message catalogs for internationalization. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,6 +51,23 @@ 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)); + +/* 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)); + +/* 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)); + + /* 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". */ @@ -73,33 +90,12 @@ extern char *bindtextdomain PARAMS ((const char *__domainname, # define dgettext(domainname, msgid) \ dcgettext (domainname, msgid, LC_MESSAGES) -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -/* This global variable is defined in loadmsgcat.c. We need a sign, - whether a new catalog was loaded, which can be associated with all - translations. */ -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 +# define ngettext(msgid, N) \ + dngettext (NULL, msgid, N) + +# define dngettext(domainname, msgid, n) \ + dcngettext (domainname, msgid, n, LC_MESSAGES) + #endif /* Optimizing. */ |