home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / _loc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.9 KB  |  123 lines

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