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