Back to index

cell-binutils  2.17cvs20070401
opintl.h
Go to the documentation of this file.
00001 /* opintl.h - opcodes specific header for gettext code.
00002    Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
00003 
00004    Written by Tom Tromey <tromey@cygnus.com>
00005 
00006    This file is part of the opcodes library used by GAS and the GNU binutils.
00007 
00008    You should have received a copy of the GNU General Public License
00009    along with GAS; see the file COPYING.  If not, write to the Free
00010    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00011    02110-1301, USA. */
00012 
00013 #ifdef ENABLE_NLS
00014 # include <libintl.h>
00015 /* Note the use of dgetext() and PACKAGE here, rather than gettext().
00016    
00017    This is because the code in this directory is used to build a library which
00018    will be linked with code in other directories to form programs.  We want to
00019    maintain a seperate translation file for this directory however, rather
00020    than being forced to merge it with that of any program linked to
00021    libopcodes.  This is a library, so it cannot depend on the catalog
00022    currently loaded.
00023 
00024    In order to do this, we have to make sure that when we extract messages we
00025    use the OPCODES domain rather than the domain of the program that included
00026    the opcodes library, (eg OBJDUMP).  Hence we use dgettext (PACKAGE, String)
00027    and define PACKAGE to be 'opcodes'.  (See the code in configure).  */
00028 # define _(String) dgettext (PACKAGE, String)
00029 # ifdef gettext_noop
00030 #  define N_(String) gettext_noop (String)
00031 # else
00032 #  define N_(String) (String)
00033 # endif
00034 #else
00035 # define gettext(Msgid) (Msgid)
00036 # define dgettext(Domainname, Msgid) (Msgid)
00037 # define dcgettext(Domainname, Msgid, Category) (Msgid)
00038 # define textdomain(Domainname) while (0) /* nothing */
00039 # define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
00040 # define _(String) (String)
00041 # define N_(String) (String)
00042 #endif