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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [intl/] [dgettext.c] - Diff between revs 579 and 1765

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

Rev 579 Rev 1765
/* dgettext.c -- implementation of the dgettext(3) function
/* dgettext.c -- implementation of the dgettext(3) function
   Copyright (C) 1995 Software Foundation, Inc.
   Copyright (C) 1995 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
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
Foundation, 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
 
 
#if defined HAVE_LOCALE_H || defined _LIBC
#if defined HAVE_LOCALE_H || defined _LIBC
# include <locale.h>
# include <locale.h>
#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 DGETTEXT __dgettext
# define DGETTEXT __dgettext
# define DCGETTEXT __dcgettext
# define DCGETTEXT __dcgettext
#else
#else
# define DGETTEXT dgettext__
# define DGETTEXT dgettext__
# define DCGETTEXT dcgettext__
# define DCGETTEXT dcgettext__
#endif
#endif
 
 
/* Look up MSGID in the DOMAINNAME message catalog of the current
/* Look up MSGID in the DOMAINNAME message catalog of the current
   LC_MESSAGES locale.  */
   LC_MESSAGES locale.  */
char *
char *
DGETTEXT (domainname, msgid)
DGETTEXT (domainname, msgid)
     const char *domainname;
     const char *domainname;
     const char *msgid;
     const char *msgid;
{
{
  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
}
}
 
 
#ifdef _LIBC
#ifdef _LIBC
/* Alias for function name in GNU C Library.  */
/* Alias for function name in GNU C Library.  */
weak_alias (__dgettext, dgettext);
weak_alias (__dgettext, dgettext);
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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