home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| Mailbox text, 1st line "From andyb@wndrsvr.la.ca.us Fri Jun 5 11:04:08 1992", ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| x-fmt/111 Plain Text File
| default
| |
100%
| detectItEasy
| Format: Plain text[LF]
| default
| |
100%
| xdgMime
| application/mbox
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 61 6e 64 | 79 62 40 77 6e 64 72 73 |From and|yb@wndrs|
|00000010| 76 72 2e 6c 61 2e 63 61 | 2e 75 73 20 46 72 69 20 |vr.la.ca|.us Fri |
|00000020| 4a 75 6e 20 20 35 20 31 | 31 3a 30 34 3a 30 38 20 |Jun 5 1|1:04:08 |
|00000030| 31 39 39 32 0a 44 61 74 | 65 3a 20 54 68 75 2c 20 |1992.Dat|e: Thu, |
|00000040| 34 20 4a 75 6e 20 39 32 | 20 32 30 3a 30 38 3a 34 |4 Jun 92| 20:08:4|
|00000050| 30 20 50 44 54 0a 46 72 | 6f 6d 3a 20 41 6e 64 79 |0 PDT.Fr|om: Andy|
|00000060| 20 42 72 61 67 65 72 20 | 3c 61 6e 64 79 62 40 77 | Brager |<andyb@w|
|00000070| 6e 64 72 73 76 72 2e 6c | 61 2e 63 61 2e 75 73 3e |ndrsvr.l|a.ca.us>|
|00000080| 0a 54 6f 3a 20 4c 61 75 | 72 65 6e 63 65 20 4c 75 |.To: Lau|rence Lu|
|00000090| 6e 64 62 6c 61 64 65 20 | 3c 6c 67 6c 40 63 61 63 |ndblade |<lgl@cac|
|000000a0| 2e 77 61 73 68 69 6e 67 | 74 6f 6e 2e 65 64 75 3e |.washing|ton.edu>|
|000000b0| 0a 53 75 62 6a 65 63 74 | 3a 20 52 65 3a 20 70 6f |.Subject|: Re: po|
|000000c0| 72 74 20 74 6f 20 53 79 | 73 74 65 6d 20 56 20 63 |rt to Sy|stem V c|
|000000d0| 6f 6d 70 6c 65 74 65 0a | 0a 3e 20 49 27 76 65 20 |omplete.|.> I've |
|000000e0| 74 61 63 6b 65 64 20 6f | 6e 20 74 68 65 20 52 61 |tacked o|n the Ra|
|000000f0| 77 28 29 20 66 75 6e 63 | 74 69 6f 6e 20 77 65 20 |w() func|tion we |
|00000100| 61 72 65 20 75 73 69 6e | 67 20 69 6e 20 50 69 6e |are usin|g in Pin|
|00000110| 65 20 6e 6f 77 2e 20 28 | 49 74 27 73 20 74 61 63 |e now. (|It's tac|
|00000120| 6b 65 64 20 6f 6e 20 61 | 73 20 61 0a 3e 20 4d 49 |ked on a|s a.> MI|
|00000130| 4d 45 20 61 74 74 61 63 | 68 6d 65 6e 74 2c 20 62 |ME attac|hment, b|
|00000140| 75 74 20 49 27 6d 20 73 | 75 72 65 20 79 6f 75 20 |ut I'm s|ure you |
|00000150| 63 61 6e 20 65 78 74 72 | 61 63 74 20 69 74 20 77 |can extr|act it w|
|00000160| 69 74 68 6f 75 74 20 4d | 49 4d 45 2e 29 20 49 74 |ithout M|IME.) It|
|00000170| 20 73 75 70 70 6f 72 74 | 73 20 74 68 65 0a 3e 20 | support|s the.> |
|00000180| 72 65 67 75 6c 61 72 20 | 74 65 72 6d 69 6f 20 61 |regular |termio a|
|00000190| 6e 64 20 74 68 65 20 74 | 65 72 6d 69 6f 20 62 61 |nd the t|ermio ba|
|000001a0| 73 65 64 20 6f 6e 20 73 | 74 72 65 61 6d 73 2e 20 |sed on s|treams. |
|000001b0| 49 20 64 69 64 6e 27 74 | 20 61 63 74 75 61 6c 6c |I didn't| actuall|
|000001c0| 79 20 64 6f 20 74 68 65 | 20 70 6f 72 74 2c 0a 3e |y do the| port,.>|
|000001d0| 20 62 75 74 20 6c 6f 6f | 6b 73 20 6c 69 6b 65 20 | but loo|ks like |
|000001e0| 74 68 65 79 27 76 65 20 | 74 75 72 6e 65 64 20 6f |they've |turned o|
|000001f0| 66 66 20 61 6c 6c 20 74 | 68 65 20 73 69 67 6e 61 |ff all t|he signa|
|00000200| 6c 73 20 77 69 74 68 20 | 7e 49 53 49 47 2e 0a 0a |ls with |~ISIG...|
|00000210| 55 68 20 6f 68 2e 20 20 | 49 53 49 47 20 64 6f 65 |Uh oh. |ISIG doe|
|00000220| 73 20 6e 6f 74 20 6c 6f | 6f 6b 20 66 61 6d 69 6c |s not lo|ok famil|
|00000230| 61 72 20 74 6f 20 6d 65 | 2e 20 20 49 73 20 74 68 |ar to me|. Is th|
|00000240| 69 73 20 66 6f 72 20 53 | 79 73 56 34 3f 20 20 49 |is for S|ysV4? I|
|00000250| 20 68 61 76 65 20 53 79 | 73 56 33 2e 0a 0a 3e 20 | have Sy|sV3...> |
|00000260| 49 20 73 75 67 67 65 73 | 74 20 79 6f 75 20 67 65 |I sugges|t you ge|
|00000270| 74 20 74 68 65 20 73 74 | 75 66 66 20 74 6f 20 75 |t the st|uff to u|
|00000280| 73 20 61 73 20 73 6f 6f | 6e 20 61 73 20 70 6f 73 |s as soo|n as pos|
|00000290| 73 69 62 6c 65 2c 20 77 | 65 20 69 6e 74 65 67 72 |sible, w|e integr|
|000002a0| 61 74 65 20 69 74 20 61 | 6e 64 20 79 6f 75 0a 3e |ate it a|nd you.>|
|000002b0| 20 63 6f 6e 74 69 6e 75 | 65 20 77 6f 72 6b 20 6f | continu|e work o|
|000002c0| 6e 20 61 20 70 72 65 2d | 72 65 6c 65 61 73 65 20 |n a pre-|release |
|000002d0| 6f 66 20 50 69 6e 65 20 | 33 2e 30 2e 20 59 6f 75 |of Pine |3.0. You|
|000002e0| 20 61 72 65 20 61 6c 73 | 6f 20 77 65 6c 63 6f 6d | are als|o welcom|
|000002f0| 65 20 74 6f 20 67 72 61 | 62 20 74 68 65 0a 0a 49 |e to gra|b the..I|
|00000300| 20 61 6d 20 69 6e 63 6c | 75 64 69 6e 67 20 61 6c | am incl|uding al|
|00000310| 6c 20 74 68 65 20 70 69 | 63 6f 20 66 69 6c 65 73 |l the pi|co files|
|00000320| 2e 20 20 4c 65 74 20 6d | 65 20 6b 6e 6f 77 20 69 |. Let m|e know i|
|00000330| 66 20 74 68 65 72 65 20 | 69 73 20 61 20 70 72 6f |f there |is a pro|
|00000340| 62 6c 65 6d 20 0a 70 61 | 74 63 68 69 6e 67 20 74 |blem .pa|tching t|
|00000350| 68 65 6d 20 69 6e 2e 20 | 20 49 27 6d 20 6e 6f 74 |hem in. | I'm not|
|00000360| 20 73 75 72 65 20 74 68 | 61 74 20 49 20 64 69 64 | sure th|at I did|
|00000370| 20 74 68 65 20 63 6f 72 | 72 65 63 74 20 64 69 66 | the cor|rect dif|
|00000380| 66 2e 20 20 50 6c 65 61 | 73 65 20 6c 65 74 20 0a |f. Plea|se let .|
|00000390| 6d 65 20 6b 6e 6f 77 20 | 69 66 20 69 74 20 77 6f |me know |if it wo|
|000003a0| 72 6b 73 20 61 6e 64 20 | 49 27 6c 6c 20 73 68 69 |rks and |I'll shi|
|000003b0| 70 20 79 6f 75 20 74 68 | 65 20 72 65 73 74 20 28 |p you th|e rest (|
|000003c0| 70 69 6e 65 20 61 6e 64 | 20 63 2d 63 6c 69 65 6e |pine and| c-clien|
|000003d0| 74 29 2e 0a 0a 0a 3e 20 | 4f 6e 20 74 68 65 20 73 |t)....> |On the s|
|000003e0| 69 67 6e 61 74 75 72 65 | 73 2c 20 6d 79 20 73 69 |ignature|s, my si|
|000003f0| 67 6e 61 74 75 72 65 20 | 69 73 20 73 75 70 70 6f |gnature |is suppo|
|00000400| 73 65 64 20 74 6f 20 62 | 65 20 6a 75 73 74 20 61 |sed to b|e just a|
|00000410| 66 74 65 72 20 74 68 69 | 73 20 70 61 72 61 67 72 |fter thi|s paragr|
|00000420| 61 70 68 0a 3e 20 61 6e | 64 20 62 65 66 6f 72 65 |aph.> an|d before|
|00000430| 20 79 6f 75 72 20 69 6e | 63 6c 75 64 65 64 20 6d | your in|cluded m|
|00000440| 65 73 73 61 67 65 2e 20 | 54 68 61 74 20 69 73 20 |essage. |That is |
|00000450| 62 65 63 61 75 73 65 20 | 49 20 73 74 61 72 74 65 |because |I starte|
|00000460| 64 20 74 79 70 69 6e 67 | 20 62 65 66 6f 72 65 20 |d typing| before |
|00000470| 74 68 65 0a 3e 20 73 69 | 67 6e 61 74 75 72 65 2e |the.> si|gnature.|
|00000480| 20 54 68 65 20 73 69 74 | 75 61 74 69 6f 6e 20 77 | The sit|uation w|
|00000490| 68 65 72 65 20 74 68 69 | 73 20 64 6f 65 73 6e 27 |here thi|s doesn'|
|000004a0| 74 20 77 6f 72 6b 20 69 | 73 20 77 68 65 6e 20 79 |t work i|s when y|
|000004b0| 6f 75 20 69 6e 74 65 72 | 73 70 65 72 73 65 20 74 |ou inter|sperse t|
|000004c0| 68 65 0a 3e 20 72 65 70 | 6c 79 20 69 6e 20 74 68 |he.> rep|ly in th|
|000004d0| 65 20 6f 72 69 67 69 6e | 61 6c 20 6d 65 73 73 61 |e origin|al messa|
|000004e0| 67 65 20 6c 69 6b 65 20 | 79 6f 75 20 64 69 64 2e |ge like |you did.|
|000004f0| 20 54 68 65 6e 20 69 74 | 20 77 69 6e 64 20 75 70 | Then it| wind up|
|00000500| 20 6f 6e 20 74 6f 70 2c | 20 77 68 69 63 68 20 69 | on top,| which i|
|00000510| 73 0a 3e 20 63 6c 65 61 | 72 6c 79 20 74 68 65 20 |s.> clea|rly the |
|00000520| 77 72 6f 6e 67 20 70 6c | 61 63 65 2e 20 49 6e 20 |wrong pl|ace. In |
|00000530| 50 69 6e 65 20 32 2e 32 | 38 20 74 68 65 72 65 27 |Pine 2.2|8 there'|
|00000540| 73 20 61 6e 20 6f 70 74 | 69 6f 6e 20 79 6f 75 20 |s an opt|ion you |
|00000550| 63 61 6e 20 73 65 74 20 | 69 6e 20 74 68 65 0a 0a |can set |in the..|
|00000560| 48 6d 6d 6d 2e 20 20 49 | 27 6d 20 6e 6f 74 20 74 |Hmmm. I|'m not t|
|00000570| 68 61 74 27 73 20 74 68 | 65 20 70 72 6f 62 6c 65 |hat's th|e proble|
|00000580| 6d 2e 2e 2e 20 20 57 68 | 65 6e 20 49 20 73 74 61 |m... Wh|en I sta|
|00000590| 72 74 65 64 20 74 79 70 | 69 6e 67 2c 20 74 68 65 |rted typ|ing, the|
|000005a0| 20 2e 73 69 67 0a 77 61 | 73 20 61 62 6f 76 65 20 | .sig.wa|s above |
|000005b0| 77 68 65 72 65 20 49 20 | 73 74 61 72 74 65 64 20 |where I |started |
|000005c0| 74 79 70 69 6e 67 20 62 | 65 63 61 75 73 65 20 74 |typing b|ecause t|
|000005d0| 68 61 74 27 73 20 77 68 | 65 72 65 20 74 68 65 20 |hat's wh|ere the |
|000005e0| 63 75 72 73 6f 72 20 65 | 6e 64 65 64 0a 75 70 2e |cursor e|nded.up.|
|000005f0| 20 20 49 20 68 6f 70 65 | 20 74 68 65 20 61 6c 74 | I hope| the alt|
|00000600| 65 72 6e 61 74 65 20 65 | 64 69 74 6f 72 20 73 75 |ernate e|ditor su|
|00000610| 70 70 6f 72 74 20 69 73 | 20 6e 65 61 72 69 6e 67 |pport is| nearing|
|00000620| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 2c 20 61 73 20 | complet|ion, as |
|00000630| 49 27 6d 0a 70 72 65 74 | 74 79 20 6d 75 63 68 20 |I'm.pret|ty much |
|00000640| 61 20 64 69 65 2d 68 61 | 72 64 20 76 69 20 66 61 |a die-ha|rd vi fa|
|00000650| 6e 2e 20 20 43 61 6e 20 | 49 20 73 75 67 67 65 73 |n. Can |I sugges|
|00000660| 74 20 61 6e 20 65 6e 68 | 61 6e 63 65 6d 65 6e 74 |t an enh|ancement|
|00000670| 20 66 6f 72 20 70 69 63 | 6f 3f 0a 47 69 76 65 20 | for pic|o?.Give |
|00000680| 69 74 20 62 6c 6f 63 6b | 20 63 6f 70 79 69 6e 67 |it block| copying|
|00000690| 2c 20 63 75 74 2c 20 70 | 61 73 74 65 20 61 6e 64 |, cut, p|aste and|
|000006a0| 20 6d 6f 76 65 20 63 61 | 70 61 62 69 6c 69 74 69 | move ca|pabiliti|
|000006b0| 65 73 2e 20 20 4c 61 63 | 6b 20 6f 66 20 74 68 61 |es. Lac|k of tha|
|000006c0| 74 20 0a 64 72 69 76 65 | 73 20 6d 65 20 6e 75 74 |t .drive|s me nut|
|000006d0| 73 2e 0a 0a 3e 20 2e 70 | 69 6e 65 72 63 20 74 6f |s...> .p|inerc to|
|000006e0| 20 68 61 76 65 20 69 74 | 20 61 74 20 74 68 65 20 | have it| at the |
|000006f0| 62 6f 74 74 6f 6d 2e 20 | 57 65 20 66 69 67 75 72 |bottom. |We figur|
|00000700| 65 20 69 74 20 64 65 70 | 65 6e 64 73 20 6f 6e 20 |e it dep|ends on |
|00000710| 77 68 65 74 68 65 72 20 | 79 6f 75 20 64 6f 20 6d |whether |you do m|
|00000720| 6f 72 65 0a 3e 20 69 6e | 74 65 72 73 70 65 72 73 |ore.> in|terspers|
|00000730| 65 64 20 72 65 70 6c 69 | 65 73 2c 20 6f 72 20 6d |ed repli|es, or m|
|00000740| 6f 72 65 20 72 65 70 6c | 69 65 73 20 6c 69 6b 65 |ore repl|ies like|
|00000750| 20 74 68 69 73 20 6f 6e | 65 2e 0a 0a 49 20 77 6f | this on|e...I wo|
|00000760| 6e 64 65 72 20 69 66 20 | 79 6f 75 27 72 65 20 74 |nder if |you're t|
|00000770| 72 79 69 6e 67 20 74 6f | 20 74 65 6c 6c 20 6d 65 |rying to| tell me|
|00000780| 20 74 68 61 74 20 70 69 | 6e 65 20 77 69 6c 6c 20 | that pi|ne will |
|00000790| 72 65 66 6f 72 6d 61 74 | 20 61 66 74 65 72 20 49 |reformat| after I|
|000007a0| 0a 6c 65 61 76 65 20 74 | 68 65 20 65 64 69 74 6f |.leave t|he edito|
|000007b0| 72 3f 20 20 54 68 61 74 | 27 73 20 74 68 65 20 6f |r? That|'s the o|
|000007c0| 6e 6c 79 20 77 61 79 20 | 49 20 63 6f 75 6c 64 20 |nly way |I could |
|000007d0| 75 6e 64 65 72 73 74 61 | 6e 64 20 69 74 20 77 6f |understa|nd it wo|
|000007e0| 72 6b 69 6e 67 0a 74 68 | 65 20 77 61 79 20 79 6f |rking.th|e way yo|
|000007f0| 75 20 64 65 73 63 72 69 | 62 65 2e 20 20 47 75 65 |u descri|be. Gue|
|00000800| 73 73 20 49 27 6c 6c 20 | 68 61 76 65 20 74 6f 20 |ss I'll |have to |
|00000810| 65 78 70 65 72 69 6d 65 | 6e 74 20 6d 6f 72 65 2e |experime|nt more.|
|00000820| 20 20 0a 0a 48 65 72 65 | 27 73 20 61 6c 6c 20 74 | ..Here|'s all t|
|00000830| 68 65 20 70 69 63 6f 20 | 64 69 66 66 73 2e 20 20 |he pico |diffs. |
|00000840| 4e 6f 74 65 20 74 68 61 | 74 20 49 20 74 72 69 65 |Note tha|t I trie|
|00000850| 64 20 74 6f 20 6d 61 6b | 65 20 6f 6e 6c 79 20 6e |d to mak|e only n|
|00000860| 65 63 65 73 73 61 72 79 | 20 63 68 61 6e 67 65 73 |ecessary| changes|
|00000870| 0a 65 78 63 65 70 74 20 | 69 6e 20 70 6c 61 63 65 |.except |in place|
|00000880| 73 20 77 68 65 72 65 20 | 49 20 68 61 64 20 74 6f |s where |I had to|
|00000890| 20 63 68 61 6e 67 65 20 | 76 61 72 69 61 62 6c 65 | change |variable|
|000008a0| 20 6e 61 6d 65 73 20 66 | 72 6f 6d 20 73 69 6e 67 | names f|rom sing|
|000008b0| 6c 65 20 63 68 61 72 73 | 0a 74 6f 20 64 6f 75 62 |le chars|.to doub|
|000008c0| 6c 65 20 63 68 61 72 73 | 20 73 6f 20 49 20 63 6f |le chars| so I co|
|000008d0| 75 6c 64 20 75 73 65 20 | 73 64 62 2e 20 20 20 41 |uld use |sdb. A|
|000008e0| 20 6d 61 6b 65 66 69 6c | 65 20 66 6f 72 20 69 73 | makefil|e for is|
|000008f0| 63 20 69 73 20 61 6c 73 | 6f 20 69 6e 63 6c 75 64 |c is als|o includ|
|00000900| 65 64 2e 0a 53 6f 72 72 | 79 20 49 20 64 69 64 6e |ed..Sorr|y I didn|
|00000910| 27 74 20 63 6f 6d 70 72 | 65 73 73 20 74 68 69 73 |'t compr|ess this|
|00000920| 20 73 74 75 66 66 2c 20 | 49 27 6d 20 69 6e 20 61 | stuff, |I'm in a|
|00000930| 20 68 75 72 72 79 20 74 | 68 65 73 65 20 64 61 79 | hurry t|hese day|
|00000940| 73 20 61 6e 64 20 74 68 | 69 73 20 0a 77 61 73 20 |s and th|is .was |
|00000950| 65 61 73 69 65 73 74 20 | 72 69 67 68 74 20 6e 6f |easiest |right no|
|00000960| 77 2e 0a 0a 2d 20 20 41 | 6e 64 79 0a 0a 2a 2a 2a |w...- A|ndy..***|
|00000970| 20 6f 73 5f 75 6e 69 78 | 2e 63 09 54 68 75 20 4a | os_unix|.c.Thu J|
|00000980| 75 6e 20 20 34 20 31 39 | 3a 34 32 3a 33 39 20 31 |un 4 19|:42:39 1|
|00000990| 39 39 32 0a 2d 2d 2d 20 | 6e 65 77 2f 6f 73 5f 75 |992.--- |new/os_u|
|000009a0| 6e 69 78 2e 63 09 46 72 | 69 20 4d 61 79 20 32 39 |nix.c.Fr|i May 29|
|000009b0| 20 31 36 3a 34 39 3a 31 | 33 20 31 39 39 32 0a 2a | 16:49:1|3 1992.*|
|000009c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0a 2a |********|******.*|
|000009d0| 2a 2a 20 31 2c 37 20 2a | 2a 2a 2a 0a 21 20 73 74 |** 1,7 *|***.! st|
|000009e0| 61 74 69 63 20 63 68 61 | 72 20 72 63 73 69 64 5b |atic cha|r rcsid[|
|000009f0| 5d 20 3d 20 22 24 49 64 | 3a 20 6f 73 5f 75 6e 69 |] = "$Id|: os_uni|
|00000a00| 78 2e 63 2c 76 20 31 2e | 31 20 31 39 39 32 2f 30 |x.c,v 1.|1 1992/0|
|00000a10| 34 2f 32 37 20 32 30 3a | 31 32 3a 33 32 20 61 6e |4/27 20:|12:32 an|
|00000a20| 64 79 62 20 45 78 70 20 | 24 22 3b 0a 20 20 0a 20 |dyb Exp |$";. . |
|00000a30| 20 23 69 66 64 65 66 20 | 43 4f 4d 4d 45 4e 54 0a | #ifdef |COMMENT.|
|00000a40| 20 20 24 4c 6f 67 3a 20 | 6f 73 5f 75 6e 69 78 2e | $Log: |os_unix.|
|00000a50| 63 2c 76 20 24 0a 20 20 | 20 2a 20 52 65 76 69 73 |c,v $. | * Revis|
|00000a60| 69 6f 6e 20 31 2e 31 20 | 20 31 39 39 32 2f 30 34 |ion 1.1 | 1992/04|
|00000a70| 2f 32 37 20 20 32 30 3a | 31 32 3a 33 32 20 20 61 |/27 20:|12:32 a|
|00000a80| 6e 64 79 62 0a 20 20 20 | 2a 20 49 6e 69 74 69 61 |ndyb. |* Initia|
|00000a90| 6c 20 72 65 76 69 73 69 | 6f 6e 0a 20 20 20 2a 0a |l revisi|on. *.|
|00000aa0| 2d 2d 2d 20 31 2c 31 30 | 20 2d 2d 2d 2d 0a 21 20 |--- 1,10| ----.! |
|00000ab0| 73 74 61 74 69 63 20 63 | 68 61 72 20 72 63 73 69 |static c|har rcsi|
|00000ac0| 64 5b 5d 20 3d 20 22 24 | 49 64 3a 20 6f 73 5f 75 |d[] = "$|Id: os_u|
|00000ad0| 6e 69 78 2e 63 2c 76 20 | 31 2e 32 20 31 39 39 32 |nix.c,v |1.2 1992|
|00000ae0| 2f 30 34 2f 32 37 20 32 | 30 3a 35 35 3a 30 32 20 |/04/27 2|0:55:02 |
|00000af0| 61 6e 64 79 62 20 45 78 | 70 20 61 6e 64 79 62 20 |andyb Ex|p andyb |
|00000b00| 24 22 3b 0a 20 20 0a 20 | 20 23 69 66 64 65 66 20 |$";. . | #ifdef |
|00000b10| 43 4f 4d 4d 45 4e 54 0a | 20 20 24 4c 6f 67 3a 20 |COMMENT.| $Log: |
|00000b20| 6f 73 5f 75 6e 69 78 2e | 63 2c 76 20 24 0a 2b 20 |os_unix.|c,v $.+ |
|00000b30| 20 2a 20 52 65 76 69 73 | 69 6f 6e 20 31 2e 32 20 | * Revis|ion 1.2 |
|00000b40| 20 31 39 39 32 2f 30 34 | 2f 32 37 20 20 32 30 3a | 1992/04|/27 20:|
|00000b50| 35 35 3a 30 32 20 20 61 | 6e 64 79 62 0a 2b 20 20 |55:02 a|ndyb.+ |
|00000b60| 2a 20 4d 6f 64 69 66 69 | 63 61 74 69 6f 6e 73 20 |* Modifi|cations |
|00000b70| 66 6f 72 20 49 53 43 20 | 55 6e 69 78 2e 0a 2b 20 |for ISC |Unix..+ |
|00000b80| 20 2a 0a 20 20 20 2a 20 | 52 65 76 69 73 69 6f 6e | *. * |Revision|
|00000b90| 20 31 2e 31 20 20 31 39 | 39 32 2f 30 34 2f 32 37 | 1.1 19|92/04/27|
|00000ba0| 20 20 32 30 3a 31 32 3a | 33 32 20 20 61 6e 64 79 | 20:12:|32 andy|
|00000bb0| 62 0a 20 20 20 2a 20 49 | 6e 69 74 69 61 6c 20 72 |b. * I|nitial r|
|00000bc0| 65 76 69 73 69 6f 6e 0a | 20 20 20 2a 0a 2a 2a 2a |evision.| *.***|
|00000bd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 0a 2a 2a 2a |********|****.***|
|00000be0| 20 35 33 2c 36 32 20 2a | 2a 2a 2a 0a 20 20 23 69 | 53,62 *|***. #i|
|00000bf0| 6e 63 6c 75 64 65 20 20 | 20 20 20 20 20 20 22 65 |nclude | "e|
|00000c00| 64 65 66 2e 68 22 0a 20 | 20 23 69 6e 63 6c 75 64 |def.h". | #includ|
|00000c10| 65 20 20 20 20 20 20 20 | 20 22 70 69 63 6f 2e 68 |e | "pico.h|
|00000c20| 22 0a 20 20 0a 21 20 23 | 69 6e 63 6c 75 64 65 20 |". .! #|include |
|00000c30| 20 20 20 20 20 20 20 3c | 73 67 74 74 79 2e 68 3e | <|sgtty.h>|
|00000c40| 20 20 20 20 20 20 20 20 | 2f 2a 20 66 6f 72 20 73 | |/* for s|
|00000c50| 74 74 79 2f 67 74 74 79 | 20 66 75 6e 63 74 69 6f |tty/gtty| functio|
|00000c60| 6e 73 20 2a 2f 0a 20 20 | 0a 20 20 73 74 72 75 63 |ns */. |. struc|
|00000c70| 74 20 20 73 67 74 74 79 | 62 20 20 6f 73 74 61 74 |t sgtty|b ostat|
|00000c80| 65 3b 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 73 |e; | /* s|
|00000c90| 61 76 65 64 20 74 74 79 | 20 73 74 61 74 65 20 2a |aved tty| state *|
|00000ca0| 2f 0a 20 20 73 74 72 75 | 63 74 20 20 73 67 74 74 |/. stru|ct sgtt|
|00000cb0| 79 62 20 20 6e 73 74 61 | 74 65 3b 20 20 20 20 20 |yb nsta|te; |
|00000cc0| 20 20 20 20 20 2f 2a 20 | 76 61 6c 75 65 73 20 66 | /* |values f|
|00000cd0| 6f 72 20 65 64 69 74 6f | 72 20 6d 6f 64 65 20 2a |or edito|r mode *|
|00000ce0| 2f 0a 20 20 73 74 72 75 | 63 74 20 74 63 68 61 72 |/. stru|ct tchar|
|00000cf0| 73 09 6f 74 63 68 61 72 | 73 3b 09 2f 2a 20 53 61 |s.otchar|s;./* Sa|
|00000d00| 76 65 64 20 74 65 72 6d | 69 6e 61 6c 20 73 70 65 |ved term|inal spe|
|00000d10| 63 69 61 6c 20 63 68 61 | 72 61 63 74 65 72 20 73 |cial cha|racter s|
|00000d20| 65 74 20 2a 2f 0a 20 20 | 73 74 72 75 63 74 20 74 |et */. |struct t|
|00000d30| 63 68 61 72 73 09 6e 74 | 63 68 61 72 73 20 3d 20 |chars.nt|chars = |
|00000d40| 7b 20 30 78 66 66 2c 20 | 30 78 66 66 2c 20 30 78 |{ 0xff, |0xff, 0x|
|00000d50| 66 66 2c 20 30 78 66 66 | 2c 20 30 78 66 66 2c 20 |ff, 0xff|, 0xff, |
|00000d60| 30 78 66 66 20 7d 3b 0a | 20 20 09 09 09 09 2f 2a |0xff };.| ..../*|
|00000d70| 20 41 20 6c 6f 74 20 6f | 66 20 6e 6f 74 68 69 6e | A lot o|f nothin|
|00000d80| 67 20 2a 2f 0a 2d 2d 2d | 20 35 36 2c 39 39 20 2d |g */.---| 56,99 -|
|00000d90| 2d 2d 2d 0a 20 20 23 69 | 6e 63 6c 75 64 65 20 20 |---. #i|nclude |
|00000da0| 20 20 20 20 20 20 22 65 | 64 65 66 2e 68 22 0a 20 | "e|def.h". |
|00000db0| 20 23 69 6e 63 6c 75 64 | 65 20 20 20 20 20 20 20 | #includ|e |
|00000dc0| 20 22 70 69 63 6f 2e 68 | 22 0a 20 20 0a 21 20 23 | "pico.h|". .! #|
|00000dd0| 69 66 64 65 66 20 49 53 | 43 0a 21 20 23 69 6e 63 |ifdef IS|C.! #inc|
|00000de0| 6c 75 64 65 09 3c 74 65 | 72 6d 69 6f 2e 68 3e 09 |lude.<te|rmio.h>.|
|00000df0| 2f 2a 20 46 6f 72 20 54 | 49 4f 43 47 45 54 43 20 |/* For T|IOCGETC |
|00000e00| 61 6e 64 20 66 72 69 65 | 6e 64 73 20 20 2a 2f 0a |and frie|nds */.|
|00000e10| 21 20 23 69 6e 63 6c 75 | 64 65 20 20 20 20 20 20 |! #inclu|de |
|00000e20| 20 20 3c 73 79 73 2f 74 | 74 6f 6c 64 2e 68 3e 20 | <sys/t|told.h> |
|00000e30| 20 20 20 20 20 20 20 2f | 2a 20 66 6f 72 20 73 74 | /|* for st|
|00000e40| 74 79 2f 67 74 74 79 20 | 66 75 6e 63 74 69 6f 6e |ty/gtty |function|
|00000e50| 73 20 2a 2f 0a 21 20 23 | 69 6e 63 6c 75 64 65 20 |s */.! #|include |
|00000e60| 09 3c 73 79 73 2f 73 69 | 6f 63 74 6c 2e 68 3e 09 |.<sys/si|octl.h>.|
|00000e70| 2f 2a 20 73 6f 63 6b 65 | 74 73 3b 20 6e 65 65 64 |/* socke|ts; need|
|00000e80| 20 66 6f 72 20 73 74 72 | 75 63 74 20 77 69 6e 73 | for str|uct wins|
|00000e90| 69 7a 65 20 61 6e 64 20 | 73 74 75 66 66 20 2a 2f |ize and |stuff */|
|00000ea0| 0a 21 20 0a 21 20 23 64 | 65 66 69 6e 65 20 43 52 |.! .! #d|efine CR|
|00000eb0| 4d 4f 44 09 30 32 30 09 | 2f 2a 20 73 67 74 74 79 |MOD.020.|/* sgtty|
|00000ec0| 2e 68 20 69 73 20 73 63 | 72 65 77 65 64 20 75 70 |.h is sc|rewed up|
|00000ed0| 2e 20 20 54 68 65 73 65 | 20 61 72 65 20 6e 65 65 |. These| are nee|
|00000ee0| 64 65 64 20 74 68 6f 75 | 67 68 20 2a 2f 0a 21 20 |ded thou|gh */.! |
|00000ef0| 23 64 65 66 69 6e 65 20 | 52 41 57 09 30 34 30 0a |#define |RAW.040.|
|00000f00| 21 20 0a 21 20 73 74 72 | 75 63 74 20 20 74 65 72 |! .! str|uct ter|
|00000f10| 6d 69 6f 20 20 6f 74 65 | 72 6d 3b 20 20 20 20 20 |mio ote|rm; |
|00000f20| 20 20 20 20 20 2f 2a 20 | 73 61 76 65 64 20 74 74 | /* |saved tt|
|00000f30| 79 20 73 74 61 74 65 20 | 2a 2f 0a 21 20 0a 21 20 |y state |*/.! .! |
|00000f40| 0a 21 20 2f 2a 20 54 68 | 69 73 20 73 74 72 75 63 |.! /* Th|is struc|
|00000f50| 74 75 72 65 20 62 6c 61 | 74 61 6e 74 6c 79 20 73 |ture bla|tantly s|
|00000f60| 74 6f 6c 65 6e 20 66 72 | 6f 6d 20 3c 73 79 73 2f |tolen fr|om <sys/|
|00000f70| 74 74 6f 6c 64 2e 68 3e | 20 3b 20 69 66 20 49 53 |ttold.h>| ; if IS|
|00000f80| 43 20 6f 72 20 41 54 26 | 54 0a 21 20 20 20 20 64 |C or AT&|T.! d|
|00000f90| 6f 65 73 6e 27 74 20 6c | 69 6b 65 20 69 74 2c 20 |oesn't l|ike it, |
|00000fa0| 74 6f 75 67 68 2e 20 20 | 46 69 78 20 74 68 65 20 |tough. |Fix the |
|00000fb0| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 2e 0a 21 |include |files..!|
|00000fc0| 20 0a 21 20 20 20 20 55 | 6e 66 6f 72 74 75 6e 61 | .! U|nfortuna|
|00000fd0| 74 65 6c 79 2c 20 74 74 | 6f 6c 64 2e 68 20 61 6c |tely, tt|old.h al|
|00000fe0| 73 6f 20 68 61 73 20 22 | 73 74 72 75 63 74 20 73 |so has "|struct s|
|00000ff0| 67 74 74 79 62 22 20 77 | 68 69 63 68 20 63 6f 6e |gttyb" w|hich con|
|00001000| 66 6c 69 63 74 73 0a 21 | 20 20 20 20 77 69 74 68 |flicts.!| with|
|00001010| 20 3c 73 67 74 74 79 2e | 68 3e 2c 20 62 75 74 20 | <sgtty.|h>, but |
|00001020| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 63 6f 6e 74 |it does |not cont|
|00001030| 61 69 6e 20 65 6e 6f 75 | 67 68 20 74 6f 20 72 65 |ain enou|gh to re|
|00001040| 70 6c 61 63 65 20 3c 73 | 67 74 74 79 2e 68 3e 2e |place <s|gtty.h>.|
|00001050| 20 20 20 0a 21 20 20 20 | 20 54 68 69 73 20 61 70 | .! | This ap|
|00001060| 70 65 61 72 73 20 74 6f | 20 62 65 20 74 68 65 20 |pears to| be the |
|00001070| 62 65 73 74 20 63 6f 6d | 70 72 6f 6d 69 73 65 2e |best com|promise.|
|00001080| 0a 21 20 2a 2f 0a 21 20 | 0a 21 20 2f 2a 0a 21 20 |.! */.! |.! /*.! |
|00001090| 20 2a 20 4c 69 73 74 20 | 6f 66 20 73 70 65 63 69 | * List |of speci|
|000010a0| 61 6c 20 63 68 61 72 61 | 63 74 65 72 73 0a 21 20 |al chara|cters.! |
|000010b0| 20 2a 2f 0a 21 20 0a 21 | 20 73 74 72 75 63 74 20 | */.! .!| struct |
|000010c0| 74 63 68 61 72 73 09 7b | 0a 21 20 09 75 6e 73 69 |tchars.{|.! .unsi|
|000010d0| 67 6e 65 64 20 63 68 61 | 72 09 74 5f 69 6e 74 72 |gned cha|r.t_intr|
|000010e0| 63 3b 0a 21 20 09 75 6e | 73 69 67 6e 65 64 20 63 |c;.! .un|signed c|
|000010f0| 68 61 72 09 74 5f 71 75 | 69 74 63 3b 0a 21 20 09 |har.t_qu|itc;.! .|
|00001100| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 09 74 5f |unsigned| char.t_|
|00001110| 73 74 61 72 74 63 3b 0a | 21 20 09 75 6e 73 69 67 |startc;.|! .unsig|
|00001120| 6e 65 64 20 63 68 61 72 | 09 74 5f 73 74 6f 70 63 |ned char|.t_stopc|
|00001130| 3b 0a 21 20 09 75 6e 73 | 69 67 6e 65 64 20 63 68 |;.! .uns|igned ch|
|00001140| 61 72 09 74 5f 65 6f 66 | 63 3b 0a 21 20 09 75 6e |ar.t_eof|c;.! .un|
|00001150| 73 69 67 6e 65 64 20 63 | 68 61 72 09 74 5f 62 72 |signed c|har.t_br|
|00001160| 6b 63 3b 0a 21 20 7d 3b | 0a 21 20 0a 21 20 0a 21 |kc;.! };|.! .! .!|
|00001170| 20 23 65 6e 64 69 66 0a | 20 20 0a 20 20 73 74 72 | #endif.| . str|
|00001180| 75 63 74 20 20 73 67 74 | 74 79 62 20 20 6f 73 74 |uct sgt|tyb ost|
|00001190| 61 74 65 3b 20 20 20 20 | 20 20 20 20 20 20 2f 2a |ate; | /*|
|000011a0| 20 73 61 76 65 64 20 74 | 74 79 20 73 74 61 74 65 | saved t|ty state|
|000011b0| 20 2a 2f 0a 20 20 73 74 | 72 75 63 74 20 20 73 67 | */. st|ruct sg|
|000011c0| 74 74 79 62 20 20 6e 73 | 74 61 74 65 3b 20 20 20 |ttyb ns|tate; |
|000011d0| 20 20 20 20 20 20 20 2f | 2a 20 76 61 6c 75 65 73 | /|* values|
|000011e0| 20 66 6f 72 20 65 64 69 | 74 6f 72 20 6d 6f 64 65 | for edi|tor mode|
|000011f0| 20 2a 2f 0a 2b 20 0a 20 | 20 73 74 72 75 63 74 20 | */.+ . | struct |
|00001200| 74 63 68 61 72 73 09 6f | 74 63 68 61 72 73 3b 09 |tchars.o|tchars;.|
|00001210| 2f 2a 20 53 61 76 65 64 | 20 74 65 72 6d 69 6e 61 |/* Saved| termina|
|00001220| 6c 20 73 70 65 63 69 61 | 6c 20 63 68 61 72 61 63 |l specia|l charac|
|00001230| 74 65 72 20 73 65 74 20 | 2a 2f 0a 20 20 73 74 72 |ter set |*/. str|
|00001240| 75 63 74 20 74 63 68 61 | 72 73 09 6e 74 63 68 61 |uct tcha|rs.ntcha|
|00001250| 72 73 20 3d 20 7b 20 30 | 78 66 66 2c 20 30 78 66 |rs = { 0|xff, 0xf|
|00001260| 66 2c 20 30 78 66 66 2c | 20 30 78 66 66 2c 20 30 |f, 0xff,| 0xff, 0|
|00001270| 78 66 66 2c 20 30 78 66 | 66 20 7d 3b 0a 20 20 09 |xff, 0xf|f };. .|
|00001280| 09 09 09 2f 2a 20 41 20 | 6c 6f 74 20 6f 66 20 6e |.../* A |lot of n|
|00001290| 6f 74 68 69 6e 67 20 2a | 2f 0a 2a 2a 2a 2a 2a 2a |othing *|/.******|
|000012a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0a 2a 2a 2a 20 37 38 |********|*.*** 78|
|000012b0| 2c 38 33 20 2a 2a 2a 2a | 0a 2d 2d 2d 20 31 31 35 |,83 ****|.--- 115|
|000012c0| 2c 31 32 35 20 2d 2d 2d | 2d 0a 20 20 53 49 47 54 |,125 ---|-. SIGT|
|000012d0| 59 50 45 09 77 69 6e 63 | 68 5f 68 61 6e 64 6c 65 |YPE.winc|h_handle|
|000012e0| 72 28 29 3b 0a 20 20 23 | 65 6e 64 69 66 0a 20 20 |r();. #|endif. |
|000012f0| 0a 2b 20 23 69 66 64 65 | 66 09 49 53 43 0a 2b 20 |.+ #ifde|f.ISC.+ |
|00001300| 53 49 47 54 59 50 45 09 | 64 6f 5f 69 6e 74 5f 73 |SIGTYPE.|do_int_s|
|00001310| 69 67 6e 61 6c 28 29 3b | 0a 2b 20 76 6f 69 64 09 |ignal();|.+ void.|
|00001320| 28 2a 73 61 76 65 5f 73 | 69 67 69 6e 74 29 28 29 |(*save_s|igint)()|
|00001330| 3b 0a 2b 20 23 65 6e 64 | 69 66 0a 2b 20 0a 20 20 |;.+ #end|if.+ . |
|00001340| 0a 20 20 2f 2a 0a 20 20 | 20 2a 20 54 68 69 73 20 |. /*. | * This |
|00001350| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 63 61 6c 6c |function| is call|
|00001360| 65 64 20 6f 6e 63 65 20 | 74 6f 20 73 65 74 20 75 |ed once |to set u|
|00001370| 70 20 74 68 65 20 74 65 | 72 6d 69 6e 61 6c 20 64 |p the te|rminal d|
|00001380| 65 76 69 63 65 20 73 74 | 72 65 61 6d 73 2e 0a 2a |evice st|reams..*|
|00001390| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0a 2a |********|******.*|
|000013a0| 2a 2a 20 38 34 2c 31 30 | 30 20 2a 2a 2a 2a 0a 20 |** 84,10|0 ****. |
|000013b0| 20 20 2a 2f 0a 20 20 74 | 74 6f 70 65 6e 28 29 0a | */. t|topen().|
|000013c0| 20 20 7b 0a 21 20 09 69 | 66 28 21 66 6f 72 5f 70 | {.! .i|f(!for_p|
|000013d0| 69 6e 65 29 7b 0a 20 20 | 09 20 20 20 20 69 6f 63 |ine){. |. ioc|
|000013e0| 74 6c 28 30 2c 20 54 49 | 4f 43 47 45 54 50 2c 20 |tl(0, TI|OCGETP, |
|000013f0| 26 6f 73 74 61 74 65 29 | 3b 09 2f 2a 20 73 61 76 |&ostate)|;./* sav|
|00001400| 65 20 6f 6c 64 20 73 74 | 61 74 65 20 2a 2f 0a 20 |e old st|ate */. |
|00001410| 20 09 20 20 20 20 69 6f | 63 74 6c 28 30 2c 20 54 | . io|ctl(0, T|
|00001420| 49 4f 43 47 45 54 50 2c | 20 26 6e 73 74 61 74 65 |IOCGETP,| &nstate|
|00001430| 29 3b 09 2f 2a 20 67 65 | 74 20 62 61 73 65 20 6f |);./* ge|t base o|
|00001440| 66 20 6e 65 77 20 73 74 | 61 74 65 20 2a 2f 0a 20 |f new st|ate */. |
|00001450| 20 09 20 20 20 20 6e 73 | 74 61 74 65 2e 73 67 5f | . ns|tate.sg_|
|00001460| 66 6c 61 67 73 20 7c 3d | 20 52 41 57 3b 0a 20 20 |flags |=| RAW;. |
|00001470| 09 20 20 20 20 6e 73 74 | 61 74 65 2e 73 67 5f 66 |. nst|ate.sg_f|
|00001480| 6c 61 67 73 20 26 3d 20 | 7e 28 45 43 48 4f 7c 43 |lags &= |~(ECHO|C|
|00001490| 52 4d 4f 44 29 3b 09 2f | 2a 20 6e 6f 20 65 63 68 |RMOD);./|* no ech|
|000014a0| 6f 20 66 6f 72 20 6e 6f | 77 2e 2e 2e 20 2a 2f 0a |o for no|w... */.|
|000014b0| 20 20 09 20 20 20 20 69 | 6f 63 74 6c 28 30 2c 20 | . i|octl(0, |
|000014c0| 54 49 4f 43 53 45 54 50 | 2c 20 26 6e 73 74 61 74 |TIOCSETP|, &nstat|
|000014d0| 65 29 3b 20 09 2f 2a 20 | 73 65 74 20 6d 6f 64 65 |e); ./* |set mode|
|000014e0| 20 2a 2f 0a 2d 20 09 20 | 20 20 20 0a 20 20 09 20 | */.- . | . . |
|000014f0| 20 20 20 69 6f 63 74 6c | 28 30 2c 20 54 49 4f 43 | ioctl|(0, TIOC|
|00001500| 47 45 54 43 2c 20 26 6f | 74 63 68 61 72 73 29 3b |GETC, &o|tchars);|
|00001510| 20 09 2f 2a 20 53 61 76 | 65 20 6f 6c 64 20 63 68 | ./* Sav|e old ch|
|00001520| 61 72 61 63 74 65 72 73 | 20 2a 2f 0a 20 20 09 20 |aracters| */. . |
|00001530| 20 20 20 69 6f 63 74 6c | 28 30 2c 20 54 49 4f 43 | ioctl|(0, TIOC|
|00001540| 53 45 54 43 2c 20 26 6e | 74 63 68 61 72 73 29 3b |SETC, &n|tchars);|
|00001550| 20 09 2f 2a 20 70 75 74 | 20 6e 65 77 20 63 68 61 | ./* put| new cha|
|00001560| 72 61 63 74 65 72 20 69 | 6e 74 6f 20 4b 20 2a 2f |racter i|nto K */|
|00001570| 0a 2d 20 09 7d 0a 20 20 | 0a 20 20 09 73 69 67 6e |.- .}. |. .sign|
|00001580| 61 6c 28 53 49 47 48 55 | 50 2c 20 28 53 49 47 54 |al(SIGHU|P, (SIGT|
|00001590| 59 50 45 20 2a 29 64 6f | 5f 68 75 70 5f 73 69 67 |YPE *)do|_hup_sig|
|000015a0| 6e 61 6c 29 3b 20 2f 2a | 20 64 65 61 6c 20 77 69 |nal); /*| deal wi|
|000015b0| 74 68 20 53 49 47 48 55 | 50 20 2a 2f 0a 20 20 09 |th SIGHU|P */. .|
|000015c0| 73 69 67 6e 61 6c 28 53 | 49 47 41 4c 52 4d 2c 20 |signal(S|IGALRM, |
|000015d0| 28 53 49 47 54 59 50 45 | 20 2a 29 64 6f 5f 61 6c |(SIGTYPE| *)do_al|
|000015e0| 61 72 6d 5f 73 69 67 6e | 61 6c 29 3b 20 2f 2a 20 |arm_sign|al); /* |
|000015f0| 74 69 6d 65 72 20 66 6f | 72 20 6e 65 77 20 6d 61 |timer fo|r new ma|
|00001600| 69 6c 20 2a 2f 0a 20 20 | 23 69 66 64 65 66 09 54 |il */. |#ifdef.T|
|00001610| 49 4f 43 47 57 49 4e 53 | 5a 0a 2d 2d 2d 20 31 32 |IOCGWINS|Z.--- 12|
|00001620| 36 2c 31 35 33 20 2d 2d | 2d 2d 0a 20 20 20 2a 2f |6,153 --|--. */|
|00001630| 0a 20 20 74 74 6f 70 65 | 6e 28 29 0a 20 20 7b 0a |. ttope|n(). {.|
|00001640| 21 20 23 69 66 64 65 66 | 20 49 53 43 0a 21 20 2f |! #ifdef| ISC.! /|
|00001650| 2a 20 0a 21 20 65 63 68 | 6f 65 20 70 61 72 65 6e |* .! ech|oe paren|
|00001660| 62 20 65 6f 66 20 61 72 | 65 20 61 6c 6c 20 67 65 |b eof ar|e all ge|
|00001670| 74 74 69 6e 67 20 73 63 | 72 65 77 65 64 20 75 70 |tting sc|rewed up|
|00001680| 20 6f 6e 20 65 78 69 74 | 2e 20 20 54 68 69 73 20 | on exit|. This |
|00001690| 66 69 78 65 73 20 74 68 | 61 74 20 70 72 6f 62 6c |fixes th|at probl|
|000016a0| 65 6d 2e 0a 21 20 53 69 | 6e 63 65 20 74 65 72 6d |em..! Si|nce term|
|000016b0| 69 6f 20 73 74 72 75 63 | 74 75 72 65 20 63 6f 6e |io struc|ture con|
|000016c0| 74 61 69 6e 73 20 6d 6f | 72 65 20 66 75 6e 63 74 |tains mo|re funct|
|000016d0| 69 6f 6e 61 6c 69 74 79 | 20 74 68 65 6e 20 74 68 |ionality| then th|
|000016e0| 65 20 73 67 74 74 79 20 | 73 74 72 75 63 74 2c 20 |e sgtty |struct, |
|000016f0| 0a 21 20 79 6f 75 20 63 | 61 6e 6e 6f 74 20 66 75 |.! you c|annot fu|
|00001700| 6c 6c 79 20 72 65 73 74 | 6f 72 65 20 74 68 65 20 |lly rest|ore the |
|00001710| 6f 72 67 69 6e 61 6c 20 | 73 65 74 74 69 6e 67 73 |orginal |settings|
|00001720| 20 77 69 74 68 6f 75 74 | 20 73 61 76 69 6e 67 20 | without| saving |
|00001730| 74 68 65 6d 20 69 6e 20 | 74 68 65 20 0a 21 20 66 |them in |the .! f|
|00001740| 6f 6c 6c 6f 77 69 6e 67 | 20 6d 61 6e 6e 65 72 20 |ollowing| manner |
|00001750| 66 69 72 73 74 2e 0a 21 | 20 2a 2f 0a 21 20 0a 21 |first..!| */.! .!|
|00001760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 6f 63 | | ioc|
|00001770| 74 6c 28 30 2c 20 54 43 | 47 45 54 41 2c 20 26 6f |tl(0, TC|GETA, &o|
|00001780| 74 65 72 6d 29 3b 09 2f | 2a 20 73 61 76 65 20 6f |term);./|* save o|
|00001790| 6c 64 20 73 74 61 74 65 | 20 2a 2f 0a 21 20 23 65 |ld state| */.! #e|
|000017a0| 6e 64 69 66 0a 20 20 09 | 20 20 20 20 69 6f 63 74 |ndif. .| ioct|
|000017b0| 6c 28 30 2c 20 54 49 4f | 43 47 45 54 50 2c 20 26 |l(0, TIO|CGETP, &|
|000017c0| 6f 73 74 61 74 65 29 3b | 09 2f 2a 20 73 61 76 65 |ostate);|./* save|
|000017d0| 20 6f 6c 64 20 73 74 61 | 74 65 20 2a 2f 0a 20 20 | old sta|te */. |
|000017e0| 09 20 20 20 20 69 6f 63 | 74 6c 28 30 2c 20 54 49 |. ioc|tl(0, TI|
|000017f0| 4f 43 47 45 54 50 2c 20 | 26 6e 73 74 61 74 65 29 |OCGETP, |&nstate)|
|00001800| 3b 09 2f 2a 20 67 65 74 | 20 62 61 73 65 20 6f 66 |;./* get| base of|
|00001810| 20 6e 65 77 20 73 74 61 | 74 65 20 2a 2f 0a 20 20 | new sta|te */. |
|00001820| 09 20 20 20 20 6e 73 74 | 61 74 65 2e 73 67 5f 66 |. nst|ate.sg_f|
|00001830| 6c 61 67 73 20 7c 3d 20 | 52 41 57 3b 0a 20 20 09 |lags |= |RAW;. .|
|00001840| 20 20 20 20 6e 73 74 61 | 74 65 2e 73 67 5f 66 6c | nsta|te.sg_fl|
|00001850| 61 67 73 20 26 3d 20 7e | 28 45 43 48 4f 7c 43 52 |ags &= ~|(ECHO|CR|
|00001860| 4d 4f 44 29 3b 09 2f 2a | 20 6e 6f 20 65 63 68 6f |MOD);./*| no echo|
|00001870| 20 66 6f 72 20 6e 6f 77 | 2e 2e 2e 20 2a 2f 0a 20 | for now|... */. |
|00001880| 20 09 20 20 20 20 69 6f | 63 74 6c 28 30 2c 20 54 | . io|ctl(0, T|
|00001890| 49 4f 43 53 45 54 50 2c | 20 26 6e 73 74 61 74 65 |IOCSETP,| &nstate|
|000018a0| 29 3b 20 09 2f 2a 20 73 | 65 74 20 6d 6f 64 65 20 |); ./* s|et mode |
|000018b0| 2a 2f 0a 20 20 09 20 20 | 20 20 69 6f 63 74 6c 28 |*/. . | ioctl(|
|000018c0| 30 2c 20 54 49 4f 43 47 | 45 54 43 2c 20 26 6f 74 |0, TIOCG|ETC, &ot|
|000018d0| 63 68 61 72 73 29 3b 20 | 09 2f 2a 20 53 61 76 65 |chars); |./* Save|
|000018e0| 20 6f 6c 64 20 63 68 61 | 72 61 63 74 65 72 73 20 | old cha|racters |
|000018f0| 2a 2f 0a 20 20 09 20 20 | 20 20 69 6f 63 74 6c 28 |*/. . | ioctl(|
|00001900| 30 2c 20 54 49 4f 43 53 | 45 54 43 2c 20 26 6e 74 |0, TIOCS|ETC, &nt|
|00001910| 63 68 61 72 73 29 3b 20 | 09 2f 2a 20 70 75 74 20 |chars); |./* put |
|00001920| 6e 65 77 20 63 68 61 72 | 61 63 74 65 72 20 69 6e |new char|acter in|
|00001930| 74 6f 20 4b 20 2a 2f 0a | 20 20 0a 2b 20 23 69 66 |to K */.| .+ #if|
|00001940| 64 65 66 20 49 53 43 0a | 2b 20 09 2f 2a 20 64 65 |def ISC.|+ ./* de|
|00001950| 61 6c 20 77 69 74 68 20 | 53 49 47 49 4e 54 20 2a |al with |SIGINT *|
|00001960| 2f 0a 2b 20 09 73 61 76 | 65 5f 73 69 67 69 6e 74 |/.+ .sav|e_sigint|
|00001970| 20 3d 20 28 76 6f 69 64 | 20 28 2a 29 28 29 29 73 | = (void| (*)())s|
|00001980| 69 67 6e 61 6c 28 53 49 | 47 49 4e 54 2c 20 28 53 |ignal(SI|GINT, (S|
|00001990| 49 47 54 59 50 45 20 2a | 29 64 6f 5f 69 6e 74 5f |IGTYPE *|)do_int_|
|000019a0| 73 69 67 6e 61 6c 29 3b | 0a 2b 20 23 65 6e 64 69 |signal);|.+ #endi|
|000019b0| 66 0a 20 20 09 73 69 67 | 6e 61 6c 28 53 49 47 48 |f. .sig|nal(SIGH|
|000019c0| 55 50 2c 20 28 53 49 47 | 54 59 50 45 20 2a 29 64 |UP, (SIG|TYPE *)d|
|000019d0| 6f 5f 68 75 70 5f 73 69 | 67 6e 61 6c 29 3b 20 2f |o_hup_si|gnal); /|
|000019e0| 2a 20 64 65 61 6c 20 77 | 69 74 68 20 53 49 47 48 |* deal w|ith SIGH|
|000019f0| 55 50 20 2a 2f 0a 20 20 | 09 73 69 67 6e 61 6c 28 |UP */. |.signal(|
|00001a00| 53 49 47 41 4c 52 4d 2c | 20 28 53 49 47 54 59 50 |SIGALRM,| (SIGTYP|
|00001a10| 45 20 2a 29 64 6f 5f 61 | 6c 61 72 6d 5f 73 69 67 |E *)do_a|larm_sig|
|00001a20| 6e 61 6c 29 3b 20 2f 2a | 20 74 69 6d 65 72 20 66 |nal); /*| timer f|
|00001a30| 6f 72 20 6e 65 77 20 6d | 61 69 6c 20 2a 2f 0a 20 |or new m|ail */. |
|00001a40| 20 23 69 66 64 65 66 09 | 54 49 4f 43 47 57 49 4e | #ifdef.|TIOCGWIN|
|00001a50| 53 5a 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |SZ.*****|********|
|00001a60| 2a 2a 0a 2a 2a 2a 20 31 | 31 33 2c 31 31 38 20 2a |**.*** 1|13,118 *|
|00001a70| 2a 2a 2a 0a 2d 2d 2d 20 | 31 36 36 2c 31 37 34 20 |***.--- |166,174 |
|00001a80| 2d 2d 2d 2d 0a 20 20 74 | 74 63 6c 6f 73 65 28 29 |----. t|tclose()|
|00001a90| 0a 20 20 7b 0a 20 20 20 | 20 20 20 69 66 28 66 6f |. {. | if(fo|
|00001aa0| 72 5f 70 69 6e 65 29 7b | 0a 2b 20 23 69 66 64 65 |r_pine){|.+ #ifde|
|00001ab0| 66 20 49 53 43 0a 2b 20 | 20 20 20 20 20 20 20 20 |f ISC.+ | |
|00001ac0| 28 76 6f 69 64 29 73 69 | 67 6e 61 6c 28 53 49 47 |(void)si|gnal(SIG|
|00001ad0| 49 4e 54 2c 20 73 61 76 | 65 5f 73 69 67 69 6e 74 |INT, sav|e_sigint|
|00001ae0| 29 3b 0a 2b 20 23 65 6e | 64 69 66 0a 20 20 09 73 |);.+ #en|dif. .s|
|00001af0| 69 67 6e 61 6c 28 53 49 | 47 48 55 50 2c 20 53 49 |ignal(SI|GHUP, SI|
|00001b00| 47 5f 44 46 4c 29 3b 0a | 20 20 09 73 69 67 6e 61 |G_DFL);.| .signa|
|00001b10| 6c 28 53 49 47 43 4f 4e | 54 2c 20 53 49 47 5f 44 |l(SIGCON|T, SIG_D|
|00001b20| 46 4c 29 3b 0a 20 20 09 | 73 69 67 6e 61 6c 28 53 |FL);. .|signal(S|
|00001b30| 49 47 41 4c 52 4d 2c 20 | 53 49 47 5f 44 46 4c 29 |IGALRM, |SIG_DFL)|
|00001b40| 3b 0a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |;.******|********|
|00001b50| 2a 0a 2a 2a 2a 20 31 32 | 32 2c 31 32 37 20 2a 2a |*.*** 12|2,127 **|
|00001b60| 2a 2a 0a 2d 2d 2d 20 31 | 37 38 2c 31 38 36 20 2d |**.--- 1|78,186 -|
|00001b70| 2d 2d 2d 0a 20 20 09 69 | 6f 63 74 6c 28 30 2c 20 |---. .i|octl(0, |
|00001b80| 54 49 4f 43 53 45 54 50 | 2c 20 26 6f 73 74 61 74 |TIOCSETP|, &ostat|
|00001b90| 65 29 3b 0a 20 20 09 69 | 6f 63 74 6c 28 30 2c 20 |e);. .i|octl(0, |
|00001ba0| 54 49 4f 43 53 45 54 43 | 2c 20 26 6f 74 63 68 61 |TIOCSETC|, &otcha|
|00001bb0| 72 73 29 3b 0a 20 20 20 | 20 20 20 7d 0a 2b 20 23 |rs);. | }.+ #|
|00001bc0| 69 66 64 65 66 20 49 53 | 43 0a 2b 20 09 69 6f 63 |ifdef IS|C.+ .ioc|
|00001bd0| 74 6c 28 30 2c 20 54 43 | 53 45 54 41 57 2c 20 26 |tl(0, TC|SETAW, &|
|00001be0| 6f 74 65 72 6d 29 3b 09 | 2f 2a 20 73 65 74 20 6f |oterm);.|/* set o|
|00001bf0| 6c 64 20 73 74 61 74 65 | 20 2a 2f 0a 2b 20 23 65 |ld state| */.+ #e|
|00001c00| 6e 64 69 66 0a 20 20 7d | 0a 20 20 0a 20 20 0a 2a |ndif. }|. . .*|
|00001c10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0a 2a |********|******.*|
|00001c20| 2a 2a 20 31 37 34 2c 32 | 30 31 20 2a 2a 2a 2a 0a |** 174,2|01 ****.|
|00001c30| 20 20 20 2a 2f 0a 20 20 | 47 65 74 4b 65 79 28 29 | */. |GetKey()|
|00001c40| 0a 20 20 7b 0a 21 20 09 | 69 6e 74 20 20 20 20 63 |. {.! .|int c|
|00001c50| 3b 0a 20 20 0a 20 20 09 | 69 66 28 74 69 6d 65 6f |;. . .|if(timeo|
|00001c60| 75 74 29 7b 0a 20 20 09 | 20 20 20 20 69 66 28 73 |ut){. .| if(s|
|00001c70| 65 74 6a 6d 70 28 61 6c | 72 6d 5f 73 74 61 74 65 |etjmp(al|rm_state|
|00001c80| 29 20 3d 3d 20 30 29 7b | 0a 20 20 09 09 61 6c 61 |) == 0){|. ..ala|
|00001c90| 72 6d 28 74 69 6d 65 6f | 75 74 29 3b 0a 20 20 09 |rm(timeo|ut);. .|
|00001ca0| 09 65 72 72 6e 6f 20 3d | 20 30 3b 0a 21 20 09 09 |.errno =| 0;.! ..|
|00001cb0| 63 20 3d 20 28 2a 74 65 | 72 6d 2e 74 5f 67 65 74 |c = (*te|rm.t_get|
|00001cc0| 63 68 61 72 29 28 29 3b | 0a 20 20 09 09 69 66 28 |char)();|. ..if(|
|00001cd0| 65 72 72 6e 6f 20 3d 3d | 20 45 49 4e 54 52 29 0a |errno ==| EINTR).|
|00001ce0| 21 20 09 09 20 20 63 20 | 3d 20 4e 4f 44 41 54 41 |! .. c |= NODATA|
|00001cf0| 3b 0a 20 20 09 20 20 20 | 20 7d 0a 20 20 09 20 20 |;. . | }. . |
|00001d00| 20 20 65 6c 73 65 0a 21 | 20 09 20 20 20 20 20 20 | else.!| . |
|00001d10| 63 20 3d 20 4e 4f 44 41 | 54 41 3b 20 09 09 2f 2a |c = NODA|TA; ../*|
|00001d20| 20 61 6c 61 72 6d 20 77 | 65 6e 74 20 6f 66 66 20 | alarm w|ent off |
|00001d30| 73 6f 20 67 6f 20 62 61 | 63 6b 20 2a 2f 0a 20 20 |so go ba|ck */. |
|00001d40| 0a 20 20 09 20 20 20 20 | 61 6c 61 72 6d 28 30 29 |. . |alarm(0)|
|00001d50| 3b 09 09 09 2f 2a 20 73 | 68 75 74 20 6f 66 66 20 |;.../* s|hut off |
|00001d60| 74 68 65 20 61 6c 61 72 | 6d 20 2a 2f 0a 21 20 09 |the alar|m */.! .|
|00001d70| 20 20 20 20 69 66 28 63 | 20 3d 3d 20 4e 4f 44 41 | if(c| == NODA|
|00001d80| 54 41 29 0a 21 20 09 20 | 20 20 20 20 20 72 65 74 |TA).! . | ret|
|00001d90| 75 72 6e 28 63 29 3b 0a | 20 20 09 7d 0a 20 20 09 |urn(c);.| .}. .|
|00001da0| 65 6c 73 65 7b 0a 21 20 | 09 20 20 20 20 63 20 3d |else{.! |. c =|
|00001db0| 20 28 2a 74 65 72 6d 2e | 74 5f 67 65 74 63 68 61 | (*term.|t_getcha|
|00001dc0| 72 29 28 29 3b 0a 20 20 | 09 7d 0a 20 20 0a 21 20 |r)();. |.}. .! |
|00001dd0| 09 69 66 20 28 63 20 3d | 3d 20 4d 45 54 41 43 48 |.if (c =|= METACH|
|00001de0| 29 20 7b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) { | |
|00001df0| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 41 70 70 6c | | /* Appl|
|00001e00| 79 20 4d 2d 20 70 72 65 | 66 69 78 20 20 20 20 20 |y M- pre|fix |
|00001e10| 20 2a 2f 0a 20 20 09 20 | 20 20 20 69 6e 74 20 73 | */. . | int s|
|00001e20| 74 61 74 75 73 3b 0a 20 | 20 09 20 20 20 20 0a 20 |tatus;. | . . |
|00001e30| 20 09 20 20 20 20 2f 2a | 0a 2d 2d 2d 20 32 33 33 | . /*|.--- 233|
|00001e40| 2c 32 36 30 20 2d 2d 2d | 2d 0a 20 20 20 2a 2f 0a |,260 ---|-. */.|
|00001e50| 20 20 47 65 74 4b 65 79 | 28 29 0a 20 20 7b 0a 21 | GetKey|(). {.!|
|00001e60| 20 09 69 6e 74 20 20 20 | 20 63 63 3b 0a 20 20 0a | .int | cc;. .|
|00001e70| 20 20 09 69 66 28 74 69 | 6d 65 6f 75 74 29 7b 0a | .if(ti|meout){.|
|00001e80| 20 20 09 20 20 20 20 69 | 66 28 73 65 74 6a 6d 70 | . i|f(setjmp|
|00001e90| 28 61 6c 72 6d 5f 73 74 | 61 74 65 29 20 3d 3d 20 |(alrm_st|ate) == |
|00001ea0| 30 29 7b 0a 20 20 09 09 | 61 6c 61 72 6d 28 74 69 |0){. ..|alarm(ti|
|00001eb0| 6d 65 6f 75 74 29 3b 0a | 20 20 09 09 65 72 72 6e |meout);.| ..errn|
|00001ec0| 6f 20 3d 20 30 3b 0a 21 | 20 09 09 63 63 20 3d 20 |o = 0;.!| ..cc = |
|00001ed0| 28 2a 74 65 72 6d 2e 74 | 5f 67 65 74 63 68 61 72 |(*term.t|_getchar|
|00001ee0| 29 28 29 3b 0a 20 20 09 | 09 69 66 28 65 72 72 6e |)();. .|.if(errn|
|00001ef0| 6f 20 3d 3d 20 45 49 4e | 54 52 29 0a 21 20 09 09 |o == EIN|TR).! ..|
|00001f00| 20 20 63 63 20 3d 20 4e | 4f 44 41 54 41 3b 0a 20 | cc = N|ODATA;. |
|00001f10| 20 09 20 20 20 20 7d 0a | 20 20 09 20 20 20 20 65 | . }.| . e|
|00001f20| 6c 73 65 0a 21 20 09 20 | 20 20 20 20 20 63 63 20 |lse.! . | cc |
|00001f30| 3d 20 4e 4f 44 41 54 41 | 3b 20 09 09 2f 2a 20 61 |= NODATA|; ../* a|
|00001f40| 6c 61 72 6d 20 77 65 6e | 74 20 6f 66 66 20 73 6f |larm wen|t off so|
|00001f50| 20 67 6f 20 62 61 63 6b | 20 2a 2f 0a 20 20 0a 20 | go back| */. . |
|00001f60| 20 09 20 20 20 20 61 6c | 61 72 6d 28 30 29 3b 09 | . al|arm(0);.|
|00001f70| 09 09 2f 2a 20 73 68 75 | 74 20 6f 66 66 20 74 68 |../* shu|t off th|
|00001f80| 65 20 61 6c 61 72 6d 20 | 2a 2f 0a 21 20 09 20 20 |e alarm |*/.! . |
|00001f90| 20 20 69 66 28 63 63 20 | 3d 3d 20 4e 4f 44 41 54 | if(cc |== NODAT|
|00001fa0| 41 29 0a 21 20 09 20 20 | 20 20 20 20 72 65 74 75 |A).! . | retu|
|00001fb0| 72 6e 28 63 63 29 3b 0a | 20 20 09 7d 0a 20 20 09 |rn(cc);.| .}. .|
|00001fc0| 65 6c 73 65 7b 0a 21 20 | 09 20 20 20 20 63 63 20 |else{.! |. cc |
|00001fd0| 3d 20 28 2a 74 65 72 6d | 2e 74 5f 67 65 74 63 68 |= (*term|.t_getch|
|00001fe0| 61 72 29 28 29 3b 0a 20 | 20 09 7d 0a 20 20 0a 21 |ar)();. | .}. .!|
|00001ff0| 20 09 69 66 20 28 63 63 | 20 3d 3d 20 4d 45 54 41 | .if (cc| == META|
|00002000| 43 48 29 20 7b 20 20 20 | 20 20 20 20 20 20 20 20 |CH) { | |
|00002010| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 41 70 | | /* Ap|
|00002020| 70 6c 79 20 4d 2d 20 70 | 72 65 66 69 78 20 20 20 |ply M- p|refix |
|00002030| 20 20 20 2a 2f 0a 20 20 | 09 20 20 20 20 69 6e 74 | */. |. int|
|00002040| 20 73 74 61 74 75 73 3b | 0a 20 20 09 20 20 20 20 | status;|. . |
|00002050| 0a 20 20 09 20 20 20 20 | 2f 2a 0a 2a 2a 2a 2a 2a |. . |/*.*****|
|00002060| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 0a 2a 2a 2a 20 32 |********|**.*** 2|
|00002070| 30 32 2c 32 31 30 20 2a | 2a 2a 2a 0a 20 20 09 20 |02,210 *|***. . |
|00002080| 20 20 20 20 2a 20 74 68 | 69 73 20 63 6f 64 65 20 | * th|is code |
|00002090| 73 68 6f 75 6c 64 20 69 | 6e 74 65 72 63 65 70 74 |should i|ntercept|
|000020a0| 20 73 70 65 63 69 61 6c | 20 6b 65 79 70 61 64 20 | special| keypad |
|000020b0| 6b 65 79 73 0a 20 20 09 | 20 20 20 20 20 2a 2f 0a |keys. .| */.|
|000020c0| 20 20 0a 21 20 09 20 20 | 20 20 73 77 69 74 63 68 | .! . | switch|
|000020d0| 28 73 74 61 74 75 73 20 | 3d 20 6b 62 73 65 71 28 |(status |= kbseq(|
|000020e0| 26 63 29 29 7b 0a 20 20 | 09 20 20 20 20 20 20 63 |&c)){. |. c|
|000020f0| 61 73 65 20 30 20 3a 20 | 09 2f 2a 20 6e 6f 20 64 |ase 0 : |./* no d|
|00002100| 69 63 65 20 2a 2f 0a 21 | 20 20 20 20 20 09 09 72 |ice */.!| ..r|
|00002110| 65 74 75 72 6e 28 63 29 | 3b 0a 20 20 09 20 20 20 |eturn(c)|;. . |
|00002120| 20 20 20 63 61 73 65 20 | 20 4b 5f 50 41 44 5f 55 | case | K_PAD_U|
|00002130| 50 09 09 3a 0a 20 20 09 | 20 20 20 20 20 20 63 61 |P..:. .| ca|
|00002140| 73 65 20 20 4b 5f 50 41 | 44 5f 44 4f 57 4e 09 09 |se K_PA|D_DOWN..|
|00002150| 3a 0a 20 20 09 20 20 20 | 20 20 20 63 61 73 65 20 |:. . | case |
|00002160| 20 4b 5f 50 41 44 5f 52 | 49 47 48 54 09 09 3a 0a | K_PAD_R|IGHT..:.|
|00002170| 2d 2d 2d 20 32 36 31 2c | 32 36 39 20 2d 2d 2d 2d |--- 261,|269 ----|
|00002180| 0a 20 20 09 20 20 20 20 | 20 2a 20 74 68 69 73 20 |. . | * this |
|00002190| 63 6f 64 65 20 73 68 6f | 75 6c 64 20 69 6e 74 65 |code sho|uld inte|
|000021a0| 72 63 65 70 74 20 73 70 | 65 63 69 61 6c 20 6b 65 |rcept sp|ecial ke|
|000021b0| 79 70 61 64 20 6b 65 79 | 73 0a 20 20 09 20 20 20 |ypad key|s. . |
|000021c0| 20 20 2a 2f 0a 20 20 0a | 21 20 09 20 20 20 20 73 | */. .|! . s|
|000021d0| 77 69 74 63 68 28 73 74 | 61 74 75 73 20 3d 20 6b |witch(st|atus = k|
|000021e0| 62 73 65 71 28 26 63 63 | 29 29 7b 0a 20 20 09 20 |bseq(&cc|)){. . |
|000021f0| 20 20 20 20 20 63 61 73 | 65 20 30 20 3a 20 09 2f | cas|e 0 : ./|
|00002200| 2a 20 6e 6f 20 64 69 63 | 65 20 2a 2f 0a 21 20 20 |* no dic|e */.! |
|00002210| 20 20 20 09 09 72 65 74 | 75 72 6e 28 63 63 29 3b | ..ret|urn(cc);|
|00002220| 0a 20 20 09 20 20 20 20 | 20 20 63 61 73 65 20 20 |. . | case |
|00002230| 4b 5f 50 41 44 5f 55 50 | 09 09 3a 0a 20 20 09 20 |K_PAD_UP|..:. . |
|00002240| 20 20 20 20 20 63 61 73 | 65 20 20 4b 5f 50 41 44 | cas|e K_PAD|
|00002250| 5f 44 4f 57 4e 09 09 3a | 0a 20 20 09 20 20 20 20 |_DOWN..:|. . |
|00002260| 20 20 63 61 73 65 20 20 | 4b 5f 50 41 44 5f 52 49 | case |K_PAD_RI|
|00002270| 47 48 54 09 09 3a 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |GHT..:.*|********|
|00002280| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 32 33 33 2c 32 |******.*|** 233,2|
|00002290| 34 32 20 2a 2a 2a 2a 0a | 20 20 09 20 20 20 20 7d |42 ****.| . }|
|000022a0| 0a 20 20 20 20 20 20 20 | 20 20 20 7d 0a 20 20 0a |. | }. .|
|000022b0| 21 20 20 20 20 20 20 20 | 20 20 69 66 20 28 63 3e |! | if (c>|
|000022c0| 3d 30 78 30 30 20 26 26 | 20 63 3c 3d 30 78 31 46 |=0x00 &&| c<=0x1F|
|000022d0| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|000022e0| 20 20 2f 2a 20 43 30 20 | 63 6f 6e 74 72 6f 6c 20 | /* C0 |control |
|000022f0| 2d 3e 20 43 2d 20 20 20 | 20 20 2a 2f 0a 21 20 20 |-> C- | */.! |
|00002300| 20 20 20 20 20 20 20 20 | 20 63 20 3d 20 43 54 52 | | c = CTR|
|00002310| 4c 20 7c 20 28 63 2b 27 | 40 27 29 3b 0a 20 20 0a |L | (c+'|@');. .|
|00002320| 21 20 09 20 20 20 20 72 | 65 74 75 72 6e 20 28 63 |! . r|eturn (c|
|00002330| 29 3b 0a 20 20 0a 20 20 | 7d 0a 20 20 0a 2d 2d 2d |);. . |}. .---|
|00002340| 20 32 39 32 2c 33 30 31 | 20 2d 2d 2d 2d 0a 20 20 | 292,301| ----. |
|00002350| 09 20 20 20 20 7d 0a 20 | 20 20 20 20 20 20 20 20 |. }. | |
|00002360| 20 7d 0a 20 20 0a 21 20 | 20 20 20 20 20 20 20 20 | }. .! | |
|00002370| 69 66 20 28 63 63 3e 3d | 30 78 30 30 20 26 26 20 |if (cc>=|0x00 && |
|00002380| 63 63 3c 3d 30 78 31 46 | 29 20 20 20 20 20 20 20 |cc<=0x1F|) |
|00002390| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 20 43 30 20 | | /* C0 |
|000023a0| 63 6f 6e 74 72 6f 6c 20 | 2d 3e 20 43 2d 20 20 20 |control |-> C- |
|000023b0| 20 20 2a 2f 0a 21 20 20 | 20 20 20 20 20 20 20 20 | */.! | |
|000023c0| 20 63 63 20 3d 20 43 54 | 52 4c 20 7c 20 28 63 63 | cc = CT|RL | (cc|
|000023d0| 2b 27 40 27 29 3b 0a 20 | 20 0a 21 20 09 20 20 20 |+'@');. | .! . |
|000023e0| 20 72 65 74 75 72 6e 20 | 28 63 63 29 3b 0a 20 20 | return |(cc);. |
|000023f0| 0a 20 20 7d 0a 20 20 0a | 2a 2a 2a 2a 2a 2a 2a 2a |. }. .|********|
|00002400| 2a 2a 2a 2a 2a 2a 2a 0a | 2a 2a 2a 20 34 31 35 2c |*******.|*** 415,|
|00002410| 34 32 31 20 2a 2a 2a 2a | 0a 2d 2d 2d 20 34 37 34 |421 ****|.--- 474|
|00002420| 2c 34 39 37 20 2d 2d 2d | 2d 0a 20 20 20 20 20 20 |,497 ---|-. |
|00002430| 6c 6f 6e 67 6a 6d 70 28 | 61 6c 72 6d 5f 73 74 61 |longjmp(|alrm_sta|
|00002440| 74 65 2c 20 31 29 3b 0a | 20 20 7d 0a 20 20 0a 2b |te, 1);.| }. .+|
|00002450| 20 23 69 66 64 65 66 20 | 49 53 43 0a 2b 20 2f 2a | #ifdef |ISC.+ /*|
|00002460| 0a 2b 20 20 2a 20 64 6f | 5f 69 6e 74 5f 73 69 67 |.+ * do|_int_sig|
|00002470| 6e 61 6c 20 2d 20 6a 75 | 6d 70 20 62 61 63 6b 20 |nal - ju|mp back |
|00002480| 69 6e 20 74 68 65 20 73 | 74 61 63 6b 20 74 6f 20 |in the s|tack to |
|00002490| 77 68 65 72 65 20 77 65 | 20 63 61 6e 20 68 61 6e |where we| can han|
|000024a0| 64 6c 65 20 74 68 69 73 | 0a 2b 20 20 2a 2f 0a 2b |dle this|.+ */.+|
|000024b0| 20 20 2f 2a 20 20 49 20 | 64 6f 6e 27 74 20 6b 6e | /* I |don't kn|
|000024c0| 6f 77 20 68 6f 77 20 74 | 68 69 73 20 77 6f 72 6b |ow how t|his work|
|000024d0| 73 20 66 6f 72 20 6f 74 | 68 65 72 20 4f 53 27 73 |s for ot|her OS's|
|000024e0| 21 20 20 53 65 65 6d 73 | 20 6c 69 6b 65 20 61 20 |! Seems| like a |
|000024f0| 62 75 67 2c 20 6e 6f 3f | 20 2a 2f 0a 2b 20 0a 2b |bug, no?| */.+ .+|
|00002500| 20 53 49 47 54 59 50 45 | 20 64 6f 5f 69 6e 74 5f | SIGTYPE| do_int_|
|00002510| 73 69 67 6e 61 6c 28 29 | 0a 2b 20 7b 0a 2b 20 65 |signal()|.+ {.+ e|
|00002520| 78 74 65 72 6e 09 6a 6d | 70 5f 62 75 66 09 66 69 |xtern.jm|p_buf.fi|
|00002530| 6e 73 74 61 74 65 3b 20 | 20 20 20 2f 2a 20 73 74 |nstate; | /* st|
|00002540| 61 63 6b 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ack envi|ronment |
|00002550| 74 6f 20 72 65 74 75 72 | 6e 20 63 6f 64 65 73 20 |to retur|n codes |
|00002560| 5b 70 69 63 6f 2e 63 5d | 20 2a 2f 0a 2b 20 09 09 |[pico.c]| */.+ ..|
|00002570| 09 2f 2a 20 54 68 69 73 | 20 77 69 6c 6c 20 68 61 |./* This| will ha|
|00002580| 6e 64 6c 65 20 53 49 47 | 49 4e 54 20 2a 2f 0a 2b |ndle SIG|INT */.+|
|00002590| 20 0a 2b 20 20 20 20 20 | 69 66 28 66 6f 72 5f 70 | .+ |if(for_p|
|000025a0| 69 6e 65 29 7b 0a 2b 20 | 09 73 69 67 6e 61 6c 28 |ine){.+ |.signal(|
|000025b0| 53 49 47 49 4e 54 2c 20 | 28 53 49 47 54 59 50 45 |SIGINT, |(SIGTYPE|
|000025c0| 20 2a 29 64 6f 5f 69 6e | 74 5f 73 69 67 6e 61 6c | *)do_in|t_signal|
|000025d0| 29 3b 0a 2b 20 09 61 62 | 6f 72 74 5f 63 6f 6d 70 |);.+ .ab|ort_comp|
|000025e0| 6f 73 65 72 28 31 2c 30 | 29 3b 0a 2b 20 20 20 20 |oser(1,0|);.+ |
|000025f0| 20 7d 0a 2b 20 7d 0a 20 | 20 0a 2b 20 23 65 6e 64 | }.+ }. | .+ #end|
|00002600| 69 66 0a 20 20 0a 20 20 | 2f 2a 0a 20 20 20 2a 20 |if. . |/*. * |
|00002610| 64 6f 5f 68 75 70 5f 73 | 69 67 6e 61 6c 20 2d 20 |do_hup_s|ignal - |
|00002620| 6a 75 6d 70 20 62 61 63 | 6b 20 69 6e 20 74 68 65 |jump bac|k in the|
|00002630| 20 73 74 61 63 6b 20 74 | 6f 20 77 68 65 72 65 20 | stack t|o where |
|00002640| 77 65 20 63 61 6e 20 68 | 61 6e 64 6c 65 20 74 68 |we can h|andle th|
|00002650| 69 73 0a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |is.*****|********|
|00002660| 2a 2a 0a 2a 2a 2a 20 36 | 35 33 2c 36 35 39 20 2a |**.*** 6|53,659 *|
|00002670| 2a 2a 2a 0a 2d 2d 2d 20 | 37 32 39 2c 37 33 39 20 |***.--- |729,739 |
|00002680| 2d 2d 2d 2d 0a 20 20 20 | 20 20 20 73 74 72 75 63 |----. | struc|
|00002690| 74 20 73 74 61 74 20 73 | 62 75 66 3b 0a 20 20 20 |t stat s|buf;. |
|000026a0| 20 20 20 63 68 61 72 20 | 20 20 69 6e 62 6f 78 5b | char | inbox[|
|000026b0| 32 35 36 5d 3b 0a 20 20 | 0a 2b 20 23 69 66 64 65 |256];. |.+ #ifde|
|000026c0| 66 20 49 53 43 0a 2b 20 | 20 20 20 20 73 70 72 69 |f ISC.+ | spri|
|000026d0| 6e 74 66 28 69 6e 62 6f | 78 2c 22 2f 75 73 72 2f |ntf(inbo|x,"/usr/|
|000026e0| 6d 61 69 6c 2f 25 73 22 | 2c 20 67 65 74 6c 6f 67 |mail/%s"|, getlog|
|000026f0| 69 6e 28 29 29 3b 0a 2b | 20 23 65 6c 73 65 0a 20 |in());.+| #else. |
|00002700| 20 20 20 20 20 73 70 72 | 69 6e 74 66 28 69 6e 62 | spr|intf(inb|
|00002710| 6f 78 2c 22 2f 75 73 72 | 2f 73 70 6f 6f 6c 2f 6d |ox,"/usr|/spool/m|
|00002720| 61 69 6c 2f 25 73 22 2c | 20 67 65 74 6c 6f 67 69 |ail/%s",| getlogi|
|00002730| 6e 28 29 29 3b 0a 2b 20 | 23 65 6e 64 69 66 0a 20 |n());.+ |#endif. |
|00002740| 20 20 20 20 20 69 66 28 | 73 74 61 74 28 69 6e 62 | if(|stat(inb|
|00002750| 6f 78 2c 20 26 73 62 75 | 66 29 20 3d 3d 20 30 29 |ox, &sbu|f) == 0)|
|00002760| 7b 0a 20 20 09 72 65 74 | 20 3d 20 73 62 75 66 2e |{. .ret| = sbuf.|
|00002770| 73 74 5f 61 74 69 6d 65 | 20 3c 3d 20 73 62 75 66 |st_atime| <= sbuf|
|00002780| 2e 73 74 5f 6d 74 69 6d | 65 20 26 26 0a 20 20 09 |.st_mtim|e &&. .|
|00002790| 20 20 28 6c 61 73 74 63 | 68 6b 20 3c 20 73 62 75 | (lastc|hk < sbu|
|000027a0| 66 2e 73 74 5f 6d 74 69 | 6d 65 20 26 26 20 6c 61 |f.st_mti|me && la|
|000027b0| 73 74 63 68 6b 20 3c 20 | 73 62 75 66 2e 73 74 5f |stchk < |sbuf.st_|
|000027c0| 61 74 69 6d 65 29 3b 0a | 0a 0a 0a 2a 2a 2a 20 70 |atime);.|...*** p|
|000027d0| 69 63 6f 2e 63 09 54 68 | 75 20 4a 75 6e 20 20 34 |ico.c.Th|u Jun 4|
|000027e0| 20 31 39 3a 34 37 3a 33 | 36 20 31 39 39 32 0a 2d | 19:47:3|6 1992.-|
|000027f0| 2d 2d 20 6e 65 77 2f 70 | 69 63 6f 2e 63 09 54 75 |-- new/p|ico.c.Tu|
|00002800| 65 20 4d 61 79 20 31 39 | 20 31 39 3a 35 37 3a 30 |e May 19| 19:57:0|
|00002810| 37 20 31 39 39 32 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |7 1992.*|********|
|00002820| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 31 2c 34 20 2a |******.*|** 1,4 *|
|00002830| 2a 2a 2a 0a 21 20 73 74 | 61 74 69 63 20 63 68 61 |***.! st|atic cha|
|00002840| 72 20 72 63 73 69 64 5b | 5d 20 3d 20 22 24 49 64 |r rcsid[|] = "$Id|
|00002850| 3a 20 70 69 63 6f 2e 63 | 2c 76 20 31 2e 31 20 31 |: pico.c|,v 1.1 1|
|00002860| 39 39 32 2f 30 34 2f 32 | 37 20 32 30 3a 31 32 3a |992/04/2|7 20:12:|
|00002870| 33 32 20 61 6e 64 79 62 | 20 45 78 70 20 24 22 3b |32 andyb| Exp $";|
|00002880| 0a 20 20 0a 20 20 23 69 | 66 64 65 66 20 43 4f 4d |. . #i|fdef COM|
|00002890| 4d 45 4e 54 0a 20 20 24 | 4c 6f 67 3a 20 70 69 63 |MENT. $|Log: pic|
|000028a0| 6f 2e 63 2c 76 20 24 0a | 2d 2d 2d 20 31 2c 34 20 |o.c,v $.|--- 1,4 |
|000028b0| 2d 2d 2d 2d 0a 21 20 73 | 74 61 74 69 63 20 63 68 |----.! s|tatic ch|
|000028c0| 61 72 20 72 63 73 69 64 | 5b 5d 20 3d 20 22 24 49 |ar rcsid|[] = "$I|
|000028d0| 64 3a 20 70 69 63 6f 2e | 63 2c 76 20 31 2e 31 20 |d: pico.|c,v 1.1 |
|000028e0| 31 39 39 32 2f 30 34 2f | 32 37 20 32 30 3a 31 32 |1992/04/|27 20:12|
|000028f0| 3a 33 32 20 61 6e 64 79 | 62 20 45 78 70 20 61 6e |:32 andy|b Exp an|
|00002900| 64 79 62 20 24 22 3b 0a | 20 20 0a 20 20 23 69 66 |dyb $";.| . #if|
|00002910| 64 65 66 20 43 4f 4d 4d | 45 4e 54 0a 20 20 24 4c |def COMM|ENT. $L|
|00002920| 6f 67 3a 20 70 69 63 6f | 2e 63 2c 76 20 24 0a 2a |og: pico|.c,v $.*|
|00002930| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0a 2a |********|******.*|
|00002940| 2a 2a 20 37 35 2c 38 30 | 20 2a 2a 2a 2a 0a 2d 2d |** 75,80| ****.--|
|00002950| 2d 20 37 35 2c 38 33 20 | 2d 2d 2d 2d 0a 20 20 20 |- 75,83 |----. |
|00002960| 2a 20 33 2e 30 20 20 44 | 61 6e 69 65 6c 20 4c 61 |* 3.0 D|aniel La|
|00002970| 77 72 65 6e 63 65 2c 20 | 32 39 2d 44 65 63 2d 38 |wrence, |29-Dec-8|
|00002980| 35 0a 20 20 20 2a 09 31 | 36 2d 61 70 72 2d 38 36 |5. *.1|6-apr-86|
|00002990| 0a 20 20 20 2a 09 2d 20 | 75 70 64 61 74 65 64 20 |. *.- |updated |
|000029a0| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 20 61 6e |document|ation an|
|000029b0| 64 20 66 72 6f 7a 65 20 | 64 65 76 65 6c 6f 70 6d |d froze |developm|
|000029c0| 65 6e 74 20 66 6f 72 20 | 33 2e 36 20 6e 65 74 20 |ent for |3.6 net |
|000029d0| 72 65 6c 65 61 73 65 0a | 2b 20 20 2a 20 20 20 20 |release.|+ * |
|000029e0| 20 20 0a 2b 20 20 2a 20 | 20 20 20 20 20 41 6e 64 | .+ * | And|
|000029f0| 79 20 42 72 61 67 65 72 | 2c 20 31 38 2d 4d 61 79 |y Brager|, 18-May|
|00002a00| 2d 39 32 0a 2b 20 20 2a | 09 2d 20 50 6f 72 74 65 |-92.+ *|.- Porte|
|00002a10| 64 20 74 6f 20 49 53 43 | 20 55 6e 69 78 20 56 33 |d to ISC| Unix V3|
|00002a20| 20 33 2e 30 0a 20 20 20 | 2a 2f 0a 20 20 0a 20 20 | 3.0. |*/. . |
|00002a30| 23 69 6e 63 6c 75 64 65 | 20 20 20 20 20 20 20 20 |#include| |
|00002a40| 3c 73 74 64 69 6f 2e 68 | 3e 0a 2a 2a 2a 2a 2a 2a |<stdio.h|>.******|
|00002a50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0a 2a 2a 2a 20 31 33 |********|*.*** 13|
|00002a60| 39 2c 31 34 35 20 2a 2a | 2a 2a 0a 20 20 69 6e 74 |9,145 **|**. int|
|00002a70| 20 20 20 20 20 75 73 65 | 5f 73 75 73 70 65 6e 64 | use|_suspend|
|00002a80| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |; | |
|00002a90| 20 20 20 20 20 2f 2a 20 | 66 6c 61 67 20 74 6f 20 | /* |flag to |
|00002aa0| 61 6c 6c 6f 77 20 73 75 | 73 70 65 6e 73 69 6f 6e |allow su|spension|
|00002ab0| 20 20 20 20 20 2a 2f 0a | 20 20 69 6e 74 20 20 20 | */.| int |
|00002ac0| 20 20 5f 75 73 65 5f 66 | 6b 65 79 73 3b 20 20 20 | _use_f|keys; |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002ae0| 20 20 20 2f 2a 20 66 6c | 61 67 20 74 6f 20 73 69 | /* fl|ag to si|
|00002af0| 67 6e 61 6c 20 66 75 6e | 63 20 6b 65 79 20 75 73 |gnal fun|c key us|
|00002b00| 65 20 20 2a 2f 0a 20 20 | 7b 0a 21 20 20 20 20 20 |e */. |{.! |
|00002b10| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 20 20 20 |register| int |
|00002b20| 63 3b 0a 20 20 20 20 20 | 20 72 65 67 69 73 74 65 |c;. | registe|
|00002b30| 72 20 69 6e 74 20 20 20 | 20 66 3b 0a 20 20 20 20 |r int | f;. |
|00002b40| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 20 | regist|er int |
|00002b50| 20 20 6e 3b 0a 20 20 20 | 20 20 20 72 65 67 69 73 | n;. | regis|
|00002b60| 74 65 72 20 42 55 46 46 | 45 52 20 2a 62 70 3b 0a |ter BUFF|ER *bp;.|
|00002b70| 2d 2d 2d 20 31 34 32 2c | 31 34 38 20 2d 2d 2d 2d |--- 142,|148 ----|
|00002b80| 0a 20 20 69 6e 74 20 20 | 20 20 20 75 73 65 5f 73 |. int | use_s|
|00002b90| 75 73 70 65 6e 64 3b 20 | 20 20 20 20 20 20 20 20 |uspend; | |
|00002ba0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 66 6c | | /* fl|
|00002bb0| 61 67 20 74 6f 20 61 6c | 6c 6f 77 20 73 75 73 70 |ag to al|low susp|
|00002bc0| 65 6e 73 69 6f 6e 20 20 | 20 20 20 2a 2f 0a 20 20 |ension | */. |
|00002bd0| 69 6e 74 20 20 20 20 20 | 5f 75 73 65 5f 66 6b 65 |int |_use_fke|
|00002be0| 79 73 3b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ys; | |
|00002bf0| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 66 6c 61 67 | | /* flag|
|00002c00| 20 74 6f 20 73 69 67 6e | 61 6c 20 66 75 6e 63 20 | to sign|al func |
|00002c10| 6b 65 79 20 75 73 65 20 | 20 2a 2f 0a 20 20 7b 0a |key use | */. {.|
|00002c20| 21 20 20 20 20 20 72 65 | 67 69 73 74 65 72 20 69 |! re|gister i|
|00002c30| 6e 74 20 20 20 20 63 63 | 3b 0a 20 20 20 20 20 20 |nt cc|;. |
|00002c40| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 20 20 20 |register| int |
|00002c50| 66 3b 0a 20 20 20 20 20 | 20 72 65 67 69 73 74 65 |f;. | registe|
|00002c60| 72 20 69 6e 74 20 20 20 | 20 6e 3b 0a 20 20 20 20 |r int | n;. |
|00002c70| 20 20 72 65 67 69 73 74 | 65 72 20 42 55 46 46 45 | regist|er BUFFE|
|00002c80| 52 20 2a 62 70 3b 0a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |R *bp;.*|********|
|00002c90| 2a 2a 2a 2a 2a 2a 0a 2a | 2a 2a 20 32 34 30 2c 32 |******.*|** 240,2|
|00002ca0| 35 36 20 2a 2a 2a 2a 0a | 20 20 20 20 20 20 77 68 |56 ****.| wh|
|00002cb0| 69 6c 65 28 31 29 7b 0a | 20 20 09 75 70 64 61 74 |ile(1){.| .updat|
|00002cc0| 65 28 29 3b 09 09 09 09 | 2f 2a 20 46 69 78 20 75 |e();....|/* Fix u|
|00002cd0| 70 20 74 68 65 20 73 63 | 72 65 65 6e 20 20 20 20 |p the sc|reen |
|00002ce0| 2a 2f 0a 20 20 0a 21 20 | 09 63 20 3d 20 47 65 74 |*/. .! |.c = Get|
|00002cf0| 4b 65 79 28 29 3b 09 0a | 20 20 0a 21 20 09 69 66 |Key();..| .! .if|
|00002d00| 28 63 20 3d 3d 20 4e 4f | 44 41 54 41 20 7c 7c 20 |(c == NO|DATA || |
|00002d10| 74 69 6d 65 5f 74 6f 5f | 63 68 65 63 6b 28 29 29 |time_to_|check())|
|00002d20| 7b 09 2f 2a 20 6e 65 77 | 20 6d 61 69 6c 20 3f 20 |{./* new| mail ? |
|00002d30| 2a 2f 0a 21 20 09 20 20 | 20 20 69 66 28 6e 65 77 |*/.! . | if(new|
|00002d40| 5f 6d 61 69 6c 28 26 69 | 2c 20 30 2c 20 63 20 3d |_mail(&i|, 0, c =|
|00002d50| 3d 20 4e 4f 44 41 54 41 | 20 3f 20 30 20 3a 20 32 |= NODATA| ? 0 : 2|
|00002d60| 29 29 7b 0a 20 20 09 09 | 65 6d 6c 77 72 69 74 65 |)){. ..|emlwrite|
|00002d70| 28 22 22 29 3b 0a 21 20 | 09 09 64 69 73 70 6c 61 |("");.! |..displa|
|00002d80| 79 5f 6d 65 73 73 61 67 | 65 28 63 29 3b 0a 20 20 |y_messag|e(c);. |
|00002d90| 09 09 6d 70 72 65 73 66 | 20 3d 20 31 3b 0a 20 20 |..mpresf| = 1;. |
|00002da0| 09 20 20 20 20 7d 0a 20 | 20 09 20 20 20 20 69 66 |. }. | . if|
|00002db0| 28 69 29 0a 20 20 09 20 | 20 20 20 20 20 6d 6f 76 |(i). . | mov|
|00002dc0| 65 63 75 72 73 6f 72 28 | 30 2c 20 30 29 3b 0a 21 |ecursor(|0, 0);.!|
|00002dd0| 20 09 20 20 20 20 69 66 | 28 63 20 3d 3d 20 4e 4f | . if|(c == NO|
|00002de0| 44 41 54 41 29 09 09 2f | 2a 20 6e 6f 20 6f 70 2c |DATA)../|* no op,|
|00002df0| 20 67 65 74 6b 65 79 20 | 74 69 6d 65 64 20 6f 75 | getkey |timed ou|
|00002e00| 74 20 2a 2f 0a 20 20 09 | 20 20 20 20 20 20 63 6f |t */. .| co|
|00002e10| 6e 74 69 6e 75 65 3b 0a | 20 20 09 7d 0a 20 20 0a |ntinue;.| .}. .|
|00002e20| 2d 2d 2d 20 32 34 33 2c | 32 35 39 20 2d 2d 2d 2d |--- 243,|259 ----|
|00002e30| 0a 20 20 20 20 20 20 77 | 68 69 6c 65 28 31 29 7b |. w|hile(1){|
|00002e40| 0a 20 20 09 75 70 64 61 | 74 65 28 29 3b 09 09 09 |. .upda|te();...|
|00002e50| 09 2f 2a 20 46 69 78 20 | 75 70 20 74 68 65 20 73 |./* Fix |up the s|
|00002e60| 63 72 65 65 6e 20 20 20 | 20 2a 2f 0a 20 20 0a 21 |creen | */. .!|
|00002e70| 20 09 63 63 20 3d 20 47 | 65 74 4b 65 79 28 29 3b | .cc = G|etKey();|
|00002e80| 09 0a 20 20 0a 21 20 09 | 69 66 28 63 63 20 3d 3d |.. .! .|if(cc ==|
|00002e90| 20 4e 4f 44 41 54 41 20 | 7c 7c 20 74 69 6d 65 5f | NODATA ||| time_|
|00002ea0| 74 6f 5f 63 68 65 63 6b | 28 29 29 7b 09 2f 2a 20 |to_check|()){./* |
|00002eb0| 6e 65 77 20 6d 61 69 6c | 20 3f 20 2a 2f 0a 21 20 |new mail| ? */.! |
|00002ec0| 09 20 20 20 20 69 66 28 | 6e 65 77 5f 6d 61 69 6c |. if(|new_mail|
|00002ed0| 28 26 69 2c 20 30 2c 20 | 63 63 20 3d 3d 20 4e 4f |(&i, 0, |cc == NO|
|00002ee0| 44 41 54 41 20 3f 20 30 | 20 3a 20 32 29 29 7b 0a |DATA ? 0| : 2)){.|
|00002ef0| 20 20 09 09 65 6d 6c 77 | 72 69 74 65 28 22 22 29 | ..emlw|rite("")|
|00002f00| 3b 0a 21 20 09 09 64 69 | 73 70 6c 61 79 5f 6d 65 |;.! ..di|splay_me|
|00002f10| 73 73 61 67 65 28 63 63 | 29 3b 0a 20 20 09 09 6d |ssage(cc|);. ..m|
|00002f20| 70 72 65 73 66 20 3d 20 | 31 3b 0a 20 20 09 20 20 |presf = |1;. . |
|00002f30| 20 20 7d 0a 20 20 09 20 | 20 20 20 69 66 28 69 29 | }. . | if(i)|
|00002f40| 0a 20 20 09 20 20 20 20 | 20 20 6d 6f 76 65 63 75 |. . | movecu|
|00002f50| 72 73 6f 72 28 30 2c 20 | 30 29 3b 0a 21 20 09 20 |rsor(0, |0);.! . |
|00002f60| 20 20 20 69 66 28 63 63 | 20 3d 3d 20 4e 4f 44 41 | if(cc| == NODA|
|00002f70| 54 41 29 09 09 2f 2a 20 | 6e 6f 20 6f 70 2c 20 67 |TA)../* |no op, g|
|00002f80| 65 74 6b 65 79 20 74 69 | 6d 65 64 20 6f 75 74 20 |etkey ti|med out |
|00002f90| 2a 2f 0a 20 20 09 20 20 | 20 20 20 20 63 6f 6e 74 |*/. . | cont|
|00002fa0| 69 6e 75 65 3b 0a 20 20 | 09 7d 0a 20 20 0a 2a 2a |inue;. |.}. .**|
|00002fb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0a 2a 2a |********|*****.**|
|00002fc0| 2a 20 32 36 33 2c 32 36 | 39 20 2a 2a 2a 2a 0a 20 |* 263,26|9 ****. |
|00002fd0| 20 09 66 20 3d 20 46 41 | 4c 53 45 3b 0a 20 20 09 | .f = FA|LSE;. .|
|00002fe0| 6e 20 3d 20 31 3b 0a 20 | 20 09 0a 21 20 09 65 78 |n = 1;. | ..! .ex|
|00002ff0| 65 63 75 74 65 28 63 2c | 20 66 2c 20 6e 29 3b 09 |ecute(c,| f, n);.|
|00003000| 09 2f 2a 20 44 6f 20 69 | 74 2e 20 20 20 20 20 20 |./* Do i|t. |
|00003010| 20 20 20 20 20 20 20 20 | 20 2a 2f 0a 20 20 20 20 | | */. |
|00003020| 20 20 7d 0a 20 20 7d 0a | 20 20 0a 2d 2d 2d 20 32 | }. }.| .--- 2|
|00003030| 36 36 2c 32 37 32 20 2d | 2d 2d 2d 0a 20 20 09 66 |66,272 -|---. .f|
|00003040| 20 3d 20 46 41 4c 53 45 | 3b 0a 20 20 09 6e 20 3d | = FALSE|;. .n =|
|00003050| 20 31 3b 0a 20 20 09 0a | 21 20 09 65 78 65 63 75 | 1;. ..|! .execu|
|00003060| 74 65 28 63 63 2c 20 66 | 2c 20 6e 29 3b 09 09 2f |te(cc, f|, n);../|
|00003070| 2a 20 44 6f 20 69 74 2e | 20 20 20 20 20 20 20 20 |* Do it.| |
|00003080| 20 20 20 20 20 20 20 2a | 2f 0a 20 20 20 20 20 20 | *|/. |
|00003090| 7d 0a 20 20 7d 0a 20 20 | 0a 2a 2a 2a 2a 2a 2a 2a |}. }. |.*******|
|000030a0| 2a 2a 2a 2a 2a 2a 2a 2a | 0a 2a 2a 2a 20 34 33 31 |********|.*** 431|
|000030b0| 2c 34 34 35 20 2a 2a 2a | 2a 0a 20 20 20 20 20 20 |,445 ***|*. |
|000030c0| 20 20 20 20 77 71 75 69 | 74 28 66 2c 20 6e 29 3b | wqui|t(f, n);|
|000030d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000030e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|000030f0| 63 6f 6e 64 69 74 69 6f | 6e 61 6c 6c 79 20 71 75 |conditio|nally qu|
|00003100| 69 74 20 20 20 2a 2f 0a | 20 20 7d 0a 20 20 0a 2d |it */.| }. .-|
|00003110| 20 0a 2d 20 0a 20 20 2f | 2a 20 0a 20 20 20 2a 20 | .- . /|* . * |
|00003120| 61 62 6f 72 74 5f 63 6f | 6d 70 6f 73 65 72 20 2d |abort_co|mposer -|
|00003130| 20 61 73 6b 20 74 68 65 | 20 71 75 65 73 74 69 6f | ask the| questio|
|00003140| 6e 20 68 65 72 65 2c 20 | 74 68 65 6e 20 67 6f 20 |n here, |then go |
|00003150| 71 75 69 74 20 6f 72 20 | 0a 20 20 20 2a 20 20 20 |quit or |. * |
|00003160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r|
|00003170| 65 74 75 72 6e 20 46 41 | 4c 53 45 0a 20 20 20 2a |eturn FA|LSE. *|
|00003180| 2f 0a 20 20 61 62 6f 72 | 74 5f 63 6f 6d 70 6f 73 |/. abor|t_compos|
|00003190| 65 72 28 66 2c 6e 29 0a | 20 20 7b 0a 21 20 09 69 |er(f,n).| {.! .i|
|000031a0| 66 28 6d 6c 64 79 65 73 | 6e 6f 28 22 43 61 6e 63 |f(mldyes|no("Canc|
|000031b0| 65 6c 6c 69 6e 67 20 77 | 69 6c 6c 20 61 62 61 6e |elling w|ill aban|
|000031c0| 64 6f 6e 20 79 6f 75 72 | 20 6d 61 69 6c 20 6d 65 |don your| mail me|
|000031d0| 73 73 61 67 65 2e 20 20 | 43 61 6e 63 65 6c 22 2c |ssage. |Cancel",|
|000031e0| 20 0a 20 20 09 09 20 20 | 20 20 46 41 4c 53 45 29 | . .. | FALSE)|
|000031f0| 20 3d 3d 20 54 52 55 45 | 29 0a 20 20 09 20 20 6c | == TRUE|). . l|
|00003200| 6f 6e 67 6a 6d 70 28 66 | 69 6e 73 74 61 74 65 2c |ongjmp(f|instate,|
|00003210| 20 43 4f 4d 50 5f 43 41 | 4e 43 45 4c 29 3b 0a 20 | COMP_CA|NCEL);. |
|00003220| 20 09 65 6c 73 65 0a 2d | 2d 2d 20 34 33 34 2c 34 | .else.-|-- 434,4|
|00003230| 34 37 20 2d 2d 2d 2d 0a | 20 20 20 20 20 20 20 20 |47 ----.| |
|00003240| 20 20 77 71 75 69 74 28 | 66 2c 20 6e 29 3b 20 20 | wquit(|f, n); |
|00003250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003260| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 63 6f | | /* co|
|00003270| 6e 64 69 74 69 6f 6e 61 | 6c 6c 79 20 71 75 69 74 |nditiona|lly quit|
|00003280| 20 20 20 2a 2f 0a 20 20 | 7d 0a 20 20 0a 20 20 2f | */. |}. . /|
|00003290| 2a 20 0a 20 20 20 2a 20 | 61 62 6f 72 74 5f 63 6f |* . * |abort_co|
|000032a0| 6d 70 6f 73 65 72 20 2d | 20 61 73 6b 20 74 68 65 |mposer -| ask the|
|000032b0| 20 71 75 65 73 74 69 6f | 6e 20 68 65 72 65 2c 20 | questio|n here, |
|000032c0| 74 68 65 6e 20 67 6f 20 | 71 75 69 74 20 6f 72 20 |then go |quit or |
|000032d0| 0a 20 20 20 2a 20 20 20 | 20 20 20 20 20 20 20 20 |. * | |
|000032e0| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 20 46 41 | r|eturn FA|
|000032f0| 4c 53 45 0a 20 20 20 2a | 2f 0a 2b 20 0a 20 20 61 |LSE. *|/.+ . a|
|00003300| 62 6f 72 74 5f 63 6f 6d | 70 6f 73 65 72 28 66 2c |bort_com|poser(f,|
|00003310| 6e 29 0a 20 20 7b 0a 21 | 20 09 69 66 28 6d 6c 64 |n). {.!| .if(mld|
|00003320| 79 65 73 6e 6f 28 22 43 | 61 6e 63 65 6c 6c 69 6e |yesno("C|ancellin|
|00003330| 67 20 77 69 6c 6c 20 61 | 62 61 6e 64 6f 6e 20 79 |g will a|bandon y|
|00003340| 6f 75 72 20 6d 65 73 73 | 61 67 65 2e 20 20 43 61 |our mess|age. Ca|
|00003350| 6e 63 65 6c 22 2c 20 0a | 20 20 09 09 20 20 20 20 |ncel", .| .. |
|00003360| 46 41 4c 53 45 29 20 3d | 3d 20 54 52 55 45 29 0a |FALSE) =|= TRUE).|
|00003370| 20 20 09 20 20 6c 6f 6e | 67 6a 6d 70 28 66 69 6e | . lon|gjmp(fin|
|00003380| 73 74 61 74 65 2c 20 43 | 4f 4d 50 5f 43 41 4e 43 |state, C|OMP_CANC|
|00003390| 45 4c 29 3b 0a 20 20 09 | 65 6c 73 65 0a 0a 0a 0a |EL);. .|else....|
|000033a0| 2a 2a 2a 20 74 63 61 70 | 2e 63 09 54 68 75 20 4a |*** tcap|.c.Thu J|
|000033b0| 75 6e 20 20 34 20 31 39 | 3a 35 30 3a 33 36 20 31 |un 4 19|:50:36 1|
|000033c0| 39 39 32 0a 2d 2d 2d 20 | 6e 65 77 2f 74 63 61 70 |992.--- |new/tcap|
|000033d0| 2e 63 09 54 75 65 20 4d | 61 79 20 31 39 20 31 39 |.c.Tue M|ay 19 19|
|000033e0| 3a 35 37 3a 30 37 20 31 | 39 39 32 0a 2a 2a 2a 2a |:57:07 1|992.****|
|000033f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0a 2a 2a 2a 20 |********|***.*** |
|00003400| 31 2c 37 20 2a 2a 2a 2a | 0a 21 20 73 74 61 74 69 |1,7 ****|.! stati|
|00003410| 63 20 63 68 61 72 20 72 | 63 73 69 64 5b 5d 20 3d |c char r|csid[] =|
|00003420| 20 22 24 49 64 3a 20 74 | 63 61 70 2e 63 2c 76 20 | "$Id: t|cap.c,v |
|00003430| 31 2e 31 20 31 39 39 32 | 2f 30 34 2f 32 37 20 32 |1.1 1992|/04/27 2|
|00003440| 30 3a 31 32 3a 33 32 20 | 61 6e 64 79 62 20 45 78 |0:12:32 |andyb Ex|
|00003450| 70 20 24 22 3b 0a 20 20 | 0a 20 20 23 69 66 64 65 |p $";. |. #ifde|
|00003460| 66 20 43 4f 4d 4d 45 4e | 54 0a 20 20 24 4c 6f 67 |f COMMEN|T. $Log|
|00003470| 3a 20 74 63 61 70 2e 63 | 2c 76 20 24 0a 20 20 20 |: tcap.c|,v $. |
|00003480| 2a 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 31 20 20 |* Revisi|on 1.1 |
|00003490| 31 39 39 32 2f 30 34 2f | 32 37 20 20 32 30 3a 31 |1992/04/|27 20:1|
|000034a0| 32 3a 33 32 20 20 61 6e | 64 79 62 0a 20 20 20 2a |2:32 an|dyb. *|
|000034b0| 20 49 6e 69 74 69 61 6c | 20 72 65 76 69 73 69 6f | Initial| revisio|
|000034c0| 6e 0a 20 20 20 2a 0a 2d | 2d 2d 20 31 2c 31 30 20 |n. *.-|-- 1,10 |
|000034d0| 2d 2d 2d 2d 0a 21 20 73 | 74 61 74 69 63 20 63 68 |----.! s|tatic ch|
|000034e0| 61 72 20 72 63 73 69 64 | 5b 5d 20 3d 20 22 24 49 |ar rcsid|[] = "$I|
|000034f0| 64 3a 20 74 63 61 70 2e | 63 2c 76 20 31 2e 32 20 |d: tcap.|c,v 1.2 |
|00003500| 31 39 39 32 2f 30 34 2f | 32 37 20 32 30 3a 35 35 |1992/04/|27 20:55|
|00003510| 3a 30 32 20 61 6e 64 79 | 62 20 45 78 70 20 61 6e |:02 andy|b Exp an|
|00003520| 64 79 62 20 24 22 3b 0a | 20 20 0a 20 20 23 69 66 |dyb $";.| . #if|
|00003530| 64 65 66 20 43 4f 4d 4d | 45 4e 54 0a 20 20 24 4c |def COMM|ENT. $L|
|00003540| 6f 67 3a 20 74 63 61 70 | 2e 63 2c 76 20 24 0a 2b |og: tcap|.c,v $.+|
|00003550| 20 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 31 2e 32 | * Revi|sion 1.2|
|00003560| 20 20 31 39 39 32 2f 30 | 34 2f 32 37 20 20 32 30 | 1992/0|4/27 20|
|00003570| 3a 35 35 3a 30 32 20 20 | 61 6e 64 79 62 0a 2b 20 |:55:02 |andyb.+ |
|00003580| 20 2a 20 4d 6f 64 69 66 | 69 63 61 74 69 6f 6e 73 | * Modif|ications|
|00003590| 20 66 6f 72 20 49 53 43 | 20 55 6e 69 78 2e 0a 2b | for ISC| Unix..+|
|000035a0| 20 20 2a 0a 20 20 20 2a | 20 52 65 76 69 73 69 6f | *. *| Revisio|
|000035b0| 6e 20 31 2e 31 20 20 31 | 39 39 32 2f 30 34 2f 32 |n 1.1 1|992/04/2|
|000035c0| 37 20 20 32 30 3a 31 32 | 3a 33 32 20 20 61 6e 64 |7 20:12|:32 and|
|000035d0| 79 62 0a 20 20 20 2a 20 | 49 6e 69 74 69 61 6c 20 |yb. * |Initial |
|000035e0| 72 65 76 69 73 69 6f 6e | 0a 20 20 20 2a 0a 2a 2a |revision|. *.**|
|000035f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0a 2a 2a |********|*****.**|
|00003600| 2a 20 35 33 2c 36 33 20 | 2a 2a 2a 2a 0a 20 20 23 |* 53,63 |****. #|
|00003610| 69 6e 63 6c 75 64 65 09 | 22 6f 73 64 65 70 2e 68 |include.|"osdep.h|
|00003620| 22 0a 20 20 0a 20 20 23 | 69 66 20 54 45 52 4d 43 |". . #|if TERMC|
|00003630| 41 50 0a 2d 20 23 69 6e | 63 6c 75 64 65 20 3c 73 |AP.- #in|clude <s|
|00003640| 79 73 2f 69 6f 63 74 6c | 2e 68 3e 0a 20 20 23 69 |ys/ioctl|.h>. #i|
|00003650| 6e 63 6c 75 64 65 20 20 | 20 20 20 20 20 20 22 70 |nclude | "p|
|00003660| 69 63 6f 2e 68 22 0a 20 | 20 23 69 6e 63 6c 75 64 |ico.h". | #includ|
|00003670| 65 20 20 20 20 20 20 20 | 20 3c 73 69 67 6e 61 6c |e | <signal|
|00003680| 2e 68 3e 0a 21 20 23 69 | 6e 63 6c 75 64 65 20 20 |.h>.! #i|nclude |
|00003690| 20 20 20 20 20 20 3c 73 | 67 74 74 79 2e 68 3e 0a | <s|gtty.h>.|
|000036a0| 20 20 23 69 6e 63 6c 75 | 64 65 20 20 20 20 20 20 | #inclu|de |
|000036b0| 20 20 3c 73 79 73 2f 74 | 74 79 64 65 76 2e 68 3e | <sys/t|tydev.h>|
|000036c0| 0a 20 20 0a 20 20 23 64 | 65 66 69 6e 65 20 4e 52 |. . #d|efine NR|
|000036d0| 4f 57 20 20 20 20 32 34 | 0a 20 20 23 64 65 66 69 |OW 24|. #defi|
|000036e0| 6e 65 20 4e 43 4f 4c 20 | 20 20 20 38 30 0a 2d 2d |ne NCOL | 80.--|
|000036f0| 2d 20 35 36 2c 37 32 20 | 2d 2d 2d 2d 0a 20 20 23 |- 56,72 |----. #|
|00003700| 69 6e 63 6c 75 64 65 09 | 22 6f 73 64 65 70 2e 68 |include.|"osdep.h|
|00003710| 22 0a 20 20 0a 20 20 23 | 69 66 20 54 45 52 4d 43 |". . #|if TERMC|
|00003720| 41 50 0a 20 20 23 69 6e | 63 6c 75 64 65 20 20 20 |AP. #in|clude |
|00003730| 20 20 20 20 20 22 70 69 | 63 6f 2e 68 22 0a 20 20 | "pi|co.h". |
|00003740| 23 69 6e 63 6c 75 64 65 | 20 20 20 20 20 20 20 20 |#include| |
|00003750| 3c 73 69 67 6e 61 6c 2e | 68 3e 0a 21 20 23 69 6e |<signal.|h>.! #in|
|00003760| 63 6c 75 64 65 20 20 20 | 20 20 20 20 20 3c 73 67 |clude | <sg|
|00003770| 74 74 79 2e 68 3e 20 2f | 2a 20 42 6f 74 68 20 3c |tty.h> /|* Both <|
|00003780| 73 79 73 2f 74 74 6f 6c | 64 2e 68 3e 20 61 6e 64 |sys/ttol|d.h> and|
|00003790| 20 3c 73 67 74 74 79 2e | 68 3e 20 73 65 65 6d 20 | <sgtty.|h> seem |
|000037a0| 74 6f 20 77 6f 72 6b 20 | 2a 2f 0a 21 20 23 69 66 |to work |*/.! #if|
|000037b0| 6e 64 65 66 20 49 53 43 | 0a 20 20 23 69 6e 63 6c |ndef ISC|. #incl|
|000037c0| 75 64 65 20 20 20 20 20 | 20 20 20 3c 73 79 73 2f |ude | <sys/|
|000037d0| 74 74 79 64 65 76 2e 68 | 3e 0a 2b 20 23 65 6c 73 |ttydev.h|>.+ #els|
|000037e0| 65 0a 2b 20 23 64 65 66 | 69 6e 65 20 42 39 36 30 |e.+ #def|ine B960|
|000037f0| 30 20 31 35 20 2f 2a 20 | 54 68 69 73 20 69 73 20 |0 15 /* |This is |
|00003800| 69 6e 20 3c 74 65 72 6d | 69 6f 2e 68 3e 2c 20 3c |in <term|io.h>, <|
|00003810| 74 65 72 6d 69 6f 73 2e | 68 3e 20 28 79 65 73 2c |termios.|h> (yes,|
|00003820| 20 77 69 74 68 20 61 6e | 20 27 73 27 29 2c 20 0a | with an| 's'), .|
|00003830| 2b 20 09 09 09 3c 73 67 | 74 74 79 2e 68 3e 20 61 |+ ...<sg|tty.h> a|
|00003840| 6e 64 20 3c 73 79 73 2f | 74 65 72 6d 69 6f 2e 68 |nd <sys/|termio.h|
|00003850| 3e 2e 20 20 49 6e 20 3c | 73 67 74 74 79 2e 68 3e |>. In <|sgtty.h>|
|00003860| 20 69 74 20 69 73 20 0a | 2b 20 09 09 09 64 65 66 | it is .|+ ...def|
|00003870| 69 6e 65 64 20 61 73 20 | 31 33 2e 09 45 76 65 72 |ined as |13..Ever|
|00003880| 79 77 68 65 72 65 20 65 | 6c 73 65 20 61 73 20 31 |ywhere e|lse as 1|
|00003890| 35 2e 20 20 57 68 61 74 | 20 61 20 6d 65 73 73 2e |5. What| a mess.|
|000038a0| 0a 2b 20 09 09 09 2a 2f | 0a 2b 20 23 65 6e 64 69 |.+ ...*/|.+ #endi|
|000038b0| 66 0a 20 20 0a 20 20 23 | 64 65 66 69 6e 65 20 4e |f. . #|define N|
|000038c0| 52 4f 57 20 20 20 20 32 | 34 0a 20 20 23 64 65 66 |ROW 2|4. #def|
|000038d0| 69 6e 65 20 4e 43 4f 4c | 20 20 20 20 38 30 0a 0a |ine NCOL| 80..|
|000038e0| 0a 0a 23 0a 23 20 4d 61 | 6b 65 66 69 6c 65 20 66 |..#.# Ma|kefile f|
|000038f0| 6f 72 20 42 65 72 6b 65 | 6c 65 79 20 55 4e 49 58 |or Berke|ley UNIX|
|00003900| 20 28 34 2e 33 62 73 64 | 29 20 6f 66 20 74 68 65 | (4.3bsd|) of the|
|00003910| 20 50 49 4e 45 20 63 6f | 6d 70 6f 73 65 72 20 6c | PINE co|mposer l|
|00003920| 69 62 72 61 72 79 20 61 | 6e 64 20 0a 23 20 73 74 |ibrary a|nd .# st|
|00003930| 61 6e 64 2d 61 6c 6f 6e | 65 20 65 64 69 74 6f 72 |and-alon|e editor|
|00003940| 20 70 69 63 6f 2e 0a 23 | 0a 0a 44 41 53 48 4f 3d | pico..#|..DASHO=|
|00003950| 09 09 0a 0a 23 69 6e 63 | 6c 75 64 65 73 20 73 79 |....#inc|ludes sy|
|00003960| 6d 62 6f 6c 20 69 6e 66 | 6f 20 66 6f 72 20 64 65 |mbol inf|o for de|
|00003970| 62 75 67 67 69 6e 67 20 | 0a 43 46 4c 41 47 53 3d |bugging |.CFLAGS=|
|00003980| 09 09 2d 67 20 2d 49 2f | 75 73 72 2f 69 6e 63 6c |..-g -I/|usr/incl|
|00003990| 75 64 65 20 2d 44 62 73 | 64 20 2d 44 49 53 43 0a |ude -Dbs|d -DISC.|
|000039a0| 0a 23 66 6f 72 20 74 68 | 65 20 6e 6f 72 6d 61 6c |.#for th|e normal|
|000039b0| 20 6c 69 62 72 61 72 79 | 0a 23 43 46 4c 41 47 53 | library|.#CFLAGS|
|000039c0| 3d 09 2d 4f 20 2d 49 2f | 75 73 72 2f 69 6e 63 6c |=.-O -I/|usr/incl|
|000039d0| 75 64 65 20 2d 44 62 73 | 64 0a 0a 23 20 73 77 69 |ude -Dbs|d..# swi|
|000039e0| 74 63 68 65 73 20 66 6f | 72 20 6c 69 62 72 61 72 |tches fo|r librar|
|000039f0| 79 20 62 75 69 6c 64 69 | 6e 67 0a 4c 49 42 3d 61 |y buildi|ng.LIB=a|
|00003a00| 72 0a 4c 49 42 41 52 47 | 53 3d 72 75 0a 0a 4f 46 |r.LIBARG|S=ru..OF|
|00003a10| 49 4c 45 53 3d 09 09 61 | 6e 73 69 2e 6f 20 62 61 |ILES=..a|nsi.o ba|
|00003a20| 73 69 63 2e 6f 20 62 69 | 6e 64 2e 6f 20 62 75 66 |sic.o bi|nd.o buf|
|00003a30| 66 65 72 2e 6f 20 63 6f | 6d 70 6f 73 65 72 2e 6f |fer.o co|mposer.o|
|00003a40| 20 64 69 73 70 6c 61 79 | 2e 6f 20 5c 0a 09 09 66 | display|.o \...f|
|00003a50| 69 6c 65 2e 6f 20 66 69 | 6c 65 69 6f 2e 6f 20 6c |ile.o fi|leio.o l|
|00003a60| 69 6e 65 2e 6f 20 6f 73 | 64 65 70 2e 6f 20 70 69 |ine.o os|dep.o pi|
|00003a70| 63 6f 2e 6f 20 72 61 6e | 64 6f 6d 2e 6f 20 73 65 |co.o ran|dom.o se|
|00003a80| 61 72 63 68 2e 6f 20 5c | 0a 09 09 73 70 65 6c 6c |arch.o \|...spell|
|00003a90| 2e 6f 20 74 63 61 70 2e | 6f 20 77 69 6e 64 6f 77 |.o tcap.|o window|
|00003aa0| 2e 6f 20 77 6f 72 64 2e | 6f 0a 0a 43 46 49 4c 45 |.o word.|o..CFILE|
|00003ab0| 53 3d 09 09 61 6e 73 69 | 2e 63 20 62 61 73 69 63 |S=..ansi|.c basic|
|00003ac0| 2e 63 20 62 69 6e 64 2e | 63 20 62 75 66 66 65 72 |.c bind.|c buffer|
|00003ad0| 2e 63 20 63 6f 6d 70 6f | 73 65 72 2e 63 20 64 69 |.c compo|ser.c di|
|00003ae0| 73 70 6c 61 79 2e 63 20 | 5c 0a 09 09 66 69 6c 65 |splay.c |\...file|
|00003af0| 2e 63 20 66 69 6c 65 69 | 6f 2e 63 20 6c 69 6e 65 |.c filei|o.c line|
|00003b00| 2e 63 20 6f 73 64 65 70 | 2e 63 20 70 69 63 6f 2e |.c osdep|.c pico.|
|00003b10| 63 20 72 61 6e 64 6f 6d | 2e 63 20 73 65 61 72 63 |c random|.c searc|
|00003b20| 68 2e 63 20 5c 0a 09 09 | 73 70 65 6c 6c 2e 63 20 |h.c \...|spell.c |
|00003b30| 74 63 61 70 2e 63 20 77 | 69 6e 64 6f 77 2e 63 20 |tcap.c w|indow.c |
|00003b40| 77 6f 72 64 2e 63 0a 0a | 48 46 49 4c 45 53 3d 09 |word.c..|HFILES=.|
|00003b50| 09 65 73 74 72 75 63 74 | 2e 68 20 65 64 65 66 2e |.estruct|.h edef.|
|00003b60| 68 20 65 66 75 6e 63 2e | 68 20 65 62 69 6e 64 2e |h efunc.|h ebind.|
|00003b70| 68 20 70 69 63 6f 2e 68 | 0a 0a 52 41 4e 4c 49 42 |h pico.h|..RANLIB|
|00003b80| 3d 09 09 65 63 68 6f 0a | 0a 23 0a 23 20 64 65 70 |=..echo.|.#.# dep|
|00003b90| 65 6e 64 65 6e 63 69 65 | 73 20 66 6f 72 20 74 68 |endencie|s for th|
|00003ba0| 65 20 55 6e 69 78 20 76 | 65 72 73 69 6f 6e 73 20 |e Unix v|ersions |
|00003bb0| 6f 66 20 70 69 63 6f 20 | 61 6e 64 20 6c 69 62 70 |of pico |and libp|
|00003bc0| 69 63 6f 2e 61 0a 23 0a | 61 6c 6c 3a 09 09 70 69 |ico.a.#.|all:..pi|
|00003bd0| 63 6f 0a 0a 6f 73 64 65 | 70 2e 63 3a 09 6f 73 5f |co..osde|p.c:.os_|
|00003be0| 75 6e 69 78 2e 63 0a 09 | 09 72 6d 20 2d 66 20 6f |unix.c..|.rm -f o|
|00003bf0| 73 64 65 70 2e 63 0a 09 | 09 63 70 20 6f 73 5f 75 |sdep.c..|.cp os_u|
|00003c00| 6e 69 78 2e 63 20 6f 73 | 64 65 70 2e 63 0a 0a 6f |nix.c os|dep.c..o|
|00003c10| 73 64 65 70 2e 68 3a 09 | 6f 73 5f 62 73 64 2e 68 |sdep.h:.|os_bsd.h|
|00003c20| 0a 09 09 72 6d 20 2d 66 | 20 6f 73 64 65 70 2e 68 |...rm -f| osdep.h|
|00003c30| 0a 09 09 63 70 20 6f 73 | 5f 62 73 64 2e 68 20 6f |...cp os|_bsd.h o|
|00003c40| 73 64 65 70 2e 68 0a 0a | 6c 69 62 70 69 63 6f 2e |sdep.h..|libpico.|
|00003c50| 61 3a 09 6f 73 64 65 70 | 2e 63 20 6f 73 64 65 70 |a:.osdep|.c osdep|
|00003c60| 2e 68 20 24 28 4f 46 49 | 4c 45 53 29 0a 09 09 24 |.h $(OFI|LES)...$|
|00003c70| 28 4c 49 42 29 20 24 28 | 4c 49 42 41 52 47 53 29 |(LIB) $(|LIBARGS)|
|00003c80| 20 6c 69 62 70 69 63 6f | 2e 61 20 24 28 4f 46 49 | libpico|.a $(OFI|
|00003c90| 4c 45 53 29 0a 09 09 24 | 28 52 41 4e 4c 49 42 29 |LES)...$|(RANLIB)|
|00003ca0| 20 6c 69 62 70 69 63 6f | 2e 61 0a 0a 70 69 63 6f | libpico|.a..pico|
|00003cb0| 3a 09 09 6d 61 69 6e 2e | 63 20 6c 69 62 70 69 63 |:..main.|c libpic|
|00003cc0| 6f 2e 61 0a 09 09 24 28 | 43 43 29 20 24 28 43 46 |o.a...$(|CC) $(CF|
|00003cd0| 4c 41 47 53 29 20 6d 61 | 69 6e 2e 63 20 6c 69 62 |LAGS) ma|in.c lib|
|00003ce0| 70 69 63 6f 2e 61 20 2d | 6c 74 65 72 6d 63 61 70 |pico.a -|ltermcap|
|00003cf0| 20 2d 6c 63 20 2d 6f 20 | 70 69 63 6f 0a 0a 2e 63 | -lc -o |pico...c|
|00003d00| 2e 6f 3a 09 09 3b 20 24 | 28 43 43 29 20 2d 63 20 |.o:..; $|(CC) -c |
|00003d10| 24 28 43 46 4c 41 47 53 | 29 20 24 28 44 41 53 48 |$(CFLAGS|) $(DASH|
|00003d20| 4f 29 20 24 2a 2e 63 0a | 0a 24 28 4f 46 49 4c 45 |O) $*.c.|.$(OFILE|
|00003d30| 53 29 3a 09 24 28 48 46 | 49 4c 45 53 29 0a 0a 63 |S):.$(HF|ILES)..c|
|00003d40| 6c 65 61 6e 3a 0a 09 09 | 72 6d 20 2d 66 20 2a 2e |lean:...|rm -f *.|
|00003d50| 61 20 2a 2e 6f 20 2a 7e | 20 6f 73 64 65 70 2e 63 |a *.o *~| osdep.c|
|00003d60| 20 6f 73 64 65 70 2e 68 | 0a 0a | osdep.h|.. |
+--------+-------------------------+-------------------------+--------+--------+