home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 46 72 |.sources|.misc.Fr|
|00000020| 6f 6d 3a 20 61 6c 6c 62 | 65 72 79 40 75 75 6e 65 |om: allb|ery@uune|
|00000030| 74 2e 55 55 2e 4e 45 54 | 20 28 42 72 61 6e 64 6f |t.UU.NET| (Brando|
|00000040| 6e 20 53 2e 20 41 6c 6c | 62 65 72 79 20 2d 20 63 |n S. All|bery - c|
|00000050| 6f 6d 70 2e 73 6f 75 72 | 63 65 73 2e 6d 69 73 63 |omp.sour|ces.misc|
|00000060| 29 0a 53 75 62 6a 65 63 | 74 3a 20 76 30 37 69 30 |).Subjec|t: v07i0|
|00000070| 36 35 3a 20 47 6f 73 69 | 70 20 2d 2d 20 66 69 78 |65: Gosi|p -- fix|
|00000080| 65 73 20 61 20 6d 61 6a | 6f 72 20 62 75 67 0a 52 |es a maj|or bug.R|
|00000090| 65 70 6c 79 2d 54 6f 3a | 20 41 6e 64 72 65 61 73 |eply-To:| Andreas|
|000000a0| 20 50 61 67 65 6c 20 3c | 6d 61 75 68 6b 40 63 75 | Pagel <|mauhk@cu|
|000000b0| 2e 77 61 72 77 69 63 6b | 2e 61 63 2e 75 6b 3e 0a |.warwick|.ac.uk>.|
|000000c0| 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e 3a 20 4d 61 |Organiza|tion: Ma|
|000000d0| 74 68 65 6d 61 74 69 63 | 73 20 44 65 70 74 2e 2c |thematic|s Dept.,|
|000000e0| 20 57 61 72 77 69 63 6b | 20 55 6e 69 76 65 72 73 | Warwick| Univers|
|000000f0| 69 74 79 2c 20 55 4b 0a | 0a 50 6f 73 74 69 6e 67 |ity, UK.|.Posting|
|00000100| 2d 6e 75 6d 62 65 72 3a | 20 56 6f 6c 75 6d 65 20 |-number:| Volume |
|00000110| 37 2c 20 49 73 73 75 65 | 20 36 35 0a 53 75 62 6d |7, Issue| 65.Subm|
|00000120| 69 74 74 65 64 2d 62 79 | 3a 20 6d 61 75 68 6b 40 |itted-by|: mauhk@|
|00000130| 63 75 2e 77 61 72 77 69 | 63 6b 2e 61 63 2e 75 6b |cu.warwi|ck.ac.uk|
|00000140| 20 28 41 6e 64 72 65 61 | 73 20 50 61 67 65 6c 29 | (Andrea|s Pagel)|
|00000150| 0a 41 72 63 68 69 76 65 | 2d 6e 61 6d 65 3a 20 67 |.Archive|-name: g|
|00000160| 6f 73 69 70 32 0a 0a 5b | 54 6f 6f 20 6c 61 74 65 |osip2..[|Too late|
|00000170| 2e 2e 2e 2e 20 20 2b 2b | 62 73 61 5d 0a 0a 49 20 |.... ++|bsa]..I |
|00000180| 6e 6f 74 69 63 65 64 20 | 61 20 74 65 72 72 69 62 |noticed |a terrib|
|00000190| 6c 65 20 65 72 72 6f 72 | 20 69 6e 20 74 68 65 20 |le error| in the |
|000001a0| 67 6f 73 69 70 20 73 68 | 61 72 20 49 20 73 65 6e |gosip sh|ar I sen|
|000001b0| 74 20 79 6f 75 20 72 65 | 63 65 6e 74 6c 79 2c 20 |t you re|cently, |
|000001c0| 69 6e 20 74 68 61 74 20 | 49 0a 66 61 69 6c 65 64 |in that |I.failed|
|000001d0| 20 74 6f 20 73 70 65 63 | 69 66 79 20 63 75 73 74 | to spec|ify cust|
|000001e0| 6f 6d 69 73 61 74 69 6f | 6e 20 63 6f 72 72 65 63 |omisatio|n correc|
|000001f0| 74 6c 79 2e 20 20 49 20 | 61 6c 73 6f 20 6e 6f 74 |tly. I |also not|
|00000200| 69 63 65 64 20 79 6f 75 | 20 68 61 76 65 6e 27 74 |iced you| haven't|
|00000210| 20 73 65 6e 74 20 69 74 | 0a 6f 75 74 20 79 65 74 | sent it|.out yet|
|00000220| 2c 20 73 6f 20 63 6f 75 | 6c 64 20 79 6f 75 20 70 |, so cou|ld you p|
|00000230| 6f 73 74 20 74 68 69 73 | 20 28 68 6f 70 65 66 75 |ost this| (hopefu|
|00000240| 6c 6c 79 29 20 63 6f 72 | 72 65 63 74 20 76 65 72 |lly) cor|rect ver|
|00000250| 73 69 6f 6e 20 69 6e 73 | 74 65 61 64 3f 0a 0a 74 |sion ins|tead?..t|
|00000260| 68 61 6e 6b 73 2c 0a 41 | 6e 64 72 65 61 73 2e 0a |hanks,.A|ndreas..|
|00000270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000290| 2d 63 75 74 20 68 65 72 | 65 2d 2d 2d 2d 2d 2d 2d |-cut her|e-------|
|000002a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 23 21 20 2f 62 |--------|--.#! /b|
|000002c0| 69 6e 2f 73 68 0a 23 20 | 54 68 69 73 20 69 73 20 |in/sh.# |This is |
|000002d0| 61 20 73 68 65 6c 6c 20 | 61 72 63 68 69 76 65 2e |a shell |archive.|
|000002e0| 20 20 52 65 6d 6f 76 65 | 20 61 6e 79 74 68 69 6e | Remove| anythin|
|000002f0| 67 20 62 65 66 6f 72 65 | 20 74 68 69 73 20 6c 69 |g before| this li|
|00000300| 6e 65 2c 20 74 68 65 6e | 20 75 6e 70 61 63 6b 0a |ne, then| unpack.|
|00000310| 23 20 69 74 20 62 79 20 | 73 61 76 69 6e 67 20 69 |# it by |saving i|
|00000320| 74 20 69 6e 74 6f 20 61 | 20 66 69 6c 65 20 61 6e |t into a| file an|
|00000330| 64 20 74 79 70 69 6e 67 | 20 22 73 68 20 66 69 6c |d typing| "sh fil|
|00000340| 65 22 2e 20 20 54 6f 20 | 6f 76 65 72 77 72 69 74 |e". To |overwrit|
|00000350| 65 20 65 78 69 73 74 69 | 6e 67 0a 23 20 66 69 6c |e existi|ng.# fil|
|00000360| 65 73 2c 20 74 79 70 65 | 20 22 73 68 20 66 69 6c |es, type| "sh fil|
|00000370| 65 20 2d 63 22 2e 20 20 | 59 6f 75 20 63 61 6e 20 |e -c". |You can |
|00000380| 61 6c 73 6f 20 66 65 65 | 64 20 74 68 69 73 20 61 |also fee|d this a|
|00000390| 73 20 73 74 61 6e 64 61 | 72 64 20 69 6e 70 75 74 |s standa|rd input|
|000003a0| 20 76 69 61 0a 23 20 75 | 6e 73 68 61 72 2c 20 6f | via.# u|nshar, o|
|000003b0| 72 20 62 79 20 74 79 70 | 69 6e 67 20 22 73 68 20 |r by typ|ing "sh |
|000003c0| 3c 66 69 6c 65 22 2c 20 | 65 2e 67 2e 2e 20 20 49 |<file", |e.g.. I|
|000003d0| 66 20 74 68 69 73 20 61 | 72 63 68 69 76 65 20 69 |f this a|rchive i|
|000003e0| 73 20 63 6f 6d 70 6c 65 | 74 65 2c 20 79 6f 75 0a |s comple|te, you.|
|000003f0| 23 20 77 69 6c 6c 20 73 | 65 65 20 74 68 65 20 66 |# will s|ee the f|
|00000400| 6f 6c 6c 6f 77 69 6e 67 | 20 6d 65 73 73 61 67 65 |ollowing| message|
|00000410| 20 61 74 20 74 68 65 20 | 65 6e 64 3a 0a 23 09 09 | at the |end:.#..|
|00000420| 22 45 6e 64 20 6f 66 20 | 73 68 65 6c 6c 20 61 72 |"End of |shell ar|
|00000430| 63 68 69 76 65 2e 22 0a | 23 20 43 6f 6e 74 65 6e |chive.".|# Conten|
|00000440| 74 73 3a 20 20 48 69 73 | 74 6f 72 79 20 4d 61 6b |ts: His|tory Mak|
|00000450| 65 66 69 6c 65 20 52 45 | 41 44 4d 45 20 61 6c 6c |efile RE|ADME all|
|00000460| 67 6f 73 73 2e 31 20 63 | 61 74 2e 63 20 63 61 74 |goss.1 c|at.c cat|
|00000470| 2e 68 20 63 6f 6e 74 72 | 6f 6c 2e 63 0a 23 20 20 |.h contr|ol.c.# |
|00000480| 20 63 6f 6e 74 72 6f 6c | 2e 68 20 64 77 2e 31 20 | control|.h dw.1 |
|00000490| 65 64 69 74 2e 63 20 65 | 64 69 74 2e 68 20 67 6c |edit.c e|dit.h gl|
|000004a0| 6f 62 61 6c 2e 68 20 67 | 6f 73 69 70 2e 31 20 68 |obal.h g|osip.1 h|
|000004b0| 69 73 74 6f 72 79 2e 63 | 20 68 69 73 74 6f 72 79 |istory.c| history|
|000004c0| 2e 68 0a 23 20 20 20 6c | 75 2e 31 20 6c 75 2e 63 |.h.# l|u.1 lu.c|
|000004d0| 20 6c 75 2e 68 20 6d 61 | 69 6e 2e 63 20 6d 61 69 | lu.h ma|in.c mai|
|000004e0| 6e 2e 68 20 6e 6f 74 65 | 73 20 73 65 74 75 70 20 |n.h note|s setup |
|000004f0| 75 74 69 6c 2e 63 20 75 | 74 69 6c 2e 68 0a 23 20 |util.c u|til.h.# |
|00000500| 57 72 61 70 70 65 64 20 | 62 79 20 6d 61 75 68 6b |Wrapped |by mauhk|
|00000510| 40 6f 72 63 68 69 64 20 | 6f 6e 20 57 65 64 20 4a |@orchid |on Wed J|
|00000520| 75 6e 20 32 38 20 31 36 | 3a 32 33 3a 30 35 20 31 |un 28 16|:23:05 1|
|00000530| 39 38 39 0a 50 41 54 48 | 3d 2f 62 69 6e 3a 2f 75 |989.PATH|=/bin:/u|
|00000540| 73 72 2f 62 69 6e 3a 2f | 75 73 72 2f 75 63 62 20 |sr/bin:/|usr/ucb |
|00000550| 3b 20 65 78 70 6f 72 74 | 20 50 41 54 48 0a 69 66 |; export| PATH.if|
|00000560| 20 74 65 73 74 20 2d 66 | 20 27 48 69 73 74 6f 72 | test -f| 'Histor|
|00000570| 79 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |y' -a "$|{1}" != |
|00000580| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00000590| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|000005a0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|000005b0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 48 69 73 74 |ing file| \"'Hist|
|000005c0| 6f 72 79 27 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |ory'\".e|lse.echo|
|000005d0| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|000005e0| 67 20 5c 22 27 48 69 73 | 74 6f 72 79 27 5c 22 20 |g \"'His|tory'\" |
|000005f0| 5c 28 32 39 35 30 20 63 | 68 61 72 61 63 74 65 72 |\(2950 c|haracter|
|00000600| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000610| 20 3e 27 48 69 73 74 6f | 72 79 27 20 3c 3c 27 45 | >'Histo|ry' <<'E|
|00000620| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 41 50 53 |ND_OF_FI|LE'.XAPS|
|00000630| 20 47 6f 73 69 70 3a 20 | 48 69 73 74 6f 72 79 0a | Gosip: |History.|
|00000640| 58 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |X=======|========|
|00000650| 3d 3d 3d 0a 58 0a 58 54 | 68 65 20 6f 72 69 67 69 |===.X.XT|he origi|
|00000660| 6e 61 6c 20 69 64 65 61 | 20 77 61 73 20 63 6f 6e |nal idea| was con|
|00000670| 63 65 69 76 65 64 20 62 | 79 20 4a 6f 6e 61 74 68 |ceived b|y Jonath|
|00000680| 61 6e 20 48 75 67 68 65 | 73 20 6f 66 20 57 61 72 |an Hughe|s of War|
|00000690| 77 69 63 6b 20 55 6e 69 | 76 65 72 73 69 74 79 2c |wick Uni|versity,|
|000006a0| 20 62 61 63 6b 0a 58 69 | 6e 20 31 39 38 37 2e 20 | back.Xi|n 1987. |
|000006b0| 20 48 65 20 73 69 6d 70 | 6c 79 20 63 72 65 61 74 | He simp|ly creat|
|000006c0| 65 64 20 74 77 6f 20 77 | 72 69 74 61 62 6c 65 20 |ed two w|ritable |
|000006d0| 66 69 6c 65 73 2c 20 67 | 6f 73 73 69 70 20 61 6e |files, g|ossip an|
|000006e0| 64 20 68 65 6c 70 2c 20 | 69 6e 20 68 69 73 20 68 |d help, |in his h|
|000006f0| 6f 6d 65 0a 58 64 69 72 | 65 63 74 6f 72 79 20 61 |ome.Xdir|ectory a|
|00000700| 6e 64 20 69 6e 76 69 74 | 65 64 20 70 65 6f 70 6c |nd invit|ed peopl|
|00000710| 65 20 74 6f 20 65 64 69 | 74 20 74 68 65 6d 3a 20 |e to edi|t them: |
|00000720| 67 6f 73 73 69 70 20 66 | 6f 72 20 67 65 6e 65 72 |gossip f|or gener|
|00000730| 61 6c 20 63 68 61 74 74 | 69 6e 67 2c 20 61 6e 64 |al chatt|ing, and|
|00000740| 0a 58 68 65 6c 70 20 66 | 6f 72 20 71 75 65 72 69 |.Xhelp f|or queri|
|00000750| 65 73 20 61 62 6f 75 74 | 20 74 68 65 20 55 4e 49 |es about| the UNI|
|00000760| 58 20 73 79 73 74 65 6d | 20 6f 72 20 70 72 6f 67 |X system| or prog|
|00000770| 72 61 6d 6d 69 6e 67 20 | 61 73 73 69 67 6e 6d 65 |ramming |assignme|
|00000780| 6e 74 73 2e 0a 58 0a 58 | 49 20 73 6f 6f 6e 20 72 |nts..X.X|I soon r|
|00000790| 65 61 6c 69 73 65 64 20 | 74 68 61 74 20 69 66 20 |ealised |that if |
|000007a0| 74 77 6f 20 70 65 6f 70 | 6c 65 20 65 64 69 74 65 |two peop|le edite|
|000007b0| 64 20 61 20 66 69 6c 65 | 20 73 69 6d 75 6c 74 61 |d a file| simulta|
|000007c0| 6e 65 6f 75 73 6c 79 2c | 20 6f 6e 6c 79 20 6f 6e |neously,| only on|
|000007d0| 65 0a 58 70 65 72 73 6f | 6e 27 73 20 63 68 61 6e |e.Xperso|n's chan|
|000007e0| 67 65 73 20 77 6f 75 6c | 64 20 62 65 20 73 61 76 |ges woul|d be sav|
|000007f0| 65 64 2e 20 20 53 6f 20 | 49 20 77 72 6f 74 65 20 |ed. So |I wrote |
|00000800| 6d 79 20 66 69 72 73 74 | 20 65 76 65 72 20 73 68 |my first| ever sh|
|00000810| 65 6c 6c 20 70 72 6f 67 | 72 61 6d 2c 0a 58 73 6f |ell prog|ram,.Xso|
|00000820| 6d 65 74 68 69 6e 67 20 | 6c 69 6b 65 3a 0a 58 0a |mething |like:.X.|
|00000830| 58 69 66 20 74 65 73 74 | 20 2d 66 20 74 6d 70 2e |Xif test| -f tmp.|
|00000840| 67 6f 73 73 69 70 0a 58 | 74 68 65 6e 0a 58 20 20 |gossip.X|then.X |
|00000850| 65 63 68 6f 20 22 53 6f | 72 72 79 2c 20 67 6f 73 |echo "So|rry, gos|
|00000860| 73 69 70 20 69 73 20 62 | 65 69 6e 67 20 65 64 69 |sip is b|eing edi|
|00000870| 74 65 64 2e 22 0a 58 20 | 20 63 61 74 20 74 65 78 |ted.".X | cat tex|
|00000880| 74 2e 67 6f 73 73 69 70 | 0a 58 65 6c 73 65 0a 58 |t.gossip|.Xelse.X|
|00000890| 20 20 74 6f 75 63 68 20 | 74 6d 70 2e 67 6f 73 73 | touch |tmp.goss|
|000008a0| 69 70 0a 58 20 20 64 65 | 64 20 74 65 78 74 2e 67 |ip.X de|d text.g|
|000008b0| 6f 73 73 69 70 20 20 20 | 20 20 23 20 64 65 64 20 |ossip | # ded |
|000008c0| 69 73 20 74 68 65 20 6c | 6f 63 61 6c 20 65 64 69 |is the l|ocal edi|
|000008d0| 74 6f 72 0a 58 20 20 72 | 6d 20 74 65 6d 70 2e 67 |tor.X r|m temp.g|
|000008e0| 6f 73 73 69 70 0a 58 66 | 69 0a 58 0a 58 61 6e 64 |ossip.Xf|i.X.Xand|
|000008f0| 20 61 20 73 69 6d 69 6c | 61 72 20 6f 6e 65 20 66 | a simil|ar one f|
|00000900| 6f 72 20 74 68 65 20 68 | 65 6c 70 20 66 69 6c 65 |or the h|elp file|
|00000910| 2e 20 20 54 6f 6f 6b 20 | 6d 65 20 77 65 65 6b 73 |. Took |me weeks|
|00000920| 20 74 6f 20 67 65 74 20 | 74 68 61 74 20 72 69 67 | to get |that rig|
|00000930| 68 74 21 20 20 54 68 69 | 73 0a 58 65 76 6f 6c 76 |ht! Thi|s.Xevolv|
|00000940| 65 64 20 66 6f 72 20 61 | 20 62 69 74 2c 20 62 75 |ed for a| bit, bu|
|00000950| 74 20 64 69 64 6e 27 74 | 20 72 65 61 6c 6c 79 20 |t didn't| really |
|00000960| 67 65 74 20 64 72 61 73 | 74 69 63 61 6c 6c 79 20 |get dras|tically |
|00000970| 62 65 74 74 65 72 2e 20 | 20 41 73 20 6d 6f 72 65 |better. | As more|
|00000980| 20 67 6f 73 69 70 0a 58 | 66 69 6c 65 73 20 77 65 | gosip.X|files we|
|00000990| 72 65 20 63 72 65 61 74 | 65 64 2c 20 47 65 6f 66 |re creat|ed, Geof|
|000009a0| 66 20 52 69 6d 6d 65 72 | 20 68 61 64 20 74 68 65 |f Rimmer| had the|
|000009b0| 20 69 64 65 61 20 6f 66 | 20 6b 65 65 70 69 6e 67 | idea of| keeping|
|000009c0| 20 6a 75 73 74 20 6f 6e | 65 20 76 65 72 73 69 6f | just on|e versio|
|000009d0| 6e 20 6f 66 0a 58 74 68 | 65 20 73 6f 75 72 63 65 |n of.Xth|e source|
|000009e0| 2c 20 68 61 72 64 6c 69 | 6e 6b 65 64 20 74 6f 20 |, hardli|nked to |
|000009f0| 61 6c 6c 20 74 68 65 20 | 64 69 66 66 65 72 65 6e |all the |differen|
|00000a00| 74 20 67 6f 73 69 70 20 | 66 69 6c 65 73 2c 20 77 |t gosip |files, w|
|00000a10| 69 74 68 20 61 6c 6c 20 | 6f 63 63 75 72 72 65 6e |ith all |occurren|
|00000a20| 63 65 73 0a 58 6f 66 20 | 22 67 6f 73 73 69 70 22 |ces.Xof |"gossip"|
|00000a30| 20 72 65 70 6c 61 63 65 | 64 20 62 79 20 22 24 30 | replace|d by "$0|
|00000a40| 22 2e 20 20 48 65 20 61 | 6c 73 6f 20 74 68 6f 75 |". He a|lso thou|
|00000a50| 67 68 74 20 6f 66 20 73 | 6f 6d 65 20 6f 70 74 69 |ght of s|ome opti|
|00000a60| 6f 6e 73 20 74 6f 20 67 | 69 76 65 20 69 74 2c 20 |ons to g|ive it, |
|00000a70| 65 67 2e 0a 58 74 6f 20 | 73 65 6e 64 20 74 68 65 |eg..Xto |send the|
|00000a80| 20 66 69 6c 65 20 74 6f | 20 61 20 70 72 69 6e 74 | file to| a print|
|00000a90| 65 72 2c 20 6f 72 20 74 | 6f 20 6c 69 73 74 20 69 |er, or t|o list i|
|00000aa0| 74 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 65 64 |t rather| than ed|
|00000ab0| 69 74 20 69 74 2e 0a 58 | 0a 58 4d 69 6b 65 20 54 |it it..X|.XMike T|
|00000ac0| 61 79 6c 6f 72 20 64 65 | 73 65 72 76 65 73 20 61 |aylor de|serves a|
|00000ad0| 20 6d 65 6e 74 69 6f 6e | 20 61 73 20 62 65 69 6e | mention| as bein|
|00000ae0| 67 20 74 68 65 20 6f 6e | 65 20 74 6f 20 70 6f 6c |g the on|e to pol|
|00000af0| 69 73 68 20 75 70 20 74 | 68 69 73 20 62 61 73 69 |ish up t|his basi|
|00000b00| 63 20 69 64 65 61 0a 58 | 6f 76 65 72 20 74 68 65 |c idea.X|over the|
|00000b10| 20 6e 65 78 74 20 79 65 | 61 72 20 6f 72 20 73 6f | next ye|ar or so|
|00000b20| 2e 20 20 48 65 20 61 64 | 64 65 64 20 69 6e 20 62 |. He ad|ded in b|
|00000b30| 69 74 73 20 74 6f 20 6b | 65 65 70 20 61 20 72 65 |its to k|eep a re|
|00000b40| 63 6f 72 64 20 6f 66 20 | 77 68 6f 20 65 64 69 74 |cord of |who edit|
|00000b50| 65 64 0a 58 77 68 69 63 | 68 20 66 69 6c 65 2c 20 |ed.Xwhic|h file, |
|00000b60| 61 6e 64 20 68 65 20 77 | 72 6f 74 65 20 61 20 73 |and he w|rote a s|
|00000b70| 65 70 61 72 61 74 65 20 | 73 68 65 6c 6c 20 70 72 |eparate |shell pr|
|00000b80| 6f 67 72 61 6d 20 28 6c | 75 29 20 74 68 61 74 20 |ogram (l|u) that |
|00000b90| 77 6f 75 6c 64 20 6c 69 | 73 74 20 74 68 69 73 0a |would li|st this.|
|00000ba0| 58 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2c 20 61 6e |Xinforma|tion, an|
|00000bb0| 64 20 77 6f 75 6c 64 20 | 61 6c 73 6f 20 70 72 69 |d would |also pri|
|00000bc0| 6e 74 20 61 20 73 68 6f | 72 74 20 73 75 6d 6d 61 |nt a sho|rt summa|
|00000bd0| 72 79 20 6f 66 20 74 68 | 65 20 73 74 61 74 75 73 |ry of th|e status|
|00000be0| 20 6f 66 20 65 61 63 68 | 20 66 69 6c 65 0a 58 28 | of each| file.X(|
|00000bf0| 74 68 65 20 62 61 73 69 | 63 20 68 65 6c 70 20 61 |the basi|c help a|
|00000c00| 6e 64 20 67 6f 73 73 69 | 70 20 66 69 6c 65 73 20 |nd gossi|p files |
|00000c10| 73 6f 6f 6e 20 65 78 70 | 61 6e 64 65 64 20 74 6f |soon exp|anded to|
|00000c20| 20 69 6e 63 6c 75 64 65 | 20 65 76 65 6e 74 73 2c | include| events,|
|00000c30| 20 73 75 67 67 65 73 74 | 2c 0a 58 6a 6f 6b 65 73 | suggest|,.Xjokes|
|00000c40| 2c 20 65 74 63 2e 29 2e | 0a 58 0a 58 53 6f 6d 65 |, etc.).|.X.XSome|
|00000c50| 20 6f 66 20 74 68 65 73 | 65 20 65 61 72 6c 79 20 | of thes|e early |
|00000c60| 76 65 72 73 69 6f 6e 73 | 20 68 61 64 20 73 6f 6d |versions| had som|
|00000c70| 65 20 70 72 65 74 74 79 | 20 62 61 64 20 62 75 67 |e pretty| bad bug|
|00000c80| 73 20 69 6e 2e 20 20 4f | 66 20 70 61 72 74 69 63 |s in. O|f partic|
|00000c90| 75 6c 61 72 20 6e 6f 74 | 65 0a 58 77 61 73 20 74 |ular not|e.Xwas t|
|00000ca0| 68 65 20 74 69 6d 65 20 | 74 68 61 74 20 74 68 65 |he time |that the|
|00000cb0| 20 73 68 65 6c 6c 20 73 | 63 72 69 70 74 20 77 61 | shell s|cript wa|
|00000cc0| 73 20 6d 61 64 65 20 73 | 65 74 75 69 64 2c 20 69 |s made s|etuid, i|
|00000cd0| 6e 20 6f 72 64 65 72 20 | 74 6f 20 70 72 65 76 65 |n order |to preve|
|00000ce0| 6e 74 20 61 0a 58 63 65 | 72 74 61 69 6e 20 70 65 |nt a.Xce|rtain pe|
|00000cf0| 72 73 6f 6e 20 66 72 6f | 6d 20 64 65 6c 65 74 69 |rson fro|m deleti|
|00000d00| 6e 67 20 74 65 78 74 2e | 67 6f 73 73 69 70 2e 20 |ng text.|gossip. |
|00000d10| 20 4f 66 20 63 6f 75 72 | 73 65 2c 20 6f 6e 65 20 | Of cour|se, one |
|00000d20| 63 6f 75 6c 64 20 74 68 | 65 6e 20 73 70 61 77 6e |could th|en spawn|
|00000d30| 20 61 0a 58 73 65 74 75 | 69 64 20 73 68 65 6c 6c | a.Xsetu|id shell|
|00000d40| 20 66 72 6f 6d 20 74 68 | 65 20 65 64 69 74 6f 72 | from th|e editor|
|00000d50| 20 2d 20 49 20 68 61 64 | 20 61 62 6f 75 74 20 61 | - I had| about a|
|00000d60| 20 77 65 65 6b 20 6f 66 | 20 61 63 63 65 73 73 20 | week of| access |
|00000d70| 74 6f 20 4d 69 6b 65 27 | 73 20 63 6f 64 65 0a 58 |to Mike'|s code.X|
|00000d80| 62 65 66 6f 72 65 20 68 | 65 20 66 69 6e 61 6c 6c |before h|e finall|
|00000d90| 79 20 6e 6f 74 69 63 65 | 64 20 74 68 69 73 20 73 |y notice|d this s|
|00000da0| 65 63 75 72 69 74 79 20 | 68 6f 6c 65 2e 0a 58 0a |ecurity |hole..X.|
|00000db0| 58 41 20 6d 61 6a 6f 72 | 20 70 72 6f 62 6c 65 6d |XA major| problem|
|00000dc0| 20 61 6c 6c 20 74 68 65 | 20 74 69 6d 65 20 77 61 | all the| time wa|
|00000dd0| 73 20 74 68 61 74 20 74 | 68 65 20 6c 6f 63 6b 20 |s that t|he lock |
|00000de0| 66 69 6c 65 73 2f 64 69 | 72 65 63 74 6f 72 69 65 |files/di|rectorie|
|00000df0| 73 20 28 62 6f 74 68 20 | 77 65 72 65 0a 58 75 73 |s (both |were.Xus|
|00000e00| 65 64 20 61 74 20 76 61 | 72 69 6f 75 73 20 73 74 |ed at va|rious st|
|00000e10| 61 67 65 73 29 20 75 73 | 65 64 20 74 6f 20 65 6e |ages) us|ed to en|
|00000e20| 73 75 72 65 20 65 78 63 | 6c 75 73 69 76 65 20 61 |sure exc|lusive a|
|00000e30| 63 63 65 73 73 20 77 6f | 75 6c 64 20 66 72 65 71 |ccess wo|uld freq|
|00000e40| 75 65 6e 74 6c 79 20 6e | 6f 74 0a 58 62 65 20 64 |uently n|ot.Xbe d|
|00000e50| 65 6c 65 74 65 64 20 61 | 66 74 65 72 20 61 20 67 |eleted a|fter a g|
|00000e60| 69 76 65 6e 20 66 69 6c | 65 20 77 61 73 20 6e 6f |iven fil|e was no|
|00000e70| 20 6c 6f 6e 67 65 72 20 | 62 65 69 6e 67 20 65 64 | longer |being ed|
|00000e80| 69 74 65 64 2e 20 20 54 | 68 65 20 66 69 6e 61 6c |ited. T|he final|
|00000e90| 20 76 65 72 73 69 6f 6e | 0a 58 6f 66 20 74 68 65 | version|.Xof the|
|00000ea0| 20 73 68 65 6c 6c 20 73 | 63 72 69 70 74 20 66 6f | shell s|cript fo|
|00000eb0| 72 20 67 6f 73 69 70 20 | 69 6e 63 6c 75 64 65 64 |r gosip |included|
|00000ec0| 20 63 6f 64 65 20 74 68 | 61 74 20 77 6f 75 6c 64 | code th|at would|
|00000ed0| 20 64 65 6c 65 74 65 20 | 6c 6f 63 6b 20 66 69 6c | delete |lock fil|
|00000ee0| 65 73 20 6d 6f 72 65 0a | 58 74 68 61 6e 20 68 61 |es more.|Xthan ha|
|00000ef0| 6c 66 20 61 6e 20 68 6f | 75 72 20 6f 6c 64 2c 20 |lf an ho|ur old, |
|00000f00| 6f 6e 20 74 68 65 20 61 | 73 73 75 6d 70 74 69 6f |on the a|ssumptio|
|00000f10| 6e 20 74 68 61 74 20 74 | 68 65 69 72 20 63 6f 6e |n that t|heir con|
|00000f20| 74 69 6e 75 65 64 20 65 | 78 69 73 74 65 6e 63 65 |tinued e|xistence|
|00000f30| 20 77 61 73 20 61 0a 58 | 6d 61 6e 69 66 65 73 74 | was a.X|manifest|
|00000f40| 61 74 69 6f 6e 20 6f 66 | 20 74 68 69 73 20 70 72 |ation of| this pr|
|00000f50| 6f 62 6c 65 6d 2e 20 20 | 54 68 65 72 65 20 77 65 |oblem. |There we|
|00000f60| 72 65 20 61 6c 73 6f 20 | 61 20 66 65 77 20 6f 74 |re also |a few ot|
|00000f70| 68 65 72 20 62 75 67 73 | 20 69 6e 20 69 74 2c 20 |her bugs| in it, |
|00000f80| 61 6e 64 20 69 74 0a 58 | 77 61 73 20 71 75 69 74 |and it.X|was quit|
|00000f90| 65 20 73 6c 6f 77 20 74 | 6f 6f 2e 0a 58 0a 58 41 |e slow t|oo..X.XA|
|00000fa0| 74 20 74 68 69 73 20 70 | 6f 69 6e 74 2c 20 49 20 |t this p|oint, I |
|00000fb0| 62 65 67 61 6e 20 74 6f | 20 72 65 2d 77 72 69 74 |began to| re-writ|
|00000fc0| 65 20 74 68 65 20 77 68 | 6f 6c 65 20 74 68 69 6e |e the wh|ole thin|
|00000fd0| 67 20 69 6e 20 43 2e 20 | 20 49 20 77 61 73 20 73 |g in C. | I was s|
|00000fe0| 74 69 6c 6c 20 66 61 69 | 72 6c 79 0a 58 6e 65 77 |till fai|rly.Xnew|
|00000ff0| 20 74 6f 20 43 20 61 74 | 20 74 68 61 74 20 73 74 | to C at| that st|
|00001000| 61 67 65 20 6f 66 20 6d | 79 20 6c 69 66 65 2c 20 |age of m|y life, |
|00001010| 61 6e 64 20 74 72 69 65 | 64 20 73 69 6d 70 6c 79 |and trie|d simply|
|00001020| 20 74 6f 20 63 6f 6e 76 | 65 72 74 20 74 68 65 20 | to conv|ert the |
|00001030| 73 68 65 6c 6c 0a 58 76 | 65 72 73 69 6f 6e 20 69 |shell.Xv|ersion i|
|00001040| 6e 74 6f 20 43 2c 20 61 | 6c 6d 6f 73 74 20 6f 6e |nto C, a|lmost on|
|00001050| 20 61 20 6c 69 6e 65 20 | 66 6f 72 20 6c 69 6e 65 | a line |for line|
|00001060| 20 62 61 73 69 73 2e 20 | 20 54 68 65 20 70 72 6f | basis. | The pro|
|00001070| 67 72 61 6d 20 77 65 6e | 74 20 74 68 72 6f 75 67 |gram wen|t throug|
|00001080| 68 20 61 0a 58 6c 6f 74 | 20 6f 66 20 72 65 66 69 |h a.Xlot| of refi|
|00001090| 6e 65 6d 65 6e 74 73 2c | 20 6d 6f 73 74 20 6f 66 |nements,| most of|
|000010a0| 20 77 68 69 63 68 20 61 | 72 65 20 72 65 63 6f 72 | which a|re recor|
|000010b0| 64 65 64 20 69 6e 20 74 | 68 65 20 66 69 6c 65 20 |ded in t|he file |
|000010c0| 27 6e 6f 74 65 73 27 20 | 2d 20 61 74 0a 58 61 72 |'notes' |- at.Xar|
|000010d0| 6f 75 6e 64 20 76 65 72 | 73 69 6f 6e 20 33 31 20 |ound ver|sion 31 |
|000010e0| 49 20 68 61 64 20 74 68 | 65 20 62 72 69 6c 6c 69 |I had th|e brilli|
|000010f0| 61 6e 74 20 69 64 65 61 | 20 6f 66 20 6b 65 65 70 |ant idea| of keep|
|00001100| 69 6e 67 20 61 20 6c 69 | 73 74 20 6f 66 20 6d 79 |ing a li|st of my|
|00001110| 20 63 68 61 6e 67 65 73 | 20 69 6e 0a 58 74 68 69 | changes| in.Xthi|
|00001120| 73 20 66 69 6c 65 2e 0a | 58 0a 58 46 6f 72 20 74 |s file..|X.XFor t|
|00001130| 68 65 20 75 73 65 72 2c | 20 74 68 65 20 43 20 76 |he user,| the C v|
|00001140| 65 72 73 69 6f 6e 20 6f | 66 66 65 72 65 64 20 67 |ersion o|ffered g|
|00001150| 72 65 61 74 65 72 20 73 | 70 65 65 64 2c 20 61 6e |reater s|peed, an|
|00001160| 64 20 74 68 61 74 20 77 | 61 73 20 61 62 6f 75 74 |d that w|as about|
|00001170| 20 61 6c 6c 2e 0a 58 48 | 6f 77 65 76 65 72 2c 20 | all..XH|owever, |
|00001180| 74 68 65 20 6d 75 74 75 | 61 6c 20 65 78 63 6c 75 |the mutu|al exclu|
|00001190| 73 69 6f 6e 20 70 72 6f | 62 6c 65 6d 20 77 61 73 |sion pro|blem was|
|000011a0| 20 66 69 6e 61 6c 6c 79 | 20 73 6f 6c 76 65 64 20 | finally| solved |
|000011b0| 69 6e 20 76 65 72 73 69 | 6f 6e 20 37 33 2c 20 61 |in versi|on 73, a|
|000011c0| 6e 64 0a 58 74 68 65 72 | 65 20 77 61 73 20 6d 75 |nd.Xther|e was mu|
|000011d0| 63 68 20 72 65 6a 6f 69 | 63 69 6e 67 2e 0a 58 0a |ch rejoi|cing..X.|
|000011e0| 58 41 6e 64 72 65 61 73 | 20 50 61 67 65 6c 2e 0a |XAndreas| Pagel..|
|000011f0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00001200| 65 73 74 20 32 39 35 30 | 20 2d 6e 65 20 60 77 63 |est 2950| -ne `wc|
|00001210| 20 2d 63 20 3c 27 48 69 | 73 74 6f 72 79 27 60 3b | -c <'Hi|story'`;|
|00001220| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00001230| 68 61 72 3a 20 5c 22 27 | 48 69 73 74 6f 72 79 27 |har: \"'|History'|
|00001240| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00001250| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00001260| 23 20 65 6e 64 20 6f 66 | 20 27 48 69 73 74 6f 72 |# end of| 'Histor|
|00001270| 79 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |y'.fi.if| test -f|
|00001280| 20 27 4d 61 6b 65 66 69 | 6c 65 27 20 2d 61 20 22 | 'Makefi|le' -a "|
|00001290| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|000012a0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|000012b0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|000012c0| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|000012d0| 65 20 5c 22 27 4d 61 6b | 65 66 69 6c 65 27 5c 22 |e \"'Mak|efile'\"|
|000012e0| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|000012f0| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 4d | Extract|ing \"'M|
|00001300| 61 6b 65 66 69 6c 65 27 | 5c 22 20 5c 28 32 31 31 |akefile'|\" \(211|
|00001310| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00001320| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 4d 61 6b |d "s/^X/|/" >'Mak|
|00001330| 65 66 69 6c 65 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |efile' <|<'END_OF|
|00001340| 5f 46 49 4c 45 27 0a 58 | 23 20 4d 61 6b 65 66 69 |_FILE'.X|# Makefi|
|00001350| 6c 65 20 66 6f 72 20 67 | 6f 73 69 70 20 28 72 61 |le for g|osip (ra|
|00001360| 74 68 65 72 20 73 68 6f | 72 74 20 62 65 63 61 75 |ther sho|rt becau|
|00001370| 73 65 20 49 20 6c 6f 73 | 74 20 74 68 65 20 70 72 |se I los|t the pr|
|00001380| 65 76 69 6f 75 73 20 6f | 6e 65 29 2e 0a 58 0a 58 |evious o|ne)..X.X|
|00001390| 43 46 4c 41 47 53 3d 0a | 58 73 6f 75 72 63 65 73 |CFLAGS=.|Xsources|
|000013a0| 3d 63 61 74 2e 63 20 63 | 6f 6e 74 72 6f 6c 2e 63 |=cat.c c|ontrol.c|
|000013b0| 20 65 64 69 74 2e 63 20 | 68 69 73 74 6f 72 79 2e | edit.c |history.|
|000013c0| 63 20 6c 75 2e 63 20 6d | 61 69 6e 2e 63 20 75 74 |c lu.c m|ain.c ut|
|000013d0| 69 6c 2e 63 0a 58 0a 58 | 72 65 61 6c 3a 0a 58 09 |il.c.X.X|real:.X.|
|000013e0| 24 28 43 43 29 20 24 28 | 43 46 4c 41 47 53 29 20 |$(CC) $(|CFLAGS) |
|000013f0| 2d 44 52 45 41 4c 20 2d | 4f 20 2d 6f 20 72 65 61 |-DREAL -|O -o rea|
|00001400| 6c 20 24 28 73 6f 75 72 | 63 65 73 29 0a 58 09 72 |l $(sour|ces).X.r|
|00001410| 6d 20 2a 2e 6f 0a 58 09 | 73 74 72 69 70 20 72 65 |m *.o.X.|strip re|
|00001420| 61 6c 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |al.END_O|F_FILE.i|
|00001430| 66 20 74 65 73 74 20 32 | 31 31 20 2d 6e 65 20 60 |f test 2|11 -ne `|
|00001440| 77 63 20 2d 63 20 3c 27 | 4d 61 6b 65 66 69 6c 65 |wc -c <'|Makefile|
|00001450| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00001460| 6f 20 73 68 61 72 3a 20 | 5c 22 27 4d 61 6b 65 66 |o shar: |\"'Makef|
|00001470| 69 6c 65 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |ile'\" u|npacked |
|00001480| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00001490| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 4d 61 |.fi.# en|d of 'Ma|
|000014a0| 6b 65 66 69 6c 65 27 0a | 66 69 0a 69 66 20 74 65 |kefile'.|fi.if te|
|000014b0| 73 74 20 2d 66 20 27 52 | 45 41 44 4d 45 27 20 2d |st -f 'R|EADME' -|
|000014c0| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|000014d0| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|000014e0| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|000014f0| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00001500| 66 69 6c 65 20 5c 22 27 | 52 45 41 44 4d 45 27 5c |file \"'|README'\|
|00001510| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00001520| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00001530| 52 45 41 44 4d 45 27 5c | 22 20 5c 28 34 39 36 31 |README'\|" \(4961|
|00001540| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00001550| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 52 45 41 |d "s/^X/|/" >'REA|
|00001560| 44 4d 45 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |DME' <<'|END_OF_F|
|00001570| 49 4c 45 27 0a 58 41 50 | 53 20 47 6f 73 69 70 0a |ILE'.XAP|S Gosip.|
|00001580| 58 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 58 0a 58 47 6f |X=======|==.X.XGo|
|00001590| 73 69 70 20 69 73 20 61 | 20 70 72 6f 67 72 61 6d |sip is a| program|
|000015a0| 20 74 68 61 74 20 61 6c | 6c 6f 77 73 20 61 20 75 | that al|lows a u|
|000015b0| 73 65 72 20 63 6f 6d 6d | 75 6e 69 74 79 20 74 6f |ser comm|unity to|
|000015c0| 20 69 6e 74 65 72 63 68 | 61 6e 67 65 20 6c 69 76 | interch|ange liv|
|000015d0| 65 6c 79 20 64 65 62 61 | 74 65 2c 0a 58 66 72 69 |ely deba|te,.Xfri|
|000015e0| 65 6e 64 6c 79 20 62 61 | 6e 74 65 72 2c 20 68 65 |endly ba|nter, he|
|000015f0| 6c 70 66 75 6c 20 69 6e | 73 69 67 68 74 73 2c 20 |lpful in|sights, |
|00001600| 6f 72 20 61 6e 79 74 68 | 69 6e 67 20 65 6c 73 65 |or anyth|ing else|
|00001610| 2c 20 62 79 20 6d 65 61 | 6e 73 20 6f 66 20 65 64 |, by mea|ns of ed|
|00001620| 69 74 69 6e 67 20 61 0a | 58 67 6c 6f 62 61 6c 6c |iting a.|Xgloball|
|00001630| 79 20 77 72 69 74 61 62 | 6c 65 20 28 73 65 74 20 |y writab|le (set |
|00001640| 6f 66 29 20 66 69 6c 65 | 28 73 29 2e 20 20 47 6f |of) file|(s). Go|
|00001650| 73 69 70 20 69 74 73 65 | 6c 66 20 69 73 20 61 6c |sip itse|lf is al|
|00001660| 73 6f 20 61 20 74 65 72 | 6d 20 75 73 65 64 20 74 |so a ter|m used t|
|00001670| 6f 20 73 74 61 6e 64 0a | 58 66 6f 72 20 61 6e 79 |o stand.|Xfor any|
|00001680| 20 70 61 72 74 69 63 75 | 6c 61 72 20 66 69 6c 65 | particu|lar file|
|00001690| 27 73 20 6e 61 6d 65 2c | 20 61 20 62 69 74 20 6c |'s name,| a bit l|
|000016a0| 69 6b 65 20 74 68 65 20 | 73 68 65 6c 6c 20 6d 65 |ike the |shell me|
|000016b0| 74 61 20 63 68 61 72 61 | 63 74 65 72 20 60 60 2a |ta chara|cter ``*|
|000016c0| 27 27 2e 20 5b 31 5d 0a | 58 0a 58 54 68 65 20 66 |''. [1].|X.XThe f|
|000016d0| 69 6c 65 20 27 48 69 73 | 74 6f 72 79 27 20 67 69 |ile 'His|tory' gi|
|000016e0| 76 65 73 20 73 6f 6d 65 | 20 64 65 74 61 69 6c 73 |ves some| details|
|000016f0| 20 6f 6e 20 68 6f 77 20 | 74 68 65 20 77 68 6f 6c | on how |the whol|
|00001700| 65 20 74 68 69 6e 67 20 | 65 76 6f 6c 76 65 64 2c |e thing |evolved,|
|00001710| 20 62 75 74 20 74 68 65 | 0a 58 62 61 73 69 63 20 | but the|.Xbasic |
|00001720| 69 64 65 61 20 69 73 20 | 74 68 61 74 20 74 68 65 |idea is |that the|
|00001730| 20 63 6f 6d 70 69 6c 65 | 64 20 70 72 6f 67 72 61 | compile|d progra|
|00001740| 6d 20 69 73 20 28 68 61 | 72 64 2d 29 6c 69 6e 6b |m is (ha|rd-)link|
|00001750| 65 64 20 74 6f 20 77 68 | 61 74 65 76 65 72 20 66 |ed to wh|atever f|
|00001760| 69 6c 65 73 20 79 6f 75 | 0a 58 77 69 73 68 20 74 |iles you|.Xwish t|
|00001770| 6f 20 73 75 70 70 6f 72 | 74 2c 20 65 67 2e 20 68 |o suppor|t, eg. h|
|00001780| 65 6c 70 2e 20 20 54 68 | 65 6e 20 77 68 65 6e 20 |elp. Th|en when |
|00001790| 61 6e 79 6f 6e 65 20 72 | 75 6e 73 20 27 68 65 6c |anyone r|uns 'hel|
|000017a0| 70 27 2c 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |p', the |program |
|000017b0| 69 6e 76 6f 6b 65 73 0a | 58 61 6e 20 65 64 69 74 |invokes.|Xan edit|
|000017c0| 6f 72 20 6f 6e 20 74 68 | 65 20 66 69 6c 65 20 74 |or on th|e file t|
|000017d0| 65 78 74 2e 68 65 6c 70 | 20 77 68 69 6c 65 20 65 |ext.help| while e|
|000017e0| 6e 73 75 72 69 6e 67 20 | 65 78 63 6c 75 73 69 76 |nsuring |exclusiv|
|000017f0| 65 20 61 63 63 65 73 73 | 20 74 6f 20 74 68 61 74 |e access| to that|
|00001800| 20 66 69 6c 65 2e 0a 58 | 0a 58 4f 62 76 69 6f 75 | file..X|.XObviou|
|00001810| 73 6c 79 20 74 68 65 20 | 62 69 6e 61 72 69 65 73 |sly the |binaries|
|00001820| 20 6e 65 65 64 20 74 6f | 20 62 65 20 6b 65 70 74 | need to| be kept|
|00001830| 20 69 6e 20 61 20 64 69 | 72 65 63 74 6f 72 79 20 | in a di|rectory |
|00001840| 77 68 69 63 68 20 69 73 | 20 69 6e 20 65 76 65 72 |which is| in ever|
|00001850| 79 0a 58 70 6f 74 65 6e | 74 69 61 6c 20 75 73 65 |y.Xpoten|tial use|
|00001860| 72 27 73 20 70 61 74 68 | 2e 20 20 48 65 72 65 20 |r's path|. Here |
|00001870| 61 74 20 57 61 72 77 69 | 63 6b 2c 20 77 65 20 68 |at Warwi|ck, we h|
|00001880| 61 76 65 20 61 20 73 79 | 73 74 65 6d 20 63 61 6c |ave a sy|stem cal|
|00001890| 6c 65 64 20 27 4e 65 77 | 77 6f 72 64 73 2b 27 0a |led 'New|words+'.|
|000018a0| 58 77 68 69 63 68 20 70 | 72 6f 76 69 64 65 73 20 |Xwhich p|rovides |
|000018b0| 6e 6f 74 20 6f 6e 6c 79 | 20 67 6f 73 69 70 2c 20 |not only| gosip, |
|000018c0| 62 75 74 20 71 75 69 74 | 65 20 61 20 66 65 77 20 |but quit|e a few |
|000018d0| 6f 74 68 65 72 20 65 78 | 74 72 61 20 63 6f 6d 6d |other ex|tra comm|
|000018e0| 61 6e 64 73 20 77 72 69 | 74 74 65 6e 20 62 79 0a |ands wri|tten by.|
|000018f0| 58 74 68 65 20 75 73 65 | 72 73 20 66 6f 72 20 74 |Xthe use|rs for t|
|00001900| 68 65 20 75 73 65 72 20 | 63 6f 6d 6d 75 6e 69 74 |he user |communit|
|00001910| 79 2e 20 20 49 74 20 62 | 61 73 69 63 61 6c 6c 79 |y. It b|asically|
|00001920| 20 77 6f 72 6b 73 20 62 | 79 20 70 75 74 74 69 6e | works b|y puttin|
|00001930| 67 20 61 0a 58 73 75 62 | 64 69 72 65 63 74 6f 72 |g a.Xsub|director|
|00001940| 79 20 6f 66 20 74 68 65 | 20 6e 65 77 77 6f 72 64 |y of the| newword|
|00001950| 73 2b 20 61 64 6d 69 6e | 69 73 74 72 61 74 6f 72 |s+ admin|istrator|
|00001960| 20 69 6e 20 65 76 65 72 | 79 20 73 75 62 73 63 72 | in ever|y subscr|
|00001970| 69 62 65 72 27 73 20 70 | 61 74 68 2e 0a 58 0a 58 |iber's p|ath..X.X|
|00001980| 43 6f 6e 74 65 6e 74 73 | 0a 58 3d 3d 3d 3d 3d 3d |Contents|.X======|
|00001990| 3d 3d 0a 58 0a 58 49 6e | 20 74 68 65 20 73 68 61 |==.X.XIn| the sha|
|000019a0| 72 20 66 69 6c 65 20 79 | 6f 75 20 73 68 6f 75 6c |r file y|ou shoul|
|000019b0| 64 20 66 69 6e 64 20 74 | 68 65 20 73 6f 75 72 63 |d find t|he sourc|
|000019c0| 65 20 66 69 6c 65 73 20 | 65 64 69 74 2e 63 20 6d |e files |edit.c m|
|000019d0| 61 69 6e 2e 63 20 75 74 | 69 6c 2e 63 20 6c 75 2e |ain.c ut|il.c lu.|
|000019e0| 63 0a 58 68 69 73 74 6f | 72 79 2e 63 20 63 61 74 |c.Xhisto|ry.c cat|
|000019f0| 2e 63 20 63 6f 6e 74 72 | 6f 6c 2e 63 20 77 69 74 |.c contr|ol.c wit|
|00001a00| 68 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |h corres|ponding |
|00001a10| 68 65 61 64 65 72 20 66 | 69 6c 65 73 20 70 6c 75 |header f|iles plu|
|00001a20| 73 20 67 6c 6f 62 61 6c | 2e 68 2e 20 20 44 77 0a |s global|.h. Dw.|
|00001a30| 58 69 73 20 61 20 73 68 | 65 6c 6c 20 73 63 72 69 |Xis a sh|ell scri|
|00001a40| 70 74 20 74 68 61 74 20 | 64 69 73 70 6c 61 79 73 |pt that |displays|
|00001a50| 20 63 68 61 6e 67 65 73 | 20 69 6e 20 67 6f 73 69 | changes| in gosi|
|00001a60| 70 20 66 69 6c 65 73 20 | 5b 33 5d 2c 20 61 6e 64 |p files |[3], and|
|00001a70| 20 66 69 6e 61 6c 6c 79 | 20 73 65 74 75 70 0a 58 | finally| setup.X|
|00001a80| 69 73 20 61 20 73 68 65 | 6c 6c 20 70 72 6f 67 72 |is a she|ll progr|
|00001a90| 61 6d 20 74 68 61 74 20 | 69 6e 73 74 61 6c 6c 73 |am that |installs|
|00001aa0| 20 67 6f 73 69 70 20 66 | 69 6c 65 73 20 28 6d 6f | gosip f|iles (mo|
|00001ab0| 72 65 20 62 65 6c 6f 77 | 29 2e 0a 58 0a 58 49 6e |re below|)..X.XIn|
|00001ac0| 20 61 64 64 69 74 69 6f | 6e 2c 20 74 68 65 20 66 | additio|n, the f|
|00001ad0| 6f 6c 6c 6f 77 69 6e 67 | 20 6d 61 6e 75 61 6c 20 |ollowing| manual |
|00001ae0| 70 61 67 65 73 20 61 72 | 65 20 73 75 70 70 6c 69 |pages ar|e suppli|
|00001af0| 65 64 3a 20 61 6c 6c 67 | 6f 73 73 2e 31 2c 20 6c |ed: allg|oss.1, l|
|00001b00| 75 2e 31 2c 20 64 77 2e | 31 2c 0a 58 67 6f 73 69 |u.1, dw.|1,.Xgosi|
|00001b10| 70 2e 31 2e 20 20 4f 74 | 68 65 72 20 64 6f 63 75 |p.1. Ot|her docu|
|00001b20| 6d 65 6e 74 61 74 69 6f | 6e 20 70 72 6f 76 69 64 |mentatio|n provid|
|00001b30| 65 64 3a 20 52 45 41 44 | 4d 45 20 79 6f 75 20 61 |ed: READ|ME you a|
|00001b40| 6c 72 65 61 64 79 20 6b | 6e 6f 77 20 61 62 6f 75 |lready k|now abou|
|00001b50| 74 2c 20 48 69 73 74 6f | 72 79 0a 58 61 73 20 6d |t, Histo|ry.Xas m|
|00001b60| 65 6e 74 69 6f 6e 65 64 | 20 61 62 6f 76 65 20 61 |entioned| above a|
|00001b70| 6e 64 20 6e 6f 74 65 73 | 2c 20 77 68 69 63 68 20 |nd notes|, which |
|00001b80| 69 73 20 6d 61 69 6e 6c | 79 20 61 20 72 65 63 6f |is mainl|y a reco|
|00001b90| 72 64 20 6f 66 20 63 68 | 61 6e 67 65 73 20 62 79 |rd of ch|anges by|
|00001ba0| 20 76 65 72 73 69 6f 6e | 0a 58 6e 75 6d 62 65 72 | version|.Xnumber|
|00001bb0| 2e 0a 58 0a 58 43 75 73 | 74 6f 6d 69 73 61 74 69 |..X.XCus|tomisati|
|00001bc0| 6f 6e 0a 58 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |on.X====|========|
|00001bd0| 3d 0a 58 0a 58 59 6f 75 | 20 77 69 6c 6c 20 6e 65 |=.X.XYou| will ne|
|00001be0| 65 64 20 74 6f 20 61 6c | 74 65 72 20 73 6f 6d 65 |ed to al|ter some|
|00001bf0| 20 66 69 6c 65 20 61 6e | 64 20 64 69 72 65 63 74 | file an|d direct|
|00001c00| 6f 72 79 20 6e 61 6d 65 | 73 20 61 6e 64 20 6f 74 |ory name|s and ot|
|00001c10| 68 65 72 20 23 64 65 66 | 69 6e 65 27 73 3a 0a 58 |her #def|ine's:.X|
|00001c20| 0a 58 28 31 29 20 20 49 | 6e 20 67 6c 6f 62 61 6c |.X(1) I|n global|
|00001c30| 2e 68 2c 20 63 68 61 6e | 67 65 20 44 41 54 41 5f |.h, chan|ge DATA_|
|00001c40| 46 49 4c 45 5f 44 49 52 | 45 43 54 4f 52 59 20 74 |FILE_DIR|ECTORY t|
|00001c50| 6f 20 61 20 64 69 72 65 | 63 74 6f 72 79 20 77 68 |o a dire|ctory wh|
|00001c60| 69 63 68 20 79 6f 75 20 | 5b 77 69 6c 6c 5d 20 0a |ich you |[will] .|
|00001c70| 58 20 20 20 20 20 6f 77 | 6e 20 61 6e 64 20 77 68 |X ow|n and wh|
|00001c80| 69 63 68 20 63 61 6e 20 | 62 65 20 61 63 63 65 73 |ich can |be acces|
|00001c90| 73 65 64 20 62 79 20 61 | 6c 6c 20 70 6f 74 65 6e |sed by a|ll poten|
|00001ca0| 74 69 61 6c 20 67 6f 73 | 69 70 20 75 73 65 72 73 |tial gos|ip users|
|00001cb0| 2e 0a 58 0a 58 28 32 29 | 20 20 43 68 61 6e 67 65 |..X.X(2)| Change|
|00001cc0| 20 53 45 43 52 45 54 5f | 44 49 52 20 74 6f 20 73 | SECRET_|DIR to s|
|00001cd0| 6f 6d 65 74 68 69 6e 67 | 20 6e 6f 74 20 65 61 73 |omething| not eas|
|00001ce0| 69 6c 79 20 67 75 65 73 | 73 65 64 2e 0a 58 0a 58 |ily gues|sed..X.X|
|00001cf0| 28 33 29 20 20 49 6e 20 | 6d 61 69 6e 2e 63 2c 20 |(3) In |main.c, |
|00001d00| 66 75 6e 63 74 69 6f 6e | 20 69 6e 69 74 5f 66 69 |function| init_fi|
|00001d10| 6c 65 5f 6e 61 6d 65 73 | 28 29 2c 20 63 68 61 6e |le_names|(), chan|
|00001d20| 67 65 20 74 68 65 20 6e | 61 6d 65 73 20 6f 66 20 |ge the n|ames of |
|00001d30| 68 69 73 74 6f 72 79 20 | 61 6e 64 0a 58 20 20 20 |history |and.X |
|00001d40| 20 20 6c 61 73 74 20 66 | 69 6c 65 73 20 28 61 6e | last f|iles (an|
|00001d50| 64 20 6c 6f 63 6b 20 66 | 69 6c 65 73 20 69 66 20 |d lock f|iles if |
|00001d60| 75 73 65 64 29 2e 20 20 | 54 68 65 20 68 69 73 74 |used). |The hist|
|00001d70| 6f 72 79 20 61 6e 64 20 | 6c 61 73 74 20 66 69 6c |ory and |last fil|
|00001d80| 65 73 20 73 68 6f 75 6c | 64 0a 58 20 20 20 20 20 |es shoul|d.X |
|00001d90| 6e 6f 74 20 62 65 20 65 | 64 69 74 65 64 20 64 69 |not be e|dited di|
|00001da0| 72 65 63 74 6c 79 20 62 | 79 20 61 6e 79 6f 6e 65 |rectly b|y anyone|
|00001db0| 3a 20 67 69 76 69 6e 67 | 20 74 68 65 6d 20 75 6e |: giving| them un|
|00001dc0| 75 73 75 61 6c 20 6e 61 | 6d 65 73 20 69 6e 20 61 |usual na|mes in a|
|00001dd0| 6e 0a 58 20 20 20 20 20 | 75 6e 72 65 61 64 61 62 |n.X |unreadab|
|00001de0| 6c 65 20 64 69 72 65 63 | 74 6f 72 79 20 6d 61 6b |le direc|tory mak|
|00001df0| 65 73 20 74 68 69 73 20 | 6c 65 73 73 20 6c 69 6b |es this |less lik|
|00001e00| 65 6c 79 20 74 6f 20 6f | 63 63 75 72 2e 0a 58 0a |ely to o|ccur..X.|
|00001e10| 58 28 34 29 20 20 49 6e | 20 73 65 74 75 70 2c 20 |X(4) In| setup, |
|00001e20| 63 68 61 6e 67 65 20 74 | 68 65 20 64 65 66 69 6e |change t|he defin|
|00001e30| 69 74 69 6f 6e 73 20 6f | 66 20 74 68 65 20 61 62 |itions o|f the ab|
|00001e40| 6f 76 65 20 61 63 63 6f | 72 64 69 6e 67 6c 79 2e |ove acco|rdingly.|
|00001e50| 20 0a 58 0a 58 28 35 29 | 20 20 49 6e 20 63 6f 6e | .X.X(5)| In con|
|00001e60| 74 72 6f 6c 2e 68 2c 20 | 79 6f 75 20 6d 69 67 68 |trol.h, |you migh|
|00001e70| 74 20 6c 69 6b 65 20 74 | 6f 20 73 70 65 63 69 66 |t like t|o specif|
|00001e80| 79 20 79 6f 75 72 73 65 | 6c 66 20 61 73 20 74 68 |y yourse|lf as th|
|00001e90| 65 20 53 55 50 45 52 5f | 55 53 45 52 2e 0a 58 20 |e SUPER_|USER..X |
|00001ea0| 20 20 20 20 53 55 50 45 | 52 5f 55 53 45 52 20 69 | SUPE|R_USER i|
|00001eb0| 73 20 74 68 65 20 6f 6e | 6c 79 20 6f 6e 65 20 77 |s the on|ly one w|
|00001ec0| 68 6f 20 63 61 6e 20 75 | 73 65 20 74 68 65 20 2d |ho can u|se the -|
|00001ed0| 23 20 61 6e 64 20 2d 40 | 20 6f 70 74 69 6f 6e 73 |# and -@| options|
|00001ee0| 2c 20 77 68 69 63 68 20 | 61 72 65 0a 58 20 20 20 |, which |are.X |
|00001ef0| 20 20 75 73 65 64 20 74 | 6f 20 64 65 6e 79 20 6f | used t|o deny o|
|00001f00| 72 20 72 65 73 74 6f 72 | 65 20 61 63 63 65 73 73 |r restor|e access|
|00001f10| 20 74 6f 20 67 6f 73 69 | 70 20 28 6e 6f 72 6d 61 | to gosi|p (norma|
|00001f20| 6c 6c 79 20 75 73 65 64 | 20 77 68 65 6e 20 61 20 |lly used| when a |
|00001f30| 6e 65 77 20 76 65 72 73 | 69 6f 6e 0a 58 20 20 20 |new vers|ion.X |
|00001f40| 20 20 69 73 20 62 65 69 | 6e 67 20 69 6e 73 74 61 | is bei|ng insta|
|00001f50| 6c 6c 65 64 29 2e 20 20 | 59 6f 75 20 6d 69 67 68 |lled). |You migh|
|00001f60| 74 20 6c 69 6b 65 20 74 | 6f 20 63 68 61 6e 67 65 |t like t|o change|
|00001f70| 20 44 4f 57 4e 5f 46 49 | 4c 45 20 61 73 20 77 65 | DOWN_FI|LE as we|
|00001f80| 6c 6c 2e 0a 58 0a 58 28 | 36 29 20 20 49 6e 20 67 |ll..X.X(|6) In g|
|00001f90| 6c 6f 62 61 6c 2e 68 2c | 20 61 6c 74 65 72 20 4d |lobal.h,| alter M|
|00001fa0| 41 58 5f 46 49 4c 45 5f | 4c 45 4e 47 54 48 20 74 |AX_FILE_|LENGTH t|
|00001fb0| 6f 20 72 65 66 6c 65 63 | 74 20 79 6f 75 72 20 63 |o reflec|t your c|
|00001fc0| 68 6f 69 63 65 20 6f 66 | 20 66 69 6c 65 20 6e 61 |hoice of| file na|
|00001fd0| 6d 65 73 2e 0a 58 0a 58 | 46 6f 72 20 71 75 69 74 |mes..X.X|For quit|
|00001fe0| 65 20 61 20 77 68 69 6c | 65 20 6c 6f 63 6b 66 28 |e a whil|e lockf(|
|00001ff0| 29 20 64 69 64 20 6e 6f | 74 20 77 6f 72 6b 20 6f |) did no|t work o|
|00002000| 6e 20 6f 75 72 20 73 79 | 73 74 65 6d 2e 20 20 49 |n our sy|stem. I|
|00002010| 20 68 61 76 65 20 6c 65 | 66 74 20 69 6e 20 74 68 | have le|ft in th|
|00002020| 65 0a 58 70 72 65 76 69 | 6f 75 73 20 6c 6f 63 6b |e.Xprevi|ous lock|
|00002030| 69 6e 67 20 63 6f 64 65 | 2c 20 62 61 73 65 64 20 |ing code|, based |
|00002040| 6f 6e 20 6c 6f 63 6b 20 | 66 69 6c 65 73 20 61 6e |on lock |files an|
|00002050| 64 20 66 6c 6f 63 6b 28 | 29 2c 20 77 68 69 63 68 |d flock(|), which|
|00002060| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 69 66 0a | you can| use if.|
|00002070| 58 79 6f 75 72 20 6c 6f | 63 6b 66 28 29 20 69 73 |Xyour lo|ckf() is|
|00002080| 20 62 72 6f 6b 65 6e 3a | 20 61 64 64 20 27 43 46 | broken:| add 'CF|
|00002090| 4c 41 47 53 3d 2d 44 4c | 4f 43 4b 46 5f 42 52 4f |LAGS=-DL|OCKF_BRO|
|000020a0| 4b 45 4e 27 20 74 6f 20 | 74 68 65 20 6d 61 6b 65 |KEN' to |the make|
|000020b0| 66 69 6c 65 2c 20 61 6e | 64 20 61 6c 74 65 72 0a |file, an|d alter.|
|000020c0| 58 27 73 65 74 75 70 27 | 20 73 6f 20 74 68 61 74 |X'setup'| so that|
|000020d0| 20 44 41 54 41 5f 46 49 | 4c 45 5f 44 49 52 45 43 | DATA_FI|LE_DIREC|
|000020e0| 54 4f 52 59 20 68 61 73 | 20 67 6c 6f 62 61 6c 20 |TORY has| global |
|000020f0| 77 72 69 74 65 20 70 65 | 72 6d 69 73 73 69 6f 6e |write pe|rmission|
|00002100| 2e 20 20 5b 32 5d 0a 58 | 0a 58 54 68 65 20 6d 61 |. [2].X|.XThe ma|
|00002110| 6e 75 61 6c 20 70 61 67 | 65 73 20 77 69 6c 6c 20 |nual pag|es will |
|00002120| 6e 65 65 64 20 61 20 66 | 65 77 20 6d 69 6e 6f 72 |need a f|ew minor|
|00002130| 20 63 68 61 6e 67 65 73 | 3a 20 79 6f 75 20 77 69 | changes|: you wi|
|00002140| 6c 6c 20 6e 65 65 64 20 | 74 6f 20 61 6c 74 65 72 |ll need |to alter|
|00002150| 20 74 68 65 0a 58 6c 69 | 73 74 20 6f 66 20 67 6f | the.Xli|st of go|
|00002160| 73 69 70 20 66 69 6c 65 | 73 20 74 6f 20 73 70 65 |sip file|s to spe|
|00002170| 63 69 66 79 20 74 68 6f | 73 65 20 79 6f 75 20 63 |cify tho|se you c|
|00002180| 68 6f 6f 73 65 20 74 6f | 20 70 72 6f 76 69 64 65 |hoose to| provide|
|00002190| 2e 0a 58 0a 58 4f 66 20 | 63 6f 75 72 73 65 2c 20 |..X.XOf |course, |
|000021a0| 74 68 65 79 20 6d 61 79 | 20 62 65 20 6c 6f 74 73 |they may| be lots|
|000021b0| 20 6f 66 20 70 6f 72 74 | 61 62 69 6c 69 74 79 20 | of port|ability |
|000021c0| 70 72 6f 62 6c 65 6d 73 | 2e 20 20 49 20 64 6f 6e |problems|. I don|
|000021d0| 27 74 20 6b 6e 6f 77 20 | 77 68 69 63 68 0a 58 73 |'t know |which.Xs|
|000021e0| 79 73 74 65 6d 20 63 61 | 6c 6c 73 20 61 72 65 20 |ystem ca|lls are |
|000021f0| 73 70 65 63 69 66 69 63 | 20 74 6f 20 74 68 69 73 |specific| to this|
|00002200| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 55 4e 49 58 | version| of UNIX|
|00002210| 20 28 53 75 6e 4f 53 20 | 34 2e 30 2e 31 29 2e 0a | (SunOS |4.0.1)..|
|00002220| 58 0a 58 49 6e 73 74 61 | 6c 6c 61 74 69 6f 6e 0a |X.XInsta|llation.|
|00002230| 58 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 58 0a |X=======|=====.X.|
|00002240| 58 54 6f 20 69 6e 73 74 | 61 6c 6c 20 67 6f 73 69 |XTo inst|all gosi|
|00002250| 70 2c 20 72 75 6e 20 22 | 73 65 74 75 70 20 67 6f |p, run "|setup go|
|00002260| 73 69 70 22 2c 20 77 68 | 65 72 65 20 67 6f 73 69 |sip", wh|ere gosi|
|00002270| 70 20 73 68 6f 75 6c 64 | 20 62 65 20 72 65 70 6c |p should| be repl|
|00002280| 61 63 65 64 20 77 69 74 | 68 0a 58 77 68 61 74 65 |aced wit|h.Xwhate|
|00002290| 76 65 72 20 66 69 6c 65 | 73 20 79 6f 75 20 77 69 |ver file|s you wi|
|000022a0| 73 68 20 74 6f 20 69 6e | 73 74 61 6c 6c 2e 20 20 |sh to in|stall. |
|000022b0| 53 65 74 75 70 20 77 69 | 6c 6c 20 63 72 65 61 74 |Setup wi|ll creat|
|000022c0| 65 20 74 68 65 20 64 69 | 72 65 63 74 6f 72 79 20 |e the di|rectory |
|000022d0| 66 6f 72 20 64 61 74 61 | 0a 58 66 69 6c 65 73 20 |for data|.Xfiles |
|000022e0| 69 66 20 69 74 20 64 6f | 65 73 6e 27 74 20 61 6c |if it do|esn't al|
|000022f0| 72 65 61 64 79 20 65 78 | 69 73 74 20 2d 20 6e 6f |ready ex|ist - no|
|00002300| 74 65 20 74 68 61 74 20 | 69 74 20 6d 75 73 74 20 |te that |it must |
|00002310| 62 65 20 6f 77 6e 65 64 | 20 62 79 20 79 6f 75 2e |be owned| by you.|
|00002320| 20 20 54 68 65 0a 58 64 | 69 72 65 63 74 6f 72 79 | The.Xd|irectory|
|00002330| 20 66 6f 72 20 64 61 74 | 61 20 66 69 6c 65 73 20 | for dat|a files |
|00002340| 73 68 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 75 73 |should n|ot be us|
|00002350| 65 64 20 74 6f 20 6b 65 | 65 70 20 61 6e 79 74 68 |ed to ke|ep anyth|
|00002360| 69 6e 67 20 6f 74 68 65 | 72 20 74 68 61 6e 20 77 |ing othe|r than w|
|00002370| 68 61 74 0a 58 67 6f 73 | 69 70 20 70 75 74 73 20 |hat.Xgos|ip puts |
|00002380| 74 68 65 72 65 2e 0a 58 | 0a 58 50 72 6f 62 6c 65 |there..X|.XProble|
|00002390| 6d 73 0a 58 3d 3d 3d 3d | 3d 3d 3d 3d 0a 58 0a 58 |ms.X====|====.X.X|
|000023a0| 41 73 20 49 27 76 65 20 | 61 6c 72 65 61 64 79 20 |As I've |already |
|000023b0| 73 61 69 64 2c 20 49 20 | 72 65 61 6c 6c 79 20 64 |said, I |really d|
|000023c0| 6f 6e 27 74 20 6b 6e 6f | 77 20 77 68 61 74 20 73 |on't kno|w what s|
|000023d0| 79 73 74 65 6d 20 63 61 | 6c 6c 73 20 77 69 6c 6c |ystem ca|lls will|
|000023e0| 20 6f 72 20 77 69 6c 6c | 20 6e 6f 74 0a 58 77 6f | or will| not.Xwo|
|000023f0| 72 6b 20 6f 6e 20 79 6f | 75 72 20 73 79 73 74 65 |rk on yo|ur syste|
|00002400| 6d 2e 20 20 49 20 77 69 | 6c 6c 20 62 65 20 70 6c |m. I wi|ll be pl|
|00002410| 65 61 73 65 64 20 74 6f | 20 72 65 63 65 69 76 65 |eased to| receive|
|00002420| 20 62 75 67 20 72 65 70 | 6f 72 74 73 20 6f 72 20 | bug rep|orts or |
|00002430| 73 75 67 67 65 73 74 69 | 6f 6e 73 0a 58 66 6f 72 |suggesti|ons.Xfor|
|00002440| 20 6d 6f 64 69 66 69 63 | 61 74 69 6f 6e 73 20 6d | modific|ations m|
|00002450| 61 69 6c 65 64 20 74 6f | 20 27 6d 61 75 68 6b 40 |ailed to| 'mauhk@|
|00002460| 75 6b 2e 61 63 2e 77 61 | 72 77 69 63 6b 27 2e 20 |uk.ac.wa|rwick'. |
|00002470| 20 48 6f 77 65 76 65 72 | 2c 20 73 69 6e 63 65 20 | However|, since |
|00002480| 74 65 72 6d 20 65 6e 64 | 73 0a 58 6f 6e 20 31 20 |term end|s.Xon 1 |
|00002490| 4a 75 6c 79 20 31 39 38 | 39 20 61 6e 64 20 49 20 |July 198|9 and I |
|000024a0| 77 69 6c 6c 20 67 6f 20 | 68 6f 6d 65 20 74 68 65 |will go |home the|
|000024b0| 6e 2c 20 49 20 77 69 6c | 6c 20 6e 6f 74 20 62 65 |n, I wil|l not be|
|000024c0| 20 61 62 6c 65 20 74 6f | 20 72 65 70 6c 79 20 74 | able to| reply t|
|000024d0| 6f 20 6d 61 69 6c 0a 58 | 72 65 63 65 69 76 65 64 |o mail.X|received|
|000024e0| 20 61 66 74 65 72 20 74 | 68 61 74 20 64 61 74 65 | after t|hat date|
|000024f0| 2e 20 20 49 20 64 6f 2c | 20 74 68 6f 75 67 68 2c |. I do,| though,|
|00002500| 20 65 78 70 65 63 74 20 | 74 6f 20 63 6f 6d 65 20 | expect |to come |
|00002510| 62 61 63 6b 20 66 6f 72 | 20 61 20 64 61 79 20 61 |back for| a day a|
|00002520| 74 20 73 6f 6d 65 0a 58 | 70 6f 69 6e 74 20 64 75 |t some.X|point du|
|00002530| 72 69 6e 67 20 74 68 65 | 20 73 75 6d 6d 65 72 20 |ring the| summer |
|00002540| 73 6f 20 49 20 77 69 6c | 6c 20 73 74 69 6c 6c 20 |so I wil|l still |
|00002550| 73 65 65 20 61 6e 79 20 | 6d 61 69 6c 20 73 65 6e |see any |mail sen|
|00002560| 74 2e 0a 58 0a 58 41 6e | 64 72 65 61 73 20 50 61 |t..X.XAn|dreas Pa|
|00002570| 67 65 6c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |gel | |
|00002580| 20 20 20 20 20 20 20 20 | 20 20 20 4d 61 67 69 63 | | Magic|
|00002590| 69 61 6e 2c 20 50 72 6f | 67 72 61 6d 6d 65 72 20 |ian, Pro|grammer |
|000025a0| 61 6e 64 20 4d 61 74 68 | 65 6d 61 74 69 63 69 61 |and Math|ematicia|
|000025b0| 6e 0a 58 55 55 43 50 3a | 20 20 20 2e 2e 2e 21 6d |n.XUUCP:| ...!m|
|000025c0| 63 76 61 78 21 75 6b 63 | 21 77 61 72 77 69 63 6b |cvax!ukc|!warwick|
|000025d0| 21 6d 61 75 68 6b 20 20 | 20 20 20 20 20 20 20 20 |!mauhk | |
|000025e0| 20 20 20 20 20 20 20 20 | 20 55 6e 69 76 65 72 73 | | Univers|
|000025f0| 69 74 79 20 6f 66 20 57 | 61 72 77 69 63 6b 0a 58 |ity of W|arwick.X|
|00002600| 4a 41 4e 45 54 3a 20 20 | 6d 61 75 68 6b 40 75 6b |JANET: |mauhk@uk|
|00002610| 2e 61 63 2e 77 61 72 77 | 69 63 6b 20 20 20 20 20 |.ac.warw|ick |
|00002620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002630| 20 20 20 20 20 20 43 6f | 76 65 6e 74 72 79 0a 58 | Co|ventry.X|
|00002640| 41 52 50 41 3a 20 20 20 | 6d 61 75 68 6b 25 63 75 |ARPA: |mauhk%cu|
|00002650| 2e 77 61 72 77 69 63 6b | 40 6e 73 73 2e 63 73 2e |.warwick|@nss.cs.|
|00002660| 75 63 6c 2e 61 63 2e 75 | 6b 20 20 20 20 20 20 20 |ucl.ac.u|k |
|00002670| 20 20 20 20 20 20 47 72 | 65 61 74 20 42 72 69 74 | Gr|eat Brit|
|00002680| 61 69 6e 0a 58 0a 58 0a | 58 46 6f 6f 74 6e 6f 74 |ain.X.X.|XFootnot|
|00002690| 65 73 0a 58 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 58 0a |es.X====|=====.X.|
|000026a0| 58 5b 31 5d 20 20 47 6f | 73 69 70 20 66 69 6c 65 |X[1] Go|sip file|
|000026b0| 73 20 75 73 65 64 20 74 | 6f 20 62 65 20 6b 6e 6f |s used t|o be kno|
|000026c0| 77 6e 20 61 73 20 22 74 | 68 65 20 67 6f 73 73 69 |wn as "t|he gossi|
|000026d0| 70 20 66 69 6c 65 73 22 | 20 69 6e 20 74 68 65 20 |p files"| in the |
|000026e0| 6d 61 6e 75 61 6c 20 70 | 61 67 65 73 0a 58 20 20 |manual p|ages.X |
|000026f0| 20 20 20 61 6e 64 20 63 | 6f 6c 6c 6f 71 75 69 61 | and c|olloquia|
|00002700| 6c 6c 79 2e 20 20 57 68 | 65 6e 20 49 20 72 65 77 |lly. Wh|en I rew|
|00002710| 72 6f 74 65 20 67 6f 73 | 69 70 20 69 6e 20 43 2c |rote gos|ip in C,|
|00002720| 20 49 20 6e 65 65 64 65 | 64 20 74 6f 20 63 6f 6d | I neede|d to com|
|00002730| 70 69 6c 65 20 74 65 73 | 74 0a 58 20 20 20 20 20 |pile tes|t.X |
|00002740| 76 65 72 73 69 6f 6e 73 | 2e 20 20 4f 62 76 69 6f |versions|. Obvio|
|00002750| 75 73 6c 79 20 49 20 6e | 65 65 64 65 64 20 61 20 |usly I n|eeded a |
|00002760| 6e 61 6d 65 20 6f 74 68 | 65 72 20 74 68 61 6e 20 |name oth|er than |
|00002770| 67 6f 73 73 69 70 20 62 | 79 20 77 68 69 63 68 20 |gossip b|y which |
|00002780| 74 6f 20 63 61 6c 6c 0a | 58 20 20 20 20 20 74 68 |to call.|X th|
|00002790| 65 20 62 69 6e 61 72 79 | 2c 20 73 6f 20 49 20 63 |e binary|, so I c|
|000027a0| 68 6f 73 65 20 67 6f 73 | 69 70 2e 20 20 46 72 6f |hose gos|ip. Fro|
|000027b0| 6d 20 74 68 69 73 2c 20 | 74 68 65 20 63 75 72 72 |m this, |the curr|
|000027c0| 65 6e 74 20 75 73 61 67 | 65 20 6f 66 20 67 6f 73 |ent usag|e of gos|
|000027d0| 69 70 0a 58 20 20 20 20 | 20 61 72 6f 73 65 2e 0a |ip.X | arose..|
|000027e0| 58 0a 58 5b 32 5d 20 20 | 49 27 6d 20 6e 6f 74 20 |X.X[2] |I'm not |
|000027f0| 73 75 72 65 20 77 68 65 | 74 68 65 72 20 74 68 69 |sure whe|ther thi|
|00002800| 73 20 77 69 6c 6c 20 73 | 75 66 66 69 63 65 2e 20 |s will s|uffice. |
|00002810| 20 49 20 68 61 76 65 6e | 27 74 20 67 6f 74 20 74 | I haven|'t got t|
|00002820| 69 6d 65 20 74 6f 20 74 | 65 73 74 20 74 68 61 74 |ime to t|est that|
|00002830| 0a 58 20 20 20 20 20 61 | 73 70 65 63 74 2c 20 73 |.X a|spect, s|
|00002840| 69 6e 63 65 20 49 27 6d | 20 72 75 6e 6e 69 6e 67 |ince I'm| running|
|00002850| 20 6f 75 74 20 6f 66 20 | 74 69 6d 65 20 69 6e 20 | out of |time in |
|00002860| 77 68 69 63 68 20 74 6f | 20 70 6f 73 74 20 74 68 |which to| post th|
|00002870| 65 20 70 72 6f 67 72 61 | 6d 2e 0a 58 0a 58 5b 33 |e progra|m..X.X[3|
|00002880| 5d 20 20 44 77 27 73 20 | 6e 61 6d 65 20 63 6f 6d |] Dw's |name com|
|00002890| 65 73 20 66 72 6f 6d 20 | 27 64 77 20 67 6f 73 69 |es from |'dw gosi|
|000028a0| 70 27 20 6d 65 61 6e 69 | 6e 67 20 22 64 65 61 6c |p' meani|ng "deal|
|000028b0| 20 77 69 74 68 20 67 6f | 73 69 70 22 2e 20 20 49 | with go|sip". I|
|000028c0| 20 75 6e 64 65 72 73 74 | 61 6e 64 0a 58 20 20 20 | underst|and.X |
|000028d0| 20 20 74 68 61 74 20 42 | 6f 75 72 6e 65 20 73 68 | that B|ourne sh|
|000028e0| 65 6c 6c 20 66 75 6e 63 | 74 69 6f 6e 73 20 61 72 |ell func|tions ar|
|000028f0| 65 20 6e 6f 74 20 75 6e | 69 76 65 72 73 61 6c 2c |e not un|iversal,|
|00002900| 20 73 6f 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d | so this| program|
|00002910| 20 6d 61 79 20 62 65 0a | 58 20 20 20 20 20 64 69 | may be.|X di|
|00002920| 66 66 69 63 75 6c 74 20 | 74 6f 20 70 6f 72 74 20 |fficult |to port |
|00002930| 74 6f 20 73 6f 6d 65 20 | 73 79 73 74 65 6d 73 2e |to some |systems.|
|00002940| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 69 66 20 |.END_OF_|FILE.if |
|00002950| 74 65 73 74 20 34 39 36 | 31 20 2d 6e 65 20 60 77 |test 496|1 -ne `w|
|00002960| 63 20 2d 63 20 3c 27 52 | 45 41 44 4d 45 27 60 3b |c -c <'R|EADME'`;|
|00002970| 20 74 68 65 6e 0a 20 20 | 20 20 65 63 68 6f 20 73 | then. | echo s|
|00002980| 68 61 72 3a 20 5c 22 27 | 52 45 41 44 4d 45 27 5c |har: \"'|README'\|
|00002990| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|000029a0| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|000029b0| 20 65 6e 64 20 6f 66 20 | 27 52 45 41 44 4d 45 27 | end of |'README'|
|000029c0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|000029d0| 61 6c 6c 67 6f 73 73 2e | 31 27 20 2d 61 20 22 24 |allgoss.|1' -a "$|
|000029e0| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|000029f0| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00002a00| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00002a10| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00002a20| 20 5c 22 27 61 6c 6c 67 | 6f 73 73 2e 31 27 5c 22 | \"'allg|oss.1'\"|
|00002a30| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00002a40| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 61 | Extract|ing \"'a|
|00002a50| 6c 6c 67 6f 73 73 2e 31 | 27 5c 22 20 5c 28 33 38 |llgoss.1|'\" \(38|
|00002a60| 32 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |2 charac|ters\).s|
|00002a70| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 61 6c |ed "s/^X|//" >'al|
|00002a80| 6c 67 6f 73 73 2e 31 27 | 20 3c 3c 27 45 4e 44 5f |lgoss.1'| <<'END_|
|00002a90| 4f 46 5f 46 49 4c 45 27 | 0a 58 2e 54 48 20 41 4c |OF_FILE'|.X.TH AL|
|00002aa0| 4c 47 4f 53 53 20 31 20 | 22 32 35 20 46 65 62 72 |LGOSS 1 |"25 Febr|
|00002ab0| 75 61 72 79 20 31 39 38 | 39 22 0a 58 2e 53 48 20 |uary 198|9".X.SH |
|00002ac0| 4e 41 4d 45 0a 58 61 6c | 6c 67 6f 73 73 20 5c 2d |NAME.Xal|lgoss \-|
|00002ad0| 20 70 72 69 6e 74 73 20 | 61 20 6c 69 73 74 20 6f | prints |a list o|
|00002ae0| 66 20 61 6c 6c 20 67 6f | 73 69 70 20 66 69 6c 65 |f all go|sip file|
|00002af0| 73 0a 58 2e 53 48 20 53 | 59 4e 4f 50 53 49 53 0a |s.X.SH S|YNOPSIS.|
|00002b00| 58 61 6c 6c 67 6f 73 73 | 0a 58 2e 53 48 20 44 45 |Xallgoss|.X.SH DE|
|00002b10| 53 43 52 49 50 54 49 4f | 4e 0a 58 61 6c 6c 67 6f |SCRIPTIO|N.Xallgo|
|00002b20| 73 73 20 70 72 69 6e 74 | 73 20 61 20 6c 69 73 74 |ss print|s a list|
|00002b30| 20 6f 66 20 61 6c 6c 20 | 67 6f 73 69 70 20 66 69 | of all |gosip fi|
|00002b40| 6c 65 73 2e 0a 58 2e 53 | 48 20 53 45 45 20 41 4c |les..X.S|H SEE AL|
|00002b50| 53 4f 0a 58 64 77 28 31 | 29 2c 20 6c 75 28 31 29 |SO.Xdw(1|), lu(1)|
|00002b60| 2c 20 67 6f 73 73 69 70 | 28 31 29 2c 20 65 76 65 |, gossip|(1), eve|
|00002b70| 6e 74 73 28 31 29 2c 20 | 65 74 63 2e 0a 58 2e 53 |nts(1), |etc..X.S|
|00002b80| 48 20 42 55 47 53 0a 58 | 49 66 20 74 68 65 20 67 |H BUGS.X|If the g|
|00002b90| 6f 73 69 70 20 66 69 6c | 65 20 27 66 72 6f 67 27 |osip fil|e 'frog'|
|00002ba0| 20 65 78 69 73 74 73 2c | 20 62 75 74 20 74 68 65 | exists,| but the|
|00002bb0| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 27 | corresp|onding '|
|00002bc0| 74 65 78 74 2e 66 72 6f | 67 27 20 68 61 73 20 62 |text.fro|g' has b|
|00002bd0| 65 65 6e 0a 58 64 65 6c | 65 74 65 64 20 62 79 20 |een.Xdel|eted by |
|00002be0| 73 6f 6d 65 20 75 6e 66 | 72 69 65 6e 64 6c 79 20 |some unf|riendly |
|00002bf0| 6c 69 66 65 66 6f 72 6d | 2c 20 66 72 6f 67 20 77 |lifeform|, frog w|
|00002c00| 69 6c 6c 20 6e 6f 74 20 | 62 65 20 69 6e 63 6c 75 |ill not |be inclu|
|00002c10| 64 65 64 20 69 6e 20 74 | 68 65 20 6f 75 74 70 75 |ded in t|he outpu|
|00002c20| 74 2e 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |t..END_O|F_FILE.i|
|00002c30| 66 20 74 65 73 74 20 33 | 38 32 20 2d 6e 65 20 60 |f test 3|82 -ne `|
|00002c40| 77 63 20 2d 63 20 3c 27 | 61 6c 6c 67 6f 73 73 2e |wc -c <'|allgoss.|
|00002c50| 31 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |1'`; the|n. ec|
|00002c60| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 61 6c 6c 67 |ho shar:| \"'allg|
|00002c70| 6f 73 73 2e 31 27 5c 22 | 20 75 6e 70 61 63 6b 65 |oss.1'\"| unpacke|
|00002c80| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00002c90| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00002ca0| 61 6c 6c 67 6f 73 73 2e | 31 27 0a 66 69 0a 69 66 |allgoss.|1'.fi.if|
|00002cb0| 20 74 65 73 74 20 2d 66 | 20 27 63 61 74 2e 63 27 | test -f| 'cat.c'|
|00002cc0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|00002cd0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|00002ce0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00002cf0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00002d00| 67 20 66 69 6c 65 20 5c | 22 27 63 61 74 2e 63 27 |g file \|"'cat.c'|
|00002d10| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00002d20| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00002d30| 27 63 61 74 2e 63 27 5c | 22 20 5c 28 32 37 39 34 |'cat.c'\|" \(2794|
|00002d40| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00002d50| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 63 61 74 |d "s/^X/|/" >'cat|
|00002d60| 2e 63 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.c' <<'E|ND_OF_FI|
|00002d70| 4c 45 27 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 73 |LE'.X#in|clude <s|
|00002d80| 69 67 6e 61 6c 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |ignal.h>|.X#inclu|
|00002d90| 64 65 20 3c 73 79 73 2f | 77 61 69 74 2e 68 3e 0a |de <sys/|wait.h>.|
|00002da0| 58 0a 58 23 69 6e 63 6c | 75 64 65 20 22 67 6c 6f |X.X#incl|ude "glo|
|00002db0| 62 61 6c 2e 68 22 0a 58 | 23 69 6e 63 6c 75 64 65 |bal.h".X|#include|
|00002dc0| 20 22 63 61 74 2e 68 22 | 0a 58 23 69 6e 63 6c 75 | "cat.h"|.X#inclu|
|00002dd0| 64 65 20 22 75 74 69 6c | 2e 68 22 0a 58 23 69 6e |de "util|.h".X#in|
|00002de0| 63 6c 75 64 65 20 22 68 | 69 73 74 6f 72 79 2e 68 |clude "h|istory.h|
|00002df0| 22 0a 58 0a 58 2f 2a 20 | 20 76 6f 69 64 20 70 61 |".X.X/* | void pa|
|00002e00| 67 65 28 29 0a 58 20 2a | 0a 58 20 2a 20 20 49 66 |ge().X *|.X * If|
|00002e10| 20 74 68 65 20 73 74 64 | 6f 75 74 20 69 73 20 63 | the std|out is c|
|00002e20| 6f 6e 6e 65 63 74 65 64 | 20 74 6f 20 61 20 74 65 |onnected| to a te|
|00002e30| 72 6d 69 6e 61 6c 2c 20 | 70 61 67 65 20 77 69 6c |rminal, |page wil|
|00002e40| 6c 20 66 6f 72 6b 20 6f | 66 66 20 74 68 65 20 70 |l fork o|ff the p|
|00002e50| 61 67 65 72 20 69 6e 0a | 58 20 2a 20 20 74 68 65 |ager in.|X * the|
|00002e60| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00002e70| 69 61 62 6c 65 20 50 41 | 47 45 52 2c 20 6f 72 20 |iable PA|GER, or |
|00002e80| 6d 6f 72 65 28 31 29 20 | 69 66 20 50 41 47 45 52 |more(1) |if PAGER|
|00002e90| 20 69 73 20 6e 6f 74 20 | 64 65 66 69 6e 65 64 2e | is not |defined.|
|00002ea0| 20 20 49 74 0a 58 20 2a | 20 20 6d 61 6b 65 73 20 | It.X *| makes |
|00002eb0| 61 6c 6c 20 73 75 62 73 | 65 71 75 65 6e 74 20 6f |all subs|equent o|
|00002ec0| 75 74 70 75 74 20 74 6f | 20 73 74 64 6f 75 74 20 |utput to| stdout |
|00002ed0| 67 6f 20 74 68 72 6f 75 | 67 68 20 74 68 65 20 70 |go throu|gh the p|
|00002ee0| 61 67 65 72 2e 20 20 41 | 6e 79 20 65 72 72 6f 72 |ager. A|ny error|
|00002ef0| 73 2c 0a 58 20 2a 20 20 | 65 67 2e 20 66 72 6f 6d |s,.X * |eg. from|
|00002f00| 20 66 6f 72 6b 28 29 20 | 6f 72 20 70 69 70 65 28 | fork() |or pipe(|
|00002f10| 29 2c 20 63 61 75 73 65 | 20 61 6e 20 65 78 69 74 |), cause| an exit|
|00002f20| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 74 68 65 |. Note |that the|
|00002f30| 20 70 61 72 65 6e 74 20 | 62 65 63 6f 6d 65 73 0a | parent |becomes.|
|00002f40| 58 20 2a 20 20 74 68 65 | 20 70 61 67 65 72 2c 20 |X * the| pager, |
|00002f50| 61 6e 64 20 74 68 61 74 | 20 74 68 65 20 72 65 74 |and that| the ret|
|00002f60| 75 72 6e 20 68 61 70 70 | 65 6e 73 20 69 6e 20 74 |urn happ|ens in t|
|00002f70| 68 65 20 63 68 69 6c 64 | 2e 0a 58 20 2a 2f 0a 58 |he child|..X */.X|
|00002f80| 76 6f 69 64 20 70 61 67 | 65 28 29 0a 58 7b 0a 58 |void pag|e().X{.X|
|00002f90| 20 20 69 6e 74 20 66 69 | 6c 65 64 65 73 5b 32 5d | int fi|ledes[2]|
|00002fa0| 2c 20 70 69 64 3b 0a 58 | 20 20 63 68 61 72 20 2a |, pid;.X| char *|
|00002fb0| 70 61 67 65 72 20 3d 20 | 67 65 74 65 6e 76 20 28 |pager = |getenv (|
|00002fc0| 20 22 50 41 47 45 52 22 | 20 29 2c 20 2a 74 6d 70 | "PAGER"| ), *tmp|
|00002fd0| 3b 0a 58 0a 58 20 20 69 | 66 20 28 20 21 20 69 73 |;.X.X i|f ( ! is|
|00002fe0| 61 74 74 79 20 28 20 31 | 20 29 20 29 0a 58 20 20 |atty ( 1| ) ).X |
|00002ff0| 20 20 72 65 74 75 72 6e | 3b 0a 58 20 20 65 72 72 | return|;.X err|
|00003000| 6f 72 20 28 20 70 69 70 | 65 20 28 20 66 69 6c 65 |or ( pip|e ( file|
|00003010| 64 65 73 20 29 2c 20 22 | 43 6f 75 6c 64 6e 27 74 |des ), "|Couldn't|
|00003020| 20 63 72 65 61 74 65 20 | 70 69 70 65 22 20 29 3b | create |pipe" );|
|00003030| 0a 58 20 20 65 72 72 6f | 72 20 28 20 70 69 64 20 |.X erro|r ( pid |
|00003040| 3d 20 66 6f 72 6b 20 28 | 29 2c 20 22 43 6f 75 6c |= fork (|), "Coul|
|00003050| 64 6e 27 74 20 66 6f 72 | 6b 22 20 29 3b 0a 58 20 |dn't for|k" );.X |
|00003060| 20 69 66 20 28 20 70 69 | 64 20 3d 3d 20 30 20 29 | if ( pi|d == 0 )|
|00003070| 0a 58 20 20 7b 0a 58 20 | 20 20 20 65 72 72 6f 72 |.X {.X | error|
|00003080| 20 28 20 63 6c 6f 73 65 | 20 28 20 66 69 6c 65 64 | ( close| ( filed|
|00003090| 65 73 5b 30 5d 20 29 2c | 20 22 43 6c 6f 73 65 20 |es[0] ),| "Close |
|000030a0| 66 61 69 6c 65 64 22 20 | 29 3b 0a 58 20 20 20 20 |failed" |);.X |
|000030b0| 65 72 72 6f 72 20 28 20 | 64 75 70 32 20 28 20 66 |error ( |dup2 ( f|
|000030c0| 69 6c 65 64 65 73 5b 31 | 5d 2c 20 31 20 29 2c 20 |iledes[1|], 1 ), |
|000030d0| 22 64 75 70 32 20 66 61 | 69 6c 65 64 20 66 6f 72 |"dup2 fa|iled for|
|000030e0| 20 6f 75 74 70 75 74 22 | 20 29 3b 0a 58 20 20 20 | output"| );.X |
|000030f0| 20 65 72 72 6f 72 20 28 | 20 63 6c 6f 73 65 20 28 | error (| close (|
|00003100| 20 66 69 6c 65 64 65 73 | 5b 31 5d 20 29 2c 20 22 | filedes|[1] ), "|
|00003110| 43 6c 6f 73 65 20 66 61 | 69 6c 65 64 22 20 29 3b |Close fa|iled" );|
|00003120| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 3b 20 20 20 |.X re|turn; |
|00003130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003140| 20 20 2f 2a 20 65 72 72 | 6f 72 28 29 20 77 69 6c | /* err|or() wil|
|00003150| 6c 20 63 61 75 73 65 20 | 61 6e 20 65 78 69 74 20 |l cause |an exit |
|00003160| 69 66 20 61 6e 79 74 68 | 69 6e 67 20 2a 2f 0a 58 |if anyth|ing */.X|
|00003170| 20 20 7d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | } | |
|00003180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003190| 2f 2a 20 66 61 69 6c 73 | 2c 20 77 68 69 63 68 20 |/* fails|, which |
|000031a0| 63 6c 6f 73 65 73 20 66 | 69 6c 65 20 64 65 73 63 |closes f|ile desc|
|000031b0| 72 69 70 74 6f 72 73 2e | 20 2a 2f 0a 58 0a 58 20 |riptors.| */.X.X |
|000031c0| 20 65 72 72 6f 72 20 28 | 20 63 6c 6f 73 65 20 28 | error (| close (|
|000031d0| 20 66 69 6c 65 64 65 73 | 5b 31 5d 20 29 2c 20 22 | filedes|[1] ), "|
|000031e0| 43 6c 6f 73 65 20 66 61 | 69 6c 65 64 22 20 29 3b |Close fa|iled" );|
|000031f0| 0a 58 20 20 65 72 72 6f | 72 20 28 20 64 75 70 32 |.X erro|r ( dup2|
|00003200| 20 28 20 66 69 6c 65 64 | 65 73 5b 30 5d 2c 20 30 | ( filed|es[0], 0|
|00003210| 20 29 2c 20 22 64 75 70 | 32 20 66 61 69 6c 65 64 | ), "dup|2 failed|
|00003220| 20 66 6f 72 20 69 6e 70 | 75 74 22 20 29 3b 0a 58 | for inp|ut" );.X|
|00003230| 20 20 65 72 72 6f 72 20 | 28 20 63 6c 6f 73 65 20 | error |( close |
|00003240| 28 20 66 69 6c 65 64 65 | 73 5b 30 5d 20 29 2c 20 |( filede|s[0] ), |
|00003250| 22 43 6c 6f 73 65 20 66 | 61 69 6c 65 64 22 20 29 |"Close f|ailed" )|
|00003260| 3b 0a 58 20 20 69 66 20 | 28 20 21 20 70 61 67 65 |;.X if |( ! page|
|00003270| 72 20 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r ) | |
|00003280| 20 20 20 2f 2a 20 68 65 | 72 65 20 74 68 6f 75 67 | /* he|re thoug|
|00003290| 68 2c 20 74 68 65 72 65 | 20 73 68 6f 75 6c 64 20 |h, there| should |
|000032a0| 72 65 61 6c 6c 79 20 62 | 65 20 61 20 2a 2f 0a 58 |really b|e a */.X|
|000032b0| 20 20 20 20 70 61 67 65 | 72 20 3d 20 22 6d 6f 72 | page|r = "mor|
|000032c0| 65 22 3b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e"; | |
|000032d0| 2f 2a 20 6b 69 6c 6c 28 | 70 69 64 29 20 62 65 66 |/* kill(|pid) bef|
|000032e0| 6f 72 65 20 61 6e 20 65 | 78 69 74 2c 20 6e 6f 74 |ore an e|xit, not|
|000032f0| 20 65 72 72 6f 72 28 29 | 20 2a 2f 0a 58 20 20 65 | error()| */.X e|
|00003300| 6c 73 65 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |lse | |
|00003310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|00003320| 67 65 74 20 6a 75 73 74 | 20 74 68 65 20 70 61 67 |get just| the pag|
|00003330| 65 72 2c 20 6e 6f 74 20 | 6f 70 74 69 6f 6e 73 20 |er, not |options |
|00003340| 2a 2f 0a 58 20 20 20 20 | 66 6f 72 20 28 20 74 6d |*/.X |for ( tm|
|00003350| 70 20 3d 20 70 61 67 65 | 72 3b 20 2a 74 6d 70 20 |p = page|r; *tmp |
|00003360| 21 3d 20 27 5c 30 27 3b | 20 74 6d 70 2b 2b 20 29 |!= '\0';| tmp++ )|
|00003370| 0a 58 20 20 20 20 20 20 | 69 66 20 28 20 2a 74 6d |.X |if ( *tm|
|00003380| 70 20 3d 3d 20 27 20 27 | 20 29 0a 58 20 20 20 20 |p == ' '| ).X |
|00003390| 20 20 20 20 2a 74 6d 70 | 20 3d 20 27 5c 30 27 3b | *tmp| = '\0';|
|000033a0| 0a 58 20 20 65 78 65 63 | 6c 70 20 28 20 70 61 67 |.X exec|lp ( pag|
|000033b0| 65 72 2c 20 70 61 67 65 | 72 2c 20 28 63 68 61 72 |er, page|r, (char|
|000033c0| 20 2a 29 20 30 20 29 3b | 0a 58 20 20 28 76 6f 69 | *) 0 );|.X (voi|
|000033d0| 64 29 20 66 70 72 69 6e | 74 66 20 28 20 73 74 64 |d) fprin|tf ( std|
|000033e0| 65 72 72 2c 20 22 43 6f | 75 6c 64 6e 27 74 20 69 |err, "Co|uldn't i|
|000033f0| 6e 76 6f 6b 65 20 79 6f | 75 72 20 70 61 67 65 72 |nvoke yo|ur pager|
|00003400| 2e 5c 6e 22 20 29 3b 0a | 58 20 20 70 65 72 72 6f |.\n" );.|X perro|
|00003410| 72 20 28 20 70 61 67 65 | 72 20 29 3b 0a 58 20 20 |r ( page|r );.X |
|00003420| 28 76 6f 69 64 29 20 6b | 69 6c 6c 20 28 20 53 49 |(void) k|ill ( SI|
|00003430| 47 54 45 52 4d 2c 20 70 | 69 64 20 29 3b 0a 58 20 |GTERM, p|id );.X |
|00003440| 20 65 78 69 74 20 28 20 | 32 20 29 3b 0a 58 7d 0a | exit ( |2 );.X}.|
|00003450| 58 0a 58 2f 2a 20 20 76 | 6f 69 64 20 63 61 74 66 |X.X/* v|oid catf|
|00003460| 69 6c 65 20 28 20 74 79 | 70 65 20 29 0a 58 20 2a |ile ( ty|pe ).X *|
|00003470| 0a 58 20 2a 20 20 43 61 | 74 66 69 6c 65 20 77 69 |.X * Ca|tfile wi|
|00003480| 6c 6c 20 70 72 69 6e 74 | 20 74 68 65 20 67 6f 73 |ll print| the gos|
|00003490| 69 70 20 66 69 6c 65 2c | 20 75 73 69 6e 67 20 74 |ip file,| using t|
|000034a0| 68 65 20 70 72 6f 67 72 | 61 6d 20 69 6e 20 74 68 |he progr|am in th|
|000034b0| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 0a 58 20 |e enviro|nment.X |
|000034c0| 2a 20 20 76 61 72 69 61 | 62 6c 65 20 50 41 47 45 |* varia|ble PAGE|
|000034d0| 52 20 74 6f 20 64 69 73 | 70 6c 61 79 20 69 74 2e |R to dis|play it.|
|000034e0| 20 20 49 74 20 66 6f 72 | 6b 73 20 6f 66 66 20 61 | It for|ks off a|
|000034f0| 20 70 72 6f 63 65 73 73 | 20 74 6f 20 72 75 6e 20 | process| to run |
|00003500| 74 68 65 20 70 61 67 65 | 72 20 61 6e 64 0a 58 20 |the page|r and.X |
|00003510| 2a 20 20 66 65 65 64 73 | 20 69 74 2c 20 76 69 61 |* feeds| it, via|
|00003520| 20 61 20 70 69 70 65 2c | 20 61 20 6c 69 6e 65 66 | a pipe,| a linef|
|00003530| 65 65 64 2c 20 74 68 65 | 20 65 78 69 73 74 69 6e |eed, the| existin|
|00003540| 67 20 67 6f 73 69 70 20 | 66 69 6c 65 2c 20 61 6e |g gosip |file, an|
|00003550| 64 20 61 6e 6f 74 68 65 | 72 0a 58 20 2a 20 20 6c |d anothe|r.X * l|
|00003560| 69 6e 65 66 65 65 64 2e | 0a 58 20 2a 0a 58 20 2a |inefeed.|.X *.X *|
|00003570| 20 20 74 79 70 65 20 20 | 3a 20 20 63 6f 6e 74 72 | type |: contr|
|00003580| 6f 6c 73 20 74 68 65 20 | 74 79 70 65 20 6f 66 20 |ols the |type of |
|00003590| 6d 65 73 73 61 67 65 20 | 70 61 73 73 65 64 20 74 |message |passed t|
|000035a0| 6f 20 6c 61 73 74 65 64 | 69 74 28 29 20 61 6e 64 |o lasted|it() and|
|000035b0| 20 68 69 73 74 6f 72 79 | 2e 0a 58 20 2a 2f 0a 58 | history|..X */.X|
|000035c0| 76 6f 69 64 20 63 61 74 | 66 69 6c 65 20 28 20 74 |void cat|file ( t|
|000035d0| 79 70 65 20 29 0a 58 65 | 6e 75 6d 20 65 64 69 74 |ype ).Xe|num edit|
|000035e0| 5f 74 79 70 65 20 74 79 | 70 65 3b 0a 58 7b 0a 58 |_type ty|pe;.X{.X|
|000035f0| 20 20 46 49 4c 45 20 2a | 66 70 3b 0a 58 0a 58 20 | FILE *|fp;.X.X |
|00003600| 20 69 66 20 28 20 74 79 | 70 65 20 21 3d 20 72 61 | if ( ty|pe != ra|
|00003610| 77 20 29 0a 58 20 20 7b | 0a 58 20 20 20 20 75 70 |w ).X {|.X up|
|00003620| 64 61 74 65 5f 68 69 73 | 74 6f 72 79 20 28 20 74 |date_his|tory ( t|
|00003630| 69 6d 65 20 28 20 28 74 | 69 6d 65 5f 74 20 2a 29 |ime ( (t|ime_t *)|
|00003640| 20 30 20 29 2c 20 30 2c | 20 74 79 70 65 20 3d 3d | 0 ), 0,| type ==|
|00003650| 20 62 65 69 6e 67 5f 65 | 64 69 74 65 64 20 3f 20 | being_e|dited ? |
|00003660| 65 64 69 74 5f 66 61 69 | 6c 65 64 20 3a 20 6c 69 |edit_fai|led : li|
|00003670| 73 74 20 29 3b 0a 58 20 | 20 20 20 70 61 67 65 28 |st );.X | page(|
|00003680| 29 3b 0a 58 20 20 20 20 | 69 66 20 28 20 74 79 70 |);.X |if ( typ|
|00003690| 65 20 3d 3d 20 62 65 69 | 6e 67 5f 65 64 69 74 65 |e == bei|ng_edite|
|000036a0| 64 20 29 20 2f 2a 20 63 | 61 6e 27 74 20 6a 75 73 |d ) /* c|an't jus|
|000036b0| 74 20 75 73 65 20 6c 61 | 73 74 65 64 69 74 20 28 |t use la|stedit (|
|000036c0| 20 41 55 54 4f 20 29 20 | 68 65 72 65 2c 20 2a 2f | AUTO ) |here, */|
|000036d0| 0a 58 20 20 20 20 20 20 | 6c 61 73 74 65 64 69 74 |.X |lastedit|
|000036e0| 20 28 20 45 44 49 54 20 | 29 3b 20 20 20 20 20 20 | ( EDIT |); |
|000036f0| 20 20 2f 2a 20 73 69 6e | 63 65 20 73 74 61 74 75 | /* sin|ce statu|
|00003700| 73 20 6d 69 67 68 74 20 | 68 61 76 65 20 63 68 61 |s might |have cha|
|00003710| 6e 67 65 64 2e 20 2a 2f | 0a 58 20 20 20 20 65 6c |nged. */|.X el|
|00003720| 73 65 0a 58 20 20 20 20 | 20 20 6c 61 73 74 65 64 |se.X | lasted|
|00003730| 69 74 20 28 20 41 55 54 | 4f 20 29 3b 0a 58 20 20 |it ( AUT|O );.X |
|00003740| 20 20 28 76 6f 69 64 29 | 20 70 75 74 63 68 61 72 | (void)| putchar|
|00003750| 20 28 20 27 5c 6e 27 20 | 29 3b 0a 58 20 20 7d 0a | ( '\n' |);.X }.|
|00003760| 58 0a 58 20 20 69 66 20 | 28 20 66 70 20 3d 20 66 |X.X if |( fp = f|
|00003770| 6f 70 65 6e 20 28 20 74 | 65 78 74 5f 66 69 6c 65 |open ( t|ext_file|
|00003780| 2c 20 22 72 22 20 29 20 | 29 0a 58 20 20 7b 0a 58 |, "r" ) |).X {.X|
|00003790| 20 20 20 20 69 6e 74 20 | 63 3b 0a 58 0a 58 20 20 | int |c;.X.X |
|000037a0| 20 20 77 68 69 6c 65 20 | 28 20 28 20 63 20 3d 20 | while |( ( c = |
|000037b0| 67 65 74 63 20 28 20 66 | 70 20 29 20 29 20 21 3d |getc ( f|p ) ) !=|
|000037c0| 20 45 4f 46 20 29 0a 58 | 20 20 20 20 20 20 28 76 | EOF ).X| (v|
|000037d0| 6f 69 64 29 20 70 75 74 | 63 68 61 72 20 28 20 28 |oid) put|char ( (|
|000037e0| 63 68 61 72 29 20 63 20 | 29 3b 0a 58 20 20 20 20 |char) c |);.X |
|000037f0| 28 76 6f 69 64 29 20 66 | 63 6c 6f 73 65 20 28 20 |(void) f|close ( |
|00003800| 66 70 20 29 3b 0a 58 20 | 20 7d 0a 58 20 20 65 6c |fp );.X | }.X el|
|00003810| 73 65 0a 58 20 20 7b 0a | 58 20 20 20 20 28 76 6f |se.X {.|X (vo|
|00003820| 69 64 29 20 70 72 69 6e | 74 66 20 28 20 22 3c 43 |id) prin|tf ( "<C|
|00003830| 6f 75 6c 64 6e 27 74 20 | 61 63 63 65 73 73 20 25 |ouldn't |access %|
|00003840| 73 20 74 65 78 74 20 66 | 69 6c 65 2e 3e 5c 6e 5c |s text f|ile.>\n\|
|00003850| 6e 22 2c 20 66 69 6c 65 | 20 29 3b 0a 58 20 20 20 |n", file| );.X |
|00003860| 20 65 78 69 74 20 28 20 | 32 20 29 3b 0a 58 20 20 | exit ( |2 );.X |
|00003870| 7d 0a 58 0a 58 20 20 69 | 66 20 28 20 74 79 70 65 |}.X.X i|f ( type|
|00003880| 20 21 3d 20 72 61 77 20 | 29 0a 58 20 20 20 20 28 | != raw |).X (|
|00003890| 76 6f 69 64 29 20 70 75 | 74 63 68 61 72 20 28 20 |void) pu|tchar ( |
|000038a0| 27 5c 6e 27 20 29 3b 0a | 58 20 20 65 78 69 74 20 |'\n' );.|X exit |
|000038b0| 28 20 30 20 29 3b 0a 58 | 7d 0a 45 4e 44 5f 4f 46 |( 0 );.X|}.END_OF|
|000038c0| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 32 37 |_FILE.if| test 27|
|000038d0| 39 34 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |94 -ne `|wc -c <'|
|000038e0| 63 61 74 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |cat.c'`;| then. |
|000038f0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00003900| 63 61 74 2e 63 27 5c 22 | 20 75 6e 70 61 63 6b 65 |cat.c'\"| unpacke|
|00003910| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00003920| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00003930| 63 61 74 2e 63 27 0a 66 | 69 0a 69 66 20 74 65 73 |cat.c'.f|i.if tes|
|00003940| 74 20 2d 66 20 27 63 61 | 74 2e 68 27 20 2d 61 20 |t -f 'ca|t.h' -a |
|00003950| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00003960| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00003970| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00003980| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00003990| 6c 65 20 5c 22 27 63 61 | 74 2e 68 27 5c 22 0a 65 |le \"'ca|t.h'\".e|
|000039a0| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|000039b0| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 63 61 74 |xtractin|g \"'cat|
|000039c0| 2e 68 27 5c 22 20 5c 28 | 31 30 38 30 20 63 68 61 |.h'\" \(|1080 cha|
|000039d0| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|000039e0| 2f 5e 58 2f 2f 22 20 3e | 27 63 61 74 2e 68 27 20 |/^X//" >|'cat.h' |
|000039f0| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00003a00| 58 2f 2a 20 20 54 68 65 | 20 63 61 74 20 6d 6f 64 |X/* The| cat mod|
|00003a10| 75 6c 65 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ule cont|ains the|
|00003a20| 20 63 6f 64 65 20 74 68 | 61 74 20 77 69 6c 6c 20 | code th|at will |
|00003a30| 73 69 6d 70 6c 79 20 70 | 72 69 6e 74 20 74 68 65 |simply p|rint the|
|00003a40| 20 67 6f 73 69 70 20 66 | 69 6c 65 2e 0a 58 20 2a | gosip f|ile..X *|
|00003a50| 2f 0a 58 0a 58 2f 2a 20 | 20 76 6f 69 64 20 70 61 |/.X.X/* | void pa|
|00003a60| 67 65 28 29 0a 58 20 2a | 0a 58 20 2a 20 20 50 61 |ge().X *|.X * Pa|
|00003a70| 67 65 20 63 61 75 73 65 | 73 20 61 6c 6c 20 73 75 |ge cause|s all su|
|00003a80| 62 73 65 71 75 65 6e 74 | 20 6f 75 74 70 75 74 20 |bsequent| output |
|00003a90| 74 6f 20 62 65 20 70 69 | 70 65 64 20 76 69 61 20 |to be pi|ped via |
|00003aa0| 61 20 70 61 67 65 72 2e | 20 20 49 66 20 74 68 65 |a pager.| If the|
|00003ab0| 0a 58 20 2a 20 20 65 6e | 76 69 72 6f 6e 6d 65 6e |.X * en|vironmen|
|00003ac0| 74 20 76 61 72 69 61 62 | 6c 65 20 50 41 47 45 52 |t variab|le PAGER|
|00003ad0| 20 69 73 20 73 65 74 2c | 20 69 74 20 69 73 20 75 | is set,| it is u|
|00003ae0| 73 65 64 20 28 77 69 74 | 68 6f 75 74 20 6f 70 74 |sed (wit|hout opt|
|00003af0| 69 6f 6e 73 29 2c 20 6f | 74 68 65 72 77 69 73 65 |ions), o|therwise|
|00003b00| 0a 58 20 2a 20 20 6d 6f | 72 65 28 31 29 2e 0a 58 |.X * mo|re(1)..X|
|00003b10| 20 2a 2f 0a 58 65 78 74 | 65 72 6e 20 76 6f 69 64 | */.Xext|ern void|
|00003b20| 20 70 61 67 65 28 29 3b | 0a 58 0a 58 2f 2a 20 20 | page();|.X.X/* |
|00003b30| 76 6f 69 64 20 63 61 74 | 66 69 6c 65 20 28 20 74 |void cat|file ( t|
|00003b40| 79 70 65 20 29 0a 58 20 | 2a 0a 58 20 2a 20 20 54 |ype ).X |*.X * T|
|00003b50| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 70 72 69 6e |he funct|ion prin|
|00003b60| 74 73 20 6c 61 73 74 65 | 64 69 74 20 69 6e 66 6f |ts laste|dit info|
|00003b70| 72 6d 61 74 69 6f 6e 2c | 20 61 6e 64 20 74 68 65 |rmation,| and the|
|00003b80| 6e 20 74 68 65 20 67 6f | 73 69 70 20 66 69 6c 65 |n the go|sip file|
|00003b90| 20 69 74 73 65 6c 66 2e | 0a 58 20 2a 20 20 49 74 | itself.|.X * It|
|00003ba0| 20 6e 65 76 65 72 20 72 | 65 74 75 72 6e 73 2c 20 | never r|eturns, |
|00003bb0| 62 75 74 20 63 61 6c 6c | 73 20 65 78 69 74 28 29 |but call|s exit()|
|00003bc0| 2e 0a 58 20 2a 0a 58 20 | 2a 20 20 74 79 70 65 20 |..X *.X |* type |
|00003bd0| 20 3a 20 20 63 6f 6e 74 | 72 6f 6c 73 20 74 68 65 | : cont|rols the|
|00003be0| 20 6c 61 73 74 20 75 73 | 61 67 65 20 6d 65 73 73 | last us|age mess|
|00003bf0| 61 67 65 20 74 65 78 74 | 2e 0a 58 20 2a 2f 0a 58 |age text|..X */.X|
|00003c00| 65 78 74 65 72 6e 20 76 | 6f 69 64 20 63 61 74 66 |extern v|oid catf|
|00003c10| 69 6c 65 28 29 3b 0a 58 | 0a 58 65 6e 75 6d 20 65 |ile();.X|.Xenum e|
|00003c20| 64 69 74 5f 74 79 70 65 | 20 20 20 20 20 20 2f 2a |dit_type| /*|
|00003c30| 20 75 73 65 64 20 74 6f | 20 73 70 65 63 69 66 79 | used to| specify|
|00003c40| 20 74 79 70 65 20 6f 66 | 20 65 64 69 74 2e 20 20 | type of| edit. |
|00003c50| 2a 2f 0a 58 7b 0a 58 20 | 20 6e 6f 72 6d 61 6c 2c |*/.X{.X | normal,|
|00003c60| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 64 65 | | /* de|
|00003c70| 66 61 75 6c 74 20 65 64 | 69 74 20 2a 2f 0a 58 20 |fault ed|it */.X |
|00003c80| 20 62 65 69 6e 67 5f 65 | 64 69 74 65 64 2c 20 20 | being_e|dited, |
|00003c90| 20 20 20 2f 2a 20 74 65 | 6c 6c 73 20 63 61 74 66 | /* te|lls catf|
|00003ca0| 69 6c 65 28 29 20 74 6f | 20 73 65 6e 64 20 22 62 |ile() to| send "b|
|00003cb0| 65 69 6e 67 20 65 64 69 | 74 65 64 22 20 73 74 72 |eing edi|ted" str|
|00003cc0| 69 6e 67 20 2a 2f 0a 58 | 20 20 20 20 20 20 20 20 |ing */.X| |
|00003cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 74 | | /* t|
|00003ce0| 6f 20 6c 61 73 74 65 64 | 69 74 28 29 20 2a 2f 0a |o lasted|it() */.|
|00003cf0| 58 20 20 61 62 6f 72 74 | 2c 20 20 20 20 20 20 20 |X abort|, |
|00003d00| 20 20 20 20 20 2f 2a 20 | 74 65 6c 6c 73 20 65 64 | /* |tells ed|
|00003d10| 69 74 28 29 20 6e 6f 74 | 20 74 6f 20 63 61 6c 6c |it() not| to call|
|00003d20| 20 63 61 74 66 69 6c 65 | 28 29 20 69 66 20 67 6f | catfile|() if go|
|00003d30| 73 69 70 20 69 73 20 62 | 65 69 6e 67 0a 58 20 20 |sip is b|eing.X |
|00003d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d50| 20 20 20 20 20 65 64 69 | 74 65 64 2e 20 2a 2f 0a | edi|ted. */.|
|00003d60| 58 20 20 72 61 77 2c 09 | 09 20 20 20 20 2f 2a 20 |X raw,.|. /* |
|00003d70| 74 65 6c 6c 73 20 63 61 | 74 66 69 6c 65 20 74 6f |tells ca|tfile to|
|00003d80| 20 70 72 69 6e 74 20 67 | 6f 73 69 70 20 66 69 6c | print g|osip fil|
|00003d90| 65 20 77 69 74 68 6f 75 | 74 20 61 6e 79 20 65 78 |e withou|t any ex|
|00003da0| 74 72 61 0a 58 09 09 20 | 20 20 20 20 20 20 69 6e |tra.X.. | in|
|00003db0| 66 6f 72 6d 61 74 69 6f | 6e 2c 20 61 6e 64 20 77 |formatio|n, and w|
|00003dc0| 69 74 68 6f 75 74 20 61 | 20 70 61 67 65 72 20 2a |ithout a| pager *|
|00003dd0| 2f 0a 58 20 20 63 66 6c | 61 67 20 20 20 20 20 20 |/.X cfl|ag |
|00003de0| 20 20 20 20 20 20 20 2f | 2a 20 6d 65 61 6e 73 20 | /|* means |
|00003df0| 67 6f 73 69 70 20 77 61 | 73 20 69 6e 76 6f 6b 65 |gosip wa|s invoke|
|00003e00| 64 20 77 69 74 68 20 74 | 68 65 20 63 20 66 6c 61 |d with t|he c fla|
|00003e10| 67 2e 20 20 55 73 65 64 | 0a 58 20 20 20 20 20 20 |g. Used|.X |
|00003e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e30| 20 65 78 63 6c 75 73 69 | 76 65 6c 79 20 62 79 20 | exclusi|vely by |
|00003e40| 47 65 6f 66 66 27 73 20 | 70 72 6f 67 72 61 6d 2e |Geoff's |program.|
|00003e50| 20 2a 2f 0a 58 7d 3b 0a | 45 4e 44 5f 4f 46 5f 46 | */.X};.|END_OF_F|
|00003e60| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 31 30 38 30 |ILE.if t|est 1080|
|00003e70| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 63 61 | -ne `wc| -c <'ca|
|00003e80| 74 2e 68 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |t.h'`; t|hen. |
|00003e90| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 63 61 |echo sha|r: \"'ca|
|00003ea0| 74 2e 68 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |t.h'\" u|npacked |
|00003eb0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00003ec0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 63 61 |.fi.# en|d of 'ca|
|00003ed0| 74 2e 68 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |t.h'.fi.|if test |
|00003ee0| 2d 66 20 27 63 6f 6e 74 | 72 6f 6c 2e 63 27 20 2d |-f 'cont|rol.c' -|
|00003ef0| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00003f00| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00003f10| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00003f20| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00003f30| 66 69 6c 65 20 5c 22 27 | 63 6f 6e 74 72 6f 6c 2e |file \"'|control.|
|00003f40| 63 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |c'\".els|e.echo s|
|00003f50| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00003f60| 5c 22 27 63 6f 6e 74 72 | 6f 6c 2e 63 27 5c 22 20 |\"'contr|ol.c'\" |
|00003f70| 5c 28 34 34 35 36 20 63 | 68 61 72 61 63 74 65 72 |\(4456 c|haracter|
|00003f80| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00003f90| 20 3e 27 63 6f 6e 74 72 | 6f 6c 2e 63 27 20 3c 3c | >'contr|ol.c' <<|
|00003fa0| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 23 |'END_OF_|FILE'.X#|
|00003fb0| 69 6e 63 6c 75 64 65 20 | 22 67 6c 6f 62 61 6c 2e |include |"global.|
|00003fc0| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 63 6f |h".X#inc|lude "co|
|00003fd0| 6e 74 72 6f 6c 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |ntrol.h"|.X#inclu|
|00003fe0| 64 65 20 22 75 74 69 6c | 2e 68 22 0a 58 0a 58 2f |de "util|.h".X.X/|
|00003ff0| 2a 20 20 62 79 74 65 20 | 70 61 72 73 65 20 28 20 |* byte |parse ( |
|00004000| 6c 69 6e 65 2c 20 63 6f | 64 65 2c 20 74 65 72 6d |line, co|de, term|
|00004010| 2c 20 66 69 6c 65 20 29 | 0a 58 20 2a 0a 58 20 2a |, file )|.X *.X *|
|00004020| 20 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 77 | This r|outine w|
|00004030| 69 6c 6c 20 70 61 72 73 | 65 20 74 68 65 20 6c 69 |ill pars|e the li|
|00004040| 6e 65 20 69 74 73 20 67 | 69 76 65 6e 2c 20 70 69 |ne its g|iven, pi|
|00004050| 63 6b 69 6e 67 20 6f 75 | 74 20 75 73 65 72 63 6f |cking ou|t userco|
|00004060| 64 65 2c 20 74 65 72 6d | 69 6e 61 6c 0a 58 20 2a |de, term|inal.X *|
|00004070| 20 20 61 6e 64 20 66 69 | 6c 65 2e 20 20 54 68 65 | and fi|le. The|
|00004080| 20 66 6f 72 6d 61 74 20 | 6f 66 20 74 68 65 20 6c | format |of the l|
|00004090| 69 6e 65 20 73 68 6f 75 | 6c 64 20 62 65 20 22 3a |ine shou|ld be ":|
|000040a0| 63 6f 64 65 2c 74 65 72 | 6d 2c 66 69 6c 65 21 22 |code,ter|m,file!"|
|000040b0| 2e 20 20 49 66 20 74 65 | 72 6d 0a 58 20 2a 20 20 |. If te|rm.X * |
|000040c0| 69 73 20 61 20 6e 75 6c | 6c 20 70 6f 69 6e 74 65 |is a nul|l pointe|
|000040d0| 72 2c 20 6a 75 73 74 20 | 74 68 65 20 63 6f 64 65 |r, just |the code|
|000040e0| 20 77 69 6c 6c 20 62 65 | 20 72 65 74 75 72 6e 65 | will be| returne|
|000040f0| 64 2e 0a 58 20 2a 0a 58 | 20 2a 20 20 50 61 72 73 |d..X *.X| * Pars|
|00004100| 65 28 29 20 72 65 74 75 | 72 6e 73 20 30 20 69 66 |e() retu|rns 0 if|
|00004110| 20 74 68 65 20 6c 69 6e | 65 20 64 69 64 6e 27 74 | the lin|e didn't|
|00004120| 20 62 65 67 69 6e 20 77 | 69 74 68 20 61 20 27 3a | begin w|ith a ':|
|00004130| 27 2c 20 6f 74 68 65 72 | 77 69 73 65 20 69 74 0a |', other|wise it.|
|00004140| 58 20 2a 20 20 73 65 67 | 6d 65 6e 74 61 74 69 6f |X * seg|mentatio|
|00004150| 6e 20 66 61 75 6c 74 73 | 20 69 66 20 74 68 65 20 |n faults| if the |
|00004160| 72 65 73 74 20 6f 66 20 | 74 68 65 20 6c 69 6e 65 |rest of |the line|
|00004170| 20 64 6f 65 73 6e 27 74 | 20 63 6f 6e 74 61 69 6e | doesn't| contain|
|00004180| 20 74 68 65 20 72 69 67 | 68 74 0a 58 20 2a 20 20 | the rig|ht.X * |
|00004190| 6e 75 6d 62 65 72 20 6f | 66 20 63 6f 6d 6d 61 73 |number o|f commas|
|000041a0| 20 61 6e 64 20 65 78 63 | 6c 61 6d 61 74 69 6f 6e | and exc|lamation|
|000041b0| 20 6d 61 72 6b 73 2e 20 | 20 49 66 20 69 74 20 64 | marks. | If it d|
|000041c0| 6f 65 73 2c 20 70 61 72 | 73 65 28 29 20 72 65 74 |oes, par|se() ret|
|000041d0| 75 72 6e 73 20 31 2e 0a | 58 20 2a 0a 58 20 2a 20 |urns 1..|X *.X * |
|000041e0| 20 6c 69 6e 65 20 20 3a | 20 20 70 6f 69 6e 74 73 | line :| points|
|000041f0| 20 74 6f 20 74 68 65 20 | 6c 69 6e 65 20 74 6f 20 | to the |line to |
|00004200| 62 65 20 70 61 72 73 65 | 64 2e 0a 58 20 2a 20 20 |be parse|d..X * |
|00004210| 63 6f 64 65 20 20 3a 20 | 20 74 68 65 20 63 6f 64 |code : | the cod|
|00004220| 65 20 77 69 6c 6c 20 62 | 65 20 77 72 69 74 74 65 |e will b|e writte|
|00004230| 6e 20 77 68 65 72 65 20 | 74 68 69 73 20 70 6f 69 |n where |this poi|
|00004240| 6e 74 73 2e 0a 58 20 2a | 20 20 74 65 72 6d 20 20 |nts..X *| term |
|00004250| 3a 20 20 74 68 65 20 74 | 65 72 6d 69 6e 61 6c 20 |: the t|erminal |
|00004260| 77 69 6c 6c 20 62 65 20 | 77 72 69 74 74 65 6e 20 |will be |written |
|00004270| 77 68 65 72 65 20 74 68 | 69 73 20 70 6f 69 6e 74 |where th|is point|
|00004280| 73 2e 0a 58 20 2a 20 20 | 66 69 6c 65 20 20 3a 20 |s..X * |file : |
|00004290| 20 74 68 65 20 66 69 6c | 65 20 77 69 6c 6c 20 62 | the fil|e will b|
|000042a0| 65 20 77 72 69 74 74 65 | 6e 20 77 68 65 72 65 20 |e writte|n where |
|000042b0| 74 68 69 73 20 70 6f 69 | 6e 74 73 2e 0a 58 20 2a |this poi|nts..X *|
|000042c0| 2f 0a 58 73 74 61 74 69 | 63 20 62 79 74 65 20 70 |/.Xstati|c byte p|
|000042d0| 61 72 73 65 20 28 20 6c | 69 6e 65 2c 20 63 6f 64 |arse ( l|ine, cod|
|000042e0| 65 2c 20 74 65 72 6d 2c | 20 66 69 6c 65 20 29 0a |e, term,| file ).|
|000042f0| 58 63 68 61 72 20 2a 6c | 69 6e 65 2c 20 2a 63 6f |Xchar *l|ine, *co|
|00004300| 64 65 2c 20 2a 74 65 72 | 6d 2c 20 2a 66 69 6c 65 |de, *ter|m, *file|
|00004310| 3b 0a 58 7b 0a 58 20 20 | 69 66 20 28 20 2a 6c 69 |;.X{.X |if ( *li|
|00004320| 6e 65 2b 2b 20 21 3d 20 | 27 3a 27 20 29 0a 58 20 |ne++ != |':' ).X |
|00004330| 20 20 20 72 65 74 75 72 | 6e 20 30 3b 0a 58 20 20 | retur|n 0;.X |
|00004340| 77 68 69 6c 65 20 28 20 | 2a 6c 69 6e 65 20 21 3d |while ( |*line !=|
|00004350| 20 27 2c 27 20 29 0a 58 | 20 20 20 20 2a 63 6f 64 | ',' ).X| *cod|
|00004360| 65 2b 2b 20 3d 20 2a 6c | 69 6e 65 2b 2b 3b 0a 58 |e++ = *l|ine++;.X|
|00004370| 20 20 2a 63 6f 64 65 20 | 3d 20 27 5c 30 27 3b 0a | *code |= '\0';.|
|00004380| 58 20 20 69 66 20 28 20 | 21 20 74 65 72 6d 20 29 |X if ( |! term )|
|00004390| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 20 31 3b 0a |.X re|turn 1;.|
|000043a0| 58 20 20 77 68 69 6c 65 | 20 28 20 2a 2b 2b 6c 69 |X while| ( *++li|
|000043b0| 6e 65 20 21 3d 20 27 2c | 27 20 29 0a 58 20 20 20 |ne != ',|' ).X |
|000043c0| 20 2a 74 65 72 6d 2b 2b | 20 3d 20 2a 6c 69 6e 65 | *term++| = *line|
|000043d0| 3b 0a 58 20 20 2a 74 65 | 72 6d 20 3d 20 27 5c 30 |;.X *te|rm = '\0|
|000043e0| 27 3b 0a 58 20 20 77 68 | 69 6c 65 20 28 20 2a 2b |';.X wh|ile ( *+|
|000043f0| 2b 6c 69 6e 65 20 21 3d | 20 27 21 27 20 29 0a 58 |+line !=| '!' ).X|
|00004400| 20 20 20 20 2a 66 69 6c | 65 2b 2b 20 3d 20 2a 6c | *fil|e++ = *l|
|00004410| 69 6e 65 3b 0a 58 20 20 | 2a 66 69 6c 65 20 3d 20 |ine;.X |*file = |
|00004420| 27 5c 30 27 3b 0a 58 20 | 20 72 65 74 75 72 6e 20 |'\0';.X | return |
|00004430| 31 3b 0a 58 7d 0a 58 0a | 58 2f 2a 20 20 62 79 74 |1;.X}.X.|X/* byt|
|00004440| 65 20 61 64 64 5f 75 73 | 65 72 28 29 0a 58 20 2a |e add_us|er().X *|
|00004450| 0a 58 20 2a 20 20 49 66 | 20 74 68 65 20 67 6f 73 |.X * If| the gos|
|00004460| 69 70 20 66 69 6c 65 73 | 20 61 72 65 20 64 6f 77 |ip files| are dow|
|00004470| 6e 2c 20 61 64 64 5f 75 | 73 65 72 28 29 20 77 69 |n, add_u|ser() wi|
|00004480| 6c 6c 20 63 68 65 63 6b | 20 44 4f 57 4e 5f 46 49 |ll check| DOWN_FI|
|00004490| 4c 45 20 66 6f 72 20 74 | 68 65 0a 58 20 2a 20 20 |LE for t|he.X * |
|000044a0| 75 73 65 72 27 73 20 63 | 6f 64 65 2e 20 20 49 66 |user's c|ode. If|
|000044b0| 20 68 65 20 69 73 20 6d | 65 6e 74 69 6f 6e 65 64 | he is m|entioned|
|000044c0| 2c 20 69 74 20 77 69 6c | 6c 20 72 65 74 75 72 6e |, it wil|l return|
|000044d0| 20 31 2e 20 20 49 66 20 | 68 65 20 69 73 6e 27 74 | 1. If |he isn't|
|000044e0| 2c 20 61 64 64 5f 75 73 | 65 72 0a 58 20 2a 20 20 |, add_us|er.X * |
|000044f0| 63 68 65 63 6b 73 20 68 | 65 27 73 20 6f 6e 20 61 |checks h|e's on a|
|00004500| 20 74 65 72 6d 69 6e 61 | 6c 2c 20 61 6e 64 20 74 | termina|l, and t|
|00004510| 68 65 6e 20 61 64 64 73 | 20 61 20 6c 69 6e 65 20 |hen adds| a line |
|00004520| 74 6f 20 44 4f 57 4e 5f | 46 49 4c 45 20 69 6e 20 |to DOWN_|FILE in |
|00004530| 74 68 65 20 66 6f 72 6d | 61 74 0a 58 20 2a 20 20 |the form|at.X * |
|00004540| 22 3a 3c 75 73 65 72 63 | 6f 64 65 3e 2c 3c 74 65 |":<userc|ode>,<te|
|00004550| 72 6d 69 6e 61 6c 3e 2c | 3c 66 69 6c 65 3e 21 22 |rminal>,|<file>!"|
|00004560| 2e 0a 58 20 2a 2f 0a 58 | 62 79 74 65 20 61 64 64 |..X */.X|byte add|
|00004570| 5f 75 73 65 72 28 29 0a | 58 7b 0a 58 20 20 46 49 |_user().|X{.X FI|
|00004580| 4c 45 20 2a 66 70 20 3d | 20 66 6f 70 65 6e 20 28 |LE *fp =| fopen (|
|00004590| 20 44 4f 57 4e 5f 46 49 | 4c 45 2c 20 22 72 2b 22 | DOWN_FI|LE, "r+"|
|000045a0| 20 29 3b 0a 58 20 20 63 | 68 61 72 20 6c 69 6e 65 | );.X c|har line|
|000045b0| 5b 33 30 5d 2c 20 2a 74 | 65 72 6d 2c 20 2a 74 74 |[30], *t|erm, *tt|
|000045c0| 79 6e 61 6d 65 28 29 3b | 0a 58 0a 58 20 20 69 66 |yname();|.X.X if|
|000045d0| 20 28 20 21 20 66 70 20 | 29 0a 58 20 20 20 20 72 | ( ! fp |).X r|
|000045e0| 65 74 75 72 6e 20 30 3b | 0a 58 20 20 28 76 6f 69 |eturn 0;|.X (voi|
|000045f0| 64 29 20 66 73 65 65 6b | 20 28 20 66 70 2c 20 30 |d) fseek| ( fp, 0|
|00004600| 4c 2c 20 30 20 29 3b 0a | 58 20 20 77 68 69 6c 65 |L, 0 );.|X while|
|00004610| 20 28 20 66 67 65 74 73 | 20 28 20 6c 69 6e 65 2c | ( fgets| ( line,|
|00004620| 20 32 39 2c 20 66 70 20 | 29 20 29 0a 58 20 20 7b | 29, fp |) ).X {|
|00004630| 0a 58 20 20 20 20 63 68 | 61 72 20 63 6f 64 65 5b |.X ch|ar code[|
|00004640| 31 30 5d 3b 0a 58 0a 58 | 20 20 20 20 69 66 20 28 |10];.X.X| if (|
|00004650| 20 70 61 72 73 65 20 28 | 20 6c 69 6e 65 2c 20 63 | parse (| line, c|
|00004660| 6f 64 65 2c 20 28 63 68 | 61 72 20 2a 29 20 30 2c |ode, (ch|ar *) 0,|
|00004670| 20 28 63 68 61 72 20 2a | 29 20 30 20 29 20 29 0a | (char *|) 0 ) ).|
|00004680| 58 20 20 20 20 20 20 69 | 66 20 28 20 21 20 73 74 |X i|f ( ! st|
|00004690| 72 63 6d 70 20 28 20 63 | 6f 64 65 2c 20 75 73 65 |rcmp ( c|ode, use|
|000046a0| 72 63 6f 64 65 28 29 20 | 29 20 29 0a 58 20 20 20 |rcode() |) ).X |
|000046b0| 20 20 20 7b 0a 58 20 20 | 20 20 20 20 20 20 28 76 | {.X | (v|
|000046c0| 6f 69 64 29 20 66 63 6c | 6f 73 65 20 28 20 66 70 |oid) fcl|ose ( fp|
|000046d0| 20 29 3b 0a 58 20 20 20 | 20 20 20 20 20 72 65 74 | );.X | ret|
|000046e0| 75 72 6e 20 31 3b 0a 58 | 20 20 20 20 20 20 7d 0a |urn 1;.X| }.|
|000046f0| 58 20 20 7d 0a 58 20 20 | 69 66 20 28 20 74 65 72 |X }.X |if ( ter|
|00004700| 6d 20 3d 20 74 74 79 6e | 61 6d 65 20 28 20 32 20 |m = ttyn|ame ( 2 |
|00004710| 29 20 29 20 20 20 2f 2a | 20 67 65 74 20 74 68 65 |) ) /*| get the|
|00004720| 20 74 65 72 6d 69 6e 61 | 6c 20 73 74 64 65 72 72 | termina|l stderr|
|00004730| 20 69 73 20 61 74 74 61 | 63 68 65 64 20 74 6f 20 | is atta|ched to |
|00004740| 2a 2f 0a 58 20 20 7b 20 | 20 20 20 20 20 20 20 20 |*/.X { | |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004760| 20 20 20 20 2f 2a 20 73 | 74 64 65 72 72 20 69 73 | /* s|tderr is|
|00004770| 20 6c 65 61 73 74 20 6c | 69 6b 65 6c 79 20 74 6f | least l|ikely to|
|00004780| 20 62 65 20 72 65 64 69 | 72 65 63 74 65 64 20 2a | be redi|rected *|
|00004790| 2f 0a 58 20 20 20 20 73 | 74 72 75 63 74 20 73 74 |/.X s|truct st|
|000047a0| 61 74 20 69 6e 66 6f 3b | 0a 58 0a 58 20 20 20 20 |at info;|.X.X |
|000047b0| 28 76 6f 69 64 29 20 66 | 70 72 69 6e 74 66 20 28 |(void) f|printf (|
|000047c0| 20 66 70 2c 20 22 3a 25 | 73 2c 25 73 2c 25 73 21 | fp, ":%|s,%s,%s!|
|000047d0| 5c 6e 22 2c 20 75 73 65 | 72 63 6f 64 65 28 29 2c |\n", use|rcode(),|
|000047e0| 20 74 65 72 6d 2c 20 66 | 69 6c 65 20 29 3b 0a 58 | term, f|ile );.X|
|000047f0| 20 20 20 20 28 76 6f 69 | 64 29 20 66 63 6c 6f 73 | (voi|d) fclos|
|00004800| 65 20 28 20 66 70 20 29 | 3b 0a 58 20 20 20 20 69 |e ( fp )|;.X i|
|00004810| 66 20 28 20 73 74 61 74 | 20 28 20 74 65 72 6d 2c |f ( stat| ( term,|
|00004820| 20 26 69 6e 66 6f 20 29 | 20 3d 3d 20 30 20 29 20 | &info )| == 0 ) |
|00004830| 2f 2a 20 6d 61 6b 65 20 | 75 73 65 72 27 73 20 74 |/* make |user's t|
|00004840| 65 72 6d 69 6e 61 6c 20 | 77 6f 72 6c 64 20 77 72 |erminal |world wr|
|00004850| 69 74 65 61 62 6c 65 20 | 2a 2f 0a 58 20 20 20 20 |iteable |*/.X |
|00004860| 20 20 28 76 6f 69 64 29 | 20 63 68 6d 6f 64 20 28 | (void)| chmod (|
|00004870| 20 74 65 72 6d 2c 20 28 | 69 6e 74 29 20 69 6e 66 | term, (|int) inf|
|00004880| 6f 2e 73 74 5f 6d 6f 64 | 65 20 26 20 30 37 37 37 |o.st_mod|e & 0777|
|00004890| 37 20 7c 20 30 32 20 29 | 3b 20 2f 2a 20 73 6f 20 |7 | 02 )|; /* so |
|000048a0| 68 65 20 63 61 6e 20 2a | 2f 0a 58 20 20 7d 20 20 |he can *|/.X } |
|000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 62 65 | | /* be|
|000048d0| 20 74 6f 6c 64 20 77 68 | 65 6e 20 67 6f 73 69 70 | told wh|en gosip|
|000048e0| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 20 61 67 | is avai|lable ag|
|000048f0| 61 69 6e 20 2a 2f 0a 58 | 20 20 72 65 74 75 72 6e |ain */.X| return|
|00004900| 20 30 3b 0a 58 7d 0a 58 | 0a 58 2f 2a 20 20 76 6f | 0;.X}.X|.X/* vo|
|00004910| 69 64 20 69 6e 66 6f 72 | 6d 5f 75 73 65 72 73 28 |id infor|m_users(|
|00004920| 29 0a 58 20 2a 0a 58 20 | 2a 20 20 54 68 69 73 20 |).X *.X |* This |
|00004930| 72 6f 75 74 69 6e 65 20 | 77 69 6c 6c 20 61 74 74 |routine |will att|
|00004940| 65 6d 70 74 20 74 6f 20 | 77 72 69 74 65 20 61 20 |empt to |write a |
|00004950| 6d 65 73 73 61 67 65 20 | 74 6f 20 65 61 63 68 20 |message |to each |
|00004960| 6f 66 20 74 68 65 20 75 | 73 65 72 73 20 69 6e 20 |of the u|sers in |
|00004970| 74 68 65 0a 58 20 2a 20 | 20 44 4f 57 4e 5f 46 49 |the.X * | DOWN_FI|
|00004980| 4c 45 2c 20 74 6f 20 74 | 65 6c 6c 20 74 68 65 6d |LE, to t|ell them|
|00004990| 20 74 68 61 74 20 67 6f | 73 69 70 20 69 73 20 75 | that go|sip is u|
|000049a0| 70 20 61 67 61 69 6e 2e | 0a 58 20 2a 2f 0a 58 76 |p again.|.X */.Xv|
|000049b0| 6f 69 64 20 69 6e 66 6f | 72 6d 5f 75 73 65 72 73 |oid info|rm_users|
|000049c0| 28 29 0a 58 7b 0a 58 20 | 20 46 49 4c 45 20 2a 66 |().X{.X | FILE *f|
|000049d0| 70 20 3d 20 66 6f 70 65 | 6e 20 28 20 44 4f 57 4e |p = fope|n ( DOWN|
|000049e0| 5f 46 49 4c 45 2c 20 22 | 72 22 20 29 3b 0a 58 20 |_FILE, "|r" );.X |
|000049f0| 20 63 68 61 72 20 6c 69 | 6e 65 5b 34 30 5d 3b 0a | char li|ne[40];.|
|00004a00| 58 0a 58 20 20 69 66 20 | 28 20 21 20 66 70 20 29 |X.X if |( ! fp )|
|00004a10| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 3b 0a 58 20 |.X re|turn;.X |
|00004a20| 20 77 68 69 6c 65 20 28 | 20 66 67 65 74 73 20 28 | while (| fgets (|
|00004a30| 20 6c 69 6e 65 2c 20 34 | 30 2c 20 66 70 20 29 20 | line, 4|0, fp ) |
|00004a40| 29 0a 58 20 20 7b 0a 58 | 20 20 20 20 63 68 61 72 |).X {.X| char|
|00004a50| 20 63 6f 64 65 5b 31 30 | 5d 2c 20 74 65 72 6d 5b | code[10|], term[|
|00004a60| 31 32 5d 2c 20 66 69 6c | 65 5b 31 35 5d 3b 0a 58 |12], fil|e[15];.X|
|00004a70| 20 20 20 20 46 49 4c 45 | 20 2a 77 72 3b 0a 58 0a | FILE| *wr;.X.|
|00004a80| 58 20 20 20 20 69 66 20 | 28 20 21 20 70 61 72 73 |X if |( ! pars|
|00004a90| 65 20 28 20 6c 69 6e 65 | 2c 20 63 6f 64 65 2c 20 |e ( line|, code, |
|00004aa0| 74 65 72 6d 2c 20 66 69 | 6c 65 20 29 20 29 0a 58 |term, fi|le ) ).X|
|00004ab0| 20 20 20 20 20 20 63 6f | 6e 74 69 6e 75 65 3b 0a | co|ntinue;.|
|00004ac0| 58 20 20 20 20 28 76 6f | 69 64 29 20 70 72 69 6e |X (vo|id) prin|
|00004ad0| 74 66 20 28 20 22 49 6e | 66 6f 72 6d 69 6e 67 20 |tf ( "In|forming |
|00004ae0| 25 73 20 2e 2e 2e 22 2c | 20 63 6f 64 65 20 29 3b |%s ...",| code );|
|00004af0| 0a 58 20 20 20 20 28 76 | 6f 69 64 29 20 66 66 6c |.X (v|oid) ffl|
|00004b00| 75 73 68 20 28 20 73 74 | 64 6f 75 74 20 29 3b 0a |ush ( st|dout );.|
|00004b10| 58 20 20 20 20 69 66 20 | 28 20 77 72 20 3d 20 66 |X if |( wr = f|
|00004b20| 6f 70 65 6e 20 28 20 74 | 65 72 6d 2c 20 22 77 22 |open ( t|erm, "w"|
|00004b30| 20 29 20 29 0a 58 20 20 | 20 20 7b 0a 58 20 20 20 | ) ).X | {.X |
|00004b40| 20 20 20 73 74 72 75 63 | 74 20 73 74 61 74 20 69 | struc|t stat i|
|00004b50| 6e 66 6f 3b 0a 58 0a 58 | 20 20 20 20 20 20 28 76 |nfo;.X.X| (v|
|00004b60| 6f 69 64 29 20 66 70 72 | 69 6e 74 66 20 28 20 77 |oid) fpr|intf ( w|
|00004b70| 72 2c 20 22 5c 30 30 37 | 5c 72 5c 6e 2a 2a 20 54 |r, "\007|\r\n** T|
|00004b80| 68 65 20 25 73 20 66 69 | 6c 65 20 69 73 20 6e 6f |he %s fi|le is no|
|00004b90| 77 20 69 6e 20 73 65 72 | 76 69 63 65 20 61 67 61 |w in ser|vice aga|
|00004ba0| 69 6e 2e 20 2a 2a 5c 72 | 5c 6e 22 2c 20 66 69 6c |in. **\r|\n", fil|
|00004bb0| 65 20 29 3b 0a 58 20 20 | 20 20 20 20 28 76 6f 69 |e );.X | (voi|
|00004bc0| 64 29 20 66 63 6c 6f 73 | 65 20 28 20 77 72 20 29 |d) fclos|e ( wr )|
|00004bd0| 3b 0a 58 20 20 20 20 20 | 20 69 66 20 28 20 73 74 |;.X | if ( st|
|00004be0| 61 74 20 28 20 74 65 72 | 6d 2c 20 26 69 6e 66 6f |at ( ter|m, &info|
|00004bf0| 20 29 20 3d 3d 20 30 20 | 29 20 2f 2a 20 66 75 74 | ) == 0 |) /* fut|
|00004c00| 69 6c 65 20 61 74 74 65 | 6d 70 74 20 74 6f 20 70 |ile atte|mpt to p|
|00004c10| 72 6f 74 65 63 74 20 74 | 68 65 20 2a 2f 0a 58 20 |rotect t|he */.X |
|00004c20| 20 20 20 20 20 20 20 28 | 76 6f 69 64 29 20 63 68 | (|void) ch|
|00004c30| 6d 6f 64 20 28 20 74 65 | 72 6d 2c 20 28 69 6e 74 |mod ( te|rm, (int|
|00004c40| 29 20 69 6e 66 6f 2e 73 | 74 5f 6d 6f 64 65 20 26 |) info.s|t_mode &|
|00004c50| 20 30 37 37 37 35 20 29 | 3b 20 2f 2a 20 74 65 72 | 07775 )|; /* ter|
|00004c60| 6d 69 6e 61 6c 20 61 67 | 61 69 6e 20 2a 2f 0a 58 |minal ag|ain */.X|
|00004c70| 20 20 20 20 20 20 70 75 | 74 73 20 28 20 22 20 64 | pu|ts ( " d|
|00004c80| 6f 6e 65 2e 22 20 29 3b | 0a 58 20 20 20 20 7d 0a |one." );|.X }.|
|00004c90| 58 20 20 20 20 65 6c 73 | 65 0a 58 20 20 20 20 20 |X els|e.X |
|00004ca0| 20 70 75 74 73 20 28 20 | 22 20 63 6f 75 6c 64 6e | puts ( |" couldn|
|00004cb0| 27 74 20 77 72 69 74 65 | 20 68 69 73 20 74 65 72 |'t write| his ter|
|00004cc0| 6d 69 6e 61 6c 2e 22 20 | 29 3b 0a 58 20 20 7d 0a |minal." |);.X }.|
|00004cd0| 58 20 20 28 76 6f 69 64 | 29 20 66 63 6c 6f 73 65 |X (void|) fclose|
|00004ce0| 20 28 20 66 70 20 29 3b | 0a 58 7d 0a 58 0a 58 2f | ( fp );|.X}.X.X/|
|00004cf0| 2a 20 20 76 6f 69 64 20 | 63 68 65 63 6b 5f 69 66 |* void |check_if|
|00004d00| 5f 75 70 28 29 0a 58 20 | 2a 0a 58 20 2a 20 20 43 |_up().X |*.X * C|
|00004d10| 68 65 63 6b 73 20 66 6f | 72 20 74 68 65 20 70 72 |hecks fo|r the pr|
|00004d20| 65 73 65 6e 63 65 20 6f | 66 20 44 4f 57 4e 5f 46 |esence o|f DOWN_F|
|00004d30| 49 4c 45 2e 20 20 49 66 | 20 69 74 20 65 78 69 73 |ILE. If| it exis|
|00004d40| 74 73 2c 20 69 74 20 69 | 6e 64 69 63 61 74 65 73 |ts, it i|ndicates|
|00004d50| 20 74 68 61 74 0a 58 20 | 2a 20 20 67 6f 73 69 70 | that.X |* gosip|
|00004d60| 20 69 73 20 64 6f 77 6e | 2e 20 20 49 66 20 74 68 | is down|. If th|
|00004d70| 65 20 75 73 65 72 20 69 | 73 20 53 55 50 45 52 5f |e user i|s SUPER_|
|00004d80| 55 53 45 52 2c 20 69 74 | 20 6a 75 73 74 20 70 72 |USER, it| just pr|
|00004d90| 69 6e 74 73 20 61 20 77 | 61 72 6e 69 6e 67 0a 58 |ints a w|arning.X|
|00004da0| 20 2a 20 20 6d 65 73 73 | 61 67 65 2c 20 6f 74 68 | * mess|age, oth|
|00004db0| 65 72 77 69 73 65 20 69 | 74 20 63 61 6c 6c 73 20 |erwise i|t calls |
|00004dc0| 61 64 64 5f 75 73 65 72 | 28 29 20 61 6e 64 20 70 |add_user|() and p|
|00004dd0| 72 69 6e 74 73 20 61 6e | 20 61 70 70 72 6f 70 69 |rints an| appropi|
|00004de0| 61 74 65 20 6d 65 73 73 | 61 67 65 0a 58 20 2a 20 |ate mess|age.X * |
|00004df0| 20 64 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 74 68 | dependi|ng on th|
|00004e00| 65 20 72 65 74 75 72 6e | 20 76 61 6c 75 65 2e 0a |e return| value..|
|00004e10| 58 20 2a 2f 0a 58 76 6f | 69 64 20 63 68 65 63 6b |X */.Xvo|id check|
|00004e20| 5f 69 66 5f 75 70 28 29 | 0a 58 7b 0a 58 20 20 69 |_if_up()|.X{.X i|
|00004e30| 66 20 28 20 61 63 63 65 | 73 73 20 28 20 44 4f 57 |f ( acce|ss ( DOW|
|00004e40| 4e 5f 46 49 4c 45 2c 20 | 46 5f 4f 4b 20 29 20 3d |N_FILE, |F_OK ) =|
|00004e50| 3d 20 2d 31 20 29 0a 58 | 20 20 20 20 72 65 74 75 |= -1 ).X| retu|
|00004e60| 72 6e 3b 20 20 20 20 2f | 2a 20 6f 75 67 68 74 20 |rn; /|* ought |
|00004e70| 72 65 61 6c 6c 79 20 74 | 6f 20 63 68 65 63 6b 20 |really t|o check |
|00004e80| 74 68 61 74 20 6f 77 6e | 65 72 20 3d 3d 20 53 55 |that own|er == SU|
|00004e90| 50 45 52 5f 55 53 45 52 | 20 2a 2f 0a 58 20 20 65 |PER_USER| */.X e|
|00004ea0| 6c 73 65 0a 58 20 20 20 | 20 69 66 20 28 20 21 20 |lse.X | if ( ! |
|00004eb0| 73 74 72 63 6d 70 20 28 | 20 75 73 65 72 63 6f 64 |strcmp (| usercod|
|00004ec0| 65 28 29 2c 20 53 55 50 | 45 52 5f 55 53 45 52 20 |e(), SUP|ER_USER |
|00004ed0| 29 20 29 0a 58 20 20 20 | 20 7b 0a 58 20 20 20 20 |) ).X | {.X |
|00004ee0| 20 20 28 76 6f 69 64 29 | 20 70 72 69 6e 74 66 20 | (void)| printf |
|00004ef0| 28 20 22 57 61 72 6e 69 | 6e 67 3a 20 25 73 20 69 |( "Warni|ng: %s i|
|00004f00| 73 20 64 6f 77 6e 2e 5c | 6e 5c 6e 22 2c 20 66 69 |s down.\|n\n", fi|
|00004f10| 6c 65 20 29 3b 0a 58 20 | 20 20 20 20 20 72 65 74 |le );.X | ret|
|00004f20| 75 72 6e 3b 0a 58 20 20 | 20 20 7d 0a 58 20 20 69 |urn;.X | }.X i|
|00004f30| 66 20 28 20 61 64 64 5f | 75 73 65 72 28 29 20 29 |f ( add_|user() )|
|00004f40| 0a 58 20 20 7b 0a 58 20 | 20 20 20 28 76 6f 69 64 |.X {.X | (void|
|00004f50| 29 20 70 72 69 6e 74 66 | 20 28 20 22 5c 30 30 37 |) printf| ( "\007|
|00004f60| 49 27 76 65 20 61 6c 72 | 65 61 64 79 20 74 6f 6c |I've alr|eady tol|
|00004f70| 64 20 79 6f 75 20 74 68 | 61 74 20 74 68 65 20 25 |d you th|at the %|
|00004f80| 73 20 66 69 6c 65 73 20 | 61 72 65 20 64 6f 77 6e |s files |are down|
|00004f90| 2e 5c 6e 22 2c 20 66 69 | 6c 65 20 29 3b 0a 58 20 |.\n", fi|le );.X |
|00004fa0| 20 20 20 70 75 74 73 20 | 28 20 22 59 6f 75 27 6c | puts |( "You'l|
|00004fb0| 6c 20 62 65 20 74 6f 6c | 64 20 77 68 65 6e 20 73 |l be tol|d when s|
|00004fc0| 65 72 76 69 63 65 20 69 | 73 20 72 65 73 74 6f 72 |ervice i|s restor|
|00004fd0| 65 64 2c 20 70 72 6f 76 | 69 64 65 64 20 79 6f 75 |ed, prov|ided you|
|00004fe0| 72 20 74 65 72 6d 69 6e | 61 6c 20 69 73 20 77 72 |r termin|al is wr|
|00004ff0| 69 74 65 61 62 6c 65 2e | 22 20 29 3b 0a 58 20 20 |iteable.|" );.X |
|00005000| 7d 0a 58 20 20 65 6c 73 | 65 0a 58 20 20 7b 0a 58 |}.X els|e.X {.X|
|00005010| 20 20 20 20 46 49 4c 45 | 20 2a 66 70 20 3d 20 66 | FILE| *fp = f|
|00005020| 6f 70 65 6e 20 28 20 44 | 4f 57 4e 5f 46 49 4c 45 |open ( D|OWN_FILE|
|00005030| 2c 20 22 72 22 20 29 3b | 0a 58 20 20 20 20 63 68 |, "r" );|.X ch|
|00005040| 61 72 20 6d 65 73 5b 38 | 30 5d 2c 20 2a 74 65 6d |ar mes[8|0], *tem|
|00005050| 70 3b 0a 58 20 20 20 20 | 65 78 74 65 72 6e 20 63 |p;.X |extern c|
|00005060| 68 61 72 20 2a 72 69 6e | 64 65 78 28 29 3b 0a 58 |har *rin|dex();.X|
|00005070| 0a 58 20 20 20 20 28 76 | 6f 69 64 29 20 66 67 65 |.X (v|oid) fge|
|00005080| 74 73 20 28 20 6d 65 73 | 2c 20 38 30 2c 20 66 70 |ts ( mes|, 80, fp|
|00005090| 20 29 3b 0a 58 20 20 20 | 20 69 66 20 28 20 74 65 | );.X | if ( te|
|000050a0| 6d 70 20 3d 20 72 69 6e | 64 65 78 20 28 20 6d 65 |mp = rin|dex ( me|
|000050b0| 73 2c 20 27 5c 6e 27 20 | 29 20 29 0a 58 20 20 20 |s, '\n' |) ).X |
|000050c0| 20 20 20 2a 74 65 6d 70 | 20 3d 20 27 5c 30 27 3b | *temp| = '\0';|
|000050d0| 0a 58 20 20 20 20 28 76 | 6f 69 64 29 20 70 72 69 |.X (v|oid) pri|
|000050e0| 6e 74 66 20 28 20 22 53 | 6f 72 72 79 2c 20 74 68 |ntf ( "S|orry, th|
|000050f0| 65 20 25 73 20 66 69 6c | 65 20 69 73 20 64 6f 77 |e %s fil|e is dow|
|00005100| 6e 20 66 6f 72 20 6d 61 | 69 6e 74 65 6e 61 6e 63 |n for ma|intenanc|
|00005110| 65 2e 5c 6e 22 2c 20 66 | 69 6c 65 20 29 3b 0a 58 |e.\n", f|ile );.X|
|00005120| 20 20 20 20 28 76 6f 69 | 64 29 20 70 72 69 6e 74 | (voi|d) print|
|00005130| 66 20 28 20 22 5c 74 2e | 2e 2e 20 25 73 2e 5c 6e |f ( "\t.|.. %s.\n|
|00005140| 22 2c 20 6d 65 73 20 29 | 3b 0a 58 20 20 20 20 70 |", mes )|;.X p|
|00005150| 75 74 73 20 28 20 22 59 | 6f 75 20 77 69 6c 6c 20 |uts ( "Y|ou will |
|00005160| 70 72 6f 62 61 62 6c 79 | 20 62 65 20 69 6e 66 6f |probably| be info|
|00005170| 72 6d 65 64 20 77 68 65 | 6e 20 69 74 20 72 65 74 |rmed whe|n it ret|
|00005180| 75 72 6e 73 20 74 6f 20 | 73 65 72 76 69 63 65 2e |urns to |service.|
|00005190| 22 20 29 3b 0a 58 20 20 | 7d 0a 58 20 20 65 78 69 |" );.X |}.X exi|
|000051a0| 74 20 28 20 31 20 29 3b | 0a 58 7d 0a 45 4e 44 5f |t ( 1 );|.X}.END_|
|000051b0| 4f 46 5f 46 49 4c 45 0a | 69 66 20 74 65 73 74 20 |OF_FILE.|if test |
|000051c0| 34 34 35 36 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |4456 -ne| `wc -c |
|000051d0| 3c 27 63 6f 6e 74 72 6f | 6c 2e 63 27 60 3b 20 74 |<'contro|l.c'`; t|
|000051e0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|000051f0| 72 3a 20 5c 22 27 63 6f | 6e 74 72 6f 6c 2e 63 27 |r: \"'co|ntrol.c'|
|00005200| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00005210| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00005220| 23 20 65 6e 64 20 6f 66 | 20 27 63 6f 6e 74 72 6f |# end of| 'contro|
|00005230| 6c 2e 63 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |l.c'.fi.|if test |
|00005240| 2d 66 20 27 63 6f 6e 74 | 72 6f 6c 2e 68 27 20 2d |-f 'cont|rol.h' -|
|00005250| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00005260| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00005270| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00005280| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00005290| 66 69 6c 65 20 5c 22 27 | 63 6f 6e 74 72 6f 6c 2e |file \"'|control.|
|000052a0| 68 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |h'\".els|e.echo s|
|000052b0| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|000052c0| 5c 22 27 63 6f 6e 74 72 | 6f 6c 2e 68 27 5c 22 20 |\"'contr|ol.h'\" |
|000052d0| 5c 28 31 34 38 36 20 63 | 68 61 72 61 63 74 65 72 |\(1486 c|haracter|
|000052e0| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|000052f0| 20 3e 27 63 6f 6e 74 72 | 6f 6c 2e 68 27 20 3c 3c | >'contr|ol.h' <<|
|00005300| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2f |'END_OF_|FILE'.X/|
|00005310| 2a 20 20 54 68 69 73 20 | 6d 6f 64 75 6c 65 20 63 |* This |module c|
|00005320| 6f 6e 74 61 69 6e 73 20 | 72 6f 75 74 69 6e 65 73 |ontains |routines|
|00005330| 20 74 68 61 74 20 63 61 | 6e 20 62 65 20 75 73 65 | that ca|n be use|
|00005340| 64 20 74 6f 20 73 74 6f | 70 20 70 65 6f 70 6c 65 |d to sto|p people|
|00005350| 20 66 72 6f 6d 20 75 73 | 69 6e 67 0a 58 20 2a 20 | from us|ing.X * |
|00005360| 20 67 6f 73 69 70 2e 20 | 20 54 68 69 73 20 77 6f | gosip. | This wo|
|00005370| 75 6c 64 20 62 65 20 6e | 65 65 64 65 64 2c 20 66 |uld be n|eeded, f|
|00005380| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 69 66 20 61 |or examp|le, if a|
|00005390| 20 6e 65 77 20 76 65 72 | 73 69 6f 6e 20 77 61 73 | new ver|sion was|
|000053a0| 20 74 6f 20 62 65 0a 58 | 20 2a 20 20 69 6e 73 74 | to be.X| * inst|
|000053b0| 61 6c 6c 65 64 20 77 68 | 69 63 68 20 75 73 65 64 |alled wh|ich used|
|000053c0| 20 61 20 64 69 66 66 65 | 72 65 6e 74 20 6c 6f 63 | a diffe|rent loc|
|000053d0| 6b 20 6d 65 63 68 61 6e | 69 73 6d 2e 0a 58 20 2a |k mechan|ism..X *|
|000053e0| 2f 0a 58 0a 58 2f 2a 20 | 20 62 79 74 65 20 61 64 |/.X.X/* | byte ad|
|000053f0| 64 5f 75 73 65 72 28 29 | 0a 58 20 2a 20 20 0a 58 |d_user()|.X * .X|
|00005400| 20 2a 20 20 49 66 20 74 | 68 65 20 67 6f 73 69 70 | * If t|he gosip|
|00005410| 20 66 69 6c 65 73 20 61 | 72 65 20 64 6f 77 6e 2c | files a|re down,|
|00005420| 20 61 64 64 5f 75 73 65 | 72 28 29 20 77 69 6c 6c | add_use|r() will|
|00005430| 20 63 68 65 63 6b 20 44 | 4f 57 4e 5f 46 49 4c 45 | check D|OWN_FILE|
|00005440| 20 66 6f 72 20 74 68 65 | 0a 58 20 2a 20 20 75 73 | for the|.X * us|
|00005450| 65 72 27 73 20 63 6f 64 | 65 2e 20 20 49 66 20 68 |er's cod|e. If h|
|00005460| 65 20 69 73 20 6d 65 6e | 74 69 6f 6e 65 64 2c 20 |e is men|tioned, |
|00005470| 69 74 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 31 |it will |return 1|
|00005480| 2e 20 20 49 66 20 68 65 | 20 69 73 6e 27 74 2c 0a |. If he| isn't,.|
|00005490| 58 20 2a 20 20 61 64 64 | 5f 75 73 65 72 28 29 20 |X * add|_user() |
|000054a0| 63 68 65 63 6b 73 20 68 | 65 27 73 20 6f 6e 20 61 |checks h|e's on a|
|000054b0| 20 74 65 72 6d 69 6e 61 | 6c 2c 20 61 6e 64 20 74 | termina|l, and t|
|000054c0| 68 65 6e 20 61 64 64 73 | 20 61 20 6c 69 6e 65 20 |hen adds| a line |
|000054d0| 74 6f 20 44 4f 57 4e 5f | 46 49 4c 45 20 69 6e 0a |to DOWN_|FILE in.|
|000054e0| 58 20 2a 20 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |X * the| format |
|000054f0| 22 3a 3c 75 73 65 72 63 | 6f 64 65 3e 2c 3c 74 65 |":<userc|ode>,<te|
|00005500| 72 6d 69 6e 61 6c 3e 2c | 3c 66 69 6c 65 3e 21 22 |rminal>,|<file>!"|
|00005510| 2e 0a 58 20 2a 2f 0a 58 | 65 78 74 65 72 6e 20 62 |..X */.X|extern b|
|00005520| 79 74 65 20 61 64 64 5f | 75 73 65 72 28 29 3b 0a |yte add_|user();.|
|00005530| 58 0a 58 2f 2a 20 20 76 | 6f 69 64 20 69 6e 66 6f |X.X/* v|oid info|
|00005540| 72 6d 5f 75 73 65 72 73 | 28 29 0a 58 20 2a 0a 58 |rm_users|().X *.X|
|00005550| 20 2a 20 20 54 68 69 73 | 20 72 6f 75 74 69 6e 65 | * This| routine|
|00005560| 20 77 69 6c 6c 20 61 74 | 74 65 6d 70 74 20 74 6f | will at|tempt to|
|00005570| 20 77 72 69 74 65 20 61 | 20 6d 65 73 73 61 67 65 | write a| message|
|00005580| 20 74 6f 20 65 61 63 68 | 20 6f 66 20 74 68 65 20 | to each| of the |
|00005590| 75 73 65 72 73 20 69 6e | 20 74 68 65 0a 58 20 2a |users in| the.X *|
|000055a0| 20 20 44 4f 57 4e 5f 46 | 49 4c 45 2c 20 74 6f 20 | DOWN_F|ILE, to |
|000055b0| 74 65 6c 6c 20 74 68 65 | 6d 20 74 68 61 74 20 67 |tell the|m that g|
|000055c0| 6f 73 69 70 20 69 73 20 | 75 70 20 61 67 61 69 6e |osip is |up again|
|000055d0| 2e 0a 58 20 2a 2f 0a 58 | 65 78 74 65 72 6e 20 76 |..X */.X|extern v|
|000055e0| 6f 69 64 20 69 6e 66 6f | 72 6d 5f 75 73 65 72 73 |oid info|rm_users|
|000055f0| 28 29 3b 0a 58 0a 58 2f | 2a 20 20 76 6f 69 64 20 |();.X.X/|* void |
|00005600| 63 68 65 63 6b 5f 69 66 | 5f 75 70 28 29 0a 58 20 |check_if|_up().X |
|00005610| 2a 0a 58 20 2a 20 20 43 | 68 65 63 6b 73 20 66 6f |*.X * C|hecks fo|
|00005620| 72 20 74 68 65 20 70 72 | 65 73 65 6e 63 65 20 6f |r the pr|esence o|
|00005630| 66 20 44 4f 57 4e 5f 46 | 49 4c 45 2e 20 20 49 74 |f DOWN_F|ILE. It|
|00005640| 27 73 20 65 78 69 73 74 | 61 6e 63 65 20 77 6f 75 |'s exist|ance wou|
|00005650| 6c 64 20 69 6e 64 69 63 | 61 74 65 20 74 68 61 74 |ld indic|ate that|
|00005660| 0a 58 20 2a 20 20 67 6f | 73 69 70 20 69 73 20 64 |.X * go|sip is d|
|00005670| 6f 77 6e 2e 20 20 49 66 | 20 74 68 65 20 75 73 65 |own. If| the use|
|00005680| 72 20 69 73 20 53 55 50 | 45 52 5f 55 53 45 52 2c |r is SUP|ER_USER,|
|00005690| 20 69 74 20 6a 75 73 74 | 20 70 72 69 6e 74 73 20 | it just| prints |
|000056a0| 61 20 77 61 72 6e 69 6e | 67 0a 58 20 2a 20 20 6d |a warnin|g.X * m|
|000056b0| 65 73 73 61 67 65 2c 20 | 6f 74 68 65 72 77 69 73 |essage, |otherwis|
|000056c0| 65 20 61 6e 20 65 6e 74 | 72 79 20 69 73 20 61 64 |e an ent|ry is ad|
|000056d0| 64 65 64 20 74 6f 20 44 | 4f 57 4e 5f 46 49 4c 45 |ded to D|OWN_FILE|
|000056e0| 2c 20 69 66 20 6e 65 63 | 65 73 73 61 72 79 2c 20 |, if nec|essary, |
|000056f0| 61 6e 64 20 61 6e 0a 58 | 20 2a 20 20 61 70 70 72 |and an.X| * appr|
|00005700| 6f 70 69 61 74 65 20 6d | 65 73 73 61 67 65 20 70 |opiate m|essage p|
|00005710| 72 69 6e 74 65 64 2e 0a | 58 20 2a 2f 0a 58 65 78 |rinted..|X */.Xex|
|00005720| 74 65 72 6e 20 76 6f 69 | 64 20 63 68 65 63 6b 5f |tern voi|d check_|
|00005730| 69 66 5f 75 70 28 29 3b | 0a 58 0a 58 23 69 66 64 |if_up();|.X.X#ifd|
|00005740| 65 66 20 52 45 41 4c 0a | 58 23 64 65 66 69 6e 65 |ef REAL.|X#define|
|00005750| 20 44 4f 57 4e 5f 46 49 | 4c 45 20 22 2f 74 6d 70 | DOWN_FI|LE "/tmp|
|00005760| 2f 73 75 74 65 63 68 22 | 20 2f 2a 20 44 4f 57 4e |/sutech"| /* DOWN|
|00005770| 5f 46 49 4c 45 20 65 78 | 69 73 74 73 20 77 68 65 |_FILE ex|ists whe|
|00005780| 6e 20 67 6f 73 69 70 20 | 69 73 20 64 6f 77 6e 2e |n gosip |is down.|
|00005790| 20 2a 2f 0a 58 23 65 6c | 73 65 20 52 45 41 4c 20 | */.X#el|se REAL |
|000057a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057b0| 20 20 20 20 20 2f 2a 20 | 49 74 20 69 73 20 63 72 | /* |It is cr|
|000057c0| 65 61 74 65 64 20 62 79 | 20 74 68 65 20 2d 23 20 |eated by| the -# |
|000057d0| 6f 70 74 69 6f 6e 20 61 | 6e 64 20 2a 2f 0a 58 23 |option a|nd */.X#|
|000057e0| 64 65 66 69 6e 65 20 44 | 4f 57 4e 5f 46 49 4c 45 |define D|OWN_FILE|
|000057f0| 20 22 2f 74 6d 70 2f 66 | 72 6f 67 22 20 20 20 2f | "/tmp/f|rog" /|
|00005800| 2a 20 72 65 6d 6f 76 65 | 64 20 62 79 20 74 68 65 |* remove|d by the|
|00005810| 20 2d 40 20 6f 70 74 69 | 6f 6e 2e 20 2a 2f 0a 58 | -@ opti|on. */.X|
|00005820| 23 65 6e 64 69 66 20 52 | 45 41 4c 0a 58 0a 58 23 |#endif R|EAL.X.X#|
|00005830| 64 65 66 69 6e 65 20 53 | 55 50 45 52 5f 55 53 45 |define S|UPER_USE|
|00005840| 52 20 22 6d 61 75 68 6b | 22 20 20 20 20 20 20 2f |R "mauhk|" /|
|00005850| 2a 20 53 55 50 45 52 5f | 55 53 45 52 20 69 73 20 |* SUPER_|USER is |
|00005860| 69 6d 6d 75 6e 65 20 74 | 6f 20 67 6f 73 69 70 20 |immune t|o gosip |
|00005870| 62 65 69 6e 67 20 64 6f | 77 6e 20 2a 2f 0a 58 20 |being do|wn */.X |
|00005880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|000058a0| 2a 20 61 6e 64 20 69 73 | 20 74 68 65 20 6f 6e 6c |* and is| the onl|
|000058b0| 79 20 6f 6e 65 20 77 68 | 6f 20 63 61 6e 20 75 73 |y one wh|o can us|
|000058c0| 65 20 74 68 65 20 2d 23 | 20 2a 2f 0a 58 20 20 20 |e the -#| */.X |
|000058d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|000058f0| 61 6e 64 20 2d 40 20 6f | 70 74 69 6f 6e 73 2e 20 |and -@ o|ptions. |
|00005900| 2a 2f 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |*/.END_O|F_FILE.i|
|00005910| 66 20 74 65 73 74 20 31 | 34 38 36 20 2d 6e 65 20 |f test 1|486 -ne |
|00005920| 60 77 63 20 2d 63 20 3c | 27 63 6f 6e 74 72 6f 6c |`wc -c <|'control|
|00005930| 2e 68 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.h'`; th|en. e|
|00005940| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 63 6f 6e |cho shar|: \"'con|
|00005950| 74 72 6f 6c 2e 68 27 5c | 22 20 75 6e 70 61 63 6b |trol.h'\|" unpack|
|00005960| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005970| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00005980| 27 63 6f 6e 74 72 6f 6c | 2e 68 27 0a 66 69 0a 69 |'control|.h'.fi.i|
|00005990| 66 20 74 65 73 74 20 2d | 66 20 27 64 77 2e 31 27 |f test -|f 'dw.1'|
|000059a0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000059b0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000059c0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|000059d0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|000059e0| 67 20 66 69 6c 65 20 5c | 22 27 64 77 2e 31 27 5c |g file \|"'dw.1'\|
|000059f0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00005a00| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00005a10| 64 77 2e 31 27 5c 22 20 | 5c 28 32 36 37 32 20 63 |dw.1'\" |\(2672 c|
|00005a20| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00005a30| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 64 77 2e 31 27 |"s/^X//"| >'dw.1'|
|00005a40| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00005a50| 0a 58 2e 54 48 20 44 57 | 20 31 20 22 31 30 20 4a |.X.TH DW| 1 "10 J|
|00005a60| 75 6e 65 20 31 39 38 39 | 22 0a 58 2e 53 48 20 4e |une 1989|".X.SH N|
|00005a70| 41 4d 45 0a 58 64 77 20 | 2d 20 73 68 6f 77 20 63 |AME.Xdw |- show c|
|00005a80| 68 61 6e 67 65 73 20 69 | 6e 20 74 68 65 20 67 6f |hanges i|n the go|
|00005a90| 73 69 70 20 66 69 6c 65 | 73 2e 0a 58 2e 53 48 20 |sip file|s..X.SH |
|00005aa0| 53 59 4e 4f 50 53 49 53 | 0a 58 2e 42 20 64 77 20 |SYNOPSIS|.X.B dw |
|00005ab0| 5b 3c 67 6f 73 69 70 20 | 66 69 6c 65 3e 20 5b 3c |[<gosip |file> [<|
|00005ac0| 67 6f 73 69 70 20 66 69 | 6c 65 3e 20 2e 2e 2e 5d |gosip fi|le> ...]|
|00005ad0| 5d 0a 58 2e 53 48 20 44 | 45 53 43 52 49 50 54 49 |].X.SH D|ESCRIPTI|
|00005ae0| 4f 4e 0a 58 44 77 20 75 | 73 65 73 20 64 69 66 66 |ON.XDw u|ses diff|
|00005af0| 28 31 29 20 74 6f 20 73 | 68 6f 77 20 63 68 61 6e |(1) to s|how chan|
|00005b00| 67 65 73 20 69 6e 20 74 | 68 65 20 73 70 65 63 69 |ges in t|he speci|
|00005b10| 66 69 65 64 20 67 6f 73 | 69 70 20 66 69 6c 65 73 |fied gos|ip files|
|00005b20| 2e 20 20 54 68 69 73 0a | 58 73 61 76 65 73 20 79 |. This.|Xsaves y|
|00005b30| 6f 75 20 68 61 76 69 6e | 67 20 74 6f 20 77 61 64 |ou havin|g to wad|
|00005b40| 65 20 74 68 72 6f 75 67 | 68 20 34 30 4b 20 6f 66 |e throug|h 40K of|
|00005b50| 20 66 69 6c 65 20 6a 75 | 73 74 20 74 6f 20 66 69 | file ju|st to fi|
|00005b60| 6e 64 20 74 68 61 74 20 | 74 68 65 0a 58 6f 6e 6c |nd that |the.Xonl|
|00005b70| 79 20 63 68 61 6e 67 65 | 20 69 73 20 61 20 73 70 |y change| is a sp|
|00005b80| 65 6c 6c 69 6e 67 20 63 | 6f 72 72 65 63 74 69 6f |elling c|orrectio|
|00005b90| 6e 2e 20 20 4f 6e 20 69 | 74 73 20 6f 77 6e 2c 20 |n. On i|ts own, |
|00005ba0| 64 77 20 77 69 6c 6c 20 | 73 68 6f 77 0a 58 63 6f |dw will |show.Xco|
|00005bb0| 6e 74 65 78 74 20 64 69 | 66 66 73 20 66 6f 72 20 |ntext di|ffs for |
|00005bc0| 61 6c 6c 20 67 6f 73 69 | 70 20 66 69 6c 65 73 20 |all gosi|p files |
|00005bd0| 28 6f 62 74 61 69 6e 65 | 64 20 66 72 6f 6d 20 61 |(obtaine|d from a|
|00005be0| 6c 6c 67 6f 73 73 28 31 | 29 29 3b 20 77 69 74 68 |llgoss(1|)); with|
|00005bf0| 0a 58 61 72 67 75 6d 65 | 6e 74 73 2c 20 64 69 66 |.Xargume|nts, dif|
|00005c00| 66 65 72 65 6e 63 65 73 | 20 66 6f 72 20 74 68 6f |ferences| for tho|
|00005c10| 73 65 20 66 69 6c 65 73 | 20 6f 6e 6c 79 2e 20 20 |se files| only. |
|00005c20| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 64 69 |Note tha|t the di|
|00005c30| 66 66 73 20 61 72 65 0a | 58 72 75 6e 20 61 73 79 |ffs are.|Xrun asy|
|00005c40| 6e 63 68 72 6f 6e 6f 75 | 73 6c 79 2c 20 73 6f 20 |nchronou|sly, so |
|00005c50| 64 6f 69 6e 67 20 64 77 | 20 66 6f 72 20 61 20 6c |doing dw| for a l|
|00005c60| 6f 74 20 6f 66 20 66 69 | 6c 65 73 20 77 69 6c 6c |ot of fi|les will|
|00005c70| 20 70 75 73 68 20 74 68 | 65 20 6c 6f 61 64 0a 58 | push th|e load.X|
|00005c80| 61 76 65 72 61 67 65 20 | 75 70 20 71 75 69 74 65 |average |up quite|
|00005c90| 20 61 20 62 69 74 2e 0a | 58 2e 73 70 0a 58 54 68 | a bit..|X.sp.XTh|
|00005ca0| 65 20 63 6f 70 69 65 73 | 20 6f 66 20 74 68 65 20 |e copies| of the |
|00005cb0| 67 6f 73 69 70 20 66 69 | 6c 65 73 20 61 72 65 20 |gosip fi|les are |
|00005cc0| 6b 65 70 74 20 69 6e 20 | 24 48 4f 4d 45 2f 2e 62 |kept in |$HOME/.b|
|00005cd0| 61 63 6b 75 70 73 2e 20 | 20 49 66 20 79 6f 75 20 |ackups. | If you |
|00005ce0| 64 6f 0a 58 6e 6f 74 20 | 68 61 76 65 20 73 75 63 |do.Xnot |have suc|
|00005cf0| 68 20 61 20 64 69 72 65 | 63 74 6f 72 79 2c 20 64 |h a dire|ctory, d|
|00005d00| 77 20 77 69 6c 6c 20 6e | 6f 74 20 77 6f 72 6b 2e |w will n|ot work.|
|00005d10| 0a 58 2e 53 48 20 55 53 | 41 47 45 0a 58 44 77 20 |.X.SH US|AGE.XDw |
|00005d20| 66 69 72 73 74 20 63 6f | 70 69 65 73 20 61 6c 6c |first co|pies all|
|00005d30| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 67 | the spe|cified g|
|00005d40| 6f 73 69 70 20 66 69 6c | 65 73 20 69 6e 74 6f 20 |osip fil|es into |
|00005d50| 24 48 4f 4d 45 2f 2e 62 | 61 63 6b 75 70 73 2c 20 |$HOME/.b|ackups, |
|00005d60| 61 6e 64 0a 58 72 75 6e | 20 64 69 66 66 28 31 29 |and.Xrun| diff(1)|
|00005d70| 20 69 6e 20 74 68 65 20 | 62 61 63 6b 67 72 6f 75 | in the |backgrou|
|00005d80| 6e 64 20 66 6f 72 20 65 | 61 63 68 2e 20 20 49 74 |nd for e|ach. It|
|00005d90| 20 74 68 65 6e 20 6c 6f | 6f 70 73 20 74 68 72 6f | then lo|ops thro|
|00005da0| 75 67 68 20 61 6c 6c 0a | 58 67 6f 73 69 70 20 66 |ugh all.|Xgosip f|
|00005db0| 69 6c 65 73 2c 20 75 6e | 74 69 6c 20 69 74 20 66 |iles, un|til it f|
|00005dc0| 69 6e 64 73 20 6f 6e 65 | 20 66 6f 72 20 77 68 69 |inds one| for whi|
|00005dd0| 63 68 20 64 69 66 66 20 | 68 61 73 20 63 6f 6d 70 |ch diff |has comp|
|00005de0| 6c 65 74 65 64 2e 20 20 | 54 68 65 0a 58 63 68 61 |leted. |The.Xcha|
|00005df0| 6e 67 65 73 2c 20 69 66 | 20 61 6e 79 2c 20 61 72 |nges, if| any, ar|
|00005e00| 65 20 64 69 73 70 6c 61 | 79 65 64 2c 20 66 6f 6c |e displa|yed, fol|
|00005e10| 6c 6f 77 65 64 20 62 79 | 20 74 68 65 20 6c 61 73 |lowed by| the las|
|00005e20| 74 20 66 6f 75 72 20 6c | 69 6e 65 73 20 6f 66 0a |t four l|ines of.|
|00005e30| 58 68 69 73 74 6f 72 79 | 20 69 6e 66 6f 72 6d 61 |Xhistory| informa|
|00005e40| 74 69 6f 6e 20 66 6f 72 | 20 74 68 61 74 20 66 69 |tion for| that fi|
|00005e50| 6c 65 2e 20 20 59 6f 75 | 20 61 72 65 20 74 68 65 |le. You| are the|
|00005e60| 6e 20 70 72 6f 6d 70 74 | 65 64 20 66 6f 72 20 61 |n prompt|ed for a|
|00005e70| 20 63 6f 6d 6d 61 6e 64 | 2e 0a 58 2e 54 50 0a 58 | command|..X.TP.X|
|00005e80| 2e 42 20 62 0a 58 42 61 | 63 6b 75 70 20 74 68 65 |.B b.XBa|ckup the|
|00005e90| 20 6e 65 77 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 | new ver|sion of |
|00005ea0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 67 6f 73 69 |the curr|ent gosi|
|00005eb0| 70 20 66 69 6c 65 2e 20 | 20 45 71 75 69 76 61 6c |p file. | Equival|
|00005ec0| 65 6e 74 20 74 6f 20 6a | 75 73 74 0a 58 70 72 65 |ent to j|ust.Xpre|
|00005ed0| 73 73 69 6e 67 20 72 65 | 74 75 72 6e 2e 0a 58 2e |ssing re|turn..X.|
|00005ee0| 54 50 0a 58 2e 42 20 6e | 0a 58 44 6f 20 6e 6f 74 |TP.X.B n|.XDo not|
|00005ef0| 20 62 61 63 6b 20 74 68 | 69 73 20 66 69 6c 65 20 | back th|is file |
|00005f00| 75 70 2e 0a 58 2e 54 50 | 0a 58 2e 42 20 63 0a 58 |up..X.TP|.X.B c.X|
|00005f10| 42 61 63 6b 20 74 68 69 | 73 20 66 69 6c 65 20 75 |Back thi|s file u|
|00005f20| 70 20 61 6e 64 20 63 68 | 65 63 6b 20 69 74 20 61 |p and ch|eck it a|
|00005f30| 67 61 69 6e 2e 20 20 59 | 6f 75 20 6d 69 67 68 74 |gain. Y|ou might|
|00005f40| 20 77 61 6e 74 20 74 6f | 20 75 73 65 20 74 68 69 | want to| use thi|
|00005f50| 73 0a 58 63 6f 6d 6d 61 | 6e 64 20 69 66 20 74 68 |s.Xcomma|nd if th|
|00005f60| 65 20 68 69 73 74 6f 72 | 79 20 69 6e 66 6f 72 6d |e histor|y inform|
|00005f70| 61 74 69 6f 6e 20 73 68 | 6f 77 73 20 74 68 61 74 |ation sh|ows that|
|00005f80| 20 74 68 65 20 66 69 6c | 65 20 68 61 73 20 62 65 | the fil|e has be|
|00005f90| 65 6e 20 65 64 69 74 65 | 64 0a 58 69 6e 20 74 68 |en edite|d.Xin th|
|00005fa0| 65 20 6c 61 73 74 20 66 | 65 77 20 6d 69 6e 75 74 |e last f|ew minut|
|00005fb0| 65 73 2e 0a 58 2e 54 50 | 0a 58 2e 42 20 43 0a 58 |es..X.TP|.X.B C.X|
|00005fc0| 43 68 65 63 6b 20 74 68 | 69 73 20 66 69 6c 65 20 |Check th|is file |
|00005fd0| 61 67 61 69 6e 20 62 75 | 74 20 64 6f 20 6e 6f 74 |again bu|t do not|
|00005fe0| 20 62 61 63 6b 20 69 74 | 20 75 70 20 66 69 72 73 | back it| up firs|
|00005ff0| 74 2e 0a 58 2e 54 50 0a | 58 2e 42 20 65 0a 58 42 |t..X.TP.|X.B e.XB|
|00006000| 61 63 6b 75 70 20 74 68 | 69 73 20 66 69 6c 65 2c |ackup th|is file,|
|00006010| 20 74 68 65 6e 20 65 64 | 69 74 20 69 74 2e 20 20 | then ed|it it. |
|00006020| 44 77 20 77 69 6c 6c 20 | 75 73 65 20 67 6f 73 69 |Dw will |use gosi|
|00006030| 70 20 2d 63 2c 20 77 69 | 74 68 20 74 68 65 20 65 |p -c, wi|th the e|
|00006040| 78 74 72 61 0a 58 66 69 | 6c 65 20 62 65 69 6e 67 |xtra.Xfi|le being|
|00006050| 20 74 68 65 20 63 6f 6e | 74 65 78 74 20 64 69 66 | the con|text dif|
|00006060| 66 73 2e 20 20 54 68 69 | 73 20 66 6c 61 67 20 63 |fs. Thi|s flag c|
|00006070| 61 75 73 65 73 20 67 6f | 73 69 70 20 74 6f 20 75 |auses go|sip to u|
|00006080| 73 65 20 65 6d 61 63 73 | 20 74 6f 20 65 64 69 74 |se emacs| to edit|
|00006090| 0a 58 74 68 65 20 66 69 | 6c 65 2c 20 61 6e 64 20 |.Xthe fi|le, and |
|000060a0| 6c 6f 61 64 20 74 68 65 | 20 63 6f 6e 74 65 78 74 |load the| context|
|000060b0| 20 64 69 66 66 73 20 69 | 6e 74 6f 20 61 20 73 65 | diffs i|nto a se|
|000060c0| 70 61 72 61 74 65 20 62 | 75 66 66 65 72 2e 0a 58 |parate b|uffer..X|
|000060d0| 2e 73 70 0a 58 57 68 65 | 6e 20 74 68 65 20 65 64 |.sp.XWhe|n the ed|
|000060e0| 69 74 20 66 69 6e 69 73 | 68 65 73 2c 20 64 77 20 |it finis|hes, dw |
|000060f0| 77 69 6c 6c 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |will aut|omatical|
|00006100| 6c 79 20 72 65 63 68 65 | 63 6b 20 74 68 61 74 20 |ly reche|ck that |
|00006110| 66 69 6c 65 2e 20 20 59 | 6f 75 0a 58 6d 69 67 68 |file. Y|ou.Xmigh|
|00006120| 74 20 73 61 79 2c 20 77 | 68 79 20 6e 6f 74 20 6a |t say, w|hy not j|
|00006130| 75 73 74 20 62 61 63 6b | 20 75 70 20 74 68 65 20 |ust back| up the |
|00006140| 6e 65 77 20 76 65 72 73 | 69 6f 6e 2c 20 73 69 6e |new vers|ion, sin|
|00006150| 63 65 20 79 6f 75 20 70 | 72 65 73 75 6d 61 62 6c |ce you p|resumabl|
|00006160| 79 0a 58 6b 6e 6f 77 20 | 77 68 61 74 20 79 6f 75 |y.Xknow |what you|
|00006170| 20 63 68 61 6e 67 65 64 | 2c 20 62 75 74 20 79 6f | changed|, but yo|
|00006180| 75 27 64 20 62 65 20 73 | 75 72 70 72 69 73 65 64 |u'd be s|urprised|
|00006190| 20 68 6f 77 20 6d 61 6e | 79 20 73 70 65 6c 6c 69 | how man|y spelli|
|000061a0| 6e 67 20 65 72 72 6f 72 | 73 0a 58 79 6f 75 20 73 |ng error|s.Xyou s|
|000061b0| 70 6f 74 20 6c 6f 6f 6b | 69 6e 67 20 6f 76 65 72 |pot look|ing over|
|000061c0| 20 74 68 65 20 64 69 66 | 66 73 2e 0a 58 2e 54 50 | the dif|fs..X.TP|
|000061d0| 0a 58 2e 42 20 45 0a 58 | 45 64 69 74 20 74 68 65 |.X.B E.X|Edit the|
|000061e0| 20 66 69 6c 65 20 62 75 | 74 20 64 6f 20 6e 6f 74 | file bu|t do not|
|000061f0| 20 62 61 63 6b 75 70 20 | 69 74 20 75 70 20 66 69 | backup |it up fi|
|00006200| 72 73 74 2e 20 20 55 73 | 65 66 75 6c 20 69 66 20 |rst. Us|eful if |
|00006210| 79 6f 75 20 77 69 73 68 | 20 74 6f 0a 58 72 65 70 |you wish| to.Xrep|
|00006220| 6c 61 63 65 20 73 6f 6d | 65 20 74 65 78 74 20 73 |lace som|e text s|
|00006230| 6f 6d 65 20 63 68 65 65 | 73 65 20 68 65 61 64 20 |ome chee|se head |
|00006240| 68 61 73 20 64 65 6c 65 | 74 65 64 2e 0a 58 2e 54 |has dele|ted..X.T|
|00006250| 50 0a 58 2e 42 20 71 0a | 58 42 61 63 6b 75 70 20 |P.X.B q.|XBackup |
|00006260| 75 70 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 66 |up the c|urrent f|
|00006270| 69 6c 65 20 61 6e 64 20 | 71 75 69 74 20 64 77 2e |ile and |quit dw.|
|00006280| 20 20 54 68 69 73 20 69 | 6e 76 6f 6c 76 65 73 20 | This i|nvolves |
|00006290| 6b 69 6c 6c 69 6e 67 20 | 61 6c 6c 0a 58 64 69 66 |killing |all.Xdif|
|000062a0| 66 73 20 74 68 61 74 20 | 6d 61 79 20 73 74 69 6c |fs that |may stil|
|000062b0| 6c 20 62 65 20 72 75 6e | 6e 69 6e 67 2c 20 61 6e |l be run|ning, an|
|000062c0| 64 20 72 65 6d 6f 76 69 | 6e 67 20 61 6e 79 20 74 |d removi|ng any t|
|000062d0| 65 6d 70 6f 72 61 72 79 | 20 66 69 6c 65 73 2e 0a |emporary| files..|
|000062e0| 58 2e 54 50 0a 58 2e 42 | 20 51 0a 58 51 75 69 74 |X.TP.X.B| Q.XQuit|
|000062f0| 20 77 69 74 68 6f 75 74 | 20 62 61 63 6b 69 6e 67 | without| backing|
|00006300| 20 75 70 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | up the |current |
|00006310| 66 69 6c 65 2e 0a 58 2e | 54 50 0a 58 2e 42 20 61 |file..X.|TP.X.B a|
|00006320| 0a 58 41 64 64 20 61 6e | 6f 74 68 65 72 20 67 6f |.XAdd an|other go|
|00006330| 73 69 70 20 66 69 6c 65 | 20 74 6f 20 74 68 6f 73 |sip file| to thos|
|00006340| 65 20 62 65 69 6e 67 20 | 63 68 65 63 6b 65 64 2e |e being |checked.|
|00006350| 20 20 59 6f 75 20 61 72 | 65 20 70 72 6f 6d 70 74 | You ar|e prompt|
|00006360| 65 64 20 66 6f 72 0a 58 | 74 68 65 20 67 6f 73 69 |ed for.X|the gosi|
|00006370| 70 20 66 69 6c 65 20 79 | 6f 75 20 77 69 73 68 20 |p file y|ou wish |
|00006380| 74 6f 20 61 64 64 2e 0a | 58 2e 53 48 20 46 49 4c |to add..|X.SH FIL|
|00006390| 45 53 0a 58 2e 54 50 20 | 32 30 0a 58 2e 42 20 24 |ES.X.TP |20.X.B $|
|000063a0| 48 4f 4d 45 2f 2e 62 61 | 63 6b 75 70 73 0a 58 44 |HOME/.ba|ckups.XD|
|000063b0| 69 72 65 63 74 6f 72 79 | 20 63 6f 6e 74 61 69 6e |irectory| contain|
|000063c0| 69 6e 67 20 67 6f 73 69 | 70 20 66 69 6c 65 20 62 |ing gosi|p file b|
|000063d0| 61 63 6b 75 70 73 2e 0a | 58 2e 53 48 20 53 45 45 |ackups..|X.SH SEE|
|000063e0| 20 41 4c 53 4f 0a 58 61 | 6c 6c 67 6f 73 73 28 31 | ALSO.Xa|llgoss(1|
|000063f0| 29 2c 20 6c 75 28 31 29 | 2c 20 67 6f 73 73 69 70 |), lu(1)|, gossip|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.