Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!mcnc!ecsvax!utoddl From: utoddl@ecsvax.UUCP (Todd M. Lewis) Newsgroups: comp.sys.amiga.tech Subject: Re: CBM, Why did you make it so hard? Keywords: Graphics Libraries, reentrancy Message-ID: <6700@ecsvax.UUCP> Date: 23 Mar 89 14:41:26 GMT References: <913@dover.uucp> <3623@amiga.UUCP> <933@dover.azsps.mot.com> Organization: UNC Educational Computing Service Lines: 27 I have not tried this, but if you just want to save the programmer some typing, leaving out one parameter in your function calls (from the Amiga perspective) you could do something like: #define glibcall(a,b,c) glibcal(RportEquiv,a,b,c) Your user would have to make an initial call to set up this context variable and one more at the end to reclaim system resources consumed by the first one, but there is _MUCH_ less overhead this way than having each routine in your library do a FindTask() etc. It is just syntactic sugar, but it might make it taste more like what you want. Note, however, that Amiga programmers have gotten quite used to the pass-me-your-context-when-you-call-me way of working with libraries. It may not be such a big win after all. Especially when someone eventually has multiple contexts within one program. _____ | Todd M. Lewis Disclaimer: If you want my employer's ||\/| utoddl@ecsvax.uncecs.edu ideas, you'll have to || || _buy_ them. | || |___ (Never write a program bigger than your screen.)