Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!decwrl!adobe!heaven!glenn From: glenn@heaven.woodside.ca.us (Glenn Reid) Newsgroups: comp.lang.postscript Subject: Re: PostScript vs TrueType? Message-ID: <262@heaven.woodside.ca.us> Date: 30 Aug 90 23:22:08 GMT References: <9724@goofy.Apple.COM> <438@three.mv.com> <9931@goofy.Apple.COM> <7214@umd5.umd.edu> <1527@chinacat.Unicom.COM> Reply-To: glenn@heaven.woodside.ca.us (Glenn Reid) Organization: RightBrain Software, Woodside, CA Lines: 38 In article <1527@chinacat.Unicom.COM> woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) writes: >That is why the string of comments is 6 characters long. That way you >should be garanteed to get at least one match. I tried making the >line 10 or 12 characters long, and it still failed. I also tried >changing the (%%%) to something else like (***) ... Woody, you're using the "eq" operator. It has to match EXACTLY for "eq" to be happy. Making the string longer has nothing to do with it. Go read the green book, page 201, and look at the "userexec" procedure. There is code in there that flushes to a comment. Notice that it uses the "readline" operator, as suggested by Ben Cranston. The bottom line is that the technique of using "readstring" and "eq" can never be made to work 100% of the time. To be fair, neither can "readline", since version 23.0 of the LaserWriter (the LaserWriter "Classic") has a version of "readline" that doesn't handle all possible combinations of carriage return and linefeed pairs. But it's still the right way to go. And use "anchorsearch", not "eq", to find your end-of-stuff flag. >What I cannot understand, is why this works on a PS-810, and Apple >Laserwriters, but fails on the NEC 890. (and only the nec 890 to my >knowlege). I know that things worked flawlessly on my PS-810, but >failed on the nec 890. I cannot understand it either, but it's more likely to be the way you transmit the file to the printer than it is the printer itself. If you make the code better, along the lines of the various suggestions, it will not fail on the LC-890, or I'll eat a toner cartridge. /Glenn -- Glenn Reid RightBrain Software glenn@heaven.woodside.ca.us PostScript/NeXT developers ..{adobe,next}!heaven!glenn 415-851-1785