m_wheatley@vaxa.uwa.oz (02/14/89)
The Printer Access Protocol routines (PAPOpen, PAPStatus etc) are documented in Inside Laserwriter and Inside Appletalk. Does anybody know of a way of accessing these routines from LightSpeed Pascal or C ? These routines are not included in the standard Appletalk libraries.
john@trigraph.UUCP (John Chew) (02/23/89)
In article <568076@vaxa.uwa.oz> m_wheatley@vaxa.uwa.oz writes: >The Printer Access Protocol routines (PAPOpen, PAPStatus etc) are >documented in Inside Laserwriter and Inside Appletalk. Does anybody know >of a way of accessing these routines from LightSpeed Pascal or C ? > These routines are not included in the standard Appletalk libraries. Two good references on how to use PAP are Mike Schuster's C Workshop article "Laser Print DA for PostScript" in MacTutor (Feb. 1986, p. 22) and Bob Denny's article "PostScript Driver, LightSpeed C" in MacTutor (Sept. 1986, p. 9). A third, pretty much equivalent reference is Sak Wathanasin (sw%kernel.co.uk)'s posting of THINK C source for PAP glue routines, posted to one of comp.*.mac some time last month. Summary: 'PDEF' resource #10 in the LaserWriter driver file is a library of PAP client calls. You need a bit of glue to call them properly, which is the meat of each of the above-mentioned articles, and it's a very good idea to apply Schuster's patch (p. 27) to the PDEF to make PAP allocate its storage in the system heap right at the start of your program development (otherwise, each time your program crashes you need to reboot your system to keep the old PAP's connection timeout checks from jumping off into the void). If you need to use the PAP server calls, the only useful code I have seen is the CAP (Columbia AppleTalk Package) PAP implementation - a port of PAP (among other things) to Un*x, with annoying differences in names of struct fields. APDA lists something called "Print Spooling in an AppleTalk Network" which might help, but it's just a manual - no disk included. Hope this helps - send me mail if you need a copy of the glue routines, or any more PAP information. John Chew -- john j. chew, iii phone: +1 416 425 3818 AppleLink: CDA0329 trigraph, inc., toronto, canada {uunet!utai!utcsri,utgpu,utzoo}!trigraph!john dept. of math., u. of toronto poslfit@{utorgpu.bitnet,gpu.utcs.utoronto.ca}