home *** CD-ROM | disk | FTP | other *** search
- #ifndef CLIB_ASYNCIO_PROTOS_H
- #define CLIB_ASYNCIO_PROTOS_H
- #ifndef LIBRARIES_ASYNCIO_H
- #include <libraries/asyncio.h>
- #endif
-
- /* Functions for asycioppc V40 */
-
- /* These are the functions for the M68K side of your program !! */
-
- #ifndef __PPC__
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- struct AsyncFile *OpenAsync(STRPTR fileName,ULONG mode,LONG bufferSize);
- struct AsyncFile *OpenAsyncFromFH(BPTR handle,ULONG mode,LONG bufferSize);
- LONG CloseAsync(struct AsyncFile *file);
- LONG ReadAsync(struct AsyncFile *file,APTR buffer,LONG numBytes);
- LONG ReadCharAsync(struct AsyncFile *file);
- LONG ReadLineAsync(struct AsyncFile *file,STRPTR buffer,LONG size);
- LONG WriteAsync(struct AsyncFile *file,APTR buffer,LONG numBytes);
- LONG WriteCharAsync(struct AsyncFile *file,ULONG ch);
- LONG WriteLineAsync(struct AsyncFile *file,STRPTR line);
- LONG SeekAsync(struct AsyncFile *file,LONG position,LONG mode);
- STRPTR FGetsAsync(struct AsyncFile *file,STRPTR buffer,LONG size);
- STRPTR FGetsLenAsync(struct AsyncFile *file,STRPTR buffer,LONG size,LONG *length);
- LONG PeekAsync(struct AsyncFile *file,APTR buffer,LONG numBytes);
-
- #ifdef __cplusplus
- }
- #endif
-
- #else
-
- /* V40 functions */
-
- /* These are the functions for the PPC-WOS side of your program !! */
-
- extern "AmigaLib" AsyncIOBase
- {
- struct AsyncFile *OpenAsyncPPC_(struct Library *,STRPTR,ULONG,LONG)=-0x6c;
- struct AsyncFile *OpenAsyncFromFHPPC_(struct Library *,BPTR,ULONG,LONG)=-0x72;
- LONG CloseAsyncPPC_(struct Library *,struct AsyncFile *)=-0x78;
- LONG ReadAsyncPPC_(struct Library *,struct AsyncFile *,APTR,LONG)=-0x84;
- LONG ReadCharAsyncPPC_(struct Library *,struct AsyncFile *)=-0x90;
- LONG ReadLineAsyncPPC_(struct Library *,struct AsyncFile *,STRPTR,LONG)=-0x9c;
- LONG WriteAsyncPPC_(struct Library *,struct AsyncFile *,APTR,LONG)=-0x8a;
- LONG WriteCharAsyncPPC_(struct Library *,struct AsyncFile *,ULONG)=-0x96;
- LONG WriteLineAsyncPPC_(struct Library *,struct AsyncFile *,STRPTR)=-0xa2;
- LONG SeekAsyncPPC_(struct Library *,struct AsyncFile *,LONG,LONG)=-0x7e;
- STRPTR FGetsAsyncPPC_(struct Library *,struct AsyncFile *file,STRPTR,LONG)=-0xa8;
- STRPTR FGetsLenAsyncPPC_(struct Library *,struct AsyncFile *,STRPTR,LONG,LONG *)=-0xae;
- LONG PeekAsyncPPC_(struct Library *,struct AsyncFile *,APTR,LONG)=-0xb4;
- }
-
- extern struct Library *AsyncIOBase;
-
- __inline struct AsyncFile *OpenAsyncPPC(STRPTR a1,ULONG a2,LONG a3)
- {
- return OpenAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline struct AsyncFile *OpenAsyncFromFHPPC(BPTR a1,ULONG a2,LONG a3)
- {
- return OpenAsyncFromFHPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline LONG CloseAsyncPPC(struct AsyncFile *a1)
- {
- return CloseAsyncPPC_(AsyncIOBase,a1);
- }
-
- __inline LONG ReadAsyncPPC(struct AsyncFile *a1,APTR a2,LONG a3)
- {
- return ReadAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline LONG ReadCharAsyncPPC(struct AsyncFile *a1)
- {
- return ReadCharAsyncPPC_(AsyncIOBase,a1);
- }
-
- __inline LONG ReadLineAsyncPPC(struct AsyncFile *a1,STRPTR a2,LONG a3)
- {
- return ReadLineAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline LONG WriteAsyncPPC(struct AsyncFile *a1,APTR a2,LONG a3)
- {
- return WriteAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline LONG WriteCharAsyncPPC(struct AsyncFile *a1,ULONG a2)
- {
- return WriteCharAsyncPPC_(AsyncIOBase,a1,a2);
- }
-
- __inline LONG WriteLineAsyncPPC(struct AsyncFile * a1,STRPTR a2)
- {
- return WriteLineAsyncPPC_(AsyncIOBase,a1,a2);
- }
-
- __inline LONG SeekAsyncPPC(struct AsyncFile *a1,LONG a2,LONG a3)
- {
- return SeekAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline STRPTR FGetsAsyncPPC(struct AsyncFile *a1,STRPTR a2,LONG a3)
- {
- return FGetsAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- __inline STRPTR FGetsLenAsyncPPC(struct AsyncFile *a1,STRPTR a2,LONG a3,LONG *a4)
- {
- return FGetsLenAsyncPPC_(AsyncIOBase,a1,a2,a3,a4);
- }
-
- __inline LONG PeekAsyncPPC(struct AsyncFile *a1,APTR a2,LONG a3)
- {
- return PeekAsyncPPC_(AsyncIOBase,a1,a2,a3);
- }
-
- #endif
-
- #endif
-