home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / MAPTYPES.H < prev    next >
Text File  |  1996-04-15  |  14KB  |  342 lines

  1. /*****************************************************************************/
  2. /* File:                                             IBM INTERNAL USE ONLY813*/
  3. /*   maptypes.h                                                              */
  4. /*                                                                           */
  5. /* Description:                                                              */
  6. /*                                                                           */
  7. /*   Record type definitions for types mapping functions.                    */
  8. /*                                                                           */
  9. /* History:                                                                  */
  10. /*...                                                                        */
  11. /*... 03/01/93  813   Selwyn    Changes for HL02/HL03.                       */
  12. /*****************************************************************************/
  13.  
  14. /*****************************************************************************/
  15. /* Microsoft Types structures.                                               */
  16. /*****************************************************************************/
  17.  
  18. /*****************************************************************************/
  19. /* STRUCTURE Record.                                                         */
  20. /* - Variable length fields "BitLen" and "NumMems" are not present in the    */
  21. /*   structure. They would be taken care in the code.                        */
  22. /* - "Pck'd" field is not mapped and so is not present in the structure.     */
  23. /*****************************************************************************/
  24. typedef struct                          /* Type Number : 0x79                */
  25. {
  26.   UCHAR   FID_TypeListIndex;
  27.   USHORT  TypeListIndex;
  28.   UCHAR   FID_NameListIndex;
  29.   USHORT  NameListIndex;
  30.   UCHAR   FID_Name;
  31.   UCHAR   NameLen;
  32.   CHAR    Name[1];
  33. } MS_STRUCT;
  34.  
  35. /*****************************************************************************/
  36. /* BIT FIELD Record.                                                         */
  37. /*****************************************************************************/
  38. typedef struct                          /* Type Number : 0x5C                */
  39. {
  40.   CHAR  BitSize;
  41.   CHAR  BaseType;
  42.   CHAR  Offset;
  43. } MS_BITFLD;
  44.  
  45. /*****************************************************************************/
  46. /* USERDEF Record.                                                           */
  47. /*****************************************************************************/
  48. typedef struct                          /* Type Number : 0x5D                */
  49. {
  50.   UCHAR   FID_TypeIndex;
  51.   USHORT  TypeIndex;
  52.   UCHAR   FID_Name;
  53.   UCHAR   NameLen;
  54.   CHAR    Name[1];
  55. } MS_USERDEF;
  56.  
  57. /*****************************************************************************/
  58. /* POINTER Record.                                                           */
  59. /*****************************************************************************/
  60. typedef struct                          /* Type Number : 0x7A                */
  61. {
  62.   CHAR    Model;
  63.   UCHAR   FID_TypeIndex;
  64.   USHORT  TypeIndex;
  65.   UCHAR   FID_Name;
  66.   UCHAR   NameLen;
  67.   CHAR    Name[1];
  68. } MS_POINTER;
  69.  
  70. /*****************************************************************************/
  71. /* SCALAR Record.                                                            */
  72. /* - The fields that are present after the "Enum Tag Name" (which is variable*/
  73. /*   length) are not included in the structure ("Name Index", "Lower bound"  */
  74. /*   and "Upper bound") and they will be taken care in the code.             */
  75. /*                                                                           */
  76. /* - Microsoft "Base Type" field will be mapped to "Data Type" in internal   */
  77. /*   format by converting Microsoft designators to primitive types.          */
  78. /*****************************************************************************/
  79. typedef struct                          /* Type Number : 0x7B                */
  80. {
  81.   UCHAR   BitLength;
  82.   UCHAR   BaseType;
  83.   UCHAR   FID_Name;
  84.   UCHAR   NameLen;
  85.   CHAR    Name[1];
  86. } MS_SCALAR;
  87.  
  88. /*****************************************************************************/
  89. /* ARRAY Record.                                                             */
  90. /* - Variable length field "Length" (appears after TRec) is not included in  */
  91. /*   the structure and will be taken care in the code.                       */
  92. /*****************************************************************************/
  93. typedef struct                          /* Type Number : 0x78                */
  94. {
  95.   UCHAR   FID_ElemType;
  96.   USHORT  ElemType;
  97.   UCHAR   FID_IndexMethod;
  98.   USHORT  IndexMethod;
  99.   UCHAR   FID_Name;
  100.   UCHAR   NameLen;
  101.   CHAR    Name[1];
  102. } MS_ARRAY;
  103.  
  104. /*****************************************************************************/
  105. /* PROCEDURE/FUNCTION Records.                                               */
  106. /* - Calling conventions field will be mapped to IBM type qualifier byte in  */
  107. /*   the internal format.                                                    */
  108. /*****************************************************************************/
  109. typedef struct                          /* Type Number : 0x75                */
  110. {
  111.   CHAR    Null;
  112.   UCHAR   FID_ReturnType;
  113.   USHORT  ReturnType;
  114.   CHAR    CallConv;
  115.   CHAR    NumParams;
  116.   UCHAR   FID_ParmListIndex;
  117.   USHORT  ParmListIndex;
  118. } MS_PROC;
  119.  
  120. /*****************************************************************************/
  121. /* SKIP Record.                                                              */
  122. /*****************************************************************************/
  123. typedef struct                          /* Type Number : 0x90                */
  124. {
  125.   USHORT  NewIndex;
  126. } MS_SKIP;
  127.  
  128. /*****************************************************************************/
  129. /* IBM HLL Types structures.                                                 */
  130. /*****************************************************************************/
  131.  
  132. /*****************************************************************************/
  133. /* STRUCTURE Record.                                                         */
  134. /*****************************************************************************/
  135. typedef struct                          /* Type Number : 0x79                */
  136. {
  137.   CHAR    TypeQual;
  138.   LONG    ByteSize;
  139.   USHORT  NumMembers;
  140.   UCHAR   FID_TypeListIndex;
  141.   USHORT  TypeListIndex;
  142.   UCHAR   FID_NameListIndex;
  143.   USHORT  NameListIndex;
  144.   UCHAR   FID_Name;
  145.   UCHAR   NameLen;
  146.   CHAR    Name[1];
  147. } HL_STRUCT;
  148.  
  149. /*****************************************************************************/
  150. /* CLASS Record.                                                             */
  151. /*****************************************************************************/
  152. typedef struct
  153. {
  154.  UCHAR ENC_1stByte;
  155.  UCHAR ENC_2ndByte;
  156. }ENCLEN;
  157.  
  158. typedef struct                          /* Type Number : 0x40                */
  159. {
  160.   CHAR   TypeQual;
  161.   LONG   ByteSize;
  162.   USHORT NumMembers;
  163.   USHORT TypeListIndex;
  164.   ENCLEN EncLen;
  165. } HL_CLASS;
  166.  
  167. /*****************************************************************************/
  168. /* Member Function Record. virtual/non-virtual                               */
  169. /*****************************************************************************/
  170. typedef struct                          /* Type Number : 0x45                */
  171. {
  172.   UCHAR   TypeQual;
  173.   UCHAR   Protection;
  174.   UCHAR   FuncType;
  175.   USHORT  SubRecIndex;
  176.   union
  177.   {
  178.    ENCLEN  EncLen;
  179.    struct
  180.    {
  181.     UCHAR  FidSpan;
  182.     UCHAR  VirtNo;                      /* variable. may be 4 bytes.         */
  183.    }vTableIndex;
  184.   }fid;
  185. } HL_MEMFNC;
  186.  
  187. /*****************************************************************************/
  188. /* Class Member Record.                                                      */
  189. /*  - there may be two ENC names following the offset.                       */
  190. /*****************************************************************************/
  191. typedef struct                          /* Type Number : 0x46                */
  192. {
  193.   UCHAR   TypeQual;
  194.   UCHAR   Protection;
  195.   USHORT  TypeIndex;
  196.   UCHAR   FidSpan;
  197.   UCHAR   Offset;                      /* variable 1,2, or 4 bytes.         */
  198. } HL_CLSMEM;
  199.  
  200. /*****************************************************************************/
  201. /* Base Class Record.                                                        */
  202. /*****************************************************************************/
  203. typedef struct                          /* Type Number : 0x41                */
  204. {
  205.   UCHAR   TypeQual;
  206.   UCHAR   Protection;
  207.   USHORT  TypeIndex;
  208.   UCHAR   FidSpan;
  209.   UCHAR   Offset;                      /* variable 1,2, or 4 bytes.         */
  210. } HL_BSECLS;
  211.  
  212. /*****************************************************************************/
  213. /* ClassDef Record.                                                          */
  214. /*****************************************************************************/
  215. typedef struct                          /* Type Number : 0x43                */
  216. {
  217.   UCHAR   TypeQual;
  218.   UCHAR   Protection;
  219.   USHORT  TypeIndex;
  220.   USHORT  ClassType;
  221. } HL_CLSDEF;
  222.  
  223. /*****************************************************************************/
  224. /* Reference Record.                                                         */
  225. /*****************************************************************************/
  226. typedef struct                          /* Type Number : 0x48                */
  227. {
  228.   UCHAR   TypeQual;
  229.   USHORT  TypeIndex;
  230. } HL_REF;
  231.  
  232. /*****************************************************************************/
  233. /* Friend record.                                                            */
  234. /*****************************************************************************/
  235. typedef struct                          /* Type Number : 0x42                */
  236. {
  237.   CHAR   TypeQual;
  238.   USHORT TypeIndex;
  239.   ENCLEN EncLen;
  240. } HL_FRIEND;
  241.  
  242. /*****************************************************************************/
  243. /* BIT FIELD Record.                                                         */
  244. /*****************************************************************************/
  245. typedef struct                          /* Type Number : 0x5C                */
  246. {
  247.   CHAR  TypeQual;
  248.   CHAR  Offset;
  249.   CHAR  FID_Span;
  250.   CHAR  BitSize[1];
  251. } HL_BITFLD;
  252.  
  253. /*****************************************************************************/
  254. /* TYPEDEF/USERDEF Record.                                                   */
  255. /*****************************************************************************/
  256. typedef struct                          /* Type Number : 0x5D                */
  257. {
  258.   CHAR    TypeQual;
  259.   UCHAR   FID_TypeIndex;
  260.   USHORT  TypeIndex;
  261.   UCHAR   FID_Name;
  262.   UCHAR   NameLen;
  263.   CHAR    Name[1];
  264. } HL_USERDEF;
  265.  
  266. /*****************************************************************************/
  267. /* POINTER Record.                                                           */
  268. /*****************************************************************************/
  269. typedef struct                          /* Type Number : 0x7A                */
  270. {
  271.   CHAR    TypeQual;
  272.   UCHAR   FID_TypeIndex;
  273.   USHORT  TypeIndex;
  274.   UCHAR   FID_Name;
  275.   UCHAR   NameLen;
  276.   CHAR    Name[1];
  277. } HL_POINTER;
  278.  
  279. /*****************************************************************************/
  280. /* ENUM Record.                                                              */
  281. /* - Fields "Lower bound", "Upper bound" (which are of variable size) and    */
  282. /*   the following fields are not present in the structure and will be taken */
  283. /*   care in the code.                                                       */
  284. /*****************************************************************************/
  285. typedef struct                          /* Type Number : 0x7B                */
  286. {
  287.   CHAR    TypeQual;
  288.   UCHAR   FID_DataType;
  289.   USHORT  DataType;
  290.   UCHAR   FID_MemListIndex;
  291.   USHORT  MemListIndex;
  292. } HL_ENUM;
  293.  
  294. /*****************************************************************************/
  295. /* SCALAR Record.                                                            */
  296. /* - Fields other than "DataType" are not used, and so they are not present  */
  297. /*   in the data structure.                                                  */
  298. /*****************************************************************************/
  299. typedef struct                          /* Type Number : 0x51                */
  300. {
  301.   CHAR    TypeQual;
  302.   UCHAR   FID_DataType;
  303.   USHORT  DataType;
  304. } HL_SCALAR;
  305.  
  306. /*****************************************************************************/
  307. /* ARRAY Record.                                                             */
  308. /*****************************************************************************/
  309. typedef struct                          /* Type Number : 0x78                */
  310. {
  311.   CHAR    TypeQual;
  312.   LONG    ByteSize;
  313.   UCHAR   FID_BoundsIndex;
  314.   USHORT  BoundsTypeIndex;
  315.   UCHAR   FID_ElemType;
  316.   USHORT  ElemType;
  317.   UCHAR   FID_Name;
  318.   UCHAR   NameLen;
  319.   CHAR    Name[1];
  320. } HL_ARRAY;
  321.  
  322. /*****************************************************************************/
  323. /* PROCEDURE/FUNCTION Record.                                                */
  324. /*****************************************************************************/
  325. typedef struct                          /* Type Number : 0x75                */
  326. {
  327.   CHAR    TypeQual;
  328.   USHORT  NumParams;
  329.   USHORT  MaxParams;
  330.   UCHAR   FID_ReturnType;
  331.   USHORT  ReturnType;
  332.   UCHAR   FID_ParmListIndex;
  333.   USHORT  ParmListIndex;
  334. } HL_PROC;
  335.  
  336. /*****************************************************************************/
  337. /* #defines for list types.                                                  */
  338. /*****************************************************************************/
  339. #define LIST_ST_TYPES  0x01              /* List record for STRUCT types     */
  340. #define LIST_ST_NAMES  0x02              /* List record for STRUCT names     */
  341. #define LIST_ST_ENUM   0x03              /* List record for ENUM names.      */
  342.