1*404b540aSrobert /* Implementation of the dngettext(3) function.
2*404b540aSrobert Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
3*404b540aSrobert
4*404b540aSrobert This program is free software; you can redistribute it and/or modify it
5*404b540aSrobert under the terms of the GNU Library General Public License as published
6*404b540aSrobert by the Free Software Foundation; either version 2, or (at your option)
7*404b540aSrobert any later version.
8*404b540aSrobert
9*404b540aSrobert This program is distributed in the hope that it will be useful,
10*404b540aSrobert but WITHOUT ANY WARRANTY; without even the implied warranty of
11*404b540aSrobert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12*404b540aSrobert Library General Public License for more details.
13*404b540aSrobert
14*404b540aSrobert You should have received a copy of the GNU Library General Public
15*404b540aSrobert License along with this program; if not, write to the Free Software
16*404b540aSrobert Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
17*404b540aSrobert USA. */
18*404b540aSrobert
19*404b540aSrobert #ifdef HAVE_CONFIG_H
20*404b540aSrobert # include <config.h>
21*404b540aSrobert #endif
22*404b540aSrobert
23*404b540aSrobert #include "gettextP.h"
24*404b540aSrobert
25*404b540aSrobert #include <locale.h>
26*404b540aSrobert
27*404b540aSrobert #ifdef _LIBC
28*404b540aSrobert # include <libintl.h>
29*404b540aSrobert #else
30*404b540aSrobert # include "libgnuintl.h"
31*404b540aSrobert #endif
32*404b540aSrobert
33*404b540aSrobert /* @@ end of prolog @@ */
34*404b540aSrobert
35*404b540aSrobert /* Names for the libintl functions are a problem. They must not clash
36*404b540aSrobert with existing names and they should follow ANSI C. But this source
37*404b540aSrobert code is also used in GNU C Library where the names have a __
38*404b540aSrobert prefix. So we have to make a difference here. */
39*404b540aSrobert #ifdef _LIBC
40*404b540aSrobert # define DNGETTEXT __dngettext
41*404b540aSrobert # define DCNGETTEXT __dcngettext
42*404b540aSrobert #else
43*404b540aSrobert # define DNGETTEXT libintl_dngettext
44*404b540aSrobert # define DCNGETTEXT libintl_dcngettext
45*404b540aSrobert #endif
46*404b540aSrobert
47*404b540aSrobert /* Look up MSGID in the DOMAINNAME message catalog of the current
48*404b540aSrobert LC_MESSAGES locale and skip message according to the plural form. */
49*404b540aSrobert char *
DNGETTEXT(domainname,msgid1,msgid2,n)50*404b540aSrobert DNGETTEXT (domainname, msgid1, msgid2, n)
51*404b540aSrobert const char *domainname;
52*404b540aSrobert const char *msgid1;
53*404b540aSrobert const char *msgid2;
54*404b540aSrobert unsigned long int n;
55*404b540aSrobert {
56*404b540aSrobert return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
57*404b540aSrobert }
58*404b540aSrobert
59*404b540aSrobert #ifdef _LIBC
60*404b540aSrobert /* Alias for function name in GNU C Library. */
61*404b540aSrobert weak_alias (__dngettext, dngettext);
62*404b540aSrobert #endif
63