locale.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_LOCALE
  7. #define _INC_LOCALE
  8. #include <crtdefs.h>
  9. #ifdef __cplusplus
  10. #include <stdio.h>
  11. #endif
  12. #pragma pack(push,_CRT_PACKING)
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #ifndef NULL
  17. #ifdef __cplusplus
  18. #ifndef _WIN64
  19. #define NULL 0
  20. #else
  21. #define NULL 0LL
  22. #endif /* W64 */
  23. #else
  24. #define NULL ((void *)0)
  25. #endif
  26. #endif
  27. #define LC_ALL 0
  28. #define LC_COLLATE 1
  29. #define LC_CTYPE 2
  30. #define LC_MONETARY 3
  31. #define LC_NUMERIC 4
  32. #define LC_TIME 5
  33. #define LC_MIN LC_ALL
  34. #define LC_MAX LC_TIME
  35. #ifndef _LCONV_DEFINED
  36. #define _LCONV_DEFINED
  37. struct lconv {
  38. char *decimal_point;
  39. char *thousands_sep;
  40. char *grouping;
  41. char *int_curr_symbol;
  42. char *currency_symbol;
  43. char *mon_decimal_point;
  44. char *mon_thousands_sep;
  45. char *mon_grouping;
  46. char *positive_sign;
  47. char *negative_sign;
  48. char int_frac_digits;
  49. char frac_digits;
  50. char p_cs_precedes;
  51. char p_sep_by_space;
  52. char n_cs_precedes;
  53. char n_sep_by_space;
  54. char p_sign_posn;
  55. char n_sign_posn;
  56. #if __MSVCRT_VERSION__ >= 0xA00 || _WIN32_WINNT >= 0x601
  57. wchar_t* _W_decimal_point;
  58. wchar_t* _W_thousands_sep;
  59. wchar_t* _W_int_curr_symbol;
  60. wchar_t* _W_currency_symbol;
  61. wchar_t* _W_mon_decimal_point;
  62. wchar_t* _W_mon_thousands_sep;
  63. wchar_t* _W_positive_sign;
  64. wchar_t* _W_negative_sign;
  65. #endif
  66. };
  67. #endif
  68. #ifndef _CONFIG_LOCALE_SWT
  69. #define _CONFIG_LOCALE_SWT
  70. #define _ENABLE_PER_THREAD_LOCALE 0x1
  71. #define _DISABLE_PER_THREAD_LOCALE 0x2
  72. #define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
  73. #define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
  74. #define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
  75. #define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
  76. #endif
  77. int __cdecl _configthreadlocale(int _Flag);
  78. char *__cdecl setlocale(int _Category,const char *_Locale);
  79. _CRTIMP struct lconv *__cdecl localeconv(void);
  80. _CRTIMP _locale_t __cdecl _get_current_locale(void);
  81. _CRTIMP _locale_t __cdecl _create_locale(int _Category,const char *_Locale);
  82. _CRTIMP void __cdecl _free_locale(_locale_t _Locale);
  83. _locale_t __cdecl __get_current_locale(void);
  84. _locale_t __cdecl __create_locale(int _Category,const char *_Locale);
  85. void __cdecl __free_locale(_locale_t _Locale);
  86. _CRTIMP unsigned int __cdecl ___lc_codepage_func(void);
  87. #ifndef _WLOCALE_DEFINED
  88. #define _WLOCALE_DEFINED
  89. _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
  90. #endif
  91. #ifdef __CHAR_UNSIGNED__
  92. /* Pull in the constructor from 'charmax.c'. */
  93. extern int __mingw_initcharmax;
  94. __MINGW_SELECTANY int* __mingw_reference_charmax = &__mingw_initcharmax;
  95. #endif
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #pragma pack(pop)
  100. #endif