OPT	LINK='powerd_ieee.lib'

// String/EString functions ////////////
RPROC EStrAdd(a0:PTR TO CHAR,a1:PTR TO CHAR,d0=-1)(PTR TO CHAR)
LPROC EStrCopy(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length=-1)(PTR TO CHAR)
LPROC EStringF(dstr:PTR TO CHAR,fstr:PTR TO CHAR,list=NIL:LIST OF LONG)(PTR TO CHAR)
RPROC EStrLen(a0:PTR TO CHAR)(LONG)
RPROC EStrMax(a0:PTR TO CHAR)(LONG)
RPROC InStr(a0:PTR TO CHAR,a1:PTR TO CHAR,d0=0:LONG)(LONG)
RPROC MidEStr(a0:PTR TO CHAR,a1:PTR TO CHAR,d1,d0)(PTR TO CHAR)
//LPROC MidStr(string:PTR TO CHAR,str:PTR TO CHAR,start,length)(PTR TO CHAR)
RPROC IsAlpha(d0:LONG)(BOOL)
RPROC IsBin(d0:LONG)(BOOL)
RPROC IsHex(d0:LONG)(BOOL)
RPROC IsNum(d0:LONG)(BOOL)
RPROC LowerStr(a0:PTR TO CHAR)(PTR TO CHAR)
RPROC NewEStr(d0:UWORD)(PTR TO CHAR)
LPROC OStrCmp(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length=-1)(LONG)
LPROC ReadEStr(fh:BPTR,estr:PTR TO CHAR)(LONG)
//LPROC ReadStr(fh:BPTR,str:PTR TO CHAR)(LONG)
RPROC ReEStr(a0:PTR TO CHAR)
RPROC RemEStr(a1:PTR TO CHAR)
LPROC RightEStr(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length)(PTR TO CHAR)
//LPROC RightStr(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length)(PTR TO CHAR)
RPROC SetEStr(a0:PTR TO CHAR,d0:LONG)
LPROC StrAdd(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length=-1)(BOOL)
LPROC StrCmp(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length=-1)(BOOL)
LPROC StrCopy(dstr:PTR TO CHAR,sstr:PTR TO CHAR,length=-1)(BOOL)
LPROC StringF(dstr:PTR TO CHAR,fstr:PTR TO CHAR,list=NIL:LIST OF LONG)(PTR TO CHAR)
RPROC StrLen(a0:PTR TO CHAR)(LONG)
RPROC TrimStr(a0:PTR TO CHAR)(PTR TO CHAR)
RPROC UpperStr(a0:PTR TO CHAR)(PTR TO CHAR)

// Math functions //////////////////////
RPROC Abs(d0:LONG)(LONG)//='\ttst.l\td0\n\tbge.s\t.noneg\n\tneg.l\td0\n.noneg\n'
RPROC And(d0:LONG,d1:LONG)(LONG)='\tand.l\td1,d0\n'
RPROC BitCount(d0:LONG)(LONG)
RPROC BitSize(d0:LONG)(LONG)
RPROC EOr(d0:LONG,d1:LONG)(LONG)='\teor.l\td1,d0\n'
RPROC HiBit(d0:LONG)(LONG)
RPROC LoBit(d0:LONG)(LONG)
RPROC Or(d0:LONG,d1:LONG)(LONG)='\tor.l\td1,d0\n'
RPROC Neg(d0:LONG)(LONG)='\tneg.l\td0\n'
RPROC Not(d0:LONG)(LONG)='\tnot.l\td0\n'
RPROC Rol(d0:LONG,d1:LONG)(LONG)='\trol.l\td1,d0\n'
RPROC Ror(d0:LONG,d1:LONG)(LONG)='\tror.l\td1,d0\n'
RPROC Shl(d0:LONG,d1:LONG)(LONG)='\tasl.l\td1,d0\n'
RPROC Shr(d0:LONG,d1:LONG)(LONG)='\tasr.l\td1,d0\n'
RPROC Sign(d0:LONG)(LONG)

// FPU functions ///////////////////////
RPROC Pow(fp0:DOUBLE,fp1:DOUBLE)(DOUBLE)

// Intuition support functions /////////
RPROC Mouse()(LONG)
RPROC MouseX(a0:PTR TO Window)(LONG)
RPROC MouseXY(a0:PTR TO Window)(LONG,LONG)
RPROC MouseY(a0:PTR TO Window)(LONG)
RPROC WaitIMessage(a0:PTR TO Window)(LONG,LONG,LONG,LONG)

// Miscellaneous functions /////////////
RPROC CtrlC()(BOOL)
RPROC CtrlD()(BOOL)
RPROC CtrlE()(BOOL)
RPROC CtrlF()(BOOL)

RPROC Byte(a0:PTR TO BYTE)(LONG)
RPROC Word(a0:PTR TO WORD)(LONG)
RPROC Long(a0:PTR TO LONG)(LONG)
RPROC UByte(a0:PTR TO BYTE)(LONG)
RPROC UWord(a0:PTR TO WORD)(LONG)
RPROC ULong(a0:PTR TO LONG)(LONG)

RPROC PutByte(a0:PTR TO BYTE,d0:LONG)(LONG)
RPROC PutWord(a0:PTR TO WORD,d0:LONG)(LONG)
RPROC PutLong(a0:PTR TO LONG,d0:LONG)(LONG)

RPROC Bounds(d0:LONG,d1:LONG,d2:LONG)(LONG)
RPROC Even(d0:LONG)(BOOL)
RPROC Odd(d0:LONG)(BOOL)
RPROC Max(d0:LONG,d1:LONG)(LONG)
RPROC Min(d0:LONG,d1:LONG)(LONG)

RPROC Rnd(d0:LONG)(LONG)
RPROC RndQ(d0:LONG)(LONG)

EPROC FileLength(name:PTR TO CHAR)(LONG)
RPROC KickVersion(d0:LONG)(BOOL)

LPROC Inp(fh:BPTR)(LONG)
LPROC Out(fh:BPTR,ch:LONG)

EPROC RealStr(str:PTR TO UBYTE,f:DOUBLE,n=1)(PTR TO UBYTE)
EPROC RealEStr(estr:PTR TO UBYTE,f:DOUBLE,n=1)(PTR TO UBYTE)
EPROC RealVal(str:PTR TO UBYTE,pos=0)(DOUBLE)
EPROC Val(s:PTR TO UBYTE,n=0)(LONG)

RPROC AllocVecPooled(a0:APTR,d0:LONG)(PTR)
RPROC FreeVecPooled(a0:APTR,a1:PTR)



EPROC OpenW(l,t,w,h,i,f,n=NIL,s=NIL,st=1,g=NIL,tags=NIL:PTR TO TagItem)(PTR TO Window)
EPROC OpenS(w,h,d,t=0,n=NIL,tags=NIL:PTR TO TagItem)(PTR TO Screen)
RPROC CloseW(a0:PTR TO Window)
RPROC CloseS(a0:PTR TO Screen)

RPROC SetStdRast(d1:PTR TO RastPort)(PTR TO RastPort)
RPROC Colour(d0,d1=0)
RPROC Line(d0,d1,d2,d3,d4=-1)
RPROC Plot(d0,d1,d2=-1)
RPROC Box(d0,d1,d2,d3,d4=-1)
RPROC Ellipse(d0,d1,d2,d3,d4=-1)
RPROC Circle(d0,d1,d2,d3=-1)
/*
RPROC IBox(x,y,w,h,c=-1)
RPROC TextF(x,y,fmt,args)
*/
