home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / LOCALE.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  3KB  |  152 lines

  1. /*  locale.h
  2.  
  3. */
  4.  
  5. /*
  6.  *      C/C++ Run Time Library - Version 8.0
  7.  *
  8.  *      Copyright (c) 1987, 1997 by Borland International
  9.  *      All Rights Reserved.
  10.  *
  11.  */
  12. /* $Revision:   8.9  $ */
  13.  
  14. #ifndef __LOCALE_H
  15. #define __LOCALE_H
  16.  
  17. #if !defined(___DEFS_H)
  18. #include <_defs.h>
  19. #endif
  20.  
  21. #if !defined(__STDDEF_H)
  22. #include <stddef.h>
  23. #endif
  24.  
  25. #ifndef NULL
  26. #include <_null.h>
  27. #endif
  28.  
  29.  
  30. #if !defined(RC_INVOKED)
  31.  
  32. #if defined(__STDC__)
  33. #pragma warn -nak
  34. #endif
  35.  
  36. #endif  /* !RC_INVOKED */
  37.  
  38.  
  39. #ifndef _SIZE_T
  40. #    define _SIZE_T
  41. typedef unsigned size_t;
  42. #endif
  43.  
  44. #if defined (__USELOCALES__) || defined (__FLAT__)
  45.  
  46. #define LOCALE_ERROR(code) 0x00000100 + code
  47. #define ERROR_LOCALE_INVALID   (APPLICATION_ERROR_MASK + LOCALE_ERROR(1))
  48. #define ERROR_CATEGORY_INVALID (APPLICATION_ERROR_MASK + LOCALE_ERROR(2))
  49. #define ERROR_LOCALE_NOTINSTALLED (APPLICATION_ERROR_MASK + LOCALE_ERROR(3))
  50. #define ERROR_LOCALE_NOTSUPPORTED (APPLICATION_ERROR_MASK + LOCALE_ERROR(4))
  51. #define ERROR_CATEGORY_NOTOPEN (APPLICATION_ERROR_MASK + LOCALE_ERROR(5))
  52.  
  53. #define LC_COLLATE  0x01
  54. #define LC_CTYPE    0x02
  55. #define LC_MONETARY 0x04
  56. #define LC_NUMERIC  0x10
  57. #define LC_TIME     0x20
  58. #define LC_ALL      0xFF
  59. #define LC_MIN      LC_COLLATE
  60. #define LC_MAX      LC_ALL
  61. #define LC_LAST     LC_MAX
  62.  
  63. #else
  64.  
  65. #define LC_ALL      0
  66. #define LC_COLLATE  1
  67. #define LC_CTYPE    2
  68. #define LC_MONETARY 3
  69. #define LC_NUMERIC  4
  70. #define LC_TIME     5
  71. #define LC_MESSAGES 6
  72. #define LC_userdef  7
  73. #define LC_LAST     LC_userdef
  74.  
  75. #endif /* __USELOCALES__ */
  76.  
  77. struct lconv {
  78.  
  79.    char _FAR *decimal_point;
  80.    char _FAR *thousands_sep;
  81.    char _FAR *grouping;
  82.    char _FAR *int_curr_symbol;
  83.    char _FAR *currency_symbol;
  84.    char _FAR *mon_decimal_point;
  85.    char _FAR *mon_thousands_sep;
  86.    char _FAR *mon_grouping;
  87.    char _FAR *positive_sign;
  88.    char _FAR *negative_sign;
  89.    char int_frac_digits;
  90.    char frac_digits;
  91.    char p_cs_precedes;
  92.    char p_sep_by_space;
  93.    char n_cs_precedes;
  94.    char n_sep_by_space;
  95.    char p_sign_posn;
  96.    char n_sign_posn;
  97. };
  98.  
  99. #if !defined(__FLAT__)
  100.  
  101. #ifdef __cplusplus
  102. extern "C" {
  103. #endif
  104. char _FAR * _CType _FARFUNC setlocale( int __category, const char _FAR *__locale );
  105. char _FAR * _CType _FARFUNC _lsetlocale( int __category, const char _FAR *__locale );
  106. struct lconv _FAR * _CType localeconv( void );
  107. struct lconv _FAR * _CType _FARFUNC _llocaleconv( void );
  108. #ifdef __cplusplus
  109. }
  110. #endif
  111.  
  112. #else  /* defined __FLAT__ */
  113.  
  114. #pragma pack(push, 1)
  115.  
  116. #ifdef __cplusplus
  117. extern "C" {
  118. #endif
  119. char *         _RTLENTRY _EXPFUNC setlocale( int __category, const char *__locale );
  120. char *         _RTLENTRY _EXPFUNC _lsetlocale( int __category, const char *__locale );
  121. struct lconv * _RTLENTRY _EXPFUNC localeconv( void );
  122. struct lconv * _RTLENTRY _EXPFUNC _llocaleconv( void );
  123. wchar_t *      _RTLENTRY _EXPFUNC _wsetlocale( int __category, const wchar_t *__locale );
  124. wchar_t *      _RTLENTRY _EXPFUNC _lwsetlocale( int __category, const wchar_t *__locale );
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128.  
  129. #pragma pack(pop) /* restore default packing */
  130.  
  131. #endif  /* __FLAT__ */
  132.  
  133. #if defined( __USELOCALES__ )
  134. #ifndef _UNICODE
  135.   #define setlocale  _lsetlocale
  136. #else
  137.   #define _wsetlocale  _lwsetlocale
  138. #endif
  139. #endif
  140.  
  141. #if !defined(RC_INVOKED)
  142.  
  143. #if defined(__STDC__)
  144. #pragma warn .nak
  145. #endif
  146.  
  147. #endif  /* !RC_INVOKED */
  148.  
  149.  
  150. #endif  /* __LOCALE_H */
  151.  
  152.