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