home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / AsyncIOPPCdev / Include / clib / asyncio_protos.h
C/C++ Source or Header  |  2000-01-02  |  3KB  |  102 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. #ifdef __PPC__
  73. #undef _REG
  74. #define _REG(x)
  75. #undef _ASM
  76. #define _ASM
  77. #endif
  78.  
  79. /*****************************************************************************/
  80.  
  81.  
  82. #ifdef ASIO_NOEXTERNALS
  83. _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 );
  84. _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 );
  85. #else
  86. _ASM _ARGS AsyncFile *OpenAsync( _REG( a0 ) const STRPTR fileName,_REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize );
  87. _ASM _ARGS AsyncFile *OpenAsyncFromFH( _REG( a0 ) BPTR handle, _REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize );
  88. #endif
  89. _ASM _ARGS LONG       CloseAsync( _REG( a0 ) AsyncFile *file );
  90. _ASM _ARGS LONG       PeekAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  91. _ASM _ARGS LONG       ReadAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  92. _ASM _ARGS LONG       ReadCharAsync( _REG( a0 ) AsyncFile *file );
  93. _ASM _ARGS LONG       ReadLineAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG size );
  94. _ASM _ARGS APTR       FGetsAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG size );
  95. _ASM _ARGS APTR       FGetsLenAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG size, _REG( a2 ) LONG *length );
  96. _ASM _ARGS LONG       WriteAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  97. _ASM _ARGS LONG       WriteCharAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) UBYTE ch );
  98. _ASM _ARGS LONG       WriteLineAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) STRPTR line );
  99. _ASM _ARGS LONG       SeekAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) LONG position, _REG( d1 ) SeekModes mode);
  100.  
  101. #endif /* CLIB_LIBRARIES_ASYNCIO_H */
  102.