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.

229 lines
9.1 KiB

  1. #ifndef _INSIGNIA_H
  2. #define _INSIGNIA_H
  3. /*
  4. * Name: insignia.h
  5. * Derived from: HP 2.0 insignia.h
  6. * Author: Philippa Watson (amended Dave Bartlett)
  7. * Created on: 23 January 1991
  8. * SccsID: @(#)insignia.h 1.2 03/11/91
  9. * Purpose: This file contains the definition of the Insignia
  10. * standard types and constants for the NT/WIN32
  11. * SoftPC.
  12. *
  13. * (c)Copyright Insignia Solutions Ltd., 1991. All rights reserved.
  14. */
  15. /*
  16. * Insignia Standard Types
  17. *
  18. * Note that the EXTENDED type is the same as the DOUBLE type for the
  19. * HP because there is no difference between the double and long double
  20. * fundamental types, it's an ANSI compiler feature.
  21. */
  22. #ifndef NT_INCLUDED
  23. #include <windows.h>
  24. ULONG
  25. DbgPrint(
  26. PCH Format,
  27. ...
  28. );
  29. #endif
  30. #include <base_def.h>
  31. #define VOID void /* Nothing */
  32. #if !defined(_WINDOWS_) && !defined(NT_INCLUDED) /* Types already defined by windows */
  33. typedef char CHAR; /* Used as a text character */
  34. #endif
  35. typedef signed char TINY; /* 8-bit signed integer */
  36. #if !defined(_WINDOWS_) && !defined(NT_INCLUDED) /* Types already defined by windows */
  37. typedef short SHORT; /* 16-bit signed integer */
  38. //typedef long LONG; /* 32-bit signed integer */
  39. #endif
  40. typedef unsigned char UTINY; /* 8-bit unsigned integer */
  41. #if !defined(_WINDOWS_) && !defined(NT_INCLUDED) /* Types already defined by windows */
  42. typedef unsigned char UCHAR; /* 8-bit unsigned integer */
  43. typedef unsigned short USHORT; /* 16-bit unsigned integer */
  44. //typedef unsigned long ULONG; /* 32-bit unsigned integer */
  45. typedef unsigned short WORD; /* 16-bit unsigned integer */
  46. typedef unsigned long DWORD; /* 32-bit unsigned integer */
  47. typedef float FLOAT; /* 32-bit floating point */
  48. //typedef double DOUBLE; /* 64-bit floating point */
  49. #endif
  50. typedef double EXTENDED; /* >64-bit floating point */
  51. typedef int IBOOL; /* True/False */
  52. typedef signed char IS8; /* 8 bit signed int */
  53. typedef unsigned char IU8; /* 8 bit unsigned int */
  54. typedef signed char ISM8; /* 8 bit signed int */
  55. typedef unsigned char IUM8; /* 8 bit unsigned int */
  56. typedef short IS16; /* 16 bit signed int */
  57. typedef unsigned short IU16; /* 16 bit unsigned int */
  58. typedef short ISM16; /* 16 bit signed int */
  59. typedef unsigned short IUM16; /* 16 bit unsigned int */
  60. typedef long IS32; /* 32 bit signed int */
  61. typedef unsigned long IU32; /* 32 bit unsigned int */
  62. typedef long ISM32; /* 32 bit signed int */
  63. typedef unsigned long IUM32; /* 32 bit unsigned int */
  64. typedef void * IHP; /* a generic pointer type */
  65. typedef unsigned int IHPE; /* an integer the same size as a IHP */
  66. typedef int ISH; /* Host register sized signed quantity */
  67. typedef unsigned int IUH; /* Host register sized unsigned quantity */
  68. #define LONG_SHIFT 2
  69. /*
  70. * Insignia Standard Constants
  71. */
  72. #ifndef FALSE
  73. #define FALSE ((BOOL) 0) /* Boolean falsehood value */
  74. #define TRUE (!FALSE) /* Boolean truth value */
  75. #endif
  76. #ifndef STRINGIFY
  77. #define STRINGIFY(x) #x
  78. #endif
  79. #if !defined(_WINDOWS_) && !defined(NT_INCLUDED) /* Types already defined by windows */
  80. //typedef int INT;
  81. typedef unsigned int UINT;
  82. #endif
  83. #ifndef NULL
  84. #define NULL (0L) /* Null pointer value */
  85. #endif
  86. #ifndef BOOL
  87. #ifdef NT_INCLUDED
  88. #if !defined(_WINDOWS_) /* Types already defined by windows */
  89. typedef int BOOL; /* only defined in windows */
  90. #endif
  91. #else
  92. #define BOOL UINT
  93. #endif
  94. #endif
  95. /*
  96. * Insignia Standard Storage Classes
  97. */
  98. #define GLOBAL /* Defined as nothing */
  99. #define LOCAL static /* Local to the source file */
  100. #define SAVED static /* For local static variables */
  101. #define IMPORT extern /* To refer from another file */
  102. #define FORWARD /* to refer from the same file */
  103. #define FAST register /* High-speed Storage */
  104. /*
  105. ** ANSI-independent function prototypes and definition macros.
  106. **
  107. ** A function prototype looks like:
  108. **
  109. ** IMPORT USHORT func IPT2(UTINY, param0, CHAR *, param1);
  110. **
  111. ** i.e. macro IPTn is used for a function with n parameters.
  112. **
  113. ** The corresponding function definition looks like:
  114. **
  115. ** GLOBAL USHORT funct IFN2(UTINY, param0, CHAR *, param1)
  116. ** {
  117. ** ... function body ...
  118. ** }
  119. **
  120. ** Limitations: only parameters with declarations of the form "type name" can
  121. ** be handled. This rules out arrays (can use pointer syntax instead) and
  122. ** parameters which are pointers to functions or something similar. The previous** method of using ifdef ANSI must be used for these cases.
  123. **
  124. */
  125. #ifdef ANSI
  126. /* Function prototypes */
  127. #define IPT0() (void)
  128. #define IPT1(t1, n1) (t1 n1)
  129. #define IPT2(t1, n1, t2, n2) (t1 n1, t2 n2)
  130. #define IPT3(t1, n1, t2, n2, t3, n3) (t1 n1, t2 n2, t3 n3)
  131. #define IPT4(t1, n1, t2, n2, t3, n3, t4, n4) (t1 n1, t2 n2, t3 n3, t4 n4)
  132. #define IPT5(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5) \
  133. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
  134. #define IPT6(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6) \
  135. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6)
  136. #define IPT7(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7) \
  137. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7)
  138. #define IPT8(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7, t8, n8) \
  139. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8)
  140. /* Function definitions */
  141. #define IFN0() (void)
  142. #define IFN1(t1, n1) (t1 n1)
  143. #define IFN2(t1, n1, t2, n2) (t1 n1, t2 n2)
  144. #define IFN3(t1, n1, t2, n2, t3, n3) (t1 n1, t2 n2, t3 n3)
  145. #define IFN4(t1, n1, t2, n2, t3, n3, t4, n4) (t1 n1, t2 n2, t3 n3, t4 n4)
  146. #define IFN5(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5) \
  147. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
  148. #define IFN6(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6) \
  149. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6)
  150. #define IFN7(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7) \
  151. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7)
  152. #define IFN8(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7, t8, n8) \
  153. (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7, t8 n8)
  154. #else /* ANSI */
  155. /* Function prototypes */
  156. #define IPT0() ()
  157. #define IPT1(t1, n1) ()
  158. #define IPT2(t1, n1, t2, n2) ()
  159. #define IPT3(t1, n1, t2, n2, t3, n3) ()
  160. #define IPT4(t1, n1, t2, n2, t3, n3, t4, n4) ()
  161. #define IPT5(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5) ()
  162. #define IPT6(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6) ()
  163. #define IPT7(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7) ()
  164. #define IPT8(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7, t8, n8) \
  165. ()
  166. /* Function definitions */
  167. #define IFN0() ()
  168. #define IFN1(t1, n1) (n1) \
  169. t1 n1;
  170. #define IFN2(t1, n1, t2, n2) (n1, n2) \
  171. t1 n1; t2 n2;
  172. #define IFN3(t1, n1, t2, n2, t3, n3) (n1, n2, n3) \
  173. t1 n1; t2 n2; t3 n3;
  174. #define IFN4(t1, n1, t2, n2, t3, n3, t4, n4) (n1, n2, n3, n4) \
  175. t1 n1; t2 n2; t3 n3; t4 n4;
  176. #define IFN5(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5) \
  177. (n1, n2, n3, n4, n5) \
  178. t1 n1; t2 n2; t3 n3; t4 n4; \
  179. t5 n5;
  180. #define IFN6(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6) \
  181. (n1, n2, n3, n4, n5, n6) \
  182. t1 n1; t2 n2; t3 n3; t4 n4; \
  183. t5 n5; t6 n6;
  184. #define IFN7(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7) \
  185. (n1, n2, n3, n4, n5, n6, n7) \
  186. t1 n1; t2 n2; t3 n3; t4 n4; \
  187. t5 n5; t6 n6; t7 n7;
  188. #define IFN8(t1, n1, t2, n2, t3, n3, t4, n4, t5, n5, t6, n6, t7, n7, t8, n8) \
  189. (n1, n2, n3, n4, n5, n6, n7, n8)\
  190. t1 n1; t2 n2; t3 n3; t4 n4; \
  191. t5 n5; t6 n6; t7 n7; t8 n8;
  192. #endif /* ANSI */
  193. #pragma warning (3:4013)
  194. #endif /* _INSIGNIA_H */