(root)/
binutils-2.41/
opcodes/
opintl.h
       1  /* opintl.h - opcodes specific header for gettext code.
       2     Copyright (C) 1998-2023 Free Software Foundation, Inc.
       3  
       4     Written by Tom Tromey <tromey@cygnus.com>
       5  
       6     This file is part of the GNU opcodes library.
       7  
       8     This library is free software; you can redistribute it and/or modify
       9     it under the terms of the GNU General Public License as published by
      10     the Free Software Foundation; either version 3, or (at your option)
      11     any later version.
      12  
      13     It is distributed in the hope that it will be useful, but WITHOUT
      14     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
      15     or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      16     License for more details.
      17  
      18     You should have received a copy of the GNU General Public License
      19     along with this file; see the file COPYING.  If not, write to the
      20     Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
      21     MA 02110-1301, USA.  */
      22  
      23  #ifdef ENABLE_NLS
      24  # include <libintl.h>
      25  /* Note the redefinition of gettext and ngettext here to use PACKAGE.
      26  
      27     This is because the code in this directory is used to build a
      28     library which will be linked with code in other directories to form
      29     programs.  We want to maintain a separate translation file for this
      30     directory however, rather than being forced to merge it with that
      31     of any program linked to libopcodes.  This is a library, so it
      32     cannot depend on the catalog currently loaded.
      33  
      34     In order to do this, we have to make sure that when we extract
      35     messages we use the OPCODES domain rather than the domain of the
      36     program that included the opcodes library, (eg OBJDUMP).  Hence we
      37     use dgettext (PACKAGE, String) and define PACKAGE to be 'opcodes'.
      38     (See the code in configure).  */
      39  # undef gettext
      40  # define gettext(Msgid) dgettext (PACKAGE, Msgid)
      41  # undef ngettext
      42  # define ngettext(Msgid1, Msgid2, n) dngettext (PACKAGE, Msgid1, Msgid2, n)
      43  # define _(String) gettext (String)
      44  # ifdef gettext_noop
      45  #  define N_(String) gettext_noop (String)
      46  # else
      47  #  define N_(String) (String)
      48  # endif
      49  #else
      50  # define gettext(Msgid) (Msgid)
      51  # define dgettext(Domainname, Msgid) (Msgid)
      52  # define dcgettext(Domainname, Msgid, Category) (Msgid)
      53  # define ngettext(Msgid1, Msgid2, n) \
      54    (n == 1 ? Msgid1 : Msgid2)
      55  # define dngettext(Domainname, Msgid1, Msgid2, n) \
      56    (n == 1 ? Msgid1 : Msgid2)
      57  # define dcngettext(Domainname, Msgid1, Msgid2, n, Category) \
      58    (n == 1 ? Msgid1 : Msgid2)
      59  # define textdomain(Domainname) do {} while (0)
      60  # define bindtextdomain(Domainname, Dirname) do {} while (0)
      61  # define _(String) (String)
      62  # define N_(String) (String)
      63  #endif