home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume13 / lj2ps / part07 < prev    next >
Encoding:
Text File  |  1990-07-02  |  48.2 KB  |  1,972 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v13i092: lj2ps (07 of 12), a LaserJet to PostScript Translator
  3. From: lishka@uwslh.slh.wisc.edu (Chris Lishka (relaxing in the Mad-City) )
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 13, Issue 92
  7. Submitted-by: lishka@uwslh.slh.wisc.edu (Chris Lishka (relaxing in the Mad-City) )
  8. Archive-name: lj2ps/part07
  9.  
  10. ---- Cut Here and unpack ----
  11. #!/bin/sh
  12. # This is part 07 of a multipart archive
  13. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  14.  then TOUCH=touch
  15.  else TOUCH=true
  16. fi
  17. # ============= doc/LogFile ==============
  18. if test X"$1" != X"-c" -a -f 'doc/LogFile'; then
  19.     echo "File already exists: skipping 'doc/LogFile'"
  20. else
  21. echo "x - extracting doc/LogFile (Text)"
  22. sed 's/^X//' << 'SHAR_EOF' > doc/LogFile &&
  23. XProject:    lj2ps, LaserJet PCL to PostScript translator
  24. XFile:        LogFile
  25. X
  26. XAuthor:        Christopher Lishka
  27. XOrganization:    Wisconsin State Laboratory of Hygiene
  28. X        Data Processing Department
  29. X
  30. XRCS:    $Header: LogFile,v 1.1 90/06/30 15:54:36 lishka Release $
  31. X
  32. X
  33. X063090 - v1.1 - Chris Lishka
  34. X
  35. XThis is the version I am releasing to the general public through
  36. Xcomp.sources.misc.  lj2ps is identical to the 1.0.1.2 local version.
  37. XHowever, I have updated and cleaned up the documentation for this
  38. Xrelease revision.  I also redrew the two scanners with idraw, as much
  39. Xso that I could remember how they work as for other people.
  40. X
  41. X
  42. X061690 - v1.0.1.2 - Chris Lishka
  43. X
  44. XThis is a local revision which fixes a very major bug as well as
  45. Xadding some functionality for those who want to extend this program.
  46. X
  47. XI have added support for tabs.  They function identically to LaserJet
  48. Xtabs for fixed-spacing fonts.  However, the LaserJet does some really
  49. Xstupid things with proportional font tabs, and I chose to use
  50. Xsomething completely different (and more logical) for proportional
  51. Xfonts.  As a small step to indicate incompatibility, a warning is
  52. Xprinted if tabs are used while using a proportional font.  My logic is
  53. Xthat people ought not to be using the brain-damaged LaserJet
  54. Xproportional tabs anyways.
  55. X
  56. XHooks are now present in the scanner for detecting shift-in and
  57. Xshift-out.  Unique tokens are returned for both.  However, shift-in
  58. Xand shift-out are not recognized by the "parser" (actually, the
  59. Xfunction transform()), so only warnings are produced now.  On the
  60. Xother hand, if anyone wants to *add* shift-in and shift-out
  61. Xcapabilities (hint, hint, wink, wink, nudge, nudge ;-), they won't
  62. Xhave to bugger-up the scanner to achieve this (which is somewhat of a
  63. Xpain). 
  64. X
  65. X
  66. X061390 - v1.0.1.1 - Chris Lishka
  67. X
  68. XThis is a new local revision, which is built off the 1.0 major
  69. Xrevision.  It fixes a serious bug, and a few minor ones.
  70. X
  71. XThe 8.5 inch default right margin has been changed to a "very large"
  72. Xright margin.  This fixes the right margin problem when rotating to
  73. Xlandscape mode.
  74. X
  75. XI have added a command-line option -w, which (when set) suppresses
  76. Xwarning messages.
  77. X
  78. XI have added a compile-time option -DDEBUG which controls whether or
  79. Xnot debugging code is included in the executable.  If -DDEBUG is
  80. Xincluded, an extra -d command-line option is available to turn on
  81. Xdifferent levels of diagnostic debugging output.
  82. X
  83. XI have added a compile-time option -DVERBOSE_WARNINGS which controls
  84. Xwhether all types of of warnings are printed.  If not set, only
  85. Ximportant warnings will be printed out.  If set, *all* types of
  86. Xwarnings (both important and trivial) will be printed.
  87. X
  88. X
  89. X060790 - v1.0 - Chris Lishka
  90. X
  91. XThe initial revision of lj2ps.  This version is currently running,
  92. Xalthough the one I am checking in right now has a minor efficiency fix
  93. X(which keeps lj_match_font from running once per attribute!).  This is
  94. Xnot the revision which will be distributed, as that one must have a
  95. Xproper copyright notice attached.
  96. SHAR_EOF
  97. $TOUCH -am 0630160790 doc/LogFile &&
  98. chmod 0644 doc/LogFile ||
  99. echo "restore of doc/LogFile failed"
  100. set `wc -c doc/LogFile`;Wc_c=$1
  101. if test "$Wc_c" != "2980"; then
  102.     echo original size 2980, current size $Wc_c
  103. fi
  104. fi
  105. # ============= doc/compile.options.doc ==============
  106. if test X"$1" != X"-c" -a -f 'doc/compile.options.doc'; then
  107.     echo "File already exists: skipping 'doc/compile.options.doc'"
  108. else
  109. echo "x - extracting doc/compile.options.doc (Text)"
  110. sed 's/^X//' << 'SHAR_EOF' > doc/compile.options.doc &&
  111. XProject:    lj2ps, 1.1 (release)
  112. XFile:        compile.options.doc
  113. X
  114. XAuthor:        Chris Lishka
  115. XOrganization:    Wisconsin State Laboratory of Hygiene
  116. X        Data Processing Dept.
  117. X
  118. XDate:        June 13th, 1990
  119. XLast modified:    June 30th, 1990 by Chris Lishka
  120. X
  121. X
  122. Xlj2ps revisions after 1.0 have several compile-time options available.
  123. XThese options allow certain features to be compiled into the
  124. Xexecutable.  Inclusion of the option will make the lj2ps program more
  125. Xfunctional; exclusion will yield a slightly faster and smaller
  126. Xprogram.  The options should be set with the -DOPTION flag for the C
  127. Xcompiler, and will usually be included in a variable definition in the
  128. XMakefile.
  129. X
  130. XWhat follows are descriptions of the options which are currently
  131. Xavailable:
  132. X
  133. XDEBUG
  134. X
  135. XNormally debugging information will be left out.  If DEBUG is defined,
  136. Xthen code to implement debugging will be conditionally compiled into
  137. Xthe final lj2ps executable.  This extra code will allow different
  138. Xlevels of debugging information to be printed out when the -d#
  139. Xcommand-line option is include, where # is the debugging level.
  140. XCurrently, the following levels are offered:
  141. X
  142. X    0    No debugging info.  This is the default.
  143. X    1    Tokens are printed out.  Rather verbose.
  144. X    2    Tokens and input characters are both printed
  145. X        out.  Super-duper verbose.
  146. X
  147. XVERBOSE_WARNINGS
  148. X
  149. XThere are several warning messages that will occur frequently during
  150. Xnormal lj2ps usage.  For example, since there is only one symbol set,
  151. Xlj2ps does not recognize any symbol sets in the PCL change-symbol-set
  152. Xcommand.  This leads to many warnings.  If VERBOSE_WARNINGS is set,
  153. Xthen all warning messages will be printed.  Otherwise, the common (but
  154. Xunimportant) warnings will be supressed.
  155. X
  156. X
  157. SHAR_EOF
  158. $TOUCH -am 0630160890 doc/compile.options.doc &&
  159. chmod 0664 doc/compile.options.doc ||
  160. echo "restore of doc/compile.options.doc failed"
  161. set `wc -c doc/compile.options.doc`;Wc_c=$1
  162. if test "$Wc_c" != "1683"; then
  163.     echo original size 1683, current size $Wc_c
  164. fi
  165. fi
  166. # ============= doc/limitations.doc ==============
  167. if test X"$1" != X"-c" -a -f 'doc/limitations.doc'; then
  168.     echo "File already exists: skipping 'doc/limitations.doc'"
  169. else
  170. echo "x - extracting doc/limitations.doc (Text)"
  171. sed 's/^X//' << 'SHAR_EOF' > doc/limitations.doc &&
  172. XProgram:    lj2ps, 1.1 (release)
  173. XFile:        limitations.doc
  174. X
  175. XAuthor:        Christopher Lishka
  176. XOrganization:    Wisconsin State Laboratory of Hygiene 
  177. X        Data Processing Department
  178. X
  179. XDate:        April 25th, 1990
  180. XLast modified:    June  30th, 1990 by Chris Lishka
  181. X
  182. X
  183. XThis file contains known limitations of the lj2ps program.  The
  184. Xlimitations come in two basic varieties: (a) those that exist because
  185. Xof inherent differences between the LaserJet and LaserWriter; and (b)
  186. Xthose that exist because I do not have enough time to fix them.  All
  187. Xlimitations listed should be assumed to belong in the second category
  188. Xunless otherwise noted.
  189. X
  190. X* As has been mentioned many times in the documentation, I did not
  191. X  have time to implement all LaserJet commands in PCL 4 (let alone PCL
  192. X  5).  Instead, I leave this as an exercise for the reader ;-)  I have
  193. X  implemented what was needed by my organization, and represents a
  194. X  subset of PCL 4 which supports (fairly completely) page motion, page
  195. X  setup, and internal and cartridge fonts.  Commands which were left
  196. X  out include:
  197. X
  198. X  ** Macros
  199. X
  200. X  ** Position stack
  201. X
  202. X  ** Graphics -- patterns and grayshades
  203. X
  204. X  ** Graphics -- bitmaps
  205. X
  206. X  ** Secondary font support
  207. X
  208. X  ** Downloadable fonts
  209. X
  210. X
  211. X* Although I put a fair amount of work into the Test Suite and Metrics
  212. X  Suite, they are by no means complete.  They do test a fair amount of
  213. X  LaserJet quirks, and proved to be very helpful in fine tuning lj2ps.
  214. X  Feel free to add more tests to either suite.
  215. X
  216. X* Tabs do not work exactly like the LaserJet when using proportional
  217. X  fonts.  This is because a given tab position depends on the current
  218. X  location of the cursor, which might be different from the LaserJet
  219. X  and LaserWriter.  Therefore, when a proportional font is used, tabs
  220. X  might end up in the wrong places.  However, tabs are not a good
  221. X  thing to use with a proportional font anyway.  Note that tabs used
  222. X  with fixed-width fonts should behave exactly the same way.
  223. X
  224. X* Another problem related to tabs is the mechanism I have used.  On
  225. X  the LaserJet, tabs are counted out using characters printed.  To
  226. X  move to the next tab stop, the LaserJet will simply insert enough
  227. X  space characters to reach a position which is a multiple of eight
  228. X  characters.  With proportional fonts, this results in tab stops not
  229. X  being in fixed columns, but rather dependent on the width of the
  230. X  characters printed before the tab.  (I think this method is
  231. X  downright foolish, because it renders the purpose of tabs useless
  232. X  with proportional fonts).  I have chosen to calculate tabs as being
  233. X  in columns, with the distance between columns being eight space
  234. X  characters in the current font.  This allows tabs to be used to line
  235. X  up text at each tab stop with proportional fonts.  Note that
  236. X  although the two schemes give different results with proportional
  237. X  fonts, the behaviors match exactly when using fixed-width fonts.
  238. X
  239. X* The HMI command cannot be fully implemented.  This is an inherent
  240. X  problem with the lj2ps program.  The HMI command on the LaserJet
  241. X  works in one of two ways:
  242. X
  243. X    (a) If the font is non-proportional, then the HMI command
  244. X        adjusts the individual width of each character;
  245. X
  246. X        (b) If the font is proportional, then the HMI command only
  247. X        adjusts the width of the *space* character.
  248. X
  249. X  Unfortunately, lj2ps uses a crude font mapping mechanism for
  250. X  emulating LaserJet fonts in PostScript.  One of the inherent
  251. X  limitations is the inability to adjust the individual width of each
  252. X  character in the PostScript font.  It is for this reason that the
  253. X  HMI command cannot be fully implemented.  Unfortunately, there is no
  254. X  good way to fix this without overhauling the font mapping mechanism.
  255. X
  256. X  The HMI command *does* change lj2ps' notion of the current character
  257. X  spacing (in the variable char_width).  This is useful for doing
  258. X  horizontal tabs using columns.  This is why the HMI command has been
  259. X  implemented at all.
  260. X
  261. X* The postscript file produced by lj2ps is definitely not suitable as
  262. X  encapsulated postscript.  One important example is that the
  263. X  "initclip" command must be used when resetting the right margin to
  264. X  insure that the clip-path can "grow" if the right margin gets
  265. X  bigger. 
  266. X
  267. X* To effectively emulate LaserJet relative horizontal motion commands
  268. X  with the current font mechanism, I had to move horizontal motion
  269. X  into the generated PostScript program.  Therefore, although
  270. X  horizontal motion is tracked in lj2ps, it is only updated every time
  271. X  an absolute horizontal motion is performed (including non-command
  272. X  motions such as newline).  This makes the horizontal cursor position
  273. X  in the lj2ps program innaccurate much of the time.  The only fix I
  274. X  can think of is to replace the font emulation mechanism with
  275. X  something better.  Note that vertical motion is tracked completely
  276. X  in lj2ps, and is of little importance in the generated PostScript
  277. X  code.
  278. X
  279. X
  280. SHAR_EOF
  281. $TOUCH -am 0630160890 doc/limitations.doc &&
  282. chmod 0664 doc/limitations.doc ||
  283. echo "restore of doc/limitations.doc failed"
  284. set `wc -c doc/limitations.doc`;Wc_c=$1
  285. if test "$Wc_c" != "4873"; then
  286.     echo original size 4873, current size $Wc_c
  287. fi
  288. fi
  289. # ============= doc/lj2ps.l ==============
  290. if test X"$1" != X"-c" -a -f 'doc/lj2ps.l'; then
  291.     echo "File already exists: skipping 'doc/lj2ps.l'"
  292. else
  293. echo "x - extracting doc/lj2ps.l (Text)"
  294. sed 's/^X//' << 'SHAR_EOF' > doc/lj2ps.l &&
  295. X.\"  Program:        lj2ps, LaserJet PCL to PostScript Translator
  296. X.\"  File:        lj2ps.l    (man page documentation)
  297. X.\"
  298. X.\"  Author:        Chris Lishka
  299. X.\"  Organization:    Wisconsin State Laboratory of Hygiene
  300. X.\"            Data Processing Section
  301. X.\"
  302. X.TH LJLPR l "June 30th, 1990 (Revision 1.1)"
  303. X.SH NAME
  304. X\fBlj2ps\fR \- print \fILaserJet\fR files on a \fIPostScript\fR printer
  305. X.SH SYNOPSIS
  306. X\fBljlpr [ \fIoptions\fB ]  [ \fIfiles\fB ] \fR
  307. X.SH DESCRIPTION
  308. X.PP
  309. X\fBlj2ps\fR is a translator that reads in a file of text and
  310. X\fILaserJet PCL\fR commands and converts it to \fIPostScript.\fR
  311. X\fBlj2ps\fR can currently translate a subset of \fIPCL 4.\fR  It will
  312. Xproperly convert page motion, page setup, and primary font commands.
  313. XLeft out are macros, position stack commands, secondary font support,
  314. Xgraphics (both bitmap and pattern/grayscale), and downloadable fonts.
  315. X.PP
  316. X\fBlj2ps\fR is set up to mimic a \fILaserJet Series II\fR with the
  317. X\fIHewlett Packard F\fR and \fIG\fR font cartridges plugged into the
  318. Xleft and right ports, respectively.  Command-line options are provided
  319. Xthat duplicate the functions in the main menu, accessible from the
  320. Xfront panel.
  321. X.PP
  322. XIf \fIfiles\fR are listed on the command line, then \fBlj2ps\fR will
  323. Xread each consecutively as if they were all one file.  If no files are
  324. Xlisted, then input will be read from the \fIstandard input.\fR  All
  325. Xoutput is written to the \fIstandard output,\fR and errors to the
  326. X\fIstandard error.\fR
  327. X.SH OPTIONS
  328. X.PP
  329. X.IP "\fBLaserJet II Main Menu Options\fR" 2
  330. X.IP "\fB-c##\fR" 5
  331. XSets the numbers of copies to \fB##\fR.  The default is one copy.
  332. X.IP "\fB-mf\fR" 5
  333. XSpecifies that paper is to be fed in manually.  The default is to
  334. Xautomatically feed paper in from the tray.
  335. X.IP "\fB-fs?\fR" 5
  336. XChange the default font source to \fB?\fR, where \fB?\fR is \fBL\fR
  337. X(left cartridge), \fBR\fR (right cartridge), \fBI\fR (internal), or
  338. X\fBS\fR (soft font).  The default is \fBI\fR (internal).
  339. X.IP "\fB-fn##\fR" 5
  340. XUse font number \fB##\fR from the default font source.  The default is
  341. Xfont number zero.
  342. X.IP "\fB-fl##\fR" 5
  343. XSet the form length to \fB##\fR lines.  The default is 60 lines.
  344. X.IP "\fBPage Orientation\fR" 2
  345. X.IP "\fB-p\fR" 5
  346. XPrint in portrait mode.  This is the default.
  347. X.IP "\fB-l\fR" 5
  348. XPrint in landscape mode.
  349. X.IP "\fBPage Scaling and Offsets\fR" 2
  350. X.IP "\fB-xs##\fR" 5
  351. XScale the width of the page by \fB##\fR.  The default is 1.0 (no
  352. Xscaling). 
  353. X.IP "\fB-ys##\fR" 5
  354. XScale the length of the page by \fB##\fR.  The default is 1.0 (no
  355. Xscaling).
  356. X.IP "\fB-xo##\fR" 5
  357. XOffset the left margin by \fB##\fR inches.  The default is 0.0 inches. 
  358. X.IP "\fB-yo##\fR" 5
  359. XOffest the top margin by \fB##\fR inches.  The default is 0.0 inches.
  360. X.IP "\fBMiscellaneous\fR" 2
  361. X.IP "\fB-X\fR" 5
  362. XPrint a list of all options recognized.
  363. X.IP "\fB-w\fR" 5
  364. XDo not print warning messages.
  365. X.SH "SEE ALSO"
  366. XPlease refer to your local printing software to determine how to send
  367. Xthe \fIPostScript\fR output of \fBlj2ps\fR to your printer.
  368. X.SH RESTRICTIONS
  369. XOnly a subset of \fIPCL 4\fR is currently recognized.
  370. X.SH DIAGNOSTICS
  371. X.PP
  372. X\fBljlpr\fR will return with exit code 0 if no errors are
  373. Xencountered or exit code 1 if a fatal error occurs.
  374. X.PP
  375. XFour types of messages are printed:
  376. X.PP
  377. X\fBWarnings\fR are printed to inform the user of possible problems
  378. Xwith the output.  Although warnings are never serious, they do
  379. Xindicate possible problems with the LaserJet commands, or features
  380. Xbeing used that are not actually implemented in \fBlj2ps\fR.  Warnings
  381. Xcan be turned off with the \fB-w\fR option.
  382. X.PP
  383. X\fBErrors\fR indicate recoverable problems in the input or output that
  384. Xshould be corrected.  The program will continue running if an error is
  385. Xencountered, although the output will likely be missing some features.
  386. X.PP
  387. X\fBFatal Errors\fR are non-recoverable errors, and will cause the
  388. Xprogram to immediately terminate with a non-zero exit code.  Fatal
  389. Xerrors must be corrected before \fBlj2ps\fR will accept the entire
  390. Xinput file.
  391. X.PP
  392. X\fBInternal Errors\fR indicate that an internal consistency check has
  393. Xfailed, and will cause immediate termination of execution.  Please
  394. Xcontact the person maintaining \fBlj2ps\fR and describe the internal
  395. Xerror, so that she or he may fix it.
  396. X.SH BUGS
  397. X.PP
  398. XTabs do not work properly with proportional fonts.  However, the
  399. X\fILaserJet\fR's scheme for handling tabs with proportional fonts is
  400. Xbadly botched, so you shouldn't be using proportional fonts anyway.
  401. X.PP
  402. XThe behavior of the HMI command is different from the \fILaserJet\fR.
  403. X.PP
  404. XThe \fIPostScript\fR file produced by \fBlj2ps\fR is not suitable as
  405. X\fIEncapsulated PostScript,\fR because initclip is used to reset the
  406. Xright margin.
  407. X
  408. X
  409. SHAR_EOF
  410. $TOUCH -am 0630160890 doc/lj2ps.l &&
  411. chmod 0664 doc/lj2ps.l ||
  412. echo "restore of doc/lj2ps.l failed"
  413. set `wc -c doc/lj2ps.l`;Wc_c=$1
  414. if test "$Wc_c" != "4619"; then
  415.     echo original size 4619, current size $Wc_c
  416. fi
  417. fi
  418. # ============= doc/measurements.doc ==============
  419. if test X"$1" != X"-c" -a -f 'doc/measurements.doc'; then
  420.     echo "File already exists: skipping 'doc/measurements.doc'"
  421. else
  422. echo "x - extracting doc/measurements.doc (Text)"
  423. sed 's/^X//' << 'SHAR_EOF' > doc/measurements.doc &&
  424. XProject:    lj2ps, 1.1 (release)
  425. XFile:        measurements.doc
  426. X
  427. XAuthor:        Christopher Lishka
  428. XOrganization:    Wisconsin State Laboratory of Hygiene
  429. X        Data Processing Dept.
  430. X
  431. XDate:        June 30th, 1990
  432. X
  433. X
  434. XMeasurement    Name    Units per Inch    Inches per Unit    Comments
  435. X===============    =======    ===============    ===============    =======================
  436. X
  437. XInch        in    1        1        The default unit; fixed
  438. X
  439. XPage Height    ph    Default=0.0909    Default=11    Depends on page size
  440. X
  441. XPage Width    pw    Default=0.1176    Default=8.5    Depends on page size
  442. X
  443. XDots        dt    300        0.0033        Fixed
  444. X
  445. XDecipoints    dp    720        0.0031        Fixed
  446. X
  447. XLines/Inch    li    Default=6    Default=0.1667    Can be reset by user
  448. X
  449. XColumns/Inch    ci                    Depends on current font
  450. SHAR_EOF
  451. $TOUCH -am 0630160890 doc/measurements.doc &&
  452. chmod 0664 doc/measurements.doc ||
  453. echo "restore of doc/measurements.doc failed"
  454. set `wc -c doc/measurements.doc`;Wc_c=$1
  455. if test "$Wc_c" != "657"; then
  456.     echo original size 657, current size $Wc_c
  457. fi
  458. fi
  459. # ============= doc/parameter.scanner.idraw ==============
  460. if test X"$1" != X"-c" -a -f 'doc/parameter.scanner.idraw'; then
  461.     echo "File already exists: skipping 'doc/parameter.scanner.idraw'"
  462. else
  463. echo "x - extracting doc/parameter.scanner.idraw (Text)"
  464. sed 's/^X//' << 'SHAR_EOF' > doc/parameter.scanner.idraw &&
  465. X%!PS-Adobe-2.0 EPSF-1.2
  466. X%%DocumentFonts: Courier
  467. X%%Pages: 1
  468. X%%BoundingBox: 101 41 511 775
  469. X%%EndComments
  470. X
  471. X50 dict begin
  472. X
  473. X/arrowHeight 8 def
  474. X/arrowWidth 4 def
  475. X/none null def
  476. X/numGraphicParameters 17 def
  477. X/stringLimit 65535 def
  478. X
  479. X/Begin {
  480. Xsave
  481. XnumGraphicParameters dict begin
  482. X} def
  483. X
  484. X/End {
  485. Xend
  486. Xrestore
  487. X} def
  488. X
  489. X/SetB {
  490. Xdup type /nulltype eq {
  491. Xpop
  492. Xfalse /brushRightArrow idef
  493. Xfalse /brushLeftArrow idef
  494. Xtrue /brushNone idef
  495. X} {
  496. X/brushDashOffset idef
  497. X/brushDashArray idef
  498. X0 ne /brushRightArrow idef
  499. X0 ne /brushLeftArrow idef
  500. X/brushWidth idef
  501. Xfalse /brushNone idef
  502. X} ifelse
  503. X} def
  504. X
  505. X/SetCFg {
  506. X/fgblue idef
  507. X/fggreen idef
  508. X/fgred idef
  509. X} def
  510. X
  511. X/SetCBg {
  512. X/bgblue idef
  513. X/bggreen idef
  514. X/bgred idef
  515. X} def
  516. X
  517. X/SetF {
  518. X/printSize idef
  519. X/printFont idef
  520. X} def
  521. X
  522. X/SetP {
  523. Xdup type /nulltype eq {
  524. Xpop true /patternNone idef
  525. X} {
  526. X/patternGrayLevel idef
  527. XpatternGrayLevel -1 eq {
  528. X/patternString idef
  529. X} if
  530. Xfalse /patternNone idef
  531. X} ifelse
  532. X} def
  533. X
  534. X/BSpl {
  535. X0 begin
  536. Xstorexyn
  537. Xnewpath
  538. Xn 1 gt {
  539. X0 0 0 0 0 0 1 1 true subspline
  540. Xn 2 gt {
  541. X0 0 0 0 1 1 2 2 false subspline
  542. X1 1 n 3 sub {
  543. X/i exch def
  544. Xi 1 sub dup i dup i 1 add dup i 2 add dup false subspline
  545. X} for
  546. Xn 3 sub dup n 2 sub dup n 1 sub dup 2 copy false subspline
  547. X} if
  548. Xn 2 sub dup n 1 sub dup 2 copy 2 copy false subspline
  549. XpatternNone not brushLeftArrow not brushRightArrow not and and { ifill } if
  550. XbrushNone not { istroke } if
  551. X0 0 1 1 leftarrow
  552. Xn 2 sub dup n 1 sub dup rightarrow
  553. X} if
  554. Xend
  555. X} dup 0 4 dict put def
  556. X
  557. X/Circ {
  558. Xnewpath
  559. X0 360 arc
  560. XpatternNone not { ifill } if
  561. XbrushNone not { istroke } if
  562. X} def
  563. X
  564. X/CBSpl {
  565. X0 begin
  566. Xdup 2 gt {
  567. Xstorexyn
  568. Xnewpath
  569. Xn 1 sub dup 0 0 1 1 2 2 true subspline
  570. X1 1 n 3 sub {
  571. X/i exch def
  572. Xi 1 sub dup i dup i 1 add dup i 2 add dup false subspline
  573. X} for
  574. Xn 3 sub dup n 2 sub dup n 1 sub dup 0 0 false subspline
  575. Xn 2 sub dup n 1 sub dup 0 0 1 1 false subspline
  576. XpatternNone not { ifill } if
  577. XbrushNone not { istroke } if
  578. X} {
  579. XPoly
  580. X} ifelse
  581. Xend
  582. X} dup 0 4 dict put def
  583. X
  584. X/Elli {
  585. X0 begin
  586. Xnewpath
  587. X4 2 roll
  588. Xtranslate
  589. Xscale
  590. X0 0 1 0 360 arc
  591. XpatternNone not { ifill } if
  592. XbrushNone not { istroke } if
  593. Xend
  594. X} dup 0 1 dict put def
  595. X
  596. X/Line {
  597. X0 begin
  598. X2 storexyn
  599. Xnewpath
  600. Xx 0 get y 0 get moveto
  601. Xx 1 get y 1 get lineto
  602. XbrushNone not { istroke } if
  603. X0 0 1 1 leftarrow
  604. X0 0 1 1 rightarrow
  605. Xend
  606. X} dup 0 4 dict put def
  607. X
  608. X/MLine {
  609. X0 begin
  610. Xstorexyn
  611. Xnewpath
  612. Xn 1 gt {
  613. Xx 0 get y 0 get moveto
  614. X1 1 n 1 sub {
  615. X/i exch def
  616. Xx i get y i get lineto
  617. X} for
  618. XpatternNone not brushLeftArrow not brushRightArrow not and and { ifill } if
  619. XbrushNone not { istroke } if
  620. X0 0 1 1 leftarrow
  621. Xn 2 sub dup n 1 sub dup rightarrow
  622. X} if
  623. Xend
  624. X} dup 0 4 dict put def
  625. X
  626. X/Poly {
  627. X3 1 roll
  628. Xnewpath
  629. Xmoveto
  630. X-1 add
  631. X{ lineto } repeat
  632. Xclosepath
  633. XpatternNone not { ifill } if
  634. XbrushNone not { istroke } if
  635. X} def
  636. X
  637. X/Rect {
  638. X0 begin
  639. X/t exch def
  640. X/r exch def
  641. X/b exch def
  642. X/l exch def
  643. Xnewpath
  644. Xl b moveto
  645. Xl t lineto
  646. Xr t lineto
  647. Xr b lineto
  648. Xclosepath
  649. XpatternNone not { ifill } if
  650. XbrushNone not { istroke } if
  651. Xend
  652. X} dup 0 4 dict put def
  653. X
  654. X/Text {
  655. Xishow
  656. X} def
  657. X
  658. X/idef {
  659. Xdup where { pop pop pop } { exch def } ifelse
  660. X} def
  661. X
  662. X/ifill {
  663. X0 begin
  664. Xgsave
  665. XpatternGrayLevel -1 ne {
  666. Xfgred bgred fgred sub patternGrayLevel mul add
  667. Xfggreen bggreen fggreen sub patternGrayLevel mul add
  668. Xfgblue bgblue fgblue sub patternGrayLevel mul add setrgbcolor
  669. Xeofill
  670. X} {
  671. Xeoclip
  672. XoriginalCTM setmatrix
  673. Xpathbbox /t exch def /r exch def /b exch def /l exch def
  674. X/w r l sub ceiling cvi def
  675. X/h t b sub ceiling cvi def
  676. X/imageByteWidth w 8 div ceiling cvi def
  677. X/imageHeight h def
  678. Xbgred bggreen bgblue setrgbcolor
  679. Xeofill
  680. Xfgred fggreen fgblue setrgbcolor
  681. Xw 0 gt h 0 gt and {
  682. Xl b translate w h scale
  683. Xw h true [w 0 0 h neg 0 h] { patternproc } imagemask
  684. X} if
  685. X} ifelse
  686. Xgrestore
  687. Xend
  688. X} dup 0 8 dict put def
  689. X
  690. X/istroke {
  691. Xgsave
  692. XbrushDashOffset -1 eq {
  693. X[] 0 setdash
  694. X1 setgray
  695. X} {
  696. XbrushDashArray brushDashOffset setdash
  697. Xfgred fggreen fgblue setrgbcolor
  698. X} ifelse
  699. XbrushWidth setlinewidth
  700. XoriginalCTM setmatrix
  701. Xstroke
  702. Xgrestore
  703. X} def
  704. X
  705. X/ishow {
  706. X0 begin
  707. Xgsave
  708. XprintFont findfont printSize scalefont setfont
  709. Xfgred fggreen fgblue setrgbcolor
  710. X/vertoffset printSize neg def {
  711. X0 vertoffset moveto show
  712. X/vertoffset vertoffset printSize sub def
  713. X} forall
  714. Xgrestore
  715. Xend
  716. X} dup 0 3 dict put def
  717. X
  718. X/patternproc {
  719. X0 begin
  720. X/patternByteLength patternString length def
  721. X/patternHeight patternByteLength 8 mul sqrt cvi def
  722. X/patternWidth patternHeight def
  723. X/patternByteWidth patternWidth 8 idiv def
  724. X/imageByteMaxLength imageByteWidth imageHeight mul
  725. XstringLimit patternByteWidth sub min def
  726. X/imageMaxHeight imageByteMaxLength imageByteWidth idiv patternHeight idiv
  727. XpatternHeight mul patternHeight max def
  728. X/imageHeight imageHeight imageMaxHeight sub store
  729. X/imageString imageByteWidth imageMaxHeight mul patternByteWidth add string def
  730. X0 1 imageMaxHeight 1 sub {
  731. X/y exch def
  732. X/patternRow y patternByteWidth mul patternByteLength mod def
  733. X/patternRowString patternString patternRow patternByteWidth getinterval def
  734. X/imageRow y imageByteWidth mul def
  735. X0 patternByteWidth imageByteWidth 1 sub {
  736. X/x exch def
  737. XimageString imageRow x add patternRowString putinterval
  738. X} for
  739. X} for
  740. XimageString
  741. Xend
  742. X} dup 0 12 dict put def
  743. X
  744. X/min {
  745. Xdup 3 2 roll dup 4 3 roll lt { exch } if pop
  746. X} def
  747. X
  748. X/max {
  749. Xdup 3 2 roll dup 4 3 roll gt { exch } if pop
  750. X} def
  751. X
  752. X/arrowhead {
  753. X0 begin
  754. Xtransform originalCTM itransform
  755. X/taily exch def
  756. X/tailx exch def
  757. Xtransform originalCTM itransform
  758. X/tipy exch def
  759. X/tipx exch def
  760. X/dy tipy taily sub def
  761. X/dx tipx tailx sub def
  762. X/angle dx 0 ne dy 0 ne or { dy dx atan } { 90 } ifelse def
  763. Xgsave
  764. XoriginalCTM setmatrix
  765. Xtipx tipy translate
  766. Xangle rotate
  767. Xnewpath
  768. X0 0 moveto
  769. XarrowHeight neg arrowWidth 2 div lineto
  770. XarrowHeight neg arrowWidth 2 div neg lineto
  771. Xclosepath
  772. XpatternNone not {
  773. XoriginalCTM setmatrix
  774. X/padtip arrowHeight 2 exp 0.25 arrowWidth 2 exp mul add sqrt brushWidth mul
  775. XarrowWidth div def
  776. X/padtail brushWidth 2 div def
  777. Xtipx tipy translate
  778. Xangle rotate
  779. Xpadtip 0 translate
  780. XarrowHeight padtip add padtail add arrowHeight div dup scale
  781. Xarrowheadpath
  782. Xifill
  783. X} if
  784. XbrushNone not {
  785. XoriginalCTM setmatrix
  786. Xtipx tipy translate
  787. Xangle rotate
  788. Xarrowheadpath
  789. Xistroke
  790. X} if
  791. Xgrestore
  792. Xend
  793. X} dup 0 9 dict put def
  794. X
  795. X/arrowheadpath {
  796. Xnewpath
  797. X0 0 moveto
  798. XarrowHeight neg arrowWidth 2 div lineto
  799. XarrowHeight neg arrowWidth 2 div neg lineto
  800. Xclosepath
  801. X} def
  802. X
  803. X/leftarrow {
  804. X0 begin
  805. Xy exch get /taily exch def
  806. Xx exch get /tailx exch def
  807. Xy exch get /tipy exch def
  808. Xx exch get /tipx exch def
  809. XbrushLeftArrow { tipx tipy tailx taily arrowhead } if
  810. Xend
  811. X} dup 0 4 dict put def
  812. X
  813. X/rightarrow {
  814. X0 begin
  815. Xy exch get /tipy exch def
  816. Xx exch get /tipx exch def
  817. Xy exch get /taily exch def
  818. Xx exch get /tailx exch def
  819. XbrushRightArrow { tipx tipy tailx taily arrowhead } if
  820. Xend
  821. X} dup 0 4 dict put def
  822. X
  823. X/midpoint {
  824. X0 begin
  825. X/y1 exch def
  826. X/x1 exch def
  827. X/y0 exch def
  828. X/x0 exch def
  829. Xx0 x1 add 2 div
  830. Xy0 y1 add 2 div
  831. Xend
  832. X} dup 0 4 dict put def
  833. X
  834. X/thirdpoint {
  835. X0 begin
  836. X/y1 exch def
  837. X/x1 exch def
  838. X/y0 exch def
  839. X/x0 exch def
  840. Xx0 2 mul x1 add 3 div
  841. Xy0 2 mul y1 add 3 div
  842. Xend
  843. X} dup 0 4 dict put def
  844. X
  845. X/subspline {
  846. X0 begin
  847. X/movetoNeeded exch def
  848. Xy exch get /y3 exch def
  849. Xx exch get /x3 exch def
  850. Xy exch get /y2 exch def
  851. Xx exch get /x2 exch def
  852. Xy exch get /y1 exch def
  853. Xx exch get /x1 exch def
  854. Xy exch get /y0 exch def
  855. Xx exch get /x0 exch def
  856. Xx1 y1 x2 y2 thirdpoint
  857. X/p1y exch def
  858. X/p1x exch def
  859. Xx2 y2 x1 y1 thirdpoint
  860. X/p2y exch def
  861. X/p2x exch def
  862. Xx1 y1 x0 y0 thirdpoint
  863. Xp1x p1y midpoint
  864. X/p0y exch def
  865. X/p0x exch def
  866. Xx2 y2 x3 y3 thirdpoint
  867. Xp2x p2y midpoint
  868. X/p3y exch def
  869. X/p3x exch def
  870. XmovetoNeeded { p0x p0y moveto } if
  871. Xp1x p1y p2x p2y p3x p3y curveto
  872. Xend
  873. X} dup 0 17 dict put def
  874. X
  875. X/storexyn {
  876. X/n exch def
  877. X/y n array def
  878. X/x n array def
  879. Xn 1 sub -1 0 {
  880. X/i exch def
  881. Xy i 3 2 roll put
  882. Xx i 3 2 roll put
  883. X} for
  884. X} def
  885. X
  886. X%%EndProlog
  887. X
  888. X%I Idraw 5 Grid 8
  889. X
  890. X%%Page: 1 1
  891. X
  892. XBegin
  893. X%I b u
  894. X%I cfg u
  895. X%I cbg u
  896. X%I f u
  897. X%I p u
  898. X%I t
  899. X[ 0.96 0 0 0.96 0 0 ] concat
  900. X/originalCTM matrix currentmatrix def
  901. X
  902. XBegin %I Text
  903. X%I cfg Black
  904. X0 0 0 SetCFg
  905. X%I f *-courier-medium-r-*-80-*
  906. X/Courier 8 SetF
  907. X%I t
  908. X[ 2.88889 0 0 2.88889 127.5 804.556 ] concat
  909. X%I
  910. X[
  911. X(Parameter Scanner for lj2ps)
  912. X] Text
  913. XEnd
  914. X
  915. XBegin %I Text
  916. X%I cfg Black
  917. X0 0 0 SetCFg
  918. X%I f *-courier-medium-r-*-80-*
  919. X/Courier 8 SetF
  920. X%I t
  921. X[ 1 0 0 1 133 142 ] concat
  922. X%I
  923. X[
  924. X(* All end states include a description of the token recognized)
  925. X()
  926. X(* All states include the three letter code that is used in the C-code \(where)
  927. X(  it is preceded by the prefix SP_\).)
  928. X()
  929. X(* All transitions are marked with the characters that cause the transition.)
  930. X()
  931. X(* The action for all transitions is to store the character in a buffer.)
  932. X()
  933. X(* The action for end states UNK, PE, and PC is to accept the last character.)
  934. X(  The action for the end state PE0 is to put the character back into the)
  935. X(  input stream.)
  936. X] Text
  937. XEnd
  938. X
  939. XBegin %I Text
  940. X%I cfg Black
  941. X0 0 0 SetCFg
  942. X%I f *-courier-medium-r-*-80-*
  943. X/Courier 8 SetF
  944. X%I t
  945. X[ 1 0 0 1 241 775 ] concat
  946. X%I
  947. X[
  948. X(lj2ps, version 1.1 \(release\))
  949. X] Text
  950. XEnd
  951. X
  952. XBegin %I Pict
  953. X%I b u
  954. X%I cfg u
  955. X%I cbg u
  956. X%I f u
  957. X%I p u
  958. X%I t
  959. X[ 0.804699 0 0 0.804699 60.6917 140.023 ] concat
  960. X
  961. XBegin %I Elli
  962. X%I b 65535
  963. X1 0 1 [] 0 SetB
  964. X%I cfg Black
  965. X0 0 0 SetCFg
  966. X%I cbg White
  967. X1 1 1 SetCBg
  968. X%I p
  969. X0 SetP
  970. X%I t
  971. X[ 1 0 0 1 416 287 ] concat
  972. X%I
  973. X61 418 31 33 Elli
  974. XEnd
  975. X
  976. XBegin %I Text
  977. X%I cfg Black
  978. X0 0 0 SetCFg
  979. X%I f *-courier-medium-r-*-80-*
  980. X/Courier 8 SetF
  981. X%I t
  982. X[ 1 0 0 1 513 718 ] concat
  983. X%I
  984. X[
  985. X(End)
  986. X(Parameter)
  987. X(\(Zero Numeric\))
  988. X] Text
  989. XEnd
  990. X
  991. XBegin %I Text
  992. X%I cfg Black
  993. X0 0 0 SetCFg
  994. X%I f *-courier-medium-r-*-80-*
  995. X/Courier 8 SetF
  996. X%I t
  997. X[ 1 0 0 1 502 680 ] concat
  998. X%I
  999. X[
  1000. X(PE0)
  1001. X] Text
  1002. XEnd
  1003. X
  1004. XEnd %I eop
  1005. X
  1006. XBegin %I Pict
  1007. X%I b u
  1008. X%I cfg u
  1009. X%I cbg u
  1010. X%I f u
  1011. X%I p u
  1012. X%I t
  1013. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1014. X
  1015. XBegin %I Elli
  1016. X%I b 65535
  1017. X1 0 1 [] 0 SetB
  1018. X%I cfg Black
  1019. X0 0 0 SetCFg
  1020. X%I cbg White
  1021. X1 1 1 SetCBg
  1022. X%I p
  1023. X0 SetP
  1024. X%I t
  1025. X[ 1 0 0 1 414 78 ] concat
  1026. X%I
  1027. X61 418 31 33 Elli
  1028. XEnd
  1029. X
  1030. XBegin %I Text
  1031. X%I cfg Black
  1032. X0 0 0 SetCFg
  1033. X%I f *-courier-medium-r-*-80-*
  1034. X/Courier 8 SetF
  1035. X%I t
  1036. X[ 1 0 0 1 510 500 ] concat
  1037. X%I
  1038. X[
  1039. X(Unknown)
  1040. X] Text
  1041. XEnd
  1042. X
  1043. XBegin %I Text
  1044. X%I cfg Black
  1045. X0 0 0 SetCFg
  1046. X%I f *-courier-medium-r-*-80-*
  1047. X/Courier 8 SetF
  1048. X%I t
  1049. X[ 1 0 0 1 500 470 ] concat
  1050. X%I
  1051. X[
  1052. X(UNK)
  1053. X] Text
  1054. XEnd
  1055. X
  1056. XEnd %I eop
  1057. X
  1058. XBegin %I Pict
  1059. X%I b u
  1060. X%I cfg u
  1061. X%I cbg u
  1062. X%I f u
  1063. X%I p u
  1064. X%I t
  1065. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1066. X
  1067. XBegin %I Elli
  1068. X%I b 65535
  1069. X1 0 1 [] 0 SetB
  1070. X%I cfg Black
  1071. X0 0 0 SetCFg
  1072. X%I cbg White
  1073. X1 1 1 SetCBg
  1074. X%I p
  1075. X0 SetP
  1076. X%I t
  1077. X[ 1 0 0 1 419 -135 ] concat
  1078. X%I
  1079. X61 418 31 33 Elli
  1080. XEnd
  1081. X
  1082. XBegin %I Text
  1083. X%I cfg Black
  1084. X0 0 0 SetCFg
  1085. X%I f *-courier-medium-r-*-80-*
  1086. X/Courier 8 SetF
  1087. X%I t
  1088. X[ 1 0 0 1 515 290 ] concat
  1089. X%I
  1090. X[
  1091. X(End)
  1092. X(Parameter)
  1093. X] Text
  1094. XEnd
  1095. X
  1096. XBegin %I Text
  1097. X%I cfg Black
  1098. X0 0 0 SetCFg
  1099. X%I f *-courier-medium-r-*-80-*
  1100. X/Courier 8 SetF
  1101. X%I t
  1102. X[ 1 0 0 1 508 257 ] concat
  1103. X%I
  1104. X[
  1105. X(PE)
  1106. X] Text
  1107. XEnd
  1108. X
  1109. XEnd %I eop
  1110. X
  1111. XBegin %I Elli
  1112. X%I b 65535
  1113. X1 0 1 [] 0 SetB
  1114. X%I cfg Black
  1115. X0 0 0 SetCFg
  1116. X%I cbg White
  1117. X1 1 1 SetCBg
  1118. X%I p
  1119. X0 SetP
  1120. X%I t
  1121. X[ 0.804699 0 0 0.804699 398.056 -22.7305 ] concat
  1122. X%I
  1123. X61 418 31 33 Elli
  1124. XEnd
  1125. X
  1126. XBegin %I Text
  1127. X%I cfg Black
  1128. X0 0 0 SetCFg
  1129. X%I f *-courier-medium-r-*-80-*
  1130. X/Courier 8 SetF
  1131. X%I t
  1132. X[ 0.804699 0 0 0.804699 475.307 318.462 ] concat
  1133. X%I
  1134. X[
  1135. X(Continue)
  1136. X(Parameter)
  1137. X] Text
  1138. XEnd
  1139. X
  1140. XBegin %I Text
  1141. X%I cfg Black
  1142. X0 0 0 SetCFg
  1143. X%I f *-courier-medium-r-*-80-*
  1144. X/Courier 8 SetF
  1145. X%I t
  1146. X[ 0.804699 0 0 0.804699 468.869 291.907 ] concat
  1147. X%I
  1148. X[
  1149. X(PC)
  1150. X] Text
  1151. XEnd
  1152. X
  1153. XBegin %I Text
  1154. X%I cfg Black
  1155. X0 0 0 SetCFg
  1156. X%I f *-courier-medium-r-*-80-*
  1157. X/Courier 8 SetF
  1158. X%I t
  1159. X[ 0.804699 0 0 0.804699 258.233 265.547 ] concat
  1160. X%I
  1161. X[
  1162. X(PINT)
  1163. X] Text
  1164. XEnd
  1165. X
  1166. XBegin %I Text
  1167. X%I cfg Black
  1168. X0 0 0 SetCFg
  1169. X%I f *-courier-medium-r-*-80-*
  1170. X/Courier 8 SetF
  1171. X%I t
  1172. X[ 0.804699 0 0 0.804699 207.342 387.666 ] concat
  1173. X%I
  1174. X[
  1175. X(FLP)
  1176. X] Text
  1177. XEnd
  1178. X
  1179. XBegin %I Elli
  1180. X%I b 65535
  1181. X1 0 1 [] 0 SetB
  1182. X%I cfg Gray80
  1183. X0.2 0.2 0.2 SetCFg
  1184. X%I cbg White
  1185. X1 1 1 SetCBg
  1186. X%I p
  1187. X0 SetP
  1188. X%I t
  1189. X[ 0.804699 0 0 0.804699 93.8796 208.023 ] concat
  1190. X%I
  1191. X61 418 31 33 Elli
  1192. XEnd
  1193. X
  1194. XBegin %I Text
  1195. X%I cfg Black
  1196. X0 0 0 SetCFg
  1197. X%I f *-courier-medium-r-*-80-*
  1198. X/Courier 8 SetF
  1199. X%I t
  1200. X[ 0.804699 0 0 0.804699 109.388 521.465 ] concat
  1201. X%I
  1202. X[
  1203. X(PRM)
  1204. X] Text
  1205. XEnd
  1206. X
  1207. XBegin %I Line
  1208. X%I b 65535
  1209. X1 0 1 [] 0 SetB
  1210. X%I cfg Black
  1211. X0 0 0 SetCFg
  1212. X%I cbg White
  1213. X1 1 1 SetCBg
  1214. X%I p
  1215. X0 SetP
  1216. X%I t
  1217. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1218. X%I
  1219. X133 419 450 295 Line
  1220. XEnd
  1221. X
  1222. XBegin %I Line
  1223. X%I b 65535
  1224. X1 0 1 [] 0 SetB
  1225. X%I cfg Black
  1226. X0 0 0 SetCFg
  1227. X%I cbg White
  1228. X1 1 1 SetCBg
  1229. X%I p
  1230. X0 SetP
  1231. X%I t
  1232. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1233. X%I
  1234. X132 410 455 150 Line
  1235. XEnd
  1236. X
  1237. XBegin %I Line
  1238. X%I b 65535
  1239. X1 0 1 [] 0 SetB
  1240. X%I cfg Black
  1241. X0 0 0 SetCFg
  1242. X%I cbg White
  1243. X1 1 1 SetCBg
  1244. X%I p
  1245. X0 SetP
  1246. X%I t
  1247. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1248. X%I
  1249. X218 129 218 210 Line
  1250. XEnd
  1251. X
  1252. XBegin %I Line
  1253. X%I b 65535
  1254. X1 0 1 [] 0 SetB
  1255. X%I cfg Black
  1256. X0 0 0 SetCFg
  1257. X%I cbg White
  1258. X1 1 1 SetCBg
  1259. X%I p
  1260. X0 SetP
  1261. X%I t
  1262. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1263. X%I
  1264. X102 384 197 119 Line
  1265. XEnd
  1266. X
  1267. XBegin %I Line
  1268. X%I b 65535
  1269. X1 0 1 [] 0 SetB
  1270. X%I cfg Black
  1271. X0 0 0 SetCFg
  1272. X%I cbg White
  1273. X1 1 1 SetCBg
  1274. X%I p
  1275. X0 SetP
  1276. X%I t
  1277. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1278. X%I
  1279. X251 244 450 276 Line
  1280. XEnd
  1281. X
  1282. XBegin %I Line
  1283. X%I b 65535
  1284. X1 0 1 [] 0 SetB
  1285. X%I cfg Black
  1286. X0 0 0 SetCFg
  1287. X%I cbg White
  1288. X1 1 1 SetCBg
  1289. X%I p
  1290. X0 SetP
  1291. X%I t
  1292. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1293. X%I
  1294. X245 113 459 258 Line
  1295. XEnd
  1296. X
  1297. XBegin %I Line
  1298. X%I b 65535
  1299. X1 0 1 [] 0 SetB
  1300. X%I cfg Black
  1301. X0 0 0 SetCFg
  1302. X%I cbg White
  1303. X1 1 1 SetCBg
  1304. X%I p
  1305. X0 SetP
  1306. X%I t
  1307. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1308. X%I
  1309. X250 97 448 129 Line
  1310. XEnd
  1311. X
  1312. XBegin %I BSpl
  1313. X%I b 65535
  1314. X1 0 1 [] 0 SetB
  1315. X%I cfg Black
  1316. X0 0 0 SetCFg
  1317. X%I cbg White
  1318. X1 1 1 SetCBg
  1319. X%I p
  1320. X0 SetP
  1321. X%I t
  1322. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1323. X%I 6
  1324. X212 275
  1325. X199 308
  1326. X175 316
  1327. X162 305
  1328. X168 278
  1329. X194 263
  1330. X6 BSpl
  1331. XEnd
  1332. X
  1333. XBegin %I Line
  1334. X%I b 65535
  1335. X1 0 1 [] 0 SetB
  1336. X%I cfg Black
  1337. X0 0 0 SetCFg
  1338. X%I cbg White
  1339. X1 1 1 SetCBg
  1340. X%I p
  1341. X0 SetP
  1342. X%I t
  1343. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1344. X%I
  1345. X234 273 451 475 Line
  1346. XEnd
  1347. X
  1348. XBegin %I Line
  1349. X%I b 65535
  1350. X1 0 1 [] 0 SetB
  1351. X%I cfg Black
  1352. X0 0 0 SetCFg
  1353. X%I cbg White
  1354. X1 1 1 SetCBg
  1355. X%I p
  1356. X0 SetP
  1357. X%I t
  1358. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1359. X%I
  1360. X235 124 460 466 Line
  1361. XEnd
  1362. X
  1363. XBegin %I Line
  1364. X%I b 65535
  1365. X1 0 1 [] 0 SetB
  1366. X%I cfg Black
  1367. X0 0 0 SetCFg
  1368. X%I cbg White
  1369. X1 1 1 SetCBg
  1370. X%I p
  1371. X0 SetP
  1372. X%I t
  1373. X[ 0.804699 0 0 0.804699 61.6917 209.023 ] concat
  1374. X%I
  1375. X249 231 450 140 Line
  1376. XEnd
  1377. X
  1378. XBegin %I BSpl
  1379. X%I b 65535
  1380. X1 0 1 [] 0 SetB
  1381. X%I cfg Black
  1382. X0 0 0 SetCFg
  1383. X%I cbg White
  1384. X1 1 1 SetCBg
  1385. X%I p
  1386. X0 SetP
  1387. X%I t
  1388. X[ 0.534872 0.601209 -0.601209 0.534872 266.082 24.2328 ] concat
  1389. X%I 6
  1390. X212 275
  1391. X199 308
  1392. X175 316
  1393. X162 305
  1394. X168 278
  1395. X194 263
  1396. X6 BSpl
  1397. XEnd
  1398. X
  1399. XBegin %I Text
  1400. X%I cfg Black
  1401. X0 0 0 SetCFg
  1402. X%I f *-courier-medium-r-*-80-*
  1403. X/Courier 8 SetF
  1404. X%I t
  1405. X[ 0.804699 0 0 0.804699 109.169 472.964 ] concat
  1406. X%I
  1407. X[
  1408. X(+ | - | 0-9)
  1409. X] Text
  1410. XEnd
  1411. X
  1412. XBegin %I Text
  1413. X%I cfg Black
  1414. X0 0 0 SetCFg
  1415. X%I f *-courier-medium-r-*-80-*
  1416. X/Courier 8 SetF
  1417. X%I t
  1418. X[ 0.804699 0 0 0.804699 177.568 295.126 ] concat
  1419. X%I
  1420. X[
  1421. X(0-9)
  1422. X] Text
  1423. XEnd
  1424. X
  1425. XBegin %I Text
  1426. X%I cfg Black
  1427. X0 0 0 SetCFg
  1428. X%I f *-courier-medium-r-*-80-*
  1429. X/Courier 8 SetF
  1430. X%I t
  1431. X[ 0.804699 0 0 0.804699 189.639 298.344 ] concat
  1432. X%I
  1433. X[
  1434. X()
  1435. X] Text
  1436. XEnd
  1437. X
  1438. XBegin %I Text
  1439. X%I cfg Black
  1440. X0 0 0 SetCFg
  1441. X%I f *-courier-medium-r-*-80-*
  1442. X/Courier 8 SetF
  1443. X%I t
  1444. X[ 0.804699 0 0 0.804699 202.514 452.042 ] concat
  1445. X%I
  1446. X[
  1447. X(0-9)
  1448. X] Text
  1449. XEnd
  1450. X
  1451. XBegin %I Text
  1452. X%I cfg Black
  1453. X0 0 0 SetCFg
  1454. X%I f *-courier-medium-r-*-80-*
  1455. X/Courier 8 SetF
  1456. X%I t
  1457. X[ 0.804699 0 0 0.804699 240.335 368.353 ] concat
  1458. X%I
  1459. X[
  1460. X(P)
  1461. X(e)
  1462. X(r)
  1463. X(i)
  1464. X(o)
  1465. X(d)
  1466. X] Text
  1467. XEnd
  1468. X
  1469. XBegin %I Text
  1470. X%I cfg Black
  1471. X0 0 0 SetCFg
  1472. X%I f *-courier-medium-r-*-80-*
  1473. X/Courier 8 SetF
  1474. X%I t
  1475. X[ 0.804699 0 0 0.804699 243.554 446.409 ] concat
  1476. X%I
  1477. X[
  1478. X(Other)
  1479. X] Text
  1480. XEnd
  1481. X
  1482. XBegin %I Text
  1483. X%I cfg Black
  1484. X0 0 0 SetCFg
  1485. X%I f *-courier-medium-r-*-80-*
  1486. X/Courier 8 SetF
  1487. X%I t
  1488. X[ 0.804699 0 0 0.804699 292.64 289.493 ] concat
  1489. X%I
  1490. X[
  1491. X(Lowercase)
  1492. X] Text
  1493. XEnd
  1494. X
  1495. XBegin %I Text
  1496. X%I cfg Black
  1497. X0 0 0 SetCFg
  1498. X%I f *-courier-medium-r-*-80-*
  1499. X/Courier 8 SetF
  1500. X%I t
  1501. X[ 0.804699 0 0 0.804699 158.888 584.888 ] concat
  1502. X%I
  1503. X[
  1504. X(Other)
  1505. X] Text
  1506. XEnd
  1507. X
  1508. XBegin %I Text
  1509. X%I cfg Black
  1510. X0 0 0 SetCFg
  1511. X%I f *-courier-medium-r-*-80-*
  1512. X/Courier 8 SetF
  1513. X%I t
  1514. X[ 0.804699 0 0 0.804699 269.304 420.659 ] concat
  1515. X%I
  1516. X[
  1517. X(Uppercase)
  1518. X(   or)
  1519. X( Symbol)
  1520. X] Text
  1521. XEnd
  1522. X
  1523. XBegin %I Text
  1524. X%I cfg Black
  1525. X0 0 0 SetCFg
  1526. X%I f *-courier-medium-r-*-80-*
  1527. X/Courier 8 SetF
  1528. X%I t
  1529. X[ 0.804699 0 0 0.804699 261.257 393.299 ] concat
  1530. X%I
  1531. X[
  1532. X(Lowercase)
  1533. X] Text
  1534. XEnd
  1535. X
  1536. XBegin %I Text
  1537. X%I cfg Black
  1538. X0 0 0 SetCFg
  1539. X%I f *-courier-medium-r-*-80-*
  1540. X/Courier 8 SetF
  1541. X%I t
  1542. X[ 0.804699 0 0 0.804699 252.405 333.751 ] concat
  1543. X%I
  1544. X[
  1545. X(Other)
  1546. X] Text
  1547. XEnd
  1548. X
  1549. XBegin %I Text
  1550. X%I cfg Black
  1551. X0 0 0 SetCFg
  1552. X%I f *-courier-medium-r-*-80-*
  1553. X/Courier 8 SetF
  1554. X%I t
  1555. X[ 0.804699 0 0 0.804699 289.421 338.579 ] concat
  1556. X%I
  1557. X[
  1558. X(Uppercase)
  1559. X(   or)
  1560. X( Symbol)
  1561. X] Text
  1562. XEnd
  1563. X
  1564. XBegin %I Text
  1565. X%I cfg Black
  1566. X0 0 0 SetCFg
  1567. X%I f *-courier-medium-r-*-80-*
  1568. X/Courier 8 SetF
  1569. X%I t
  1570. X[ 0.804699 0 0 0.804699 171.935 505.957 ] concat
  1571. X%I
  1572. X[
  1573. X(Lowercase)
  1574. X] Text
  1575. XEnd
  1576. X
  1577. XBegin %I Text
  1578. X%I cfg Black
  1579. X0 0 0 SetCFg
  1580. X%I f *-courier-medium-r-*-80-*
  1581. X/Courier 8 SetF
  1582. X%I t
  1583. X[ 0.804699 0 0 0.804699 195.272 556.653 ] concat
  1584. X%I
  1585. X[
  1586. X(Uppercase)
  1587. X(   or)
  1588. X( Symbol)
  1589. X] Text
  1590. XEnd
  1591. X
  1592. XBegin %I Line
  1593. X%I b 65535
  1594. X1 0 1 [] 0 SetB
  1595. X%I cfg Black
  1596. X0 0 0 SetCFg
  1597. X%I cbg White
  1598. X1 1 1 SetCBg
  1599. X%I p
  1600. X0 SetP
  1601. X%I t
  1602. X[ 1 0 0 1 -6 51 ] concat
  1603. X%I
  1604. X169 513 429 643 Line
  1605. XEnd
  1606. X
  1607. XBegin %I Elli
  1608. X%I b 65535
  1609. X1 0 1 [] 0 SetB
  1610. X%I cfg Gray80
  1611. X0.2 0.2 0.2 SetCFg
  1612. X%I cbg White
  1613. X1 1 1 SetCBg
  1614. X%I p
  1615. X0 SetP
  1616. X%I t
  1617. X[ 0.804699 0 0 0.804699 188.88 70.0228 ] concat
  1618. X%I
  1619. X61 418 31 33 Elli
  1620. XEnd
  1621. X
  1622. XBegin %I Elli
  1623. X%I b 65535
  1624. X1 0 1 [] 0 SetB
  1625. X%I cfg Gray80
  1626. X0.2 0.2 0.2 SetCFg
  1627. X%I cbg White
  1628. X1 1 1 SetCBg
  1629. X%I p
  1630. X0 SetP
  1631. X%I t
  1632. X[ 0.804699 0 0 0.804699 188.88 -47.9772 ] concat
  1633. X%I
  1634. X61 418 31 33 Elli
  1635. XEnd
  1636. X
  1637. XBegin %I Elli
  1638. X%I b 65535
  1639. X1 0 1 [] 0 SetB
  1640. X%I cfg Gray80
  1641. X0.2 0.2 0.2 SetCFg
  1642. X%I cbg White
  1643. X1 1 1 SetCBg
  1644. X%I p
  1645. X0 SetP
  1646. X%I t
  1647. X[ 0.576954 0 0 0.576954 168.772 -31.7798 ] concat
  1648. X%I
  1649. X61 418 31 33 Elli
  1650. XEnd
  1651. X
  1652. XBegin %I Elli
  1653. X%I b 65535
  1654. X1 0 1 [] 0 SetB
  1655. X%I cfg Black
  1656. X0 0 0 SetCFg
  1657. X%I cbg White
  1658. X1 1 1 SetCBg
  1659. X%I p
  1660. X0 SetP
  1661. X%I t
  1662. X[ 0.576954 0 0 0.576954 369.948 -33.5331 ] concat
  1663. X%I
  1664. X61 418 31 33 Elli
  1665. XEnd
  1666. X
  1667. XBegin %I Text
  1668. X%I cfg Black
  1669. X0 0 0 SetCFg
  1670. X%I f *-courier-medium-r-*-80-*
  1671. X/Courier 8 SetF
  1672. X%I t
  1673. X[ 1 0 0 1 226 213 ] concat
  1674. X%I
  1675. X[
  1676. X(= Intermediate State)
  1677. X] Text
  1678. XEnd
  1679. X
  1680. XBegin %I Text
  1681. X%I cfg Black
  1682. X0 0 0 SetCFg
  1683. X%I f *-courier-medium-r-*-80-*
  1684. X/Courier 8 SetF
  1685. X%I t
  1686. X[ 1 0 0 1 426 212 ] concat
  1687. X%I
  1688. X[
  1689. X(= End State)
  1690. X] Text
  1691. XEnd
  1692. X
  1693. XEnd %I eop
  1694. X
  1695. Xshowpage
  1696. X
  1697. X%%Trailer
  1698. X
  1699. Xend
  1700. SHAR_EOF
  1701. $TOUCH -am 0630160890 doc/parameter.scanner.idraw &&
  1702. chmod 0644 doc/parameter.scanner.idraw ||
  1703. echo "restore of doc/parameter.scanner.idraw failed"
  1704. set `wc -c doc/parameter.scanner.idraw`;Wc_c=$1
  1705. if test "$Wc_c" != "17644"; then
  1706.     echo original size 17644, current size $Wc_c
  1707. fi
  1708. fi
  1709. # ============= doc/scanner.doc ==============
  1710. if test X"$1" != X"-c" -a -f 'doc/scanner.doc'; then
  1711.     echo "File already exists: skipping 'doc/scanner.doc'"
  1712. else
  1713. echo "x - extracting doc/scanner.doc (Text)"
  1714. sed 's/^X//' << 'SHAR_EOF' > doc/scanner.doc &&
  1715. XProgram:    lj2ps, 1.1 (release)
  1716. XFile:        scanner.doc
  1717. X
  1718. XAuthor:        Christopher Lishka
  1719. XOrganization:    Wisconsin State Laboratory of Hygiene
  1720. X        Data Deprocessing Dept.
  1721. X
  1722. XDate:        March, 1990
  1723. X
  1724. X
  1725. X1. Introduction
  1726. X
  1727. XIn creating a LaserJet-to-Postscript converter, it is necessary to
  1728. Xdevelop a scanner for properly distinguishing between text and
  1729. XLaserJet commands.  This document details the scanner I created, which
  1730. Xwas a major section of the lj2ps program.
  1731. X
  1732. XAt first I used lex to generate a scanner module, which I tied into my
  1733. Xprogram with the interface in scan.h.  Although lex was likely not the
  1734. Xmost efficient choice (due to the overwhelming features it offers), it
  1735. Xdid allow me to modify my scanner as needed as more and more bugs were
  1736. Xdiscovered in my original design.
  1737. X
  1738. XHowever, the use of lex proved to be a rocky road ending in a wide
  1739. Xravine.  Besides struggling with the state feature of lex, I
  1740. Xencountered many small problems that are common when lex is used.  The
  1741. Xfinal straw was when I discovered that lex could not handle null
  1742. Xcharacters in the input stream.  If the scanner was to be useful and
  1743. Xextendable, null characters *had* to be handled, for their use in
  1744. Xbitmaps graphics was very common.  This implied that the lex scanner I
  1745. Xhad built had to be tossed out.  The development effort of the lex
  1746. Xscanner was not wasted though.  It did provide a suitable platform for
  1747. Xrevising my initial scanner design.
  1748. X
  1749. X
  1750. X2. The Table-Driven Finite State Automata
  1751. X
  1752. XIn place of the inadequate lex scanner, I decided to create a
  1753. Xhand-coded, state-driven FSA.  This would provide a fast and efficient
  1754. Xscanner that could overcome the defficiencies of the lex system.
  1755. XHowever, it would also take more time to develop the FSA and translate
  1756. Xit into tables.
  1757. X
  1758. XCertain characteristics of the LaserJet PCL scanner lent themselves
  1759. Xwell to improved efficiency and compact design.  One important
  1760. Xcharacteristic was that no *actions* were required on the transitions
  1761. Xfrom state to state.  Instead, a single default action of copying the
  1762. Xcurrent character to a token buffer was all that was needed.  This
  1763. Xallowed for the complete elimination of the action table.  Another
  1764. Xmajor aspect was the relatively small number of character classes.
  1765. XThis allowed for a simple character class table translation mechanism.
  1766. X
  1767. X
  1768. X3. Implementation Details
  1769. X
  1770. XWhat follows is the important details of my implementation.
  1771. X
  1772. X* There are actually *two* scanners.  Although this may seem somewhat
  1773. X  "kludgy", it actually saves development time (which was a factor)
  1774. X  because a true parser does not need to be written.  Instead, which
  1775. X  scanner is being used is recorded in a global variable, and it is
  1776. X  this one that is activated when scan() is run.
  1777. X
  1778. X  The reason that two separate scanners can be used lies in the
  1779. X  LaserJet PCL language, which consists of text with embedded
  1780. X  commands.  One scanner is responsible for scanning normal text, and
  1781. X  is able to differentiate command prefixes (which always start with
  1782. X  an escape character) from the surrounding text.  The other scanner
  1783. X  is responsible for breaking up command parameters into useful
  1784. X  tokens.
  1785. X
  1786. X  Each scanner has separate state and character class tables, as well
  1787. X  as the necessary state constants that go with them.  The text
  1788. X  scanner's tables and constants all start with "st_" or "ST_",
  1789. X  whereas the parameter scanner uses "sp_" and "SP_".
  1790. X
  1791. X  One problem that may crop up in the future is commands that require
  1792. X  trailing data.  Currently these commands are not implemented.  I
  1793. X  have not put provisions in for reading variable length data after a
  1794. X  PCL command.  However, it would be fairly trivial to add another
  1795. X  function to the scanner module (say, scan_data(length)) that would
  1796. X  read in a fixed number of characters (which would be interpreted as
  1797. X  8-bit bytes).
  1798. X
  1799. X* I have defined mnemonic constants for the various states.  These
  1800. X  have to be in numeric order (starting with zero) and must correspond
  1801. X  directly to the states indexes in the state tables.  If this were a
  1802. X  perfect world, C would have better enumeration facilities (believe
  1803. X  me-I looked into this) and would allow enumerations as indexes into
  1804. X  arrays.  Since we must live with the flaws, this is what I have come
  1805. X  up with.
  1806. X
  1807. X  Also note that there are two "special" state types: those marked
  1808. X  START and END.  START should always be state 1, whereas END should
  1809. X  always be state 0.  These two constants are used to label the start
  1810. X  and end states in both scanners, so they must remain the same for
  1811. X  both.  I know that fixing the start and end states to predefined
  1812. X  numbers was a kludge, but it was a fairly easy (and, hopefully,
  1813. X  minor) solution.
  1814. X
  1815. X* My scanner differs slightly from the "traditional" model.  In mine,
  1816. X  the *only* way to end the scanning of a token is to jump to the
  1817. X  *single* END state.  "Blasphemy!" some may cry out, but actually
  1818. X  this works quite well.  Once the END state is reached, the scanner
  1819. X  is finished.  You can find out what token was scanned by maintaining
  1820. X  a notion of what the previous state was and referring back to it
  1821. X  when END is reached.  Hence the use of the variable prev_state in
  1822. X  the function scan().
  1823. X
  1824. X  Related to the single END state is the demise of "actions."
  1825. X  Although no actions on transitions are required, without a single
  1826. X  END state one would need to keep a record of (a) which states are
  1827. X  end states and (b) whether a put-back or accept of the last read
  1828. X  character should be performed on reaching an end state.  (I actually
  1829. X  considered using multiple end states first, but then settled on this
  1830. X  because it was actually easier.)  With only one END state, the only
  1831. X  thing that can be done when reaching here is to put-back the
  1832. X  character that caused the transition to this state.  Therefore, the
  1833. X  actions in my scanner are *always* an implicit accept of each
  1834. X  character on a transition with a put-back of a character upon
  1835. X  arrival at the single END state.  This makes everything much easier
  1836. X  conceptually.
  1837. X
  1838. X  One consequence of this design is that the scanner must contain
  1839. X  explicit error states.  In addition, *all* characters must belong to
  1840. X  some character class and all character classes must have a
  1841. X  transition to another state (in many states, most characters will
  1842. X  have a transition to an error state).  This actually turns out to be
  1843. X  a useful mechanism for scanning LaserJet PCL, because all characters
  1844. X  can be text or data, and illegal characters in a command just cause
  1845. X  the command to be ignored.
  1846. X
  1847. X* The token numbers to be returned are determined at the end of scan()
  1848. X  in a large switch() statement (actually two switch()'s because of
  1849. X  the multiple scanners).  This was the easiest way to do it, and was
  1850. X  relatively efficient.  Note that prev_state must be examined,
  1851. X  because curr_state will *always* equal END when the switch() is
  1852. X  reached.
  1853. X
  1854. X  
  1855. SHAR_EOF
  1856. $TOUCH -am 0630160890 doc/scanner.doc &&
  1857. chmod 0664 doc/scanner.doc ||
  1858. echo "restore of doc/scanner.doc failed"
  1859. set `wc -c doc/scanner.doc`;Wc_c=$1
  1860. if test "$Wc_c" != "6829"; then
  1861.     echo original size 6829, current size $Wc_c
  1862. fi
  1863. fi
  1864. # ============= doc/suggestions.doc ==============
  1865. if test X"$1" != X"-c" -a -f 'doc/suggestions.doc'; then
  1866.     echo "File already exists: skipping 'doc/suggestions.doc'"
  1867. else
  1868. echo "x - extracting doc/suggestions.doc (Text)"
  1869. sed 's/^X//' << 'SHAR_EOF' > doc/suggestions.doc &&
  1870. XProgram:    lj2ps, 1.1 (release)
  1871. XFile:        suggestions.doc
  1872. X
  1873. XAuthor:        Christopher Lishka
  1874. XOrganization:    Wisconsin State Laboratory of Hygiene 
  1875. X        Data Processing Department
  1876. X
  1877. XDate:        April 25th, 1990
  1878. XLast modified:    June  30th, 1990, by Chris Lishka
  1879. X
  1880. X
  1881. XBesides adding missing PCL commands, there are many areas where lj2ps
  1882. Xcould be improved.  This file contains suggestions for those who want
  1883. Xto extend the lj2ps program.
  1884. X
  1885. X* Add the missing commands LaserJet commands.  These include:
  1886. X
  1887. X  ** The position stack commands (fairly easy)
  1888. X
  1889. X  ** Secondary font support (fairly easy)
  1890. X
  1891. X  ** Macros (medium difficulty)
  1892. X
  1893. X  ** Graphics commands (difficult)
  1894. X
  1895. X  ** HP soft fonts (very difficult)
  1896. X
  1897. X
  1898. X* Extend either the Test Suite or Metrics Suite (or both!) to include
  1899. X  more tests which would better test LaserJet operations and quirks.
  1900. X
  1901. X
  1902. X* The font mechanism should be completely replaced.  Here are some
  1903. X  suggestions for this area:
  1904. X
  1905. X  ** Currently the fonts information is hard-coded into the file
  1906. X     ljfonts.c.  A parser should be written that reads a file
  1907. X     describing which fonts are mounted in the virtual LaserJet.
  1908. X
  1909. X  ** Currently there are two PostScript functions for setting the
  1910. X     current font: F and FS.  In reality, only FS should be needed.
  1911. X     However, the scaling information for each font would need to be
  1912. X     changed, and I don't have the time to do this.
  1913. X
  1914. X  ** Rescaleable, downloadable LaserJet fonts should be created for
  1915. X     the LaserWriter.  The only way that the two machines will have
  1916. X     similar looking fonts is to custom-make LaserJet fonts for the
  1917. X     LaserWriter.  This, of course, is a helluva lot of work!  On the
  1918. X     other hand, it would improve the output immensely.
  1919. X
  1920. X
  1921. X* Using two separate scanners is rather kludgy.  It is very likely
  1922. X  that the text scanner could be replaced by a tightly-coded loop
  1923. X  which would read a character, check to see if it was "special", and
  1924. X  add it to the buffer if it wasn't.  Special characters would include:
  1925. X
  1926. X  (a) The escape character: this would throw execution into a special
  1927. X      command scanner/parser, which would handle recognition and
  1928. X      execution of all PCL commands.  This parser would need to be
  1929. X      able to read long sequences of binary information (for commands
  1930. X      with data).  After the command was finished, the parser would
  1931. X      return to the above text loop.
  1932. X
  1933. X  (b) Left and right parentheses, backslash: these must be quoted in
  1934. X      PostScript programs, and cannot simply be written out.
  1935. X
  1936. X  (c) Newline: perform PostScript code to write a newline.
  1937. X
  1938. X  (d) Form feed: perform PostScript code to start a new page.
  1939. X
  1940. X  (e) Tab: perform PostScript code to move to the next tab-stop.
  1941. X
  1942. X  (f) Shift in: switch to the secondary character set.
  1943. X
  1944. X  (g) Shift out: switch to the primary character set.
  1945. X
  1946. X  (h) Null, and other non-special, non-printable characters: these
  1947. X      should produce a warning, even though the LaserJet would let
  1948. X      them slip by.
  1949. X
  1950. X
  1951. X* I never implemented a real parser for the PCL commands.  Instead,
  1952. X  each PCL command prefix has its own dedicated function.  Each of
  1953. X  these functions has a small parser built into it.  As you might
  1954. X  guess (especially after looking at the code!) this causes a lot of
  1955. X  similar code to be duplicated in each function.  It would be nice to
  1956. X  implement a single "real" parser for the PCL commands, in
  1957. X  conjunction with the scanner changes mentioned above.  This would
  1958. X  make the overall design much cleaner, and may improve the efficiency
  1959. X  some. 
  1960. SHAR_EOF
  1961. $TOUCH -am 0630160890 doc/suggestions.doc &&
  1962. chmod 0664 doc/suggestions.doc ||
  1963. echo "restore of doc/suggestions.doc failed"
  1964. set `wc -c doc/suggestions.doc`;Wc_c=$1
  1965. if test "$Wc_c" != "3480"; then
  1966.     echo original size 3480, current size $Wc_c
  1967. fi
  1968. fi
  1969. echo "End of part 7, continue with part 8"
  1970. exit 0
  1971.  
  1972.