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