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