1*16dce513Schristos /* Implementation of the dgettext(3) function.
2*16dce513Schristos Copyright (C) 1995-1997, 2000-2003 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
25*16dce513Schristos #include <locale.h>
26*16dce513Schristos
27*16dce513Schristos #ifdef _LIBC
28*16dce513Schristos # include <libintl.h>
29*16dce513Schristos #else
30*16dce513Schristos # include "libgnuintl.h"
31*16dce513Schristos #endif
32*16dce513Schristos
33*16dce513Schristos /* @@ end of prolog @@ */
34*16dce513Schristos
35*16dce513Schristos /* Names for the libintl functions are a problem. They must not clash
36*16dce513Schristos with existing names and they should follow ANSI C. But this source
37*16dce513Schristos code is also used in GNU C Library where the names have a __
38*16dce513Schristos prefix. So we have to make a difference here. */
39*16dce513Schristos #ifdef _LIBC
40*16dce513Schristos # define DGETTEXT __dgettext
41*16dce513Schristos # define DCGETTEXT INTUSE(__dcgettext)
42*16dce513Schristos #else
43*16dce513Schristos # define DGETTEXT libintl_dgettext
44*16dce513Schristos # define DCGETTEXT libintl_dcgettext
45*16dce513Schristos #endif
46*16dce513Schristos
47*16dce513Schristos /* Look up MSGID in the DOMAINNAME message catalog of the current
48*16dce513Schristos LC_MESSAGES locale. */
49*16dce513Schristos char *
DGETTEXT(domainname,msgid)50*16dce513Schristos DGETTEXT (domainname, msgid)
51*16dce513Schristos const char *domainname;
52*16dce513Schristos const char *msgid;
53*16dce513Schristos {
54*16dce513Schristos return DCGETTEXT (domainname, msgid, LC_MESSAGES);
55*16dce513Schristos }
56*16dce513Schristos
57*16dce513Schristos #ifdef _LIBC
58*16dce513Schristos /* Alias for function name in GNU C Library. */
59*16dce513Schristos weak_alias (__dgettext, dgettext);
60*16dce513Schristos #endif
61