home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume07 / gosip2 < prev    next >
SHell self-extracting ARchive  |  1991-08-27  |  100.2 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: gosip2

ConfidenceProgramDetectionMatch TypeSupport
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 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 application/mbox default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 64 65 63 | 77 72 6c 21 70 75 72 64 |From dec|wrl!purd|
|00000010| 75 65 21 68 61 76 65 6e | 21 61 70 6c 63 65 6e 21 |ue!haven|!aplcen!|
|00000020| 67 69 6e 6f 73 6b 6f 21 | 75 75 6e 65 74 21 61 6c |ginosko!|uunet!al|
|00000030| 6c 62 65 72 79 20 54 68 | 75 20 41 75 67 20 20 33 |lbery Th|u Aug 3|
|00000040| 20 30 38 3a 34 38 3a 32 | 33 20 50 44 54 20 31 39 | 08:48:2|3 PDT 19|
|00000050| 38 39 0a 41 72 74 69 63 | 6c 65 20 39 35 37 20 6f |89.Artic|le 957 o|
|00000060| 66 20 63 6f 6d 70 2e 73 | 6f 75 72 63 65 73 2e 6d |f comp.s|ources.m|
|00000070| 69 73 63 3a 0a 50 61 74 | 68 3a 20 64 65 63 77 72 |isc:.Pat|h: decwr|
|00000080| 6c 21 70 75 72 64 75 65 | 21 68 61 76 65 6e 21 61 |l!purdue|!haven!a|
|00000090| 70 6c 63 65 6e 21 67 69 | 6e 6f 73 6b 6f 21 75 75 |plcen!gi|nosko!uu|
|000000a0| 6e 65 74 21 61 6c 6c 62 | 65 72 79 0a 46 72 6f 6d |net!allb|ery.From|
|000000b0| 3a 20 61 6c 6c 62 65 72 | 79 40 75 75 6e 65 74 2e |: allber|y@uunet.|
|000000c0| 55 55 2e 4e 45 54 20 28 | 42 72 61 6e 64 6f 6e 20 |UU.NET (|Brandon |
|000000d0| 53 2e 20 41 6c 6c 62 65 | 72 79 20 2d 20 63 6f 6d |S. Allbe|ry - com|
|000000e0| 70 2e 73 6f 75 72 63 65 | 73 2e 6d 69 73 63 29 0a |p.source|s.misc).|
|000000f0| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000100| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 53 75 |.sources|.misc.Su|
|00000110| 62 6a 65 63 74 3a 20 76 | 30 37 69 30 36 35 3a 20 |bject: v|07i065: |
|00000120| 47 6f 73 69 70 20 2d 2d | 20 66 69 78 65 73 20 61 |Gosip --| fixes a|
|00000130| 20 6d 61 6a 6f 72 20 62 | 75 67 0a 4d 65 73 73 61 | major b|ug.Messa|
|00000140| 67 65 2d 49 44 3a 20 3c | 35 39 39 34 34 40 75 75 |ge-ID: <|59944@uu|
|00000150| 6e 65 74 2e 55 55 2e 4e | 45 54 3e 0a 44 61 74 65 |net.UU.N|ET>.Date|
|00000160| 3a 20 39 20 4a 75 6c 20 | 38 39 20 30 30 3a 33 32 |: 9 Jul |89 00:32|
|00000170| 3a 35 32 20 47 4d 54 0a | 53 65 6e 64 65 72 3a 20 |:52 GMT.|Sender: |
|00000180| 61 6c 6c 62 65 72 79 40 | 75 75 6e 65 74 2e 55 55 |allbery@|uunet.UU|
|00000190| 2e 4e 45 54 0a 52 65 70 | 6c 79 2d 54 6f 3a 20 41 |.NET.Rep|ly-To: A|
|000001a0| 6e 64 72 65 61 73 20 50 | 61 67 65 6c 20 3c 6d 61 |ndreas P|agel <ma|
|000001b0| 75 68 6b 40 63 75 2e 77 | 61 72 77 69 63 6b 2e 61 |uhk@cu.w|arwick.a|
|000001c0| 63 2e 75 6b 3e 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |c.uk>.Or|ganizati|
|000001d0| 6f 6e 3a 20 4d 61 74 68 | 65 6d 61 74 69 63 73 20 |on: Math|ematics |
|000001e0| 44 65 70 74 2e 2c 20 57 | 61 72 77 69 63 6b 20 55 |Dept., W|arwick U|
|000001f0| 6e 69 76 65 72 73 69 74 | 79 2c 20 55 4b 0a 4c 69 |niversit|y, UK.Li|
|00000200| 6e 65 73 3a 20 32 39 39 | 33 0a 41 70 70 72 6f 76 |nes: 299|3.Approv|
|00000210| 65 64 3a 20 61 6c 6c 62 | 65 72 79 40 75 75 6e 65 |ed: allb|ery@uune|
|00000220| 74 2e 55 55 2e 4e 45 54 | 20 28 42 72 61 6e 64 6f |t.UU.NET| (Brando|
|00000230| 6e 20 53 2e 20 41 6c 6c | 62 65 72 79 20 2d 20 63 |n S. All|bery - c|
|00000240| 6f 6d 70 2e 73 6f 75 72 | 63 65 73 2e 6d 69 73 63 |omp.sour|ces.misc|
|00000250| 29 0a 0a 50 6f 73 74 69 | 6e 67 2d 6e 75 6d 62 65 |)..Posti|ng-numbe|
|00000260| 72 3a 20 56 6f 6c 75 6d | 65 20 37 2c 20 49 73 73 |r: Volum|e 7, Iss|
|00000270| 75 65 20 36 35 0a 53 75 | 62 6d 69 74 74 65 64 2d |ue 65.Su|bmitted-|
|00000280| 62 79 3a 20 6d 61 75 68 | 6b 40 63 75 2e 77 61 72 |by: mauh|k@cu.war|
|00000290| 77 69 63 6b 2e 61 63 2e | 75 6b 20 28 41 6e 64 72 |wick.ac.|uk (Andr|
|000002a0| 65 61 73 20 50 61 67 65 | 6c 29 0a 41 72 63 68 69 |eas Page|l).Archi|
|000002b0| 76 65 2d 6e 61 6d 65 3a | 20 67 6f 73 69 70 32 0a |ve-name:| gosip2.|
|000002c0| 0a 5b 54 6f 6f 20 6c 61 | 74 65 2e 2e 2e 2e 20 20 |.[Too la|te.... |
|000002d0| 2b 2b 62 73 61 5d 0a 0a | 49 20 6e 6f 74 69 63 65 |++bsa]..|I notice|
|000002e0| 64 20 61 20 74 65 72 72 | 69 62 6c 65 20 65 72 72 |d a terr|ible err|
|000002f0| 6f 72 20 69 6e 20 74 68 | 65 20 67 6f 73 69 70 20 |or in th|e gosip |
|00000300| 73 68 61 72 20 49 20 73 | 65 6e 74 20 79 6f 75 20 |shar I s|ent you |
|00000310| 72 65 63 65 6e 74 6c 79 | 2c 20 69 6e 20 74 68 61 |recently|, in tha|
|00000320| 74 20 49 0a 66 61 69 6c | 65 64 20 74 6f 20 73 70 |t I.fail|ed to sp|
|00000330| 65 63 69 66 79 20 63 75 | 73 74 6f 6d 69 73 61 74 |ecify cu|stomisat|
|00000340| 69 6f 6e 20 63 6f 72 72 | 65 63 74 6c 79 2e 20 20 |ion corr|ectly. |
|00000350| 49 20 61 6c 73 6f 20 6e | 6f 74 69 63 65 64 20 79 |I also n|oticed y|
|00000360| 6f 75 20 68 61 76 65 6e | 27 74 20 73 65 6e 74 20 |ou haven|'t sent |
|00000370| 69 74 0a 6f 75 74 20 79 | 65 74 2c 20 73 6f 20 63 |it.out y|et, so c|
|00000380| 6f 75 6c 64 20 79 6f 75 | 20 70 6f 73 74 20 74 68 |ould you| post th|
|00000390| 69 73 20 28 68 6f 70 65 | 66 75 6c 6c 79 29 20 63 |is (hope|fully) c|
|000003a0| 6f 72 72 65 63 74 20 76 | 65 72 73 69 6f 6e 20 69 |orrect v|ersion i|
|000003b0| 6e 73 74 65 61 64 3f 0a | 0a 74 68 61 6e 6b 73 2c |nstead?.|.thanks,|
|000003c0| 0a 41 6e 64 72 65 61 73 | 2e 0a 2d 2d 2d 2d 2d 2d |.Andreas|..------|
|000003d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 63 75 74 20 68 |--------|---cut h|
|000003f0| 65 72 65 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ere-----|--------|
|00000400| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000410| 2d 2d 2d 2d 0a 23 21 20 | 2f 62 69 6e 2f 73 68 0a |----.#! |/bin/sh.|
|00000420| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|00000430| 6c 20 61 72 63 68 69 76 | 65 2e 20 20 52 65 6d 6f |l archiv|e. Remo|
|00000440| 76 65 20 61 6e 79 74 68 | 69 6e 67 20 62 65 66 6f |ve anyth|ing befo|
|00000450| 72 65 20 74 68 69 73 20 | 6c 69 6e 65 2c 20 74 68 |re this |line, th|
|00000460| 65 6e 20 75 6e 70 61 63 | 6b 0a 23 20 69 74 20 62 |en unpac|k.# it b|
|00000470| 79 20 73 61 76 69 6e 67 | 20 69 74 20 69 6e 74 6f |y saving| it into|
|00000480| 20 61 20 66 69 6c 65 20 | 61 6e 64 20 74 79 70 69 | a file |and typi|
|00000490| 6e 67 20 22 73 68 20 66 | 69 6c 65 22 2e 20 20 54 |ng "sh f|ile". T|
|000004a0| 6f 20 6f 76 65 72 77 72 | 69 74 65 20 65 78 69 73 |o overwr|ite exis|
|000004b0| 74 69 6e 67 0a 23 20 66 | 69 6c 65 73 2c 20 74 79 |ting.# f|iles, ty|
|000004c0| 70 65 20 22 73 68 20 66 | 69 6c 65 20 2d 63 22 2e |pe "sh f|ile -c".|
|000004d0| 20 20 59 6f 75 20 63 61 | 6e 20 61 6c 73 6f 20 66 | You ca|n also f|
|000004e0| 65 65 64 20 74 68 69 73 | 20 61 73 20 73 74 61 6e |eed this| as stan|
|000004f0| 64 61 72 64 20 69 6e 70 | 75 74 20 76 69 61 0a 23 |dard inp|ut via.#|
|00000500| 20 75 6e 73 68 61 72 2c | 20 6f 72 20 62 79 20 74 | unshar,| or by t|
|00000510| 79 70 69 6e 67 20 22 73 | 68 20 3c 66 69 6c 65 22 |yping "s|h <file"|
|00000520| 2c 20 65 2e 67 2e 2e 20 | 20 49 66 20 74 68 69 73 |, e.g.. | If this|
|00000530| 20 61 72 63 68 69 76 65 | 20 69 73 20 63 6f 6d 70 | archive| is comp|
|00000540| 6c 65 74 65 2c 20 79 6f | 75 0a 23 20 77 69 6c 6c |lete, yo|u.# will|
|00000550| 20 73 65 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | see the| followi|
|00000560| 6e 67 20 6d 65 73 73 61 | 67 65 20 61 74 20 74 68 |ng messa|ge at th|
|00000570| 65 20 65 6e 64 3a 0a 23 | 09 09 22 45 6e 64 20 6f |e end:.#|.."End o|
|00000580| 66 20 73 68 65 6c 6c 20 | 61 72 63 68 69 76 65 2e |f shell |archive.|
|00000590| 22 0a 23 20 43 6f 6e 74 | 65 6e 74 73 3a 20 20 48 |".# Cont|ents: H|
|000005a0| 69 73 74 6f 72 79 20 4d | 61 6b 65 66 69 6c 65 20 |istory M|akefile |
|000005b0| 52 45 41 44 4d 45 20 61 | 6c 6c 67 6f 73 73 2e 31 |README a|llgoss.1|
|000005c0| 20 63 61 74 2e 63 20 63 | 61 74 2e 68 20 63 6f 6e | cat.c c|at.h con|
|000005d0| 74 72 6f 6c 2e 63 0a 23 | 20 20 20 63 6f 6e 74 72 |trol.c.#| contr|
|000005e0| 6f 6c 2e 68 20 64 77 2e | 31 20 65 64 69 74 2e 63 |ol.h dw.|1 edit.c|
|000005f0| 20 65 64 69 74 2e 68 20 | 67 6c 6f 62 61 6c 2e 68 | edit.h |global.h|
|00000600| 20 67 6f 73 69 70 2e 31 | 20 68 69 73 74 6f 72 79 | gosip.1| history|
|00000610| 2e 63 20 68 69 73 74 6f | 72 79 2e 68 0a 23 20 20 |.c histo|ry.h.# |
|00000620| 20 6c 75 2e 31 20 6c 75 | 2e 63 20 6c 75 2e 68 20 | lu.1 lu|.c lu.h |
|00000630| 6d 61 69 6e 2e 63 20 6d | 61 69 6e 2e 68 20 6e 6f |main.c m|ain.h no|
|00000640| 74 65 73 20 73 65 74 75 | 70 20 75 74 69 6c 2e 63 |tes setu|p util.c|
|00000650| 20 75 74 69 6c 2e 68 0a | 23 20 57 72 61 70 70 65 | util.h.|# Wrappe|
|00000660| 64 20 62 79 20 6d 61 75 | 68 6b 40 6f 72 63 68 69 |d by mau|hk@orchi|
|00000670| 64 20 6f 6e 20 57 65 64 | 20 4a 75 6e 20 32 38 20 |d on Wed| Jun 28 |
|00000680| 31 36 3a 32 33 3a 30 35 | 20 31 39 38 39 0a 50 41 |16:23:05| 1989.PA|
|00000690| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|000006a0| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|000006b0| 72 74 20 50 41 54 48 0a | 69 66 20 74 65 73 74 20 |rt PATH.|if test |
|000006c0| 2d 66 20 27 48 69 73 74 | 6f 72 79 27 20 2d 61 20 |-f 'Hist|ory' -a |
|000006d0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|000006e0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|000006f0| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00000700| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00000710| 6c 65 20 5c 22 27 48 69 | 73 74 6f 72 79 27 5c 22 |le \"'Hi|story'\"|
|00000720| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00000730| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 48 | Extract|ing \"'H|
|00000740| 69 73 74 6f 72 79 27 5c | 22 20 5c 28 32 39 35 30 |istory'\|" \(2950|
|00000750| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000760| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 48 69 73 |d "s/^X/|/" >'His|
|00000770| 74 6f 72 79 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |tory' <<|'END_OF_|
|00000780| 46 49 4c 45 27 0a 58 41 | 50 53 20 47 6f 73 69 70 |FILE'.XA|PS Gosip|
|00000790| 3a 20 48 69 73 74 6f 72 | 79 0a 58 3d 3d 3d 3d 3d |: Histor|y.X=====|
|000007a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 58 0a |========|=====.X.|
|000007b0| 58 54 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 69 64 |XThe ori|ginal id|
|000007c0| 65 61 20 77 61 73 20 63 | 6f 6e 63 65 69 76 65 64 |ea was c|onceived|
|000007d0| 20 62 79 20 4a 6f 6e 61 | 74 68 61 6e 20 48 75 67 | by Jona|than Hug|
|000007e0| 68 65 73 20 6f 66 20 57 | 61 72 77 69 63 6b 20 55 |hes of W|arwick U|
|000007f0| 6e 69 76 65 72 73 69 74 | 79 2c 20 62 61 63 6b 0a |niversit|y, back.|
|00000800| 58 69 6e 20 31 39 38 37 | 2e 20 20 48 65 20 73 69 |Xin 1987|. He si|
|00000810| 6d 70 6c 79 20 63 72 65 | 61 74 65 64 20 74 77 6f |mply cre|ated two|
|00000820| 20 77 72 69 74 61 62 6c | 65 20 66 69 6c 65 73 2c | writabl|e files,|
|00000830| 20 67 6f 73 73 69 70 20 | 61 6e 64 20 68 65 6c 70 | gossip |and help|
|00000840| 2c 20 69 6e 20 68 69 73 | 20 68 6f 6d 65 0a 58 64 |, in his| home.Xd|
|00000850| 69 72 65 63 74 6f 72 79 | 20 61 6e 64 20 69 6e 76 |irectory| and inv|
|00000860| 69 74 65 64 20 70 65 6f | 70 6c 65 20 74 6f 20 65 |ited peo|ple to e|
|00000870| 64 69 74 20 74 68 65 6d | 3a 20 67 6f 73 73 69 70 |dit them|: gossip|
|00000880| 20 66 6f 72 20 67 65 6e | 65 72 61 6c 20 63 68 61 | for gen|eral cha|
|00000890| 74 74 69 6e 67 2c 20 61 | 6e 64 0a 58 68 65 6c 70 |tting, a|nd.Xhelp|
|000008a0| 20 66 6f 72 20 71 75 65 | 72 69 65 73 20 61 62 6f | for que|ries abo|
|000008b0| 75 74 20 74 68 65 20 55 | 4e 49 58 20 73 79 73 74 |ut the U|NIX syst|
|000008c0| 65 6d 20 6f 72 20 70 72 | 6f 67 72 61 6d 6d 69 6e |em or pr|ogrammin|
|000008d0| 67 20 61 73 73 69 67 6e | 6d 65 6e 74 73 2e 0a 58 |g assign|ments..X|
|000008e0| 0a 58 49 20 73 6f 6f 6e | 20 72 65 61 6c 69 73 65 |.XI soon| realise|
|000008f0| 64 20 74 68 61 74 20 69 | 66 20 74 77 6f 20 70 65 |d that i|f two pe|
|00000900| 6f 70 6c 65 20 65 64 69 | 74 65 64 20 61 20 66 69 |ople edi|ted a fi|
|00000910| 6c 65 20 73 69 6d 75 6c | 74 61 6e 65 6f 75 73 6c |le simul|taneousl|
|00000920| 79 2c 20 6f 6e 6c 79 20 | 6f 6e 65 0a 58 70 65 72 |y, only |one.Xper|
|00000930| 73 6f 6e 27 73 20 63 68 | 61 6e 67 65 73 20 77 6f |son's ch|anges wo|
|00000940| 75 6c 64 20 62 65 20 73 | 61 76 65 64 2e 20 20 53 |uld be s|aved. S|
|00000950| 6f 20 49 20 77 72 6f 74 | 65 20 6d 79 20 66 69 72 |o I wrot|e my fir|
|00000960| 73 74 20 65 76 65 72 20 | 73 68 65 6c 6c 20 70 72 |st ever |shell pr|
|00000970| 6f 67 72 61 6d 2c 0a 58 | 73 6f 6d 65 74 68 69 6e |ogram,.X|somethin|
|00000980| 67 20 6c 69 6b 65 3a 0a | 58 0a 58 69 66 20 74 65 |g like:.|X.Xif te|
|00000990| 73 74 20 2d 66 20 74 6d | 70 2e 67 6f 73 73 69 70 |st -f tm|p.gossip|
|000009a0| 0a 58 74 68 65 6e 0a 58 | 20 20 65 63 68 6f 20 22 |.Xthen.X| echo "|
|000009b0| 53 6f 72 72 79 2c 20 67 | 6f 73 73 69 70 20 69 73 |Sorry, g|ossip is|
|000009c0| 20 62 65 69 6e 67 20 65 | 64 69 74 65 64 2e 22 0a | being e|dited.".|
|000009d0| 58 20 20 63 61 74 20 74 | 65 78 74 2e 67 6f 73 73 |X cat t|ext.goss|
|000009e0| 69 70 0a 58 65 6c 73 65 | 0a 58 20 20 74 6f 75 63 |ip.Xelse|.X touc|
|000009f0| 68 20 74 6d 70 2e 67 6f | 73 73 69 70 0a 58 20 20 |h tmp.go|ssip.X |
|00000a00| 64 65 64 20 74 65 78 74 | 2e 67 6f 73 73 69 70 20 |ded text|.gossip |
|00000a10| 20 20 20 20 23 20 64 65 | 64 20 69 73 20 74 68 65 | # de|d is the|
|00000a20| 20 6c 6f 63 61 6c 20 65 | 64 69 74 6f 72 0a 58 20 | local e|ditor.X |
|00000a30| 20 72 6d 20 74 65 6d 70 | 2e 67 6f 73 73 69 70 0a | rm temp|.gossip.|
|00000a40| 58 66 69 0a 58 0a 58 61 | 6e 64 20 61 20 73 69 6d |Xfi.X.Xa|nd a sim|
|00000a50| 69 6c 61 72 20 6f 6e 65 | 20 66 6f 72 20 74 68 65 |ilar one| for the|
|00000a60| 20 68 65 6c 70 20 66 69 | 6c 65 2e 20 20 54 6f 6f | help fi|le. Too|
|00000a70| 6b 20 6d 65 20 77 65 65 | 6b 73 20 74 6f 20 67 65 |k me wee|ks to ge|
|00000a80| 74 20 74 68 61 74 20 72 | 69 67 68 74 21 20 20 54 |t that r|ight! T|
|00000a90| 68 69 73 0a 58 65 76 6f | 6c 76 65 64 20 66 6f 72 |his.Xevo|lved for|
|00000aa0| 20 61 20 62 69 74 2c 20 | 62 75 74 20 64 69 64 6e | a bit, |but didn|
|00000ab0| 27 74 20 72 65 61 6c 6c | 79 20 67 65 74 20 64 72 |'t reall|y get dr|
|00000ac0| 61 73 74 69 63 61 6c 6c | 79 20 62 65 74 74 65 72 |asticall|y better|
|00000ad0| 2e 20 20 41 73 20 6d 6f | 72 65 20 67 6f 73 69 70 |. As mo|re gosip|
|00000ae0| 0a 58 66 69 6c 65 73 20 | 77 65 72 65 20 63 72 65 |.Xfiles |were cre|
|00000af0| 61 74 65 64 2c 20 47 65 | 6f 66 66 20 52 69 6d 6d |ated, Ge|off Rimm|
|00000b00| 65 72 20 68 61 64 20 74 | 68 65 20 69 64 65 61 20 |er had t|he idea |
|00000b10| 6f 66 20 6b 65 65 70 69 | 6e 67 20 6a 75 73 74 20 |of keepi|ng just |
|00000b20| 6f 6e 65 20 76 65 72 73 | 69 6f 6e 20 6f 66 0a 58 |one vers|ion of.X|
|00000b30| 74 68 65 20 73 6f 75 72 | 63 65 2c 20 68 61 72 64 |the sour|ce, hard|
|00000b40| 6c 69 6e 6b 65 64 20 74 | 6f 20 61 6c 6c 20 74 68 |linked t|o all th|
|00000b50| 65 20 64 69 66 66 65 72 | 65 6e 74 20 67 6f 73 69 |e differ|ent gosi|
|00000b60| 70 20 66 69 6c 65 73 2c | 20 77 69 74 68 20 61 6c |p files,| with al|
|00000b70| 6c 20 6f 63 63 75 72 72 | 65 6e 63 65 73 0a 58 6f |l occurr|ences.Xo|
|00000b80| 66 20 22 67 6f 73 73 69 | 70 22 20 72 65 70 6c 61 |f "gossi|p" repla|
|00000b90| 63 65 64 20 62 79 20 22 | 24 30 22 2e 20 20 48 65 |ced by "|$0". He|
|00000ba0| 20 61 6c 73 6f 20 74 68 | 6f 75 67 68 74 20 6f 66 | also th|ought of|
|00000bb0| 20 73 6f 6d 65 20 6f 70 | 74 69 6f 6e 73 20 74 6f | some op|tions to|
|00000bc0| 20 67 69 76 65 20 69 74 | 2c 20 65 67 2e 0a 58 74 | give it|, eg..Xt|
|00000bd0| 6f 20 73 65 6e 64 20 74 | 68 65 20 66 69 6c 65 20 |o send t|he file |
|00000be0| 74 6f 20 61 20 70 72 69 | 6e 74 65 72 2c 20 6f 72 |to a pri|nter, or|
|00000bf0| 20 74 6f 20 6c 69 73 74 | 20 69 74 20 72 61 74 68 | to list| it rath|
|00000c00| 65 72 20 74 68 61 6e 20 | 65 64 69 74 20 69 74 2e |er than |edit it.|
|00000c10| 0a 58 0a 58 4d 69 6b 65 | 20 54 61 79 6c 6f 72 20 |.X.XMike| Taylor |
|00000c20| 64 65 73 65 72 76 65 73 | 20 61 20 6d 65 6e 74 69 |deserves| a menti|
|00000c30| 6f 6e 20 61 73 20 62 65 | 69 6e 67 20 74 68 65 20 |on as be|ing the |
|00000c40| 6f 6e 65 20 74 6f 20 70 | 6f 6c 69 73 68 20 75 70 |one to p|olish up|
|00000c50| 20 74 68 69 73 20 62 61 | 73 69 63 20 69 64 65 61 | this ba|sic idea|
|00000c60| 0a 58 6f 76 65 72 20 74 | 68 65 20 6e 65 78 74 20 |.Xover t|he next |
|00000c70| 79 65 61 72 20 6f 72 20 | 73 6f 2e 20 20 48 65 20 |year or |so. He |
|00000c80| 61 64 64 65 64 20 69 6e | 20 62 69 74 73 20 74 6f |added in| bits to|
|00000c90| 20 6b 65 65 70 20 61 20 | 72 65 63 6f 72 64 20 6f | keep a |record o|
|00000ca0| 66 20 77 68 6f 20 65 64 | 69 74 65 64 0a 58 77 68 |f who ed|ited.Xwh|
|00000cb0| 69 63 68 20 66 69 6c 65 | 2c 20 61 6e 64 20 68 65 |ich file|, and he|
|00000cc0| 20 77 72 6f 74 65 20 61 | 20 73 65 70 61 72 61 74 | wrote a| separat|
|00000cd0| 65 20 73 68 65 6c 6c 20 | 70 72 6f 67 72 61 6d 20 |e shell |program |
|00000ce0| 28 6c 75 29 20 74 68 61 | 74 20 77 6f 75 6c 64 20 |(lu) tha|t would |
|00000cf0| 6c 69 73 74 20 74 68 69 | 73 0a 58 69 6e 66 6f 72 |list thi|s.Xinfor|
|00000d00| 6d 61 74 69 6f 6e 2c 20 | 61 6e 64 20 77 6f 75 6c |mation, |and woul|
|00000d10| 64 20 61 6c 73 6f 20 70 | 72 69 6e 74 20 61 20 73 |d also p|rint a s|
|00000d20| 68 6f 72 74 20 73 75 6d | 6d 61 72 79 20 6f 66 20 |hort sum|mary of |
|00000d30| 74 68 65 20 73 74 61 74 | 75 73 20 6f 66 20 65 61 |the stat|us of ea|
|00000d40| 63 68 20 66 69 6c 65 0a | 58 28 74 68 65 20 62 61 |ch file.|X(the ba|
|00000d50| 73 69 63 20 68 65 6c 70 | 20 61 6e 64 20 67 6f 73 |sic help| and gos|
|00000d60| 73 69 70 20 66 69 6c 65 | 73 20 73 6f 6f 6e 20 65 |sip file|s soon e|
|00000d70| 78 70 61 6e 64 65 64 20 | 74 6f 20 69 6e 63 6c 75 |xpanded |to inclu|
|00000d80| 64 65 20 65 76 65 6e 74 | 73 2c 20 73 75 67 67 65 |de event|s, sugge|
|00000d90| 73 74 2c 0a 58 6a 6f 6b | 65 73 2c 20 65 74 63 2e |st,.Xjok|es, etc.|
|00000da0| 29 2e 0a 58 0a 58 53 6f | 6d 65 20 6f 66 20 74 68 |)..X.XSo|me of th|
|00000db0| 65 73 65 20 65 61 72 6c | 79 20 76 65 72 73 69 6f |ese earl|y versio|
|00000dc0| 6e 73 20 68 61 64 20 73 | 6f 6d 65 20 70 72 65 74 |ns had s|ome pret|
|00000dd0| 74 79 20 62 61 64 20 62 | 75 67 73 20 69 6e 2e 20 |ty bad b|ugs in. |
|00000de0| 20 4f 66 20 70 61 72 74 | 69 63 75 6c 61 72 20 6e | Of part|icular n|
|00000df0| 6f 74 65 0a 58 77 61 73 | 20 74 68 65 20 74 69 6d |ote.Xwas| the tim|
|00000e00| 65 20 74 68 61 74 20 74 | 68 65 20 73 68 65 6c 6c |e that t|he shell|
|00000e10| 20 73 63 72 69 70 74 20 | 77 61 73 20 6d 61 64 65 | script |was made|
|00000e20| 20 73 65 74 75 69 64 2c | 20 69 6e 20 6f 72 64 65 | setuid,| in orde|
|00000e30| 72 20 74 6f 20 70 72 65 | 76 65 6e 74 20 61 0a 58 |r to pre|vent a.X|
|00000e40| 63 65 72 74 61 69 6e 20 | 70 65 72 73 6f 6e 20 66 |certain |person f|
|00000e50| 72 6f 6d 20 64 65 6c 65 | 74 69 6e 67 20 74 65 78 |rom dele|ting tex|
|00000e60| 74 2e 67 6f 73 73 69 70 | 2e 20 20 4f 66 20 63 6f |t.gossip|. Of co|
|00000e70| 75 72 73 65 2c 20 6f 6e | 65 20 63 6f 75 6c 64 20 |urse, on|e could |
|00000e80| 74 68 65 6e 20 73 70 61 | 77 6e 20 61 0a 58 73 65 |then spa|wn a.Xse|
|00000e90| 74 75 69 64 20 73 68 65 | 6c 6c 20 66 72 6f 6d 20 |tuid she|ll from |
|00000ea0| 74 68 65 20 65 64 69 74 | 6f 72 20 2d 20 49 20 68 |the edit|or - I h|
|00000eb0| 61 64 20 61 62 6f 75 74 | 20 61 20 77 65 65 6b 20 |ad about| a week |
|00000ec0| 6f 66 20 61 63 63 65 73 | 73 20 74 6f 20 4d 69 6b |of acces|s to Mik|
|00000ed0| 65 27 73 20 63 6f 64 65 | 0a 58 62 65 66 6f 72 65 |e's code|.Xbefore|
|00000ee0| 20 68 65 20 66 69 6e 61 | 6c 6c 79 20 6e 6f 74 69 | he fina|lly noti|
|00000ef0| 63 65 64 20 74 68 69 73 | 20 73 65 63 75 72 69 74 |ced this| securit|
|00000f00| 79 20 68 6f 6c 65 2e 0a | 58 0a 58 41 20 6d 61 6a |y hole..|X.XA maj|
|00000f10| 6f 72 20 70 72 6f 62 6c | 65 6d 20 61 6c 6c 20 74 |or probl|em all t|
|00000f20| 68 65 20 74 69 6d 65 20 | 77 61 73 20 74 68 61 74 |he time |was that|
|00000f30| 20 74 68 65 20 6c 6f 63 | 6b 20 66 69 6c 65 73 2f | the loc|k files/|
|00000f40| 64 69 72 65 63 74 6f 72 | 69 65 73 20 28 62 6f 74 |director|ies (bot|
|00000f50| 68 20 77 65 72 65 0a 58 | 75 73 65 64 20 61 74 20 |h were.X|used at |
|00000f60| 76 61 72 69 6f 75 73 20 | 73 74 61 67 65 73 29 20 |various |stages) |
|00000f70| 75 73 65 64 20 74 6f 20 | 65 6e 73 75 72 65 20 65 |used to |ensure e|
|00000f80| 78 63 6c 75 73 69 76 65 | 20 61 63 63 65 73 73 20 |xclusive| access |
|00000f90| 77 6f 75 6c 64 20 66 72 | 65 71 75 65 6e 74 6c 79 |would fr|equently|
|00000fa0| 20 6e 6f 74 0a 58 62 65 | 20 64 65 6c 65 74 65 64 | not.Xbe| deleted|
|00000fb0| 20 61 66 74 65 72 20 61 | 20 67 69 76 65 6e 20 66 | after a| given f|
|00000fc0| 69 6c 65 20 77 61 73 20 | 6e 6f 20 6c 6f 6e 67 65 |ile was |no longe|
|00000fd0| 72 20 62 65 69 6e 67 20 | 65 64 69 74 65 64 2e 20 |r being |edited. |
|00000fe0| 20 54 68 65 20 66 69 6e | 61 6c 20 76 65 72 73 69 | The fin|al versi|
|00000ff0| 6f 6e 0a 58 6f 66 20 74 | 68 65 20 73 68 65 6c 6c |on.Xof t|he shell|
|00001000| 20 73 63 72 69 70 74 20 | 66 6f 72 20 67 6f 73 69 | script |for gosi|
|00001010| 70 20 69 6e 63 6c 75 64 | 65 64 20 63 6f 64 65 20 |p includ|ed code |
|00001020| 74 68 61 74 20 77 6f 75 | 6c 64 20 64 65 6c 65 74 |that wou|ld delet|
|00001030| 65 20 6c 6f 63 6b 20 66 | 69 6c 65 73 20 6d 6f 72 |e lock f|iles mor|
|00001040| 65 0a 58 74 68 61 6e 20 | 68 61 6c 66 20 61 6e 20 |e.Xthan |half an |
|00001050| 68 6f 75 72 20 6f 6c 64 | 2c 20 6f 6e 20 74 68 65 |hour old|, on the|
|00001060| 20 61 73 73 75 6d 70 74 | 69 6f 6e 20 74 68 61 74 | assumpt|ion that|
|00001070| 20 74 68 65 69 72 20 63 | 6f 6e 74 69 6e 75 65 64 | their c|ontinued|
|00001080| 20 65 78 69 73 74 65 6e | 63 65 20 77 61 73 20 61 | existen|ce was a|
|00001090| 0a 58 6d 61 6e 69 66 65 | 73 74 61 74 69 6f 6e 20 |.Xmanife|station |
|000010a0| 6f 66 20 74 68 69 73 20 | 70 72 6f 62 6c 65 6d 2e |of this |problem.|
|000010b0| 20 20 54 68 65 72 65 20 | 77 65 72 65 20 61 6c 73 | There |were als|
|000010c0| 6f 20 61 20 66 65 77 20 | 6f 74 68 65 72 20 62 75 |o a few |other bu|
|000010d0| 67 73 20 69 6e 20 69 74 | 2c 20 61 6e 64 20 69 74 |gs in it|, and it|
|000010e0| 0a 58 77 61 73 20 71 75 | 69 74 65 20 73 6c 6f 77 |.Xwas qu|ite slow|
|000010f0| 20 74 6f 6f 2e 0a 58 0a | 58 41 74 20 74 68 69 73 | too..X.|XAt this|
|00001100| 20 70 6f 69 6e 74 2c 20 | 49 20 62 65 67 61 6e 20 | point, |I began |
|00001110| 74 6f 20 72 65 2d 77 72 | 69 74 65 20 74 68 65 20 |to re-wr|ite the |
|00001120| 77 68 6f 6c 65 20 74 68 | 69 6e 67 20 69 6e 20 43 |whole th|ing in C|
|00001130| 2e 20 20 49 20 77 61 73 | 20 73 74 69 6c 6c 20 66 |. I was| still f|
|00001140| 61 69 72 6c 79 0a 58 6e | 65 77 20 74 6f 20 43 20 |airly.Xn|ew to C |
|00001150| 61 74 20 74 68 61 74 20 | 73 74 61 67 65 20 6f 66 |at that |stage of|
|00001160| 20 6d 79 20 6c 69 66 65 | 2c 20 61 6e 64 20 74 72 | my life|, and tr|
|00001170| 69 65 64 20 73 69 6d 70 | 6c 79 20 74 6f 20 63 6f |ied simp|ly to co|
|00001180| 6e 76 65 72 74 20 74 68 | 65 20 73 68 65 6c 6c 0a |nvert th|e shell.|
|00001190| 58 76 65 72 73 69 6f 6e | 20 69 6e 74 6f 20 43 2c |Xversion| into C,|
|000011a0| 20 61 6c 6d 6f 73 74 20 | 6f 6e 20 61 20 6c 69 6e | almost |on a lin|
|000011b0| 65 20 66 6f 72 20 6c 69 | 6e 65 20 62 61 73 69 73 |e for li|ne basis|
|000011c0| 2e 20 20 54 68 65 20 70 | 72 6f 67 72 61 6d 20 77 |. The p|rogram w|
|000011d0| 65 6e 74 20 74 68 72 6f | 75 67 68 20 61 0a 58 6c |ent thro|ugh a.Xl|
|000011e0| 6f 74 20 6f 66 20 72 65 | 66 69 6e 65 6d 65 6e 74 |ot of re|finement|
|000011f0| 73 2c 20 6d 6f 73 74 20 | 6f 66 20 77 68 69 63 68 |s, most |of which|
|00001200| 20 61 72 65 20 72 65 63 | 6f 72 64 65 64 20 69 6e | are rec|orded in|
|00001210| 20 74 68 65 20 66 69 6c | 65 20 27 6e 6f 74 65 73 | the fil|e 'notes|
|00001220| 27 20 2d 20 61 74 0a 58 | 61 72 6f 75 6e 64 20 76 |' - at.X|around v|
|00001230| 65 72 73 69 6f 6e 20 33 | 31 20 49 20 68 61 64 20 |ersion 3|1 I had |
|00001240| 74 68 65 20 62 72 69 6c | 6c 69 61 6e 74 20 69 64 |the bril|liant id|
|00001250| 65 61 20 6f 66 20 6b 65 | 65 70 69 6e 67 20 61 20 |ea of ke|eping a |
|00001260| 6c 69 73 74 20 6f 66 20 | 6d 79 20 63 68 61 6e 67 |list of |my chang|
|00001270| 65 73 20 69 6e 0a 58 74 | 68 69 73 20 66 69 6c 65 |es in.Xt|his file|
|00001280| 2e 0a 58 0a 58 46 6f 72 | 20 74 68 65 20 75 73 65 |..X.XFor| the use|
|00001290| 72 2c 20 74 68 65 20 43 | 20 76 65 72 73 69 6f 6e |r, the C| version|
|000012a0| 20 6f 66 66 65 72 65 64 | 20 67 72 65 61 74 65 72 | offered| greater|
|000012b0| 20 73 70 65 65 64 2c 20 | 61 6e 64 20 74 68 61 74 | speed, |and that|
|000012c0| 20 77 61 73 20 61 62 6f | 75 74 20 61 6c 6c 2e 0a | was abo|ut all..|
|000012d0| 58 48 6f 77 65 76 65 72 | 2c 20 74 68 65 20 6d 75 |XHowever|, the mu|
|000012e0| 74 75 61 6c 20 65 78 63 | 6c 75 73 69 6f 6e 20 70 |tual exc|lusion p|
|000012f0| 72 6f 62 6c 65 6d 20 77 | 61 73 20 66 69 6e 61 6c |roblem w|as final|
|00001300| 6c 79 20 73 6f 6c 76 65 | 64 20 69 6e 20 76 65 72 |ly solve|d in ver|
|00001310| 73 69 6f 6e 20 37 33 2c | 20 61 6e 64 0a 58 74 68 |sion 73,| and.Xth|
|00001320| 65 72 65 20 77 61 73 20 | 6d 75 63 68 20 72 65 6a |ere was |much rej|
|00001330| 6f 69 63 69 6e 67 2e 0a | 58 0a 58 41 6e 64 72 65 |oicing..|X.XAndre|
|00001340| 61 73 20 50 61 67 65 6c | 2e 0a 45 4e 44 5f 4f 46 |as Pagel|..END_OF|
|00001350| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 32 39 |_FILE.if| test 29|
|00001360| 35 30 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |50 -ne `|wc -c <'|
|00001370| 48 69 73 74 6f 72 79 27 | 60 3b 20 74 68 65 6e 0a |History'|`; then.|
|00001380| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00001390| 22 27 48 69 73 74 6f 72 | 79 27 5c 22 20 75 6e 70 |"'Histor|y'\" unp|
|000013a0| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|000013b0| 20 73 69 7a 65 21 0a 66 | 69 0a 23 20 65 6e 64 20 | size!.f|i.# end |
|000013c0| 6f 66 20 27 48 69 73 74 | 6f 72 79 27 0a 66 69 0a |of 'Hist|ory'.fi.|
|000013d0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 4d 61 6b 65 |if test |-f 'Make|
|000013e0| 66 69 6c 65 27 20 2d 61 | 20 22 24 7b 31 7d 22 20 |file' -a| "${1}" |
|000013f0| 21 3d 20 22 2d 63 22 20 | 3b 20 74 68 65 6e 20 0a |!= "-c" |; then .|
|00001400| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 57 69 6c | echo s|har: Wil|
|00001410| 6c 20 6e 6f 74 20 63 6c | 6f 62 62 65 72 20 65 78 |l not cl|obber ex|
|00001420| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 5c 22 27 4d |isting f|ile \"'M|
|00001430| 61 6b 65 66 69 6c 65 27 | 5c 22 0a 65 6c 73 65 0a |akefile'|\".else.|
|00001440| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00001450| 63 74 69 6e 67 20 5c 22 | 27 4d 61 6b 65 66 69 6c |cting \"|'Makefil|
|00001460| 65 27 5c 22 20 5c 28 32 | 31 31 20 63 68 61 72 61 |e'\" \(2|11 chara|
|00001470| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00001480| 58 2f 2f 22 20 3e 27 4d | 61 6b 65 66 69 6c 65 27 |X//" >'M|akefile'|
|00001490| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|000014a0| 0a 58 23 20 4d 61 6b 65 | 66 69 6c 65 20 66 6f 72 |.X# Make|file for|
|000014b0| 20 67 6f 73 69 70 20 28 | 72 61 74 68 65 72 20 73 | gosip (|rather s|
|000014c0| 68 6f 72 74 20 62 65 63 | 61 75 73 65 20 49 20 6c |hort bec|ause I l|
|000014d0| 6f 73 74 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 |ost the |previous|
|000014e0| 20 6f 6e 65 29 2e 0a 58 | 0a 58 43 46 4c 41 47 53 | one)..X|.XCFLAGS|
|000014f0| 3d 0a 58 73 6f 75 72 63 | 65 73 3d 63 61 74 2e 63 |=.Xsourc|es=cat.c|
|00001500| 20 63 6f 6e 74 72 6f 6c | 2e 63 20 65 64 69 74 2e | control|.c edit.|
|00001510| 63 20 68 69 73 74 6f 72 | 79 2e 63 20 6c 75 2e 63 |c histor|y.c lu.c|
|00001520| 20 6d 61 69 6e 2e 63 20 | 75 74 69 6c 2e 63 0a 58 | main.c |util.c.X|
|00001530| 0a 58 72 65 61 6c 3a 0a | 58 09 24 28 43 43 29 20 |.Xreal:.|X.$(CC) |
|00001540| 24 28 43 46 4c 41 47 53 | 29 20 2d 44 52 45 41 4c |$(CFLAGS|) -DREAL|
|00001550| 20 2d 4f 20 2d 6f 20 72 | 65 61 6c 20 24 28 73 6f | -O -o r|eal $(so|
|00001560| 75 72 63 65 73 29 0a 58 | 09 72 6d 20 2a 2e 6f 0a |urces).X|.rm *.o.|
|00001570| 58 09 73 74 72 69 70 20 | 72 65 61 6c 0a 45 4e 44 |X.strip |real.END|
|00001580| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00001590| 20 32 31 31 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 211 -ne| `wc -c |
|000015a0| 3c 27 4d 61 6b 65 66 69 | 6c 65 27 60 3b 20 74 68 |<'Makefi|le'`; th|
|000015b0| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|000015c0| 3a 20 5c 22 27 4d 61 6b | 65 66 69 6c 65 27 5c 22 |: \"'Mak|efile'\"|
|000015d0| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|000015e0| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 23 20 |rong siz|e!.fi.# |
|000015f0| 65 6e 64 20 6f 66 20 27 | 4d 61 6b 65 66 69 6c 65 |end of '|Makefile|
|00001600| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00001610| 27 52 45 41 44 4d 45 27 | 20 2d 61 20 22 24 7b 31 |'README'| -a "${1|
|00001620| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00001630| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00001640| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00001650| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00001660| 22 27 52 45 41 44 4d 45 | 27 5c 22 0a 65 6c 73 65 |"'README|'\".else|
|00001670| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|00001680| 61 63 74 69 6e 67 20 5c | 22 27 52 45 41 44 4d 45 |acting \|"'README|
|00001690| 27 5c 22 20 5c 28 34 39 | 36 31 20 63 68 61 72 61 |'\" \(49|61 chara|
|000016a0| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|000016b0| 58 2f 2f 22 20 3e 27 52 | 45 41 44 4d 45 27 20 3c |X//" >'R|EADME' <|
|000016c0| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|000016d0| 41 50 53 20 47 6f 73 69 | 70 0a 58 3d 3d 3d 3d 3d |APS Gosi|p.X=====|
|000016e0| 3d 3d 3d 3d 0a 58 0a 58 | 47 6f 73 69 70 20 69 73 |====.X.X|Gosip is|
|000016f0| 20 61 20 70 72 6f 67 72 | 61 6d 20 74 68 61 74 20 | a progr|am that |
|00001700| 61 6c 6c 6f 77 73 20 61 | 20 75 73 65 72 20 63 6f |allows a| user co|
|00001710| 6d 6d 75 6e 69 74 79 20 | 74 6f 20 69 6e 74 65 72 |mmunity |to inter|
|00001720| 63 68 61 6e 67 65 20 6c | 69 76 65 6c 79 20 64 65 |change l|ively de|
|00001730| 62 61 74 65 2c 0a 58 66 | 72 69 65 6e 64 6c 79 20 |bate,.Xf|riendly |
|00001740| 62 61 6e 74 65 72 2c 20 | 68 65 6c 70 66 75 6c 20 |banter, |helpful |
|00001750| 69 6e 73 69 67 68 74 73 | 2c 20 6f 72 20 61 6e 79 |insights|, or any|
|00001760| 74 68 69 6e 67 20 65 6c | 73 65 2c 20 62 79 20 6d |thing el|se, by m|
|00001770| 65 61 6e 73 20 6f 66 20 | 65 64 69 74 69 6e 67 20 |eans of |editing |
|00001780| 61 0a 58 67 6c 6f 62 61 | 6c 6c 79 20 77 72 69 74 |a.Xgloba|lly writ|
|00001790| 61 62 6c 65 20 28 73 65 | 74 20 6f 66 29 20 66 69 |able (se|t of) fi|
|000017a0| 6c 65 28 73 29 2e 20 20 | 47 6f 73 69 70 20 69 74 |le(s). |Gosip it|
|000017b0| 73 65 6c 66 20 69 73 20 | 61 6c 73 6f 20 61 20 74 |self is |also a t|
|000017c0| 65 72 6d 20 75 73 65 64 | 20 74 6f 20 73 74 61 6e |erm used| to stan|
|000017d0| 64 0a 58 66 6f 72 20 61 | 6e 79 20 70 61 72 74 69 |d.Xfor a|ny parti|
|000017e0| 63 75 6c 61 72 20 66 69 | 6c 65 27 73 20 6e 61 6d |cular fi|le's nam|
|000017f0| 65 2c 20 61 20 62 69 74 | 20 6c 69 6b 65 20 74 68 |e, a bit| like th|
|00001800| 65 20 73 68 65 6c 6c 20 | 6d 65 74 61 20 63 68 61 |e shell |meta cha|
|00001810| 72 61 63 74 65 72 20 60 | 60 2a 27 27 2e 20 5b 31 |racter `|`*''. [1|
|00001820| 5d 0a 58 0a 58 54 68 65 | 20 66 69 6c 65 20 27 48 |].X.XThe| file 'H|
|00001830| 69 73 74 6f 72 79 27 20 | 67 69 76 65 73 20 73 6f |istory' |gives so|
|00001840| 6d 65 20 64 65 74 61 69 | 6c 73 20 6f 6e 20 68 6f |me detai|ls on ho|
|00001850| 77 20 74 68 65 20 77 68 | 6f 6c 65 20 74 68 69 6e |w the wh|ole thin|
|00001860| 67 20 65 76 6f 6c 76 65 | 64 2c 20 62 75 74 20 74 |g evolve|d, but t|
|00001870| 68 65 0a 58 62 61 73 69 | 63 20 69 64 65 61 20 69 |he.Xbasi|c idea i|
|00001880| 73 20 74 68 61 74 20 74 | 68 65 20 63 6f 6d 70 69 |s that t|he compi|
|00001890| 6c 65 64 20 70 72 6f 67 | 72 61 6d 20 69 73 20 28 |led prog|ram is (|
|000018a0| 68 61 72 64 2d 29 6c 69 | 6e 6b 65 64 20 74 6f 20 |hard-)li|nked to |
|000018b0| 77 68 61 74 65 76 65 72 | 20 66 69 6c 65 73 20 79 |whatever| files y|
|000018c0| 6f 75 0a 58 77 69 73 68 | 20 74 6f 20 73 75 70 70 |ou.Xwish| to supp|
|000018d0| 6f 72 74 2c 20 65 67 2e | 20 68 65 6c 70 2e 20 20 |ort, eg.| help. |
|000018e0| 54 68 65 6e 20 77 68 65 | 6e 20 61 6e 79 6f 6e 65 |Then whe|n anyone|
|000018f0| 20 72 75 6e 73 20 27 68 | 65 6c 70 27 2c 20 74 68 | runs 'h|elp', th|
|00001900| 65 20 70 72 6f 67 72 61 | 6d 20 69 6e 76 6f 6b 65 |e progra|m invoke|
|00001910| 73 0a 58 61 6e 20 65 64 | 69 74 6f 72 20 6f 6e 20 |s.Xan ed|itor on |
|00001920| 74 68 65 20 66 69 6c 65 | 20 74 65 78 74 2e 68 65 |the file| text.he|
|00001930| 6c 70 20 77 68 69 6c 65 | 20 65 6e 73 75 72 69 6e |lp while| ensurin|
|00001940| 67 20 65 78 63 6c 75 73 | 69 76 65 20 61 63 63 65 |g exclus|ive acce|
|00001950| 73 73 20 74 6f 20 74 68 | 61 74 20 66 69 6c 65 2e |ss to th|at file.|
|00001960| 0a 58 0a 58 4f 62 76 69 | 6f 75 73 6c 79 20 74 68 |.X.XObvi|ously th|
|00001970| 65 20 62 69 6e 61 72 69 | 65 73 20 6e 65 65 64 20 |e binari|es need |
|00001980| 74 6f 20 62 65 20 6b 65 | 70 74 20 69 6e 20 61 20 |to be ke|pt in a |
|00001990| 64 69 72 65 63 74 6f 72 | 79 20 77 68 69 63 68 20 |director|y which |
|000019a0| 69 73 20 69 6e 20 65 76 | 65 72 79 0a 58 70 6f 74 |is in ev|ery.Xpot|
|000019b0| 65 6e 74 69 61 6c 20 75 | 73 65 72 27 73 20 70 61 |ential u|ser's pa|
|000019c0| 74 68 2e 20 20 48 65 72 | 65 20 61 74 20 57 61 72 |th. Her|e at War|
|000019d0| 77 69 63 6b 2c 20 77 65 | 20 68 61 76 65 20 61 20 |wick, we| have a |
|000019e0| 73 79 73 74 65 6d 20 63 | 61 6c 6c 65 64 20 27 4e |system c|alled 'N|
|000019f0| 65 77 77 6f 72 64 73 2b | 27 0a 58 77 68 69 63 68 |ewwords+|'.Xwhich|
|00001a00| 20 70 72 6f 76 69 64 65 | 73 20 6e 6f 74 20 6f 6e | provide|s not on|
|00001a10| 6c 79 20 67 6f 73 69 70 | 2c 20 62 75 74 20 71 75 |ly gosip|, but qu|
|00001a20| 69 74 65 20 61 20 66 65 | 77 20 6f 74 68 65 72 20 |ite a fe|w other |
|00001a30| 65 78 74 72 61 20 63 6f | 6d 6d 61 6e 64 73 20 77 |extra co|mmands w|
|00001a40| 72 69 74 74 65 6e 20 62 | 79 0a 58 74 68 65 20 75 |ritten b|y.Xthe u|
|00001a50| 73 65 72 73 20 66 6f 72 | 20 74 68 65 20 75 73 65 |sers for| the use|
|00001a60| 72 20 63 6f 6d 6d 75 6e | 69 74 79 2e 20 20 49 74 |r commun|ity. It|
|00001a70| 20 62 61 73 69 63 61 6c | 6c 79 20 77 6f 72 6b 73 | basical|ly works|
|00001a80| 20 62 79 20 70 75 74 74 | 69 6e 67 20 61 0a 58 73 | by putt|ing a.Xs|
|00001a90| 75 62 64 69 72 65 63 74 | 6f 72 79 20 6f 66 20 74 |ubdirect|ory of t|
|00001aa0| 68 65 20 6e 65 77 77 6f | 72 64 73 2b 20 61 64 6d |he newwo|rds+ adm|
|00001ab0| 69 6e 69 73 74 72 61 74 | 6f 72 20 69 6e 20 65 76 |inistrat|or in ev|
|00001ac0| 65 72 79 20 73 75 62 73 | 63 72 69 62 65 72 27 73 |ery subs|criber's|
|00001ad0| 20 70 61 74 68 2e 0a 58 | 0a 58 43 6f 6e 74 65 6e | path..X|.XConten|
|00001ae0| 74 73 0a 58 3d 3d 3d 3d | 3d 3d 3d 3d 0a 58 0a 58 |ts.X====|====.X.X|
|00001af0| 49 6e 20 74 68 65 20 73 | 68 61 72 20 66 69 6c 65 |In the s|har file|
|00001b00| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 66 69 6e 64 | you sho|uld find|
|00001b10| 20 74 68 65 20 73 6f 75 | 72 63 65 20 66 69 6c 65 | the sou|rce file|
|00001b20| 73 20 65 64 69 74 2e 63 | 20 6d 61 69 6e 2e 63 20 |s edit.c| main.c |
|00001b30| 75 74 69 6c 2e 63 20 6c | 75 2e 63 0a 58 68 69 73 |util.c l|u.c.Xhis|
|00001b40| 74 6f 72 79 2e 63 20 63 | 61 74 2e 63 20 63 6f 6e |tory.c c|at.c con|
|00001b50| 74 72 6f 6c 2e 63 20 77 | 69 74 68 20 63 6f 72 72 |trol.c w|ith corr|
|00001b60| 65 73 70 6f 6e 64 69 6e | 67 20 68 65 61 64 65 72 |espondin|g header|
|00001b70| 20 66 69 6c 65 73 20 70 | 6c 75 73 20 67 6c 6f 62 | files p|lus glob|
|00001b80| 61 6c 2e 68 2e 20 20 44 | 77 0a 58 69 73 20 61 20 |al.h. D|w.Xis a |
|00001b90| 73 68 65 6c 6c 20 73 63 | 72 69 70 74 20 74 68 61 |shell sc|ript tha|
|00001ba0| 74 20 64 69 73 70 6c 61 | 79 73 20 63 68 61 6e 67 |t displa|ys chang|
|00001bb0| 65 73 20 69 6e 20 67 6f | 73 69 70 20 66 69 6c 65 |es in go|sip file|
|00001bc0| 73 20 5b 33 5d 2c 20 61 | 6e 64 20 66 69 6e 61 6c |s [3], a|nd final|
|00001bd0| 6c 79 20 73 65 74 75 70 | 0a 58 69 73 20 61 20 73 |ly setup|.Xis a s|
|00001be0| 68 65 6c 6c 20 70 72 6f | 67 72 61 6d 20 74 68 61 |hell pro|gram tha|
|00001bf0| 74 20 69 6e 73 74 61 6c | 6c 73 20 67 6f 73 69 70 |t instal|ls gosip|
|00001c00| 20 66 69 6c 65 73 20 28 | 6d 6f 72 65 20 62 65 6c | files (|more bel|
|00001c10| 6f 77 29 2e 0a 58 0a 58 | 49 6e 20 61 64 64 69 74 |ow)..X.X|In addit|
|00001c20| 69 6f 6e 2c 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |ion, the| followi|
|00001c30| 6e 67 20 6d 61 6e 75 61 | 6c 20 70 61 67 65 73 20 |ng manua|l pages |
|00001c40| 61 72 65 20 73 75 70 70 | 6c 69 65 64 3a 20 61 6c |are supp|lied: al|
|00001c50| 6c 67 6f 73 73 2e 31 2c | 20 6c 75 2e 31 2c 20 64 |lgoss.1,| lu.1, d|
|00001c60| 77 2e 31 2c 0a 58 67 6f | 73 69 70 2e 31 2e 20 20 |w.1,.Xgo|sip.1. |
|00001c70| 4f 74 68 65 72 20 64 6f | 63 75 6d 65 6e 74 61 74 |Other do|cumentat|
|00001c80| 69 6f 6e 20 70 72 6f 76 | 69 64 65 64 3a 20 52 45 |ion prov|ided: RE|
|00001c90| 41 44 4d 45 20 79 6f 75 | 20 61 6c 72 65 61 64 79 |ADME you| already|
|00001ca0| 20 6b 6e 6f 77 20 61 62 | 6f 75 74 2c 20 48 69 73 | know ab|out, His|
|00001cb0| 74 6f 72 79 0a 58 61 73 | 20 6d 65 6e 74 69 6f 6e |tory.Xas| mention|
|00001cc0| 65 64 20 61 62 6f 76 65 | 20 61 6e 64 20 6e 6f 74 |ed above| and not|
|00001cd0| 65 73 2c 20 77 68 69 63 | 68 20 69 73 20 6d 61 69 |es, whic|h is mai|
|00001ce0| 6e 6c 79 20 61 20 72 65 | 63 6f 72 64 20 6f 66 20 |nly a re|cord of |
|00001cf0| 63 68 61 6e 67 65 73 20 | 62 79 20 76 65 72 73 69 |changes |by versi|
|00001d00| 6f 6e 0a 58 6e 75 6d 62 | 65 72 2e 0a 58 0a 58 43 |on.Xnumb|er..X.XC|
|00001d10| 75 73 74 6f 6d 69 73 61 | 74 69 6f 6e 0a 58 3d 3d |ustomisa|tion.X==|
|00001d20| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 58 0a 58 59 |========|===.X.XY|
|00001d30| 6f 75 20 77 69 6c 6c 20 | 6e 65 65 64 20 74 6f 20 |ou will |need to |
|00001d40| 61 6c 74 65 72 20 73 6f | 6d 65 20 66 69 6c 65 20 |alter so|me file |
|00001d50| 61 6e 64 20 64 69 72 65 | 63 74 6f 72 79 20 6e 61 |and dire|ctory na|
|00001d60| 6d 65 73 20 61 6e 64 20 | 6f 74 68 65 72 20 23 64 |mes and |other #d|
|00001d70| 65 66 69 6e 65 27 73 3a | 0a 58 0a 58 28 31 29 20 |efine's:|.X.X(1) |
|00001d80| 20 49 6e 20 67 6c 6f 62 | 61 6c 2e 68 2c 20 63 68 | In glob|al.h, ch|
|00001d90| 61 6e 67 65 20 44 41 54 | 41 5f 46 49 4c 45 5f 44 |ange DAT|A_FILE_D|
|00001da0| 49 52 45 43 54 4f 52 59 | 20 74 6f 20 61 20 64 69 |IRECTORY| to a di|
|00001db0| 72 65 63 74 6f 72 79 20 | 77 68 69 63 68 20 79 6f |rectory |which yo|
|00001dc0| 75 20 5b 77 69 6c 6c 5d | 20 0a 58 20 20 20 20 20 |u [will]| .X |
|00001dd0| 6f 77 6e 20 61 6e 64 20 | 77 68 69 63 68 20 63 61 |own and |which ca|
|00001de0| 6e 20 62 65 20 61 63 63 | 65 73 73 65 64 20 62 79 |n be acc|essed by|
|00001df0| 20 61 6c 6c 20 70 6f 74 | 65 6e 74 69 61 6c 20 67 | all pot|ential g|
|00001e00| 6f 73 69 70 20 75 73 65 | 72 73 2e 0a 58 0a 58 28 |osip use|rs..X.X(|
|00001e10| 32 29 20 20 43 68 61 6e | 67 65 20 53 45 43 52 45 |2) Chan|ge SECRE|
|00001e20| 54 5f 44 49 52 20 74 6f | 20 73 6f 6d 65 74 68 69 |T_DIR to| somethi|
|00001e30| 6e 67 20 6e 6f 74 20 65 | 61 73 69 6c 79 20 67 75 |ng not e|asily gu|
|00001e40| 65 73 73 65 64 2e 0a 58 | 0a 58 28 33 29 20 20 49 |essed..X|.X(3) I|
|00001e50| 6e 20 6d 61 69 6e 2e 63 | 2c 20 66 75 6e 63 74 69 |n main.c|, functi|
|00001e60| 6f 6e 20 69 6e 69 74 5f | 66 69 6c 65 5f 6e 61 6d |on init_|file_nam|
|00001e70| 65 73 28 29 2c 20 63 68 | 61 6e 67 65 20 74 68 65 |es(), ch|ange the|
|00001e80| 20 6e 61 6d 65 73 20 6f | 66 20 68 69 73 74 6f 72 | names o|f histor|
|00001e90| 79 20 61 6e 64 0a 58 20 | 20 20 20 20 6c 61 73 74 |y and.X | last|
|00001ea0| 20 66 69 6c 65 73 20 28 | 61 6e 64 20 6c 6f 63 6b | files (|and lock|
|00001eb0| 20 66 69 6c 65 73 20 69 | 66 20 75 73 65 64 29 2e | files i|f used).|
|00001ec0| 20 20 54 68 65 20 68 69 | 73 74 6f 72 79 20 61 6e | The hi|story an|
|00001ed0| 64 20 6c 61 73 74 20 66 | 69 6c 65 73 20 73 68 6f |d last f|iles sho|
|00001ee0| 75 6c 64 0a 58 20 20 20 | 20 20 6e 6f 74 20 62 65 |uld.X | not be|
|00001ef0| 20 65 64 69 74 65 64 20 | 64 69 72 65 63 74 6c 79 | edited |directly|
|00001f00| 20 62 79 20 61 6e 79 6f | 6e 65 3a 20 67 69 76 69 | by anyo|ne: givi|
|00001f10| 6e 67 20 74 68 65 6d 20 | 75 6e 75 73 75 61 6c 20 |ng them |unusual |
|00001f20| 6e 61 6d 65 73 20 69 6e | 20 61 6e 0a 58 20 20 20 |names in| an.X |
|00001f30| 20 20 75 6e 72 65 61 64 | 61 62 6c 65 20 64 69 72 | unread|able dir|
|00001f40| 65 63 74 6f 72 79 20 6d | 61 6b 65 73 20 74 68 69 |ectory m|akes thi|
|00001f50| 73 20 6c 65 73 73 20 6c | 69 6b 65 6c 79 20 74 6f |s less l|ikely to|
|00001f60| 20 6f 63 63 75 72 2e 0a | 58 0a 58 28 34 29 20 20 | occur..|X.X(4) |
|00001f70| 49 6e 20 73 65 74 75 70 | 2c 20 63 68 61 6e 67 65 |In setup|, change|
|00001f80| 20 74 68 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 | the def|initions|
|00001f90| 20 6f 66 20 74 68 65 20 | 61 62 6f 76 65 20 61 63 | of the |above ac|
|00001fa0| 63 6f 72 64 69 6e 67 6c | 79 2e 20 0a 58 0a 58 28 |cordingl|y. .X.X(|
|00001fb0| 35 29 20 20 49 6e 20 63 | 6f 6e 74 72 6f 6c 2e 68 |5) In c|ontrol.h|
|00001fc0| 2c 20 79 6f 75 20 6d 69 | 67 68 74 20 6c 69 6b 65 |, you mi|ght like|
|00001fd0| 20 74 6f 20 73 70 65 63 | 69 66 79 20 79 6f 75 72 | to spec|ify your|
|00001fe0| 73 65 6c 66 20 61 73 20 | 74 68 65 20 53 55 50 45 |self as |the SUPE|
|00001ff0| 52 5f 55 53 45 52 2e 0a | 58 20 20 20 20 20 53 55 |R_USER..|X SU|
|00002000| 50 45 52 5f 55 53 45 52 | 20 69 73 20 74 68 65 20 |PER_USER| is the |
|00002010| 6f 6e 6c 79 20 6f 6e 65 | 20 77 68 6f 20 63 61 6e |only one| who can|
|00002020| 20 75 73 65 20 74 68 65 | 20 2d 23 20 61 6e 64 20 | use the| -# and |
|00002030| 2d 40 20 6f 70 74 69 6f | 6e 73 2c 20 77 68 69 63 |-@ optio|ns, whic|
|00002040| 68 20 61 72 65 0a 58 20 | 20 20 20 20 75 73 65 64 |h are.X | used|
|00002050| 20 74 6f 20 64 65 6e 79 | 20 6f 72 20 72 65 73 74 | to deny| or rest|
|00002060| 6f 72 65 20 61 63 63 65 | 73 73 20 74 6f 20 67 6f |ore acce|ss to go|
|00002070| 73 69 70 20 28 6e 6f 72 | 6d 61 6c 6c 79 20 75 73 |sip (nor|mally us|
|00002080| 65 64 20 77 68 65 6e 20 | 61 20 6e 65 77 20 76 65 |ed when |a new ve|
|00002090| 72 73 69 6f 6e 0a 58 20 | 20 20 20 20 69 73 20 62 |rsion.X | is b|
|000020a0| 65 69 6e 67 20 69 6e 73 | 74 61 6c 6c 65 64 29 2e |eing ins|talled).|
|000020b0| 20 20 59 6f 75 20 6d 69 | 67 68 74 20 6c 69 6b 65 | You mi|ght like|
|000020c0| 20 74 6f 20 63 68 61 6e | 67 65 20 44 4f 57 4e 5f | to chan|ge DOWN_|
|000020d0| 46 49 4c 45 20 61 73 20 | 77 65 6c 6c 2e 0a 58 0a |FILE as |well..X.|
|000020e0| 58 28 36 29 20 20 49 6e | 20 67 6c 6f 62 61 6c 2e |X(6) In| global.|
|000020f0| 68 2c 20 61 6c 74 65 72 | 20 4d 41 58 5f 46 49 4c |h, alter| MAX_FIL|
|00002100| 45 5f 4c 45 4e 47 54 48 | 20 74 6f 20 72 65 66 6c |E_LENGTH| to refl|
|00002110| 65 63 74 20 79 6f 75 72 | 20 63 68 6f 69 63 65 20 |ect your| choice |
|00002120| 6f 66 20 66 69 6c 65 20 | 6e 61 6d 65 73 2e 0a 58 |of file |names..X|
|00002130| 0a 58 46 6f 72 20 71 75 | 69 74 65 20 61 20 77 68 |.XFor qu|ite a wh|
|00002140| 69 6c 65 20 6c 6f 63 6b | 66 28 29 20 64 69 64 20 |ile lock|f() did |
|00002150| 6e 6f 74 20 77 6f 72 6b | 20 6f 6e 20 6f 75 72 20 |not work| on our |
|00002160| 73 79 73 74 65 6d 2e 20 | 20 49 20 68 61 76 65 20 |system. | I have |
|00002170| 6c 65 66 74 20 69 6e 20 | 74 68 65 0a 58 70 72 65 |left in |the.Xpre|
|00002180| 76 69 6f 75 73 20 6c 6f | 63 6b 69 6e 67 20 63 6f |vious lo|cking co|
|00002190| 64 65 2c 20 62 61 73 65 | 64 20 6f 6e 20 6c 6f 63 |de, base|d on loc|
|000021a0| 6b 20 66 69 6c 65 73 20 | 61 6e 64 20 66 6c 6f 63 |k files |and floc|
|000021b0| 6b 28 29 2c 20 77 68 69 | 63 68 20 79 6f 75 20 63 |k(), whi|ch you c|
|000021c0| 61 6e 20 75 73 65 20 69 | 66 0a 58 79 6f 75 72 20 |an use i|f.Xyour |
|000021d0| 6c 6f 63 6b 66 28 29 20 | 69 73 20 62 72 6f 6b 65 |lockf() |is broke|
|000021e0| 6e 3a 20 61 64 64 20 27 | 43 46 4c 41 47 53 3d 2d |n: add '|CFLAGS=-|
|000021f0| 44 4c 4f 43 4b 46 5f 42 | 52 4f 4b 45 4e 27 20 74 |DLOCKF_B|ROKEN' t|
|00002200| 6f 20 74 68 65 20 6d 61 | 6b 65 66 69 6c 65 2c 20 |o the ma|kefile, |
|00002210| 61 6e 64 20 61 6c 74 65 | 72 0a 58 27 73 65 74 75 |and alte|r.X'setu|
|00002220| 70 27 20 73 6f 20 74 68 | 61 74 20 44 41 54 41 5f |p' so th|at DATA_|
|00002230| 46 49 4c 45 5f 44 49 52 | 45 43 54 4f 52 59 20 68 |FILE_DIR|ECTORY h|
|00002240| 61 73 20 67 6c 6f 62 61 | 6c 20 77 72 69 74 65 20 |as globa|l write |
|00002250| 70 65 72 6d 69 73 73 69 | 6f 6e 2e 20 20 5b 32 5d |permissi|on. [2]|
|00002260| 0a 58 0a 58 54 68 65 20 | 6d 61 6e 75 61 6c 20 70 |.X.XThe |manual p|
|00002270| 61 67 65 73 20 77 69 6c | 6c 20 6e 65 65 64 20 61 |ages wil|l need a|
|00002280| 20 66 65 77 20 6d 69 6e | 6f 72 20 63 68 61 6e 67 | few min|or chang|
|00002290| 65 73 3a 20 79 6f 75 20 | 77 69 6c 6c 20 6e 65 65 |es: you |will nee|
|000022a0| 64 20 74 6f 20 61 6c 74 | 65 72 20 74 68 65 0a 58 |d to alt|er the.X|
|000022b0| 6c 69 73 74 20 6f 66 20 | 67 6f 73 69 70 20 66 69 |list of |gosip fi|
|000022c0| 6c 65 73 20 74 6f 20 73 | 70 65 63 69 66 79 20 74 |les to s|pecify t|
|000022d0| 68 6f 73 65 20 79 6f 75 | 20 63 68 6f 6f 73 65 20 |hose you| choose |
|000022e0| 74 6f 20 70 72 6f 76 69 | 64 65 2e 0a 58 0a 58 4f |to provi|de..X.XO|
|000022f0| 66 20 63 6f 75 72 73 65 | 2c 20 74 68 65 79 20 6d |f course|, they m|
|00002300| 61 79 20 62 65 20 6c 6f | 74 73 20 6f 66 20 70 6f |ay be lo|ts of po|
|00002310| 72 74 61 62 69 6c 69 74 | 79 20 70 72 6f 62 6c 65 |rtabilit|y proble|
|00002320| 6d 73 2e 20 20 49 20 64 | 6f 6e 27 74 20 6b 6e 6f |ms. I d|on't kno|
|00002330| 77 20 77 68 69 63 68 0a | 58 73 79 73 74 65 6d 20 |w which.|Xsystem |
|00002340| 63 61 6c 6c 73 20 61 72 | 65 20 73 70 65 63 69 66 |calls ar|e specif|
|00002350| 69 63 20 74 6f 20 74 68 | 69 73 20 76 65 72 73 69 |ic to th|is versi|
|00002360| 6f 6e 20 6f 66 20 55 4e | 49 58 20 28 53 75 6e 4f |on of UN|IX (SunO|
|00002370| 53 20 34 2e 30 2e 31 29 | 2e 0a 58 0a 58 49 6e 73 |S 4.0.1)|..X.XIns|
|00002380| 74 61 6c 6c 61 74 69 6f | 6e 0a 58 3d 3d 3d 3d 3d |tallatio|n.X=====|
|00002390| 3d 3d 3d 3d 3d 3d 3d 0a | 58 0a 58 54 6f 20 69 6e |=======.|X.XTo in|
|000023a0| 73 74 61 6c 6c 20 67 6f | 73 69 70 2c 20 72 75 6e |stall go|sip, run|
|000023b0| 20 22 73 65 74 75 70 20 | 67 6f 73 69 70 22 2c 20 | "setup |gosip", |
|000023c0| 77 68 65 72 65 20 67 6f | 73 69 70 20 73 68 6f 75 |where go|sip shou|
|000023d0| 6c 64 20 62 65 20 72 65 | 70 6c 61 63 65 64 20 77 |ld be re|placed w|
|000023e0| 69 74 68 0a 58 77 68 61 | 74 65 76 65 72 20 66 69 |ith.Xwha|tever fi|
|000023f0| 6c 65 73 20 79 6f 75 20 | 77 69 73 68 20 74 6f 20 |les you |wish to |
|00002400| 69 6e 73 74 61 6c 6c 2e | 20 20 53 65 74 75 70 20 |install.| Setup |
|00002410| 77 69 6c 6c 20 63 72 65 | 61 74 65 20 74 68 65 20 |will cre|ate the |
|00002420| 64 69 72 65 63 74 6f 72 | 79 20 66 6f 72 20 64 61 |director|y for da|
|00002430| 74 61 0a 58 66 69 6c 65 | 73 20 69 66 20 69 74 20 |ta.Xfile|s if it |
|00002440| 64 6f 65 73 6e 27 74 20 | 61 6c 72 65 61 64 79 20 |doesn't |already |
|00002450| 65 78 69 73 74 20 2d 20 | 6e 6f 74 65 20 74 68 61 |exist - |note tha|
|00002460| 74 20 69 74 20 6d 75 73 | 74 20 62 65 20 6f 77 6e |t it mus|t be own|
|00002470| 65 64 20 62 79 20 79 6f | 75 2e 20 20 54 68 65 0a |ed by yo|u. The.|
|00002480| 58 64 69 72 65 63 74 6f | 72 79 20 66 6f 72 20 64 |Xdirecto|ry for d|
|00002490| 61 74 61 20 66 69 6c 65 | 73 20 73 68 6f 75 6c 64 |ata file|s should|
|000024a0| 20 6e 6f 74 20 62 65 20 | 75 73 65 64 20 74 6f 20 | not be |used to |
|000024b0| 6b 65 65 70 20 61 6e 79 | 74 68 69 6e 67 20 6f 74 |keep any|thing ot|
|000024c0| 68 65 72 20 74 68 61 6e | 20 77 68 61 74 0a 58 67 |her than| what.Xg|
|000024d0| 6f 73 69 70 20 70 75 74 | 73 20 74 68 65 72 65 2e |osip put|s there.|
|000024e0| 0a 58 0a 58 50 72 6f 62 | 6c 65 6d 73 0a 58 3d 3d |.X.XProb|lems.X==|
|000024f0| 3d 3d 3d 3d 3d 3d 0a 58 | 0a 58 41 73 20 49 27 76 |======.X|.XAs I'v|
|00002500| 65 20 61 6c 72 65 61 64 | 79 20 73 61 69 64 2c 20 |e alread|y said, |
|00002510| 49 20 72 65 61 6c 6c 79 | 20 64 6f 6e 27 74 20 6b |I really| don't k|
|00002520| 6e 6f 77 20 77 68 61 74 | 20 73 79 73 74 65 6d 20 |now what| system |
|00002530| 63 61 6c 6c 73 20 77 69 | 6c 6c 20 6f 72 20 77 69 |calls wi|ll or wi|
|00002540| 6c 6c 20 6e 6f 74 0a 58 | 77 6f 72 6b 20 6f 6e 20 |ll not.X|work on |
|00002550| 79 6f 75 72 20 73 79 73 | 74 65 6d 2e 20 20 49 20 |your sys|tem. I |
|00002560| 77 69 6c 6c 20 62 65 20 | 70 6c 65 61 73 65 64 20 |will be |pleased |
|00002570| 74 6f 20 72 65 63 65 69 | 76 65 20 62 75 67 20 72 |to recei|ve bug r|
|00002580| 65 70 6f 72 74 73 20 6f | 72 20 73 75 67 67 65 73 |eports o|r sugges|
|00002590| 74 69 6f 6e 73 0a 58 66 | 6f 72 20 6d 6f 64 69 66 |tions.Xf|or modif|
|000025a0| 69 63 61 74 69 6f 6e 73 | 20 6d 61 69 6c 65 64 20 |ications| mailed |
|000025b0| 74 6f 20 27 6d 61 75 68 | 6b 40 75 6b 2e 61 63 2e |to 'mauh|k@uk.ac.|
|000025c0| 77 61 72 77 69 63 6b 27 | 2e 20 20 48 6f 77 65 76 |warwick'|. Howev|
|000025d0| 65 72 2c 20 73 69 6e 63 | 65 20 74 65 72 6d 20 65 |er, sinc|e term e|
|000025e0| 6e 64 73 0a 58 6f 6e 20 | 31 20 4a 75 6c 79 20 31 |nds.Xon |1 July 1|
|000025f0| 39 38 39 20 61 6e 64 20 | 49 20 77 69 6c 6c 20 67 |989 and |I will g|
|00002600| 6f 20 68 6f 6d 65 20 74 | 68 65 6e 2c 20 49 20 77 |o home t|hen, I w|
|00002610| 69 6c 6c 20 6e 6f 74 20 | 62 65 20 61 62 6c 65 20 |ill not |be able |
|00002620| 74 6f 20 72 65 70 6c 79 | 20 74 6f 20 6d 61 69 6c |to reply| to mail|
|00002630| 0a 58 72 65 63 65 69 76 | 65 64 20 61 66 74 65 72 |.Xreceiv|ed after|
|00002640| 20 74 68 61 74 20 64 61 | 74 65 2e 20 20 49 20 64 | that da|te. I d|
|00002650| 6f 2c 20 74 68 6f 75 67 | 68 2c 20 65 78 70 65 63 |o, thoug|h, expec|
|00002660| 74 20 74 6f 20 63 6f 6d | 65 20 62 61 63 6b 20 66 |t to com|e back f|
|00002670| 6f 72 20 61 20 64 61 79 | 20 61 74 20 73 6f 6d 65 |or a day| at some|
|00002680| 0a 58 70 6f 69 6e 74 20 | 64 75 72 69 6e 67 20 74 |.Xpoint |during t|
|00002690| 68 65 20 73 75 6d 6d 65 | 72 20 73 6f 20 49 20 77 |he summe|r so I w|
|000026a0| 69 6c 6c 20 73 74 69 6c | 6c 20 73 65 65 20 61 6e |ill stil|l see an|
|000026b0| 79 20 6d 61 69 6c 20 73 | 65 6e 74 2e 0a 58 0a 58 |y mail s|ent..X.X|
|000026c0| 41 6e 64 72 65 61 73 20 | 50 61 67 65 6c 20 20 20 |Andreas |Pagel |
|000026d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026e0| 20 20 20 20 20 4d 61 67 | 69 63 69 61 6e 2c 20 50 | Mag|ician, P|
|000026f0| 72 6f 67 72 61 6d 6d 65 | 72 20 61 6e 64 20 4d 61 |rogramme|r and Ma|
|00002700| 74 68 65 6d 61 74 69 63 | 69 61 6e 0a 58 55 55 43 |thematic|ian.XUUC|
|00002710| 50 3a 20 20 20 2e 2e 2e | 21 6d 63 76 61 78 21 75 |P: ...|!mcvax!u|
|00002720| 6b 63 21 77 61 72 77 69 | 63 6b 21 6d 61 75 68 6b |kc!warwi|ck!mauhk|
|00002730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002740| 20 20 20 55 6e 69 76 65 | 72 73 69 74 79 20 6f 66 | Unive|rsity of|
|00002750| 20 57 61 72 77 69 63 6b | 0a 58 4a 41 4e 45 54 3a | Warwick|.XJANET:|
|00002760| 20 20 6d 61 75 68 6b 40 | 75 6b 2e 61 63 2e 77 61 | mauhk@|uk.ac.wa|
|00002770| 72 77 69 63 6b 20 20 20 | 20 20 20 20 20 20 20 20 |rwick | |
|00002780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002790| 43 6f 76 65 6e 74 72 79 | 0a 58 41 52 50 41 3a 20 |Coventry|.XARPA: |
|000027a0| 20 20 6d 61 75 68 6b 25 | 63 75 2e 77 61 72 77 69 | mauhk%|cu.warwi|
|000027b0| 63 6b 40 6e 73 73 2e 63 | 73 2e 75 63 6c 2e 61 63 |ck@nss.c|s.ucl.ac|
|000027c0| 2e 75 6b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.uk | |
|000027d0| 47 72 65 61 74 20 42 72 | 69 74 61 69 6e 0a 58 0a |Great Br|itain.X.|
|000027e0| 58 0a 58 46 6f 6f 74 6e | 6f 74 65 73 0a 58 3d 3d |X.XFootn|otes.X==|
|000027f0| 3d 3d 3d 3d 3d 3d 3d 0a | 58 0a 58 5b 31 5d 20 20 |=======.|X.X[1] |
|00002800| 47 6f 73 69 70 20 66 69 | 6c 65 73 20 75 73 65 64 |Gosip fi|les used|
|00002810| 20 74 6f 20 62 65 20 6b | 6e 6f 77 6e 20 61 73 20 | to be k|nown as |
|00002820| 22 74 68 65 20 67 6f 73 | 73 69 70 20 66 69 6c 65 |"the gos|sip file|
|00002830| 73 22 20 69 6e 20 74 68 | 65 20 6d 61 6e 75 61 6c |s" in th|e manual|
|00002840| 20 70 61 67 65 73 0a 58 | 20 20 20 20 20 61 6e 64 | pages.X| and|
|00002850| 20 63 6f 6c 6c 6f 71 75 | 69 61 6c 6c 79 2e 20 20 | colloqu|ially. |
|00002860| 57 68 65 6e 20 49 20 72 | 65 77 72 6f 74 65 20 67 |When I r|ewrote g|
|00002870| 6f 73 69 70 20 69 6e 20 | 43 2c 20 49 20 6e 65 65 |osip in |C, I nee|
|00002880| 64 65 64 20 74 6f 20 63 | 6f 6d 70 69 6c 65 20 74 |ded to c|ompile t|
|00002890| 65 73 74 0a 58 20 20 20 | 20 20 76 65 72 73 69 6f |est.X | versio|
|000028a0| 6e 73 2e 20 20 4f 62 76 | 69 6f 75 73 6c 79 20 49 |ns. Obv|iously I|
|000028b0| 20 6e 65 65 64 65 64 20 | 61 20 6e 61 6d 65 20 6f | needed |a name o|
|000028c0| 74 68 65 72 20 74 68 61 | 6e 20 67 6f 73 73 69 70 |ther tha|n gossip|
|000028d0| 20 62 79 20 77 68 69 63 | 68 20 74 6f 20 63 61 6c | by whic|h to cal|
|000028e0| 6c 0a 58 20 20 20 20 20 | 74 68 65 20 62 69 6e 61 |l.X |the bina|
|000028f0| 72 79 2c 20 73 6f 20 49 | 20 63 68 6f 73 65 20 67 |ry, so I| chose g|
|00002900| 6f 73 69 70 2e 20 20 46 | 72 6f 6d 20 74 68 69 73 |osip. F|rom this|
|00002910| 2c 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 75 73 |, the cu|rrent us|
|00002920| 61 67 65 20 6f 66 20 67 | 6f 73 69 70 0a 58 20 20 |age of g|osip.X |
|00002930| 20 20 20 61 72 6f 73 65 | 2e 0a 58 0a 58 5b 32 5d | arose|..X.X[2]|
|00002940| 20 20 49 27 6d 20 6e 6f | 74 20 73 75 72 65 20 77 | I'm no|t sure w|
|00002950| 68 65 74 68 65 72 20 74 | 68 69 73 20 77 69 6c 6c |hether t|his will|
|00002960| 20 73 75 66 66 69 63 65 | 2e 20 20 49 20 68 61 76 | suffice|. I hav|
|00002970| 65 6e 27 74 20 67 6f 74 | 20 74 69 6d 65 20 74 6f |en't got| time to|
|00002980| 20 74 65 73 74 20 74 68 | 61 74 0a 58 20 20 20 20 | test th|at.X |
|00002990| 20 61 73 70 65 63 74 2c | 20 73 69 6e 63 65 20 49 | aspect,| since I|
|000029a0| 27 6d 20 72 75 6e 6e 69 | 6e 67 20 6f 75 74 20 6f |'m runni|ng out o|
|000029b0| 66 20 74 69 6d 65 20 69 | 6e 20 77 68 69 63 68 20 |f time i|n which |
|000029c0| 74 6f 20 70 6f 73 74 20 | 74 68 65 20 70 72 6f 67 |to post |the prog|
|000029d0| 72 61 6d 2e 0a 58 0a 58 | 5b 33 5d 20 20 44 77 27 |ram..X.X|[3] Dw'|
|000029e0| 73 20 6e 61 6d 65 20 63 | 6f 6d 65 73 20 66 72 6f |s name c|omes fro|
|000029f0| 6d 20 27 64 77 20 67 6f | 73 69 70 27 20 6d 65 61 |m 'dw go|sip' mea|
|00002a00| 6e 69 6e 67 20 22 64 65 | 61 6c 20 77 69 74 68 20 |ning "de|al with |
|00002a10| 67 6f 73 69 70 22 2e 20 | 20 49 20 75 6e 64 65 72 |gosip". | I under|
|00002a20| 73 74 61 6e 64 0a 58 20 | 20 20 20 20 74 68 61 74 |stand.X | that|
|00002a30| 20 42 6f 75 72 6e 65 20 | 73 68 65 6c 6c 20 66 75 | Bourne |shell fu|
|00002a40| 6e 63 74 69 6f 6e 73 20 | 61 72 65 20 6e 6f 74 20 |nctions |are not |
|00002a50| 75 6e 69 76 65 72 73 61 | 6c 2c 20 73 6f 20 74 68 |universa|l, so th|
|00002a60| 69 73 20 70 72 6f 67 72 | 61 6d 20 6d 61 79 20 62 |is progr|am may b|
|00002a70| 65 0a 58 20 20 20 20 20 | 64 69 66 66 69 63 75 6c |e.X |difficul|
|00002a80| 74 20 74 6f 20 70 6f 72 | 74 20 74 6f 20 73 6f 6d |t to por|t to som|
|00002a90| 65 20 73 79 73 74 65 6d | 73 2e 0a 45 4e 44 5f 4f |e system|s..END_O|
|00002aa0| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 34 |F_FILE.i|f test 4|
|00002ab0| 39 36 31 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |961 -ne |`wc -c <|
|00002ac0| 27 52 45 41 44 4d 45 27 | 60 3b 20 74 68 65 6e 0a |'README'|`; then.|
|00002ad0| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00002ae0| 22 27 52 45 41 44 4d 45 | 27 5c 22 20 75 6e 70 61 |"'README|'\" unpa|
|00002af0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00002b00| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00002b10| 66 20 27 52 45 41 44 4d | 45 27 0a 66 69 0a 69 66 |f 'READM|E'.fi.if|
|00002b20| 20 74 65 73 74 20 2d 66 | 20 27 61 6c 6c 67 6f 73 | test -f| 'allgos|
|00002b30| 73 2e 31 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |s.1' -a |"${1}" !|
|00002b40| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00002b50| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00002b60| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00002b70| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 61 6c |sting fi|le \"'al|
|00002b80| 6c 67 6f 73 73 2e 31 27 | 5c 22 0a 65 6c 73 65 0a |lgoss.1'|\".else.|
|00002b90| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00002ba0| 63 74 69 6e 67 20 5c 22 | 27 61 6c 6c 67 6f 73 73 |cting \"|'allgoss|
|00002bb0| 2e 31 27 5c 22 20 5c 28 | 33 38 32 20 63 68 61 72 |.1'\" \(|382 char|
|00002bc0| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|00002bd0| 5e 58 2f 2f 22 20 3e 27 | 61 6c 6c 67 6f 73 73 2e |^X//" >'|allgoss.|
|00002be0| 31 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |1' <<'EN|D_OF_FIL|
|00002bf0| 45 27 0a 58 2e 54 48 20 | 41 4c 4c 47 4f 53 53 20 |E'.X.TH |ALLGOSS |
|00002c00| 31 20 22 32 35 20 46 65 | 62 72 75 61 72 79 20 31 |1 "25 Fe|bruary 1|
|00002c10| 39 38 39 22 0a 58 2e 53 | 48 20 4e 41 4d 45 0a 58 |989".X.S|H NAME.X|
|00002c20| 61 6c 6c 67 6f 73 73 20 | 5c 2d 20 70 72 69 6e 74 |allgoss |\- print|
|00002c30| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 61 6c 6c 20 |s a list| of all |
|00002c40| 67 6f 73 69 70 20 66 69 | 6c 65 73 0a 58 2e 53 48 |gosip fi|les.X.SH|
|00002c50| 20 53 59 4e 4f 50 53 49 | 53 0a 58 61 6c 6c 67 6f | SYNOPSI|S.Xallgo|
|00002c60| 73 73 0a 58 2e 53 48 20 | 44 45 53 43 52 49 50 54 |ss.X.SH |DESCRIPT|
|00002c70| 49 4f 4e 0a 58 61 6c 6c | 67 6f 73 73 20 70 72 69 |ION.Xall|goss pri|
|00002c80| 6e 74 73 20 61 20 6c 69 | 73 74 20 6f 66 20 61 6c |nts a li|st of al|
|00002c90| 6c 20 67 6f 73 69 70 20 | 66 69 6c 65 73 2e 0a 58 |l gosip |files..X|
|00002ca0| 2e 53 48 20 53 45 45 20 | 41 4c 53 4f 0a 58 64 77 |.SH SEE |ALSO.Xdw|
|00002cb0| 28 31 29 2c 20 6c 75 28 | 31 29 2c 20 67 6f 73 73 |(1), lu(|1), goss|
|00002cc0| 69 70 28 31 29 2c 20 65 | 76 65 6e 74 73 28 31 29 |ip(1), e|vents(1)|
|00002cd0| 2c 20 65 74 63 2e 0a 58 | 2e 53 48 20 42 55 47 53 |, etc..X|.SH BUGS|
|00002ce0| 0a 58 49 66 20 74 68 65 | 20 67 6f 73 69 70 20 66 |.XIf the| gosip f|
|00002cf0| 69 6c 65 20 27 66 72 6f | 67 27 20 65 78 69 73 74 |ile 'fro|g' exist|
|00002d00| 73 2c 20 62 75 74 20 74 | 68 65 20 63 6f 72 72 65 |s, but t|he corre|
|00002d10| 73 70 6f 6e 64 69 6e 67 | 20 27 74 65 78 74 2e 66 |sponding| 'text.f|
|00002d20| 72 6f 67 27 20 68 61 73 | 20 62 65 65 6e 0a 58 64 |rog' has| been.Xd|
|00002d30| 65 6c 65 74 65 64 20 62 | 79 20 73 6f 6d 65 20 75 |eleted b|y some u|
|00002d40| 6e 66 72 69 65 6e 64 6c | 79 20 6c 69 66 65 66 6f |nfriendl|y lifefo|
|00002d50| 72 6d 2c 20 66 72 6f 67 | 20 77 69 6c 6c 20 6e 6f |rm, frog| will no|
|00002d60| 74 20 62 65 20 69 6e 63 | 6c 75 64 65 64 20 69 6e |t be inc|luded in|
|00002d70| 20 74 68 65 20 6f 75 74 | 70 75 74 2e 0a 45 4e 44 | the out|put..END|
|00002d80| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00002d90| 20 33 38 32 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 382 -ne| `wc -c |
|00002da0| 3c 27 61 6c 6c 67 6f 73 | 73 2e 31 27 60 3b 20 74 |<'allgos|s.1'`; t|
|00002db0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00002dc0| 72 3a 20 5c 22 27 61 6c | 6c 67 6f 73 73 2e 31 27 |r: \"'al|lgoss.1'|
|00002dd0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00002de0| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00002df0| 23 20 65 6e 64 20 6f 66 | 20 27 61 6c 6c 67 6f 73 |# end of| 'allgos|
|00002e00| 73 2e 31 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |s.1'.fi.|if test |
|00002e10| 2d 66 20 27 63 61 74 2e | 63 27 20 2d 61 20 22 24 |-f 'cat.|c' -a "$|
|00002e20| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00002e30| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00002e40| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00002e50| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00002e60| 20 5c 22 27 63 61 74 2e | 63 27 5c 22 0a 65 6c 73 | \"'cat.|c'\".els|
|00002e70| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00002e80| 72 61 63 74 69 6e 67 20 | 5c 22 27 63 61 74 2e 63 |racting |\"'cat.c|
|00002e90| 27 5c 22 20 5c 28 32 37 | 39 34 20 63 68 61 72 61 |'\" \(27|94 chara|
|00002ea0| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00002eb0| 58 2f 2f 22 20 3e 27 63 | 61 74 2e 63 27 20 3c 3c |X//" >'c|at.c' <<|
|00002ec0| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 23 |'END_OF_|FILE'.X#|
|00002ed0| 69 6e 63 6c 75 64 65 20 | 3c 73 69 67 6e 61 6c 2e |include |<signal.|
|00002ee0| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 20 3c 73 79 |h>.X#inc|lude <sy|
|00002ef0| 73 2f 77 61 69 74 2e 68 | 3e 0a 58 0a 58 23 69 6e |s/wait.h|>.X.X#in|
|00002f00| 63 6c 75 64 65 20 22 67 | 6c 6f 62 61 6c 2e 68 22 |clude "g|lobal.h"|
|00002f10| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 63 61 74 2e |.X#inclu|de "cat.|
|00002f20| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 75 74 |h".X#inc|lude "ut|
|00002f30| 69 6c 2e 68 22 0a 58 23 | 69 6e 63 6c 75 64 65 20 |il.h".X#|include |
|00002f40| 22 68 69 73 74 6f 72 79 | 2e 68 22 0a 58 0a 58 2f |"history|.h".X.X/|
|00002f50| 2a 20 20 76 6f 69 64 20 | 70 61 67 65 28 29 0a 58 |* void |page().X|
|00002f60| 20 2a 0a 58 20 2a 20 20 | 49 66 20 74 68 65 20 73 | *.X * |If the s|
|00002f70| 74 64 6f 75 74 20 69 73 | 20 63 6f 6e 6e 65 63 74 |tdout is| connect|
|00002f80| 65 64 20 74 6f 20 61 20 | 74 65 72 6d 69 6e 61 6c |ed to a |terminal|
|00002f90| 2c 20 70 61 67 65 20 77 | 69 6c 6c 20 66 6f 72 6b |, page w|ill fork|
|00002fa0| 20 6f 66 66 20 74 68 65 | 20 70 61 67 65 72 20 69 | off the| pager i|
|00002fb0| 6e 0a 58 20 2a 20 20 74 | 68 65 20 65 6e 76 69 72 |n.X * t|he envir|
|00002fc0| 6f 6e 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 20 |onment v|ariable |
|00002fd0| 50 41 47 45 52 2c 20 6f | 72 20 6d 6f 72 65 28 31 |PAGER, o|r more(1|
|00002fe0| 29 20 69 66 20 50 41 47 | 45 52 20 69 73 20 6e 6f |) if PAG|ER is no|
|00002ff0| 74 20 64 65 66 69 6e 65 | 64 2e 20 20 49 74 0a 58 |t define|d. It.X|
|00003000| 20 2a 20 20 6d 61 6b 65 | 73 20 61 6c 6c 20 73 75 | * make|s all su|
|00003010| 62 73 65 71 75 65 6e 74 | 20 6f 75 74 70 75 74 20 |bsequent| output |
|00003020| 74 6f 20 73 74 64 6f 75 | 74 20 67 6f 20 74 68 72 |to stdou|t go thr|
|00003030| 6f 75 67 68 20 74 68 65 | 20 70 61 67 65 72 2e 20 |ough the| pager. |
|00003040| 20 41 6e 79 20 65 72 72 | 6f 72 73 2c 0a 58 20 2a | Any err|ors,.X *|
|00003050| 20 20 65 67 2e 20 66 72 | 6f 6d 20 66 6f 72 6b 28 | eg. fr|om fork(|
|00003060| 29 20 6f 72 20 70 69 70 | 65 28 29 2c 20 63 61 75 |) or pip|e(), cau|
|00003070| 73 65 20 61 6e 20 65 78 | 69 74 2e 20 20 4e 6f 74 |se an ex|it. Not|
|00003080| 65 20 74 68 61 74 20 74 | 68 65 20 70 61 72 65 6e |e that t|he paren|
|00003090| 74 20 62 65 63 6f 6d 65 | 73 0a 58 20 2a 20 20 74 |t become|s.X * t|
|000030a0| 68 65 20 70 61 67 65 72 | 2c 20 61 6e 64 20 74 68 |he pager|, and th|
|000030b0| 61 74 20 74 68 65 20 72 | 65 74 75 72 6e 20 68 61 |at the r|eturn ha|
|000030c0| 70 70 65 6e 73 20 69 6e | 20 74 68 65 20 63 68 69 |ppens in| the chi|
|000030d0| 6c 64 2e 0a 58 20 2a 2f | 0a 58 76 6f 69 64 20 70 |ld..X */|.Xvoid p|
|000030e0| 61 67 65 28 29 0a 58 7b | 0a 58 20 20 69 6e 74 20 |age().X{|.X int |
|000030f0| 66 69 6c 65 64 65 73 5b | 32 5d 2c 20 70 69 64 3b |filedes[|2], pid;|
|00003100| 0a 58 20 20 63 68 61 72 | 20 2a 70 61 67 65 72 20 |.X char| *pager |
|00003110| 3d 20 67 65 74 65 6e 76 | 20 28 20 22 50 41 47 45 |= getenv| ( "PAGE|
|00003120| 52 22 20 29 2c 20 2a 74 | 6d 70 3b 0a 58 0a 58 20 |R" ), *t|mp;.X.X |
|00003130| 20 69 66 20 28 20 21 20 | 69 73 61 74 74 79 20 28 | if ( ! |isatty (|
|00003140| 20 31 20 29 20 29 0a 58 | 20 20 20 20 72 65 74 75 | 1 ) ).X| retu|
|00003150| 72 6e 3b 0a 58 20 20 65 | 72 72 6f 72 20 28 20 70 |rn;.X e|rror ( p|
|00003160| 69 70 65 20 28 20 66 69 | 6c 65 64 65 73 20 29 2c |ipe ( fi|ledes ),|
|00003170| 20 22 43 6f 75 6c 64 6e | 27 74 20 63 72 65 61 74 | "Couldn|'t creat|
|00003180| 65 20 70 69 70 65 22 20 | 29 3b 0a 58 20 20 65 72 |e pipe" |);.X er|
|00003190| 72 6f 72 20 28 20 70 69 | 64 20 3d 20 66 6f 72 6b |ror ( pi|d = fork|
|000031a0| 20 28 29 2c 20 22 43 6f | 75 6c 64 6e 27 74 20 66 | (), "Co|uldn't f|
|000031b0| 6f 72 6b 22 20 29 3b 0a | 58 20 20 69 66 20 28 20 |ork" );.|X if ( |
|000031c0| 70 69 64 20 3d 3d 20 30 | 20 29 0a 58 20 20 7b 0a |pid == 0| ).X {.|
|000031d0| 58 20 20 20 20 65 72 72 | 6f 72 20 28 20 63 6c 6f |X err|or ( clo|
|000031e0| 73 65 20 28 20 66 69 6c | 65 64 65 73 5b 30 5d 20 |se ( fil|edes[0] |
|000031f0| 29 2c 20 22 43 6c 6f 73 | 65 20 66 61 69 6c 65 64 |), "Clos|e failed|
|00003200| 22 20 29 3b 0a 58 20 20 | 20 20 65 72 72 6f 72 20 |" );.X | error |
|00003210| 28 20 64 75 70 32 20 28 | 20 66 69 6c 65 64 65 73 |( dup2 (| filedes|
|00003220| 5b 31 5d 2c 20 31 20 29 | 2c 20 22 64 75 70 32 20 |[1], 1 )|, "dup2 |
|00003230| 66 61 69 6c 65 64 20 66 | 6f 72 20 6f 75 74 70 75 |failed f|or outpu|
|00003240| 74 22 20 29 3b 0a 58 20 | 20 20 20 65 72 72 6f 72 |t" );.X | error|
|00003250| 20 28 20 63 6c 6f 73 65 | 20 28 20 66 69 6c 65 64 | ( close| ( filed|
|00003260| 65 73 5b 31 5d 20 29 2c | 20 22 43 6c 6f 73 65 20 |es[1] ),| "Close |
|00003270| 66 61 69 6c 65 64 22 20 | 29 3b 0a 58 20 20 20 20 |failed" |);.X |
|00003280| 72 65 74 75 72 6e 3b 20 | 20 20 20 20 20 20 20 20 |return; | |
|00003290| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 65 | | /* e|
|000032a0| 72 72 6f 72 28 29 20 77 | 69 6c 6c 20 63 61 75 73 |rror() w|ill caus|
|000032b0| 65 20 61 6e 20 65 78 69 | 74 20 69 66 20 61 6e 79 |e an exi|t if any|
|000032c0| 74 68 69 6e 67 20 2a 2f | 0a 58 20 20 7d 20 20 20 |thing */|.X } |
|000032d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032e0| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 20 66 61 69 | | /* fai|
|000032f0| 6c 73 2c 20 77 68 69 63 | 68 20 63 6c 6f 73 65 73 |ls, whic|h closes|
|00003300| 20 66 69 6c 65 20 64 65 | 73 63 72 69 70 74 6f 72 | file de|scriptor|
|00003310| 73 2e 20 2a 2f 0a 58 0a | 58 20 20 65 72 72 6f 72 |s. */.X.|X error|
|00003320| 20 28 20 63 6c 6f 73 65 | 20 28 20 66 69 6c 65 64 | ( close| ( filed|
|00003330| 65 73 5b 31 5d 20 29 2c | 20 22 43 6c 6f 73 65 20 |es[1] ),| "Close |
|00003340| 66 61 69 6c 65 64 22 20 | 29 3b 0a 58 20 20 65 72 |failed" |);.X er|
|00003350| 72 6f 72 20 28 20 64 75 | 70 32 20 28 20 66 69 6c |ror ( du|p2 ( fil|
|00003360| 65 64 65 73 5b 30 5d 2c | 20 30 20 29 2c 20 22 64 |edes[0],| 0 ), "d|
|00003370| 75 70 32 20 66 61 69 6c | 65 64 20 66 6f 72 20 69 |up2 fail|ed for i|
|00003380| 6e 70 75 74 22 20 29 3b | 0a 58 20 20 65 72 72 6f |nput" );|.X erro|
|00003390| 72 20 28 20 63 6c 6f 73 | 65 20 28 20 66 69 6c 65 |r ( clos|e ( file|
|000033a0| 64 65 73 5b 30 5d 20 29 | 2c 20 22 43 6c 6f 73 65 |des[0] )|, "Close|
|000033b0| 20 66 61 69 6c 65 64 22 | 20 29 3b 0a 58 20 20 69 | failed"| );.X i|
|000033c0| 66 20 28 20 21 20 70 61 | 67 65 72 20 29 20 20 20 |f ( ! pa|ger ) |
|000033d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|000033e0| 68 65 72 65 20 74 68 6f | 75 67 68 2c 20 74 68 65 |here tho|ugh, the|
|000033f0| 72 65 20 73 68 6f 75 6c | 64 20 72 65 61 6c 6c 79 |re shoul|d really|
|00003400| 20 62 65 20 61 20 2a 2f | 0a 58 20 20 20 20 70 61 | be a */|.X pa|
|00003410| 67 65 72 20 3d 20 22 6d | 6f 72 65 22 3b 20 20 20 |ger = "m|ore"; |
|00003420| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 20 6b 69 6c | | /* kil|
|00003430| 6c 28 70 69 64 29 20 62 | 65 66 6f 72 65 20 61 6e |l(pid) b|efore an|
|00003440| 20 65 78 69 74 2c 20 6e | 6f 74 20 65 72 72 6f 72 | exit, n|ot error|
|00003450| 28 29 20 2a 2f 0a 58 20 | 20 65 6c 73 65 20 20 20 |() */.X | else |
|00003460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003470| 20 20 20 20 20 20 20 2f | 2a 20 67 65 74 20 6a 75 | /|* get ju|
|00003480| 73 74 20 74 68 65 20 70 | 61 67 65 72 2c 20 6e 6f |st the p|ager, no|
|00003490| 74 20 6f 70 74 69 6f 6e | 73 20 2a 2f 0a 58 20 20 |t option|s */.X |
|000034a0| 20 20 66 6f 72 20 28 20 | 74 6d 70 20 3d 20 70 61 | for ( |tmp = pa|
|000034b0| 67 65 72 3b 20 2a 74 6d | 70 20 21 3d 20 27 5c 30 |ger; *tm|p != '\0|
|000034c0| 27 3b 20 74 6d 70 2b 2b | 20 29 0a 58 20 20 20 20 |'; tmp++| ).X |
|000034d0| 20 20 69 66 20 28 20 2a | 74 6d 70 20 3d 3d 20 27 | if ( *|tmp == '|
|000034e0| 20 27 20 29 0a 58 20 20 | 20 20 20 20 20 20 2a 74 | ' ).X | *t|
|000034f0| 6d 70 20 3d 20 27 5c 30 | 27 3b 0a 58 20 20 65 78 |mp = '\0|';.X ex|
|00003500| 65 63 6c 70 20 28 20 70 | 61 67 65 72 2c 20 70 61 |eclp ( p|ager, pa|
|00003510| 67 65 72 2c 20 28 63 68 | 61 72 20 2a 29 20 30 20 |ger, (ch|ar *) 0 |
|00003520| 29 3b 0a 58 20 20 28 76 | 6f 69 64 29 20 66 70 72 |);.X (v|oid) fpr|
|00003530| 69 6e 74 66 20 28 20 73 | 74 64 65 72 72 2c 20 22 |intf ( s|tderr, "|
|00003540| 43 6f 75 6c 64 6e 27 74 | 20 69 6e 76 6f 6b 65 20 |Couldn't| invoke |
|00003550| 79 6f 75 72 20 70 61 67 | 65 72 2e 5c 6e 22 20 29 |your pag|er.\n" )|
|00003560| 3b 0a 58 20 20 70 65 72 | 72 6f 72 20 28 20 70 61 |;.X per|ror ( pa|
|00003570| 67 65 72 20 29 3b 0a 58 | 20 20 28 76 6f 69 64 29 |ger );.X| (void)|
|00003580| 20 6b 69 6c 6c 20 28 20 | 53 49 47 54 45 52 4d 2c | kill ( |SIGTERM,|
|00003590| 20 70 69 64 20 29 3b 0a | 58 20 20 65 78 69 74 20 | pid );.|X exit |
|000035a0| 28 20 32 20 29 3b 0a 58 | 7d 0a 58 0a 58 2f 2a 20 |( 2 );.X|}.X.X/* |
|000035b0| 20 76 6f 69 64 20 63 61 | 74 66 69 6c 65 20 28 20 | void ca|tfile ( |
|000035c0| 74 79 70 65 20 29 0a 58 | 20 2a 0a 58 20 2a 20 20 |type ).X| *.X * |
|000035d0| 43 61 74 66 69 6c 65 20 | 77 69 6c 6c 20 70 72 69 |Catfile |will pri|
|000035e0| 6e 74 20 74 68 65 20 67 | 6f 73 69 70 20 66 69 6c |nt the g|osip fil|
|000035f0| 65 2c 20 75 73 69 6e 67 | 20 74 68 65 20 70 72 6f |e, using| the pro|
|00003600| 67 72 61 6d 20 69 6e 20 | 74 68 65 20 65 6e 76 69 |gram in |the envi|
|00003610| 72 6f 6e 6d 65 6e 74 0a | 58 20 2a 20 20 76 61 72 |ronment.|X * var|
|00003620| 69 61 62 6c 65 20 50 41 | 47 45 52 20 74 6f 20 64 |iable PA|GER to d|
|00003630| 69 73 70 6c 61 79 20 69 | 74 2e 20 20 49 74 20 66 |isplay i|t. It f|
|00003640| 6f 72 6b 73 20 6f 66 66 | 20 61 20 70 72 6f 63 65 |orks off| a proce|
|00003650| 73 73 20 74 6f 20 72 75 | 6e 20 74 68 65 20 70 61 |ss to ru|n the pa|
|00003660| 67 65 72 20 61 6e 64 0a | 58 20 2a 20 20 66 65 65 |ger and.|X * fee|
|00003670| 64 73 20 69 74 2c 20 76 | 69 61 20 61 20 70 69 70 |ds it, v|ia a pip|
|00003680| 65 2c 20 61 20 6c 69 6e | 65 66 65 65 64 2c 20 74 |e, a lin|efeed, t|
|00003690| 68 65 20 65 78 69 73 74 | 69 6e 67 20 67 6f 73 69 |he exist|ing gosi|
|000036a0| 70 20 66 69 6c 65 2c 20 | 61 6e 64 20 61 6e 6f 74 |p file, |and anot|
|000036b0| 68 65 72 0a 58 20 2a 20 | 20 6c 69 6e 65 66 65 65 |her.X * | linefee|
|000036c0| 64 2e 0a 58 20 2a 0a 58 | 20 2a 20 20 74 79 70 65 |d..X *.X| * type|
|000036d0| 20 20 3a 20 20 63 6f 6e | 74 72 6f 6c 73 20 74 68 | : con|trols th|
|000036e0| 65 20 74 79 70 65 20 6f | 66 20 6d 65 73 73 61 67 |e type o|f messag|
|000036f0| 65 20 70 61 73 73 65 64 | 20 74 6f 20 6c 61 73 74 |e passed| to last|
|00003700| 65 64 69 74 28 29 20 61 | 6e 64 20 68 69 73 74 6f |edit() a|nd histo|
|00003710| 72 79 2e 0a 58 20 2a 2f | 0a 58 76 6f 69 64 20 63 |ry..X */|.Xvoid c|
|00003720| 61 74 66 69 6c 65 20 28 | 20 74 79 70 65 20 29 0a |atfile (| type ).|
|00003730| 58 65 6e 75 6d 20 65 64 | 69 74 5f 74 79 70 65 20 |Xenum ed|it_type |
|00003740| 74 79 70 65 3b 0a 58 7b | 0a 58 20 20 46 49 4c 45 |type;.X{|.X FILE|
|00003750| 20 2a 66 70 3b 0a 58 0a | 58 20 20 69 66 20 28 20 | *fp;.X.|X if ( |
|00003760| 74 79 70 65 20 21 3d 20 | 72 61 77 20 29 0a 58 20 |type != |raw ).X |
|00003770| 20 7b 0a 58 20 20 20 20 | 75 70 64 61 74 65 5f 68 | {.X |update_h|
|00003780| 69 73 74 6f 72 79 20 28 | 20 74 69 6d 65 20 28 20 |istory (| time ( |
|00003790| 28 74 69 6d 65 5f 74 20 | 2a 29 20 30 20 29 2c 20 |(time_t |*) 0 ), |
|000037a0| 30 2c 20 74 79 70 65 20 | 3d 3d 20 62 65 69 6e 67 |0, type |== being|
|000037b0| 5f 65 64 69 74 65 64 20 | 3f 20 65 64 69 74 5f 66 |_edited |? edit_f|
|000037c0| 61 69 6c 65 64 20 3a 20 | 6c 69 73 74 20 29 3b 0a |ailed : |list );.|
|000037d0| 58 20 20 20 20 70 61 67 | 65 28 29 3b 0a 58 20 20 |X pag|e();.X |
|000037e0| 20 20 69 66 20 28 20 74 | 79 70 65 20 3d 3d 20 62 | if ( t|ype == b|
|000037f0| 65 69 6e 67 5f 65 64 69 | 74 65 64 20 29 20 2f 2a |eing_edi|ted ) /*|
|00003800| 20 63 61 6e 27 74 20 6a | 75 73 74 20 75 73 65 20 | can't j|ust use |
|00003810| 6c 61 73 74 65 64 69 74 | 20 28 20 41 55 54 4f 20 |lastedit| ( AUTO |
|00003820| 29 20 68 65 72 65 2c 20 | 2a 2f 0a 58 20 20 20 20 |) here, |*/.X |
|00003830| 20 20 6c 61 73 74 65 64 | 69 74 20 28 20 45 44 49 | lasted|it ( EDI|
|00003840| 54 20 29 3b 20 20 20 20 | 20 20 20 20 2f 2a 20 73 |T ); | /* s|
|00003850| 69 6e 63 65 20 73 74 61 | 74 75 73 20 6d 69 67 68 |ince sta|tus migh|
|00003860| 74 20 68 61 76 65 20 63 | 68 61 6e 67 65 64 2e 20 |t have c|hanged. |
|00003870| 2a 2f 0a 58 20 20 20 20 | 65 6c 73 65 0a 58 20 20 |*/.X |else.X |
|00003880| 20 20 20 20 6c 61 73 74 | 65 64 69 74 20 28 20 41 | last|edit ( A|
|00003890| 55 54 4f 20 29 3b 0a 58 | 20 20 20 20 28 76 6f 69 |UTO );.X| (voi|
|000038a0| 64 29 20 70 75 74 63 68 | 61 72 20 28 20 27 5c 6e |d) putch|ar ( '\n|
|000038b0| 27 20 29 3b 0a 58 20 20 | 7d 0a 58 0a 58 20 20 69 |' );.X |}.X.X i|
|000038c0| 66 20 28 20 66 70 20 3d | 20 66 6f 70 65 6e 20 28 |f ( fp =| fopen (|
|000038d0| 20 74 65 78 74 5f 66 69 | 6c 65 2c 20 22 72 22 20 | text_fi|le, "r" |
|000038e0| 29 20 29 0a 58 20 20 7b | 0a 58 20 20 20 20 69 6e |) ).X {|.X in|
|000038f0| 74 20 63 3b 0a 58 0a 58 | 20 20 20 20 77 68 69 6c |t c;.X.X| whil|
|00003900| 65 20 28 20 28 20 63 20 | 3d 20 67 65 74 63 20 28 |e ( ( c |= getc (|
|00003910| 20 66 70 20 29 20 29 20 | 21 3d 20 45 4f 46 20 29 | fp ) ) |!= EOF )|
|00003920| 0a 58 20 20 20 20 20 20 | 28 76 6f 69 64 29 20 70 |.X |(void) p|
|00003930| 75 74 63 68 61 72 20 28 | 20 28 63 68 61 72 29 20 |utchar (| (char) |
|00003940| 63 20 29 3b 0a 58 20 20 | 20 20 28 76 6f 69 64 29 |c );.X | (void)|
|00003950| 20 66 63 6c 6f 73 65 20 | 28 20 66 70 20 29 3b 0a | fclose |( fp );.|
|00003960| 58 20 20 7d 0a 58 20 20 | 65 6c 73 65 0a 58 20 20 |X }.X |else.X |
|00003970| 7b 0a 58 20 20 20 20 28 | 76 6f 69 64 29 20 70 72 |{.X (|void) pr|
|00003980| 69 6e 74 66 20 28 20 22 | 3c 43 6f 75 6c 64 6e 27 |intf ( "|<Couldn'|
|00003990| 74 20 61 63 63 65 73 73 | 20 25 73 20 74 65 78 74 |t access| %s text|
|000039a0| 20 66 69 6c 65 2e 3e 5c | 6e 5c 6e 22 2c 20 66 69 | file.>\|n\n", fi|
|000039b0| 6c 65 20 29 3b 0a 58 20 | 20 20 20 65 78 69 74 20 |le );.X | exit |
|000039c0| 28 20 32 20 29 3b 0a 58 | 20 20 7d 0a 58 0a 58 20 |( 2 );.X| }.X.X |
|000039d0| 20 69 66 20 28 20 74 79 | 70 65 20 21 3d 20 72 61 | if ( ty|pe != ra|
|000039e0| 77 20 29 0a 58 20 20 20 | 20 28 76 6f 69 64 29 20 |w ).X | (void) |
|000039f0| 70 75 74 63 68 61 72 20 | 28 20 27 5c 6e 27 20 29 |putchar |( '\n' )|
|00003a00| 3b 0a 58 20 20 65 78 69 | 74 20 28 20 30 20 29 3b |;.X exi|t ( 0 );|
|00003a10| 0a 58 7d 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |.X}.END_|OF_FILE.|
|00003a20| 69 66 20 74 65 73 74 20 | 32 37 39 34 20 2d 6e 65 |if test |2794 -ne|
|00003a30| 20 60 77 63 20 2d 63 20 | 3c 27 63 61 74 2e 63 27 | `wc -c |<'cat.c'|
|00003a40| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00003a50| 20 73 68 61 72 3a 20 5c | 22 27 63 61 74 2e 63 27 | shar: \|"'cat.c'|
|00003a60| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00003a70| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00003a80| 23 20 65 6e 64 20 6f 66 | 20 27 63 61 74 2e 63 27 |# end of| 'cat.c'|
|00003a90| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00003aa0| 63 61 74 2e 68 27 20 2d | 61 20 22 24 7b 31 7d 22 |cat.h' -|a "${1}"|
|00003ab0| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00003ac0| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00003ad0| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00003ae0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00003af0| 63 61 74 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |cat.h'\"|.else.ec|
|00003b00| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00003b10| 69 6e 67 20 5c 22 27 63 | 61 74 2e 68 27 5c 22 20 |ing \"'c|at.h'\" |
|00003b20| 5c 28 31 30 38 30 20 63 | 68 61 72 61 63 74 65 72 |\(1080 c|haracter|
|00003b30| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00003b40| 20 3e 27 63 61 74 2e 68 | 27 20 3c 3c 27 45 4e 44 | >'cat.h|' <<'END|
|00003b50| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2f 2a 20 20 54 |_OF_FILE|'.X/* T|
|00003b60| 68 65 20 63 61 74 20 6d | 6f 64 75 6c 65 20 63 6f |he cat m|odule co|
|00003b70| 6e 74 61 69 6e 73 20 74 | 68 65 20 63 6f 64 65 20 |ntains t|he code |
|00003b80| 74 68 61 74 20 77 69 6c | 6c 20 73 69 6d 70 6c 79 |that wil|l simply|
|00003b90| 20 70 72 69 6e 74 20 74 | 68 65 20 67 6f 73 69 70 | print t|he gosip|
|00003ba0| 20 66 69 6c 65 2e 0a 58 | 20 2a 2f 0a 58 0a 58 2f | file..X| */.X.X/|
|00003bb0| 2a 20 20 76 6f 69 64 20 | 70 61 67 65 28 29 0a 58 |* void |page().X|
|00003bc0| 20 2a 0a 58 20 2a 20 20 | 50 61 67 65 20 63 61 75 | *.X * |Page cau|
|00003bd0| 73 65 73 20 61 6c 6c 20 | 73 75 62 73 65 71 75 65 |ses all |subseque|
|00003be0| 6e 74 20 6f 75 74 70 75 | 74 20 74 6f 20 62 65 20 |nt outpu|t to be |
|00003bf0| 70 69 70 65 64 20 76 69 | 61 20 61 20 70 61 67 65 |piped vi|a a page|
|00003c00| 72 2e 20 20 49 66 20 74 | 68 65 0a 58 20 2a 20 20 |r. If t|he.X * |
|00003c10| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 76 61 72 69 |environm|ent vari|
|00003c20| 61 62 6c 65 20 50 41 47 | 45 52 20 69 73 20 73 65 |able PAG|ER is se|
|00003c30| 74 2c 20 69 74 20 69 73 | 20 75 73 65 64 20 28 77 |t, it is| used (w|
|00003c40| 69 74 68 6f 75 74 20 6f | 70 74 69 6f 6e 73 29 2c |ithout o|ptions),|
|00003c50| 20 6f 74 68 65 72 77 69 | 73 65 0a 58 20 2a 20 20 | otherwi|se.X * |
|00003c60| 6d 6f 72 65 28 31 29 2e | 0a 58 20 2a 2f 0a 58 65 |more(1).|.X */.Xe|
|00003c70| 78 74 65 72 6e 20 76 6f | 69 64 20 70 61 67 65 28 |xtern vo|id page(|
|00003c80| 29 3b 0a 58 0a 58 2f 2a | 20 20 76 6f 69 64 20 63 |);.X.X/*| void c|
|00003c90| 61 74 66 69 6c 65 20 28 | 20 74 79 70 65 20 29 0a |atfile (| type ).|
|00003ca0| 58 20 2a 0a 58 20 2a 20 | 20 54 68 65 20 66 75 6e |X *.X * | The fun|
|00003cb0| 63 74 69 6f 6e 20 70 72 | 69 6e 74 73 20 6c 61 73 |ction pr|ints las|
|00003cc0| 74 65 64 69 74 20 69 6e | 66 6f 72 6d 61 74 69 6f |tedit in|formatio|
|00003cd0| 6e 2c 20 61 6e 64 20 74 | 68 65 6e 20 74 68 65 20 |n, and t|hen the |
|00003ce0| 67 6f 73 69 70 20 66 69 | 6c 65 20 69 74 73 65 6c |gosip fi|le itsel|
|00003cf0| 66 2e 0a 58 20 2a 20 20 | 49 74 20 6e 65 76 65 72 |f..X * |It never|
|00003d00| 20 72 65 74 75 72 6e 73 | 2c 20 62 75 74 20 63 61 | returns|, but ca|
|00003d10| 6c 6c 73 20 65 78 69 74 | 28 29 2e 0a 58 20 2a 0a |lls exit|()..X *.|
|00003d20| 58 20 2a 20 20 74 79 70 | 65 20 20 3a 20 20 63 6f |X * typ|e : co|
|00003d30| 6e 74 72 6f 6c 73 20 74 | 68 65 20 6c 61 73 74 20 |ntrols t|he last |
|00003d40| 75 73 61 67 65 20 6d 65 | 73 73 61 67 65 20 74 65 |usage me|ssage te|
|00003d50| 78 74 2e 0a 58 20 2a 2f | 0a 58 65 78 74 65 72 6e |xt..X */|.Xextern|
|00003d60| 20 76 6f 69 64 20 63 61 | 74 66 69 6c 65 28 29 3b | void ca|tfile();|
|00003d70| 0a 58 0a 58 65 6e 75 6d | 20 65 64 69 74 5f 74 79 |.X.Xenum| edit_ty|
|00003d80| 70 65 20 20 20 20 20 20 | 2f 2a 20 75 73 65 64 20 |pe |/* used |
|00003d90| 74 6f 20 73 70 65 63 69 | 66 79 20 74 79 70 65 20 |to speci|fy type |
|00003da0| 6f 66 20 65 64 69 74 2e | 20 20 2a 2f 0a 58 7b 0a |of edit.| */.X{.|
|00003db0| 58 20 20 6e 6f 72 6d 61 | 6c 2c 20 20 20 20 20 20 |X norma|l, |
|00003dc0| 20 20 20 20 20 2f 2a 20 | 64 65 66 61 75 6c 74 20 | /* |default |
|00003dd0| 65 64 69 74 20 2a 2f 0a | 58 20 20 62 65 69 6e 67 |edit */.|X being|
|00003de0| 5f 65 64 69 74 65 64 2c | 20 20 20 20 20 2f 2a 20 |_edited,| /* |
|00003df0| 74 65 6c 6c 73 20 63 61 | 74 66 69 6c 65 28 29 20 |tells ca|tfile() |
|00003e00| 74 6f 20 73 65 6e 64 20 | 22 62 65 69 6e 67 20 65 |to send |"being e|
|00003e10| 64 69 74 65 64 22 20 73 | 74 72 69 6e 67 20 2a 2f |dited" s|tring */|
|00003e20| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003e30| 20 20 20 20 20 20 2f 2a | 20 74 6f 20 6c 61 73 74 | /*| to last|
|00003e40| 65 64 69 74 28 29 20 2a | 2f 0a 58 20 20 61 62 6f |edit() *|/.X abo|
|00003e50| 72 74 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 2f |rt, | /|
|00003e60| 2a 20 74 65 6c 6c 73 20 | 65 64 69 74 28 29 20 6e |* tells |edit() n|
|00003e70| 6f 74 20 74 6f 20 63 61 | 6c 6c 20 63 61 74 66 69 |ot to ca|ll catfi|
|00003e80| 6c 65 28 29 20 69 66 20 | 67 6f 73 69 70 20 69 73 |le() if |gosip is|
|00003e90| 20 62 65 69 6e 67 0a 58 | 20 20 20 20 20 20 20 20 | being.X| |
|00003ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 65 | | e|
|00003eb0| 64 69 74 65 64 2e 20 2a | 2f 0a 58 20 20 72 61 77 |dited. *|/.X raw|
|00003ec0| 2c 09 09 20 20 20 20 2f | 2a 20 74 65 6c 6c 73 20 |,.. /|* tells |
|00003ed0| 63 61 74 66 69 6c 65 20 | 74 6f 20 70 72 69 6e 74 |catfile |to print|
|00003ee0| 20 67 6f 73 69 70 20 66 | 69 6c 65 20 77 69 74 68 | gosip f|ile with|
|00003ef0| 6f 75 74 20 61 6e 79 20 | 65 78 74 72 61 0a 58 09 |out any |extra.X.|
|00003f00| 09 20 20 20 20 20 20 20 | 69 6e 66 6f 72 6d 61 74 |. |informat|
|00003f10| 69 6f 6e 2c 20 61 6e 64 | 20 77 69 74 68 6f 75 74 |ion, and| without|
|00003f20| 20 61 20 70 61 67 65 72 | 20 2a 2f 0a 58 20 20 63 | a pager| */.X c|
|00003f30| 66 6c 61 67 20 20 20 20 | 20 20 20 20 20 20 20 20 |flag | |
|00003f40| 20 2f 2a 20 6d 65 61 6e | 73 20 67 6f 73 69 70 20 | /* mean|s gosip |
|00003f50| 77 61 73 20 69 6e 76 6f | 6b 65 64 20 77 69 74 68 |was invo|ked with|
|00003f60| 20 74 68 65 20 63 20 66 | 6c 61 67 2e 20 20 55 73 | the c f|lag. Us|
|00003f70| 65 64 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |ed.X | |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 65 78 63 6c 75 | | exclu|
|00003f90| 73 69 76 65 6c 79 20 62 | 79 20 47 65 6f 66 66 27 |sively b|y Geoff'|
|00003fa0| 73 20 70 72 6f 67 72 61 | 6d 2e 20 2a 2f 0a 58 7d |s progra|m. */.X}|
|00003fb0| 3b 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |;.END_OF|_FILE.if|
|00003fc0| 20 74 65 73 74 20 31 30 | 38 30 20 2d 6e 65 20 60 | test 10|80 -ne `|
|00003fd0| 77 63 20 2d 63 20 3c 27 | 63 61 74 2e 68 27 60 3b |wc -c <'|cat.h'`;|
|00003fe0| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00003ff0| 68 61 72 3a 20 5c 22 27 | 63 61 74 2e 68 27 5c 22 |har: \"'|cat.h'\"|
|00004000| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00004010| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 23 20 |rong siz|e!.fi.# |
|00004020| 65 6e 64 20 6f 66 20 27 | 63 61 74 2e 68 27 0a 66 |end of '|cat.h'.f|
|00004030| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 63 6f |i.if tes|t -f 'co|
|00004040| 6e 74 72 6f 6c 2e 63 27 | 20 2d 61 20 22 24 7b 31 |ntrol.c'| -a "${1|
|00004050| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00004060| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00004070| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00004080| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00004090| 22 27 63 6f 6e 74 72 6f | 6c 2e 63 27 5c 22 0a 65 |"'contro|l.c'\".e|
|000040a0| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|000040b0| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 63 6f 6e |xtractin|g \"'con|
|000040c0| 74 72 6f 6c 2e 63 27 5c | 22 20 5c 28 34 34 35 36 |trol.c'\|" \(4456|
|000040d0| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|000040e0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 63 6f 6e |d "s/^X/|/" >'con|
|000040f0| 74 72 6f 6c 2e 63 27 20 | 3c 3c 27 45 4e 44 5f 4f |trol.c' |<<'END_O|
|00004100| 46 5f 46 49 4c 45 27 0a | 58 23 69 6e 63 6c 75 64 |F_FILE'.|X#includ|
|00004110| 65 20 22 67 6c 6f 62 61 | 6c 2e 68 22 0a 58 23 69 |e "globa|l.h".X#i|
|00004120| 6e 63 6c 75 64 65 20 22 | 63 6f 6e 74 72 6f 6c 2e |nclude "|control.|
|00004130| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 75 74 |h".X#inc|lude "ut|
|00004140| 69 6c 2e 68 22 0a 58 0a | 58 2f 2a 20 20 62 79 74 |il.h".X.|X/* byt|
|00004150| 65 20 70 61 72 73 65 20 | 28 20 6c 69 6e 65 2c 20 |e parse |( line, |
|00004160| 63 6f 64 65 2c 20 74 65 | 72 6d 2c 20 66 69 6c 65 |code, te|rm, file|
|00004170| 20 29 0a 58 20 2a 0a 58 | 20 2a 20 20 54 68 69 73 | ).X *.X| * This|
|00004180| 20 72 6f 75 74 69 6e 65 | 20 77 69 6c 6c 20 70 61 | routine| will pa|
|00004190| 72 73 65 20 74 68 65 20 | 6c 69 6e 65 20 69 74 73 |rse the |line its|
|000041a0| 20 67 69 76 65 6e 2c 20 | 70 69 63 6b 69 6e 67 20 | given, |picking |
|000041b0| 6f 75 74 20 75 73 65 72 | 63 6f 64 65 2c 20 74 65 |out user|code, te|
|000041c0| 72 6d 69 6e 61 6c 0a 58 | 20 2a 20 20 61 6e 64 20 |rminal.X| * and |
|000041d0| 66 69 6c 65 2e 20 20 54 | 68 65 20 66 6f 72 6d 61 |file. T|he forma|
|000041e0| 74 20 6f 66 20 74 68 65 | 20 6c 69 6e 65 20 73 68 |t of the| line sh|
|000041f0| 6f 75 6c 64 20 62 65 20 | 22 3a 63 6f 64 65 2c 74 |ould be |":code,t|
|00004200| 65 72 6d 2c 66 69 6c 65 | 21 22 2e 20 20 49 66 20 |erm,file|!". If |
|00004210| 74 65 72 6d 0a 58 20 2a | 20 20 69 73 20 61 20 6e |term.X *| is a n|
|00004220| 75 6c 6c 20 70 6f 69 6e | 74 65 72 2c 20 6a 75 73 |ull poin|ter, jus|
|00004230| 74 20 74 68 65 20 63 6f | 64 65 20 77 69 6c 6c 20 |t the co|de will |
|00004240| 62 65 20 72 65 74 75 72 | 6e 65 64 2e 0a 58 20 2a |be retur|ned..X *|
|00004250| 0a 58 20 2a 20 20 50 61 | 72 73 65 28 29 20 72 65 |.X * Pa|rse() re|
|00004260| 74 75 72 6e 73 20 30 20 | 69 66 20 74 68 65 20 6c |turns 0 |if the l|
|00004270| 69 6e 65 20 64 69 64 6e | 27 74 20 62 65 67 69 6e |ine didn|'t begin|
|00004280| 20 77 69 74 68 20 61 20 | 27 3a 27 2c 20 6f 74 68 | with a |':', oth|
|00004290| 65 72 77 69 73 65 20 69 | 74 0a 58 20 2a 20 20 73 |erwise i|t.X * s|
|000042a0| 65 67 6d 65 6e 74 61 74 | 69 6f 6e 20 66 61 75 6c |egmentat|ion faul|
|000042b0| 74 73 20 69 66 20 74 68 | 65 20 72 65 73 74 20 6f |ts if th|e rest o|
|000042c0| 66 20 74 68 65 20 6c 69 | 6e 65 20 64 6f 65 73 6e |f the li|ne doesn|
|000042d0| 27 74 20 63 6f 6e 74 61 | 69 6e 20 74 68 65 20 72 |'t conta|in the r|
|000042e0| 69 67 68 74 0a 58 20 2a | 20 20 6e 75 6d 62 65 72 |ight.X *| number|
|000042f0| 20 6f 66 20 63 6f 6d 6d | 61 73 20 61 6e 64 20 65 | of comm|as and e|
|00004300| 78 63 6c 61 6d 61 74 69 | 6f 6e 20 6d 61 72 6b 73 |xclamati|on marks|
|00004310| 2e 20 20 49 66 20 69 74 | 20 64 6f 65 73 2c 20 70 |. If it| does, p|
|00004320| 61 72 73 65 28 29 20 72 | 65 74 75 72 6e 73 20 31 |arse() r|eturns 1|
|00004330| 2e 0a 58 20 2a 0a 58 20 | 2a 20 20 6c 69 6e 65 20 |..X *.X |* line |
|00004340| 20 3a 20 20 70 6f 69 6e | 74 73 20 74 6f 20 74 68 | : poin|ts to th|
|00004350| 65 20 6c 69 6e 65 20 74 | 6f 20 62 65 20 70 61 72 |e line t|o be par|
|00004360| 73 65 64 2e 0a 58 20 2a | 20 20 63 6f 64 65 20 20 |sed..X *| code |
|00004370| 3a 20 20 74 68 65 20 63 | 6f 64 65 20 77 69 6c 6c |: the c|ode will|
|00004380| 20 62 65 20 77 72 69 74 | 74 65 6e 20 77 68 65 72 | be writ|ten wher|
|00004390| 65 20 74 68 69 73 20 70 | 6f 69 6e 74 73 2e 0a 58 |e this p|oints..X|
|000043a0| 20 2a 20 20 74 65 72 6d | 20 20 3a 20 20 74 68 65 | * term| : the|
|000043b0| 20 74 65 72 6d 69 6e 61 | 6c 20 77 69 6c 6c 20 62 | termina|l will b|
|000043c0| 65 20 77 72 69 74 74 65 | 6e 20 77 68 65 72 65 20 |e writte|n where |
|000043d0| 74 68 69 73 20 70 6f 69 | 6e 74 73 2e 0a 58 20 2a |this poi|nts..X *|
|000043e0| 20 20 66 69 6c 65 20 20 | 3a 20 20 74 68 65 20 66 | file |: the f|
|000043f0| 69 6c 65 20 77 69 6c 6c | 20 62 65 20 77 72 69 74 |ile will| be writ|
|00004400| 74 65 6e 20 77 68 65 72 | 65 20 74 68 69 73 20 70 |ten wher|e this p|
|00004410| 6f 69 6e 74 73 2e 0a 58 | 20 2a 2f 0a 58 73 74 61 |oints..X| */.Xsta|
|00004420| 74 69 63 20 62 79 74 65 | 20 70 61 72 73 65 20 28 |tic byte| parse (|
|00004430| 20 6c 69 6e 65 2c 20 63 | 6f 64 65 2c 20 74 65 72 | line, c|ode, ter|
|00004440| 6d 2c 20 66 69 6c 65 20 | 29 0a 58 63 68 61 72 20 |m, file |).Xchar |
|00004450| 2a 6c 69 6e 65 2c 20 2a | 63 6f 64 65 2c 20 2a 74 |*line, *|code, *t|
|00004460| 65 72 6d 2c 20 2a 66 69 | 6c 65 3b 0a 58 7b 0a 58 |erm, *fi|le;.X{.X|
|00004470| 20 20 69 66 20 28 20 2a | 6c 69 6e 65 2b 2b 20 21 | if ( *|line++ !|
|00004480| 3d 20 27 3a 27 20 29 0a | 58 20 20 20 20 72 65 74 |= ':' ).|X ret|
|00004490| 75 72 6e 20 30 3b 0a 58 | 20 20 77 68 69 6c 65 20 |urn 0;.X| while |
|000044a0| 28 20 2a 6c 69 6e 65 20 | 21 3d 20 27 2c 27 20 29 |( *line |!= ',' )|
|000044b0| 0a 58 20 20 20 20 2a 63 | 6f 64 65 2b 2b 20 3d 20 |.X *c|ode++ = |
|000044c0| 2a 6c 69 6e 65 2b 2b 3b | 0a 58 20 20 2a 63 6f 64 |*line++;|.X *cod|
|000044d0| 65 20 3d 20 27 5c 30 27 | 3b 0a 58 20 20 69 66 20 |e = '\0'|;.X if |
|000044e0| 28 20 21 20 74 65 72 6d | 20 29 0a 58 20 20 20 20 |( ! term| ).X |
|000044f0| 72 65 74 75 72 6e 20 31 | 3b 0a 58 20 20 77 68 69 |return 1|;.X whi|
|00004500| 6c 65 20 28 20 2a 2b 2b | 6c 69 6e 65 20 21 3d 20 |le ( *++|line != |
|00004510| 27 2c 27 20 29 0a 58 20 | 20 20 20 2a 74 65 72 6d |',' ).X | *term|
|00004520| 2b 2b 20 3d 20 2a 6c 69 | 6e 65 3b 0a 58 20 20 2a |++ = *li|ne;.X *|
|00004530| 74 65 72 6d 20 3d 20 27 | 5c 30 27 3b 0a 58 20 20 |term = '|\0';.X |
|00004540| 77 68 69 6c 65 20 28 20 | 2a 2b 2b 6c 69 6e 65 20 |while ( |*++line |
|00004550| 21 3d 20 27 21 27 20 29 | 0a 58 20 20 20 20 2a 66 |!= '!' )|.X *f|
|00004560| 69 6c 65 2b 2b 20 3d 20 | 2a 6c 69 6e 65 3b 0a 58 |ile++ = |*line;.X|
|00004570| 20 20 2a 66 69 6c 65 20 | 3d 20 27 5c 30 27 3b 0a | *file |= '\0';.|
|00004580| 58 20 20 72 65 74 75 72 | 6e 20 31 3b 0a 58 7d 0a |X retur|n 1;.X}.|
|00004590| 58 0a 58 2f 2a 20 20 62 | 79 74 65 20 61 64 64 5f |X.X/* b|yte add_|
|000045a0| 75 73 65 72 28 29 0a 58 | 20 2a 0a 58 20 2a 20 20 |user().X| *.X * |
|000045b0| 49 66 20 74 68 65 20 67 | 6f 73 69 70 20 66 69 6c |If the g|osip fil|
|000045c0| 65 73 20 61 72 65 20 64 | 6f 77 6e 2c 20 61 64 64 |es are d|own, add|
|000045d0| 5f 75 73 65 72 28 29 20 | 77 69 6c 6c 20 63 68 65 |_user() |will che|
|000045e0| 63 6b 20 44 4f 57 4e 5f | 46 49 4c 45 20 66 6f 72 |ck DOWN_|FILE for|
|000045f0| 20 74 68 65 0a 58 20 2a | 20 20 75 73 65 72 27 73 | the.X *| user's|
|00004600| 20 63 6f 64 65 2e 20 20 | 49 66 20 68 65 20 69 73 | code. |If he is|
|00004610| 20 6d 65 6e 74 69 6f 6e | 65 64 2c 20 69 74 20 77 | mention|ed, it w|
|00004620| 69 6c 6c 20 72 65 74 75 | 72 6e 20 31 2e 20 20 49 |ill retu|rn 1. I|
|00004630| 66 20 68 65 20 69 73 6e | 27 74 2c 20 61 64 64 5f |f he isn|'t, add_|
|00004640| 75 73 65 72 0a 58 20 2a | 20 20 63 68 65 63 6b 73 |user.X *| checks|
|00004650| 20 68 65 27 73 20 6f 6e | 20 61 20 74 65 72 6d 69 | he's on| a termi|
|00004660| 6e 61 6c 2c 20 61 6e 64 | 20 74 68 65 6e 20 61 64 |nal, and| then ad|
|00004670| 64 73 20 61 20 6c 69 6e | 65 20 74 6f 20 44 4f 57 |ds a lin|e to DOW|
|00004680| 4e 5f 46 49 4c 45 20 69 | 6e 20 74 68 65 20 66 6f |N_FILE i|n the fo|
|00004690| 72 6d 61 74 0a 58 20 2a | 20 20 22 3a 3c 75 73 65 |rmat.X *| ":<use|
|000046a0| 72 63 6f 64 65 3e 2c 3c | 74 65 72 6d 69 6e 61 6c |rcode>,<|terminal|
|000046b0| 3e 2c 3c 66 69 6c 65 3e | 21 22 2e 0a 58 20 2a 2f |>,<file>|!"..X */|
|000046c0| 0a 58 62 79 74 65 20 61 | 64 64 5f 75 73 65 72 28 |.Xbyte a|dd_user(|
|000046d0| 29 0a 58 7b 0a 58 20 20 | 46 49 4c 45 20 2a 66 70 |).X{.X |FILE *fp|
|000046e0| 20 3d 20 66 6f 70 65 6e | 20 28 20 44 4f 57 4e 5f | = fopen| ( DOWN_|
|000046f0| 46 49 4c 45 2c 20 22 72 | 2b 22 20 29 3b 0a 58 20 |FILE, "r|+" );.X |
|00004700| 20 63 68 61 72 20 6c 69 | 6e 65 5b 33 30 5d 2c 20 | char li|ne[30], |
|00004710| 2a 74 65 72 6d 2c 20 2a | 74 74 79 6e 61 6d 65 28 |*term, *|ttyname(|
|00004720| 29 3b 0a 58 0a 58 20 20 | 69 66 20 28 20 21 20 66 |);.X.X |if ( ! f|
|00004730| 70 20 29 0a 58 20 20 20 | 20 72 65 74 75 72 6e 20 |p ).X | return |
|00004740| 30 3b 0a 58 20 20 28 76 | 6f 69 64 29 20 66 73 65 |0;.X (v|oid) fse|
|00004750| 65 6b 20 28 20 66 70 2c | 20 30 4c 2c 20 30 20 29 |ek ( fp,| 0L, 0 )|
|00004760| 3b 0a 58 20 20 77 68 69 | 6c 65 20 28 20 66 67 65 |;.X whi|le ( fge|
|00004770| 74 73 20 28 20 6c 69 6e | 65 2c 20 32 39 2c 20 66 |ts ( lin|e, 29, f|
|00004780| 70 20 29 20 29 0a 58 20 | 20 7b 0a 58 20 20 20 20 |p ) ).X | {.X |
|00004790| 63 68 61 72 20 63 6f 64 | 65 5b 31 30 5d 3b 0a 58 |char cod|e[10];.X|
|000047a0| 0a 58 20 20 20 20 69 66 | 20 28 20 70 61 72 73 65 |.X if| ( parse|
|000047b0| 20 28 20 6c 69 6e 65 2c | 20 63 6f 64 65 2c 20 28 | ( line,| code, (|
|000047c0| 63 68 61 72 20 2a 29 20 | 30 2c 20 28 63 68 61 72 |char *) |0, (char|
|000047d0| 20 2a 29 20 30 20 29 20 | 29 0a 58 20 20 20 20 20 | *) 0 ) |).X |
|000047e0| 20 69 66 20 28 20 21 20 | 73 74 72 63 6d 70 20 28 | if ( ! |strcmp (|
|000047f0| 20 63 6f 64 65 2c 20 75 | 73 65 72 63 6f 64 65 28 | code, u|sercode(|
|00004800| 29 20 29 20 29 0a 58 20 | 20 20 20 20 20 7b 0a 58 |) ) ).X | {.X|
|00004810| 20 20 20 20 20 20 20 20 | 28 76 6f 69 64 29 20 66 | |(void) f|
|00004820| 63 6c 6f 73 65 20 28 20 | 66 70 20 29 3b 0a 58 20 |close ( |fp );.X |
|00004830| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 20 31 3b | r|eturn 1;|
|00004840| 0a 58 20 20 20 20 20 20 | 7d 0a 58 20 20 7d 0a 58 |.X |}.X }.X|
|00004850| 20 20 69 66 20 28 20 74 | 65 72 6d 20 3d 20 74 74 | if ( t|erm = tt|
|00004860| 79 6e 61 6d 65 20 28 20 | 32 20 29 20 29 20 20 20 |yname ( |2 ) ) |
|00004870| 2f 2a 20 67 65 74 20 74 | 68 65 20 74 65 72 6d 69 |/* get t|he termi|
|00004880| 6e 61 6c 20 73 74 64 65 | 72 72 20 69 73 20 61 74 |nal stde|rr is at|
|00004890| 74 61 63 68 65 64 20 74 | 6f 20 2a 2f 0a 58 20 20 |tached t|o */.X |
|000048a0| 7b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |{ | |
|000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a | | /*|
|000048c0| 20 73 74 64 65 72 72 20 | 69 73 20 6c 65 61 73 74 | stderr |is least|
|000048d0| 20 6c 69 6b 65 6c 79 20 | 74 6f 20 62 65 20 72 65 | likely |to be re|
|000048e0| 64 69 72 65 63 74 65 64 | 20 2a 2f 0a 58 20 20 20 |directed| */.X |
|000048f0| 20 73 74 72 75 63 74 20 | 73 74 61 74 20 69 6e 66 | struct |stat inf|
|00004900| 6f 3b 0a 58 0a 58 20 20 | 20 20 28 76 6f 69 64 29 |o;.X.X | (void)|
|00004910| 20 66 70 72 69 6e 74 66 | 20 28 20 66 70 2c 20 22 | fprintf| ( fp, "|
|00004920| 3a 25 73 2c 25 73 2c 25 | 73 21 5c 6e 22 2c 20 75 |:%s,%s,%|s!\n", u|
|00004930| 73 65 72 63 6f 64 65 28 | 29 2c 20 74 65 72 6d 2c |sercode(|), term,|
|00004940| 20 66 69 6c 65 20 29 3b | 0a 58 20 20 20 20 28 76 | file );|.X (v|
|00004950| 6f 69 64 29 20 66 63 6c | 6f 73 65 20 28 20 66 70 |oid) fcl|ose ( fp|
|00004960| 20 29 3b 0a 58 20 20 20 | 20 69 66 20 28 20 73 74 | );.X | if ( st|
|00004970| 61 74 20 28 20 74 65 72 | 6d 2c 20 26 69 6e 66 6f |at ( ter|m, &info|
|00004980| 20 29 20 3d 3d 20 30 20 | 29 20 2f 2a 20 6d 61 6b | ) == 0 |) /* mak|
|00004990| 65 20 75 73 65 72 27 73 | 20 74 65 72 6d 69 6e 61 |e user's| termina|
|000049a0| 6c 20 77 6f 72 6c 64 20 | 77 72 69 74 65 61 62 6c |l world |writeabl|
|000049b0| 65 20 2a 2f 0a 58 20 20 | 20 20 20 20 28 76 6f 69 |e */.X | (voi|
|000049c0| 64 29 20 63 68 6d 6f 64 | 20 28 20 74 65 72 6d 2c |d) chmod| ( term,|
|000049d0| 20 28 69 6e 74 29 20 69 | 6e 66 6f 2e 73 74 5f 6d | (int) i|nfo.st_m|
|000049e0| 6f 64 65 20 26 20 30 37 | 37 37 37 20 7c 20 30 32 |ode & 07|777 | 02|
|000049f0| 20 29 3b 20 2f 2a 20 73 | 6f 20 68 65 20 63 61 6e | ); /* s|o he can|
|00004a00| 20 2a 2f 0a 58 20 20 7d | 20 20 20 20 20 20 20 20 | */.X }| |
|00004a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a20| 20 20 20 20 20 2f 2a 20 | 62 65 20 74 6f 6c 64 20 | /* |be told |
|00004a30| 77 68 65 6e 20 67 6f 73 | 69 70 20 69 73 20 61 76 |when gos|ip is av|
|00004a40| 61 69 6c 61 62 6c 65 20 | 61 67 61 69 6e 20 2a 2f |ailable |again */|
|00004a50| 0a 58 20 20 72 65 74 75 | 72 6e 20 30 3b 0a 58 7d |.X retu|rn 0;.X}|
|00004a60| 0a 58 0a 58 2f 2a 20 20 | 76 6f 69 64 20 69 6e 66 |.X.X/* |void inf|
|00004a70| 6f 72 6d 5f 75 73 65 72 | 73 28 29 0a 58 20 2a 0a |orm_user|s().X *.|
|00004a80| 58 20 2a 20 20 54 68 69 | 73 20 72 6f 75 74 69 6e |X * Thi|s routin|
|00004a90| 65 20 77 69 6c 6c 20 61 | 74 74 65 6d 70 74 20 74 |e will a|ttempt t|
|00004aa0| 6f 20 77 72 69 74 65 20 | 61 20 6d 65 73 73 61 67 |o write |a messag|
|00004ab0| 65 20 74 6f 20 65 61 63 | 68 20 6f 66 20 74 68 65 |e to eac|h of the|
|00004ac0| 20 75 73 65 72 73 20 69 | 6e 20 74 68 65 0a 58 20 | users i|n the.X |
|00004ad0| 2a 20 20 44 4f 57 4e 5f | 46 49 4c 45 2c 20 74 6f |* DOWN_|FILE, to|
|00004ae0| 20 74 65 6c 6c 20 74 68 | 65 6d 20 74 68 61 74 20 | tell th|em that |
|00004af0| 67 6f 73 69 70 20 69 73 | 20 75 70 20 61 67 61 69 |gosip is| up agai|
|00004b00| 6e 2e 0a 58 20 2a 2f 0a | 58 76 6f 69 64 20 69 6e |n..X */.|Xvoid in|
|00004b10| 66 6f 72 6d 5f 75 73 65 | 72 73 28 29 0a 58 7b 0a |form_use|rs().X{.|
|00004b20| 58 20 20 46 49 4c 45 20 | 2a 66 70 20 3d 20 66 6f |X FILE |*fp = fo|
|00004b30| 70 65 6e 20 28 20 44 4f | 57 4e 5f 46 49 4c 45 2c |pen ( DO|WN_FILE,|
|00004b40| 20 22 72 22 20 29 3b 0a | 58 20 20 63 68 61 72 20 | "r" );.|X char |
|00004b50| 6c 69 6e 65 5b 34 30 5d | 3b 0a 58 0a 58 20 20 69 |line[40]|;.X.X i|
|00004b60| 66 20 28 20 21 20 66 70 | 20 29 0a 58 20 20 20 20 |f ( ! fp| ).X |
|00004b70| 72 65 74 75 72 6e 3b 0a | 58 20 20 77 68 69 6c 65 |return;.|X while|
|00004b80| 20 28 20 66 67 65 74 73 | 20 28 20 6c 69 6e 65 2c | ( fgets| ( line,|
|00004b90| 20 34 30 2c 20 66 70 20 | 29 20 29 0a 58 20 20 7b | 40, fp |) ).X {|
|00004ba0| 0a 58 20 20 20 20 63 68 | 61 72 20 63 6f 64 65 5b |.X ch|ar code[|
|00004bb0| 31 30 5d 2c 20 74 65 72 | 6d 5b 31 32 5d 2c 20 66 |10], ter|m[12], f|
|00004bc0| 69 6c 65 5b 31 35 5d 3b | 0a 58 20 20 20 20 46 49 |ile[15];|.X FI|
|00004bd0| 4c 45 20 2a 77 72 3b 0a | 58 0a 58 20 20 20 20 69 |LE *wr;.|X.X i|
|00004be0| 66 20 28 20 21 20 70 61 | 72 73 65 20 28 20 6c 69 |f ( ! pa|rse ( li|
|00004bf0| 6e 65 2c 20 63 6f 64 65 | 2c 20 74 65 72 6d 2c 20 |ne, code|, term, |
|00004c00| 66 69 6c 65 20 29 20 29 | 0a 58 20 20 20 20 20 20 |file ) )|.X |
|00004c10| 63 6f 6e 74 69 6e 75 65 | 3b 0a 58 20 20 20 20 28 |continue|;.X (|
|00004c20| 76 6f 69 64 29 20 70 72 | 69 6e 74 66 20 28 20 22 |void) pr|intf ( "|
|00004c30| 49 6e 66 6f 72 6d 69 6e | 67 20 25 73 20 2e 2e 2e |Informin|g %s ...|
|00004c40| 22 2c 20 63 6f 64 65 20 | 29 3b 0a 58 20 20 20 20 |", code |);.X |
|00004c50| 28 76 6f 69 64 29 20 66 | 66 6c 75 73 68 20 28 20 |(void) f|flush ( |
|00004c60| 73 74 64 6f 75 74 20 29 | 3b 0a 58 20 20 20 20 69 |stdout )|;.X i|
|00004c70| 66 20 28 20 77 72 20 3d | 20 66 6f 70 65 6e 20 28 |f ( wr =| fopen (|
|00004c80| 20 74 65 72 6d 2c 20 22 | 77 22 20 29 20 29 0a 58 | term, "|w" ) ).X|
|00004c90| 20 20 20 20 7b 0a 58 20 | 20 20 20 20 20 73 74 72 | {.X | str|
|00004ca0| 75 63 74 20 73 74 61 74 | 20 69 6e 66 6f 3b 0a 58 |uct stat| info;.X|
|00004cb0| 0a 58 20 20 20 20 20 20 | 28 76 6f 69 64 29 20 66 |.X |(void) f|
|00004cc0| 70 72 69 6e 74 66 20 28 | 20 77 72 2c 20 22 5c 30 |printf (| wr, "\0|
|00004cd0| 30 37 5c 72 5c 6e 2a 2a | 20 54 68 65 20 25 73 20 |07\r\n**| The %s |
|00004ce0| 66 69 6c 65 20 69 73 20 | 6e 6f 77 20 69 6e 20 73 |file is |now in s|
|00004cf0| 65 72 76 69 63 65 20 61 | 67 61 69 6e 2e 20 2a 2a |ervice a|gain. **|
|00004d00| 5c 72 5c 6e 22 2c 20 66 | 69 6c 65 20 29 3b 0a 58 |\r\n", f|ile );.X|
|00004d10| 20 20 20 20 20 20 28 76 | 6f 69 64 29 20 66 63 6c | (v|oid) fcl|
|00004d20| 6f 73 65 20 28 20 77 72 | 20 29 3b 0a 58 20 20 20 |ose ( wr| );.X |
|00004d30| 20 20 20 69 66 20 28 20 | 73 74 61 74 20 28 20 74 | if ( |stat ( t|
|00004d40| 65 72 6d 2c 20 26 69 6e | 66 6f 20 29 20 3d 3d 20 |erm, &in|fo ) == |
|00004d50| 30 20 29 20 2f 2a 20 66 | 75 74 69 6c 65 20 61 74 |0 ) /* f|utile at|
|00004d60| 74 65 6d 70 74 20 74 6f | 20 70 72 6f 74 65 63 74 |tempt to| protect|
|00004d70| 20 74 68 65 20 2a 2f 0a | 58 20 20 20 20 20 20 20 | the */.|X |
|00004d80| 20 28 76 6f 69 64 29 20 | 63 68 6d 6f 64 20 28 20 | (void) |chmod ( |
|00004d90| 74 65 72 6d 2c 20 28 69 | 6e 74 29 20 69 6e 66 6f |term, (i|nt) info|
|00004da0| 2e 73 74 5f 6d 6f 64 65 | 20 26 20 30 37 37 37 35 |.st_mode| & 07775|
|00004db0| 20 29 3b 20 2f 2a 20 74 | 65 72 6d 69 6e 61 6c 20 | ); /* t|erminal |
|00004dc0| 61 67 61 69 6e 20 2a 2f | 0a 58 20 20 20 20 20 20 |again */|.X |
|00004dd0| 70 75 74 73 20 28 20 22 | 20 64 6f 6e 65 2e 22 20 |puts ( "| done." |
|00004de0| 29 3b 0a 58 20 20 20 20 | 7d 0a 58 20 20 20 20 65 |);.X |}.X e|
|00004df0| 6c 73 65 0a 58 20 20 20 | 20 20 20 70 75 74 73 20 |lse.X | puts |
|00004e00| 28 20 22 20 63 6f 75 6c | 64 6e 27 74 20 77 72 69 |( " coul|dn't wri|
|00004e10| 74 65 20 68 69 73 20 74 | 65 72 6d 69 6e 61 6c 2e |te his t|erminal.|
|00004e20| 22 20 29 3b 0a 58 20 20 | 7d 0a 58 20 20 28 76 6f |" );.X |}.X (vo|
|00004e30| 69 64 29 20 66 63 6c 6f | 73 65 20 28 20 66 70 20 |id) fclo|se ( fp |
|00004e40| 29 3b 0a 58 7d 0a 58 0a | 58 2f 2a 20 20 76 6f 69 |);.X}.X.|X/* voi|
|00004e50| 64 20 63 68 65 63 6b 5f | 69 66 5f 75 70 28 29 0a |d check_|if_up().|
|00004e60| 58 20 2a 0a 58 20 2a 20 | 20 43 68 65 63 6b 73 20 |X *.X * | Checks |
|00004e70| 66 6f 72 20 74 68 65 20 | 70 72 65 73 65 6e 63 65 |for the |presence|
|00004e80| 20 6f 66 20 44 4f 57 4e | 5f 46 49 4c 45 2e 20 20 | of DOWN|_FILE. |
|00004e90| 49 66 20 69 74 20 65 78 | 69 73 74 73 2c 20 69 74 |If it ex|ists, it|
|00004ea0| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 61 74 0a | indicat|es that.|
|00004eb0| 58 20 2a 20 20 67 6f 73 | 69 70 20 69 73 20 64 6f |X * gos|ip is do|
|00004ec0| 77 6e 2e 20 20 49 66 20 | 74 68 65 20 75 73 65 72 |wn. If |the user|
|00004ed0| 20 69 73 20 53 55 50 45 | 52 5f 55 53 45 52 2c 20 | is SUPE|R_USER, |
|00004ee0| 69 74 20 6a 75 73 74 20 | 70 72 69 6e 74 73 20 61 |it just |prints a|
|00004ef0| 20 77 61 72 6e 69 6e 67 | 0a 58 20 2a 20 20 6d 65 | warning|.X * me|
|00004f00| 73 73 61 67 65 2c 20 6f | 74 68 65 72 77 69 73 65 |ssage, o|therwise|
|00004f10| 20 69 74 20 63 61 6c 6c | 73 20 61 64 64 5f 75 73 | it call|s add_us|
|00004f20| 65 72 28 29 20 61 6e 64 | 20 70 72 69 6e 74 73 20 |er() and| prints |
|00004f30| 61 6e 20 61 70 70 72 6f | 70 69 61 74 65 20 6d 65 |an appro|piate me|
|00004f40| 73 73 61 67 65 0a 58 20 | 2a 20 20 64 65 70 65 6e |ssage.X |* depen|
|00004f50| 64 69 6e 67 20 6f 6e 20 | 74 68 65 20 72 65 74 75 |ding on |the retu|
|00004f60| 72 6e 20 76 61 6c 75 65 | 2e 0a 58 20 2a 2f 0a 58 |rn value|..X */.X|
|00004f70| 76 6f 69 64 20 63 68 65 | 63 6b 5f 69 66 5f 75 70 |void che|ck_if_up|
|00004f80| 28 29 0a 58 7b 0a 58 20 | 20 69 66 20 28 20 61 63 |().X{.X | if ( ac|
|00004f90| 63 65 73 73 20 28 20 44 | 4f 57 4e 5f 46 49 4c 45 |cess ( D|OWN_FILE|
|00004fa0| 2c 20 46 5f 4f 4b 20 29 | 20 3d 3d 20 2d 31 20 29 |, F_OK )| == -1 )|
|00004fb0| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 3b 20 20 20 |.X re|turn; |
|00004fc0| 20 2f 2a 20 6f 75 67 68 | 74 20 72 65 61 6c 6c 79 | /* ough|t really|
|00004fd0| 20 74 6f 20 63 68 65 63 | 6b 20 74 68 61 74 20 6f | to chec|k that o|
|00004fe0| 77 6e 65 72 20 3d 3d 20 | 53 55 50 45 52 5f 55 53 |wner == |SUPER_US|
|00004ff0| 45 52 20 2a 2f 0a 58 20 | 20 65 6c 73 65 0a 58 20 |ER */.X | else.X |
|00005000| 20 20 20 69 66 20 28 20 | 21 20 73 74 72 63 6d 70 | if ( |! strcmp|
|00005010| 20 28 20 75 73 65 72 63 | 6f 64 65 28 29 2c 20 53 | ( userc|ode(), S|
|00005020| 55 50 45 52 5f 55 53 45 | 52 20 29 20 29 0a 58 20 |UPER_USE|R ) ).X |
|00005030| 20 20 20 7b 0a 58 20 20 | 20 20 20 20 28 76 6f 69 | {.X | (voi|
|00005040| 64 29 20 70 72 69 6e 74 | 66 20 28 20 22 57 61 72 |d) print|f ( "War|
|00005050| 6e 69 6e 67 3a 20 25 73 | 20 69 73 20 64 6f 77 6e |ning: %s| is down|
|00005060| 2e 5c 6e 5c 6e 22 2c 20 | 66 69 6c 65 20 29 3b 0a |.\n\n", |file );.|
|00005070| 58 20 20 20 20 20 20 72 | 65 74 75 72 6e 3b 0a 58 |X r|eturn;.X|
|00005080| 20 20 20 20 7d 0a 58 20 | 20 69 66 20 28 20 61 64 | }.X | if ( ad|
|00005090| 64 5f 75 73 65 72 28 29 | 20 29 0a 58 20 20 7b 0a |d_user()| ).X {.|
|000050a0| 58 20 20 20 20 28 76 6f | 69 64 29 20 70 72 69 6e |X (vo|id) prin|
|000050b0| 74 66 20 28 20 22 5c 30 | 30 37 49 27 76 65 20 61 |tf ( "\0|07I've a|
|000050c0| 6c 72 65 61 64 79 20 74 | 6f 6c 64 20 79 6f 75 20 |lready t|old you |
|000050d0| 74 68 61 74 20 74 68 65 | 20 25 73 20 66 69 6c 65 |that the| %s file|
|000050e0| 73 20 61 72 65 20 64 6f | 77 6e 2e 5c 6e 22 2c 20 |s are do|wn.\n", |
|000050f0| 66 69 6c 65 20 29 3b 0a | 58 20 20 20 20 70 75 74 |file );.|X put|
|00005100| 73 20 28 20 22 59 6f 75 | 27 6c 6c 20 62 65 20 74 |s ( "You|'ll be t|
|00005110| 6f 6c 64 20 77 68 65 6e | 20 73 65 72 76 69 63 65 |old when| service|
|00005120| 20 69 73 20 72 65 73 74 | 6f 72 65 64 2c 20 70 72 | is rest|ored, pr|
|00005130| 6f 76 69 64 65 64 20 79 | 6f 75 72 20 74 65 72 6d |ovided y|our term|
|00005140| 69 6e 61 6c 20 69 73 20 | 77 72 69 74 65 61 62 6c |inal is |writeabl|
|00005150| 65 2e 22 20 29 3b 0a 58 | 20 20 7d 0a 58 20 20 65 |e." );.X| }.X e|
|00005160| 6c 73 65 0a 58 20 20 7b | 0a 58 20 20 20 20 46 49 |lse.X {|.X FI|
|00005170| 4c 45 20 2a 66 70 20 3d | 20 66 6f 70 65 6e 20 28 |LE *fp =| fopen (|
|00005180| 20 44 4f 57 4e 5f 46 49 | 4c 45 2c 20 22 72 22 20 | DOWN_FI|LE, "r" |
|00005190| 29 3b 0a 58 20 20 20 20 | 63 68 61 72 20 6d 65 73 |);.X |char mes|
|000051a0| 5b 38 30 5d 2c 20 2a 74 | 65 6d 70 3b 0a 58 20 20 |[80], *t|emp;.X |
|000051b0| 20 20 65 78 74 65 72 6e | 20 63 68 61 72 20 2a 72 | extern| char *r|
|000051c0| 69 6e 64 65 78 28 29 3b | 0a 58 0a 58 20 20 20 20 |index();|.X.X |
|000051d0| 28 76 6f 69 64 29 20 66 | 67 65 74 73 20 28 20 6d |(void) f|gets ( m|
|000051e0| 65 73 2c 20 38 30 2c 20 | 66 70 20 29 3b 0a 58 20 |es, 80, |fp );.X |
|000051f0| 20 20 20 69 66 20 28 20 | 74 65 6d 70 20 3d 20 72 | if ( |temp = r|
|00005200| 69 6e 64 65 78 20 28 20 | 6d 65 73 2c 20 27 5c 6e |index ( |mes, '\n|
|00005210| 27 20 29 20 29 0a 58 20 | 20 20 20 20 20 2a 74 65 |' ) ).X | *te|
|00005220| 6d 70 20 3d 20 27 5c 30 | 27 3b 0a 58 20 20 20 20 |mp = '\0|';.X |
|00005230| 28 76 6f 69 64 29 20 70 | 72 69 6e 74 66 20 28 20 |(void) p|rintf ( |
|00005240| 22 53 6f 72 72 79 2c 20 | 74 68 65 20 25 73 20 66 |"Sorry, |the %s f|
|00005250| 69 6c 65 20 69 73 20 64 | 6f 77 6e 20 66 6f 72 20 |ile is d|own for |
|00005260| 6d 61 69 6e 74 65 6e 61 | 6e 63 65 2e 5c 6e 22 2c |maintena|nce.\n",|
|00005270| 20 66 69 6c 65 20 29 3b | 0a 58 20 20 20 20 28 76 | file );|.X (v|
|00005280| 6f 69 64 29 20 70 72 69 | 6e 74 66 20 28 20 22 5c |oid) pri|ntf ( "\|
|00005290| 74 2e 2e 2e 20 25 73 2e | 5c 6e 22 2c 20 6d 65 73 |t... %s.|\n", mes|
|000052a0| 20 29 3b 0a 58 20 20 20 | 20 70 75 74 73 20 28 20 | );.X | puts ( |
|000052b0| 22 59 6f 75 20 77 69 6c | 6c 20 70 72 6f 62 61 62 |"You wil|l probab|
|000052c0| 6c 79 20 62 65 20 69 6e | 66 6f 72 6d 65 64 20 77 |ly be in|formed w|
|000052d0| 68 65 6e 20 69 74 20 72 | 65 74 75 72 6e 73 20 74 |hen it r|eturns t|
|000052e0| 6f 20 73 65 72 76 69 63 | 65 2e 22 20 29 3b 0a 58 |o servic|e." );.X|
|000052f0| 20 20 7d 0a 58 20 20 65 | 78 69 74 20 28 20 31 20 | }.X e|xit ( 1 |
|00005300| 29 3b 0a 58 7d 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |);.X}.EN|D_OF_FIL|
|00005310| 45 0a 69 66 20 74 65 73 | 74 20 34 34 35 36 20 2d |E.if tes|t 4456 -|
|00005320| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 63 6f 6e 74 |ne `wc -|c <'cont|
|00005330| 72 6f 6c 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |rol.c'`;| then. |
|00005340| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00005350| 63 6f 6e 74 72 6f 6c 2e | 63 27 5c 22 20 75 6e 70 |control.|c'\" unp|
|00005360| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|00005370| 20 73 69 7a 65 21 0a 66 | 69 0a 23 20 65 6e 64 20 | size!.f|i.# end |
|00005380| 6f 66 20 27 63 6f 6e 74 | 72 6f 6c 2e 63 27 0a 66 |of 'cont|rol.c'.f|
|00005390| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 63 6f |i.if tes|t -f 'co|
|000053a0| 6e 74 72 6f 6c 2e 68 27 | 20 2d 61 20 22 24 7b 31 |ntrol.h'| -a "${1|
|000053b0| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|000053c0| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|000053d0| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|000053e0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|000053f0| 22 27 63 6f 6e 74 72 6f | 6c 2e 68 27 5c 22 0a 65 |"'contro|l.h'\".e|
|00005400| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00005410| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 63 6f 6e |xtractin|g \"'con|
|00005420| 74 72 6f 6c 2e 68 27 5c | 22 20 5c 28 31 34 38 36 |trol.h'\|" \(1486|
|00005430| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00005440| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 63 6f 6e |d "s/^X/|/" >'con|
|00005450| 74 72 6f 6c 2e 68 27 20 | 3c 3c 27 45 4e 44 5f 4f |trol.h' |<<'END_O|
|00005460| 46 5f 46 49 4c 45 27 0a | 58 2f 2a 20 20 54 68 69 |F_FILE'.|X/* Thi|
|00005470| 73 20 6d 6f 64 75 6c 65 | 20 63 6f 6e 74 61 69 6e |s module| contain|
|00005480| 73 20 72 6f 75 74 69 6e | 65 73 20 74 68 61 74 20 |s routin|es that |
|00005490| 63 61 6e 20 62 65 20 75 | 73 65 64 20 74 6f 20 73 |can be u|sed to s|
|000054a0| 74 6f 70 20 70 65 6f 70 | 6c 65 20 66 72 6f 6d 20 |top peop|le from |
|000054b0| 75 73 69 6e 67 0a 58 20 | 2a 20 20 67 6f 73 69 70 |using.X |* gosip|
|000054c0| 2e 20 20 54 68 69 73 20 | 77 6f 75 6c 64 20 62 65 |. This |would be|
|000054d0| 20 6e 65 65 64 65 64 2c | 20 66 6f 72 20 65 78 61 | needed,| for exa|
|000054e0| 6d 70 6c 65 2c 20 69 66 | 20 61 20 6e 65 77 20 76 |mple, if| a new v|
|000054f0| 65 72 73 69 6f 6e 20 77 | 61 73 20 74 6f 20 62 65 |ersion w|as to be|
|00005500| 0a 58 20 2a 20 20 69 6e | 73 74 61 6c 6c 65 64 20 |.X * in|stalled |
|00005510| 77 68 69 63 68 20 75 73 | 65 64 20 61 20 64 69 66 |which us|ed a dif|
|00005520| 66 65 72 65 6e 74 20 6c | 6f 63 6b 20 6d 65 63 68 |ferent l|ock mech|
|00005530| 61 6e 69 73 6d 2e 0a 58 | 20 2a 2f 0a 58 0a 58 2f |anism..X| */.X.X/|
|00005540| 2a 20 20 62 79 74 65 20 | 61 64 64 5f 75 73 65 72 |* byte |add_user|
|00005550| 28 29 0a 58 20 2a 20 20 | 0a 58 20 2a 20 20 49 66 |().X * |.X * If|
|00005560| 20 74 68 65 20 67 6f 73 | 69 70 20 66 69 6c 65 73 | the gos|ip files|
|00005570| 20 61 72 65 20 64 6f 77 | 6e 2c 20 61 64 64 5f 75 | are dow|n, add_u|
|00005580| 73 65 72 28 29 20 77 69 | 6c 6c 20 63 68 65 63 6b |ser() wi|ll check|
|00005590| 20 44 4f 57 4e 5f 46 49 | 4c 45 20 66 6f 72 20 74 | DOWN_FI|LE for t|
|000055a0| 68 65 0a 58 20 2a 20 20 | 75 73 65 72 27 73 20 63 |he.X * |user's c|
|000055b0| 6f 64 65 2e 20 20 49 66 | 20 68 65 20 69 73 20 6d |ode. If| he is m|
|000055c0| 65 6e 74 69 6f 6e 65 64 | 2c 20 69 74 20 77 69 6c |entioned|, it wil|
|000055d0| 6c 20 72 65 74 75 72 6e | 20 31 2e 20 20 49 66 20 |l return| 1. If |
|000055e0| 68 65 20 69 73 6e 27 74 | 2c 0a 58 20 2a 20 20 61 |he isn't|,.X * a|
|000055f0| 64 64 5f 75 73 65 72 28 | 29 20 63 68 65 63 6b 73 |dd_user(|) checks|
|00005600| 20 68 65 27 73 20 6f 6e | 20 61 20 74 65 72 6d 69 | he's on| a termi|
|00005610| 6e 61 6c 2c 20 61 6e 64 | 20 74 68 65 6e 20 61 64 |nal, and| then ad|
|00005620| 64 73 20 61 20 6c 69 6e | 65 20 74 6f 20 44 4f 57 |ds a lin|e to DOW|
|00005630| 4e 5f 46 49 4c 45 20 69 | 6e 0a 58 20 2a 20 20 74 |N_FILE i|n.X * t|
|00005640| 68 65 20 66 6f 72 6d 61 | 74 20 22 3a 3c 75 73 65 |he forma|t ":<use|
|00005650| 72 63 6f 64 65 3e 2c 3c | 74 65 72 6d 69 6e 61 6c |rcode>,<|terminal|
|00005660| 3e 2c 3c 66 69 6c 65 3e | 21 22 2e 0a 58 20 2a 2f |>,<file>|!"..X */|
|00005670| 0a 58 65 78 74 65 72 6e | 20 62 79 74 65 20 61 64 |.Xextern| byte ad|
|00005680| 64 5f 75 73 65 72 28 29 | 3b 0a 58 0a 58 2f 2a 20 |d_user()|;.X.X/* |
|00005690| 20 76 6f 69 64 20 69 6e | 66 6f 72 6d 5f 75 73 65 | void in|form_use|
|000056a0| 72 73 28 29 0a 58 20 2a | 0a 58 20 2a 20 20 54 68 |rs().X *|.X * Th|
|000056b0| 69 73 20 72 6f 75 74 69 | 6e 65 20 77 69 6c 6c 20 |is routi|ne will |
|000056c0| 61 74 74 65 6d 70 74 20 | 74 6f 20 77 72 69 74 65 |attempt |to write|
|000056d0| 20 61 20 6d 65 73 73 61 | 67 65 20 74 6f 20 65 61 | a messa|ge to ea|
|000056e0| 63 68 20 6f 66 20 74 68 | 65 20 75 73 65 72 73 20 |ch of th|e users |
|000056f0| 69 6e 20 74 68 65 0a 58 | 20 2a 20 20 44 4f 57 4e |in the.X| * DOWN|
|00005700| 5f 46 49 4c 45 2c 20 74 | 6f 20 74 65 6c 6c 20 74 |_FILE, t|o tell t|
|00005710| 68 65 6d 20 74 68 61 74 | 20 67 6f 73 69 70 20 69 |hem that| gosip i|
|00005720| 73 20 75 70 20 61 67 61 | 69 6e 2e 0a 58 20 2a 2f |s up aga|in..X */|
|00005730| 0a 58 65 78 74 65 72 6e | 20 76 6f 69 64 20 69 6e |.Xextern| void in|
|00005740| 66 6f 72 6d 5f 75 73 65 | 72 73 28 29 3b 0a 58 0a |form_use|rs();.X.|
|00005750| 58 2f 2a 20 20 76 6f 69 | 64 20 63 68 65 63 6b 5f |X/* voi|d check_|
|00005760| 69 66 5f 75 70 28 29 0a | 58 20 2a 0a 58 20 2a 20 |if_up().|X *.X * |
|00005770| 20 43 68 65 63 6b 73 20 | 66 6f 72 20 74 68 65 20 | Checks |for the |
|00005780| 70 72 65 73 65 6e 63 65 | 20 6f 66 20 44 4f 57 4e |presence| of DOWN|
|00005790| 5f 46 49 4c 45 2e 20 20 | 49 74 27 73 20 65 78 69 |_FILE. |It's exi|
|000057a0| 73 74 61 6e 63 65 20 77 | 6f 75 6c 64 20 69 6e 64 |stance w|ould ind|
|000057b0| 69 63 61 74 65 20 74 68 | 61 74 0a 58 20 2a 20 20 |icate th|at.X * |
|000057c0| 67 6f 73 69 70 20 69 73 | 20 64 6f 77 6e 2e 20 20 |gosip is| down. |
|000057d0| 49 66 20 74 68 65 20 75 | 73 65 72 20 69 73 20 53 |If the u|ser is S|
|000057e0| 55 50 45 52 5f 55 53 45 | 52 2c 20 69 74 20 6a 75 |UPER_USE|R, it ju|
|000057f0| 73 74 20 70 72 69 6e 74 | 73 20 61 20 77 61 72 6e |st print|s a warn|
|00005800| 69 6e 67 0a 58 20 2a 20 | 20 6d 65 73 73 61 67 65 |ing.X * | message|
|00005810| 2c 20 6f 74 68 65 72 77 | 69 73 65 20 61 6e 20 65 |, otherw|ise an e|
|00005820| 6e 74 72 79 20 69 73 20 | 61 64 64 65 64 20 74 6f |ntry is |added to|
|00005830| 20 44 4f 57 4e 5f 46 49 | 4c 45 2c 20 69 66 20 6e | DOWN_FI|LE, if n|
|00005840| 65 63 65 73 73 61 72 79 | 2c 20 61 6e 64 20 61 6e |ecessary|, and an|
|00005850| 0a 58 20 2a 20 20 61 70 | 70 72 6f 70 69 61 74 65 |.X * ap|propiate|
|00005860| 20 6d 65 73 73 61 67 65 | 20 70 72 69 6e 74 65 64 | message| printed|
|00005870| 2e 0a 58 20 2a 2f 0a 58 | 65 78 74 65 72 6e 20 76 |..X */.X|extern v|
|00005880| 6f 69 64 20 63 68 65 63 | 6b 5f 69 66 5f 75 70 28 |oid chec|k_if_up(|
|00005890| 29 3b 0a 58 0a 58 23 69 | 66 64 65 66 20 52 45 41 |);.X.X#i|fdef REA|
|000058a0| 4c 0a 58 23 64 65 66 69 | 6e 65 20 44 4f 57 4e 5f |L.X#defi|ne DOWN_|
|000058b0| 46 49 4c 45 20 22 2f 74 | 6d 70 2f 73 75 74 65 63 |FILE "/t|mp/sutec|
|000058c0| 68 22 20 2f 2a 20 44 4f | 57 4e 5f 46 49 4c 45 20 |h" /* DO|WN_FILE |
|000058d0| 65 78 69 73 74 73 20 77 | 68 65 6e 20 67 6f 73 69 |exists w|hen gosi|
|000058e0| 70 20 69 73 20 64 6f 77 | 6e 2e 20 2a 2f 0a 58 23 |p is dow|n. */.X#|
|000058f0| 65 6c 73 65 20 52 45 41 | 4c 20 20 20 20 20 20 20 |else REA|L |
|00005900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00005910| 2a 20 49 74 20 69 73 20 | 63 72 65 61 74 65 64 20 |* It is |created |
|00005920| 62 79 20 74 68 65 20 2d | 23 20 6f 70 74 69 6f 6e |by the -|# option|
|00005930| 20 61 6e 64 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 | and */.|X#define|
|00005940| 20 44 4f 57 4e 5f 46 49 | 4c 45 20 22 2f 74 6d 70 | DOWN_FI|LE "/tmp|
|00005950| 2f 66 72 6f 67 22 20 20 | 20 2f 2a 20 72 65 6d 6f |/frog" | /* remo|
|00005960| 76 65 64 20 62 79 20 74 | 68 65 20 2d 40 20 6f 70 |ved by t|he -@ op|
|00005970| 74 69 6f 6e 2e 20 2a 2f | 0a 58 23 65 6e 64 69 66 |tion. */|.X#endif|
|00005980| 20 52 45 41 4c 0a 58 0a | 58 23 64 65 66 69 6e 65 | REAL.X.|X#define|
|00005990| 20 53 55 50 45 52 5f 55 | 53 45 52 20 22 6d 61 75 | SUPER_U|SER "mau|
|000059a0| 68 6b 22 20 20 20 20 20 | 20 2f 2a 20 53 55 50 45 |hk" | /* SUPE|
|000059b0| 52 5f 55 53 45 52 20 69 | 73 20 69 6d 6d 75 6e 65 |R_USER i|s immune|
|000059c0| 20 74 6f 20 67 6f 73 69 | 70 20 62 65 69 6e 67 20 | to gosi|p being |
|000059d0| 64 6f 77 6e 20 2a 2f 0a | 58 20 20 20 20 20 20 20 |down */.|X |
|000059e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059f0| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 61 6e 64 20 | | /* and |
|00005a00| 69 73 20 74 68 65 20 6f | 6e 6c 79 20 6f 6e 65 20 |is the o|nly one |
|00005a10| 77 68 6f 20 63 61 6e 20 | 75 73 65 20 74 68 65 20 |who can |use the |
|00005a20| 2d 23 20 2a 2f 0a 58 20 | 20 20 20 20 20 20 20 20 |-# */.X | |
|00005a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005a40| 20 20 20 20 20 20 20 2f | 2a 20 61 6e 64 20 2d 40 | /|* and -@|
|00005a50| 20 6f 70 74 69 6f 6e 73 | 2e 20 2a 2f 0a 45 4e 44 | options|. */.END|
|00005a60| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00005a70| 20 31 34 38 36 20 2d 6e | 65 20 60 77 63 20 2d 63 | 1486 -n|e `wc -c|
|00005a80| 20 3c 27 63 6f 6e 74 72 | 6f 6c 2e 68 27 60 3b 20 | <'contr|ol.h'`; |
|00005a90| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00005aa0| 61 72 3a 20 5c 22 27 63 | 6f 6e 74 72 6f 6c 2e 68 |ar: \"'c|ontrol.h|
|00005ab0| 27 5c 22 20 75 6e 70 61 | 63 6b 65 64 20 77 69 74 |'\" unpa|cked wit|
|00005ac0| 68 20 77 72 6f 6e 67 20 | 73 69 7a 65 21 0a 66 69 |h wrong |size!.fi|
|00005ad0| 0a 23 20 65 6e 64 20 6f | 66 20 27 63 6f 6e 74 72 |.# end o|f 'contr|
|00005ae0| 6f 6c 2e 68 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |ol.h'.fi|.if test|
|00005af0| 20 2d 66 20 27 64 77 2e | 31 27 20 2d 61 20 22 24 | -f 'dw.|1' -a "$|
|00005b00| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00005b10| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00005b20| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00005b30| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00005b40| 20 5c 22 27 64 77 2e 31 | 27 5c 22 0a 65 6c 73 65 | \"'dw.1|'\".else|
|00005b50| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|00005b60| 61 63 74 69 6e 67 20 5c | 22 27 64 77 2e 31 27 5c |acting \|"'dw.1'\|
|00005b70| 22 20 5c 28 32 36 37 32 | 20 63 68 61 72 61 63 74 |" \(2672| charact|
|00005b80| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00005b90| 2f 22 20 3e 27 64 77 2e | 31 27 20 3c 3c 27 45 4e |/" >'dw.|1' <<'EN|
|00005ba0| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 2e 54 48 20 |D_OF_FIL|E'.X.TH |
|00005bb0| 44 57 20 31 20 22 31 30 | 20 4a 75 6e 65 20 31 39 |DW 1 "10| June 19|
|00005bc0| 38 39 22 0a 58 2e 53 48 | 20 4e 41 4d 45 0a 58 64 |89".X.SH| NAME.Xd|
|00005bd0| 77 20 2d 20 73 68 6f 77 | 20 63 68 61 6e 67 65 73 |w - show| changes|
|00005be0| 20 69 6e 20 74 68 65 20 | 67 6f 73 69 70 20 66 69 | in the |gosip fi|
|00005bf0| 6c 65 73 2e 0a 58 2e 53 | 48 20 53 59 4e 4f 50 53 |les..X.S|H SYNOPS|
|00005c00| 49 53 0a 58 2e 42 20 64 | 77 20 5b 3c 67 6f 73 69 |IS.X.B d|w [<gosi|
|00005c10| 70 20 66 69 6c 65 3e 20 | 5b 3c 67 6f 73 69 70 20 |p file> |[<gosip |
|00005c20| 66 69 6c 65 3e 20 2e 2e | 2e 5d 5d 0a 58 2e 53 48 |file> ..|.]].X.SH|
|00005c30| 20 44 45 53 43 52 49 50 | 54 49 4f 4e 0a 58 44 77 | DESCRIP|TION.XDw|
|00005c40| 20 75 73 65 73 20 64 69 | 66 66 28 31 29 20 74 6f | uses di|ff(1) to|
|00005c50| 20 73 68 6f 77 20 63 68 | 61 6e 67 65 73 20 69 6e | show ch|anges in|
|00005c60| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 67 | the spe|cified g|
|00005c70| 6f 73 69 70 20 66 69 6c | 65 73 2e 20 20 54 68 69 |osip fil|es. Thi|
|00005c80| 73 0a 58 73 61 76 65 73 | 20 79 6f 75 20 68 61 76 |s.Xsaves| you hav|
|00005c90| 69 6e 67 20 74 6f 20 77 | 61 64 65 20 74 68 72 6f |ing to w|ade thro|
|00005ca0| 75 67 68 20 34 30 4b 20 | 6f 66 20 66 69 6c 65 20 |ugh 40K |of file |
|00005cb0| 6a 75 73 74 20 74 6f 20 | 66 69 6e 64 20 74 68 61 |just to |find tha|
|00005cc0| 74 20 74 68 65 0a 58 6f | 6e 6c 79 20 63 68 61 6e |t the.Xo|nly chan|
|00005cd0| 67 65 20 69 73 20 61 20 | 73 70 65 6c 6c 69 6e 67 |ge is a |spelling|
|00005ce0| 20 63 6f 72 72 65 63 74 | 69 6f 6e 2e 20 20 4f 6e | correct|ion. On|
|00005cf0| 20 69 74 73 20 6f 77 6e | 2c 20 64 77 20 77 69 6c | its own|, dw wil|
|00005d00| 6c 20 73 68 6f 77 0a 58 | 63 6f 6e 74 65 78 74 20 |l show.X|context |
|00005d10| 64 69 66 66 73 20 66 6f | 72 20 61 6c 6c 20 67 6f |diffs fo|r all go|
|00005d20| 73 69 70 20 66 69 6c 65 | 73 20 28 6f 62 74 61 69 |sip file|s (obtai|
|00005d30| 6e 65 64 20 66 72 6f 6d | 20 61 6c 6c 67 6f 73 73 |ned from| allgoss|
|00005d40| 28 31 29 29 3b 20 77 69 | 74 68 0a 58 61 72 67 75 |(1)); wi|th.Xargu|
|00005d50| 6d 65 6e 74 73 2c 20 64 | 69 66 66 65 72 65 6e 63 |ments, d|ifferenc|
|00005d60| 65 73 20 66 6f 72 20 74 | 68 6f 73 65 20 66 69 6c |es for t|hose fil|
|00005d70| 65 73 20 6f 6e 6c 79 2e | 20 20 4e 6f 74 65 20 74 |es only.| Note t|
|00005d80| 68 61 74 20 74 68 65 20 | 64 69 66 66 73 20 61 72 |hat the |diffs ar|
|00005d90| 65 0a 58 72 75 6e 20 61 | 73 79 6e 63 68 72 6f 6e |e.Xrun a|synchron|
|00005da0| 6f 75 73 6c 79 2c 20 73 | 6f 20 64 6f 69 6e 67 20 |ously, s|o doing |
|00005db0| 64 77 20 66 6f 72 20 61 | 20 6c 6f 74 20 6f 66 20 |dw for a| lot of |
|00005dc0| 66 69 6c 65 73 20 77 69 | 6c 6c 20 70 75 73 68 20 |files wi|ll push |
|00005dd0| 74 68 65 20 6c 6f 61 64 | 0a 58 61 76 65 72 61 67 |the load|.Xaverag|
|00005de0| 65 20 75 70 20 71 75 69 | 74 65 20 61 20 62 69 74 |e up qui|te a bit|
|00005df0| 2e 0a 58 2e 73 70 0a 58 | 54 68 65 20 63 6f 70 69 |..X.sp.X|The copi|
|00005e00| 65 73 20 6f 66 20 74 68 | 65 20 67 6f 73 69 70 20 |es of th|e gosip |
|00005e10| 66 69 6c 65 73 20 61 72 | 65 20 6b 65 70 74 20 69 |files ar|e kept i|
|00005e20| 6e 20 24 48 4f 4d 45 2f | 2e 62 61 63 6b 75 70 73 |n $HOME/|.backups|
|00005e30| 2e 20 20 49 66 20 79 6f | 75 20 64 6f 0a 58 6e 6f |. If yo|u do.Xno|
|00005e40| 74 20 68 61 76 65 20 73 | 75 63 68 20 61 20 64 69 |t have s|uch a di|
|00005e50| 72 65 63 74 6f 72 79 2c | 20 64 77 20 77 69 6c 6c |rectory,| dw will|
|00005e60| 20 6e 6f 74 20 77 6f 72 | 6b 2e 0a 58 2e 53 48 20 | not wor|k..X.SH |
|00005e70| 55 53 41 47 45 0a 58 44 | 77 20 66 69 72 73 74 20 |USAGE.XD|w first |
|00005e80| 63 6f 70 69 65 73 20 61 | 6c 6c 20 74 68 65 20 73 |copies a|ll the s|
|00005e90| 70 65 63 69 66 69 65 64 | 20 67 6f 73 69 70 20 66 |pecified| gosip f|
|00005ea0| 69 6c 65 73 20 69 6e 74 | 6f 20 24 48 4f 4d 45 2f |iles int|o $HOME/|
|00005eb0| 2e 62 61 63 6b 75 70 73 | 2c 20 61 6e 64 0a 58 72 |.backups|, and.Xr|
|00005ec0| 75 6e 20 64 69 66 66 28 | 31 29 20 69 6e 20 74 68 |un diff(|1) in th|
|00005ed0| 65 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 66 6f 72 |e backgr|ound for|
|00005ee0| 20 65 61 63 68 2e 20 20 | 49 74 20 74 68 65 6e 20 | each. |It then |
|00005ef0| 6c 6f 6f 70 73 20 74 68 | 72 6f 75 67 68 20 61 6c |loops th|rough al|
|00005f00| 6c 0a 58 67 6f 73 69 70 | 20 66 69 6c 65 73 2c 20 |l.Xgosip| files, |
|00005f10| 75 6e 74 69 6c 20 69 74 | 20 66 69 6e 64 73 20 6f |until it| finds o|
|00005f20| 6e 65 20 66 6f 72 20 77 | 68 69 63 68 20 64 69 66 |ne for w|hich dif|
|00005f30| 66 20 68 61 73 20 63 6f | 6d 70 6c 65 74 65 64 2e |f has co|mpleted.|
|00005f40| 20 20 54 68 65 0a 58 63 | 68 61 6e 67 65 73 2c 20 | The.Xc|hanges, |
|00005f50| 69 66 20 61 6e 79 2c 20 | 61 72 65 20 64 69 73 70 |if any, |are disp|
|00005f60| 6c 61 79 65 64 2c 20 66 | 6f 6c 6c 6f 77 65 64 20 |layed, f|ollowed |
|00005f70| 62 79 20 74 68 65 20 6c | 61 73 74 20 66 6f 75 72 |by the l|ast four|
|00005f80| 20 6c 69 6e 65 73 20 6f | 66 0a 58 68 69 73 74 6f | lines o|f.Xhisto|
|00005f90| 72 79 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 66 |ry infor|mation f|
|00005fa0| 6f 72 20 74 68 61 74 20 | 66 69 6c 65 2e 20 20 59 |or that |file. Y|
|00005fb0| 6f 75 20 61 72 65 20 74 | 68 65 6e 20 70 72 6f 6d |ou are t|hen prom|
|00005fc0| 70 74 65 64 20 66 6f 72 | 20 61 20 63 6f 6d 6d 61 |pted for| a comma|
|00005fd0| 6e 64 2e 0a 58 2e 54 50 | 0a 58 2e 42 20 62 0a 58 |nd..X.TP|.X.B b.X|
|00005fe0| 42 61 63 6b 75 70 20 74 | 68 65 20 6e 65 77 20 76 |Backup t|he new v|
|00005ff0| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 65 20 63 75 |ersion o|f the cu|
|00006000| 72 72 65 6e 74 20 67 6f | 73 69 70 20 66 69 6c 65 |rrent go|sip file|
|00006010| 2e 20 20 45 71 75 69 76 | 61 6c 65 6e 74 20 74 6f |. Equiv|alent to|
|00006020| 20 6a 75 73 74 0a 58 70 | 72 65 73 73 69 6e 67 20 | just.Xp|ressing |
|00006030| 72 65 74 75 72 6e 2e 0a | 58 2e 54 50 0a 58 2e 42 |return..|X.TP.X.B|
|00006040| 20 6e 0a 58 44 6f 20 6e | 6f 74 20 62 61 63 6b 20 | n.XDo n|ot back |
|00006050| 74 68 69 73 20 66 69 6c | 65 20 75 70 2e 0a 58 2e |this fil|e up..X.|
|00006060| 54 50 0a 58 2e 42 20 63 | 0a 58 42 61 63 6b 20 74 |TP.X.B c|.XBack t|
|00006070| 68 69 73 20 66 69 6c 65 | 20 75 70 20 61 6e 64 20 |his file| up and |
|00006080| 63 68 65 63 6b 20 69 74 | 20 61 67 61 69 6e 2e 20 |check it| again. |
|00006090| 20 59 6f 75 20 6d 69 67 | 68 74 20 77 61 6e 74 20 | You mig|ht want |
|000060a0| 74 6f 20 75 73 65 20 74 | 68 69 73 0a 58 63 6f 6d |to use t|his.Xcom|
|000060b0| 6d 61 6e 64 20 69 66 20 | 74 68 65 20 68 69 73 74 |mand if |the hist|
|000060c0| 6f 72 79 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ory info|rmation |
|000060d0| 73 68 6f 77 73 20 74 68 | 61 74 20 74 68 65 20 66 |shows th|at the f|
|000060e0| 69 6c 65 20 68 61 73 20 | 62 65 65 6e 20 65 64 69 |ile has |been edi|
|000060f0| 74 65 64 0a 58 69 6e 20 | 74 68 65 20 6c 61 73 74 |ted.Xin |the last|
|00006100| 20 66 65 77 20 6d 69 6e | 75 74 65 73 2e 0a 58 2e | few min|utes..X.|
|00006110| 54 50 0a 58 2e 42 20 43 | 0a 58 43 68 65 63 6b 20 |TP.X.B C|.XCheck |
|00006120| 74 68 69 73 20 66 69 6c | 65 20 61 67 61 69 6e 20 |this fil|e again |
|00006130| 62 75 74 20 64 6f 20 6e | 6f 74 20 62 61 63 6b 20 |but do n|ot back |
|00006140| 69 74 20 75 70 20 66 69 | 72 73 74 2e 0a 58 2e 54 |it up fi|rst..X.T|
|00006150| 50 0a 58 2e 42 20 65 0a | 58 42 61 63 6b 75 70 20 |P.X.B e.|XBackup |
|00006160| 74 68 69 73 20 66 69 6c | 65 2c 20 74 68 65 6e 20 |this fil|e, then |
|00006170| 65 64 69 74 20 69 74 2e | 20 20 44 77 20 77 69 6c |edit it.| Dw wil|
|00006180| 6c 20 75 73 65 20 67 6f | 73 69 70 20 2d 63 2c 20 |l use go|sip -c, |
|00006190| 77 69 74 68 20 74 68 65 | 20 65 78 74 72 61 0a 58 |with the| extra.X|
|000061a0| 66 69 6c 65 20 62 65 69 | 6e 67 20 74 68 65 20 63 |file bei|ng the c|
|000061b0| 6f 6e 74 65 78 74 20 64 | 69 66 66 73 2e 20 20 54 |ontext d|iffs. T|
|000061c0| 68 69 73 20 66 6c 61 67 | 20 63 61 75 73 65 73 20 |his flag| causes |
|000061d0| 67 6f 73 69 70 20 74 6f | 20 75 73 65 20 65 6d 61 |gosip to| use ema|
|000061e0| 63 73 20 74 6f 20 65 64 | 69 74 0a 58 74 68 65 20 |cs to ed|it.Xthe |
|000061f0| 66 69 6c 65 2c 20 61 6e | 64 20 6c 6f 61 64 20 74 |file, an|d load t|
|00006200| 68 65 20 63 6f 6e 74 65 | 78 74 20 64 69 66 66 73 |he conte|xt diffs|
|00006210| 20 69 6e 74 6f 20 61 20 | 73 65 70 61 72 61 74 65 | into a |separate|
|00006220| 20 62 75 66 66 65 72 2e | 0a 58 2e 73 70 0a 58 57 | buffer.|.X.sp.XW|
|00006230| 68 65 6e 20 74 68 65 20 | 65 64 69 74 20 66 69 6e |hen the |edit fin|
|00006240| 69 73 68 65 73 2c 20 64 | 77 20 77 69 6c 6c 20 61 |ishes, d|w will a|
|00006250| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 72 65 63 |utomatic|ally rec|
|00006260| 68 65 63 6b 20 74 68 61 | 74 20 66 69 6c 65 2e 20 |heck tha|t file. |
|00006270| 20 59 6f 75 0a 58 6d 69 | 67 68 74 20 73 61 79 2c | You.Xmi|ght say,|
|00006280| 20 77 68 79 20 6e 6f 74 | 20 6a 75 73 74 20 62 61 | why not| just ba|
|00006290| 63 6b 20 75 70 20 74 68 | 65 20 6e 65 77 20 76 65 |ck up th|e new ve|
|000062a0| 72 73 69 6f 6e 2c 20 73 | 69 6e 63 65 20 79 6f 75 |rsion, s|ince you|
|000062b0| 20 70 72 65 73 75 6d 61 | 62 6c 79 0a 58 6b 6e 6f | presuma|bly.Xkno|
|000062c0| 77 20 77 68 61 74 20 79 | 6f 75 20 63 68 61 6e 67 |w what y|ou chang|
|000062d0| 65 64 2c 20 62 75 74 20 | 79 6f 75 27 64 20 62 65 |ed, but |you'd be|
|000062e0| 20 73 75 72 70 72 69 73 | 65 64 20 68 6f 77 20 6d | surpris|ed how m|
|000062f0| 61 6e 79 20 73 70 65 6c | 6c 69 6e 67 20 65 72 72 |any spel|ling err|
|00006300| 6f 72 73 0a 58 79 6f 75 | 20 73 70 6f 74 20 6c 6f |ors.Xyou| spot lo|
|00006310| 6f 6b 69 6e 67 20 6f 76 | 65 72 20 74 68 65 20 64 |oking ov|er the d|
|00006320| 69 66 66 73 2e 0a 58 2e | 54 50 0a 58 2e 42 20 45 |iffs..X.|TP.X.B E|
|00006330| 0a 58 45 64 69 74 20 74 | 68 65 20 66 69 6c 65 20 |.XEdit t|he file |
|00006340| 62 75 74 20 64 6f 20 6e | 6f 74 20 62 61 63 6b 75 |but do n|ot backu|
|00006350| 70 20 69 74 20 75 70 20 | 66 69 72 73 74 2e 20 20 |p it up |first. |
|00006360| 55 73 65 66 75 6c 20 69 | 66 20 79 6f 75 20 77 69 |Useful i|f you wi|
|00006370| 73 68 20 74 6f 0a 58 72 | 65 70 6c 61 63 65 20 73 |sh to.Xr|eplace s|
|00006380| 6f 6d 65 20 74 65 78 74 | 20 73 6f 6d 65 20 63 68 |ome text| some ch|
|00006390| 65 65 73 65 20 68 65 61 | 64 20 68 61 73 20 64 65 |eese hea|d has de|
|000063a0| 6c 65 74 65 64 2e 0a 58 | 2e 54 50 0a 58 2e 42 20 |leted..X|.TP.X.B |
|000063b0| 71 0a 58 42 61 63 6b 75 | 70 20 75 70 20 74 68 65 |q.XBacku|p up the|
|000063c0| 20 63 75 72 72 65 6e 74 | 20 66 69 6c 65 20 61 6e | current| file an|
|000063d0| 64 20 71 75 69 74 20 64 | 77 2e 20 20 54 68 69 73 |d quit d|w. This|
|000063e0| 20 69 6e 76 6f 6c 76 65 | 73 20 6b 69 6c 6c 69 6e | involve|s killin|
|000063f0| 67 20 61 6c 6c 0a 58 64 | 69 66 66 73 20 74 68 61 |g all.Xd|iffs tha|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.