home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / asyncio / include / clib / asyncio_protos.h
C/C++ Source or Header  |  1997-02-19  |  3KB  |  96 lines

  1. #ifndef CLIB_ASYNCIO_PROTOS_H
  2. #define CLIB_ASYNCIO_PROTOS_H
  3.  
  4. #ifndef LIBRARIES_ASYNCIO_H
  5. #include <libraries/asyncio.h>
  6. #endif
  7.  
  8.  
  9. /*****************************************************************************/
  10.  
  11.  
  12. #ifdef _DCC
  13.  
  14. #define _REG(x)    __ ## x
  15. #define _ASM
  16. #define _ARGS __regargs
  17.  
  18. #else
  19.  
  20. #ifdef __GNUC__
  21.  
  22. #define _REG(x)
  23. #define _ASM
  24.  
  25. #else
  26.  
  27. #ifdef __STORM__
  28.  
  29. #define _REG(x)    register __ ## x
  30. #define _ASM
  31. #define _ARGS
  32.  
  33. #else /* __SASC__ */
  34.  
  35. #define _REG(x)    register __ ## x
  36. #define _ASM    __asm
  37. #define _ARGS   __regargs
  38.  
  39. #endif /* __STORM__ */
  40.  
  41. #endif /* __GNUC__ */
  42.  
  43. #endif /* _DCC */
  44.  
  45.  
  46. #ifndef ASIO_SHARED_LIB
  47. #ifndef ASIO_REGARGS
  48. #undef _REG
  49. #define _REG(x)
  50. #undef _ASM
  51. #define _ASM
  52.  
  53. #ifdef _DCC
  54. #undef _ARGS
  55. #define _ARGS __stkargs
  56. #else
  57. #ifdef __GNUC__
  58. #undef _ARGS
  59. #else
  60. #ifdef __STORM__
  61.  
  62. #else /* __SASC__ */
  63. #undef _ARGS
  64. #define _ARGS __stdargs
  65. #endif /* __STORM__ */
  66. #endif /* __GNUC__ */
  67. #endif /* _DCC */
  68. #endif /* ASIO_REGARGS */
  69.  
  70. #endif /* ASIO_REGARGS */
  71.  
  72.  
  73. /*****************************************************************************/
  74.  
  75.  
  76. #ifdef ASIO_NOEXTERNALS
  77. _ASM _ARGS AsyncFile *OpenAsync( _REG( a0 ) const STRPTR fileName,_REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize, _REG( a1 ) struct ExecBase *SysBase, _REG( a2 ) struct DosLibrary *DOSBase );
  78. _ASM _ARGS AsyncFile *OpenAsyncFromFH( _REG( a0 ) BPTR handle, _REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize, _REG( a1 ) struct ExecBase *SysBase, _REG( a2 ) struct DosLibrary *DOSBase );
  79. #else
  80. _ASM _ARGS AsyncFile *OpenAsync( _REG( a0 ) const STRPTR fileName,_REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize );
  81. _ASM _ARGS AsyncFile *OpenAsyncFromFH( _REG( a0 ) BPTR handle, _REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize );
  82. #endif
  83. _ASM _ARGS LONG       CloseAsync( _REG( a0 ) AsyncFile *file );
  84. _ASM _ARGS LONG       PeekAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  85. _ASM _ARGS LONG       ReadAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  86. _ASM _ARGS LONG       ReadCharAsync( _REG( a0 ) AsyncFile *file );
  87. _ASM _ARGS LONG       ReadLineAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG size );
  88. _ASM _ARGS APTR       FGetsAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG size );
  89. _ASM _ARGS APTR       FGetsLenAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG size, _REG( a2 ) LONG *length );
  90. _ASM _ARGS LONG       WriteAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  91. _ASM _ARGS LONG       WriteCharAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) UBYTE ch );
  92. _ASM _ARGS LONG       WriteLineAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) STRPTR line );
  93. _ASM _ARGS LONG       SeekAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) LONG position, _REG( d1 ) SeekModes mode);
  94.  
  95. #endif /* CLIB_LIBRARIES_ASYNCIO_H */
  96.