home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1742 < prev    next >
SHell self-extracting ARchive  |  1990-12-28  |  26.3 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: 1742

ConfidenceProgramDetectionMatch TypeSupport
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, ASCII text default
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 50 61 72 61 6c |s.Subjec|t: Paral|
|00000060| 6c 65 6c 20 70 6f 72 74 | 20 64 72 69 76 65 72 20 |lel port| driver |
|00000070| 72 65 6c 20 32 2e 36 20 | 53 79 73 74 65 6d 20 56 |rel 2.6 |System V|
|00000080| 2f 33 38 36 0a 4d 65 73 | 73 61 67 65 2d 49 44 3a |/386.Mes|sage-ID:|
|00000090| 20 3c 50 43 47 2e 39 30 | 41 75 67 32 38 31 37 34 | <PCG.90|Aug28174|
|000000a0| 38 35 32 40 61 74 68 65 | 6e 65 2e 63 73 2e 61 62 |852@athe|ne.cs.ab|
|000000b0| 65 72 2e 61 63 2e 75 6b | 3e 0a 44 61 74 65 3a 20 |er.ac.uk|>.Date: |
|000000c0| 32 38 20 41 75 67 20 39 | 30 20 31 36 3a 34 38 3a |28 Aug 9|0 16:48:|
|000000d0| 35 32 20 47 4d 54 0a 0a | 0a 54 68 69 73 20 69 73 |52 GMT..|.This is|
|000000e0| 20 74 68 65 20 6d 6f 73 | 74 20 72 65 63 65 6e 74 | the mos|t recent|
|000000f0| 20 72 65 76 69 73 69 6f | 6e 20 6f 66 20 6d 79 20 | revisio|n of my |
|00000100| 70 61 72 61 6c 6c 65 6c | 20 70 6f 73 74 20 64 72 |parallel| post dr|
|00000110| 69 76 65 72 2c 20 69 6e | 73 70 69 72 65 64 20 62 |iver, in|spired b|
|00000120| 79 0a 4d 69 6b 65 20 47 | 72 65 6e 69 65 72 27 73 |y.Mike G|renier's|
|00000130| 20 66 61 73 74 5f 6c 70 | 20 64 72 69 76 65 72 2c | fast_lp| driver,|
|00000140| 20 66 6f 72 20 53 79 73 | 74 65 6d 20 56 2f 33 38 | for Sys|tem V/38|
|00000150| 36 2e 20 4d 69 6b 65 27 | 73 20 61 69 6d 20 77 61 |6. Mike'|s aim wa|
|00000160| 73 20 74 6f 20 68 61 76 | 65 0a 61 20 70 72 69 6e |s to hav|e.a prin|
|00000170| 74 65 72 20 64 72 69 76 | 65 72 20 74 68 61 74 20 |ter driv|er that |
|00000180| 64 69 64 20 66 6c 6f 77 | 20 63 6f 6e 74 72 6f 6c |did flow| control|
|00000190| 20 62 79 20 70 6f 6c 6c | 69 6e 67 2c 20 61 6e 64 | by poll|ing, and|
|000001a0| 20 6e 6f 74 20 62 79 20 | 74 61 6b 69 6e 67 0a 69 | not by |taking.i|
|000001b0| 6e 74 65 72 72 75 70 74 | 73 2c 20 69 6e 20 6f 72 |nterrupt|s, in or|
|000001c0| 64 65 72 20 74 6f 20 61 | 76 6f 69 64 20 61 73 73 |der to a|void ass|
|000001d0| 69 67 6e 69 6e 67 20 74 | 77 6f 20 6f 66 20 74 68 |igning t|wo of th|
|000001e0| 65 20 73 63 61 72 63 65 | 20 69 6e 74 65 72 72 75 |e scarce| interru|
|000001f0| 70 74 0a 6c 69 6e 65 73 | 20 6f 66 20 74 68 65 20 |pt.lines| of the |
|00000200| 49 53 41 20 62 75 73 20 | 74 6f 20 70 72 69 6e 74 |ISA bus |to print|
|00000210| 65 72 73 2e 20 53 69 6e | 63 65 20 70 72 69 6e 74 |ers. Sin|ce print|
|00000220| 65 72 73 20 61 72 65 20 | 73 6c 6f 77 20 64 65 76 |ers are |slow dev|
|00000230| 69 63 65 73 2c 0a 70 6f | 6c 6c 69 6e 67 20 63 61 |ices,.po|lling ca|
|00000240| 6e 20 62 65 20 69 6e 66 | 72 71 75 65 6e 74 20 65 |n be inf|rquent e|
|00000250| 6e 6f 75 67 68 20 74 68 | 61 74 20 74 68 65 20 6f |nough th|at the o|
|00000260| 76 65 72 68 65 61 64 20 | 69 73 20 69 72 72 65 6c |verhead |is irrel|
|00000270| 65 76 61 6e 74 3b 20 61 | 6c 73 6f 2c 0a 73 69 6e |evant; a|lso,.sin|
|00000280| 63 65 20 74 68 65 79 20 | 61 72 65 20 62 75 66 66 |ce they |are buff|
|00000290| 65 72 65 64 2c 20 66 69 | 6c 6c 69 6e 67 20 74 68 |ered, fi|lling th|
|000002a0| 65 20 62 75 66 66 65 72 | 20 63 61 6e 20 70 72 6f |e buffer| can pro|
|000002b0| 63 65 65 64 20 69 6e 20 | 6c 61 72 67 65 20 63 68 |ceed in |large ch|
|000002c0| 75 6e 6b 73 0a 77 69 74 | 68 6f 75 74 20 70 6f 6c |unks.wit|hout pol|
|000002d0| 6c 20 69 6e 64 75 63 65 | 64 20 73 6c 65 65 70 73 |l induce|d sleeps|
|000002e0| 2e 0a 0a 54 68 69 73 20 | 72 65 76 69 73 69 6f 6e |...This |revision|
|000002f0| 20 77 61 73 20 64 6f 6e | 65 20 6d 61 69 6e 6c 79 | was don|e mainly|
|00000300| 20 74 6f 20 74 65 73 74 | 20 61 20 73 75 67 67 65 | to test| a sugge|
|00000310| 73 74 69 6f 6e 20 62 79 | 20 4d 69 6b 65 2c 20 74 |stion by| Mike, t|
|00000320| 6f 20 74 72 61 6e 73 66 | 65 72 0a 63 68 61 72 61 |o transf|er.chara|
|00000330| 63 74 65 72 73 20 66 72 | 6f 6d 20 74 68 65 20 75 |cters fr|om the u|
|00000340| 73 65 72 20 62 79 20 74 | 68 65 20 62 75 66 66 65 |ser by t|he buffe|
|00000350| 72 66 75 6c 20 61 6e 64 | 20 6e 6f 74 20 6f 6e 65 |rful and| not one|
|00000360| 20 61 74 20 61 20 74 69 | 6d 65 2e 20 54 68 69 73 | at a ti|me. This|
|00000370| 0a 72 65 64 75 63 65 73 | 20 74 69 6d 65 20 6f 76 |.reduces| time ov|
|00000380| 65 72 68 65 61 64 73 20 | 61 74 20 74 68 65 20 65 |erheads |at the e|
|00000390| 78 70 65 6e 73 65 20 6f | 66 20 73 70 61 63 65 20 |xpense o|f space |
|000003a0| 6f 76 65 72 68 65 61 64 | 73 2e 20 57 65 6c 6c 2c |overhead|s. Well,|
|000003b0| 20 74 68 65 0a 64 69 66 | 66 65 72 65 6e 63 65 20 | the.dif|ference |
|000003c0| 65 69 74 68 65 72 20 77 | 61 79 20 74 75 72 6e 73 |either w|ay turns|
|000003d0| 20 6f 75 74 20 74 6f 20 | 62 65 20 75 73 75 61 6c | out to |be usual|
|000003e0| 6c 79 20 73 6d 61 6c 6c | 20 65 6e 6f 75 67 68 20 |ly small| enough |
|000003f0| 74 6f 20 62 65 0a 69 72 | 72 65 6c 65 76 61 6e 74 |to be.ir|relevant|
|00000400| 2e 0a 0a 4f 74 68 65 72 | 20 6d 69 6e 6f 72 20 63 |...Other| minor c|
|00000410| 68 61 6e 67 65 73 20 69 | 6e 20 74 68 69 73 20 76 |hanges i|n this v|
|00000420| 65 72 73 69 6f 6e 20 61 | 72 65 20 62 65 74 74 65 |ersion a|re bette|
|00000430| 72 20 69 6e 74 65 67 72 | 61 74 69 6f 6e 20 66 6f |r integr|ation fo|
|00000440| 72 20 74 68 65 0a 49 6e | 73 74 61 6c 6c 61 62 6c |r the.In|stallabl|
|00000450| 65 20 44 72 69 76 65 72 | 20 6d 65 63 68 61 6e 69 |e Driver| mechani|
|00000460| 73 6d 20 6f 66 20 53 79 | 73 74 65 6d 20 56 2f 33 |sm of Sy|stem V/3|
|00000470| 38 36 2c 20 61 6e 64 20 | 74 68 65 20 63 6f 72 72 |86, and |the corr|
|00000480| 65 63 74 69 6f 6e 20 6f | 66 20 61 6e 0a 69 6e 63 |ection o|f an.inc|
|00000490| 72 65 64 69 62 6c 65 20 | 62 75 67 20 28 77 68 79 |redible |bug (why|
|000004a0| 20 6e 6f 62 6f 64 79 20 | 72 65 70 6f 72 74 65 64 | nobody |reported|
|000004b0| 20 69 74 3f 29 20 74 68 | 61 74 20 49 20 68 61 64 | it?) th|at I had|
|000004c0| 20 77 61 6e 74 6f 6e 6c | 79 20 69 6e 74 72 6f 64 | wantonl|y introd|
|000004d0| 75 63 65 64 0a 77 68 69 | 6c 65 20 70 6f 73 74 69 |uced.whi|le posti|
|000004e0| 6e 67 20 74 68 65 20 76 | 65 72 73 69 6f 6e 20 62 |ng the v|ersion b|
|000004f0| 65 66 6f 72 65 20 74 68 | 69 73 2c 20 62 79 20 77 |efore th|is, by w|
|00000500| 61 79 20 6f 66 20 69 6e | 63 6f 6d 70 6c 65 74 65 |ay of in|complete|
|00000510| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 0a 6f 66 20 | applica|tion.of |
|00000520| 44 65 20 4d 6f 72 67 61 | 6e 27 73 20 74 6f 20 61 |De Morga|n's to a|
|00000530| 20 62 6f 6f 6c 65 61 6e | 20 74 65 73 74 20 28 61 | boolean| test (a|
|00000540| 20 26 26 20 72 65 61 6d | 69 6e 65 64 20 73 75 63 | && ream|ined suc|
|00000550| 68 20 69 6e 73 74 65 61 | 64 20 6f 66 20 62 65 63 |h instea|d of bec|
|00000560| 6f 6d 69 6e 67 0a 7c 7c | 29 20 2d 2d 20 61 20 73 |oming.|||) -- a s|
|00000570| 74 75 70 69 64 20 6f 76 | 65 72 73 69 67 68 74 20 |tupid ov|ersight |
|00000580| 74 68 61 74 20 63 61 75 | 73 65 64 20 63 68 61 72 |that cau|sed char|
|00000590| 61 63 74 65 72 20 6c 6f | 73 73 65 73 20 77 69 74 |acter lo|sses wit|
|000005a0| 68 20 73 6c 6f 77 0a 70 | 72 69 6e 74 65 72 73 2e |h slow.p|rinters.|
|000005b0| 0a 0a 09 4c 65 74 20 6d | 65 20 72 65 70 65 61 74 |...Let m|e repeat|
|000005c0| 20 68 65 72 65 20 74 68 | 65 20 75 73 75 61 6c 20 | here th|e usual |
|000005d0| 64 69 73 63 6c 61 69 6d | 65 72 3a 20 74 68 69 73 |disclaim|er: this|
|000005e0| 20 77 6f 72 6b 20 68 61 | 73 20 62 65 65 6e 0a 09 | work ha|s been..|
|000005f0| 65 6e 74 69 72 65 6c 79 | 20 64 6f 6e 65 20 62 79 |entirely| done by|
|00000600| 20 6d 65 2c 20 77 69 74 | 68 20 6d 79 20 6f 77 6e | me, wit|h my own|
|00000610| 20 72 65 73 6f 75 72 63 | 65 73 2c 20 66 75 6e 64 | resourc|es, fund|
|00000620| 69 6e 67 20 61 6e 64 20 | 74 69 6d 65 2c 0a 09 61 |ing and |time,..a|
|00000630| 6e 64 20 69 73 20 6e 6f | 20 77 61 79 20 72 65 6c |nd is no| way rel|
|00000640| 61 74 65 64 20 74 6f 20 | 74 68 65 20 72 65 73 65 |ated to |the rese|
|00000650| 61 72 63 68 20 6f 66 20 | 74 68 65 20 55 6e 76 69 |arch of |the Unvi|
|00000660| 65 72 73 69 74 79 20 43 | 6f 6c 6c 65 67 65 0a 09 |ersity C|ollege..|
|00000670| 6f 66 20 57 61 6c 65 73 | 2c 20 77 68 69 63 68 20 |of Wales|, which |
|00000680| 49 20 68 6f 77 65 76 65 | 72 20 74 68 61 6e 6b 20 |I howeve|r thank |
|00000690| 66 6f 72 20 74 68 65 20 | 70 65 72 6d 69 73 73 69 |for the |permissi|
|000006a0| 6f 6e 20 74 6f 20 75 73 | 65 20 6e 65 77 73 2e 0a |on to us|e news..|
|000006b0| 0a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.-------|--------|
|000006c0| 2d 2d 2d 2d 2d 20 63 75 | 74 20 68 65 72 65 20 2d |----- cu|t here -|
|000006d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006e0| 2d 2d 2d 2d 2d 2d 2d 0a | 23 21 20 2f 62 69 6e 2f |-------.|#! /bin/|
|000006f0| 73 68 0a 23 20 54 68 69 | 73 20 69 73 20 61 20 73 |sh.# Thi|s is a s|
|00000700| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 2e 20 20 52 |hell arc|hive. R|
|00000710| 65 6d 6f 76 65 20 61 6e | 79 74 68 69 6e 67 20 62 |emove an|ything b|
|00000720| 65 66 6f 72 65 20 74 68 | 69 73 20 6c 69 6e 65 2c |efore th|is line,|
|00000730| 20 74 68 65 6e 20 75 6e | 70 61 63 6b 0a 23 20 69 | then un|pack.# i|
|00000740| 74 20 62 79 20 73 61 76 | 69 6e 67 20 69 74 20 69 |t by sav|ing it i|
|00000750| 6e 74 6f 20 61 20 66 69 | 6c 65 20 61 6e 64 20 74 |nto a fi|le and t|
|00000760| 79 70 69 6e 67 20 22 73 | 68 20 66 69 6c 65 22 2e |yping "s|h file".|
|00000770| 20 20 54 6f 20 6f 76 65 | 72 77 72 69 74 65 20 65 | To ove|rwrite e|
|00000780| 78 69 73 74 69 6e 67 0a | 23 20 66 69 6c 65 73 2c |xisting.|# files,|
|00000790| 20 74 79 70 65 20 22 73 | 68 20 66 69 6c 65 20 2d | type "s|h file -|
|000007a0| 63 22 2e 20 20 59 6f 75 | 20 63 61 6e 20 61 6c 73 |c". You| can als|
|000007b0| 6f 20 66 65 65 64 20 74 | 68 69 73 20 61 73 20 73 |o feed t|his as s|
|000007c0| 74 61 6e 64 61 72 64 20 | 69 6e 70 75 74 20 76 69 |tandard |input vi|
|000007d0| 61 0a 23 20 75 6e 73 68 | 61 72 2c 20 6f 72 20 62 |a.# unsh|ar, or b|
|000007e0| 79 20 74 79 70 69 6e 67 | 20 22 73 68 20 3c 66 69 |y typing| "sh <fi|
|000007f0| 6c 65 22 2c 20 65 2e 67 | 2e 2e 20 20 49 66 20 74 |le", e.g|.. If t|
|00000800| 68 69 73 20 61 72 63 68 | 69 76 65 20 69 73 20 63 |his arch|ive is c|
|00000810| 6f 6d 70 6c 65 74 65 2c | 20 79 6f 75 0a 23 20 77 |omplete,| you.# w|
|00000820| 69 6c 6c 20 73 65 65 20 | 74 68 65 20 66 6f 6c 6c |ill see |the foll|
|00000830| 6f 77 69 6e 67 20 6d 65 | 73 73 61 67 65 20 61 74 |owing me|ssage at|
|00000840| 20 74 68 65 20 65 6e 64 | 3a 0a 23 09 09 22 45 6e | the end|:.#.."En|
|00000850| 64 20 6f 66 20 61 72 63 | 68 69 76 65 20 31 20 28 |d of arc|hive 1 (|
|00000860| 6f 66 20 31 29 2e 22 0a | 23 20 43 6f 6e 74 65 6e |of 1).".|# Conten|
|00000870| 74 73 3a 20 20 4d 41 4e | 49 46 45 53 54 20 4d 61 |ts: MAN|IFEST Ma|
|00000880| 6b 65 66 69 6c 65 20 4d | 61 73 74 65 72 20 4e 61 |kefile M|aster Na|
|00000890| 6d 65 20 4e 6f 64 65 20 | 52 45 41 44 4d 45 20 53 |me Node |README S|
|000008a0| 70 61 63 65 2e 63 20 53 | 79 73 74 65 6d 0a 23 20 |pace.c S|ystem.# |
|000008b0| 20 20 70 70 2e 63 20 70 | 70 2e 68 0a 23 20 57 72 | pp.c p|p.h.# Wr|
|000008c0| 61 70 70 65 64 20 62 79 | 20 73 77 40 61 77 61 72 |apped by| sw@awar|
|000008d0| 65 20 6f 6e 20 54 75 65 | 20 41 75 67 20 32 38 20 |e on Tue| Aug 28 |
|000008e0| 31 33 3a 32 35 3a 31 31 | 20 31 39 39 30 0a 50 41 |13:25:11| 1990.PA|
|000008f0| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|00000900| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|00000910| 72 74 20 50 41 54 48 0a | 65 63 68 6f 20 27 0a 20 |rt PATH.|echo '. |
|00000920| 20 20 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 38 | Copyr|ight 198|
|00000930| 39 20 50 69 65 72 63 61 | 72 6c 6f 20 47 72 61 6e |9 Pierca|rlo Gran|
|00000940| 64 69 2e 20 20 41 6c 6c | 20 72 69 67 68 74 73 20 |di. All| rights |
|00000950| 72 65 73 65 72 76 65 64 | 2e 0a 0a 20 20 20 20 54 |reserved|... T|
|00000960| 68 69 73 20 73 68 61 72 | 20 61 72 63 68 69 76 65 |his shar| archive|
|00000970| 20 63 6f 6e 74 61 69 6e | 73 20 66 72 65 65 20 73 | contain|s free s|
|00000980| 6f 66 74 77 61 72 65 3b | 20 79 6f 75 20 63 61 6e |oftware;| you can|
|00000990| 20 72 65 64 69 73 74 72 | 69 62 75 74 65 0a 20 20 | redistr|ibute. |
|000009a0| 20 20 69 74 20 61 6e 64 | 2f 6f 72 20 6d 6f 64 69 | it and|/or modi|
|000009b0| 66 79 20 69 74 20 75 6e | 64 65 72 20 74 68 65 20 |fy it un|der the |
|000009c0| 74 65 72 6d 73 20 6f 66 | 20 74 68 65 20 47 4e 55 |terms of| the GNU|
|000009d0| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 0a | General| Public.|
|000009e0| 20 20 20 20 4c 69 63 65 | 6e 73 65 20 61 73 20 70 | Lice|nse as p|
|000009f0| 75 62 6c 69 73 68 65 64 | 20 62 79 20 74 68 65 20 |ublished| by the |
|00000a00| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00000a10| 75 6e 64 61 74 69 6f 6e | 3b 20 65 69 74 68 65 72 |undation|; either|
|00000a20| 0a 20 20 20 20 76 65 72 | 73 69 6f 6e 20 31 2c 20 |. ver|sion 1, |
|00000a30| 6f 72 20 28 61 74 20 79 | 6f 75 72 20 6f 70 74 69 |or (at y|our opti|
|00000a40| 6f 6e 29 20 61 6e 79 20 | 6c 61 74 65 72 20 76 65 |on) any |later ve|
|00000a50| 72 73 69 6f 6e 2e 0a 0a | 20 20 20 20 41 73 20 61 |rsion...| As a|
|00000a60| 20 73 70 65 63 69 61 6c | 20 63 61 73 65 2c 20 74 | special| case, t|
|00000a70| 68 69 73 20 64 72 69 76 | 65 72 20 6d 61 79 20 62 |his driv|er may b|
|00000a80| 65 20 69 6e 63 6f 72 70 | 6f 72 61 74 65 64 20 69 |e incorp|orated i|
|00000a90| 6e 20 61 6e 79 20 4f 53 | 20 6b 65 72 6e 65 6c 2c |n any OS| kernel,|
|00000aa0| 0a 20 20 20 20 77 68 65 | 74 68 65 72 20 74 68 65 |. whe|ther the|
|00000ab0| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|00000ac0| 6c 69 63 20 4c 69 63 65 | 6e 73 65 20 61 70 70 6c |lic Lice|nse appl|
|00000ad0| 69 65 73 20 74 6f 20 69 | 74 20 6f 72 20 6e 6f 74 |ies to i|t or not|
|00000ae0| 2e 0a 0a 20 20 20 20 54 | 68 69 73 20 73 68 61 72 |... T|his shar|
|00000af0| 20 61 72 63 68 69 76 65 | 20 69 73 20 64 69 73 74 | archive| is dist|
|00000b00| 72 69 62 75 74 65 64 20 | 69 6e 20 74 68 65 20 68 |ributed |in the h|
|00000b10| 6f 70 65 20 74 68 61 74 | 20 69 74 20 77 69 6c 6c |ope that| it will|
|00000b20| 20 62 65 0a 20 20 20 20 | 75 73 65 66 75 6c 2c 20 | be. |useful, |
|00000b30| 62 75 74 20 57 49 54 48 | 4f 55 54 20 41 4e 59 20 |but WITH|OUT ANY |
|00000b40| 57 41 52 52 41 4e 54 59 | 3b 20 77 69 74 68 6f 75 |WARRANTY|; withou|
|00000b50| 74 20 65 76 65 6e 20 74 | 68 65 20 69 6d 70 6c 69 |t even t|he impli|
|00000b60| 65 64 0a 20 20 20 20 77 | 61 72 72 61 6e 74 79 20 |ed. w|arranty |
|00000b70| 6f 66 20 4d 45 52 43 48 | 41 4e 54 41 42 49 4c 49 |of MERCH|ANTABILI|
|00000b80| 54 59 20 6f 72 20 46 49 | 54 4e 45 53 53 20 46 4f |TY or FI|TNESS FO|
|00000b90| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 0a 20 |R A PART|ICULAR. |
|00000ba0| 20 20 20 50 55 52 50 4f | 53 45 2e 20 20 53 65 65 | PURPO|SE. See|
|00000bb0| 20 74 68 65 20 47 4e 55 | 20 47 65 6e 65 72 61 6c | the GNU| General|
|00000bc0| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 20 | Public |License |
|00000bd0| 66 6f 72 20 6d 6f 72 65 | 20 64 65 74 61 69 6c 73 |for more| details|
|00000be0| 2e 0a 0a 20 20 20 20 59 | 6f 75 20 6d 61 79 20 68 |... Y|ou may h|
|00000bf0| 61 76 65 20 72 65 63 65 | 69 76 65 64 20 61 20 63 |ave rece|ived a c|
|00000c00| 6f 70 79 20 6f 66 20 74 | 68 65 20 47 4e 55 20 47 |opy of t|he GNU G|
|00000c10| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|00000c20| 63 65 6e 73 65 0a 20 20 | 20 20 61 6c 6f 6e 67 20 |cense. | along |
|00000c30| 77 69 74 68 20 74 68 69 | 73 20 70 72 6f 67 72 61 |with thi|s progra|
|00000c40| 6d 3b 20 69 66 20 6e 6f | 74 2c 20 77 72 69 74 65 |m; if no|t, write|
|00000c50| 20 74 6f 20 74 68 65 20 | 46 72 65 65 20 53 6f 66 | to the |Free Sof|
|00000c60| 74 77 61 72 65 0a 20 20 | 20 20 46 6f 75 6e 64 61 |tware. | Founda|
|00000c70| 74 69 6f 6e 2c 20 49 6e | 63 2e 2c 20 36 37 35 20 |tion, In|c., 675 |
|00000c80| 4d 61 73 73 20 41 76 65 | 2c 20 43 61 6d 62 72 69 |Mass Ave|, Cambri|
|00000c90| 64 67 65 2c 20 4d 41 20 | 30 32 31 33 39 2c 20 55 |dge, MA |02139, U|
|00000ca0| 53 41 2e 0a 27 0a 73 6c | 65 65 70 20 34 0a 69 66 |SA..'.sl|eep 4.if|
|00000cb0| 20 74 65 73 74 20 2d 66 | 20 27 4d 41 4e 49 46 45 | test -f| 'MANIFE|
|00000cc0| 53 54 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |ST' -a "|${1}" !=|
|00000cd0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00000ce0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00000cf0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00000d00| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 4d 41 4e |ting fil|e \"'MAN|
|00000d10| 49 46 45 53 54 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |IFEST'\"|.else.ec|
|00000d20| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00000d30| 69 6e 67 20 5c 22 27 4d | 41 4e 49 46 45 53 54 27 |ing \"'M|ANIFEST'|
|00000d40| 5c 22 20 5c 28 34 30 36 | 20 63 68 61 72 61 63 74 |\" \(406| charact|
|00000d50| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00000d60| 2f 22 20 3e 27 4d 41 4e | 49 46 45 53 54 27 20 3c |/" >'MAN|IFEST' <|
|00000d70| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00000d80| 20 20 20 46 69 6c 65 20 | 4e 61 6d 65 09 09 41 72 | File |Name..Ar|
|00000d90| 63 68 69 76 65 20 23 09 | 44 65 73 63 72 69 70 74 |chive #.|Descript|
|00000da0| 69 6f 6e 0a 58 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ion.X---|--------|
|00000db0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000dc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000dd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000de0| 0a 58 20 4d 41 4e 49 46 | 45 53 54 20 20 20 20 20 |.X MANIF|EST |
|00000df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000e00| 0a 58 20 4d 61 6b 65 66 | 69 6c 65 20 20 20 20 20 |.X Makef|ile |
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000e20| 0a 58 20 4d 61 73 74 65 | 72 20 20 20 20 20 20 20 |.X Maste|r |
|00000e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000e40| 0a 58 20 4e 61 6d 65 20 | 20 20 20 20 20 20 20 20 |.X Name | |
|00000e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000e60| 0a 58 20 4e 6f 64 65 20 | 20 20 20 20 20 20 20 20 |.X Node | |
|00000e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000e80| 0a 58 20 52 45 41 44 4d | 45 20 20 20 20 20 20 20 |.X READM|E |
|00000e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000ea0| 0a 58 20 53 70 61 63 65 | 2e 63 20 20 20 20 20 20 |.X Space|.c |
|00000eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000ec0| 0a 58 20 53 79 73 74 65 | 6d 20 20 20 20 20 20 20 |.X Syste|m |
|00000ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000ee0| 0a 58 20 70 70 2e 63 20 | 20 20 20 20 20 20 20 20 |.X pp.c | |
|00000ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000f00| 0a 58 20 70 70 2e 68 20 | 20 20 20 20 20 20 20 20 |.X pp.h | |
|00000f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 31 09 | | 1.|
|00000f20| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 69 66 20 |.END_OF_|FILE.if |
|00000f30| 74 65 73 74 20 34 30 36 | 20 2d 6e 65 20 60 77 63 |test 406| -ne `wc|
|00000f40| 20 2d 63 20 3c 27 4d 41 | 4e 49 46 45 53 54 27 60 | -c <'MA|NIFEST'`|
|00000f50| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00000f60| 73 68 61 72 3a 20 5c 22 | 27 4d 41 4e 49 46 45 53 |shar: \"|'MANIFES|
|00000f70| 54 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |T'\" unp|acked wi|
|00000f80| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00000f90| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 4d 41 4e 49 |i.# end |of 'MANI|
|00000fa0| 46 45 53 54 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |FEST'.fi|.if test|
|00000fb0| 20 2d 66 20 27 4d 61 6b | 65 66 69 6c 65 27 20 2d | -f 'Mak|efile' -|
|00000fc0| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00000fd0| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00000fe0| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00000ff0| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00001000| 66 69 6c 65 20 5c 22 27 | 4d 61 6b 65 66 69 6c 65 |file \"'|Makefile|
|00001010| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00001020| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00001030| 22 27 4d 61 6b 65 66 69 | 6c 65 27 5c 22 20 5c 28 |"'Makefi|le'\" \(|
|00001040| 35 32 35 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |525 char|acters\)|
|00001050| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 |.sed "s/|^X//" >'|
|00001060| 4d 61 6b 65 66 69 6c 65 | 27 20 3c 3c 27 45 4e 44 |Makefile|' <<'END|
|00001070| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 44 45 56 09 09 |_OF_FILE|'.XDEV..|
|00001080| 3d 70 70 0a 58 43 4f 4e | 46 09 09 3d 2f 65 74 63 |=pp.XCON|F..=/etc|
|00001090| 2f 63 6f 6e 66 2f 62 69 | 6e 2f 0a 58 53 59 53 09 |/conf/bi|n/.XSYS.|
|000010a0| 09 3d 2f 75 73 72 2f 69 | 6e 63 6c 75 64 65 2f 73 |.=/usr/i|nclude/s|
|000010b0| 79 73 0a 58 4c 53 59 53 | 09 09 3d 2f 75 73 72 2f |ys.XLSYS|..=/usr/|
|000010c0| 6c 6f 63 61 6c 2f 69 6e | 63 6c 75 64 65 2f 73 79 |local/in|clude/sy|
|000010d0| 73 0a 58 43 46 4c 41 47 | 53 09 09 3d 2d 4f 20 2d |s.XCFLAG|S..=-O -|
|000010e0| 44 49 4e 4b 45 52 4e 45 | 4c 20 2d 49 24 28 4c 53 |DINKERNE|L -I$(LS|
|000010f0| 59 53 29 0a 58 0a 58 44 | 72 69 76 65 72 2e 6f 3a |YS).X.XD|river.o:|
|00001100| 09 24 28 44 45 56 29 2e | 6f 3b 09 09 6c 6e 20 24 |.$(DEV).|o;..ln $|
|00001110| 3f 20 24 40 0a 58 53 70 | 61 63 65 2e 63 3a 09 73 |? $@.XSp|ace.c:.s|
|00001120| 70 61 63 65 2e 63 3b 09 | 09 6c 6e 20 24 3f 20 24 |pace.c;.|.ln $? $|
|00001130| 40 0a 58 24 28 4c 53 59 | 53 29 2f 24 28 44 45 56 |@.X$(LSY|S)/$(DEV|
|00001140| 29 2e 68 3a 09 24 28 53 | 59 53 29 2f 24 28 44 45 |).h:.$(S|YS)/$(DE|
|00001150| 56 29 2e 68 3b 09 6c 6e | 20 24 3f 20 24 40 0a 58 |V).h;.ln| $? $@.X|
|00001160| 24 28 53 59 53 29 2f 24 | 28 44 45 56 29 2e 68 3a |$(SYS)/$|(DEV).h:|
|00001170| 09 24 28 44 45 56 29 2e | 68 3b 09 09 63 70 20 24 |.$(DEV).|h;..cp $|
|00001180| 3f 20 24 40 0a 58 0a 58 | 24 28 44 45 56 29 2e 6f |? $@.X.X|$(DEV).o|
|00001190| 3a 09 24 28 4c 53 59 53 | 29 2f 24 28 44 45 56 29 |:.$(LSYS|)/$(DEV)|
|000011a0| 2e 68 20 53 70 61 63 65 | 2e 63 0a 58 73 70 61 63 |.h Space|.c.Xspac|
|000011b0| 65 2e 6f 3a 09 24 28 4c | 53 59 53 29 2f 24 28 44 |e.o:.$(L|SYS)/$(D|
|000011c0| 45 56 29 2e 68 0a 58 73 | 70 61 63 65 2e 6f 3a 09 |EV).h.Xs|pace.o:.|
|000011d0| 63 6f 6e 66 69 67 2e 68 | 0a 58 0a 58 61 6c 6c 3a |config.h|.X.Xall:|
|000011e0| 09 09 44 72 69 76 65 72 | 2e 6f 20 73 70 61 63 65 |..Driver|.o space|
|000011f0| 2e 6f 0a 58 0a 58 69 6e | 73 74 61 6c 6c 3a 09 4d |.o.X.Xin|stall:.M|
|00001200| 61 73 74 65 72 20 53 79 | 73 74 65 6d 20 44 72 69 |aster Sy|stem Dri|
|00001210| 76 65 72 2e 6f 20 53 70 | 61 63 65 2e 63 20 4e 6f |ver.o Sp|ace.c No|
|00001220| 64 65 20 4e 61 6d 65 0a | 58 09 24 28 43 4f 4e 46 |de Name.|X.$(CONF|
|00001230| 29 69 64 69 6e 73 74 61 | 6c 6c 20 2d 6b 65 61 20 |)idinsta|ll -kea |
|00001240| 2d 6d 73 6f 70 6e 20 24 | 28 44 45 56 29 0a 58 09 |-msopn $|(DEV).X.|
|00001250| 24 28 43 4f 4e 46 29 69 | 64 6d 6b 6e 6f 64 20 2d |$(CONF)i|dmknod -|
|00001260| 73 3b 20 63 68 6d 6f 64 | 20 61 3d 77 20 2f 64 65 |s; chmod| a=w /de|
|00001270| 76 2f 24 28 44 45 56 29 | 3f 0a 58 0a 58 63 6c 65 |v/$(DEV)|?.X.Xcle|
|00001280| 61 6e 3a 3b 09 09 72 6d | 20 2d 66 20 2a 2e 6f 20 |an:;..rm| -f *.o |
|00001290| 63 6f 72 65 20 53 70 61 | 63 65 2e 63 0a 45 4e 44 |core Spa|ce.c.END|
|000012a0| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|000012b0| 20 35 32 35 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 525 -ne| `wc -c |
|000012c0| 3c 27 4d 61 6b 65 66 69 | 6c 65 27 60 3b 20 74 68 |<'Makefi|le'`; th|
|000012d0| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|000012e0| 3a 20 5c 22 27 4d 61 6b | 65 66 69 6c 65 27 5c 22 |: \"'Mak|efile'\"|
|000012f0| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00001300| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 63 68 |rong siz|e!.fi.ch|
|00001310| 6d 6f 64 20 2b 78 20 27 | 4d 61 6b 65 66 69 6c 65 |mod +x '|Makefile|
|00001320| 27 0a 23 20 65 6e 64 20 | 6f 66 20 27 4d 61 6b 65 |'.# end |of 'Make|
|00001330| 66 69 6c 65 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |file'.fi|.if test|
|00001340| 20 2d 66 20 27 4d 61 73 | 74 65 72 27 20 2d 61 20 | -f 'Mas|ter' -a |
|00001350| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00001360| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00001370| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00001380| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00001390| 6c 65 20 5c 22 27 4d 61 | 73 74 65 72 27 5c 22 0a |le \"'Ma|ster'\".|
|000013a0| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|000013b0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 4d 61 |Extracti|ng \"'Ma|
|000013c0| 73 74 65 72 27 5c 22 20 | 5c 28 32 39 20 63 68 61 |ster'\" |\(29 cha|
|000013d0| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|000013e0| 2f 5e 58 2f 2f 22 20 3e | 27 4d 61 73 74 65 72 27 |/^X//" >|'Master'|
|000013f0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00001400| 0a 58 70 70 09 49 6f 63 | 77 09 69 63 6f 48 47 4f |.Xpp.Ioc|w.icoHGO|
|00001410| 09 70 70 09 30 09 30 09 | 31 09 33 09 2d 31 0a 45 |.pp.0.0.|1.3.-1.E|
|00001420| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00001430| 73 74 20 32 39 20 2d 6e | 65 20 60 77 63 20 2d 63 |st 29 -n|e `wc -c|
|00001440| 20 3c 27 4d 61 73 74 65 | 72 27 60 3b 20 74 68 65 | <'Maste|r'`; the|
|00001450| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00001460| 20 5c 22 27 4d 61 73 74 | 65 72 27 5c 22 20 75 6e | \"'Mast|er'\" un|
|00001470| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00001480| 67 20 73 69 7a 65 21 0a | 66 69 0a 63 68 6d 6f 64 |g size!.|fi.chmod|
|00001490| 20 2b 78 20 27 4d 61 73 | 74 65 72 27 0a 23 20 65 | +x 'Mas|ter'.# e|
|000014a0| 6e 64 20 6f 66 20 27 4d | 61 73 74 65 72 27 0a 66 |nd of 'M|aster'.f|
|000014b0| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 4e 61 |i.if tes|t -f 'Na|
|000014c0| 6d 65 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |me' -a "|${1}" !=|
|000014d0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|000014e0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|000014f0| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001500| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 4e 61 6d |ting fil|e \"'Nam|
|00001510| 65 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |e'\".els|e.echo s|
|00001520| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00001530| 5c 22 27 4e 61 6d 65 27 | 5c 22 20 5c 28 34 33 20 |\"'Name'|\" \(43 |
|00001540| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|00001550| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 4e 61 6d 65 | "s/^X//|" >'Name|
|00001560| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00001570| 27 0a 58 70 70 20 50 61 | 72 61 6c 6c 65 6c 20 70 |'.Xpp Pa|rallel p|
|00001580| 6f 72 74 20 64 72 69 76 | 65 72 2c 20 72 61 77 20 |ort driv|er, raw |
|00001590| 70 6f 6c 6c 65 64 20 6f | 75 74 70 75 74 0a 45 4e |polled o|utput.EN|
|000015a0| 44 5f 4f 46 5f 46 49 4c | 45 0a 69 66 20 74 65 73 |D_OF_FIL|E.if tes|
|000015b0| 74 20 34 33 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |t 43 -ne| `wc -c |
|000015c0| 3c 27 4e 61 6d 65 27 60 | 3b 20 74 68 65 6e 0a 20 |<'Name'`|; then. |
|000015d0| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|000015e0| 27 4e 61 6d 65 27 5c 22 | 20 75 6e 70 61 63 6b 65 |'Name'\"| unpacke|
|000015f0| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00001600| 65 21 0a 66 69 0a 63 68 | 6d 6f 64 20 2b 78 20 27 |e!.fi.ch|mod +x '|
|00001610| 4e 61 6d 65 27 0a 23 20 | 65 6e 64 20 6f 66 20 27 |Name'.# |end of '|
|00001620| 4e 61 6d 65 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |Name'.fi|.if test|
|00001630| 20 2d 66 20 27 4e 6f 64 | 65 27 20 2d 61 20 22 24 | -f 'Nod|e' -a "$|
|00001640| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00001650| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00001660| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00001670| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00001680| 20 5c 22 27 4e 6f 64 65 | 27 5c 22 0a 65 6c 73 65 | \"'Node|'\".else|
|00001690| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|000016a0| 61 63 74 69 6e 67 20 5c | 22 27 4e 6f 64 65 27 5c |acting \|"'Node'\|
|000016b0| 22 20 5c 28 33 33 20 63 | 68 61 72 61 63 74 65 72 |" \(33 c|haracter|
|000016c0| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|000016d0| 20 3e 27 4e 6f 64 65 27 | 20 3c 3c 27 45 4e 44 5f | >'Node'| <<'END_|
|000016e0| 4f 46 5f 46 49 4c 45 27 | 0a 58 70 70 09 70 70 30 |OF_FILE'|.Xpp.pp0|
|000016f0| 09 63 09 30 0a 58 70 70 | 09 70 70 31 09 63 09 31 |.c.0.Xpp|.pp1.c.1|
|00001700| 0a 58 70 70 09 70 70 32 | 09 63 09 32 0a 45 4e 44 |.Xpp.pp2|.c.2.END|
|00001710| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00001720| 20 33 33 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c | 33 -ne |`wc -c <|
|00001730| 27 4e 6f 64 65 27 60 3b | 20 74 68 65 6e 0a 20 20 |'Node'`;| then. |
|00001740| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00001750| 4e 6f 64 65 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |Node'\" |unpacked|
|00001760| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00001770| 21 0a 66 69 0a 63 68 6d | 6f 64 20 2b 78 20 27 4e |!.fi.chm|od +x 'N|
|00001780| 6f 64 65 27 0a 23 20 65 | 6e 64 20 6f 66 20 27 4e |ode'.# e|nd of 'N|
|00001790| 6f 64 65 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |ode'.fi.|if test |
|000017a0| 2d 66 20 27 52 45 41 44 | 4d 45 27 20 2d 61 20 22 |-f 'READ|ME' -a "|
|000017b0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|000017c0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|000017d0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|000017e0| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|000017f0| 65 20 5c 22 27 52 45 41 | 44 4d 45 27 5c 22 0a 65 |e \"'REA|DME'\".e|
|00001800| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00001810| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 52 45 41 |xtractin|g \"'REA|
|00001820| 44 4d 45 27 5c 22 20 5c | 28 34 37 34 37 20 63 68 |DME'\" \|(4747 ch|
|00001830| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00001840| 73 2f 5e 58 2f 2f 22 20 | 3e 27 52 45 41 44 4d 45 |s/^X//" |>'README|
|00001850| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00001860| 27 0a 58 09 41 20 46 41 | 53 54 20 50 41 52 41 4c |'.X.A FA|ST PARAL|
|00001870| 4c 45 4c 20 50 4f 52 54 | 20 44 52 49 56 45 52 20 |LEL PORT| DRIVER |
|00001880| 54 48 41 54 20 44 4f 45 | 53 20 4e 4f 54 20 55 53 |THAT DOE|S NOT US|
|00001890| 45 20 49 4e 54 45 52 52 | 55 50 54 53 0a 58 0a 58 |E INTERR|UPTS.X.X|
|000018a0| 54 68 69 73 20 69 73 20 | 74 68 65 20 73 6f 75 72 |This is |the sour|
|000018b0| 63 65 20 6f 66 20 61 20 | 70 61 72 61 6c 6c 65 6c |ce of a |parallel|
|000018c0| 20 70 6f 72 74 20 64 72 | 69 76 65 72 20 66 6f 72 | port dr|iver for|
|000018d0| 20 53 79 73 74 65 6d 20 | 56 2f 33 38 36 2c 20 72 | System |V/386, r|
|000018e0| 65 6c 2e 20 33 2e 32 2e | 0a 58 0a 58 49 74 20 69 |el. 3.2.|.X.XIt i|
|000018f0| 73 20 64 69 66 66 65 72 | 65 6e 74 20 66 72 6f 6d |s differ|ent from|
|00001900| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 6c 70 | the sta|ndard lp|
|00001910| 28 37 29 20 64 72 69 76 | 65 72 20 62 65 63 61 75 |(7) driv|er becau|
|00001920| 73 65 20 69 74 20 64 6f | 65 73 20 6f 6e 6c 79 20 |se it do|es only |
|00001930| 72 61 77 0a 58 6f 75 74 | 70 75 74 20 28 77 68 69 |raw.Xout|put (whi|
|00001940| 6c 65 20 6c 70 28 37 29 | 20 75 73 65 73 20 74 68 |le lp(7)| uses th|
|00001950| 65 20 74 65 72 6d 69 6f | 28 34 29 20 6c 69 6e 65 |e termio|(4) line|
|00001960| 20 64 69 73 63 69 70 6c | 69 6e 65 29 2c 20 61 6e | discipl|ine), an|
|00001970| 64 20 69 74 20 64 6f 65 | 73 20 6e 6f 74 20 75 73 |d it doe|s not us|
|00001980| 65 0a 58 69 6e 74 65 72 | 72 75 70 74 73 2e 20 49 |e.Xinter|rupts. I|
|00001990| 74 20 61 73 73 75 6d 65 | 73 20 74 68 61 74 20 74 |t assume|s that t|
|000019a0| 68 65 20 70 72 69 6e 74 | 65 72 20 68 61 73 20 61 |he print|er has a|
|000019b0| 6e 20 69 6e 74 65 72 6e | 61 6c 20 62 75 66 66 65 |n intern|al buffe|
|000019c0| 72 2c 20 73 6f 20 74 68 | 61 74 20 74 68 65 0a 58 |r, so th|at the.X|
|000019d0| 6d 6f 73 74 20 65 66 66 | 69 63 69 65 6e 74 20 73 |most eff|icient s|
|000019e0| 74 79 6c 65 20 6f 66 20 | 63 6f 6d 6d 75 6e 69 63 |tyle of |communic|
|000019f0| 61 74 69 6f 6e 20 69 73 | 20 74 6f 20 70 75 6d 70 |ation is| to pump|
|00001a00| 20 63 68 61 72 61 63 74 | 65 72 73 20 61 73 20 66 | charact|ers as f|
|00001a10| 61 73 74 20 61 73 0a 58 | 70 6f 73 73 69 62 6c 65 |ast as.X|possible|
|00001a20| 20 75 6e 74 69 6c 20 74 | 68 65 20 62 75 66 66 65 | until t|he buffe|
|00001a30| 72 20 66 69 6c 6c 73 2c | 20 74 68 65 6e 20 73 6c |r fills,| then sl|
|00001a40| 65 65 70 20 66 6f 72 20 | 61 20 72 65 6c 61 74 69 |eep for |a relati|
|00001a50| 76 65 6c 79 20 6c 6f 6e | 67 20 70 65 72 69 6f 64 |vely lon|g period|
|00001a60| 0a 58 77 68 65 6e 20 69 | 74 20 73 69 67 6e 61 6c |.Xwhen i|t signal|
|00001a70| 73 20 6e 6f 74 20 72 65 | 61 64 79 2c 20 61 6e 64 |s not re|ady, and|
|00001a80| 20 74 72 79 20 61 67 61 | 69 6e 20 74 68 65 72 65 | try aga|in there|
|00001a90| 61 66 74 65 72 2e 0a 58 | 0a 58 54 68 69 73 20 69 |after..X|.XThis i|
|00001aa0| 6d 70 6c 69 65 73 20 74 | 68 61 74 20 6e 6f 20 69 |mplies t|hat no i|
|00001ab0| 6e 74 65 72 72 75 70 74 | 20 70 72 6f 63 65 73 73 |nterrupt| process|
|00001ac0| 69 6e 67 20 69 73 20 64 | 6f 6e 65 2c 20 77 68 69 |ing is d|one, whi|
|00001ad0| 63 68 20 68 61 73 20 74 | 68 65 20 61 64 76 61 6e |ch has t|he advan|
|00001ae0| 74 61 67 65 73 0a 58 6f | 66 20 73 69 6d 70 6c 69 |tages.Xo|f simpli|
|00001af0| 63 69 74 79 20 61 6e 64 | 20 6c 6f 77 20 6f 76 65 |city and| low ove|
|00001b00| 72 68 65 61 64 2c 20 61 | 6e 64 2c 20 70 65 72 68 |rhead, a|nd, perh|
|00001b10| 61 70 73 20 6d 6f 73 74 | 20 69 6d 70 6f 72 74 61 |aps most| importa|
|00001b20| 6e 74 6c 79 2c 20 6f 66 | 20 6e 6f 74 20 75 73 69 |ntly, of| not usi|
|00001b30| 6e 67 0a 58 6f 6e 65 20 | 6f 66 20 74 68 65 20 73 |ng.Xone |of the s|
|00001b40| 63 61 72 63 65 20 69 6e | 74 65 72 75 72 70 74 20 |carce in|terurpt |
|00001b50| 6c 69 6e 65 73 20 6f 66 | 20 74 68 65 20 49 53 41 |lines of| the ISA|
|00001b60| 20 62 75 73 2e 0a 58 0a | 58 09 4f 55 54 4c 49 4e | bus..X.|X.OUTLIN|
|00001b70| 45 20 4f 46 20 44 45 53 | 49 47 4e 0a 58 0a 58 4f |E OF DES|IGN.X.XO|
|00001b80| 75 74 70 75 74 20 69 73 | 20 64 6f 6e 65 20 65 6e |utput is| done en|
|00001b90| 74 69 72 65 6c 79 20 69 | 6e 20 74 68 65 20 74 6f |tirely i|n the to|
|00001ba0| 70 20 68 61 6c 66 20 6f | 66 20 74 68 65 20 64 72 |p half o|f the dr|
|00001bb0| 69 76 65 72 2c 20 61 6e | 64 20 74 68 65 72 65 66 |iver, an|d theref|
|00001bc0| 6f 72 65 20 6e 6f 74 0a | 58 69 6e 73 69 64 65 20 |ore not.|Xinside |
|00001bd0| 61 20 63 72 69 74 69 63 | 61 6c 20 72 65 67 69 6f |a critic|al regio|
|00001be0| 6e 2e 20 54 68 69 73 20 | 63 6f 75 6c 64 20 6d 65 |n. This |could me|
|00001bf0| 61 6e 20 74 68 61 74 20 | 6f 6e 20 61 20 76 65 72 |an that |on a ver|
|00001c00| 79 20 62 75 73 79 20 73 | 79 73 74 65 6d 20 74 68 |y busy s|ystem th|
|00001c10| 65 0a 58 70 75 6d 70 69 | 6e 67 20 63 6f 75 6c 64 |e.Xpumpi|ng could|
|00001c20| 20 62 65 20 69 6e 74 65 | 72 72 75 70 74 65 64 20 | be inte|rrupted |
|00001c30| 62 79 20 74 61 73 6b 20 | 73 77 69 74 63 68 69 6e |by task |switchin|
|00001c40| 67 2e 20 54 68 69 73 2c | 20 69 66 20 69 6d 70 6f |g. This,| if impo|
|00001c50| 72 74 61 6e 74 2c 20 63 | 61 6e 20 62 65 0a 58 65 |rtant, c|an be.Xe|
|00001c60| 61 73 69 6c 79 20 6f 62 | 76 69 61 74 65 64 2c 20 |asily ob|viated, |
|00001c70| 62 79 20 74 75 72 6e 69 | 6e 67 20 74 68 65 20 70 |by turni|ng the p|
|00001c80| 75 6d 70 69 6e 67 20 6c | 6f 6f 70 20 69 6e 74 6f |umping l|oop into|
|00001c90| 20 61 20 63 72 69 74 69 | 63 61 6c 20 72 65 67 69 | a criti|cal regi|
|00001ca0| 6f 6e 3b 20 69 66 20 74 | 68 69 73 0a 58 69 73 20 |on; if t|his.Xis |
|00001cb0| 64 6f 6e 65 20 69 74 20 | 62 65 63 6f 6d 65 73 20 |done it |becomes |
|00001cc0| 69 6d 70 6f 72 74 61 6e | 74 20 74 6f 20 6c 69 6d |importan|t to lim|
|00001cd0| 69 74 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |it the n|umber of|
|00001ce0| 20 63 68 61 72 61 63 74 | 65 72 73 20 70 75 6d 70 | charact|ers pump|
|00001cf0| 65 64 20 69 6e 20 6f 6e | 65 0a 58 67 6f 2c 20 62 |ed in on|e.Xgo, b|
|00001d00| 79 20 68 61 76 69 6e 67 | 20 74 77 6f 20 6c 6f 6f |y having| two loo|
|00001d10| 70 73 2c 20 74 68 65 20 | 6f 75 74 65 72 20 6f 6e |ps, the |outer on|
|00001d20| 65 20 74 68 61 74 20 72 | 75 6e 73 20 75 6e 74 69 |e that r|uns unti|
|00001d30| 6c 20 62 75 73 79 20 69 | 73 20 73 69 67 6e 61 6c |l busy i|s signal|
|00001d40| 65 64 2c 20 74 68 65 0a | 58 69 6e 6e 65 72 20 6f |ed, the.|Xinner o|
|00001d50| 6e 65 20 66 6f 72 20 61 | 20 66 69 78 65 64 20 6e |ne for a| fixed n|
|00001d60| 75 6d 62 65 72 20 6f 66 | 20 63 68 61 72 61 63 74 |umber of| charact|
|00001d70| 65 72 73 2c 20 61 6e 64 | 20 70 75 74 20 6f 6e 6c |ers, and| put onl|
|00001d80| 79 20 74 68 65 20 69 6e | 6e 65 72 20 6f 6e 65 20 |y the in|ner one |
|00001d90| 69 6e 0a 58 74 68 65 20 | 63 72 69 74 69 63 61 6c |in.Xthe |critical|
|00001da0| 20 72 65 67 69 6f 6e 2e | 0a 58 0a 58 41 20 73 69 | region.|.X.XA si|
|00001db0| 6d 69 6c 61 72 20 64 72 | 69 76 65 72 20 68 61 73 |milar dr|iver has|
|00001dc0| 20 62 65 65 6e 20 70 6f | 73 74 65 64 20 62 79 20 | been po|sted by |
|00001dd0| 4d 69 6b 65 20 47 72 65 | 6e 69 65 72 3b 20 74 68 |Mike Gre|nier; th|
|00001de0| 69 73 20 76 65 72 73 69 | 6f 6e 20 69 73 20 63 6f |is versi|on is co|
|00001df0| 6d 70 6c 65 74 65 6c 79 | 0a 58 72 65 77 72 69 74 |mpletely|.Xrewrit|
|00001e00| 74 65 6e 20 61 6e 64 20 | 75 73 65 73 20 64 69 66 |ten and |uses dif|
|00001e10| 66 65 72 65 6e 74 20 6c | 6f 67 69 63 2e 20 49 6e |ferent l|ogic. In|
|00001e20| 20 70 61 72 74 69 63 75 | 6c 61 72 20 74 68 65 20 | particu|lar the |
|00001e30| 70 6f 6c 6c 69 6e 67 20 | 77 61 69 74 73 20 61 72 |polling |waits ar|
|00001e40| 65 0a 58 65 69 74 68 65 | 72 20 76 65 72 79 20 73 |e.Xeithe|r very s|
|00001e50| 68 6f 72 74 20 69 66 20 | 62 75 73 79 20 6f 72 20 |hort if |busy or |
|00001e60| 69 6e 74 65 72 72 75 70 | 74 69 62 6c 65 20 69 66 |interrup|tible if|
|00001e70| 20 73 6c 65 65 70 69 6e | 67 2e 0a 58 0a 58 09 49 | sleepin|g..X.X.I|
|00001e80| 4e 53 54 41 4c 4c 41 54 | 49 4f 4e 0a 58 0a 58 41 |NSTALLAT|ION.X.XA|
|00001e90| 73 20 69 74 20 73 74 61 | 6e 64 73 20 69 74 20 69 |s it sta|nds it i|
|00001ea0| 73 20 65 73 70 65 63 69 | 61 6c 6c 79 20 64 65 73 |s especi|ally des|
|00001eb0| 69 67 6e 65 64 20 66 6f | 72 20 61 20 73 74 6f 63 |igned fo|r a stoc|
|00001ec0| 6b 20 53 79 73 74 65 6d | 20 56 2f 33 38 36 20 72 |k System| V/386 r|
|00001ed0| 65 6c 2e 20 33 2e 32 0a | 58 73 79 73 74 65 6d 2c |el. 3.2.|Xsystem,|
|00001ee0| 20 65 2e 67 2e 20 45 53 | 49 58 2c 20 65 73 70 65 | e.g. ES|IX, espe|
|00001ef0| 63 69 61 6c 6c 79 20 69 | 6e 61 73 6d 75 63 68 20 |cially i|nasmuch |
|00001f00| 69 6e 73 74 61 6c 6c 61 | 74 69 6f 6e 20 69 73 20 |installa|tion is |
|00001f10| 63 6f 6e 63 65 72 6e 65 | 64 2e 20 49 74 20 73 68 |concerne|d. It sh|
|00001f20| 6f 75 6c 64 0a 58 62 65 | 20 73 75 66 66 69 63 69 |ould.Xbe| suffici|
|00001f30| 65 6e 74 20 74 6f 20 73 | 61 79 20 27 6d 61 6b 65 |ent to s|ay 'make|
|00001f40| 20 69 6e 73 74 61 6c 6c | 27 20 74 6f 20 69 6e 73 | install|' to ins|
|00001f50| 74 61 6c 6c 20 69 74 2c | 20 61 6e 64 20 74 68 65 |tall it,| and the|
|00001f60| 6e 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 73 61 79 |n you sh|ould say|
|00001f70| 0a 58 27 69 64 63 6f 6e | 66 69 67 27 20 61 6e 64 |.X'idcon|fig' and|
|00001f80| 20 27 69 64 6d 6b 75 6e | 69 78 27 20 74 6f 20 72 | 'idmkun|ix' to r|
|00001f90| 65 62 75 69 6c 64 20 74 | 68 65 20 6b 65 72 6e 65 |ebuild t|he kerne|
|00001fa0| 6c 20 28 62 75 74 20 66 | 69 72 73 74 20 66 69 6e |l (but f|irst fin|
|00001fb0| 69 73 68 20 72 65 61 64 | 69 6e 67 0a 58 74 68 69 |ish read|ing.Xthi|
|00001fc0| 73 20 66 69 6c 65 29 2e | 20 54 68 65 20 4d 61 6b |s file).| The Mak|
|00001fd0| 65 66 69 6c 65 20 77 69 | 6c 6c 20 69 6e 73 74 61 |efile wi|ll insta|
|00001fe0| 6c 6c 20 22 70 70 2e 68 | 22 20 69 6e 74 6f 20 22 |ll "pp.h|" into "|
|00001ff0| 2f 75 73 72 2f 69 6e 63 | 6c 75 64 65 2f 73 79 73 |/usr/inc|lude/sys|
|00002000| 22 2c 20 77 68 69 63 68 | 0a 58 69 73 20 72 65 71 |", which|.Xis req|
|00002010| 75 69 72 65 64 2e 0a 58 | 0a 58 54 68 69 73 20 64 |uired..X|.XThis d|
|00002020| 72 69 76 65 72 20 69 73 | 20 73 6f 20 73 69 6d 70 |river is| so simp|
|00002030| 6c 65 20 74 68 61 74 20 | 69 74 20 73 68 6f 75 6c |le that |it shoul|
|00002040| 64 20 70 6f 72 74 20 76 | 65 72 79 20 71 75 69 63 |d port v|ery quic|
|00002050| 6b 6c 79 20 74 6f 20 6f | 74 68 65 72 20 66 6c 61 |kly to o|ther fla|
|00002060| 76 6f 75 72 73 0a 58 6f | 66 20 55 6e 69 78 3b 20 |vours.Xo|f Unix; |
|00002070| 74 68 65 20 6f 6e 6c 79 | 20 74 68 69 6e 67 20 74 |the only| thing t|
|00002080| 68 61 74 20 6d 61 79 20 | 6e 6f 74 20 62 65 20 70 |hat may |not be p|
|00002090| 6f 72 74 61 62 6c 65 20 | 69 73 20 74 68 65 20 72 |ortable |is the r|
|000020a0| 65 66 65 72 65 6e 63 65 | 20 74 6f 20 61 20 6b 65 |eference| to a ke|
|000020b0| 72 6e 65 6c 0a 58 70 72 | 6f 63 65 64 75 72 65 20 |rnel.Xpr|ocedure |
|000020c0| 63 61 6c 6c 65 64 20 27 | 74 65 6e 6d 69 63 72 6f |called '|tenmicro|
|000020d0| 73 65 63 28 29 27 20 69 | 6e 20 70 70 2e 63 2c 20 |sec()' i|n pp.c, |
|000020e0| 77 68 69 63 68 20 64 6f | 65 73 20 61 20 62 75 73 |which do|es a bus|
|000020f0| 79 20 6c 6f 6f 70 20 6f | 66 20 31 30 0a 58 6d 69 |y loop o|f 10.Xmi|
|00002100| 63 72 6f 73 65 63 6f 6e | 64 73 2e 20 20 49 74 20 |crosecon|ds. It |
|00002110| 69 73 20 66 61 69 72 6c | 79 20 65 61 73 79 20 74 |is fairl|y easy t|
|00002120| 6f 20 72 6f 6c 6c 20 79 | 6f 75 72 20 6f 77 6e 2c |o roll y|our own,|
|00002130| 20 6f 66 20 63 6f 75 72 | 73 65 2e 0a 58 0a 58 09 | of cour|se..X.X.|
|00002140| 43 4f 4e 46 49 47 55 52 | 41 54 49 4f 4e 20 4f 46 |CONFIGUR|ATION OF|
|00002150| 20 50 41 52 41 4d 45 54 | 45 52 53 0a 58 0a 58 54 | PARAMET|ERS.X.XT|
|00002160| 68 69 73 20 76 65 72 73 | 69 6f 6e 20 63 61 6e 20 |his vers|ion can |
|00002170| 62 65 20 63 6f 6e 66 69 | 67 75 72 65 64 20 69 6e |be confi|gured in|
|00002180| 20 73 65 76 65 72 61 6c | 20 77 61 79 73 2e 20 59 | several| ways. Y|
|00002190| 6f 75 20 63 61 6e 2c 20 | 69 6e 20 66 69 6c 65 20 |ou can, |in file |
|000021a0| 22 70 70 2e 68 22 2c 0a | 58 64 65 66 69 6e 65 20 |"pp.h",.|Xdefine |
|000021b0| 70 70 53 54 41 54 49 43 | 53 5a 20 61 73 20 65 69 |ppSTATIC|SZ as ei|
|000021c0| 74 68 65 72 20 7a 65 72 | 6f 2c 20 69 6e 20 77 68 |ther zer|o, in wh|
|000021d0| 69 63 68 20 63 61 73 65 | 20 61 20 62 75 66 66 65 |ich case| a buffe|
|000021e0| 72 20 77 69 6c 6c 20 62 | 65 20 73 74 6f 6c 65 6e |r will b|e stolen|
|000021f0| 20 66 72 6f 6d 0a 58 74 | 68 65 20 62 6c 6f 63 6b | from.Xt|he block|
|00002200| 20 63 61 63 68 65 20 77 | 68 65 6e 65 76 65 72 20 | cache w|henever |
|00002210| 61 20 70 61 72 61 6c 6c | 65 6c 20 70 6f 72 74 20 |a parall|el port |
|00002220| 69 73 20 6f 70 65 6e 2c | 20 6f 72 20 6e 6f 6e 20 |is open,| or non |
|00002230| 7a 65 72 6f 2c 20 69 6e | 20 77 68 69 63 68 20 63 |zero, in| which c|
|00002240| 61 73 65 0a 58 61 20 73 | 74 61 74 69 63 20 62 75 |ase.Xa s|tatic bu|
|00002250| 66 66 65 72 20 77 69 6c | 6c 20 62 65 20 61 6c 6c |ffer wil|l be all|
|00002260| 6f 63 61 74 65 64 20 66 | 6f 72 20 65 61 63 68 20 |ocated f|or each |
|00002270| 70 61 72 61 6c 6c 65 6c | 20 70 6f 72 74 2e 20 54 |parallel| port. T|
|00002280| 68 65 20 6f 6e 6c 79 20 | 72 65 61 73 6f 6e 0a 58 |he only |reason.X|
|00002290| 66 6f 72 20 61 20 62 75 | 66 66 65 72 20 69 6e 20 |for a bu|ffer in |
|000022a0| 74 68 69 73 20 64 72 69 | 76 65 72 20 69 73 20 74 |this dri|ver is t|
|000022b0| 6f 20 63 75 74 20 64 6f | 77 6e 20 6f 6e 20 70 72 |o cut do|wn on pr|
|000022c0| 6f 63 65 64 75 72 65 20 | 69 6e 76 6f 63 61 74 69 |ocedure |invocati|
|000022d0| 6f 6e 73 20 74 6f 20 66 | 65 74 63 68 0a 58 63 68 |ons to f|etch.Xch|
|000022e0| 61 72 61 63 74 65 72 73 | 20 74 6f 20 74 72 61 6e |aracters| to tran|
|000022f0| 73 6d 69 74 20 66 72 6f | 6d 20 74 68 65 20 75 73 |smit fro|m the us|
|00002300| 65 72 20 73 70 61 63 65 | 2c 20 73 6f 20 65 76 65 |er space|, so eve|
|00002310| 6e 20 61 20 73 6d 61 6c | 6c 20 62 75 66 66 65 72 |n a smal|l buffer|
|00002320| 20 77 69 6c 6c 20 62 65 | 0a 58 73 75 66 66 69 63 | will be|.Xsuffic|
|00002330| 69 65 6e 74 20 74 6f 20 | 61 6d 6f 72 74 69 7a 65 |ient to |amortize|
|00002340| 20 74 68 65 20 63 6f 73 | 74 20 6f 66 20 61 20 70 | the cos|t of a p|
|00002350| 72 6f 63 65 64 75 72 65 | 20 63 61 6c 6c 20 28 61 |rocedure| call (a|
|00002360| 6e 79 74 68 69 6e 67 20 | 75 70 77 61 72 64 73 20 |nything |upwards |
|00002370| 6f 66 20 36 34 0a 58 62 | 79 74 65 73 20 69 73 20 |of 64.Xb|ytes is |
|00002380| 70 72 6f 62 61 62 6c 79 | 20 4f 4b 29 2e 20 49 20 |probably| OK). I |
|00002390| 72 65 63 6f 6d 6d 65 6e | 64 20 75 73 69 6e 67 20 |recommen|d using |
|000023a0| 61 20 73 6d 61 6c 6c 69 | 73 68 20 73 74 61 74 69 |a smalli|sh stati|
|000023b0| 63 20 62 75 66 66 65 72 | 20 28 73 61 79 0a 58 31 |c buffer| (say.X1|
|000023c0| 32 38 2d 32 35 36 20 62 | 79 74 65 73 29 2c 20 61 |28-256 b|ytes), a|
|000023d0| 73 20 70 72 6f 62 61 62 | 6c 79 20 74 68 65 20 63 |s probab|ly the c|
|000023e0| 6f 64 65 20 74 68 61 74 | 20 69 6d 70 6c 65 6d 65 |ode that| impleme|
|000023f0| 6e 74 73 20 63 61 63 68 | 65 20 62 6c 6f 63 6b 20 |nts cach|e block |
|00002400| 73 74 65 61 6c 69 6e 67 | 0a 58 61 6e 64 20 72 65 |stealing|.Xand re|
|00002410| 73 74 69 74 75 74 69 6f | 6e 20 69 73 20 61 62 6f |stitutio|n is abo|
|00002420| 75 74 20 74 68 61 74 20 | 73 69 7a 65 20 61 6e 79 |ut that |size any|
|00002430| 68 6f 77 20 3a 2d 29 2c | 20 65 76 65 6e 20 69 66 |how :-),| even if|
|00002440| 20 73 74 61 74 69 63 20 | 61 6c 6c 6f 63 61 74 69 | static |allocati|
|00002450| 6f 6e 20 69 73 0a 58 61 | 65 73 74 68 65 74 69 63 |on is.Xa|esthetic|
|00002460| 61 6c 6c 79 20 6c 65 73 | 73 20 70 6c 65 61 73 69 |ally les|s pleasi|
|00002470| 6e 67 20 28 63 68 61 72 | 61 63 74 65 72 20 62 79 |ng (char|acter by|
|00002480| 20 63 68 61 72 61 63 74 | 65 72 20 66 65 74 63 68 | charact|er fetch|
|00002490| 69 6e 67 20 77 61 73 20 | 73 69 6d 70 6c 65 72 20 |ing was |simpler |
|000024a0| 61 6e 64 0a 58 69 6e 73 | 69 67 6e 69 66 69 63 61 |and.Xins|ignifica|
|000024b0| 6e 74 6c 79 20 73 6c 6f | 77 65 72 2c 20 62 75 74 |ntly slo|wer, but|
|000024c0| 20 49 20 77 69 6c 6c 20 | 6e 6f 74 20 62 6f 74 68 | I will |not both|
|000024d0| 65 72 20 70 75 74 74 69 | 6e 67 20 69 74 20 62 61 |er putti|ng it ba|
|000024e0| 63 6b 20 69 6e 29 2e 20 | 4e 6f 74 65 20 74 68 61 |ck in). |Note tha|
|000024f0| 74 0a 58 74 68 65 72 65 | 20 69 73 20 6e 6f 20 69 |t.Xthere| is no i|
|00002500| 6e 74 65 72 6c 6f 63 6b | 69 6e 67 20 70 72 6f 76 |nterlock|ing prov|
|00002510| 69 64 65 64 20 66 6f 72 | 20 61 63 63 65 73 73 20 |ided for| access |
|00002520| 28 61 73 20 6f 70 70 6f | 73 65 64 20 74 6f 20 61 |(as oppo|sed to a|
|00002530| 6c 6c 6f 63 61 74 69 6f | 6e 29 20 74 6f 0a 58 74 |llocatio|n) to.Xt|
|00002540| 68 65 20 62 75 66 66 65 | 72 3b 20 69 66 20 74 77 |he buffe|r; if tw|
|00002550| 6f 20 70 72 6f 63 65 73 | 73 65 73 20 74 72 79 20 |o proces|ses try |
|00002560| 74 6f 20 77 72 69 74 65 | 20 74 6f 20 74 68 65 20 |to write| to the |
|00002570| 70 72 69 6e 74 65 72 20 | 61 74 20 74 68 65 20 73 |printer |at the s|
|00002580| 61 6d 65 20 74 69 6d 65 | 2c 0a 58 74 68 65 79 20 |ame time|,.Xthey |
|00002590| 77 69 6c 6c 20 75 73 65 | 20 74 68 65 20 73 61 6d |will use| the sam|
|000025a0| 65 20 62 75 66 66 65 72 | 20 77 69 74 68 6f 75 74 |e buffer| without|
|000025b0| 20 61 6e 79 20 73 79 6e | 63 68 72 6f 6e 69 7a 61 | any syn|chroniza|
|000025c0| 74 69 6f 6e 2e 20 49 74 | 20 69 73 20 65 78 70 65 |tion. It| is expe|
|000025d0| 63 74 65 64 0a 58 74 68 | 61 74 20 68 69 67 68 65 |cted.Xth|at highe|
|000025e0| 72 20 6c 65 76 65 6c 20 | 73 79 6e 63 68 72 6f 6e |r level |synchron|
|000025f0| 69 7a 61 74 69 6f 6e 20 | 61 6e 64 20 71 75 65 75 |ization |and queu|
|00002600| 65 69 6e 67 20 6d 65 63 | 68 61 6e 69 73 6d 73 20 |eing mec|hanisms |
|00002610| 65 78 69 73 74 2e 0a 58 | 0a 58 59 6f 75 20 63 61 |exist..X|.XYou ca|
|00002620| 6e 20 63 6f 6e 66 69 67 | 75 72 65 2c 20 69 6e 20 |n config|ure, in |
|00002630| 66 69 6c 65 20 22 73 70 | 61 63 65 2e 63 22 2c 20 |file "sp|ace.c", |
|00002640| 61 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 68 69 6e |a number| of thin|
|00002650| 67 73 3b 20 66 69 72 73 | 74 20 74 68 65 0a 58 61 |gs; firs|t the.Xa|
|00002660| 64 64 72 65 73 73 65 73 | 20 6f 66 20 74 68 65 20 |ddresses| of the |
|00002670| 49 4f 20 70 6f 72 74 73 | 20 6f 66 20 74 68 65 20 |IO ports| of the |
|00002680| 70 72 69 6e 74 65 72 73 | 20 79 6f 75 20 68 61 76 |printers| you hav|
|00002690| 65 20 67 6f 74 2e 20 54 | 68 65 73 65 20 73 68 6f |e got. T|hese sho|
|000026a0| 75 6c 64 20 6e 6f 74 0a | 58 6e 65 65 64 20 63 68 |uld not.|Xneed ch|
|000026b0| 61 6e 67 69 6e 67 20 61 | 74 20 61 6c 6c 20 6f 6e |anging a|t all on|
|000026c0| 20 61 6e 20 41 54 20 63 | 6f 6d 70 61 74 69 62 6c | an AT c|ompatibl|
|000026d0| 65 20 33 38 36 2e 20 41 | 74 20 77 6f 72 73 74 2c |e 386. A|t worst,|
|000026e0| 20 79 6f 75 20 63 61 6e | 0a 58 63 6f 6d 6d 65 6e | you can|.Xcommen|
|000026f0| 74 2f 75 6e 63 6f 6d 6d | 65 6e 74 20 74 68 6f 73 |t/uncomm|ent thos|
|00002700| 65 20 6c 69 6e 65 73 20 | 74 68 61 74 20 63 6f 72 |e lines |that cor|
|00002710| 72 65 73 70 6f 6e 64 20 | 74 6f 20 64 65 76 69 63 |respond |to devic|
|00002720| 65 73 20 79 6f 75 20 68 | 61 76 65 2f 64 6f 6e 27 |es you h|ave/don'|
|00002730| 74 0a 58 68 61 76 65 2e | 20 59 6f 75 20 63 61 6e |t.Xhave.| You can|
|00002740| 20 61 6c 73 6f 20 63 6f | 6e 66 69 67 75 72 65 20 | also co|nfigure |
|00002750| 74 68 65 20 6d 61 73 6b | 73 20 61 6e 64 20 74 68 |the mask|s and th|
|00002760| 65 20 64 75 72 61 74 69 | 6f 6e 73 20 66 6f 72 20 |e durati|ons for |
|00002770| 6c 6f 6e 67 20 74 65 72 | 6d 0a 58 28 77 61 69 74 |long ter|m.X(wait|
|00002780| 69 6e 67 20 66 6f 72 20 | 74 68 65 20 70 72 69 6e |ing for |the prin|
|00002790| 74 65 72 20 74 6f 20 62 | 65 20 6f 6e 6c 69 6e 65 |ter to b|e online|
|000027a0| 29 20 70 61 75 73 65 73 | 20 61 6e 64 20 66 6f 72 |) pauses| and for|
|000027b0| 20 73 68 6f 72 74 20 74 | 65 72 6d 20 28 77 61 69 | short t|erm (wai|
|000027c0| 74 69 6e 67 0a 58 66 6f | 72 20 74 68 65 20 69 6e |ting.Xfo|r the in|
|000027d0| 74 65 72 66 61 63 65 20 | 62 75 66 66 65 72 20 74 |terface |buffer t|
|000027e0| 6f 20 62 65 63 6f 6d 65 | 20 6c 65 73 73 20 63 68 |o become| less ch|
|000027f0| 6f 6b 65 64 29 20 70 61 | 75 73 65 73 2e 20 59 6f |oked) pa|uses. Yo|
|00002800| 75 20 63 61 6e 20 61 6c | 73 6f 0a 58 63 6f 6e 66 |u can al|so.Xconf|
|00002810| 69 67 75 72 65 20 74 68 | 65 20 6e 75 6d 62 65 72 |igure th|e number|
|00002820| 20 6f 66 20 74 65 6e 73 | 20 6f 66 20 6d 69 63 72 | of tens| of micr|
|00002830| 6f 73 65 63 6f 6e 64 73 | 20 77 65 20 61 72 65 20 |oseconds| we are |
|00002840| 70 72 65 70 61 72 65 64 | 20 74 6f 20 62 75 73 79 |prepared| to busy|
|00002850| 20 77 61 69 74 0a 58 66 | 6f 72 20 74 68 65 20 69 | wait.Xf|or the i|
|00002860| 6e 74 65 72 66 61 63 65 | 20 74 6f 20 61 63 63 65 |nterface| to acce|
|00002870| 70 74 20 74 68 65 20 6e | 65 78 74 20 63 68 61 72 |pt the n|ext char|
|00002880| 61 63 74 65 72 20 62 65 | 66 6f 72 65 20 73 77 69 |acter be|fore swi|
|00002890| 74 63 68 69 6e 67 20 74 | 6f 20 73 68 6f 72 74 0a |tching t|o short.|
|000028a0| 58 74 65 72 6d 20 70 61 | 75 73 69 6e 67 20 61 6e |Xterm pa|using an|
|000028b0| 64 20 77 61 69 74 69 6e | 67 20 66 6f 72 20 69 74 |d waitin|g for it|
|000028c0| 20 74 6f 20 72 65 61 63 | 68 20 73 6f 6d 65 20 6c | to reac|h some l|
|000028d0| 6f 77 20 77 61 74 65 72 | 20 6d 61 72 6b 2e 0a 58 |ow water| mark..X|
|000028e0| 0a 58 49 6e 20 67 65 6e | 65 72 61 6c 20 74 68 65 |.XIn gen|eral the|
|000028f0| 20 6d 61 73 6b 20 61 6e | 64 20 70 61 75 73 65 20 | mask an|d pause |
|00002900| 76 61 6c 75 65 73 20 67 | 69 76 65 6e 20 61 73 20 |values g|iven as |
|00002910| 64 65 66 61 75 6c 74 73 | 20 73 68 6f 75 6c 64 20 |defaults| should |
|00002920| 77 6f 72 6b 2c 20 61 6e | 64 20 74 68 65 0a 58 70 |work, an|d the.Xp|
|00002930| 61 75 73 65 20 64 75 72 | 61 74 69 6f 6e 73 20 64 |ause dur|ations d|
|00002940| 6f 20 6e 6f 74 20 6d 61 | 74 74 65 72 20 74 68 61 |o not ma|tter tha|
|00002950| 74 20 6d 75 63 68 3b 20 | 74 68 65 20 6d 61 78 20 |t much; |the max |
|00002960| 73 70 69 6e 6e 69 6e 67 | 20 63 6f 75 6e 74 20 28 |spinning| count (|
|00002970| 62 75 73 79 20 77 61 69 | 74 0a 58 6c 6f 6f 70 73 |busy wai|t.Xloops|
|00002980| 29 20 70 61 72 61 6d 65 | 74 65 72 73 20 69 73 20 |) parame|ters is |
|00002990| 6d 6f 72 65 20 63 72 69 | 74 69 63 61 6c 2c 20 69 |more cri|tical, i|
|000029a0| 6e 20 74 68 61 74 20 69 | 66 20 69 74 20 69 73 20 |n that i|f it is |
|000029b0| 74 6f 6f 20 73 6d 61 6c | 6c 20 74 68 65 20 70 72 |too smal|l the pr|
|000029c0| 69 6e 74 65 72 0a 58 77 | 69 6c 6c 20 62 65 20 64 |inter.Xw|ill be d|
|000029d0| 72 69 76 65 6e 20 76 65 | 72 79 20 73 6c 6f 77 6c |riven ve|ry slowl|
|000029e0| 79 20 28 6f 6e 6c 79 20 | 61 20 66 65 77 20 63 68 |y (only |a few ch|
|000029f0| 61 72 61 63 74 65 72 73 | 20 70 65 72 20 73 65 63 |aracters| per sec|
|00002a00| 6f 6e 64 29 2c 20 62 65 | 63 61 75 73 65 20 61 0a |ond), be|cause a.|
|00002a10| 58 73 68 6f 72 74 20 70 | 61 75 73 65 20 77 69 6c |Xshort p|ause wil|
|00002a20| 6c 20 62 65 20 65 6e 74 | 65 72 65 64 20 6f 6e 20 |l be ent|ered on |
|00002a30| 65 76 65 72 79 20 63 68 | 61 72 61 63 74 65 72 2e |every ch|aracter.|
|00002a40| 20 49 66 20 69 74 20 69 | 73 20 74 6f 6f 20 6c 61 | If it i|s too la|
|00002a50| 72 67 65 20 73 6f 6d 65 | 20 74 69 6d 65 0a 58 77 |rge some| time.Xw|
|00002a60| 69 6c 6c 20 62 65 20 77 | 61 73 74 65 64 20 77 68 |ill be w|asted wh|
|00002a70| 65 6e 20 74 68 65 20 69 | 6e 74 65 72 66 61 63 65 |en the i|nterface|
|00002a80| 20 62 65 63 6f 6d 65 73 | 20 63 68 6f 6b 65 64 20 | becomes| choked |
|00002a90| 62 65 66 6f 72 65 20 77 | 65 20 67 69 76 65 20 75 |before w|e give u|
|00002aa0| 70 20 73 70 69 6e 6e 69 | 6e 67 2c 0a 58 62 75 74 |p spinni|ng,.Xbut|
|00002ab0| 20 74 68 69 73 20 69 73 | 20 70 72 6f 62 61 62 6c | this is| probabl|
|00002ac0| 79 20 6e 6f 74 20 76 65 | 72 79 20 66 72 65 71 75 |y not ve|ry frequ|
|00002ad0| 65 6e 74 20 6f 72 20 69 | 6d 70 6f 72 74 61 6e 74 |ent or i|mportant|
|00002ae0| 2e 20 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 76 |. The d|efault v|
|00002af0| 61 6c 75 65 20 69 73 0a | 58 63 6f 6e 73 65 72 76 |alue is.|Xconserv|
|00002b00| 61 74 69 76 65 20 65 6e | 6f 75 67 68 20 66 6f 72 |ative en|ough for|
|00002b10| 20 6d 79 20 70 72 69 6e | 74 65 72 2c 20 62 75 74 | my prin|ter, but|
|00002b20| 20 72 61 69 73 65 20 69 | 74 20 69 66 20 79 6f 75 | raise i|t if you|
|00002b30| 20 61 72 65 20 69 6e 20 | 64 6f 75 62 74 2e 0a 45 | are in |doubt..E|
|00002b40| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00002b50| 73 74 20 34 37 34 37 20 | 2d 6e 65 20 60 77 63 20 |st 4747 |-ne `wc |
|00002b60| 2d 63 20 3c 27 52 45 41 | 44 4d 45 27 60 3b 20 74 |-c <'REA|DME'`; t|
|00002b70| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00002b80| 72 3a 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 20 |r: \"'RE|ADME'\" |
|00002b90| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00002ba0| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 63 68 6d |ong size|!.fi.chm|
|00002bb0| 6f 64 20 2b 78 20 27 52 | 45 41 44 4d 45 27 0a 23 |od +x 'R|EADME'.#|
|00002bc0| 20 65 6e 64 20 6f 66 20 | 27 52 45 41 44 4d 45 27 | end of |'README'|
|00002bd0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00002be0| 53 70 61 63 65 2e 63 27 | 20 2d 61 20 22 24 7b 31 |Space.c'| -a "${1|
|00002bf0| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00002c00| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00002c10| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00002c20| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00002c30| 22 27 53 70 61 63 65 2e | 63 27 5c 22 0a 65 6c 73 |"'Space.|c'\".els|
|00002c40| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00002c50| 72 61 63 74 69 6e 67 20 | 5c 22 27 53 70 61 63 65 |racting |\"'Space|
|00002c60| 2e 63 27 5c 22 20 5c 28 | 33 30 32 36 20 63 68 61 |.c'\" \(|3026 cha|
|00002c70| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00002c80| 2f 5e 58 2f 2f 22 20 3e | 27 53 70 61 63 65 2e 63 |/^X//" >|'Space.c|
|00002c90| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00002ca0| 27 0a 58 2f 2a 0a 58 20 | 20 20 20 24 49 64 3a 20 |'.X/*.X | $Id: |
|00002cb0| 73 70 61 63 65 2e 63 2c | 76 20 32 2e 36 20 39 30 |space.c,|v 2.6 90|
|00002cc0| 2f 30 38 2f 32 34 20 31 | 31 3a 34 38 3a 34 35 20 |/08/24 1|1:48:45 |
|00002cd0| 73 77 20 45 78 70 20 24 | 0a 58 2a 2f 0a 58 0a 58 |sw Exp $|.X*/.X.X|
|00002ce0| 2f 2a 0a 58 20 20 20 20 | 22 43 6f 70 79 72 69 67 |/*.X |"Copyrig|
|00002cf0| 68 74 20 31 39 39 30 20 | 50 69 65 72 63 61 72 6c |ht 1990 |Piercarl|
|00002d00| 6f 20 47 72 61 6e 64 69 | 2e 20 41 6c 6c 20 72 69 |o Grandi|. All ri|
|00002d10| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 22 3b |ghts res|erved.";|
|00002d20| 0a 58 2a 2f 0a 58 0a 58 | 2f 2a 0a 58 20 20 20 20 |.X*/.X.X|/*.X |
|00002d30| 54 68 69 73 20 64 72 69 | 76 65 72 20 69 73 20 66 |This dri|ver is f|
|00002d40| 72 65 65 20 73 6f 66 74 | 77 61 72 65 3b 20 79 6f |ree soft|ware; yo|
|00002d50| 75 20 63 61 6e 20 72 65 | 64 69 73 74 72 69 62 75 |u can re|distribu|
|00002d60| 74 65 20 69 74 20 61 6e | 64 2f 6f 72 0a 58 20 20 |te it an|d/or.X |
|00002d70| 20 20 6d 6f 64 69 66 79 | 20 69 74 20 75 6e 64 65 | modify| it unde|
|00002d80| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 20 74 |r the te|rms of t|
|00002d90| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00002da0| 75 62 6c 69 63 20 4c 69 | 63 65 6e 73 65 20 61 73 |ublic Li|cense as|
|00002db0| 0a 58 20 20 20 20 70 75 | 62 6c 69 73 68 65 64 20 |.X pu|blished |
|00002dc0| 62 79 20 74 68 65 20 46 | 72 65 65 20 53 6f 66 74 |by the F|ree Soft|
|00002dd0| 77 61 72 65 20 46 6f 75 | 6e 64 61 74 69 6f 6e 3b |ware Fou|ndation;|
|00002de0| 20 65 69 74 68 65 72 20 | 76 65 72 73 69 6f 6e 20 | either |version |
|00002df0| 31 2c 20 6f 72 0a 58 20 | 20 20 20 28 61 74 20 79 |1, or.X | (at y|
|00002e00| 6f 75 72 20 6f 70 74 69 | 6f 6e 29 20 61 6e 79 20 |our opti|on) any |
|00002e10| 6c 61 74 65 72 20 76 65 | 72 73 69 6f 6e 2e 0a 58 |later ve|rsion..X|
|00002e20| 0a 58 20 20 20 20 41 73 | 20 61 20 73 70 65 63 69 |.X As| a speci|
|00002e30| 61 6c 20 63 61 73 65 2c | 20 74 68 69 73 20 64 72 |al case,| this dr|
|00002e40| 69 76 65 72 20 6d 61 79 | 20 62 65 20 69 6e 63 6f |iver may| be inco|
|00002e50| 72 70 6f 72 61 74 65 64 | 20 69 6e 20 61 6e 79 20 |rporated| in any |
|00002e60| 4f 53 20 6b 65 72 6e 65 | 6c 2c 0a 58 20 20 20 20 |OS kerne|l,.X |
|00002e70| 77 68 65 74 68 65 72 20 | 74 68 65 20 47 4e 55 20 |whether |the GNU |
|00002e80| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00002e90| 69 63 65 6e 73 65 20 61 | 70 70 6c 69 65 73 20 74 |icense a|pplies t|
|00002ea0| 6f 20 69 74 20 6f 72 20 | 6e 6f 74 2e 0a 58 0a 58 |o it or |not..X.X|
|00002eb0| 20 20 20 20 54 68 69 73 | 20 64 72 69 76 65 72 20 | This| driver |
|00002ec0| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 69 |is distr|ibuted i|
|00002ed0| 6e 20 74 68 65 20 68 6f | 70 65 20 74 68 61 74 20 |n the ho|pe that |
|00002ee0| 69 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 66 75 |it will |be usefu|
|00002ef0| 6c 2c 0a 58 20 20 20 20 | 62 75 74 20 57 49 54 48 |l,.X |but WITH|
|00002f00| 4f 55 54 20 41 4e 59 20 | 57 41 52 52 41 4e 54 59 |OUT ANY |WARRANTY|
|00002f10| 3b 20 77 69 74 68 6f 75 | 74 20 65 76 65 6e 20 74 |; withou|t even t|
|00002f20| 68 65 20 69 6d 70 6c 69 | 65 64 20 77 61 72 72 61 |he impli|ed warra|
|00002f30| 6e 74 79 20 6f 66 0a 58 | 20 20 20 20 4d 45 52 43 |nty of.X| MERC|
|00002f40| 48 41 4e 54 41 42 49 4c | 49 54 59 20 6f 72 20 46 |HANTABIL|ITY or F|
|00002f50| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|00002f60| 54 49 43 55 4c 41 52 20 | 50 55 52 50 4f 53 45 2e |TICULAR |PURPOSE.|
|00002f70| 20 20 53 65 65 20 74 68 | 65 0a 58 20 20 20 20 47 | See th|e.X G|
|00002f80| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|00002f90| 63 20 4c 69 63 65 6e 73 | 65 20 66 6f 72 20 6d 6f |c Licens|e for mo|
|00002fa0| 72 65 20 64 65 74 61 69 | 6c 73 2e 0a 58 0a 58 20 |re detai|ls..X.X |
|00002fb0| 20 20 20 59 6f 75 20 6d | 61 79 20 68 61 76 65 20 | You m|ay have |
|00002fc0| 72 65 63 65 69 76 65 64 | 20 61 20 63 6f 70 79 20 |received| a copy |
|00002fd0| 6f 66 20 74 68 65 20 47 | 4e 55 20 47 65 6e 65 72 |of the G|NU Gener|
|00002fe0| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|00002ff0| 65 0a 58 20 20 20 20 61 | 6c 6f 6e 67 20 77 69 74 |e.X a|long wit|
|00003000| 68 20 74 68 69 73 20 64 | 72 69 76 65 72 3b 20 69 |h this d|river; i|
|00003010| 66 20 6e 6f 74 2c 20 77 | 72 69 74 65 20 74 6f 20 |f not, w|rite to |
|00003020| 74 68 65 20 46 72 65 65 | 20 53 6f 66 74 77 61 72 |the Free| Softwar|
|00003030| 65 0a 58 20 20 20 20 46 | 6f 75 6e 64 61 74 69 6f |e.X F|oundatio|
|00003040| 6e 2c 20 49 6e 63 2e 2c | 20 36 37 35 20 4d 61 73 |n, Inc.,| 675 Mas|
|00003050| 73 20 41 76 65 2c 20 43 | 61 6d 62 72 69 64 67 65 |s Ave, C|ambridge|
|00003060| 2c 20 4d 41 20 30 32 31 | 33 39 2c 20 55 53 41 2e |, MA 021|39, USA.|
|00003070| 0a 58 2a 2f 0a 58 0a 58 | 23 69 6e 63 6c 75 64 65 |.X*/.X.X|#include|
|00003080| 20 22 63 6f 6e 66 69 67 | 2e 68 22 0a 58 0a 58 23 | "config|.h".X.X#|
|00003090| 69 66 64 65 66 20 50 50 | 0a 58 0a 58 23 69 6e 63 |ifdef PP|.X.X#inc|
|000030a0| 6c 75 64 65 20 22 73 79 | 73 2f 74 79 70 65 73 2e |lude "sy|s/types.|
|000030b0| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 73 79 |h".X#inc|lude "sy|
|000030c0| 73 2f 70 61 72 61 6d 2e | 68 22 0a 58 23 69 6e 63 |s/param.|h".X#inc|
|000030d0| 6c 75 64 65 20 22 73 79 | 73 2f 62 75 66 2e 68 22 |lude "sy|s/buf.h"|
|000030e0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 73 79 73 2f |.X#inclu|de "sys/|
|000030f0| 70 70 2e 68 22 0a 58 0a | 58 73 74 72 75 63 74 20 |pp.h".X.|Xstruct |
|00003100| 70 70 5f 63 6f 6e 66 69 | 67 09 70 70 5f 63 6f 6e |pp_confi|g.pp_con|
|00003110| 66 69 67 5b 5d 20 3d 0a | 58 7b 0a 58 20 20 20 20 |fig[] =.|X{.X |
|00003120| 2f 2a 09 64 61 74 61 2c | 09 20 20 20 20 73 74 61 |/*.data,|. sta|
|00003130| 74 75 73 2c 09 20 20 20 | 20 63 6f 6e 74 72 6f 6c |tus,. | control|
|00003140| 20 2a 2f 0a 58 23 69 66 | 20 50 50 5f 43 4e 54 4c | */.X#if| PP_CNTL|
|00003150| 53 20 3e 3d 20 31 0a 58 | 20 20 20 20 7b 09 50 50 |S >= 1.X| {.PP|
|00003160| 5f 30 5f 53 49 4f 41 2c | 20 20 50 50 5f 30 5f 53 |_0_SIOA,| PP_0_S|
|00003170| 49 4f 41 2b 31 2c 20 20 | 20 20 50 50 5f 30 5f 45 |IOA+1, | PP_0_E|
|00003180| 49 4f 41 20 20 20 20 7d | 2c 09 2f 2a 20 2f 64 65 |IOA }|,./* /de|
|00003190| 76 2f 70 70 30 09 2a 2f | 0a 58 23 65 6e 64 69 66 |v/pp0.*/|.X#endif|
|000031a0| 0a 58 23 69 66 20 50 50 | 5f 43 4e 54 4c 53 20 3e |.X#if PP|_CNTLS >|
|000031b0| 3d 20 32 0a 58 20 20 20 | 20 7b 09 50 50 5f 31 5f |= 2.X | {.PP_1_|
|000031c0| 53 49 4f 41 2c 20 20 50 | 50 5f 31 5f 53 49 4f 41 |SIOA, P|P_1_SIOA|
|000031d0| 2b 31 2c 20 20 20 20 50 | 50 5f 32 5f 45 49 4f 41 |+1, P|P_2_EIOA|
|000031e0| 20 20 20 20 7d 2c 09 2f | 2a 20 2f 64 65 76 2f 70 | },./|* /dev/p|
|000031f0| 70 30 09 2a 2f 0a 58 23 | 65 6e 64 69 66 0a 58 23 |p0.*/.X#|endif.X#|
|00003200| 69 66 20 50 50 5f 43 4e | 54 4c 53 20 3e 3d 20 33 |if PP_CN|TLS >= 3|
|00003210| 0a 58 20 20 20 20 7b 09 | 50 50 5f 32 5f 53 49 4f |.X {.|PP_2_SIO|
|00003220| 41 2c 20 20 50 50 5f 32 | 5f 53 49 4f 41 2b 31 2c |A, PP_2|_SIOA+1,|
|00003230| 20 20 20 20 50 50 5f 32 | 5f 45 49 4f 41 20 20 20 | PP_2|_EIOA |
|00003240| 20 7d 2c 09 2f 2a 20 2f | 64 65 76 2f 70 70 30 09 | },./* /|dev/pp0.|
|00003250| 2a 2f 0a 58 23 65 6e 64 | 69 66 0a 58 7d 3b 0a 58 |*/.X#end|if.X};.X|
|00003260| 0a 58 23 64 65 66 69 6e | 65 20 70 70 4d 41 58 09 |.X#defin|e ppMAX.|
|00003270| 09 28 73 69 7a 65 6f 66 | 20 70 70 5f 63 6f 6e 66 |.(sizeof| pp_conf|
|00003280| 69 67 20 2f 20 73 69 7a | 65 6f 66 20 28 73 74 72 |ig / siz|eof (str|
|00003290| 75 63 74 20 70 70 5f 63 | 6f 6e 66 69 67 29 29 0a |uct pp_c|onfig)).|
|000032a0| 58 0a 58 23 69 66 20 70 | 70 53 54 41 54 49 43 53 |X.X#if p|pSTATICS|
|000032b0| 5a 20 21 3d 20 30 0a 58 | 63 68 61 72 09 09 09 70 |Z != 0.X|char...p|
|000032c0| 70 5f 73 62 75 66 5b 70 | 70 4d 41 58 5d 5b 70 70 |p_sbuf[p|pMAX][pp|
|000032d0| 53 54 41 54 49 43 53 5a | 5d 3b 0a 58 23 65 6e 64 |STATICSZ|];.X#end|
|000032e0| 69 66 0a 58 0a 58 73 68 | 6f 72 74 09 09 09 70 70 |if.X.Xsh|ort...pp|
|000032f0| 5f 6d 61 78 20 3d 20 70 | 70 4d 41 58 3b 0a 58 0a |_max = p|pMAX;.X.|
|00003300| 58 2f 2a 0a 58 20 20 20 | 20 54 68 65 20 65 78 69 |X/*.X | The exi|
|00003310| 74 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 66 72 6f |t condit|ions fro|
|00003320| 6d 20 74 68 65 20 74 77 | 6f 20 70 6f 6c 6c 69 6e |m the tw|o pollin|
|00003330| 67 20 6c 6f 6f 70 73 20 | 68 65 72 65 20 61 72 65 |g loops |here are|
|00003340| 20 61 20 62 69 74 20 66 | 75 6e 6e 79 2c 0a 58 20 | a bit f|unny,.X |
|00003350| 20 20 20 6d 79 20 70 72 | 69 6e 74 65 72 20 28 45 | my pr|inter (E|
|00003360| 50 53 4f 4e 20 53 51 38 | 35 30 29 20 61 6e 64 20 |PSON SQ8|50) and |
|00003370| 70 61 72 61 6c 6c 65 6c | 20 70 6f 72 74 20 67 69 |parallel| port gi|
|00003380| 76 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ve the f|ollowing|
|00003390| 20 73 74 61 74 75 73 65 | 73 3a 0a 58 0a 58 09 09 | statuse|s:.X.X..|
|000033a0| 09 09 4e 4f 54 42 55 53 | 59 20 4e 4f 54 41 43 4b |..NOTBUS|Y NOTACK|
|000033b0| 20 20 4e 4f 50 41 50 45 | 52 20 4f 4e 4c 49 4e 45 | NOPAPE|R ONLINE|
|000033c0| 20 20 4e 4f 54 45 52 52 | 4f 52 0a 58 0a 58 09 70 | NOTERR|OR.X.X.p|
|000033d0| 6f 72 74 20 6d 69 73 73 | 69 6e 67 09 09 31 09 31 |ort miss|ing..1.1|
|000033e0| 09 31 09 31 09 31 0a 58 | 09 70 72 69 6e 74 65 72 |.1.1.1.X|.printer|
|000033f0| 20 70 6f 77 65 72 20 6f | 66 66 09 31 09 30 09 30 | power o|ff.1.0.0|
|00003400| 09 30 09 30 0a 58 09 70 | 72 69 6e 74 65 72 20 6e |.0.0.X.p|rinter n|
|00003410| 6f 74 20 74 68 65 72 65 | 09 31 09 31 09 30 09 31 |ot there|.1.1.0.1|
|00003420| 09 30 0a 58 09 6f 66 66 | 6c 69 6e 65 09 09 09 30 |.0.X.off|line...0|
|00003430| 09 31 09 30 09 31 09 30 | 0a 58 09 6f 6e 6c 69 6e |.1.0.1.0|.X.onlin|
|00003440| 65 09 09 09 31 09 31 09 | 30 09 31 09 31 0a 58 0a |e...1.1.|0.1.1.X.|
|00003450| 58 09 54 68 65 20 70 72 | 69 6e 74 65 72 20 70 75 |X.The pr|inter pu|
|00003460| 74 73 20 4e 4f 54 42 55 | 53 59 20 6c 6f 77 20 77 |ts NOTBU|SY low w|
|00003470| 68 69 6c 65 20 77 65 20 | 73 74 72 6f 62 65 20 74 |hile we |strobe t|
|00003480| 68 65 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 2c |he chara|cter in,|
|00003490| 0a 58 09 74 68 65 6e 20 | 73 74 72 6f 62 65 73 20 |.X.then |strobes |
|000034a0| 4e 4f 54 41 43 4b 20 6c | 6f 77 20 66 6f 72 20 31 |NOTACK l|ow for 1|
|000034b0| 30 20 75 73 65 63 73 20 | 61 66 74 65 72 77 61 72 |0 usecs |afterwar|
|000034c0| 64 73 20 74 6f 20 73 69 | 67 6e 61 6c 20 77 65 20 |ds to si|gnal we |
|000034d0| 63 61 6e 0a 58 09 73 74 | 72 6f 62 65 20 61 67 61 |can.X.st|robe aga|
|000034e0| 69 6e 2e 20 54 68 65 20 | 72 65 6c 61 74 69 6f 6e |in. The |relation|
|000034f0| 73 68 69 70 20 62 65 74 | 77 65 65 6e 20 74 68 65 |ship bet|ween the|
|00003500| 20 74 77 6f 20 69 73 20 | 74 6f 20 73 61 79 20 74 | two is |to say t|
|00003510| 68 65 0a 58 09 6c 61 73 | 74 20 62 69 7a 61 72 72 |he.X.las|t bizarr|
|00003520| 65 2e 0a 58 0a 58 09 4f | 75 72 20 70 72 6f 62 6c |e..X.X.O|ur probl|
|00003530| 65 6d 20 69 73 20 74 68 | 61 74 20 77 65 20 77 61 |em is th|at we wa|
|00003540| 6e 74 20 74 6f 20 64 69 | 73 74 69 6e 67 75 69 73 |nt to di|stinguis|
|00003550| 68 20 62 65 74 77 65 65 | 6e 20 6c 6f 6e 67 20 74 |h betwee|n long t|
|00003560| 65 72 6d 20 61 6e 64 0a | 58 09 73 68 6f 72 74 20 |erm and.|X.short |
|00003570| 74 65 72 6d 20 62 75 73 | 79 2c 20 77 68 65 72 65 |term bus|y, where|
|00003580| 20 73 68 6f 72 74 20 74 | 65 72 6d 20 62 75 73 79 | short t|erm busy|
|00003590| 20 69 73 20 64 65 66 69 | 6e 65 64 20 61 73 20 74 | is defi|ned as t|
|000035a0| 68 65 20 74 69 6d 65 20 | 74 61 6b 65 6e 0a 58 09 |he time |taken.X.|
|000035b0| 62 79 20 74 68 65 20 69 | 6e 74 65 72 66 61 63 65 |by the i|nterface|
|000035c0| 20 74 6f 20 72 65 61 64 | 20 61 20 63 68 61 72 61 | to read| a chara|
|000035d0| 63 74 65 72 2c 20 61 6e | 64 20 6c 6f 6e 67 20 74 |cter, an|d long t|
|000035e0| 65 72 6d 20 62 75 73 79 | 20 61 73 20 70 61 70 65 |erm busy| as pape|
|000035f0| 72 0a 58 09 65 6e 64 2c | 20 6f 66 66 6c 69 6e 65 |r.X.end,| offline|
|00003600| 2c 20 70 6f 77 65 72 20 | 6f 66 66 2c 20 69 6e 74 |, power |off, int|
|00003610| 65 72 66 61 63 65 20 62 | 75 66 66 65 72 20 66 75 |erface b|uffer fu|
|00003620| 6c 6c 2e 0a 58 2a 2f 0a | 58 0a 58 73 74 72 75 63 |ll..X*/.|X.Xstruc|
|00003630| 74 20 70 70 5f 67 75 61 | 72 64 09 09 70 70 5f 67 |t pp_gua|rd..pp_g|
|00003640| 75 61 72 64 20 3d 0a 58 | 7b 0a 58 20 20 20 20 7b |uard =.X|{.X {|
|00003650| 0a 58 09 28 70 70 4f 4e | 4c 49 4e 45 7c 70 70 4e |.X.(ppON|LINE|ppN|
|00003660| 4f 54 45 52 52 4f 52 7c | 70 70 4e 4f 50 41 50 45 |OTERROR||ppNOPAPE|
|00003670| 52 29 2c 09 09 2f 2a 20 | 70 61 75 73 65 2e 6d 61 |R),../* |pause.ma|
|00003680| 73 6b 09 2a 2f 0a 58 09 | 28 70 70 4f 4e 4c 49 4e |sk.*/.X.|(ppONLIN|
|00003690| 45 7c 70 70 4e 4f 54 45 | 52 52 4f 52 29 09 09 09 |E|ppNOTE|RROR)...|
|000036a0| 09 2f 2a 20 70 61 75 73 | 65 2e 64 6f 6e 65 09 2a |./* paus|e.done.*|
|000036b0| 2f 0a 58 20 20 20 20 7d | 2c 0a 58 20 20 20 20 7b |/.X }|,.X {|
|000036c0| 0a 58 09 28 70 70 4e 4f | 54 41 43 4b 7c 70 70 4e |.X.(ppNO|TACK|ppN|
|000036d0| 4f 54 42 55 53 59 29 2c | 09 09 09 09 2f 2a 20 73 |OTBUSY),|..../* s|
|000036e0| 70 69 6e 2e 6d 61 73 6b | 09 2a 2f 0a 58 09 28 70 |pin.mask|.*/.X.(p|
|000036f0| 70 4e 4f 54 41 43 4b 7c | 70 70 4e 4f 54 42 55 53 |pNOTACK||ppNOTBUS|
|00003700| 59 29 09 09 09 09 2f 2a | 20 73 70 69 6e 2e 64 6f |Y)..../*| spin.do|
|00003710| 6e 65 09 2a 2f 0a 58 20 | 20 20 20 7d 2c 0a 58 7d |ne.*/.X | },.X}|
|00003720| 3b 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 54 68 65 |;.X.X/*.|X The|
|00003730| 73 65 20 61 72 65 20 74 | 68 65 20 6e 75 6d 62 65 |se are t|he numbe|
|00003740| 72 20 6f 66 20 63 6c 6f | 63 6b 20 74 69 63 6b 73 |r of clo|ck ticks|
|00003750| 20 69 6e 20 61 20 6c 6f | 6e 67 20 70 61 75 73 65 | in a lo|ng pause|
|00003760| 2c 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |, the nu|mber of |
|00003770| 63 6c 6f 63 6b 0a 58 20 | 20 20 20 74 69 63 6b 73 |clock.X | ticks|
|00003780| 20 69 6e 20 61 20 73 68 | 6f 72 74 20 70 61 75 73 | in a sh|ort paus|
|00003790| 65 2c 20 61 6e 64 20 74 | 68 65 20 6d 61 78 69 6d |e, and t|he maxim|
|000037a0| 75 6d 20 23 20 6f 66 20 | 74 69 6d 65 73 20 77 65 |um # of |times we|
|000037b0| 20 62 75 73 79 20 77 61 | 69 74 2c 20 61 66 74 65 | busy wa|it, afte|
|000037c0| 72 0a 58 20 20 20 20 77 | 68 69 63 68 20 77 65 20 |r.X w|hich we |
|000037d0| 73 6c 65 65 70 20 77 61 | 69 74 3b 20 74 68 69 73 |sleep wa|it; this|
|000037e0| 20 73 68 6f 75 6c 64 20 | 62 65 20 61 20 62 69 74 | should |be a bit|
|000037f0| 20 6c 61 72 67 65 72 20 | 74 68 61 6e 20 74 68 65 | larger |than the|
|00003800| 20 75 73 75 61 6c 20 69 | 6e 74 65 72 0a 58 20 20 | usual i|nter.X |
|00003810| 20 20 63 68 61 72 61 63 | 74 65 72 20 70 72 6f 63 | charac|ter proc|
|00003820| 65 73 73 69 6e 67 20 74 | 69 6d 65 20 6f 66 20 74 |essing t|ime of t|
|00003830| 68 65 20 69 6e 74 65 72 | 66 61 63 65 2e 0a 58 2a |he inter|face..X*|
|00003840| 2f 0a 58 0a 58 73 68 6f | 72 74 20 75 6e 73 69 67 |/.X.Xsho|rt unsig|
|00003850| 6e 65 64 09 09 70 70 5f | 6c 6f 6e 67 70 61 75 73 |ned..pp_|longpaus|
|00003860| 65 09 3d 20 48 5a 2f 32 | 3b 0a 58 73 68 6f 72 74 |e.= HZ/2|;.Xshort|
|00003870| 20 75 6e 73 69 67 6e 65 | 64 09 09 70 70 5f 73 68 | unsigne|d..pp_sh|
|00003880| 6f 72 74 70 61 75 73 65 | 09 3d 20 48 5a 2f 34 3b |ortpause|.= HZ/4;|
|00003890| 0a 58 73 68 6f 72 74 20 | 75 6e 73 69 67 6e 65 64 |.Xshort |unsigned|
|000038a0| 09 09 70 70 5f 6d 61 78 | 73 70 69 6e 73 09 3d 20 |..pp_max|spins.= |
|000038b0| 37 3b 09 2f 2a 20 69 6e | 20 31 30 20 75 73 65 63 |7;./* in| 10 usec|
|000038c0| 20 75 6e 69 74 73 09 2a | 2f 0a 58 0a 58 23 65 6e | units.*|/.X.X#en|
|000038d0| 64 69 66 20 2f 2a 20 50 | 50 20 2a 2f 0a 45 4e 44 |dif /* P|P */.END|
|000038e0| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|000038f0| 20 33 30 32 36 20 2d 6e | 65 20 60 77 63 20 2d 63 | 3026 -n|e `wc -c|
|00003900| 20 3c 27 53 70 61 63 65 | 2e 63 27 60 3b 20 74 68 | <'Space|.c'`; th|
|00003910| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00003920| 3a 20 5c 22 27 53 70 61 | 63 65 2e 63 27 5c 22 20 |: \"'Spa|ce.c'\" |
|00003930| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00003940| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 63 68 6d |ong size|!.fi.chm|
|00003950| 6f 64 20 2b 78 20 27 53 | 70 61 63 65 2e 63 27 0a |od +x 'S|pace.c'.|
|00003960| 23 20 65 6e 64 20 6f 66 | 20 27 53 70 61 63 65 2e |# end of| 'Space.|
|00003970| 63 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |c'.fi.if| test -f|
|00003980| 20 27 53 79 73 74 65 6d | 27 20 2d 61 20 22 24 7b | 'System|' -a "${|
|00003990| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000039a0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000039b0| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|000039c0| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|000039d0| 5c 22 27 53 79 73 74 65 | 6d 27 5c 22 0a 65 6c 73 |\"'Syste|m'\".els|
|000039e0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000039f0| 72 61 63 74 69 6e 67 20 | 5c 22 27 53 79 73 74 65 |racting |\"'Syste|
|00003a00| 6d 27 5c 22 20 5c 28 37 | 35 20 63 68 61 72 61 63 |m'\" \(7|5 charac|
|00003a10| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00003a20| 2f 2f 22 20 3e 27 53 79 | 73 74 65 6d 27 20 3c 3c |//" >'Sy|stem' <<|
|00003a30| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 70 |'END_OF_|FILE'.Xp|
|00003a40| 70 09 59 09 31 09 30 09 | 30 09 30 09 33 62 63 09 |p.Y.1.0.|0.0.3bc.|
|00003a50| 33 62 65 09 30 09 30 0a | 58 70 70 09 4e 09 32 09 |3be.0.0.|Xpp.N.2.|
|00003a60| 30 09 30 09 30 09 33 37 | 38 09 33 37 61 09 30 09 |0.0.0.37|8.37a.0.|
|00003a70| 30 0a 58 70 70 09 4e 09 | 33 09 30 09 30 09 30 09 |0.Xpp.N.|3.0.0.0.|
|00003a80| 32 37 38 09 32 37 61 09 | 30 09 30 0a 45 4e 44 5f |278.27a.|0.0.END_|
|00003a90| 4f 46 5f 46 49 4c 45 0a | 69 66 20 74 65 73 74 20 |OF_FILE.|if test |
|00003aa0| 37 35 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |75 -ne `|wc -c <'|
|00003ab0| 53 79 73 74 65 6d 27 60 | 3b 20 74 68 65 6e 0a 20 |System'`|; then. |
|00003ac0| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00003ad0| 27 53 79 73 74 65 6d 27 | 5c 22 20 75 6e 70 61 63 |'System'|\" unpac|
|00003ae0| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00003af0| 69 7a 65 21 0a 66 69 0a | 63 68 6d 6f 64 20 2b 78 |ize!.fi.|chmod +x|
|00003b00| 20 27 53 79 73 74 65 6d | 27 0a 23 20 65 6e 64 20 | 'System|'.# end |
|00003b10| 6f 66 20 27 53 79 73 74 | 65 6d 27 0a 66 69 0a 69 |of 'Syst|em'.fi.i|
|00003b20| 66 20 74 65 73 74 20 2d | 66 20 27 70 70 2e 63 27 |f test -|f 'pp.c'|
|00003b30| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00003b40| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00003b50| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00003b60| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00003b70| 67 20 66 69 6c 65 20 5c | 22 27 70 70 2e 63 27 5c |g file \|"'pp.c'\|
|00003b80| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00003b90| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00003ba0| 70 70 2e 63 27 5c 22 20 | 5c 28 37 34 35 32 20 63 |pp.c'\" |\(7452 c|
|00003bb0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00003bc0| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 70 70 2e 63 27 |"s/^X//"| >'pp.c'|
|00003bd0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00003be0| 0a 58 2f 2a 0a 58 20 20 | 20 20 24 49 64 3a 20 70 |.X/*.X | $Id: p|
|00003bf0| 70 2e 63 2c 76 20 32 2e | 36 20 39 30 2f 30 38 2f |p.c,v 2.|6 90/08/|
|00003c00| 32 34 20 31 31 3a 34 38 | 3a 32 34 20 73 77 20 45 |24 11:48|:24 sw E|
|00003c10| 78 70 20 24 0a 58 2a 2f | 0a 58 0a 58 73 74 61 74 |xp $.X*/|.X.Xstat|
|00003c20| 69 63 20 63 68 61 72 20 | 4e 6f 74 69 63 65 5b 5d |ic char |Notice[]|
|00003c30| 20 3d 0a 58 20 20 20 20 | 22 43 6f 70 79 72 69 67 | =.X |"Copyrig|
|00003c40| 68 74 20 31 39 39 30 20 | 50 69 65 72 63 61 72 6c |ht 1990 |Piercarl|
|00003c50| 6f 20 47 72 61 6e 64 69 | 2e 20 41 6c 6c 20 72 69 |o Grandi|. All ri|
|00003c60| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 22 3b |ghts res|erved.";|
|00003c70| 0a 58 0a 58 2f 2a 0a 58 | 20 20 20 20 54 68 69 73 |.X.X/*.X| This|
|00003c80| 20 64 72 69 76 65 72 20 | 69 73 20 66 72 65 65 20 | driver |is free |
|00003c90| 73 6f 66 74 77 61 72 65 | 3b 20 79 6f 75 20 63 61 |software|; you ca|
|00003ca0| 6e 20 72 65 64 69 73 74 | 72 69 62 75 74 65 20 69 |n redist|ribute i|
|00003cb0| 74 20 61 6e 64 2f 6f 72 | 0a 58 20 20 20 20 6d 6f |t and/or|.X mo|
|00003cc0| 64 69 66 79 20 69 74 20 | 75 6e 64 65 72 20 74 68 |dify it |under th|
|00003cd0| 65 20 74 65 72 6d 73 20 | 6f 66 20 74 68 65 20 47 |e terms |of the G|
|00003ce0| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|00003cf0| 63 20 4c 69 63 65 6e 73 | 65 20 61 73 0a 58 20 20 |c Licens|e as.X |
|00003d00| 20 20 70 75 62 6c 69 73 | 68 65 64 20 62 79 20 74 | publis|hed by t|
|00003d10| 68 65 20 46 72 65 65 20 | 53 6f 66 74 77 61 72 65 |he Free |Software|
|00003d20| 20 46 6f 75 6e 64 61 74 | 69 6f 6e 3b 20 65 69 74 | Foundat|ion; eit|
|00003d30| 68 65 72 20 76 65 72 73 | 69 6f 6e 20 31 2c 20 6f |her vers|ion 1, o|
|00003d40| 72 0a 58 20 20 20 20 28 | 61 74 20 79 6f 75 72 20 |r.X (|at your |
|00003d50| 6f 70 74 69 6f 6e 29 20 | 61 6e 79 20 6c 61 74 65 |option) |any late|
|00003d60| 72 20 76 65 72 73 69 6f | 6e 2e 0a 58 0a 58 20 20 |r versio|n..X.X |
|00003d70| 20 20 41 73 20 61 20 73 | 70 65 63 69 61 6c 20 63 | As a s|pecial c|
|00003d80| 61 73 65 2c 20 74 68 69 | 73 20 64 72 69 76 65 72 |ase, thi|s driver|
|00003d90| 20 6d 61 79 20 62 65 20 | 69 6e 63 6f 72 70 6f 72 | may be |incorpor|
|00003da0| 61 74 65 64 20 69 6e 20 | 61 6e 79 20 4f 53 20 6b |ated in |any OS k|
|00003db0| 65 72 6e 65 6c 2c 0a 58 | 20 20 20 20 77 68 65 74 |ernel,.X| whet|
|00003dc0| 68 65 72 20 74 68 65 20 | 47 4e 55 20 47 65 6e 65 |her the |GNU Gene|
|00003dd0| 72 61 6c 20 50 75 62 6c | 69 63 20 4c 69 63 65 6e |ral Publ|ic Licen|
|00003de0| 73 65 20 61 70 70 6c 69 | 65 73 20 74 6f 20 69 74 |se appli|es to it|
|00003df0| 20 6f 72 20 6e 6f 74 2e | 0a 58 0a 58 20 20 20 20 | or not.|.X.X |
|00003e00| 54 68 69 73 20 64 72 69 | 76 65 72 20 69 73 20 64 |This dri|ver is d|
|00003e10| 69 73 74 72 69 62 75 74 | 65 64 20 69 6e 20 74 68 |istribut|ed in th|
|00003e20| 65 20 68 6f 70 65 20 74 | 68 61 74 20 69 74 20 77 |e hope t|hat it w|
|00003e30| 69 6c 6c 20 62 65 20 75 | 73 65 66 75 6c 2c 0a 58 |ill be u|seful,.X|
|00003e40| 20 20 20 20 62 75 74 20 | 57 49 54 48 4f 55 54 20 | but |WITHOUT |
|00003e50| 41 4e 59 20 57 41 52 52 | 41 4e 54 59 3b 20 77 69 |ANY WARR|ANTY; wi|
|00003e60| 74 68 6f 75 74 20 65 76 | 65 6e 20 74 68 65 20 69 |thout ev|en the i|
|00003e70| 6d 70 6c 69 65 64 20 77 | 61 72 72 61 6e 74 79 20 |mplied w|arranty |
|00003e80| 6f 66 0a 58 20 20 20 20 | 4d 45 52 43 48 41 4e 54 |of.X |MERCHANT|
|00003e90| 41 42 49 4c 49 54 59 20 | 6f 72 20 46 49 54 4e 45 |ABILITY |or FITNE|
|00003ea0| 53 53 20 46 4f 52 20 41 | 20 50 41 52 54 49 43 55 |SS FOR A| PARTICU|
|00003eb0| 4c 41 52 20 50 55 52 50 | 4f 53 45 2e 20 20 53 65 |LAR PURP|OSE. Se|
|00003ec0| 65 20 74 68 65 0a 58 20 | 20 20 20 47 4e 55 20 47 |e the.X | GNU G|
|00003ed0| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|00003ee0| 63 65 6e 73 65 20 66 6f | 72 20 6d 6f 72 65 20 64 |cense fo|r more d|
|00003ef0| 65 74 61 69 6c 73 2e 0a | 58 0a 58 20 20 20 20 59 |etails..|X.X Y|
|00003f00| 6f 75 20 6d 61 79 20 68 | 61 76 65 20 72 65 63 65 |ou may h|ave rece|
|00003f10| 69 76 65 64 20 61 20 63 | 6f 70 79 20 6f 66 20 74 |ived a c|opy of t|
|00003f20| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00003f30| 75 62 6c 69 63 20 4c 69 | 63 65 6e 73 65 0a 58 20 |ublic Li|cense.X |
|00003f40| 20 20 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 74 68 | along| with th|
|00003f50| 69 73 20 64 72 69 76 65 | 72 3b 20 69 66 20 6e 6f |is drive|r; if no|
|00003f60| 74 2c 20 77 72 69 74 65 | 20 74 6f 20 74 68 65 20 |t, write| to the |
|00003f70| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 0a 58 20 |Free Sof|tware.X |
|00003f80| 20 20 20 46 6f 75 6e 64 | 61 74 69 6f 6e 2c 20 49 | Found|ation, I|
|00003f90| 6e 63 2e 2c 20 36 37 35 | 20 4d 61 73 73 20 41 76 |nc., 675| Mass Av|
|00003fa0| 65 2c 20 43 61 6d 62 72 | 69 64 67 65 2c 20 4d 41 |e, Cambr|idge, MA|
|00003fb0| 20 30 32 31 33 39 2c 20 | 55 53 41 2e 0a 58 2a 2f | 02139, |USA..X*/|
|00003fc0| 0a 58 0a 58 2f 2a 0a 58 | 20 20 20 20 46 61 73 74 |.X.X/*.X| Fast|
|00003fd0| 20 70 61 72 61 6c 6c 65 | 6c 20 70 6f 72 74 20 64 | paralle|l port d|
|00003fe0| 72 69 76 65 72 2c 20 70 | 6f 6c 6c 69 6e 67 2c 20 |river, p|olling, |
|00003ff0| 6e 6f 20 69 6e 74 65 72 | 72 75 70 74 73 20 28 73 |no inter|rupts (s|
|00004000| 6f 6d 65 77 68 61 74 0a | 58 20 20 20 20 69 6e 73 |omewhat.|X ins|
|00004010| 70 69 72 65 64 20 62 79 | 20 61 20 64 72 69 76 65 |pired by| a drive|
|00004020| 72 20 66 72 6f 6d 20 4d | 69 63 68 61 65 6c 20 47 |r from M|ichael G|
|00004030| 72 65 6e 69 65 72 20 3c | 6d 69 6b 65 40 63 69 6d |renier <|mike@cim|
|00004040| 63 6f 72 2e 6d 6e 2e 6f | 72 67 3e 29 0a 58 2a 2f |cor.mn.o|rg>).X*/|
|00004050| 0a 58 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 73 79 |.X.X#inc|lude "sy|
|00004060| 73 2f 70 61 72 61 6d 2e | 68 22 0a 58 23 69 6e 63 |s/param.|h".X#inc|
|00004070| 6c 75 64 65 20 22 73 79 | 73 2f 74 79 70 65 73 2e |lude "sy|s/types.|
|00004080| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 73 79 |h".X#inc|lude "sy|
|00004090| 73 2f 64 69 72 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |s/dir.h"|.X#inclu|
|000040a0| 64 65 20 22 73 79 73 2f | 73 69 67 6e 61 6c 2e 68 |de "sys/|signal.h|
|000040b0| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 22 73 79 73 |".X#incl|ude "sys|
|000040c0| 2f 75 73 65 72 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |/user.h"|.X#inclu|
|000040d0| 64 65 20 22 73 79 73 2f | 62 75 66 2e 68 22 0a 58 |de "sys/|buf.h".X|
|000040e0| 23 69 6e 63 6c 75 64 65 | 20 22 73 79 73 2f 65 72 |#include| "sys/er|
|000040f0| 72 6e 6f 2e 68 22 0a 58 | 23 69 6e 63 6c 75 64 65 |rno.h".X|#include|
|00004100| 20 22 73 79 73 2f 69 6d | 6d 75 2e 68 22 0a 58 23 | "sys/im|mu.h".X#|
|00004110| 69 6e 63 6c 75 64 65 20 | 22 73 79 73 2f 73 79 73 |include |"sys/sys|
|00004120| 6d 61 63 72 6f 73 2e 68 | 22 0a 58 23 69 6e 63 6c |macros.h|".X#incl|
|00004130| 75 64 65 20 22 73 79 73 | 2f 69 6e 6c 69 6e 65 2e |ude "sys|/inline.|
|00004140| 68 22 0a 58 0a 58 23 69 | 66 64 65 66 20 70 70 44 |h".X.X#i|fdef ppD|
|00004150| 45 42 55 47 0a 58 20 20 | 20 20 75 6e 73 69 67 6e |EBUG.X | unsign|
|00004160| 65 64 09 09 20 20 20 20 | 70 70 5f 64 65 62 75 67 |ed.. |pp_debug|
|00004170| 20 3d 20 31 3b 0a 58 23 | 20 20 20 64 65 66 69 6e | = 1;.X#| defin|
|00004180| 65 20 44 45 42 55 47 28 | 53 54 4d 54 53 29 09 20 |e DEBUG(|STMTS). |
|00004190| 20 20 20 64 6f 20 7b 20 | 69 66 20 28 70 70 5f 64 | do { |if (pp_d|
|000041a0| 65 62 75 67 29 20 7b 20 | 53 54 4d 54 53 3b 20 7d |ebug) { |STMTS; }|
|000041b0| 3b 20 7d 20 77 68 69 6c | 65 20 28 30 29 0a 58 0a |; } whil|e (0).X.|
|000041c0| 58 20 20 20 20 75 6e 73 | 69 67 6e 65 64 09 09 20 |X uns|igned.. |
|000041d0| 20 20 20 70 70 5f 6e 63 | 68 61 72 3b 0a 58 20 20 | pp_nc|har;.X |
|000041e0| 20 20 75 6e 73 69 67 6e | 65 64 09 09 20 20 20 20 | unsign|ed.. |
|000041f0| 70 70 5f 6e 6c 6f 6e 67 | 70 61 75 73 65 3b 0a 58 |pp_nlong|pause;.X|
|00004200| 20 20 20 20 75 6e 73 69 | 67 6e 65 64 09 09 20 20 | unsi|gned.. |
|00004210| 20 20 70 70 5f 6e 73 68 | 6f 72 74 70 61 75 73 65 | pp_nsh|ortpause|
|00004220| 3b 0a 58 20 20 20 20 75 | 6e 73 69 67 6e 65 64 09 |;.X u|nsigned.|
|00004230| 09 20 20 20 20 70 70 5f | 6e 73 70 69 6e 3b 0a 58 |. pp_|nspin;.X|
|00004240| 23 65 6c 73 65 0a 58 23 | 20 20 20 64 65 66 69 6e |#else.X#| defin|
|00004250| 65 20 44 45 42 55 47 28 | 6c 69 73 74 29 09 20 20 |e DEBUG(|list). |
|00004260| 20 20 2f 2a 20 73 6b 69 | 70 20 2a 2f 0a 58 23 65 | /* ski|p */.X#e|
|00004270| 6e 64 69 66 0a 58 0a 58 | 23 69 6e 63 6c 75 64 65 |ndif.X.X|#include|
|00004280| 20 22 73 79 73 2f 70 70 | 2e 68 22 0a 58 0a 58 23 | "sys/pp|.h".X.X#|
|00004290| 69 66 20 28 70 70 53 54 | 41 54 49 43 53 5a 20 3d |if (ppST|ATICSZ =|
|000042a0| 3d 20 30 29 0a 58 23 20 | 20 20 64 65 66 69 6e 65 |= 0).X# | define|
|000042b0| 20 70 70 42 55 46 53 5a | 09 53 42 55 46 53 49 5a | ppBUFSZ|.SBUFSIZ|
|000042c0| 45 0a 58 23 65 6c 73 65 | 0a 58 23 20 20 20 64 65 |E.X#else|.X# de|
|000042d0| 66 69 6e 65 20 70 70 42 | 55 46 53 5a 09 70 70 53 |fine ppB|UFSZ.ppS|
|000042e0| 54 41 54 49 43 53 5a 0a | 58 23 65 6e 64 69 66 0a |TATICSZ.|X#endif.|
|000042f0| 58 0a 58 2f 2a 0a 58 20 | 20 20 20 41 20 6c 6f 6e |X.X/*.X | A lon|
|00004300| 67 20 70 61 75 73 65 20 | 66 6f 72 20 70 6f 6c 6c |g pause |for poll|
|00004310| 69 6e 67 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 |ing the |printer |
|00004320| 75 6e 74 69 6c 20 69 74 | 20 69 73 20 6f 6e 6c 69 |until it| is onli|
|00004330| 6e 65 20 61 67 61 69 6e | 0a 58 20 20 20 20 74 68 |ne again|.X th|
|00004340| 65 20 70 61 75 73 65 20 | 77 68 69 6c 65 20 74 68 |e pause |while th|
|00004350| 65 20 73 74 72 6f 62 65 | 20 69 73 20 68 69 67 68 |e strobe| is high|
|00004360| 2c 20 61 6e 64 20 61 20 | 73 68 6f 72 74 20 70 61 |, and a |short pa|
|00004370| 75 73 65 20 74 6f 20 77 | 61 69 74 0a 58 20 20 20 |use to w|ait.X |
|00004380| 20 66 6f 72 20 74 68 65 | 20 69 6e 74 65 72 66 61 | for the| interfa|
|00004390| 63 65 20 74 6f 20 62 65 | 63 6f 6d 65 20 72 65 61 |ce to be|come rea|
|000043a0| 64 79 20 66 6f 72 20 74 | 68 65 20 6e 65 78 74 20 |dy for t|he next |
|000043b0| 63 68 61 72 61 63 74 65 | 72 2e 0a 58 20 20 20 20 |characte|r..X |
|000043c0| 54 68 65 20 6c 6f 6e 67 | 65 72 20 70 61 75 73 65 |The long|er pause|
|000043d0| 20 69 73 20 64 6f 6e 65 | 20 73 6c 65 65 70 69 6e | is done| sleepin|
|000043e0| 67 2c 20 74 68 65 20 6f | 74 68 65 72 20 74 77 6f |g, the o|ther two|
|000043f0| 20 61 72 65 20 64 6f 6e | 65 0a 58 20 20 20 20 73 | are don|e.X s|
|00004400| 70 69 6e 6e 69 6e 67 2c | 20 73 6f 20 74 68 65 79 |pinning,| so they|
|00004410| 20 68 61 64 20 62 65 74 | 74 65 72 20 62 65 20 66 | had bet|ter be f|
|00004420| 65 77 2e 0a 58 2a 2f 0a | 58 0a 58 65 78 74 65 72 |ew..X*/.|X.Xexter|
|00004430| 6e 20 69 6e 74 09 09 6d | 69 6e 28 29 3b 0a 58 65 |n int..m|in();.Xe|
|00004440| 78 74 65 72 6e 20 69 6e | 74 09 09 74 65 6e 6d 69 |xtern in|t..tenmi|
|00004450| 63 72 6f 73 65 63 28 29 | 3b 0a 58 65 78 74 65 72 |crosec()|;.Xexter|
|00004460| 6e 20 69 6e 74 09 09 77 | 61 6b 65 75 70 28 29 3b |n int..w|akeup();|
|00004470| 0a 58 65 78 74 65 72 6e | 20 69 6e 74 09 09 74 69 |.Xextern| int..ti|
|00004480| 6d 65 6f 75 74 28 29 3b | 0a 58 65 78 74 65 72 6e |meout();|.Xextern|
|00004490| 20 69 6e 74 09 09 73 6c | 65 65 70 28 29 3b 0a 58 | int..sl|eep();.X|
|000044a0| 23 69 66 20 28 70 70 53 | 54 41 54 49 43 53 5a 20 |#if (ppS|TATICSZ |
|000044b0| 3d 3d 20 30 29 0a 58 20 | 20 20 20 65 78 74 65 72 |== 0).X | exter|
|000044c0| 6e 20 73 74 72 75 63 74 | 20 62 75 66 09 2a 67 65 |n struct| buf.*ge|
|000044d0| 74 65 62 6c 6b 28 29 3b | 0a 58 23 65 6e 64 69 66 |teblk();|.X#endif|
|000044e0| 0a 58 0a 58 23 64 65 66 | 69 6e 65 20 70 70 53 50 |.X.X#def|ine ppSP|
|000044f0| 49 4e 28 29 09 28 76 6f | 69 64 29 20 28 74 65 6e |IN().(vo|id) (ten|
|00004500| 6d 69 63 72 6f 73 65 63 | 28 29 29 0a 58 23 64 65 |microsec|()).X#de|
|00004510| 66 69 6e 65 20 70 70 50 | 41 55 53 45 28 55 2c 4e |fine ppP|AUSE(U,N|
|00004520| 29 09 28 76 6f 69 64 29 | 20 28 74 69 6d 65 6f 75 |).(void)| (timeou|
|00004530| 74 28 77 61 6b 65 75 70 | 2c 28 55 29 2c 28 4e 29 |t(wakeup|,(U),(N)|
|00004540| 29 2c 73 6c 65 65 70 28 | 28 55 29 2c 50 53 4c 45 |),sleep(|(U),PSLE|
|00004550| 50 29 29 0a 58 0a 58 65 | 78 74 65 72 6e 20 69 6e |P)).X.Xe|xtern in|
|00004560| 74 09 09 63 6f 70 79 69 | 6e 28 29 3b 0a 58 0a 58 |t..copyi|n();.X.X|
|00004570| 65 78 74 65 72 6e 20 69 | 6e 74 09 09 70 70 69 6e |extern i|nt..ppin|
|00004580| 69 74 28 29 0a 58 7b 0a | 58 20 20 20 20 72 65 67 |it().X{.|X reg|
|00004590| 69 73 74 65 72 20 73 74 | 72 75 63 74 20 70 70 5f |ister st|ruct pp_|
|000045a0| 63 6f 6e 66 69 67 20 2a | 70 70 3b 0a 58 0a 58 20 |config *|pp;.X.X |
|000045b0| 20 20 20 66 6f 72 20 28 | 70 70 20 3d 20 70 70 5f | for (|pp = pp_|
|000045c0| 63 6f 6e 66 69 67 3b 20 | 70 70 20 3c 20 28 70 70 |config; |pp < (pp|
|000045d0| 5f 63 6f 6e 66 69 67 2b | 70 70 5f 6d 61 78 29 3b |_config+|pp_max);|
|000045e0| 20 70 70 2b 2b 29 0a 58 | 20 20 20 20 7b 0a 58 23 | pp++).X| {.X#|
|000045f0| 09 69 66 20 28 70 70 53 | 54 41 54 49 43 53 5a 20 |.if (ppS|TATICSZ |
|00004600| 21 3d 20 30 29 0a 58 09 | 20 20 20 20 70 70 2d 3e |!= 0).X.| pp->|
|00004610| 62 75 66 20 3d 20 26 70 | 70 5f 73 62 75 66 5b 70 |buf = &p|p_sbuf[p|
|00004620| 70 2d 70 70 5f 63 6f 6e | 66 69 67 5d 5b 30 5d 3b |p-pp_con|fig][0];|
|00004630| 0a 58 23 09 65 6e 64 69 | 66 0a 58 09 6f 75 74 62 |.X#.endi|f.X.outb|
|00004640| 28 70 70 2d 3e 63 6f 6e | 74 72 6f 6c 2c 28 70 70 |(pp->con|trol,(pp|
|00004650| 53 45 4c 45 43 54 7c 70 | 70 4e 4f 54 52 45 53 45 |SELECT|p|pNOTRESE|
|00004660| 54 29 29 3b 0a 58 09 44 | 45 42 55 47 28 70 72 69 |T));.X.D|EBUG(pri|
|00004670| 6e 74 66 28 22 49 6e 69 | 74 69 61 6c 20 73 74 61 |ntf("Ini|tial sta|
|00004680| 74 75 73 20 6f 66 20 2f | 64 65 76 2f 70 70 25 64 |tus of /|dev/pp%d|
|00004690| 20 69 73 20 25 78 5c 6e | 22 2c 0a 58 09 09 70 70 | is %x\n|",.X..pp|
|000046a0| 2d 70 70 5f 63 6f 6e 66 | 69 67 2c 69 6e 62 28 70 |-pp_conf|ig,inb(p|
|000046b0| 70 2d 3e 73 74 61 74 75 | 73 29 29 29 3b 0a 58 20 |p->statu|s)));.X |
|000046c0| 20 20 20 7d 0a 58 7d 0a | 58 0a 58 2f 2a 20 41 52 | }.X}.|X.X/* AR|
|000046d0| 47 53 55 53 45 44 20 2a | 2f 0a 58 65 78 74 65 72 |GSUSED *|/.Xexter|
|000046e0| 6e 20 69 6e 74 20 20 20 | 20 20 20 20 20 20 20 20 |n int | |
|000046f0| 20 20 20 70 70 6f 70 65 | 6e 28 64 65 76 2c 6d 6f | ppope|n(dev,mo|
|00004700| 64 65 29 0a 58 20 20 20 | 20 69 6e 74 09 09 09 20 |de).X | int... |
|00004710| 20 20 20 64 65 76 2c 6d | 6f 64 65 3b 0a 58 7b 0a | dev,m|ode;.X{.|
|00004720| 58 20 20 20 20 72 65 67 | 69 73 74 65 72 20 69 6e |X reg|ister in|
|00004730| 74 09 20 20 20 20 75 6e | 69 74 20 3d 20 6d 69 6e |t. un|it = min|
|00004740| 6f 72 28 64 65 76 29 3b | 0a 58 20 20 20 20 72 65 |or(dev);|.X re|
|00004750| 67 69 73 74 65 72 20 75 | 6e 73 69 67 6e 65 64 09 |gister u|nsigned.|
|00004760| 20 20 20 20 73 74 61 74 | 75 73 3b 0a 58 20 20 20 | stat|us;.X |
|00004770| 20 72 65 67 69 73 74 65 | 72 20 73 74 72 75 63 74 | registe|r struct|
|00004780| 20 70 70 5f 63 6f 6e 66 | 69 67 20 2a 70 70 3b 0a | pp_conf|ig *pp;.|
|00004790| 58 0a 58 20 20 20 20 69 | 66 20 28 75 6e 69 74 20 |X.X i|f (unit |
|000047a0| 3e 3d 20 70 70 5f 6d 61 | 78 29 0a 58 20 20 20 20 |>= pp_ma|x).X |
|000047b0| 7b 0a 58 09 75 2e 75 5f | 65 72 72 6f 72 20 3d 20 |{.X.u.u_|error = |
|000047c0| 45 49 4f 3b 0a 58 09 72 | 65 74 75 72 6e 3b 0a 58 |EIO;.X.r|eturn;.X|
|000047d0| 20 20 20 20 7d 0a 58 0a | 58 20 20 20 20 70 70 20 | }.X.|X pp |
|000047e0| 3d 20 26 70 70 5f 63 6f | 6e 66 69 67 5b 75 6e 69 |= &pp_co|nfig[uni|
|000047f0| 74 5d 3b 0a 58 0a 58 20 | 20 20 20 73 74 61 74 75 |t];.X.X | statu|
|00004800| 73 20 3d 20 69 6e 62 28 | 70 70 2d 3e 73 74 61 74 |s = inb(|pp->stat|
|00004810| 75 73 29 3b 0a 58 0a 58 | 20 20 20 20 69 66 20 28 |us);.X.X| if (|
|00004820| 28 73 74 61 74 75 73 26 | 30 78 66 66 29 20 3d 3d |(status&|0xff) ==|
|00004830| 20 30 78 66 66 29 0a 58 | 20 20 20 20 7b 0a 58 09 | 0xff).X| {.X.|
|00004840| 75 2e 75 5f 65 72 72 6f | 72 20 3d 20 45 4e 58 49 |u.u_erro|r = ENXI|
|00004850| 4f 3b 0a 58 09 44 45 42 | 55 47 28 70 72 69 6e 74 |O;.X.DEB|UG(print|
|00004860| 66 28 22 50 72 69 6e 74 | 65 72 20 2f 64 65 76 2f |f("Print|er /dev/|
|00004870| 70 70 25 64 20 64 6f 65 | 73 20 6e 6f 74 20 65 78 |pp%d doe|s not ex|
|00004880| 69 73 74 5c 6e 22 2c 75 | 6e 69 74 29 29 3b 0a 58 |ist\n",u|nit));.X|
|00004890| 09 72 65 74 75 72 6e 3b | 0a 58 20 20 20 20 7d 0a |.return;|.X }.|
|000048a0| 58 0a 58 20 20 20 20 2f | 2a 0a 58 09 57 65 20 69 |X.X /|*.X.We i|
|000048b0| 67 6e 6f 72 65 20 65 72 | 72 6f 72 20 63 6f 6e 64 |gnore er|ror cond|
|000048c0| 69 74 69 6f 6e 20 65 78 | 63 65 70 74 20 77 68 65 |ition ex|cept whe|
|000048d0| 6e 20 70 72 69 6e 74 65 | 72 20 69 73 20 6f 6e 6c |n printe|r is onl|
|000048e0| 69 6e 65 20 72 65 61 64 | 79 2e 0a 58 20 20 20 20 |ine read|y..X |
|000048f0| 2a 2f 0a 58 0a 58 20 20 | 20 20 69 66 20 28 28 73 |*/.X.X | if ((s|
|00004900| 74 61 74 75 73 26 28 70 | 70 4f 4e 4c 49 4e 45 7c |tatus&(p|pONLINE||
|00004910| 70 70 4e 4f 54 42 55 53 | 59 7c 70 70 4e 4f 54 45 |ppNOTBUS|Y|ppNOTE|
|00004920| 52 52 4f 52 29 29 20 3d | 3d 20 28 70 70 4f 4e 4c |RROR)) =|= (ppONL|
|00004930| 49 4e 45 7c 70 70 4e 4f | 54 42 55 53 59 29 29 0a |INE|ppNO|TBUSY)).|
|00004940| 58 20 20 20 20 7b 0a 58 | 09 75 2e 75 5f 65 72 72 |X {.X|.u.u_err|
|00004950| 6f 72 20 3d 20 45 49 4f | 3b 0a 58 09 44 45 42 55 |or = EIO|;.X.DEBU|
|00004960| 47 28 70 72 69 6e 74 66 | 28 22 45 72 72 6f 72 20 |G(printf|("Error |
|00004970| 73 74 61 74 75 73 20 25 | 78 20 64 65 74 65 63 74 |status %|x detect|
|00004980| 65 64 20 6f 6e 20 2f 64 | 65 76 2f 70 70 25 64 5c |ed on /d|ev/pp%d\|
|00004990| 6e 22 2c 73 74 61 74 75 | 73 2c 75 6e 69 74 29 29 |n",statu|s,unit))|
|000049a0| 3b 0a 58 09 72 65 74 75 | 72 6e 3b 0a 58 20 20 20 |;.X.retu|rn;.X |
|000049b0| 20 7d 0a 58 0a 58 20 20 | 20 20 44 45 42 55 47 28 | }.X.X | DEBUG(|
|000049c0| 28 70 70 5f 6e 63 68 61 | 72 20 3d 20 70 70 5f 6e |(pp_ncha|r = pp_n|
|000049d0| 6c 6f 6e 67 70 61 75 73 | 65 20 3d 20 70 70 5f 6e |longpaus|e = pp_n|
|000049e0| 73 68 6f 72 74 70 61 75 | 73 65 20 3d 20 70 70 5f |shortpau|se = pp_|
|000049f0| 6e 73 70 69 6e 20 3d 20 | 30 29 29 3b 0a 58 0a 58 |nspin = |0));.X.X|
|00004a00| 23 20 20 20 69 66 20 28 | 70 70 53 54 41 54 49 43 |# if (|ppSTATIC|
|00004a10| 53 5a 20 3d 3d 20 30 29 | 0a 58 20 20 20 20 7b 0a |SZ == 0)|.X {.|
|00004a20| 58 09 69 6e 74 09 09 09 | 73 3b 0a 58 0a 58 09 73 |X.int...|s;.X.X.s|
|00004a30| 20 3d 20 73 70 6c 33 28 | 29 3b 0a 58 09 7b 0a 58 | = spl3(|);.X.{.X|
|00004a40| 09 20 20 20 20 69 66 20 | 28 70 70 2d 3e 68 64 72 |. if |(pp->hdr|
|00004a50| 29 0a 58 09 20 20 20 20 | 7b 0a 58 09 09 73 70 6c |).X. |{.X..spl|
|00004a60| 78 28 73 29 3b 0a 58 09 | 09 44 45 42 55 47 28 70 |x(s);.X.|.DEBUG(p|
|00004a70| 72 69 6e 74 66 28 22 50 | 72 69 6e 74 65 72 20 2f |rintf("P|rinter /|
|00004a80| 64 65 76 2f 70 70 25 64 | 20 61 6c 72 65 61 64 79 |dev/pp%d| already|
|00004a90| 20 6f 70 65 6e 20 28 25 | 78 29 5c 6e 22 2c 0a 58 | open (%|x)\n",.X|
|00004aa0| 09 09 20 20 20 20 75 6e | 69 74 2c 70 70 2d 3e 68 |.. un|it,pp->h|
|00004ab0| 64 72 29 29 3b 0a 58 09 | 09 72 65 74 75 72 6e 3b |dr));.X.|.return;|
|00004ac0| 0a 58 09 20 20 20 20 7d | 0a 58 09 20 20 20 20 70 |.X. }|.X. p|
|00004ad0| 70 2d 3e 68 64 72 20 3d | 20 28 73 74 72 75 63 74 |p->hdr =| (struct|
|00004ae0| 20 62 75 66 20 2a 29 20 | 31 3b 0a 58 09 7d 0a 58 | buf *) |1;.X.}.X|
|00004af0| 09 73 70 6c 78 28 73 29 | 3b 0a 58 0a 58 09 70 70 |.splx(s)|;.X.X.pp|
|00004b00| 2d 3e 68 64 72 20 3d 20 | 67 65 74 65 62 6c 6b 28 |->hdr = |geteblk(|
|00004b10| 29 3b 0a 58 09 69 66 20 | 28 70 70 2d 3e 68 64 72 |);.X.if |(pp->hdr|
|00004b20| 29 0a 58 09 7b 0a 58 09 | 20 20 20 20 70 70 2d 3e |).X.{.X.| pp->|
|00004b30| 68 64 72 2d 3e 62 5f 66 | 6c 61 67 73 20 7c 3d 20 |hdr->b_f|lags |= |
|00004b40| 42 5f 50 52 49 56 4c 47 | 3b 0a 58 09 20 20 20 20 |B_PRIVLG|;.X. |
|00004b50| 70 70 2d 3e 62 75 66 20 | 3d 20 70 70 2d 3e 68 64 |pp->buf |= pp->hd|
|00004b60| 72 2d 3e 62 5f 75 6e 2e | 62 5f 61 64 64 72 3b 0a |r->b_un.|b_addr;.|
|00004b70| 58 09 7d 0a 58 09 65 6c | 73 65 0a 58 09 7b 0a 58 |X.}.X.el|se.X.{.X|
|00004b80| 09 20 20 20 20 75 2e 75 | 5f 65 72 72 6f 72 20 3d |. u.u|_error =|
|00004b90| 20 45 4e 4f 4d 45 4d 3b | 0a 58 09 20 20 20 20 44 | ENOMEM;|.X. D|
|00004ba0| 45 42 55 47 28 70 72 69 | 6e 74 66 28 22 43 61 6e |EBUG(pri|ntf("Can|
|00004bb0| 6e 6f 74 20 61 6c 6c 6f | 63 61 74 65 20 62 75 66 |not allo|cate buf|
|00004bc0| 66 65 72 20 66 6f 72 20 | 2f 64 65 76 2f 70 70 25 |fer for |/dev/pp%|
|00004bd0| 64 5c 6e 22 2c 75 6e 69 | 74 29 29 3b 0a 58 09 7d |d\n",uni|t));.X.}|
|00004be0| 0a 58 0a 58 09 44 45 42 | 55 47 28 70 72 69 6e 74 |.X.X.DEB|UG(print|
|00004bf0| 66 28 22 50 72 69 6e 74 | 65 72 20 2f 64 65 76 2f |f("Print|er /dev/|
|00004c00| 70 70 25 64 20 68 61 73 | 20 62 75 66 68 64 72 20 |pp%d has| bufhdr |
|00004c10| 25 78 2c 20 62 75 66 20 | 25 78 5c 6e 22 2c 0a 58 |%x, buf |%x\n",.X|
|00004c20| 09 20 20 20 20 75 6e 69 | 74 2c 70 70 2d 3e 68 64 |. uni|t,pp->hd|
|00004c30| 72 2c 70 70 2d 3e 62 75 | 66 29 29 3b 0a 58 20 20 |r,pp->bu|f));.X |
|00004c40| 20 20 7d 0a 58 23 65 6e | 64 69 66 0a 58 7d 0a 58 | }.X#en|dif.X}.X|
|00004c50| 0a 58 2f 2a 20 41 52 47 | 53 55 53 45 44 20 2a 2f |.X/* ARG|SUSED */|
|00004c60| 0a 58 65 78 74 65 72 6e | 20 69 6e 74 20 20 20 20 |.Xextern| int |
|00004c70| 20 20 20 20 20 20 20 20 | 20 20 70 70 63 6c 6f 73 | | ppclos|
|00004c80| 65 28 64 65 76 29 0a 58 | 20 20 20 20 69 6e 74 09 |e(dev).X| int.|
|00004c90| 09 09 20 20 20 20 64 65 | 76 3b 0a 58 7b 0a 58 20 |.. de|v;.X{.X |
|00004ca0| 20 20 20 44 45 42 55 47 | 28 70 72 69 6e 74 66 28 | DEBUG|(printf(|
|00004cb0| 22 50 72 69 6e 74 65 64 | 20 25 64 20 63 68 61 72 |"Printed| %d char|
|00004cc0| 61 63 74 65 72 73 2c 20 | 70 61 75 73 65 64 20 25 |acters, |paused %|
|00004cd0| 64 20 61 6e 64 20 73 70 | 75 6e 20 25 64 20 28 25 |d and sp|un %d (%|
|00004ce0| 64 29 20 74 69 6d 65 73 | 5c 6e 22 2c 0a 58 09 70 |d) times|\n",.X.p|
|00004cf0| 70 5f 6e 63 68 61 72 2c | 70 70 5f 6c 6f 6e 67 70 |p_nchar,|pp_longp|
|00004d00| 61 75 73 65 2c 70 70 5f | 6e 73 70 69 6e 2c 70 70 |ause,pp_|nspin,pp|
|00004d10| 5f 6e 73 68 6f 72 74 70 | 61 75 73 65 29 29 3b 0a |_nshortp|ause));.|
|00004d20| 58 0a 58 23 20 20 20 69 | 66 20 28 70 70 53 54 41 |X.X# i|f (ppSTA|
|00004d30| 54 49 43 53 5a 20 3d 3d | 20 30 29 0a 58 20 20 20 |TICSZ ==| 0).X |
|00004d40| 20 7b 0a 58 09 72 65 67 | 69 73 74 65 72 20 73 74 | {.X.reg|ister st|
|00004d50| 72 75 63 74 20 70 70 5f | 63 6f 6e 66 69 67 20 2a |ruct pp_|config *|
|00004d60| 70 70 3b 0a 58 0a 58 09 | 70 70 20 3d 20 26 70 70 |pp;.X.X.|pp = &pp|
|00004d70| 5f 63 6f 6e 66 69 67 5b | 6d 69 6e 6f 72 28 64 65 |_config[|minor(de|
|00004d80| 76 29 5d 3b 0a 58 0a 58 | 09 69 66 20 28 70 70 2d |v)];.X.X|.if (pp-|
|00004d90| 3e 68 64 72 29 0a 58 09 | 7b 0a 58 09 20 20 20 20 |>hdr).X.|{.X. |
|00004da0| 70 70 2d 3e 62 75 66 20 | 3d 20 28 63 61 64 64 72 |pp->buf |= (caddr|
|00004db0| 5f 74 29 20 30 3b 0a 58 | 09 20 20 20 20 70 70 2d |_t) 0;.X|. pp-|
|00004dc0| 3e 68 64 72 2d 3e 62 5f | 66 6c 61 67 73 20 26 3d |>hdr->b_|flags &=|
|00004dd0| 7e 20 42 5f 50 52 49 56 | 4c 47 3b 0a 58 0a 58 09 |~ B_PRIV|LG;.X.X.|
|00004de0| 20 20 20 20 62 72 65 6c | 73 65 28 70 70 2d 3e 68 | brel|se(pp->h|
|00004df0| 64 72 29 3b 0a 58 09 20 | 20 20 20 70 70 2d 3e 68 |dr);.X. | pp->h|
|00004e00| 64 72 20 3d 20 28 73 74 | 72 75 63 74 20 62 75 66 |dr = (st|ruct buf|
|00004e10| 20 2a 29 20 30 3b 0a 58 | 09 7d 0a 58 09 65 6c 73 | *) 0;.X|.}.X.els|
|00004e20| 65 0a 58 09 20 20 20 20 | 44 45 42 55 47 28 70 72 |e.X. |DEBUG(pr|
|00004e30| 69 6e 74 66 28 22 49 6d | 70 6f 73 73 69 62 6c 65 |intf("Im|possible|
|00004e40| 20 63 6c 6f 73 65 20 77 | 69 74 68 6f 75 74 20 62 | close w|ithout b|
|00004e50| 75 66 66 65 72 20 6f 66 | 20 2f 64 65 76 2f 70 70 |uffer of| /dev/pp|
|00004e60| 25 64 5c 6e 22 2c 0a 58 | 09 09 70 70 2d 70 70 5f |%d\n",.X|..pp-pp_|
|00004e70| 63 6f 6e 66 69 67 29 29 | 3b 0a 58 20 20 20 20 7d |config))|;.X }|
|00004e80| 0a 58 23 20 20 20 65 6e | 64 69 66 0a 58 7d 0a 58 |.X# en|dif.X}.X|
|00004e90| 0a 58 73 74 61 74 69 63 | 20 76 6f 69 64 09 09 70 |.Xstatic| void..p|
|00004ea0| 70 62 75 66 77 72 69 74 | 65 28 70 70 2c 62 75 66 |pbufwrit|e(pp,buf|
|00004eb0| 2c 65 6e 64 62 75 66 29 | 0a 58 20 20 20 20 72 65 |,endbuf)|.X re|
|00004ec0| 67 69 73 74 65 72 20 73 | 74 72 75 63 74 20 70 70 |gister s|truct pp|
|00004ed0| 5f 63 6f 6e 66 69 67 20 | 2a 70 70 3b 0a 58 20 20 |_config |*pp;.X |
|00004ee0| 20 20 63 61 64 64 72 5f | 74 09 09 20 20 20 20 62 | caddr_|t.. b|
|00004ef0| 75 66 3b 0a 58 20 20 20 | 20 72 65 67 69 73 74 65 |uf;.X | registe|
|00004f00| 72 20 63 61 64 64 72 5f | 74 09 20 20 20 20 65 6e |r caddr_|t. en|
|00004f10| 64 62 75 66 3b 0a 58 7b | 0a 58 20 20 20 20 72 65 |dbuf;.X{|.X re|
|00004f20| 67 69 73 74 65 72 20 75 | 6e 73 69 67 6e 65 64 09 |gister u|nsigned.|
|00004f30| 20 20 20 20 73 74 61 74 | 75 73 3b 0a 58 20 20 20 | stat|us;.X |
|00004f40| 20 72 65 67 69 73 74 65 | 72 20 69 6e 74 09 20 20 | registe|r int. |
|00004f50| 20 20 73 74 61 74 75 73 | 70 3b 0a 58 20 20 20 20 | status|p;.X |
|00004f60| 72 65 67 69 73 74 65 72 | 20 63 68 61 72 09 20 20 |register| char. |
|00004f70| 20 20 2a 63 68 3b 0a 58 | 0a 58 20 20 20 20 73 74 | *ch;.X|.X st|
|00004f80| 61 74 75 73 70 20 3d 20 | 70 70 2d 3e 73 74 61 74 |atusp = |pp->stat|
|00004f90| 75 73 3b 0a 58 0a 58 20 | 20 20 20 66 6f 72 20 28 |us;.X.X | for (|
|00004fa0| 63 68 20 3d 20 28 63 68 | 61 72 20 2a 29 20 62 75 |ch = (ch|ar *) bu|
|00004fb0| 66 3b 20 63 68 20 3c 20 | 28 63 68 61 72 20 2a 29 |f; ch < |(char *)|
|00004fc0| 20 65 6e 64 62 75 66 3b | 20 63 68 2b 2b 29 0a 58 | endbuf;| ch++).X|
|00004fd0| 20 20 20 20 7b 0a 58 09 | 44 45 42 55 47 28 70 70 | {.X.|DEBUG(pp|
|00004fe0| 5f 6e 63 68 61 72 2b 2b | 29 3b 0a 58 0a 58 20 20 |_nchar++|);.X.X |
|00004ff0| 20 20 6c 61 74 63 68 5f | 63 68 61 72 61 63 74 65 | latch_|characte|
|00005000| 72 3a 0a 58 0a 58 09 6f | 75 74 62 28 70 70 2d 3e |r:.X.X.o|utb(pp->|
|00005010| 64 61 74 61 2c 2a 63 68 | 29 3b 0a 58 0a 58 09 2f |data,*ch|);.X.X./|
|00005020| 2a 0a 58 09 20 20 20 20 | 48 65 72 65 20 77 65 20 |*.X. |Here we |
|00005030| 77 61 69 74 20 66 6f 72 | 20 74 68 65 20 70 72 69 |wait for| the pri|
|00005040| 6e 74 65 72 20 74 6f 20 | 62 65 20 72 65 61 64 79 |nter to |be ready|
|00005050| 2c 20 61 6e 64 20 74 68 | 69 73 20 6d 61 79 0a 58 |, and th|is may.X|
|00005060| 09 20 20 20 20 62 65 20 | 61 20 6c 6f 6e 67 69 73 |. be |a longis|
|00005070| 68 20 77 61 69 74 2c 20 | 62 65 63 61 75 73 65 20 |h wait, |because |
|00005080| 6f 66 20 70 61 70 65 72 | 20 65 6e 64 2c 20 6f 66 |of paper| end, of|
|00005090| 66 6c 69 6e 65 2c 20 70 | 6f 77 65 72 20 6f 66 66 |fline, p|ower off|
|000050a0| 2e 0a 58 09 20 20 20 20 | 57 65 20 73 6c 65 65 70 |..X. |We sleep|
|000050b0| 2c 20 70 6f 6c 6c 69 6e | 67 20 61 20 66 65 77 20 |, pollin|g a few |
|000050c0| 74 69 6d 65 73 20 70 65 | 72 20 73 65 63 6f 6e 64 |times pe|r second|
|000050d0| 2c 20 61 73 20 74 68 69 | 73 20 69 73 20 73 69 6d |, as thi|s is sim|
|000050e0| 70 6c 65 72 0a 58 09 20 | 20 20 20 74 68 61 6e 20 |pler.X. | than |
|000050f0| 74 61 6b 69 6e 67 20 61 | 6e 20 69 6e 74 65 72 72 |taking a|n interr|
|00005100| 75 70 74 20 61 6e 64 20 | 74 68 65 20 63 6f 73 74 |upt and |the cost|
|00005110| 20 69 73 20 76 65 72 79 | 20 6c 6f 77 2e 0a 58 09 | is very| low..X.|
|00005120| 2a 2f 0a 58 0a 58 20 20 | 20 20 77 61 69 74 5f 70 |*/.X.X | wait_p|
|00005130| 72 69 6e 74 65 72 5f 6f | 6e 6c 69 6e 65 3a 0a 58 |rinter_o|nline:.X|
|00005140| 0a 58 09 66 6f 72 0a 58 | 09 28 0a 58 09 20 20 20 |.X.for.X|.(.X. |
|00005150| 20 73 74 61 74 75 73 20 | 3d 20 69 6e 62 28 73 74 | status |= inb(st|
|00005160| 61 74 75 73 70 29 3b 0a | 58 09 20 20 20 20 28 73 |atusp);.|X. (s|
|00005170| 74 61 74 75 73 20 26 20 | 70 70 5f 67 75 61 72 64 |tatus & |pp_guard|
|00005180| 2e 70 61 75 73 65 2e 6d | 61 73 6b 29 20 21 3d 20 |.pause.m|ask) != |
|00005190| 70 70 5f 67 75 61 72 64 | 2e 70 61 75 73 65 2e 64 |pp_guard|.pause.d|
|000051a0| 6f 6e 65 0a 58 09 09 7c | 7c 20 28 73 74 61 74 75 |one.X..||| (statu|
|000051b0| 73 20 26 20 70 70 5f 67 | 75 61 72 64 2e 73 70 69 |s & pp_g|uard.spi|
|000051c0| 6e 2e 6d 61 73 6b 29 20 | 21 3d 20 70 70 5f 67 75 |n.mask) |!= pp_gu|
|000051d0| 61 72 64 2e 73 70 69 6e | 2e 64 6f 6e 65 3b 0a 58 |ard.spin|.done;.X|
|000051e0| 09 20 20 20 20 73 74 61 | 74 75 73 20 3d 20 69 6e |. sta|tus = in|
|000051f0| 62 28 73 74 61 74 75 73 | 70 29 0a 58 09 29 0a 58 |b(status|p).X.).X|
|00005200| 09 7b 0a 58 09 20 20 20 | 20 70 70 50 41 55 53 45 |.{.X. | ppPAUSE|
|00005210| 28 28 63 61 64 64 72 5f | 74 29 20 26 70 70 2d 3e |((caddr_|t) &pp->|
|00005220| 73 74 61 74 75 73 2c 70 | 70 5f 6c 6f 6e 67 70 61 |status,p|p_longpa|
|00005230| 75 73 65 29 3b 0a 58 09 | 20 20 20 20 44 45 42 55 |use);.X.| DEBU|
|00005240| 47 28 70 70 5f 6e 6c 6f | 6e 67 70 61 75 73 65 2b |G(pp_nlo|ngpause+|
|00005250| 2b 29 3b 0a 58 09 7d 0a | 58 0a 58 09 2f 2a 0a 58 |+);.X.}.|X.X./*.X|
|00005260| 09 20 20 20 20 41 6c 6c | 65 6c 6c 75 69 61 68 21 |. All|elluiah!|
|00005270| 20 54 68 65 20 70 72 69 | 6e 74 65 72 20 69 73 20 | The pri|nter is |
|00005280| 72 65 61 64 79 2e 20 53 | 74 72 6f 62 65 20 74 68 |ready. S|trobe th|
|00005290| 65 20 63 68 61 72 61 63 | 74 65 72 0a 58 09 20 20 |e charac|ter.X. |
|000052a0| 20 20 77 65 20 68 61 64 | 20 61 6c 72 65 61 64 79 | we had| already|
|000052b0| 20 6c 61 74 63 68 65 64 | 20 69 6e 2e 0a 58 09 2a | latched| in..X.*|
|000052c0| 2f 0a 58 0a 58 20 20 20 | 20 73 74 72 6f 62 65 5f |/.X.X | strobe_|
|000052d0| 61 77 68 69 6c 65 3a 0a | 58 0a 58 09 6f 75 74 62 |awhile:.|X.X.outb|
|000052e0| 28 70 70 2d 3e 63 6f 6e | 74 72 6f 6c 2c 28 70 70 |(pp->con|trol,(pp|
|000052f0| 53 45 4c 45 43 54 7c 70 | 70 4e 4f 54 52 45 53 45 |SELECT|p|pNOTRESE|
|00005300| 54 7c 70 70 53 54 52 4f | 42 45 29 29 3b 0a 58 09 |T|ppSTRO|BE));.X.|
|00005310| 70 70 53 50 49 4e 28 29 | 3b 20 2f 2a 20 54 68 69 |ppSPIN()|; /* Thi|
|00005320| 73 20 73 68 6f 75 6c 64 | 20 6c 61 73 74 20 61 74 |s should| last at|
|00005330| 20 6c 65 61 73 74 20 6f | 6e 65 20 6d 69 63 72 6f | least o|ne micro|
|00005340| 73 65 63 6f 6e 64 20 2a | 2f 0a 58 09 6f 75 74 62 |second *|/.X.outb|
|00005350| 28 70 70 2d 3e 63 6f 6e | 74 72 6f 6c 2c 28 70 70 |(pp->con|trol,(pp|
|00005360| 53 45 4c 45 43 54 7c 70 | 70 4e 4f 54 52 45 53 45 |SELECT|p|pNOTRESE|
|00005370| 54 29 29 3b 0a 58 0a 58 | 09 2f 2a 0a 58 09 20 20 |T));.X.X|./*.X. |
|00005380| 20 20 48 65 72 65 20 77 | 65 20 77 61 69 74 20 66 | Here w|e wait f|
|00005390| 6f 72 20 74 68 65 20 69 | 6e 74 65 72 66 61 63 65 |or the i|nterface|
|000053a0| 20 74 6f 20 62 65 20 72 | 65 61 64 79 20 74 6f 20 | to be r|eady to |
|000053b0| 61 63 63 65 70 74 20 61 | 6e 6f 74 68 65 72 0a 58 |accept a|nother.X|
|000053c0| 09 20 20 20 20 63 68 61 | 72 61 63 74 65 72 2c 20 |. cha|racter, |
|000053d0| 61 6e 64 20 74 68 75 73 | 20 77 65 20 73 70 69 6e |and thus| we spin|
|000053e0| 2c 20 62 65 63 61 75 73 | 65 20 77 65 20 65 78 70 |, becaus|e we exp|
|000053f0| 65 63 74 20 74 68 65 20 | 77 61 69 74 20 74 6f 20 |ect the |wait to |
|00005400| 62 65 0a 58 09 20 20 20 | 20 73 68 6f 72 74 20 28 |be.X. | short (|
|00005410| 65 2e 67 2e 20 33 2d 36 | 20 74 75 72 6e 73 29 2e |e.g. 3-6| turns).|
|00005420| 20 54 68 69 73 20 69 73 | 20 63 68 65 61 70 65 72 | This is| cheaper|
|00005430| 20 74 68 61 6e 20 74 68 | 65 20 6f 76 65 72 68 65 | than th|e overhe|
|00005440| 61 64 73 0a 58 09 20 20 | 20 20 69 6e 76 6f 6c 76 |ads.X. | involv|
|00005450| 65 64 20 69 6e 20 73 6c | 65 65 70 69 6e 67 20 6f |ed in sl|eeping o|
|00005460| 72 20 65 76 65 6e 20 69 | 6e 20 74 61 6b 69 6e 67 |r even i|n taking|
|00005470| 20 61 6e 20 69 6e 74 65 | 72 72 75 70 74 2e 0a 58 | an inte|rrupt..X|
|00005480| 09 2a 2f 0a 58 0a 58 20 | 20 20 20 77 61 69 74 5f |.*/.X.X | wait_|
|00005490| 69 6e 74 65 72 66 61 63 | 65 5f 72 65 61 64 79 3a |interfac|e_ready:|
|000054a0| 0a 58 0a 58 09 7b 0a 58 | 09 20 20 20 20 72 65 67 |.X.X.{.X|. reg|
|000054b0| 69 73 74 65 72 20 75 6e | 73 69 67 6e 65 64 09 09 |ister un|signed..|
|000054c0| 20 20 20 20 73 70 69 6e | 73 3b 0a 58 0a 58 09 20 | spin|s;.X.X. |
|000054d0| 20 20 20 66 6f 72 0a 58 | 09 20 20 20 20 28 0a 58 | for.X|. (.X|
|000054e0| 09 09 73 70 69 6e 73 20 | 3d 20 30 2c 20 73 74 61 |..spins |= 0, sta|
|000054f0| 74 75 73 20 3d 20 69 6e | 62 28 73 74 61 74 75 73 |tus = in|b(status|
|00005500| 70 29 3b 0a 58 09 09 73 | 70 69 6e 73 20 3c 20 70 |p);.X..s|pins < p|
|00005510| 70 5f 6d 61 78 73 70 69 | 6e 73 20 2f 2a 20 44 6f |p_maxspi|ns /* Do|
|00005520| 6e 27 74 20 77 61 73 74 | 65 20 74 6f 6f 20 6d 75 |n't wast|e too mu|
|00005530| 63 68 20 74 69 6d 65 20 | 73 70 69 6e 6e 69 6e 67 |ch time |spinning|
|00005540| 20 2a 2f 0a 58 09 09 20 | 20 20 20 26 26 20 28 73 | */.X.. | && (s|
|00005550| 74 61 74 75 73 20 26 20 | 70 70 5f 67 75 61 72 64 |tatus & |pp_guard|
|00005560| 2e 73 70 69 6e 2e 6d 61 | 73 6b 29 20 21 3d 20 70 |.spin.ma|sk) != p|
|00005570| 70 5f 67 75 61 72 64 2e | 73 70 69 6e 2e 64 6f 6e |p_guard.|spin.don|
|00005580| 65 0a 58 09 09 20 20 20 | 20 26 26 20 28 73 74 61 |e.X.. | && (sta|
|00005590| 74 75 73 20 26 20 70 70 | 5f 67 75 61 72 64 2e 70 |tus & pp|_guard.p|
|000055a0| 61 75 73 65 2e 6d 61 73 | 6b 29 20 3d 3d 20 28 70 |ause.mas|k) == (p|
|000055b0| 70 5f 67 75 61 72 64 2e | 70 61 75 73 65 2e 64 6f |p_guard.|pause.do|
|000055c0| 6e 65 29 3b 0a 58 09 09 | 73 70 69 6e 73 2b 2b 2c |ne);.X..|spins++,|
|000055d0| 20 73 74 61 74 75 73 20 | 3d 20 69 6e 62 28 73 74 | status |= inb(st|
|000055e0| 61 74 75 73 70 29 0a 58 | 09 20 20 20 20 29 0a 58 |atusp).X|. ).X|
|000055f0| 09 20 20 20 20 7b 0a 58 | 09 09 70 70 53 50 49 4e |. {.X|..ppSPIN|
|00005600| 28 29 3b 0a 58 09 09 44 | 45 42 55 47 28 70 70 5f |();.X..D|EBUG(pp_|
|00005610| 6e 73 70 69 6e 2b 2b 29 | 3b 0a 58 09 20 20 20 20 |nspin++)|;.X. |
|00005620| 7d 0a 58 0a 58 09 20 20 | 20 20 2f 2a 0a 58 09 09 |}.X.X. | /*.X..|
|00005630| 54 68 69 73 20 69 73 20 | 6e 6f 74 20 72 65 61 6c |This is |not real|
|00005640| 6c 79 20 6e 65 63 65 73 | 73 61 72 79 3b 20 77 65 |ly neces|sary; we|
|00005650| 20 63 6f 75 6c 64 20 6a | 75 73 74 20 68 61 76 65 | could j|ust have|
|00005660| 20 6f 6e 65 20 70 61 75 | 73 65 0a 58 09 09 61 62 | one pau|se.X..ab|
|00005670| 6f 76 65 2c 20 62 65 66 | 6f 72 65 20 6c 61 74 63 |ove, bef|ore latc|
|00005680| 68 69 6e 67 20 74 68 65 | 20 63 68 61 72 61 63 74 |hing the| charact|
|00005690| 65 72 2e 20 57 65 20 64 | 6f 20 6e 6f 74 20 64 6f |er. We d|o not do|
|000056a0| 20 74 68 61 74 0a 58 09 | 09 73 69 6d 70 6c 79 20 | that.X.|.simply |
|000056b0| 62 65 63 61 75 73 65 20 | 77 65 20 77 61 6e 74 20 |because |we want |
|000056c0| 74 6f 20 68 61 76 65 20 | 61 20 73 68 6f 72 74 65 |to have |a shorte|
|000056d0| 72 20 70 61 75 73 65 20 | 66 6f 72 20 62 75 66 66 |r pause |for buff|
|000056e0| 65 72 0a 58 09 09 66 75 | 6c 6c 20 68 65 72 65 2c |er.X..fu|ll here,|
|000056f0| 20 74 6f 20 68 61 76 65 | 20 73 6e 61 70 70 69 65 | to have| snappie|
|00005700| 72 20 72 65 73 70 6f 6e | 73 65 2e 20 57 65 6c 6c |r respon|se. Well|
|00005710| 2c 20 69 6e 20 74 68 65 | 6f 72 79 20 3a 2d 3e 2e |, in the|ory :->.|
|00005720| 0a 58 09 20 20 20 20 2a | 2f 0a 58 0a 58 09 20 20 |.X. *|/.X.X. |
|00005730| 20 20 69 66 20 28 73 70 | 69 6e 73 20 3d 3d 20 70 | if (sp|ins == p|
|00005740| 70 5f 6d 61 78 73 70 69 | 6e 73 29 0a 58 09 20 20 |p_maxspi|ns).X. |
|00005750| 20 20 7b 0a 58 09 09 70 | 70 50 41 55 53 45 28 28 | {.X..p|pPAUSE((|
|00005760| 63 61 64 64 72 5f 74 29 | 20 26 70 70 2d 3e 73 74 |caddr_t)| &pp->st|
|00005770| 61 74 75 73 2c 70 70 5f | 73 68 6f 72 74 70 61 75 |atus,pp_|shortpau|
|00005780| 73 65 29 3b 0a 58 09 09 | 44 45 42 55 47 28 70 70 |se);.X..|DEBUG(pp|
|00005790| 5f 6e 73 68 6f 72 74 70 | 61 75 73 65 2b 2b 29 3b |_nshortp|ause++);|
|000057a0| 0a 58 09 20 20 20 20 7d | 0a 58 09 7d 0a 58 20 20 |.X. }|.X.}.X |
|000057b0| 20 20 7d 0a 58 7d 0a 58 | 0a 58 65 78 74 65 72 6e | }.X}.X|.Xextern|
|000057c0| 20 69 6e 74 20 20 20 20 | 20 20 20 20 20 20 20 20 | int | |
|000057d0| 20 20 70 70 77 72 69 74 | 65 28 64 65 76 29 0a 58 | ppwrit|e(dev).X|
|000057e0| 20 20 20 20 69 6e 74 09 | 09 09 20 20 20 20 64 65 | int.|.. de|
|000057f0| 76 3b 0a 58 7b 0a 58 20 | 20 20 20 72 65 67 69 73 |v;.X{.X | regis|
|00005800| 74 65 72 20 73 74 72 75 | 63 74 20 70 70 5f 63 6f |ter stru|ct pp_co|
|00005810| 6e 66 69 67 20 2a 70 70 | 3b 0a 58 20 20 20 20 72 |nfig *pp|;.X r|
|00005820| 65 67 69 73 74 65 72 20 | 63 61 64 64 72 5f 74 09 |egister |caddr_t.|
|00005830| 20 20 20 20 62 75 66 3b | 0a 58 20 20 20 20 72 65 | buf;|.X re|
|00005840| 67 69 73 74 65 72 20 75 | 6e 73 69 67 6e 65 64 09 |gister u|nsigned.|
|00005850| 20 20 20 20 63 6f 75 6e | 74 3b 0a 58 0a 58 20 20 | coun|t;.X.X |
|00005860| 20 20 70 70 09 20 20 20 | 20 3d 20 26 70 70 5f 63 | pp. | = &pp_c|
|00005870| 6f 6e 66 69 67 5b 6d 69 | 6e 6f 72 28 64 65 76 29 |onfig[mi|nor(dev)|
|00005880| 5d 3b 0a 58 20 20 20 20 | 62 75 66 09 20 20 20 20 |];.X |buf. |
|00005890| 3d 20 70 70 2d 3e 62 75 | 66 3b 0a 58 0a 58 20 20 |= pp->bu|f;.X.X |
|000058a0| 20 20 44 45 42 55 47 28 | 70 72 69 6e 74 66 28 22 | DEBUG(|printf("|
|000058b0| 50 72 69 6e 74 20 74 6f | 74 61 6c 20 25 64 20 63 |Print to|tal %d c|
|000058c0| 68 61 72 73 20 66 72 6f | 6d 20 25 78 20 6f 6e 20 |hars fro|m %x on |
|000058d0| 2f 64 65 76 2f 70 70 25 | 64 5c 6e 22 2c 0a 58 09 |/dev/pp%|d\n",.X.|
|000058e0| 75 2e 75 5f 63 6f 75 6e | 74 2c 75 2e 75 5f 62 61 |u.u_coun|t,u.u_ba|
|000058f0| 73 65 2c 70 70 2d 70 70 | 5f 63 6f 6e 66 69 67 29 |se,pp-pp|_config)|
|00005900| 29 3b 0a 58 0a 58 20 20 | 20 20 66 6f 72 0a 58 20 |);.X.X | for.X |
|00005910| 20 20 20 28 0a 58 09 75 | 2e 75 5f 62 61 73 65 2c | (.X.u|.u_base,|
|00005920| 20 75 2e 75 5f 63 6f 75 | 6e 74 3b 0a 58 09 28 63 | u.u_cou|nt;.X.(c|
|00005930| 6f 75 6e 74 20 3d 20 6d | 69 6e 28 75 2e 75 5f 63 |ount = m|in(u.u_c|
|00005940| 6f 75 6e 74 2c 70 70 42 | 55 46 53 5a 29 29 20 21 |ount,ppB|UFSZ)) !|
|00005950| 3d 20 30 0a 58 09 20 20 | 20 20 26 26 20 63 6f 70 |= 0.X. | && cop|
|00005960| 79 69 6e 28 75 2e 75 5f | 62 61 73 65 2c 62 75 66 |yin(u.u_|base,buf|
|00005970| 2c 63 6f 75 6e 74 29 20 | 3d 3d 20 30 3b 0a 58 09 |,count) |== 0;.X.|
|00005980| 75 2e 75 5f 62 61 73 65 | 20 2b 3d 20 63 6f 75 6e |u.u_base| += coun|
|00005990| 74 2c 20 75 2e 75 5f 63 | 6f 75 6e 74 20 2d 3d 20 |t, u.u_c|ount -= |
|000059a0| 63 6f 75 6e 74 0a 58 20 | 20 20 20 29 0a 58 20 20 |count.X | ).X |
|000059b0| 20 20 7b 0a 58 09 44 45 | 42 55 47 28 70 72 69 6e | {.X.DE|BUG(prin|
|000059c0| 74 66 28 22 50 72 69 6e | 74 20 25 64 20 63 68 61 |tf("Prin|t %d cha|
|000059d0| 72 73 20 66 72 6f 6d 20 | 25 78 20 6f 6e 20 2f 64 |rs from |%x on /d|
|000059e0| 65 76 2f 70 70 25 64 5c | 6e 22 2c 0a 58 09 20 20 |ev/pp%d\|n",.X. |
|000059f0| 20 20 63 6f 75 6e 74 2c | 75 2e 75 5f 62 61 73 65 | count,|u.u_base|
|00005a00| 2c 70 70 2d 70 70 5f 63 | 6f 6e 66 69 67 29 29 3b |,pp-pp_c|onfig));|
|00005a10| 0a 58 09 70 70 62 75 66 | 77 72 69 74 65 28 70 70 |.X.ppbuf|write(pp|
|00005a20| 2c 62 75 66 2c 62 75 66 | 2b 63 6f 75 6e 74 29 3b |,buf,buf|+count);|
|00005a30| 0a 58 20 20 20 20 7d 0a | 58 7d 0a 45 4e 44 5f 4f |.X }.|X}.END_O|
|00005a40| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 37 |F_FILE.i|f test 7|
|00005a50| 34 35 32 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |452 -ne |`wc -c <|
|00005a60| 27 70 70 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |'pp.c'`;| then. |
|00005a70| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00005a80| 70 70 2e 63 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |pp.c'\" |unpacked|
|00005a90| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00005aa0| 21 0a 66 69 0a 63 68 6d | 6f 64 20 2b 78 20 27 70 |!.fi.chm|od +x 'p|
|00005ab0| 70 2e 63 27 0a 23 20 65 | 6e 64 20 6f 66 20 27 70 |p.c'.# e|nd of 'p|
|00005ac0| 70 2e 63 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |p.c'.fi.|if test |
|00005ad0| 2d 66 20 27 70 70 2e 68 | 27 20 2d 61 20 22 24 7b |-f 'pp.h|' -a "${|
|00005ae0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00005af0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00005b00| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00005b10| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00005b20| 5c 22 27 70 70 2e 68 27 | 5c 22 0a 65 6c 73 65 0a |\"'pp.h'|\".else.|
|00005b30| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00005b40| 63 74 69 6e 67 20 5c 22 | 27 70 70 2e 68 27 5c 22 |cting \"|'pp.h'\"|
|00005b50| 20 5c 28 32 36 39 32 20 | 63 68 61 72 61 63 74 65 | \(2692 |characte|
|00005b60| 72 73 5c 29 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |rs\).sed| "s/^X//|
|00005b70| 22 20 3e 27 70 70 2e 68 | 27 20 3c 3c 27 45 4e 44 |" >'pp.h|' <<'END|
|00005b80| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2f 2a 0a 58 20 |_OF_FILE|'.X/*.X |
|00005b90| 20 20 20 24 49 64 3a 20 | 70 70 2e 68 2c 76 20 32 | $Id: |pp.h,v 2|
|00005ba0| 2e 36 20 39 30 2f 30 38 | 2f 32 34 20 31 31 3a 34 |.6 90/08|/24 11:4|
|00005bb0| 39 3a 31 36 20 73 77 20 | 45 78 70 20 24 0a 58 2a |9:16 sw |Exp $.X*|
|00005bc0| 2f 0a 58 0a 58 2f 2a 0a | 58 20 20 20 20 22 43 6f |/.X.X/*.|X "Co|
|00005bd0| 70 79 72 69 67 68 74 20 | 31 39 39 30 20 50 69 65 |pyright |1990 Pie|
|00005be0| 72 63 61 72 6c 6f 20 47 | 72 61 6e 64 69 2e 20 41 |rcarlo G|randi. A|
|00005bf0| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|00005c00| 65 64 2e 22 3b 0a 58 2a | 2f 0a 58 0a 58 2f 2a 0a |ed.";.X*|/.X.X/*.|
|00005c10| 58 20 20 20 20 54 68 69 | 73 20 64 72 69 76 65 72 |X Thi|s driver|
|00005c20| 20 69 73 20 66 72 65 65 | 20 73 6f 66 74 77 61 72 | is free| softwar|
|00005c30| 65 3b 20 79 6f 75 20 63 | 61 6e 20 72 65 64 69 73 |e; you c|an redis|
|00005c40| 74 72 69 62 75 74 65 20 | 69 74 20 61 6e 64 2f 6f |tribute |it and/o|
|00005c50| 72 0a 58 20 20 20 20 6d | 6f 64 69 66 79 20 69 74 |r.X m|odify it|
|00005c60| 20 75 6e 64 65 72 20 74 | 68 65 20 74 65 72 6d 73 | under t|he terms|
|00005c70| 20 6f 66 20 74 68 65 20 | 47 4e 55 20 47 65 6e 65 | of the |GNU Gene|
|00005c80| 72 61 6c 20 50 75 62 6c | 69 63 20 4c 69 63 65 6e |ral Publ|ic Licen|
|00005c90| 73 65 20 61 73 0a 58 20 | 20 20 20 70 75 62 6c 69 |se as.X | publi|
|00005ca0| 73 68 65 64 20 62 79 20 | 74 68 65 20 46 72 65 65 |shed by |the Free|
|00005cb0| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|00005cc0| 74 69 6f 6e 3b 20 65 69 | 74 68 65 72 20 76 65 72 |tion; ei|ther ver|
|00005cd0| 73 69 6f 6e 20 31 2c 20 | 6f 72 0a 58 20 20 20 20 |sion 1, |or.X |
|00005ce0| 28 61 74 20 79 6f 75 72 | 20 6f 70 74 69 6f 6e 29 |(at your| option)|
|00005cf0| 20 61 6e 79 20 6c 61 74 | 65 72 20 76 65 72 73 69 | any lat|er versi|
|00005d00| 6f 6e 2e 0a 58 0a 58 20 | 20 20 20 41 73 20 61 20 |on..X.X | As a |
|00005d10| 73 70 65 63 69 61 6c 20 | 63 61 73 65 2c 20 74 68 |special |case, th|
|00005d20| 69 73 20 64 72 69 76 65 | 72 20 6d 61 79 20 62 65 |is drive|r may be|
|00005d30| 20 69 6e 63 6f 72 70 6f | 72 61 74 65 64 20 69 6e | incorpo|rated in|
|00005d40| 20 61 6e 79 20 4f 53 20 | 6b 65 72 6e 65 6c 2c 0a | any OS |kernel,.|
|00005d50| 58 20 20 20 20 77 68 65 | 74 68 65 72 20 74 68 65 |X whe|ther the|
|00005d60| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|00005d70| 6c 69 63 20 4c 69 63 65 | 6e 73 65 20 61 70 70 6c |lic Lice|nse appl|
|00005d80| 69 65 73 20 74 6f 20 69 | 74 20 6f 72 20 6e 6f 74 |ies to i|t or not|
|00005d90| 2e 0a 58 0a 58 20 20 20 | 20 54 68 69 73 20 64 72 |..X.X | This dr|
|00005da0| 69 76 65 72 20 69 73 20 | 64 69 73 74 72 69 62 75 |iver is |distribu|
|00005db0| 74 65 64 20 69 6e 20 74 | 68 65 20 68 6f 70 65 20 |ted in t|he hope |
|00005dc0| 74 68 61 74 20 69 74 20 | 77 69 6c 6c 20 62 65 20 |that it |will be |
|00005dd0| 75 73 65 66 75 6c 2c 0a | 58 20 20 20 20 62 75 74 |useful,.|X but|
|00005de0| 20 57 49 54 48 4f 55 54 | 20 41 4e 59 20 57 41 52 | WITHOUT| ANY WAR|
|00005df0| 52 41 4e 54 59 3b 20 77 | 69 74 68 6f 75 74 20 65 |RANTY; w|ithout e|
|00005e00| 76 65 6e 20 74 68 65 20 | 69 6d 70 6c 69 65 64 20 |ven the |implied |
|00005e10| 77 61 72 72 61 6e 74 79 | 20 6f 66 0a 58 20 20 20 |warranty| of.X |
|00005e20| 20 4d 45 52 43 48 41 4e | 54 41 42 49 4c 49 54 59 | MERCHAN|TABILITY|
|00005e30| 20 6f 72 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 | or FITN|ESS FOR |
|00005e40| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00005e50| 50 4f 53 45 2e 20 20 53 | 65 65 20 74 68 65 0a 58 |POSE. S|ee the.X|
|00005e60| 20 20 20 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 | GNU |General |
|00005e70| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 20 66 |Public L|icense f|
|00005e80| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 2e |or more |details.|
|00005e90| 0a 58 0a 58 20 20 20 20 | 59 6f 75 20 6d 61 79 20 |.X.X |You may |
|00005ea0| 68 61 76 65 20 72 65 63 | 65 69 76 65 64 20 61 20 |have rec|eived a |
|00005eb0| 63 6f 70 79 20 6f 66 20 | 74 68 65 20 47 4e 55 20 |copy of |the GNU |
|00005ec0| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00005ed0| 69 63 65 6e 73 65 0a 58 | 20 20 20 20 61 6c 6f 6e |icense.X| alon|
|00005ee0| 67 20 77 69 74 68 20 74 | 68 69 73 20 64 72 69 76 |g with t|his driv|
|00005ef0| 65 72 3b 20 69 66 20 6e | 6f 74 2c 20 77 72 69 74 |er; if n|ot, writ|
|00005f00| 65 20 74 6f 20 74 68 65 | 20 46 72 65 65 20 53 6f |e to the| Free So|
|00005f10| 66 74 77 61 72 65 0a 58 | 20 20 20 20 46 6f 75 6e |ftware.X| Foun|
|00005f20| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 2c 20 36 37 |dation, |Inc., 67|
|00005f30| 35 20 4d 61 73 73 20 41 | 76 65 2c 20 43 61 6d 62 |5 Mass A|ve, Camb|
|00005f40| 72 69 64 67 65 2c 20 4d | 41 20 30 32 31 33 39 2c |ridge, M|A 02139,|
|00005f50| 20 55 53 41 2e 0a 58 2a | 2f 0a 58 0a 58 2f 2a 0a | USA..X*|/.X.X/*.|
|00005f60| 58 20 20 20 20 53 74 61 | 74 75 73 20 70 6f 72 74 |X Sta|tus port|
|00005f70| 20 64 65 66 69 6e 65 73 | 0a 58 2a 2f 0a 58 0a 58 | defines|.X*/.X.X|
|00005f80| 23 64 65 66 69 6e 65 20 | 70 70 4e 4f 54 45 52 52 |#define |ppNOTERR|
|00005f90| 4f 52 09 30 78 30 38 09 | 2f 2a 20 4f 6e 6c 69 6e |OR.0x08.|/* Onlin|
|00005fa0| 65 2c 20 70 61 70 65 72 | 20 70 72 65 73 65 6e 74 |e, paper| present|
|00005fb0| 2c 20 4f 4b 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |, OK..*/|.X#defin|
|00005fc0| 65 20 70 70 4f 4e 4c 49 | 4e 45 09 30 78 31 30 09 |e ppONLI|NE.0x10.|
|00005fd0| 2f 2a 20 50 72 69 6e 74 | 65 72 20 69 73 20 6f 6e |/* Print|er is on|
|00005fe0| 6c 69 6e 65 09 09 09 2a | 2f 0a 58 23 64 65 66 69 |line...*|/.X#defi|
|00005ff0| 6e 65 20 70 70 4e 4f 50 | 41 50 45 52 09 30 78 32 |ne ppNOP|APER.0x2|
|00006000| 30 09 2f 2a 20 50 61 70 | 65 72 20 6d 69 73 73 69 |0./* Pap|er missi|
|00006010| 6e 67 09 09 09 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ng...*/.|X#define|
|00006020| 20 70 70 4e 4f 54 41 43 | 4b 09 30 78 34 30 09 2f | ppNOTAC|K.0x40./|
|00006030| 2a 20 44 61 74 61 20 68 | 61 76 65 20 62 65 65 6e |* Data h|ave been|
|00006040| 20 72 65 61 64 09 09 09 | 2a 2f 0a 58 23 64 65 66 | read...|*/.X#def|
|00006050| 69 6e 65 20 70 70 4e 4f | 54 42 55 53 59 09 30 78 |ine ppNO|TBUSY.0x|
|00006060| 38 30 09 2f 2a 20 49 6e | 74 65 72 66 61 63 65 20 |80./* In|terface |
|00006070| 72 65 61 64 79 09 09 09 | 2a 2f 0a 58 0a 58 2f 2a |ready...|*/.X.X/*|
|00006080| 0a 58 20 20 20 20 43 6f | 6e 74 72 6f 6c 20 70 6f |.X Co|ntrol po|
|00006090| 72 74 20 64 65 66 69 6e | 65 73 0a 58 2a 2f 0a 58 |rt defin|es.X*/.X|
|000060a0| 0a 58 23 64 65 66 69 6e | 65 20 70 70 53 54 52 4f |.X#defin|e ppSTRO|
|000060b0| 42 45 09 30 78 30 31 09 | 2f 2a 20 53 74 72 6f 62 |BE.0x01.|/* Strob|
|000060c0| 65 20 61 20 63 68 61 72 | 61 63 74 65 72 20 69 6e |e a char|acter in|
|000060d0| 09 09 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 70 70 |..*/.X#d|efine pp|
|000060e0| 41 55 54 4f 4c 46 09 30 | 78 30 32 09 2f 2a 20 45 |AUTOLF.0|x02./* E|
|000060f0| 6e 61 62 6c 65 20 61 75 | 74 6f 20 6c 69 6e 65 20 |nable au|to line |
|00006100| 66 65 65 64 09 09 2a 2f | 0a 58 23 64 65 66 69 6e |feed..*/|.X#defin|
|00006110| 65 20 70 70 4e 4f 54 52 | 45 53 45 54 09 30 78 30 |e ppNOTR|ESET.0x0|
|00006120| 34 09 2f 2a 20 4e 6f 72 | 6d 61 6c 20 6f 70 65 72 |4./* Nor|mal oper|
|00006130| 61 74 69 6f 6e 09 09 09 | 2a 2f 0a 58 23 64 65 66 |ation...|*/.X#def|
|00006140| 69 6e 65 20 70 70 53 45 | 4c 45 43 54 09 30 78 30 |ine ppSE|LECT.0x0|
|00006150| 38 09 2f 2a 20 50 75 74 | 20 74 68 65 20 70 72 69 |8./* Put| the pri|
|00006160| 6e 74 65 72 20 6f 6e 6c | 69 6e 65 09 09 2a 2f 0a |nter onl|ine..*/.|
|00006170| 58 23 64 65 66 69 6e 65 | 20 70 70 49 4e 54 45 52 |X#define| ppINTER|
|00006180| 52 55 50 54 09 30 78 31 | 30 09 2f 2a 20 53 65 6e |RUPT.0x1|0./* Sen|
|00006190| 64 20 69 6e 74 65 72 72 | 75 70 74 20 77 68 65 6e |d interr|upt when|
|000061a0| 20 4e 4f 54 41 43 4b 20 | 69 73 20 72 65 73 65 74 | NOTACK |is reset|
|000061b0| 09 2a 2f 0a 58 0a 58 23 | 69 66 64 65 66 20 49 4e |.*/.X.X#|ifdef IN|
|000061c0| 4b 45 52 4e 45 4c 0a 58 | 0a 58 2f 2a 0a 58 20 20 |KERNEL.X|.X/*.X |
|000061d0| 20 20 48 65 72 65 20 77 | 65 20 68 61 76 65 20 61 | Here w|e have a|
|000061e0| 20 64 69 66 66 69 63 75 | 6c 74 20 64 65 63 69 73 | difficu|lt decis|
|000061f0| 69 6f 6e 2e 20 57 65 20 | 77 61 6e 74 20 74 6f 20 |ion. We |want to |
|00006200| 63 6f 70 79 20 77 68 6f | 6c 65 20 63 68 75 6e 6b |copy who|le chunk|
|00006210| 73 20 6f 66 0a 58 20 20 | 20 20 75 73 65 72 20 63 |s of.X | user c|
|00006220| 68 61 72 61 63 74 65 72 | 73 20 74 6f 20 6b 65 72 |haracter|s to ker|
|00006230| 6e 65 6c 20 73 70 61 63 | 65 20 61 6e 64 20 74 68 |nel spac|e and th|
|00006240| 65 6e 20 70 75 73 68 20 | 74 68 65 6d 20 6f 75 74 |en push |them out|
|00006250| 20 6f 6e 65 20 62 79 20 | 6f 6e 65 0a 58 20 20 20 | one by |one.X |
|00006260| 20 74 6f 20 74 68 65 20 | 70 72 69 6e 74 65 72 2e | to the |printer.|
|00006270| 20 48 6f 77 20 6c 6f 6e | 67 20 74 68 65 73 65 20 | How lon|g these |
|00006280| 63 68 75 6e 6b 73 20 73 | 68 6f 75 6c 64 20 62 65 |chunks s|hould be|
|00006290| 2c 20 69 2e 65 2e 20 68 | 6f 77 20 6d 75 63 68 0a |, i.e. h|ow much.|
|000062a0| 58 20 20 20 20 62 75 66 | 66 65 72 20 73 70 61 63 |X buf|fer spac|
|000062b0| 65 20 73 68 6f 75 6c 64 | 20 77 65 20 63 6f 6e 73 |e should| we cons|
|000062c0| 75 6d 65 3f 20 53 68 6f | 75 6c 64 20 69 74 20 62 |ume? Sho|uld it b|
|000062d0| 65 20 72 65 73 65 72 76 | 65 64 20 73 74 61 74 69 |e reserv|ed stati|
|000062e0| 63 61 6c 6c 79 20 6f 72 | 0a 58 20 20 20 20 64 79 |cally or|.X dy|
|000062f0| 6e 61 6d 69 63 61 6c 6c | 79 3f 20 48 65 72 65 20 |namicall|y? Here |
|00006300| 79 6f 75 20 68 61 76 65 | 20 74 77 6f 20 63 68 6f |you have| two cho|
|00006310| 69 63 65 73 2e 20 45 69 | 74 68 65 72 20 79 6f 75 |ices. Ei|ther you|
|00006320| 20 72 65 73 65 72 76 65 | 20 61 20 73 74 61 74 69 | reserve| a stati|
|00006330| 63 0a 58 20 20 20 20 62 | 75 66 66 65 72 20 6f 66 |c.X b|uffer of|
|00006340| 20 74 68 65 20 69 6e 64 | 69 63 61 74 65 64 20 73 | the ind|icated s|
|00006350| 69 7a 65 20 28 74 79 70 | 69 63 61 6c 6c 79 20 61 |ize (typ|ically a|
|00006360| 20 73 6d 61 6c 6c 20 6f | 6e 65 29 2c 20 6f 72 20 | small o|ne), or |
|00006370| 77 65 20 77 69 6c 6c 0a | 58 20 20 20 20 72 65 73 |we will.|X res|
|00006380| 65 72 76 65 20 61 20 62 | 6c 6f 63 6b 20 63 61 63 |erve a b|lock cac|
|00006390| 68 65 20 62 75 66 66 65 | 72 20 64 79 6e 61 6d 69 |he buffe|r dynami|
|000063a0| 63 61 6c 6c 79 20 69 66 | 20 74 68 69 73 20 69 73 |cally if| this is|
|000063b0| 20 7a 65 72 6f 2e 0a 58 | 2a 2f 0a 58 0a 58 23 64 | zero..X|*/.X.X#d|
|000063c0| 65 66 69 6e 65 20 70 70 | 53 54 41 54 49 43 53 5a |efine pp|STATICSZ|
|000063d0| 09 31 32 38 09 2f 2a 20 | 4f 74 68 65 72 20 67 6f |.128./* |Other go|
|000063e0| 6f 64 20 76 61 6c 75 65 | 73 3a 20 31 32 38 2c 20 |od value|s: 128, |
|000063f0| 32 35 36 09 09 2a 2f 0a | 58 0a 58 73 74 72 75 63 |256..*/.|X.Xstruc|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.