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