Leaked source code of windows server 2003
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.

256 lines
7.0 KiB

  1. /***********************************************************************
  2. * *
  3. * Filename: COMMON.X *
  4. * Module: Common Types and Declarations *
  5. * Author: Daniel Baumberger *
  6. * *
  7. ***********************************************************************
  8. * *
  9. * Copyright (C) 1994 Intel Corporation ALL RIGHTS RESERVED *
  10. * *
  11. * INTEL CORPORATION PROPRIETARY INFORMATION *
  12. * *
  13. * This software is supplied under the terms of a license agree- *
  14. * ment or non-disclosure agreement with Intel Corporation *
  15. * and may not be copied nor disclosed except in accordance *
  16. * with the terms of that agreement. *
  17. * *
  18. ***********************************************************************
  19. * *
  20. * PURPOSE: Defines common types and macros applicable to all modules. *
  21. * *
  22. * NOTES: *
  23. * *
  24. ***********************************************************************
  25. *
  26. * HISTORY:
  27. *
  28. * $Log: S:/STURGEON/SRC/H245/INCLUDE/VCS/common.x_v $
  29. Rev 1.0 09 May 1996 21:05:04 EHOWARDX
  30. Initial revision.
  31. Rev 1.0 08 May 1996 13:37:14 unknown
  32. Initial revision.
  33. Rev 1.2 23 Jan 1996 14:36:34 sing
  34. use __export WINAPI for WIN16
  35. Rev 1.1 21 Jan 1996 21:05:40 RGILLIKK
  36. New unified H324API.H, common for 16 & 32 bits
  37. *
  38. * Rev 1.25 18 Dec 1995 09:09:54 DBAUMBER
  39. * Fixed the VOID type to Windows.H compatible.
  40. *
  41. * Rev 1.24 07 Sep 1995 09:42:28 DBAUMBER
  42. * Moved msecs() to OIL.X.
  43. *
  44. * Rev 1.23 21 Jun 1995 11:05:42 RAMANAN
  45. * Removed priority literals
  46. *
  47. * Rev 1.22 21 Jun 1995 09:37:24 KHELM
  48. * Added task priority stuff
  49. *
  50. * Rev 1.21 21 Jun 1995 09:02:52 KHELM
  51. * Added FAX_TASK_PRIORITY and TIMER_TASK_PRIORITY
  52. *
  53. * Rev 1.20 21 Apr 1995 09:12:12 KHELM
  54. *
  55. * Rev 1.19 05 Apr 1995 14:46:38 DBAUMBER
  56. * Updated msecs for the 1ms system tick with IASPOX27.
  57. *
  58. * Rev 1.18 14 Mar 1995 14:45:38 DBAUMBER
  59. * Moved TRACE and ASSERT macros to OILDEBUG.X.
  60. *
  61. * Rev 1.17 23 Feb 1995 10:52:40 RAMANAN
  62. * Oops, Missed non-debug case for TRACE4.
  63. *
  64. * Rev 1.16 23 Feb 1995 10:51:44 RAMANAN
  65. * Added TRACE4 macro that can take four parameters.
  66. *
  67. * Rev 1.15 13 Dec 1994 09:53:08 DBAUMBER
  68. * Added more "pointer to pointer" types. Added TRACE macros.
  69. *
  70. * Rev 1.14 13 Dec 1994 09:45:06 KHELM
  71. * Added PPBYTE
  72. *
  73. * Rev 1.13 28 Nov 1994 16:52:30 RAMANAN
  74. * No change.
  75. *
  76. * Rev 1.12 18 Oct 1994 14:55:26 KHELM
  77. * Added FUNCPTRWPTR
  78. *
  79. * Rev 1.11 13 Oct 1994 10:17:12 KHELM
  80. * Added BYFUNCPTR type.
  81. *
  82. * Rev 1.10 06 Oct 1994 09:42:04 DBAUMBER
  83. * Added ASSERTMSG macro. Changed definition of VOID to work with NuMA.
  84. *
  85. * Rev 1.9 23 Sep 1994 11:36:38 DBAUMBER
  86. * Changed FLOAT to FLOATING to make compiler happy.
  87. *
  88. * Rev 1.8 23 Sep 1994 11:29:26 DBAUMBER
  89. * Fixed type definition problem with PPOINTER.
  90. *
  91. * Rev 1.7 23 Sep 1994 11:20:18 DBAUMBER
  92. * Fixed a bug in the ASSERT macro. Added new pointer to pointer types.
  93. *
  94. * Rev 1.6 21 Sep 1994 16:12:46 DBAUMBER
  95. * Added ASSERT macro.
  96. *
  97. * Rev 1.5 12 Sep 1994 09:49:18 DBAUMBER
  98. * Changed BOOL from BYTE to DWORD. Added FUNCPTR.
  99. *
  100. * Rev 1.4 31 Aug 1994 13:21:50 DBAUMBER
  101. * Added PFxn and PVoidFxn types.
  102. *
  103. * Rev 1.3 17 Aug 1994 13:10:52 DBAUMBER
  104. * Reversed the definitions for PUBLIC and LOCAL.
  105. *
  106. * Rev 1.2 17 Aug 1994 10:30:04 DBAUMBER
  107. * PUBLIC changed to EXPORT definition.
  108. * LOCAL added as non-static, non-DLL exported definition.
  109. * EXPORT definition removed.
  110. *
  111. * Rev 1.1 17 Aug 1994 10:23:26 DBAUMBER
  112. * EXPORT macro added that will export a function from a DLL.
  113. * PUBLIC macro changed so that it will not necessarily export a function.
  114. * TRUE/FALSE macro changed so they will not clash with standard defs.
  115. * OK/NOT_OK removed.
  116. *
  117. * Rev 1.0 12 Aug 1994 08:53:18 DBAUMBER
  118. * Initial revision.
  119. *
  120. ***********************************************************************/
  121. #ifndef _COMMON_X_INCLUDED_
  122. #define _COMMON_X_INCLUDED_
  123. /*
  124. * Declaration modifier macros
  125. */
  126. #define IN
  127. #define OUT
  128. #define OPTIONAL
  129. #ifdef WIN16
  130. #define PUBLIC __export WINAPI
  131. #else
  132. #define PUBLIC _declspec(dllexport)
  133. #endif
  134. #define LOCAL static
  135. #define PRIVATE
  136. #define INLINE __inline
  137. /*
  138. * Packing alignment modifiers
  139. */
  140. #define BYTE_ALIGN 1
  141. #define WORD_ALIGN 2
  142. #define DWORD_ALIGN 4
  143. /*
  144. * BOOL constants
  145. */
  146. #ifndef TRUE
  147. #define TRUE 1
  148. #endif
  149. #ifndef FALSE
  150. #define FALSE 0
  151. #endif
  152. /*
  153. * Built-in type aliases
  154. */
  155. typedef char CHAR;
  156. #if !defined(NUMA) && !defined(WIN32) && !defined(WIN16) && !defined(VOID)
  157. typedef void VOID;
  158. #endif
  159. typedef double FLOATING;
  160. #ifndef WIN16
  161. typedef char* PSTR;
  162. #endif
  163. typedef PSTR* PPSTR;
  164. typedef void* POINTER;
  165. typedef POINTER* PPOINTER;
  166. /*
  167. * Signed integer types
  168. */
  169. typedef signed char INT8;
  170. typedef signed short INT16;
  171. typedef signed long INT32;
  172. typedef INT8* PINT8;
  173. typedef INT8** PPINT8;
  174. typedef INT16* PINT16;
  175. typedef INT16** PPINT16;
  176. typedef INT32* PINT32;
  177. typedef INT32** PPINT32;
  178. /*
  179. * Unsigned integer types
  180. */
  181. typedef unsigned char BYTE;
  182. typedef unsigned short WORD;
  183. typedef unsigned long DWORD;
  184. #ifndef WIN16
  185. typedef BYTE* PBYTE;
  186. #endif
  187. typedef BYTE** PPBYTE;
  188. #ifndef WIN16
  189. typedef WORD* PWORD;
  190. #endif
  191. typedef WORD** PPWORD;
  192. #ifndef WIN16
  193. typedef DWORD* PDWORD;
  194. #endif
  195. typedef DWORD** PPDWORD;
  196. /*
  197. * Boolean type
  198. */
  199. typedef int BOOL;
  200. /*
  201. * Global handle types
  202. */
  203. typedef DWORD InstanceHandle;
  204. typedef DWORD IdHandle;
  205. /*
  206. * Function pointer types
  207. */
  208. typedef INT32 (*PFxn) ();
  209. typedef VOID (*PVoidFxn)();
  210. typedef VOID (*FUNCPTR) ();
  211. typedef BYTE (*BYFUNCPTR) ();
  212. typedef VOID (*FUNCPTRWPTR) (POINTER);
  213. /*
  214. * Global return types
  215. */
  216. typedef INT32 RESULT;
  217. #define ticks(ticks_in) (ticks_in)
  218. #define FOREVER while ( 1 )
  219. #endif /* COMMON_X_INCLUDED */