File indexing completed on 2024-05-18 08:30:07
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _LIBINTL_H
0018 #define _LIBINTL_H 1
0019
0020 #include <locale.h>
0021 #if (defined __APPLE__ && defined __MACH__) && 1
0022 # include <xlocale.h>
0023 #endif
0024
0025
0026
0027
0028
0029
0030
0031
0032 #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
0033 # define LC_MESSAGES 1729
0034 #endif
0035
0036
0037
0038 #define __USE_GNU_GETTEXT 1
0039
0040
0041
0042 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
0043 ((major) == 0 || (major) == 1 ? 1 : -1)
0044
0045
0046
0047 #ifdef __DJGPP__
0048 # undef gettext
0049 #endif
0050
0051 #ifdef __cplusplus
0052 extern "C" {
0053 #endif
0054
0055
0056
0057 #define LIBINTL_VERSION 0x001603
0058 extern int libintl_version;
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
0092 # if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
0093 # define _INTL_REDIRECT_ASM
0094 # else
0095 # ifdef __cplusplus
0096 # define _INTL_REDIRECT_INLINE
0097 # else
0098 # define _INTL_REDIRECT_MACROS
0099 # endif
0100 # endif
0101 #endif
0102
0103 #ifdef _INTL_REDIRECT_ASM
0104 # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
0105 # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
0106 # define _INTL_STRINGIFY(prefix) #prefix
0107 #else
0108 # define _INTL_ASM(cname)
0109 #endif
0110
0111
0112
0113
0114 #if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus)
0115 # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
0116 #else
0117 # define _INTL_MAY_RETURN_STRING_ARG(n)
0118 #endif
0119
0120
0121
0122
0123 #ifdef _INTL_REDIRECT_INLINE
0124 extern char *libintl_gettext (const char *__msgid)
0125 _INTL_MAY_RETURN_STRING_ARG (1);
0126 static inline
0127 _INTL_MAY_RETURN_STRING_ARG (1)
0128 char *gettext (const char *__msgid)
0129 {
0130 return libintl_gettext (__msgid);
0131 }
0132 #else
0133 # ifdef _INTL_REDIRECT_MACROS
0134 # define gettext libintl_gettext
0135 # endif
0136 extern char *gettext (const char *__msgid)
0137 _INTL_ASM (libintl_gettext)
0138 _INTL_MAY_RETURN_STRING_ARG (1);
0139 #endif
0140
0141
0142
0143 #ifdef _INTL_REDIRECT_INLINE
0144 extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
0145 _INTL_MAY_RETURN_STRING_ARG (2);
0146 static inline
0147 _INTL_MAY_RETURN_STRING_ARG (2)
0148 char *dgettext (const char *__domainname, const char *__msgid)
0149 {
0150 return libintl_dgettext (__domainname, __msgid);
0151 }
0152 #else
0153 # ifdef _INTL_REDIRECT_MACROS
0154 # define dgettext libintl_dgettext
0155 # endif
0156 extern char *dgettext (const char *__domainname, const char *__msgid)
0157 _INTL_ASM (libintl_dgettext)
0158 _INTL_MAY_RETURN_STRING_ARG (2);
0159 #endif
0160
0161
0162
0163 #ifdef _INTL_REDIRECT_INLINE
0164 extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
0165 int __category)
0166 _INTL_MAY_RETURN_STRING_ARG (2);
0167 static inline
0168 _INTL_MAY_RETURN_STRING_ARG (2)
0169 char *dcgettext (const char *__domainname, const char *__msgid, int __category)
0170 {
0171 return libintl_dcgettext (__domainname, __msgid, __category);
0172 }
0173 #else
0174 # ifdef _INTL_REDIRECT_MACROS
0175 # define dcgettext libintl_dcgettext
0176 # endif
0177 extern char *dcgettext (const char *__domainname, const char *__msgid,
0178 int __category)
0179 _INTL_ASM (libintl_dcgettext)
0180 _INTL_MAY_RETURN_STRING_ARG (2);
0181 #endif
0182
0183
0184
0185
0186 #ifdef _INTL_REDIRECT_INLINE
0187 extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
0188 unsigned long int __n)
0189 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
0190 static inline
0191 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2)
0192 char *ngettext (const char *__msgid1, const char *__msgid2,
0193 unsigned long int __n)
0194 {
0195 return libintl_ngettext (__msgid1, __msgid2, __n);
0196 }
0197 #else
0198 # ifdef _INTL_REDIRECT_MACROS
0199 # define ngettext libintl_ngettext
0200 # endif
0201 extern char *ngettext (const char *__msgid1, const char *__msgid2,
0202 unsigned long int __n)
0203 _INTL_ASM (libintl_ngettext)
0204 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
0205 #endif
0206
0207
0208
0209 #ifdef _INTL_REDIRECT_INLINE
0210 extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
0211 const char *__msgid2, unsigned long int __n)
0212 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0213 static inline
0214 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
0215 char *dngettext (const char *__domainname, const char *__msgid1,
0216 const char *__msgid2, unsigned long int __n)
0217 {
0218 return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
0219 }
0220 #else
0221 # ifdef _INTL_REDIRECT_MACROS
0222 # define dngettext libintl_dngettext
0223 # endif
0224 extern char *dngettext (const char *__domainname,
0225 const char *__msgid1, const char *__msgid2,
0226 unsigned long int __n)
0227 _INTL_ASM (libintl_dngettext)
0228 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0229 #endif
0230
0231
0232
0233 #ifdef _INTL_REDIRECT_INLINE
0234 extern char *libintl_dcngettext (const char *__domainname,
0235 const char *__msgid1, const char *__msgid2,
0236 unsigned long int __n, int __category)
0237 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0238 static inline
0239 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
0240 char *dcngettext (const char *__domainname,
0241 const char *__msgid1, const char *__msgid2,
0242 unsigned long int __n, int __category)
0243 {
0244 return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
0245 }
0246 #else
0247 # ifdef _INTL_REDIRECT_MACROS
0248 # define dcngettext libintl_dcngettext
0249 # endif
0250 extern char *dcngettext (const char *__domainname,
0251 const char *__msgid1, const char *__msgid2,
0252 unsigned long int __n, int __category)
0253 _INTL_ASM (libintl_dcngettext)
0254 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0255 #endif
0256
0257
0258
0259
0260
0261
0262 # ifdef _INTL_REDIRECT_INLINE
0263 extern char *libintl_textdomain (const char *__domainname);
0264 static inline char *textdomain (const char *__domainname)
0265 {
0266 return libintl_textdomain (__domainname);
0267 }
0268 # else
0269 # ifdef _INTL_REDIRECT_MACROS
0270 # define textdomain libintl_textdomain
0271 # endif
0272 extern char *textdomain (const char *__domainname)
0273 _INTL_ASM (libintl_textdomain);
0274 # endif
0275
0276
0277
0278 # ifdef _INTL_REDIRECT_INLINE
0279 extern char *libintl_bindtextdomain (const char *__domainname,
0280 const char *__dirname);
0281 static inline char *bindtextdomain (const char *__domainname,
0282 const char *__dirname)
0283 {
0284 return libintl_bindtextdomain (__domainname, __dirname);
0285 }
0286 # else
0287 # ifdef _INTL_REDIRECT_MACROS
0288 # define bindtextdomain libintl_bindtextdomain
0289 # endif
0290 extern char *bindtextdomain (const char *__domainname, const char *__dirname)
0291 _INTL_ASM (libintl_bindtextdomain);
0292 # endif
0293
0294 # if defined _WIN32 && !defined __CYGWIN__
0295
0296
0297 # ifdef _INTL_REDIRECT_INLINE
0298 extern wchar_t *libintl_wbindtextdomain (const char *__domainname,
0299 const wchar_t *__wdirname);
0300 static inline wchar_t *wbindtextdomain (const char *__domainname,
0301 const wchar_t *__wdirname)
0302 {
0303 return libintl_wbindtextdomain (__domainname, __wdirname);
0304 }
0305 # else
0306 # ifdef _INTL_REDIRECT_MACROS
0307 # define wbindtextdomain libintl_wbindtextdomain
0308 # endif
0309 extern wchar_t *wbindtextdomain (const char *__domainname,
0310 const wchar_t *__wdirname)
0311 _INTL_ASM (libintl_wbindtextdomain);
0312 # endif
0313 # endif
0314
0315
0316
0317 # ifdef _INTL_REDIRECT_INLINE
0318 extern char *libintl_bind_textdomain_codeset (const char *__domainname,
0319 const char *__codeset);
0320 static inline char *bind_textdomain_codeset (const char *__domainname,
0321 const char *__codeset)
0322 {
0323 return libintl_bind_textdomain_codeset (__domainname, __codeset);
0324 }
0325 # else
0326 # ifdef _INTL_REDIRECT_MACROS
0327 # define bind_textdomain_codeset libintl_bind_textdomain_codeset
0328 # endif
0329 extern char *bind_textdomain_codeset (const char *__domainname,
0330 const char *__codeset)
0331 _INTL_ASM (libintl_bind_textdomain_codeset);
0332 # endif
0333
0334
0335
0336
0337
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355 #if !1
0356
0357 # include <stdio.h>
0358 # include <stddef.h>
0359
0360
0361 # if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
0362 # include <stdarg.h>
0363 # else
0364 # include <varargs.h>
0365 # endif
0366
0367 # if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf)
0368 # undef fprintf
0369 # define fprintf libintl_fprintf
0370 extern int fprintf (FILE *, const char *, ...);
0371 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0372 namespace std { using ::libintl_fprintf; }
0373 # endif
0374 # endif
0375 # if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf)
0376 # undef vfprintf
0377 # define vfprintf libintl_vfprintf
0378 extern int vfprintf (FILE *, const char *, va_list);
0379 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0380 namespace std { using ::libintl_vfprintf; }
0381 # endif
0382 # endif
0383
0384 # if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf)
0385 # undef printf
0386 # if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396 # define libintl_printf __printf__
0397 # endif
0398 # define printf libintl_printf
0399 extern int printf (const char *, ...);
0400 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0401 namespace std { using ::libintl_printf; }
0402 # endif
0403 # endif
0404 # if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf)
0405 # undef vprintf
0406 # define vprintf libintl_vprintf
0407 extern int vprintf (const char *, va_list);
0408 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0409 namespace std { using ::libintl_vprintf; }
0410 # endif
0411 # endif
0412
0413 # if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf)
0414 # undef sprintf
0415 # define sprintf libintl_sprintf
0416 extern int sprintf (char *, const char *, ...);
0417 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0418 namespace std { using ::libintl_sprintf; }
0419 # endif
0420 # endif
0421 # if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf)
0422 # undef vsprintf
0423 # define vsprintf libintl_vsprintf
0424 extern int vsprintf (char *, const char *, va_list);
0425 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0426 namespace std { using ::libintl_vsprintf; }
0427 # endif
0428 # endif
0429
0430 # if 1
0431
0432 # if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf)
0433 # undef snprintf
0434 # define snprintf libintl_snprintf
0435 extern int snprintf (char *, size_t, const char *, ...);
0436 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0437 namespace std { using ::libintl_snprintf; }
0438 # endif
0439 # endif
0440 # if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf)
0441 # undef vsnprintf
0442 # define vsnprintf libintl_vsnprintf
0443 extern int vsnprintf (char *, size_t, const char *, va_list);
0444 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0445 namespace std { using ::libintl_vsnprintf; }
0446 # endif
0447 # endif
0448
0449 # endif
0450
0451 # if 1
0452
0453 # if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf)
0454 # undef asprintf
0455 # define asprintf libintl_asprintf
0456 extern int asprintf (char **, const char *, ...);
0457 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0458 namespace std { using ::libintl_asprintf; }
0459 # endif
0460 # endif
0461 # if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf)
0462 # undef vasprintf
0463 # define vasprintf libintl_vasprintf
0464 extern int vasprintf (char **, const char *, va_list);
0465 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0466 namespace std { using ::libintl_vasprintf; }
0467 # endif
0468 # endif
0469
0470 # endif
0471
0472 # if 1
0473
0474 # undef fwprintf
0475 # define fwprintf libintl_fwprintf
0476 extern int fwprintf (FILE *, const wchar_t *, ...);
0477 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0478 namespace std { using ::libintl_fwprintf; }
0479 # endif
0480 # undef vfwprintf
0481 # define vfwprintf libintl_vfwprintf
0482 extern int vfwprintf (FILE *, const wchar_t *, va_list);
0483 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0484 namespace std { using ::libintl_vfwprintf; }
0485 # endif
0486
0487 # undef wprintf
0488 # define wprintf libintl_wprintf
0489 extern int wprintf (const wchar_t *, ...);
0490 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0491 namespace std { using ::libintl_wprintf; }
0492 # endif
0493 # undef vwprintf
0494 # define vwprintf libintl_vwprintf
0495 extern int vwprintf (const wchar_t *, va_list);
0496 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0497 namespace std { using ::libintl_vwprintf; }
0498 # endif
0499
0500 # undef swprintf
0501 # define swprintf libintl_swprintf
0502 extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
0503 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0504 namespace std { using ::libintl_swprintf; }
0505 # endif
0506 # undef vswprintf
0507 # define vswprintf libintl_vswprintf
0508 extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
0509 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0510 namespace std { using ::libintl_vswprintf; }
0511 # endif
0512
0513 # endif
0514
0515 #endif
0516
0517
0518
0519 #if 0
0520
0521 # ifndef GNULIB_defined_newlocale
0522 # undef newlocale
0523 # define newlocale libintl_newlocale
0524 extern locale_t newlocale (int, const char *, locale_t);
0525 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0526 namespace std { using ::libintl_newlocale; }
0527 # endif
0528 # endif
0529
0530 # ifndef GNULIB_defined_duplocale
0531 # undef duplocale
0532 # define duplocale libintl_duplocale
0533 extern locale_t duplocale (locale_t);
0534 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0535 namespace std { using ::libintl_duplocale; }
0536 # endif
0537 # endif
0538
0539 # ifndef GNULIB_defined_freelocale
0540 # undef freelocale
0541 # define freelocale libintl_freelocale
0542 extern void freelocale (locale_t);
0543 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0544 namespace std { using ::libintl_freelocale; }
0545 # endif
0546 # endif
0547
0548 #endif
0549
0550
0551
0552 #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
0553
0554 # ifndef GNULIB_defined_setlocale
0555 # undef setlocale
0556 # define setlocale libintl_setlocale
0557 extern char *setlocale (int, const char *);
0558 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0559 namespace std { using ::libintl_setlocale; }
0560 # endif
0561 # endif
0562
0563 # if 1
0564
0565 # undef newlocale
0566 # define newlocale libintl_newlocale
0567
0568 # if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
0569 extern locale_t newlocale (int, const char *, locale_t);
0570 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0571 namespace std { using ::libintl_newlocale; }
0572 # endif
0573 # endif
0574
0575 # endif
0576
0577 #endif
0578
0579
0580
0581
0582
0583
0584
0585
0586
0587 #define libintl_set_relocation_prefix libintl_set_relocation_prefix
0588 extern void
0589 libintl_set_relocation_prefix (const char *orig_prefix,
0590 const char *curr_prefix);
0591
0592
0593 #ifdef __cplusplus
0594 }
0595 #endif
0596
0597 #endif