opintl.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* opintl.h - opcodes specific header for gettext code.
  2. Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
  3. Written by Tom Tromey <tromey@cygnus.com>
  4. This file is part of the opcodes library used by GAS and the GNU binutils.
  5. You should have received a copy of the GNU General Public License
  6. along with GAS; see the file COPYING. If not, write to the Free
  7. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  8. 02110-1301, USA. */
  9. #ifdef ENABLE_NLS
  10. # include <libintl.h>
  11. /* Note the use of dgetext() and PACKAGE here, rather than gettext().
  12. This is because the code in this directory is used to build a library which
  13. will be linked with code in other directories to form programs. We want to
  14. maintain a seperate translation file for this directory however, rather
  15. than being forced to merge it with that of any program linked to
  16. libopcodes. This is a library, so it cannot depend on the catalog
  17. currently loaded.
  18. In order to do this, we have to make sure that when we extract messages we
  19. use the OPCODES domain rather than the domain of the program that included
  20. the opcodes library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String)
  21. and define PACKAGE to be 'opcodes'. (See the code in configure). */
  22. # define _(String) dgettext (PACKAGE, String)
  23. # ifdef gettext_noop
  24. # define N_(String) gettext_noop (String)
  25. # else
  26. # define N_(String) (String)
  27. # endif
  28. #else
  29. # define gettext(Msgid) (Msgid)
  30. # define dgettext(Domainname, Msgid) (Msgid)
  31. # define dcgettext(Domainname, Msgid, Category) (Msgid)
  32. # define textdomain(Domainname) while (0) /* nothing */
  33. # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
  34. # define _(String) (String)
  35. # define N_(String) (String)
  36. #endif