home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / locale.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  3.0 KB  |  126 lines

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