home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-09 | 48.4 KB | 2,243 lines |
- Newsgroups: comp.sources.misc
- subject: v13i118: lj2ps 1.2 (10 of 13), a LaserJet to PostScript Translator
- From: lishka@uwslh.slh.wisc.edu (Chris Lishka (hang loose...) )
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 13, Issue 118
- Submitted-by: lishka@uwslh.slh.wisc.edu (Chris Lishka (hang loose...) )
- Archive-name: lj2ps-1.2/part10
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # this is lj2ps.10 (part 10 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file doc/tscan.idr continued
- #
- if touch 2>&1 | fgrep '[-amc]' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- if test ! -r @shar_seq_.tmp; then
- echo "Please unpack part 1 first!"
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 10; then
- echo "Please unpack part $Scheck next!"
- exit 1
- else
- exit 0
- fi
- ) < @shar_seq_.tmp || exit 1
- echo "x - Continuing file doc/tscan.idr"
- sed 's/^X//' << 'SHAR_EOF' >> doc/tscan.idr &&
- X%I
- X288 357 398 400 Line
- XEnd
- X
- XBegin %I Line
- X%I b 65535
- X1 0 1 [] 0 SetB
- X%I cfg Black
- X0 0 0 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 657.527 46.7544 ] concat
- X%I
- X247 344 95 428 Line
- XEnd
- X
- XBegin %I Line
- X%I b 65535
- X1 0 1 [] 0 SetB
- X%I cfg Black
- X0 0 0 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 657.527 46.7544 ] concat
- X%I
- X314 210 89 421 Line
- XEnd
- X
- XBegin %I Line
- X%I b 65535
- X1 0 1 [] 0 SetB
- X%I cfg Black
- X0 0 0 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 657.527 46.7544 ] concat
- X%I
- X174 266 83 416 Line
- XEnd
- X
- XBegin %I Elli
- X%I b 65535
- X1 0 0 [] 0 SetB
- X%I cfg Gray80
- X0.2 0.2 0.2 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 909.041 54.4343 ] concat
- X%I
- X72 188 24 24 Elli
- XEnd
- X
- XBegin %I Elli
- X%I b 65535
- X1 0 0 [] 0 SetB
- X%I cfg Gray80
- X0.2 0.2 0.2 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 765.045 100.513 ] concat
- X%I
- X72 188 24 24 Elli
- XEnd
- X
- XBegin %I Elli
- X%I b 65535
- X1 0 0 [] 0 SetB
- X%I cfg Gray80
- X0.2 0.2 0.2 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 847.603 191.711 ] concat
- X%I
- X72 188 24 24 Elli
- XEnd
- X
- XBegin %I Elli
- X%I b 65535
- X1 0 0 [] 0 SetB
- X%I cfg Gray80
- X0.2 0.2 0.2 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.959978 0 0 0.959978 655.607 288.669 ] concat
- X%I
- X72 188 24 24 Elli
- XEnd
- X
- XBegin %I Text
- X%I cfg Gray80
- X0.2 0.2 0.2 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 666.167 475.864 ] concat
- X%I
- X[
- X(Unknown)
- X(Command)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 917.681 470.105 ] concat
- X%I
- X[
- X(Command)
- X(\()
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1008.88 472.025 ] concat
- X%I
- X[
- X(Command)
- X(\))
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 915.761 544.023 ] concat
- X%I
- X[
- X(Command)
- X(\(s)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1012.72 542.103 ] concat
- X%I
- X[
- X(Command)
- X(\)s)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1135.6 112.033 ] concat
- X%I
- X[
- X(Command)
- X(&a)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1076.08 112.033 ] concat
- X%I
- X[
- X(Command)
- X(&d)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1020.4 111.073 ] concat
- X%I
- X[
- X(Command)
- X(&f)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1186.47 294.429 ] concat
- X%I
- X[
- X()
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 964.72 112.033 ] concat
- X%I
- X[
- X(Command)
- X(&k)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 853.362 112.033 ] concat
- X%I
- X[
- X(Command)
- X(&p)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 795.764 112.033 ] concat
- X%I
- X[
- X(Command)
- X(&s)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 907.121 112.993 ] concat
- X%I
- X[
- X(Command)
- X(&l)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1181.67 482.584 ] concat
- X%I
- X[
- X(Command)
- X(=)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1182.63 416.346 ] concat
- X%I
- X[
- X(Command)
- X(9)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1184.55 358.747 ] concat
- X%I
- X[
- X(Command)
- X(Z)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1186.47 299.229 ] concat
- X%I
- X[
- X(Command)
- X(Y)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1186.47 238.75 ] concat
- X%I
- X[
- X(Command)
- X(E)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 665.207 196.511 ] concat
- X%I
- X[
- X(Command)
- X(*t)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 667.127 249.31 ] concat
- X%I
- X[
- X(Command)
- X(*r)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 667.127 299.229 ] concat
- X%I
- X[
- X(Command)
- X(*p)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 669.047 352.987 ] concat
- X%I
- X[
- X(Command)
- X(*c)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 668.087 402.906 ] concat
- X%I
- X[
- X(Command)
- X(*b)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 724.725 525.783 ] concat
- X%I
- X[
- X(STT)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1181.67 454.745 ] concat
- X%I
- X[
- X(CEQ)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1182.63 391.386 ] concat
- X%I
- X[
- X(C9)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1185.51 332.828 ] concat
- X%I
- X[
- X(CZ)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1186.47 276.189 ] concat
- X%I
- X[
- X(CY)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1186.47 217.63 ] concat
- X%I
- X[
- X(CE)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1147.12 93.7933 ] concat
- X%I
- X[
- X(CAa)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1085.68 93.7933 ] concat
- X%I
- X[
- X(CAd)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1030.96 93.7933 ] concat
- X%I
- X[
- X(CAf)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 974.32 95.7133 ] concat
- X%I
- X[
- X(CAk)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 916.721 96.6733 ] concat
- X%I
- X[
- X(CAl)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 862.002 94.7533 ] concat
- X%I
- X[
- X(CAp)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 804.404 94.7533 ] concat
- X%I
- X[
- X(CAs)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 682.486 171.552 ] concat
- X%I
- X[
- X(CSt)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 681.526 225.31 ] concat
- X%I
- X[
- X(CSr)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 683.446 276.189 ] concat
- X%I
- X[
- X(CSp)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 683.446 327.068 ] concat
- X%I
- X[
- X(CSc)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 683.446 379.867 ] concat
- X%I
- X[
- X(CSb)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 685.366 451.865 ] concat
- X%I
- X[
- X(UNK)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 918.641 509.464 ] concat
- X%I
- X[
- X(CLs)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 921.521 439.385 ] concat
- X%I
- X[
- X(CLP)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1012.72 440.345 ] concat
- X%I
- X[
- X(CRP)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 1016.56 504.664 ] concat
- X%I
- X[
- X(CRs)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 906.161 405.786 ] concat
- X%I
- X[
- X(CMD)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 828.403 312.668 ] concat
- X%I
- X[
- X(CMS)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 0.959978 0 0 0.959978 978.16 265.629 ] concat
- X%I
- X[
- X(CMA)
- X] Text
- XEnd
- X
- XBegin %I Elli
- X%I b 65535
- X1 0 0 [] 0 SetB
- X%I cfg Gray80
- X0.2 0.2 0.2 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.738444 0 0 0.738444 734.4 -76.8349 ] concat
- X%I
- X72 188 24 24 Elli
- XEnd
- X
- XBegin %I Elli
- X%I b 65535
- X1 0 0 [] 0 SetB
- X%I cfg Black
- X0 0 0 SetCFg
- X%I cbg White
- X1 1 1 SetCBg
- X%I p
- X0 SetP
- X%I t
- X[ 0.718325 0 0 0.718325 977.991 -77.2643 ] concat
- X%I
- X72 188 24 24 Elli
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1.16487 0 0 1.16487 811.226 65.806 ] concat
- X%I
- X[
- X(= Intermediate State)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1.16487 0 0 1.16487 1053.52 61.1465 ] concat
- X%I
- X[
- X(= End State)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 820 470 ] concat
- X%I
- X[
- X(^[)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 967 478 ] concat
- X%I
- X[
- X(s)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1060 479 ] concat
- X%I
- X[
- X(s)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 934 409 ] concat
- X%I
- X[
- X(\()
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 990 420 ] concat
- X%I
- X[
- X(\))
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1028 407 ] concat
- X%I
- X[
- X(=)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1047 388 ] concat
- X%I
- X[
- X(9)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1049 353 ] concat
- X%I
- X[
- X(Z)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1046 320 ] concat
- X%I
- X[
- X(Y)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1047 285 ] concat
- X%I
- X[
- X(E)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 950 310 ] concat
- X%I
- X[
- X(&)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1069 196 ] concat
- X%I
- X[
- X(a)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1042 191 ] concat
- X%I
- X[
- X(d)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 1011 188 ] concat
- X%I
- X[
- X(f)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 982 188 ] concat
- X%I
- X[
- X(k)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 951 187 ] concat
- X%I
- X[
- X(l)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 924 188 ] concat
- X%I
- X[
- X(p)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 890 189 ] concat
- X%I
- X[
- X(s)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 787 226 ] concat
- X%I
- X[
- X(t)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 776 246 ] concat
- X%I
- X[
- X(r)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 775 278 ] concat
- X%I
- X[
- X(p)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 774 314 ] concat
- X%I
- X[
- X(c)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 781 343 ] concat
- X%I
- X[
- X(b)
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 782 357 ] concat
- X%I
- X[
- X({Other})
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 826 409 ] concat
- X%I
- X[
- X({Other})
- X] Text
- XEnd
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 890 297 ] concat
- X%I
- X[
- X({Other})
- X] Text
- XEnd
- X
- XEnd %I eop
- X
- XBegin %I Text
- X%I cfg Black
- X0 0 0 SetCFg
- X%I f *-courier-medium-r-*-80-*
- X/Courier 8 SetF
- X%I t
- X[ 1 0 0 1 236 761 ] concat
- X%I
- X[
- X(lj2ps, version 1.1 \(release\))
- X] Text
- XEnd
- X
- XEnd %I eop
- X
- Xshowpage
- X
- X%%Trailer
- X
- Xend
- SHAR_EOF
- echo "File doc/tscan.idr is complete" &&
- $TOUCH -am 0707112690 doc/tscan.idr &&
- chmod 0644 doc/tscan.idr ||
- echo "restore of doc/tscan.idr failed"
- set `wc -c doc/tscan.idr`;Wc_c=$1
- if test "$Wc_c" != "40749"; then
- echo original size 40749, current size $Wc_c
- fi
- # ============= errors.c ==============
- echo "x - extracting errors.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > errors.c &&
- X/* Project: lj2ps, LaserJet PCL to PostScript translator
- X** File: errors.c
- X**
- X** Author: Christopher Lishka
- X** Organization: Wisconsin State Laboratory of Hygiene
- X** Data Processing Dept.
- X**
- X** Copyright (C) 1990 by Christopher Lishka.
- X**
- X** This program is free software; you can redistribute it and/or modify
- X** it under the terms of the GNU General Public License as published by
- X** the Free Software Foundation; either version 1, or (at your option)
- X** any later version.
- X**
- X** This program is distributed in the hope that it will be useful,
- X** but WITHOUT ANY WARRANTY; without even the implied warranty of
- X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X** GNU General Public License for more details.
- X**
- X** You should have received a copy of the GNU General Public License
- X** along with this program; if not, write to the Free Software
- X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X*/
- X
- Xstatic char * ModuleID = "Module errors: v1.0, production";
- X
- X#include <stdio.h>
- X#include "errors.h"
- X#include "lj2ps.h"
- X
- X
- X /* Functions */
- Xextern void warning();
- Xextern void error();
- Xextern void fatal_error();
- Xextern void internal_error();
- X
- X
- X
- X /* warning() prints a message to stderr about a minor problem.
- X */
- Xvoid
- Xwarning(message, argument)
- X char *message, *argument;
- X{
- X
- X if( warnings ){
- X fprintf(stderr, "%s %s (%s): WARNING\n", PROGRAM, VERSION, STATUS);
- X fprintf(stderr, "%s", message);
- X if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
- X else fprintf(stderr, "\n\n");
- X }
- X
- X} /* warning() */
- X
- X
- X
- X /* error() prints a message to stderr about a major but recoverable problem.
- X */
- Xvoid
- Xerror(message, argument)
- X char *message, *argument;
- X{
- X
- X fprintf(stderr, "%s %s (%s): ERROR\n", PROGRAM, VERSION, STATUS);
- X fprintf(stderr, "%s", message);
- X if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
- X else fprintf(stderr, "\n\n");
- X
- X} /* error() */
- X
- X
- X
- X /* fatal_error() prints a message to stderr about a major and
- X ** unrecoverable problem, then exits gracelessly.
- X */
- Xvoid
- Xfatal_error(message, argument)
- X char *message, *argument;
- X{
- X
- X fprintf(stderr, "%s %s (%s): FATAL ERROR\n", PROGRAM, VERSION, STATUS);
- X fprintf(stderr, "%s", message);
- X if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
- X else fprintf(stderr, "\n\n");
- X
- X exit(1);
- X
- X} /* fatal_error() */
- X
- X
- X
- X /* internal_error() reports an inconsistency in the program itself.
- X ** After the error message is reported, the program is killed
- X ** gracelessly.
- X */
- Xvoid
- Xinternal_error(message, argument)
- X char *message, *argument;
- X{
- X
- X fprintf(stderr, "%s %s (%s): INTERNAL ERROR\n", PROGRAM, VERSION, STATUS);
- X fprintf(stderr, "%s", message);
- X if( argument[0] != '\0' ) fprintf(stderr, " (%s)\n\n", argument);
- X else fprintf(stderr, "\n\n");
- X
- X exit(2);
- X
- X} /* internal_error() */
- X
- SHAR_EOF
- $TOUCH -am 0707112690 errors.c &&
- chmod 0644 errors.c ||
- echo "restore of errors.c failed"
- set `wc -c errors.c`;Wc_c=$1
- if test "$Wc_c" != "2950"; then
- echo original size 2950, current size $Wc_c
- fi
- # ============= errors.h ==============
- echo "x - extracting errors.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > errors.h &&
- X/*
- X** Project: lj2ps
- X** File: errors.h
- X**
- X** Author: Christopher Lishka
- X** Organization: Wisconsin State Laboratory of Hygiene
- X** Data Processing Dept.
- X**
- X** Copyright (C) 1990 by Christopher Lishka.
- X**
- X** This program is free software; you can redistribute it and/or modify
- X** it under the terms of the GNU General Public License as published by
- X** the Free Software Foundation; either version 1, or (at your option)
- X** any later version.
- X**
- X** This program is distributed in the hope that it will be useful,
- X** but WITHOUT ANY WARRANTY; without even the implied warranty of
- X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X** GNU General Public License for more details.
- X**
- X** You should have received a copy of the GNU General Public License
- X** along with this program; if not, write to the Free Software
- X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X*/
- X
- X /* Global functions */
- Xextern void warning(); /* Minor problem */
- Xextern void error(); /* Major but recoverable problem */
- Xextern void fatal_error(); /* Major unrecoverable problem */
- Xextern void internal_error(); /* Problem with the programs innards */
- SHAR_EOF
- $TOUCH -am 0707112690 errors.h &&
- chmod 0644 errors.h ||
- echo "restore of errors.h failed"
- set `wc -c errors.h`;Wc_c=$1
- if test "$Wc_c" != "1170"; then
- echo original size 1170, current size $Wc_c
- fi
- # ============= lj.c ==============
- echo "x - extracting lj.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > lj.c &&
- X/* Project: lj2ps
- X** File: lj.c
- X**
- X** Author: Christopher Lishka
- X** Organization: Wisconsin State Laboratory of Hygiene
- X** Data Processing Dept.
- X**
- X** Copyright (C) 1990 by Christopher Lishka.
- X**
- X** This program is free software; you can redistribute it and/or modify
- X** it under the terms of the GNU General Public License as published by
- X** the Free Software Foundation; either version 1, or (at your option)
- X** any later version.
- X**
- X** This program is distributed in the hope that it will be useful,
- X** but WITHOUT ANY WARRANTY; without even the implied warranty of
- X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X** GNU General Public License for more details.
- X**
- X** You should have received a copy of the GNU General Public License
- X** along with this program; if not, write to the Free Software
- X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X*/
- X
- Xstatic char * ModuleID = "Module lj: v1.0, production";
- X
- X /* Include files
- X */
- X#include <stdio.h>
- X#include "lj.h"
- X#include "ljcmds.h"
- X#include "ljfonts.h"
- X#include "scan.h"
- X#include "lj2ps.h"
- X
- X /* External definitions
- X */
- X
- X /* Global variables
- X */
- X /* Front panel variables */
- Xint panel_copies; /* Front panel: Copies */
- Xint panel_manual_feed; /* Front panel: Manual Feed */
- Xint panel_font_source; /* Front panel: Font Source */
- Xint panel_font_number; /* Front panel: Font Number */
- Xint panel_orientation; /* Front panel: Font Source, Font Number */
- Xint panel_form; /* Front panel: Form (i.e. lines/page) */
- X /* Postscript specific variables */
- Xdouble ps_scale_x; /* PS: scale in x direction */
- Xdouble ps_scale_y; /* PS: scale in y direction */
- Xdouble ps_offset_x; /* PS: offset in x direction */
- Xdouble ps_offset_y; /* PS: offset in y direction */
- X /* Job control */
- Xint copies; /* Number of copies */
- X /* Page control */
- Xint paper_source; /* Where the paper is coming from */
- Xint orientation; /* Portrait/landscape (code) */
- Xpsize page_size; /* Type of paper being used (structure) */
- Xdouble page_height; /* Height of physical page (inches) */
- Xdouble page_width; /* Width of physical page (inches) */
- Xdouble char_height; /* Char height (~= VMI) (inches) */
- Xdouble char_width; /* Char width (~= HMI) (inches) */
- Xdouble margin_top; /* Top margin (inches) */
- Xint text_length; /* Text length (lines) */
- Xdouble text_height; /* Text height (inches) */
- Xdouble margin_left; /* Left margin (inches) */
- Xdouble text_width; /* Text width (inches) */
- Xint perf_skip; /* 1 if perforation skip is on */
- Xint line_term; /* Current line termination mode */
- X /* Fonts */
- Xljfont font_p; /* Primary font */
- Xljfont font_s; /* Secondary font */
- Xint underline; /* Underline mode */
- X /* Font management */
- Xint font_ID; /* Current font ID */
- Xint char_code; /* Current character code */
- X /* Raster graphics */
- Xint resolution; /* Current graphics resolution */
- Xint margin_graphics; /* Graphics left margin, in dots? */
- X /* Rectangular area fill */
- Xint rect_size_h; /* Horizontal rectangle size */
- Xint rect_size_v; /* Vertical rectangle size */
- Xint fill_ID; /* Current area fill ID */
- X /* Macro */
- Xint macro_ID; /* Current macro ID */
- X /* Troubleshooting commands */
- Xint eol_wrap; /* End-of-line wrap on/off */
- Xint display_funcs; /* Display functions on/off */
- X /* Implementation variables */
- Xdouble current_x; /* Current X position (inches) */
- Xdouble current_y; /* Current Y position (inches) */
- Xint current_line; /* Current line being printed (lines) */
- Xint current_font; /* Primary or secondary (code) */
- Xint empty_line; /* Ture if line is empty (boolean) */
- Xint empty_text; /* True if text is empty (boolean) */
- Xint empty_page; /* True if page is empty (boolean) */
- Xdouble compress_width; /* Compression in x axis (%) */
- Xdouble compress_height; /* Compression in y axis (%) */
- Xdouble offset_width; /* Offset of x axis (inches) */
- Xdouble offset_height; /* Offset of y axis (inches) */
- X
- X /* Global function list
- X */
- Xextern void lj_factory_setup(); /* Reset to factory defaults */
- Xextern void lj_startup(); /* Do before the virtual LJ is ready... */
- Xextern void lj_shutdown(); /* Do after the virtual LJ is shutdown... */
- Xextern void lj_page_begin(); /* Start a new page */
- Xextern void lj_page_end(); /* End the current page */
- X/* macro lj_text_begin();*/ /* Start text */
- X/* macro lj_text_add(); */ /* Add text to buffer */
- X/* macro lj_text_end(); */ /* End text (i.e. flush the buffer) */
- X/* macro lj_cursor_move();*//* Move cursor to a new location */
- X/* macro lj_set_font(); */ /* Use a new font to print the text */
- X/* macro lj_undl_begin();*/ /* Start underlining */
- X/* macro lj_undl_flush();*/ /* Flush the current underline request */
- X/* macro lj_undl_end(); */ /* End underlining */
- Xextern void lj_nl(); /* Print a newline */
- Xextern void lj_reset(); /* Reset the printer to default state */
- Xextern int lj_paper_size(); /* Get the dimensions of paper and envelopes */
- X
- X /* Local constants
- X */
- X
- X /* Local structures and types
- X */
- X
- X /* Local variables
- X */
- X /* Implementation variables */
- Xstatic int new_page; /* Is the next page a new one? */
- Xstatic int page_number; /* Which page we are currently printing */
- X /* Tables */
- Xpsize paper_size[] = { /* Sizes (in inches) for paper and envelopes */
- X { LJ_PS_EXECUTIVE, 7.2500, 10.5000, 57, /* Paper sizes */
- X 0.2000, 0.2000, 0.1667, 0.3333 },
- X
- X { LJ_PS_LETTER, 8.5000, 11.0000, 60,
- X 0.2000, 0.2000, 0.1667, 0.3333 },
- X
- X { LJ_PS_LEGAL, 8.5000, 14.0000, 78,
- X 0.2000, 0.2000, 0.1667, 0.3333 },
- X
- X { LJ_PS_A4, 8.2677, 11.6929, 64,
- X 0.2000, 0.1933, 0.1667, 0.3067 },
- X
- X { LJ_PS_MONARCH, 3.8750, 7.5000, 39, /* Envelope sizes */
- X 0.2000, 0.2000, 0.1667, 0.3333 },
- X
- X { LJ_PS_COMMERCIAL10, 4.1250, 9.5000, 51,
- X 0.2000, 0.2000, 0.1667, 0.3333 },
- X
- X { LJ_PS_INTERNATIONALDL, 4.3307, 8.6614, 46,
- X 0.2000, 0.1933, 0.1667, 0.3067 },
- X
- X { LJ_PS_INTERNATIONALC5, 6.3780, 9.0157, 48,
- X 0.2000, 0.1933, 0.1667, 0.3067 },
- X
- X { 0, 0.0000, 0.0000 } /* The end must be all 0's */
- X};
- X
- X
- X /* Local macro definitions
- X */
- X
- X /* Local function list
- X */
- X
- X /* Function bodies
- X */
- X
- X
- Xvoid
- Xlj_factory_setup()
- X{
- X
- X panel_copies = 1;
- X panel_manual_feed = LJ_PS_TRAY_1;
- X panel_form = 60;
- X panel_orientation = LJ_OR_PORTRAIT;
- X panel_font_source = LJ_FS_INTERNAL;
- X panel_font_number = 0;
- X
- X ps_scale_x = 1.0;
- X ps_scale_y = 1.0;
- X ps_offset_x = 0.0;
- X ps_offset_y = 0.0;
- X
- X} /* lj_factory_setup() */
- X
- X
- X
- Xvoid
- Xlj_startup(ofile)
- X FILE *ofile;
- X{
- X
- X /* Set the default laserjet variables by executing a reset (ljcmd_E) */
- X lj_reset(ofile);
- X
- X /*
- X ** The postscript prologue
- X **
- X ** Postscript naming conventions used here:
- X **
- X ** Note: X = uppercase letter; x = lowercase letter.
- X **
- X ** X, XX, XXX: Functions
- X **
- X ** x, xx, xxx: Global variables
- X **
- X ** Xx, Xxx: Temporary variables
- X */
- X
- X /* First write out the comments */
- X fprintf(ofile, "%%!PS-Adobe-1.0\n"); /* The standard header */
- X fprintf(ofile, "%%%%Creator: %s %s (%s)\n",
- X PROGRAM, VERSION, STATUS); /* Identify oneself! */
- X fprintf(ofile, "%%%%Pages: (atend)\n");
- X fprintf(ofile, "%%%%EndComments\n");
- X fprintf(ofile, "\n");
- X
- X /* Next, write the prologue code */
- X
- X /* Set the number of copies */
- X fprintf(ofile, "/#copies %d def\n", copies);
- X
- X /* Use letter size paper (8.5"x11") */
- X/* fputs("letter\n", ofile);*/ /* XXX */
- X
- X /* Set manual or automatic feed */
- X if( (paper_source == LJ_PS_MANUAL)
- X || (paper_source == LJ_PS_MANUAL_ENVELOPE) ){
- X fprintf(ofile, "statusdict begin /manualfeed true def end\n");
- X }
- X else{
- X fprintf(ofile, "statusdict begin /manualfeed false def end\n");
- X }
- X
- X /* Define variables for the current font, font size, and font width */
- X fputs("\n", ofile);
- X fprintf(ofile, "/cf /%s def\n", font_p.ps_name);
- X fprintf(ofile, "/cs %.4f def\n", pt2in(font_p.point_size));
- X fprintf(ofile, "/cw %.4f def\n", font_p.width);
- X
- X /* Left margin */
- X fputs("\n", ofile);
- X fprintf(ofile, "/ml %.4f def\n", margin_left);
- X
- X /* Variables for underlining */
- X fputs("\n", ofile);
- X fputs("/ux 0.0 def\n", ofile); /* X coord of underline beginning */
- X fputs("/uy 0.0 def\n", ofile); /* Y coord of underline beginning */
- X
- X /* <String> S -> % Show the string */
- X fputs("\n/S /show load def\n", ofile);
- X
- X /* <X> <Y> -> % Move to (<X>,<Y>) */
- X fputs("\n/M /moveto load def\n", ofile);
- X
- X /* <DeltaX> HRM -> % Move <DeltaX> horizontally (i.e. relative) */
- X fputs("\n\
- X/HRM {\n\
- X 0 rmoveto\n\
- X} bind def\n\
- X", ofile);
- X
- X /* <Y> VM -> % Move to <Y> (i.e. vertical absolute) */
- X fputs("\n\
- X/VM {\n\
- X currentpoint pop exch moveto\n\
- X} bind def\n\
- X", ofile);
- X
- X /* Set Right Margin -- uses clippath
- X ** Note: 25 is used as an arbitrary size. The only requirement of this
- X ** number is that it must be outside the page boundaries
- X */
- X fputs("\n\
- X/RM {\n\
- X /Tr exch def\n\
- X currentpoint initclip\n\
- X newpath\n\
- X 0 0 moveto Tr 0 lineto Tr 25 lineto 0 25 lineto\n\
- X closepath clip\n\
- X moveto\n\
- X} bind def\n\
- X", ofile);
- X
- X /* <typeface> <point-size> F ->
- X ** Set the font, given typeface and point size.
- X ** Note that the character-width is derived by having PostScript
- X ** provide the width of the *space* character (which is likely
- X ** the best character to use for a proportional font).
- X */
- X fputs("\n\
- X/F {\n\
- X /Tp exch def /Tf exch def\n\
- X Tf findfont Tp scalefont setfont\n\
- X /cf Tf def /cs Tp def /cw ( ) stringwidth pop def\n\
- X} bind def\n\
- X", ofile);
- X
- X /* <typeface> <width> <height> FS ->
- X ** Set the font, given typeface, X scale factor, Y scale factor.
- X ** Note that the character-width is derived by having PostScript
- X ** provide the width of the *space* character (which is likely
- X ** the best character to use for a proportional font).
- X */
- X fputs("\n\
- X/FS {\n\
- X /Ty exch def /Tx exch def /Tf exch def\n\
- X Tf findfont [Tx 0 0 Ty 0 0] makefont setfont\n\
- X /cf Tf def /cs Ty def /cw ( ) stringwidth pop def\n\
- X} bind def\n\
- X", ofile);
- X
- X /* US -> Start a new underline */
- X fputs("\n\
- X/US {\n\
- X currentpoint /uy exch def /ux exch def\n\
- X} bind def\n\
- X", ofile);
- X
- X /* UE -> Finish (i.e. draw!) the current underline
- X **
- X ** Note that this underlining does not yet work across separate lines,
- X ** so US and UE must be called on the same line. Also, underlining does
- X ** not work backwards, so only use it if going forwards with the
- X ** underlines (yes, I know this is very limited, but tracking page motion
- X ** is a bit hard with underlining).
- X */
- X fputs("\n\
- X/UE {\n\
- X /Tcx currentpoint pop def\n\
- X gsave\n\
- X newpath\n\
- X cf findfont cs scalefont dup\n\
- X /FontMatrix get 0 get /Ts exch def /FontInfo get dup\n\
- X /UnderlinePosition get Ts mul /To exch def\n\
- X /UnderlineThickness get Ts mul /Tt exch def\n\
- X ux uy To add moveto Tcx uy To add lineto\n\
- X Tt setlinewidth stroke\n\
- X grestore\n\
- X} bind def\n\
- X", ofile);
- X
- X /* TAB -> Tab over to the next tab stop
- X ** For efficiency, this function gets the currentpoint, exch's to
- X ** get the current-x to the top-of-stack, works magic on the
- X ** current-x to figure out the position of the tab stop, exch's
- X ** again to get the arguments in the right sequence for the moveto
- X ** operator, and moves to the tab position.
- X **
- X ** Note that (1.0 + LJ_ERROR) is added to the calculation. The 1.0
- X ** represents the movement to the next tab-stop. LJ_ERROR is needed
- X ** insure that the value is within a certain error-margin in its proximity
- X ** to the tab-stop when the "cvi" (i.e. drop the decimal portion) is
- X ** performed.
- X */
- X fprintf(ofile, "\n\
- X/TAB {\n\
- X currentpoint exch\n\
- X ml sub cw div %d div %f add cvi %d mul cw mul ml add\n\
- X exch moveto\n\
- X} bind def\n\
- X",
- X LJ_TAB_WIDTH,
- X (1.0 + LJ_ERROR),
- X LJ_TAB_WIDTH);
- X
- X /* Initialization of the position stack would go here, if it was
- X ** implemented! */
- X
- X /* Mark the end of the prolog */
- X fprintf(ofile, "\n%%%%EndProlog\n");
- X
- X /* Start the first page */
- X new_page = 1;
- X page_number = 0;
- X
- X} /* lj_startup() */
- X
- X
- X
- Xvoid
- Xlj_shutdown(ofile)
- X FILE *ofile;
- X{
- X
- X fprintf(ofile, "\nstatusdict begin /manualfeed false def end\n");
- X fprintf(ofile, "%%%%Trailer\n");
- X fprintf(ofile, "%%%%Pages: %d\n", page_number);
- X
- X} /* lj_shutdown() */
- X
- X
- X
- Xvoid
- Xlj_page_begin(ofile)
- X FILE *ofile;
- X{
- X
- X /* Set starting position */
- X current_x = margin_left;
- X current_y = page_height - margin_top - char_height;
- X current_line = 1;
- X
- X /* Print the PostScript page header */
- X if( new_page ){
- X page_number++;
- X fprintf(ofile, "\n%%%%Page: ? %d\n", page_number);
- X }
- X
- X /* Save the current graphics state */
- X fputs("save\n", ofile);
- X
- X /* Note: the next three pieces of code must be in the following
- X ** order to insure that everything works correctly:
- X **
- X ** (1) Make inches the default measure
- X ** (2) Rotate the the page to landscape, if necessary
- X ** (3) Perform default offsets and page scaling
- X */
- X
- X /* Make inches the default measure. Note that this must be at the
- X ** beginning of every *page* (rather than in the prologue) because
- X ** the PostScript showpage function resets the graphics state.
- X */
- X fprintf(ofile, "72 72 scale\n");
- X
- X /* Rotate the page to the proper orientation */
- X if( orientation == LJ_OR_LANDSCAPE ){
- X fprintf(ofile,
- X "90 rotate 0 %.4f translate\n",
- X -page_size.width);
- X }
- X
- X /* Make sure everything fits in the printable region */
- X fprintf(ofile, "%.4f %.4f translate %.4f %.4f scale\n",
- X offset_width, offset_height,
- X compress_width, compress_height);
- X
- X /* Make sure that a current point exists */
- X fputs("0 0 moveto\n", ofile);
- X
- X /* Set the initial font */
- X if( current_font == LJ_FT_PRIMARY )
- X lj_set_font(ofile, font_p);
- X else
- X lj_set_font(ofile, font_s);
- X
- X /* Set the left margin */
- X fprintf(ofile, "/ml %.4f def ", margin_left);
- X
- X /* Set the right margin */
- X fprintf(ofile, " %.4f RM ",
- X margin_left + text_width);
- X
- X /* Default position */
- X fprintf(ofile,
- X "%.4f %.4f M\n", current_x, current_y);
- X
- X empty_page = 1;
- X lj_undl_mark(ofile);
- X lj_text_begin();
- X
- X} /* lj_page_begin() */
- X
- X
- X
- Xvoid
- Xlj_page_end(ofile)
- X FILE *ofile;
- X{
- X
- X lj_text_end(ofile);
- X lj_undl_flush(ofile);
- X fputs("\nrestore ", ofile);
- X if( empty_page ){
- X /* Clear the page without using erasepage! */
- X fputs("gsave newpath clippath 1 setgray fill grestore\n", ofile);
- X new_page = 0; /* Still the same physical page */
- X }
- X else{
- X fputs("showpage\n", ofile); /* Print the page */
- X new_page = 1; /* A new physical page is started */
- X }
- X
- X} /* lj_page_end() */
- X
- X
- X
- Xvoid
- Xlj_nl(ofile)
- X FILE *ofile;
- X{
- X
- X lj_text_end(ofile);
- X lj_undl_flush(ofile);
- X
- X current_x = margin_left;
- X current_y -= char_height;
- X fprintf(ofile, "%% NL\n%.4f %.4f M ", current_x, current_y);
- X
- X empty_line = 1;
- X lj_undl_mark(ofile);
- X lj_text_begin();
- X
- X} /* lj_nl() */
- X
- X
- X
- Xvoid
- Xlj_reset(ofile)
- X FILE *ofile;
- X{
- X
- X /* ***** JOB CONTROL **************************************************
- X */
- X copies = panel_copies; /* Number of copies, from the "front panel" */
- X
- X
- X /* ***** FONTS ********************************************************
- X **
- X ** Note: fonts must come before page control because the HMI (i.e.
- X ** char_width) is determined from the font.
- X */
- X
- X /* Reset the primary font */
- X if( lj_find_font(panel_font_source, panel_font_number, &font_p) == 1 ){
- X fatal_error("could not find specified font", "");
- X }
- X
- X /* Reset the secondary font */
- X if( lj_find_font(panel_font_source, panel_font_number, &font_p) == 1 ){
- X fatal_error("could not find specified font", "");
- X }
- X
- X /* Underline, should be off */
- X underline = LJ_UL_OFF;
- X
- X
- X /* ***** PAGE CONTROL ************************************************
- X */
- X
- X /* Paper source, from the "front panel" */
- X paper_source = panel_manual_feed;
- X
- X /* Page orientation, from the "front panel" */
- X orientation = panel_orientation;
- X
- X /* Determine the physical page size */
- X page_size.code = LJ_PS_LETTER; /* Letter size, by default */
- X if( lj_paper_size(&page_size) ){
- X internal_error("illegal page size", "");
- X }
- X
- X /* Page width and height */
- X if( orientation == LJ_OR_PORTRAIT ){
- X page_width = page_size.width;
- X page_height = page_size.height;
- X }
- X else{
- X page_width = page_size.height;
- X page_height = page_size.width;
- X }
- X
- X /* Top margin, text height (inches), and text length (lines).
- X ** Char width and height are set here as well due to the
- X ** inter-dependencies.
- X */
- X margin_top = 0.5; /* Top and bottom margins are 1/2" */
- X text_height = page_height - margin_top - 0.5; /* 0.5 is for bottom margin */
- X char_height = text_height / panel_form;
- X char_width = font_p.width; /* inches per character */
- X text_length = text_height / char_height;
- X
- X /* Left margin + text_width (= page width - right margin) */
- X margin_left = 0.0;
- X /* Initially, the right margin is not set. To simulate this, the
- X ** text_width is set to be wider than any reasonable page width.
- X */
- X text_width = 99.00;
- X
- X /* Perforation skip */
- X perf_skip = 1;
- X
- X /* Line termination: start with normal */
- X line_term = LJ_LT_NORM;
- X
- X
- X /* ***** FONT MANAGEMENT **********************************************
- X */
- X
- X /* Current font ID, for soft fonts */
- X font_ID = 0;
- X
- X /* Current character code, for soft fonts */
- X char_code = 0;
- X
- X
- X /* ***** RASTER GRAPHICS **********************************************
- X */
- X
- X /* Graphics resolution, start at 300 dpi */
- X resolution = 75;
- X
- X /* Graphics margin, start at 0 */
- X margin_graphics = 0;
- X
- X
- X /* ***** RECTANGULAR AREA FILL ****************************************
- X */
- X
- X /* ID for filling areas (one ID used for both patterns and gray scales) */
- X fill_ID = LJ_FI_RULE; /* *Black* greyscale! */
- X
- X /* Horizontal and vertical graphics area sizes */
- X rect_size_h = 0;
- X rect_size_v = 0;
- X
- X
- X /* ***** MACRO ********************************************************
- X */
- X
- X /* Current macro ID */
- X macro_ID = 0;
- X
- X
- X /* ***** TROUBLESHOOTING COMMANDS *************************************
- X */
- X
- X /* End-of-line wrap: should be off */
- X eol_wrap = 0;
- X
- X /* Display functions should be off */
- X display_funcs = 0;
- X
- X
- X /* ***** IMPLEMENTATION VARIABLES *************************************
- X */
- X current_x = margin_left;
- X current_y = page_height - margin_top - char_height;
- X current_line = 1;
- X current_font = LJ_FT_PRIMARY;
- X empty_line = 1;
- X empty_text = 1;
- X empty_page = 1;
- X compress_width = ps_scale_x * LJ_DEFAULT_SCALE_X;
- X compress_height = ps_scale_y * LJ_DEFAULT_SCALE_Y;
- X offset_width = ps_offset_x + LJ_DEFAULT_OFFSET_X;
- X offset_height = ps_offset_y + LJ_DEFAULT_OFFSET_Y;
- X
- X} /* lj_reset() */
- X
- X
- X
- X /* lj_paper_size() looks up the dimensions of the paper or envelope
- X ** passed in the code field of the argument. If the code is legal, then
- X ** the width and height fields are filled and a 0 is returned. If the
- X ** code does not exist, then the width and height fields are undefined and
- X ** a 1 is returned.
- X */
- Xint
- Xlj_paper_size(page_size)
- X psize *page_size;
- X{
- X int found;
- X int counter;
- X
- X found = 0;
- X for( counter = 0; !found && !(paper_size[counter].code == 0); counter++ ){
- X if( page_size->code == paper_size[counter].code ){
- X found = 1;
- X page_size->width = paper_size[counter].width;
- X page_size->height = paper_size[counter].height;
- X } /* if(...) */
- X } /* for(...) */
- X
- X return( !found );
- X} /* lj_paper_size() */
- SHAR_EOF
- $TOUCH -am 0707112690 lj.c &&
- chmod 0644 lj.c ||
- echo "restore of lj.c failed"
- set `wc -c lj.c`;Wc_c=$1
- if test "$Wc_c" != "20389"; then
- echo original size 20389, current size $Wc_c
- fi
- # ============= lj.h ==============
- echo "x - extracting lj.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > lj.h &&
- X/*
- X** Project: lj2ps
- X** File: lj.h
- X**
- X** Author: Christopher Lishka
- X** Organization: Wisconsin State Laboratory of Hygiene
- X** Data Processing Dept.
- X**
- X** Copyright (C) 1990 by Christopher Lishka.
- X**
- X** This program is free software; you can redistribute it and/or modify
- X** it under the terms of the GNU General Public License as published by
- X** the Free Software Foundation; either version 1, or (at your option)
- X** any later version.
- X**
- X** This program is distributed in the hope that it will be useful,
- X** but WITHOUT ANY WARRANTY; without even the implied warranty of
- X** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X** GNU General Public License for more details.
- X**
- X** You should have received a copy of the GNU General Public License
- X** along with this program; if not, write to the Free Software
- X** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X*/
- X
- X#ifndef LJ_H
- X#define LJ_H
- X
- X /* Global constants
- X */
- X /* Implementation constraints */
- X#define LJ_STRING_SIZE 256
- X#define LJ_ERROR 0.00001 /* Accuracy of floating point numbers */
- X /* Default scaling constants */
- X#define LJ_DEFAULT_SCALE_X 1.0000
- X#define LJ_DEFAULT_SCALE_Y 0.99
- X /* Default offset constants */
- X#define LJ_DEFAULT_OFFSET_X 0.2500
- X#define LJ_DEFAULT_OFFSET_Y 0.0000
- X /* Measurements */
- X#define in 1 /* Inches (base unit of measurement) */
- X#define dt 300 /* Dots per inch */
- X#define dp 720 /* Decipoints */
- X#define hi 120 /* Horizontal Index Unit */
- X#define vi 48 /* Vertical Index Unit */
- X#define pt 72 /* Points */
- X /* Tab stops */
- X#define LJ_TAB_WIDTH 8 /* Tabs occur every eight characters */
- X /* Internal codes */
- X#define LJ_UL_OFF 100 /* Underline codes */
- X#define LJ_UL_ON 101
- X#define LJ_UL_FLOAT 102
- X#define LJ_FI_RULE 200 /* Fill codes Rule */
- X#define LJ_FI_2 201 /* 2% gray */
- X#define LJ_FI_10 202 /* 10% gray */
- X#define LJ_FI_15 203 /* 15% gray */
- X#define LJ_FI_30 204 /* 30% gray */
- X#define LJ_FI_45 205 /* 45% gray */
- X#define LJ_FI_70 206 /* 70% gray */
- X#define LJ_FI_90 207 /* 90% gray */
- X#define LJ_FI_100 208 /* 100% gray */
- X#define LJ_FI_LINE_H 209 /* Horizontal lines */
- X#define LJ_FI_LINE_V 210 /* Vertical lines */
- X#define LJ_FI_DIAG_1 211 /* Diagonals 1 */
- X#define LJ_FI_DIAG_2 212 /* Diagonals 2 */
- X#define LJ_FI_GRID_SQ 213 /* Square grid */
- X#define LJ_FI_GRID_DIAG 214 /* Diagonal grid */
- X#define LJ_LT_NORM 301 /* Line termination normal */
- X#define LJ_LT_CR 302 /* cr=cr+lf lf=lf ff=ff */
- X#define LJ_LT_LF_FF 303 /* cr=cr lf=cr+lf ff=cr+ff */
- X#define LJ_LT_CR_LF_FF 304 /* cr=cr+lf lf=cr+lf ff=cr+ff */
- X#define LJ_PS_TRAY_1 301 /* Paper source */
- X#define LJ_PS_TRAY_2 302
- X#define LJ_PS_MANUAL 303
- X#define LJ_PS_MANUAL_ENVELOPE 304
- X#define LJ_OR_PORTRAIT 401 /* Orientation */
- X#define LJ_OR_LANDSCAPE 402
- X#define LJ_SS_0B 501 /* Symbol set: bit vector entries */
- X#define LJ_SS_0N 502
- X#define LJ_SS_0U 503
- X#define LJ_SS_1U 504
- X#define LJ_SS_8U 505
- X#define LJ_SS_10U 506
- X#define LJ_SS_11U 507
- X#define LJ_TF_HELV 601 /* Typefaces */
- X#define LJ_TF_TIMES 602
- X#define LJ_TF_PRES 603
- X#define LJ_TF_LP 604
- X#define LJ_TF_COUR 605
- X#define LJ_SP_PROPORTIONAL 701 /* Spacing */
- X#define LJ_SP_FIXED 702
- X#define LJ_ST_UPRIGHT 801 /* Font style */
- X#define LJ_ST_ITALIC 802
- X#define LJ_FT_PRIMARY 901 /* Primary/secondary current font */
- X#define LJ_FT_SECONDARY 902
- X#define LJ_PS_EXECUTIVE 1001 /* Page size codes */
- X#define LJ_PS_LETTER 1002
- X#define LJ_PS_LEGAL 1003
- X#define LJ_PS_A4 1004
- X#define LJ_PS_MONARCH 1005
- X#define LJ_PS_COMMERCIAL10 1006
- X#define LJ_PS_INTERNATIONALDL 1007
- X#define LJ_PS_INTERNATIONALC5 1008
- X#define LJ_FS_INTERNAL 1101 /* Font sources */
- X#define LJ_FS_LEFT 1102
- X#define LJ_FS_RIGHT 1103
- X#define LJ_FS_SOFT 1104
- X
- X /* Global structure and type definitions
- X */
- X
- X /* Data required for a laserjet font */
- Xtypedef struct {
- X /* Identifier fields */
- X int source; /* Font source: where the font is located */
- X int number; /* Font number */
- X /* Scaling fields */
- X int scale; /* True if scaling should be performed */
- X double scale_x; /* % to scale in x direction */
- X double scale_y; /* % to scale in y direction */
- X /* LaserJet font ID fields */
- X int symbol_set; /* The symbol set of the font */
- X int spacing; /* Proportional/fixed */
- X double pitch; /* (Only valid for fixed width fonts!) */
- X double point_size; /* Height of the character */
- X int style; /* Upright/italic */
- X int weight; /* Stroke weight: -3 to +3 */
- X int typeface; /* Which typeface to use */
- X char ps_name[LJ_STRING_SIZE]; /* The postscript font used for emulation */
- X double width; /* Width of a character */
- X} ljfont;
- X /* Data required to determine paper size */
- Xtypedef struct {
- X int code; /* Type of paper: letter, legal, A4, etc. */
- X double width; /* How wide (inches) */
- X double height; /* How high (inches) */
- X int default_form; /* Default value for form variable */
- X double unprint_top; /* Unprintable region - top */
- X double unprint_bottom; /* Unprintable region - bottom */
- X double unprint_left; /* Unprintable region - left */
- X double unprint_right; /* Unprintable region - right */
- X} psize;
- X
- X /* Global variables
- X */
- X /* Front panel variables */
- Xextern int panel_copies; /* Front panel: Copies */
- Xextern int panel_manual_feed; /* Front panel: Manual Feed */
- Xextern int panel_font_source; /* Front panel: Font Source */
- Xextern int panel_font_number; /* Front panel: Font Number */
- Xextern int panel_orientation; /* Front panel: Font Source, Font Number */
- Xextern int panel_form; /* Front panel: Form (i.e. lpi) */
- X /* Postscript specific variables */
- SHAR_EOF
- echo "End of part 10"
- echo "File lj.h is continued in part 11"
- echo "11" > @shar_seq_.tmp
- exit 0
-
-