home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / unix / paintps.sha < prev    next >
SHell self-extracting ARchive  |  1986-07-08  |  58.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: paintps.sha

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert SHell self-extracting ARchive (archive/shar) ext Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 20 38 2d 4a 75 6c 2d 38 | 36 20 31 34 3a 33 30 3a | 8-Jul-8|6 14:30:|
|00000010| 32 33 2d 50 44 54 2c 36 | 31 36 39 36 3b 30 30 30 |23-PDT,6|1696;000|
|00000020| 30 30 30 30 30 30 30 30 | 31 0a 52 65 74 75 72 6e |00000000|1.Return|
|00000030| 2d 50 61 74 68 3a 20 3c | 62 72 69 61 6e 40 53 41 |-Path: <|brian@SA|
|00000040| 4c 4c 59 2e 55 54 45 58 | 41 53 2e 45 44 55 3e 0a |LLY.UTEX|AS.EDU>.|
|00000050| 52 65 63 65 69 76 65 64 | 3a 20 66 72 6f 6d 20 73 |Received|: from s|
|00000060| 61 6c 6c 79 2e 55 54 45 | 58 41 53 2e 45 44 55 20 |ally.UTE|XAS.EDU |
|00000070| 62 79 20 53 55 4d 45 58 | 2d 41 49 4d 2e 41 52 50 |by SUMEX|-AIM.ARP|
|00000080| 41 20 77 69 74 68 20 54 | 43 50 3b 20 54 75 65 20 |A with T|CP; Tue |
|00000090| 38 20 4a 75 6c 20 38 36 | 20 31 34 3a 32 39 3a 32 |8 Jul 86| 14:29:2|
|000000a0| 31 2d 50 44 54 0a 44 61 | 74 65 3a 20 54 75 65 2c |1-PDT.Da|te: Tue,|
|000000b0| 20 38 20 4a 75 6c 20 38 | 36 20 31 36 3a 31 32 3a | 8 Jul 8|6 16:12:|
|000000c0| 31 35 20 63 64 74 0a 46 | 72 6f 6d 3a 20 62 72 69 |15 cdt.F|rom: bri|
|000000d0| 61 6e 40 53 41 4c 4c 59 | 2e 55 54 45 58 41 53 2e |an@SALLY|.UTEXAS.|
|000000e0| 45 44 55 20 28 42 72 69 | 61 6e 20 48 2e 20 50 6f |EDU (Bri|an H. Po|
|000000f0| 77 65 6c 6c 29 0a 50 6f | 73 74 65 64 2d 44 61 74 |well).Po|sted-Dat|
|00000100| 65 3a 20 54 75 65 2c 20 | 38 20 4a 75 6c 20 38 36 |e: Tue, |8 Jul 86|
|00000110| 20 31 36 3a 31 32 3a 31 | 35 20 63 64 74 0a 4d 65 | 16:12:1|5 cdt.Me|
|00000120| 73 73 61 67 65 2d 49 64 | 3a 20 3c 38 36 30 37 30 |ssage-Id|: <86070|
|00000130| 38 32 31 31 32 2e 41 41 | 30 35 36 31 37 40 73 61 |82112.AA|05617@sa|
|00000140| 6c 6c 79 2e 55 54 45 58 | 41 53 2e 45 44 55 3e 0a |lly.UTEX|AS.EDU>.|
|00000150| 52 65 63 65 69 76 65 64 | 3a 20 62 79 20 73 61 6c |Received|: by sal|
|00000160| 6c 79 2e 55 54 45 58 41 | 53 2e 45 44 55 20 28 34 |ly.UTEXA|S.EDU (4|
|00000170| 2e 32 32 2f 34 2e 32 32 | 29 0a 09 69 64 20 41 41 |.22/4.22|)..id AA|
|00000180| 30 35 36 31 37 3b 20 54 | 75 65 2c 20 38 20 4a 75 |05617; T|ue, 8 Ju|
|00000190| 6c 20 38 36 20 31 36 3a | 31 32 3a 31 35 20 63 64 |l 86 16:|12:15 cd|
|000001a0| 74 0a 54 6f 3a 20 69 6e | 66 6f 2d 6d 61 63 40 53 |t.To: in|fo-mac@S|
|000001b0| 55 4d 45 58 2d 41 49 4d | 2e 53 54 41 4e 46 4f 52 |UMEX-AIM|.STANFOR|
|000001c0| 44 2e 45 44 55 0a 53 75 | 62 6a 65 63 74 3a 20 50 |D.EDU.Su|bject: P|
|000001d0| 61 69 6e 74 70 73 20 52 | 65 6c 65 61 73 65 64 2c |aintps R|eleased,|
|000001e0| 20 46 69 6e 61 6c 6c 79 | 0a 0a 20 20 20 20 20 48 | Finally|.. H|
|000001f0| 65 72 65 20 69 73 20 50 | 61 69 6e 74 70 73 2e 73 |ere is P|aintps.s|
|00000200| 68 61 72 2e 20 20 50 61 | 69 6e 74 70 73 20 69 73 |har. Pa|intps is|
|00000210| 20 61 20 75 6e 69 78 20 | 70 72 6f 67 72 61 6d 20 | a unix |program |
|00000220| 77 68 69 63 68 20 77 69 | 6c 6c 20 70 72 69 6e 74 |which wi|ll print|
|00000230| 0a 4d 61 63 50 61 69 6e | 74 20 70 69 63 74 75 72 |.MacPain|t pictur|
|00000240| 65 73 20 6f 6e 20 61 20 | 4c 61 73 65 72 57 72 69 |es on a |LaserWri|
|00000250| 74 65 72 20 63 6f 6e 6e | 65 63 74 65 64 20 74 6f |ter conn|ected to|
|00000260| 20 61 20 55 4e 49 58 20 | 6d 61 63 68 69 6e 65 2e | a UNIX |machine.|
|00000270| 20 20 41 6c 73 6f 0a 69 | 6e 63 6c 75 64 65 64 20 | Also.i|ncluded |
|00000280| 61 72 65 20 70 72 6f 67 | 72 61 6d 73 20 74 68 61 |are prog|rams tha|
|00000290| 74 20 61 6c 6c 6f 77 20 | 6f 74 68 65 72 20 4d 61 |t allow |other Ma|
|000002a0| 63 69 6e 74 6f 73 68 20 | 6f 75 74 70 75 74 20 74 |cintosh |output t|
|000002b0| 6f 20 62 65 20 70 72 69 | 6e 74 65 64 0a 6f 6e 20 |o be pri|nted.on |
|000002c0| 74 68 65 20 4c 61 73 65 | 72 57 72 69 74 65 72 2e |the Lase|rWriter.|
|000002d0| 20 20 53 65 65 20 74 68 | 65 20 52 45 41 44 4d 45 | See th|e README|
|000002e0| 20 66 69 6c 65 20 61 6e | 64 20 74 68 65 20 6d 61 | file an|d the ma|
|000002f0| 6e 20 70 61 67 65 73 20 | 66 6f 72 20 6d 6f 72 65 |n pages |for more|
|00000300| 20 64 65 74 61 69 6c 73 | 2e 0a 20 20 20 20 20 49 | details|.. I|
|00000310| 74 20 77 69 6c 6c 20 70 | 72 6f 62 61 62 6c 79 20 |t will p|robably |
|00000320| 62 65 20 61 72 63 68 69 | 76 65 64 20 61 73 20 53 |be archi|ved as S|
|00000330| 55 4d 45 58 3a 3c 49 4e | 46 4f 2d 4d 41 43 3e 55 |UMEX:<IN|FO-MAC>U|
|00000340| 4e 49 58 2d 50 41 49 4e | 54 50 53 2e 53 48 41 52 |NIX-PAIN|TPS.SHAR|
|00000350| 2e 0a 0a 0a 42 72 69 61 | 6e 20 48 2e 20 50 6f 77 |....Bria|n H. Pow|
|00000360| 65 6c 6c 0a 09 09 55 55 | 43 50 3a 09 7b 69 68 6e |ell...UU|CP:.{ihn|
|00000370| 70 34 2c 73 65 69 73 6d | 6f 2c 63 74 76 61 78 7d |p4,seism|o,ctvax}|
|00000380| 21 75 74 2d 73 61 6c 6c | 79 21 62 72 69 61 6e 0a |!ut-sall|y!brian.|
|00000390| 09 09 41 52 50 41 3a 09 | 62 72 69 61 6e 40 73 61 |..ARPA:.|brian@sa|
|000003a0| 6c 6c 79 2e 55 54 45 58 | 41 53 2e 45 44 55 0a 09 |lly.UTEX|AS.EDU..|
|000003b0| 09 09 63 73 2e 70 6f 77 | 65 6c 6c 40 72 32 30 2e |..cs.pow|ell@r20.|
|000003c0| 55 54 45 58 41 53 2e 45 | 44 55 0a 0a 23 20 54 68 |UTEXAS.E|DU..# Th|
|000003d0| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|000003e0| 63 68 69 76 65 2e 20 20 | 52 65 6d 6f 76 65 20 61 |chive. |Remove a|
|000003f0| 6e 79 74 68 69 6e 67 20 | 62 65 66 6f 72 65 20 74 |nything |before t|
|00000400| 68 69 73 20 6c 69 6e 65 | 2c 0a 23 20 74 68 65 6e |his line|,.# then|
|00000410| 20 75 6e 70 61 63 6b 20 | 69 74 20 62 79 20 73 61 | unpack |it by sa|
|00000420| 76 69 6e 67 20 69 74 20 | 69 6e 20 61 20 66 69 6c |ving it |in a fil|
|00000430| 65 20 61 6e 64 20 74 79 | 70 69 6e 67 20 22 73 68 |e and ty|ping "sh|
|00000440| 20 66 69 6c 65 22 2e 0a | 23 0a 23 20 57 72 61 70 | file"..|#.# Wrap|
|00000450| 70 65 64 20 62 79 20 69 | 6d 34 75 21 62 72 69 61 |ped by i|m4u!bria|
|00000460| 6e 20 6f 6e 20 54 75 65 | 20 4a 75 6c 20 20 38 20 |n on Tue| Jul 8 |
|00000470| 31 35 3a 35 33 3a 33 36 | 20 43 44 54 20 31 39 38 |15:53:36| CDT 198|
|00000480| 36 0a 23 20 43 6f 6e 74 | 65 6e 74 73 3a 20 20 52 |6.# Cont|ents: R|
|00000490| 45 41 44 4d 45 20 52 45 | 41 44 4d 45 2e 53 50 4f |EADME RE|ADME.SPO|
|000004a0| 4f 4c 20 70 61 69 6e 74 | 70 73 2e 63 20 70 61 69 |OL paint|ps.c pai|
|000004b0| 6e 74 70 73 2e 31 20 4d | 61 6b 65 66 69 6c 65 20 |ntps.1 M|akefile |
|000004c0| 6d 61 63 6c 61 73 65 72 | 2e 63 73 68 0a 23 09 6d |maclaser|.csh.#.m|
|000004d0| 61 63 6c 61 73 65 72 2e | 31 20 6c 61 73 65 72 2d |aclaser.|1 laser-|
|000004e0| 70 72 65 70 2e 70 72 6f | 20 6d 61 63 66 69 6c 74 |prep.pro| macfilt|
|000004f0| 65 72 2e 63 20 70 73 66 | 69 6c 74 65 72 2e 63 73 |er.c psf|ilter.cs|
|00000500| 68 20 70 73 6d 61 63 2e | 63 73 68 0a 20 0a 65 63 |h psmac.|csh. .ec|
|00000510| 68 6f 20 78 20 2d 20 52 | 45 41 44 4d 45 0a 73 65 |ho x - R|EADME.se|
|00000520| 64 20 27 73 2f 5e 40 2f | 2f 27 20 3e 20 22 52 45 |d 's/^@/|/' > "RE|
|00000530| 41 44 4d 45 22 20 3c 3c | 27 40 2f 2f 45 2a 4f 2a |ADME" <<|'@//E*O*|
|00000540| 46 20 52 45 41 44 4d 45 | 2f 2f 27 0a 0a 20 20 20 |F README|//'.. |
|00000550| 20 20 54 68 69 73 20 73 | 68 65 6c 6c 20 61 72 63 | This s|hell arc|
|00000560| 68 69 76 65 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |hive con|tains a |
|00000570| 70 72 6f 67 72 61 6d 20 | 63 61 6c 6c 65 64 20 70 |program |called p|
|00000580| 61 69 6e 74 70 73 20 77 | 68 69 63 68 20 77 69 6c |aintps w|hich wil|
|00000590| 6c 20 63 6f 6e 76 65 72 | 74 0a 61 20 4d 61 63 50 |l conver|t.a MacP|
|000005a0| 61 69 6e 74 20 66 69 6c | 65 20 28 75 70 6c 6f 61 |aint fil|e (uploa|
|000005b0| 64 65 64 20 66 72 6f 6d | 20 61 20 4d 61 63 29 20 |ded from| a Mac) |
|000005c0| 74 6f 20 50 6f 73 74 53 | 63 72 69 70 74 20 66 6f |to PostS|cript fo|
|000005d0| 72 20 70 72 69 6e 74 69 | 6e 67 20 6f 6e 20 61 0a |r printi|ng on a.|
|000005e0| 4c 61 73 65 72 57 72 69 | 74 65 72 2e 20 20 49 74 |LaserWri|ter. It|
|000005f0| 20 72 65 61 64 73 20 61 | 20 70 6c 61 69 6e 20 4d | reads a| plain M|
|00000600| 61 63 50 61 69 6e 74 20 | 64 6f 63 75 6d 65 6e 74 |acPaint |document|
|00000610| 20 61 73 20 69 6e 70 75 | 74 20 61 6e 64 20 70 72 | as inpu|t and pr|
|00000620| 6f 64 75 63 65 73 20 0a | 70 6f 73 74 73 63 72 69 |oduces .|postscri|
|00000630| 70 74 20 6f 75 74 70 75 | 74 20 69 6e 20 74 68 65 |pt outpu|t in the|
|00000640| 20 73 61 6d 65 20 73 74 | 79 6c 65 20 61 73 20 74 | same st|yle as t|
|00000650| 68 61 74 20 70 72 6f 64 | 75 63 65 64 20 62 79 20 |hat prod|uced by |
|00000660| 74 68 65 20 31 2e 31 20 | 76 65 72 73 69 6f 6e 0a |the 1.1 |version.|
|00000670| 6f 66 20 74 68 65 20 4d | 61 63 20 4c 61 73 65 72 |of the M|ac Laser|
|00000680| 57 72 69 74 65 72 20 64 | 72 69 76 65 72 2e 20 20 |Writer d|river. |
|00000690| 50 61 69 6e 74 70 73 20 | 72 75 6e 73 20 6f 6e 20 |Paintps |runs on |
|000006a0| 75 6e 69 78 20 61 6e 64 | 20 77 69 6c 6c 20 61 75 |unix and| will au|
|000006b0| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 0a 73 70 6f 6f |tomatica|lly.spoo|
|000006c0| 6c 20 69 74 73 20 6f 75 | 74 70 75 74 20 66 6f 72 |l its ou|tput for|
|000006d0| 20 70 72 69 6e 74 69 6e | 67 20 69 66 20 6e 6f 20 | printin|g if no |
|000006e0| 6f 75 74 70 75 74 20 72 | 65 64 69 72 65 63 74 69 |output r|edirecti|
|000006f0| 6f 6e 20 68 61 73 20 62 | 65 65 6e 20 64 6f 6e 65 |on has b|een done|
|00000700| 2e 0a 54 68 65 20 61 64 | 76 61 6e 74 61 67 65 20 |..The ad|vantage |
|00000710| 6f 66 20 70 61 69 6e 74 | 70 73 20 69 73 20 74 68 |of paint|ps is th|
|00000720| 61 74 20 4d 61 63 50 61 | 69 6e 74 20 70 69 63 74 |at MacPa|int pict|
|00000730| 75 72 65 73 20 61 72 65 | 20 75 73 75 61 6c 6c 79 |ures are| usually|
|00000740| 20 6c 65 73 73 20 74 68 | 61 6e 0a 32 35 4b 2c 20 | less th|an.25K, |
|00000750| 77 68 69 6c 65 20 74 68 | 65 20 72 65 73 75 6c 74 |while th|e result|
|00000760| 69 6e 67 20 50 6f 73 74 | 53 63 72 69 70 74 20 6f |ing Post|Script o|
|00000770| 66 74 65 6e 20 65 78 63 | 65 65 64 73 20 31 30 30 |ften exc|eeds 100|
|00000780| 4b 2e 20 20 54 68 69 73 | 20 6f 62 76 69 6f 75 73 |K. This| obvious|
|00000790| 6c 79 0a 72 65 64 75 63 | 65 73 20 74 68 65 20 66 |ly.reduc|es the f|
|000007a0| 69 6c 65 20 74 72 61 6e | 73 66 65 72 20 74 69 6d |ile tran|sfer tim|
|000007b0| 65 2e 0a 0a 20 20 20 20 | 20 41 6c 73 6f 20 69 6e |e... | Also in|
|000007c0| 63 6c 75 64 65 64 20 69 | 73 20 74 68 65 20 76 65 |cluded i|s the ve|
|000007d0| 72 73 69 6f 6e 20 31 2e | 31 20 6c 61 73 65 72 2d |rsion 1.|1 laser-|
|000007e0| 70 72 65 70 20 66 69 6c | 65 2c 20 77 68 69 63 68 |prep fil|e, which|
|000007f0| 20 69 73 20 6e 65 65 64 | 65 64 0a 62 79 20 70 61 | is need|ed.by pa|
|00000800| 69 6e 74 70 73 2c 20 61 | 6e 64 20 61 20 73 68 65 |intps, a|nd a she|
|00000810| 6c 6c 20 73 63 72 69 70 | 74 20 63 61 6c 6c 65 64 |ll scrip|t called|
|00000820| 20 6d 61 63 6c 61 73 65 | 72 2c 20 77 68 69 63 68 | maclase|r, which|
|00000830| 20 69 73 20 63 61 6c 6c | 65 64 20 62 79 20 70 61 | is call|ed by pa|
|00000840| 69 6e 74 70 73 0a 74 6f | 20 73 70 6f 6f 6c 20 69 |intps.to| spool i|
|00000850| 74 73 20 6f 75 74 70 75 | 74 2e 20 20 4d 61 63 6c |ts outpu|t. Macl|
|00000860| 61 73 65 72 20 69 73 20 | 73 69 6d 70 6c 79 20 61 |aser is |simply a|
|00000870| 20 66 72 6f 6e 74 20 65 | 6e 64 20 74 6f 20 6c 70 | front e|nd to lp|
|00000880| 72 2c 20 61 6e 64 20 64 | 65 70 65 6e 64 73 0a 6f |r, and d|epends.o|
|00000890| 6e 20 74 68 65 20 73 70 | 6f 6f 6c 65 72 20 73 65 |n the sp|ooler se|
|000008a0| 74 75 70 20 64 65 73 63 | 72 69 62 65 64 20 69 6e |tup desc|ribed in|
|000008b0| 20 74 68 65 20 66 69 6c | 65 20 52 45 41 44 4d 45 | the fil|e README|
|000008c0| 2e 53 50 4f 4f 4c 2e 20 | 20 0a 20 20 20 20 20 0a |.SPOOL. | . .|
|000008d0| 20 20 20 20 20 54 68 69 | 73 20 63 6f 64 65 20 68 | Thi|s code h|
|000008e0| 61 73 20 62 65 65 6e 20 | 75 73 65 64 20 77 69 74 |as been |used wit|
|000008f0| 68 20 34 2e 32 20 61 6e | 64 20 34 2e 33 42 53 44 |h 4.2 an|d 4.3BSD|
|00000900| 3b 20 76 61 78 65 6e 2c | 20 53 75 6e 20 61 6e 64 |; vaxen,| Sun and|
|00000910| 20 53 65 71 75 65 6e 74 | 0a 68 61 72 64 77 61 72 | Sequent|.hardwar|
|00000920| 65 2e 20 20 57 65 20 75 | 73 65 20 74 68 65 20 54 |e. We u|se the T|
|00000930| 72 61 6e 53 63 72 69 70 | 74 20 70 61 63 6b 61 67 |ranScrip|t packag|
|00000940| 65 20 66 72 6f 6d 20 41 | 64 6f 62 65 20 74 6f 20 |e from A|dobe to |
|00000950| 64 72 69 76 65 20 74 68 | 65 20 4c 61 73 65 72 57 |drive th|e LaserW|
|00000960| 72 69 74 65 72 2e 0a 49 | 66 20 79 6f 75 27 72 65 |riter..I|f you're|
|00000970| 20 75 73 69 6e 67 20 73 | 6f 6d 65 20 6f 74 68 65 | using s|ome othe|
|00000980| 72 20 73 65 74 20 6f 66 | 20 50 6f 73 74 53 63 72 |r set of| PostScr|
|00000990| 69 70 74 20 64 72 69 76 | 65 72 73 2c 20 74 68 65 |ipt driv|ers, the|
|000009a0| 20 73 70 6f 6f 6c 65 72 | 20 68 61 63 6b 73 0a 61 | spooler| hacks.a|
|000009b0| 72 65 20 62 61 73 69 63 | 61 6c 6c 79 20 74 68 65 |re basic|ally the|
|000009c0| 20 73 61 6d 65 2c 20 73 | 69 6e 63 65 20 74 68 65 | same, s|ince the|
|000009d0| 72 65 20 61 72 65 20 6e | 6f 20 63 68 61 6e 67 65 |re are n|o change|
|000009e0| 73 20 74 6f 20 74 68 65 | 20 64 72 69 76 65 72 73 |s to the| drivers|
|000009f0| 20 74 68 65 6d 73 65 6c | 76 65 73 2e 0a 0a 20 20 | themsel|ves... |
|00000a00| 20 20 20 50 61 69 6e 74 | 70 73 20 69 73 20 64 69 | Paint|ps is di|
|00000a10| 73 74 61 6e 74 6c 79 20 | 72 65 6c 61 74 65 64 20 |stantly |related |
|00000a20| 74 6f 20 61 20 70 72 6f | 67 72 61 6d 20 63 61 6c |to a pro|gram cal|
|00000a30| 6c 65 64 20 70 61 69 6e | 74 69 6d 70 2c 20 6f 72 |led pain|timp, or|
|00000a40| 69 67 69 6e 61 6c 6c 79 | 0a 77 72 69 74 74 65 6e |iginally|.written|
|00000a50| 20 62 79 20 44 61 76 65 | 20 4a 6f 68 6e 73 6f 6e | by Dave| Johnson|
|00000a60| 20 61 74 20 42 72 6f 77 | 6e 20 55 6e 69 76 65 72 | at Brow|n Univer|
|00000a70| 73 69 74 79 2e 20 20 49 | 74 20 63 6f 6e 76 65 72 |sity. I|t conver|
|00000a80| 74 65 64 20 4d 61 63 50 | 61 69 6e 74 20 70 69 63 |ted MacP|aint pic|
|00000a90| 74 75 72 65 73 0a 74 6f | 20 49 6d 70 72 65 73 73 |tures.to| Impress|
|00000aa0| 20 66 6f 72 20 70 72 69 | 6e 74 69 6e 67 20 6f 6e | for pri|nting on|
|00000ab0| 20 49 6d 61 67 65 6e 73 | 2e 20 20 52 6f 6e 20 48 | Imagens|. Ron H|
|00000ac0| 69 74 63 68 65 6e 73 20 | 61 74 20 74 68 65 20 55 |itchens |at the U|
|00000ad0| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 0a 54 65 78 |niversit|y of.Tex|
|00000ae0| 61 73 20 68 61 63 6b 65 | 64 20 6f 6e 20 69 74 20 |as hacke|d on it |
|00000af0| 61 20 62 69 74 20 61 6e | 64 20 61 64 64 65 64 20 |a bit an|d added |
|00000b00| 73 6f 6d 65 20 66 65 61 | 74 75 72 65 73 2e 20 20 |some fea|tures. |
|00000b10| 57 68 65 6e 20 77 65 20 | 67 6f 74 20 61 20 4c 57 |When we |got a LW|
|00000b20| 2c 0a 42 72 69 61 6e 20 | 50 6f 77 65 6c 6c 20 61 |,.Brian |Powell a|
|00000b30| 74 20 55 54 20 77 61 73 | 20 69 6e 73 70 69 72 65 |t UT was| inspire|
|00000b40| 64 20 74 6f 20 64 6f 20 | 73 6f 6d 65 74 68 69 6e |d to do |somethin|
|00000b50| 67 20 73 69 6d 69 6c 61 | 72 20 66 6f 72 20 50 6f |g simila|r for Po|
|00000b60| 73 74 53 63 72 69 70 74 | 2e 0a 54 68 65 20 72 65 |stScript|..The re|
|00000b70| 73 75 6c 74 69 6e 67 20 | 70 61 69 6e 74 70 73 20 |sulting |paintps |
|00000b80| 69 73 20 76 65 72 79 20 | 64 69 66 66 65 72 65 6e |is very |differen|
|00000b90| 74 20 66 72 6f 6d 20 70 | 61 69 6e 74 69 6d 70 2c |t from p|aintimp,|
|00000ba0| 20 62 75 74 20 70 61 69 | 6e 74 69 6d 70 20 64 69 | but pai|ntimp di|
|00000bb0| 64 0a 70 72 6f 76 69 64 | 65 20 74 68 65 20 73 74 |d.provid|e the st|
|00000bc0| 72 75 63 74 75 72 65 20 | 61 6e 64 20 61 20 66 65 |ructure |and a fe|
|00000bd0| 77 20 73 75 62 72 6f 75 | 74 69 6e 65 73 2e 20 20 |w subrou|tines. |
|00000be0| 4d 61 63 6c 61 73 65 72 | 20 61 6e 64 20 74 68 65 |Maclaser| and the|
|00000bf0| 20 73 70 6f 6f 6c 65 72 | 20 68 61 63 6b 73 0a 77 | spooler| hacks.w|
|00000c00| 65 72 65 20 63 6f 6e 63 | 65 69 76 65 64 20 62 79 |ere conc|eived by|
|00000c10| 20 52 6f 6e 20 48 69 74 | 63 68 65 6e 73 27 20 74 | Ron Hit|chens' t|
|00000c20| 77 69 73 74 65 64 20 6d | 69 6e 64 2e 0a 0a 20 20 |wisted m|ind... |
|00000c30| 20 20 20 54 68 65 72 65 | 20 61 72 65 20 73 65 76 | There| are sev|
|00000c40| 65 72 61 6c 20 64 69 66 | 66 65 72 65 6e 74 20 63 |eral dif|ferent c|
|00000c50| 72 69 74 74 65 72 73 20 | 69 6e 20 74 68 69 73 20 |ritters |in this |
|00000c60| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 2e 20 20 54 |distribu|tion. T|
|00000c70| 68 65 79 20 0a 70 72 6f | 62 61 62 6c 79 20 77 6f |hey .pro|bably wo|
|00000c80| 6e 27 74 20 61 6c 6c 20 | 77 61 6e 74 20 74 6f 20 |n't all |want to |
|00000c90| 6c 69 76 65 20 69 6e 20 | 74 68 65 20 73 61 6d 65 |live in |the same|
|00000ca0| 20 70 6c 61 63 65 2e 20 | 20 41 20 6d 61 6b 65 66 | place. | A makef|
|00000cb0| 69 6c 65 20 69 73 20 69 | 6e 63 6c 75 64 65 64 0a |ile is i|ncluded.|
|00000cc0| 66 6f 72 20 70 61 69 6e | 74 70 73 2c 20 6d 61 69 |for pain|tps, mai|
|00000cd0| 6e 6c 79 20 62 65 63 61 | 75 73 65 20 69 74 20 77 |nly beca|use it w|
|00000ce0| 61 73 20 61 6c 72 65 61 | 64 79 20 74 68 65 72 65 |as alrea|dy there|
|00000cf0| 2e 20 20 55 73 65 20 79 | 6f 75 72 20 6c 6f 63 61 |. Use y|our loca|
|00000d00| 6c 20 63 75 73 74 6f 6d | 73 0a 66 6f 72 20 64 65 |l custom|s.for de|
|00000d10| 74 65 72 6d 69 6e 69 6e | 67 20 77 68 65 72 65 20 |terminin|g where |
|00000d20| 74 68 69 6e 67 73 20 73 | 68 6f 75 6c 64 20 67 6f |things s|hould go|
|00000d30| 2e 0a 0a 20 20 20 20 20 | 4e 4f 54 45 3a 20 20 4d |... |NOTE: M|
|00000d40| 61 63 6c 61 73 65 72 20 | 63 61 6e 20 70 72 69 6e |aclaser |can prin|
|00000d50| 74 20 50 6f 73 74 53 63 | 72 69 70 74 20 67 65 6e |t PostSc|ript gen|
|00000d60| 65 72 61 74 65 64 20 62 | 79 20 61 6e 79 20 4d 61 |erated b|y any Ma|
|00000d70| 63 69 6e 74 6f 73 68 20 | 70 72 6f 67 72 61 6d 2c |cintosh |program,|
|00000d80| 0a 6e 6f 74 20 6a 75 73 | 74 20 4d 61 63 50 61 69 |.not jus|t MacPai|
|00000d90| 6e 74 2e 20 20 28 53 65 | 65 20 74 68 65 20 6d 61 |nt. (Se|e the ma|
|00000da0| 6e 20 70 61 67 65 20 66 | 6f 72 20 6d 61 63 6c 61 |n page f|or macla|
|00000db0| 73 65 72 20 66 6f 72 20 | 64 65 74 61 69 6c 73 2e |ser for |details.|
|00000dc0| 29 20 20 46 6f 72 20 6e | 6f 77 2c 20 79 6f 75 0a |) For n|ow, you.|
|00000dd0| 6d 75 73 74 20 75 73 65 | 20 76 65 72 73 69 6f 6e |must use| version|
|00000de0| 20 31 2e 31 20 6f 66 20 | 74 68 65 20 4c 61 73 65 | 1.1 of |the Lase|
|00000df0| 72 57 72 69 74 65 72 20 | 64 72 69 76 65 72 20 74 |rWriter |driver t|
|00000e00| 6f 20 67 65 6e 65 72 61 | 74 65 20 74 68 65 20 50 |o genera|te the P|
|00000e10| 6f 73 74 53 63 72 69 70 | 74 20 6f 6e 0a 74 68 65 |ostScrip|t on.the|
|00000e20| 20 4d 61 63 69 6e 74 6f | 73 68 2e 0a 20 20 20 20 | Macinto|sh.. |
|00000e30| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00000e40| 20 74 6f 20 68 61 76 65 | 20 74 68 65 20 4c 61 73 | to have| the Las|
|00000e50| 65 72 57 72 69 74 65 72 | 20 70 72 69 6e 74 65 72 |erWriter| printer|
|00000e60| 20 64 72 69 76 65 72 20 | 6f 6e 20 74 68 65 20 4d | driver |on the M|
|00000e70| 61 63 69 6e 74 6f 73 68 | 0a 74 6f 20 75 73 65 20 |acintosh|.to use |
|00000e80| 70 61 69 6e 74 70 73 2e | 0a 20 20 20 20 20 57 68 |paintps.|. Wh|
|00000e90| 65 6e 20 41 70 70 6c 65 | 20 73 65 74 74 6c 65 73 |en Apple| settles|
|00000ea0| 20 64 6f 77 6e 20 6f 6e | 20 74 68 65 69 72 20 50 | down on| their P|
|00000eb0| 72 69 6e 74 65 72 20 44 | 72 69 76 65 72 73 2c 20 |rinter D|rivers, |
|00000ec0| 49 20 77 69 6c 6c 20 6d | 6f 64 69 66 79 20 74 68 |I will m|odify th|
|00000ed0| 69 73 0a 63 6f 64 65 20 | 74 6f 20 73 75 70 70 6f |is.code |to suppo|
|00000ee0| 72 74 20 74 68 65 20 6c | 61 74 65 73 74 20 33 2e |rt the l|atest 3.|
|00000ef0| 2a 20 4c 61 73 65 72 57 | 72 69 74 65 72 20 64 72 |* LaserW|riter dr|
|00000f00| 69 76 65 72 2e 20 20 54 | 68 65 20 6c 61 74 65 73 |iver. T|he lates|
|00000f10| 74 20 64 72 69 76 65 72 | 20 49 20 68 61 76 65 0a |t driver| I have.|
|00000f20| 73 65 65 6e 20 69 73 20 | 76 65 72 73 69 6f 6e 20 |seen is |version |
|00000f30| 33 2e 31 2c 20 61 6e 64 | 20 49 20 64 6f 6e 27 74 |3.1, and| I don't|
|00000f40| 20 74 68 69 6e 6b 20 69 | 74 20 77 69 6c 6c 20 62 | think i|t will b|
|00000f50| 65 20 68 61 72 64 20 74 | 6f 20 6d 6f 64 69 66 79 |e hard t|o modify|
|00000f60| 20 70 61 69 6e 74 70 73 | 20 74 6f 0a 70 72 6f 64 | paintps| to.prod|
|00000f70| 75 63 65 20 74 68 61 74 | 20 64 72 69 76 65 72 27 |uce that| driver'|
|00000f80| 73 20 6e 65 77 20 66 6f | 72 6d 61 74 2e 0a 20 20 |s new fo|rmat.. |
|00000f90| 20 20 20 41 6e 64 20 62 | 79 20 74 68 65 20 77 61 | And b|y the wa|
|00000fa0| 79 2c 20 74 68 65 20 22 | 43 68 6f 6f 73 65 72 22 |y, the "|Chooser"|
|00000fb0| 20 64 65 73 6b 20 61 63 | 63 65 73 73 6f 72 79 20 | desk ac|cessory |
|00000fc0| 77 6f 6e 27 74 20 69 6e | 73 74 61 6c 6c 20 74 68 |won't in|stall th|
|00000fd0| 65 20 76 65 72 73 69 6f | 6e 20 31 2e 31 0a 4c 61 |e versio|n 1.1.La|
|00000fe0| 73 65 72 57 72 69 74 65 | 72 20 64 72 69 76 65 72 |serWrite|r driver|
|00000ff0| 2e 20 20 54 6f 20 75 73 | 65 20 4c 61 73 65 72 57 |. To us|e LaserW|
|00001000| 72 69 74 65 72 20 31 2e | 31 20 77 69 74 68 20 74 |riter 1.|1 with t|
|00001010| 68 65 20 6e 65 77 20 73 | 79 73 74 65 6d 73 2c 20 |he new s|ystems, |
|00001020| 73 69 6d 70 6c 79 20 69 | 6e 73 74 61 6c 6c 0a 61 |simply i|nstall.a|
|00001030| 6e 64 20 75 73 65 20 22 | 43 68 6f 6f 73 65 20 50 |nd use "|Choose P|
|00001040| 72 69 6e 74 65 72 22 20 | 28 66 72 6f 6d 20 46 69 |rinter" |(from Fi|
|00001050| 6e 64 65 72 20 34 2e 31 | 20 64 61 79 73 29 2e 20 |nder 4.1| days). |
|00001060| 20 49 20 68 61 76 65 20 | 6e 6f 74 69 63 65 64 20 | I have |noticed |
|00001070| 6e 6f 20 70 72 6f 62 6c | 65 6d 73 0a 75 73 69 6e |no probl|ems.usin|
|00001080| 67 20 74 68 65 20 6f 6c | 64 20 64 72 69 76 65 72 |g the ol|d driver|
|00001090| 20 77 69 74 68 20 74 68 | 65 20 6e 65 77 20 52 4f | with th|e new RO|
|000010a0| 4d 53 20 6f 72 20 6e 65 | 77 20 73 79 73 74 65 6d |MS or ne|w system|
|000010b0| 2e 0a 0a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |...-----|--------|
|000010c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 42 72 69 |--------|----.Bri|
|000010d0| 61 6e 20 50 6f 77 65 6c | 6c 09 62 72 69 61 6e 40 |an Powel|l.brian@|
|000010e0| 73 61 6c 6c 79 2e 75 74 | 65 78 61 73 2e 65 64 75 |sally.ut|exas.edu|
|000010f0| 0a 52 6f 6e 20 48 69 74 | 63 68 65 6e 73 09 68 69 |.Ron Hit|chens.hi|
|00001100| 74 63 68 65 6e 73 40 73 | 61 6c 6c 79 2e 75 74 65 |tchens@s|ally.ute|
|00001110| 78 61 73 2e 65 64 75 0a | 40 2f 2f 45 2a 4f 2a 46 |xas.edu.|@//E*O*F|
|00001120| 20 52 45 41 44 4d 45 2f | 2f 0a 63 68 6d 6f 64 20 | README/|/.chmod |
|00001130| 75 3d 72 77 2c 67 3d 72 | 77 2c 6f 3d 72 20 52 45 |u=rw,g=r|w,o=r RE|
|00001140| 41 44 4d 45 0a 20 0a 65 | 63 68 6f 20 78 20 2d 20 |ADME. .e|cho x - |
|00001150| 52 45 41 44 4d 45 2e 53 | 50 4f 4f 4c 0a 73 65 64 |README.S|POOL.sed|
|00001160| 20 27 73 2f 5e 40 2f 2f | 27 20 3e 20 22 52 45 41 | 's/^@//|' > "REA|
|00001170| 44 4d 45 2e 53 50 4f 4f | 4c 22 20 3c 3c 27 40 2f |DME.SPOO|L" <<'@/|
|00001180| 2f 45 2a 4f 2a 46 20 52 | 45 41 44 4d 45 2e 53 50 |/E*O*F R|EADME.SP|
|00001190| 4f 4f 4c 2f 2f 27 0a 0a | 20 20 20 50 61 69 6e 74 |OOL//'..| Paint|
|000011a0| 70 73 20 64 65 70 65 6e | 64 73 20 6f 6e 20 74 68 |ps depen|ds on th|
|000011b0| 65 20 22 4d 61 63 20 65 | 6e 76 69 72 6f 6e 6d 65 |e "Mac e|nvironme|
|000011c0| 6e 74 22 20 62 65 69 6e | 67 20 70 72 65 73 65 6e |nt" bein|g presen|
|000011d0| 74 20 69 6e 20 74 68 65 | 20 4c 61 73 65 72 57 72 |t in the| LaserWr|
|000011e0| 69 74 65 72 0a 61 74 20 | 74 68 65 20 74 69 6d 65 |iter.at |the time|
|000011f0| 20 69 74 73 20 50 6f 73 | 74 73 63 72 69 70 74 20 | its Pos|tscript |
|00001200| 6f 75 74 70 75 74 20 69 | 73 20 70 72 6f 63 65 73 |output i|s proces|
|00001210| 73 65 64 2e 20 20 54 68 | 69 73 20 65 6e 76 69 72 |sed. Th|is envir|
|00001220| 6f 6e 6d 65 6e 74 20 69 | 73 20 73 65 74 75 70 0a |onment i|s setup.|
|00001230| 62 79 20 74 68 65 20 6c | 61 73 65 72 2d 70 72 65 |by the l|aser-pre|
|00001240| 70 20 70 72 6f 6c 6f 67 | 20 66 69 6c 65 20 77 68 |p prolog| file wh|
|00001250| 69 63 68 20 69 73 20 70 | 72 65 70 65 6e 64 65 64 |ich is p|repended|
|00001260| 20 62 79 20 74 68 65 20 | 4d 61 63 20 70 72 69 6e | by the |Mac prin|
|00001270| 74 20 64 72 69 76 65 72 | 73 0a 77 68 65 6e 20 61 |t driver|s.when a|
|00001280| 20 4d 61 63 20 70 72 69 | 6e 74 73 20 64 69 72 65 | Mac pri|nts dire|
|00001290| 63 74 6c 79 20 74 6f 20 | 61 20 4c 61 73 65 72 57 |ctly to |a LaserW|
|000012a0| 72 69 74 65 72 2e 20 20 | 53 69 6e 63 65 20 70 61 |riter. |Since pa|
|000012b0| 69 6e 74 70 73 20 62 61 | 73 69 63 61 6c 6c 79 0a |intps ba|sically.|
|000012c0| 6d 69 6d 69 63 73 20 77 | 68 61 74 20 4d 61 63 50 |mimics w|hat MacP|
|000012d0| 61 69 6e 74 20 64 6f 65 | 73 20 77 68 65 6e 20 69 |aint doe|s when i|
|000012e0| 74 20 70 72 69 6e 74 73 | 20 61 20 66 69 6c 65 20 |t prints| a file |
|000012f0| 6f 6e 20 61 20 4c 57 2c | 20 73 6f 6d 65 74 68 69 |on a LW,| somethi|
|00001300| 6e 67 20 6e 65 65 64 73 | 0a 74 6f 20 62 65 20 64 |ng needs|.to be d|
|00001310| 6f 6e 65 20 74 6f 20 70 | 72 6f 76 69 64 65 20 74 |one to p|rovide t|
|00001320| 68 65 20 4d 61 63 20 65 | 6e 76 69 72 6f 6e 6d 65 |he Mac e|nvironme|
|00001330| 6e 74 20 69 6e 20 74 68 | 65 20 4c 57 20 77 69 74 |nt in th|e LW wit|
|00001340| 68 20 74 68 65 20 55 6e | 69 78 20 73 79 73 74 65 |h the Un|ix syste|
|00001350| 6d 2e 0a 0a 20 20 20 54 | 68 65 20 73 61 6d 65 20 |m... T|he same |
|00001360| 61 70 70 6c 69 65 73 20 | 74 6f 20 61 6e 79 20 22 |applies |to any "|
|00001370| 4d 61 63 20 50 6f 73 74 | 53 63 72 69 70 74 22 20 |Mac Post|Script" |
|00001380| 66 69 6c 65 20 70 72 6f | 64 75 63 65 64 20 6f 6e |file pro|duced on|
|00001390| 20 61 20 4d 61 63 20 61 | 6e 64 0a 63 61 70 74 75 | a Mac a|nd.captu|
|000013a0| 72 65 64 20 77 69 74 68 | 20 74 68 65 20 43 6f 6d |red with| the Com|
|000013b0| 6d 61 6e 64 2d 46 20 73 | 65 71 75 65 6e 63 65 20 |mand-F s|equence |
|000013c0| 61 6e 64 20 74 68 65 6e | 20 75 70 6c 6f 61 64 65 |and then| uploade|
|000013d0| 64 20 74 6f 20 61 20 55 | 6e 69 78 20 6d 61 63 68 |d to a U|nix mach|
|000013e0| 69 6e 65 2e 0a 54 68 65 | 20 72 65 6d 61 69 6e 69 |ine..The| remaini|
|000013f0| 6e 67 20 64 69 73 63 75 | 73 73 69 6f 6e 20 63 6f |ng discu|ssion co|
|00001400| 6e 63 65 72 6e 73 20 70 | 72 69 6e 74 69 6e 67 20 |ncerns p|rinting |
|00001410| 4d 61 63 20 66 69 6c 65 | 73 20 74 6f 20 61 20 4c |Mac file|s to a L|
|00001420| 61 73 65 72 57 72 69 74 | 65 72 0a 62 65 69 6e 67 |aserWrit|er.being|
|00001430| 20 64 72 69 76 65 6e 20 | 62 79 20 61 20 55 6e 69 | driven |by a Uni|
|00001440| 78 20 28 34 2e 32 20 6f | 72 20 34 2e 33 20 42 53 |x (4.2 o|r 4.3 BS|
|00001450| 44 29 20 73 70 6f 6f 6c | 65 72 20 61 6e 64 20 77 |D) spool|er and w|
|00001460| 68 69 63 68 20 69 73 20 | 70 72 69 6d 61 72 69 6c |hich is |primaril|
|00001470| 79 0a 75 73 65 64 20 66 | 6f 72 20 67 65 6e 65 72 |y.used f|or gener|
|00001480| 61 6c 20 74 65 78 74 20 | 70 72 6f 63 65 73 73 69 |al text |processi|
|00001490| 6e 67 2c 20 6e 6f 74 20 | 66 6f 72 20 4d 61 63 20 |ng, not |for Mac |
|000014a0| 6f 75 74 70 75 74 2e 20 | 20 54 68 65 20 6f 75 74 |output. | The out|
|000014b0| 70 75 74 20 6f 66 0a 70 | 61 69 6e 74 70 73 20 69 |put of.p|aintps i|
|000014c0| 73 20 63 6f 6e 73 69 64 | 65 72 65 64 20 61 20 22 |s consid|ered a "|
|000014d0| 4d 61 63 20 66 69 6c 65 | 22 2c 20 65 76 65 6e 20 |Mac file|", even |
|000014e0| 74 68 6f 75 67 68 20 69 | 74 27 73 20 70 72 6f 64 |though i|t's prod|
|000014f0| 75 63 65 64 20 6f 6e 20 | 61 0a 55 6e 69 78 20 73 |uced on |a.Unix s|
|00001500| 79 73 74 65 6d 2c 20 61 | 6e 64 20 69 73 20 69 6e |ystem, a|nd is in|
|00001510| 63 6c 75 64 65 64 20 69 | 6e 20 74 68 65 20 67 65 |cluded i|n the ge|
|00001520| 6e 65 72 61 6c 20 64 69 | 73 63 75 73 73 69 6f 6e |neral di|scussion|
|00001530| 20 62 65 6c 6f 77 2e 0a | 0a 20 20 20 54 68 65 20 | below..|. The |
|00001540| 66 69 72 73 74 20 73 74 | 65 70 20 69 73 20 74 6f |first st|ep is to|
|00001550| 20 67 65 74 20 74 68 65 | 20 6c 61 73 65 72 2d 70 | get the| laser-p|
|00001560| 72 65 70 20 70 72 6f 6c | 6f 67 20 66 69 6c 65 2c |rep prol|og file,|
|00001570| 20 73 6f 20 74 68 61 74 | 20 69 74 20 63 61 6e 20 | so that| it can |
|00001580| 62 65 0a 73 65 6e 74 20 | 74 6f 20 74 68 65 20 4c |be.sent |to the L|
|00001590| 57 20 76 69 61 20 74 68 | 65 20 73 70 6f 6f 6c 65 |W via th|e spoole|
|000015a0| 72 2e 20 20 54 68 65 20 | 6c 61 73 65 72 2d 70 72 |r. The |laser-pr|
|000015b0| 65 70 20 66 69 6c 65 20 | 6d 75 73 74 20 62 65 20 |ep file |must be |
|000015c0| 6d 6f 64 69 66 69 65 64 | 0a 66 6f 72 20 75 73 65 |modified|.for use|
|000015d0| 20 77 69 74 68 20 74 68 | 65 20 73 70 6f 6f 6c 65 | with th|e spoole|
|000015e0| 72 2e 20 20 54 68 65 72 | 65 20 61 72 65 20 74 77 |r. Ther|e are tw|
|000015f0| 6f 20 72 65 61 73 6f 6e | 73 20 77 68 79 2e 0a 09 |o reason|s why...|
|00001600| 31 29 20 54 68 65 20 73 | 74 61 6e 64 61 72 64 20 |1) The s|tandard |
|00001610| 6c 61 73 65 72 2d 70 72 | 65 70 20 69 6e 73 74 61 |laser-pr|ep insta|
|00001620| 6c 6c 73 20 69 74 73 65 | 6c 66 20 70 65 72 6d 61 |lls itse|lf perma|
|00001630| 6e 65 6e 74 6c 79 2c 20 | 6f 6e 20 74 68 65 0a 09 |nently, |on the..|
|00001640| 20 20 20 61 73 73 75 6d | 70 74 69 6f 6e 20 74 68 | assum|ption th|
|00001650| 61 74 20 74 68 65 20 4c | 57 20 69 73 20 6c 69 76 |at the L|W is liv|
|00001660| 69 6e 67 20 69 6e 20 61 | 20 4d 61 63 2d 6f 6e 6c |ing in a| Mac-onl|
|00001670| 79 20 75 6e 69 76 65 72 | 73 65 2e 20 20 54 68 65 |y univer|se. The|
|00001680| 0a 09 20 20 20 61 6d 6f | 75 6e 74 20 6f 66 20 6d |.. amo|unt of m|
|00001690| 65 6d 6f 72 79 20 69 74 | 20 63 6f 6e 73 75 6d 65 |emory it| consume|
|000016a0| 73 20 69 73 20 73 75 62 | 73 74 61 6e 74 69 61 6c |s is sub|stantial|
|000016b0| 20 61 6e 64 20 77 65 20 | 61 72 65 6e 27 74 0a 09 | and we |aren't..|
|000016c0| 20 20 20 77 69 6c 6c 69 | 6e 67 20 74 6f 20 67 69 | willi|ng to gi|
|000016d0| 76 65 20 69 74 20 61 77 | 61 79 20 74 6f 20 61 63 |ve it aw|ay to ac|
|000016e0| 63 6f 6d 6f 64 61 74 65 | 20 74 68 65 20 6f 63 63 |comodate| the occ|
|000016f0| 61 73 69 6f 6e 61 6c 20 | 4d 61 63 0a 09 20 20 20 |asional |Mac.. |
|00001700| 6a 6f 62 20 73 65 6e 74 | 20 76 69 61 20 74 68 65 |job sent| via the|
|00001710| 20 55 6e 69 78 20 73 70 | 6f 6f 6c 65 72 2e 20 20 | Unix sp|ooler. |
|00001720| 52 65 6d 6f 76 69 6e 67 | 20 74 68 65 20 66 65 77 |Removing| the few|
|00001730| 20 6c 69 6e 65 73 0a 09 | 20 20 20 61 74 20 74 68 | lines..| at th|
|00001740| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 77 68 69 63 |e beginn|ing whic|
|00001750| 68 20 65 73 63 61 70 65 | 20 66 72 6f 6d 20 74 68 |h escape| from th|
|00001760| 65 20 73 65 72 76 65 72 | 20 6c 6f 6f 70 20 69 73 |e server| loop is|
|00001770| 0a 09 20 20 20 73 75 66 | 66 69 63 69 65 6e 74 20 |.. suf|ficient |
|00001780| 74 6f 20 70 72 65 76 65 | 6e 74 20 70 65 72 6d 61 |to preve|nt perma|
|00001790| 6e 65 6e 74 20 72 65 73 | 69 64 65 6e 63 79 2e 0a |nent res|idency..|
|000017a0| 09 32 29 20 54 68 65 20 | 65 6e 63 72 79 70 74 65 |.2) The |encrypte|
|000017b0| 64 20 73 6d 6f 6f 74 68 | 69 6e 67 20 66 75 6e 63 |d smooth|ing func|
|000017c0| 74 69 6f 6e 20 69 6e 20 | 74 68 65 20 6c 61 73 65 |tion in |the lase|
|000017d0| 72 2d 70 72 65 70 20 69 | 73 20 66 65 64 0a 09 20 |r-prep i|s fed.. |
|000017e0| 20 20 61 73 20 73 74 64 | 69 6e 20 74 6f 20 61 6e | as std|in to an|
|000017f0| 20 65 65 78 65 63 20 63 | 6f 6d 6d 61 6e 64 20 77 | eexec c|ommand w|
|00001800| 68 69 63 68 20 77 69 6c | 6c 20 72 65 61 64 20 75 |hich wil|l read u|
|00001810| 6e 74 69 6c 20 65 6f 66 | 2e 20 20 53 69 6e 63 65 |ntil eof|. Since|
|00001820| 0a 09 20 20 20 77 68 61 | 74 20 77 65 27 72 65 20 |.. wha|t we're |
|00001830| 74 72 79 69 6e 67 20 74 | 6f 20 61 63 63 6f 6d 70 |trying t|o accomp|
|00001840| 6c 69 73 68 20 69 73 20 | 74 6f 20 68 61 76 65 20 |lish is |to have |
|00001850| 74 68 65 20 6c 61 73 65 | 72 2d 70 72 65 70 20 6f |the lase|r-prep o|
|00001860| 6e 6c 79 0a 09 20 20 20 | 6c 69 76 65 20 66 6f 72 |nly.. |live for|
|00001870| 20 74 68 65 20 64 75 72 | 61 74 69 6f 6e 20 6f 66 | the dur|ation of|
|00001880| 20 61 20 73 69 6e 67 6c | 65 20 6a 6f 62 2c 20 74 | a singl|e job, t|
|00001890| 68 69 73 20 70 72 65 73 | 65 6e 74 73 20 61 20 70 |his pres|ents a p|
|000018a0| 72 6f 62 6c 65 6d 2e 0a | 09 20 20 20 4c 75 63 6b |roblem..|. Luck|
|000018b0| 69 6c 79 20 74 68 65 20 | 65 65 78 65 63 20 63 6f |ily the |eexec co|
|000018c0| 6d 6d 61 6e 64 20 77 69 | 6c 6c 20 61 6c 73 6f 20 |mmand wi|ll also |
|000018d0| 61 63 63 65 70 74 20 61 | 20 73 74 72 69 6e 67 20 |accept a| string |
|000018e0| 61 72 67 75 6d 65 6e 74 | 0a 09 20 20 20 6f 6e 20 |argument|.. on |
|000018f0| 74 68 65 20 73 74 61 63 | 6b 2c 20 73 6f 20 62 79 |the stac|k, so by|
|00001900| 20 70 6c 61 63 69 6e 67 | 20 68 65 78 20 71 75 6f | placing| hex quo|
|00001910| 74 65 73 20 28 3c 3e 29 | 20 61 72 6f 75 6e 64 20 |tes (<>)| around |
|00001920| 74 68 65 20 73 6d 6f 6f | 74 68 69 6e 67 0a 09 20 |the smoo|thing.. |
|00001930| 20 20 63 6f 64 65 20 61 | 6e 64 20 63 61 6c 6c 69 | code a|nd calli|
|00001940| 6e 67 20 65 65 78 65 63 | 20 61 66 74 65 72 20 69 |ng eexec| after i|
|00001950| 74 20 68 61 73 20 62 65 | 65 6e 20 70 6c 61 63 65 |t has be|en place|
|00001960| 64 20 6f 6e 20 74 68 65 | 20 73 74 61 63 6b 2c 0a |d on the| stack,.|
|00001970| 09 20 20 20 77 65 20 67 | 65 74 20 74 68 65 20 73 |. we g|et the s|
|00001980| 61 6d 65 20 65 66 66 65 | 63 74 20 70 6c 75 73 20 |ame effe|ct plus |
|00001990| 74 68 65 20 61 62 69 6c | 69 74 79 20 74 6f 20 63 |the abil|ity to c|
|000019a0| 6f 6e 74 69 6e 75 65 20 | 73 65 6e 64 69 6e 67 0a |ontinue |sending.|
|000019b0| 09 20 20 20 50 6f 73 74 | 53 63 72 69 70 74 20 63 |. Post|Script c|
|000019c0| 6f 64 65 20 61 66 74 65 | 72 77 61 72 64 73 2e 20 |ode afte|rwards. |
|000019d0| 20 48 65 6e 63 65 2c 20 | 77 65 20 63 61 6e 20 73 | Hence, |we can s|
|000019e0| 69 6d 70 6c 79 20 63 6f | 6e 63 61 74 65 6e 61 74 |imply co|ncatenat|
|000019f0| 65 0a 09 20 20 20 74 68 | 65 20 6d 6f 64 69 66 69 |e.. th|e modifi|
|00001a00| 65 64 20 6c 61 73 65 72 | 2d 70 72 65 70 20 61 6e |ed laser|-prep an|
|00001a10| 64 20 74 68 65 20 4d 61 | 63 20 50 6f 73 74 53 63 |d the Ma|c PostSc|
|00001a20| 72 69 70 74 20 66 69 6c | 65 20 61 6e 64 20 73 65 |ript fil|e and se|
|00001a30| 6e 64 0a 09 20 20 20 69 | 74 20 74 6f 20 74 68 65 |nd.. i|t to the|
|00001a40| 20 70 72 69 6e 74 65 72 | 2c 20 74 68 65 20 4d 61 | printer|, the Ma|
|00001a50| 63 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 77 69 |c enviro|nment wi|
|00001a60| 6c 6c 20 62 65 20 74 68 | 65 72 65 20 66 6f 72 20 |ll be th|ere for |
|00001a70| 74 68 65 0a 09 20 20 20 | 6a 6f 62 20 61 6e 64 20 |the.. |job and |
|00001a80| 77 69 6c 6c 20 62 65 20 | 66 6c 75 73 68 65 64 20 |will be |flushed |
|00001a90| 61 66 74 65 72 77 61 72 | 64 73 2e 0a 20 20 20 54 |afterwar|ds.. T|
|00001aa0| 68 69 73 20 77 69 6c 6c | 20 61 6c 73 6f 20 61 6c |his will| also al|
|00001ab0| 6c 6f 77 20 75 73 20 74 | 6f 20 73 75 70 70 6f 72 |low us t|o suppor|
|00001ac0| 74 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |t more t|han one |
|00001ad0| 76 65 72 73 69 6f 6e 20 | 6f 66 20 74 68 65 20 4c |version |of the L|
|00001ae0| 61 73 65 72 57 72 69 74 | 65 72 0a 64 72 69 76 65 |aserWrit|er.drive|
|00001af0| 72 20 69 6e 20 74 68 65 | 20 66 75 74 75 72 65 20 |r in the| future |
|00001b00| 28 77 68 69 63 68 20 77 | 65 20 69 6e 74 65 6e 64 |(which w|e intend|
|00001b10| 20 74 6f 20 64 6f 2e 29 | 20 20 53 69 6e 63 65 20 | to do.)| Since |
|00001b20| 74 68 65 20 6c 61 73 65 | 72 2d 70 72 65 70 20 77 |the lase|r-prep w|
|00001b30| 6f 6e 27 74 20 62 65 0a | 69 6e 20 74 68 65 20 4c |on't be.|in the L|
|00001b40| 57 20 52 41 4d 2c 20 77 | 65 20 63 61 6e 20 70 72 |W RAM, w|e can pr|
|00001b50| 65 70 65 6e 64 20 61 6e | 79 20 6c 61 73 65 72 2d |epend an|y laser-|
|00001b60| 70 72 65 70 20 77 69 74 | 68 6f 75 74 20 63 61 75 |prep wit|hout cau|
|00001b70| 73 69 6e 67 20 61 20 63 | 6f 6e 66 6c 69 63 74 2e |sing a c|onflict.|
|00001b80| 0a 0a 20 20 20 4e 6f 77 | 2c 20 74 68 65 72 65 20 |.. Now|, there |
|00001b90| 61 72 65 20 61 20 63 6f | 75 70 6c 65 20 6f 66 20 |are a co|uple of |
|00001ba0| 77 61 79 73 20 74 6f 20 | 68 61 6e 64 6c 65 20 61 |ways to |handle a|
|00001bb0| 20 4d 61 63 20 50 6f 73 | 74 53 63 72 69 70 74 20 | Mac Pos|tScript |
|00001bc0| 6a 6f 62 20 76 69 61 0a | 74 68 65 20 55 6e 69 78 |job via.|the Unix|
|00001bd0| 20 73 70 6f 6f 6c 65 72 | 2e 0a 09 31 29 20 4f 6e | spooler|...1) On|
|00001be0| 20 74 68 65 20 66 72 6f | 6e 74 20 65 6e 64 20 6f | the fro|nt end o|
|00001bf0| 66 20 74 68 65 20 73 70 | 6f 6f 6c 65 72 20 74 68 |f the sp|ooler th|
|00001c00| 72 75 20 6c 70 72 2c 20 | 73 75 63 68 20 61 73 3a |ru lpr, |such as:|
|00001c10| 0a 09 09 70 61 69 6e 74 | 70 73 20 66 6f 6f 2e 6d |...paint|ps foo.m|
|00001c20| 70 20 3e 20 66 6f 6f 2e | 70 73 0a 09 09 63 61 74 |p > foo.|ps...cat|
|00001c30| 20 2f 75 73 72 2f 6c 6f | 63 61 6c 2f 6c 69 62 2f | /usr/lo|cal/lib/|
|00001c40| 6c 61 73 65 72 2d 70 72 | 65 70 2e 70 72 6f 20 66 |laser-pr|ep.pro f|
|00001c50| 6f 6f 2e 70 73 20 7c 20 | 6c 70 72 20 2d 50 6c 77 |oo.ps | |lpr -Plw|
|00001c60| 0a 09 20 20 20 54 68 69 | 73 20 69 73 20 74 68 65 |.. Thi|s is the|
|00001c70| 20 6d 6f 73 74 20 67 65 | 6e 65 72 69 63 20 61 6e | most ge|neric an|
|00001c80| 64 20 64 6f 65 73 6e 27 | 74 20 72 65 71 75 69 72 |d doesn'|t requir|
|00001c90| 65 20 61 6e 79 74 68 69 | 6e 67 20 73 70 65 63 69 |e anythi|ng speci|
|00001ca0| 61 6c 0a 09 20 20 20 62 | 65 20 64 6f 6e 65 20 6f |al.. b|e done o|
|00001cb0| 6e 20 74 68 65 20 75 6e | 69 78 20 73 79 73 74 65 |n the un|ix syste|
|00001cc0| 6d 2e 20 20 54 68 65 20 | 64 72 61 77 62 61 63 6b |m. The |drawback|
|00001cd0| 73 20 61 72 65 20 74 68 | 61 74 20 61 20 63 75 72 |s are th|at a cur|
|00001ce0| 72 65 6e 74 0a 09 20 20 | 20 63 6f 70 79 20 6f 66 |rent.. | copy of|
|00001cf0| 20 74 68 65 20 6c 61 73 | 65 72 2d 70 72 65 70 20 | the las|er-prep |
|00001d00| 6d 75 73 74 20 62 65 20 | 70 72 65 73 65 6e 74 20 |must be |present |
|00001d10| 6f 6e 20 65 76 65 72 79 | 20 73 79 73 74 65 6d 20 |on every| system |
|00001d20| 74 68 61 74 20 6d 69 67 | 68 74 0a 09 20 20 20 73 |that mig|ht.. s|
|00001d30| 70 6f 6f 6c 20 61 20 6a | 6f 62 2c 20 74 68 61 74 |pool a j|ob, that|
|00001d40| 20 75 73 65 72 73 20 6b | 6e 6f 77 20 77 68 65 72 | users k|now wher|
|00001d50| 65 20 69 74 20 69 73 2c | 20 61 6e 64 20 74 68 61 |e it is,| and tha|
|00001d60| 74 20 74 68 65 79 20 6b | 6e 6f 77 0a 09 20 20 20 |t they k|now.. |
|00001d70| 74 68 65 20 70 72 6f 70 | 65 72 20 69 6e 63 61 6e |the prop|er incan|
|00001d80| 74 61 74 69 6f 6e 73 2e | 20 20 41 20 73 68 65 6c |tations.| A shel|
|00001d90| 6c 20 73 63 72 69 70 74 | 20 63 6f 75 6c 64 20 62 |l script| could b|
|00001da0| 65 20 77 72 69 74 74 65 | 6e 20 74 6f 0a 09 20 20 |e writte|n to.. |
|00001db0| 20 68 69 64 65 20 74 68 | 65 20 61 62 6f 76 65 20 | hide th|e above |
|00001dc0| 63 6f 6d 6d 61 6e 64 73 | 2c 20 62 75 74 20 74 68 |commands|, but th|
|00001dd0| 61 74 20 73 74 69 6c 6c | 20 72 65 71 75 69 72 65 |at still| require|
|00001de0| 73 20 6d 75 6c 74 69 70 | 6c 65 0a 09 20 20 20 63 |s multip|le.. c|
|00001df0| 6f 70 69 65 73 20 6f 66 | 20 74 68 65 20 6c 61 73 |opies of| the las|
|00001e00| 65 72 2d 70 72 65 70 20 | 66 69 6c 65 2e 0a 09 32 |er-prep |file...2|
|00001e10| 29 20 49 6e 20 74 68 65 | 20 62 61 63 6b 20 65 6e |) In the| back en|
|00001e20| 64 20 6f 66 20 74 68 65 | 20 73 70 6f 6f 6c 65 72 |d of the| spooler|
|00001e30| 2c 20 62 79 20 68 61 76 | 69 6e 67 20 61 20 66 69 |, by hav|ing a fi|
|00001e40| 6c 74 65 72 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |lter aut|omatical|
|00001e50| 6c 79 0a 09 20 20 20 70 | 72 65 70 65 6e 64 20 74 |ly.. p|repend t|
|00001e60| 68 65 20 6c 61 73 65 72 | 2d 70 72 65 70 20 74 6f |he laser|-prep to|
|00001e70| 20 61 6c 6c 20 4d 61 63 | 20 50 6f 73 74 53 63 72 | all Mac| PostScr|
|00001e80| 69 70 74 20 6a 6f 62 73 | 2e 20 20 54 68 69 73 20 |ipt jobs|. This |
|00001e90| 69 73 20 0a 09 20 20 20 | 74 68 65 20 6d 6f 73 74 |is .. |the most|
|00001ea0| 20 65 6c 65 67 61 6e 74 | 20 77 61 79 20 74 6f 20 | elegant| way to |
|00001eb0| 68 61 6e 64 6c 65 20 69 | 74 2c 20 73 69 6e 63 65 |handle i|t, since|
|00001ec0| 20 6f 6e 6c 79 20 6f 6e | 65 20 63 6f 70 79 20 6f | only on|e copy o|
|00001ed0| 66 20 74 68 65 0a 09 20 | 20 20 6c 61 73 65 72 2d |f the.. | laser-|
|00001ee0| 70 72 65 70 20 6e 65 65 | 64 20 65 78 69 73 74 20 |prep nee|d exist |
|00001ef0| 6f 6e 20 74 68 65 20 73 | 79 73 74 65 6d 20 77 68 |on the s|ystem wh|
|00001f00| 65 72 65 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 |ere the |printer |
|00001f10| 69 73 2c 20 61 6e 64 0a | 09 20 20 20 74 68 65 20 |is, and.|. the |
|00001f20| 64 65 74 61 69 6c 73 20 | 6f 66 20 68 61 6e 64 6c |details |of handl|
|00001f30| 69 6e 67 20 4d 61 63 20 | 73 70 65 63 69 66 69 63 |ing Mac |specific|
|00001f40| 20 66 69 6c 65 73 20 61 | 72 65 20 68 69 64 64 65 | files a|re hidde|
|00001f50| 6e 20 66 72 6f 6d 0a 09 | 20 20 20 74 68 65 20 75 |n from..| the u|
|00001f60| 73 65 72 2e 20 20 54 68 | 69 73 20 6d 65 74 68 6f |ser. Th|is metho|
|00001f70| 64 20 72 65 71 75 69 72 | 65 73 20 73 65 6c 65 63 |d requir|es selec|
|00001f80| 74 69 6e 67 20 61 20 22 | 66 69 6c 65 20 74 79 70 |ting a "|file typ|
|00001f90| 65 22 20 66 6f 72 0a 09 | 20 20 20 73 70 6f 6f 6c |e" for..| spool|
|00001fa0| 69 6e 67 20 4d 61 63 20 | 6a 6f 62 73 20 61 6e 64 |ing Mac |jobs and|
|00001fb0| 20 73 70 65 63 69 66 79 | 69 6e 67 20 74 68 65 20 | specify|ing the |
|00001fc0| 70 72 6f 70 65 72 20 68 | 61 6e 64 6c 65 72 73 20 |proper h|andlers |
|00001fd0| 6f 6e 20 74 68 65 0a 09 | 20 20 20 73 79 73 74 65 |on the..| syste|
|00001fe0| 6d 20 77 68 65 72 65 20 | 74 68 65 20 70 72 69 6e |m where |the prin|
|00001ff0| 74 65 72 20 69 73 2e 20 | 20 41 74 20 55 54 20 77 |ter is. | At UT w|
|00002000| 65 20 63 68 6f 73 65 20 | 74 68 65 20 22 46 6f 72 |e chose |the "For|
|00002010| 74 72 61 6e 22 0a 09 20 | 20 20 66 69 6c 65 20 74 |tran".. | file t|
|00002020| 79 70 65 2c 20 73 69 6e | 63 65 20 69 74 20 77 61 |ype, sin|ce it wa|
|00002030| 73 20 75 6e 75 73 65 64 | 2e 20 20 4f 74 68 65 72 |s unused|. Other|
|00002040| 73 20 63 6f 75 6c 64 20 | 62 65 20 75 73 65 64 20 |s could |be used |
|00002050| 62 75 74 0a 09 20 20 20 | 74 68 65 72 65 20 61 72 |but.. |there ar|
|00002060| 65 6e 27 74 20 6d 61 6e | 79 20 63 61 6e 64 69 64 |en't man|y candid|
|00002070| 61 74 65 73 2c 20 65 73 | 70 65 63 69 61 6c 6c 79 |ates, es|pecially|
|00002080| 20 69 66 20 79 6f 75 20 | 61 6c 72 65 61 64 79 0a | if you |already.|
|00002090| 09 20 20 20 73 75 70 70 | 6f 72 74 20 64 69 74 72 |. supp|ort ditr|
|000020a0| 6f 66 66 20 61 6e 64 2f | 6f 72 20 54 65 58 2e 20 |off and/|or TeX. |
|000020b0| 20 57 65 20 68 61 6e 64 | 6c 65 20 73 70 6f 6f 6c | We hand|le spool|
|000020c0| 69 6e 67 20 6f 66 20 4d | 61 63 20 66 69 6c 65 73 |ing of M|ac files|
|000020d0| 0a 09 20 20 20 77 69 74 | 68 20 61 20 73 68 65 6c |.. wit|h a shel|
|000020e0| 6c 20 73 63 72 69 70 74 | 20 77 68 69 63 68 20 73 |l script| which s|
|000020f0| 69 6d 70 6c 79 20 63 61 | 6c 6c 73 20 6c 70 72 20 |imply ca|lls lpr |
|00002100| 61 6e 64 20 61 64 64 73 | 20 74 68 65 20 2d 66 0a |and adds| the -f.|
|00002110| 09 20 20 20 66 69 6c 65 | 20 74 79 70 65 20 66 6c |. file| type fl|
|00002120| 61 67 2e 0a 0a 20 20 20 | 54 68 65 20 64 69 73 63 |ag... |The disc|
|00002130| 75 73 73 69 6f 6e 20 62 | 65 6c 6f 77 20 61 73 73 |ussion b|elow ass|
|00002140| 75 6d 65 73 20 74 68 65 | 20 72 65 61 64 65 72 20 |umes the| reader |
|00002150| 69 73 20 66 61 6d 69 6c | 69 61 72 20 77 69 74 68 |is famil|iar with|
|00002160| 20 68 6f 77 20 74 68 65 | 20 0a 42 65 72 6b 65 6c | how the| .Berkel|
|00002170| 65 79 20 73 70 6f 6f 6c | 65 72 20 77 6f 72 6b 73 |ey spool|er works|
|00002180| 20 61 6e 64 20 6b 6e 6f | 77 73 20 68 6f 77 20 74 | and kno|ws how t|
|00002190| 6f 20 73 65 74 75 70 20 | 66 69 6c 74 65 72 73 2e |o setup |filters.|
|000021a0| 20 20 54 68 65 20 70 65 | 72 73 6f 6e 0a 77 68 6f | The pe|rson.who|
|000021b0| 20 64 6f 65 73 20 74 68 | 69 73 20 6d 75 73 74 20 | does th|is must |
|000021c0| 68 61 76 65 20 73 75 70 | 65 72 2d 75 73 65 72 20 |have sup|er-user |
|000021d0| 61 63 63 65 73 73 20 61 | 6e 79 77 61 79 2e 20 20 |access a|nyway. |
|000021e0| 4f 6e 63 65 20 61 67 61 | 69 6e 20 74 68 65 72 65 |Once aga|in there|
|000021f0| 0a 61 72 65 20 74 77 6f | 20 77 61 79 73 20 74 6f |.are two| ways to|
|00002200| 20 67 6f 20 61 62 6f 75 | 74 20 73 65 74 74 69 6e | go abou|t settin|
|00002210| 67 20 75 70 20 79 6f 75 | 72 20 73 70 6f 6f 6c 65 |g up you|r spoole|
|00002220| 72 20 74 6f 20 68 61 6e | 64 6c 65 20 4d 61 63 20 |r to han|dle Mac |
|00002230| 50 6f 73 74 53 63 72 69 | 70 74 0a 66 69 6c 65 73 |PostScri|pt.files|
|00002240| 3a 0a 09 31 29 20 49 66 | 20 79 6f 75 27 72 65 20 |:..1) If| you're |
|00002250| 75 73 69 6e 67 20 74 68 | 65 20 73 74 61 6e 64 61 |using th|e standa|
|00002260| 72 64 20 54 72 61 6e 73 | 63 72 69 70 74 20 73 65 |rd Trans|cript se|
|00002270| 74 75 70 2c 20 75 73 65 | 20 74 68 65 20 70 73 6d |tup, use| the psm|
|00002280| 61 63 0a 09 20 20 20 73 | 68 65 6c 6c 20 73 63 72 |ac.. s|hell scr|
|00002290| 69 70 74 20 69 6e 63 6c | 75 64 65 64 2e 20 20 50 |ipt incl|uded. P|
|000022a0| 75 74 20 69 74 20 69 6e | 20 2f 75 73 72 2f 6c 6f |ut it in| /usr/lo|
|000022b0| 63 61 6c 2f 6c 69 62 2c | 20 6f 72 20 77 68 65 72 |cal/lib,| or wher|
|000022c0| 65 0a 09 20 20 20 79 6f | 75 20 6b 65 65 70 20 74 |e.. yo|u keep t|
|000022d0| 68 65 20 72 65 73 74 20 | 6f 66 20 79 6f 75 72 20 |he rest |of your |
|000022e0| 66 69 6c 74 65 72 73 2c | 20 61 6e 64 20 70 75 74 |filters,| and put|
|000022f0| 20 69 74 73 20 6e 61 6d | 65 20 69 6e 20 74 68 65 | its nam|e in the|
|00002300| 0a 09 20 20 20 70 72 69 | 6e 74 63 61 70 20 73 6c |.. pri|ntcap sl|
|00002310| 6f 74 20 66 6f 72 20 77 | 68 69 63 68 65 76 65 72 |ot for w|hichever|
|00002320| 20 66 69 6c 65 20 74 79 | 70 65 20 79 6f 75 20 75 | file ty|pe you u|
|00002330| 73 65 20 28 74 68 65 20 | 72 66 20 66 69 65 6c 64 |se (the |rf field|
|00002340| 0a 09 20 20 20 69 73 20 | 66 6f 72 20 74 68 65 20 |.. is |for the |
|00002350| 46 6f 72 74 72 61 6e 20 | 74 79 70 65 2c 20 67 6f |Fortran |type, go|
|00002360| 20 66 69 67 75 72 65 29 | 2e 0a 09 32 29 20 49 66 | figure)|...2) If|
|00002370| 20 79 6f 75 27 72 65 20 | 75 73 69 6e 67 20 61 6e | you're |using an|
|00002380| 20 49 6d 61 67 65 6e 2d | 73 74 79 6c 65 20 73 68 | Imagen-|style sh|
|00002390| 65 6c 6c 20 73 63 72 69 | 70 74 20 77 68 69 63 68 |ell scri|pt which|
|000023a0| 20 69 73 20 63 61 6c 6c | 65 64 0a 09 20 20 20 62 | is call|ed.. b|
|000023b0| 79 20 73 65 76 65 72 61 | 6c 20 64 69 66 66 65 72 |y severa|l differ|
|000023c0| 65 6e 74 20 6e 61 6d 65 | 73 2c 20 75 73 65 20 6f |ent name|s, use o|
|000023d0| 75 72 20 70 73 66 69 6c | 74 65 72 20 28 69 6e 63 |ur psfil|ter (inc|
|000023e0| 6c 75 64 65 64 29 20 61 | 73 0a 09 20 20 20 61 20 |luded) a|s.. a |
|000023f0| 67 75 69 64 65 20 61 6e | 64 20 69 6e 63 6c 75 64 |guide an|d includ|
|00002400| 65 20 61 20 63 61 73 65 | 20 66 6f 72 20 68 61 6e |e a case| for han|
|00002410| 64 6c 69 6e 67 20 4d 61 | 63 20 66 69 6c 65 73 20 |dling Ma|c files |
|00002420| 61 73 20 73 68 6f 77 6e | 2e 0a 09 20 20 20 54 68 |as shown|... Th|
|00002430| 69 73 20 61 70 70 72 6f | 61 63 68 20 69 73 20 6b |is appro|ach is k|
|00002440| 69 6e 64 20 6f 66 20 6f | 64 64 2c 20 61 6e 64 20 |ind of o|dd, and |
|00002450| 63 61 6e 20 6c 65 61 64 | 20 74 6f 20 76 61 72 69 |can lead| to vari|
|00002460| 6f 75 73 20 70 72 6f 62 | 6c 65 6d 73 2c 0a 09 20 |ous prob|lems,.. |
|00002470| 20 20 62 75 74 20 61 6c | 6c 6f 77 73 20 6d 6f 72 | but al|lows mor|
|00002480| 65 20 66 6c 65 78 69 62 | 69 6c 69 74 79 20 61 6e |e flexib|ility an|
|00002490| 64 20 65 6e 61 62 6c 65 | 73 20 79 6f 75 20 74 6f |d enable|s you to|
|000024a0| 20 64 6f 20 74 68 69 6e | 67 73 0a 09 20 20 20 6c | do thin|gs.. l|
|000024b0| 69 6b 65 20 63 6f 6d 70 | 6c 65 78 20 70 69 70 65 |ike comp|lex pipe|
|000024c0| 6c 69 6e 65 73 20 61 6e | 64 20 70 72 6f 62 6c 65 |lines an|d proble|
|000024d0| 6d 20 6e 6f 74 69 66 69 | 63 61 74 69 6f 6e 2e 20 |m notifi|cation. |
|000024e0| 20 50 73 66 69 6c 74 65 | 72 0a 09 20 20 20 69 73 | Psfilte|r.. is|
|000024f0| 20 77 68 61 74 20 77 65 | 20 75 73 65 20 61 74 20 | what we| use at |
|00002500| 55 54 2c 20 79 6f 75 20 | 6d 61 79 20 6f 72 20 6d |UT, you |may or m|
|00002510| 61 79 20 6e 6f 74 20 66 | 69 6e 64 20 69 74 20 75 |ay not f|ind it u|
|00002520| 73 65 66 75 6c 2e 0a 09 | 20 20 20 49 6e 20 61 6e |seful...| In an|
|00002530| 79 20 63 61 73 65 20 79 | 6f 75 20 63 61 6e 20 69 |y case y|ou can i|
|00002540| 67 6e 6f 72 65 20 74 68 | 65 20 6c 6f 63 61 6c 20 |gnore th|e local |
|00002550| 68 61 63 6b 73 20 66 6f | 72 20 64 65 61 6c 69 6e |hacks fo|r dealin|
|00002560| 67 0a 09 20 20 20 77 69 | 74 68 20 4c 61 73 65 72 |g.. wi|th Laser|
|00002570| 57 72 69 74 65 72 73 20 | 6f 6e 20 42 72 69 64 67 |Writers |on Bridg|
|00002580| 65 73 20 28 75 6e 6c 65 | 73 73 20 79 6f 75 20 68 |es (unle|ss you h|
|00002590| 61 76 65 20 73 6f 6d 65 | 2c 20 49 20 6d 69 67 68 |ave some|, I migh|
|000025a0| 74 0a 09 20 20 20 62 65 | 20 61 62 6c 65 20 74 6f |t.. be| able to|
|000025b0| 20 68 65 6c 70 29 2e 0a | 0a 20 20 20 54 68 65 20 | help)..|. The |
|000025c0| 70 72 6f 67 72 61 6d 20 | 6d 61 63 66 69 6c 74 65 |program |macfilte|
|000025d0| 72 2c 20 6e 61 6d 65 64 | 20 69 6e 20 62 6f 74 68 |r, named| in both|
|000025e0| 20 70 73 6d 61 63 20 61 | 6e 64 20 70 73 66 69 6c | psmac a|nd psfil|
|000025f0| 74 65 72 2c 20 64 6f 65 | 73 20 6e 6f 74 68 69 6e |ter, doe|s nothin|
|00002600| 67 0a 6d 6f 72 65 20 74 | 68 61 6e 20 63 6f 6e 76 |g.more t|han conv|
|00002610| 65 72 74 20 61 6e 79 20 | 6e 6f 6e 2d 70 72 69 6e |ert any |non-prin|
|00002620| 74 61 62 6c 65 20 63 68 | 61 72 61 63 74 65 72 73 |table ch|aracters|
|00002630| 20 69 6e 20 74 68 65 20 | 64 61 74 61 20 73 74 72 | in the |data str|
|00002640| 65 61 6d 20 74 6f 20 0a | 74 68 65 20 6f 63 74 61 |eam to .|the octa|
|00002650| 6c 20 65 71 75 69 76 61 | 6c 65 6e 74 2e 20 20 41 |l equiva|lent. A|
|00002660| 70 70 6c 65 20 62 72 6f | 6b 65 20 74 68 65 20 72 |pple bro|ke the r|
|00002670| 75 6c 65 73 20 61 6e 64 | 20 75 73 65 64 20 6e 6f |ules and| used no|
|00002680| 6e 2d 70 72 69 6e 74 61 | 62 6c 65 0a 63 68 61 72 |n-printa|ble.char|
|00002690| 61 63 74 65 72 73 20 28 | 73 70 65 63 69 66 69 63 |acters (|specific|
|000026a0| 61 6c 6c 79 20 6e 6f 6e | 2d 61 73 63 69 69 20 3e |ally non|-ascii >|
|000026b0| 20 31 32 38 29 20 66 6f | 72 20 63 65 72 74 61 69 | 128) fo|r certai|
|000026c0| 6e 20 73 79 6d 62 6f 6c | 73 2e 20 20 54 68 65 73 |n symbol|s. Thes|
|000026d0| 65 0a 64 6f 6e 27 74 20 | 73 75 72 76 69 63 65 20 |e.don't |survice |
|000026e0| 74 68 65 20 75 6e 69 78 | 20 64 65 76 69 63 65 20 |the unix| device |
|000026f0| 64 72 69 76 65 72 20 28 | 74 68 65 79 20 6c 6f 73 |driver (|they los|
|00002700| 65 20 74 68 65 20 68 69 | 67 68 20 62 69 74 29 20 |e the hi|gh bit) |
|00002710| 61 6e 64 20 72 61 77 0a | 6d 6f 64 65 20 69 73 20 |and raw.|mode is |
|00002720| 6e 6f 74 20 70 6f 73 73 | 69 62 6c 65 20 62 65 63 |not poss|ible bec|
|00002730| 61 75 73 65 20 74 68 65 | 20 4c 57 20 6e 65 65 64 |ause the| LW need|
|00002740| 73 20 74 6f 20 75 73 65 | 20 66 6c 6f 77 20 63 6f |s to use| flow co|
|00002750| 6e 74 72 6f 6c 2e 0a 0a | 20 20 20 48 65 72 65 20 |ntrol...| Here |
|00002760| 69 73 20 74 68 65 20 2f | 65 74 63 2f 70 72 69 6e |is the /|etc/prin|
|00002770| 74 63 61 70 20 77 65 20 | 75 73 65 20 68 65 72 65 |tcap we |use here|
|00002780| 20 61 74 20 55 54 3a 0a | 23 0a 23 0a 23 20 41 70 | at UT:.|#.#.# Ap|
|00002790| 70 6c 65 20 4c 61 73 65 | 72 57 72 69 74 65 72 0a |ple Lase|rWriter.|
|000027a0| 23 20 73 62 20 4d 55 53 | 54 20 62 65 20 73 70 65 |# sb MUS|T be spe|
|000027b0| 63 69 66 69 65 64 2c 20 | 70 73 6f 66 20 64 65 70 |cified, |psof dep|
|000027c0| 65 6e 64 73 20 6f 6e 20 | 69 74 2e 20 20 70 73 6f |ends on |it. pso|
|000027d0| 66 20 70 72 69 6e 74 73 | 20 6a 6f 62 20 68 65 61 |f prints| job hea|
|000027e0| 64 65 72 20 70 61 67 65 | 2e 0a 23 20 72 77 20 6d |der page|..# rw m|
|000027f0| 75 73 74 20 62 65 20 73 | 70 65 63 69 66 69 65 64 |ust be s|pecified|
|00002800| 2c 20 70 72 69 6e 74 65 | 72 20 74 61 6c 6b 73 20 |, printe|r talks |
|00002810| 62 61 63 6b 20 74 6f 20 | 70 73 69 66 0a 0a 6c 77 |back to |psif..lw|
|00002820| 2d 67 65 6e 65 72 69 63 | 7c 41 70 70 6c 65 20 4c |-generic||Apple L|
|00002830| 61 73 65 72 77 72 69 74 | 65 72 3a 5c 0a 09 3a 72 |aserwrit|er:\..:r|
|00002840| 77 3a 62 72 23 39 36 30 | 30 3a 66 66 3d 3a 74 72 |w:br#960|0:ff=:tr|
|00002850| 3d 5e 44 3a 73 63 3a 73 | 62 3a 5c 0a 09 3a 6f 66 |=^D:sc:s|b:\..:of|
|00002860| 3d 2f 75 73 72 2f 6c 6f | 63 61 6c 2f 6c 69 62 2f |=/usr/lo|cal/lib/|
|00002870| 70 73 6f 66 3a 5c 0a 09 | 3a 64 66 3d 2f 75 73 72 |psof:\..|:df=/usr|
|00002880| 2f 6c 6f 63 61 6c 2f 6c | 69 62 2f 70 73 64 76 69 |/local/l|ib/psdvi|
|00002890| 3a 5c 0a 09 3a 6e 66 3d | 2f 75 73 72 2f 6c 6f 63 |:\..:nf=|/usr/loc|
|000028a0| 61 6c 2f 6c 69 62 2f 70 | 73 64 69 74 72 6f 66 66 |al/lib/p|sditroff|
|000028b0| 3a 5c 0a 09 3a 74 66 3d | 2f 75 73 72 2f 6c 6f 63 |:\..:tf=|/usr/loc|
|000028c0| 61 6c 2f 6c 69 62 2f 70 | 73 63 61 74 3a 5c 0a 09 |al/lib/p|scat:\..|
|000028d0| 3a 69 66 3d 2f 75 73 72 | 2f 6c 6f 63 61 6c 2f 6c |:if=/usr|/local/l|
|000028e0| 69 62 2f 70 73 61 73 63 | 3a 5c 0a 09 3a 63 66 3d |ib/psasc|:\..:cf=|
|000028f0| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 6c 69 62 2f 70 |/usr/loc|al/lib/p|
|00002900| 73 62 61 64 3a 5c 0a 09 | 3a 67 66 3d 2f 75 73 72 |sbad:\..|:gf=/usr|
|00002910| 2f 6c 6f 63 61 6c 2f 6c | 69 62 2f 70 73 62 61 64 |/local/l|ib/psbad|
|00002920| 3a 5c 0a 09 3a 76 66 3d | 2f 75 73 72 2f 6c 6f 63 |:\..:vf=|/usr/loc|
|00002930| 61 6c 2f 6c 69 62 2f 70 | 73 62 61 64 3a 5c 0a 09 |al/lib/p|sbad:\..|
|00002940| 3a 72 66 3d 2f 75 73 72 | 2f 6c 6f 63 61 6c 2f 6c |:rf=/usr|/local/l|
|00002950| 69 62 2f 70 73 6d 61 63 | 3a 0a 0a 4c 61 7a 61 72 |ib/psmac|:..Lazar|
|00002960| 75 73 7c 6c 77 31 7c 6c | 77 7c 6c 61 7a 61 72 75 |us|lw1|l|w|lazaru|
|00002970| 73 7c 4c 57 20 63 6f 6e | 6e 65 63 74 65 64 20 74 |s|LW con|nected t|
|00002980| 6f 20 69 6d 34 75 3a 5c | 0a 09 3a 6c 70 3d 2f 64 |o im4u:\|..:lp=/d|
|00002990| 65 76 2f 6c 77 3a 73 64 | 3d 2f 75 73 72 2f 73 70 |ev/lw:sd|=/usr/sp|
|000029a0| 6f 6f 6c 2f 6c 77 31 3a | 5c 0a 09 3a 78 73 23 30 |ool/lw1:|\..:xs#0|
|000029b0| 34 30 34 30 30 3a 66 63 | 23 30 37 30 3a 66 73 23 |40400:fc|#070:fs#|
|000029c0| 30 30 33 30 32 3a 5c 0a | 09 3a 6c 66 3d 2f 75 73 |00302:\.|.:lf=/us|
|000029d0| 72 2f 61 64 6d 2f 6c 6f | 67 2d 6c 77 31 3a 5c 0a |r/adm/lo|g-lw1:\.|
|000029e0| 09 3a 61 66 3d 2f 75 73 | 72 2f 61 64 6d 2f 6c 77 |.:af=/us|r/adm/lw|
|000029f0| 2e 61 63 63 74 2f 6c 77 | 31 3a 5c 0a 09 3a 74 63 |.acct/lw|1:\..:tc|
|00002a00| 3d 6c 77 2d 67 65 6e 65 | 72 69 63 3a 0a 2d 2d 2d |=lw-gene|ric:.---|
|00002a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a20| 0a 52 6f 6e 20 48 69 74 | 63 68 65 6e 73 09 55 6e |.Ron Hit|chens.Un|
|00002a30| 69 76 65 72 73 69 74 79 | 20 6f 66 20 54 65 78 61 |iversity| of Texa|
|00002a40| 73 20 61 74 20 41 75 73 | 74 69 6e 2c 20 43 6f 6d |s at Aus|tin, Com|
|00002a50| 70 75 74 65 72 20 53 63 | 69 65 6e 63 65 0a 68 69 |puter Sc|ience.hi|
|00002a60| 74 63 68 65 6e 73 40 75 | 6f 2e 63 73 2e 75 74 65 |tchens@u|o.cs.ute|
|00002a70| 78 61 73 2e 65 64 75 0a | 68 69 74 63 68 65 6e 73 |xas.edu.|hitchens|
|00002a80| 40 73 61 6c 6c 79 2e 55 | 55 43 50 0a 40 2f 2f 45 |@sally.U|UCP.@//E|
|00002a90| 2a 4f 2a 46 20 52 45 41 | 44 4d 45 2e 53 50 4f 4f |*O*F REA|DME.SPOO|
|00002aa0| 4c 2f 2f 0a 63 68 6d 6f | 64 20 75 3d 72 77 2c 67 |L//.chmo|d u=rw,g|
|00002ab0| 3d 72 77 2c 6f 3d 72 20 | 52 45 41 44 4d 45 2e 53 |=rw,o=r |README.S|
|00002ac0| 50 4f 4f 4c 0a 20 0a 65 | 63 68 6f 20 78 20 2d 20 |POOL. .e|cho x - |
|00002ad0| 70 61 69 6e 74 70 73 2e | 63 0a 73 65 64 20 27 73 |paintps.|c.sed 's|
|00002ae0| 2f 5e 40 2f 2f 27 20 3e | 20 22 70 61 69 6e 74 70 |/^@//' >| "paintp|
|00002af0| 73 2e 63 22 20 3c 3c 27 | 40 2f 2f 45 2a 4f 2a 46 |s.c" <<'|@//E*O*F|
|00002b00| 20 70 61 69 6e 74 70 73 | 2e 63 2f 2f 27 0a 23 69 | paintps|.c//'.#i|
|00002b10| 66 6e 64 65 66 20 6c 69 | 6e 74 0a 73 74 61 74 69 |fndef li|nt.stati|
|00002b20| 63 09 63 68 61 72 20 73 | 63 63 73 69 64 5b 5d 20 |c.char s|ccsid[] |
|00002b30| 3d 20 22 40 28 23 29 70 | 61 69 6e 74 70 73 2e 63 |= "@(#)p|aintps.c|
|00002b40| 09 31 2e 37 20 36 2f 31 | 31 2f 38 36 20 28 55 54 |.1.7 6/1|1/86 (UT|
|00002b50| 29 22 3b 0a 23 65 6e 64 | 69 66 0a 0a 2f 2a 0a 20 |)";.#end|if../*. |
|00002b60| 2a 20 70 61 69 6e 74 70 | 73 20 2d 2d 20 43 6f 6e |* paintp|s -- Con|
|00002b70| 76 65 72 74 20 4d 61 63 | 50 61 69 6e 74 20 64 6f |vert Mac|Paint do|
|00002b80| 63 75 6d 65 6e 74 20 74 | 6f 20 50 6f 73 74 53 63 |cument t|o PostSc|
|00002b90| 72 69 70 74 20 64 6f 63 | 75 6d 65 6e 74 20 0a 20 |ript doc|ument . |
|00002ba0| 2a 20 0a 20 2a 20 42 72 | 69 61 6e 20 48 2e 20 50 |* . * Br|ian H. P|
|00002bb0| 6f 77 65 6c 6c 2c 20 55 | 6e 69 76 65 72 73 69 74 |owell, U|niversit|
|00002bc0| 79 20 6f 66 20 54 65 78 | 61 73 20 61 74 20 41 75 |y of Tex|as at Au|
|00002bd0| 73 74 69 6e 0a 20 2a 09 | 62 72 69 61 6e 40 73 61 |stin. *.|brian@sa|
|00002be0| 6c 6c 79 2e 55 54 45 58 | 41 53 2e 45 44 55 0a 20 |lly.UTEX|AS.EDU. |
|00002bf0| 2a 09 62 72 69 61 6e 40 | 75 74 2d 73 61 6c 6c 79 |*.brian@|ut-sally|
|00002c00| 2e 55 55 43 50 0a 20 2a | 09 43 53 2e 50 6f 77 65 |.UUCP. *|.CS.Powe|
|00002c10| 6c 6c 40 72 32 30 2e 55 | 54 45 58 41 53 2e 45 44 |ll@r20.U|TEXAS.ED|
|00002c20| 55 0a 20 2a 0a 20 2a 20 | 54 68 69 73 20 70 72 6f |U. *. * |This pro|
|00002c30| 67 72 61 6d 20 6d 61 79 | 20 62 65 20 75 73 65 64 |gram may| be used|
|00002c40| 20 62 75 74 20 6e 6f 74 | 20 73 6f 6c 64 20 77 69 | but not| sold wi|
|00002c50| 74 68 6f 75 74 20 70 65 | 72 6d 69 73 73 69 6f 6e |thout pe|rmission|
|00002c60| 2e 0a 20 2a 0a 20 2a 20 | 4d 6f 64 69 66 69 63 61 |.. *. * |Modifica|
|00002c70| 74 69 6f 6e 20 48 69 73 | 74 6f 72 79 0a 20 2a 20 |tion His|tory. * |
|00002c80| 09 42 48 50 09 37 2f 32 | 35 2f 38 35 09 43 72 65 |.BHP.7/2|5/85.Cre|
|00002c90| 61 74 65 64 2e 0a 20 2a | 09 42 48 50 09 37 2f 33 |ated.. *|.BHP.7/3|
|00002ca0| 31 2f 38 35 09 4f 70 74 | 69 6d 69 7a 65 64 20 6f |1/85.Opt|imized o|
|00002cb0| 75 74 70 75 74 20 72 6f | 75 74 69 6e 65 73 20 66 |utput ro|utines f|
|00002cc0| 6f 72 20 65 78 65 63 75 | 74 69 6f 6e 20 73 70 65 |or execu|tion spe|
|00002cd0| 65 64 2e 0a 20 2a 09 42 | 48 50 09 34 2f 32 32 2f |ed.. *.B|HP.4/22/|
|00002ce0| 38 36 09 41 64 64 65 64 | 20 2d 50 20 6f 70 74 69 |86.Added| -P opti|
|00002cf0| 6f 6e 2c 20 65 78 74 72 | 61 63 74 65 64 20 73 70 |on, extr|acted sp|
|00002d00| 6f 6f 6c 20 63 6f 6d 6d | 61 6e 64 20 74 6f 20 4d |ool comm|and to M|
|00002d10| 61 6b 65 66 69 6c 65 2e | 0a 20 2a 09 42 48 50 09 |akefile.|. *.BHP.|
|00002d20| 36 2f 20 33 2f 38 36 20 | 46 69 78 65 64 20 62 75 |6/ 3/86 |Fixed bu|
|00002d30| 67 20 63 61 75 73 69 6e | 67 20 28 72 61 72 65 29 |g causin|g (rare)|
|00002d40| 20 73 6d 61 6c 6c 20 77 | 68 69 74 65 20 67 61 70 | small w|hite gap|
|00002d50| 73 20 62 65 74 77 65 65 | 6e 0a 20 2a 09 09 09 62 |s betwee|n. *...b|
|00002d60| 69 74 6d 61 70 73 2e 0a | 20 2a 2f 0a 0a 23 69 6e |itmaps..| */..#in|
|00002d70| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 0a |clude <s|tdio.h>.|
|00002d80| 23 69 6e 63 6c 75 64 65 | 20 3c 63 74 79 70 65 2e |#include| <ctype.|
|00002d90| 68 3e 0a 0a 23 64 65 66 | 69 6e 65 20 46 41 4c 53 |h>..#def|ine FALS|
|00002da0| 45 20 30 0a 23 64 65 66 | 69 6e 65 20 54 52 55 45 |E 0.#def|ine TRUE|
|00002db0| 20 20 28 2d 31 29 0a 0a | 23 64 65 66 69 6e 65 20 | (-1)..|#define |
|00002dc0| 4d 41 43 50 41 49 4e 54 | 5f 48 44 52 53 49 5a 45 |MACPAINT|_HDRSIZE|
|00002dd0| 09 35 31 32 0a 23 64 65 | 66 69 6e 65 20 4d 41 43 |.512.#de|fine MAC|
|00002de0| 52 41 53 54 45 52 5f 42 | 49 54 57 49 44 54 48 09 |RASTER_B|ITWIDTH.|
|00002df0| 35 37 36 0a 23 64 65 66 | 69 6e 65 09 4d 41 43 50 |576.#def|ine.MACP|
|00002e00| 41 49 4e 54 5f 42 49 54 | 48 45 49 47 48 54 09 37 |AINT_BIT|HEIGHT.7|
|00002e10| 32 30 0a 0a 09 09 09 2f | 2a 20 44 45 46 41 55 4c |20...../|* DEFAUL|
|00002e20| 54 20 4f 50 54 49 4f 4e | 53 20 2a 2f 0a 69 6e 74 |T OPTION|S */.int|
|00002e30| 20 73 6d 6f 6f 74 68 20 | 3d 20 54 52 55 45 3b 09 | smooth |= TRUE;.|
|00002e40| 09 2f 2a 20 73 6d 6f 6f | 74 68 69 6e 67 20 65 6e |./* smoo|thing en|
|00002e50| 61 62 6c 65 64 20 2a 2f | 0a 69 6e 74 20 63 6f 70 |abled */|.int cop|
|00002e60| 69 65 73 20 3d 20 31 3b | 09 09 09 2f 2a 20 6f 6e |ies = 1;|.../* on|
|00002e70| 65 20 63 6f 70 79 20 6f | 66 20 74 68 65 20 70 61 |e copy o|f the pa|
|00002e80| 69 6e 74 69 6e 67 20 2a | 2f 0a 63 68 61 72 20 2a |inting *|/.char *|
|00002e90| 70 72 69 6e 74 65 72 6e | 61 6d 65 20 3d 20 4e 55 |printern|ame = NU|
|00002ea0| 4c 4c 3b 09 2f 2a 20 64 | 65 66 61 75 6c 74 20 70 |LL;./* d|efault p|
|00002eb0| 72 69 6e 74 65 72 20 2a | 2f 0a 0a 63 68 61 72 20 |rinter *|/..char |
|00002ec0| 68 65 78 62 75 66 66 65 | 72 5b 4d 41 43 50 41 49 |hexbuffe|r[MACPAI|
|00002ed0| 4e 54 5f 42 49 54 48 45 | 49 47 48 54 5d 5b 4d 41 |NT_BITHE|IGHT][MA|
|00002ee0| 43 52 41 53 54 45 52 5f | 42 49 54 57 49 44 54 48 |CRASTER_|BITWIDTH|
|00002ef0| 2f 38 5d 3b 0a 69 6e 74 | 20 62 6c 61 6e 6b 5b 4d |/8];.int| blank[M|
|00002f00| 41 43 50 41 49 4e 54 5f | 42 49 54 48 45 49 47 48 |ACPAINT_|BITHEIGH|
|00002f10| 54 20 2b 20 34 5d 3b 09 | 2f 2a 20 77 65 20 6e 65 |T + 4];.|/* we ne|
|00002f20| 65 64 20 74 68 65 20 66 | 6f 75 72 20 65 78 74 72 |ed the f|our extr|
|00002f30| 61 20 62 6c 61 6e 6b 20 | 2a 2f 0a 09 09 09 09 09 |a blank |*/......|
|00002f40| 2f 2a 20 6c 69 6e 65 73 | 20 61 73 20 66 69 6c 6c |/* lines| as fill|
|00002f50| 65 72 20 66 6f 72 20 6f | 75 74 70 75 74 20 2a 2f |er for o|utput */|
|00002f60| 0a 0a 63 68 61 72 20 75 | 73 61 67 65 5b 5d 20 3d |..char u|sage[] =|
|00002f70| 20 22 70 61 69 6e 74 70 | 73 20 5b 2d 64 5d 20 5b | "paintp|s [-d] [|
|00002f80| 2d 23 3c 6e 3e 5d 20 5b | 2d 50 3c 70 72 69 6e 74 |-#<n>] [|-P<print|
|00002f90| 65 72 3e 5d 20 66 69 6c | 65 22 3b 0a 0a 6d 61 69 |er>] fil|e";..mai|
|00002fa0| 6e 28 61 63 2c 20 61 76 | 29 0a 63 68 61 72 20 2a |n(ac, av|).char *|
|00002fb0| 2a 61 76 3b 0a 7b 0a 20 | 20 20 61 63 2d 2d 3b 20 |*av;.{. | ac--; |
|00002fc0| 61 76 2b 2b 3b 0a 20 20 | 20 77 68 69 6c 65 20 28 |av++;. | while (|
|00002fd0| 61 63 20 26 26 20 28 61 | 76 5b 30 5d 5b 30 5d 20 |ac && (a|v[0][0] |
|00002fe0| 3d 3d 20 27 2d 27 29 20 | 26 26 20 61 76 5b 30 5d |== '-') |&& av[0]|
|00002ff0| 5b 31 5d 29 20 7b 0a 20 | 20 20 20 20 20 73 77 69 |[1]) {. | swi|
|00003000| 74 63 68 20 28 61 76 5b | 30 5d 5b 31 5d 29 20 7b |tch (av[|0][1]) {|
|00003010| 0a 09 20 63 61 73 65 20 | 27 64 27 3a 09 09 09 2f |.. case |'d':.../|
|00003020| 2a 20 22 64 72 61 66 74 | 22 20 6f 70 74 69 6f 6e |* "draft|" option|
|00003030| 20 2a 2f 0a 09 20 20 20 | 20 73 6d 6f 6f 74 68 20 | */.. | smooth |
|00003040| 3d 20 46 41 4c 53 45 3b | 0a 09 20 20 20 20 62 72 |= FALSE;|.. br|
|00003050| 65 61 6b 3b 0a 0a 09 20 | 63 61 73 65 20 27 23 27 |eak;... |case '#'|
|00003060| 3a 09 09 09 2f 2a 20 6e | 75 6d 62 65 72 20 6f 66 |:.../* n|umber of|
|00003070| 20 63 6f 70 69 65 73 20 | 2a 2f 0a 09 20 20 20 20 | copies |*/.. |
|00003080| 63 6f 70 69 65 73 20 3d | 20 61 74 6f 69 20 28 26 |copies =| atoi (&|
|00003090| 61 76 5b 30 5d 5b 32 5d | 29 3b 0a 09 20 20 20 20 |av[0][2]|);.. |
|000030a0| 62 72 65 61 6b 3b 0a 0a | 09 20 63 61 73 65 20 27 |break;..|. case '|
|000030b0| 50 27 3a 09 09 09 2f 2a | 20 70 72 69 6e 74 65 72 |P':.../*| printer|
|000030c0| 20 6e 61 6d 65 20 2a 2f | 0a 09 20 20 20 20 70 72 | name */|.. pr|
|000030d0| 69 6e 74 65 72 6e 61 6d | 65 20 3d 20 61 76 5b 30 |internam|e = av[0|
|000030e0| 5d 3b 0a 09 20 20 20 20 | 62 72 65 61 6b 3b 0a 0a |];.. |break;..|
|000030f0| 09 20 64 65 66 61 75 6c | 74 3a 0a 09 20 20 20 20 |. defaul|t:.. |
|00003100| 67 6f 74 6f 20 62 61 64 | 5f 75 73 61 67 65 3b 0a |goto bad|_usage;.|
|00003110| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 61 63 | }.| ac|
|00003120| 2d 2d 3b 20 61 76 2b 2b | 3b 0a 20 20 20 7d 0a 20 |--; av++|;. }. |
|00003130| 20 20 6f 70 65 6e 5f 6f | 75 74 70 75 74 28 29 3b | open_o|utput();|
|00003140| 09 09 2f 2a 20 61 6c 73 | 6f 20 73 74 61 72 74 73 |../* als|o starts|
|00003150| 20 73 70 6f 6f 6c 69 6e | 67 20 74 6f 20 74 68 65 | spoolin|g to the|
|00003160| 20 73 70 6f 6f 6c 20 63 | 6d 64 2e 20 2a 2f 0a 20 | spool c|md. */. |
|00003170| 20 20 70 61 69 6e 74 66 | 69 6c 74 65 72 28 61 76 | paintf|ilter(av|
|00003180| 5b 30 5d 29 3b 0a 20 20 | 20 65 78 69 74 28 30 29 |[0]);. | exit(0)|
|00003190| 3b 0a 0a 62 61 64 5f 75 | 73 61 67 65 3a 0a 20 20 |;..bad_u|sage:. |
|000031a0| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|000031b0| 20 22 75 73 61 67 65 3a | 20 25 73 5c 6e 22 2c 20 | "usage:| %s\n", |
|000031c0| 75 73 61 67 65 29 3b 0a | 20 20 20 65 78 69 74 28 |usage);.| exit(|
|000031d0| 31 29 3b 0a 7d 0a 0a 2f | 2a 20 63 6f 6e 76 65 72 |1);.}../|* conver|
|000031e0| 74 20 66 72 6f 6d 20 4d | 61 63 50 61 69 6e 74 20 |t from M|acPaint |
|000031f0| 74 6f 20 50 6f 73 74 53 | 63 72 69 70 74 20 2a 2f |to PostS|cript */|
|00003200| 0a 0a 70 61 69 6e 74 66 | 69 6c 74 65 72 28 6e 61 |..paintf|ilter(na|
|00003210| 6d 65 29 0a 63 68 61 72 | 20 2a 6e 61 6d 65 3b 0a |me).char| *name;.|
|00003220| 7b 0a 20 20 20 72 65 67 | 69 73 74 65 72 20 69 6e |{. reg|ister in|
|00003230| 74 20 78 2c 20 79 3b 0a | 20 20 20 46 49 4c 45 20 |t x, y;.| FILE |
|00003240| 2a 66 70 3b 0a 20 20 20 | 72 65 67 69 73 74 65 72 |*fp;. |register|
|00003250| 20 69 6e 74 20 63 3b 0a | 20 20 20 69 6e 74 20 62 | int c;.| int b|
|00003260| 6c 61 6e 6b 6c 69 6e 65 | 3b 0a 0a 20 20 20 66 70 |lankline|;.. fp|
|00003270| 20 3d 20 66 6f 70 65 6e | 28 6e 61 6d 65 2c 20 22 | = fopen|(name, "|
|00003280| 72 22 29 3b 09 09 2f 2a | 20 6f 70 65 6e 20 74 68 |r");../*| open th|
|00003290| 65 20 4d 61 63 50 61 69 | 6e 74 20 66 69 6c 65 2e |e MacPai|nt file.|
|000032a0| 20 2a 2f 0a 20 20 20 69 | 66 20 28 66 70 20 3d 3d | */. i|f (fp ==|
|000032b0| 20 4e 55 4c 4c 29 20 7b | 0a 20 20 20 20 20 20 70 | NULL) {|. p|
|000032c0| 65 72 72 6f 72 28 6e 61 | 6d 65 29 3b 0a 20 20 20 |error(na|me);. |
|000032d0| 20 20 20 72 65 74 75 72 | 6e 3b 0a 20 20 20 7d 0a | retur|n;. }.|
|000032e0| 0a 20 20 20 28 76 6f 69 | 64 29 20 66 73 65 65 6b |. (voi|d) fseek|
|000032f0| 28 66 70 2c 20 28 6c 6f | 6e 67 29 4d 41 43 50 41 |(fp, (lo|ng)MACPA|
|00003300| 49 4e 54 5f 48 44 52 53 | 49 5a 45 2c 20 30 29 3b |INT_HDRS|IZE, 0);|
|00003310| 09 2f 2a 20 73 6b 69 70 | 20 74 68 65 20 4d 61 63 |./* skip| the Mac|
|00003320| 50 61 69 6e 74 20 70 61 | 74 74 65 72 6e 73 20 2a |Paint pa|tterns *|
|00003330| 2f 0a 0a 20 20 20 62 65 | 67 69 6e 5f 69 6d 61 67 |/.. be|gin_imag|
|00003340| 65 28 29 3b 09 09 09 09 | 2f 2a 20 70 72 69 6e 74 |e();....|/* print|
|00003350| 20 70 6f 73 74 73 63 72 | 69 70 74 20 68 65 61 64 | postscr|ipt head|
|00003360| 65 72 20 2a 2f 0a 0a 2f | 2a 20 20 57 65 20 73 6b |er */../|* We sk|
|00003370| 69 70 20 68 6f 72 69 7a | 6f 6e 74 61 6c 20 77 68 |ip horiz|ontal wh|
|00003380| 69 74 65 73 70 61 63 65 | 2e 20 20 22 62 6c 61 6e |itespace|. "blan|
|00003390| 6b 6c 69 6e 65 22 20 69 | 73 20 75 73 65 64 20 74 |kline" i|s used t|
|000033a0| 6f 20 64 69 61 67 6e 6f | 73 65 20 74 68 69 73 0a |o diagno|se this.|
|000033b0| 20 20 20 20 66 6f 72 20 | 74 68 65 20 63 75 72 72 | for |the curr|
|000033c0| 65 6e 74 20 6c 69 6e 65 | 2e 20 20 54 68 65 20 62 |ent line|. The b|
|000033d0| 6f 6f 6c 65 61 6e 20 61 | 72 72 61 79 20 22 62 6c |oolean a|rray "bl|
|000033e0| 61 6e 6b 5b 79 5d 22 20 | 73 68 6f 77 73 20 77 68 |ank[y]" |shows wh|
|000033f0| 69 63 68 20 6c 69 6e 65 | 73 0a 20 20 20 20 69 6e |ich line|s. in|
|00003400| 20 74 68 65 20 65 6e 74 | 69 72 65 20 70 61 69 6e | the ent|ire pain|
|00003410| 74 69 6e 67 20 61 72 65 | 20 62 6c 61 6e 6b 2e 20 |ting are| blank. |
|00003420| 2a 2f 0a 0a 20 20 20 66 | 6f 72 20 28 79 20 3d 20 |*/.. f|or (y = |
|00003430| 30 3b 20 79 20 3c 20 4d | 41 43 50 41 49 4e 54 5f |0; y < M|ACPAINT_|
|00003440| 42 49 54 48 45 49 47 48 | 54 3b 20 79 2b 2b 29 20 |BITHEIGH|T; y++) |
|00003450| 7b 0a 09 09 09 09 2f 2a | 20 66 6f 72 20 65 61 63 |{...../*| for eac|
|00003460| 68 20 70 69 78 65 6c 20 | 72 6f 77 2e 2e 2e 20 2a |h pixel |row... *|
|00003470| 2f 0a 20 20 20 20 20 20 | 62 6c 61 6e 6b 6c 69 6e |/. |blanklin|
|00003480| 65 20 3d 20 54 52 55 45 | 3b 0a 20 20 20 20 20 20 |e = TRUE|;. |
|00003490| 66 6f 72 20 28 78 20 3d | 20 30 3b 20 78 20 3c 20 |for (x =| 0; x < |
|000034a0| 4d 41 43 52 41 53 54 45 | 52 5f 42 49 54 57 49 44 |MACRASTE|R_BITWID|
|000034b0| 54 48 2f 38 3b 20 78 2b | 2b 29 20 7b 0a 0a 20 20 |TH/8; x+|+) {.. |
|000034c0| 20 20 20 20 20 20 20 69 | 66 20 28 28 63 20 3d 20 | i|f ((c = |
|000034d0| 67 65 74 62 69 74 73 28 | 66 70 29 29 20 3d 3d 20 |getbits(|fp)) == |
|000034e0| 45 4f 46 29 20 7b 0a 20 | 20 20 20 20 20 20 20 20 |EOF) {. | |
|000034f0| 20 20 20 66 70 72 69 6e | 74 66 28 73 74 64 65 72 | fprin|tf(stder|
|00003500| 72 2c 20 22 55 6e 65 78 | 70 65 63 74 65 64 20 45 |r, "Unex|pected E|
|00003510| 4f 46 2c 20 73 74 6f 70 | 70 65 64 2e 5c 6e 22 29 |OF, stop|ped.\n")|
|00003520| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 66 6f |;. | fo|
|00003530| 72 20 28 20 3b 20 79 20 | 3c 20 4d 41 43 50 41 49 |r ( ; y |< MACPAI|
|00003540| 4e 54 5f 42 49 54 48 45 | 49 47 48 54 3b 20 79 2b |NT_BITHE|IGHT; y+|
|00003550| 2b 29 09 09 2f 2a 20 4d | 61 72 6b 20 74 68 65 20 |+)../* M|ark the |
|00003560| 2a 2f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/. | |
|00003570| 20 20 62 6c 61 6e 6b 5b | 79 5d 20 3d 20 54 52 55 | blank[|y] = TRU|
|00003580| 45 3b 09 09 09 09 2f 2a | 20 72 65 73 74 20 6f 66 |E;..../*| rest of|
|00003590| 20 74 68 65 20 70 61 67 | 65 20 2a 2f 0a 20 20 20 | the pag|e */. |
|000035a0| 20 20 20 20 20 20 20 20 | 20 62 6c 61 6e 6b 6c 69 | | blankli|
|000035b0| 6e 65 20 3d 20 54 52 55 | 45 3b 09 09 20 20 20 20 |ne = TRU|E;.. |
|000035c0| 20 20 20 2f 2a 20 62 6c | 61 6e 6b 2c 20 70 72 69 | /* bl|ank, pri|
|000035d0| 6e 74 20 69 74 20 61 6e | 64 20 71 75 69 74 2e 20 |nt it an|d quit. |
|000035e0| 2a 2f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 62 |*/. | b|
|000035f0| 72 65 61 6b 3b 0a 0a 20 | 20 20 20 20 20 20 20 20 |reak;.. | |
|00003600| 7d 20 65 6c 73 65 20 7b | 0a 20 20 20 20 20 20 20 |} else {|. |
|00003610| 20 20 20 20 20 68 65 78 | 62 75 66 66 65 72 5b 79 | hex|buffer[y|
|00003620| 5d 5b 78 5d 20 3d 20 28 | 63 68 61 72 29 20 63 3b |][x] = (|char) c;|
|00003630| 09 20 20 2f 2a 20 65 6c | 73 65 20 72 65 63 6f 72 |. /* el|se recor|
|00003640| 64 20 74 68 65 20 63 68 | 61 72 61 63 74 65 72 20 |d the ch|aracter |
|00003650| 61 6e 64 20 2a 2f 0a 20 | 20 20 20 20 20 20 20 20 |and */. | |
|00003660| 20 20 20 69 66 20 28 63 | 29 09 09 09 20 20 2f 2a | if (c|)... /*|
|00003670| 20 6d 61 72 6b 20 74 68 | 65 20 6c 69 6e 65 20 61 | mark th|e line a|
|00003680| 73 20 6e 6f 6e 2d 62 6c | 61 6e 6b 2e 20 2a 2f 0a |s non-bl|ank. */.|
|00003690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 62 | | b|
|000036a0| 6c 61 6e 6b 6c 69 6e 65 | 20 3d 20 46 41 4c 53 45 |lankline| = FALSE|
|000036b0| 3b 0a 20 20 20 20 20 20 | 20 20 20 7d 0a 20 20 20 |;. | }. |
|000036c0| 20 20 20 7d 0a 20 20 20 | 20 20 20 62 6c 61 6e 6b | }. | blank|
|000036d0| 5b 79 5d 20 3d 20 62 6c | 61 6e 6b 6c 69 6e 65 3b |[y] = bl|ankline;|
|000036e0| 0a 20 20 20 7d 0a 20 20 | 20 62 6c 61 6e 6b 5b 79 |. }. | blank[y|
|000036f0| 2b 2b 5d 20 3d 20 54 52 | 55 45 3b 09 09 2f 2a 20 |++] = TR|UE;../* |
|00003700| 70 75 74 20 66 6f 75 72 | 20 62 6c 61 6e 6b 20 6c |put four| blank l|
|00003710| 69 6e 65 73 20 61 74 20 | 65 6e 64 20 2a 2f 0a 20 |ines at |end */. |
|00003720| 20 20 62 6c 61 6e 6b 5b | 79 2b 2b 5d 20 3d 20 54 | blank[|y++] = T|
|00003730| 52 55 45 3b 09 09 2f 2a | 20 28 49 20 74 68 69 6e |RUE;../*| (I thin|
|00003740| 6b 20 74 68 69 73 20 69 | 73 20 6e 65 65 64 65 64 |k this i|s needed|
|00003750| 20 66 6f 72 20 73 6d 6f | 6f 74 68 69 6e 67 2e 29 | for smo|othing.)|
|00003760| 20 2a 2f 0a 20 20 20 62 | 6c 61 6e 6b 5b 79 2b 2b | */. b|lank[y++|
|00003770| 5d 20 3d 20 54 52 55 45 | 3b 0a 20 20 20 62 6c 61 |] = TRUE|;. bla|
|00003780| 6e 6b 5b 79 5d 20 3d 20 | 54 52 55 45 3b 0a 20 20 |nk[y] = |TRUE;. |
|00003790| 20 64 75 6d 70 5f 62 75 | 66 66 65 72 28 68 65 78 | dump_bu|ffer(hex|
|000037a0| 62 75 66 66 65 72 2c 20 | 62 6c 61 6e 6b 29 3b 09 |buffer, |blank);.|
|000037b0| 2f 2a 20 70 72 69 6e 74 | 20 74 68 65 20 62 75 66 |/* print| the buf|
|000037c0| 66 65 72 20 28 65 6e 74 | 69 72 65 20 70 61 67 65 |fer (ent|ire page|
|000037d0| 29 20 2a 2f 0a 0a 20 20 | 20 65 6e 64 5f 69 6d 61 |) */.. | end_ima|
|000037e0| 67 28 63 6f 70 69 65 73 | 29 3b 09 09 2f 2a 20 70 |g(copies|);../* p|
|000037f0| 72 69 6e 74 20 74 68 65 | 20 70 6f 73 74 73 63 72 |rint the| postscr|
|00003800| 69 70 74 20 74 72 61 69 | 6c 65 72 2e 20 2a 2f 0a |ipt trai|ler. */.|
|00003810| 20 20 20 28 76 6f 69 64 | 29 20 66 63 6c 6f 73 65 | (void|) fclose|
|00003820| 28 66 70 29 3b 09 09 2f | 2a 20 63 6c 6f 73 65 20 |(fp);../|* close |
|00003830| 74 68 65 20 66 69 6c 65 | 2e 20 2a 2f 0a 7d 0a 0a |the file|. */.}..|
|00003840| 2f 2a 20 6d 61 63 70 61 | 69 6e 74 20 69 6e 70 75 |/* macpa|int inpu|
|00003850| 74 20 72 6f 75 74 69 6e | 65 73 20 2a 2f 0a 0a 67 |t routin|es */..g|
|00003860| 65 74 62 69 74 73 28 66 | 70 29 09 09 2f 2a 20 74 |etbits(f|p)../* t|
|00003870| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 73 63 61 72 |his rout|ine scar|
|00003880| 66 65 64 20 66 72 6f 6d | 20 70 61 69 6e 74 69 6d |fed from| paintim|
|00003890| 70 2e 20 2a 2f 0a 46 49 | 4c 45 20 2a 66 70 3b 0a |p. */.FI|LE *fp;.|
|000038a0| 7b 0a 2f 2a 20 54 68 69 | 73 20 72 6f 75 74 69 6e |{./* Thi|s routin|
|000038b0| 65 20 65 78 70 61 6e 64 | 73 20 74 68 65 20 50 61 |e expand|s the Pa|
|000038c0| 63 6b 42 69 74 73 20 65 | 6e 63 6f 64 65 64 20 4d |ckBits e|ncoded M|
|000038d0| 61 63 50 61 69 6e 74 20 | 66 69 6c 65 2c 0a 20 20 |acPaint |file,. |
|000038e0| 20 64 65 6c 69 76 65 72 | 69 6e 67 20 6f 6e 65 20 | deliver|ing one |
|000038f0| 62 79 74 65 20 70 65 72 | 20 63 61 6c 6c 2e 0a 2a |byte per| call..*|
|00003900| 2f 0a 0a 20 20 20 73 74 | 61 74 69 63 20 69 6e 74 |/.. st|atic int|
|00003910| 20 63 6f 75 6e 74 2c 20 | 72 65 70 2c 20 63 68 72 | count, |rep, chr|
|00003920| 3b 0a 20 20 20 69 6e 74 | 20 63 3b 0a 0a 20 20 20 |;. int| c;.. |
|00003930| 69 66 20 28 72 65 70 29 | 20 7b 09 09 2f 2a 20 69 |if (rep)| {../* i|
|00003940| 66 20 77 65 20 61 72 65 | 20 72 65 70 65 61 74 69 |f we are| repeati|
|00003950| 6e 67 20 61 20 70 72 65 | 76 69 6f 75 73 20 63 68 |ng a pre|vious ch|
|00003960| 61 72 61 63 74 65 72 2c | 20 2a 2f 0a 20 20 20 20 |aracter,| */. |
|00003970| 20 20 72 65 70 2d 2d 3b | 09 09 2f 2a 20 72 65 64 | rep--;|../* red|
|00003980| 75 63 65 20 74 68 65 20 | 72 65 70 65 61 74 20 63 |uce the |repeat c|
|00003990| 6f 75 6e 74 20 61 6e 64 | 20 72 65 74 75 72 6e 20 |ount and| return |
|000039a0| 74 68 65 20 63 68 61 72 | 2e 20 2a 2f 0a 20 20 20 |the char|. */. |
|000039b0| 20 20 20 72 65 74 75 72 | 6e 20 63 68 72 3b 0a 20 | retur|n chr;. |
|000039c0| 20 20 7d 0a 20 20 20 69 | 66 20 28 63 6f 75 6e 74 | }. i|f (count|
|000039d0| 29 20 7b 09 09 2f 2a 20 | 69 66 20 77 65 20 61 72 |) {../* |if we ar|
|000039e0| 65 20 69 6e 20 61 6e 20 | 75 6e 72 65 70 65 61 74 |e in an |unrepeat|
|000039f0| 65 64 20 73 65 63 74 69 | 6f 6e 2c 20 72 65 64 75 |ed secti|on, redu|
|00003a00| 63 65 20 2a 2f 0a 20 20 | 20 20 20 20 63 6f 75 6e |ce */. | coun|
|00003a10| 74 2d 2d 3b 09 09 2f 2a | 20 74 68 65 20 63 6f 75 |t--;../*| the cou|
|00003a20| 6e 74 20 61 6e 64 20 72 | 65 74 75 72 6e 20 6e 65 |nt and r|eturn ne|
|00003a30| 78 74 20 63 68 61 72 20 | 66 72 6f 6d 20 74 68 65 |xt char |from the|
|00003a40| 20 66 69 6c 65 2e 20 2a | 2f 0a 20 20 20 20 20 20 | file. *|/. |
|00003a50| 72 65 74 75 72 6e 20 67 | 65 74 63 28 66 70 29 3b |return g|etc(fp);|
|00003a60| 0a 20 20 20 7d 0a 20 20 | 20 63 20 3d 20 67 65 74 |. }. | c = get|
|00003a70| 63 28 66 70 29 3b 09 2f | 2a 20 6f 74 68 65 72 77 |c(fp);./|* otherw|
|00003a80| 69 73 65 2c 20 67 65 74 | 20 74 68 65 20 6e 65 78 |ise, get| the nex|
|00003a90| 74 20 72 65 70 65 61 74 | 20 63 6f 75 6e 74 2e 20 |t repeat| count. |
|00003aa0| 20 2a 2f 0a 20 20 20 69 | 66 20 28 63 20 26 20 30 | */. i|f (c & 0|
|00003ab0| 78 38 30 29 20 7b 09 2f | 2a 20 69 66 20 6e 65 67 |x80) {./|* if neg|
|00003ac0| 61 74 69 76 65 2c 20 72 | 65 70 65 61 74 20 74 68 |ative, r|epeat th|
|00003ad0| 65 20 6e 65 78 74 20 2a | 2f 0a 20 20 20 20 20 20 |e next *|/. |
|00003ae0| 72 65 70 20 3d 20 30 78 | 31 30 30 20 2d 20 63 3b |rep = 0x|100 - c;|
|00003af0| 09 2f 2a 20 62 79 74 65 | 20 28 32 27 73 20 63 6f |./* byte| (2's co|
|00003b00| 6d 70 28 63 29 2b 31 29 | 20 74 69 6d 65 73 2e 20 |mp(c)+1)| times. |
|00003b10| 2a 2f 0a 20 20 20 20 20 | 20 63 68 72 20 3d 20 67 |*/. | chr = g|
|00003b20| 65 74 63 28 66 70 29 3b | 09 09 2f 2a 20 74 68 65 |etc(fp);|../* the|
|00003b30| 20 63 68 61 72 61 63 74 | 65 72 20 74 6f 20 72 65 | charact|er to re|
|00003b40| 70 65 61 74 20 2a 2f 0a | 20 20 20 20 20 20 72 65 |peat */.| re|
|00003b50| 74 75 72 6e 20 63 68 72 | 3b 0a 20 20 20 7d 0a 20 |turn chr|;. }. |
|00003b60| 20 20 65 6c 73 65 20 7b | 09 09 2f 2a 20 69 66 20 | else {|../* if |
|00003b70| 72 65 70 65 61 74 20 63 | 6f 75 6e 74 20 69 73 20 |repeat c|ount is |
|00003b80| 70 6f 73 69 74 69 76 65 | 2c 20 6e 65 78 74 20 22 |positive|, next "|
|00003b90| 63 6f 75 6e 74 22 20 62 | 79 74 65 73 20 2a 2f 0a |count" b|ytes */.|
|00003ba0| 20 20 20 20 20 20 63 6f | 75 6e 74 20 3d 20 63 3b | co|unt = c;|
|00003bb0| 20 20 20 09 2f 2a 20 61 | 72 65 20 75 6e 65 6e 63 | ./* a|re unenc|
|00003bc0| 6f 64 65 64 2e 20 20 2a | 2f 0a 20 20 20 20 20 20 |oded. *|/. |
|00003bd0| 72 65 74 75 72 6e 20 67 | 65 74 63 28 66 70 29 3b |return g|etc(fp);|
|00003be0| 0a 20 20 20 7d 0a 7d 0a | 0a 2f 2a 20 50 6f 73 74 |. }.}.|./* Post|
|00003bf0| 53 63 72 69 70 74 20 6f | 75 74 70 75 74 20 72 6f |Script o|utput ro|
|00003c00| 75 74 69 6e 65 73 20 2a | 2f 0a 0a 6f 70 65 6e 5f |utines *|/..open_|
|00003c10| 6f 75 74 70 75 74 28 29 | 0a 7b 0a 20 20 20 63 68 |output()|.{. ch|
|00003c20| 61 72 20 6c 70 72 20 5b | 36 34 5d 3b 0a 20 20 20 |ar lpr [|64];. |
|00003c30| 46 49 4c 45 20 2a 70 6f | 70 65 6e 28 29 3b 0a 0a |FILE *po|pen();..|
|00003c40| 2f 2a 20 69 66 20 73 74 | 64 6f 75 74 20 69 73 20 |/* if st|dout is |
|00003c50| 67 6f 69 6e 67 20 74 6f | 20 74 68 65 20 74 65 72 |going to| the ter|
|00003c60| 6d 69 6e 61 6c 2c 20 63 | 61 6c 6c 20 74 68 65 20 |minal, c|all the |
|00003c70| 73 70 6f 6f 6c 20 63 6f | 6d 6d 61 6e 64 20 74 6f |spool co|mmand to|
|00003c80| 20 73 70 6f 6f 6c 20 74 | 68 65 0a 20 20 20 6f 75 | spool t|he. ou|
|00003c90| 74 70 75 74 2c 20 6f 74 | 68 65 72 77 69 73 65 20 |tput, ot|herwise |
|00003ca0| 61 73 73 75 6d 65 20 69 | 74 27 73 20 62 65 69 6e |assume i|t's bein|
|00003cb0| 67 20 70 69 70 65 64 20 | 73 6f 6d 65 77 68 65 72 |g piped |somewher|
|00003cc0| 65 20 65 6c 73 65 0a 20 | 20 20 6f 72 20 64 69 72 |e else. | or dir|
|00003cd0| 65 63 74 65 64 20 69 6e | 74 6f 20 61 20 66 69 6c |ected in|to a fil|
|00003ce0| 65 2e 0a 2a 2f 0a 20 20 | 20 69 66 20 28 69 73 61 |e..*/. | if (isa|
|00003cf0| 74 74 79 20 28 66 69 6c | 65 6e 6f 20 28 73 74 64 |tty (fil|eno (std|
|00003d00| 6f 75 74 29 29 29 0a 20 | 20 20 7b 0a 20 20 20 20 |out))). | {. |
|00003d10| 20 20 28 76 6f 69 64 29 | 20 73 70 72 69 6e 74 66 | (void)| sprintf|
|00003d20| 20 28 6c 70 72 2c 20 22 | 25 73 20 25 73 22 2c 20 | (lpr, "|%s %s", |
|00003d30| 53 50 4f 4f 4c 43 4d 44 | 2c 0a 09 09 09 70 72 69 |SPOOLCMD|,....pri|
|00003d40| 6e 74 65 72 6e 61 6d 65 | 20 3f 20 70 72 69 6e 74 |ntername| ? print|
|00003d50| 65 72 6e 61 6d 65 20 3a | 20 22 22 29 3b 0a 09 09 |ername :| "");...|
|00003d60| 2f 2a 20 69 6e 63 6c 75 | 64 65 20 70 72 69 6e 74 |/* inclu|de print|
|00003d70| 65 72 20 6e 61 6d 65 20 | 69 66 20 69 74 20 77 61 |er name |if it wa|
|00003d80| 73 20 73 70 65 63 69 66 | 69 65 64 2e 20 20 2a 2f |s specif|ied. */|
|00003d90| 0a 0a 09 2f 2a 20 64 69 | 73 63 6f 6e 6e 65 63 74 |.../* di|sconnect|
|00003da0| 20 73 74 64 6f 75 74 20 | 66 72 6f 6d 20 74 68 65 | stdout |from the|
|00003db0| 20 74 74 79 20 61 6e 64 | 20 70 69 70 65 20 69 74 | tty and| pipe it|
|00003dc0| 20 74 6f 20 6c 70 72 20 | 2a 2f 0a 20 20 20 20 20 | to lpr |*/. |
|00003dd0| 20 28 76 6f 69 64 29 20 | 66 63 6c 6f 73 65 20 28 | (void) |fclose (|
|00003de0| 73 74 64 6f 75 74 29 3b | 0a 20 20 20 20 20 20 69 |stdout);|. i|
|00003df0| 66 20 28 70 6f 70 65 6e | 20 28 6c 70 72 2c 20 22 |f (popen| (lpr, "|
|00003e00| 77 22 29 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0a 20 |w") == N|ULL) {. |
|00003e10| 20 20 20 20 20 20 20 20 | 66 70 72 69 6e 74 66 28 | |fprintf(|
|00003e20| 73 74 64 65 72 72 2c 20 | 22 25 73 20 66 61 69 6c |stderr, |"%s fail|
|00003e30| 65 64 2c 20 67 69 76 69 | 6e 67 20 75 70 2e 5c 6e |ed, givi|ng up.\n|
|00003e40| 22 2c 20 6c 70 72 29 3b | 0a 20 20 20 20 20 20 20 |", lpr);|. |
|00003e50| 20 20 65 78 69 74 28 32 | 29 3b 0a 20 20 20 20 20 | exit(2|);. |
|00003e60| 20 7d 0a 20 20 20 20 20 | 20 66 70 72 69 6e 74 66 | }. | fprintf|
|00003e70| 28 73 74 64 65 72 72 2c | 20 22 53 70 6f 6f 6c 69 |(stderr,| "Spooli|
|00003e80| 6e 67 20 74 6f 20 27 25 | 73 27 2e 5c 6e 22 2c 20 |ng to '%|s'.\n", |
|00003e90| 6c 70 72 29 3b 0a 20 20 | 20 7d 0a 0a 7d 0a 0a 62 |lpr);. | }..}..b|
|00003ea0| 65 67 69 6e 5f 69 6d 61 | 67 65 28 29 09 09 2f 2a |egin_ima|ge()../*|
|00003eb0| 20 70 72 69 6e 74 20 74 | 68 65 20 70 6f 73 74 73 | print t|he posts|
|00003ec0| 63 72 69 70 74 20 68 65 | 61 64 65 72 2e 20 2a 2f |cript he|ader. */|
|00003ed0| 0a 7b 0a 20 20 20 70 72 | 69 6e 74 66 28 22 25 25 |.{. pr|intf("%%|
|00003ee0| 21 5c 6e 22 29 3b 09 09 | 2f 2a 20 54 72 61 6e 53 |!\n");..|/* TranS|
|00003ef0| 63 72 69 70 74 20 50 6f | 73 74 53 63 72 69 70 74 |cript Po|stScript|
|00003f00| 20 66 6c 61 67 20 22 25 | 21 22 20 2a 2f 0a 20 20 | flag "%|!" */. |
|00003f10| 20 70 72 69 6e 74 66 28 | 22 6d 64 20 62 65 67 69 | printf(|"md begi|
|00003f20| 6e 5c 6e 22 29 3b 09 2f | 2a 20 73 74 61 6e 64 61 |n\n");./|* standa|
|00003f30| 72 64 20 61 70 70 6c 65 | 20 68 65 61 64 65 72 20 |rd apple| header |
|00003f40| 2a 2f 0a 20 20 20 70 72 | 69 6e 74 66 28 22 31 33 |*/. pr|intf("13|
|00003f50| 32 30 20 6f 64 5c 6e 22 | 29 3b 0a 20 20 20 70 72 |20 od\n"|);. pr|
|00003f60| 69 6e 74 66 28 22 28 3b | 20 75 73 65 72 3a 20 29 |intf("(;| user: )|
|00003f70| 6a 6e 5c 6e 22 29 3b 0a | 20 20 20 70 72 69 6e 74 |jn\n");.| print|
|00003f80| 66 28 22 25 25 25 25 45 | 6e 64 50 72 6f 6c 6f 67 |f("%%%%E|ndProlog|
|00003f90| 5c 6e 22 29 3b 0a 20 20 | 20 70 72 69 6e 74 66 28 |\n");. | printf(|
|00003fa0| 22 25 25 25 25 50 61 67 | 65 3a 20 3f 20 3f 5c 6e |"%%%%Pag|e: ? ?\n|
|00003fb0| 22 29 3b 0a 20 20 20 70 | 72 69 6e 74 66 28 22 6f |");. p|rintf("o|
|00003fc0| 70 5c 6e 22 29 3b 0a 20 | 20 20 70 72 69 6e 74 66 |p\n");. | printf|
|00003fd0| 28 22 30 20 30 20 6d 6f | 76 65 74 6f 5c 6e 22 29 |("0 0 mo|veto\n")|
|00003fe0| 3b 0a 7d 0a 0a 2f 2a 20 | 54 68 65 20 72 65 61 73 |;.}../* |The reas|
|00003ff0| 6f 6e 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |on the f|ollowing|
|00004000| 20 72 6f 75 74 69 6e 65 | 20 69 73 6e 27 74 20 63 | routine| isn't c|
|00004010| 61 6c 6c 65 64 20 22 65 | 6e 64 5f 69 6d 61 67 65 |alled "e|nd_image|
|00004020| 22 20 69 73 20 62 65 63 | 61 75 73 65 20 2a 2f 0a |" is bec|ause */.|
|00004030| 2f 2a 20 6f 66 20 61 20 | 62 75 67 20 69 6e 20 74 |/* of a |bug in t|
|00004040| 68 65 20 53 65 71 75 65 | 6e 74 20 43 20 63 6f 6d |he Seque|nt C com|
|00004050| 70 69 6c 65 72 2e 20 20 | 2a 2f 0a 65 6e 64 5f 69 |piler. |*/.end_i|
|00004060| 6d 61 67 28 63 6f 70 69 | 65 73 29 09 2f 2a 20 70 |mag(copi|es)./* p|
|00004070| 72 69 6e 74 20 74 68 65 | 20 70 6f 73 74 73 63 72 |rint the| postscr|
|00004080| 69 70 74 20 74 72 61 69 | 6c 65 72 2e 20 2a 2f 0a |ipt trai|ler. */.|
|00004090| 69 6e 74 20 63 6f 70 69 | 65 73 3b 09 09 2f 2a 20 |int copi|es;../* |
|000040a0| 63 6f 70 69 65 73 20 3d | 3d 20 6e 75 6d 62 65 72 |copies =|= number|
|000040b0| 20 6f 66 20 63 6f 70 69 | 65 73 20 74 6f 20 70 72 | of copi|es to pr|
|000040c0| 69 6e 74 20 2a 2f 0a 7b | 0a 20 20 20 70 72 69 6e |int */.{|. prin|
|000040d0| 74 66 28 22 25 64 20 70 | 61 67 65 5c 6e 22 2c 20 |tf("%d p|age\n", |
|000040e0| 63 6f 70 69 65 73 20 2d | 20 31 29 3b 09 2f 2a 20 |copies -| 1);./* |
|000040f0| 22 70 61 67 65 22 20 74 | 61 6b 65 73 20 23 20 6f |"page" t|akes # o|
|00004100| 66 20 70 61 67 65 73 20 | 74 6f 20 2a 2f 0a 20 20 |f pages |to */. |
|00004110| 20 70 72 69 6e 74 66 28 | 22 63 70 5c 6e 22 29 3b | printf(|"cp\n");|
|00004120| 20 20 20 20 20 20 20 20 | 20 20 20 09 09 2f 2a 20 | | ../* |
|00004130| 70 72 69 6e 74 20 6d 69 | 6e 75 73 20 31 20 2a 2f |print mi|nus 1 */|
|00004140| 0a 20 20 20 70 72 69 6e | 74 66 28 22 25 25 25 25 |. prin|tf("%%%%|
|00004150| 54 72 61 69 6c 65 72 5c | 6e 22 29 3b 0a 20 20 20 |Trailer\|n");. |
|00004160| 70 72 69 6e 74 66 28 22 | 65 6e 64 5c 6e 22 29 3b |printf("|end\n");|
|00004170| 0a 7d 0a 0a 23 64 65 66 | 69 6e 65 20 4f 55 54 42 |.}..#def|ine OUTB|
|00004180| 55 46 5f 53 49 5a 45 09 | 32 38 0a 23 64 65 66 69 |UF_SIZE.|28.#defi|
|00004190| 6e 65 20 58 53 43 41 4c | 45 09 09 35 37 38 0a 23 |ne XSCAL|E..578.#|
|000041a0| 64 65 66 69 6e 65 20 58 | 4c 4f 43 09 09 30 0a 23 |define X|LOC..0.#|
|000041b0| 64 65 66 69 6e 65 20 52 | 4f 57 42 59 54 45 53 09 |define R|OWBYTES.|
|000041c0| 37 34 0a 23 64 65 66 69 | 6e 65 20 53 52 43 4d 4f |74.#defi|ne SRCMO|
|000041d0| 44 45 09 09 31 0a 0a 09 | 2f 2a 20 4d 6f 64 75 6c |DE..1...|/* Modul|
|000041e0| 61 72 20 63 6f 64 65 20 | 70 75 72 69 73 74 73 20 |ar code |purists |
|000041f0| 63 61 6e 20 63 6c 6f 73 | 65 20 74 68 65 69 72 20 |can clos|e their |
|00004200| 65 79 65 73 20 66 6f 72 | 20 74 68 65 20 66 6f 6c |eyes for| the fol|
|00004210| 6c 6f 77 69 6e 67 20 2a | 2f 0a 09 2f 2a 20 72 6f |lowing *|/../* ro|
|00004220| 75 74 69 6e 65 2e 20 20 | 2a 2f 0a 64 75 6d 70 5f |utine. |*/.dump_|
|00004230| 62 75 66 66 65 72 28 68 | 65 78 62 75 66 66 65 72 |buffer(h|exbuffer|
|00004240| 2c 20 62 6c 61 6e 6b 29 | 0a 63 68 61 72 20 68 65 |, blank)|.char he|
|00004250| 78 62 75 66 66 65 72 5b | 4d 41 43 50 41 49 4e 54 |xbuffer[|MACPAINT|
|00004260| 5f 42 49 54 48 45 49 47 | 48 54 5d 5b 4d 41 43 52 |_BITHEIG|HT][MACR|
|00004270| 41 53 54 45 52 5f 42 49 | 54 57 49 44 54 48 2f 38 |ASTER_BI|TWIDTH/8|
|00004280| 5d 3b 0a 69 6e 74 20 62 | 6c 61 6e 6b 5b 4d 41 43 |];.int b|lank[MAC|
|00004290| 50 41 49 4e 54 5f 42 49 | 54 48 45 49 47 48 54 5d |PAINT_BI|THEIGHT]|
|000042a0| 3b 0a 20 20 20 2f 2a 20 | 68 65 78 62 75 66 66 65 |;. /* |hexbuffe|
|000042b0| 72 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 65 |r contai|ns the e|
|000042c0| 6e 74 69 72 65 20 75 6e | 65 6e 63 6f 64 65 64 20 |ntire un|encoded |
|000042d0| 4d 61 63 50 61 69 6e 74 | 20 66 69 6c 65 2e 20 2a |MacPaint| file. *|
|000042e0| 2f 0a 20 20 20 2f 2a 20 | 62 6c 61 6e 6b 20 69 73 |/. /* |blank is|
|000042f0| 20 61 20 62 6f 6f 6c 65 | 61 6e 20 61 72 72 61 79 | a boole|an array|
|00004300| 20 66 6f 72 20 65 61 63 | 68 20 72 6f 77 2e 20 20 | for eac|h row. |
|00004310| 54 52 55 45 20 6d 65 61 | 6e 73 20 74 68 65 20 68 |TRUE mea|ns the h|
|00004320| 6f 72 69 7a 6f 6e 74 61 | 6c 0a 20 20 20 20 20 20 |orizonta|l. |
|00004330| 6c 69 6e 65 20 69 73 20 | 62 6c 61 6e 6b 2e 20 2a |line is |blank. *|
|00004340| 2f 0a 7b 0a 20 20 20 69 | 6e 74 20 78 73 63 61 6c |/.{. i|nt xscal|
|00004350| 65 2c 20 79 73 63 61 6c | 65 2c 20 78 6c 6f 63 2c |e, yscal|e, xloc,|
|00004360| 20 79 6c 6f 63 2c 20 78 | 61 63 74 75 61 6c 2c 20 | yloc, x|actual, |
|00004370| 79 61 63 74 75 61 6c 3b | 0a 20 20 20 63 68 61 72 |yactual;|. char|
|00004380| 20 73 6d 6f 6f 74 68 69 | 6e 67 3b 0a 20 20 20 69 | smoothi|ng;. i|
|00004390| 6e 74 20 69 2c 20 6a 3b | 0a 20 20 20 69 6e 74 20 |nt i, j;|. int |
|000043a0| 63 75 72 6c 69 6e 65 2c | 20 74 6f 70 5f 6f 66 5f |curline,| top_of_|
|000043b0| 73 65 63 74 2c 20 62 65 | 67 69 6e 5f 6c 69 6e 65 |sect, be|gin_line|
|000043c0| 2c 20 6e 75 6d 62 6c 61 | 6e 6b 73 2c 20 6c 69 6e |, numbla|nks, lin|
|000043d0| 65 73 5f 75 73 65 64 3b | 0a 20 20 20 63 68 61 72 |es_used;|. char|
|000043e0| 20 6f 75 74 73 74 72 69 | 6e 67 5b 4d 41 43 52 41 | outstri|ng[MACRA|
|000043f0| 53 54 45 52 5f 42 49 54 | 57 49 44 54 48 2f 34 5d |STER_BIT|WIDTH/4]|
|00004400| 3b 0a 0a 20 20 20 78 73 | 63 61 6c 65 20 3d 20 58 |;.. xs|cale = X|
|00004410| 53 43 41 4c 45 3b 09 09 | 2f 2a 20 50 6f 73 74 73 |SCALE;..|/* Posts|
|00004420| 63 72 69 70 74 20 70 61 | 72 61 6d 65 74 65 72 73 |cript pa|rameters|
|00004430| 20 64 65 73 63 72 69 62 | 69 6e 67 20 74 68 65 20 | describ|ing the |
|00004440| 2a 2f 0a 20 20 20 78 6c | 6f 63 20 3d 20 58 4c 4f |*/. xl|oc = XLO|
|00004450| 43 3b 09 09 09 2f 2a 20 | 73 69 7a 65 20 6f 66 20 |C;.../* |size of |
|00004460| 74 68 65 20 69 6d 61 67 | 65 20 61 72 65 61 2e 20 |the imag|e area. |
|00004470| 20 2a 2f 0a 20 20 20 78 | 61 63 74 75 61 6c 20 3d | */. x|actual =|
|00004480| 20 58 53 43 41 4c 45 3b | 0a 20 20 20 73 6d 6f 6f | XSCALE;|. smoo|
|00004490| 74 68 69 6e 67 20 3d 20 | 73 6d 6f 6f 74 68 20 3f |thing = |smooth ?|
|000044a0| 20 27 54 27 20 3a 20 27 | 46 27 3b 0a 0a 2f 2a 20 | 'T' : '|F';../* |
|000044b0| 20 54 68 65 20 70 6f 73 | 74 73 63 72 69 70 74 20 | The pos|tscript |
|000044c0| 6f 75 74 70 75 74 20 63 | 6f 6e 73 69 73 74 73 20 |output c|onsists |
|000044d0| 6f 66 20 63 61 6c 6c 73 | 20 74 6f 20 22 64 6f 62 |of calls| to "dob|
|000044e0| 69 74 73 22 20 66 6f 72 | 20 65 61 63 68 20 67 72 |its" for| each gr|
|000044f0| 6f 75 70 20 6f 66 20 2a | 2f 0a 2f 2a 20 6e 6f 6e |oup of *|/./* non|
|00004500| 2d 62 6c 61 6e 6b 20 68 | 6f 72 69 7a 6f 6e 74 61 |-blank h|orizonta|
|00004510| 6c 20 6c 69 6e 65 73 2e | 20 20 44 75 65 20 74 6f |l lines.| Due to|
|00004520| 20 4c 61 73 65 72 57 72 | 69 74 65 72 20 6d 65 6d | LaserWr|iter mem|
|00004530| 6f 72 79 20 6c 69 6d 69 | 74 61 74 69 6f 6e 73 2c |ory limi|tations,|
|00004540| 20 20 20 20 2a 2f 0a 2f | 2a 20 6f 6e 6c 79 20 61 | */./|* only a|
|00004550| 62 6f 75 74 20 32 38 20 | 6c 69 6e 65 73 20 61 74 |bout 28 |lines at|
|00004560| 20 61 20 74 69 6d 65 20 | 63 61 6e 20 62 65 20 73 | a time |can be s|
|00004570| 65 6e 74 20 70 65 72 20 | 63 6f 6d 6d 61 6e 64 2e |ent per |command.|
|00004580| 20 20 41 6c 73 6f 2c 20 | 6c 69 6e 65 73 20 20 20 | Also, |lines |
|00004590| 20 2a 2f 0a 2f 2a 20 61 | 64 6a 61 63 65 6e 74 20 | */./* a|djacent |
|000045a0| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 73 |to the c|urrent s|
|000045b0| 65 63 74 69 6f 6e 20 6d | 75 73 74 20 62 65 20 69 |ection m|ust be i|
|000045c0| 6e 63 6c 75 64 65 64 20 | 28 70 72 65 73 75 6d 61 |ncluded |(presuma|
|000045d0| 62 6c 79 20 66 6f 72 20 | 74 68 65 20 20 20 2a 2f |bly for |the */|
|000045e0| 0a 2f 2a 20 73 6d 6f 6f | 74 68 69 6e 67 20 66 75 |./* smoo|thing fu|
|000045f0| 6e 63 74 69 6f 6e 20 74 | 6f 20 77 6f 72 6b 2e 29 |nction t|o work.)|
|00004600| 09 09 09 09 09 09 20 20 | 2a 2f 0a 0a 20 20 20 63 |...... |*/.. c|
|00004610| 75 72 6c 69 6e 65 20 3d | 20 30 3b 0a 20 20 20 74 |urline =| 0;. t|
|00004620| 6f 70 5f 6f 66 5f 73 65 | 63 74 20 3d 20 54 52 55 |op_of_se|ct = TRU|
|00004630| 45 3b 09 09 2f 2a 20 62 | 65 67 69 6e 20 61 20 22 |E;../* b|egin a "|
|00004640| 64 6f 62 69 74 73 22 20 | 63 61 6c 6c 2e 20 2a 2f |dobits" |call. */|
|00004650| 0a 0a 20 20 20 77 68 69 | 6c 65 20 28 63 75 72 6c |.. whi|le (curl|
|00004660| 69 6e 65 20 3c 20 4d 41 | 43 50 41 49 4e 54 5f 42 |ine < MA|CPAINT_B|
|00004670| 49 54 48 45 49 47 48 54 | 29 20 7b 0a 09 09 09 2f |ITHEIGHT|) {..../|
|00004680| 2a 20 66 6f 72 20 74 68 | 65 20 65 6e 74 69 72 65 |* for th|e entire|
|00004690| 20 70 69 63 74 75 72 65 | 2e 2e 2e 20 2a 2f 0a 0a | picture|... */..|
|000046a0| 2f 2a 20 20 49 66 20 61 | 20 70 72 65 76 69 6f 75 |/* If a| previou|
|000046b0| 73 20 73 65 63 74 69 6f | 6e 20 74 65 72 6d 69 6e |s sectio|n termin|
|000046c0| 61 74 65 64 20 62 65 63 | 61 75 73 65 20 6f 66 20 |ated bec|ause of |
|000046d0| 77 68 69 74 65 20 73 70 | 61 63 65 2c 20 73 6b 69 |white sp|ace, ski|
|000046e0| 70 20 74 68 65 20 2a 2f | 0a 2f 2a 20 62 6c 61 6e |p the */|./* blan|
|000046f0| 6b 20 6c 69 6e 65 73 20 | 74 68 61 74 20 70 72 65 |k lines |that pre|
|00004700| 63 65 64 65 20 74 68 65 | 20 6e 65 78 74 20 73 65 |cede the| next se|
|00004710| 63 74 69 6f 6e 2e 20 20 | 2a 2f 0a 20 20 20 20 20 |ction. |*/. |
|00004720| 20 69 66 20 28 74 6f 70 | 5f 6f 66 5f 73 65 63 74 | if (top|_of_sect|
|00004730| 29 0a 09 20 77 68 69 6c | 65 20 28 28 63 75 72 6c |).. whil|e ((curl|
|00004740| 69 6e 65 20 3c 20 4d 41 | 43 50 41 49 4e 54 5f 42 |ine < MA|CPAINT_B|
|00004750| 49 54 48 45 49 47 48 54 | 29 20 26 26 20 62 6c 61 |ITHEIGHT|) && bla|
|00004760| 6e 6b 5b 63 75 72 6c 69 | 6e 65 5d 29 0a 20 20 20 |nk[curli|ne]). |
|00004770| 20 20 20 20 20 20 20 20 | 20 63 75 72 6c 69 6e 65 | | curline|
|00004780| 2b 2b 3b 0a 0a 2f 2a 20 | 63 68 65 63 6b 20 66 6f |++;../* |check fo|
|00004790| 72 20 65 6e 64 20 6f 66 | 20 70 61 67 65 2e 20 2a |r end of| page. *|
|000047a0| 2f 0a 20 20 20 20 20 20 | 69 66 20 28 63 75 72 6c |/. |if (curl|
|000047b0| 69 6e 65 20 3e 3d 20 4d | 41 43 50 41 49 4e 54 5f |ine >= M|ACPAINT_|
|000047c0| 42 49 54 48 45 49 47 48 | 54 29 0a 20 20 20 20 20 |BITHEIGH|T). |
|000047d0| 20 20 20 20 62 72 65 61 | 6b 3b 0a 0a 20 20 20 20 | brea|k;.. |
|000047e0| 20 20 69 66 20 28 74 6f | 70 5f 6f 66 5f 73 65 63 | if (to|p_of_sec|
|000047f0| 74 29 20 7b 09 2f 2a 20 | 41 74 20 74 6f 70 20 6f |t) {./* |At top o|
|00004800| 66 20 6e 6f 6e 2d 77 68 | 69 74 65 20 73 65 63 74 |f non-wh|ite sect|
|00004810| 69 6f 6e 2c 20 69 6e 63 | 6c 75 64 65 20 2a 2f 0a |ion, inc|lude */.|
|00004820| 20 20 20 20 20 20 20 20 | 20 62 65 67 69 6e 5f 6c | | begin_l|
|00004830| 69 6e 65 20 3d 20 63 75 | 72 6c 69 6e 65 20 2d 20 |ine = cu|rline - |
|00004840| 32 3b 09 2f 2a 20 70 72 | 65 76 69 6f 75 73 20 74 |2;./* pr|evious t|
|00004850| 77 6f 20 6c 69 6e 65 73 | 3b 20 2a 2f 0a 20 20 20 |wo lines|; */. |
|00004860| 20 20 20 20 20 20 6c 69 | 6e 65 73 5f 75 73 65 64 | li|nes_used|
|00004870| 20 3d 20 32 3b 0a 20 20 | 20 20 20 20 20 20 20 74 | = 2;. | t|
|00004880| 6f 70 5f 6f 66 5f 73 65 | 63 74 20 3d 20 46 41 4c |op_of_se|ct = FAL|
|00004890| 53 45 3b 0a 20 20 20 20 | 20 20 7d 20 65 6c 73 65 |SE;. | } else|
|000048a0| 20 7b 09 09 09 2f 2a 20 | 69 66 20 63 6f 6e 74 69 | {.../* |if conti|
|000048b0| 6e 75 69 6e 67 20 61 20 | 6e 6f 6e 2d 77 68 69 74 |nuing a |non-whit|
|000048c0| 65 20 73 65 63 74 69 6f | 6e 2c 20 64 6f 6e 27 74 |e sectio|n, don't|
|000048d0| 2e 20 2a 2f 0a 20 20 20 | 20 20 20 20 20 20 62 65 |. */. | be|
|000048e0| 67 69 6e 5f 6c 69 6e 65 | 20 3d 20 63 75 72 6c 69 |gin_line| = curli|
|000048f0| 6e 65 3b 0a 20 20 20 20 | 20 20 20 20 20 6c 69 6e |ne;. | lin|
|00004900| 65 73 5f 75 73 65 64 20 | 3d 20 30 3b 0a 20 20 20 |es_used |= 0;. |
|00004910| 20 20 20 7d 0a 0a 20 20 | 20 20 20 20 6e 75 6d 62 | }.. | numb|
|00004920| 6c 61 6e 6b 73 20 3d 20 | 30 3b 09 09 2f 2a 20 63 |lanks = |0;../* c|
|00004930| 6f 6d 70 75 74 65 20 68 | 65 69 67 68 74 20 6f 66 |ompute h|eight of|
|00004940| 20 6e 6f 6e 2d 77 68 69 | 74 65 20 61 72 65 61 2e | non-whi|te area.|
|00004950| 20 2a 2f 0a 20 20 20 20 | 20 20 66 6f 72 20 28 69 | */. | for (i|
|00004960| 20 3d 20 6c 69 6e 65 73 | 5f 75 73 65 64 3b 20 69 | = lines|_used; i|
|00004970| 20 3c 20 28 4f 55 54 42 | 55 46 5f 53 49 5a 45 20 | < (OUTB|UF_SIZE |
|00004980| 2d 20 31 29 3b 20 69 2b | 2b 29 20 7b 0a 20 20 20 |- 1); i+|+) {. |
|00004990| 20 20 20 20 20 20 69 66 | 20 28 62 6c 61 6e 6b 5b | if| (blank[|
|000049a0| 63 75 72 6c 69 6e 65 2b | 2b 5d 29 0a 20 20 20 20 |curline+|+]). |
|000049b0| 20 20 20 20 20 20 20 20 | 6e 75 6d 62 6c 61 6e 6b | |numblank|
|000049c0| 73 2b 2b 3b 0a 20 20 20 | 20 20 20 20 20 20 65 6c |s++;. | el|
|000049d0| 73 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 6e |se. | n|
|000049e0| 75 6d 62 6c 61 6e 6b 73 | 20 3d 20 30 3b 20 20 20 |umblanks| = 0; |
|000049f0| 2f 2a 20 72 65 73 65 74 | 20 63 6f 75 6e 74 65 72 |/* reset| counter|
|00004a00| 20 2a 2f 0a 20 20 20 20 | 20 20 20 20 20 69 66 20 | */. | if |
|00004a10| 28 6e 75 6d 62 6c 61 6e | 6b 73 20 3e 3d 20 34 29 |(numblan|ks >= 4)|
|00004a20| 20 7b 09 2f 2a 20 54 6f | 6f 20 6d 75 63 68 20 77 | {./* To|o much w|
|00004a30| 68 69 74 65 20 73 70 61 | 63 65 3a 20 62 72 65 61 |hite spa|ce: brea|
|00004a40| 6b 20 61 6e 64 20 70 72 | 69 6e 74 20 69 74 2e 20 |k and pr|int it. |
|00004a50| 2a 2f 0a 20 20 20 20 20 | 20 09 09 09 09 2f 2a 20 |*/. | ..../* |
|00004a60| 54 68 65 20 66 6f 75 72 | 20 62 6c 61 6e 6b 73 20 |The four| blanks |
|00004a70| 61 74 20 74 68 65 20 65 | 6e 64 20 6f 66 20 74 68 |at the e|nd of th|
|00004a80| 65 20 2a 2f 0a 09 09 09 | 09 2f 2a 20 70 61 67 65 |e */....|./* page|
|00004a90| 20 77 69 6c 6c 20 73 74 | 6f 70 20 75 73 20 61 74 | will st|op us at|
|00004aa0| 20 74 68 65 20 62 6f 74 | 74 6f 6d 20 2a 2f 0a 20 | the bot|tom */. |
|00004ab0| 20 20 20 20 20 20 20 20 | 20 20 20 63 75 72 6c 69 | | curli|
|00004ac0| 6e 65 2d 2d 3b 09 09 2f | 2a 20 57 65 20 77 61 6e |ne--;../|* We wan|
|00004ad0| 74 20 63 75 72 6c 69 6e | 65 20 74 6f 20 70 6f 69 |t curlin|e to poi|
|00004ae0| 6e 74 20 2a 2f 0a 20 20 | 20 20 20 20 09 09 09 09 |nt */. | ....|
|00004af0| 2f 2a 20 74 6f 20 74 68 | 65 20 66 6f 75 72 74 68 |/* to th|e fourth|
|00004b00| 20 62 6c 61 6e 6b 20 6c | 69 6e 65 2e 20 2a 2f 0a | blank l|ine. */.|
|00004b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 72 65 61 | | brea|
|00004b20| 6b 3b 0a 20 20 20 20 20 | 20 20 20 20 7d 0a 20 20 |k;. | }. |
|00004b30| 20 20 20 20 7d 0a 20 20 | 20 20 20 20 69 66 20 28 | }. | if (|
|00004b40| 6e 75 6d 62 6c 61 6e 6b | 73 20 3e 20 30 29 09 2f |numblank|s > 0)./|
|00004b50| 2a 20 49 66 20 74 68 65 | 20 62 69 74 6d 61 70 20 |* If the| bitmap |
|00004b60| 65 6e 64 65 64 20 69 6e | 20 61 6e 79 20 77 68 69 |ended in| any whi|
|00004b70| 74 65 73 70 61 63 65 2c | 20 2a 2f 0a 09 20 74 6f |tespace,| */.. to|
|00004b80| 70 5f 6f 66 5f 73 65 63 | 74 20 3d 20 54 52 55 45 |p_of_sec|t = TRUE|
|00004b90| 3b 09 2f 2a 20 77 65 20 | 73 6b 69 70 20 69 74 20 |;./* we |skip it |
|00004ba0| 74 68 65 20 6e 65 78 74 | 20 74 69 6d 65 20 61 72 |the next| time ar|
|00004bb0| 6f 75 6e 64 2e 20 20 2a | 2f 0a 20 20 20 20 20 20 |ound. *|/. |
|00004bc0| 63 75 72 6c 69 6e 65 2b | 2b 3b 0a 20 20 20 20 20 |curline+|+;. |
|00004bd0| 20 79 61 63 74 75 61 6c | 20 3d 20 69 20 2d 20 33 | yactual| = i - 3|
|00004be0| 3b 09 09 2f 2a 20 48 65 | 69 67 68 74 20 6f 66 20 |;../* He|ight of |
|00004bf0| 63 75 72 72 65 6e 74 20 | 62 69 74 6d 61 70 20 73 |current |bitmap s|
|00004c00| 65 63 74 69 6f 6e 2e 20 | 2a 2f 0a 20 20 20 20 20 |ection. |*/. |
|00004c10| 20 79 73 63 61 6c 65 20 | 3d 20 79 61 63 74 75 61 | yscale |= yactua|
|00004c20| 6c 3b 09 09 2f 2a 20 53 | 63 61 6c 65 20 69 74 20 |l;../* S|cale it |
|00004c30| 31 20 74 6f 20 31 2e 20 | 20 2a 2f 0a 20 20 20 20 |1 to 1. | */. |
|00004c40| 20 20 79 6c 6f 63 20 3d | 20 62 65 67 69 6e 5f 6c | yloc =| begin_l|
|00004c50| 69 6e 65 20 2b 20 32 3b | 0a 0a 2f 2a 20 70 72 69 |ine + 2;|../* pri|
|00004c60| 6e 74 20 74 68 65 20 22 | 64 6f 62 69 74 73 22 20 |nt the "|dobits" |
|00004c70| 63 61 6c 6c 2e 20 2a 2f | 0a 20 20 20 20 20 20 70 |call. */|. p|
|00004c80| 72 69 6e 74 66 28 22 25 | 64 20 25 64 20 25 64 20 |rintf("%|d %d %d |
|00004c90| 25 64 20 25 64 20 25 64 | 20 25 64 20 25 63 20 25 |%d %d %d| %d %c %|
|00004ca0| 64 20 64 6f 62 69 74 73 | 5c 6e 22 2c 0a 09 09 78 |d dobits|\n",...x|
|00004cb0| 73 63 61 6c 65 2c 20 79 | 73 63 61 6c 65 2c 20 78 |scale, y|scale, x|
|00004cc0| 6c 6f 63 2c 20 79 6c 6f | 63 2c 20 52 4f 57 42 59 |loc, ylo|c, ROWBY|
|00004cd0| 54 45 53 2c 0a 09 09 78 | 61 63 74 75 61 6c 2c 20 |TES,...x|actual, |
|00004ce0| 79 61 63 74 75 61 6c 2c | 20 73 6d 6f 6f 74 68 69 |yactual,| smoothi|
|00004cf0| 6e 67 2c 20 53 52 43 4d | 4f 44 45 29 3b 0a 2f 2a |ng, SRCM|ODE);./*|
|00004d00| 20 70 72 69 6e 74 20 74 | 68 65 20 63 6f 72 72 65 | print t|he corre|
|00004d10| 73 70 6f 6e 64 69 6e 67 | 20 68 6f 72 69 7a 6f 6e |sponding| horizon|
|00004d20| 74 61 6c 20 6c 69 6e 65 | 73 2e 20 2a 2f 0a 20 20 |tal line|s. */. |
|00004d30| 20 20 20 20 66 6f 72 20 | 28 69 20 3d 20 62 65 67 | for |(i = beg|
|00004d40| 69 6e 5f 6c 69 6e 65 3b | 20 69 20 3c 20 63 75 72 |in_line;| i < cur|
|00004d50| 6c 69 6e 65 3b 20 69 2b | 2b 29 20 7b 0a 20 20 20 |line; i+|+) {. |
|00004d60| 20 20 20 20 20 20 69 66 | 20 28 28 69 20 3c 20 30 | if| ((i < 0|
|00004d70| 29 20 7c 7c 20 62 6c 61 | 6e 6b 5b 69 5d 29 0a 09 |) || bla|nk[i])..|
|00004d80| 09 09 2f 2a 20 69 66 20 | 62 6c 61 6e 6b 2c 20 70 |../* if |blank, p|
|00004d90| 72 69 6e 74 20 61 6c 6c | 20 7a 65 72 6f 73 2e 20 |rint all| zeros. |
|00004da0| 2a 2f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 66 |*/. | f|
|00004db0| 6f 72 20 28 6a 20 3d 20 | 30 3b 20 6a 3c 20 4d 41 |or (j = |0; j< MA|
|00004dc0| 43 52 41 53 54 45 52 5f | 42 49 54 57 49 44 54 48 |CRASTER_|BITWIDTH|
|00004dd0| 2f 34 3b 20 6a 2b 2b 29 | 0a 20 20 20 20 20 20 20 |/4; j++)|. |
|00004de0| 20 20 20 20 20 20 20 20 | 70 75 74 63 68 61 72 28 | |putchar(|
|00004df0| 27 30 27 29 3b 0a 20 20 | 20 20 20 20 20 20 20 65 |'0');. | e|
|00004e00| 6c 73 65 20 7b 0a 09 09 | 09 2f 2a 20 65 6c 73 65 |lse {...|./* else|
|00004e10| 20 63 6f 6e 76 65 72 74 | 20 74 6f 20 61 20 68 65 | convert| to a he|
|00004e20| 78 20 73 74 72 69 6e 67 | 20 61 6e 64 20 70 72 69 |x string| and pri|
|00004e30| 6e 74 20 69 74 2e 20 2a | 2f 0a 20 20 20 20 20 20 |nt it. *|/. |
|00004e40| 20 20 20 20 20 20 74 6f | 68 65 78 28 68 65 78 62 | to|hex(hexb|
|00004e50| 75 66 66 65 72 5b 69 5d | 2c 20 4d 41 43 52 41 53 |uffer[i]|, MACRAS|
|00004e60| 54 45 52 5f 42 49 54 57 | 49 44 54 48 2f 38 2c 0a |TER_BITW|IDTH/8,.|
|00004e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6f | | o|
|00004e80| 75 74 73 74 72 69 6e 67 | 29 3b 0a 20 20 20 20 20 |utstring|);. |
|00004e90| 20 20 20 20 20 20 20 70 | 72 69 6e 74 66 28 22 25 | p|rintf("%|
|00004ea0| 73 22 2c 20 6f 75 74 73 | 74 72 69 6e 67 29 3b 0a |s", outs|tring);.|
|00004eb0| 20 20 20 20 20 20 20 20 | 20 7d 0a 09 09 2f 2a 20 | | }.../* |
|00004ec0| 50 75 74 20 66 6f 75 72 | 20 65 78 74 72 61 20 6e |Put four| extra n|
|00004ed0| 69 62 62 6c 65 73 20 61 | 74 20 74 68 65 20 65 6e |ibbles a|t the en|
|00004ee0| 64 73 20 6f 66 20 6c 69 | 6e 65 73 2e 20 20 49 20 |ds of li|nes. I |
|00004ef0| 74 68 69 6e 6b 20 2a 2f | 0a 09 09 2f 2a 20 61 72 |think */|.../* ar|
|00004f00| 65 20 66 6f 72 20 73 6d | 6f 6f 74 68 69 6e 67 2e |e for sm|oothing.|
|00004f10| 20 20 2a 2f 0a 09 20 69 | 66 20 28 28 69 20 3d 3d | */.. i|f ((i ==|
|00004f20| 20 28 2d 32 29 29 20 7c | 7c 20 62 6c 61 6e 6b 5b | (-2)) ||| blank[|
|00004f30| 69 2b 31 5d 29 09 2f 2a | 20 49 6e 63 6c 75 64 65 |i+1])./*| Include|
|00004f40| 20 74 68 65 20 66 69 72 | 73 74 20 66 6f 75 72 20 | the fir|st four |
|00004f50| 6e 69 62 62 6c 65 73 20 | 6f 66 20 2a 2f 0a 20 20 |nibbles |of */. |
|00004f60| 20 20 20 20 20 20 20 20 | 20 20 70 72 69 6e 74 66 | | printf|
|00004f70| 28 22 30 30 30 30 5c 6e | 22 29 3b 09 09 2f 2a 20 |("0000\n|");../* |
|00004f80| 74 68 65 20 6e 65 78 74 | 20 6c 69 6e 65 2e 20 20 |the next| line. |
|00004f90| 2a 2f 0a 09 20 65 6c 73 | 65 20 7b 0a 09 20 20 20 |*/.. els|e {.. |
|00004fa0| 20 74 6f 68 65 78 28 68 | 65 78 62 75 66 66 65 72 | tohex(h|exbuffer|
|00004fb0| 5b 69 2b 31 5d 2c 20 32 | 2c 20 6f 75 74 73 74 72 |[i+1], 2|, outstr|
|00004fc0| 69 6e 67 29 3b 0a 09 20 | 20 20 20 70 72 69 6e 74 |ing);.. | print|
|00004fd0| 66 28 22 25 73 5c 6e 22 | 2c 20 6f 75 74 73 74 72 |f("%s\n"|, outstr|
|00004fe0| 69 6e 67 29 3b 0a 09 20 | 7d 0a 20 20 20 20 20 20 |ing);.. |}. |
|00004ff0| 7d 0a 20 20 20 20 20 20 | 69 66 20 28 21 74 6f 70 |}. |if (!top|
|00005000| 5f 6f 66 5f 73 65 63 74 | 29 0a 20 20 20 20 20 20 |_of_sect|). |
|00005010| 20 20 20 63 75 72 6c 69 | 6e 65 20 2d 3d 20 34 3b | curli|ne -= 4;|
|00005020| 09 09 2f 2a 20 77 65 27 | 6c 6c 20 68 61 76 65 20 |../* we'|ll have |
|00005030| 74 6f 20 6f 76 65 72 6c | 61 70 20 74 68 65 20 6e |to overl|ap the n|
|00005040| 65 78 74 20 73 65 63 74 | 69 6f 6e 20 2a 2f 0a 20 |ext sect|ion */. |
|00005050| 20 20 7d 09 09 09 09 2f | 2a 20 77 69 74 68 20 74 | }..../|* with t|
|00005060| 68 69 73 20 6f 6e 65 2c | 20 73 6f 20 62 61 63 6b |his one,| so back|
|00005070| 20 75 70 20 66 6f 75 72 | 20 6c 69 6e 65 73 2e 20 | up four| lines. |
|00005080| 2a 2f 0a 7d 0a 0a 74 6f | 68 65 78 28 68 65 78 6c |*/.}..to|hex(hexl|
|00005090| 69 6e 65 2c 20 73 69 7a | 65 2c 20 6f 75 74 73 74 |ine, siz|e, outst|
|000050a0| 72 69 6e 67 29 20 20 20 | 2f 2a 20 63 6f 6e 76 65 |ring) |/* conve|
|000050b0| 72 74 20 62 69 6e 61 72 | 79 20 62 79 74 65 73 20 |rt binar|y bytes |
|000050c0| 74 6f 20 61 20 68 65 78 | 20 73 74 72 69 6e 67 2e |to a hex| string.|
|000050d0| 20 2a 2f 0a 63 68 61 72 | 20 68 65 78 6c 69 6e 65 | */.char| hexline|
|000050e0| 5b 5d 3b 0a 69 6e 74 20 | 73 69 7a 65 3b 09 09 2f |[];.int |size;../|
|000050f0| 2a 20 6e 75 6d 62 65 72 | 20 6f 66 20 62 79 74 65 |* number| of byte|
|00005100| 73 20 74 6f 20 63 6f 6e | 76 65 72 74 2e 20 2a 2f |s to con|vert. */|
|00005110| 0a 63 68 61 72 20 6f 75 | 74 73 74 72 69 6e 67 5b |.char ou|tstring[|
|00005120| 5d 3b 0a 7b 0a 20 20 20 | 69 6e 74 20 69 2c 20 6a |];.{. |int i, j|
|00005130| 3b 0a 20 20 20 72 65 67 | 69 73 74 65 72 20 63 68 |;. reg|ister ch|
|00005140| 61 72 20 63 2c 20 63 31 | 3b 0a 0a 20 20 20 6a 20 |ar c, c1|;.. j |
|00005150| 3d 20 30 3b 0a 20 20 20 | 66 6f 72 20 28 69 20 3d |= 0;. |for (i =|
|00005160| 20 30 20 3b 20 69 20 3c | 20 73 69 7a 65 20 3b 20 | 0 ; i <| size ; |
|00005170| 69 2b 2b 29 20 7b 0a 20 | 20 20 20 20 20 63 20 3d |i++) {. | c =|
|00005180| 20 68 65 78 6c 69 6e 65 | 5b 69 5d 3b 0a 20 20 20 | hexline|[i];. |
|00005190| 20 20 20 63 31 20 3d 20 | 28 63 20 3e 3e 20 34 29 | c1 = |(c >> 4)|
|000051a0| 20 26 20 30 78 30 46 3b | 0a 20 20 20 20 20 20 63 | & 0x0F;|. c|
|000051b0| 31 20 3d 20 28 63 31 20 | 3c 3d 20 39 29 20 3f 20 |1 = (c1 |<= 9) ? |
|000051c0| 28 63 31 20 2b 20 27 30 | 27 29 20 3a 20 28 63 31 |(c1 + '0|') : (c1|
|000051d0| 20 2d 20 31 30 20 2b 20 | 27 41 27 29 3b 0a 20 20 | - 10 + |'A');. |
|000051e0| 20 20 20 20 6f 75 74 73 | 74 72 69 6e 67 5b 6a 2b | outs|tring[j+|
|000051f0| 2b 5d 20 3d 20 63 31 3b | 0a 20 20 20 20 20 20 63 |+] = c1;|. c|
|00005200| 31 20 3d 20 63 20 26 20 | 30 78 30 46 3b 0a 20 20 |1 = c & |0x0F;. |
|00005210| 20 20 20 20 63 31 20 3d | 20 28 63 31 20 3c 3d 20 | c1 =| (c1 <= |
|00005220| 39 29 20 3f 20 28 63 31 | 20 2b 20 27 30 27 29 20 |9) ? (c1| + '0') |
|00005230| 3a 20 28 63 31 20 2d 20 | 31 30 20 2b 20 27 41 27 |: (c1 - |10 + 'A'|
|00005240| 29 3b 0a 20 20 20 20 20 | 20 6f 75 74 73 74 72 69 |);. | outstri|
|00005250| 6e 67 5b 6a 2b 2b 5d 20 | 3d 20 63 31 3b 0a 20 20 |ng[j++] |= c1;. |
|00005260| 20 7d 0a 20 20 20 6f 75 | 74 73 74 72 69 6e 67 5b | }. ou|tstring[|
|00005270| 6a 5d 20 3d 20 4e 55 4c | 4c 3b 0a 7d 0a 40 2f 2f |j] = NUL|L;.}.@//|
|00005280| 45 2a 4f 2a 46 20 70 61 | 69 6e 74 70 73 2e 63 2f |E*O*F pa|intps.c/|
|00005290| 2f 0a 63 68 6d 6f 64 20 | 75 3d 72 77 2c 67 3d 72 |/.chmod |u=rw,g=r|
|000052a0| 77 2c 6f 3d 72 20 70 61 | 69 6e 74 70 73 2e 63 0a |w,o=r pa|intps.c.|
|000052b0| 20 0a 65 63 68 6f 20 78 | 20 2d 20 70 61 69 6e 74 | .echo x| - paint|
|000052c0| 70 73 2e 31 0a 73 65 64 | 20 27 73 2f 5e 40 2f 2f |ps.1.sed| 's/^@//|
|000052d0| 27 20 3e 20 22 70 61 69 | 6e 74 70 73 2e 31 22 20 |' > "pai|ntps.1" |
|000052e0| 3c 3c 27 40 2f 2f 45 2a | 4f 2a 46 20 70 61 69 6e |<<'@//E*|O*F pain|
|000052f0| 74 70 73 2e 31 2f 2f 27 | 0a 40 2e 54 48 20 50 41 |tps.1//'|.@.TH PA|
|00005300| 49 4e 54 50 53 20 6c 6f | 63 61 6c 20 22 32 33 20 |INTPS lo|cal "23 |
|00005310| 41 70 72 69 6c 20 31 39 | 38 36 22 0a 40 2e 55 43 |April 19|86".@.UC|
|00005320| 20 34 0a 40 2e 53 48 20 | 4e 41 4d 45 0a 70 61 69 | 4.@.SH |NAME.pai|
|00005330| 6e 74 70 73 20 2d 20 43 | 6f 6e 76 65 72 74 20 4d |ntps - C|onvert M|
|00005340| 61 63 50 61 69 6e 74 20 | 64 6f 63 75 6d 65 6e 74 |acPaint |document|
|00005350| 20 69 6e 74 6f 20 50 6f | 73 74 53 63 72 69 70 74 | into Po|stScript|
|00005360| 0a 40 2e 53 48 20 53 59 | 4e 4f 50 53 49 53 0a 40 |.@.SH SY|NOPSIS.@|
|00005370| 2e 42 20 70 61 69 6e 74 | 70 73 0a 66 69 6c 65 0a |.B paint|ps.file.|
|00005380| 40 2e 62 72 0a 40 2e 42 | 20 70 61 69 6e 74 70 73 |@.br.@.B| paintps|
|00005390| 0a 5b 0a 40 2e 42 20 5c | 2d 64 0a 5d 20 5b 0a 40 |.[.@.B \|-d.] [.@|
|000053a0| 2e 42 49 20 5c 2d 23 3c | 6e 3e 0a 5d 20 5b 0a 40 |.BI \-#<|n>.] [.@|
|000053b0| 2e 42 49 20 5c 2d 50 3c | 70 72 69 6e 74 65 72 3e |.BI \-P<|printer>|
|000053c0| 0a 5d 20 66 69 6c 65 0a | 40 2e 53 48 20 44 45 53 |.] file.|@.SH DES|
|000053d0| 43 52 49 50 54 49 4f 4e | 0a 40 2e 49 20 50 61 69 |CRIPTION|.@.I Pai|
|000053e0| 6e 74 70 73 0a 74 72 61 | 6e 73 6c 61 74 65 73 20 |ntps.tra|nslates |
|000053f0| 61 20 4d 61 63 50 61 69 | 6e 74 20 64 6f 63 75 6d |a MacPai|nt docum|
|00005400| 65 6e 74 2c 20 75 70 6c | 6f 61 64 65 64 20 66 72 |ent, upl|oaded fr|
|00005410| 6f 6d 20 61 20 4d 61 63 | 69 6e 74 6f 73 68 20 76 |om a Mac|intosh v|
|00005420| 69 61 20 6d 61 63 67 65 | 74 20 28 6c 6f 63 61 6c |ia macge|t (local|
|00005430| 29 2c 0a 69 6e 74 6f 20 | 74 68 65 20 50 6f 73 74 |),.into |the Post|
|00005440| 53 63 72 69 70 74 20 6c | 61 6e 67 75 61 67 65 2e |Script l|anguage.|
|00005450| 20 20 49 74 20 63 61 6e | 20 61 6c 73 6f 20 73 70 | It can| also sp|
|00005460| 6f 6f 6c 20 6f 75 74 70 | 75 74 20 74 6f 20 6d 61 |ool outp|ut to ma|
|00005470| 63 6c 61 73 65 72 20 28 | 6c 6f 63 61 6c 29 0a 66 |claser (|local).f|
|00005480| 6f 72 20 70 72 69 6e 74 | 69 6e 67 20 6f 6e 20 61 |or print|ing on a|
|00005490| 20 4c 61 73 65 72 57 72 | 69 74 65 72 20 6f 72 20 | LaserWr|iter or |
|000054a0| 6f 74 68 65 72 20 50 6f | 73 74 53 63 72 69 70 74 |other Po|stScript|
|000054b0| 20 64 65 76 69 63 65 2e | 0a 40 2e 50 50 0a 49 66 | device.|.@.PP.If|
|000054c0| 20 74 68 65 20 6f 75 74 | 70 75 74 20 6f 66 20 70 | the out|put of p|
|000054d0| 61 69 6e 74 70 73 20 68 | 61 73 6e 27 74 20 62 65 |aintps h|asn't be|
|000054e0| 65 6e 20 72 65 64 69 72 | 65 63 74 65 64 20 6f 72 |en redir|ected or|
|000054f0| 20 70 69 70 65 64 2c 20 | 74 68 65 6e 20 70 61 69 | piped, |then pai|
|00005500| 6e 74 70 73 0a 61 75 74 | 6f 6d 61 74 69 63 61 6c |ntps.aut|omatical|
|00005510| 6c 79 20 73 70 6f 6f 6c | 73 20 74 68 65 20 6f 75 |ly spool|s the ou|
|00005520| 74 70 75 74 20 74 6f 20 | 74 68 65 20 4c 61 73 65 |tput to |the Lase|
|00005530| 72 57 72 69 74 65 72 2e | 0a 40 2e 50 50 0a 4e 6f |rWriter.|.@.PP.No|
|00005540| 74 65 20 74 68 61 74 20 | 74 68 65 20 72 65 73 75 |te that |the resu|
|00005550| 6c 74 69 6e 67 20 50 6f | 73 74 53 63 72 69 70 74 |lting Po|stScript|
|00005560| 20 66 69 6c 65 20 72 65 | 71 75 69 72 65 73 20 63 | file re|quires c|
|00005570| 65 72 74 61 69 6e 20 66 | 75 6e 63 74 69 6f 6e 0a |ertain f|unction.|
|00005580| 64 65 66 69 6e 69 74 69 | 6f 6e 73 20 74 68 61 74 |definiti|ons that|
|00005590| 20 61 72 65 6e 27 74 20 | 6e 6f 72 6d 61 6c 6c 79 | aren't |normally|
|000055a0| 20 70 72 65 73 65 6e 74 | 20 6f 6e 20 74 68 65 20 | present| on the |
|000055b0| 4c 61 73 65 72 57 72 69 | 74 65 72 2e 20 20 54 68 |LaserWri|ter. Th|
|000055c0| 65 72 65 66 6f 72 65 2c | 0a 74 68 65 20 6f 75 74 |erefore,|.the out|
|000055d0| 70 75 74 20 6f 66 20 70 | 61 69 6e 74 70 73 20 6d |put of p|aintps m|
|000055e0| 75 73 74 20 65 76 65 6e | 74 75 61 6c 6c 79 20 62 |ust even|tually b|
|000055f0| 65 20 70 72 69 6e 74 65 | 64 20 75 73 69 6e 67 20 |e printe|d using |
|00005600| 22 6d 61 63 6c 61 73 65 | 72 22 20 69 6e 73 74 65 |"maclase|r" inste|
|00005610| 61 64 20 6f 66 2c 0a 66 | 6f 72 20 65 78 61 6d 70 |ad of,.f|or examp|
|00005620| 6c 65 2c 20 22 6c 70 72 | 20 2d 50 6c 77 22 2e 0a |le, "lpr| -Plw"..|
|00005630| 40 2e 50 50 0a 54 68 65 | 20 6f 72 64 65 72 20 6f |@.PP.The| order o|
|00005640| 66 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 61 |f comman|d line a|
|00005650| 72 67 75 6d 65 6e 74 73 | 20 69 73 20 6e 6f 74 20 |rguments| is not |
|00005660| 69 6d 70 6f 72 74 61 6e | 74 2c 20 65 78 63 65 70 |importan|t, excep|
|00005670| 74 20 74 68 61 74 20 74 | 68 65 20 6f 70 74 69 6f |t that t|he optio|
|00005680| 6e 73 0a 6d 75 73 74 20 | 70 72 65 63 65 64 65 20 |ns.must |precede |
|00005690| 74 68 65 20 66 69 6c 65 | 6e 61 6d 65 2e 20 20 54 |the file|name. T|
|000056a0| 68 65 20 61 76 61 69 6c | 61 62 6c 65 20 63 6f 6d |he avail|able com|
|000056b0| 6d 61 6e 64 20 6c 69 6e | 65 20 6f 70 74 69 6f 6e |mand lin|e option|
|000056c0| 73 20 61 72 65 3a 0a 40 | 2e 54 50 0a 40 2e 42 20 |s are:.@|.TP.@.B |
|000056d0| 2d 64 0a 53 70 65 63 69 | 66 69 65 73 20 44 72 61 |-d.Speci|fies Dra|
|000056e0| 66 74 20 4d 6f 64 65 2e | 20 20 54 68 69 73 20 74 |ft Mode.| This t|
|000056f0| 75 72 6e 73 20 6f 66 66 | 20 74 68 65 20 73 6d 6f |urns off| the smo|
|00005700| 6f 74 68 69 6e 67 20 66 | 75 6e 63 74 69 6f 6e 20 |othing f|unction |
|00005710| 66 6f 72 20 67 72 61 70 | 68 69 63 73 2e 0a 54 68 |for grap|hics..Th|
|00005720| 69 73 20 6f 70 74 69 6f | 6e 20 69 73 20 6f 66 20 |is optio|n is of |
|00005730| 64 75 62 69 6f 75 73 20 | 75 73 65 66 75 6c 6e 65 |dubious |usefulne|
|00005740| 73 73 20 73 69 6e 63 65 | 20 74 68 65 20 73 6d 6f |ss since| the smo|
|00005750| 6f 74 68 69 6e 67 20 6f | 76 65 72 68 65 61 64 20 |othing o|verhead |
|00005760| 69 73 20 73 6d 61 6c 6c | 2e 0a 40 2e 54 50 0a 40 |is small|..@.TP.@|
|00005770| 2e 42 49 20 2d 23 3c 6e | 3e 0a 53 70 65 63 69 66 |.BI -#<n|>.Specif|
|00005780| 69 65 73 20 6e 20 63 6f | 70 69 65 73 20 73 68 6f |ies n co|pies sho|
|00005790| 75 6c 64 20 62 65 20 70 | 72 69 6e 74 65 64 2e 0a |uld be p|rinted..|
|000057a0| 40 2e 54 50 0a 40 2e 42 | 49 20 2d 50 3c 70 72 69 |@.TP.@.B|I -P<pri|
|000057b0| 6e 74 65 72 3e 0a 53 70 | 65 63 69 66 69 65 73 20 |nter>.Sp|ecifies |
|000057c0| 74 68 65 20 70 72 69 6e | 74 65 72 20 74 6f 20 62 |the prin|ter to b|
|000057d0| 65 20 75 73 65 64 20 61 | 73 20 74 68 65 20 6f 75 |e used a|s the ou|
|000057e0| 74 70 75 74 20 64 65 76 | 69 63 65 2e 0a 40 2e 53 |tput dev|ice..@.S|
|000057f0| 48 20 55 50 4c 4f 41 44 | 49 4e 47 5c 20 4d 41 43 |H UPLOAD|ING\ MAC|
|00005800| 50 41 49 4e 54 5c 20 46 | 49 4c 45 53 5c 20 54 4f |PAINT\ F|ILES\ TO|
|00005810| 5c 20 55 4e 49 58 0a 59 | 6f 75 20 6d 61 79 20 75 |\ UNIX.Y|ou may u|
|00005820| 73 65 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 0a 40 |se the c|ommand.@|
|00005830| 2e 50 50 0a 25 20 6d 61 | 63 67 65 74 20 2d 64 0a |.PP.% ma|cget -d.|
|00005840| 40 2e 50 50 0a 74 6f 20 | 75 70 6c 6f 61 64 20 4d |@.PP.to |upload M|
|00005850| 61 63 50 61 69 6e 74 20 | 66 69 6c 65 73 20 66 72 |acPaint |files fr|
|00005860| 6f 6d 20 74 68 65 20 4d | 61 63 69 6e 74 6f 73 68 |om the M|acintosh|
|00005870| 20 74 6f 20 55 4e 49 58 | 2e 20 20 53 65 65 20 6d | to UNIX|. See m|
|00005880| 61 63 67 65 74 28 6c 6f | 63 61 6c 29 0a 66 6f 72 |acget(lo|cal).for|
|00005890| 20 6d 6f 72 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | more in|formatio|
|000058a0| 6e 2e 0a 40 2e 53 48 20 | 44 49 41 47 4e 4f 53 54 |n..@.SH |DIAGNOST|
|000058b0| 49 43 53 0a 49 66 20 74 | 68 65 20 4c 61 73 65 72 |ICS.If t|he Laser|
|000058c0| 57 72 69 74 65 72 20 70 | 72 6f 64 75 63 65 73 20 |Writer p|roduces |
|000058d0| 61 6e 20 65 72 72 6f 72 | 20 70 61 67 65 20 73 61 |an error| page sa|
|000058e0| 79 69 6e 67 20 22 2f 6d | 64 20 75 6e 64 65 66 69 |ying "/m|d undefi|
|000058f0| 6e 65 64 22 2c 20 74 68 | 69 73 0a 70 72 6f 62 61 |ned", th|is.proba|
|00005900| 62 6c 79 20 6d 65 61 6e | 73 20 79 6f 75 20 73 70 |bly mean|s you sp|
|00005910| 6f 6f 6c 65 64 20 74 68 | 65 20 6f 75 74 70 75 74 |ooled th|e output|
|00005920| 20 77 69 74 68 20 6c 70 | 72 20 69 6e 73 74 65 61 | with lp|r instea|
|00005930| 64 20 6f 66 20 6d 61 63 | 6c 61 73 65 72 2e 0a 40 |d of mac|laser..@|
|00005940| 2e 53 48 20 41 55 54 48 | 4f 52 0a 42 72 69 61 6e |.SH AUTH|OR.Brian|
|00005950| 20 48 2e 20 50 6f 77 65 | 6c 6c 2c 20 54 68 65 20 | H. Powe|ll, The |
|00005960| 55 6e 69 76 65 72 73 69 | 74 79 20 6f 66 20 54 65 |Universi|ty of Te|
|00005970| 78 61 73 20 61 74 20 41 | 75 73 74 69 6e 0a 40 2e |xas at A|ustin.@.|
|00005980| 53 48 20 53 45 45 5c 20 | 41 4c 53 4f 0a 6d 61 63 |SH SEE\ |ALSO.mac|
|00005990| 6c 61 73 65 72 28 6c 6f | 63 61 6c 29 2c 20 6d 61 |laser(lo|cal), ma|
|000059a0| 63 67 65 74 28 6c 6f 63 | 61 6c 29 0a 40 2f 2f 45 |cget(loc|al).@//E|
|000059b0| 2a 4f 2a 46 20 70 61 69 | 6e 74 70 73 2e 31 2f 2f |*O*F pai|ntps.1//|
|000059c0| 0a 63 68 6d 6f 64 20 75 | 3d 72 77 2c 67 3d 72 77 |.chmod u|=rw,g=rw|
|000059d0| 2c 6f 3d 72 20 70 61 69 | 6e 74 70 73 2e 31 0a 20 |,o=r pai|ntps.1. |
|000059e0| 0a 65 63 68 6f 20 78 20 | 2d 20 4d 61 6b 65 66 69 |.echo x |- Makefi|
|000059f0| 6c 65 0a 73 65 64 20 27 | 73 2f 5e 40 2f 2f 27 20 |le.sed '|s/^@//' |
|00005a00| 3e 20 22 4d 61 6b 65 66 | 69 6c 65 22 20 3c 3c 27 |> "Makef|ile" <<'|
|00005a10| 40 2f 2f 45 2a 4f 2a 46 | 20 4d 61 6b 65 66 69 6c |@//E*O*F| Makefil|
|00005a20| 65 2f 2f 27 0a 53 52 43 | 53 3d 20 70 61 69 6e 74 |e//'.SRC|S= paint|
|00005a30| 70 73 2e 63 0a 4f 42 4a | 53 3d 20 70 61 69 6e 74 |ps.c.OBJ|S= paint|
|00005a40| 70 73 2e 6f 0a 43 4f 4d | 4d 41 4e 44 53 3d 20 70 |ps.o.COM|MANDS= p|
|00005a50| 61 69 6e 74 70 73 0a 43 | 46 4c 41 47 53 3d 20 2d |aintps.C|FLAGS= -|
|00005a60| 4f 0a 42 49 4e 3d 20 2f | 75 73 72 2f 6c 6f 63 61 |O.BIN= /|usr/loca|
|00005a70| 6c 0a 4d 41 4e 3d 20 2f | 75 73 72 2f 6d 61 6e 2f |l.MAN= /|usr/man/|
|00005a80| 6d 61 6e 6c 0a 0a 53 50 | 4f 4f 4c 43 4d 44 3d 20 |manl..SP|OOLCMD= |
|00005a90| 22 6d 61 63 6c 61 73 65 | 72 22 0a 0a 61 6c 6c 3a |"maclase|r"..all:|
|00005aa0| 20 24 28 43 4f 4d 4d 41 | 4e 44 53 29 0a 0a 70 61 | $(COMMA|NDS)..pa|
|00005ab0| 69 6e 74 70 73 3a 20 70 | 61 69 6e 74 70 73 2e 63 |intps: p|aintps.c|
|00005ac0| 0a 09 24 28 43 43 29 20 | 24 28 43 46 4c 41 47 53 |..$(CC) |$(CFLAGS|
|00005ad0| 29 20 70 61 69 6e 74 70 | 73 2e 63 20 2d 6f 20 70 |) paintp|s.c -o p|
|00005ae0| 61 69 6e 74 70 73 20 27 | 2d 44 53 50 4f 4f 4c 43 |aintps '|-DSPOOLC|
|00005af0| 4d 44 3d 24 28 53 50 4f | 4f 4c 43 4d 44 29 27 0a |MD=$(SPO|OLCMD)'.|
|00005b00| 0a 69 6e 73 74 61 6c 6c | 3a 20 24 28 43 4f 4d 4d |.install|: $(COMM|
|00005b10| 41 4e 44 53 29 0a 09 69 | 6e 73 74 61 6c 6c 20 2d |ANDS)..i|nstall -|
|00005b20| 73 20 2d 6d 20 30 37 37 | 35 20 70 61 69 6e 74 70 |s -m 077|5 paintp|
|00005b30| 73 20 24 7b 44 45 53 54 | 44 49 52 7d 2f 24 7b 42 |s ${DEST|DIR}/${B|
|00005b40| 49 4e 7d 0a 09 69 6e 73 | 74 61 6c 6c 20 2d 63 20 |IN}..ins|tall -c |
|00005b50| 2d 6d 20 30 34 34 34 20 | 70 61 69 6e 74 70 73 2e |-m 0444 |paintps.|
|00005b60| 31 20 24 7b 44 45 53 54 | 44 49 52 7d 2f 24 7b 4d |1 ${DEST|DIR}/${M|
|00005b70| 41 4e 7d 0a 0a 63 6c 65 | 61 6e 3a 0a 09 72 6d 20 |AN}..cle|an:..rm |
|00005b80| 2d 66 20 2a 2e 6f 20 61 | 2e 6f 75 74 20 63 6f 72 |-f *.o a|.out cor|
|00005b90| 65 20 24 28 43 4f 4d 4d | 41 4e 44 53 29 0a 40 2f |e $(COMM|ANDS).@/|
|00005ba0| 2f 45 2a 4f 2a 46 20 4d | 61 6b 65 66 69 6c 65 2f |/E*O*F M|akefile/|
|00005bb0| 2f 0a 63 68 6d 6f 64 20 | 75 3d 72 77 2c 67 3d 72 |/.chmod |u=rw,g=r|
|00005bc0| 77 2c 6f 3d 72 20 4d 61 | 6b 65 66 69 6c 65 0a 20 |w,o=r Ma|kefile. |
|00005bd0| 0a 65 63 68 6f 20 78 20 | 2d 20 6d 61 63 6c 61 73 |.echo x |- maclas|
|00005be0| 65 72 2e 63 73 68 0a 73 | 65 64 20 27 73 2f 5e 40 |er.csh.s|ed 's/^@|
|00005bf0| 2f 2f 27 20 3e 20 22 6d | 61 63 6c 61 73 65 72 2e |//' > "m|aclaser.|
|00005c00| 63 73 68 22 20 3c 3c 27 | 40 2f 2f 45 2a 4f 2a 46 |csh" <<'|@//E*O*F|
|00005c10| 20 6d 61 63 6c 61 73 65 | 72 2e 63 73 68 2f 2f 27 | maclase|r.csh//'|
|00005c20| 0a 23 21 20 2f 62 69 6e | 2f 63 73 68 20 2d 66 0a |.#! /bin|/csh -f.|
|00005c30| 0a 23 20 41 20 73 69 6d | 70 6c 65 20 73 63 72 69 |.# A sim|ple scri|
|00005c40| 70 74 20 74 6f 20 73 70 | 6f 6f 6c 20 66 69 6c 65 |pt to sp|ool file|
|00005c50| 73 20 70 72 65 70 61 72 | 65 64 20 6f 6e 20 61 20 |s prepar|ed on a |
|00005c60| 4d 61 63 69 6e 74 6f 73 | 68 20 66 6f 72 20 70 72 |Macintos|h for pr|
|00005c70| 69 6e 74 69 6e 67 20 6f | 6e 0a 23 20 74 68 65 20 |inting o|n.# the |
|00005c80| 4c 61 73 65 72 57 72 69 | 74 65 72 2e 20 20 49 74 |LaserWri|ter. It|
|00005c90| 20 65 78 70 69 6c 69 63 | 74 6c 79 20 73 70 6f 6f | expilic|tly spoo|
|00005ca0| 6c 73 20 74 6f 20 74 68 | 65 20 6c 77 20 70 72 69 |ls to th|e lw pri|
|00005cb0| 6e 74 65 72 20 61 6e 64 | 20 66 6c 61 67 73 20 74 |nter and| flags t|
|00005cc0| 68 65 0a 23 20 66 69 6c | 65 20 61 73 20 22 46 6f |he.# fil|e as "Fo|
|00005cd0| 72 74 72 61 6e 22 20 74 | 79 70 65 2e 20 20 54 68 |rtran" t|ype. Th|
|00005ce0| 69 73 20 66 69 6c 65 20 | 74 79 70 65 20 69 73 20 |is file |type is |
|00005cf0| 72 65 64 65 66 69 6e 65 | 64 20 6c 6f 63 61 6c 6c |redefine|d locall|
|00005d00| 79 20 74 6f 20 6d 65 61 | 6e 0a 23 20 61 20 6d 61 |y to mea|n.# a ma|
|00005d10| 63 20 50 6f 73 74 73 63 | 72 69 70 74 20 66 69 6c |c Postsc|ript fil|
|00005d20| 65 2c 20 63 61 75 73 69 | 6e 67 20 74 68 65 20 41 |e, causi|ng the A|
|00005d30| 70 70 6c 65 20 6c 61 73 | 65 72 2d 70 72 65 70 20 |pple las|er-prep |
|00005d40| 66 69 6c 65 20 74 6f 20 | 62 65 20 70 72 65 70 65 |file to |be prepe|
|00005d50| 6e 64 65 64 0a 23 20 74 | 6f 20 70 72 6f 76 69 64 |nded.# t|o provid|
|00005d60| 65 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 4d |e the st|andard M|
|00005d70| 61 63 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 69 |ac envir|onment i|
|00005d80| 6e 20 74 68 65 20 70 72 | 69 6e 74 65 72 20 77 68 |n the pr|inter wh|
|00005d90| 65 6e 20 74 68 65 20 66 | 69 6c 65 0a 23 20 69 73 |en the f|ile.# is|
|00005da0| 20 70 72 6f 63 65 73 73 | 65 64 2e 0a 23 20 46 69 | process|ed..# Fi|
|00005db0| 6c 65 73 20 73 70 6f 6f | 6c 65 64 20 77 69 74 68 |les spoo|led with|
|00005dc0| 20 6d 61 63 6c 61 73 65 | 72 20 73 68 6f 75 6c 64 | maclase|r should|
|00005dd0| 20 68 61 76 65 20 62 65 | 65 6e 20 63 72 65 61 74 | have be|en creat|
|00005de0| 65 64 20 6f 6e 20 74 68 | 65 20 4d 61 63 20 77 69 |ed on th|e Mac wi|
|00005df0| 74 68 0a 23 20 74 68 65 | 20 43 4f 4d 4d 41 4e 44 |th.# the| COMMAND|
|00005e00| 2d 46 20 73 65 71 75 65 | 6e 63 65 20 61 6e 64 20 |-F seque|nce and |
|00005e10| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 50 6f |the resu|lting Po|
|00005e20| 73 74 53 63 72 69 70 74 | 20 66 69 6c 65 20 75 70 |stScript| file up|
|00005e30| 6c 6f 61 64 65 64 20 20 | 5b 52 48 5d 0a 23 0a 23 |loaded |[RH].#.#|
|00005e40| 20 20 41 70 72 69 6c 20 | 31 39 38 36 09 47 65 6e | April |1986.Gen|
|00005e50| 65 72 61 6c 69 7a 65 64 | 20 74 6f 20 68 61 6e 64 |eralized| to hand|
|00005e60| 6c 65 20 61 72 62 69 74 | 72 61 72 79 20 6f 70 74 |le arbit|rary opt|
|00005e70| 69 6f 6e 20 61 72 67 73 | 20 61 6e 64 20 61 63 63 |ion args| and acc|
|00005e80| 65 70 74 0a 23 09 09 6d | 75 6c 74 69 70 6c 65 20 |ept.#..m|ultiple |
|00005e90| 66 69 6c 65 20 6e 61 6d | 65 73 2e 20 20 54 68 69 |file nam|es. Thi|
|00005ea0| 73 20 69 73 20 6e 6f 77 | 20 61 20 67 65 6e 65 72 |s is now| a gener|
|00005eb0| 61 6c 20 66 69 6c 74 65 | 72 20 66 6f 72 0a 23 09 |al filte|r for.#.|
|00005ec0| 09 63 61 6c 6c 69 6e 67 | 20 6c 70 72 2e 20 20 4f |.calling| lpr. O|
|00005ed0| 70 74 69 6f 6e 73 20 61 | 6e 64 20 66 69 6c 65 20 |ptions a|nd file |
|00005ee0| 6e 61 6d 65 73 20 63 61 | 6e 20 62 65 20 6d 69 78 |names ca|n be mix|
|00005ef0| 65 64 20 75 70 20 69 6e | 0a 23 09 09 74 68 65 20 |ed up in|.#..the |
|00005f00| 22 77 72 6f 6e 67 22 20 | 6f 72 64 65 72 20 61 6e |"wrong" |order an|
|00005f10| 64 20 74 68 65 79 20 77 | 69 6c 6c 20 62 65 20 67 |d they w|ill be g|
|00005f20| 69 76 65 6e 20 74 6f 20 | 6c 70 72 20 69 6e 20 74 |iven to |lpr in t|
|00005f30| 68 65 20 0a 23 09 09 6f | 72 64 65 72 20 69 74 20 |he .#..o|rder it |
|00005f40| 77 61 6e 74 73 20 74 68 | 65 6d 2e 20 20 54 68 65 |wants th|em. The|
|00005f50| 20 27 61 6c 77 61 79 73 | 27 20 76 61 72 69 61 62 | 'always|' variab|
|00005f60| 6c 65 20 69 73 20 77 68 | 61 74 20 6d 61 6b 65 73 |le is wh|at makes|
|00005f70| 0a 23 09 09 74 68 69 73 | 20 61 20 73 63 72 69 70 |.#..this| a scrip|
|00005f80| 74 20 73 70 65 63 69 66 | 69 63 20 74 6f 20 68 61 |t specif|ic to ha|
|00005f90| 6e 64 6c 69 6e 67 20 4d | 61 63 20 50 6f 73 74 73 |ndling M|ac Posts|
|00005fa0| 63 72 69 70 74 2e 0a 23 | 09 09 52 6f 6e 20 48 69 |cript..#|..Ron Hi|
|00005fb0| 74 63 68 65 6e 73 20 28 | 68 69 74 63 68 65 6e 73 |tchens (|hitchens|
|00005fc0| 40 73 61 6c 6c 79 29 2c | 20 42 72 69 61 6e 20 50 |@sally),| Brian P|
|00005fd0| 6f 77 65 6c 6c 20 28 62 | 72 69 61 6e 40 73 61 6c |owell (b|rian@sal|
|00005fe0| 6c 79 29 0a 23 0a 0a 73 | 65 74 20 6c 70 72 20 3d |ly).#..s|et lpr =|
|00005ff0| 20 2f 75 73 72 2f 75 63 | 62 2f 6c 70 72 0a 73 65 | /usr/uc|b/lpr.se|
|00006000| 74 20 6c 77 20 3d 20 2d | 50 6c 77 0a 73 65 74 20 |t lw = -|Plw.set |
|00006010| 61 6c 77 61 79 73 20 3d | 20 28 2d 66 29 09 09 23 |always =| (-f)..#|
|00006020| 20 74 68 69 73 20 6d 65 | 61 6e 73 20 4d 61 63 20 | this me|ans Mac |
|00006030| 50 6f 73 74 53 63 72 69 | 70 74 20 28 6c 6f 63 61 |PostScri|pt (loca|
|00006040| 6c 20 73 70 6f 6f 6c 65 | 72 20 68 61 63 6b 29 0a |l spoole|r hack).|
|00006050| 73 65 74 20 66 6c 61 67 | 73 20 3d 20 28 29 0a 73 |set flag|s = ().s|
|00006060| 65 74 20 66 69 6c 65 73 | 20 3d 20 28 29 0a 0a 74 |et files| = ()..t|
|00006070| 6f 70 3a 0a 09 69 66 20 | 28 24 23 61 72 67 76 20 |op:..if |($#argv |
|00006080| 3e 20 30 29 20 74 68 65 | 6e 0a 09 09 73 77 69 74 |> 0) the|n...swit|
|00006090| 63 68 20 28 24 61 72 67 | 76 5b 31 5d 29 0a 09 09 |ch ($arg|v[1])...|
|000060a0| 63 61 73 65 20 2d 50 2a | 3a 09 09 23 20 6e 65 65 |case -P*|:..# nee|
|000060b0| 64 20 74 6f 20 6c 6f 6f | 6b 20 66 6f 72 20 74 68 |d to loo|k for th|
|000060c0| 69 73 20 6f 6e 65 20 73 | 70 65 63 69 66 69 63 61 |is one s|pecifica|
|000060d0| 6c 6c 79 0a 09 09 09 73 | 65 74 20 6c 77 3d 24 61 |lly....s|et lw=$a|
|000060e0| 72 67 76 5b 31 5d 09 23 | 20 73 69 6e 63 65 20 77 |rgv[1].#| since w|
|000060f0| 65 27 76 65 20 73 65 74 | 75 70 20 61 20 64 65 66 |e've set|up a def|
|00006100| 61 75 6c 74 0a 09 09 09 | 73 68 69 66 74 20 61 72 |ault....|shift ar|
|00006110| 67 76 0a 09 09 09 67 6f | 74 6f 20 74 6f 70 0a 09 |gv....go|to top..|
|00006120| 09 63 61 73 65 20 2d 3a | 09 09 09 23 20 70 72 65 |.case -:|...# pre|
|00006130| 74 65 6e 64 20 74 68 69 | 73 20 6d 65 61 6e 73 20 |tend thi|s means |
|00006140| 72 65 61 64 20 73 74 64 | 69 6e 0a 09 09 09 73 68 |read std|in....sh|
|00006150| 69 66 74 20 61 72 67 76 | 09 23 20 6c 70 72 20 72 |ift argv|.# lpr r|
|00006160| 65 61 64 73 20 73 74 64 | 69 6e 20 69 66 20 6e 6f |eads std|in if no|
|00006170| 20 66 69 6c 65 73 20 6e | 61 6d 65 73 0a 09 09 09 | files n|ames....|
|00006180| 67 6f 74 6f 20 74 6f 70 | 09 23 20 61 72 65 20 67 |goto top|.# are g|
|00006190| 69 76 65 6e 20 61 6e 79 | 77 61 79 2e 20 20 49 67 |iven any|way. Ig|
|000061a0| 6e 6f 72 65 20 69 74 2e | 0a 09 09 63 61 73 65 20 |nore it.|...case |
|000061b0| 2d 2a 3a 0a 09 09 09 73 | 65 74 20 66 6c 61 67 73 |-*:....s|et flags|
|000061c0| 20 3d 20 28 24 66 6c 61 | 67 73 20 24 61 72 67 76 | = ($fla|gs $argv|
|000061d0| 5b 31 5d 29 0a 09 09 09 | 73 68 69 66 74 20 61 72 |[1])....|shift ar|
|000061e0| 67 76 0a 09 09 09 67 6f | 74 6f 20 74 6f 70 0a 09 |gv....go|to top..|
|000061f0| 09 64 65 66 61 75 6c 74 | 3a 0a 09 09 09 73 65 74 |.default|:....set|
|00006200| 20 66 69 6c 65 73 20 3d | 20 28 24 66 69 6c 65 73 | files =| ($files|
|00006210| 20 24 61 72 67 76 5b 31 | 5d 29 0a 09 09 09 73 68 | $argv[1|])....sh|
|00006220| 69 66 74 20 61 72 67 76 | 0a 09 09 09 67 6f 74 6f |ift argv|....goto|
|00006230| 20 74 6f 70 0a 09 09 65 | 6e 64 73 77 0a 09 65 6e | top...e|ndsw..en|
|00006240| 64 69 66 0a 0a 65 78 65 | 63 20 24 6c 70 72 20 24 |dif..exe|c $lpr $|
|00006250| 61 6c 77 61 79 73 20 24 | 6c 77 20 24 66 6c 61 67 |always $|lw $flag|
|00006260| 73 20 24 66 69 6c 65 73 | 0a 40 2f 2f 45 2a 4f 2a |s $files|.@//E*O*|
|00006270| 46 20 6d 61 63 6c 61 73 | 65 72 2e 63 73 68 2f 2f |F maclas|er.csh//|
|00006280| 0a 63 68 6d 6f 64 20 75 | 3d 72 77 78 2c 67 3d 72 |.chmod u|=rwx,g=r|
|00006290| 77 78 2c 6f 3d 72 78 20 | 6d 61 63 6c 61 73 65 72 |wx,o=rx |maclaser|
|000062a0| 2e 63 73 68 0a 20 0a 65 | 63 68 6f 20 78 20 2d 20 |.csh. .e|cho x - |
|000062b0| 6d 61 63 6c 61 73 65 72 | 2e 31 0a 73 65 64 20 27 |maclaser|.1.sed '|
|000062c0| 73 2f 5e 40 2f 2f 27 20 | 3e 20 22 6d 61 63 6c 61 |s/^@//' |> "macla|
|000062d0| 73 65 72 2e 31 22 20 3c | 3c 27 40 2f 2f 45 2a 4f |ser.1" <|<'@//E*O|
|000062e0| 2a 46 20 6d 61 63 6c 61 | 73 65 72 2e 31 2f 2f 27 |*F macla|ser.1//'|
|000062f0| 0a 40 2e 54 48 20 4d 41 | 43 4c 41 53 45 52 20 6c |.@.TH MA|CLASER l|
|00006300| 6f 63 61 6c 20 22 32 33 | 20 41 70 72 69 6c 20 31 |ocal "23| April 1|
|00006310| 39 38 36 22 0a 40 2e 55 | 43 20 34 0a 40 2e 53 48 |986".@.U|C 4.@.SH|
|00006320| 20 4e 41 4d 45 0a 6d 61 | 63 6c 61 73 65 72 20 2d | NAME.ma|claser -|
|00006330| 20 53 70 6f 6f 6c 20 4d | 61 63 69 6e 74 6f 73 68 | Spool M|acintosh|
|00006340| 20 50 6f 73 74 53 63 72 | 69 70 74 20 66 69 6c 65 | PostScr|ipt file|
|00006350| 73 20 74 6f 20 74 68 65 | 20 4c 61 73 65 72 57 72 |s to the| LaserWr|
|00006360| 69 74 65 72 20 70 72 69 | 6e 74 65 72 73 0a 40 2e |iter pri|nters.@.|
|00006370| 53 48 20 53 59 4e 4f 50 | 53 49 53 0a 40 2e 42 20 |SH SYNOP|SIS.@.B |
|00006380| 6d 61 63 6c 61 73 65 72 | 0a 5b 0a 40 2e 42 49 20 |maclaser|.[.@.BI |
|00006390| 5c 2d 50 3c 70 72 69 6e | 74 65 72 3e 0a 5d 0a 66 |\-P<prin|ter>.].f|
|000063a0| 69 6c 65 0a 40 2e 53 48 | 20 44 45 53 43 52 49 50 |ile.@.SH| DESCRIP|
|000063b0| 54 49 4f 4e 0a 40 2e 49 | 20 4d 61 63 6c 61 73 65 |TION.@.I| Maclase|
|000063c0| 72 0a 69 73 20 61 20 70 | 72 6f 67 72 61 6d 20 77 |r.is a p|rogram w|
|000063d0| 68 69 63 68 20 73 70 6f | 6f 6c 73 20 4d 61 63 69 |hich spo|ols Maci|
|000063e0| 6e 74 6f 73 68 2d 67 65 | 6e 65 72 61 74 65 64 20 |ntosh-ge|nerated |
|000063f0| 50 6f 73 74 53 63 72 69 | 70 74 20 66 69 6c 65 73 |PostScri|pt files|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.