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