Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/intl/libintl.glibc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /* libgettext.h -- Message catalogs for internationalization.
    2 Copyright (C) 1995 Free Software Foundation, Inc.
    3 This file is part of the GNU C Library.
    4 Contributed by Ulrich Drepper.
    5 This file is derived from the file libgettext.h in the GNU gettext package.
     1/* Message catalogs for internationalization.
     2   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
     3   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
     4   This file is derived from the file libgettext.h in the GNU gettext package.
    65
    7 The GNU C Library is free software; you can redistribute it and/or
    8 modify it under the terms of the GNU Library General Public License as
    9 published by the Free Software Foundation; either version 2 of the
    10 License, or (at your option) any later version.
     6   This file is part of the GNU C Library.  Its master source is NOT part of
     7   the C library, however.
    118
    12 The GNU C Library is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    15 Library General Public License for more details.
     9   The GNU C Library is free software; you can redistribute it and/or
     10   modify it under the terms of the GNU Library General Public License as
     11   published by the Free Software Foundation; either version 2 of the
     12   License, or (at your option) any later version.
    1613
    17 You should have received a copy of the GNU Library General Public
    18 License along with the GNU C Library; see the file COPYING.LIB.  If
    19 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    20 Boston, MA 02111-1307, USA.  */
     14   The GNU C Library is distributed in the hope that it will be useful,
     15   but WITHOUT ANY WARRANTY; without even the implied warranty of
     16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     17   Library General Public License for more details.
     18
     19   You should have received a copy of the GNU Library General Public
     20   License along with the GNU C Library; see the file COPYING.LIB.  If not,
     21   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
     22   Boston, MA 02111-1307, USA.  */
    2123
    2224#ifndef _LIBINTL_H
    2325#define _LIBINTL_H      1
     26
    2427#include <features.h>
    25 
    26 #include <locale.h>
    27 
    28 #define __need_NULL
    29 #include <stddef.h>
    3028
    3129/* We define an additional symbol to signal that we use the GNU
     
    7169
    7270/* Optimized version of the function above.  */
    73 #if defined __OPTIMIZED
    74 /* These must be a macro.  Inlined functions are useless because the
     71#if defined __OPTIMIZE__
     72
     73/* We need NULL for `gettext'.  */
     74# define __need_NULL
     75# include <stddef.h>
     76
     77/* We need LC_MESSAGES for `dgettext'.  */
     78# include <locale.h>
     79
     80/* These must be macros.  Inlined functions are useless because the
    7581   `__builtin_constant_p' predicate in dcgettext would always return
    7682   false.  */
     
    8288
    8389# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
     90/* Variable defined in loadmsgcat.c which gets incremented every time a
     91   new catalog is loaded.  */
     92extern int _nl_msg_cat_cntr;
     93
    8494#  define dcgettext(domainname, msgid, category)                              \
    8595  (__extension__                                                              \
    8696   ({                                                                         \
    87      char *result;                                                            \
     97     char *__result;                                                          \
    8898     if (__builtin_constant_p (msgid))                                        \
    8999       {                                                                      \
    90          extern int _nl_msg_cat_cntr;                                         \
    91100         static char *__translation__;                                        \
    92101         static int __catalog_counter__;                                      \
     
    97106             __catalog_counter__ = _nl_msg_cat_cntr;                          \
    98107           }                                                                  \
    99          result = __translation__;                                            \
     108         __result = __translation__;                                          \
    100109       }                                                                      \
    101110     else                                                                     \
    102        result = __dcgettext ((domainname), (msgid), (category));              \
    103      result;                                                                  \
     111       __result = __dcgettext ((domainname), (msgid), (category));            \
     112     __result;                                                                \
    104113    }))
    105114# endif
Note: See TracChangeset for help on using the changeset viewer.