Back to index

glibc  2.9
dcgettext.c
Go to the documentation of this file.
00001 /* Implementation of the dcgettext(3) function.
00002    Copyright (C) 1995-2002, 2005 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifdef HAVE_CONFIG_H
00021 # include <config.h>
00022 #endif
00023 
00024 #include "gettextP.h"
00025 #ifdef _LIBC
00026 # include <libintl.h>
00027 #else
00028 # include "libgnuintl.h"
00029 #endif
00030 
00031 /* @@ end of prolog @@ */
00032 
00033 /* Names for the libintl functions are a problem.  They must not clash
00034    with existing names and they should follow ANSI C.  But this source
00035    code is also used in GNU C Library where the names have a __
00036    prefix.  So we have to make a difference here.  */
00037 #ifdef _LIBC
00038 # define DCGETTEXT __dcgettext
00039 # define DCIGETTEXT __dcigettext
00040 #else
00041 # define DCGETTEXT libintl_dcgettext
00042 # define DCIGETTEXT libintl_dcigettext
00043 #endif
00044 
00045 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
00046    locale.  */
00047 char *
00048 DCGETTEXT (domainname, msgid, category)
00049      const char *domainname;
00050      const char *msgid;
00051      int category;
00052 {
00053   return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
00054 }
00055 
00056 #ifdef _LIBC
00057 /* Alias for function name in GNU C Library.  */
00058 INTDEF(__dcgettext)
00059 weak_alias (__dcgettext, dcgettext);
00060 libc_hidden_def (__dcgettext)
00061 #endif