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