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