11cc83814Sespie /* Implementation of the dcgettext(3) function.
2*a1acfa9bSespie Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
3840175f0Skstailey
43fb98d4aSespie This program is free software; you can redistribute it and/or modify it
53fb98d4aSespie under the terms of the GNU Library General Public License as published
63fb98d4aSespie by the Free Software Foundation; either version 2, or (at your option)
7840175f0Skstailey any later version.
8840175f0Skstailey
9840175f0Skstailey This program is distributed in the hope that it will be useful,
10840175f0Skstailey but WITHOUT ANY WARRANTY; without even the implied warranty of
113fb98d4aSespie MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
123fb98d4aSespie Library General Public License for more details.
13840175f0Skstailey
143fb98d4aSespie You should have received a copy of the GNU Library General Public
153fb98d4aSespie License along with this program; if not, write to the Free Software
163fb98d4aSespie Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
173fb98d4aSespie USA. */
18840175f0Skstailey
19840175f0Skstailey #ifdef HAVE_CONFIG_H
20840175f0Skstailey # include <config.h>
21840175f0Skstailey #endif
22840175f0Skstailey
23840175f0Skstailey #include "gettextP.h"
24840175f0Skstailey #ifdef _LIBC
25840175f0Skstailey # include <libintl.h>
26840175f0Skstailey #else
273fb98d4aSespie # include "libgnuintl.h"
28840175f0Skstailey #endif
29840175f0Skstailey
30840175f0Skstailey /* @@ end of prolog @@ */
31840175f0Skstailey
32840175f0Skstailey /* Names for the libintl functions are a problem. They must not clash
33840175f0Skstailey with existing names and they should follow ANSI C. But this source
34840175f0Skstailey code is also used in GNU C Library where the names have a __
35840175f0Skstailey prefix. So we have to make a difference here. */
36840175f0Skstailey #ifdef _LIBC
37840175f0Skstailey # define DCGETTEXT __dcgettext
383fb98d4aSespie # define DCIGETTEXT __dcigettext
39840175f0Skstailey #else
40*a1acfa9bSespie # define DCGETTEXT libintl_dcgettext
41*a1acfa9bSespie # define DCIGETTEXT libintl_dcigettext
42840175f0Skstailey #endif
43840175f0Skstailey
44840175f0Skstailey /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
45840175f0Skstailey locale. */
46840175f0Skstailey char *
DCGETTEXT(const char * domainname,const char * msgid,int category)47*a1acfa9bSespie DCGETTEXT (const char *domainname, const char *msgid, int category)
48840175f0Skstailey {
493fb98d4aSespie return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
50840175f0Skstailey }
51840175f0Skstailey
52840175f0Skstailey #ifdef _LIBC
53840175f0Skstailey /* Alias for function name in GNU C Library. */
54*a1acfa9bSespie INTDEF(__dcgettext)
55840175f0Skstailey weak_alias (__dcgettext, dcgettext);
56840175f0Skstailey #endif
57