Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
2.6 KiB

  1. /***
  2. *locale.h - definitions/declarations for localization routines
  3. *
  4. * Copyright (c) 1988-1994, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the structures, values, macros, and functions
  8. * used by the localization routines.
  9. *
  10. ****/
  11. #ifndef _INC_LOCALE
  12. #define _INC_LOCALE
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  17. #ifndef _CRTAPI1
  18. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  19. #define _CRTAPI1 __cdecl
  20. #else
  21. #define _CRTAPI1
  22. #endif
  23. #endif
  24. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  25. #ifndef _CRTAPI2
  26. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  27. #define _CRTAPI2 __cdecl
  28. #else
  29. #define _CRTAPI2
  30. #endif
  31. #endif
  32. /* Define _CRTIMP */
  33. #ifndef _CRTIMP
  34. #ifdef _NTSDK
  35. /* definition compatible with NT SDK */
  36. #define _CRTIMP
  37. #else /* ndef _NTSDK */
  38. /* current definition */
  39. #ifdef _DLL
  40. #define _CRTIMP __declspec(dllimport)
  41. #else /* ndef _DLL */
  42. #define _CRTIMP
  43. #endif /* _DLL */
  44. #endif /* _NTSDK */
  45. #endif /* _CRTIMP */
  46. /* Define __cdecl for non-Microsoft compilers */
  47. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  48. #define __cdecl
  49. #endif
  50. #ifndef _WCHAR_T_DEFINED
  51. typedef unsigned short wchar_t;
  52. #define _WCHAR_T_DEFINED
  53. #endif
  54. /* define NULL pointer value */
  55. #ifndef NULL
  56. #ifdef __cplusplus
  57. #define NULL 0
  58. #else
  59. #define NULL ((void *)0)
  60. #endif
  61. #endif
  62. /* Locale categories */
  63. #define LC_ALL 0
  64. #define LC_COLLATE 1
  65. #define LC_CTYPE 2
  66. #define LC_MONETARY 3
  67. #define LC_NUMERIC 4
  68. #define LC_TIME 5
  69. #define LC_MIN LC_ALL
  70. #define LC_MAX LC_TIME
  71. /* Locale convention structure */
  72. #ifndef _LCONV_DEFINED
  73. struct lconv {
  74. char *decimal_point;
  75. char *thousands_sep;
  76. char *grouping;
  77. char *int_curr_symbol;
  78. char *currency_symbol;
  79. char *mon_decimal_point;
  80. char *mon_thousands_sep;
  81. char *mon_grouping;
  82. char *positive_sign;
  83. char *negative_sign;
  84. char int_frac_digits;
  85. char frac_digits;
  86. char p_cs_precedes;
  87. char p_sep_by_space;
  88. char n_cs_precedes;
  89. char n_sep_by_space;
  90. char p_sign_posn;
  91. char n_sign_posn;
  92. };
  93. #define _LCONV_DEFINED
  94. #endif
  95. /* ANSI: char lconv members default is CHAR_MAX which is compile time
  96. dependent. Defining and using _charmax here causes CRT startup code
  97. to initialize lconv members properly */
  98. #ifdef _CHAR_UNSIGNED
  99. extern int _charmax;
  100. extern __inline int __dummy() { return _charmax; }
  101. #endif
  102. /* function prototypes */
  103. _CRTIMP char * __cdecl setlocale(int, const char *);
  104. _CRTIMP struct lconv * __cdecl localeconv(void);
  105. #ifndef _WLOCALE_DEFINED
  106. /* wide function prototypes, also declared in wchar.h */
  107. _CRTIMP wchar_t * __cdecl _wsetlocale(int, const wchar_t *);
  108. #define _WLOCALE_DEFINED
  109. #endif
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113. #endif /* _INC_LOCALE */