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