home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail text
| default
| |
99%
| file
| Nim source code, ASCII text
| default (weak)
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 70 63 | 67 40 63 73 2e 61 62 65 |From: pc|g@cs.abe|
|00000010| 72 2e 61 63 2e 75 6b 20 | 28 50 69 65 72 63 61 72 |r.ac.uk |(Piercar|
|00000020| 6c 6f 20 47 72 61 6e 64 | 69 29 0a 4e 65 77 73 67 |lo Grand|i).Newsg|
|00000030| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 75 6e 69 78 |roups: c|omp.unix|
|00000040| 2e 69 33 38 36 2c 61 6c | 74 2e 73 6f 75 72 63 65 |.i386,al|t.source|
|00000050| 73 0a 53 75 62 6a 65 63 | 74 3a 20 41 20 70 61 72 |s.Subjec|t: A par|
|00000060| 61 6c 6c 65 6c 20 70 6f | 72 74 20 64 72 69 76 65 |allel po|rt drive|
|00000070| 72 20 66 6f 72 20 53 79 | 73 56 2f 33 38 36 0a 4d |r for Sy|sV/386.M|
|00000080| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 50 43 47 2e |essage-I|D: <PCG.|
|00000090| 39 30 4a 75 6c 32 33 31 | 33 31 38 30 33 40 74 68 |90Jul231|31803@th|
|000000a0| 6f 72 2e 63 73 2e 61 62 | 65 72 2e 61 63 2e 75 6b |or.cs.ab|er.ac.uk|
|000000b0| 3e 0a 44 61 74 65 3a 20 | 32 33 20 4a 75 6c 20 39 |>.Date: |23 Jul 9|
|000000c0| 30 20 31 32 3a 31 38 3a | 30 33 20 47 4d 54 0a 0a |0 12:18:|03 GMT..|
|000000d0| 0a 49 20 61 6d 20 70 6f | 73 74 69 6e 67 20 68 65 |.I am po|sting he|
|000000e0| 72 65 20 74 68 65 20 66 | 75 6c 6c 20 73 6f 75 72 |re the f|ull sour|
|000000f0| 63 65 20 6f 66 20 61 20 | 70 61 72 61 6c 6c 65 6c |ce of a |parallel|
|00000100| 20 70 6f 72 74 20 64 72 | 69 76 65 72 2c 20 69 6e | port dr|iver, in|
|00000110| 73 70 69 72 65 64 20 62 | 79 0a 6f 6e 65 20 70 6f |spired b|y.one po|
|00000120| 73 74 65 64 20 6f 6e 20 | 74 68 65 73 65 20 73 63 |sted on |these sc|
|00000130| 72 65 65 6e 20 6d 79 20 | 4d 69 6b 65 20 47 72 65 |reen my |Mike Gre|
|00000140| 6e 69 65 72 2c 20 74 68 | 61 74 20 68 61 73 20 73 |nier, th|at has s|
|00000150| 6f 6d 65 20 71 75 61 6c | 69 74 69 65 73 20 74 68 |ome qual|ities th|
|00000160| 61 74 0a 6d 61 79 20 6d | 61 6b 65 20 69 74 20 70 |at.may m|ake it p|
|00000170| 72 65 66 65 72 61 62 6c | 65 20 6f 76 65 72 20 74 |referabl|e over t|
|00000180| 68 65 20 6f 6e 65 20 73 | 68 69 70 70 65 64 20 73 |he one s|hipped s|
|00000190| 74 61 6e 64 61 72 64 20 | 77 69 74 68 20 74 68 65 |tandard |with the|
|000001a0| 20 76 61 72 69 6f 75 73 | 0a 76 65 72 73 69 6f 6e | various|.version|
|000001b0| 73 20 6f 66 20 53 79 73 | 74 65 6d 20 56 2f 33 38 |s of Sys|tem V/38|
|000001c0| 36 2e 0a 0a 54 68 65 79 | 20 61 72 65 20 6d 61 69 |6...They| are mai|
|000001d0| 6e 6c 79 20 74 68 61 74 | 20 69 74 20 69 73 20 73 |nly that| it is s|
|000001e0| 6d 61 6c 6c 2c 20 64 6f | 65 73 20 6e 6f 74 20 75 |mall, do|es not u|
|000001f0| 73 65 20 74 65 72 6d 69 | 6f 2c 20 64 6f 65 73 20 |se termi|o, does |
|00000200| 6e 6f 74 20 75 73 65 20 | 61 6e 79 0a 69 6e 74 65 |not use |any.inte|
|00000210| 72 72 75 70 74 20 6c 69 | 6e 65 73 2c 20 74 68 75 |rrupt li|nes, thu|
|00000220| 73 20 75 73 69 6e 67 20 | 70 6f 6c 6c 69 6e 67 2c |s using |polling,|
|00000230| 20 61 6e 64 20 74 68 69 | 73 20 70 6f 6c 6c 69 6e | and thi|s pollin|
|00000240| 67 20 6d 6f 64 65 20 70 | 72 6f 62 61 62 6c 79 0a |g mode p|robably.|
|00000250| 63 6f 6e 73 75 6d 65 73 | 20 6c 65 73 73 20 43 50 |consumes| less CP|
|00000260| 55 20 74 68 61 6e 20 69 | 6e 74 65 72 72 75 70 74 |U than i|nterrupt|
|00000270| 20 6f 76 65 72 68 65 61 | 64 73 2e 0a 0a 54 68 65 | overhea|ds...The|
|00000280| 20 64 72 69 76 65 72 20 | 68 61 73 20 62 65 65 6e | driver |has been|
|00000290| 20 64 65 76 65 6c 6f 70 | 65 64 20 6f 6e 20 45 53 | develop|ed on ES|
|000002a0| 49 58 2c 20 62 75 74 20 | 73 68 6f 75 6c 64 20 77 |IX, but |should w|
|000002b0| 6f 72 6b 20 6f 6e 20 6e | 65 61 72 6c 79 20 65 76 |ork on n|early ev|
|000002c0| 65 72 79 0a 6f 74 68 65 | 72 20 53 79 73 74 65 6d |ery.othe|r System|
|000002d0| 20 56 2f 33 38 36 2e 20 | 54 68 65 20 6f 6e 6c 79 | V/386. |The only|
|000002e0| 20 74 68 69 6e 67 20 49 | 20 61 6d 20 6e 6f 74 20 | thing I| am not |
|000002f0| 73 75 72 65 20 65 78 69 | 73 74 73 20 69 6e 20 6f |sure exi|sts in o|
|00000300| 74 68 65 72 0a 76 65 72 | 73 69 6f 6e 73 20 69 73 |ther.ver|sions is|
|00000310| 20 61 20 72 65 66 65 72 | 65 6e 63 20 65 74 6f 20 | a refer|enc eto |
|00000320| 27 74 65 6e 6d 69 63 72 | 6f 73 65 63 27 2c 20 61 |'tenmicr|osec', a|
|00000330| 20 70 72 6f 63 65 64 75 | 72 65 20 74 68 61 74 20 | procedu|re that |
|00000340| 6a 75 73 74 20 62 75 73 | 79 0a 77 61 69 74 73 20 |just bus|y.waits |
|00000350| 66 6f 72 20 31 30 20 6d | 69 63 72 6f 73 65 63 6f |for 10 m|icroseco|
|00000360| 6e 64 73 3b 20 69 66 20 | 79 6f 75 20 64 6f 6e 3b |nds; if |you don;|
|00000370| 74 20 68 61 76 65 20 69 | 74 2c 20 69 74 27 73 20 |t have i|t, it's |
|00000380| 66 61 69 72 6c 79 20 65 | 61 73 79 20 74 6f 0a 72 |fairly e|asy to.r|
|00000390| 6f 6c 6c 20 79 6f 75 72 | 20 6f 77 6e 20 28 6e 6f |oll your| own (no|
|000003a0| 2c 20 69 74 27 73 20 6e | 6f 74 20 69 6d 70 6f 72 |, it's n|ot impor|
|000003b0| 74 61 6e 74 20 74 68 61 | 74 20 69 74 20 6c 61 73 |tant tha|t it las|
|000003c0| 74 20 65 78 61 63 74 6c | 79 20 74 65 6e 0a 6d 69 |t exactl|y ten.mi|
|000003d0| 63 72 6f 73 65 63 6f 6e | 64 73 29 2e 20 41 6c 73 |crosecon|ds). Als|
|000003e0| 6f 2c 20 74 68 65 20 63 | 6f 6e 64 69 74 69 6f 6e |o, the c|ondition|
|000003f0| 73 20 66 6f 72 20 74 68 | 65 20 74 77 6f 20 70 6f |s for th|e two po|
|00000400| 6c 6c 69 6e 67 20 6c 6f | 6f 70 73 20 68 61 76 65 |lling lo|ops have|
|00000410| 20 62 65 65 6e 0a 64 65 | 73 69 67 6e 65 64 20 61 | been.de|signed a|
|00000420| 72 6f 75 6e 64 20 6d 79 | 20 70 72 69 6e 74 65 72 |round my| printer|
|00000430| 2c 20 61 6e 20 45 70 73 | 6f 6e 20 53 51 38 35 30 |, an Eps|on SQ850|
|00000440| 20 69 6e 6b 6a 65 74 3b | 20 49 20 73 75 73 70 65 | inkjet;| I suspe|
|00000450| 63 74 20 74 68 61 74 20 | 69 74 73 0a 70 61 72 61 |ct that |its.para|
|00000460| 6c 6c 65 6c 20 69 6e 74 | 65 72 66 61 63 65 20 69 |llel int|erface i|
|00000470| 73 20 61 20 62 69 74 20 | 6f 64 64 2e 20 49 66 20 |s a bit |odd. If |
|00000480| 79 6f 75 20 68 61 76 65 | 20 70 72 6f 62 6c 65 6d |you have| problem|
|00000490| 73 20 77 69 74 68 20 65 | 78 63 65 73 73 69 76 65 |s with e|xcessive|
|000004a0| 0a 62 75 73 79 20 77 61 | 69 74 73 20 28 65 73 70 |.busy wa|its (esp|
|000004b0| 63 69 61 6c 6c 79 20 66 | 6f 72 20 6f 66 66 6c 69 |cially f|or offli|
|000004c0| 6e 65 20 6f 72 20 70 6f | 77 65 72 65 64 20 6f 66 |ne or po|wered of|
|000004d0| 66 20 70 72 69 6e 74 65 | 72 73 29 2c 20 73 6c 6f |f printe|rs), slo|
|000004e0| 77 0a 70 72 69 6e 74 69 | 6e 67 2c 20 65 74 63 2e |w.printi|ng, etc.|
|000004f0| 2e 2e 2c 20 72 65 76 69 | 73 65 20 74 68 65 20 70 |.., revi|se the p|
|00000500| 6f 6c 6c 69 6e 67 20 63 | 6f 6e 64 69 74 69 6f 6e |olling c|ondition|
|00000510| 73 20 28 62 75 74 20 69 | 74 20 73 68 6f 75 6c 64 |s (but i|t should|
|00000520| 20 6e 6f 74 20 62 65 0a | 72 65 61 6c 6c 79 20 6e | not be.|really n|
|00000530| 65 63 65 73 73 61 72 79 | 29 2e 0a 0a 41 73 20 79 |ecessary|)...As y|
|00000540| 6f 75 20 77 69 6c 6c 20 | 6e 6f 74 69 63 65 20 49 |ou will |notice I|
|00000550| 20 68 61 76 65 20 75 73 | 65 64 20 61 20 72 65 66 | have us|ed a ref|
|00000560| 65 72 65 6e 63 65 20 74 | 6f 20 74 68 65 20 47 50 |erence t|o the GP|
|00000570| 4c 2c 20 77 69 74 68 20 | 74 68 65 0a 63 6f 6e 63 |L, with |the.conc|
|00000580| 65 73 73 69 6f 6e 20 74 | 68 61 74 20 6c 69 6e 6b |ession t|hat link|
|00000590| 69 6e 67 20 69 74 20 77 | 69 74 68 20 61 20 6b 65 |ing it w|ith a ke|
|000005a0| 72 6e 65 6c 20 77 69 6c | 6c 20 6e 6f 74 20 72 65 |rnel wil|l not re|
|000005b0| 71 75 69 72 65 20 64 69 | 73 74 72 69 62 75 74 69 |quire di|stributi|
|000005c0| 6e 67 0a 74 68 65 20 72 | 65 73 74 20 6f 66 20 74 |ng.the r|est of t|
|000005d0| 68 65 20 6b 65 72 6e 65 | 6c 20 62 65 20 64 69 73 |he kerne|l be dis|
|000005e0| 74 72 69 62 75 74 65 64 | 20 75 64 65 72 20 74 68 |tributed| uder th|
|000005f0| 65 20 47 50 4c 20 61 73 | 20 77 65 6c 6c 2e 0a 0a |e GPL as| well...|
|00000600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 63 75 74 20 |--------|----cut |
|00000620| 68 65 72 65 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |here----|--------|
|00000630| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 23 21 |--------|-----.#!|
|00000640| 20 2f 62 69 6e 2f 73 68 | 0a 23 20 54 68 69 73 20 | /bin/sh|.# This |
|00000650| 69 73 20 61 20 73 68 65 | 6c 6c 20 61 72 63 68 69 |is a she|ll archi|
|00000660| 76 65 2e 20 20 52 65 6d | 6f 76 65 20 61 6e 79 74 |ve. Rem|ove anyt|
|00000670| 68 69 6e 67 20 62 65 66 | 6f 72 65 20 74 68 69 73 |hing bef|ore this|
|00000680| 20 6c 69 6e 65 2c 20 74 | 68 65 6e 20 75 6e 70 61 | line, t|hen unpa|
|00000690| 63 6b 0a 23 20 69 74 20 | 62 79 20 73 61 76 69 6e |ck.# it |by savin|
|000006a0| 67 20 69 74 20 69 6e 74 | 6f 20 61 20 66 69 6c 65 |g it int|o a file|
|000006b0| 20 61 6e 64 20 74 79 70 | 69 6e 67 20 22 73 68 20 | and typ|ing "sh |
|000006c0| 66 69 6c 65 22 2e 20 20 | 54 6f 20 6f 76 65 72 77 |file". |To overw|
|000006d0| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 0a 23 20 |rite exi|sting.# |
|000006e0| 66 69 6c 65 73 2c 20 74 | 79 70 65 20 22 73 68 20 |files, t|ype "sh |
|000006f0| 66 69 6c 65 20 2d 63 22 | 2e 20 20 59 6f 75 20 63 |file -c"|. You c|
|00000700| 61 6e 20 61 6c 73 6f 20 | 66 65 65 64 20 74 68 69 |an also |feed thi|
|00000710| 73 20 61 73 20 73 74 61 | 6e 64 61 72 64 20 69 6e |s as sta|ndard in|
|00000720| 70 75 74 20 76 69 61 0a | 23 20 75 6e 73 68 61 72 |put via.|# unshar|
|00000730| 2c 20 6f 72 20 62 79 20 | 74 79 70 69 6e 67 20 22 |, or by |typing "|
|00000740| 73 68 20 3c 66 69 6c 65 | 22 2c 20 65 2e 67 2e 2e |sh <file|", e.g..|
|00000750| 20 20 49 66 20 74 68 69 | 73 20 61 72 63 68 69 76 | If thi|s archiv|
|00000760| 65 20 69 73 20 63 6f 6d | 70 6c 65 74 65 2c 20 79 |e is com|plete, y|
|00000770| 6f 75 0a 23 20 77 69 6c | 6c 20 73 65 65 20 74 68 |ou.# wil|l see th|
|00000780| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6d 65 73 73 |e follow|ing mess|
|00000790| 61 67 65 20 61 74 20 74 | 68 65 20 65 6e 64 3a 0a |age at t|he end:.|
|000007a0| 23 09 09 22 45 6e 64 20 | 6f 66 20 61 72 63 68 69 |#.."End |of archi|
|000007b0| 76 65 20 31 20 28 6f 66 | 20 31 29 2e 22 0a 23 20 |ve 1 (of| 1).".# |
|000007c0| 43 6f 6e 74 65 6e 74 73 | 3a 20 20 4d 61 6b 65 66 |Contents|: Makef|
|000007d0| 69 6c 65 20 4d 61 73 74 | 65 72 20 4e 61 6d 65 20 |ile Mast|er Name |
|000007e0| 4e 6f 64 65 20 52 45 41 | 44 4d 45 20 70 70 2e 63 |Node REA|DME pp.c|
|000007f0| 20 70 70 2e 68 20 73 70 | 61 63 65 2e 63 0a 23 20 | pp.h sp|ace.c.# |
|00000800| 57 72 61 70 70 65 64 20 | 62 79 20 73 77 40 61 77 |Wrapped |by sw@aw|
|00000810| 61 72 65 20 6f 6e 20 4d | 6f 6e 20 4a 75 6c 20 32 |are on M|on Jul 2|
|00000820| 33 20 31 31 3a 32 36 3a | 31 39 20 31 39 39 30 0a |3 11:26:|19 1990.|
|00000830| 50 41 54 48 3d 2f 62 69 | 6e 3a 2f 75 73 72 2f 62 |PATH=/bi|n:/usr/b|
|00000840| 69 6e 3a 2f 75 73 72 2f | 75 63 62 20 3b 20 65 78 |in:/usr/|ucb ; ex|
|00000850| 70 6f 72 74 20 50 41 54 | 48 0a 65 63 68 6f 20 27 |port PAT|H.echo '|
|00000860| 0a 20 20 20 20 43 6f 70 | 79 72 69 67 68 74 20 31 |. Cop|yright 1|
|00000870| 39 39 30 20 50 69 65 72 | 63 61 72 6c 6f 20 47 72 |990 Pier|carlo Gr|
|00000880| 61 6e 64 69 2e 20 41 6c | 6c 20 72 69 67 68 74 73 |andi. Al|l rights|
|00000890| 20 72 65 73 65 72 76 65 | 64 2e 0a 0a 20 20 20 20 | reserve|d... |
|000008a0| 54 68 69 73 20 73 68 61 | 72 20 61 72 63 68 69 76 |This sha|r archiv|
|000008b0| 65 20 63 6f 6e 74 61 69 | 6e 73 20 66 72 65 65 20 |e contai|ns free |
|000008c0| 73 6f 66 74 77 61 72 65 | 3b 20 79 6f 75 20 63 61 |software|; you ca|
|000008d0| 6e 20 72 65 64 69 73 74 | 72 69 62 75 74 65 20 69 |n redist|ribute i|
|000008e0| 74 0a 20 20 20 20 61 6e | 64 2f 6f 72 20 6d 6f 64 |t. an|d/or mod|
|000008f0| 69 66 79 20 69 74 20 75 | 6e 64 65 72 20 74 68 65 |ify it u|nder the|
|00000900| 20 74 65 72 6d 73 20 6f | 66 20 74 68 65 20 47 4e | terms o|f the GN|
|00000910| 55 20 47 65 6e 65 72 61 | 6c 20 50 75 62 6c 69 63 |U Genera|l Public|
|00000920| 20 4c 69 63 65 6e 73 65 | 20 61 73 0a 20 20 20 20 | License| as. |
|00000930| 70 75 62 6c 69 73 68 65 | 64 20 62 79 20 74 68 65 |publishe|d by the|
|00000940| 20 46 72 65 65 20 53 6f | 66 74 77 61 72 65 20 46 | Free So|ftware F|
|00000950| 6f 75 6e 64 61 74 69 6f | 6e 3b 20 65 69 74 68 65 |oundatio|n; eithe|
|00000960| 72 20 76 65 72 73 69 6f | 6e 20 31 2c 20 6f 72 0a |r versio|n 1, or.|
|00000970| 20 20 20 20 28 61 74 20 | 79 6f 75 72 20 6f 70 74 | (at |your opt|
|00000980| 69 6f 6e 29 20 61 6e 79 | 20 6c 61 74 65 72 20 76 |ion) any| later v|
|00000990| 65 72 73 69 6f 6e 2e 0a | 0a 20 20 20 20 41 73 20 |ersion..|. As |
|000009a0| 61 20 73 70 65 63 69 61 | 6c 20 63 61 73 65 2c 20 |a specia|l case, |
|000009b0| 74 68 65 20 64 72 69 76 | 65 72 20 63 6f 6e 74 61 |the driv|er conta|
|000009c0| 69 6e 65 64 20 68 65 72 | 65 69 6e 20 6d 61 79 20 |ined her|ein may |
|000009d0| 62 65 20 69 6e 63 6f 72 | 70 6f 72 61 74 65 64 0a |be incor|porated.|
|000009e0| 20 20 20 20 69 6e 20 61 | 6e 79 20 4f 53 20 6b 65 | in a|ny OS ke|
|000009f0| 72 6e 65 6c 2c 20 77 68 | 65 74 68 65 72 20 74 68 |rnel, wh|ether th|
|00000a00| 65 20 47 4e 55 20 47 65 | 6e 65 72 61 6c 20 50 75 |e GNU Ge|neral Pu|
|00000a10| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 20 61 70 70 |blic Lic|ense app|
|00000a20| 6c 69 65 73 20 74 6f 0a | 20 20 20 20 69 74 20 6f |lies to.| it o|
|00000a30| 72 20 6e 6f 74 2e 0a 0a | 20 20 20 20 54 68 69 73 |r not...| This|
|00000a40| 20 64 72 69 76 65 72 20 | 69 73 20 64 69 73 74 72 | driver |is distr|
|00000a50| 69 62 75 74 65 64 20 69 | 6e 20 74 68 65 20 68 6f |ibuted i|n the ho|
|00000a60| 70 65 20 74 68 61 74 20 | 69 74 20 77 69 6c 6c 20 |pe that |it will |
|00000a70| 62 65 20 75 73 65 66 75 | 6c 2c 0a 20 20 20 20 62 |be usefu|l,. b|
|00000a80| 75 74 20 57 49 54 48 4f | 55 54 20 41 4e 59 20 57 |ut WITHO|UT ANY W|
|00000a90| 41 52 52 41 4e 54 59 3b | 20 77 69 74 68 6f 75 74 |ARRANTY;| without|
|00000aa0| 20 65 76 65 6e 20 74 68 | 65 20 69 6d 70 6c 69 65 | even th|e implie|
|00000ab0| 64 20 77 61 72 72 61 6e | 74 79 20 6f 66 0a 20 20 |d warran|ty of. |
|00000ac0| 20 20 4d 45 52 43 48 41 | 4e 54 41 42 49 4c 49 54 | MERCHA|NTABILIT|
|00000ad0| 59 20 6f 72 20 46 49 54 | 4e 45 53 53 20 46 4f 52 |Y or FIT|NESS FOR|
|00000ae0| 20 41 20 50 41 52 54 49 | 43 55 4c 41 52 20 50 55 | A PARTI|CULAR PU|
|00000af0| 52 50 4f 53 45 2e 20 20 | 53 65 65 20 74 68 65 0a |RPOSE. |See the.|
|00000b00| 20 20 20 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 | GNU |General |
|00000b10| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 20 66 |Public L|icense f|
|00000b20| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 2e |or more |details.|
|00000b30| 0a 0a 20 20 20 20 59 6f | 75 20 6d 61 79 20 68 61 |.. Yo|u may ha|
|00000b40| 76 65 20 72 65 63 65 69 | 76 65 64 20 61 20 63 6f |ve recei|ved a co|
|00000b50| 70 79 20 6f 66 20 74 68 | 65 20 47 4e 55 20 47 65 |py of th|e GNU Ge|
|00000b60| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00000b70| 65 6e 73 65 0a 20 20 20 | 20 61 6c 6f 6e 67 20 77 |ense. | along w|
|00000b80| 69 74 68 20 74 68 69 73 | 20 64 72 69 76 65 72 3b |ith this| driver;|
|00000b90| 20 69 66 20 6e 6f 74 2c | 20 77 72 69 74 65 20 74 | if not,| write t|
|00000ba0| 6f 20 74 68 65 20 46 72 | 65 65 20 53 6f 66 74 77 |o the Fr|ee Softw|
|00000bb0| 61 72 65 0a 20 20 20 20 | 46 6f 75 6e 64 61 74 69 |are. |Foundati|
|00000bc0| 6f 6e 2c 20 49 6e 63 2e | 2c 20 36 37 35 20 4d 61 |on, Inc.|, 675 Ma|
|00000bd0| 73 73 20 41 76 65 2c 20 | 43 61 6d 62 72 69 64 67 |ss Ave, |Cambridg|
|00000be0| 65 2c 20 4d 41 20 30 32 | 31 33 39 2c 20 55 53 41 |e, MA 02|139, USA|
|00000bf0| 2e 0a 27 0a 65 63 68 6f | 20 34 0a 69 66 20 74 65 |..'.echo| 4.if te|
|00000c00| 73 74 20 2d 66 20 27 52 | 45 41 44 4d 45 27 20 2d |st -f 'R|EADME' -|
|00000c10| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00000c20| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00000c30| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00000c40| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00000c50| 66 69 6c 65 20 5c 22 27 | 52 45 41 44 4d 45 27 5c |file \"'|README'\|
|00000c60| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00000c70| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00000c80| 52 45 41 44 4d 45 27 5c | 22 20 5c 28 31 39 32 38 |README'\|" \(1928|
|00000c90| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000ca0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 52 45 41 |d "s/^X/|/" >'REA|
|00000cb0| 44 4d 45 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |DME' <<'|END_OF_F|
|00000cc0| 49 4c 45 27 0a 58 54 68 | 69 73 20 69 73 20 74 68 |ILE'.XTh|is is th|
|00000cd0| 65 20 73 6f 75 72 63 65 | 20 6f 66 20 61 20 70 61 |e source| of a pa|
|00000ce0| 72 61 6c 6c 65 6c 20 70 | 6f 72 74 20 64 72 69 76 |rallel p|ort driv|
|00000cf0| 65 72 20 66 6f 72 20 53 | 79 73 74 65 6d 20 56 2f |er for S|ystem V/|
|00000d00| 33 38 36 2c 20 72 65 6c | 2e 20 33 2e 32 2e 0a 58 |386, rel|. 3.2..X|
|00000d10| 0a 58 49 74 20 69 73 20 | 64 69 66 66 65 72 65 6e |.XIt is |differen|
|00000d20| 74 20 66 72 6f 6d 20 74 | 68 65 20 73 74 61 6e 64 |t from t|he stand|
|00000d30| 61 72 64 20 6c 70 28 37 | 29 20 64 72 69 76 65 72 |ard lp(7|) driver|
|00000d40| 20 62 65 63 61 75 73 65 | 20 69 74 20 64 6f 65 73 | because| it does|
|00000d50| 20 6f 6e 6c 79 20 72 61 | 77 0a 58 6f 75 74 70 75 | only ra|w.Xoutpu|
|00000d60| 74 20 28 77 68 69 6c 65 | 20 6c 70 28 37 29 20 75 |t (while| lp(7) u|
|00000d70| 73 65 73 20 74 68 65 20 | 74 65 72 6d 69 6f 28 34 |ses the |termio(4|
|00000d80| 29 20 6c 69 6e 65 20 64 | 69 73 63 69 70 6c 69 6e |) line d|isciplin|
|00000d90| 65 29 2c 20 61 6e 64 20 | 69 74 20 64 6f 65 73 20 |e), and |it does |
|00000da0| 6e 6f 74 20 75 73 65 0a | 58 69 6e 74 65 72 72 75 |not use.|Xinterru|
|00000db0| 70 74 73 2e 20 49 74 20 | 61 73 73 75 6d 65 73 20 |pts. It |assumes |
|00000dc0| 74 68 61 74 20 74 68 65 | 20 70 72 69 6e 74 65 72 |that the| printer|
|00000dd0| 20 68 61 73 20 61 6e 20 | 69 6e 74 65 72 6e 61 6c | has an |internal|
|00000de0| 20 62 75 66 66 65 72 2c | 20 73 6f 20 74 68 61 74 | buffer,| so that|
|00000df0| 20 74 68 65 0a 58 6d 6f | 73 74 20 65 66 66 69 63 | the.Xmo|st effic|
|00000e00| 69 65 6e 74 20 73 74 79 | 6c 65 20 6f 66 20 63 6f |ient sty|le of co|
|00000e10| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 69 73 20 74 |mmunicat|ion is t|
|00000e20| 6f 20 70 75 6d 70 20 63 | 68 61 72 61 63 74 65 72 |o pump c|haracter|
|00000e30| 73 20 61 73 20 66 61 73 | 74 20 61 73 0a 58 70 6f |s as fas|t as.Xpo|
|00000e40| 73 73 69 62 6c 65 20 75 | 6e 74 69 6c 20 74 68 65 |ssible u|ntil the|
|00000e50| 20 62 75 66 66 65 72 20 | 66 69 6c 6c 73 2c 20 74 | buffer |fills, t|
|00000e60| 68 65 6e 20 73 6c 65 65 | 70 20 66 6f 72 20 61 20 |hen slee|p for a |
|00000e70| 72 65 6c 61 74 69 76 65 | 6c 79 20 6c 6f 6e 67 20 |relative|ly long |
|00000e80| 70 65 72 69 6f 64 0a 58 | 77 68 65 6e 20 69 74 20 |period.X|when it |
|00000e90| 73 69 67 6e 61 6c 73 20 | 6e 6f 74 20 72 65 61 64 |signals |not read|
|00000ea0| 79 2c 20 61 6e 64 20 74 | 72 79 20 61 67 61 69 6e |y, and t|ry again|
|00000eb0| 20 74 68 65 72 65 61 66 | 74 65 72 2e 0a 58 0a 58 | thereaf|ter..X.X|
|00000ec0| 54 68 69 73 20 69 6d 70 | 6c 69 65 73 20 74 68 61 |This imp|lies tha|
|00000ed0| 74 20 6e 6f 20 69 6e 74 | 65 72 72 75 70 74 20 70 |t no int|errupt p|
|00000ee0| 72 6f 63 65 73 73 69 6e | 67 20 69 73 20 64 6f 6e |rocessin|g is don|
|00000ef0| 65 2c 20 77 68 69 63 68 | 20 68 61 73 20 74 68 65 |e, which| has the|
|00000f00| 20 61 64 76 61 6e 74 61 | 67 65 73 0a 58 6f 66 20 | advanta|ges.Xof |
|00000f10| 73 69 6d 70 6c 69 63 69 | 74 79 20 61 6e 64 20 6c |simplici|ty and l|
|00000f20| 6f 77 20 6f 76 65 72 68 | 65 61 64 2c 20 61 6e 64 |ow overh|ead, and|
|00000f30| 2c 20 70 65 72 68 61 70 | 73 20 6d 6f 73 74 20 69 |, perhap|s most i|
|00000f40| 6d 70 6f 72 74 61 6e 74 | 6c 79 2c 20 6f 66 20 6e |mportant|ly, of n|
|00000f50| 6f 74 20 75 73 69 6e 67 | 0a 58 6f 6e 65 20 6f 66 |ot using|.Xone of|
|00000f60| 20 74 68 65 20 73 63 61 | 72 63 65 20 69 6e 74 65 | the sca|rce inte|
|00000f70| 72 75 72 70 74 20 6c 69 | 6e 65 73 20 6f 66 20 74 |rurpt li|nes of t|
|00000f80| 68 65 20 49 53 41 20 62 | 75 73 2e 0a 58 0a 58 4f |he ISA b|us..X.XO|
|00000f90| 75 74 70 75 74 20 69 73 | 20 64 6f 6e 65 20 65 6e |utput is| done en|
|00000fa0| 74 69 72 65 6c 79 20 69 | 6e 20 74 68 65 20 74 6f |tirely i|n the to|
|00000fb0| 70 20 68 61 6c 66 20 6f | 67 20 74 68 65 20 64 72 |p half o|g the dr|
|00000fc0| 69 76 65 72 2c 20 61 6e | 64 20 74 68 65 72 65 66 |iver, an|d theref|
|00000fd0| 6f 72 65 20 6e 6f 74 0a | 58 69 6e 73 69 64 65 20 |ore not.|Xinside |
|00000fe0| 61 20 63 72 69 74 69 63 | 61 6c 20 72 65 67 69 6f |a critic|al regio|
|00000ff0| 6e 2e 20 54 68 69 73 20 | 63 6f 75 6c 64 20 6d 65 |n. This |could me|
|00001000| 61 6e 20 74 68 61 74 20 | 6f 6e 20 61 20 76 65 72 |an that |on a ver|
|00001010| 79 20 62 75 73 79 20 73 | 79 73 74 65 6d 20 74 68 |y busy s|ystem th|
|00001020| 65 0a 58 70 75 6d 70 69 | 6e 67 20 63 6f 75 6c 64 |e.Xpumpi|ng could|
|00001030| 20 62 65 20 69 6e 74 65 | 72 72 75 70 74 65 64 20 | be inte|rrupted |
|00001040| 62 79 20 74 61 73 6b 20 | 73 77 69 74 63 68 69 6e |by task |switchin|
|00001050| 67 2e 20 54 68 69 73 2c | 20 69 66 20 69 6d 70 6f |g. This,| if impo|
|00001060| 72 74 61 6e 74 2c 20 63 | 61 6e 20 62 65 0a 58 65 |rtant, c|an be.Xe|
|00001070| 61 73 69 6c 79 20 6f 62 | 76 69 61 74 65 64 2c 20 |asily ob|viated, |
|00001080| 62 79 20 74 75 72 6e 69 | 6e 67 20 74 68 65 20 70 |by turni|ng the p|
|00001090| 75 6d 70 69 6e 67 20 6c | 6f 6f 70 20 69 6e 74 6f |umping l|oop into|
|000010a0| 20 61 20 63 72 69 74 69 | 63 61 6c 20 72 65 67 69 | a criti|cal regi|
|000010b0| 6f 6e 3b 20 69 66 20 74 | 68 69 73 0a 58 69 73 20 |on; if t|his.Xis |
|000010c0| 64 6f 6e 65 20 69 74 20 | 62 65 63 6f 6d 65 73 20 |done it |becomes |
|000010d0| 69 6d 70 6f 72 74 61 6e | 74 20 74 6f 20 6c 69 6d |importan|t to lim|
|000010e0| 69 74 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |it the n|umber of|
|000010f0| 20 63 68 61 72 61 63 74 | 65 72 73 20 70 75 6d 70 | charact|ers pump|
|00001100| 65 64 20 69 6e 20 6f 6e | 65 0a 58 67 6f 2c 20 62 |ed in on|e.Xgo, b|
|00001110| 79 20 68 61 76 69 6e 67 | 20 74 77 6f 20 6c 6f 6f |y having| two loo|
|00001120| 70 73 2c 20 74 68 65 20 | 6f 75 74 65 72 20 6f 6e |ps, the |outer on|
|00001130| 65 20 74 68 61 74 20 72 | 75 6e 73 20 75 6e 74 69 |e that r|uns unti|
|00001140| 6c 20 62 75 73 79 20 69 | 73 20 73 69 67 6e 61 6c |l busy i|s signal|
|00001150| 65 64 2c 20 74 68 65 0a | 58 69 6e 6e 65 72 20 6f |ed, the.|Xinner o|
|00001160| 6e 65 20 66 6f 72 20 61 | 20 66 69 78 65 64 20 6e |ne for a| fixed n|
|00001170| 75 6d 62 65 72 20 6f 66 | 20 63 68 61 72 61 63 74 |umber of| charact|
|00001180| 65 72 73 2c 20 61 6e 64 | 20 70 75 74 20 6f 6e 6c |ers, and| put onl|
|00001190| 79 20 74 68 65 20 69 6e | 6e 65 72 20 6f 6e 65 20 |y the in|ner one |
|000011a0| 69 6e 0a 58 74 68 65 20 | 63 72 69 74 69 63 61 6c |in.Xthe |critical|
|000011b0| 20 72 65 67 69 6f 6e 2e | 0a 58 0a 58 54 68 69 73 | region.|.X.XThis|
|000011c0| 20 64 72 69 76 65 72 20 | 77 61 73 20 6f 72 69 67 | driver |was orig|
|000011d0| 69 6e 61 6c 6c 79 20 77 | 72 69 74 74 65 6e 20 62 |inally w|ritten b|
|000011e0| 79 20 4d 69 6b 65 20 47 | 72 65 6e 69 65 72 20 69 |y Mike G|renier i|
|000011f0| 6e 20 31 39 38 39 3b 20 | 50 69 65 72 63 61 72 6c |n 1989; |Piercarl|
|00001200| 6f 20 47 72 61 6e 64 69 | 0a 58 69 6e 20 31 39 39 |o Grandi|.Xin 199|
|00001210| 30 20 73 75 62 73 74 61 | 6e 74 69 61 6c 6c 79 20 |0 substa|ntially |
|00001220| 72 65 63 6f 64 65 64 20 | 20 61 6e 64 20 72 65 70 |recoded | and rep|
|00001230| 61 63 6b 61 67 65 64 20 | 69 74 2e 0a 58 0a 58 41 |ackaged |it..X.XA|
|00001240| 73 20 69 74 20 73 74 61 | 6e 64 73 20 69 74 20 69 |s it sta|nds it i|
|00001250| 73 20 65 73 70 65 63 69 | 61 6c 6c 79 20 64 65 73 |s especi|ally des|
|00001260| 69 67 6e 65 64 20 66 6f | 72 20 61 20 73 74 6f 63 |igned fo|r a stoc|
|00001270| 6b 20 53 79 73 74 65 6d | 20 56 2f 33 38 36 20 72 |k System| V/386 r|
|00001280| 65 6c 2e 20 33 2e 32 0a | 58 73 79 73 74 65 6d 2c |el. 3.2.|Xsystem,|
|00001290| 20 65 2e 67 2e 20 45 53 | 49 58 2c 20 65 73 70 65 | e.g. ES|IX, espe|
|000012a0| 63 69 61 6c 6c 79 20 69 | 6e 61 73 6d 75 63 68 20 |cially i|nasmuch |
|000012b0| 69 6e 73 74 61 6c 6c 61 | 74 69 6f 6e 20 69 73 20 |installa|tion is |
|000012c0| 63 6f 6e 63 65 72 6e 65 | 64 2e 20 49 74 20 73 68 |concerne|d. It sh|
|000012d0| 6f 75 6c 64 0a 58 62 65 | 20 73 75 66 66 69 63 69 |ould.Xbe| suffici|
|000012e0| 65 6e 74 20 74 6f 20 73 | 61 79 20 27 6d 61 6b 65 |ent to s|ay 'make|
|000012f0| 20 69 6e 73 74 61 6c 6c | 27 20 74 6f 20 69 6e 73 | install|' to ins|
|00001300| 74 61 6c 6c 20 69 74 2c | 20 61 6e 64 20 74 68 65 |tall it,| and the|
|00001310| 6e 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 73 61 79 |n you sh|ould say|
|00001320| 0a 58 27 69 64 63 6f 6e | 66 69 67 27 20 61 6e 64 |.X'idcon|fig' and|
|00001330| 20 27 69 64 6d 6b 75 6e | 69 78 27 20 74 6f 20 72 | 'idmkun|ix' to r|
|00001340| 65 62 75 69 6c 64 20 74 | 68 65 20 6b 65 72 6e 65 |ebuild t|he kerne|
|00001350| 6c 2e 0a 58 0a 58 49 74 | 20 69 73 20 73 6f 20 73 |l..X.XIt| is so s|
|00001360| 69 6d 70 6c 65 20 74 68 | 61 74 20 69 74 20 73 68 |imple th|at it sh|
|00001370| 6f 75 6c 64 20 70 6f 72 | 74 20 76 65 72 79 20 71 |ould por|t very q|
|00001380| 75 69 63 6b 6c 79 20 74 | 6f 20 6f 74 68 65 72 20 |uickly t|o other |
|00001390| 66 6c 61 76 6f 75 72 73 | 20 6f 66 20 55 6e 69 78 |flavours| of Unix|
|000013a0| 3b 0a 58 74 68 65 20 6f | 6e 6c 79 20 74 68 69 6e |;.Xthe o|nly thin|
|000013b0| 67 20 74 68 61 74 20 6d | 61 79 20 6e 6f 74 20 62 |g that m|ay not b|
|000013c0| 65 20 70 6f 72 74 61 62 | 6c 65 20 69 73 20 74 68 |e portab|le is th|
|000013d0| 65 20 72 65 66 65 72 65 | 6e 63 65 20 74 6f 20 61 |e refere|nce to a|
|000013e0| 20 6b 65 72 6e 65 6c 0a | 58 70 72 6f 63 65 64 75 | kernel.|Xprocedu|
|000013f0| 72 65 20 63 61 6c 6c 65 | 64 20 27 74 65 6e 6d 69 |re calle|d 'tenmi|
|00001400| 63 72 6f 73 65 63 28 29 | 27 20 69 6e 20 70 70 2e |crosec()|' in pp.|
|00001410| 63 2c 20 77 68 69 63 68 | 20 64 6f 65 73 20 61 20 |c, which| does a |
|00001420| 62 75 73 79 20 6c 6f 6f | 70 20 6f 66 20 31 30 0a |busy loo|p of 10.|
|00001430| 58 6d 69 63 72 6f 73 65 | 63 6f 6e 64 73 2e 20 20 |Xmicrose|conds. |
|00001440| 49 74 20 69 73 20 66 61 | 69 72 6c 79 20 65 61 73 |It is fa|irly eas|
|00001450| 79 20 74 6f 20 72 6f 6c | 6c 20 79 6f 75 72 20 6f |y to rol|l your o|
|00001460| 77 6e 2c 20 6f 66 20 63 | 6f 75 72 73 65 2e 0a 45 |wn, of c|ourse..E|
|00001470| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00001480| 73 74 20 31 39 32 38 20 | 2d 6e 65 20 60 77 63 20 |st 1928 |-ne `wc |
|00001490| 2d 63 20 3c 27 52 45 41 | 44 4d 45 27 60 3b 20 74 |-c <'REA|DME'`; t|
|000014a0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|000014b0| 72 3a 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 20 |r: \"'RE|ADME'\" |
|000014c0| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|000014d0| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|000014e0| 6e 64 20 6f 66 20 27 52 | 45 41 44 4d 45 27 0a 66 |nd of 'R|EADME'.f|
|000014f0| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 4d 61 |i.if tes|t -f 'Ma|
|00001500| 6b 65 66 69 6c 65 27 20 | 2d 61 20 22 24 7b 31 7d |kefile' |-a "${1}|
|00001510| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00001520| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00001530| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00001540| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00001550| 27 4d 61 6b 65 66 69 6c | 65 27 5c 22 0a 65 6c 73 |'Makefil|e'\".els|
|00001560| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00001570| 72 61 63 74 69 6e 67 20 | 5c 22 27 4d 61 6b 65 66 |racting |\"'Makef|
|00001580| 69 6c 65 27 5c 22 20 5c | 28 32 30 31 20 63 68 61 |ile'\" \|(201 cha|
|00001590| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|000015a0| 2f 5e 58 2f 2f 22 20 3e | 27 4d 61 6b 65 66 69 6c |/^X//" >|'Makefil|
|000015b0| 65 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |e' <<'EN|D_OF_FIL|
|000015c0| 45 27 0a 58 43 4f 4e 46 | 09 09 3d 2f 65 74 63 2f |E'.XCONF|..=/etc/|
|000015d0| 63 6f 6e 66 2f 62 69 6e | 2f 0a 58 43 43 09 09 3d |conf/bin|/.XCC..=|
|000015e0| 63 63 0a 58 43 46 4c 41 | 47 53 09 09 3d 2d 4f 20 |cc.XCFLA|GS..=-O |
|000015f0| 2d 44 49 4e 4b 45 52 4e | 45 4c 0a 58 0a 58 44 72 |-DINKERN|EL.X.XDr|
|00001600| 69 76 65 72 2e 6f 3a 09 | 70 70 2e 6f 3b 09 09 09 |iver.o:.|pp.o;...|
|00001610| 6c 6e 20 24 3f 20 24 40 | 0a 58 53 70 61 63 65 2e |ln $? $@|.XSpace.|
|00001620| 63 3a 09 73 70 61 63 65 | 2e 63 3b 09 09 6c 6e 20 |c:.space|.c;..ln |
|00001630| 24 3f 20 24 40 0a 58 0a | 58 70 70 2e 6f 3a 09 09 |$? $@.X.|Xpp.o:..|
|00001640| 70 70 2e 68 0a 58 73 70 | 61 63 65 2e 6f 3a 09 70 |pp.h.Xsp|ace.o:.p|
|00001650| 70 2e 68 0a 58 0a 58 69 | 6e 73 74 61 6c 6c 3a 09 |p.h.X.Xi|nstall:.|
|00001660| 44 72 69 76 65 72 2e 6f | 20 53 70 61 63 65 2e 63 |Driver.o| Space.c|
|00001670| 20 4d 61 73 74 65 72 20 | 53 79 73 74 65 6d 20 4e | Master |System N|
|00001680| 6f 64 65 20 4e 61 6d 65 | 0a 58 09 24 28 43 4f 4e |ode Name|.X.$(CON|
|00001690| 46 29 69 64 69 6e 73 74 | 61 6c 6c 20 2d 6b 65 75 |F)idinst|all -keu|
|000016a0| 20 70 70 0a 58 09 24 28 | 43 4f 4e 46 29 69 64 6d | pp.X.$(|CONF)idm|
|000016b0| 6b 6e 6f 64 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |knod.END|_OF_FILE|
|000016c0| 0a 69 66 20 74 65 73 74 | 20 32 30 31 20 2d 6e 65 |.if test| 201 -ne|
|000016d0| 20 60 77 63 20 2d 63 20 | 3c 27 4d 61 6b 65 66 69 | `wc -c |<'Makefi|
|000016e0| 6c 65 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 23 |le'`; th|en. #|
|000016f0| 20 41 68 65 6d 2e 20 49 | 20 68 61 76 65 20 6a 75 | Ahem. I| have ju|
|00001700| 73 74 20 65 64 69 74 65 | 64 20 74 68 65 20 73 68 |st edite|d the sh|
|00001710| 61 72 20 66 69 6c 65 2e | 2e 2e 0a 66 69 0a 23 20 |ar file.|...fi.# |
|00001720| 65 6e 64 20 6f 66 20 27 | 4d 61 6b 65 66 69 6c 65 |end of '|Makefile|
|00001730| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00001740| 27 4d 61 73 74 65 72 27 | 20 2d 61 20 22 24 7b 31 |'Master'| -a "${1|
|00001750| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00001760| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00001770| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00001780| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00001790| 22 27 4d 61 73 74 65 72 | 27 5c 22 0a 65 6c 73 65 |"'Master|'\".else|
|000017a0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|000017b0| 61 63 74 69 6e 67 20 5c | 22 27 4d 61 73 74 65 72 |acting \|"'Master|
|000017c0| 27 5c 22 20 5c 28 32 39 | 20 63 68 61 72 61 63 74 |'\" \(29| charact|
|000017d0| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|000017e0| 2f 22 20 3e 27 4d 61 73 | 74 65 72 27 20 3c 3c 27 |/" >'Mas|ter' <<'|
|000017f0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 70 70 |END_OF_F|ILE'.Xpp|
|00001800| 09 49 6f 63 77 09 69 63 | 6f 48 47 4f 09 70 70 09 |.Iocw.ic|oHGO.pp.|
|00001810| 30 09 30 09 31 09 33 09 | 2d 31 0a 45 4e 44 5f 4f |0.0.1.3.|-1.END_O|
|00001820| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 32 |F_FILE.i|f test 2|
|00001830| 39 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 4d |9 -ne `w|c -c <'M|
|00001840| 61 73 74 65 72 27 60 3b | 20 74 68 65 6e 0a 20 20 |aster'`;| then. |
|00001850| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00001860| 4d 61 73 74 65 72 27 5c | 22 20 75 6e 70 61 63 6b |Master'\|" unpack|
|00001870| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00001880| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00001890| 27 4d 61 73 74 65 72 27 | 0a 66 69 0a 69 66 20 74 |'Master'|.fi.if t|
|000018a0| 65 73 74 20 2d 66 20 27 | 4e 61 6d 65 27 20 2d 61 |est -f '|Name' -a|
|000018b0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|000018c0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|000018d0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|000018e0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|000018f0| 69 6c 65 20 5c 22 27 4e | 61 6d 65 27 5c 22 0a 65 |ile \"'N|ame'\".e|
|00001900| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00001910| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 4e 61 6d |xtractin|g \"'Nam|
|00001920| 65 27 5c 22 20 5c 28 34 | 33 20 63 68 61 72 61 63 |e'\" \(4|3 charac|
|00001930| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00001940| 2f 2f 22 20 3e 27 4e 61 | 6d 65 27 20 3c 3c 27 45 |//" >'Na|me' <<'E|
|00001950| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 70 70 20 |ND_OF_FI|LE'.Xpp |
|00001960| 50 61 72 61 6c 6c 65 6c | 20 70 6f 72 74 20 64 72 |Parallel| port dr|
|00001970| 69 76 65 72 2c 20 72 61 | 77 20 70 6f 6c 6c 65 64 |iver, ra|w polled|
|00001980| 20 6f 75 74 70 75 74 0a | 45 4e 44 5f 4f 46 5f 46 | output.|END_OF_F|
|00001990| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 34 33 20 2d |ILE.if t|est 43 -|
|000019a0| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 4e 61 6d 65 |ne `wc -|c <'Name|
|000019b0| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|000019c0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 4e 61 6d 65 27 |o shar: |\"'Name'|
|000019d0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|000019e0| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|000019f0| 23 20 65 6e 64 20 6f 66 | 20 27 4e 61 6d 65 27 0a |# end of| 'Name'.|
|00001a00| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 4e |fi.if te|st -f 'N|
|00001a10| 6f 64 65 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ode' -a |"${1}" !|
|00001a20| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00001a30| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00001a40| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00001a50| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 4e 6f |sting fi|le \"'No|
|00001a60| 64 65 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |de'\".el|se.echo |
|00001a70| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00001a80| 20 5c 22 27 4e 6f 64 65 | 27 5c 22 20 5c 28 33 33 | \"'Node|'\" \(33|
|00001a90| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00001aa0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 4e 6f 64 |d "s/^X/|/" >'Nod|
|00001ab0| 65 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |e' <<'EN|D_OF_FIL|
|00001ac0| 45 27 0a 58 70 70 09 70 | 70 30 09 63 09 30 0a 58 |E'.Xpp.p|p0.c.0.X|
|00001ad0| 70 70 09 70 70 31 09 63 | 09 31 0a 58 70 70 09 70 |pp.pp1.c|.1.Xpp.p|
|00001ae0| 70 32 09 63 09 32 0a 45 | 4e 44 5f 4f 46 5f 46 49 |p2.c.2.E|ND_OF_FI|
|00001af0| 4c 45 0a 69 66 20 74 65 | 73 74 20 33 33 20 2d 6e |LE.if te|st 33 -n|
|00001b00| 65 20 60 77 63 20 2d 63 | 20 3c 27 4e 6f 64 65 27 |e `wc -c| <'Node'|
|00001b10| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00001b20| 20 73 68 61 72 3a 20 5c | 22 27 4e 6f 64 65 27 5c | shar: \|"'Node'\|
|00001b30| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00001b40| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00001b50| 20 65 6e 64 20 6f 66 20 | 27 4e 6f 64 65 27 0a 66 | end of |'Node'.f|
|00001b60| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 70 70 |i.if tes|t -f 'pp|
|00001b70| 2e 63 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.c' -a "|${1}" !=|
|00001b80| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00001b90| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00001ba0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001bb0| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 70 70 2e |ting fil|e \"'pp.|
|00001bc0| 63 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |c'\".els|e.echo s|
|00001bd0| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00001be0| 5c 22 27 70 70 2e 63 27 | 5c 22 20 5c 28 36 32 37 |\"'pp.c'|\" \(627|
|00001bf0| 31 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |1 charac|ters\).s|
|00001c00| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 70 70 |ed "s/^X|//" >'pp|
|00001c10| 2e 63 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.c' <<'E|ND_OF_FI|
|00001c20| 4c 45 27 0a 58 2f 2a 0a | 58 20 20 20 20 24 48 65 |LE'.X/*.|X $He|
|00001c30| 61 64 65 72 24 0a 58 2a | 2f 0a 58 0a 58 73 74 61 |ader$.X*|/.X.Xsta|
|00001c40| 74 69 63 20 63 68 61 72 | 20 4e 6f 74 69 63 65 5b |tic char| Notice[|
|00001c50| 5d 20 3d 0a 58 20 20 20 | 20 22 43 6f 70 79 72 69 |] =.X | "Copyri|
|00001c60| 67 68 74 20 31 39 39 30 | 20 50 69 65 72 63 61 72 |ght 1990| Piercar|
|00001c70| 6c 6f 20 47 72 61 6e 64 | 69 2e 20 41 6c 6c 20 72 |lo Grand|i. All r|
|00001c80| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 22 |ights re|served."|
|00001c90| 3b 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 54 68 69 |;.X.X/*.|X Thi|
|00001ca0| 73 20 64 72 69 76 65 72 | 20 69 73 20 66 72 65 65 |s driver| is free|
|00001cb0| 20 73 6f 66 74 77 61 72 | 65 3b 20 79 6f 75 20 63 | softwar|e; you c|
|00001cc0| 61 6e 20 72 65 64 69 73 | 74 72 69 62 75 74 65 20 |an redis|tribute |
|00001cd0| 69 74 20 61 6e 64 2f 6f | 72 0a 58 20 20 20 20 6d |it and/o|r.X m|
|00001ce0| 6f 64 69 66 79 20 69 74 | 20 75 6e 64 65 72 20 74 |odify it| under t|
|00001cf0| 68 65 20 74 65 72 6d 73 | 20 6f 66 20 74 68 65 20 |he terms| of the |
|00001d00| 47 4e 55 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |GNU Gene|ral Publ|
|00001d10| 69 63 20 4c 69 63 65 6e | 73 65 20 61 73 0a 58 20 |ic Licen|se as.X |
|00001d20| 20 20 20 70 75 62 6c 69 | 73 68 65 64 20 62 79 20 | publi|shed by |
|00001d30| 74 68 65 20 46 72 65 65 | 20 53 6f 66 74 77 61 72 |the Free| Softwar|
|00001d40| 65 20 46 6f 75 6e 64 61 | 74 69 6f 6e 3b 20 65 69 |e Founda|tion; ei|
|00001d50| 74 68 65 72 20 76 65 72 | 73 69 6f 6e 20 31 2c 20 |ther ver|sion 1, |
|00001d60| 6f 72 0a 58 20 20 20 20 | 28 61 74 20 79 6f 75 72 |or.X |(at your|
|00001d70| 20 6f 70 74 69 6f 6e 29 | 20 61 6e 79 20 6c 61 74 | option)| any lat|
|00001d80| 65 72 20 76 65 72 73 69 | 6f 6e 2e 0a 58 0a 58 20 |er versi|on..X.X |
|00001d90| 20 20 20 41 73 20 61 20 | 73 70 65 63 69 61 6c 20 | As a |special |
|00001da0| 63 61 73 65 2c 20 74 68 | 69 73 20 64 72 69 76 65 |case, th|is drive|
|00001db0| 72 20 6d 61 79 20 62 65 | 20 69 6e 63 6f 72 70 6f |r may be| incorpo|
|00001dc0| 72 61 74 65 64 20 69 6e | 20 61 6e 79 20 4f 53 20 |rated in| any OS |
|00001dd0| 6b 65 72 6e 65 6c 2c 0a | 58 20 20 20 20 77 68 65 |kernel,.|X whe|
|00001de0| 74 68 65 72 20 74 68 65 | 20 47 4e 55 20 47 65 6e |ther the| GNU Gen|
|00001df0| 65 72 61 6c 20 50 75 62 | 6c 69 63 20 4c 69 63 65 |eral Pub|lic Lice|
|00001e00| 6e 73 65 20 61 70 70 6c | 69 65 73 20 74 6f 20 69 |nse appl|ies to i|
|00001e10| 74 20 6f 72 20 6e 6f 74 | 2e 0a 58 0a 58 20 20 20 |t or not|..X.X |
|00001e20| 20 54 68 69 73 20 64 72 | 69 76 65 72 20 69 73 20 | This dr|iver is |
|00001e30| 64 69 73 74 72 69 62 75 | 74 65 64 20 69 6e 20 74 |distribu|ted in t|
|00001e40| 68 65 20 68 6f 70 65 20 | 74 68 61 74 20 69 74 20 |he hope |that it |
|00001e50| 77 69 6c 6c 20 62 65 20 | 75 73 65 66 75 6c 2c 0a |will be |useful,.|
|00001e60| 58 20 20 20 20 62 75 74 | 20 57 49 54 48 4f 55 54 |X but| WITHOUT|
|00001e70| 20 41 4e 59 20 57 41 52 | 52 41 4e 54 59 3b 20 77 | ANY WAR|RANTY; w|
|00001e80| 69 74 68 6f 75 74 20 65 | 76 65 6e 20 74 68 65 20 |ithout e|ven the |
|00001e90| 69 6d 70 6c 69 65 64 20 | 77 61 72 72 61 6e 74 79 |implied |warranty|
|00001ea0| 20 6f 66 0a 58 20 20 20 | 20 4d 45 52 43 48 41 4e | of.X | MERCHAN|
|00001eb0| 54 41 42 49 4c 49 54 59 | 20 6f 72 20 46 49 54 4e |TABILITY| or FITN|
|00001ec0| 45 53 53 20 46 4f 52 20 | 41 20 50 41 52 54 49 43 |ESS FOR |A PARTIC|
|00001ed0| 55 4c 41 52 20 50 55 52 | 50 4f 53 45 2e 20 20 53 |ULAR PUR|POSE. S|
|00001ee0| 65 65 20 74 68 65 0a 58 | 20 20 20 20 47 4e 55 20 |ee the.X| GNU |
|00001ef0| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00001f00| 69 63 65 6e 73 65 20 66 | 6f 72 20 6d 6f 72 65 20 |icense f|or more |
|00001f10| 64 65 74 61 69 6c 73 2e | 0a 58 0a 58 20 20 20 20 |details.|.X.X |
|00001f20| 59 6f 75 20 6d 61 79 20 | 68 61 76 65 20 72 65 63 |You may |have rec|
|00001f30| 65 69 76 65 64 20 61 20 | 63 6f 70 79 20 6f 66 20 |eived a |copy of |
|00001f40| 74 68 65 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 |the GNU |General |
|00001f50| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 0a 58 |Public L|icense.X|
|00001f60| 20 20 20 20 61 6c 6f 6e | 67 20 77 69 74 68 20 74 | alon|g with t|
|00001f70| 68 69 73 20 64 72 69 76 | 65 72 3b 20 69 66 20 6e |his driv|er; if n|
|00001f80| 6f 74 2c 20 77 72 69 74 | 65 20 74 6f 20 74 68 65 |ot, writ|e to the|
|00001f90| 20 46 72 65 65 20 53 6f | 66 74 77 61 72 65 0a 58 | Free So|ftware.X|
|00001fa0| 20 20 20 20 46 6f 75 6e | 64 61 74 69 6f 6e 2c 20 | Foun|dation, |
|00001fb0| 49 6e 63 2e 2c 20 36 37 | 35 20 4d 61 73 73 20 41 |Inc., 67|5 Mass A|
|00001fc0| 76 65 2c 20 43 61 6d 62 | 72 69 64 67 65 2c 20 4d |ve, Camb|ridge, M|
|00001fd0| 41 20 30 32 31 33 39 2c | 20 55 53 41 2e 0a 58 2a |A 02139,| USA..X*|
|00001fe0| 2f 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 46 61 73 |/.X.X/*.|X Fas|
|00001ff0| 74 20 70 61 72 61 6c 6c | 65 6c 20 70 6f 72 74 20 |t parall|el port |
|00002000| 64 72 69 76 65 72 2c 20 | 70 6f 6c 6c 69 6e 67 2c |driver, |polling,|
|00002010| 20 6e 6f 20 69 6e 74 65 | 72 72 75 70 74 73 20 28 | no inte|rrupts (|
|00002020| 73 6f 6d 65 77 68 61 74 | 20 69 6e 73 70 69 72 65 |somewhat| inspire|
|00002030| 64 20 62 79 20 61 0a 58 | 20 20 20 20 64 72 69 76 |d by a.X| driv|
|00002040| 65 72 20 66 72 6f 6d 20 | 4d 69 63 68 61 65 6c 20 |er from |Michael |
|00002050| 47 72 65 6e 69 65 72 20 | 3c 6d 69 6b 65 40 63 69 |Grenier |<mike@ci|
|00002060| 6d 63 6f 72 2e 6d 6e 2e | 6f 72 67 3e 29 0a 58 2a |mcor.mn.|org>).X*|
|00002070| 2f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 22 73 |/.X.X#in|clude "s|
|00002080| 79 73 2f 70 61 72 61 6d | 2e 68 22 0a 58 23 69 6e |ys/param|.h".X#in|
|00002090| 63 6c 75 64 65 20 22 73 | 79 73 2f 74 79 70 65 73 |clude "s|ys/types|
|000020a0| 2e 68 22 0a 58 23 69 6e | 63 6c 75 64 65 20 22 73 |.h".X#in|clude "s|
|000020b0| 79 73 2f 64 69 72 2e 68 | 22 0a 58 23 69 6e 63 6c |ys/dir.h|".X#incl|
|000020c0| 75 64 65 20 22 73 79 73 | 2f 73 69 67 6e 61 6c 2e |ude "sys|/signal.|
|000020d0| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 73 79 |h".X#inc|lude "sy|
|000020e0| 73 2f 75 73 65 72 2e 68 | 22 0a 58 23 69 6e 63 6c |s/user.h|".X#incl|
|000020f0| 75 64 65 20 22 73 79 73 | 2f 65 72 72 6e 6f 2e 68 |ude "sys|/errno.h|
|00002100| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 22 73 79 73 |".X#incl|ude "sys|
|00002110| 2f 73 79 73 6d 61 63 72 | 6f 73 2e 68 22 0a 58 0a |/sysmacr|os.h".X.|
|00002120| 58 23 69 66 64 65 66 20 | 70 70 44 45 42 55 47 0a |X#ifdef |ppDEBUG.|
|00002130| 58 20 20 20 20 69 6e 74 | 09 09 09 20 20 20 20 70 |X int|... p|
|00002140| 70 5f 64 65 62 75 67 20 | 3d 20 31 3b 0a 58 23 20 |p_debug |= 1;.X# |
|00002150| 20 20 64 65 66 69 6e 65 | 20 44 45 42 55 47 28 6c | define| DEBUG(l|
|00002160| 69 73 74 29 09 20 20 20 | 20 64 6f 20 69 66 20 28 |ist). | do if (|
|00002170| 70 70 5f 64 65 62 75 67 | 29 20 28 6c 69 73 74 29 |pp_debug|) (list)|
|00002180| 3b 20 77 68 69 6c 65 20 | 28 30 29 3b 0a 58 20 20 |; while |(0);.X |
|00002190| 20 20 69 6e 74 09 09 09 | 20 20 20 20 70 70 5f 70 | int...| pp_p|
|000021a0| 61 75 73 65 20 3d 20 30 | 3b 0a 58 20 20 20 20 69 |ause = 0|;.X i|
|000021b0| 6e 74 09 09 09 20 20 20 | 20 70 70 5f 73 70 69 6e |nt... | pp_spin|
|000021c0| 20 3d 20 30 3b 0a 58 23 | 65 6c 73 65 0a 58 23 20 | = 0;.X#|else.X# |
|000021d0| 20 20 64 65 66 69 6e 65 | 20 44 45 42 55 47 28 6c | define| DEBUG(l|
|000021e0| 69 73 74 29 09 20 20 20 | 20 2f 2a 20 73 6b 69 70 |ist). | /* skip|
|000021f0| 20 2a 2f 0a 58 23 65 6e | 64 69 66 0a 58 0a 58 23 | */.X#en|dif.X.X#|
|00002200| 69 6e 63 6c 75 64 65 20 | 22 73 79 73 2f 70 70 2e |include |"sys/pp.|
|00002210| 68 22 0a 58 0a 58 2f 2a | 0a 58 20 20 20 20 41 20 |h".X.X/*|.X A |
|00002220| 6c 6f 6e 67 20 70 61 75 | 73 65 20 66 6f 72 20 70 |long pau|se for p|
|00002230| 6f 6c 6c 69 6e 67 20 74 | 68 65 20 70 72 69 6e 74 |olling t|he print|
|00002240| 65 72 20 75 6e 74 69 6c | 20 69 74 20 69 73 20 6f |er until| it is o|
|00002250| 6e 6c 69 6e 65 20 61 67 | 61 69 6e 0a 58 20 20 20 |nline ag|ain.X |
|00002260| 20 74 68 65 20 70 61 75 | 73 65 20 77 68 69 6c 65 | the pau|se while|
|00002270| 20 74 68 65 20 73 74 72 | 6f 62 65 20 69 73 20 68 | the str|obe is h|
|00002280| 69 67 68 2c 20 61 6e 64 | 20 61 20 73 68 6f 72 74 |igh, and| a short|
|00002290| 20 70 61 75 73 65 20 74 | 6f 20 77 61 69 74 0a 58 | pause t|o wait.X|
|000022a0| 20 20 20 20 66 6f 72 20 | 74 68 65 20 69 6e 74 65 | for |the inte|
|000022b0| 72 66 61 63 65 20 74 6f | 20 62 65 63 6f 6d 65 20 |rface to| become |
|000022c0| 72 65 61 64 79 20 66 6f | 72 20 74 68 65 20 6e 65 |ready fo|r the ne|
|000022d0| 78 74 20 63 68 61 72 61 | 63 74 65 72 2e 0a 58 20 |xt chara|cter..X |
|000022e0| 20 20 20 54 68 65 20 6c | 6f 6e 67 65 72 20 70 61 | The l|onger pa|
|000022f0| 75 73 65 20 69 73 20 64 | 6f 6e 65 20 73 6c 65 65 |use is d|one slee|
|00002300| 70 69 6e 67 2c 20 74 68 | 65 20 6f 74 68 65 72 20 |ping, th|e other |
|00002310| 74 77 6f 20 61 72 65 20 | 64 6f 6e 65 0a 58 20 20 |two are |done.X |
|00002320| 20 20 73 70 69 6e 6e 69 | 6e 67 2c 20 73 6f 20 74 | spinni|ng, so t|
|00002330| 68 65 79 20 68 61 64 20 | 62 65 74 74 65 72 20 62 |hey had |better b|
|00002340| 65 20 66 65 77 2e 0a 58 | 2a 2f 0a 58 0a 58 65 78 |e few..X|*/.X.Xex|
|00002350| 74 65 72 6e 20 69 6e 74 | 09 09 74 65 6e 6d 69 63 |tern int|..tenmic|
|00002360| 72 6f 73 65 63 28 29 3b | 0a 58 0a 58 23 64 65 66 |rosec();|.X.X#def|
|00002370| 69 6e 65 20 70 70 53 50 | 49 4e 28 29 09 28 76 6f |ine ppSP|IN().(vo|
|00002380| 69 64 29 20 28 74 65 6e | 6d 69 63 72 6f 73 65 63 |id) (ten|microsec|
|00002390| 28 29 29 0a 58 23 64 65 | 66 69 6e 65 20 70 70 53 |()).X#de|fine ppS|
|000023a0| 54 52 4f 42 45 53 50 49 | 4e 28 29 09 7b 20 69 6e |TROBESPI|N().{ in|
|000023b0| 74 20 6e 20 3d 20 70 70 | 5f 73 74 72 6f 62 65 3b |t n = pp|_strobe;|
|000023c0| 20 64 6f 20 28 76 6f 69 | 64 29 20 74 65 6e 6d 69 | do (voi|d) tenmi|
|000023d0| 63 72 6f 73 65 63 28 29 | 3b 20 77 68 69 6c 65 20 |crosec()|; while |
|000023e0| 28 2d 2d 6e 29 3b 20 7d | 0a 58 0a 58 65 78 74 65 |(--n); }|.X.Xexte|
|000023f0| 72 6e 20 69 6e 74 09 09 | 48 7a 3b 0a 58 65 78 74 |rn int..|Hz;.Xext|
|00002400| 65 72 6e 20 69 6e 74 09 | 09 77 61 6b 65 75 70 28 |ern int.|.wakeup(|
|00002410| 29 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 09 09 |);.Xexte|rn int..|
|00002420| 74 69 6d 65 6f 75 74 28 | 29 3b 0a 58 65 78 74 65 |timeout(|);.Xexte|
|00002430| 72 6e 20 69 6e 74 09 09 | 73 6c 65 65 70 28 29 3b |rn int..|sleep();|
|00002440| 0a 58 0a 58 23 64 65 66 | 69 6e 65 20 70 70 50 41 |.X.X#def|ine ppPA|
|00002450| 55 53 45 28 75 29 09 28 | 76 6f 69 64 29 20 28 74 |USE(u).(|void) (t|
|00002460| 69 6d 65 6f 75 74 28 77 | 61 6b 65 75 70 2c 28 75 |imeout(w|akeup,(u|
|00002470| 29 2c 48 7a 2f 33 29 2c | 73 6c 65 65 70 28 28 75 |),Hz/3),|sleep((u|
|00002480| 29 2c 50 53 4c 45 50 29 | 29 0a 58 0a 58 65 78 74 |),PSLEP)|).X.Xext|
|00002490| 65 72 6e 20 69 6e 74 09 | 09 69 6e 62 28 29 3b 0a |ern int.|.inb();.|
|000024a0| 58 65 78 74 65 72 6e 09 | 09 09 6f 75 74 62 28 29 |Xextern.|..outb()|
|000024b0| 3b 0a 58 0a 58 65 78 74 | 65 72 6e 20 69 6e 74 09 |;.X.Xext|ern int.|
|000024c0| 09 70 70 69 6e 69 74 28 | 29 0a 58 7b 0a 58 20 20 |.ppinit(|).X{.X |
|000024d0| 20 20 69 6e 74 09 09 09 | 20 20 20 20 75 6e 69 74 | int...| unit|
|000024e0| 3b 0a 58 0a 58 20 20 20 | 20 66 6f 72 20 28 75 6e |;.X.X | for (un|
|000024f0| 69 74 20 3d 20 30 3b 20 | 75 6e 69 74 20 3c 20 70 |it = 0; |unit < p|
|00002500| 70 5f 6d 61 78 3b 20 75 | 6e 69 74 2b 2b 29 0a 58 |p_max; u|nit++).X|
|00002510| 20 20 20 20 7b 0a 58 09 | 6f 75 74 62 28 70 70 5f | {.X.|outb(pp_|
|00002520| 63 6f 6e 66 69 67 5b 75 | 6e 69 74 5d 2e 63 6f 6e |config[u|nit].con|
|00002530| 74 72 6f 6c 2c 28 70 70 | 53 45 4c 45 43 54 7c 70 |trol,(pp|SELECT|p|
|00002540| 70 4e 4f 54 52 45 53 45 | 54 29 29 3b 0a 58 09 44 |pNOTRESE|T));.X.D|
|00002550| 45 42 55 47 28 70 72 69 | 6e 74 66 28 22 49 6e 69 |EBUG(pri|ntf("Ini|
|00002560| 74 69 61 6c 20 73 74 61 | 74 75 73 20 6f 66 20 2f |tial sta|tus of /|
|00002570| 64 65 76 2f 70 70 25 64 | 20 69 73 20 25 78 5c 6e |dev/pp%d| is %x\n|
|00002580| 22 2c 0a 58 09 09 75 6e | 69 74 2c 69 6e 62 28 70 |",.X..un|it,inb(p|
|00002590| 70 5f 63 6f 6e 66 69 67 | 5b 75 6e 69 74 5d 2e 73 |p_config|[unit].s|
|000025a0| 74 61 74 75 73 29 29 29 | 3b 0a 58 20 20 20 20 7d |tatus)))|;.X }|
|000025b0| 0a 58 7d 0a 58 0a 58 65 | 78 74 65 72 6e 20 69 6e |.X}.X.Xe|xtern in|
|000025c0| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 |t | p|
|000025d0| 70 6f 70 65 6e 28 64 65 | 76 2c 6d 6f 64 65 29 0a |popen(de|v,mode).|
|000025e0| 58 20 20 20 20 69 6e 74 | 09 09 09 20 20 20 20 64 |X int|... d|
|000025f0| 65 76 2c 6d 6f 64 65 3b | 0a 58 7b 0a 58 20 20 20 |ev,mode;|.X{.X |
|00002600| 20 72 65 67 69 73 74 65 | 72 20 69 6e 74 09 20 20 | registe|r int. |
|00002610| 20 20 75 6e 69 74 20 3d | 20 6d 69 6e 6f 72 28 64 | unit =| minor(d|
|00002620| 65 76 29 3b 0a 58 20 20 | 20 20 72 65 67 69 73 74 |ev);.X | regist|
|00002630| 65 72 20 69 6e 74 09 20 | 20 20 20 73 74 61 74 75 |er int. | statu|
|00002640| 73 3b 0a 58 0a 58 20 20 | 20 20 69 66 20 28 75 6e |s;.X.X | if (un|
|00002650| 69 74 20 3e 3d 20 70 70 | 5f 6d 61 78 29 0a 58 20 |it >= pp|_max).X |
|00002660| 20 20 20 7b 0a 58 09 75 | 2e 75 5f 65 72 72 6f 72 | {.X.u|.u_error|
|00002670| 20 3d 20 45 49 4f 3b 0a | 58 09 72 65 74 75 72 6e | = EIO;.|X.return|
|00002680| 3b 0a 58 20 20 20 20 7d | 0a 58 0a 58 20 20 20 20 |;.X }|.X.X |
|00002690| 73 74 61 74 75 73 20 3d | 20 69 6e 62 28 70 70 5f |status =| inb(pp_|
|000026a0| 63 6f 6e 66 69 67 5b 75 | 6e 69 74 5d 2e 73 74 61 |config[u|nit].sta|
|000026b0| 74 75 73 29 3b 0a 58 0a | 58 20 20 20 20 69 66 20 |tus);.X.|X if |
|000026c0| 28 28 73 74 61 74 75 73 | 26 30 78 66 66 29 20 3d |((status|&0xff) =|
|000026d0| 3d 20 30 78 66 66 29 0a | 58 20 20 20 20 7b 0a 58 |= 0xff).|X {.X|
|000026e0| 09 75 2e 75 5f 65 72 72 | 6f 72 20 3d 20 45 4e 58 |.u.u_err|or = ENX|
|000026f0| 49 4f 3b 0a 58 09 44 45 | 42 55 47 28 70 72 69 6e |IO;.X.DE|BUG(prin|
|00002700| 74 66 28 22 50 72 69 6e | 74 65 72 20 2f 64 65 76 |tf("Prin|ter /dev|
|00002710| 2f 70 70 25 64 20 64 6f | 65 73 20 6e 6f 74 20 65 |/pp%d do|es not e|
|00002720| 78 69 73 74 5c 6e 22 2c | 75 6e 69 74 29 29 3b 0a |xist\n",|unit));.|
|00002730| 58 09 72 65 74 75 72 6e | 3b 0a 58 20 20 20 20 7d |X.return|;.X }|
|00002740| 0a 58 0a 58 20 20 20 20 | 2f 2a 0a 58 09 57 65 20 |.X.X |/*.X.We |
|00002750| 69 67 6e 6f 72 65 20 65 | 72 72 6f 72 20 63 6f 6e |ignore e|rror con|
|00002760| 64 69 74 69 6f 6e 20 65 | 78 63 65 70 74 20 77 68 |dition e|xcept wh|
|00002770| 65 6e 20 70 72 69 6e 74 | 65 72 20 69 73 20 6f 6e |en print|er is on|
|00002780| 6c 69 6e 65 20 72 65 61 | 64 79 2e 0a 58 20 20 20 |line rea|dy..X |
|00002790| 20 2a 2f 0a 58 0a 58 20 | 20 20 20 69 66 20 28 28 | */.X.X | if ((|
|000027a0| 73 74 61 74 75 73 26 28 | 70 70 4f 4e 4c 49 4e 45 |status&(|ppONLINE|
|000027b0| 7c 70 70 4e 4f 54 42 55 | 53 59 7c 70 70 4e 4f 54 ||ppNOTBU|SY|ppNOT|
|000027c0| 45 52 52 4f 52 29 29 20 | 3d 3d 20 28 70 70 4f 4e |ERROR)) |== (ppON|
|000027d0| 4c 49 4e 45 7c 70 70 4e | 4f 54 42 55 53 59 29 29 |LINE|ppN|OTBUSY))|
|000027e0| 0a 58 20 20 20 20 7b 0a | 58 09 75 2e 75 5f 65 72 |.X {.|X.u.u_er|
|000027f0| 72 6f 72 20 3d 20 45 49 | 4f 3b 0a 58 09 44 45 42 |ror = EI|O;.X.DEB|
|00002800| 55 47 28 70 72 69 6e 74 | 66 28 22 45 72 72 6f 72 |UG(print|f("Error|
|00002810| 20 73 74 61 74 75 73 20 | 25 78 20 64 65 74 65 63 | status |%x detec|
|00002820| 74 65 64 20 6f 6e 20 2f | 64 65 76 2f 70 70 25 64 |ted on /|dev/pp%d|
|00002830| 5c 6e 22 2c 73 74 61 74 | 75 73 2c 75 6e 69 74 29 |\n",stat|us,unit)|
|00002840| 29 3b 0a 58 09 72 65 74 | 75 72 6e 3b 0a 58 20 20 |);.X.ret|urn;.X |
|00002850| 20 20 7d 0a 58 0a 58 20 | 20 20 20 44 45 42 55 47 | }.X.X | DEBUG|
|00002860| 28 28 70 70 5f 70 61 75 | 73 65 20 3d 20 30 2c 20 |((pp_pau|se = 0, |
|00002870| 70 70 5f 73 70 69 6e 20 | 3d 20 30 29 29 3b 0a 58 |pp_spin |= 0));.X|
|00002880| 7d 0a 58 0a 58 65 78 74 | 65 72 6e 20 69 6e 74 20 |}.X.Xext|ern int |
|00002890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 70 63 | | ppc|
|000028a0| 6c 6f 73 65 28 64 65 76 | 29 0a 58 20 20 20 20 69 |lose(dev|).X i|
|000028b0| 6e 74 09 09 09 20 20 20 | 20 64 65 76 3b 0a 58 7b |nt... | dev;.X{|
|000028c0| 0a 58 20 20 20 20 44 45 | 42 55 47 28 70 72 69 6e |.X DE|BUG(prin|
|000028d0| 74 66 28 22 50 72 69 6e | 74 65 72 20 70 61 75 73 |tf("Prin|ter paus|
|000028e0| 65 64 20 25 64 20 61 6e | 64 20 73 70 75 6e 20 25 |ed %d an|d spun %|
|000028f0| 64 20 74 69 6d 65 73 5c | 6e 22 2c 70 70 5f 70 61 |d times\|n",pp_pa|
|00002900| 75 73 65 2c 70 70 5f 73 | 70 69 6e 29 29 3b 0a 58 |use,pp_s|pin));.X|
|00002910| 7d 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 54 68 65 |}.X.X/*.|X The|
|00002920| 20 65 78 69 74 20 63 6f | 6e 64 69 74 69 6f 6e 73 | exit co|nditions|
|00002930| 20 66 72 6f 6d 20 74 68 | 65 20 74 77 6f 20 70 6f | from th|e two po|
|00002940| 6c 6c 69 6e 67 20 6c 6f | 6f 70 73 20 68 65 72 65 |lling lo|ops here|
|00002950| 20 61 72 65 20 61 20 62 | 69 74 20 66 75 6e 6e 79 | are a b|it funny|
|00002960| 2c 0a 58 20 20 20 20 6d | 79 20 70 72 69 6e 74 65 |,.X m|y printe|
|00002970| 72 20 28 45 50 53 4f 4e | 20 53 51 38 35 30 29 20 |r (EPSON| SQ850) |
|00002980| 61 6e 64 20 70 61 72 61 | 6c 6c 65 20 70 6f 72 74 |and para|lle port|
|00002990| 20 67 69 76 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 | give th|e follow|
|000029a0| 69 6e 67 20 73 74 61 74 | 75 73 65 73 3a 0a 58 0a |ing stat|uses:.X.|
|000029b0| 58 09 09 09 09 4e 4f 54 | 42 55 53 59 20 4e 4f 54 |X....NOT|BUSY NOT|
|000029c0| 41 43 4b 20 20 4e 4f 50 | 41 50 45 52 20 4f 4e 4c |ACK NOP|APER ONL|
|000029d0| 49 4e 45 20 20 4e 4f 54 | 45 52 52 4f 52 0a 58 0a |INE NOT|ERROR.X.|
|000029e0| 58 09 70 6f 72 74 20 6d | 69 73 73 69 6e 67 09 09 |X.port m|issing..|
|000029f0| 31 09 31 09 31 09 31 09 | 31 0a 58 09 70 72 69 6e |1.1.1.1.|1.X.prin|
|00002a00| 74 65 72 20 70 6f 77 65 | 72 20 6f 66 66 09 31 09 |ter powe|r off.1.|
|00002a10| 30 09 30 09 30 09 30 0a | 58 09 70 72 69 6e 74 65 |0.0.0.0.|X.printe|
|00002a20| 72 20 6e 6f 74 20 74 68 | 65 72 65 09 31 09 31 09 |r not th|ere.1.1.|
|00002a30| 30 09 31 09 30 0a 58 09 | 6f 66 66 6c 69 6e 65 09 |0.1.0.X.|offline.|
|00002a40| 09 09 30 09 31 09 30 09 | 31 09 30 0a 58 09 6f 6e |..0.1.0.|1.0.X.on|
|00002a50| 6c 69 6e 65 09 09 09 31 | 09 31 09 30 09 31 09 31 |line...1|.1.0.1.1|
|00002a60| 0a 58 09 69 6e 74 65 72 | 66 61 63 65 20 62 75 73 |.X.inter|face bus|
|00002a70| 79 09 09 30 09 31 09 30 | 09 31 09 31 0a 58 0a 58 |y..0.1.0|.1.1.X.X|
|00002a80| 20 20 20 20 54 68 65 73 | 65 20 61 72 65 20 73 6f | Thes|e are so|
|00002a90| 6d 65 77 68 61 74 20 73 | 75 72 70 72 69 73 69 6e |mewhat s|urprisin|
|00002aa0| 67 3b 20 69 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |g; in pa|rticular|
|00002ab0| 20 74 68 65 20 72 6f 6c | 65 20 6f 66 20 4e 4f 54 | the rol|e of NOT|
|00002ac0| 41 43 4b 20 61 6e 64 0a | 58 20 20 20 20 4e 4f 54 |ACK and.|X NOT|
|00002ad0| 42 55 53 59 20 73 65 65 | 6d 20 61 20 62 69 74 20 |BUSY see|m a bit |
|00002ae0| 63 6f 6e 66 75 73 65 64 | 2c 20 61 6e 64 20 4e 4f |confused|, and NO|
|00002af0| 54 45 52 52 4f 52 20 69 | 73 20 6c 6f 77 20 77 68 |TERROR i|s low wh|
|00002b00| 65 6e 20 74 68 65 20 70 | 72 69 6e 74 65 72 0a 58 |en the p|rinter.X|
|00002b10| 20 20 20 20 69 66 20 6f | 66 66 6c 69 6e 65 2c 20 | if o|ffline, |
|00002b20| 77 68 69 63 68 20 69 73 | 20 76 65 72 79 20 73 74 |which is| very st|
|00002b30| 72 61 6e 67 65 2e 20 54 | 68 65 20 63 6f 6e 64 69 |range. T|he condi|
|00002b40| 74 69 6f 6e 73 20 69 6e | 20 74 68 65 20 74 77 6f |tions in| the two|
|00002b50| 20 70 6f 6c 6c 69 6e 67 | 0a 58 20 20 20 20 6c 6f | polling|.X lo|
|00002b60| 6f 70 73 20 68 61 76 65 | 20 62 65 65 6e 20 64 65 |ops have| been de|
|00002b70| 73 69 67 6e 65 64 20 77 | 69 74 68 20 74 68 65 73 |signed w|ith thes|
|00002b80| 65 20 73 74 61 74 65 73 | 20 69 6e 20 6d 69 6e 64 |e states| in mind|
|00002b90| 2e 0a 58 2a 2f 0a 58 0a | 58 65 78 74 65 72 6e 20 |..X*/.X.|Xextern |
|00002ba0| 69 6e 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |int | |
|00002bb0| 20 70 70 77 72 69 74 65 | 28 64 65 76 29 0a 58 20 | ppwrite|(dev).X |
|00002bc0| 20 20 20 69 6e 74 09 09 | 09 20 20 20 20 64 65 76 | int..|. dev|
|00002bd0| 3b 0a 58 7b 0a 58 20 20 | 20 20 72 65 67 69 73 74 |;.X{.X | regist|
|00002be0| 65 72 20 73 74 72 75 63 | 74 20 70 70 5f 63 6f 6e |er struc|t pp_con|
|00002bf0| 66 69 67 20 2a 70 70 3b | 0a 58 20 20 20 20 72 65 |fig *pp;|.X re|
|00002c00| 67 69 73 74 65 72 20 69 | 6e 74 09 20 20 20 20 73 |gister i|nt. s|
|00002c10| 74 61 74 75 73 3b 0a 58 | 20 20 20 20 72 65 67 69 |tatus;.X| regi|
|00002c20| 73 74 65 72 20 69 6e 74 | 09 20 20 20 20 73 74 61 |ster int|. sta|
|00002c30| 74 75 73 70 3b 0a 58 20 | 20 20 20 72 65 67 69 73 |tusp;.X | regis|
|00002c40| 74 65 72 20 69 6e 74 09 | 20 20 20 20 63 68 3b 0a |ter int.| ch;.|
|00002c50| 58 0a 58 20 20 20 20 70 | 70 09 20 20 20 20 3d 20 |X.X p|p. = |
|00002c60| 26 70 70 5f 63 6f 6e 66 | 69 67 5b 6d 69 6e 6f 72 |&pp_conf|ig[minor|
|00002c70| 28 64 65 76 29 5d 3b 0a | 58 20 20 20 20 73 74 61 |(dev)];.|X sta|
|00002c80| 74 75 73 70 20 3d 20 70 | 70 2d 3e 73 74 61 74 75 |tusp = p|p->statu|
|00002c90| 73 3b 0a 58 0a 58 20 20 | 20 20 77 68 69 6c 65 20 |s;.X.X | while |
|00002ca0| 28 28 63 68 20 3d 20 63 | 70 61 73 73 28 29 29 20 |((ch = c|pass()) |
|00002cb0| 3e 3d 20 30 29 0a 58 20 | 20 20 20 7b 0a 58 09 73 |>= 0).X | {.X.s|
|00002cc0| 74 61 74 75 73 20 3d 20 | 69 6e 62 28 73 74 61 74 |tatus = |inb(stat|
|00002cd0| 75 73 70 29 3b 0a 58 0a | 58 09 2f 2a 0a 58 09 20 |usp);.X.|X./*.X. |
|00002ce0| 20 20 20 54 68 69 73 20 | 64 6f 20 2e 2e 2e 20 77 | This |do ... w|
|00002cf0| 68 69 6c 65 20 28 2e 2e | 2e 29 3b 20 6d 61 79 20 |hile (..|.); may |
|00002d00| 62 65 20 72 65 77 72 69 | 74 74 65 6e 20 61 73 20 |be rewri|tten as |
|00002d10| 61 20 66 6f 72 20 28 2e | 2e 2e 29 2c 0a 58 09 20 |a for (.|..),.X. |
|00002d20| 20 20 20 62 75 74 20 74 | 68 69 73 20 66 6f 72 6d | but t|his form|
|00002d30| 20 69 73 20 70 72 6f 62 | 61 62 6c 79 20 6d 6f 72 | is prob|ably mor|
|00002d40| 65 20 22 65 66 66 69 63 | 69 65 6e 74 22 2c 20 62 |e "effic|ient", b|
|00002d50| 65 63 61 75 73 65 20 77 | 65 20 65 78 70 65 63 74 |ecause w|e expect|
|00002d60| 0a 58 09 20 20 20 20 74 | 68 61 74 20 6f 6e 20 61 |.X. t|hat on a|
|00002d70| 76 65 72 61 67 65 20 77 | 65 20 77 69 6c 6c 20 68 |verage w|e will h|
|00002d80| 61 76 65 20 74 6f 20 65 | 78 65 63 75 74 65 20 74 |ave to e|xecute t|
|00002d90| 68 65 20 62 6f 64 79 2e | 0a 58 09 2a 2f 0a 58 0a |he body.|.X.*/.X.|
|00002da0| 58 09 64 6f 0a 58 09 7b | 0a 58 0a 58 09 77 61 69 |X.do.X.{|.X.X.wai|
|00002db0| 74 5f 70 72 69 6e 74 65 | 72 5f 6f 6e 6c 69 6e 65 |t_printe|r_online|
|00002dc0| 3a 0a 58 0a 58 09 20 20 | 20 20 2f 2a 0a 58 09 09 |:.X.X. | /*.X..|
|00002dd0| 48 65 72 65 20 77 65 20 | 77 61 69 74 20 66 6f 72 |Here we |wait for|
|00002de0| 20 74 68 65 20 70 72 69 | 6e 74 65 72 20 74 6f 20 | the pri|nter to |
|00002df0| 62 65 20 72 65 61 64 79 | 2c 20 61 6e 64 20 74 68 |be ready|, and th|
|00002e00| 69 73 20 6d 61 79 0a 58 | 09 09 62 65 20 61 20 6c |is may.X|..be a l|
|00002e10| 6f 6e 67 69 73 68 20 77 | 61 69 74 2c 20 62 65 63 |ongish w|ait, bec|
|00002e20| 61 75 73 65 20 6f 66 20 | 70 61 70 65 72 20 65 6e |ause of |paper en|
|00002e30| 64 2c 20 6f 66 66 6c 69 | 6e 65 2c 20 70 6f 77 65 |d, offli|ne, powe|
|00002e40| 72 20 6f 66 66 2e 0a 58 | 09 09 57 65 20 73 6c 65 |r off..X|..We sle|
|00002e50| 65 70 2c 20 70 6f 6c 6c | 69 6e 67 20 61 20 66 65 |ep, poll|ing a fe|
|00002e60| 77 20 74 69 6d 65 73 20 | 70 65 72 20 73 65 63 6f |w times |per seco|
|00002e70| 6e 64 2c 20 61 73 20 74 | 68 69 73 20 69 73 20 73 |nd, as t|his is s|
|00002e80| 69 6d 70 6c 65 72 0a 58 | 09 09 74 68 61 6e 20 74 |impler.X|..than t|
|00002e90| 61 6b 69 6e 67 20 61 6e | 20 69 6e 74 65 72 72 75 |aking an| interru|
|00002ea0| 70 74 20 61 6e 64 20 74 | 68 65 20 63 6f 73 74 20 |pt and t|he cost |
|00002eb0| 69 73 20 76 65 72 79 20 | 6c 6f 77 2e 0a 58 09 20 |is very |low..X. |
|00002ec0| 20 20 20 2a 2f 0a 58 0a | 58 09 20 20 20 20 66 6f | */.X.|X. fo|
|00002ed0| 72 0a 58 09 20 20 20 20 | 28 0a 58 09 09 73 74 61 |r.X. |(.X..sta|
|00002ee0| 74 75 73 3b 0a 58 09 09 | 28 73 74 61 74 75 73 20 |tus;.X..|(status |
|00002ef0| 26 20 28 70 70 4f 4e 4c | 49 4e 45 7c 70 70 4e 4f |& (ppONL|INE|ppNO|
|00002f00| 54 45 52 52 4f 52 7c 70 | 70 4e 4f 50 41 50 45 52 |TERROR|p|pNOPAPER|
|00002f10| 29 29 0a 58 09 09 20 20 | 20 20 21 3d 20 28 70 70 |)).X.. | != (pp|
|00002f20| 4f 4e 4c 49 4e 45 7c 70 | 70 4e 4f 54 45 52 52 4f |ONLINE|p|pNOTERRO|
|00002f30| 52 29 3b 0a 58 09 09 73 | 74 61 74 75 73 20 3d 20 |R);.X..s|tatus = |
|00002f40| 69 6e 62 28 73 74 61 74 | 75 73 70 29 0a 58 09 20 |inb(stat|usp).X. |
|00002f50| 20 20 20 29 0a 58 09 20 | 20 20 20 7b 0a 58 09 09 | ).X. | {.X..|
|00002f60| 70 70 50 41 55 53 45 28 | 28 69 6e 74 29 20 26 70 |ppPAUSE(|(int) &p|
|00002f70| 70 2d 3e 73 74 61 74 75 | 73 29 3b 0a 58 09 09 44 |p->statu|s);.X..D|
|00002f80| 45 42 55 47 28 70 70 5f | 70 61 75 73 65 2b 2b 29 |EBUG(pp_|pause++)|
|00002f90| 3b 0a 58 09 20 20 20 20 | 7d 0a 58 0a 58 09 77 61 |;.X. |}.X.X.wa|
|00002fa0| 69 74 5f 69 6e 74 65 72 | 66 61 63 65 5f 72 65 61 |it_inter|face_rea|
|00002fb0| 64 79 3a 0a 58 0a 58 09 | 20 20 20 20 2f 2a 0a 58 |dy:.X.X.| /*.X|
|00002fc0| 09 09 48 65 72 65 20 77 | 65 20 77 61 69 74 20 66 |..Here w|e wait f|
|00002fd0| 6f 72 20 74 68 65 20 69 | 6e 74 65 72 66 61 63 65 |or the i|nterface|
|00002fe0| 20 74 6f 20 62 65 20 72 | 65 61 64 79 20 74 6f 20 | to be r|eady to |
|00002ff0| 61 63 63 65 70 74 20 61 | 6e 6f 74 68 65 72 0a 58 |accept a|nother.X|
|00003000| 09 09 63 68 61 72 61 63 | 74 65 72 2c 20 61 6e 64 |..charac|ter, and|
|00003010| 20 74 68 75 73 20 77 65 | 20 73 70 69 6e 2c 20 62 | thus we| spin, b|
|00003020| 65 63 61 75 73 65 20 77 | 65 20 65 78 70 65 63 74 |ecause w|e expect|
|00003030| 20 74 68 65 20 77 61 69 | 74 20 74 6f 20 62 65 0a | the wai|t to be.|
|00003040| 58 09 09 73 68 6f 72 74 | 20 28 65 2e 67 2e 20 32 |X..short| (e.g. 2|
|00003050| 2d 34 20 74 75 72 6e 73 | 29 2e 20 54 68 69 73 20 |-4 turns|). This |
|00003060| 69 73 20 63 68 65 61 70 | 65 72 20 74 68 61 6e 20 |is cheap|er than |
|00003070| 74 68 65 20 6f 76 65 72 | 68 65 61 64 73 0a 58 09 |the over|heads.X.|
|00003080| 09 69 6e 76 6f 6c 76 65 | 64 20 69 6e 20 73 6c 65 |.involve|d in sle|
|00003090| 65 70 69 6e 67 20 6f 72 | 20 65 76 65 6e 20 69 6e |eping or| even in|
|000030a0| 20 74 61 6b 69 6e 67 20 | 61 6e 20 69 6e 74 65 72 | taking |an inter|
|000030b0| 72 75 70 74 2e 0a 58 0a | 58 09 09 4e 6f 74 69 63 |rupt..X.|X..Notic|
|000030c0| 65 20 74 68 65 20 66 6f | 72 6d 20 6f 66 20 74 68 |e the fo|rm of th|
|000030d0| 65 20 65 78 69 74 20 63 | 6f 6e 64 69 74 69 6f 6e |e exit c|ondition|
|000030e0| 3b 20 77 65 20 77 61 69 | 74 20 75 6e 74 69 6c 0a |; we wai|t until.|
|000030f0| 58 09 09 74 68 65 20 69 | 6e 74 65 72 66 61 63 65 |X..the i|nterface|
|00003100| 20 69 73 20 72 65 61 64 | 79 2c 20 75 6e 6c 65 73 | is read|y, unles|
|00003110| 73 20 65 72 72 6f 72 20 | 6f 72 20 70 61 70 65 72 |s error |or paper|
|00003120| 20 65 6e 64 20 61 72 65 | 0a 58 09 09 73 69 67 6e | end are|.X..sign|
|00003130| 61 6c 65 64 2c 20 62 65 | 63 61 75 73 65 20 74 68 |aled, be|cause th|
|00003140| 6f 73 65 20 61 72 65 20 | 6c 6f 6e 67 20 74 65 72 |ose are |long ter|
|00003150| 6d 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 6f 6e 0a |m condit|ions on.|
|00003160| 58 09 09 77 68 69 63 68 | 20 77 65 20 6d 75 73 74 |X..which| we must|
|00003170| 20 6e 6f 74 20 73 70 69 | 6e 20 77 61 69 74 2e 0a | not spi|n wait..|
|00003180| 58 09 20 20 20 20 2a 2f | 0a 58 0a 58 09 20 20 20 |X. */|.X.X. |
|00003190| 20 66 6f 72 0a 58 09 20 | 20 20 20 28 0a 58 09 09 | for.X. | (.X..|
|000031a0| 73 74 61 74 75 73 3b 0a | 58 09 09 28 73 74 61 74 |status;.|X..(stat|
|000031b0| 75 73 20 26 20 28 70 70 | 4e 4f 54 41 43 4b 7c 70 |us & (pp|NOTACK|p|
|000031c0| 70 4e 4f 54 42 55 53 59 | 29 29 20 21 3d 20 28 70 |pNOTBUSY|)) != (p|
|000031d0| 70 4e 4f 54 41 43 4b 7c | 70 70 4e 4f 54 42 55 53 |pNOTACK||ppNOTBUS|
|000031e0| 59 29 0a 58 09 09 26 26 | 20 28 73 74 61 74 75 73 |Y).X..&&| (status|
|000031f0| 20 26 20 28 70 70 4f 4e | 4c 49 4e 45 7c 70 70 4e | & (ppON|LINE|ppN|
|00003200| 4f 50 41 50 45 52 7c 70 | 70 4e 4f 54 45 52 52 4f |OPAPER|p|pNOTERRO|
|00003210| 52 29 29 0a 58 09 09 20 | 20 20 20 3d 3d 20 28 70 |R)).X.. | == (p|
|00003220| 70 4f 4e 4c 49 4e 45 7c | 70 70 4e 4f 54 45 52 52 |pONLINE||ppNOTERR|
|00003230| 4f 52 29 3b 0a 58 09 09 | 73 74 61 74 75 73 20 3d |OR);.X..|status =|
|00003240| 20 69 6e 62 28 73 74 61 | 74 75 73 70 29 0a 58 09 | inb(sta|tusp).X.|
|00003250| 20 20 20 20 29 0a 58 09 | 20 20 20 20 7b 0a 58 09 | ).X.| {.X.|
|00003260| 09 70 70 53 50 49 4e 28 | 29 3b 0a 58 09 09 44 45 |.ppSPIN(|);.X..DE|
|00003270| 42 55 47 28 70 70 5f 73 | 70 69 6e 2b 2b 29 3b 0a |BUG(pp_s|pin++);.|
|00003280| 58 09 20 20 20 20 7d 0a | 58 0a 58 09 20 20 20 20 |X. }.|X.X. |
|00003290| 2f 2a 0a 58 09 09 57 65 | 20 65 78 69 74 20 66 72 |/*.X..We| exit fr|
|000032a0| 6f 6d 20 74 68 65 20 6c | 6f 6f 70 20 6f 6e 6c 79 |om the l|oop only|
|000032b0| 20 69 66 20 65 76 65 72 | 79 74 68 69 6e 67 20 69 | if ever|ything i|
|000032c0| 73 20 63 6c 65 61 72 3b | 20 77 65 20 61 72 65 0a |s clear;| we are.|
|000032d0| 58 09 09 70 61 72 61 6e | 6f 69 64 2c 20 61 6e 64 |X..paran|oid, and|
|000032e0| 20 63 68 65 63 6b 20 66 | 6f 72 20 61 6c 6c 20 63 | check f|or all c|
|000032f0| 6f 6e 64 69 74 69 6f 6e | 73 2e 20 41 66 74 65 72 |ondition|s. After|
|00003300| 20 61 6c 6c 20 74 68 65 | 0a 58 09 09 70 72 69 6e | all the|.X..prin|
|00003310| 74 65 72 20 6d 61 79 20 | 68 61 76 65 20 62 65 63 |ter may |have bec|
|00003320| 6f 6d 65 20 6e 6f 74 20 | 72 65 61 64 79 20 77 68 |ome not |ready wh|
|00003330| 69 6c 65 20 69 6e 20 74 | 68 65 20 69 6e 74 65 72 |ile in t|he inter|
|00003340| 66 61 63 65 0a 58 09 09 | 72 65 61 64 79 6e 65 73 |face.X..|readynes|
|00003350| 73 20 74 65 73 74 69 6e | 67 20 6c 6f 6f 70 2e 0a |s testin|g loop..|
|00003360| 58 09 20 20 20 20 2a 2f | 0a 58 09 7d 0a 58 09 77 |X. */|.X.}.X.w|
|00003370| 68 69 6c 65 20 28 28 73 | 74 61 74 75 73 20 26 20 |hile ((s|tatus & |
|00003380| 28 70 70 4f 4e 4c 49 4e | 45 7c 70 70 4e 4f 54 45 |(ppONLIN|E|ppNOTE|
|00003390| 52 52 4f 52 7c 70 70 4e | 4f 50 41 50 45 52 7c 70 |RROR|ppN|OPAPER|p|
|000033a0| 70 4e 4f 54 42 55 53 59 | 7c 70 70 4e 4f 54 41 43 |pNOTBUSY||ppNOTAC|
|000033b0| 4b 29 29 0a 58 09 20 20 | 20 20 21 3d 20 28 70 70 |K)).X. | != (pp|
|000033c0| 4f 4e 4c 49 4e 45 7c 70 | 70 4e 4f 54 45 52 52 4f |ONLINE|p|pNOTERRO|
|000033d0| 52 7c 70 70 4e 4f 54 42 | 55 53 59 7c 70 70 4e 4f |R|ppNOTB|USY|ppNO|
|000033e0| 54 41 43 4b 29 29 3b 0a | 58 0a 58 20 20 20 20 6c |TACK));.|X.X l|
|000033f0| 61 74 63 68 5f 63 68 61 | 72 61 63 74 65 72 3a 0a |atch_cha|racter:.|
|00003400| 58 0a 58 09 2f 2a 0a 58 | 09 20 20 20 20 57 65 20 |X.X./*.X|. We |
|00003410| 64 6f 20 6e 6f 74 20 77 | 61 69 74 20 66 6f 72 20 |do not w|ait for |
|00003420| 61 6e 79 20 73 65 74 74 | 6c 69 6e 67 20 74 69 6d |any sett|ling tim|
|00003430| 65 20 6f 6e 20 74 68 69 | 73 0a 58 09 2a 2f 0a 58 |e on thi|s.X.*/.X|
|00003440| 0a 58 09 6f 75 74 62 28 | 70 70 2d 3e 64 61 74 61 |.X.outb(|pp->data|
|00003450| 2c 63 68 29 3b 0a 58 0a | 58 20 20 20 20 73 74 72 |,ch);.X.|X str|
|00003460| 6f 62 65 5f 61 77 68 69 | 6c 65 3a 0a 58 0a 58 09 |obe_awhi|le:.X.X.|
|00003470| 2f 2a 0a 58 09 20 20 20 | 20 57 65 20 77 61 69 74 |/*.X. | We wait|
|00003480| 20 66 6f 72 20 74 68 65 | 20 70 72 69 6e 74 65 72 | for the| printer|
|00003490| 20 74 6f 20 68 61 76 65 | 20 61 20 67 6f 6f 64 20 | to have| a good |
|000034a0| 63 68 61 6e 63 65 20 74 | 6f 0a 58 09 20 20 20 20 |chance t|o.X. |
|000034b0| 73 65 65 20 74 68 65 20 | 73 74 72 6f 62 65 20 68 |see the |strobe h|
|000034c0| 69 67 68 2c 20 61 6e 64 | 20 74 68 65 6e 20 77 65 |igh, and| then we|
|000034d0| 20 77 61 69 74 20 66 6f | 72 20 69 74 20 74 6f 20 | wait fo|r it to |
|000034e0| 6c 61 74 63 68 0a 58 09 | 20 20 20 20 69 6e 20 74 |latch.X.| in t|
|000034f0| 68 65 20 63 68 61 72 61 | 63 74 65 72 20 77 68 65 |he chara|cter whe|
|00003500| 6e 20 77 65 20 64 72 69 | 76 65 20 69 74 20 62 61 |n we dri|ve it ba|
|00003510| 63 6b 20 64 6f 77 6e 2e | 0a 58 09 2a 2f 0a 58 0a |ck down.|.X.*/.X.|
|00003520| 58 09 6f 75 74 62 28 70 | 70 2d 3e 63 6f 6e 74 72 |X.outb(p|p->contr|
|00003530| 6f 6c 2c 28 70 70 53 45 | 4c 45 43 54 7c 70 70 4e |ol,(ppSE|LECT|ppN|
|00003540| 4f 54 52 45 53 45 54 7c | 70 70 53 54 52 4f 42 45 |OTRESET||ppSTROBE|
|00003550| 29 29 3b 0a 58 09 70 70 | 53 54 52 4f 42 45 53 50 |));.X.pp|STROBESP|
|00003560| 49 4e 28 29 3b 0a 58 09 | 6f 75 74 62 28 70 70 2d |IN();.X.|outb(pp-|
|00003570| 3e 63 6f 6e 74 72 6f 6c | 2c 28 70 70 53 45 4c 45 |>control|,(ppSELE|
|00003580| 43 54 7c 70 70 4e 4f 54 | 52 45 53 45 54 29 29 3b |CT|ppNOT|RESET));|
|00003590| 0a 58 20 20 20 20 7d 0a | 58 7d 0a 45 4e 44 5f 4f |.X }.|X}.END_O|
|000035a0| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 36 |F_FILE.i|f test 6|
|000035b0| 32 37 31 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |271 -ne |`wc -c <|
|000035c0| 27 70 70 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |'pp.c'`;| then. |
|000035d0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|000035e0| 70 70 2e 63 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |pp.c'\" |unpacked|
|000035f0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00003600| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 70 |!.fi.# e|nd of 'p|
|00003610| 70 2e 63 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |p.c'.fi.|if test |
|00003620| 2d 66 20 27 70 70 2e 68 | 27 20 2d 61 20 22 24 7b |-f 'pp.h|' -a "${|
|00003630| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00003640| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00003650| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00003660| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00003670| 5c 22 27 70 70 2e 68 27 | 5c 22 0a 65 6c 73 65 0a |\"'pp.h'|\".else.|
|00003680| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00003690| 63 74 69 6e 67 20 5c 22 | 27 70 70 2e 68 27 5c 22 |cting \"|'pp.h'\"|
|000036a0| 20 5c 28 38 30 35 20 63 | 68 61 72 61 63 74 65 72 | \(805 c|haracter|
|000036b0| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|000036c0| 20 3e 27 70 70 2e 68 27 | 20 3c 3c 27 45 4e 44 5f | >'pp.h'| <<'END_|
|000036d0| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 0a 58 20 20 |OF_FILE'|.X/*.X |
|000036e0| 20 20 53 74 61 74 75 73 | 20 70 6f 72 74 20 64 65 | Status| port de|
|000036f0| 66 69 6e 65 73 0a 58 2a | 2f 0a 58 0a 58 23 64 65 |fines.X*|/.X.X#de|
|00003700| 66 69 6e 65 20 70 70 4e | 4f 54 45 52 52 4f 52 09 |fine ppN|OTERROR.|
|00003710| 30 78 30 38 09 2f 2a 20 | 41 6c 6c 20 69 73 20 4f |0x08./* |All is O|
|00003720| 4b 09 09 09 09 2a 2f 0a | 58 23 64 65 66 69 6e 65 |K....*/.|X#define|
|00003730| 20 70 70 4f 4e 4c 49 4e | 45 09 30 78 31 30 09 2f | ppONLIN|E.0x10./|
|00003740| 2a 20 50 72 69 6e 74 65 | 72 20 69 73 20 6f 6e 6c |* Printe|r is onl|
|00003750| 69 6e 65 09 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |ine...*/|.X#defin|
|00003760| 65 20 70 70 4e 4f 50 41 | 50 45 52 09 30 78 32 30 |e ppNOPA|PER.0x20|
|00003770| 09 2f 2a 20 50 61 70 65 | 72 20 69 73 20 70 72 65 |./* Pape|r is pre|
|00003780| 73 65 6e 74 09 09 09 2a | 2f 0a 58 23 64 65 66 69 |sent...*|/.X#defi|
|00003790| 6e 65 20 70 70 4e 4f 54 | 41 43 4b 09 30 78 34 30 |ne ppNOT|ACK.0x40|
|000037a0| 09 2f 2a 20 49 6e 74 65 | 72 66 61 63 65 20 72 65 |./* Inte|rface re|
|000037b0| 61 64 79 20 74 6f 20 62 | 65 20 73 74 72 6f 62 65 |ady to b|e strobe|
|000037c0| 64 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 70 70 |d.*/.X#d|efine pp|
|000037d0| 4e 4f 54 42 55 53 59 09 | 30 78 38 30 09 2f 2a 20 |NOTBUSY.|0x80./* |
|000037e0| 50 72 69 6e 74 65 72 20 | 72 65 61 64 79 20 74 6f |Printer |ready to|
|000037f0| 20 70 72 69 6e 74 09 09 | 2a 2f 0a 58 0a 58 2f 2a | print..|*/.X.X/*|
|00003800| 0a 58 20 20 20 20 43 6f | 6e 74 72 6f 6c 20 70 6f |.X Co|ntrol po|
|00003810| 72 74 20 64 65 66 69 6e | 65 73 0a 58 2a 2f 0a 58 |rt defin|es.X*/.X|
|00003820| 0a 58 23 64 65 66 69 6e | 65 20 70 70 53 54 52 4f |.X#defin|e ppSTRO|
|00003830| 42 45 09 30 78 30 31 09 | 2f 2a 20 53 74 72 6f 62 |BE.0x01.|/* Strob|
|00003840| 65 20 61 20 63 68 61 72 | 61 63 74 65 72 20 69 6e |e a char|acter in|
|00003850| 09 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 70 70 |..*/.X#d|efine pp|
|00003860| 41 55 54 4f 4c 46 09 30 | 78 30 32 09 2f 2a 20 45 |AUTOLF.0|x02./* E|
|00003870| 6e 61 62 6c 65 20 61 75 | 74 6f 20 6c 69 6e 65 20 |nable au|to line |
|00003880| 66 65 65 64 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |feed..*/|.X#defin|
|00003890| 65 20 70 70 4e 4f 54 52 | 45 53 45 54 09 30 78 30 |e ppNOTR|ESET.0x0|
|000038a0| 34 09 2f 2a 20 4e 6f 72 | 6d 61 6c 20 6f 70 65 72 |4./* Nor|mal oper|
|000038b0| 61 74 69 6f 6e 09 09 09 | 2a 2f 0a 58 23 64 65 66 |ation...|*/.X#def|
|000038c0| 69 6e 65 20 70 70 53 45 | 4c 45 43 54 09 30 78 30 |ine ppSE|LECT.0x0|
|000038d0| 38 09 2f 2a 20 50 75 74 | 20 74 68 65 20 70 72 69 |8./* Put| the pri|
|000038e0| 6e 74 65 72 20 6f 6e 6c | 69 6e 65 09 09 2a 2f 0a |nter onl|ine..*/.|
|000038f0| 58 23 64 65 66 69 6e 65 | 20 70 70 49 4e 54 45 52 |X#define| ppINTER|
|00003900| 52 55 50 54 09 30 78 31 | 30 09 2f 2a 20 53 65 6e |RUPT.0x1|0./* Sen|
|00003910| 64 20 69 6e 74 65 72 72 | 75 70 74 73 09 09 09 2a |d interr|upts...*|
|00003920| 2f 0a 58 0a 58 23 69 66 | 64 65 66 20 49 4e 4b 45 |/.X.X#if|def INKE|
|00003930| 52 4e 45 4c 0a 58 65 78 | 74 65 72 6e 20 73 68 6f |RNEL.Xex|tern sho|
|00003940| 72 74 09 09 70 70 5f 73 | 74 72 6f 62 65 3b 0a 58 |rt..pp_s|trobe;.X|
|00003950| 0a 58 73 74 72 75 63 74 | 20 70 70 5f 63 6f 6e 66 |.Xstruct| pp_conf|
|00003960| 69 67 0a 58 7b 0a 58 20 | 20 20 20 73 68 6f 72 74 |ig.X{.X | short|
|00003970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003980| 20 20 20 64 61 74 61 3b | 0a 58 20 20 20 20 73 68 | data;|.X sh|
|00003990| 6f 72 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ort | |
|000039a0| 20 20 20 20 20 20 73 74 | 61 74 75 73 3b 0a 58 20 | st|atus;.X |
|000039b0| 20 20 20 73 68 6f 72 74 | 20 20 20 20 20 20 20 20 | short| |
|000039c0| 20 20 20 20 20 20 20 20 | 20 20 20 63 6f 6e 74 72 | | contr|
|000039d0| 6f 6c 3b 0a 58 7d 3b 0a | 58 0a 58 65 78 74 65 72 |ol;.X};.|X.Xexter|
|000039e0| 6e 20 73 74 72 75 63 74 | 20 70 70 5f 63 6f 6e 66 |n struct| pp_conf|
|000039f0| 69 67 09 70 70 5f 63 6f | 6e 66 69 67 5b 5d 3b 0a |ig.pp_co|nfig[];.|
|00003a00| 58 65 78 74 65 72 6e 20 | 73 68 6f 72 74 09 09 70 |Xextern |short..p|
|00003a10| 70 5f 6d 61 78 3b 0a 58 | 23 65 6e 64 69 66 0a 45 |p_max;.X|#endif.E|
|00003a20| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00003a30| 73 74 20 38 30 35 20 2d | 6e 65 20 60 77 63 20 2d |st 805 -|ne `wc -|
|00003a40| 63 20 3c 27 70 70 2e 68 | 27 60 3b 20 74 68 65 6e |c <'pp.h|'`; then|
|00003a50| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00003a60| 5c 22 27 70 70 2e 68 27 | 5c 22 20 75 6e 70 61 63 |\"'pp.h'|\" unpac|
|00003a70| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00003a80| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00003a90| 20 27 70 70 2e 68 27 0a | 66 69 0a 69 66 20 74 65 | 'pp.h'.|fi.if te|
|00003aa0| 73 74 20 2d 66 20 27 73 | 70 61 63 65 2e 63 27 20 |st -f 's|pace.c' |
|00003ab0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00003ac0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00003ad0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00003ae0| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|00003af0| 20 66 69 6c 65 20 5c 22 | 27 73 70 61 63 65 2e 63 | file \"|'space.c|
|00003b00| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00003b10| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00003b20| 22 27 73 70 61 63 65 2e | 63 27 5c 22 20 5c 28 34 |"'space.|c'\" \(4|
|00003b30| 33 35 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |35 chara|cters\).|
|00003b40| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 73 |sed "s/^|X//" >'s|
|00003b50| 70 61 63 65 2e 63 27 20 | 3c 3c 27 45 4e 44 5f 4f |pace.c' |<<'END_O|
|00003b60| 46 5f 46 49 4c 45 27 0a | 58 2f 2a 0a 58 20 2a 20 |F_FILE'.|X/*.X * |
|00003b70| 70 70 2f 73 70 61 63 65 | 2e 63 2c 20 63 72 65 61 |pp/space|.c, crea|
|00003b80| 74 65 64 20 38 2f 32 37 | 2f 38 39 2c 20 63 69 6d |ted 8/27|/89, cim|
|00003b90| 63 6f 72 21 6d 69 6b 65 | 0a 58 20 2a 2f 0a 58 0a |cor!mike|.X */.X.|
|00003ba0| 58 23 69 6e 63 6c 75 64 | 65 20 22 73 79 73 2f 70 |X#includ|e "sys/p|
|00003bb0| 70 2e 68 22 0a 58 0a 58 | 2f 2a 0a 58 20 20 20 20 |p.h".X.X|/*.X |
|00003bc0| 48 6f 77 20 6d 61 6e 79 | 20 74 65 6e 73 20 6f 66 |How many| tens of|
|00003bd0| 20 6d 69 63 72 6f 73 65 | 63 6f 6e 64 73 20 74 68 | microse|conds th|
|00003be0| 65 20 73 74 72 6f 62 65 | 20 6c 69 6e 65 0a 58 20 |e strobe| line.X |
|00003bf0| 20 20 20 73 68 61 6c 6c | 20 73 74 61 79 20 68 69 | shall| stay hi|
|00003c00| 67 68 20 66 6f 72 20 74 | 68 65 20 69 6e 74 65 72 |gh for t|he inter|
|00003c10| 66 61 63 65 20 74 6f 20 | 72 65 63 6f 67 6e 69 7a |face to |recogniz|
|00003c20| 65 20 69 74 2e 0a 58 2a | 2f 0a 58 73 68 6f 72 74 |e it..X*|/.Xshort|
|00003c30| 09 09 09 70 70 5f 73 74 | 72 6f 62 65 20 3d 20 31 |...pp_st|robe = 1|
|00003c40| 3b 0a 58 0a 58 73 74 72 | 75 63 74 20 70 70 5f 63 |;.X.Xstr|uct pp_c|
|00003c50| 6f 6e 66 69 67 09 70 70 | 5f 63 6f 6e 66 69 67 5b |onfig.pp|_config[|
|00003c60| 5d 20 3d 0a 58 7b 0a 58 | 20 20 20 20 2f 2a 09 64 |] =.X{.X| /*.d|
|00003c70| 61 74 61 2c 09 73 74 61 | 74 75 73 2c 09 63 6f 6e |ata,.sta|tus,.con|
|00003c80| 74 72 6f 6c 20 2a 2f 0a | 58 20 20 20 20 7b 09 30 |trol */.|X {.0|
|00003c90| 78 33 62 63 2c 09 30 78 | 33 62 64 2c 09 30 78 33 |x3bc,.0x|3bd,.0x3|
|00003ca0| 62 65 20 20 20 20 7d 2c | 0a 58 20 20 20 20 7b 09 |be },|.X {.|
|00003cb0| 30 78 33 37 38 2c 09 30 | 78 33 37 39 2c 09 30 78 |0x378,.0|x379,.0x|
|00003cc0| 33 37 61 20 20 20 20 7d | 2c 0a 58 20 20 20 20 7b |37a }|,.X {|
|00003cd0| 09 30 78 32 37 38 2c 09 | 30 78 32 37 39 2c 09 30 |.0x278,.|0x279,.0|
|00003ce0| 78 32 37 61 20 20 20 20 | 7d 0a 58 7d 3b 0a 58 0a |x27a |}.X};.X.|
|00003cf0| 58 73 68 6f 72 74 09 09 | 09 70 70 5f 6d 61 78 20 |Xshort..|.pp_max |
|00003d00| 3d 20 73 69 7a 65 6f 66 | 20 70 70 5f 63 6f 6e 66 |= sizeof| pp_conf|
|00003d10| 69 67 20 2f 20 73 69 7a | 65 6f 66 20 28 73 74 72 |ig / siz|eof (str|
|00003d20| 75 63 74 20 70 70 5f 63 | 6f 6e 66 69 67 29 3b 0a |uct pp_c|onfig);.|
|00003d30| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00003d40| 65 73 74 20 34 33 35 20 | 2d 6e 65 20 60 77 63 20 |est 435 |-ne `wc |
|00003d50| 2d 63 20 3c 27 73 70 61 | 63 65 2e 63 27 60 3b 20 |-c <'spa|ce.c'`; |
|00003d60| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00003d70| 61 72 3a 20 5c 22 27 73 | 70 61 63 65 2e 63 27 5c |ar: \"'s|pace.c'\|
|00003d80| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00003d90| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00003da0| 20 65 6e 64 20 6f 66 20 | 27 73 70 61 63 65 2e 63 | end of |'space.c|
|00003db0| 27 0a 66 69 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |'.fi.ech|o shar: |
|00003dc0| 45 6e 64 20 6f 66 20 61 | 72 63 68 69 76 65 20 31 |End of a|rchive 1|
|00003dd0| 20 5c 28 6f 66 20 31 5c | 29 2e 0a 63 70 20 2f 64 | \(of 1\|)..cp /d|
|00003de0| 65 76 2f 6e 75 6c 6c 20 | 61 72 6b 31 69 73 64 6f |ev/null |ark1isdo|
|00003df0| 6e 65 0a 4d 49 53 53 49 | 4e 47 3d 22 22 0a 66 6f |ne.MISSI|NG="".fo|
|00003e00| 72 20 49 20 69 6e 20 31 | 20 3b 20 64 6f 0a 20 20 |r I in 1| ; do. |
|00003e10| 20 20 69 66 20 74 65 73 | 74 20 21 20 2d 66 20 61 | if tes|t ! -f a|
|00003e20| 72 6b 24 7b 49 7d 69 73 | 64 6f 6e 65 20 3b 20 74 |rk${I}is|done ; t|
|00003e30| 68 65 6e 0a 09 4d 49 53 | 53 49 4e 47 3d 22 24 7b |hen..MIS|SING="${|
|00003e40| 4d 49 53 53 49 4e 47 7d | 20 24 7b 49 7d 22 0a 20 |MISSING}| ${I}". |
|00003e50| 20 20 20 66 69 0a 64 6f | 6e 65 0a 69 66 20 74 65 | fi.do|ne.if te|
|00003e60| 73 74 20 22 24 7b 4d 49 | 53 53 49 4e 47 7d 22 20 |st "${MI|SSING}" |
|00003e70| 3d 20 22 22 20 3b 20 74 | 68 65 6e 0a 20 20 20 20 |= "" ; t|hen. |
|00003e80| 65 63 68 6f 20 59 6f 75 | 20 68 61 76 65 20 74 68 |echo You| have th|
|00003e90| 65 20 61 72 63 68 69 76 | 65 2e 0a 20 20 20 20 72 |e archiv|e.. r|
|00003ea0| 6d 20 2d 66 20 61 72 6b | 5b 31 2d 39 5d 69 73 64 |m -f ark|[1-9]isd|
|00003eb0| 6f 6e 65 0a 65 6c 73 65 | 0a 20 20 20 20 65 63 68 |one.else|. ech|
|00003ec0| 6f 20 59 6f 75 20 73 74 | 69 6c 6c 20 6e 65 65 64 |o You st|ill need|
|00003ed0| 20 74 6f 20 75 6e 70 61 | 63 6b 20 74 68 65 20 66 | to unpa|ck the f|
|00003ee0| 6f 6c 6c 6f 77 69 6e 67 | 20 61 72 63 68 69 76 65 |ollowing| archive|
|00003ef0| 73 3a 0a 20 20 20 20 65 | 63 68 6f 20 22 20 20 20 |s:. e|cho " |
|00003f00| 20 20 20 20 20 22 20 24 | 7b 4d 49 53 53 49 4e 47 | " $|{MISSING|
|00003f10| 7d 0a 66 69 0a 23 23 20 | 20 45 6e 64 20 6f 66 20 |}.fi.## | End of |
|00003f20| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 2e 0a 65 |shell ar|chive..e|
|00003f30| 78 69 74 20 30 0a 0a 2d | 2d 0a 50 69 65 72 63 61 |xit 0..-|-.Pierca|
|00003f40| 72 6c 6f 20 22 50 65 74 | 65 72 22 20 47 72 61 6e |rlo "Pet|er" Gran|
|00003f50| 64 69 20 20 20 20 20 20 | 20 20 20 20 20 7c 20 41 |di | | A|
|00003f60| 52 50 41 3a 20 70 63 67 | 25 63 73 2e 61 62 65 72 |RPA: pcg|%cs.aber|
|00003f70| 2e 61 63 2e 75 6b 40 6e | 73 66 6e 65 74 2d 72 65 |.ac.uk@n|sfnet-re|
|00003f80| 6c 61 79 2e 61 63 2e 75 | 6b 0a 44 65 70 74 20 6f |lay.ac.u|k.Dept o|
|00003f90| 66 20 43 53 2c 20 55 43 | 57 20 41 62 65 72 79 73 |f CS, UC|W Aberys|
|00003fa0| 74 77 79 74 68 20 20 20 | 20 20 20 20 20 7c 20 55 |twyth | | U|
|00003fb0| 55 43 50 3a 20 2e 2e 2e | 21 6d 63 73 75 6e 21 75 |UCP: ...|!mcsun!u|
|00003fc0| 6b 63 21 61 62 65 72 2d | 63 73 21 70 63 67 0a 50 |kc!aber-|cs!pcg.P|
|00003fd0| 65 6e 67 6c 61 69 73 2c | 20 41 62 65 72 79 73 74 |englais,| Aberyst|
|00003fe0| 77 79 74 68 20 53 59 32 | 33 20 33 42 5a 2c 20 55 |wyth SY2|3 3BZ, U|
|00003ff0| 4b 20 7c 20 49 4e 45 54 | 3a 20 70 63 67 40 63 73 |K | INET|: pcg@cs|
|00004000| 2e 61 62 65 72 2e 61 63 | 2e 75 6b 0a |.aber.ac|.uk. |
+--------+-------------------------+-------------------------+--------+--------+