Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!hplabs!decwrl!labrea!polya!kaufman From: kaufman@polya.STANFORD.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Using the PrintMgr in LSC Message-ID: <2857@polya.STANFORD.EDU> Date: 19 May 88 21:57:32 GMT References: <24764@bbn.COM> Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Organization: Stanford University Lines: 35 In article <24764@bbn.COM> dredick@vax.bbn.com (The Druid) writes: .I am trying to print (to a LaserWriter) a simple couple of pages which .contain graphics that I have generated with a program, But the .program causes the machine to BOMB BIG TIME when I try to print. .The program was originally written in Megamax C, now I am moving it .to LSC. .Here is the problem function: .print(refnum) .int refnum; .{ . TPPrPort pprport; . char line[255], head[255]; . int lpp; /* lines per page */ . int ltp; /* lines this page */ . int bjdocloop; /* if = bspoolloop,then must print spool file */ . int dx; /* width of page */ . TPrStatus status; . int page = 0; /* page number */ . FontInfo finfo; . int charheight; . int i,j,y; . int stop = FALSE; . comic xc; . if (!PrJobDialog(hprint)) return; [...more] I notice that hprint is not declared in this procedure. I hope it is a real HANDLE, because the print routines tend to to HLock and HUnlock to things they think are handles. Marc Kaufman (kaufman@polya.stanford.edu)