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