home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff384.lzh
/
NorthC
/
NorthC1.LZH
/
clibs
/
AmigaDOS.doc
< prev
next >
Wrap
Text File
|
1990-09-04
|
15KB
|
524 lines
(c) 1990 S.Hawtin.Permission is granted to copy this file provided
1) It is not used for commercial gain
2) This notice is included in all copies
3) Altered copies are marked as such
No liability is accepted for the contents of the file.
AmigaDOS.doc within Public Domain C library
This file contains a list of the AmigaDOS stubs that are included
within the NorthC standard library. The routines are listed by library.
When your program starts the routines in "crt0.asm" will automagically
load "dos.library", "exec.library" and "mathffp.library", the
"mathtrans.library" is loaded as soon as you try to use it, all other
libraries must be loaded explicitly by your program.
The OpenLibrary() routine in the NorthC 'C' library does more than
just open the library, it keeps a record of the library pointers and closes
them when the program ends, if you want to call the real OpenLibrary()
routine it is called _OpenLibrary(). Similarly the CloseLibrary() routine
tidies some things up, the real routine is called _CloseLibrary().
Calling the real routines in NorthC programs may result in nasty errors.
If you use the OpenLibrary() routine all the linking is done for you,
you do not need to remember the name of the global variable that needs
thelibrary pointer, for example
int
next_name(new_str,old_str)
char *new_str;
char *old_str;
{/* All library calls require long arguments everywhere */
static int first = -1;
if(first)
{/* Assumes load suceeds, in a real program test for NULL
return */
OpenLibrary("icon.library",0L);
first = 0;
}
return(BumpRevision(new_str,old_str));
}
you do not even have to remember to close the library, the OpenLibrary()
routine sets things so that the exit() routine will do it for you.
All the arguments to AmigaDOS routines are 4 bytes long, even when
the documentation claims they are not. For example the "graphics.library"
Move() function should be defined as
Move(rp,x,y)
struct RastPort *rp;
SHORT x,y;
within this version of the NorthC library it is defined as
Move(rp,x,y)
struct RastPort *rp;
LONG x,y;
this means that you may have to alter your source code to read, for example
short x;
#ifdef NORTHC
Move(rp,(long)x,50L);
#else
Move(rp,x,50);
#endif
or risk getting some nasty behaviour from your machine. The routines
within"graphics.library" are the only ones I have seen so far that say
they take short arguments.
The "mathsieeedoubbas.library" and "mathsieeedoubtrans.library" are
notsupported, I could not work out how to return 64 bits in the D0
register,maybe I will for a future release.
Right having introduced the functions here they are, the rest of this
file lists the AmigaDOS routines that are supported by the standard NorthC
'C' library.
diskfont.library
AvailFonts(buffer,bufBytes,flags)
DisposeFontContents(fontContentsHeader)
NewFontContents(fontsLock,fontName)
OpenDiskFont(textAttr)
dos.library
Close(file)
CreateDir(name)
CreateProc(name,pri,segList,stackSize)
CurrentDir(lock)
DateStamp(date)
Delay(timeout)
DeleteFile(name)
DeviceProc(name)
DupLock(lock)
Examine(lock,fileInfoBlock)
Execute(string,fileIn,fileOut)
Exit(returnCode)
ExNext(lock,fileInfoBlock)
GetPacket(wait)
Info(lock,parameterBlock)
Input()
IoErr()
IsInteractive(file)
LoadSeg(fileName)
Lock(name,type)
Open(name,AccessMode)
Output()
ParentDir(lock)
QueuePacket(packet)
Read(file,buffer,length)
Rename(oldName,newName)
Seek(file,position,offset)
SetComment(name,comment)
SetProtection(name,mask)
UnLoadSeg(segment)
UnLock(lock)
WaitForChar(file,timeout)
Write(file,buffer,length)
exec.library
AbortIO(ioRequest)
AddDevice(device)
AddHead(list,node)
AddIntServer(intNumber,interrupt)
AddLibrary(library)
AddMemList(size,attrib,pri,base,name)
AddPort(port)
AddResource(resource)
AddSemaphore(sigSem)
AddTail(list,node)
AddTask(task,initPC,finalPC)
Alert(alertNum,parameters)
AllocAbs(byteSize,location)
Allocate(freeList,byteSize)
AllocEntry(entry)
AllocMem(byteSize,requirements)
AllocSignal(signalNum)
AllocTrap(trapNum)
AttemptSemaphore(sigSem)
AvailMem(requirements)
Cause(interrupt)
CheckIO(ioRequest)
CloseDevice(ioRequest)
_CloseLibrary(library)
CopyMem(source,dest,size)
CopyMemQuick(source,dest,size)
Deallocate(freeList,memBlock,byteSize)
Debug()
Disable()
Dispatch()
DoIO(ioRequest)
Enable()
Enqueue(list,node)
Exception()
ExitIntr()
FindName(list,name)
FindPort(name)
FindResident(name)
FindSemaphore(sigSem)
FindTask(name)
Forbid()
FreeEntry(entry)
FreeMem(memBlock,byteSize)
FreeSignal(signalNum)
FreeTrap(trapNum)
GetCC()
GetMsg(port)
InitCode(startClass,version)
InitResident(resident,segList)
InitSemaphore(sigSem)
InitStruct(initTable,memory,size)
Insert(list,node,pred)
MakeFunctions(target,funcArray,funcDispBase)
MakeLibrary(fInit,sInit,lInit,dsize,cSize)
ObtainSemaphore(sigSem)
ObtainSemaphoreList(sigSem)
OldOpenLibrary(libName)
OpenDevice(devName,unit,ioRequest,flags)
_OpenLibrary(libName,version)
OpenResource(resName,version)
Permit()
Procure(semaport,bidMsg)
PutMsg(port,message)
RawDoFmt()
RawIOInit()
RawMayGetChar()
RawPutChar(char)
ReleaseSemaphore(sigSem)
ReleaseSemaphoreList(sigSem)
RemDevice(device)
RemHead(list)
RemIntServer(intNumber,interrupt)
RemLibrary(library)
Remove(node)
RemPort(port)
RemResource(resource)
RemSemaphore(sigSem)
RemTail(list)
RemTask(task)
ReplyMsg(message)
Reschedule()
Schedule()
SendIO(ioRequest)
SetExcept(newSig,signalSet)
SetFunction(library,funcOffset,funcEntry)
SetIntVector(intNumber,interrupt)
SetSignal(newSig,signalSet)
SetSR(newSR,mask)
SetTaskPri(task,priority)
Signal(task,signalSet)
SumKickData()
SumLibrary(library)
SuperState()
Supervisor()
Switch()
TypeOfMem(address)
UserState(sysStack)
Vacate(semaport)
Wait(signalSet)
WaitIO(ioRequest)
WaitPort(port)
expansion.library
AddConfigDev(configDev)
AddDosNode(bootPri,flags,dosNode)
AllocBoardMem(slotSpec)
AllocConfigDev()
AllocExpansionMem(numSlots,slotAlign,slotOffset)
ConfigBoard(board,configDev)
ConfigChain(baseAddr)
expansionUnused()
FindConfigDev(oldConfigDev,manufacturer,product)
FreeBoardMem(startSlot,slotSpec)
FreeConfigDev(configDev)
FreeExpansionMem(startSlot,numSlots)
GetCurrentBinding(curBind,bindSize)
MakeDosNode(parmPacket)
ObtainConfigBinding()
ReadExpansionByte(board,offset)
ReadExpansionRom(board,configDev)
ReleaseConfigBinding()
RemConfigDev(configDev)
SetCurrentBinding(curBind,bindSize)
WriteExpansionByte(board,offset,byte)
graphics.library
AddAnimOb(obj,animationKey,rastPort)
AddBob(bob,rastPort)
AddFont(textFont)
AddVSprite(vSprite,rastPort)
AllocRaster(width,height)
AndRectRegion(rgn,rect)
AndRegionRegion(src,dst)
Animate(animationKey,rastPort)
AreaDraw(rastPort,x,y)
AreaElipse(rPort,cx,cy,a,b)
AreaEnd(rastPort)
AreaMove(rastPort,x,y)
AskFont(rastPort,textAttr)
AskSoftStyle(rastPort)
AttemptLockLayerRom(layer)
BltBitMap(sBitMap,sX,sY,dBitMap,dX,dY,szX,szY,mnt,msk,t)
BltBitMapRastPort(src,sx,sy,dest,dX,dY,szX,szY,mint)
BltClear(memory,size,flags)
BltMaskBitMapRastPort(src,sx,sy,dest,dX,dY,szX,szY,mint,bMask)
BltPattern(rastPort,ras,xl,yl,maxX,maxY,fillBytes)
BltTemplate(src,sX,sMod,dRastPort,dX,dY,szX,szY)
CBump(copperList)
ChangeSprite(vp,simplesprite,data)
ClearEOL(rastPort)
ClearRegion(rgn)
ClearScreen(rastPort)
ClipBlit(src,sX,sY,dest,dX,dY,szX,szY,mint)
CloseFont(textFont)
CMove(copperList,destination,data)
CopySBitMap(l1,l2)
CWait(copperList,x,y)
DisownBlitter()
DisposeRegion(rgn)
DoCollision(rasPort)
Draw(rastPort,x,y)
DrawElipse(rPort,cx,cy,a,b)
DrawGList(rastPort,viewPort)
Flood(rastPort,mode,x,y)
FreeColorMap(colormap)
FreeCopList(coplist)
FreeCprList(cprlist)
FreeGBuffers(animationObj,rastPort,doubleBuffer)
FreeRaster(planeptr,width,height)
FreeSprite(num)
FreeVPortCopLists(viewport)
GetColorMap(entries)
GetGBuffers(animationObj,rastPort,doubleBuffer)
GetRGB4(colormap,entry)
GetSprite(simplesprite,num)
GraphicsReserved1()
GraphicsReserved2()
InitArea(areaInfo,vectorTable,vectorTableSize)
InitBitMap(bitMap,depth,width,height)
InitGels(dummyHead,dummyTail,GelsInfo)
InitGMasks(animationObj)
InitMasks(vSprite)
InitRastPort(rastPort)
InitTmpRas(tmpras,buff,size)
InitView(view)
InitVPort(viewPort)
LoadRGB4(viewPort,colors,count)
LoadView(view)
LockLayerRom(layer)
MakeVPort(view,viewPort)
Move(rastPort,x,y)
MoveSprite(viewport,simplesprite,x,y)
MrgCop(view)
NewRegion()
NotRegion(rgn)
OpenFont(textAttr)
OrRectRegion(rgn,rect)
OrRegionRegion(src,dst)
OwnBlitter()
PolyDraw(rastPort,count,polyTable)
QBlit(blit)
QBSBlit(blit)
ReadPixel(rastPort,x,y)
RectFill(rastPort,xl,yl,xu,yu)
RemFont(textFont)
RemIBob(bob,rastPort,viewPort)
RemVSprite(vSprite)
ScrollRaster(rastPort,dX,dY,minx,miny,maxx,maxy)
ScrollVPort(vp)
SetAPen(rastPort,pen)
SetBPen(rastPort,pen)
SetCollision(type,routine,gelsInfo)
SetDrMd(rastPort,drawMode)
SetFont(RastPortID,textFont)
SetRast(rastPort,color)
SetRGB4(viewPort,index,r,g,b)
SetRGB4CM(cm,i,r,g,b)
SetSoftStyle(rastPort,style,enable)
SortGList(rastPort)
SyncSBitMap(l)
Text(RastPort,string,count)
TextLength(RastPort,string,count)
UCopperListInit(copperlist,num)
UnlockLayerRom(layer)
VBeamPos()
WaitBlit()
WaitBOVP(viewport)
WaitTOF()
WritePixel(rastPort,x,y)
XorRectRegion(rgn,rect)
XorRegionRegion(src,dst)
icon.library
AddFreeList(freelist,mem,size)
AllocWBObject()
BumpRevision(newname,oldname)
FindToolType(toolTypeArray,typeName)
FreeDiskObject(diskobj)
FreeFreeList(freelist)
FreeWBObject(WBObject)
GetDiskObject(name)
GetIcon(name,icon,freelist)
GetWBObject(name)
MatchToolValue(typeString,value)
PutDiskObject(name,diskobj)
PutIcon(name,icon)
PutWBObject(name,object)
intuition.library
ActivateGadget(Gad,Window,Req)
ActivateWindow(Window)
AddGadget(AddPtr,Gadget,Position)
AddGList(aPtr,Gad,Pos,NumGad,Req)
AllocRemember(RememberKey,Size,Flags)
AlohaWorkbench(wbport)
AutoRequest(Window,Body,PText,NText,PFlag,NFlag,W,H)
BeginRefresh(Window)
BuildSysRequest(Window,Body,PosText,NegText,Flags,W,H)
ClearDMRequest(Window)
ClearMenuStrip(Window)
ClearPointer(Window)
CloseScreen(Screen)
CloseWindow(Window)
CloseWorkBench()
CurrentTime(Seconds,Micros)
DisplayAlert(AlertNumber,String,Height)
DisplayBeep(Screen)
DoubleClick(sseconds,smicros,cseconds,cmicros)
DrawBorder(RPort,Border,LeftOffset,TopOffset)
DrawImage(RPort,Image,LeftOffset,TopOffset)
EndRefresh(Window,Complete)
EndRequest(requester,window)
FreeRemember(RememberKey,ReallyForget)
FreeSysRequest(Window)
GetDefPrefs(preferences,size)
GetPrefs(preferences,size)
GetScreenData(buffer,size,type,screen)
InitRequester(req)
IntuiTextLength(itext)
Intuition(ievent)
ItemAddress(MenuStrip,MenuNumber)
LockIBase(dontknow)
MakeScreen(Screen)
ModifyIDCMP(Window,Flags)
ModifyProp(Gadget,Ptr,Req,Flags,HPos,VPos,HBody,VBody)
MoveScreen(Screen,dx,dy)
MoveWindow(window,dx,dy)
NewModifyProp(Gad,Ptr,Req,Flg,hPs,vPs,hBdy,vBdy,NumG)
OffGadget(Gadget,Ptr,Req)
OffMenu(Window,MenuNumber)
OnGadget(Gadget,Ptr,Req)
OnMenu(Window,MenuNumber)
OpenIntuition()
OpenScreen(OSargs)
OpenWindow(OWargs)
OpenWorkBench()
PrintIText(rp,itext,left,top)
RefreshGadgets(Gadgets,Ptr,Req)
RefreshGList(Gadgets,Ptr,Req,NumGad)
RefreshWindowFrame(Window)
RemakeDisplay()
RemoveGadget(RemPtr,Gadget)
RemoveGList(RemPtr,Gad,NumGad)
ReportMouse(Window,Boolean)
Request(Requester,Window)
RethinkDisplay()
ScreenToBack(Screen)
ScreenToFront(Screen)
SetDMRequest(Window,req)
SetMenuStrip(Window,Menu)
SetPointer(Window,Pointer,Height,Width,Xoffset,Yoffset)
SetPrefs(preferences,size,flag)
SetWindowTitles(window,windowtitle,screentitle)
ShowTitle(Screen,ShowIt)
SizeWindow(window,dx,dy)
UnlockIBase(IBLock)
ViewAddress()
ViewPortAddress(window)
WBenchToBack()
WBenchToFront()
WindowLimits(window,minwidth,minheight,maxwidth,maxheight)
WindowToBack(window)
WindowToFront(window)
layers.library
BeginUpdate(layer)
BehindLayer(li,layer)
CreateBehindLayer(li,bm,x0,y0,x1,y1,flags,bm2)
CreateUpfrontLayer(li,bm,x0,y0,x1,y1,flags,bm2)
DeleteLayer(li,layer)
DisposeLayerInfo(li)
EndUpdate(layer,flag)
FattenLayerInfo(li)
InitLayers(li)
InstallClipRegion(layer,region)
LockLayer(li,layer)
LockLayerInfo(li)
LockLayers(li)
MoveLayer(li,layer,dx,dy)
MoveLayerInFrontOf(layer_to_move,layer_to_be_infront_of)
NewLayerInfo()
ScrollLayer(li,layer,dx,dy)
SizeLayer(li,layer,dx,dy)
SwapBitsRastPortClipRect(rp,cr)
ThinLayerInfo(li)
UnlockLayer(layer)
UnlockLayerInfo(li)
UnlockLayers(li)
UpfrontLayer(li,layer)
WhichLayer(li,x,y)
mathffp.library
SPAbs(fnum1)
SPAdd(fnum1,fnum2)
SPCeil(fnum1)
SPCmp(fnum1,fnum2)
SPDiv(fnum1,fnum2)
SPFix(fnum1)
SPFloor(fnum1)
SPFlt(num1)
SPMul(fnum1,fnum2)
SPNeg(fnum1)
SPSub(fnum1,fnum2)
SPTst(fnum1)
mathtrans.library
SPAcos(num1)
SPAsin(num1)
SPAtan(num1)
SPCos(num1)
SPCosh(num1)
SPExp(num1)
SPFieee(num1)
SPLog(num1)
SPLog10(num1)
SPPow(num1,num2)
SPSin(num1)
SPSincos(num1,num2)
SPSinh(num1)
SPSqrt(num1)
SPTan(num1)
SPTanh(num1)
SPTieee(num1)
translator.library
Translate(inStr,inLen,oBuf,bSize)