home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d07xx / d0744.lha / FO2 / Sources_FO2 / dosextens.h < prev    next >
C/C++ Source or Header  |  1992-10-12  |  5KB  |  288 lines

  1. #ifndef LIBRARIES_DOSEXTENS_H
  2. #define LIBRARIES_DOSEXTENS_H
  3. /*
  4. ** $Filename: libraries/dosextens.h $
  5. ** $Release: 1.3 $
  6. **
  7. ** DOS structures not needed for the casual AmigaDOS user 
  8. **
  9. ** (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. ** All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include "exec/types.h"
  15. #endif
  16. #ifndef EXEC_TASKS_H
  17. #include "exec/tasks.h"
  18. #endif
  19. #ifndef EXEC_PORTS_H
  20. #include "exec/ports.h"
  21. #endif
  22. #ifndef EXEC_LIBRARIES_H
  23. #include "exec/libraries.h"
  24. #endif
  25.  
  26. #ifndef LIBRARIES_DOS_H
  27. #include "libraries/dos.h"
  28. #endif
  29.  
  30.  
  31.  
  32.  
  33.  
  34. struct Process {
  35.  struct Task pr_Task; 
  36.  struct MsgPort pr_MsgPort; 
  37.  WORD pr_Pad; 
  38.  BPTR pr_SegList; 
  39.  LONG pr_StackSize; 
  40.  APTR pr_GlobVec; 
  41.  LONG pr_TaskNum; 
  42.  BPTR pr_StackBase; 
  43.  LONG pr_Result2; 
  44.  BPTR pr_CurrentDir; 
  45.  BPTR pr_CIS; 
  46.  BPTR pr_COS; 
  47.  APTR pr_ConsoleTask; 
  48.  APTR pr_FileSystemTask; 
  49.  BPTR pr_CLI; 
  50.  APTR pr_ReturnAddr; 
  51.  APTR pr_PktWait; 
  52.  APTR pr_WindowPtr; 
  53. }; 
  54.  
  55.  
  56.  
  57. struct FileHandle {
  58.  struct Message *fh_Link;  
  59.  struct MsgPort *fh_Port; 
  60.  struct MsgPort *fh_Type; 
  61.  LONG fh_Buf;
  62.  LONG fh_Pos;
  63.  LONG fh_End;
  64.  LONG fh_Funcs;
  65. #define fh_Func1 fh_Funcs
  66.  LONG fh_Func2;
  67.  LONG fh_Func3;
  68.  LONG fh_Args;
  69. #define fh_Arg1 fh_Args
  70.  LONG fh_Arg2;
  71. }; 
  72.  
  73.  
  74.  
  75. struct DosPacket {
  76.  struct Message *dp_Link; 
  77.  struct MsgPort *dp_Port; 
  78.  
  79.  LONG dp_Type; 
  80.  LONG dp_Res1; 
  81.  LONG dp_Res2; 
  82.  
  83. #define dp_Action dp_Type
  84. #define dp_Status dp_Res1
  85. #define dp_Status2 dp_Res2
  86. #define dp_BufAddr dp_Arg1
  87.  LONG dp_Arg1; 
  88.  LONG dp_Arg2;
  89.  LONG dp_Arg3;
  90.  LONG dp_Arg4;
  91.  LONG dp_Arg5;
  92.  LONG dp_Arg6;
  93.  LONG dp_Arg7;
  94. }; 
  95.  
  96.  
  97.  
  98. struct StandardPacket {
  99.  struct Message sp_Msg;
  100.  struct DosPacket sp_Pkt;
  101. }; 
  102.  
  103.  
  104. #define ACTION_NIL 0
  105. #define ACTION_GET_BLOCK 2 
  106. #define ACTION_SET_MAP 4
  107. #define ACTION_DIE 5
  108. #define ACTION_EVENT 6
  109. #define ACTION_CURRENT_VOLUME 7
  110. #define ACTION_LOCATE_OBJECT 8
  111. #define ACTION_RENAME_DISK 9
  112. #define ACTION_WRITE 'W'
  113. #define ACTION_READ 'R'
  114. #define ACTION_FREE_LOCK 15
  115. #define ACTION_DELETE_OBJECT 16
  116. #define ACTION_RENAME_OBJECT 17
  117. #define ACTION_MORE_CACHE 18
  118. #define ACTION_COPY_DIR 19
  119. #define ACTION_WAIT_CHAR 20
  120. #define ACTION_SET_PROTECT 21
  121. #define ACTION_CREATE_DIR 22
  122. #define ACTION_EXAMINE_OBJECT 23
  123. #define ACTION_EXAMINE_NEXT 24
  124. #define ACTION_DISK_INFO 25
  125. #define ACTION_INFO 26
  126. #define ACTION_FLUSH 27
  127. #define ACTION_SET_COMMENT 28 
  128. #define ACTION_PARENT 29
  129. #define ACTION_TIMER 30
  130. #define ACTION_INHIBIT 31
  131. #define ACTION_DISK_TYPE 32
  132. #define ACTION_DISK_CHANGE 33
  133. #define ACTION_SET_DATE 34
  134.  
  135. #define ACTION_SCREEN_MODE 994
  136.  
  137. #define ACTION_READ_RETURN 1001
  138. #define ACTION_WRITE_RETURN 1002
  139. #define ACTION_SEEK 1008
  140. #define ACTION_FINDUPDATE 1004
  141. #define ACTION_FINDINPUT 1005
  142. #define ACTION_FINDOUTPUT 1006
  143. #define ACTION_END 1007
  144. #define ACTION_TRUNCATE 1022 
  145. #define ACTION_WRITE_PROTECT 1023 
  146.  
  147.  
  148.  
  149. struct DosLibrary {
  150.  struct Library dl_lib;
  151.  APTR dl_Root; 
  152.  APTR dl_GV; 
  153.  LONG dl_A2; 
  154.  LONG dl_A5;
  155.  LONG dl_A6;
  156. }; 
  157.  
  158.  
  159.  
  160. struct RootNode {
  161.  BPTR rn_TaskArray; 
  162.  BPTR rn_ConsoleSegment;  
  163.  struct DateStamp rn_Time; 
  164.  LONG rn_RestartSeg; 
  165.  BPTR rn_Info; 
  166.  BPTR rn_FileHandlerSegment; 
  167. }; 
  168.  
  169. struct DosInfo {
  170.  BPTR di_McName; 
  171.  BPTR di_DevInfo; 
  172.  BPTR di_Devices; 
  173.  BPTR di_Handlers; 
  174.  APTR di_NetHand; 
  175. }; 
  176.  
  177.  
  178.  
  179. struct CommandLineInterface {
  180.  LONG cli_Result2;  
  181.  BSTR cli_SetName; 
  182.  BPTR cli_CommandDir; 
  183.  LONG cli_ReturnCode; 
  184.  BSTR cli_CommandName; 
  185.  LONG cli_FailLevel; 
  186.  BSTR cli_Prompt; 
  187.  BPTR cli_StandardInput; 
  188.  BPTR cli_CurrentInput; 
  189.  BSTR cli_CommandFile; 
  190.  LONG cli_Interactive; 
  191.  LONG cli_Background; 
  192.  BPTR cli_CurrentOutput; 
  193.  LONG cli_DefaultStack; 
  194.  BPTR cli_StandardOutput; 
  195.  BPTR cli_Module; 
  196. }; 
  197.  
  198.  
  199.  
  200.  
  201.  
  202. struct DeviceList {
  203.  BPTR dl_Next; 
  204.  LONG dl_Type; 
  205.  struct MsgPort * dl_Task; 
  206.  BPTR dl_Lock; 
  207.  struct DateStamp dl_VolumeDate; 
  208.  BPTR dl_LockList; 
  209.  LONG dl_DiskType; 
  210.  LONG dl_unused;
  211.  BSTR * dl_Name; 
  212. };
  213.  
  214.  
  215.  
  216. struct DevInfo {
  217.  BPTR dvi_Next;
  218.  LONG dvi_Type;
  219.  APTR dvi_Task;
  220.  BPTR dvi_Lock;
  221.  BSTR dvi_Handler;
  222.  LONG dvi_StackSize;
  223.  LONG dvi_Priority;
  224.  LONG dvi_Startup;
  225.  BPTR dvi_SegList;
  226.  BPTR dvi_GlobVec;
  227.  BSTR dvi_Name;
  228. };
  229.  
  230.  
  231.  
  232. struct DosList {
  233.  BPTR dol_Next; 
  234.  LONG dol_Type; 
  235.  struct MsgPort *dol_Task; 
  236.  BPTR dol_Lock;
  237.  union {
  238.  struct {
  239.  BSTR dol_Handler; 
  240.  LONG dol_StackSize; 
  241.  LONG dol_Priority; 
  242.  ULONG dol_Startup; 
  243.  BPTR dol_SegList; 
  244.  BPTR dol_GlobVec; 
  245.  } dol_handler;
  246.  
  247.  struct {
  248.  struct DateStamp dol_VolumeDate; 
  249.  BPTR dol_LockList; 
  250.  LONG dol_DiskType; 
  251.  } dol_volume;
  252.  
  253.  struct {
  254.  UBYTE    *dol_AssignName;     /* name for non-or-late-binding assign */
  255.  struct AssignList *dol_List; /* for multi-directory assigns (regular) */
  256.  } dol_assign;
  257.  
  258.  } dol_misc;
  259.  
  260.  BSTR dol_Name; 
  261.  };
  262.  
  263. struct AssList {
  264.      BPTR dol_Next; 
  265.     LONG dol_Type; 
  266.     struct MsgPort *dol_Task; 
  267.     BPTR dol_Lock;
  268.     UBYTE    *dol_AssignName;     /* name for non-or-late-binding assign */
  269.     struct AssignList *dol_List; /* for multi-directory assigns (regular) */
  270.     BSTR dol_Name; 
  271.  };
  272.  
  273.  
  274. #define DLT_DEVICE 0
  275. #define DLT_DIRECTORY 1
  276. #define DLT_VOLUME 2
  277.  
  278.  
  279. struct FileLock {
  280.  BPTR fl_Link; 
  281.  LONG fl_Key; 
  282.  LONG fl_Access; 
  283.  struct MsgPort * fl_Task; 
  284.  BPTR fl_Volume; 
  285. };
  286.  
  287. #endif 
  288.