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.

101 lines
2.1 KiB

  1. /* yvals.h values header for Microsoft C/C++ */
  2. #ifndef _YVALS
  3. #define _YVALS
  4. #pragma warning(4: 4018 4114 4146 4245)
  5. #pragma warning(4: 4663 4664 4665)
  6. #pragma warning(disable: 4237 4244 4290)
  7. /* NAMESPACE */
  8. #define _STD ::
  9. #define _STD_BEGIN
  10. #define _STD_END
  11. #ifdef _MSC_VER
  12. /*
  13. * Currently, all MS C compilers for Win32 platforms default to 8 byte
  14. * alignment.
  15. */
  16. #pragma pack(push,8)
  17. #endif /* _MSC_VER */
  18. /* TYPE bool */
  19. typedef int bool;
  20. #if !defined(false)
  21. #define false 0
  22. #endif
  23. #if !defined(true)
  24. #define true 1
  25. #endif
  26. #if defined(__cplusplus)
  27. struct _Bool {
  28. _Bool()
  29. : _Val(0) {}
  30. _Bool(int _V)
  31. : _Val(_V != 0) {}
  32. _Bool& operator=(int _V)
  33. {_Val = _V != 0;
  34. return (*this); }
  35. _Bool& operator+=(const _Bool& _X)
  36. {_Val += _X._Val; // for valarray
  37. return (*this); }
  38. operator int() const
  39. {return (_Val); }
  40. private:
  41. char _Val;
  42. };
  43. #endif
  44. /* INTEGER PROPERTIES */
  45. #define _MAX_EXP_DIG 8 /* for parsing numerics */
  46. #define _MAX_INT_DIG 32
  47. #define _MAX_SIG_DIG 36
  48. /* wchar_t PROPERTIES */
  49. typedef unsigned short _Wchart;
  50. #if !defined(__cplusplus)
  51. typedef _Wchart _Wchart_unique;
  52. #else
  53. struct _Wchart_unique {
  54. _Wchart_unique()
  55. : _Val(0) {}
  56. _Wchart_unique(_Wchart _V)
  57. : _Val(_V) {}
  58. _Wchart_unique(const _Wchart_unique& _R)
  59. : _Val(_R._Val) {}
  60. _Wchart_unique& operator=(_Wchart _V)
  61. {_Val = _V;
  62. return (*this); }
  63. operator _Wchart() const
  64. {return (_Val); }
  65. private:
  66. _Wchart _Val;
  67. };
  68. #endif /* __cplusplus */
  69. /* STDIO PROPERTIES */
  70. #define _Filet _iobuf
  71. #ifndef _FPOS_T_DEFINED
  72. #define _FPOSOFF(fp) ((long)(fp))
  73. #endif /* _FPOS_T_DEFINED */
  74. /* NAMING PROPERTIES */
  75. #if defined(__cplusplus)
  76. #define _C_LIB_DECL extern "C" {
  77. #define _END_C_LIB_DECL }
  78. #else
  79. #define _C_LIB_DECL
  80. #define _END_C_LIB_DECL
  81. #endif /* __cplusplus */
  82. /* MISCELLANEOUS MACROS */
  83. #define _L(c) L##c
  84. #define _Mbstinit(x) mbstate_t x = {0}
  85. #ifdef _MSC_VER
  86. #pragma pack(pop)
  87. #endif /* _MSC_VER */
  88. #endif /* _YVALS */
  89. /*
  90. * Copyright (c) 1996 by P.J. Plauger. ALL RIGHTS RESERVED.
  91. * Consult your license regarding permissions and restrictions.
  92. */