X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fopintl.h;h=d19b66449eeafc0ca6ddde913a28aa46c4c5f793;hb=5a84f3e0d225c671f13d8571f035283012dc6448;hp=87f1d26f9c40d3b388e42b4f9ef295407b319e6e;hpb=072aa625aac207da53d3a5ad7d1415b03a5a8c9e;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/opintl.h b/opcodes/opintl.h index 87f1d26f9c..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 @@ -11,24 +11,32 @@ 02111-1307, USA. */ #ifdef ENABLE_NLS -#include -#define _(String) gettext (String) -#ifdef gettext_noop -#define N_(String) gettext_noop (String) -#else -#define N_(String) (String) -#endif +# include +/* 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 _(String) (String) -#define N_(String) (String) -/* In this case we don't care about the value. */ -#ifndef LC_MESSAGES -#define LC_MESSAGES 0 -#endif +# 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) #endif