File indexing completed on 2025-01-17 09:55:47
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 0x001605
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
0124
0125
0126
0127
0128
0129
0130
0131 #if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 7) > 2) || defined __clang__
0132 # define _INTL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
0133 #else
0134 # define _INTL_ATTRIBUTE_FORMAT(spec)
0135 #endif
0136
0137
0138
0139
0140
0141
0142 #if defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 4) > 4
0143 # define _INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__
0144 #else
0145 # define _INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__
0146 #endif
0147
0148
0149
0150
0151
0152 #define _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \
0153 _INTL_ATTRIBUTE_FORMAT ((_INTL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument))
0154
0155
0156
0157
0158 #ifdef _INTL_REDIRECT_INLINE
0159 extern char *libintl_gettext (const char *__msgid)
0160 _INTL_MAY_RETURN_STRING_ARG (1);
0161 static inline
0162 _INTL_MAY_RETURN_STRING_ARG (1)
0163 char *gettext (const char *__msgid)
0164 {
0165 return libintl_gettext (__msgid);
0166 }
0167 #else
0168 # ifdef _INTL_REDIRECT_MACROS
0169 # define gettext libintl_gettext
0170 # endif
0171 extern char *gettext (const char *__msgid)
0172 _INTL_ASM (libintl_gettext)
0173 _INTL_MAY_RETURN_STRING_ARG (1);
0174 #endif
0175
0176
0177
0178 #ifdef _INTL_REDIRECT_INLINE
0179 extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
0180 _INTL_MAY_RETURN_STRING_ARG (2);
0181 static inline
0182 _INTL_MAY_RETURN_STRING_ARG (2)
0183 char *dgettext (const char *__domainname, const char *__msgid)
0184 {
0185 return libintl_dgettext (__domainname, __msgid);
0186 }
0187 #else
0188 # ifdef _INTL_REDIRECT_MACROS
0189 # define dgettext libintl_dgettext
0190 # endif
0191 extern char *dgettext (const char *__domainname, const char *__msgid)
0192 _INTL_ASM (libintl_dgettext)
0193 _INTL_MAY_RETURN_STRING_ARG (2);
0194 #endif
0195
0196
0197
0198 #ifdef _INTL_REDIRECT_INLINE
0199 extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
0200 int __category)
0201 _INTL_MAY_RETURN_STRING_ARG (2);
0202 static inline
0203 _INTL_MAY_RETURN_STRING_ARG (2)
0204 char *dcgettext (const char *__domainname, const char *__msgid, int __category)
0205 {
0206 return libintl_dcgettext (__domainname, __msgid, __category);
0207 }
0208 #else
0209 # ifdef _INTL_REDIRECT_MACROS
0210 # define dcgettext libintl_dcgettext
0211 # endif
0212 extern char *dcgettext (const char *__domainname, const char *__msgid,
0213 int __category)
0214 _INTL_ASM (libintl_dcgettext)
0215 _INTL_MAY_RETURN_STRING_ARG (2);
0216 #endif
0217
0218
0219
0220
0221 #ifdef _INTL_REDIRECT_INLINE
0222 extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
0223 unsigned long int __n)
0224 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
0225 static inline
0226 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2)
0227 char *ngettext (const char *__msgid1, const char *__msgid2,
0228 unsigned long int __n)
0229 {
0230 return libintl_ngettext (__msgid1, __msgid2, __n);
0231 }
0232 #else
0233 # ifdef _INTL_REDIRECT_MACROS
0234 # define ngettext libintl_ngettext
0235 # endif
0236 extern char *ngettext (const char *__msgid1, const char *__msgid2,
0237 unsigned long int __n)
0238 _INTL_ASM (libintl_ngettext)
0239 _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
0240 #endif
0241
0242
0243
0244 #ifdef _INTL_REDIRECT_INLINE
0245 extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
0246 const char *__msgid2, unsigned long int __n)
0247 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0248 static inline
0249 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
0250 char *dngettext (const char *__domainname, const char *__msgid1,
0251 const char *__msgid2, unsigned long int __n)
0252 {
0253 return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
0254 }
0255 #else
0256 # ifdef _INTL_REDIRECT_MACROS
0257 # define dngettext libintl_dngettext
0258 # endif
0259 extern char *dngettext (const char *__domainname,
0260 const char *__msgid1, const char *__msgid2,
0261 unsigned long int __n)
0262 _INTL_ASM (libintl_dngettext)
0263 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0264 #endif
0265
0266
0267
0268 #ifdef _INTL_REDIRECT_INLINE
0269 extern char *libintl_dcngettext (const char *__domainname,
0270 const char *__msgid1, const char *__msgid2,
0271 unsigned long int __n, int __category)
0272 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0273 static inline
0274 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
0275 char *dcngettext (const char *__domainname,
0276 const char *__msgid1, const char *__msgid2,
0277 unsigned long int __n, int __category)
0278 {
0279 return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
0280 }
0281 #else
0282 # ifdef _INTL_REDIRECT_MACROS
0283 # define dcngettext libintl_dcngettext
0284 # endif
0285 extern char *dcngettext (const char *__domainname,
0286 const char *__msgid1, const char *__msgid2,
0287 unsigned long int __n, int __category)
0288 _INTL_ASM (libintl_dcngettext)
0289 _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
0290 #endif
0291
0292
0293
0294
0295
0296
0297 # ifdef _INTL_REDIRECT_INLINE
0298 extern char *libintl_textdomain (const char *__domainname);
0299 static inline char *textdomain (const char *__domainname)
0300 {
0301 return libintl_textdomain (__domainname);
0302 }
0303 # else
0304 # ifdef _INTL_REDIRECT_MACROS
0305 # define textdomain libintl_textdomain
0306 # endif
0307 extern char *textdomain (const char *__domainname)
0308 _INTL_ASM (libintl_textdomain);
0309 # endif
0310
0311
0312
0313 # ifdef _INTL_REDIRECT_INLINE
0314 extern char *libintl_bindtextdomain (const char *__domainname,
0315 const char *__dirname);
0316 static inline char *bindtextdomain (const char *__domainname,
0317 const char *__dirname)
0318 {
0319 return libintl_bindtextdomain (__domainname, __dirname);
0320 }
0321 # else
0322 # ifdef _INTL_REDIRECT_MACROS
0323 # define bindtextdomain libintl_bindtextdomain
0324 # endif
0325 extern char *bindtextdomain (const char *__domainname, const char *__dirname)
0326 _INTL_ASM (libintl_bindtextdomain);
0327 # endif
0328
0329 # if defined _WIN32 && !defined __CYGWIN__
0330
0331
0332 # ifdef _INTL_REDIRECT_INLINE
0333 extern wchar_t *libintl_wbindtextdomain (const char *__domainname,
0334 const wchar_t *__wdirname);
0335 static inline wchar_t *wbindtextdomain (const char *__domainname,
0336 const wchar_t *__wdirname)
0337 {
0338 return libintl_wbindtextdomain (__domainname, __wdirname);
0339 }
0340 # else
0341 # ifdef _INTL_REDIRECT_MACROS
0342 # define wbindtextdomain libintl_wbindtextdomain
0343 # endif
0344 extern wchar_t *wbindtextdomain (const char *__domainname,
0345 const wchar_t *__wdirname)
0346 _INTL_ASM (libintl_wbindtextdomain);
0347 # endif
0348 # endif
0349
0350
0351
0352 # ifdef _INTL_REDIRECT_INLINE
0353 extern char *libintl_bind_textdomain_codeset (const char *__domainname,
0354 const char *__codeset);
0355 static inline char *bind_textdomain_codeset (const char *__domainname,
0356 const char *__codeset)
0357 {
0358 return libintl_bind_textdomain_codeset (__domainname, __codeset);
0359 }
0360 # else
0361 # ifdef _INTL_REDIRECT_MACROS
0362 # define bind_textdomain_codeset libintl_bind_textdomain_codeset
0363 # endif
0364 extern char *bind_textdomain_codeset (const char *__domainname,
0365 const char *__codeset)
0366 _INTL_ASM (libintl_bind_textdomain_codeset);
0367 # endif
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390 #if !1
0391
0392 # include <stdio.h>
0393 # include <stddef.h>
0394
0395
0396 # if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
0397 # include <stdarg.h>
0398 # else
0399 # include <varargs.h>
0400 # endif
0401
0402 # if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf)
0403 # undef fprintf
0404 # define fprintf libintl_fprintf
0405 extern int fprintf (FILE *, const char *, ...)
0406 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3);
0407 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0408 namespace std { using ::libintl_fprintf; }
0409 # endif
0410 # endif
0411 # if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf)
0412 # undef vfprintf
0413 # define vfprintf libintl_vfprintf
0414 extern int vfprintf (FILE *, const char *, va_list)
0415 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0);
0416 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0417 namespace std { using ::libintl_vfprintf; }
0418 # endif
0419 # endif
0420
0421 # if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf)
0422 # undef printf
0423 # if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433 # define libintl_printf __printf__
0434 # endif
0435 # define printf libintl_printf
0436 extern int printf (const char *, ...)
0437 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2);
0438 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0439 namespace std { using ::libintl_printf; }
0440 # endif
0441 # endif
0442 # if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf)
0443 # undef vprintf
0444 # define vprintf libintl_vprintf
0445 extern int vprintf (const char *, va_list)
0446 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0);
0447 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0448 namespace std { using ::libintl_vprintf; }
0449 # endif
0450 # endif
0451
0452 # if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf)
0453 # undef sprintf
0454 # define sprintf libintl_sprintf
0455 extern int sprintf (char *, const char *, ...)
0456 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3);
0457 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0458 namespace std { using ::libintl_sprintf; }
0459 # endif
0460 # endif
0461 # if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf)
0462 # undef vsprintf
0463 # define vsprintf libintl_vsprintf
0464 extern int vsprintf (char *, const char *, va_list)
0465 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0);
0466 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0467 namespace std { using ::libintl_vsprintf; }
0468 # endif
0469 # endif
0470
0471 # if 1
0472
0473 # if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf)
0474 # undef snprintf
0475 # define snprintf libintl_snprintf
0476 extern int snprintf (char *, size_t, const char *, ...)
0477 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4);
0478 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0479 namespace std { using ::libintl_snprintf; }
0480 # endif
0481 # endif
0482 # if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf)
0483 # undef vsnprintf
0484 # define vsnprintf libintl_vsnprintf
0485 extern int vsnprintf (char *, size_t, const char *, va_list)
0486 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0);
0487 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0488 namespace std { using ::libintl_vsnprintf; }
0489 # endif
0490 # endif
0491
0492 # endif
0493
0494 # if 1
0495
0496 # if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf)
0497 # undef asprintf
0498 # define asprintf libintl_asprintf
0499 extern int asprintf (char **, const char *, ...)
0500 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3);
0501 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0502 namespace std { using ::libintl_asprintf; }
0503 # endif
0504 # endif
0505 # if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf)
0506 # undef vasprintf
0507 # define vasprintf libintl_vasprintf
0508 extern int vasprintf (char **, const char *, va_list)
0509 _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0);
0510 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0511 namespace std { using ::libintl_vasprintf; }
0512 # endif
0513 # endif
0514
0515 # endif
0516
0517 # if 1
0518
0519 # undef fwprintf
0520 # define fwprintf libintl_fwprintf
0521 extern int fwprintf (FILE *, const wchar_t *, ...);
0522 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0523 namespace std { using ::libintl_fwprintf; }
0524 # endif
0525 # undef vfwprintf
0526 # define vfwprintf libintl_vfwprintf
0527 extern int vfwprintf (FILE *, const wchar_t *, va_list);
0528 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0529 namespace std { using ::libintl_vfwprintf; }
0530 # endif
0531
0532 # undef wprintf
0533 # define wprintf libintl_wprintf
0534 extern int wprintf (const wchar_t *, ...);
0535 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0536 namespace std { using ::libintl_wprintf; }
0537 # endif
0538 # undef vwprintf
0539 # define vwprintf libintl_vwprintf
0540 extern int vwprintf (const wchar_t *, va_list);
0541 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0542 namespace std { using ::libintl_vwprintf; }
0543 # endif
0544
0545 # undef swprintf
0546 # define swprintf libintl_swprintf
0547 extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
0548 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0549 namespace std { using ::libintl_swprintf; }
0550 # endif
0551 # undef vswprintf
0552 # define vswprintf libintl_vswprintf
0553 extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
0554 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0555 namespace std { using ::libintl_vswprintf; }
0556 # endif
0557
0558 # endif
0559
0560 #endif
0561
0562
0563
0564 #if 0
0565
0566 # ifndef GNULIB_defined_newlocale
0567 # undef newlocale
0568 # define newlocale libintl_newlocale
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 # ifndef GNULIB_defined_duplocale
0576 # undef duplocale
0577 # define duplocale libintl_duplocale
0578 extern locale_t duplocale (locale_t);
0579 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0580 namespace std { using ::libintl_duplocale; }
0581 # endif
0582 # endif
0583
0584 # ifndef GNULIB_defined_freelocale
0585 # undef freelocale
0586 # define freelocale libintl_freelocale
0587 extern void freelocale (locale_t);
0588 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0589 namespace std { using ::libintl_freelocale; }
0590 # endif
0591 # endif
0592
0593 #endif
0594
0595
0596
0597 #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__
0598
0599 # ifndef GNULIB_defined_setlocale
0600 # undef setlocale
0601 # define setlocale libintl_setlocale
0602 extern char *setlocale (int, const char *);
0603 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0604 namespace std { using ::libintl_setlocale; }
0605 # endif
0606 # endif
0607
0608 # if 1
0609
0610 # undef newlocale
0611 # define newlocale libintl_newlocale
0612
0613 # if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
0614 extern locale_t newlocale (int, const char *, locale_t);
0615 # if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE
0616 namespace std { using ::libintl_newlocale; }
0617 # endif
0618 # endif
0619
0620 # endif
0621
0622 #endif
0623
0624
0625
0626
0627
0628
0629
0630
0631
0632 #define libintl_set_relocation_prefix libintl_set_relocation_prefix
0633 extern void
0634 libintl_set_relocation_prefix (const char *orig_prefix,
0635 const char *curr_prefix);
0636
0637
0638 #ifdef __cplusplus
0639 }
0640 #endif
0641
0642 #endif