Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* opintl.h - opcodes specific header for gettext code. |
9b201bb5 | 2 | Copyright 1998, 1999, 2000, 2007 Free Software Foundation, Inc. |
252b5132 RH |
3 | |
4 | Written by Tom Tromey <tromey@cygnus.com> | |
5 | ||
9b201bb5 NC |
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. | |
252b5132 RH |
17 | |
18 | You should have received a copy of the GNU General Public License | |
9b201bb5 NC |
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. */ | |
252b5132 RH |
22 | |
23 | #ifdef ENABLE_NLS | |
24 | # include <libintl.h> | |
c0ae4ccc NC |
25 | /* Note the use of dgetext() and PACKAGE here, rather than gettext(). |
26 | ||
27 | This is because the code in this directory is used to build a library which | |
28 | will be linked with code in other directories to form programs. We want to | |
29 | maintain a seperate translation file for this directory however, rather | |
30 | than being forced to merge it with that of any program linked to | |
31 | libopcodes. This is a library, so it cannot depend on the catalog | |
32 | currently loaded. | |
33 | ||
34 | In order to do this, we have to make sure that when we extract messages we | |
35 | use the OPCODES domain rather than the domain of the program that included | |
36 | the opcodes library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String) | |
37 | and define PACKAGE to be 'opcodes'. (See the code in configure). */ | |
bb088521 | 38 | # define _(String) dgettext (PACKAGE, String) |
252b5132 RH |
39 | # ifdef gettext_noop |
40 | # define N_(String) gettext_noop (String) | |
41 | # else | |
42 | # define N_(String) (String) | |
43 | # endif | |
44 | #else | |
c1485d85 NC |
45 | # define gettext(Msgid) (Msgid) |
46 | # define dgettext(Domainname, Msgid) (Msgid) | |
47 | # define dcgettext(Domainname, Msgid, Category) (Msgid) | |
48 | # define textdomain(Domainname) while (0) /* nothing */ | |
49 | # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ | |
252b5132 RH |
50 | # define _(String) (String) |
51 | # define N_(String) (String) | |
52 | #endif |