home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tvos200.zip / TVISION / _DEFS.H next >
C/C++ Source or Header  |  1995-04-25  |  4KB  |  165 lines

  1. #if !defined(___DEFS_H)
  2. #define ___DEFS_H
  3.  
  4. /*  _defs.h
  5.  
  6.     Common definitions for pointer size and calling conventions.
  7.  
  8.     Calling conventions:
  9.     _RTLENTRY       Specifies the calling convention used by the RTL
  10.  
  11.     _USERENTRY      Specifies the calling convention the RTL expects user
  12.                     compiled functions to use (for callbacks)
  13.  
  14.     Export (and size for DOS) information:
  15.     _EXPCLASS       Exports class if building DLL version of library
  16.                     For DOS16 also provides size information
  17.  
  18.     _EXPDATA        Exports data if building DLL version of library
  19.  
  20.     _EXPFUNC        Exports function if building DLL version of library
  21.                     For DOS16 also provides size information
  22.  
  23.     _FAR            Promotes data pointers to far in DLLs (DOS16 only)
  24.  
  25.     Obsolete versions:
  26.     _Cdecl          Use _RTLENTRY
  27.     _CLASSTYPE      Use _EXPCLASS
  28.     _FARFUNC        Use _EXPFUNC
  29.     _FARCALL        Use _EXPFUNC and declare function explicity __far
  30. */
  31.  
  32. /*
  33.  *      C/C++ Run Time Library - Version 1.5
  34.  *
  35.  *      Copyright (c) 1991, 1994 by Borland International
  36.  *      All Rights Reserved.
  37.  *
  38.  */
  39. #if 0 // ifdef  __BORLANDC__
  40. #   if defined(__MT__)
  41. #       define _MT
  42. #   endif
  43.  
  44. #   define _RTLENTRY  __stdcall
  45. #   define _USERENTRY __stdcall
  46.  
  47. #   if defined(__PAS__)
  48. #       define _RTLENTRYF __pascal
  49. #   else
  50. #       define _RTLENTRYF _RTLENTRY
  51. #   endif
  52.  
  53. #   define _FAR
  54.  
  55. #   if defined(_BUILDRTLDLL)
  56. #       define _EXPCLASS  __export
  57. #       define _EXPDATA   __export
  58. #       define _EXPFUNC   __export
  59. #   else
  60. #       define _EXPCLASS
  61. #       define _EXPDATA
  62. #       define _EXPFUNC
  63. #   endif
  64.  
  65.  
  66. #   define _EXPFUNC32  _EXPFUNC
  67. #   define _EXPFUNC16
  68.  
  69.  
  70. #   define _Cdecl      _RTLENTRY
  71. #   define _CType      _RTLENTRYF
  72. #   define _CLASSTYPE  _EXPCLASS
  73. #   define _FARFUNC    _EXPFUNC
  74. #   define _FARCALL    _EXPFUNC __far
  75.  
  76. #   define _M_IX86 300
  77.  
  78.  
  79. #   if defined(__cplusplus)
  80. #       define _PTRDEF(name) typedef name _FAR * P##name;
  81. #       define _REFDEF(name) typedef name _FAR & R##name;
  82. #       define _REFPTRDEF(name) typedef name _FAR * _FAR & RP##name;
  83. #       define _PTRCONSTDEF(name) typedef const name _FAR * PC##name;
  84. #       define _REFCONSTDEF(name) typedef const name _FAR & RC##name;
  85.  
  86. /*********** Obsolete definitions for OWL 1.0 *************/
  87. #       define _CLASSDEF(name) class _EXPCLASS name; \
  88.                _PTRDEF(name) \
  89.                _REFDEF(name) \
  90.                _REFPTRDEF(name) \
  91.                _PTRCONSTDEF(name) \
  92.                _REFCONSTDEF(name)
  93. #   endif
  94.  
  95. #else
  96.  
  97. //** Defines for non-borland compilers,
  98. #   if defined(__MT__)
  99. #       define _MT
  100. #   endif
  101.  
  102. #   define  BI_NO_NEW_CASTS
  103.  
  104. #   define _RTLENTRY
  105. #   define _USERENTRY
  106.  
  107. #   if defined(__PAS__)
  108. #       define _RTLENTRYF
  109. #   else
  110. #       define _RTLENTRYF
  111. #   endif
  112.  
  113. #   define _FAR
  114. #   if defined(_BUILDRTLDLL)
  115. #       define _EXPCLASS  // __export
  116. #       define _EXPDATA   // __export
  117. #       define _EXPFUNC   // __export
  118. #   else
  119. #       define _EXPCLASS
  120. #       define _EXPDATA
  121. #       define _EXPFUNC
  122. #   endif
  123.  
  124.  
  125. #   define _EXPFUNC32  _EXPFUNC
  126. #   define _EXPFUNC16
  127.  
  128. #   define  _RTL_CDECL  _RTLENTRY
  129. #   define  _RTL_CTYPE  _RTLENTRYF
  130.  
  131.  
  132.  
  133. // #   define _Cdecl      _RTLENTRY     replaced by _RTL_CDECL
  134. // #   define _CType      _RTLENTRYF    replaced by _RTL_CTYPE
  135. #   define _CLASSTYPE  _EXPCLASS
  136. #   define _FARFUNC    _EXPFUNC
  137. #   define _FARCALL    _EXPFUNC
  138.  
  139. #   ifndef _M_IX86
  140. #       define _M_IX86 300
  141. #   endif
  142.  
  143.  
  144. #   if defined(__cplusplus)
  145. #       define _PTRDEF(name) typedef name * P##name;
  146. #       define _REFDEF(name) typedef name & R##name;
  147. #       define _REFPTRDEF(name) typedef name * & RP##name;
  148. #       define _PTRCONSTDEF(name) typedef const name * PC##name;
  149. #       define _REFCONSTDEF(name) typedef const name & RC##name;
  150.  
  151. /*********** Obsolete definitions for OWL 1.0 *************/
  152. #       define _CLASSDEF(name) class _EXPCLASS name; \
  153.                _PTRDEF(name) \
  154.                _REFDEF(name) \
  155.                _REFPTRDEF(name) \
  156.                _PTRCONSTDEF(name) \
  157.                _REFCONSTDEF(name)
  158. #   endif
  159. #endif  // BORLANDC
  160.  
  161.  
  162. #endif  /* ___DEFS_H */
  163.  
  164.  
  165.