00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
00024 #ifndef _LIBINTL_H
00025 # define _LIBINTL_H 1
00026 #endif
00027 #define _LIBGETTEXT_H 1
00028
00029
00030
00031 #define __USE_GNU_GETTEXT 1
00032
00033 #include <sys/types.h>
00034
00035 #if HAVE_LOCALE_H
00036 # include <locale.h>
00037 #endif
00038
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044
00045
00046 #ifndef PARAMS
00047 # if __STDC__ || defined __cplusplus
00048 # define PARAMS(args) args
00049 # else
00050 # define PARAMS(args) ()
00051 # endif
00052 #endif
00053
00054 #ifndef NULL
00055 # if !defined __cplusplus || defined __GNUC__
00056 # define NULL ((void *) 0)
00057 # else
00058 # define NULL (0)
00059 # endif
00060 #endif
00061
00062 #if !HAVE_LC_MESSAGES
00063
00064
00065
00066 # define LC_MESSAGES (-1)
00067 #endif
00068
00069
00070
00071
00072 struct _msg_ent
00073 {
00074 const char *_msg;
00075 int _msg_number;
00076 };
00077
00078
00079 #if HAVE_CATGETS
00080
00081
00082 extern const struct _msg_ent _msg_tbl[];
00083 extern int _msg_tbl_length;
00084 #endif
00085
00086
00087
00088
00089 #define gettext_noop(Str) Str
00090
00091
00092
00093
00094 extern char *gettext PARAMS ((const char *__msgid));
00095 extern char *gettext__ PARAMS ((const char *__msgid));
00096
00097
00098
00099 extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
00100 extern char *dgettext__ PARAMS ((const char *__domainname,
00101 const char *__msgid));
00102
00103
00104
00105 extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
00106 int __category));
00107 extern char *dcgettext__ PARAMS ((const char *__domainname,
00108 const char *__msgid, int __category));
00109
00110
00111
00112
00113
00114 extern char *textdomain PARAMS ((const char *__domainname));
00115 extern char *textdomain__ PARAMS ((const char *__domainname));
00116
00117
00118
00119 extern char *bindtextdomain PARAMS ((const char *__domainname,
00120 const char *__dirname));
00121 extern char *bindtextdomain__ PARAMS ((const char *__domainname,
00122 const char *__dirname));
00123
00124 #if ENABLE_NLS
00125
00126
00127
00128
00129 # if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
00130
00131 # define gettext(Msgid) \
00132 dgettext (NULL, Msgid)
00133
00134 # define dgettext(Domainname, Msgid) \
00135 dcgettext (Domainname, Msgid, LC_MESSAGES)
00136
00137 # if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
00138
00139
00140
00141 extern int _nl_msg_cat_cntr;
00142
00143 # define dcgettext(Domainname, Msgid, Category) \
00144 (__extension__ \
00145 ({ \
00146 char *__result; \
00147 if (__builtin_constant_p (Msgid)) \
00148 { \
00149 static char *__translation__; \
00150 static int __catalog_counter__; \
00151 if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
00152 { \
00153 __translation__ = \
00154 dcgettext__ (Domainname, Msgid, Category); \
00155 __catalog_counter__ = _nl_msg_cat_cntr; \
00156 } \
00157 __result = __translation__; \
00158 } \
00159 else \
00160 __result = dcgettext__ (Domainname, Msgid, Category); \
00161 __result; \
00162 }))
00163 # endif
00164 # endif
00165
00166 #else
00167
00168 # define gettext(Msgid) (Msgid)
00169 # define dgettext(Domainname, Msgid) (Msgid)
00170 # define dcgettext(Domainname, Msgid, Category) (Msgid)
00171 # define textdomain(Domainname) ((char *) Domainname)
00172 # define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
00173
00174 #endif
00175
00176
00177
00178 #ifdef __cplusplus
00179 }
00180 #endif
00181
00182 #endif