home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / c_library / asyncio / source / async.h next >
C/C++ Source or Header  |  1977-12-31  |  2KB  |  92 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_sysbase_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. #ifdef _DCC
  23.  
  24. #define LibCall __geta4
  25. #define _REG(x) __ ## x
  26. #define _ASM
  27. #define _ARGS __regargs
  28.  
  29. #else
  30.  
  31. #ifdef __GNUC__
  32.  
  33. #define LibCall
  34. #define _REG(x)
  35. #define _ASM
  36.  
  37. #else /* __SASC */
  38.  
  39. #define LibCall __saveds
  40. #define _REG(x) register __ ## x
  41. #define _ASM    __asm
  42.  
  43. #endif /* __GNUC__ */
  44.  
  45. #endif /* _DCC */
  46.  
  47. #else /* ASIO_SHARED_LIB */
  48.  
  49. #define LibCall
  50.  
  51. #endif /* ASIO_SHARED_LIB */
  52.  
  53.  
  54. /*****************************************************************************/
  55.  
  56.  
  57. #ifndef ASIO_NOEXTERNALS
  58. extern struct DosLibrary    *DOSBase;
  59. extern struct ExecBase        *SysBase;
  60. #endif
  61.  
  62. #ifdef ASIO_SHARED_LIB
  63. extern struct ExecBase        *SysBase;
  64. extern struct Library        *UtilityBase;
  65. extern struct DosLibrary    *DOSBase;
  66. #endif
  67.  
  68.  
  69. /*****************************************************************************/
  70.  
  71.  
  72. /* this macro lets us long-align structures on the stack */
  73. #define D_S(type,name) char a_##name[sizeof(type)+3]; \
  74.             type *name = (type *)((LONG)(a_##name+3) & ~3);
  75.  
  76.  
  77. /*****************************************************************************/
  78.  
  79.  
  80. #ifdef ASIO_NOEXTERNALS
  81. AsyncFile *
  82. AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt, struct ExecBase *SysBase, struct DosLibrary *DOSBase );
  83. #else
  84. AsyncFile *
  85. AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt );
  86. #endif
  87. VOID AS_SendPacket( AsyncFile *file, APTR arg2 );
  88. LONG AS_WaitPacket( AsyncFile *file );
  89. VOID AS_RequeuePacket( AsyncFile *file );
  90. VOID AS_RecordSyncFailure( AsyncFile *file );
  91.  
  92.