Blame intl/gettext.c

Packit Service a721b1
/* Implementation of gettext(3) function.
Packit Service a721b1
   Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
Packit Service a721b1
Packit Service a721b1
   This program is free software; you can redistribute it and/or modify it
Packit Service a721b1
   under the terms of the GNU Library General Public License as published
Packit Service a721b1
   by the Free Software Foundation; either version 2, or (at your option)
Packit Service a721b1
   any later version.
Packit Service a721b1
Packit Service a721b1
   This program is distributed in the hope that it will be useful,
Packit Service a721b1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a721b1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a721b1
   Library General Public License for more details.
Packit Service a721b1
Packit Service a721b1
   You should have received a copy of the GNU Library General Public
Packit Service a721b1
   License along with this program; if not, write to the Free Software
Packit Service a721b1
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Packit Service a721b1
   USA.  */
Packit Service a721b1
Packit Service a721b1
#ifdef HAVE_CONFIG_H
Packit Service a721b1
# include <config.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
# define __need_NULL
Packit Service a721b1
# include <stddef.h>
Packit Service a721b1
#else
Packit Service a721b1
# include <stdlib.h>		/* Just for NULL.  */
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#include "gettextP.h"
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
# include <libintl.h>
Packit Service a721b1
#else
Packit Service a721b1
# include "libgnuintl.h"
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* @@ end of prolog @@ */
Packit Service a721b1
Packit Service a721b1
/* Names for the libintl functions are a problem.  They must not clash
Packit Service a721b1
   with existing names and they should follow ANSI C.  But this source
Packit Service a721b1
   code is also used in GNU C Library where the names have a __
Packit Service a721b1
   prefix.  So we have to make a difference here.  */
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
# define GETTEXT __gettext
Packit Service a721b1
# define DCGETTEXT INTUSE(__dcgettext)
Packit Service a721b1
#else
Packit Service a721b1
# define GETTEXT libintl_gettext
Packit Service a721b1
# define DCGETTEXT libintl_dcgettext
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* Look up MSGID in the current default message catalog for the current
Packit Service a721b1
   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
Packit Service a721b1
   text).  */
Packit Service a721b1
char *
Packit Service a721b1
GETTEXT (const char *msgid)
Packit Service a721b1
{
Packit Service a721b1
  return DCGETTEXT (NULL, msgid, LC_MESSAGES);
Packit Service a721b1
}
Packit Service a721b1
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
/* Alias for function name in GNU C Library.  */
Packit Service a721b1
weak_alias (__gettext, gettext);
Packit Service a721b1
#endif