gst-plugins-nuvdemux/gst-libs/gst/gettext.h
author rosfran
Fri Oct 27 00:13:07 2006 +0100 (2006-10-27)
branchtrunk
changeset 58 3f9efc6c27bd
permissions -rw-r--r--
[svn r59] Some minor fixes.
rosfran@57
     1
/* Convenience header for conditional use of GNU <libintl.h>.
rosfran@57
     2
   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
rosfran@57
     3
rosfran@57
     4
   This program is free software; you can redistribute it and/or modify it
rosfran@57
     5
   under the terms of the GNU Library General Public License as published
rosfran@57
     6
   by the Free Software Foundation; either version 2, or (at your option)
rosfran@57
     7
   any later version.
rosfran@57
     8
rosfran@57
     9
   This program is distributed in the hope that it will be useful,
rosfran@57
    10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
rosfran@57
    11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rosfran@57
    12
   Library General Public License for more details.
rosfran@57
    13
rosfran@57
    14
   You should have received a copy of the GNU Library General Public
rosfran@57
    15
   License along with this program; if not, write to the Free Software
rosfran@57
    16
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
rosfran@57
    17
   USA.  */
rosfran@57
    18
rosfran@57
    19
#ifndef _LIBGETTEXT_H
rosfran@57
    20
#define _LIBGETTEXT_H 1
rosfran@57
    21
rosfran@57
    22
/* NLS can be disabled through the configure --disable-nls option.  */
rosfran@57
    23
#if ENABLE_NLS
rosfran@57
    24
rosfran@57
    25
/* Get declarations of GNU message catalog functions.  */
rosfran@57
    26
# include <libintl.h>
rosfran@57
    27
rosfran@57
    28
#else
rosfran@57
    29
rosfran@57
    30
/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
rosfran@57
    31
   chokes if dcgettext is defined as a macro.  So include it now, to make
rosfran@57
    32
   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
rosfran@57
    33
   as well because people using "gettext.h" will not include <libintl.h>,
rosfran@57
    34
   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
rosfran@57
    35
   is OK.  */
rosfran@57
    36
#if defined(__sun)
rosfran@57
    37
# include <locale.h>
rosfran@57
    38
#endif
rosfran@57
    39
rosfran@57
    40
/* Disabled NLS.
rosfran@57
    41
   The casts to 'const char *' serve the purpose of producing warnings
rosfran@57
    42
   for invalid uses of the value returned from these functions.
rosfran@57
    43
   On pre-ANSI systems without 'const', the config.h file is supposed to
rosfran@57
    44
   contain "#define const".  */
rosfran@57
    45
# define gettext(Msgid) ((const char *) (Msgid))
rosfran@57
    46
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
rosfran@57
    47
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
rosfran@57
    48
# define ngettext(Msgid1, Msgid2, N) \
rosfran@57
    49
    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
rosfran@57
    50
# define dngettext(Domainname, Msgid1, Msgid2, N) \
rosfran@57
    51
    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
rosfran@57
    52
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
rosfran@57
    53
    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
rosfran@57
    54
# define textdomain(Domainname) ((const char *) (Domainname))
rosfran@57
    55
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
rosfran@57
    56
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
rosfran@57
    57
rosfran@57
    58
#endif
rosfran@57
    59
rosfran@57
    60
/* A pseudo function call that serves as a marker for the automated
rosfran@57
    61
   extraction of messages, but does not call gettext().  The run-time
rosfran@57
    62
   translation is done at a different place in the code.
rosfran@57
    63
   The argument, String, should be a literal string.  Concatenated strings
rosfran@57
    64
   and other string expressions won't work.
rosfran@57
    65
   The macro's expansion is not parenthesized, so that it is suitable as
rosfran@57
    66
   initializer for static 'char[]' or 'const char[]' variables.  */
rosfran@57
    67
#define gettext_noop(String) String
rosfran@57
    68
rosfran@57
    69
#endif /* _LIBGETTEXT_H */