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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [binutils-2.20.1/] [intl/] [libgnuintl.h] - Diff between revs 816 and 818

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

Rev 816 Rev 818
/* Message catalogs for internationalization.
/* Message catalogs for internationalization.
   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
   Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
 
 
   This program is free software; you can redistribute it and/or modify it
   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU Library General Public License as published
   under the terms of the GNU Library General Public License as published
   by the Free Software Foundation; either version 2, or (at your option)
   by 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 GNU
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.
   Library General Public License for more details.
 
 
   You should have received a copy of the GNU Library General Public
   You should have received a copy of the GNU Library General Public
   License along with this program; if not, write to the Free Software
   License along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
   USA.  */
   USA.  */
 
 
#ifndef _LIBINTL_H
#ifndef _LIBINTL_H
#define _LIBINTL_H      1
#define _LIBINTL_H      1
 
 
#include <locale.h>
#include <locale.h>
 
 
/* The LC_MESSAGES locale category is the category used by the functions
/* The LC_MESSAGES locale category is the category used by the functions
   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.
   On systems that don't define it, use an arbitrary value instead.
   On systems that don't define it, use an arbitrary value instead.
   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
   then includes <libintl.h> (i.e. this file!) and then only defines
   then includes <libintl.h> (i.e. this file!) and then only defines
   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES
   in this case.  */
   in this case.  */
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
# define LC_MESSAGES 1729
# define LC_MESSAGES 1729
#endif
#endif
 
 
/* We define an additional symbol to signal that we use the GNU
/* We define an additional symbol to signal that we use the GNU
   implementation of gettext.  */
   implementation of gettext.  */
#define __USE_GNU_GETTEXT 1
#define __USE_GNU_GETTEXT 1
 
 
/* Provide information about the supported file formats.  Returns the
/* Provide information about the supported file formats.  Returns the
   maximum minor revision number supported for a given major revision.  */
   maximum minor revision number supported for a given major revision.  */
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
  ((major) == 0 ? 1 : -1)
  ((major) == 0 ? 1 : -1)
 
 
/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes
   precedence over _conio_gettext.  */
   precedence over _conio_gettext.  */
#ifdef __DJGPP__
#ifdef __DJGPP__
# undef gettext
# undef gettext
#endif
#endif
 
 
/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
   used by programs.  Similarly, test __PROTOTYPES, not PROTOTYPES.  */
   used by programs.  Similarly, test __PROTOTYPES, not PROTOTYPES.  */
#ifndef _INTL_PARAMS
#ifndef _INTL_PARAMS
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
#  define _INTL_PARAMS(args) args
#  define _INTL_PARAMS(args) args
# else
# else
#  define _INTL_PARAMS(args) ()
#  define _INTL_PARAMS(args) ()
# endif
# endif
#endif
#endif
 
 
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
#endif
 
 
 
 
/* We redirect the functions to those prefixed with "libintl_".  This is
/* We redirect the functions to those prefixed with "libintl_".  This is
   necessary, because some systems define gettext/textdomain/... in the C
   necessary, because some systems define gettext/textdomain/... in the C
   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
   If we used the unprefixed names, there would be cases where the
   If we used the unprefixed names, there would be cases where the
   definition in the C library would override the one in the libintl.so
   definition in the C library would override the one in the libintl.so
   shared library.  Recall that on ELF systems, the symbols are looked
   shared library.  Recall that on ELF systems, the symbols are looked
   up in the following order:
   up in the following order:
     1. in the executable,
     1. in the executable,
     2. in the shared libraries specified on the link command line, in order,
     2. in the shared libraries specified on the link command line, in order,
     3. in the dependencies of the shared libraries specified on the link
     3. in the dependencies of the shared libraries specified on the link
        command line,
        command line,
     4. in the dlopen()ed shared libraries, in the order in which they were
     4. in the dlopen()ed shared libraries, in the order in which they were
        dlopen()ed.
        dlopen()ed.
   The definition in the C library would override the one in libintl.so if
   The definition in the C library would override the one in libintl.so if
   either
   either
     * -lc is given on the link command line and -lintl isn't, or
     * -lc is given on the link command line and -lintl isn't, or
     * -lc is given on the link command line before -lintl, or
     * -lc is given on the link command line before -lintl, or
     * libintl.so is a dependency of a dlopen()ed shared library but not
     * libintl.so is a dependency of a dlopen()ed shared library but not
       linked to the executable at link time.
       linked to the executable at link time.
   Since Solaris gettext() behaves differently than GNU gettext(), this
   Since Solaris gettext() behaves differently than GNU gettext(), this
   would be unacceptable.
   would be unacceptable.
 
 
   The redirection happens by default through macros in C, so that &gettext
   The redirection happens by default through macros in C, so that &gettext
   is independent of the compilation unit, but through inline functions in
   is independent of the compilation unit, but through inline functions in
   C++, in order not to interfere with the name mangling of class fields or
   C++, in order not to interfere with the name mangling of class fields or
   class methods called 'gettext'.  */
   class methods called 'gettext'.  */
 
 
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
   If he doesn't, we choose the method.  A third possible method is
   If he doesn't, we choose the method.  A third possible method is
   _INTL_REDIRECT_ASM, supported only by GCC.  */
   _INTL_REDIRECT_ASM, supported only by GCC.  */
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
#  define _INTL_REDIRECT_ASM
#  define _INTL_REDIRECT_ASM
# else
# else
#  ifdef __cplusplus
#  ifdef __cplusplus
#   define _INTL_REDIRECT_INLINE
#   define _INTL_REDIRECT_INLINE
#  else
#  else
#   define _INTL_REDIRECT_MACROS
#   define _INTL_REDIRECT_MACROS
#  endif
#  endif
# endif
# endif
#endif
#endif
/* Auxiliary macros.  */
/* Auxiliary macros.  */
#ifdef _INTL_REDIRECT_ASM
#ifdef _INTL_REDIRECT_ASM
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
# define _INTL_STRINGIFY(prefix) #prefix
# define _INTL_STRINGIFY(prefix) #prefix
#else
#else
# define _INTL_ASM(cname)
# define _INTL_ASM(cname)
#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).  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_gettext (const char *__msgid);
extern char *libintl_gettext (const char *__msgid);
static inline char *gettext (const char *__msgid)
static inline char *gettext (const char *__msgid)
{
{
  return libintl_gettext (__msgid);
  return libintl_gettext (__msgid);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define gettext libintl_gettext
# define gettext libintl_gettext
#endif
#endif
extern char *gettext _INTL_PARAMS ((const char *__msgid))
extern char *gettext _INTL_PARAMS ((const char *__msgid))
       _INTL_ASM (libintl_gettext);
       _INTL_ASM (libintl_gettext);
#endif
#endif
 
 
/* Look up MSGID in the DOMAINNAME message catalog for the current
/* Look up MSGID in the DOMAINNAME message catalog for the current
   LC_MESSAGES locale.  */
   LC_MESSAGES locale.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
static inline char *dgettext (const char *__domainname, const char *__msgid)
static inline char *dgettext (const char *__domainname, const char *__msgid)
{
{
  return libintl_dgettext (__domainname, __msgid);
  return libintl_dgettext (__domainname, __msgid);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define dgettext libintl_dgettext
# define dgettext libintl_dgettext
#endif
#endif
extern char *dgettext _INTL_PARAMS ((const char *__domainname,
extern char *dgettext _INTL_PARAMS ((const char *__domainname,
                                     const char *__msgid))
                                     const char *__msgid))
       _INTL_ASM (libintl_dgettext);
       _INTL_ASM (libintl_dgettext);
#endif
#endif
 
 
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
   locale.  */
   locale.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
                                int __category);
                                int __category);
static inline char *dcgettext (const char *__domainname, const char *__msgid,
static inline char *dcgettext (const char *__domainname, const char *__msgid,
                               int __category)
                               int __category)
{
{
  return libintl_dcgettext (__domainname, __msgid, __category);
  return libintl_dcgettext (__domainname, __msgid, __category);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define dcgettext libintl_dcgettext
# define dcgettext libintl_dcgettext
#endif
#endif
extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
                                      const char *__msgid,
                                      const char *__msgid,
                                      int __category))
                                      int __category))
       _INTL_ASM (libintl_dcgettext);
       _INTL_ASM (libintl_dcgettext);
#endif
#endif
 
 
 
 
/* Similar to `gettext' but select the plural form corresponding to the
/* Similar to `gettext' but select the plural form corresponding to the
   number N.  */
   number N.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
                               unsigned long int __n);
                               unsigned long int __n);
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
                              unsigned long int __n)
                              unsigned long int __n)
{
{
  return libintl_ngettext (__msgid1, __msgid2, __n);
  return libintl_ngettext (__msgid1, __msgid2, __n);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define ngettext libintl_ngettext
# define ngettext libintl_ngettext
#endif
#endif
extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
                                     const char *__msgid2,
                                     const char *__msgid2,
                                     unsigned long int __n))
                                     unsigned long int __n))
       _INTL_ASM (libintl_ngettext);
       _INTL_ASM (libintl_ngettext);
#endif
#endif
 
 
/* Similar to `dgettext' but select the plural form corresponding to the
/* Similar to `dgettext' but select the plural form corresponding to the
   number N.  */
   number N.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
                                const char *__msgid2, unsigned long int __n);
                                const char *__msgid2, unsigned long int __n);
static inline char *dngettext (const char *__domainname, const char *__msgid1,
static inline char *dngettext (const char *__domainname, const char *__msgid1,
                               const char *__msgid2, unsigned long int __n)
                               const char *__msgid2, unsigned long int __n)
{
{
  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define dngettext libintl_dngettext
# define dngettext libintl_dngettext
#endif
#endif
extern char *dngettext _INTL_PARAMS ((const char *__domainname,
extern char *dngettext _INTL_PARAMS ((const char *__domainname,
                                      const char *__msgid1,
                                      const char *__msgid1,
                                      const char *__msgid2,
                                      const char *__msgid2,
                                      unsigned long int __n))
                                      unsigned long int __n))
       _INTL_ASM (libintl_dngettext);
       _INTL_ASM (libintl_dngettext);
#endif
#endif
 
 
/* Similar to `dcgettext' but select the plural form corresponding to the
/* Similar to `dcgettext' but select the plural form corresponding to the
   number N.  */
   number N.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcngettext (const char *__domainname,
extern char *libintl_dcngettext (const char *__domainname,
                                 const char *__msgid1, const char *__msgid2,
                                 const char *__msgid1, const char *__msgid2,
                                 unsigned long int __n, int __category);
                                 unsigned long int __n, int __category);
static inline char *dcngettext (const char *__domainname,
static inline char *dcngettext (const char *__domainname,
                                const char *__msgid1, const char *__msgid2,
                                const char *__msgid1, const char *__msgid2,
                                unsigned long int __n, int __category)
                                unsigned long int __n, int __category)
{
{
  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define dcngettext libintl_dcngettext
# define dcngettext libintl_dcngettext
#endif
#endif
extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
                                       const char *__msgid1,
                                       const char *__msgid1,
                                       const char *__msgid2,
                                       const char *__msgid2,
                                       unsigned long int __n,
                                       unsigned long int __n,
                                       int __category))
                                       int __category))
       _INTL_ASM (libintl_dcngettext);
       _INTL_ASM (libintl_dcngettext);
#endif
#endif
 
 
 
 
/* Set the current default message catalog to DOMAINNAME.
/* Set the current default message catalog to DOMAINNAME.
   If DOMAINNAME is null, return the current default.
   If DOMAINNAME is null, return the current default.
   If DOMAINNAME is "", reset to the default of "messages".  */
   If DOMAINNAME is "", reset to the default of "messages".  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_textdomain (const char *__domainname);
extern char *libintl_textdomain (const char *__domainname);
static inline char *textdomain (const char *__domainname)
static inline char *textdomain (const char *__domainname)
{
{
  return libintl_textdomain (__domainname);
  return libintl_textdomain (__domainname);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define textdomain libintl_textdomain
# define textdomain libintl_textdomain
#endif
#endif
extern char *textdomain _INTL_PARAMS ((const char *__domainname))
extern char *textdomain _INTL_PARAMS ((const char *__domainname))
       _INTL_ASM (libintl_textdomain);
       _INTL_ASM (libintl_textdomain);
#endif
#endif
 
 
/* Specify that the DOMAINNAME message catalog will be found
/* Specify that the DOMAINNAME message catalog will be found
   in DIRNAME rather than in the system locale data base.  */
   in DIRNAME rather than in the system locale data base.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bindtextdomain (const char *__domainname,
extern char *libintl_bindtextdomain (const char *__domainname,
                                     const char *__dirname);
                                     const char *__dirname);
static inline char *bindtextdomain (const char *__domainname,
static inline char *bindtextdomain (const char *__domainname,
                                    const char *__dirname)
                                    const char *__dirname)
{
{
  return libintl_bindtextdomain (__domainname, __dirname);
  return libintl_bindtextdomain (__domainname, __dirname);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define bindtextdomain libintl_bindtextdomain
# define bindtextdomain libintl_bindtextdomain
#endif
#endif
extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
                                           const char *__dirname))
                                           const char *__dirname))
       _INTL_ASM (libintl_bindtextdomain);
       _INTL_ASM (libintl_bindtextdomain);
#endif
#endif
 
 
/* Specify the character encoding in which the messages from the
/* Specify the character encoding in which the messages from the
   DOMAINNAME message catalog will be returned.  */
   DOMAINNAME message catalog will be returned.  */
#ifdef _INTL_REDIRECT_INLINE
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
                                              const char *__codeset);
                                              const char *__codeset);
static inline char *bind_textdomain_codeset (const char *__domainname,
static inline char *bind_textdomain_codeset (const char *__domainname,
                                             const char *__codeset)
                                             const char *__codeset)
{
{
  return libintl_bind_textdomain_codeset (__domainname, __codeset);
  return libintl_bind_textdomain_codeset (__domainname, __codeset);
}
}
#else
#else
#ifdef _INTL_REDIRECT_MACROS
#ifdef _INTL_REDIRECT_MACROS
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
#endif
#endif
extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
                                                    const char *__codeset))
                                                    const char *__codeset))
       _INTL_ASM (libintl_bind_textdomain_codeset);
       _INTL_ASM (libintl_bind_textdomain_codeset);
#endif
#endif
 
 
 
 
/* Support for relocatable packages.  */
/* Support for relocatable packages.  */
 
 
/* Sets the original and the current installation prefix of the package.
/* Sets the original and the current installation prefix of the package.
   Relocation simply replaces a pathname starting with the original prefix
   Relocation simply replaces a pathname starting with the original prefix
   by the corresponding pathname with the current prefix instead.  Both
   by the corresponding pathname with the current prefix instead.  Both
   prefixes should be directory names without trailing slash (i.e. use ""
   prefixes should be directory names without trailing slash (i.e. use ""
   instead of "/").  */
   instead of "/").  */
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
extern void
extern void
       libintl_set_relocation_prefix _INTL_PARAMS ((const char *orig_prefix,
       libintl_set_relocation_prefix _INTL_PARAMS ((const char *orig_prefix,
                                                    const char *curr_prefix));
                                                    const char *curr_prefix));
 
 
 
 
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
 
 
#endif /* libintl.h */
#endif /* libintl.h */
 
 

powered by: WebSVN 2.1.0

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