/* Automatically generated gate stubs */

#include"async.h"
#include "asyncio_protos.h"

#include <emul/emulregs.h>
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL
#define BASE_EXT_DECL0 extern struct Library *AsyncIOBase;
#endif /* !BASE_EXT_DECL */
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0 void
#endif /* !BASE_PAR_DECL */
#ifndef BASE_NAME
#define BASE_NAME AsyncIOBase
#endif /* !BASE_NAME */

BASE_EXT_DECL0

LONG GATE_CloseAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	return(CloseAsync(file));
}
APTR GATE_FGetsAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	APTR buf	=(APTR) REG_A1;
	LONG bytes	=(LONG) REG_D0;
	return(FGetsAsync(file,buf,bytes));
}
APTR GATE_FGetsLenAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	APTR buf	=(APTR) REG_A1;
	LONG bytes	=(LONG) REG_D0;
	LONG * length	=(LONG *) REG_A2;
	return(FGetsLenAsync(file,buf,bytes,length));
}
AsyncFile * GATE_OpenAsync(void)
{
	const STRPTR fileName	=(const STRPTR) REG_A0;
	OpenModes mode	=(OpenModes) REG_D0;
	LONG bufferSize	=(LONG) REG_D1;
	return(OpenAsync(fileName,mode,bufferSize));
}
AsyncFile * GATE_OpenAsyncFromFH(void)
{
	BPTR handle	=(BPTR) REG_A0;
	OpenModes mode	=(OpenModes) REG_D0;
	LONG bufferSize	=(LONG) REG_D1;
	return(OpenAsyncFromFH(handle,mode,bufferSize));
}
LONG GATE_PeekAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	APTR buffer	=(APTR) REG_A1;
	LONG bytes	=(LONG) REG_D0;
	return(PeekAsync(file,buffer,bytes));
}
LONG GATE_ReadAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	APTR buffer	=(APTR) REG_A1;
	LONG bytes	=(LONG) REG_D0;
	return(ReadAsync(file,buffer,bytes));
}
LONG GATE_ReadCharAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	return(ReadCharAsync(file));
}
LONG GATE_ReadLineAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	APTR buf	=(APTR) REG_A1;
	LONG bytes	=(LONG) REG_D0;
	return(ReadLineAsync(file,buf,bytes));
}
LONG GATE_SeekAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	LONG position	=(LONG) REG_D0;
	SeekModes mode	=(SeekModes) REG_D1;
	return(SeekAsync(file,position,mode));
}
LONG GATE_WriteAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	APTR buffer	=(APTR) REG_A1;
	LONG bytes	=(LONG) REG_D0;
	return(WriteAsync(file,buffer,bytes));
}
LONG GATE_WriteCharAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	UBYTE ch	=(UBYTE) REG_D0;
	return(WriteCharAsync(file,ch));
}
LONG GATE_WriteLineAsync(void)
{
	AsyncFile * file	=(AsyncFile *) REG_A0;
	STRPTR buf	=(STRPTR) REG_A1;
	return(WriteLineAsync(file,buf));
}
