X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fopintl.h;h=d19b66449eeafc0ca6ddde913a28aa46c4c5f793;hb=5a84f3e0d225c671f13d8571f035283012dc6448;hp=8a5203f73ba0d931ff7a7b54b53b299ffbb1d30e;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/opintl.h b/opcodes/opintl.h index 8a5203f73b..d19b66449e 100644 --- a/opcodes/opintl.h +++ b/opcodes/opintl.h @@ -1,5 +1,5 @@ /* opintl.h - opcodes specific header for gettext code. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Written by Tom Tromey @@ -12,23 +12,31 @@ #ifdef ENABLE_NLS # include -# define _(String) gettext (String) +/* Note the use of dgetext() and PACKAGE here, rather than gettext(). + + This is because the code in this directory is used to build a library which + will be linked with code in other directories to form programs. We want to + maintain a seperate translation file for this directory however, rather + than being forced to merge it with that of any program linked to + libopcodes. This is a library, so it cannot depend on the catalog + currently loaded. + + In order to do this, we have to make sure that when we extract messages we + use the OPCODES domain rather than the domain of the program that included + the opcodes library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String) + and define PACKAGE to be 'opcodes'. (See the code in configure). */ +# define _(String) dgettext (PACKAGE, String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) while (0) /* nothing */ +# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ # define _(String) (String) # define N_(String) (String) -/* In this case we don't care about the value. */ -# ifndef LC_MESSAGES -# define LC_MESSAGES 0 -# endif #endif