- Timestamp:
- 11/13/08 03:14:29 (5 years ago)
- Files:
-
- 1 modified
-
lang/c/libintl-msvc/recipes/libintl.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/c/libintl-msvc/recipes/libintl.h
r23481 r23494 413 413 414 414 /* Wide character support. */ 415 /* XXX inline ! */ 416 #ifdef _INTL_REDIRECT_INLINE 417 #define WIDE_LIBINTL_STATIC_INLINE static inline 418 #elif defined(_MSC_VER) 419 #define WIDE_LIBINTL_STATIC_INLINE static _inline 420 #else 421 #define WIDE_LIBINTL_STATIC_INLINE static 422 #endif 423 415 424 #define wgettext(msgid) wgettext_(msgid, L##msgid) 416 425 #define dwgettext(domainname, msgid) dwgettext_(domainname, msgid, L##msgid) … … 420 429 #define dcnwgettext(domainname, msgid1, msgid2, n, category) dnwgettext_(domainname, msgid1, msgid2, n, L##msgid1, L##msgid2) 421 430 422 static const wchar_t* wgettext_(const char* msgid, const wchar_t* wmsgid) { 431 WIDE_LIBINTL_STATIC_INLINE 432 const wchar_t* wgettext_(const char* msgid, const wchar_t* wmsgid) { 423 433 const char* translated = gettext(msgid); 424 434 return translated != msgid ? (const wchar_t*)translated : wmsgid; 425 435 } 426 436 427 static const wchar_t* dwgettext_(const char *domainname, const char* msgid, const wchar_t* wmsgid) { 437 WIDE_LIBINTL_STATIC_INLINE 438 const wchar_t* dwgettext_(const char *domainname, const char* msgid, const wchar_t* wmsgid) { 428 439 const char* translated = dgettext(domainname, msgid); 429 440 return translated != msgid ? (const wchar_t*)translated : wmsgid; 430 441 } 431 442 432 static const wchar_t* dcwgettext_(const char *domainname, const char* msgid, int category, const wchar_t* wmsgid) { 443 WIDE_LIBINTL_STATIC_INLINE 444 const wchar_t* dcwgettext_(const char *domainname, const char* msgid, int category, const wchar_t* wmsgid) { 433 445 const char* translated = dcgettext(domainname, msgid, category); 434 446 return translated != msgid ? (const wchar_t*)translated : wmsgid; 435 447 } 436 448 437 static const wchar_t* nwgettext_(const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 449 WIDE_LIBINTL_STATIC_INLINE 450 const wchar_t* nwgettext_(const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 438 451 const char* translated = ngettext(msgid1, msgid2, n); 439 452 return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t*)translated); 440 453 } 441 454 442 static const wchar_t* dnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 455 WIDE_LIBINTL_STATIC_INLINE 456 const wchar_t* dnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2) { 443 457 const char* translated = dngettext(domainname, msgid1, msgid2, n); 444 458 return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t*)translated); 445 459 } 446 460 447 static const wchar_t* dcnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2, int category) { 461 WIDE_LIBINTL_STATIC_INLINE 462 const wchar_t* dcnwgettext_(const char* domainname, const char* msgid1, const char* msgid2, unsigned long n, const wchar_t* wmsgid1, const wchar_t* wmsgid2, int category) { 448 463 const char* translated = dcngettext(domainname, msgid1, msgid2, n, category); 449 464 return translated == msgid1 ? wmsgid1 : (translated == msgid2 ? wmsgid2 : (const wchar_t*)translated); … … 471 486 #define wbindtextdomain windows_wbindtextdomain 472 487 473 static const wchar_t* windows_wbindtextdomain(const char* domainname, const wchar_t* dirname16) { 488 WIDE_LIBINTL_STATIC_INLINE 489 const wchar_t* windows_wbindtextdomain(const char* domainname, const wchar_t* dirname16) { 474 490 char* dirname8 = NULL; 475 491 unsigned int num_elements = 0; … … 504 520 } 505 521 506 static const char* windows_bindtextdomain(const char* domainname, const char* dirname) { 522 WIDE_LIBINTL_STATIC_INLINE 523 const char* windows_bindtextdomain(const char* domainname, const char* dirname) { 507 524 wchar_t* dirname16 = NULL; 508 525 unsigned int num_elements = 0; … … 548 565 549 566 #endif /* (defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)) && !defined(__CYGWIN__) */ 567 #undef WIDE_LIBINTL_STATIC_INLINE 550 568 551 569 #endif /* libintl.h */
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)