home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / dev / c / Asyncio.lha / AsyncIO / src / async.h next >
Encoding:
C/C++ Source or Header  |  1995-11-14  |  1.8 KB  |  91 lines

  1.  
  2. #include <exec/types.h>
  3. #include <exec/memory.h>
  4. #include <dos/dos.h>
  5. #include <dos/dosextens.h>
  6.  
  7. #include <clib/asyncio_protos.h>
  8. #include <clib/exec_protos.h>
  9. #include <clib/dos_protos.h>
  10.  
  11. #include <pragmas/exec_pragmas.h>
  12. #include <pragmas/dos_pragmas.h>
  13.  
  14. #include <string.h>
  15.  
  16.  
  17. /*****************************************************************************/
  18.  
  19.  
  20. #ifdef ASIO_SHARED_LIB
  21.  
  22. #define LibCall __geta4
  23.  
  24. #ifdef _DCC
  25.  
  26. #define _REG(x) __ ## x
  27. #define _ASM
  28. #define _ARGS __regargs
  29.  
  30. #else
  31.  
  32. #ifdef __GNUC__
  33.  
  34. #define _REG(x)
  35. #define _ASM
  36.  
  37. #else /* __SASC__ */
  38.  
  39. #define _REG(x) register __ ## x
  40. #define _ASM    __asm
  41.  
  42. #endif /* __GNUC__ */
  43.  
  44. #endif /* _DCC */
  45.  
  46. #else /* ASIO_SHARED_LIB */
  47.  
  48. #define LibCall
  49.  
  50. #endif /* ASIO_SHARED_LIB */
  51.  
  52.  
  53. /*****************************************************************************/
  54.  
  55.  
  56. #ifndef ASIO_NOEXTERNALS
  57. extern struct DosLibrary    *DOSBase;
  58. extern struct ExecBase        *SysBase;
  59. #endif
  60.  
  61. #ifdef ASIO_SHARED_LIB
  62. extern struct ExecBase        *SysBase;
  63. extern struct Library        *UtilityBase;
  64. extern struct DosLibrary    *DOSBase;
  65. #endif
  66.  
  67.  
  68. /*****************************************************************************/
  69.  
  70.  
  71. /* this macro lets us long-align structures on the stack */
  72. #define D_S(type,name) char a_##name[sizeof(type)+3]; \
  73.             type *name = (type *)((LONG)(a_##name+3) & ~3);
  74.  
  75.  
  76. /*****************************************************************************/
  77.  
  78.  
  79. #ifdef ASIO_NOEXTERNALS
  80. AsyncFile *
  81. AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt, struct ExecBase *SysBase, struct DosLibrary *DOSBase );
  82. #else
  83. AsyncFile *
  84. AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt );
  85. #endif
  86. VOID AS_SendPacket( AsyncFile *file, APTR arg2 );
  87. LONG AS_WaitPacket( AsyncFile *file );
  88. VOID AS_RequeuePacket( AsyncFile *file );
  89. VOID AS_RecordSyncFailure( AsyncFile *file );
  90.  
  91.