home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / rexx / storage.h < prev   
Encoding:
C/C++ Source or Header  |  1995-01-10  |  3.7 KB  |  212 lines

  1. #ifndef REXX_STORAGE_H
  2. #define REXX_STORAGE_H
  3. /*
  4. ** $Filename: rexx/storage.h $
  5. ** $Release: 2.04 Includes, V37.4 $
  6. ** $Revision: 1.4 $
  7. ** $Date: 91/11/08 $
  8. **
  9. ** Header file to define ARexx data structures.
  10. **
  11. ** (C) Copyright 1986,1987,1988,1989,1990 William S. Hawes
  12. ** (C) Copyright 1990-1991 Commodore-Amiga, Inc.
  13. ** All Rights Reserved
  14. */
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include "exec/types.h"
  18. #endif
  19.  
  20. #ifndef EXEC_NODES_H
  21. #include "exec/nodes.h"
  22. #endif
  23.  
  24. #ifndef EXEC_LISTS_H
  25. #include "exec/lists.h"
  26. #endif
  27.  
  28. #ifndef EXEC_PORTS_H
  29. #include "exec/ports.h"
  30. #endif
  31.  
  32. #ifndef EXEC_LIBRARIES_H
  33. #include "exec/libraries.h"
  34. #endif
  35.  
  36.  
  37.  
  38. struct NexxStr {
  39.  LONG ns_Ivalue; 
  40.  UWORD ns_Length; 
  41.  UBYTE ns_Flags; 
  42.  UBYTE ns_Hash; 
  43.  BYTE ns_Buff[8]; 
  44.  }; 
  45.  
  46. #define NXADDLEN 9 
  47. #define IVALUE(nsPtr) (nsPtr->ns_Ivalue)
  48.  
  49.  
  50. #define NSB_KEEP 0 
  51. #define NSB_STRING 1 
  52. #define NSB_NOTNUM 2 
  53. #define NSB_NUMBER 3 
  54. #define NSB_BINARY 4 
  55. #define NSB_FLOAT 5 
  56. #define NSB_EXT 6 
  57. #define NSB_SOURCE 7 
  58.  
  59.  
  60. #define NSF_KEEP (1 << NSB_KEEP )
  61. #define NSF_STRING (1 << NSB_STRING)
  62. #define NSF_NOTNUM (1 << NSB_NOTNUM)
  63. #define NSF_NUMBER (1 << NSB_NUMBER)
  64. #define NSF_BINARY (1 << NSB_BINARY)
  65. #define NSF_FLOAT (1 << NSB_FLOAT )
  66. #define NSF_EXT (1 << NSB_EXT )
  67. #define NSF_SOURCE (1 << NSB_SOURCE)
  68.  
  69.  
  70. #define NSF_INTNUM (NSF_NUMBER | NSF_BINARY | NSF_STRING)
  71. #define NSF_DPNUM (NSF_NUMBER | NSF_FLOAT)
  72. #define NSF_ALPHA (NSF_NOTNUM | NSF_STRING)
  73. #define NSF_OWNED (NSF_SOURCE | NSF_EXT | NSF_KEEP)
  74. #define KEEPSTR (NSF_STRING | NSF_SOURCE | NSF_NOTNUM)
  75. #define KEEPNUM (NSF_STRING | NSF_SOURCE | NSF_NUMBER | NSF_BINARY)
  76.  
  77.  
  78.  
  79. struct RexxArg {
  80.  LONG ra_Size; 
  81.  UWORD ra_Length; 
  82.  UBYTE ra_Flags; 
  83.  UBYTE ra_Hash; 
  84.  BYTE ra_Buff[8]; 
  85.  }; 
  86.  
  87.  
  88.  
  89. struct RexxMsg {
  90.  struct Message rm_Node; 
  91.  APTR rm_TaskBlock; 
  92.  APTR rm_LibBase; 
  93.  LONG rm_Action; 
  94.  LONG rm_Result1; 
  95.  LONG rm_Result2; 
  96.  STRPTR rm_Args[16]; 
  97.  
  98.  struct MsgPort *rm_PassPort; 
  99.  STRPTR rm_CommAddr; 
  100.  STRPTR rm_FileExt; 
  101.  LONG rm_Stdin; 
  102.  LONG rm_Stdout; 
  103.  LONG rm_avail; 
  104.  }; 
  105.  
  106.  
  107. #define ARG0(rmp) (rmp->rm_Args[0]) 
  108. #define ARG1(rmp) (rmp->rm_Args[1]) 
  109. #define ARG2(rmp) (rmp->rm_Args[2]) 
  110.  
  111. #define MAXRMARG 15 
  112.  
  113.  
  114. #define RXCOMM 0x01000000 
  115. #define RXFUNC 0x02000000 
  116. #define RXCLOSE 0x03000000 
  117. #define RXQUERY 0x04000000 
  118. #define RXADDFH 0x07000000 
  119. #define RXADDLIB 0x08000000 
  120. #define RXREMLIB 0x09000000 
  121. #define RXADDCON 0x0A000000 
  122. #define RXREMCON 0x0B000000 
  123. #define RXTCOPN 0x0C000000 
  124. #define RXTCCLS 0x0D000000 
  125.  
  126.  
  127. #define RXFB_NOIO 16 
  128. #define RXFB_RESULT 17 
  129. #define RXFB_STRING 18 
  130. #define RXFB_TOKEN 19 
  131. #define RXFB_NONRET 20 
  132.  
  133.  
  134. #define RXFF_NOIO (1L << RXFB_NOIO )
  135. #define RXFF_RESULT (1L << RXFB_RESULT)
  136. #define RXFF_STRING (1L << RXFB_STRING)
  137. #define RXFF_TOKEN (1L << RXFB_TOKEN )
  138. #define RXFF_NONRET (1L << RXFB_NONRET)
  139.  
  140. #define RXCODEMASK 0xFF000000
  141. #define RXARGMASK 0x0000000F
  142.  
  143.  
  144.  
  145. struct RexxRsrc {
  146.  struct Node rr_Node;
  147.  WORD rr_Func; 
  148.  APTR rr_Base; 
  149.  LONG rr_Size; 
  150.  LONG rr_Arg1; 
  151.  LONG rr_Arg2; 
  152.  }; 
  153.  
  154.  
  155. #define RRT_ANY 0 
  156. #define RRT_LIB 1 
  157. #define RRT_PORT 2 
  158. #define RRT_FILE 3 
  159. #define RRT_HOST 4 
  160. #define RRT_CLIP 5 
  161.  
  162.  
  163.  
  164. #define GLOBALSZ 200 
  165.  
  166. struct RexxTask {
  167.  BYTE rt_Global[GLOBALSZ]; 
  168.  struct MsgPort rt_MsgPort; 
  169.  UBYTE rt_Flags; 
  170.  BYTE rt_SigBit; 
  171.  
  172.  APTR rt_ClientID; 
  173.  APTR rt_MsgPkt; 
  174.  APTR rt_TaskID; 
  175.  APTR rt_RexxPort; 
  176.  
  177.  APTR rt_ErrTrap; 
  178.  APTR rt_StackPtr; 
  179.  
  180.  struct List rt_Header1; 
  181.  struct List rt_Header2; 
  182.  struct List rt_Header3; 
  183.  struct List rt_Header4; 
  184.  struct List rt_Header5; 
  185.  };
  186.  
  187.  
  188. #define RTFB_TRACE 0 
  189. #define RTFB_HALT 1 
  190. #define RTFB_SUSP 2 
  191. #define RTFB_TCUSE 3 
  192. #define RTFB_WAIT 6 
  193. #define RTFB_CLOSE 7 
  194.  
  195.  
  196. #define MEMQUANT 16L 
  197. #define MEMMASK 0xFFFFFFF0 
  198.  
  199. #define MEMQUICK (1L << 0 ) 
  200. #define MEMCLEAR (1L << 16) 
  201.  
  202.  
  203.  
  204. struct SrcNode {
  205.  struct SrcNode *sn_Succ; 
  206.  struct SrcNode *sn_Pred; 
  207.  APTR sn_Ptr; 
  208.  LONG sn_Size; 
  209.  }; 
  210.  
  211. #endif
  212.