OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [intl/] [gettext.c] - Diff between revs 578 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.