rosfran@57: /* Convenience header for conditional use of GNU . rosfran@57: Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. rosfran@57: rosfran@57: This program is free software; you can redistribute it and/or modify it rosfran@57: under the terms of the GNU Library General Public License as published rosfran@57: by the Free Software Foundation; either version 2, or (at your option) rosfran@57: any later version. rosfran@57: rosfran@57: This program is distributed in the hope that it will be useful, rosfran@57: but WITHOUT ANY WARRANTY; without even the implied warranty of rosfran@57: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU rosfran@57: Library General Public License for more details. rosfran@57: rosfran@57: You should have received a copy of the GNU Library General Public rosfran@57: License along with this program; if not, write to the Free Software rosfran@57: Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, rosfran@57: USA. */ rosfran@57: rosfran@57: #ifndef _LIBGETTEXT_H rosfran@57: #define _LIBGETTEXT_H 1 rosfran@57: rosfran@57: /* NLS can be disabled through the configure --disable-nls option. */ rosfran@57: #if ENABLE_NLS rosfran@57: rosfran@57: /* Get declarations of GNU message catalog functions. */ rosfran@57: # include rosfran@57: rosfran@57: #else rosfran@57: rosfran@57: /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which rosfran@57: chokes if dcgettext is defined as a macro. So include it now, to make rosfran@57: later inclusions of a NOP. We don't include rosfran@57: as well because people using "gettext.h" will not include , rosfran@57: and also including would fail on SunOS 4, whereas rosfran@57: is OK. */ rosfran@57: #if defined(__sun) rosfran@57: # include rosfran@57: #endif rosfran@57: rosfran@57: /* Disabled NLS. rosfran@57: The casts to 'const char *' serve the purpose of producing warnings rosfran@57: for invalid uses of the value returned from these functions. rosfran@57: On pre-ANSI systems without 'const', the config.h file is supposed to rosfran@57: contain "#define const". */ rosfran@57: # define gettext(Msgid) ((const char *) (Msgid)) rosfran@57: # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) rosfran@57: # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) rosfran@57: # define ngettext(Msgid1, Msgid2, N) \ rosfran@57: ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) rosfran@57: # define dngettext(Domainname, Msgid1, Msgid2, N) \ rosfran@57: ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) rosfran@57: # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ rosfran@57: ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) rosfran@57: # define textdomain(Domainname) ((const char *) (Domainname)) rosfran@57: # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) rosfran@57: # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) rosfran@57: rosfran@57: #endif rosfran@57: rosfran@57: /* A pseudo function call that serves as a marker for the automated rosfran@57: extraction of messages, but does not call gettext(). The run-time rosfran@57: translation is done at a different place in the code. rosfran@57: The argument, String, should be a literal string. Concatenated strings rosfran@57: and other string expressions won't work. rosfran@57: The macro's expansion is not parenthesized, so that it is suitable as rosfran@57: initializer for static 'char[]' or 'const char[]' variables. */ rosfran@57: #define gettext_noop(String) String rosfran@57: rosfran@57: #endif /* _LIBGETTEXT_H */