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.

205 lines
4.7 KiB

  1. /************************************************************************/
  2. /* */
  3. /* RCPP - Resource Compiler Pre-Processor for NT system */
  4. /* */
  5. /* RCPPTYPE.H - Type definitions for RCPP */
  6. /* */
  7. /* 04-Dec-90 w-BrianM Update for NT from PM SDK RCPP */
  8. /* */
  9. /************************************************************************/
  10. /************************************************************************/
  11. /* Define types for greater visibility and easier portability */
  12. /************************************************************************/
  13. #ifndef _WINDOWS_
  14. typedef char CHAR;
  15. typedef unsigned char BYTE;
  16. typedef CHAR * PCHAR;
  17. typedef unsigned short WCHAR;
  18. typedef unsigned char UCHAR;
  19. typedef UCHAR * PUCHAR;
  20. typedef short SHORT;
  21. typedef SHORT * PSHORT;
  22. typedef unsigned short USHORT;
  23. typedef USHORT * PUSHORT;
  24. typedef int INT;
  25. typedef INT BOOL;
  26. typedef INT * PINT;
  27. typedef unsigned int UINT;
  28. typedef UINT * PUINT;
  29. typedef long LONG;
  30. typedef LONG * PLONG;
  31. typedef unsigned long ULONG;
  32. typedef ULONG * PULONG;
  33. typedef void VOID;
  34. typedef VOID * PVOID;
  35. #endif
  36. typedef double DOUBLE;
  37. typedef DOUBLE * PDOUBLE;
  38. /************************************************************************/
  39. /* */
  40. /* Define internal types */
  41. /* */
  42. /************************************************************************/
  43. #define TRUE 1
  44. #define FALSE 0
  45. #define EXTERN extern
  46. #define REG register
  47. #define STATIC static
  48. #define BIG_BUFFER 512
  49. #define MED_BUFFER 256
  50. #define SMALL_BUFFER 128
  51. #define TINY_BUFFER 32
  52. #define MSG_BUFF_SIZE 256
  53. #define IFSTACK_SIZE TINY_BUFFER
  54. /*
  55. ** some commonly used typdefs for scalar items
  56. */
  57. typedef UINT p1key_t;
  58. typedef UCHAR hash_t;
  59. typedef UCHAR token_t;
  60. typedef UCHAR shape_t;
  61. typedef UCHAR blknum_t; /* lexical level */
  62. typedef UCHAR class_t;
  63. typedef USHORT btype_t; /* basic type specifier */
  64. typedef USHORT refcnt_t; /* symbol's reference count */
  65. typedef USHORT hey_t; /* unique keys */
  66. typedef USHORT offset_t; /* members offset within a struct */
  67. typedef ULONG abnd_t; /* array bound type */
  68. typedef ULONG len_t; /* number of bytes/bits of member/field */
  69. typedef struct s_adj symadj_t;
  70. typedef struct s_defn defn_t;
  71. typedef struct s_flist flist_t;
  72. typedef struct s_indir indir_t;
  73. typedef struct s_stack stack_t;
  74. typedef struct s_sym sym_t;
  75. typedef struct s_table table_t;
  76. typedef struct s_toklist toklist_t;
  77. typedef struct s_tree tree_t;
  78. typedef struct s_type type_t;
  79. typedef struct s_case case_t;
  80. typedef union u_ivalue ivalue_t;
  81. /*
  82. ** abstract char pointer types
  83. */
  84. typedef PUCHAR ptext_t; /* wherever input text comes from */
  85. /*
  86. ** other abstract pointer types
  87. */
  88. typedef type_t * ptype_t; /* ptr to types */
  89. typedef indir_t * pindir_t; /* ptr to indirections */
  90. typedef flist_t * pflist_t; /* ptr to formal list type */
  91. typedef sym_t * psym_t; /* symbol ptrs */
  92. typedef defn_t * pdefn_t; /* #define names */
  93. typedef tree_t * ptree_t;
  94. typedef struct s_realt {
  95. LONG S_sizet;
  96. DOUBLE S_realt;
  97. } Srealt_t;
  98. /* declspec type */
  99. struct s_declspec {
  100. class_t ds_calss;
  101. ptype_t ds_type;
  102. };
  103. typedef struct s_declspec declspec_t;
  104. typedef declspec_t * pdeclspec_t;
  105. /* string type */
  106. struct s_string {
  107. CHAR * str_ptr;
  108. USHORT str_len;
  109. };
  110. typedef struct s_string string_t;
  111. typedef string_t * pstring_t;
  112. /* rcon type */
  113. struct rcon {
  114. Srealt_t rcon_real;
  115. };
  116. typedef struct rcon rcon_t;
  117. typedef struct rcon * prcon_t;
  118. /* hln type */
  119. struct s_hln {
  120. PCHAR hln_name;
  121. UCHAR hln_hash;
  122. UCHAR hln_length;
  123. };
  124. typedef struct s_hln hln_t;
  125. typedef hln_t * phln_t;
  126. /*
  127. ** union used to return values from the lexer
  128. */
  129. typedef union s_lextype {
  130. btype_t yy_btype;
  131. PCHAR yy_cstr;
  132. int yy_int;
  133. int yy_class;
  134. long yy_long;
  135. hln_t yy_ident;
  136. declspec_t yy_declspec;
  137. string_t yy_string;
  138. psym_t yy_symbol;
  139. token_t yy_token;
  140. ptree_t yy_tree;
  141. ptype_t yy_type;
  142. } lextype_t;
  143. /* value_t definition */
  144. union u_value {
  145. prcon_t v_rcon;
  146. long v_long;
  147. string_t v_string;
  148. psym_t v_symbol;
  149. };
  150. typedef union u_value value_t;
  151. /* keytab_t definition */
  152. typedef struct {
  153. char * k_text;
  154. UCHAR k_token;
  155. } keytab_t;
  156. /************************************************************************/
  157. /* LIST definition for \D values */
  158. /************************************************************************/
  159. #define MAXLIST 100
  160. typedef struct LIST {
  161. INT li_top;
  162. CHAR * li_defns[MAXLIST];
  163. } LIST;
  164. #define UNREFERENCED_PARAMETER(x) (x)