home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / INC / BASEDEF.INC < prev    next >
Text File  |  1995-08-24  |  6KB  |  209 lines

  1. ;       SCCSID = @(#)basedef.inc    6.1 92/03/25
  2. ;***    BASEDEF.INC
  3. ;
  4. ;
  5. ;       Basic constants and types
  6. ;
  7. ;       For include file hierarchy, see MVDM.INC
  8.  
  9. ;       Copyright (c) IBM Corporation 1987, 1992
  10. ;
  11. ;       All Rights Reserved
  12. ;
  13. ;       To control what is included use the following:
  14. ;
  15. ;           INCL_TYPES       basic typedefs
  16. ;
  17.  
  18.  
  19. ;*** Basic constants
  20. ;
  21.  
  22.  
  23. NULL  equ     0
  24. TRUE  equ    -1
  25. FALSE equ     0
  26.  
  27. CTRUE   EQU     1
  28.  
  29. KSIZE   EQU     1024
  30.  
  31. ifdef  INCL_PAGE
  32. PAGESIZE        EQU     4096
  33. endif
  34.  
  35.  
  36. ;*** Basic data types
  37. ;
  38.  
  39.  
  40. DefEntry CENTRY     CDECL    FAR        ;to declare miscallaneous
  41. DefEntry PRIVENTRY  PASCAL   FAR        ;to declare private routines
  42. DefEntry EXPENTRY   PASCAL   FAR        ;to declare exported routines
  43. DefEntry API32ENTRY PASCAL   FAR        ;to declare exported API routines
  44. DefEntry DYNENTRY   PASCAL   FAR        ;to declare exported dynlink routines
  45.  
  46. ifdef  INCL_TYPES
  47.  
  48. DefType _INT,dd                 ;i
  49. DefType UINT,dd                 ;u
  50. DefType BOOL,_INT                       ;f
  51.  
  52. DefType _BYTE,db                        ;b
  53. DefType _WORD,dw                        ;w
  54. DefType _DWORD,dd                       ;dw
  55.  
  56. DefType CHAR,db                 ;ch
  57. DefType UCHAR,db                        ;uch
  58. DefType _SHORT,dw                       ;s
  59. DefType USHORT,dw                       ;us
  60. DefType LONG,dd                 ;l
  61. DefType ULONG,dd                        ;ul
  62.  
  63. DefType BBOOL,UCHAR                     ;bf
  64. DefType SBOOL,USHORT                    ;sf
  65. DefType LBOOL,ULONG                     ;lf
  66.  
  67. DefType FLAGS,ULONG                     ;fl
  68. DefType PORT,ULONG                      ;port
  69.  
  70. DefType HVDM, ULONG
  71.  
  72. ;*** Basic pointer types
  73. ;
  74. DefType PVOID,dd                        ;p
  75. DefType NPVOID,dd                       ;np
  76.  
  77.  
  78. ;*** Basic pointer-to-basic-data types
  79. ;
  80. DefType PINT,dd                 ;pi
  81. DefType NPINT,dd                        ;npi
  82.  
  83. DefType PUINT,dd                        ;pu
  84. DefType NPUINT,dd                       ;npu
  85.  
  86. DefType PBYTE,dd                        ;pb
  87. DefType NPBYTE,dd                       ;npb
  88.  
  89. DefType PWORD,dd                        ;pw
  90. DefType NPWORD,dd                       ;npw
  91.  
  92. DefType PDWORD,dd                       ;pdw
  93. DefType NPDWORD,dd                      ;npdw
  94.  
  95. DefType PCHAR,dd                        ;pch
  96. DefType NPCHAR,dd                       ;npch
  97.  
  98. DefType PSHORT,dd                       ;ps
  99. DefType NPSHORT,dd                      ;nps
  100.  
  101. DefType PLONG,dd                        ;pl
  102. DefType NPLONG,dd                       ;npl
  103.  
  104. DefType PUCHAR,dd                       ;puch
  105. DefType NPUCHAR,dd                      ;npuch
  106.  
  107. DefType PUSHORT,dd                      ;pus
  108. DefType NPUSHORT,dd                     ;npus
  109.  
  110. DefType PULONG,dd                       ;pul
  111. DefType NPULONG,dd                      ;npul
  112.  
  113. DefType PBOOL,dd                        ;pf
  114. DefType NPBOOL,dd                       ;npf
  115.  
  116. DefType PBBOOL,dd                       ;pbf
  117. DefType NPBBOOL,dd                      ;npbf
  118.  
  119. DefType PSBOOL,dd                       ;psf
  120. DefType NPSBOOL,dd                      ;npsf
  121.  
  122. DefType PLBOOL,dd                       ;plf
  123. DefType NPLBOOL,dd                      ;nplf
  124.  
  125. DefType PFLAGS,dd                       ;pfl
  126. DefType NPFLAGS,dd                      ;npfl
  127.  
  128. DefType PPVOID,dd                       ;pp
  129. DefType NPPVOID,dd                      ;npp
  130.  
  131.  
  132. ;*** Other common types (and their pointers)
  133. ;
  134. DefType BUF,_BYTE                       ;buf
  135. DefType PBUF,dd                 ;pbuf
  136.  
  137. DefType NAM,CHAR                        ;nam
  138. DefType SZ,CHAR                 ;sz
  139. DefType PSZ,dd                  ;psz
  140. DefType NPSZ,dd                 ;npsz
  141. DefType SZZ,CHAR                        ;szz
  142. DefType PSZZ,dd                 ;pszz
  143. DefType NPSZZ,dd                        ;npszz
  144.  
  145. DefType SEL,USHORT                      ;sel
  146. DefType PSEL,dd                 ;psel
  147. DefType NPSEL,dd                        ;npsel
  148.  
  149. DefType SOFFSET,USHORT                  ;soff
  150. DefType _OFFSET,ULONG                   ;off
  151.  
  152. DefType PPHYS,ULONG                     ;pphys
  153.  
  154. DefType PFN,dd                  ;pfn
  155. DefType NPFN,dd                 ;npfn
  156. DefType FPFN,dq                 ;fpfn
  157. DefType FPVOID,dq                       ;fp (the only kind of FPVOID allowed)
  158.  
  159. DefType PPFN,dd                 ;ppfn
  160. DefType NPPFN,dd                        ;nppfn
  161. DefType PFPFN,dd                        ;pfpfn
  162. DefType NPFPFN,dd                       ;npfpfn
  163.  
  164. DefType SHANDLE,USHORT                  ;sh
  165. DefType HANDLE,PVOID                    ;h
  166.  
  167. DefStruc ,_POINTL                       ;ptl
  168.     LONG  x
  169.     LONG  y
  170. EndStruc POINTL
  171. DefType PPOINTL,dd
  172.  
  173. DefStruc ,_RECTL                        ;rcl
  174.     LONG  xLeft
  175.     LONG  yBottom
  176.     LONG  xRight
  177.     LONG  yTop
  178. EndStruc RECTL
  179. DefType PRECTL,dd
  180.  
  181. DefStruc ,_RGB                  ;rgb
  182.     _BYTE bBlue
  183.     _BYTE bGreen
  184.     _BYTE bRed
  185. EndStruc RGB
  186. DefType PRGB,dd
  187.  
  188.  
  189. ;*** OS/2-specific types
  190. ;
  191. DefType ERRCODE,ULONG                   ;errc
  192. DefType RETCODE,ULONG                   ;rc
  193. DefType SRETCODE,USHORT                 ;src
  194.  
  195. DefType PID,USHORT                      ;pid
  196. DefType SGID,USHORT                     ;sgid
  197. DefType TID,USHORT                      ;tid
  198.  
  199. DefStruc ,_RESULTCODES                  ;rsc
  200.     USHORT codeTerminate
  201.     USHORT codeResult
  202. EndStruc RESULTCODES
  203. DefType PRESULTCODES,dd
  204.  
  205. DefType HFILE,SHANDLE                   ;shf
  206. DefType PHFILE,dd                       ;pshf
  207.  
  208. endif  ;INCL_TYPES
  209.