🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #2963

Re: PostScript vs TrueType?

#2963
From: Ben Cranston
Date: Thu, 30 Aug 1990 19:57
63 lines
3102 bytes
I wrote
>> I think this is broken.  Seems to me this will read 3-character chunks from
>> the input and compare them against %%%, but if the stuff being skipped is

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 (***)  and changing the
> line of comments to
> %***********
> This failed also.

Sorry Woody and all the others who had to read my previous posting, I had
concentrated on the code and missed the fact that the end sentinal was 
actually SIX percent signs.

> 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.

It is a good question why it does different things in any case.  Is it
possible that NEC lets the carriage returns and the line feeds through
unmolested?  Is it possible there is a certain minimal string size
imposed for efficiency and the (   ) is allocating more memory than just
three characters, so the readstring is actually reading larger chunks?

If I had one of these printers I would arrange to send back the chunks:

   { %loop
       currentfile(   )readstring
       { %ifelse
          dup == % added by zben
          (%%%) eq         %look for separator
          { exit } if
       }{
          pop             %hangs, looking forever
       } ifelse
   } loop

The output from the == would be very informative.  It is possible the
(%%%) construct is being improperly parsed.  Does %% mean anything to 
this printer?  Is it possible the exit could be exiting the IF block but 
not the LOOP block?  Cannot speculate, must have experimental evidence...

I still think I would have done it like this:

   80 string
   { %loop
       dup currentfile exch readline exch
       (%%%) eq or { exit } if
   } loop
   pop

(You can tell I'm an old dinosaur tamer, that 80 is a dead giveaway! :-)
-- 
Ben Cranston <zben@umd2.umd.edu>
A determined iconoclast, it would be better to assume the opinion expressed
above is the diametric OPPOSITE to that of the Warm and Fuzzy Network Group
of Egregious State University...
Technical Details
Message-ID: <7221@umd5.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!umd5!zben
References: <9724@goofy.Apple.COM> <438@three.mv.com> <9931@goofy.Apple.COM> <7214@umd5.umd.edu> <1527@chinacat.Unicom.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!umd5!zben
From: zben@umd5.umd.edu (Ben Cranston)
Newsgroups: comp.lang.postscript
Subject: Re: PostScript vs TrueType?
Summary: I think woody was right and I was wrong
Message-ID: <7221@umd5.umd.edu>
Date: 30 Aug 90 19:57:23 GMT
References: <9724@goofy.Apple.COM> <438@three.mv.com> <9931@goofy.Apple.COM> <7214@umd5.umd.edu> <1527@chinacat.Unicom.COM>
Reply-To: zben@umd5.umd.edu (Ben Cranston)
Organization: University of Maryland, College Park
Lines: 63