daemon@rutgers.UUCP (02/24/87)
From: XBR2D995%DDATHD21.BITNET@wiscvm.wisc.edu Hello everybody, one of my coworkers has a request. He want's to call the routine CINIT (initializes a User-CopperList ???) from Lattice-C or from Manx-C. Both compilers seem to know the routine, but at link time it is not available. Can somebody please tell me/him how to call that routine, which parameter it needs and how they should be initialized. Regards Martin Knoblauch <XBR2D995@DDATHD21.BITNET>
dillon@CORY.BERKELEY.EDU.UUCP (02/25/87)
I think it's a macro. ... probably #define'd in one of the graphics include files (I don't have the cross reference with me at the moment). -Matt
carolyn@cbmvax.UUCP (02/25/87)
In article <1049@rutgers.RUTGERS.EDU> XBR2D995@DDATHD21.BITNET writes: >one of my coworkers has a request. He want's to call the routine >CINIT (initializes a User-CopperList ???) from Lattice-C or from >Manx-C. Both compilers seem to know the routine, but at link time >it is not available. CINIT is a macro defined in graphics/gfxmacros.h. It calls UCopperListInit(). Unfortunately, the stub for UCopperListInit() is missing from 1.1 Amiga.lib (thus the unresolved reference). So you either need 1.2 Amiga.lib or you can try replacing the CINIT with: cl = AllocMem(sizeof(struct UCopList),MEMF_PUBLIC|MEMF_CLEAR); (From Addison/Wesley RK Libs&Devs, page 64) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
billk@crash.UUCP (02/26/87)
dillon@CORY.BERKELEY.EDU (Matt Dillon) wrote: > I think it's a macro. ... probably #defined'd in one of the >graphics include files... I don't know anything about C compilers (though I can *read* C pretty well...) but CINIT is a routine in the graphics.library. Gee. It *is* a macro. According to appendix A p. 105 of the RKM, here's what CINIT does: NAME CINIT -- initialize user copperlist to accept intermediate user copper instructions SYNOPSIS struct CopperList *CINIT( c , n ) FUNCTION allocates/initializes copperlist datastructures/buffers INPUTS c = pointer to UCopList structure n = number of instructions buffer must hold RESULTS this is actually a macro that calls UCopperListInit(c,n) If (c=0) allocate CopperList structure and a buffer to hold n copper instructions. If (c != 0) then just reinitialize the list to accept copper instructions and ignore n. BUGS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Well, that may or may not be useful information... Hopefully the former. Bill Kelly {akgua, hplabs!hp-sdd, sdcsvax}!crash!pnet01!billk "An apple a day keeps the doctor away, especially if aimed well." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~