xref: /dflybsd-src/contrib/gdb-7/opcodes/opintl.h (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino /* opintl.h - opcodes specific header for gettext code.
2*86d7f5d3SJohn Marino    Copyright 1998, 1999, 2000, 2005, 2007, 2009 Free Software Foundation, Inc.
3*86d7f5d3SJohn Marino 
4*86d7f5d3SJohn Marino    Written by Tom Tromey <tromey@cygnus.com>
5*86d7f5d3SJohn Marino 
6*86d7f5d3SJohn Marino    This file is part of the GNU opcodes library.
7*86d7f5d3SJohn Marino 
8*86d7f5d3SJohn Marino    This library is free software; you can redistribute it and/or modify
9*86d7f5d3SJohn Marino    it under the terms of the GNU General Public License as published by
10*86d7f5d3SJohn Marino    the Free Software Foundation; either version 3, or (at your option)
11*86d7f5d3SJohn Marino    any later version.
12*86d7f5d3SJohn Marino 
13*86d7f5d3SJohn Marino    It is distributed in the hope that it will be useful, but WITHOUT
14*86d7f5d3SJohn Marino    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15*86d7f5d3SJohn Marino    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16*86d7f5d3SJohn Marino    License for more details.
17*86d7f5d3SJohn Marino 
18*86d7f5d3SJohn Marino    You should have received a copy of the GNU General Public License
19*86d7f5d3SJohn Marino    along with this file; see the file COPYING.  If not, write to the
20*86d7f5d3SJohn Marino    Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
21*86d7f5d3SJohn Marino    MA 02110-1301, USA.  */
22*86d7f5d3SJohn Marino 
23*86d7f5d3SJohn Marino #ifdef ENABLE_NLS
24*86d7f5d3SJohn Marino # include <libintl.h>
25*86d7f5d3SJohn Marino /* Note the use of dgetext() and PACKAGE here, rather than gettext().
26*86d7f5d3SJohn Marino 
27*86d7f5d3SJohn Marino    This is because the code in this directory is used to build a library which
28*86d7f5d3SJohn Marino    will be linked with code in other directories to form programs.  We want to
29*86d7f5d3SJohn Marino    maintain a seperate translation file for this directory however, rather
30*86d7f5d3SJohn Marino    than being forced to merge it with that of any program linked to
31*86d7f5d3SJohn Marino    libopcodes.  This is a library, so it cannot depend on the catalog
32*86d7f5d3SJohn Marino    currently loaded.
33*86d7f5d3SJohn Marino 
34*86d7f5d3SJohn Marino    In order to do this, we have to make sure that when we extract messages we
35*86d7f5d3SJohn Marino    use the OPCODES domain rather than the domain of the program that included
36*86d7f5d3SJohn Marino    the opcodes library, (eg OBJDUMP).  Hence we use dgettext (PACKAGE, String)
37*86d7f5d3SJohn Marino    and define PACKAGE to be 'opcodes'.  (See the code in configure).  */
38*86d7f5d3SJohn Marino # define _(String) dgettext (PACKAGE, String)
39*86d7f5d3SJohn Marino # ifdef gettext_noop
40*86d7f5d3SJohn Marino #  define N_(String) gettext_noop (String)
41*86d7f5d3SJohn Marino # else
42*86d7f5d3SJohn Marino #  define N_(String) (String)
43*86d7f5d3SJohn Marino # endif
44*86d7f5d3SJohn Marino #else
45*86d7f5d3SJohn Marino # define gettext(Msgid) (Msgid)
46*86d7f5d3SJohn Marino # define dgettext(Domainname, Msgid) (Msgid)
47*86d7f5d3SJohn Marino # define dcgettext(Domainname, Msgid, Category) (Msgid)
48*86d7f5d3SJohn Marino # define textdomain(Domainname) while (0) /* nothing */
49*86d7f5d3SJohn Marino # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
50*86d7f5d3SJohn Marino # define _(String) (String)
51*86d7f5d3SJohn Marino # define N_(String) (String)
52*86d7f5d3SJohn Marino #endif
53