eric@amc.UUCP (Eric McRae) (02/26/88)
I've written a printer driver for my little Talley Spirit 80. I could have used a PD driver but I wanted to learn. Everything works fine until I attempt a graphics dump. I'm using DpaintII which works for other drivers. If I cancel the print, I get a visit from the Guru. I've tracked the problem to the vicinity of my render.c routine. When a print is canceled, pd_PWrite returns a non-zero error. If I return the error to the printer driver as is recommended in the example code on Page E-10 of the RKM, I get an instant Guru: /*business end of Case 2: (status) Dump Buffer to printer*/ if(error = (*(PD->pd_PWrite))(&(PD->pd_PrintBuf[bufptr]),bytecount)) return(error); Notes: Everything works fine until I cancel the dump or I let it go to the end. If I can figure out the first problem, I'll probably be able to figure out why it also crashes after returning the error from the call to pd_PBothReady. I replaced the return(error) above with return(0); The cancel was ignored and the dump went complete and crashed as though I hadn't attempted the cancel. Everything else about the driver works fine. I'm using Manx 3.4B long ints, large code & data. Surely, there are still a few people left in this newsgroup who have actually written printer drivers. What am I doing wrong? Please drop me a line or call. This is driving me batty because the Gurus generally trash vd0: