[comp.sys.mac.programmer] How to use _PrGlue from AZTEC-C

nitta@srava.sra.JUNET (Minoru Nitta) (02/25/88)

In System File 4.1 and later, all the Priniting Maneger routines are accessible
through the _PrGlue trap ($A8FD) by pushing a long int "rotine selector".
(See Inside Mac Vol.5  chapt.22)
To use the _PrGlue, if you are AZTEC-C user, replace the printing maneger
rotine definitions in print.h as follow as.

pascal void			PrGlueV() = 0xa8fd;
pascal Boolean			PrGlueB() = 0xa8fd;
pascal TPPrPort			PrGlueT() = 0xa8fd;
pascal short			PrGlueS() = 0xa8fd;
pascal Handle			PrGlueH() = 0xa8fd;
#define	PrOpen()		PrGlueV(0xc8000000)
#define	PrClose()		PrGlueV(0xd0000000)
#define	PrintDefault(x)		PrGlueV(x,0x20040480)
#define	PrValidate(x)		PrGlueB(x,0x52040498)
#define	PrStlDialog(x)		PrGlueB(x,0x2a040484)
#define	PrJobDialog(x)		PrGlueB(x,0x32040488)
#define	PrJobMerge(x,y)		PrGlueV(x,y,0x5804089c)
#define	PrOpenDoc(x,y,z)	PrGlueT(x,y,z,0x04000c00)
#define	PrCloseDoc(x)		PrGlueV(x,0x08000484)
#define	PrOpenPage(x,y)		PrGlueV(x,y,0x10000808)
#define	PrClosePage(x)		PrGlueV(x,0x1800040c)
#define	PrPicFile(x,y,z,s,t)	PrGlueV(x,y,z,s,t,0x60051480)
#define	PrError()		PrGlueS(0xba000000)
#define	PrSetError(x)		PrGlueV(x,0xc0000200)
#define	PrDrvrOpen()		PrGlueV(0x80000000)
#define	PrDrvrClose()		PrGlueV(0x88000000)
#define	PrCtlCall(x,y,z,s)	PrGlueV(x,y,z,s,0xa0000e00)
#define	PrDrvrDCF()		PrGlueH(0x94000000)
#define	PrDrvrVers()		PrGlueS(0x9a000000)

This can make yor program smaller by 4K or so.

----------------
From outside Japan reply to: nitta%sra.junet@uunet.uu.net