home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 514b.lha / ToolLib_v8.1 / tool.i < prev    next >
Text File  |  1991-06-08  |  5KB  |  192 lines

  1. *
  2. *   tool.i version 8.1 - © Copyright 1990 Jaba Development
  3. *
  4. *   Author : Jan van den Baard
  5. *
  6. *   Assembler header for the "tool.library"
  7. *
  8.  
  9.  IFND TOOL_I
  10. TOOL_I SET 1
  11.  
  12.  IFND EXEC_TYPES_I
  13.     include 'exec/types.i'
  14.  ENDC !EXEC_TYPES_I
  15.  IFND EXEC_MEMORY_I
  16.     include 'exec/memory.i'
  17.  ENDC !EXEC_MEMORY_I
  18.  IFND EXEC_PORTS_I
  19.     include 'exec/ports.i'
  20.  ENDC !EXEC_PORT_I
  21.  IFND EXEC_IO_I
  22.     include 'exec/io.i'
  23.  ENDC !EXEC_IO_I
  24.  IFND EXEC_LISTS_I
  25.     include 'exec/lists.i'
  26.  ENDC !EXEC_LISTS_I
  27.  IFND DEVICES_TIMER_I
  28.     include 'devices/timer.i'
  29.  ENDC !DEVICES_TIMER_I
  30.  IFND LIBRARIES_DOS_I
  31.     include 'libraries/dos.i'
  32.  ENDC !LIBRAIES_DOS_I
  33.  IFND LIBRARIES_DOSEXTENS_I
  34.     include 'libraries/dosextens.i'
  35.  ENDC !LIBRAIES_DOSEXTENS_I
  36.  IFND INTUITION_INTUITION_I
  37.     include 'intuition/intuition.i'
  38.  ENDC !INTUITION_INTUITION_I
  39.  IFND INTUITION_INTUITIONBASE_I
  40.     include 'intuition/intuitionbase.i'
  41.  ENDC !INTUITION_INTUITIONBASE_I
  42.  
  43.     STRUCTURE   ToolBase,LIB_SIZE
  44.     APTR        tb_SysBase
  45.     APTR        tb_DOSBase
  46.     APTR        tb_IntuitionBase
  47.     APTR        tb_GfxBase
  48.     LONG        tb_SegList
  49.     LABEL       tb_SIZEOF
  50.  
  51. TOOL_VERSION    equ     8
  52. TOOL_REVISION   equ     1
  53.  
  54.     STRUCTURE   TimeDelay,0
  55.     APTR        td_UserPort
  56.     APTR        td_ReplyPort
  57.     APTR        td_TimeRequest
  58.     LABEL       td_SIZEOF
  59.  
  60. LONGALLIGN  macro
  61.             addq.l  #7,\1
  62.             and.l   #-8,\1
  63.             endm
  64. *
  65. *   The MemoryBlock, MemoryItem, BlockList and ItemList structures
  66. *   are PRIVATE structures used by the memory routines of the library.
  67. *   DO NOT SCREW ARROUND WITH THESE STRUCTURES BECAUSE THEY MIGHT CHANGE
  68. *   IN FUTURE RELEASES OF THE LIBRARY !!!!!!!!!
  69. *
  70.     STRUCTURE   MemoryBlock,0
  71.     APTR        mb_Next
  72.     APTR        mb_Previous
  73.     ULONG       mb_Requirements
  74.     ULONG       mb_BytesUsed
  75.     LABEL       mb_SIZEOF
  76.  
  77.     STRUCTURE   MemoryItem,0
  78.     APTR        mit_Next
  79.     APTR        mit_Previous
  80.     APTR        mit_Block
  81.     ULONG       mit_Size
  82.     LABEL       mit_SIZEOF
  83.  
  84.     STRUCTURE   BlockList,0
  85.     APTR        bl_First
  86.     APTR        bl_End
  87.     APTR        bl_Last
  88.     LABEL       bl_SIZEOF
  89.  
  90.     STRUCTURE   ItemList,0
  91.     APTR        il_First
  92.     APTR        il_End
  93.     APTR        il_Last
  94.     LABEL       il_SIZEOF
  95. *
  96. * YOU MAY ONLY USE THIS STRUCTURE TO PASS TO THE MEMORY ROUTINES OF
  97. * THE LIBRARY. DO NOT CHANGE THE CONTENTS OF A MEMORYCHAIN STRUCTURE
  98. * IN YOUR PROGRAMS BECAUSE THIS STRUCTURE MAY CHANGE IN FUTURE RELEASES
  99. * OF THE LIBRARY !!!!!!!!!
  100. *
  101.     STRUCTURE   MemoryChain,0
  102.     STRUCT      mc_Blocks,bl_SIZEOF
  103.     STRUCT      mc_Items,il_SIZEOF
  104.     ULONG       mc_BlockSize
  105.     LABEL       mc_SIZEOF
  106.  
  107. MINDATE             equ     32
  108. ALL                 equ     0
  109. ONLY_DAY            equ     1
  110. ONLY_DATE           equ     2
  111. ONLY_TIME           equ     3
  112.  
  113. NO_CASE             equ     0
  114. CASE                equ     1
  115.  
  116. ENTRY_FILE          equ     0
  117. ENTRY_DIR           equ     1
  118. ENTRY_DEV           equ     2
  119.  
  120. DIRBLOCK            equ     5*1024
  121.  
  122.     STRUCTURE   EntryInfo,0
  123.     APTR        ei_Next
  124.     APTR        ei_Previous
  125.     USHORT      ei_Type
  126.     STRUCT      ei_Name,32
  127.     LONG        ei_SizeBytes
  128.     LONG        ei_SizeBlocks
  129.     LONG        ei_ProtectionBits
  130.     STRUCT      ei_Date,ds_SIZEOF
  131.     LABEL       ei_SIZEOF
  132.  
  133.     STRUCTURE   Directory,0
  134.     APTR        dr_First
  135.     APTR        dr_End
  136.     APTR        dr_Last
  137.     APTR        dr_InfoBlock
  138.     LONG        dr_Lock
  139.     ULONG       dr_NumEntries
  140.     STRUCT      dr_DirMem,mc_SIZEOF
  141.     LABEL       dr_SIZEOF
  142. *
  143. *   NOTE: There seems to be a bug in the definition of 'BPTR' in the header
  144. *         "libraries/dos.i' of the devpac assembler. When it is defined as
  145. *         "LONG" there are no problems. I found this out when I tryed to
  146. *         define the "dr_Lock" field of the Directory structure as a "BPTR".
  147. *         This resulted in the first field of the "MemoryChain" dr_DirMem
  148. *         when I tryed to read the "dr_NumEntries" field of the "Directory"
  149. *         structure. I use the USA version 2.14 of the Devpac Assembler
  150. *         distributed by MichTron. I don't know if it's the same with the
  151. *         european version.
  152. *
  153.  
  154. FREQ_OK               equ    0
  155. FREQ_CANT_OPEN        equ    1
  156. FREQ_FILE_ERROR       equ    2
  157. FREQ_CANCELED         equ    3
  158.  
  159.     STRUCTURE FileRequester,0
  160.     APTR      fr_HeadLine
  161.     APTR      fr_FileName
  162.     APTR      fr_DirName
  163.     APTR      fr_DontShow
  164.     USHORT    fr_LeftEdge
  165.     USHORT    fr_TopEdge
  166.     APTR      fr_Caller
  167.     APTR      fr_Screen
  168.     APTR      fr_Directory
  169.     USHORT    fr_Flags
  170.     USHORT    fr_Color0
  171.     USHORT    fr_Color1
  172.     USHORT    fr_Color2
  173.     USHORT    fr_Color3
  174.     LONG      fr_Handle
  175.     LONG      fr_Reserved
  176.     LABEL     fr_SIZEOF
  177.  
  178. FREQ_WIDTH            equ    260
  179. FREQ_HEIGHT           equ    140
  180.  
  181. FR_NoPreserve         equ    1
  182. FR_NoDevs             equ    2
  183. FR_NoSort             equ    4
  184. FR_CustColor          equ    8
  185. FR_ReturnOld          equ    16
  186. FR_ReturnNew          equ    32
  187. FR_ReturnReadWrite    equ    64
  188. FR_NoInfo             equ    128
  189. FR_ReturnVoid         equ    0
  190.  
  191.  ENDC !TOOL_I
  192.