home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / clib / dos_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  9.1 KB  |  235 lines

  1. #ifndef CLIB_DOS_PROTOS_H
  2. #define CLIB_DOS_PROTOS_H
  3. /*
  4. ** $VER: dos_protos.h 36.26 (08.11.91)
  5. ** Includes Release 38.56
  6. **
  7. ** C prototypes. For use with 32 bit integers only.
  8. **
  9. ** (C) Copyright 1990-1992 Commodore-Amiga, Inc.
  10. ** All Rights Reserved
  11. */
  12. #ifndef DOS_DOS_H
  13. #include <dos/dos.h>
  14. #endif
  15. #ifndef DOS_DOSEXTENS_H
  16. #include <dos/dosextens.h>
  17. #endif
  18. #ifndef DOS_RECORD_H
  19. #include <dos/record.h>
  20. #endif
  21. #ifndef DOS_RDARGS_H
  22. #include <dos/rdargs.h>
  23. #endif
  24. #ifndef DOS_DOSASL_H
  25. #include <dos/dosasl.h>
  26. #endif
  27. #ifndef DOS_VAR_H
  28. #include <dos/var.h>
  29. #endif
  30. #ifndef DOS_NOTIFY_H
  31. #include <dos/notify.h>
  32. #endif
  33. #ifndef DOS_DATETIME_H
  34. #include <dos/datetime.h>
  35. #endif
  36. BPTR Open( STRPTR name, long accessMode );
  37. LONG Close( BPTR file );
  38. LONG Read( BPTR file, APTR buffer, long length );
  39. LONG Write( BPTR file, APTR buffer, long length );
  40. BPTR Input( void );
  41. BPTR Output( void );
  42. LONG Seek( BPTR file, long position, long offset );
  43. LONG DeleteFile( STRPTR name );
  44. LONG Rename( STRPTR oldName, STRPTR newName );
  45. BPTR Lock( STRPTR name, long type );
  46. void UnLock( BPTR lock );
  47. BPTR DupLock( BPTR lock );
  48. LONG Examine( BPTR lock, struct FileInfoBlock *fileInfoBlock );
  49. LONG ExNext( BPTR lock, struct FileInfoBlock *fileInfoBlock );
  50. LONG Info( BPTR lock, struct InfoData *parameterBlock );
  51. BPTR CreateDir( STRPTR name );
  52. BPTR CurrentDir( BPTR lock );
  53. LONG IoErr( void );
  54. struct MsgPort *CreateProc( STRPTR name, long pri, BPTR segList,
  55.  long stackSize );
  56. void Exit( long returnCode );
  57. BPTR LoadSeg( STRPTR name );
  58. void UnLoadSeg( BPTR seglist );
  59. struct MsgPort *DeviceProc( STRPTR name );
  60. LONG SetComment( STRPTR name, STRPTR comment );
  61. LONG SetProtection( STRPTR name, long protect );
  62. struct DateStamp *DateStamp( struct DateStamp *date );
  63. void Delay( long timeout );
  64. LONG WaitForChar( BPTR file, long timeout );
  65. BPTR ParentDir( BPTR lock );
  66. LONG IsInteractive( BPTR file );
  67. LONG Execute( STRPTR string, BPTR file, BPTR file2 );
  68.  
  69.  
  70. APTR AllocDosObject( unsigned long type, struct TagItem *tags );
  71. APTR AllocDosObjectTagList( unsigned long type, struct TagItem *tags );
  72. APTR AllocDosObjectTags( unsigned long type, unsigned long tag1type, ... );
  73. void FreeDosObject( unsigned long type, APTR ptr );
  74.  
  75. LONG DoPkt( struct MsgPort *port, long action, long arg1, long arg2, long arg3,
  76.  long arg4, long arg5 );
  77. LONG DoPkt0( struct MsgPort *port, long action );
  78. LONG DoPkt1( struct MsgPort *port, long action, long arg1 );
  79. LONG DoPkt2( struct MsgPort *port, long action, long arg1, long arg2 );
  80. LONG DoPkt3( struct MsgPort *port, long action, long arg1, long arg2,
  81.  long arg3 );
  82. LONG DoPkt4( struct MsgPort *port, long action, long arg1, long arg2,
  83.  long arg3, long arg4 );
  84. void SendPkt( struct DosPacket *dp, struct MsgPort *port,
  85.  struct MsgPort *replyport );
  86. struct DosPacket *WaitPkt( void );
  87. void ReplyPkt( struct DosPacket *dp, long res1, long res2 );
  88. void AbortPkt( struct MsgPort *port, struct DosPacket *pkt );
  89.  
  90. BOOL LockRecord( BPTR fh, unsigned long offset, unsigned long length,
  91.  unsigned long mode, unsigned long timeout );
  92. BOOL LockRecords( struct RecordLock *recArray, unsigned long timeout );
  93. BOOL UnLockRecord( BPTR fh, unsigned long offset, unsigned long length );
  94. BOOL UnLockRecords( struct RecordLock *recArray );
  95.  
  96. BPTR SelectInput( BPTR fh );
  97. BPTR SelectOutput( BPTR fh );
  98. LONG FGetC( BPTR fh );
  99. LONG FPutC( BPTR fh, unsigned long ch );
  100. LONG UnGetC( BPTR fh, long character );
  101. LONG FRead( BPTR fh, APTR block, unsigned long blocklen,
  102.  unsigned long number );
  103. LONG FWrite( BPTR fh, APTR block, unsigned long blocklen,
  104.  unsigned long number );
  105. STRPTR FGets( BPTR fh, STRPTR buf, unsigned long buflen );
  106. LONG FPuts( BPTR fh, STRPTR str );
  107. void VFWritef( BPTR fh, STRPTR format, LONG *argarray );
  108. void FWritef( BPTR fh, STRPTR format, ... );
  109. LONG VFPrintf( BPTR fh, STRPTR format, LONG *argarray );
  110. LONG FPrintf( BPTR fh, STRPTR format, ... );
  111. LONG Flush( BPTR fh );
  112. LONG SetVBuf( BPTR fh, STRPTR buff, long type, long size );
  113.  
  114. BPTR DupLockFromFH( BPTR fh );
  115. BPTR OpenFromLock( BPTR lock );
  116. BPTR ParentOfFH( BPTR fh );
  117. BOOL ExamineFH( BPTR fh, struct FileInfoBlock *fib );
  118. LONG SetFileDate( STRPTR name, struct DateStamp *date );
  119. LONG NameFromLock( BPTR lock, STRPTR buffer, long len );
  120. LONG NameFromFH( BPTR fh, STRPTR buffer, long len );
  121. WORD SplitName( STRPTR name, unsigned long seperator, STRPTR buf, long oldpos,
  122.  long size );
  123. LONG SameLock( BPTR lock1, BPTR lock2 );
  124. LONG SetMode( BPTR fh, long mode );
  125. LONG ExAll( BPTR lock, struct ExAllData *buffer, long size, long data,
  126.  struct ExAllControl *control );
  127. LONG ReadLink( struct MsgPort *port, BPTR lock, STRPTR path, STRPTR buffer,
  128.  unsigned long size );
  129. LONG MakeLink( STRPTR name, long dest, long soft );
  130. LONG ChangeMode( long type, BPTR fh, long newmode );
  131. LONG SetFileSize( BPTR fh, long pos, long mode );
  132.  
  133. LONG SetIoErr( long result );
  134. BOOL Fault( long code, STRPTR header, STRPTR buffer, long len );
  135. BOOL PrintFault( long code, STRPTR header );
  136. LONG ErrorReport( long code, long type, unsigned long arg1,
  137.  struct MsgPort *device );
  138.  
  139. struct CommandLineInterface *Cli( void );
  140. struct Process *CreateNewProc( struct TagItem *tags );
  141. struct Process *CreateNewProcTagList( struct TagItem *tags );
  142. struct Process *CreateNewProcTags( unsigned long tag1type, ... );
  143. LONG RunCommand( BPTR seg, long stack, STRPTR paramptr, long paramlen );
  144. struct MsgPort *GetConsoleTask( void );
  145. struct MsgPort *SetConsoleTask( struct MsgPort *task );
  146. struct MsgPort *GetFileSysTask( void );
  147. struct MsgPort *SetFileSysTask( struct MsgPort *task );
  148. STRPTR GetArgStr( void );
  149. BOOL SetArgStr( STRPTR string );
  150. struct Process *FindCliProc( unsigned long num );
  151. ULONG MaxCli( void );
  152. BOOL SetCurrentDirName( STRPTR name );
  153. BOOL GetCurrentDirName( STRPTR buf, long len );
  154. BOOL SetProgramName( STRPTR name );
  155. BOOL GetProgramName( STRPTR buf, long len );
  156. BOOL SetPrompt( STRPTR name );
  157. BOOL GetPrompt( STRPTR buf, long len );
  158. BPTR SetProgramDir( BPTR lock );
  159. BPTR GetProgramDir( void );
  160.  
  161. LONG SystemTagList( STRPTR command, struct TagItem *tags );
  162. LONG System( STRPTR command, struct TagItem *tags );
  163. LONG SystemTags( STRPTR command, unsigned long tag1type, ... );
  164. LONG AssignLock( STRPTR name, BPTR lock );
  165. BOOL AssignLate( STRPTR name, STRPTR path );
  166. BOOL AssignPath( STRPTR name, STRPTR path );
  167. BOOL AssignAdd( STRPTR name, BPTR lock );
  168. LONG RemAssignList( STRPTR name, BPTR lock );
  169. struct DevProc *GetDeviceProc( STRPTR name, struct DevProc *dp );
  170. void FreeDeviceProc( struct DevProc *dp );
  171. struct DosList *LockDosList( unsigned long flags );
  172. void UnLockDosList( unsigned long flags );
  173. struct DosList *AttemptLockDosList( unsigned long flags );
  174. BOOL RemDosEntry( struct DosList *dlist );
  175. LONG AddDosEntry( struct DosList *dlist );
  176. struct DosList *FindDosEntry( struct DosList *dlist, STRPTR name,
  177.  unsigned long flags );
  178. struct DosList *NextDosEntry( struct DosList *dlist, unsigned long flags );
  179. struct DosList *MakeDosEntry( STRPTR name, long type );
  180. void FreeDosEntry( struct DosList *dlist );
  181. BOOL IsFileSystem( STRPTR name );
  182.  
  183. BOOL Format( STRPTR filesystem, STRPTR volumename, unsigned long dostype );
  184. LONG Relabel( STRPTR drive, STRPTR newname );
  185. LONG Inhibit( STRPTR name, long onoff );
  186. LONG AddBuffers( STRPTR name, long number );
  187.  
  188. LONG CompareDates( struct DateStamp *date1, struct DateStamp *date2 );
  189. LONG DateToStr( struct DateTime *datetime );
  190. LONG StrToDate( struct DateTime *datetime );
  191.  
  192. BPTR InternalLoadSeg( BPTR fh, BPTR table, LONG *funcarray, LONG *stack );
  193. void InternalUnLoadSeg( BPTR seglist, void (*freefunc)() );
  194. BPTR NewLoadSeg( STRPTR file, struct TagItem *tags );
  195. BPTR NewLoadSegTagList( STRPTR file, struct TagItem *tags );
  196. BPTR NewLoadSegTags( STRPTR file, unsigned long tag1type, ... );
  197. LONG AddSegment( STRPTR name, BPTR seg, long system );
  198. struct Segment *FindSegment( STRPTR name, struct Segment *seg, long system );
  199. LONG RemSegment( struct Segment *seg );
  200.  
  201. LONG CheckSignal( long mask );
  202. struct RDArgs *ReadArgs( STRPTR template, LONG *array, struct RDArgs *args );
  203. LONG FindArg( STRPTR keyword, STRPTR template );
  204. LONG ReadItem( STRPTR name, long maxchars, struct CSource *cSource );
  205. LONG StrToLong( STRPTR string, LONG *value );
  206. LONG MatchFirst( STRPTR pat, struct AnchorPath *anchor );
  207. LONG MatchNext( struct AnchorPath *anchor );
  208. void MatchEnd( struct AnchorPath *anchor );
  209. LONG ParsePattern( STRPTR pat, STRPTR buf, long buflen );
  210. BOOL MatchPattern( STRPTR pat, STRPTR str );
  211. void FreeArgs( struct RDArgs *args );
  212. STRPTR FilePart( STRPTR path );
  213. STRPTR PathPart( STRPTR path );
  214. BOOL AddPart( STRPTR dirname, STRPTR filename, unsigned long size );
  215.  
  216. BOOL StartNotify( struct NotifyRequest *notify );
  217. void EndNotify( struct NotifyRequest *notify );
  218.  
  219. BOOL SetVar( STRPTR name, STRPTR buffer, long size, long flags );
  220. LONG GetVar( STRPTR name, STRPTR buffer, long size, long flags );
  221. LONG DeleteVar( STRPTR name, unsigned long flags );
  222. struct LocalVar *FindVar( STRPTR name, unsigned long type );
  223. LONG CliInitNewcli( struct DosPacket *dp );
  224. LONG CliInitRun( struct DosPacket *dp );
  225. LONG WriteChars( STRPTR buf, unsigned long buflen );
  226. LONG PutStr( STRPTR str );
  227. LONG VPrintf( STRPTR format, LONG *argarray );
  228. LONG Printf( STRPTR format, ... );
  229.  
  230. LONG ParsePatternNoCase( STRPTR pat, STRPTR buf, long buflen );
  231. BOOL MatchPatternNoCase( STRPTR pat, STRPTR str );
  232.  
  233. BOOL SameDevice( BPTR lock1, BPTR lock2 );
  234. #endif 
  235.