home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / unix_c / usenet / keepnews.tar < prev    next >
Tape Archive  |  1989-03-04  |  24.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: keepnews.tar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (V7), file keepnews/, mode 755 , uid 243 , gid 12 , size 0 , seconds 4404072063 default
98% file data default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 6b 65 65 70 6e 65 77 73 | 2f 00 00 00 00 00 00 00 |keepnews|/.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 34 30 37 32 | 0 | 4404072|
|00000090| 30 36 33 20 20 20 35 36 | 33 34 00 20 00 00 00 00 |063 56|34. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 6b 65 65 70 6e 65 77 73 | 2f 53 68 61 72 46 69 6c |keepnews|/SharFil|
|00000210| 65 2e 48 65 61 64 65 72 | 73 00 00 00 00 00 00 00 |e.Header|s.......|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000280| 20 20 20 34 33 37 30 20 | 20 34 34 30 34 30 37 32 | 4370 | 4404072|
|00000290| 30 36 37 20 20 31 30 37 | 32 33 00 20 00 00 00 00 |067 107|23. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 3d 3d 3d 20 6b 65 65 70 | 6e 65 77 73 2e 73 68 61 |=== keep|news.sha|
|00000410| 72 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |r ======|========|
|00000420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 46 72 6f 6d |========|===.From|
|00000430| 3a 20 6e 6f 61 6f 21 61 | 72 69 7a 6f 6e 61 21 62 |: noao!a|rizona!b|
|00000440| 6f 63 6b 6c 69 6e 21 6d | 6d 73 25 68 61 6f 2e 75 |ocklin!m|ms%hao.u|
|00000450| 75 63 70 40 42 72 6c 2d | 42 6d 64 2e 41 52 50 41 |ucp@Brl-|Bmd.ARPA|
|00000460| 0a 54 6f 3a 20 6e 65 74 | 2e 73 6f 75 72 63 65 73 |.To: net|.sources|
|00000470| 0a 53 75 62 6a 65 63 74 | 3a 20 6b 65 65 70 6e 65 |.Subject|: keepne|
|00000480| 77 73 20 2d 2d 20 41 20 | 55 73 65 6e 65 74 20 6e |ws -- A |Usenet n|
|00000490| 65 77 73 20 61 72 63 68 | 69 76 61 6c 20 73 79 73 |ews arch|ival sys|
|000004a0| 74 65 6d 0a 44 61 74 65 | 3a 20 31 34 20 4d 61 79 |tem.Date|: 14 May|
|000004b0| 20 38 35 20 30 36 3a 34 | 33 3a 32 30 20 47 4d 54 | 85 06:4|3:20 GMT|
|000004c0| 0a 0a 09 09 09 20 20 20 | 20 20 4b 45 45 50 4e 45 |..... | KEEPNE|
|000004d0| 57 53 0a 0a 20 20 20 20 | 20 4b 65 65 70 6e 65 77 |WS.. | Keepnew|
|000004e0| 73 20 69 73 20 61 20 70 | 72 6f 67 72 61 6d 20 74 |s is a p|rogram t|
|000004f0| 68 61 74 20 61 74 74 65 | 6d 70 74 73 20 74 6f 20 |hat atte|mpts to |
|00000500| 70 72 6f 76 69 64 65 20 | 61 20 73 61 6e 65 20 77 |provide |a sane w|
|00000510| 61 79 20 6f 66 0a 20 20 | 20 20 20 65 78 74 72 61 |ay of. | extra|
|00000520| 63 74 69 6e 67 20 61 6e | 64 20 6b 65 65 70 69 6e |cting an|d keepin|
|00000530| 67 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 74 68 |g inform|ation th|
|00000540| 61 74 20 63 6f 6d 65 73 | 20 6f 76 65 72 20 55 73 |at comes| over Us|
|00000550| 65 6e 65 74 2e 0a 20 20 | 20 20 20 54 68 65 20 62 |enet.. | The b|
|00000560| 61 73 69 63 20 69 64 65 | 61 20 69 73 20 74 6f 20 |asic ide|a is to |
|00000570| 61 6c 6c 6f 77 20 75 73 | 65 72 73 20 74 6f 20 64 |allow us|ers to d|
|00000580| 65 73 69 67 6e 61 74 65 | 20 61 6e 20 61 72 74 69 |esignate| an arti|
|00000590| 63 6c 65 0a 20 20 20 20 | 20 61 73 20 62 65 69 6e |cle. | as bein|
|000005a0| 67 20 6f 66 20 73 6f 6d | 65 20 77 6f 72 74 68 20 |g of som|e worth |
|000005b0| 61 6e 64 20 74 68 65 6e | 20 73 61 76 65 20 69 74 |and then| save it|
|000005c0| 20 69 6e 20 61 20 63 6f | 6d 6d 6f 6e 20 70 6c 61 | in a co|mmon pla|
|000005d0| 63 65 2e 0a 20 20 20 20 | 20 54 68 75 73 2c 20 6b |ce.. | Thus, k|
|000005e0| 65 65 70 6e 65 77 73 20 | 70 72 6f 76 69 64 65 73 |eepnews |provides|
|000005f0| 20 61 6e 20 61 6c 74 65 | 72 6e 61 74 69 76 65 20 | an alte|rnative |
|00000600| 74 6f 20 70 65 72 73 6f | 6e 61 6c 20 61 72 63 68 |to perso|nal arch|
|00000610| 69 76 61 6c 0a 20 20 20 | 20 20 6f 66 20 6e 65 77 |ival. | of new|
|00000620| 73 20 61 72 74 69 63 6c | 65 73 2e 20 20 4b 65 65 |s articl|es. Kee|
|00000630| 70 6e 65 77 73 20 68 61 | 73 20 62 65 65 6e 20 69 |pnews ha|s been i|
|00000640| 6e 20 75 73 65 20 68 65 | 72 65 20 61 74 20 74 68 |n use he|re at th|
|00000650| 65 0a 20 20 20 20 20 55 | 6e 69 76 65 72 73 69 74 |e. U|niversit|
|00000660| 79 20 6f 66 20 41 72 69 | 7a 6f 6e 61 20 66 6f 72 |y of Ari|zona for|
|00000670| 20 61 62 6f 75 74 20 74 | 77 6f 20 79 65 61 72 73 | about t|wo years|
|00000680| 20 61 6e 64 20 68 61 73 | 20 70 72 6f 76 65 6e 20 | and has| proven |
|00000690| 74 6f 0a 20 20 20 20 20 | 62 65 20 61 20 73 69 6d |to. |be a sim|
|000006a0| 70 6c 65 20 61 6e 64 20 | 76 69 61 62 6c 65 20 77 |ple and |viable w|
|000006b0| 61 79 20 6f 66 20 63 61 | 74 61 6c 6f 67 69 6e 67 |ay of ca|taloging|
|000006c0| 20 75 73 65 66 75 6c 20 | 69 6e 66 6f 72 6d 61 74 | useful |informat|
|000006d0| 69 6f 6e 0a 20 20 20 20 | 20 74 68 61 74 20 61 72 |ion. | that ar|
|000006e0| 72 69 76 65 73 20 76 69 | 61 20 74 68 65 20 6e 65 |rives vi|a the ne|
|000006f0| 74 2e 0a 0a 20 20 20 20 | 20 4b 65 65 70 6e 65 77 |t... | Keepnew|
|00000700| 73 20 61 63 63 65 70 74 | 73 20 61 20 6e 65 77 73 |s accept|s a news|
|00000710| 20 61 72 74 69 63 6c 65 | 20 6f 6e 20 73 74 61 6e | article| on stan|
|00000720| 64 61 72 64 20 69 6e 70 | 75 74 2c 20 61 6e 61 6c |dard inp|ut, anal|
|00000730| 79 7a 65 73 0a 20 20 20 | 20 20 74 68 65 20 68 65 |yzes. | the he|
|00000740| 61 64 65 72 73 20 6f 66 | 20 74 68 65 20 61 72 74 |aders of| the art|
|00000750| 69 63 6c 65 20 61 6e 64 | 20 73 74 6f 72 65 73 20 |icle and| stores |
|00000760| 74 68 65 20 61 72 74 69 | 63 6c 65 20 69 6e 20 61 |the arti|cle in a|
|00000770| 20 66 69 6c 65 2e 0a 20 | 20 20 20 20 41 72 74 69 | file.. | Arti|
|00000780| 63 6c 65 73 20 61 72 65 | 20 73 74 6f 72 65 64 20 |cles are| stored |
|00000790| 61 73 20 69 6e 64 69 76 | 69 64 75 61 6c 20 66 69 |as indiv|idual fi|
|000007a0| 6c 65 73 20 69 6e 20 61 | 20 74 72 65 65 20 73 74 |les in a| tree st|
|000007b0| 72 75 63 74 75 72 65 0a | 20 20 20 20 20 6d 61 74 |ructure.| mat|
|000007c0| 63 68 69 6e 67 20 74 68 | 61 74 20 6f 66 20 74 68 |ching th|at of th|
|000007d0| 65 20 6e 65 77 73 67 72 | 6f 75 70 20 68 69 65 72 |e newsgr|oup hier|
|000007e0| 61 72 63 68 79 2e 20 20 | 54 68 65 20 41 72 74 69 |archy. |The Arti|
|000007f0| 63 6c 65 2d 49 2e 44 2e | 0a 20 20 20 20 20 69 73 |cle-I.D.|. is|
|00000800| 20 75 73 65 64 20 74 6f | 20 75 6e 69 71 75 65 6c | used to| uniquel|
|00000810| 79 20 69 64 65 6e 74 69 | 66 79 20 61 6e 20 61 72 |y identi|fy an ar|
|00000820| 74 69 63 6c 65 3b 20 65 | 61 63 68 20 61 72 74 69 |ticle; e|ach arti|
|00000830| 63 6c 65 20 69 73 0a 20 | 20 20 20 20 73 74 6f 72 |cle is. | stor|
|00000840| 65 64 20 6f 6e 6c 79 20 | 6f 6e 63 65 2e 20 20 49 |ed only |once. I|
|00000850| 66 20 61 6e 20 61 72 74 | 69 63 6c 65 20 69 73 20 |f an art|icle is |
|00000860| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00000870| 6d 75 6c 74 69 70 6c 65 | 0a 20 20 20 20 20 6e 65 |multiple|. ne|
|00000880| 77 73 67 72 6f 75 70 73 | 2c 20 69 74 20 69 73 20 |wsgroups|, it is |
|00000890| 6c 69 6e 6b 65 64 20 69 | 6e 74 6f 20 61 6c 6c 20 |linked i|nto all |
|000008a0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 64 69 72 65 |appropri|ate dire|
|000008b0| 63 74 6f 72 69 65 73 2e | 0a 20 20 20 20 20 42 6f |ctories.|. Bo|
|000008c0| 74 68 20 61 20 6d 61 73 | 74 65 72 20 6c 6f 67 20 |th a mas|ter log |
|000008d0| 66 69 6c 65 20 28 6b 65 | 70 74 20 69 6e 20 74 68 |file (ke|pt in th|
|000008e0| 65 20 6b 65 65 70 6e 65 | 77 73 20 72 6f 6f 74 20 |e keepne|ws root |
|000008f0| 64 69 72 65 63 74 6f 72 | 79 29 0a 20 20 20 20 20 |director|y). |
|00000900| 61 6e 64 20 69 6e 64 69 | 76 69 64 75 61 6c 20 67 |and indi|vidual g|
|00000910| 72 6f 75 70 20 6c 6f 67 | 20 66 69 6c 65 73 20 28 |roup log| files (|
|00000920| 6b 65 70 74 20 69 6e 20 | 65 61 63 68 20 67 72 6f |kept in |each gro|
|00000930| 75 70 27 73 20 6e 6f 64 | 65 29 0a 20 20 20 20 20 |up's nod|e). |
|00000940| 61 72 65 20 6d 61 69 6e | 74 61 69 6e 65 64 20 77 |are main|tained w|
|00000950| 69 74 68 20 74 68 65 20 | 72 65 6c 65 76 61 6e 74 |ith the |relevant|
|00000960| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 72 65 67 | informa|tion reg|
|00000970| 61 72 64 69 6e 67 20 65 | 61 63 68 0a 20 20 20 20 |arding e|ach. |
|00000980| 20 6f 66 20 74 68 65 20 | 61 72 63 68 69 76 65 64 | of the |archived|
|00000990| 20 66 69 6c 65 73 20 28 | 6e 65 77 73 67 72 6f 75 | files (|newsgrou|
|000009a0| 70 73 2c 20 73 75 62 6a | 65 63 74 2c 20 73 6f 75 |ps, subj|ect, sou|
|000009b0| 72 63 65 2c 20 65 74 63 | 2e 29 2e 0a 0a 20 20 20 |rce, etc|.)... |
|000009c0| 20 20 54 68 65 20 69 6e | 69 74 69 61 6c 20 76 65 | The in|itial ve|
|000009d0| 72 73 69 6f 6e 20 6f 66 | 20 6b 65 65 70 6e 65 77 |rsion of| keepnew|
|000009e0| 73 20 77 61 73 20 77 72 | 69 74 74 65 6e 20 69 6e |s was wr|itten in|
|000009f0| 20 49 63 6f 6e 20 62 79 | 0a 20 20 20 20 20 42 69 | Icon by|. Bi|
|00000a00| 6c 6c 20 4d 69 74 63 68 | 65 6c 6c 20 61 74 20 74 |ll Mitch|ell at t|
|00000a10| 68 65 20 55 6e 69 76 65 | 72 73 69 74 79 20 6f 66 |he Unive|rsity of|
|00000a20| 20 41 72 69 7a 6f 6e 61 | 2e 20 20 54 68 69 73 20 | Arizona|. This |
|00000a30| 69 6d 70 6c 65 6d 65 6e | 2d 0a 20 20 20 20 20 74 |implemen|-. t|
|00000a40| 61 74 69 6f 6e 20 69 6e | 20 43 20 77 61 73 20 6d |ation in| C was m|
|00000a50| 6f 74 69 76 61 74 65 64 | 20 62 79 20 74 68 65 20 |otivated| by the |
|00000a60| 6e 65 65 64 20 66 6f 72 | 20 67 72 65 61 74 65 72 |need for| greater|
|00000a70| 20 73 70 65 65 64 20 61 | 6e 64 0a 20 20 20 20 20 | speed a|nd. |
|00000a80| 76 61 72 69 6f 75 73 20 | 66 75 6e 63 74 69 6f 6e |various |function|
|00000a90| 61 6c 20 69 6d 70 72 6f | 76 65 6d 65 6e 74 73 2e |al impro|vements.|
|00000aa0| 0a 0a 0a 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |...-=-=-|=-=-=-=-|
|00000ab0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|00000ac0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|00000ad0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|00000ae0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 0a 4d 61 72 6b 20 |=-=-=-=-|=-.Mark |
|00000af0| 4d 2e 20 53 77 65 6e 73 | 6f 6e 20 20 20 20 20 20 |M. Swens|on |
|00000b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b10| 20 20 20 20 44 65 70 61 | 72 74 6d 65 6e 74 20 6f | Depa|rtment o|
|00000b20| 66 20 43 6f 6d 70 75 74 | 65 72 20 53 63 69 65 6e |f Comput|er Scien|
|00000b30| 63 65 0a 6d 6d 73 25 61 | 72 69 7a 6f 6e 61 40 63 |ce.mms%a|rizona@c|
|00000b40| 73 6e 65 74 2d 72 65 6c | 61 79 20 20 20 20 20 20 |snet-rel|ay |
|00000b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b60| 20 54 68 65 20 55 6e 69 | 76 65 72 73 69 74 79 20 | The Uni|versity |
|00000b70| 6f 66 20 41 72 69 7a 6f | 6e 61 0a 7b 69 68 6e 70 |of Arizo|na.{ihnp|
|00000b80| 34 2c 6e 6f 61 6f 2c 6d | 63 6e 63 2c 75 74 61 68 |4,noao,m|cnc,utah|
|00000b90| 2d 63 73 7d 21 61 72 69 | 7a 6f 6e 61 21 6d 6d 73 |-cs}!ari|zona!mms|
|00000ba0| 20 20 20 20 20 54 75 63 | 73 6f 6e 2c 20 41 72 69 | Tuc|son, Ari|
|00000bb0| 7a 6f 6e 61 20 20 38 35 | 37 32 31 20 2f 2f 20 55 |zona 85|721 // U|
|00000bc0| 53 41 0a 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |SA.-=-=-|=-=-=-=-|
|00000bd0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|00000be0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|00000bf0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|00000c00| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 0a 0a 0a 23 20 54 |=-=-=-=-|=-...# T|
|00000c10| 68 69 73 20 69 73 20 61 | 20 73 68 65 6c 6c 20 61 |his is a| shell a|
|00000c20| 72 63 68 69 76 65 2e 20 | 20 52 65 6d 6f 76 65 20 |rchive. | Remove |
|00000c30| 61 6e 79 74 68 69 6e 67 | 20 62 65 66 6f 72 65 20 |anything| before |
|00000c40| 74 68 69 73 20 6c 69 6e | 65 2c 0a 23 20 74 68 65 |this lin|e,.# the|
|00000c50| 6e 20 75 6e 70 61 63 6b | 20 69 74 20 62 79 20 73 |n unpack| it by s|
|00000c60| 61 76 69 6e 67 20 69 74 | 20 69 6e 20 61 20 66 69 |aving it| in a fi|
|00000c70| 6c 65 20 61 6e 64 20 74 | 79 70 69 6e 67 20 22 73 |le and t|yping "s|
|00000c80| 68 20 66 69 6c 65 22 2e | 0a 23 0a 23 20 57 72 61 |h file".|.#.# Wra|
|00000c90| 70 70 65 64 20 62 79 20 | 61 72 69 7a 6f 6e 61 21 |pped by |arizona!|
|00000ca0| 6d 6d 73 20 6f 6e 20 54 | 68 75 20 4d 61 79 20 31 |mms on T|hu May 1|
|00000cb0| 33 20 32 32 3a 34 39 3a | 32 37 20 4d 53 54 20 31 |3 22:49:|27 MST 1|
|00000cc0| 39 38 35 0a 23 20 43 6f | 6e 74 65 6e 74 73 3a 20 |985.# Co|ntents: |
|00000cd0| 20 52 45 41 44 4d 45 20 | 6b 65 65 70 6e 65 77 73 | README |keepnews|
|00000ce0| 2e 31 20 4d 61 6b 65 66 | 69 6c 65 20 6b 65 65 70 |.1 Makef|ile keep|
|00000cf0| 6e 65 77 73 2e 63 0a 0a | 00 00 00 00 00 00 00 00 |news.c..|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 6b 65 65 70 6e 65 77 73 | 2f 52 45 41 44 4d 45 00 |keepnews|/README.|
|00000e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000e70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000e80| 20 20 20 20 33 31 35 20 | 20 34 34 30 34 30 37 32 | 315 | 4404072|
|00000e90| 30 35 36 20 20 20 36 35 | 36 32 00 20 00 00 00 00 |056 65|62. ....|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 42 65 66 6f 72 65 20 69 | 6e 73 74 61 6c 6c 69 6e |Before i|nstallin|
|00001010| 67 20 6b 65 65 70 6e 65 | 77 73 2c 20 63 68 61 6e |g keepne|ws, chan|
|00001020| 67 65 20 74 68 65 20 4b | 52 4f 4f 54 20 64 65 66 |ge the K|ROOT def|
|00001030| 69 6e 69 74 69 6f 6e 20 | 69 6e 0a 6b 65 65 70 6e |inition |in.keepn|
|00001040| 65 77 73 2e 63 20 61 6e | 64 20 4d 61 6b 65 66 69 |ews.c an|d Makefi|
|00001050| 6c 65 20 61 73 20 61 70 | 70 72 6f 70 72 69 61 74 |le as ap|propriat|
|00001060| 65 20 66 6f 72 20 79 6f | 75 72 20 73 79 73 74 65 |e for yo|ur syste|
|00001070| 6d 2e 0a 0a 41 6c 73 6f | 2c 20 79 6f 75 20 77 69 |m...Also|, you wi|
|00001080| 6c 6c 20 68 61 76 65 20 | 74 6f 20 63 72 65 61 74 |ll have |to creat|
|00001090| 65 20 74 68 65 20 4b 52 | 4f 4f 54 20 64 69 72 65 |e the KR|OOT dire|
|000010a0| 63 74 6f 72 79 20 6d 61 | 6e 75 61 6c 6c 79 0a 62 |ctory ma|nually.b|
|000010b0| 65 66 6f 72 65 20 79 6f | 75 20 63 61 6e 20 75 73 |efore yo|u can us|
|000010c0| 65 20 6b 65 65 70 6e 65 | 77 73 2e 0a 0a 00 00 00 |e keepne|ws......|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 6b 65 65 70 6e 65 77 73 | 2f 6b 65 65 70 6e 65 77 |keepnews|/keepnew|
|00001210| 73 2e 31 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.1.....|........|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001280| 20 20 20 35 32 31 34 20 | 20 34 34 30 34 30 37 32 | 5214 | 4404072|
|00001290| 30 36 30 20 20 20 37 36 | 32 33 00 20 00 00 00 00 |060 76|23. ....|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 2e 54 48 20 4b 45 45 50 | 4e 45 57 53 20 31 20 0a |.TH KEEP|NEWS 1 .|
|00001410| 2e 55 43 20 34 0a 2e 53 | 48 20 4e 41 4d 45 0a 6b |.UC 4..S|H NAME.k|
|00001420| 65 65 70 6e 65 77 73 20 | 5c 2d 20 73 65 6c 65 63 |eepnews |\- selec|
|00001430| 74 69 76 65 6c 79 20 61 | 72 63 68 69 76 65 20 28 |tively a|rchive (|
|00001440| 6b 65 65 70 29 20 6e 65 | 77 73 20 61 72 74 69 63 |keep) ne|ws artic|
|00001450| 6c 65 73 20 69 6e 20 61 | 20 63 6f 6d 6d 6f 6e 20 |les in a| common |
|00001460| 6c 6f 63 61 74 69 6f 6e | 0a 2e 53 48 20 53 59 4e |location|..SH SYN|
|00001470| 4f 50 53 49 53 0a 5c 66 | 42 6b 65 65 70 6e 65 77 |OPSIS.\f|Bkeepnew|
|00001480| 73 5c 66 50 20 5b 20 2d | 6e 20 61 64 64 69 74 69 |s\fP [ -|n additi|
|00001490| 6f 6e 61 6c 2e 6e 65 77 | 73 67 72 6f 75 70 73 20 |onal.new|sgroups |
|000014a0| 5d 20 5b 20 2d 74 20 6d | 6f 72 65 20 73 75 62 6a |] [ -t m|ore subj|
|000014b0| 65 63 74 20 6c 69 6e 65 | 20 5d 0a 2e 53 48 20 44 |ect line| ]..SH D|
|000014c0| 45 53 43 52 49 50 54 49 | 4f 4e 0a 5c 66 49 6b 65 |ESCRIPTI|ON.\fIke|
|000014d0| 65 70 6e 65 77 73 5c 66 | 50 20 61 63 63 65 70 74 |epnews\f|P accept|
|000014e0| 73 20 61 20 6e 65 77 73 | 20 61 72 74 69 63 6c 65 |s a news| article|
|000014f0| 20 6f 6e 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 | on stan|dard inp|
|00001500| 75 74 2c 20 61 6e 61 6c | 79 7a 65 73 20 74 68 65 |ut, anal|yzes the|
|00001510| 0a 68 65 61 64 65 72 73 | 20 6f 66 20 74 68 65 20 |.headers| of the |
|00001520| 61 72 74 69 63 6c 65 20 | 61 6e 64 20 73 74 6f 72 |article |and stor|
|00001530| 65 73 20 74 68 65 20 61 | 72 74 69 63 6c 65 20 69 |es the a|rticle i|
|00001540| 6e 20 61 20 66 69 6c 65 | 2e 20 20 41 72 74 69 63 |n a file|. Artic|
|00001550| 6c 65 73 0a 61 72 65 20 | 73 74 6f 72 65 64 20 61 |les.are |stored a|
|00001560| 73 20 69 6e 64 69 76 69 | 64 75 61 6c 20 66 69 6c |s indivi|dual fil|
|00001570| 65 73 20 69 6e 20 61 20 | 74 72 65 65 20 73 74 72 |es in a |tree str|
|00001580| 75 63 74 75 72 65 20 6d | 61 74 63 68 69 6e 67 20 |ucture m|atching |
|00001590| 74 68 61 74 20 6f 66 0a | 74 68 65 20 6e 65 77 73 |that of.|the news|
|000015a0| 67 72 6f 75 70 20 68 69 | 65 72 61 72 63 68 79 2e |group hi|erarchy.|
|000015b0| 20 20 54 68 65 20 41 72 | 74 69 63 6c 65 2d 49 2e | The Ar|ticle-I.|
|000015c0| 44 2e 20 69 73 20 75 73 | 65 64 20 74 6f 20 75 6e |D. is us|ed to un|
|000015d0| 69 71 75 65 6c 79 0a 69 | 64 65 6e 74 69 66 79 20 |iquely.i|dentify |
|000015e0| 61 6e 20 61 72 74 69 63 | 6c 65 3b 20 65 61 63 68 |an artic|le; each|
|000015f0| 20 61 72 74 69 63 6c 65 | 20 69 73 20 73 74 6f 72 | article| is stor|
|00001600| 65 64 20 6f 6e 6c 79 20 | 6f 6e 63 65 2e 20 20 49 |ed only |once. I|
|00001610| 66 20 61 6e 20 61 72 74 | 69 63 6c 65 0a 69 73 20 |f an art|icle.is |
|00001620| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00001630| 6d 75 6c 74 69 70 6c 65 | 20 6e 65 77 73 67 72 6f |multiple| newsgro|
|00001640| 75 70 73 2c 20 69 74 20 | 69 73 20 6c 69 6e 6b 65 |ups, it |is linke|
|00001650| 64 20 69 6e 74 6f 20 61 | 6c 6c 0a 61 70 70 72 6f |d into a|ll.appro|
|00001660| 70 72 69 61 74 65 20 64 | 69 72 65 63 74 6f 72 69 |priate d|irectori|
|00001670| 65 73 2e 0a 2e 50 50 0a | 54 68 65 20 64 69 72 65 |es...PP.|The dire|
|00001680| 63 74 6f 72 79 20 5c 66 | 49 2f 75 73 72 2f 73 70 |ctory \f|I/usr/sp|
|00001690| 6f 6f 6c 2f 6b 65 65 70 | 6e 65 77 73 5c 66 50 20 |ool/keep|news\fP |
|000016a0| 73 65 72 76 65 73 20 61 | 73 20 74 68 65 20 72 6f |serves a|s the ro|
|000016b0| 6f 74 20 6f 66 0a 74 68 | 65 20 5c 66 49 6b 65 65 |ot of.th|e \fIkee|
|000016c0| 70 6e 65 77 73 5c 66 50 | 0a 74 72 65 65 2e 20 20 |pnews\fP|.tree. |
|000016d0| 49 66 20 61 6e 20 61 72 | 74 69 63 6c 65 2c 20 5c |If an ar|ticle, \|
|000016e0| 66 49 73 6f 6d 65 73 69 | 74 65 2e 31 30 30 5c 66 |fIsomesi|te.100\f|
|000016f0| 50 0a 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 |P.for ex|ample, i|
|00001700| 73 20 70 6f 73 74 65 64 | 20 74 6f 20 6e 65 74 2e |s posted| to net.|
|00001710| 67 65 6e 65 72 61 6c 20 | 61 6e 64 0a 73 75 62 73 |general |and.subs|
|00001720| 65 71 75 65 6e 74 6c 79 | 20 61 72 63 68 69 76 65 |equently| archive|
|00001730| 64 2c 20 69 74 20 69 73 | 20 73 74 6f 72 65 64 20 |d, it is| stored |
|00001740| 69 6e 0a 5c 66 49 2f 75 | 73 72 2f 73 70 6f 6f 6c |in.\fI/u|sr/spool|
|00001750| 2f 6b 65 65 70 6e 65 77 | 73 2f 6e 65 74 2f 67 65 |/keepnew|s/net/ge|
|00001760| 6e 65 72 61 6c 2f 73 6f | 6d 65 73 69 74 65 2e 31 |neral/so|mesite.1|
|00001770| 30 30 5c 66 50 2e 0a 4c | 6f 67 20 66 69 6c 65 73 |00\fP..L|og files|
|00001780| 20 77 68 69 63 68 20 63 | 6f 6e 74 61 69 6e 0a 69 | which c|ontain.i|
|00001790| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|000017a0| 20 61 72 74 69 63 6c 65 | 73 20 74 68 61 74 20 68 | article|s that h|
|000017b0| 61 76 65 20 62 65 65 6e | 20 6b 65 70 74 20 61 72 |ave been| kept ar|
|000017c0| 65 0a 6d 61 69 6e 74 61 | 69 6e 65 64 20 69 6e 20 |e.mainta|ined in |
|000017d0| 62 6f 74 68 20 74 68 65 | 20 72 6f 6f 74 20 64 69 |both the| root di|
|000017e0| 72 65 63 74 6f 72 79 20 | 61 6e 64 20 69 6e 64 69 |rectory |and indi|
|000017f0| 76 69 64 75 61 6c 20 67 | 72 6f 75 70 0a 64 69 72 |vidual g|roup.dir|
|00001800| 65 63 74 6f 72 69 65 73 | 2e 20 20 4c 6f 67 20 66 |ectories|. Log f|
|00001810| 69 6c 65 73 20 64 6f 20 | 6e 6f 74 20 72 65 63 6f |iles do |not reco|
|00001820| 72 64 20 61 6e 79 20 69 | 6e 66 6f 72 6d 61 74 69 |rd any i|nformati|
|00001830| 6f 6e 20 61 62 6f 75 74 | 20 77 68 6f 0a 6b 65 70 |on about| who.kep|
|00001840| 74 20 61 6e 20 61 72 74 | 69 63 6c 65 2e 0a 2e 54 |t an art|icle...T|
|00001850| 50 0a 2e 42 20 5c 2d 6e | 0a 54 68 65 20 72 65 6d |P..B \-n|.The rem|
|00001860| 61 69 6e 69 6e 67 20 61 | 72 67 75 6d 65 6e 74 73 |aining a|rguments|
|00001870| 20 28 74 6f 20 74 68 65 | 20 6e 65 78 74 20 2d 6e | (to the| next -n|
|00001880| 2c 20 2d 74 2c 20 6f 72 | 20 6e 65 77 6c 69 6e 65 |, -t, or| newline|
|00001890| 29 20 77 69 6c 6c 20 62 | 65 0a 74 61 6b 65 6e 20 |) will b|e.taken |
|000018a0| 61 73 20 61 64 64 69 74 | 69 6f 6e 61 6c 20 6e 65 |as addit|ional ne|
|000018b0| 77 73 67 72 6f 75 70 73 | 2c 20 65 67 2e 2c 0a 5c |wsgroups|, eg.,.\|
|000018c0| 66 42 2d 6e 5c 66 50 0a | 5c 66 49 6e 65 74 2e 61 |fB-n\fP.|\fInet.a|
|000018d0| 64 64 69 74 69 6f 6e 61 | 6c 2e 67 72 6f 75 70 2e |dditiona|l.group.|
|000018e0| 31 20 6e 65 74 2e 61 64 | 64 69 74 69 6f 6e 61 6c |1 net.ad|ditional|
|000018f0| 2e 67 72 6f 75 70 2e 32 | 5c 66 50 2e 0a 54 68 65 |.group.2|\fP..The|
|00001900| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 67 72 6f 75 | additio|nal grou|
|00001910| 70 73 20 77 69 6c 6c 20 | 6f 6e 6c 79 20 62 65 20 |ps will |only be |
|00001920| 61 64 64 65 64 20 74 6f | 20 74 68 65 20 6e 65 77 |added to| the new|
|00001930| 73 67 72 6f 75 70 20 66 | 69 65 6c 64 20 6f 66 0a |sgroup f|ield of.|
|00001940| 74 68 65 20 72 65 6c 61 | 74 65 64 20 6c 6f 67 20 |the rela|ted log |
|00001950| 66 69 6c 65 73 2e 0a 2e | 54 50 0a 2e 42 20 5c 2d |files...|TP..B \-|
|00001960| 74 0a 54 68 65 20 72 65 | 6d 61 69 6e 69 6e 67 20 |t.The re|maining |
|00001970| 61 72 67 75 6d 65 6e 74 | 73 20 28 74 6f 20 74 68 |argument|s (to th|
|00001980| 65 20 6e 65 78 74 20 2d | 6e 2c 20 2d 74 2c 20 6f |e next -|n, -t, o|
|00001990| 72 20 6e 65 77 6c 69 6e | 65 29 20 77 69 6c 6c 20 |r newlin|e) will |
|000019a0| 62 65 0a 74 61 6b 65 6e | 20 61 73 20 61 64 64 69 |be.taken| as addi|
|000019b0| 74 69 6f 6e 61 6c 20 69 | 6e 66 6f 72 6d 61 74 69 |tional i|nformati|
|000019c0| 6f 6e 20 66 6f 72 20 74 | 68 65 20 61 72 74 69 63 |on for t|he artic|
|000019d0| 6c 65 20 73 75 62 6a 65 | 63 74 2c 20 65 67 2e 2c |le subje|ct, eg.,|
|000019e0| 0a 5c 66 42 2d 74 5c 66 | 50 0a 5c 66 49 61 64 64 |.\fB-t\f|P.\fIadd|
|000019f0| 69 74 69 6f 6e 61 6c 20 | 73 75 62 6a 65 63 74 20 |itional |subject |
|00001a00| 6d 61 74 65 72 69 61 6c | 5c 66 50 2e 0a 54 68 69 |material|\fP..Thi|
|00001a10| 73 20 77 69 6c 6c 20 6f | 6e 6c 79 20 62 65 20 61 |s will o|nly be a|
|00001a20| 64 64 65 64 20 74 6f 20 | 74 68 65 20 73 75 62 6a |dded to |the subj|
|00001a30| 65 63 74 20 66 69 65 6c | 64 20 6f 66 20 74 68 65 |ect fiel|d of the|
|00001a40| 20 72 65 6c 61 74 65 64 | 20 6c 6f 67 20 66 69 6c | related| log fil|
|00001a50| 65 73 2e 0a 2e 53 48 20 | 50 55 52 50 4f 53 45 0a |es...SH |PURPOSE.|
|00001a60| 5c 66 49 6b 65 65 70 6e | 65 77 73 5c 66 50 20 69 |\fIkeepn|ews\fP i|
|00001a70| 73 20 61 6e 20 61 74 74 | 65 6d 70 74 20 74 6f 20 |s an att|empt to |
|00001a80| 70 72 6f 76 69 64 65 20 | 61 20 73 61 6e 65 20 77 |provide |a sane w|
|00001a90| 61 79 20 6f 66 20 65 78 | 74 72 61 63 74 69 6e 67 |ay of ex|tracting|
|00001aa0| 20 61 6e 64 0a 6b 65 65 | 70 69 6e 67 20 69 6e 66 | and.kee|ping inf|
|00001ab0| 6f 72 6d 61 74 69 6f 6e | 20 74 68 61 74 20 63 6f |ormation| that co|
|00001ac0| 6d 65 73 20 6f 76 65 72 | 20 55 73 65 6e 65 74 2e |mes over| Usenet.|
|00001ad0| 20 20 54 68 65 20 62 61 | 73 69 63 20 69 64 65 61 | The ba|sic idea|
|00001ae0| 0a 69 73 20 74 6f 20 61 | 6c 6c 6f 77 20 75 73 65 |.is to a|llow use|
|00001af0| 72 73 20 74 6f 20 64 65 | 73 69 67 6e 61 74 65 20 |rs to de|signate |
|00001b00| 61 6e 20 61 72 74 69 63 | 6c 65 20 61 73 20 62 65 |an artic|le as be|
|00001b10| 69 6e 67 20 6f 66 20 73 | 6f 6d 65 20 77 6f 72 74 |ing of s|ome wort|
|00001b20| 68 20 61 6e 64 0a 74 68 | 65 6e 20 73 61 76 65 20 |h and.th|en save |
|00001b30| 69 74 20 69 6e 20 61 20 | 63 6f 6d 6d 6f 6e 20 70 |it in a |common p|
|00001b40| 6c 61 63 65 2e 20 20 54 | 68 75 73 2c 20 5c 66 49 |lace. T|hus, \fI|
|00001b50| 6b 65 65 70 6e 65 77 73 | 5c 66 50 20 70 72 6f 76 |keepnews|\fP prov|
|00001b60| 69 64 65 73 20 61 6e 0a | 61 6c 74 65 72 6e 61 74 |ides an.|alternat|
|00001b70| 69 76 65 20 74 6f 20 70 | 65 72 73 6f 6e 61 6c 20 |ive to p|ersonal |
|00001b80| 61 72 63 68 69 76 61 6c | 20 6f 66 20 6e 65 77 73 |archival| of news|
|00001b90| 20 61 72 74 69 63 6c 65 | 73 2e 0a 2e 53 48 20 55 | article|s...SH U|
|00001ba0| 53 41 47 45 0a 42 65 63 | 61 75 73 65 20 74 68 65 |SAGE.Bec|ause the|
|00001bb0| 72 65 20 61 72 65 20 61 | 20 76 61 72 69 65 74 79 |re are a| variety|
|00001bc0| 20 6f 66 20 6e 65 77 73 | 20 72 65 61 64 69 6e 67 | of news| reading|
|00001bd0| 20 70 72 6f 67 72 61 6d | 73 20 61 76 61 69 6c 61 | program|s availa|
|00001be0| 62 6c 65 2c 0a 74 68 65 | 20 65 78 61 63 74 20 75 |ble,.the| exact u|
|00001bf0| 73 61 67 65 20 6f 66 20 | 5c 66 49 6b 65 65 70 6e |sage of |\fIkeepn|
|00001c00| 65 77 73 5c 66 50 20 64 | 65 70 65 6e 64 73 20 6f |ews\fP d|epends o|
|00001c10| 6e 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 62 65 |n the pr|ogram be|
|00001c20| 69 6e 67 20 75 73 65 64 | 2e 0a 49 66 20 5c 66 49 |ing used|..If \fI|
|00001c30| 72 65 61 64 6e 65 77 73 | 5c 66 50 20 69 73 20 62 |readnews|\fP is b|
|00001c40| 65 69 6e 67 20 75 73 65 | 64 2c 20 72 65 73 70 6f |eing use|d, respo|
|00001c50| 6e 64 69 6e 67 20 77 69 | 74 68 0a 2e 62 72 0a 2e |nding wi|th..br..|
|00001c60| 74 69 20 31 69 0a 5c 66 | 42 73 2d 20 7c 6b 65 65 |ti 1i.\f|Bs- |kee|
|00001c70| 70 6e 65 77 73 5c 66 50 | 0a 2e 62 72 0a 74 6f 20 |pnews\fP|..br.to |
|00001c80| 74 68 65 20 5c 66 42 5b | 79 6e 71 5d 5c 66 50 20 |the \fB[|ynq]\fP |
|00001c90| 70 72 6f 6d 70 74 20 74 | 68 61 74 20 61 70 70 65 |prompt t|hat appe|
|00001ca0| 61 72 73 20 61 66 74 65 | 72 20 61 6e 20 61 72 74 |ars afte|r an art|
|00001cb0| 69 63 6c 65 20 77 69 6c | 6c 20 63 61 75 73 65 0a |icle wil|l cause.|
|00001cc0| 74 68 65 20 61 72 74 69 | 63 6c 65 20 74 6f 20 62 |the arti|cle to b|
|00001cd0| 65 20 6b 65 70 74 2e 20 | 20 5c 66 49 6b 65 65 70 |e kept. | \fIkeep|
|00001ce0| 6e 65 77 73 5c 66 50 20 | 70 72 6f 64 75 63 65 73 |news\fP |produces|
|00001cf0| 20 6e 6f 20 6d 65 73 73 | 61 67 65 73 20 75 6e 6c | no mess|ages unl|
|00001d00| 65 73 73 20 61 6e 0a 65 | 72 72 6f 72 20 6f 63 63 |ess an.e|rror occ|
|00001d10| 75 72 73 2e 0a 2e 53 48 | 20 22 53 45 45 20 41 4c |urs...SH| "SEE AL|
|00001d20| 53 4f 22 0a 5c 66 49 72 | 65 61 64 6e 65 77 73 28 |SO".\fIr|eadnews(|
|00001d30| 31 29 5c 66 50 2c 20 5c | 66 49 6e 65 77 73 28 35 |1)\fP, \|fInews(5|
|00001d40| 29 5c 66 50 0a 2e 53 48 | 20 42 55 47 53 0a 49 66 |)\fP..SH| BUGS.If|
|00001d50| 20 5c 66 49 6b 65 65 70 | 6e 65 77 73 5c 66 50 20 | \fIkeep|news\fP |
|00001d60| 69 73 20 67 69 76 65 6e | 20 73 6f 6d 65 74 68 69 |is given| somethi|
|00001d70| 6e 67 20 74 68 61 74 20 | 64 6f 65 73 6e 27 74 20 |ng that |doesn't |
|00001d80| 61 70 70 65 61 72 20 74 | 6f 20 62 65 20 61 20 6e |appear t|o be a n|
|00001d90| 65 77 73 0a 61 72 74 69 | 63 6c 65 2c 20 61 20 70 |ews.arti|cle, a p|
|00001da0| 72 6f 67 72 61 6d 20 61 | 62 6f 72 74 20 6d 61 79 |rogram a|bort may|
|00001db0| 20 6f 63 63 75 72 2e 0a | 2e 50 50 0a 53 6f 6d 65 | occur..|.PP.Some|
|00001dc0| 20 6e 65 77 73 20 72 65 | 61 64 69 6e 67 20 70 72 | news re|ading pr|
|00001dd0| 6f 67 72 61 6d 73 20 28 | 69 6e 63 6c 75 64 69 6e |ograms (|includin|
|00001de0| 67 20 5c 66 49 72 65 61 | 64 6e 65 77 73 5c 66 50 |g \fIrea|dnews\fP|
|00001df0| 29 20 77 69 6c 6c 20 70 | 72 65 70 65 6e 64 0a 61 |) will p|repend.a|
|00001e00| 20 73 75 6d 6d 61 72 79 | 20 68 65 61 64 65 72 20 | summary| header |
|00001e10| 6c 69 6e 65 20 74 6f 20 | 72 65 64 69 72 65 63 74 |line to |redirect|
|00001e20| 65 64 20 73 74 61 6e 64 | 61 72 64 20 6f 75 74 70 |ed stand|ard outp|
|00001e30| 75 74 20 74 68 61 74 20 | 69 73 20 73 75 62 73 65 |ut that |is subse|
|00001e40| 71 75 65 6e 74 6c 79 0a | 69 6e 63 6c 75 64 65 64 |quently.|included|
|00001e50| 20 69 6e 20 74 68 65 20 | 61 72 63 68 69 76 65 20 | in the |archive |
|00001e60| 63 72 65 61 74 65 64 20 | 62 79 20 5c 66 49 6b 65 |created |by \fIke|
|00001e70| 65 70 6e 65 77 73 5c 66 | 50 2e 20 20 49 74 20 69 |epnews\f|P. It i|
|00001e80| 73 20 68 61 72 6d 6c 65 | 73 73 2e 0a 00 00 00 00 |s harmle|ss......|
|00001e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002000| 6b 65 65 70 6e 65 77 73 | 2f 4d 61 6b 65 66 69 6c |keepnews|/Makefil|
|00002010| 65 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.......|........|
|00002020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002080| 20 20 20 20 34 35 32 20 | 20 34 34 30 34 30 37 32 | 452 | 4404072|
|00002090| 30 36 31 20 20 20 37 33 | 34 30 00 20 00 00 00 00 |061 73|40. ....|
|000020a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000020f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 53 52 43 53 20 3d 09 6b | 65 65 70 6e 65 77 73 2e |SRCS =.k|eepnews.|
|00002210| 63 0a 4f 42 4a 53 20 3d | 09 6b 65 65 70 6e 65 77 |c.OBJS =|.keepnew|
|00002220| 73 2e 6f 0a 42 49 4e 44 | 49 52 3d 20 2f 75 73 72 |s.o.BIND|IR= /usr|
|00002230| 2f 6c 6f 63 61 6c 0a 43 | 46 4c 41 47 53 3d 20 2d |/local.C|FLAGS= -|
|00002240| 4f 0a 0a 6b 65 65 70 6e | 65 77 73 3a 09 24 7b 4f |O..keepn|ews:.${O|
|00002250| 42 4a 53 7d 0a 09 24 7b | 43 43 7d 20 2d 6f 20 6b |BJS}..${|CC} -o k|
|00002260| 65 65 70 6e 65 77 73 20 | 24 7b 4f 42 4a 53 7d 0a |eepnews |${OBJS}.|
|00002270| 0a 69 6e 73 74 61 6c 6c | 3a 20 6b 65 65 70 6e 65 |.install|: keepne|
|00002280| 77 73 0a 09 69 6e 73 74 | 61 6c 6c 20 2d 6d 20 36 |ws..inst|all -m 6|
|00002290| 37 35 35 20 2d 73 20 6b | 65 65 70 6e 65 77 73 20 |755 -s k|eepnews |
|000022a0| 24 7b 42 49 4e 44 49 52 | 7d 2f 6b 65 65 70 6e 65 |${BINDIR|}/keepne|
|000022b0| 77 73 0a 09 63 68 6f 77 | 6e 20 6e 65 77 73 20 24 |ws..chow|n news $|
|000022c0| 7b 42 49 4e 44 49 52 7d | 2f 6b 65 65 70 6e 65 77 |{BINDIR}|/keepnew|
|000022d0| 73 0a 09 63 68 67 72 70 | 20 30 20 24 7b 42 49 4e |s..chgrp| 0 ${BIN|
|000022e0| 44 49 52 7d 2f 6b 65 65 | 70 6e 65 77 73 0a 0a 63 |DIR}/kee|pnews..c|
|000022f0| 6c 65 61 6e 3a 0a 09 72 | 6d 20 2d 66 20 2a 2e 6f |lean:..r|m -f *.o|
|00002300| 0a 0a 70 72 69 6e 74 3a | 09 24 7b 53 52 43 53 7d |..print:|.${SRCS}|
|00002310| 0a 09 6c 70 72 20 2d 70 | 20 24 7b 53 52 43 53 7d |..lpr -p| ${SRCS}|
|00002320| 20 4d 61 6b 65 66 69 6c | 65 0a 00 00 00 00 00 00 | Makefil|e.......|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 6b 65 65 70 6e 65 77 73 | 2f 6b 65 65 70 6e 65 77 |keepnews|/keepnew|
|00002410| 73 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.c.....|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002470| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002480| 20 20 31 35 35 37 36 20 | 20 34 34 30 34 30 37 32 | 15576 | 4404072|
|00002490| 30 36 33 20 20 20 37 37 | 34 34 00 20 00 00 00 00 |063 77|44. ....|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 2f 2a 0a 2a 2a 20 54 68 | 65 20 69 6e 69 74 69 61 |/*.** Th|e initia|
|00002610| 6c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |l implem|entation|
|00002620| 20 6f 66 20 6b 65 65 70 | 6e 65 77 73 20 77 61 73 | of keep|news was|
|00002630| 20 77 72 69 74 74 65 6e | 20 69 6e 20 49 63 6f 6e | written| in Icon|
|00002640| 20 62 79 0a 2a 2a 20 42 | 69 6c 6c 20 4d 69 74 63 | by.** B|ill Mitc|
|00002650| 68 65 6c 6c 20 61 74 20 | 74 68 65 20 55 6e 69 76 |hell at |the Univ|
|00002660| 65 72 73 69 74 79 20 6f | 66 20 41 72 69 7a 6f 6e |ersity o|f Arizon|
|00002670| 61 2e 20 20 54 68 69 73 | 20 76 65 72 73 69 6f 6e |a. This| version|
|00002680| 0a 2a 2a 20 69 73 20 6d | 6f 74 69 76 61 74 65 64 |.** is m|otivated|
|00002690| 20 62 79 20 74 68 65 20 | 6e 65 65 64 20 66 6f 72 | by the |need for|
|000026a0| 20 67 72 65 61 74 65 72 | 20 73 70 65 65 64 20 61 | greater| speed a|
|000026b0| 6e 64 20 76 61 72 69 6f | 75 73 20 66 75 6e 63 2d |nd vario|us func-|
|000026c0| 0a 2a 2a 20 74 69 6f 6e | 61 6c 20 69 6d 70 72 6f |.** tion|al impro|
|000026d0| 76 65 6d 65 6e 74 73 2e | 0a 2a 2a 20 0a 2a 2a 20 |vements.|.** .** |
|000026e0| 2d 2d 20 4d 61 72 6b 20 | 53 77 65 6e 73 6f 6e 20 |-- Mark |Swenson |
|000026f0| 7b 69 68 6e 70 34 2c 6e | 6f 61 6f 2c 75 74 61 68 |{ihnp4,n|oao,utah|
|00002700| 2d 63 73 2c 6d 63 6e 63 | 7d 21 61 72 69 7a 6f 6e |-cs,mcnc|}!arizon|
|00002710| 61 21 6d 6d 73 0a 2a 2a | 20 20 20 20 44 65 70 74 |a!mms.**| Dept|
|00002720| 2e 20 6f 66 20 43 6f 6d | 70 75 74 65 72 20 53 63 |. of Com|puter Sc|
|00002730| 69 65 6e 63 65 20 2f 20 | 55 6e 69 76 65 72 73 69 |ience / |Universi|
|00002740| 74 79 20 6f 66 20 41 72 | 69 7a 6f 6e 61 0a 2a 2a |ty of Ar|izona.**|
|00002750| 0a 2a 2a 0a 2a 2a 20 6b | 65 65 70 6e 65 77 73 20 |.**.** k|eepnews |
|00002760| 65 78 74 72 61 63 74 73 | 20 74 68 65 20 68 65 61 |extracts| the hea|
|00002770| 64 65 72 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |der info|rmation |
|00002780| 66 72 6f 6d 20 61 20 72 | 65 64 69 72 65 63 74 65 |from a r|edirecte|
|00002790| 64 20 6e 65 77 73 20 61 | 72 74 69 63 6c 65 0a 2a |d news a|rticle.*|
|000027a0| 2a 20 61 6e 64 20 63 68 | 65 63 6b 73 20 74 6f 20 |* and ch|ecks to |
|000027b0| 73 65 65 20 69 66 20 74 | 68 65 20 61 72 74 69 63 |see if t|he artic|
|000027c0| 6c 65 20 68 61 73 20 61 | 6c 72 65 61 64 79 20 62 |le has a|lready b|
|000027d0| 65 65 6e 20 73 61 76 65 | 64 2e 20 20 49 66 20 73 |een save|d. If s|
|000027e0| 6f 2c 20 69 74 0a 2a 2a | 20 61 70 70 65 6e 64 73 |o, it.**| appends|
|000027f0| 20 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | a corre|sponding|
|00002800| 20 6d 65 73 73 61 67 65 | 20 69 6e 20 4b 52 4f 4f | message| in KROO|
|00002810| 54 2f 6c 6f 67 2c 20 6f | 74 68 65 72 77 69 73 65 |T/log, o|therwise|
|00002820| 20 69 74 20 63 72 65 61 | 74 65 73 20 61 0a 2a 2a | it crea|tes a.**|
|00002830| 20 66 69 6c 65 20 69 6e | 20 74 68 65 20 6c 6f 63 | file in| the loc|
|00002840| 61 74 69 6f 6e 20 73 70 | 65 63 69 66 69 65 64 20 |ation sp|ecified |
|00002850| 62 79 20 74 68 65 20 66 | 69 72 73 74 20 6e 65 77 |by the f|irst new|
|00002860| 73 67 72 6f 75 70 20 6c | 69 73 74 65 64 2c 20 61 |sgroup l|isted, a|
|00002870| 6e 64 0a 2a 2a 20 6c 69 | 6e 6b 73 20 74 68 65 20 |nd.** li|nks the |
|00002880| 72 65 6d 61 69 6e 69 6e | 67 20 6e 65 77 73 67 72 |remainin|g newsgr|
|00002890| 6f 75 70 73 20 74 6f 20 | 74 68 69 73 20 66 69 6c |oups to |this fil|
|000028a0| 65 2e 20 20 54 68 65 20 | 62 6f 64 79 20 6f 66 20 |e. The |body of |
|000028b0| 74 68 65 20 61 72 74 69 | 63 6c 65 0a 2a 2a 20 69 |the arti|cle.** i|
|000028c0| 73 20 6e 6f 74 20 72 65 | 61 64 20 75 6e 6c 65 73 |s not re|ad unles|
|000028d0| 73 20 69 74 20 69 73 20 | 61 63 74 75 61 6c 6c 79 |s it is |actually|
|000028e0| 20 73 61 76 65 64 2c 20 | 61 6e 64 20 69 66 20 74 | saved, |and if t|
|000028f0| 68 61 74 20 69 73 20 74 | 68 65 20 63 61 73 65 2c |hat is t|he case,|
|00002900| 0a 2a 2a 20 73 74 64 69 | 6e 20 69 73 20 63 6f 70 |.** stdi|n is cop|
|00002910| 69 65 64 20 64 69 72 65 | 63 74 6c 79 20 69 6e 74 |ied dire|ctly int|
|00002920| 6f 20 74 68 69 73 20 6e | 65 77 20 66 69 6c 65 2e |o this n|ew file.|
|00002930| 0a 2a 2a 0a 2a 2a 20 54 | 68 65 20 2d 6e 20 61 6e |.**.** T|he -n an|
|00002940| 64 20 2d 74 20 6f 70 74 | 69 6f 6e 73 20 68 61 76 |d -t opt|ions hav|
|00002950| 65 20 62 65 65 6e 20 61 | 64 64 65 64 20 74 6f 20 |e been a|dded to |
|00002960| 61 6c 6c 6f 77 20 74 68 | 65 20 75 73 65 72 20 74 |allow th|e user t|
|00002970| 6f 20 73 75 70 70 6c 79 | 0a 2a 2a 20 61 64 64 69 |o supply|.** addi|
|00002980| 74 69 6f 6e 61 6c 20 6e | 65 77 73 67 72 6f 75 70 |tional n|ewsgroup|
|00002990| 73 20 28 65 67 2e 20 2d | 6e 20 6e 65 74 2e 61 6e |s (eg. -|n net.an|
|000029a0| 6f 74 68 65 72 2e 6f 6e | 65 20 6e 65 74 2e 61 6e |other.on|e net.an|
|000029b0| 6f 74 68 65 72 2e 74 77 | 6f 29 20 6f 72 0a 2a 2a |other.tw|o) or.**|
|000029c0| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 73 75 62 6a | additio|nal subj|
|000029d0| 65 63 74 20 6d 61 74 74 | 65 72 20 28 65 67 2e 20 |ect matt|er (eg. |
|000029e0| 2d 74 20 6d 6f 72 65 20 | 73 75 62 6a 65 63 74 20 |-t more |subject |
|000029f0| 6d 61 74 65 72 69 61 6c | 29 20 72 65 73 70 65 63 |material|) respec|
|00002a00| 74 69 76 65 6c 79 2e 0a | 2a 2a 20 54 68 65 73 65 |tively..|** These|
|00002a10| 20 66 6c 61 67 73 20 63 | 61 6e 20 62 65 20 69 6e | flags c|an be in|
|00002a20| 74 65 72 6d 69 78 65 64 | 2c 20 61 6e 64 20 65 76 |termixed|, and ev|
|00002a30| 65 72 79 74 68 69 6e 67 | 20 66 6f 6c 6c 6f 77 69 |erything| followi|
|00002a40| 6e 67 20 65 61 63 68 20 | 69 73 20 74 61 6b 65 6e |ng each |is taken|
|00002a50| 0a 2a 2a 20 61 73 20 69 | 74 73 20 61 72 67 75 6d |.** as i|ts argum|
|00002a60| 65 6e 74 20 75 70 20 74 | 6f 20 74 68 65 20 6e 65 |ent up t|o the ne|
|00002a70| 78 74 20 2d 6e 2c 20 2d | 74 2c 20 6f 72 20 6e 65 |xt -n, -|t, or ne|
|00002a80| 77 6c 69 6e 65 2e 0a 2a | 2a 20 0a 2a 2f 0a 0a 23 |wline..*|* .*/..#|
|00002a90| 69 6e 63 6c 75 64 65 09 | 09 3c 73 74 64 69 6f 2e |include.|.<stdio.|
|00002aa0| 68 3e 0a 23 64 65 66 69 | 6e 65 09 4b 52 4f 4f 54 |h>.#defi|ne.KROOT|
|00002ab0| 09 09 22 2f 75 73 72 2f | 73 70 6f 6f 6c 2f 6b 65 |.."/usr/|spool/ke|
|00002ac0| 65 70 6e 65 77 73 22 0a | 23 64 65 66 69 6e 65 09 |epnews".|#define.|
|00002ad0| 4d 41 58 47 52 4f 55 50 | 53 09 32 30 0a 23 64 65 |MAXGROUP|S.20.#de|
|00002ae0| 66 69 6e 65 09 4c 49 4e | 45 09 09 31 32 38 0a 0a |fine.LIN|E..128..|
|00002af0| 65 78 74 65 72 6e 09 46 | 49 4c 45 09 2a 66 6f 70 |extern.F|ILE.*fop|
|00002b00| 65 6e 28 29 3b 0a 65 78 | 74 65 72 6e 09 63 68 61 |en();.ex|tern.cha|
|00002b10| 72 09 2a 69 6e 64 65 78 | 28 29 2c 20 2a 6d 61 6c |r.*index|(), *mal|
|00002b20| 6c 6f 63 28 29 3b 0a 63 | 68 61 72 09 09 2a 6d 61 |loc();.c|har..*ma|
|00002b30| 74 63 68 28 29 3b 20 0a | 73 74 61 74 69 63 09 63 |tch(); .|static.c|
|00002b40| 68 61 72 09 2a 68 65 61 | 64 5b 35 5d 20 3d 09 7b |har.*hea|d[5] =.{|
|00002b50| 0a 09 09 09 09 22 46 72 | 6f 6d 3a 20 22 2c 0a 09 |....."Fr|om: ",..|
|00002b60| 09 09 20 09 22 4e 65 77 | 73 67 72 6f 75 70 73 3a |.. ."New|sgroups:|
|00002b70| 20 22 2c 0a 09 09 09 20 | 09 22 53 75 62 6a 65 63 | ",.... |."Subjec|
|00002b80| 74 3a 20 22 2c 0a 09 09 | 09 20 09 22 50 6f 73 74 |t: ",...|. ."Post|
|00002b90| 65 64 3a 20 22 2c 0a 09 | 09 09 20 09 22 41 72 74 |ed: ",..|.. ."Art|
|00002ba0| 69 63 6c 65 2d 49 2e 44 | 2e 3a 20 22 0a 09 09 09 |icle-I.D|.: "....|
|00002bb0| 09 7d 20 3b 0a 6d 61 69 | 6e 28 61 72 67 63 2c 61 |.} ;.mai|n(argc,a|
|00002bc0| 72 67 76 29 20 63 68 61 | 72 20 2a 2a 61 72 67 76 |rgv) cha|r **argv|
|00002bd0| 3b 0a 7b 20 20 20 46 49 | 4c 45 20 20 2a 72 6c 6f |;.{ FI|LE *rlo|
|00002be0| 67 66 70 2c 20 2a 66 6c | 6f 67 66 70 2c 20 2a 66 |gfp, *fl|ogfp, *f|
|00002bf0| 69 6c 65 66 70 3b 0a 09 | 09 09 09 09 2f 2a 20 75 |ilefp;..|..../* u|
|00002c00| 73 65 20 62 75 66 66 65 | 72 73 20 65 78 74 65 6e |se buffe|rs exten|
|00002c10| 73 69 76 65 6c 79 20 66 | 6f 72 20 73 70 65 65 64 |sively f|or speed|
|00002c20| 20 2a 2f 0a 20 20 20 20 | 63 68 61 72 20 20 6c 69 | */. |char li|
|00002c30| 6e 65 5b 32 2a 4c 49 4e | 45 5d 3b 0a 20 20 20 20 |ne[2*LIN|E];. |
|00002c40| 63 68 61 72 20 20 63 6f | 6e 74 65 6e 74 5b 35 5d |char co|ntent[5]|
|00002c50| 5b 32 2a 4c 49 4e 45 5d | 3b 09 09 2f 2a 20 64 61 |[2*LINE]|;../* da|
|00002c60| 74 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 |ta corre|sponding|
|00002c70| 20 74 6f 20 68 65 61 64 | 5b 5d 20 2a 2f 0a 20 20 | to head|[] */. |
|00002c80| 20 20 63 68 61 72 20 20 | 2a 64 69 72 6c 69 73 74 | char |*dirlist|
|00002c90| 5b 4d 41 58 47 52 4f 55 | 50 53 5d 3b 09 09 2f 2a |[MAXGROU|PS];../*|
|00002ca0| 20 69 6e 64 69 76 69 64 | 75 61 6c 20 6e 65 77 73 | individ|ual news|
|00002cb0| 67 72 6f 75 70 73 20 2a | 2f 0a 20 20 20 20 63 68 |groups *|/. ch|
|00002cc0| 61 72 20 20 70 61 74 68 | 6c 69 73 74 5b 4d 41 58 |ar path|list[MAX|
|00002cd0| 47 52 4f 55 50 53 5d 5b | 4c 49 4e 45 5d 3b 09 2f |GROUPS][|LINE];./|
|00002ce0| 2a 20 70 61 74 68 20 74 | 6f 20 61 72 63 68 69 76 |* path t|o archiv|
|00002cf0| 65 20 65 61 63 68 20 67 | 72 6f 75 70 20 2a 2f 0a |e each g|roup */.|
|00002d00| 20 20 20 20 63 68 61 72 | 20 20 66 6c 6f 67 5b 4c | char| flog[L|
|00002d10| 49 4e 45 5d 3b 09 09 09 | 2f 2a 20 70 61 74 68 20 |INE];...|/* path |
|00002d20| 74 6f 20 6c 65 61 66 20 | 6c 6f 67 20 2a 2f 0a 20 |to leaf |log */. |
|00002d30| 20 20 20 63 68 61 72 20 | 20 74 6d 70 62 75 66 5b | char | tmpbuf[|
|00002d40| 4c 49 4e 45 5d 3b 09 09 | 09 2f 2a 20 74 65 6d 70 |LINE];..|./* temp|
|00002d50| 20 62 75 66 66 65 72 20 | 2a 2f 0a 20 20 20 20 63 | buffer |*/. c|
|00002d60| 68 61 72 20 20 6c 6f 67 | 6c 69 6e 65 5b 34 2a 4c |har log|line[4*L|
|00002d70| 49 4e 45 5d 3b 09 09 2f | 2a 20 64 61 74 61 20 66 |INE];../|* data f|
|00002d80| 6f 72 20 6c 6f 67 20 66 | 69 6c 65 73 20 2a 2f 0a |or log f|iles */.|
|00002d90| 20 20 20 20 63 68 61 72 | 20 20 72 6c 6f 67 5b 4c | char| rlog[L|
|00002da0| 49 4e 45 5d 3b 09 09 09 | 2f 2a 20 70 61 74 68 20 |INE];...|/* path |
|00002db0| 74 6f 20 4b 52 4f 4f 54 | 2f 6c 6f 67 20 2a 2f 0a |to KROOT|/log */.|
|00002dc0| 20 20 20 20 63 68 61 72 | 20 20 74 66 69 6c 65 5b | char| tfile[|
|00002dd0| 4c 49 4e 45 5d 3b 09 09 | 09 2f 2a 20 74 65 6d 70 |LINE];..|./* temp|
|00002de0| 20 62 75 66 66 65 72 20 | 2a 2f 0a 20 20 20 20 63 | buffer |*/. c|
|00002df0| 68 61 72 20 20 69 6e 73 | 74 61 6c 6c 66 69 6c 65 |har ins|tallfile|
|00002e00| 5b 4c 49 4e 45 5d 3b 09 | 09 2f 2a 20 61 63 74 75 |[LINE];.|./* actu|
|00002e10| 61 6c 20 66 69 6c 65 20 | 6e 61 6d 65 20 66 6f 72 |al file |name for|
|00002e20| 20 61 72 63 68 69 76 65 | 20 2a 2f 0a 20 20 20 20 | archive| */. |
|00002e30| 63 68 61 72 20 20 6c 6e | 66 69 6c 65 6e 61 6d 65 |char ln|filename|
|00002e40| 5b 4c 49 4e 45 5d 3b 09 | 09 2f 2a 20 74 65 6d 70 |[LINE];.|./* temp|
|00002e50| 20 6e 61 6d 65 20 66 6f | 72 20 6c 69 6e 6b 69 6e | name fo|r linkin|
|00002e60| 67 20 2a 2f 0a 20 20 20 | 20 63 68 61 72 20 20 77 |g */. | char w|
|00002e70| 62 75 66 5b 38 2a 4c 49 | 4e 45 5d 3b 09 09 09 2f |buf[8*LI|NE];.../|
|00002e80| 2a 20 77 72 69 74 65 20 | 6f 75 74 70 75 74 20 62 |* write |output b|
|00002e90| 75 66 66 65 72 20 2a 2f | 0a 20 20 20 20 63 68 61 |uffer */|. cha|
|00002ea0| 72 20 20 2a 66 20 3d 20 | 77 62 75 66 3b 09 09 09 |r *f = |wbuf;...|
|00002eb0| 2f 2a 20 69 6e 64 65 78 | 20 74 6f 20 68 65 61 64 |/* index| to head|
|00002ec0| 65 72 20 6c 69 6e 65 73 | 20 69 6e 20 77 62 75 66 |er lines| in wbuf|
|00002ed0| 20 2a 2f 0a 20 20 20 20 | 63 68 61 72 20 20 74 5f | */. |char t_|
|00002ee0| 6c 69 73 74 5b 4c 49 4e | 45 5d 3b 09 09 09 2f 2a |list[LIN|E];.../*|
|00002ef0| 20 75 73 65 72 20 73 75 | 70 70 6c 69 65 64 20 73 | user su|pplied s|
|00002f00| 75 62 6a 65 63 74 20 2a | 2f 0a 20 20 20 20 63 68 |ubject *|/. ch|
|00002f10| 61 72 20 20 6e 5f 6c 69 | 73 74 5b 4c 49 4e 45 5d |ar n_li|st[LINE]|
|00002f20| 3b 09 09 09 2f 2a 20 75 | 73 65 72 20 73 75 70 70 |;.../* u|ser supp|
|00002f30| 6c 69 65 64 20 6e 65 77 | 73 67 72 6f 75 70 73 20 |lied new|sgroups |
|00002f40| 2a 2f 0a 20 20 20 20 63 | 68 61 72 20 20 63 68 2c |*/. c|har ch,|
|00002f50| 20 2a 6d 2c 20 2a 74 6d | 70 6c 69 6e 65 3b 0a 20 | *m, *tm|pline;. |
|00002f60| 20 20 20 69 6e 74 20 20 | 20 74 5f 66 6c 61 67 20 | int | t_flag |
|00002f70| 3d 20 30 3b 09 09 09 2f | 2a 20 75 73 65 72 20 73 |= 0;.../|* user s|
|00002f80| 75 70 70 6c 69 65 64 20 | 73 75 62 6a 65 63 74 20 |upplied |subject |
|00002f90| 61 64 64 65 64 20 2a 2f | 0a 20 20 20 20 69 6e 74 |added */|. int|
|00002fa0| 20 20 20 6e 5f 66 6c 61 | 67 20 3d 20 30 3b 09 09 | n_fla|g = 0;..|
|00002fb0| 09 2f 2a 20 75 73 65 72 | 20 73 75 70 70 6c 69 65 |./* user| supplie|
|00002fc0| 64 20 67 72 6f 75 70 73 | 20 61 64 64 65 64 20 2a |d groups| added *|
|00002fd0| 2f 0a 20 20 20 20 69 6e | 74 20 20 20 63 2c 20 69 |/. in|t c, i|
|00002fe0| 2c 20 6a 2c 20 6f 66 64 | 2c 20 72 63 6e 74 3b 0a |, j, ofd|, rcnt;.|
|00002ff0| 20 20 20 20 69 6e 74 20 | 20 20 6e 75 6d 67 72 6f | int | numgro|
|00003000| 75 70 73 20 3d 20 31 20 | 3b 0a 20 20 20 20 69 6e |ups = 1 |;. in|
|00003010| 74 20 20 20 6c 69 6e 65 | 5f 6c 65 6e 67 74 68 20 |t line|_length |
|00003020| 3d 20 4c 49 4e 45 3b 09 | 09 2f 2a 20 66 6f 72 20 |= LINE;.|./* for |
|00003030| 69 6e 74 65 72 6e 61 6c | 20 72 65 66 65 72 65 6e |internal| referen|
|00003040| 63 65 20 2a 2f 0a 0a 20 | 20 20 20 77 68 69 6c 65 |ce */.. | while|
|00003050| 20 28 2d 2d 61 72 67 63 | 20 3e 20 30 29 09 09 09 | (--argc| > 0)...|
|00003060| 2f 2a 20 67 65 74 20 61 | 6e 79 20 75 73 65 72 20 |/* get a|ny user |
|00003070| 73 75 70 70 6c 69 65 64 | 20 69 6e 66 6f 20 2a 2f |supplied| info */|
|00003080| 0a 20 20 20 20 20 20 7b | 20 69 66 20 28 28 2b 2b |. {| if ((++|
|00003090| 61 72 67 76 29 5b 30 5d | 5b 30 5d 20 3d 3d 20 27 |argv)[0]|[0] == '|
|000030a0| 2d 27 29 0a 09 20 20 7b | 20 63 68 20 3d 20 61 72 |-').. {| ch = ar|
|000030b0| 67 76 5b 30 5d 5b 31 5d | 20 3b 0a 09 20 20 20 20 |gv[0][1]| ;.. |
|000030c0| 61 72 67 76 2b 2b 20 3b | 0a 09 20 20 20 20 61 72 |argv++ ;|.. ar|
|000030d0| 67 63 2d 2d 20 3b 0a 09 | 20 20 7d 0a 09 73 77 69 |gc-- ;..| }..swi|
|000030e0| 74 63 68 20 28 63 68 29 | 0a 09 20 20 7b 20 63 61 |tch (ch)|.. { ca|
|000030f0| 73 65 20 27 6e 27 3a 0a | 09 09 6e 5f 66 6c 61 67 |se 'n':.|..n_flag|
|00003100| 20 3d 20 31 20 3b 0a 09 | 09 73 70 72 69 6e 74 66 | = 1 ;..|.sprintf|
|00003110| 28 6e 5f 6c 69 73 74 2c | 22 25 73 2c 25 73 22 2c |(n_list,|"%s,%s",|
|00003120| 6e 5f 6c 69 73 74 2c 2a | 61 72 67 76 29 20 3b 0a |n_list,*|argv) ;.|
|00003130| 09 09 62 72 65 61 6b 20 | 3b 0a 09 20 20 20 20 63 |..break |;.. c|
|00003140| 61 73 65 20 27 74 27 3a | 0a 09 09 74 5f 66 6c 61 |ase 't':|...t_fla|
|00003150| 67 20 3d 20 31 20 3b 0a | 09 09 73 70 72 69 6e 74 |g = 1 ;.|..sprint|
|00003160| 66 28 74 5f 6c 69 73 74 | 2c 22 25 73 20 25 73 22 |f(t_list|,"%s %s"|
|00003170| 2c 74 5f 6c 69 73 74 2c | 2a 61 72 67 76 29 20 3b |,t_list,|*argv) ;|
|00003180| 0a 09 09 62 72 65 61 6b | 20 3b 0a 09 20 20 20 20 |...break| ;.. |
|00003190| 64 65 66 61 75 6c 74 3a | 0a 09 09 66 70 72 69 6e |default:|...fprin|
|000031a0| 74 66 28 73 74 64 65 72 | 72 2c 22 55 6e 6b 6e 6f |tf(stder|r,"Unkno|
|000031b0| 77 6e 20 66 6c 61 67 3a | 20 2d 25 73 5c 6e 22 2c |wn flag:| -%s\n",|
|000031c0| 63 29 20 3b 0a 09 09 65 | 78 69 74 28 31 29 20 3b |c) ;...e|xit(1) ;|
|000031d0| 0a 09 20 20 7d 0a 20 20 | 20 20 20 20 7d 0a 0a 20 |.. }. | }.. |
|000031e0| 20 20 20 75 6d 61 73 6b | 28 30 30 32 32 29 20 3b | umask|(0022) ;|
|000031f0| 0a 20 20 20 20 73 65 74 | 75 69 64 28 67 65 74 65 |. set|uid(gete|
|00003200| 75 69 64 28 29 29 3b 0a | 20 20 20 20 69 66 20 28 |uid());.| if (|
|00003210| 61 63 63 65 73 73 28 4b | 52 4f 4f 54 2c 37 29 29 |access(K|ROOT,7))|
|00003220| 0a 20 20 20 20 20 20 7b | 20 66 70 72 69 6e 74 66 |. {| fprintf|
|00003230| 28 73 74 64 65 72 72 2c | 22 43 61 6e 27 74 20 66 |(stderr,|"Can't f|
|00003240| 69 6e 64 20 6f 72 20 61 | 63 63 65 73 73 20 6b 65 |ind or a|ccess ke|
|00003250| 65 70 6e 65 77 73 20 72 | 6f 6f 74 20 64 69 72 65 |epnews r|oot dire|
|00003260| 63 74 6f 72 79 20 25 73 | 5c 6e 22 2c 0a 09 09 09 |ctory %s|\n",....|
|00003270| 09 4b 52 4f 4f 54 29 3b | 0a 09 65 78 69 74 28 31 |.KROOT);|..exit(1|
|00003280| 29 3b 0a 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 |);. | }.. |
|00003290| 72 63 6e 74 20 3d 20 72 | 65 61 64 28 30 2c 20 77 |rcnt = r|ead(0, w|
|000032a0| 62 75 66 2c 20 31 30 32 | 34 29 3b 0a 20 20 20 20 |buf, 102|4);. |
|000032b0| 77 68 69 6c 65 20 28 28 | 6a 3d 67 65 74 6c 69 6e |while ((|j=getlin|
|000032c0| 65 28 6c 69 6e 65 2c 32 | 2a 6c 69 6e 65 5f 6c 65 |e(line,2|*line_le|
|000032d0| 6e 67 74 68 2c 66 29 29 | 20 3e 20 30 29 20 09 2f |ngth,f))| > 0) ./|
|000032e0| 2a 20 67 65 74 20 68 65 | 61 64 65 72 20 69 6e 66 |* get he|ader inf|
|000032f0| 6f 20 2a 2f 0a 20 20 20 | 20 20 20 7b 20 69 66 20 |o */. | { if |
|00003300| 28 6a 20 3c 20 30 29 0a | 09 20 20 7b 20 66 70 72 |(j < 0).|. { fpr|
|00003310| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 41 74 74 |intf(std|err,"Att|
|00003320| 65 6d 70 74 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |empt to |install |
|00003330| 69 6e 63 6f 6d 70 61 74 | 69 62 6c 65 20 61 72 74 |incompat|ible art|
|00003340| 69 63 6c 65 20 66 61 69 | 6c 65 64 2e 5c 6e 22 29 |icle fai|led.\n")|
|00003350| 3b 0a 09 20 20 20 20 65 | 78 69 74 28 31 29 3b 0a |;.. e|xit(1);.|
|00003360| 09 20 20 7d 0a 09 66 20 | 2b 3d 20 6a 20 2b 20 31 |. }..f |+= j + 1|
|00003370| 3b 0a 20 20 20 20 20 20 | 20 20 66 6f 72 20 28 69 |;. | for (i|
|00003380| 20 3d 20 30 20 3b 20 69 | 20 3c 3d 20 34 20 3b 20 | = 0 ; i| <= 4 ; |
|00003390| 69 2b 2b 29 0a 09 20 20 | 20 20 69 66 20 28 74 6d |i++).. | if (tm|
|000033a0| 70 6c 69 6e 65 20 3d 20 | 6d 61 74 63 68 28 6c 69 |pline = |match(li|
|000033b0| 6e 65 2c 68 65 61 64 5b | 69 5d 29 29 0a 09 09 7b |ne,head[|i]))...{|
|000033c0| 20 73 74 72 63 70 79 28 | 63 6f 6e 74 65 6e 74 5b | strcpy(|content[|
|000033d0| 69 5d 2c 74 6d 70 6c 69 | 6e 65 29 20 3b 20 62 72 |i],tmpli|ne) ; br|
|000033e0| 65 61 6b 20 3b 20 7d 0a | 20 20 20 20 20 20 7d 0a |eak ; }.| }.|
|000033f0| 0a 20 20 20 20 2f 2a 20 | 61 64 64 20 27 2d 74 27 |. /* |add '-t'|
|00003400| 20 61 6e 64 20 27 2d 6e | 27 20 69 6e 66 6f 72 6d | and '-n|' inform|
|00003410| 61 74 69 6f 6e 20 74 6f | 20 61 72 74 69 63 6c 65 |ation to| article|
|00003420| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 2a 2f 0a | informa|tion */.|
|00003430| 20 20 20 20 69 66 20 28 | 6e 5f 66 6c 61 67 29 0a | if (|n_flag).|
|00003440| 09 73 70 72 69 6e 74 66 | 28 63 6f 6e 74 65 6e 74 |.sprintf|(content|
|00003450| 5b 31 5d 2c 22 25 73 25 | 73 22 2c 63 6f 6e 74 65 |[1],"%s%|s",conte|
|00003460| 6e 74 5b 31 5d 2c 6e 5f | 6c 69 73 74 29 3b 0a 20 |nt[1],n_|list);. |
|00003470| 20 20 20 69 66 20 28 74 | 5f 66 6c 61 67 29 0a 09 | if (t|_flag)..|
|00003480| 73 70 72 69 6e 74 66 28 | 63 6f 6e 74 65 6e 74 5b |sprintf(|content[|
|00003490| 32 5d 2c 22 25 73 20 28 | 2b 25 73 20 2b 29 22 2c |2],"%s (|+%s +)",|
|000034a0| 63 6f 6e 74 65 6e 74 5b | 32 5d 2c 74 5f 6c 69 73 |content[|2],t_lis|
|000034b0| 74 29 3b 0a 20 20 20 20 | 69 66 20 28 2a 63 6f 6e |t);. |if (*con|
|000034c0| 74 65 6e 74 5b 31 5d 20 | 3d 3d 20 4e 55 4c 4c 29 |tent[1] |== NULL)|
|000034d0| 0a 20 20 20 20 20 20 7b | 20 66 70 72 69 6e 74 66 |. {| fprintf|
|000034e0| 28 73 74 64 65 72 72 2c | 22 41 74 74 65 6d 70 74 |(stderr,|"Attempt|
|000034f0| 20 74 6f 20 69 6e 73 74 | 61 6c 6c 20 69 6e 63 6f | to inst|all inco|
|00003500| 6d 70 61 74 69 62 6c 65 | 20 61 72 74 69 63 6c 65 |mpatible| article|
|00003510| 20 66 61 69 6c 65 64 2e | 5c 6e 22 29 3b 0a 20 20 | failed.|\n");. |
|00003520| 20 20 20 20 20 20 65 78 | 69 74 28 31 29 3b 0a 20 | ex|it(1);. |
|00003530| 20 20 20 20 20 7d 0a 0a | 20 20 20 20 2f 2a 20 62 | }..| /* b|
|00003540| 72 65 61 6b 20 6e 65 77 | 73 67 72 6f 75 70 73 20 |reak new|sgroups |
|00003550| 69 6e 74 6f 20 73 65 70 | 61 72 61 74 65 20 67 72 |into sep|arate gr|
|00003560| 6f 75 70 73 20 2a 2f 0a | 20 20 20 20 73 74 72 63 |oups */.| strc|
|00003570| 70 79 28 2a 64 69 72 6c | 69 73 74 3d 6d 61 6c 6c |py(*dirl|ist=mall|
|00003580| 6f 63 28 73 74 72 6c 65 | 6e 28 63 6f 6e 74 65 6e |oc(strle|n(conten|
|00003590| 74 5b 31 5d 29 29 2c 63 | 6f 6e 74 65 6e 74 5b 31 |t[1])),c|ontent[1|
|000035a0| 5d 29 20 3b 0a 20 20 20 | 20 77 68 69 6c 65 20 28 |]) ;. | while (|
|000035b0| 64 69 72 6c 69 73 74 5b | 6e 75 6d 67 72 6f 75 70 |dirlist[|numgroup|
|000035c0| 73 5d 20 3d 20 69 6e 64 | 65 78 28 64 69 72 6c 69 |s] = ind|ex(dirli|
|000035d0| 73 74 5b 6e 75 6d 67 72 | 6f 75 70 73 2d 31 5d 2c |st[numgr|oups-1],|
|000035e0| 27 2c 27 29 29 0a 09 2a | 64 69 72 6c 69 73 74 5b |','))..*|dirlist[|
|000035f0| 6e 75 6d 67 72 6f 75 70 | 73 2b 2b 5d 2b 2b 20 3d |numgroup|s++]++ =|
|00003600| 20 4e 55 4c 4c 20 3b 0a | 20 20 20 20 6e 75 6d 67 | NULL ;.| numg|
|00003610| 72 6f 75 70 73 2d 2d 20 | 3b 0a 0a 20 20 20 20 2f |roups-- |;.. /|
|00003620| 2a 20 63 6f 6e 76 65 72 | 74 20 65 61 63 68 20 6e |* conver|t each n|
|00003630| 65 77 73 67 72 6f 75 70 | 20 6e 61 6d 65 20 69 6e |ewsgroup| name in|
|00003640| 74 6f 20 61 20 64 69 72 | 65 63 74 6f 72 79 20 70 |to a dir|ectory p|
|00003650| 61 74 68 20 2a 2f 0a 20 | 20 20 20 66 6f 72 20 28 |ath */. | for (|
|00003660| 6a 3d 30 20 3b 20 6a 20 | 3c 3d 20 6e 75 6d 67 72 |j=0 ; j |<= numgr|
|00003670| 6f 75 70 73 20 3b 20 6a | 2b 2b 29 0a 20 20 20 20 |oups ; j|++). |
|00003680| 20 20 7b 20 73 70 72 69 | 6e 74 66 28 70 61 74 68 | { spri|ntf(path|
|00003690| 6c 69 73 74 5b 6a 5d 2c | 22 25 73 2f 25 73 22 2c |list[j],|"%s/%s",|
|000036a0| 4b 52 4f 4f 54 2c 64 69 | 72 6c 69 73 74 5b 6a 5d |KROOT,di|rlist[j]|
|000036b0| 29 20 3b 0a 09 77 68 69 | 6c 65 20 28 6d 20 3d 20 |) ;..whi|le (m = |
|000036c0| 69 6e 64 65 78 28 70 61 | 74 68 6c 69 73 74 5b 6a |index(pa|thlist[j|
|000036d0| 5d 2c 27 2e 27 29 29 20 | 2a 6d 20 3d 20 27 2f 27 |],'.')) |*m = '/'|
|000036e0| 20 3b 0a 0a 09 6d 20 3d | 20 70 61 74 68 6c 69 73 | ;...m =| pathlis|
|000036f0| 74 5b 6a 5d 20 3b 09 2f | 2a 20 63 72 65 61 74 65 |t[j] ;./|* create|
|00003700| 20 61 6e 79 20 6d 69 73 | 73 69 6e 67 20 61 6e 63 | any mis|sing anc|
|00003710| 65 73 74 6f 72 20 64 69 | 72 65 63 74 6f 72 69 65 |estor di|rectorie|
|00003720| 73 20 2a 2f 0a 09 77 68 | 69 6c 65 20 28 6d 20 3d |s */..wh|ile (m =|
|00003730| 20 69 6e 64 65 78 28 6d | 2c 27 2f 27 29 29 0a 09 | index(m|,'/'))..|
|00003740| 20 20 7b 20 2a 6d 20 3d | 20 4e 55 4c 4c 20 3b 20 | { *m =| NULL ; |
|00003750| 6d 6b 64 69 72 28 70 61 | 74 68 6c 69 73 74 5b 6a |mkdir(pa|thlist[j|
|00003760| 5d 2c 30 37 35 35 29 20 | 3b 20 2a 6d 2b 2b 20 3d |],0755) |; *m++ =|
|00003770| 20 27 2f 27 20 3b 20 7d | 0a 20 20 20 20 20 20 20 | '/' ; }|. |
|00003780| 20 6d 6b 64 69 72 28 70 | 61 74 68 6c 69 73 74 5b | mkdir(p|athlist[|
|00003790| 6a 5d 2c 30 37 35 35 29 | 20 3b 0a 20 20 20 20 20 |j],0755)| ;. |
|000037a0| 20 7d 0a 0a 20 20 20 20 | 73 70 72 69 6e 74 66 28 | }.. |sprintf(|
|000037b0| 72 6c 6f 67 2c 22 25 73 | 2f 6c 6f 67 22 2c 4b 52 |rlog,"%s|/log",KR|
|000037c0| 4f 4f 54 29 20 3b 0a 20 | 20 20 20 73 70 72 69 6e |OOT) ;. | sprin|
|000037d0| 74 66 28 6c 6f 67 6c 69 | 6e 65 2c 22 25 73 3b 20 |tf(logli|ne,"%s; |
|000037e0| 25 73 2c 20 25 73 2c 20 | 25 73 2c 20 25 73 22 2c |%s, %s, |%s, %s",|
|000037f0| 63 6f 6e 74 65 6e 74 5b | 31 5d 2c 63 6f 6e 74 65 |content[|1],conte|
|00003800| 6e 74 5b 34 5d 2c 0a 09 | 09 63 6f 6e 74 65 6e 74 |nt[4],..|.content|
|00003810| 5b 30 5d 2c 63 6f 6e 74 | 65 6e 74 5b 33 5d 2c 63 |[0],cont|ent[3],c|
|00003820| 6f 6e 74 65 6e 74 5b 32 | 5d 29 20 3b 0a 20 20 20 |ontent[2|]) ;. |
|00003830| 20 73 70 72 69 6e 74 66 | 28 69 6e 73 74 61 6c 6c | sprintf|(install|
|00003840| 66 69 6c 65 2c 22 25 73 | 2f 25 73 22 2c 70 61 74 |file,"%s|/%s",pat|
|00003850| 68 6c 69 73 74 5b 30 5d | 2c 63 6f 6e 74 65 6e 74 |hlist[0]|,content|
|00003860| 5b 34 5d 29 20 3b 0a 20 | 20 20 20 73 70 72 69 6e |[4]) ;. | sprin|
|00003870| 74 66 28 66 6c 6f 67 2c | 22 25 73 2f 6c 6f 67 22 |tf(flog,|"%s/log"|
|00003880| 2c 70 61 74 68 6c 69 73 | 74 5b 30 5d 29 20 3b 0a |,pathlis|t[0]) ;.|
|00003890| 0a 20 20 20 20 72 6c 6f | 67 66 70 20 3d 20 66 6f |. rlo|gfp = fo|
|000038a0| 70 65 6e 28 72 6c 6f 67 | 2c 22 61 22 29 20 3b 0a |pen(rlog|,"a") ;.|
|000038b0| 20 20 20 20 69 66 20 28 | 61 63 63 65 73 73 28 69 | if (|access(i|
|000038c0| 6e 73 74 61 6c 6c 66 69 | 6c 65 2c 30 29 29 0a 20 |nstallfi|le,0)). |
|000038d0| 20 20 20 20 20 7b 20 66 | 70 72 69 6e 74 66 28 72 | { f|printf(r|
|000038e0| 6c 6f 67 66 70 2c 22 53 | 61 76 65 64 3a 20 25 73 |logfp,"S|aved: %s|
|000038f0| 5c 6e 22 2c 6c 6f 67 6c | 69 6e 65 29 20 3b 09 2f |\n",logl|ine) ;./|
|00003900| 2a 20 75 70 64 61 74 65 | 20 22 72 6f 6f 74 22 20 |* update| "root" |
|00003910| 6c 6f 67 20 2a 2f 0a 09 | 66 63 6c 6f 73 65 28 72 |log */..|fclose(r|
|00003920| 6c 6f 67 66 70 29 20 3b | 0a 0a 09 66 6c 6f 67 66 |logfp) ;|...flogf|
|00003930| 70 20 3d 20 66 6f 70 65 | 6e 28 66 6c 6f 67 2c 22 |p = fope|n(flog,"|
|00003940| 61 22 29 20 3b 09 2f 2a | 20 75 70 64 61 74 65 20 |a") ;./*| update |
|00003950| 22 6c 65 61 66 22 20 6c | 6f 67 20 2a 2f 0a 09 66 |"leaf" l|og */..f|
|00003960| 70 72 69 6e 74 66 28 66 | 6c 6f 67 66 70 2c 22 25 |printf(f|logfp,"%|
|00003970| 73 5c 6e 22 2c 6c 6f 67 | 6c 69 6e 65 29 20 3b 0a |s\n",log|line) ;.|
|00003980| 09 66 63 6c 6f 73 65 28 | 66 6c 6f 67 66 70 29 20 |.fclose(|flogfp) |
|00003990| 3b 0a 0a 09 2f 2a 20 20 | 77 72 69 74 65 20 65 6e |;.../* |write en|
|000039a0| 74 69 72 65 20 61 72 74 | 69 63 6c 65 20 68 65 61 |tire art|icle hea|
|000039b0| 64 65 72 20 61 6e 64 20 | 62 6f 64 79 20 74 6f 20 |der and |body to |
|000039c0| 61 72 63 68 69 76 65 20 | 66 69 6c 65 20 2a 2f 0a |archive |file */.|
|000039d0| 09 6f 66 64 20 3d 20 63 | 72 65 61 74 28 69 6e 73 |.ofd = c|reat(ins|
|000039e0| 74 61 6c 6c 66 69 6c 65 | 2c 20 30 36 34 34 29 20 |tallfile|, 0644) |
|000039f0| 3b 0a 09 77 72 69 74 65 | 28 6f 66 64 2c 20 77 62 |;..write|(ofd, wb|
|00003a00| 75 66 2c 20 72 63 6e 74 | 29 20 3b 0a 09 69 66 20 |uf, rcnt|) ;..if |
|00003a10| 28 72 63 6e 74 20 3d 3d | 20 31 30 32 34 29 0a 09 |(rcnt ==| 1024)..|
|00003a20| 20 20 7b 20 77 68 69 6c | 65 20 28 28 72 63 6e 74 | { whil|e ((rcnt|
|00003a30| 20 3d 20 72 65 61 64 28 | 30 2c 20 77 62 75 66 2c | = read(|0, wbuf,|
|00003a40| 20 31 30 32 34 29 29 20 | 3d 3d 20 31 30 32 34 29 | 1024)) |== 1024)|
|00003a50| 0a 09 20 20 20 20 20 20 | 20 20 77 72 69 74 65 28 |.. | write(|
|00003a60| 6f 66 64 2c 20 77 62 75 | 66 2c 20 31 30 32 34 29 |ofd, wbu|f, 1024)|
|00003a70| 20 3b 0a 09 20 20 20 20 | 77 72 69 74 65 28 6f 66 | ;.. |write(of|
|00003a80| 64 2c 20 77 62 75 66 2c | 20 72 63 6e 74 29 20 3b |d, wbuf,| rcnt) ;|
|00003a90| 0a 09 20 20 7d 0a 09 63 | 6c 6f 73 65 28 6f 66 64 |.. }..c|lose(ofd|
|00003aa0| 29 20 3b 0a 0a 09 2f 2a | 20 69 6e 73 74 61 6c 6c |) ;.../*| install|
|00003ab0| 20 68 61 72 64 20 6c 69 | 6e 6b 73 20 74 6f 20 72 | hard li|nks to r|
|00003ac0| 65 6d 61 69 6e 69 6e 67 | 20 6e 65 77 73 67 72 6f |emaining| newsgro|
|00003ad0| 75 70 73 20 2a 2f 0a 09 | 66 6f 72 20 28 69 20 3d |ups */..|for (i =|
|00003ae0| 20 31 20 3b 20 69 20 3c | 3d 20 6e 75 6d 67 72 6f | 1 ; i <|= numgro|
|00003af0| 75 70 73 20 3b 20 69 2b | 2b 29 0a 09 20 20 7b 20 |ups ; i+|+).. { |
|00003b00| 73 70 72 69 6e 74 66 28 | 74 66 69 6c 65 2c 22 25 |sprintf(|tfile,"%|
|00003b10| 73 2f 25 73 22 2c 70 61 | 74 68 6c 69 73 74 5b 69 |s/%s",pa|thlist[i|
|00003b20| 5d 2c 63 6f 6e 74 65 6e | 74 5b 34 5d 29 20 3b 0a |],conten|t[4]) ;.|
|00003b30| 09 20 20 20 20 73 70 72 | 69 6e 74 66 28 74 6d 70 |. spr|intf(tmp|
|00003b40| 62 75 66 2c 22 25 73 2f | 6c 6f 67 22 2c 70 61 74 |buf,"%s/|log",pat|
|00003b50| 68 6c 69 73 74 5b 69 5d | 29 20 3b 0a 09 20 20 20 |hlist[i]|) ;.. |
|00003b60| 20 6c 69 6e 6b 28 69 6e | 73 74 61 6c 6c 66 69 6c | link(in|stallfil|
|00003b70| 65 2c 74 66 69 6c 65 29 | 20 3b 0a 09 20 20 20 20 |e,tfile)| ;.. |
|00003b80| 66 6c 6f 67 66 70 20 3d | 20 66 6f 70 65 6e 28 74 |flogfp =| fopen(t|
|00003b90| 6d 70 62 75 66 2c 22 61 | 22 29 20 3b 0a 09 20 20 |mpbuf,"a|") ;.. |
|00003ba0| 20 20 66 70 72 69 6e 74 | 66 28 66 6c 6f 67 66 70 | fprint|f(flogfp|
|00003bb0| 2c 22 25 73 5c 6e 22 2c | 6c 6f 67 6c 69 6e 65 29 |,"%s\n",|logline)|
|00003bc0| 20 3b 0a 09 20 20 20 20 | 66 63 6c 6f 73 65 28 66 | ;.. |fclose(f|
|00003bd0| 6c 6f 67 66 70 29 20 3b | 0a 09 20 20 7d 0a 20 20 |logfp) ;|.. }. |
|00003be0| 20 20 20 20 7d 0a 20 20 | 20 20 65 6c 73 65 20 69 | }. | else i|
|00003bf0| 66 20 28 6e 5f 66 6c 61 | 67 29 09 09 2f 2a 20 74 |f (n_fla|g)../* t|
|00003c00| 5f 66 6c 61 67 20 69 73 | 20 69 6d 70 6c 69 65 64 |_flag is| implied|
|00003c10| 20 2a 2f 0a 20 20 20 20 | 20 20 7b 20 66 70 72 69 | */. | { fpri|
|00003c20| 6e 74 66 28 72 6c 6f 67 | 66 70 2c 22 53 61 76 65 |ntf(rlog|fp,"Save|
|00003c30| 64 3a 20 25 73 5c 6e 22 | 2c 6c 6f 67 6c 69 6e 65 |d: %s\n"|,logline|
|00003c40| 29 20 3b 09 2f 2a 20 75 | 70 64 61 74 65 20 22 72 |) ;./* u|pdate "r|
|00003c50| 6f 6f 74 22 20 6c 6f 67 | 20 2a 2f 0a 09 66 63 6c |oot" log| */..fcl|
|00003c60| 6f 73 65 28 72 6c 6f 67 | 66 70 29 20 3b 0a 0a 09 |ose(rlog|fp) ;...|
|00003c70| 2f 2a 20 69 6e 73 74 61 | 6c 6c 20 68 61 72 64 20 |/* insta|ll hard |
|00003c80| 6c 69 6e 6b 73 20 74 6f | 20 72 65 6d 61 69 6e 69 |links to| remaini|
|00003c90| 6e 67 20 6e 65 77 73 67 | 72 6f 75 70 73 20 2a 2f |ng newsg|roups */|
|00003ca0| 0a 09 66 6f 72 20 28 69 | 20 3d 20 30 20 3b 20 69 |..for (i| = 0 ; i|
|00003cb0| 20 3c 3d 20 6e 75 6d 67 | 72 6f 75 70 73 20 3b 20 | <= numg|roups ; |
|00003cc0| 69 2b 2b 29 0a 09 20 20 | 7b 20 73 70 72 69 6e 74 |i++).. |{ sprint|
|00003cd0| 66 28 74 66 69 6c 65 2c | 22 25 73 2f 25 73 22 2c |f(tfile,|"%s/%s",|
|00003ce0| 70 61 74 68 6c 69 73 74 | 5b 69 5d 2c 63 6f 6e 74 |pathlist|[i],cont|
|00003cf0| 65 6e 74 5b 34 5d 29 20 | 3b 0a 09 20 20 20 20 73 |ent[4]) |;.. s|
|00003d00| 70 72 69 6e 74 66 28 74 | 6d 70 62 75 66 2c 22 25 |printf(t|mpbuf,"%|
|00003d10| 73 2f 6c 6f 67 22 2c 70 | 61 74 68 6c 69 73 74 5b |s/log",p|athlist[|
|00003d20| 69 5d 29 20 3b 0a 09 20 | 20 20 20 6c 69 6e 6b 28 |i]) ;.. | link(|
|00003d30| 69 6e 73 74 61 6c 6c 66 | 69 6c 65 2c 74 66 69 6c |installf|ile,tfil|
|00003d40| 65 29 20 3b 0a 09 20 20 | 20 20 66 6c 6f 67 66 70 |e) ;.. | flogfp|
|00003d50| 20 3d 20 66 6f 70 65 6e | 28 74 6d 70 62 75 66 2c | = fopen|(tmpbuf,|
|00003d60| 22 61 22 29 20 3b 0a 09 | 20 20 20 20 66 70 72 69 |"a") ;..| fpri|
|00003d70| 6e 74 66 28 66 6c 6f 67 | 66 70 2c 22 25 73 5c 6e |ntf(flog|fp,"%s\n|
|00003d80| 22 2c 6c 6f 67 6c 69 6e | 65 29 20 3b 0a 09 20 20 |",loglin|e) ;.. |
|00003d90| 20 20 66 63 6c 6f 73 65 | 28 66 6c 6f 67 66 70 29 | fclose|(flogfp)|
|00003da0| 20 3b 0a 09 20 20 7d 0a | 20 20 20 20 20 20 7d 0a | ;.. }.| }.|
|00003db0| 20 20 20 20 65 6c 73 65 | 20 69 66 20 28 74 5f 66 | else| if (t_f|
|00003dc0| 6c 61 67 29 0a 20 20 20 | 20 20 20 7b 20 66 70 72 |lag). | { fpr|
|00003dd0| 69 6e 74 66 28 72 6c 6f | 67 66 70 2c 22 53 61 76 |intf(rlo|gfp,"Sav|
|00003de0| 65 64 3a 20 25 73 5c 6e | 22 2c 6c 6f 67 6c 69 6e |ed: %s\n|",loglin|
|00003df0| 65 29 20 3b 09 2f 2a 20 | 75 70 64 61 74 65 20 22 |e) ;./* |update "|
|00003e00| 72 6f 6f 74 22 20 6c 6f | 67 20 2a 2f 0a 09 66 63 |root" lo|g */..fc|
|00003e10| 6c 6f 73 65 28 72 6c 6f | 67 66 70 29 20 3b 0a 0a |lose(rlo|gfp) ;..|
|00003e20| 09 2f 2a 20 75 70 64 61 | 74 65 20 22 6c 65 61 66 |./* upda|te "leaf|
|00003e30| 22 20 6c 6f 67 20 66 6f | 72 20 65 61 63 68 20 6c |" log fo|r each l|
|00003e40| 65 61 66 20 2a 2f 0a 09 | 66 6f 72 20 28 69 20 3d |eaf */..|for (i =|
|00003e50| 20 30 20 3b 20 69 20 3c | 3d 20 6e 75 6d 67 72 6f | 0 ; i <|= numgro|
|00003e60| 75 70 73 20 3b 20 69 2b | 2b 29 0a 09 20 20 7b 20 |ups ; i+|+).. { |
|00003e70| 73 70 72 69 6e 74 66 28 | 74 6d 70 62 75 66 2c 22 |sprintf(|tmpbuf,"|
|00003e80| 25 73 2f 6c 6f 67 22 2c | 70 61 74 68 6c 69 73 74 |%s/log",|pathlist|
|00003e90| 5b 69 5d 29 20 3b 0a 09 | 20 20 20 20 66 6c 6f 67 |[i]) ;..| flog|
|00003ea0| 66 70 20 3d 20 66 6f 70 | 65 6e 28 74 6d 70 62 75 |fp = fop|en(tmpbu|
|00003eb0| 66 2c 22 61 22 29 20 3b | 0a 09 20 20 20 20 66 70 |f,"a") ;|.. fp|
|00003ec0| 72 69 6e 74 66 28 66 6c | 6f 67 66 70 2c 22 25 73 |rintf(fl|ogfp,"%s|
|00003ed0| 5c 6e 22 2c 6c 6f 67 6c | 69 6e 65 29 20 3b 0a 09 |\n",logl|ine) ;..|
|00003ee0| 20 20 20 20 66 63 6c 6f | 73 65 28 66 6c 6f 67 66 | fclo|se(flogf|
|00003ef0| 70 29 20 3b 0a 09 20 20 | 7d 0a 20 20 20 20 20 20 |p) ;.. |}. |
|00003f00| 7d 0a 20 20 20 20 65 6c | 73 65 09 2f 2a 20 75 70 |}. el|se./* up|
|00003f10| 64 61 74 65 20 6f 6e 6c | 79 20 4b 52 4f 4f 54 20 |date onl|y KROOT |
|00003f20| 6c 6f 67 20 2a 2f 0a 20 | 20 20 20 20 20 7b 20 66 |log */. | { f|
|00003f30| 70 72 69 6e 74 66 28 72 | 6c 6f 67 66 70 2c 22 44 |printf(r|logfp,"D|
|00003f40| 75 70 6c 69 63 61 74 65 | 20 72 65 71 75 65 73 74 |uplicate| request|
|00003f50| 3a 20 25 73 5c 6e 22 2c | 63 6f 6e 74 65 6e 74 5b |: %s\n",|content[|
|00003f60| 34 5d 29 20 3b 0a 09 66 | 63 6c 6f 73 65 28 72 6c |4]) ;..f|close(rl|
|00003f70| 6f 67 66 70 29 20 3b 0a | 20 20 20 20 20 20 7d 0a |ogfp) ;.| }.|
|00003f80| 20 20 20 20 65 78 69 74 | 28 30 29 20 3b 0a 7d 0a | exit|(0) ;.}.|
|00003f90| 0a 63 68 61 72 20 2a 0a | 6d 61 74 63 68 28 73 2c |.char *.|match(s,|
|00003fa0| 74 29 20 63 68 61 72 20 | 2a 73 2c 20 2a 74 3b 20 |t) char |*s, *t; |
|00003fb0| 20 20 09 2f 2a 20 72 65 | 74 75 72 6e 20 65 6e 64 | ./* re|turn end|
|00003fc0| 20 6f 66 20 74 20 69 6e | 20 73 2c 20 4e 55 4c 4c | of t in| s, NULL|
|00003fd0| 20 69 66 20 6e 6f 6e 65 | 20 2a 2f 0a 7b 20 20 20 | if none| */.{ |
|00003fe0| 77 68 69 6c 65 20 28 2a | 74 20 21 3d 20 4e 55 4c |while (*|t != NUL|
|00003ff0| 4c 20 26 26 20 2a 73 2b | 2b 20 3d 3d 20 2a 74 2b |L && *s+|+ == *t+|
|00004000| 2b 29 20 3b 0a 20 20 20 | 20 69 66 20 28 2a 74 20 |+) ;. | if (*t |
|00004010| 3d 3d 20 4e 55 4c 4c 29 | 20 72 65 74 75 72 6e 28 |== NULL)| return(|
|00004020| 73 29 20 3b 0a 20 20 20 | 20 65 6c 73 65 20 72 65 |s) ;. | else re|
|00004030| 74 75 72 6e 28 4e 55 4c | 4c 29 20 3b 0a 7d 0a 0a |turn(NUL|L) ;.}..|
|00004040| 67 65 74 6c 69 6e 65 28 | 73 2c 6c 69 6d 2c 66 29 |getline(|s,lim,f)|
|00004050| 20 63 68 61 72 20 2a 73 | 2c 20 2a 66 3b 09 2f 2a | char *s|, *f;./*|
|00004060| 20 67 65 74 20 6c 69 6e | 65 20 69 6e 74 6f 20 73 | get lin|e into s|
|00004070| 20 66 72 6f 6d 20 66 20 | 26 20 72 65 74 75 72 6e | from f |& return|
|00004080| 20 6c 65 6e 67 74 68 20 | 2a 2f 0a 7b 20 20 20 69 | length |*/.{ i|
|00004090| 6e 74 20 63 2c 20 69 3b | 09 09 09 2f 2a 20 64 6f |nt c, i;|.../* do|
|000040a0| 6e 27 74 20 69 6e 63 6c | 75 64 65 20 6e 65 77 6c |n't incl|ude newl|
|000040b0| 69 6e 65 3b 20 2d 31 20 | 69 66 20 6c 65 6e 20 3e |ine; -1 |if len >|
|000040c0| 20 6c 69 6d 20 2a 2f 0a | 20 20 20 20 63 68 61 72 | lim */.| char|
|000040d0| 20 2a 66 74 6d 70 3b 0a | 0a 20 20 20 20 66 74 6d | *ftmp;.|. ftm|
|000040e0| 70 20 3d 20 69 6e 64 65 | 78 28 66 2c 27 5c 6e 27 |p = inde|x(f,'\n'|
|000040f0| 29 3b 0a 20 20 20 20 2a | 66 74 6d 70 20 3d 20 4e |);. *|ftmp = N|
|00004100| 55 4c 4c 3b 0a 20 20 20 | 20 69 66 20 28 73 74 72 |ULL;. | if (str|
|00004110| 6c 65 6e 28 66 29 20 3c | 3d 20 6c 69 6d 29 0a 09 |len(f) <|= lim)..|
|00004120| 73 74 72 63 70 79 28 73 | 2c 66 29 3b 0a 20 20 20 |strcpy(s|,f);. |
|00004130| 20 65 6c 73 65 0a 09 72 | 65 74 75 72 6e 28 2d 31 | else..r|eturn(-1|
|00004140| 29 3b 0a 20 20 20 20 2a | 66 74 6d 70 2b 2b 20 3d |);. *|ftmp++ =|
|00004150| 20 27 5c 6e 27 3b 0a 20 | 20 20 20 66 20 3d 20 66 | '\n';. | f = f|
|00004160| 74 6d 70 3b 0a 20 20 20 | 20 72 65 74 75 72 6e 28 |tmp;. | return(|
|00004170| 73 74 72 6c 65 6e 28 73 | 29 29 3b 0a 7d 0a 6e 20 |strlen(s|));.}.n |
|00004180| 66 72 6f 6d 20 61 20 72 | 65 64 69 72 65 63 74 65 |from a r|edirecte|
|00004190| 64 20 6e 65 77 73 20 61 | 72 74 69 63 6c 65 0a 2a |d news a|rticle.*|
|000041a0| 2a 20 61 6e 64 20 63 68 | 65 63 6b 73 20 74 6f 20 |* and ch|ecks to |
|000041b0| 73 65 65 20 69 66 20 74 | 68 65 20 61 72 74 69 63 |see if t|he artic|
|000041c0| 6c 65 20 68 61 73 20 61 | 6c 72 65 61 64 79 20 62 |le has a|lready b|
|000041d0| 65 65 6e 20 73 61 76 65 | 64 2e 20 20 49 66 20 73 |een save|d. If s|
|000041e0| 6f 2c 20 69 74 0a 2a 2a | 20 61 70 70 65 6e 64 73 |o, it.**| appends|
|000041f0| 20 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | a corre|sponding|
|00004200| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004400| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004600| 2f 2a 0a 2a 2a 20 54 68 | 65 20 69 6e 69 74 69 61 |/*.** Th|e initia|
|00004610| 6c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |l implem|entation|
|00004620| 20 6f 66 20 6b 65 65 70 | 6e 65 77 73 20 77 61 73 | of keep|news was|
|00004630| 20 77 72 69 74 74 65 6e | 20 69 6e 20 49 63 6f 6e | written| in Icon|
|00004640| 20 62 79 0a 2a 2a 20 42 | 69 6c 6c 20 4d 69 74 63 | by.** B|ill Mitc|
|00004650| 68 65 6c 6c 20 61 74 20 | 74 68 65 20 55 6e 69 76 |hell at |the Univ|
|00004660| 65 72 73 69 74 79 20 6f | 66 20 41 72 69 7a 6f 6e |ersity o|f Arizon|
|00004670| 61 2e 20 20 54 68 69 73 | 20 76 65 72 73 69 6f 6e |a. This| version|
|00004680| 0a 2a 2a 20 69 73 20 6d | 6f 74 69 76 61 74 65 64 |.** is m|otivated|
|00004690| 20 62 79 20 74 68 65 20 | 6e 65 65 64 20 66 6f 72 | by the |need for|
|000046a0| 20 67 72 65 61 74 65 72 | 20 73 70 65 65 64 20 61 | greater| speed a|
|000046b0| 6e 64 20 76 61 72 69 6f | 75 73 20 66 75 6e 63 2d |nd vario|us func-|
|000046c0| 0a 2a 2a 20 74 69 6f 6e | 61 6c 20 69 6d 70 72 6f |.** tion|al impro|
|000046d0| 76 65 6d 65 6e 74 73 2e | 0a 2a 2a 20 0a 2a 2a 20 |vements.|.** .** |
|000046e0| 2d 2d 20 4d 61 72 6b 20 | 53 77 65 6e 73 6f 6e 20 |-- Mark |Swenson |
|000046f0| 7b 69 68 6e 70 34 2c 6e | 6f 61 6f 2c 75 74 61 68 |{ihnp4,n|oao,utah|
|00004700| 2d 63 73 2c 6d 63 6e 63 | 7d 21 61 72 69 7a 6f 6e |-cs,mcnc|}!arizon|
|00004710| 61 21 6d 6d 73 0a 2a 2a | 20 20 20 20 44 65 70 74 |a!mms.**| Dept|
|00004720| 2e 20 6f 66 20 43 6f 6d | 70 75 74 65 72 20 53 63 |. of Com|puter Sc|
|00004730| 69 65 6e 63 65 20 2f 20 | 55 6e 69 76 65 72 73 69 |ience / |Universi|
|00004740| 74 79 20 6f 66 20 41 72 | 69 7a 6f 6e 61 0a 2a 2a |ty of Ar|izona.**|
|00004750| 0a 2a 2a 0a 2a 2a 20 6b | 65 65 70 6e 65 77 73 20 |.**.** k|eepnews |
|00004760| 65 78 74 72 61 63 74 73 | 20 74 68 65 20 68 65 61 |extracts| the hea|
|00004770| 64 65 72 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |der info|rmation |
|00004780| 66 72 6f 6d 20 61 20 72 | 65 64 69 72 65 63 74 65 |from a r|edirecte|
|00004790| 64 20 6e 65 77 73 20 61 | 72 74 69 63 6c 65 0a 2a |d news a|rticle.*|
|000047a0| 2a 20 61 6e 64 20 63 68 | 65 63 6b 73 20 74 6f 20 |* and ch|ecks to |
|000047b0| 73 65 65 20 69 66 20 74 | 68 65 20 61 72 74 69 63 |see if t|he artic|
|000047c0| 6c 65 20 68 61 73 20 61 | 6c 72 65 61 64 79 20 62 |le has a|lready b|
|000047d0| 65 65 6e 20 73 61 76 65 | 64 2e 20 20 49 66 20 73 |een save|d. If s|
|000047e0| 6f 2c 20 69 74 0a 2a 2a | 20 61 70 70 65 6e 64 73 |o, it.**| appends|
|000047f0| 20 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | a corre|sponding|
|00004800| 20 6d 65 73 73 61 67 65 | 20 69 6e 20 4b 52 4f 4f | message| in KROO|
|00004810| 54 2f 6c 6f 67 2c 20 6f | 74 68 65 72 77 69 73 65 |T/log, o|therwise|
|00004820| 20 69 74 20 63 72 65 61 | 74 65 73 20 61 0a 2a 2a | it crea|tes a.**|
|00004830| 20 66 69 6c 65 20 69 6e | 20 74 68 65 20 6c 6f 63 | file in| the loc|
|00004840| 61 74 69 6f 6e 20 73 70 | 65 63 69 66 69 65 64 20 |ation sp|ecified |
|00004850| 62 79 20 74 68 65 20 66 | 69 72 73 74 20 6e 65 77 |by the f|irst new|
|00004860| 73 67 72 6f 75 70 20 6c | 69 73 74 65 64 2c 20 61 |sgroup l|isted, a|
|00004870| 6e 64 0a 2a 2a 20 6c 69 | 6e 6b 73 20 74 68 65 20 |nd.** li|nks the |
|00004880| 72 65 6d 61 69 6e 69 6e | 67 20 6e 65 77 73 67 72 |remainin|g newsgr|
|00004890| 6f 75 70 73 20 74 6f 20 | 74 68 69 73 20 66 69 6c |oups to |this fil|
|000048a0| 65 2e 20 20 54 68 65 20 | 62 6f 64 79 20 6f 66 20 |e. The |body of |
|000048b0| 74 68 65 20 61 72 74 69 | 63 6c 65 0a 2a 2a 20 69 |the arti|cle.** i|
|000048c0| 73 20 6e 6f 74 20 72 65 | 61 64 20 75 6e 6c 65 73 |s not re|ad unles|
|000048d0| 73 20 69 74 20 69 73 20 | 61 63 74 75 61 6c 6c 79 |s it is |actually|
|000048e0| 20 73 61 76 65 64 2c 20 | 61 6e 64 20 69 66 20 74 | saved, |and if t|
|000048f0| 68 61 74 20 69 73 20 74 | 68 65 20 63 61 73 65 2c |hat is t|he case,|
|00004900| 0a 2a 2a 20 73 74 64 69 | 6e 20 69 73 20 63 6f 70 |.** stdi|n is cop|
|00004910| 69 65 64 20 64 69 72 65 | 63 74 6c 79 20 69 6e 74 |ied dire|ctly int|
|00004920| 6f 20 74 68 69 73 20 6e | 65 77 20 66 69 6c 65 2e |o this n|ew file.|
|00004930| 0a 2a 2a 0a 2a 2a 20 54 | 68 65 20 2d 6e 20 61 6e |.**.** T|he -n an|
|00004940| 64 20 2d 74 20 6f 70 74 | 69 6f 6e 73 20 68 61 76 |d -t opt|ions hav|
|00004950| 65 20 62 65 65 6e 20 61 | 64 64 65 64 20 74 6f 20 |e been a|dded to |
|00004960| 61 6c 6c 6f 77 20 74 68 | 65 20 75 73 65 72 20 74 |allow th|e user t|
|00004970| 6f 20 73 75 70 70 6c 79 | 0a 2a 2a 20 61 64 64 69 |o supply|.** addi|
|00004980| 74 69 6f 6e 61 6c 20 6e | 65 77 73 67 72 6f 75 70 |tional n|ewsgroup|
|00004990| 73 20 28 65 67 2e 20 2d | 6e 20 6e 65 74 2e 61 6e |s (eg. -|n net.an|
|000049a0| 6f 74 68 65 72 2e 6f 6e | 65 20 6e 65 74 2e 61 6e |other.on|e net.an|
|000049b0| 6f 74 68 65 72 2e 74 77 | 6f 29 20 6f 72 0a 2a 2a |other.tw|o) or.**|
|000049c0| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 73 75 62 6a | additio|nal subj|
|000049d0| 65 63 74 20 6d 61 74 74 | 65 72 20 28 65 67 2e 20 |ect matt|er (eg. |
|000049e0| 2d 74 20 6d 6f 72 65 20 | 73 75 62 6a 65 63 74 20 |-t more |subject |
|000049f0| 6d 61 74 65 72 69 61 6c | 29 20 72 65 73 70 65 63 |material|) respec|
|00004a00| 74 69 76 65 6c 79 2e 0a | 2a 2a 20 54 68 65 73 65 |tively..|** These|
|00004a10| 20 66 6c 61 67 73 20 63 | 61 6e 20 62 65 20 69 6e | flags c|an be in|
|00004a20| 74 65 72 6d 69 78 65 64 | 2c 20 61 6e 64 20 65 76 |termixed|, and ev|
|00004a30| 65 72 79 74 68 69 6e 67 | 20 66 6f 6c 6c 6f 77 69 |erything| followi|
|00004a40| 6e 67 20 65 61 63 68 20 | 69 73 20 74 61 6b 65 6e |ng each |is taken|
|00004a50| 0a 2a 2a 20 61 73 20 69 | 74 73 20 61 72 67 75 6d |.** as i|ts argum|
|00004a60| 65 6e 74 20 75 70 20 74 | 6f 20 74 68 65 20 6e 65 |ent up t|o the ne|
|00004a70| 78 74 20 2d 6e 2c 20 2d | 74 2c 20 6f 72 20 6e 65 |xt -n, -|t, or ne|
|00004a80| 77 6c 69 6e 65 2e 0a 2a | 2a 20 0a 2a 2f 0a 0a 23 |wline..*|* .*/..#|
|00004a90| 69 6e 63 6c 75 64 65 09 | 09 3c 73 74 64 69 6f 2e |include.|.<stdio.|
|00004aa0| 68 3e 0a 23 64 65 66 69 | 6e 65 09 4b 52 4f 4f 54 |h>.#defi|ne.KROOT|
|00004ab0| 09 09 22 2f 75 73 72 2f | 73 70 6f 6f 6c 2f 6b 65 |.."/usr/|spool/ke|
|00004ac0| 65 70 6e 65 77 73 22 0a | 23 64 65 66 69 6e 65 09 |epnews".|#define.|
|00004ad0| 4d 41 58 47 52 4f 55 50 | 53 09 32 30 0a 23 64 65 |MAXGROUP|S.20.#de|
|00004ae0| 66 69 6e 65 09 4c 49 4e | 45 09 09 31 32 38 0a 0a |fine.LIN|E..128..|
|00004af0| 65 78 74 65 72 6e 09 46 | 49 4c 45 09 2a 66 6f 70 |extern.F|ILE.*fop|
|00004b00| 65 6e 28 29 3b 0a 65 78 | 74 65 72 6e 09 63 68 61 |en();.ex|tern.cha|
|00004b10| 72 09 2a 69 6e 64 65 78 | 28 29 2c 20 2a 6d 61 6c |r.*index|(), *mal|
|00004b20| 6c 6f 63 28 29 3b 0a 63 | 68 61 72 09 09 2a 6d 61 |loc();.c|har..*ma|
|00004b30| 74 63 68 28 29 3b 20 0a | 73 74 61 74 69 63 09 63 |tch(); .|static.c|
|00004b40| 68 61 72 09 2a 68 65 61 | 64 5b 35 5d 20 3d 09 7b |har.*hea|d[5] =.{|
|00004b50| 0a 09 09 09 09 22 46 72 | 6f 6d 3a 20 22 2c 0a 09 |....."Fr|om: ",..|
|00004b60| 09 09 20 09 22 4e 65 77 | 73 67 72 6f 75 70 73 3a |.. ."New|sgroups:|
|00004b70| 20 22 2c 0a 09 09 09 20 | 09 22 53 75 62 6a 65 63 | ",.... |."Subjec|
|00004b80| 74 3a 20 22 2c 0a 09 09 | 09 20 09 22 50 6f 73 74 |t: ",...|. ."Post|
|00004b90| 65 64 3a 20 22 2c 0a 09 | 09 09 20 09 22 41 72 74 |ed: ",..|.. ."Art|
|00004ba0| 69 63 6c 65 2d 49 2e 44 | 2e 3a 20 22 0a 09 09 09 |icle-I.D|.: "....|
|00004bb0| 09 7d 20 3b 0a 6d 61 69 | 6e 28 61 72 67 63 2c 61 |.} ;.mai|n(argc,a|
|00004bc0| 72 67 76 29 20 63 68 61 | 72 20 2a 2a 61 72 67 76 |rgv) cha|r **argv|
|00004bd0| 3b 0a 7b 20 20 20 46 49 | 4c 45 20 20 2a 72 6c 6f |;.{ FI|LE *rlo|
|00004be0| 67 66 70 2c 20 2a 66 6c | 6f 67 66 70 2c 20 2a 66 |gfp, *fl|ogfp, *f|
|00004bf0| 69 6c 65 66 70 3b 0a 09 | 09 09 09 09 2f 2a 20 75 |ilefp;..|..../* u|
|00004c00| 73 65 20 62 75 66 66 65 | 72 73 20 65 78 74 65 6e |se buffe|rs exten|
|00004c10| 73 69 76 65 6c 79 20 66 | 6f 72 20 73 70 65 65 64 |sively f|or speed|
|00004c20| 20 2a 2f 0a 20 20 20 20 | 63 68 61 72 20 20 6c 69 | */. |char li|
|00004c30| 6e 65 5b 32 2a 4c 49 4e | 45 5d 3b 0a 20 20 20 20 |ne[2*LIN|E];. |
|00004c40| 63 68 61 72 20 20 63 6f | 6e 74 65 6e 74 5b 35 5d |char co|ntent[5]|
|00004c50| 5b 32 2a 4c 49 4e 45 5d | 3b 09 09 2f 2a 20 64 61 |[2*LINE]|;../* da|
|00004c60| 74 61 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 |ta corre|sponding|
|00004c70| 20 74 6f 20 68 65 61 64 | 5b 5d 20 2a 2f 0a 20 20 | to head|[] */. |
|00004c80| 20 20 63 68 61 72 20 20 | 2a 64 69 72 6c 69 73 74 | char |*dirlist|
|00004c90| 5b 4d 41 58 47 52 4f 55 | 50 53 5d 3b 09 09 2f 2a |[MAXGROU|PS];../*|
|00004ca0| 20 69 6e 64 69 76 69 64 | 75 61 6c 20 6e 65 77 73 | individ|ual news|
|00004cb0| 67 72 6f 75 70 73 20 2a | 2f 0a 20 20 20 20 63 68 |groups *|/. ch|
|00004cc0| 61 72 20 20 70 61 74 68 | 6c 69 73 74 5b 4d 41 58 |ar path|list[MAX|
|00004cd0| 47 52 4f 55 50 53 5d 5b | 4c 49 4e 45 5d 3b 09 2f |GROUPS][|LINE];./|
|00004ce0| 2a 20 70 61 74 68 20 74 | 6f 20 61 72 63 68 69 76 |* path t|o archiv|
|00004cf0| 65 20 65 61 63 68 20 67 | 72 6f 75 70 20 2a 2f 0a |e each g|roup */.|
|00004d00| 20 20 20 20 63 68 61 72 | 20 20 66 6c 6f 67 5b 4c | char| flog[L|
|00004d10| 49 4e 45 5d 3b 09 09 09 | 2f 2a 20 70 61 74 68 20 |INE];...|/* path |
|00004d20| 74 6f 20 6c 65 61 66 20 | 6c 6f 67 20 2a 2f 0a 20 |to leaf |log */. |
|00004d30| 20 20 20 63 68 61 72 20 | 20 74 6d 70 62 75 66 5b | char | tmpbuf[|
|00004d40| 4c 49 4e 45 5d 3b 09 09 | 09 2f 2a 20 74 65 6d 70 |LINE];..|./* temp|
|00004d50| 20 62 75 66 66 65 72 20 | 2a 2f 0a 20 20 20 20 63 | buffer |*/. c|
|00004d60| 68 61 72 20 20 6c 6f 67 | 6c 69 6e 65 5b 34 2a 4c |har log|line[4*L|
|00004d70| 49 4e 45 5d 3b 09 09 2f | 2a 20 64 61 74 61 20 66 |INE];../|* data f|
|00004d80| 6f 72 20 6c 6f 67 20 66 | 69 6c 65 73 20 2a 2f 0a |or log f|iles */.|
|00004d90| 20 20 20 20 63 68 61 72 | 20 20 72 6c 6f 67 5b 4c | char| rlog[L|
|00004da0| 49 4e 45 5d 3b 09 09 09 | 2f 2a 20 70 61 74 68 20 |INE];...|/* path |
|00004db0| 74 6f 20 4b 52 4f 4f 54 | 2f 6c 6f 67 20 2a 2f 0a |to KROOT|/log */.|
|00004dc0| 20 20 20 20 63 68 61 72 | 20 20 74 66 69 6c 65 5b | char| tfile[|
|00004dd0| 4c 49 4e 45 5d 3b 09 09 | 09 2f 2a 20 74 65 6d 70 |LINE];..|./* temp|
|00004de0| 20 62 75 66 66 65 72 20 | 2a 2f 0a 20 20 20 20 63 | buffer |*/. c|
|00004df0| 68 61 72 20 20 69 6e 73 | 74 61 6c 6c 66 69 6c 65 |har ins|tallfile|
|00004e00| 5b 4c 49 4e 45 5d 3b 09 | 09 2f 2a 20 61 63 74 75 |[LINE];.|./* actu|
|00004e10| 61 6c 20 66 69 6c 65 20 | 6e 61 6d 65 20 66 6f 72 |al file |name for|
|00004e20| 20 61 72 63 68 69 76 65 | 20 2a 2f 0a 20 20 20 20 | archive| */. |
|00004e30| 63 68 61 72 20 20 6c 6e | 66 69 6c 65 6e 61 6d 65 |char ln|filename|
|00004e40| 5b 4c 49 4e 45 5d 3b 09 | 09 2f 2a 20 74 65 6d 70 |[LINE];.|./* temp|
|00004e50| 20 6e 61 6d 65 20 66 6f | 72 20 6c 69 6e 6b 69 6e | name fo|r linkin|
|00004e60| 67 20 2a 2f 0a 20 20 20 | 20 63 68 61 72 20 20 77 |g */. | char w|
|00004e70| 62 75 66 5b 38 2a 4c 49 | 4e 45 5d 3b 09 09 09 2f |buf[8*LI|NE];.../|
|00004e80| 2a 20 77 72 69 74 65 20 | 6f 75 74 70 75 74 20 62 |* write |output b|
|00004e90| 75 66 66 65 72 20 2a 2f | 0a 20 20 20 20 63 68 61 |uffer */|. cha|
|00004ea0| 72 20 20 2a 66 20 3d 20 | 77 62 75 66 3b 09 09 09 |r *f = |wbuf;...|
|00004eb0| 2f 2a 20 69 6e 64 65 78 | 20 74 6f 20 68 65 61 64 |/* index| to head|
|00004ec0| 65 72 20 6c 69 6e 65 73 | 20 69 6e 20 77 62 75 66 |er lines| in wbuf|
|00004ed0| 20 2a 2f 0a 20 20 20 20 | 63 68 61 72 20 20 74 5f | */. |char t_|
|00004ee0| 6c 69 73 74 5b 4c 49 4e | 45 5d 3b 09 09 09 2f 2a |list[LIN|E];.../*|
|00004ef0| 20 75 73 65 72 20 73 75 | 70 70 6c 69 65 64 20 73 | user su|pplied s|
|00004f00| 75 62 6a 65 63 74 20 2a | 2f 0a 20 20 20 20 63 68 |ubject *|/. ch|
|00004f10| 61 72 20 20 6e 5f 6c 69 | 73 74 5b 4c 49 4e 45 5d |ar n_li|st[LINE]|
|00004f20| 3b 09 09 09 2f 2a 20 75 | 73 65 72 20 73 75 70 70 |;.../* u|ser supp|
|00004f30| 6c 69 65 64 20 6e 65 77 | 73 67 72 6f 75 70 73 20 |lied new|sgroups |
|00004f40| 2a 2f 0a 20 20 20 20 63 | 68 61 72 20 20 63 68 2c |*/. c|har ch,|
|00004f50| 20 2a 6d 2c 20 2a 74 6d | 70 6c 69 6e 65 3b 0a 20 | *m, *tm|pline;. |
|00004f60| 20 20 20 69 6e 74 20 20 | 20 74 5f 66 6c 61 67 20 | int | t_flag |
|00004f70| 3d 20 30 3b 09 09 09 2f | 2a 20 75 73 65 72 20 73 |= 0;.../|* user s|
|00004f80| 75 70 70 6c 69 65 64 20 | 73 75 62 6a 65 63 74 20 |upplied |subject |
|00004f90| 61 64 64 65 64 20 2a 2f | 0a 20 20 20 20 69 6e 74 |added */|. int|
|00004fa0| 20 20 20 6e 5f 66 6c 61 | 67 20 3d 20 30 3b 09 09 | n_fla|g = 0;..|
|00004fb0| 09 2f 2a 20 75 73 65 72 | 20 73 75 70 70 6c 69 65 |./* user| supplie|
|00004fc0| 64 20 67 72 6f 75 70 73 | 20 61 64 64 65 64 20 2a |d groups| added *|
|00004fd0| 2f 0a 20 20 20 20 69 6e | 74 20 20 20 63 2c 20 69 |/. in|t c, i|
|00004fe0| 2c 20 6a 2c 20 6f 66 64 | 2c 20 72 63 6e 74 3b 0a |, j, ofd|, rcnt;.|
|00004ff0| 20 20 20 20 69 6e 74 20 | 20 20 6e 75 6d 67 72 6f | int | numgro|
|00005000| 75 70 73 20 3d 20 31 20 | 3b 0a 20 20 20 20 69 6e |ups = 1 |;. in|
|00005010| 74 20 20 20 6c 69 6e 65 | 5f 6c 65 6e 67 74 68 20 |t line|_length |
|00005020| 3d 20 4c 49 4e 45 3b 09 | 09 2f 2a 20 66 6f 72 20 |= LINE;.|./* for |
|00005030| 69 6e 74 65 72 6e 61 6c | 20 72 65 66 65 72 65 6e |internal| referen|
|00005040| 63 65 20 2a 2f 0a 0a 20 | 20 20 20 77 68 69 6c 65 |ce */.. | while|
|00005050| 20 28 2d 2d 61 72 67 63 | 20 3e 20 30 29 09 09 09 | (--argc| > 0)...|
|00005060| 2f 2a 20 67 65 74 20 61 | 6e 79 20 75 73 65 72 20 |/* get a|ny user |
|00005070| 73 75 70 70 6c 69 65 64 | 20 69 6e 66 6f 20 2a 2f |supplied| info */|
|00005080| 0a 20 20 20 20 20 20 7b | 20 69 66 20 28 28 2b 2b |. {| if ((++|
|00005090| 61 72 67 76 29 5b 30 5d | 5b 30 5d 20 3d 3d 20 27 |argv)[0]|[0] == '|
|000050a0| 2d 27 29 0a 09 20 20 7b | 20 63 68 20 3d 20 61 72 |-').. {| ch = ar|
|000050b0| 67 76 5b 30 5d 5b 31 5d | 20 3b 0a 09 20 20 20 20 |gv[0][1]| ;.. |
|000050c0| 61 72 67 76 2b 2b 20 3b | 0a 09 20 20 20 20 61 72 |argv++ ;|.. ar|
|000050d0| 67 63 2d 2d 20 3b 0a 09 | 20 20 7d 0a 09 73 77 69 |gc-- ;..| }..swi|
|000050e0| 74 63 68 20 28 63 68 29 | 0a 09 20 20 7b 20 63 61 |tch (ch)|.. { ca|
|000050f0| 73 65 20 27 6e 27 3a 0a | 09 09 6e 5f 66 6c 61 67 |se 'n':.|..n_flag|
|00005100| 20 3d 20 31 20 3b 0a 09 | 09 73 70 72 69 6e 74 66 | = 1 ;..|.sprintf|
|00005110| 28 6e 5f 6c 69 73 74 2c | 22 25 73 2c 25 73 22 2c |(n_list,|"%s,%s",|
|00005120| 6e 5f 6c 69 73 74 2c 2a | 61 72 67 76 29 20 3b 0a |n_list,*|argv) ;.|
|00005130| 09 09 62 72 65 61 6b 20 | 3b 0a 09 20 20 20 20 63 |..break |;.. c|
|00005140| 61 73 65 20 27 74 27 3a | 0a 09 09 74 5f 66 6c 61 |ase 't':|...t_fla|
|00005150| 67 20 3d 20 31 20 3b 0a | 09 09 73 70 72 69 6e 74 |g = 1 ;.|..sprint|
|00005160| 66 28 74 5f 6c 69 73 74 | 2c 22 25 73 20 25 73 22 |f(t_list|,"%s %s"|
|00005170| 2c 74 5f 6c 69 73 74 2c | 2a 61 72 67 76 29 20 3b |,t_list,|*argv) ;|
|00005180| 0a 09 09 62 72 65 61 6b | 20 3b 0a 09 20 20 20 20 |...break| ;.. |
|00005190| 64 65 66 61 75 6c 74 3a | 0a 09 09 66 70 72 69 6e |default:|...fprin|
|000051a0| 74 66 28 73 74 64 65 72 | 72 2c 22 55 6e 6b 6e 6f |tf(stder|r,"Unkno|
|000051b0| 77 6e 20 66 6c 61 67 3a | 20 2d 25 73 5c 6e 22 2c |wn flag:| -%s\n",|
|000051c0| 63 29 20 3b 0a 09 09 65 | 78 69 74 28 31 29 20 3b |c) ;...e|xit(1) ;|
|000051d0| 0a 09 20 20 7d 0a 20 20 | 20 20 20 20 7d 0a 0a 20 |.. }. | }.. |
|000051e0| 20 20 20 75 6d 61 73 6b | 28 30 30 32 32 29 20 3b | umask|(0022) ;|
|000051f0| 0a 20 20 20 20 73 65 74 | 75 69 64 28 67 65 74 65 |. set|uid(gete|
|00005200| 75 69 64 28 29 29 3b 0a | 20 20 20 20 69 66 20 28 |uid());.| if (|
|00005210| 61 63 63 65 73 73 28 4b | 52 4f 4f 54 2c 37 29 29 |access(K|ROOT,7))|
|00005220| 0a 20 20 20 20 20 20 7b | 20 66 70 72 69 6e 74 66 |. {| fprintf|
|00005230| 28 73 74 64 65 72 72 2c | 22 43 61 6e 27 74 20 66 |(stderr,|"Can't f|
|00005240| 69 6e 64 20 6f 72 20 61 | 63 63 65 73 73 20 6b 65 |ind or a|ccess ke|
|00005250| 65 70 6e 65 77 73 20 72 | 6f 6f 74 20 64 69 72 65 |epnews r|oot dire|
|00005260| 63 74 6f 72 79 20 25 73 | 5c 6e 22 2c 0a 09 09 09 |ctory %s|\n",....|
|00005270| 09 4b 52 4f 4f 54 29 3b | 0a 09 65 78 69 74 28 31 |.KROOT);|..exit(1|
|00005280| 29 3b 0a 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 |);. | }.. |
|00005290| 72 63 6e 74 20 3d 20 72 | 65 61 64 28 30 2c 20 77 |rcnt = r|ead(0, w|
|000052a0| 62 75 66 2c 20 31 30 32 | 34 29 3b 0a 20 20 20 20 |buf, 102|4);. |
|000052b0| 77 68 69 6c 65 20 28 28 | 6a 3d 67 65 74 6c 69 6e |while ((|j=getlin|
|000052c0| 65 28 6c 69 6e 65 2c 32 | 2a 6c 69 6e 65 5f 6c 65 |e(line,2|*line_le|
|000052d0| 6e 67 74 68 2c 66 29 29 | 20 3e 20 30 29 20 09 2f |ngth,f))| > 0) ./|
|000052e0| 2a 20 67 65 74 20 68 65 | 61 64 65 72 20 69 6e 66 |* get he|ader inf|
|000052f0| 6f 20 2a 2f 0a 20 20 20 | 20 20 20 7b 20 69 66 20 |o */. | { if |
|00005300| 28 6a 20 3c 20 30 29 0a | 09 20 20 7b 20 66 70 72 |(j < 0).|. { fpr|
|00005310| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 41 74 74 |intf(std|err,"Att|
|00005320| 65 6d 70 74 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |empt to |install |
|00005330| 69 6e 63 6f 6d 70 61 74 | 69 62 6c 65 20 61 72 74 |incompat|ible art|
|00005340| 69 63 6c 65 20 66 61 69 | 6c 65 64 2e 5c 6e 22 29 |icle fai|led.\n")|
|00005350| 3b 0a 09 20 20 20 20 65 | 78 69 74 28 31 29 3b 0a |;.. e|xit(1);.|
|00005360| 09 20 20 7d 0a 09 66 20 | 2b 3d 20 6a 20 2b 20 31 |. }..f |+= j + 1|
|00005370| 3b 0a 20 20 20 20 20 20 | 20 20 66 6f 72 20 28 69 |;. | for (i|
|00005380| 20 3d 20 30 20 3b 20 69 | 20 3c 3d 20 34 20 3b 20 | = 0 ; i| <= 4 ; |
|00005390| 69 2b 2b 29 0a 09 20 20 | 20 20 69 66 20 28 74 6d |i++).. | if (tm|
|000053a0| 70 6c 69 6e 65 20 3d 20 | 6d 61 74 63 68 28 6c 69 |pline = |match(li|
|000053b0| 6e 65 2c 68 65 61 64 5b | 69 5d 29 29 0a 09 09 7b |ne,head[|i]))...{|
|000053c0| 20 73 74 72 63 70 79 28 | 63 6f 6e 74 65 6e 74 5b | strcpy(|content[|
|000053d0| 69 5d 2c 74 6d 70 6c 69 | 6e 65 29 20 3b 20 62 72 |i],tmpli|ne) ; br|
|000053e0| 65 61 6b 20 3b 20 7d 0a | 20 20 20 20 20 20 7d 0a |eak ; }.| }.|
|000053f0| 0a 20 20 20 20 2f 2a 20 | 61 64 64 20 27 2d 74 27 |. /* |add '-t'|
|00005400| 20 61 6e 64 20 27 2d 6e | 27 20 69 6e 66 6f 72 6d | and '-n|' inform|
|00005410| 61 74 69 6f 6e 20 74 6f | 20 61 72 74 69 63 6c 65 |ation to| article|
|00005420| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 2a 2f 0a | informa|tion */.|
|00005430| 20 20 20 20 69 66 20 28 | 6e 5f 66 6c 61 67 29 0a | if (|n_flag).|
|00005440| 09 73 70 72 69 6e 74 66 | 28 63 6f 6e 74 65 6e 74 |.sprintf|(content|
|00005450| 5b 31 5d 2c 22 25 73 25 | 73 22 2c 63 6f 6e 74 65 |[1],"%s%|s",conte|
|00005460| 6e 74 5b 31 5d 2c 6e 5f | 6c 69 73 74 29 3b 0a 20 |nt[1],n_|list);. |
|00005470| 20 20 20 69 66 20 28 74 | 5f 66 6c 61 67 29 0a 09 | if (t|_flag)..|
|00005480| 73 70 72 69 6e 74 66 28 | 63 6f 6e 74 65 6e 74 5b |sprintf(|content[|
|00005490| 32 5d 2c 22 25 73 20 28 | 2b 25 73 20 2b 29 22 2c |2],"%s (|+%s +)",|
|000054a0| 63 6f 6e 74 65 6e 74 5b | 32 5d 2c 74 5f 6c 69 73 |content[|2],t_lis|
|000054b0| 74 29 3b 0a 20 20 20 20 | 69 66 20 28 2a 63 6f 6e |t);. |if (*con|
|000054c0| 74 65 6e 74 5b 31 5d 20 | 3d 3d 20 4e 55 4c 4c 29 |tent[1] |== NULL)|
|000054d0| 0a 20 20 20 20 20 20 7b | 20 66 70 72 69 6e 74 66 |. {| fprintf|
|000054e0| 28 73 74 64 65 72 72 2c | 22 41 74 74 65 6d 70 74 |(stderr,|"Attempt|
|000054f0| 20 74 6f 20 69 6e 73 74 | 61 6c 6c 20 69 6e 63 6f | to inst|all inco|
|00005500| 6d 70 61 74 69 62 6c 65 | 20 61 72 74 69 63 6c 65 |mpatible| article|
|00005510| 20 66 61 69 6c 65 64 2e | 5c 6e 22 29 3b 0a 20 20 | failed.|\n");. |
|00005520| 20 20 20 20 20 20 65 78 | 69 74 28 31 29 3b 0a 20 | ex|it(1);. |
|00005530| 20 20 20 20 20 7d 0a 0a | 20 20 20 20 2f 2a 20 62 | }..| /* b|
|00005540| 72 65 61 6b 20 6e 65 77 | 73 67 72 6f 75 70 73 20 |reak new|sgroups |
|00005550| 69 6e 74 6f 20 73 65 70 | 61 72 61 74 65 20 67 72 |into sep|arate gr|
|00005560| 6f 75 70 73 20 2a 2f 0a | 20 20 20 20 73 74 72 63 |oups */.| strc|
|00005570| 70 79 28 2a 64 69 72 6c | 69 73 74 3d 6d 61 6c 6c |py(*dirl|ist=mall|
|00005580| 6f 63 28 73 74 72 6c 65 | 6e 28 63 6f 6e 74 65 6e |oc(strle|n(conten|
|00005590| 74 5b 31 5d 29 29 2c 63 | 6f 6e 74 65 6e 74 5b 31 |t[1])),c|ontent[1|
|000055a0| 5d 29 20 3b 0a 20 20 20 | 20 77 68 69 6c 65 20 28 |]) ;. | while (|
|000055b0| 64 69 72 6c 69 73 74 5b | 6e 75 6d 67 72 6f 75 70 |dirlist[|numgroup|
|000055c0| 73 5d 20 3d 20 69 6e 64 | 65 78 28 64 69 72 6c 69 |s] = ind|ex(dirli|
|000055d0| 73 74 5b 6e 75 6d 67 72 | 6f 75 70 73 2d 31 5d 2c |st[numgr|oups-1],|
|000055e0| 27 2c 27 29 29 0a 09 2a | 64 69 72 6c 69 73 74 5b |','))..*|dirlist[|
|000055f0| 6e 75 6d 67 72 6f 75 70 | 73 2b 2b 5d 2b 2b 20 3d |numgroup|s++]++ =|
|00005600| 20 4e 55 4c 4c 20 3b 0a | 20 20 20 20 6e 75 6d 67 | NULL ;.| numg|
|00005610| 72 6f 75 70 73 2d 2d 20 | 3b 0a 0a 20 20 20 20 2f |roups-- |;.. /|
|00005620| 2a 20 63 6f 6e 76 65 72 | 74 20 65 61 63 68 20 6e |* conver|t each n|
|00005630| 65 77 73 67 72 6f 75 70 | 20 6e 61 6d 65 20 69 6e |ewsgroup| name in|
|00005640| 74 6f 20 61 20 64 69 72 | 65 63 74 6f 72 79 20 70 |to a dir|ectory p|
|00005650| 61 74 68 20 2a 2f 0a 20 | 20 20 20 66 6f 72 20 28 |ath */. | for (|
|00005660| 6a 3d 30 20 3b 20 6a 20 | 3c 3d 20 6e 75 6d 67 72 |j=0 ; j |<= numgr|
|00005670| 6f 75 70 73 20 3b 20 6a | 2b 2b 29 0a 20 20 20 20 |oups ; j|++). |
|00005680| 20 20 7b 20 73 70 72 69 | 6e 74 66 28 70 61 74 68 | { spri|ntf(path|
|00005690| 6c 69 73 74 5b 6a 5d 2c | 22 25 73 2f 25 73 22 2c |list[j],|"%s/%s",|
|000056a0| 4b 52 4f 4f 54 2c 64 69 | 72 6c 69 73 74 5b 6a 5d |KROOT,di|rlist[j]|
|000056b0| 29 20 3b 0a 09 77 68 69 | 6c 65 20 28 6d 20 3d 20 |) ;..whi|le (m = |
|000056c0| 69 6e 64 65 78 28 70 61 | 74 68 6c 69 73 74 5b 6a |index(pa|thlist[j|
|000056d0| 5d 2c 27 2e 27 29 29 20 | 2a 6d 20 3d 20 27 2f 27 |],'.')) |*m = '/'|
|000056e0| 20 3b 0a 0a 09 6d 20 3d | 20 70 61 74 68 6c 69 73 | ;...m =| pathlis|
|000056f0| 74 5b 6a 5d 20 3b 09 2f | 2a 20 63 72 65 61 74 65 |t[j] ;./|* create|
|00005700| 20 61 6e 79 20 6d 69 73 | 73 69 6e 67 20 61 6e 63 | any mis|sing anc|
|00005710| 65 73 74 6f 72 20 64 69 | 72 65 63 74 6f 72 69 65 |estor di|rectorie|
|00005720| 73 20 2a 2f 0a 09 77 68 | 69 6c 65 20 28 6d 20 3d |s */..wh|ile (m =|
|00005730| 20 69 6e 64 65 78 28 6d | 2c 27 2f 27 29 29 0a 09 | index(m|,'/'))..|
|00005740| 20 20 7b 20 2a 6d 20 3d | 20 4e 55 4c 4c 20 3b 20 | { *m =| NULL ; |
|00005750| 6d 6b 64 69 72 28 70 61 | 74 68 6c 69 73 74 5b 6a |mkdir(pa|thlist[j|
|00005760| 5d 2c 30 37 35 35 29 20 | 3b 20 2a 6d 2b 2b 20 3d |],0755) |; *m++ =|
|00005770| 20 27 2f 27 20 3b 20 7d | 0a 20 20 20 20 20 20 20 | '/' ; }|. |
|00005780| 20 6d 6b 64 69 72 28 70 | 61 74 68 6c 69 73 74 5b | mkdir(p|athlist[|
|00005790| 6a 5d 2c 30 37 35 35 29 | 20 3b 0a 20 20 20 20 20 |j],0755)| ;. |
|000057a0| 20 7d 0a 0a 20 20 20 20 | 73 70 72 69 6e 74 66 28 | }.. |sprintf(|
|000057b0| 72 6c 6f 67 2c 22 25 73 | 2f 6c 6f 67 22 2c 4b 52 |rlog,"%s|/log",KR|
|000057c0| 4f 4f 54 29 20 3b 0a 20 | 20 20 20 73 70 72 69 6e |OOT) ;. | sprin|
|000057d0| 74 66 28 6c 6f 67 6c 69 | 6e 65 2c 22 25 73 3b 20 |tf(logli|ne,"%s; |
|000057e0| 25 73 2c 20 25 73 2c 20 | 25 73 2c 20 25 73 22 2c |%s, %s, |%s, %s",|
|000057f0| 63 6f 6e 74 65 6e 74 5b | 31 5d 2c 63 6f 6e 74 65 |content[|1],conte|
|00005800| 6e 74 5b 34 5d 2c 0a 09 | 09 63 6f 6e 74 65 6e 74 |nt[4],..|.content|
|00005810| 5b 30 5d 2c 63 6f 6e 74 | 65 6e 74 5b 33 5d 2c 63 |[0],cont|ent[3],c|
|00005820| 6f 6e 74 65 6e 74 5b 32 | 5d 29 20 3b 0a 20 20 20 |ontent[2|]) ;. |
|00005830| 20 73 70 72 69 6e 74 66 | 28 69 6e 73 74 61 6c 6c | sprintf|(install|
|00005840| 66 69 6c 65 2c 22 25 73 | 2f 25 73 22 2c 70 61 74 |file,"%s|/%s",pat|
|00005850| 68 6c 69 73 74 5b 30 5d | 2c 63 6f 6e 74 65 6e 74 |hlist[0]|,content|
|00005860| 5b 34 5d 29 20 3b 0a 20 | 20 20 20 73 70 72 69 6e |[4]) ;. | sprin|
|00005870| 74 66 28 66 6c 6f 67 2c | 22 25 73 2f 6c 6f 67 22 |tf(flog,|"%s/log"|
|00005880| 2c 70 61 74 68 6c 69 73 | 74 5b 30 5d 29 20 3b 0a |,pathlis|t[0]) ;.|
|00005890| 0a 20 20 20 20 72 6c 6f | 67 66 70 20 3d 20 66 6f |. rlo|gfp = fo|
|000058a0| 70 65 6e 28 72 6c 6f 67 | 2c 22 61 22 29 20 3b 0a |pen(rlog|,"a") ;.|
|000058b0| 20 20 20 20 69 66 20 28 | 61 63 63 65 73 73 28 69 | if (|access(i|
|000058c0| 6e 73 74 61 6c 6c 66 69 | 6c 65 2c 30 29 29 0a 20 |nstallfi|le,0)). |
|000058d0| 20 20 20 20 20 7b 20 66 | 70 72 69 6e 74 66 28 72 | { f|printf(r|
|000058e0| 6c 6f 67 66 70 2c 22 53 | 61 76 65 64 3a 20 25 73 |logfp,"S|aved: %s|
|000058f0| 5c 6e 22 2c 6c 6f 67 6c | 69 6e 65 29 20 3b 09 2f |\n",logl|ine) ;./|
|00005900| 2a 20 75 70 64 61 74 65 | 20 22 72 6f 6f 74 22 20 |* update| "root" |
|00005910| 6c 6f 67 20 2a 2f 0a 09 | 66 63 6c 6f 73 65 28 72 |log */..|fclose(r|
|00005920| 6c 6f 67 66 70 29 20 3b | 0a 0a 09 66 6c 6f 67 66 |logfp) ;|...flogf|
|00005930| 70 20 3d 20 66 6f 70 65 | 6e 28 66 6c 6f 67 2c 22 |p = fope|n(flog,"|
|00005940| 61 22 29 20 3b 09 2f 2a | 20 75 70 64 61 74 65 20 |a") ;./*| update |
|00005950| 22 6c 65 61 66 22 20 6c | 6f 67 20 2a 2f 0a 09 66 |"leaf" l|og */..f|
|00005960| 70 72 69 6e 74 66 28 66 | 6c 6f 67 66 70 2c 22 25 |printf(f|logfp,"%|
|00005970| 73 5c 6e 22 2c 6c 6f 67 | 6c 69 6e 65 29 20 3b 0a |s\n",log|line) ;.|
|00005980| 09 66 63 6c 6f 73 65 28 | 66 6c 6f 67 66 70 29 20 |.fclose(|flogfp) |
|00005990| 3b 0a 0a 09 2f 2a 20 20 | 77 72 69 74 65 20 65 6e |;.../* |write en|
|000059a0| 74 69 72 65 20 61 72 74 | 69 63 6c 65 20 68 65 61 |tire art|icle hea|
|000059b0| 64 65 72 20 61 6e 64 20 | 62 6f 64 79 20 74 6f 20 |der and |body to |
|000059c0| 61 72 63 68 69 76 65 20 | 66 69 6c 65 20 2a 2f 0a |archive |file */.|
|000059d0| 09 6f 66 64 20 3d 20 63 | 72 65 61 74 28 69 6e 73 |.ofd = c|reat(ins|
|000059e0| 74 61 6c 6c 66 69 6c 65 | 2c 20 30 36 34 34 29 20 |tallfile|, 0644) |
|000059f0| 3b 0a 09 77 72 69 74 65 | 28 6f 66 64 2c 20 77 62 |;..write|(ofd, wb|
|00005a00| 75 66 2c 20 72 63 6e 74 | 29 20 3b 0a 09 69 66 20 |uf, rcnt|) ;..if |
|00005a10| 28 72 63 6e 74 20 3d 3d | 20 31 30 32 34 29 0a 09 |(rcnt ==| 1024)..|
|00005a20| 20 20 7b 20 77 68 69 6c | 65 20 28 28 72 63 6e 74 | { whil|e ((rcnt|
|00005a30| 20 3d 20 72 65 61 64 28 | 30 2c 20 77 62 75 66 2c | = read(|0, wbuf,|
|00005a40| 20 31 30 32 34 29 29 20 | 3d 3d 20 31 30 32 34 29 | 1024)) |== 1024)|
|00005a50| 0a 09 20 20 20 20 20 20 | 20 20 77 72 69 74 65 28 |.. | write(|
|00005a60| 6f 66 64 2c 20 77 62 75 | 66 2c 20 31 30 32 34 29 |ofd, wbu|f, 1024)|
|00005a70| 20 3b 0a 09 20 20 20 20 | 77 72 69 74 65 28 6f 66 | ;.. |write(of|
|00005a80| 64 2c 20 77 62 75 66 2c | 20 72 63 6e 74 29 20 3b |d, wbuf,| rcnt) ;|
|00005a90| 0a 09 20 20 7d 0a 09 63 | 6c 6f 73 65 28 6f 66 64 |.. }..c|lose(ofd|
|00005aa0| 29 20 3b 0a 0a 09 2f 2a | 20 69 6e 73 74 61 6c 6c |) ;.../*| install|
|00005ab0| 20 68 61 72 64 20 6c 69 | 6e 6b 73 20 74 6f 20 72 | hard li|nks to r|
|00005ac0| 65 6d 61 69 6e 69 6e 67 | 20 6e 65 77 73 67 72 6f |emaining| newsgro|
|00005ad0| 75 70 73 20 2a 2f 0a 09 | 66 6f 72 20 28 69 20 3d |ups */..|for (i =|
|00005ae0| 20 31 20 3b 20 69 20 3c | 3d 20 6e 75 6d 67 72 6f | 1 ; i <|= numgro|
|00005af0| 75 70 73 20 3b 20 69 2b | 2b 29 0a 09 20 20 7b 20 |ups ; i+|+).. { |
|00005b00| 73 70 72 69 6e 74 66 28 | 74 66 69 6c 65 2c 22 25 |sprintf(|tfile,"%|
|00005b10| 73 2f 25 73 22 2c 70 61 | 74 68 6c 69 73 74 5b 69 |s/%s",pa|thlist[i|
|00005b20| 5d 2c 63 6f 6e 74 65 6e | 74 5b 34 5d 29 20 3b 0a |],conten|t[4]) ;.|
|00005b30| 09 20 20 20 20 73 70 72 | 69 6e 74 66 28 74 6d 70 |. spr|intf(tmp|
|00005b40| 62 75 66 2c 22 25 73 2f | 6c 6f 67 22 2c 70 61 74 |buf,"%s/|log",pat|
|00005b50| 68 6c 69 73 74 5b 69 5d | 29 20 3b 0a 09 20 20 20 |hlist[i]|) ;.. |
|00005b60| 20 6c 69 6e 6b 28 69 6e | 73 74 61 6c 6c 66 69 6c | link(in|stallfil|
|00005b70| 65 2c 74 66 69 6c 65 29 | 20 3b 0a 09 20 20 20 20 |e,tfile)| ;.. |
|00005b80| 66 6c 6f 67 66 70 20 3d | 20 66 6f 70 65 6e 28 74 |flogfp =| fopen(t|
|00005b90| 6d 70 62 75 66 2c 22 61 | 22 29 20 3b 0a 09 20 20 |mpbuf,"a|") ;.. |
|00005ba0| 20 20 66 70 72 69 6e 74 | 66 28 66 6c 6f 67 66 70 | fprint|f(flogfp|
|00005bb0| 2c 22 25 73 5c 6e 22 2c | 6c 6f 67 6c 69 6e 65 29 |,"%s\n",|logline)|
|00005bc0| 20 3b 0a 09 20 20 20 20 | 66 63 6c 6f 73 65 28 66 | ;.. |fclose(f|
|00005bd0| 6c 6f 67 66 70 29 20 3b | 0a 09 20 20 7d 0a 20 20 |logfp) ;|.. }. |
|00005be0| 20 20 20 20 7d 0a 20 20 | 20 20 65 6c 73 65 20 69 | }. | else i|
|00005bf0| 66 20 28 6e 5f 66 6c 61 | 67 29 09 09 2f 2a 20 74 |f (n_fla|g)../* t|
|00005c00| 5f 66 6c 61 67 20 69 73 | 20 69 6d 70 6c 69 65 64 |_flag is| implied|
|00005c10| 20 2a 2f 0a 20 20 20 20 | 20 20 7b 20 66 70 72 69 | */. | { fpri|
|00005c20| 6e 74 66 28 72 6c 6f 67 | 66 70 2c 22 53 61 76 65 |ntf(rlog|fp,"Save|
|00005c30| 64 3a 20 25 73 5c 6e 22 | 2c 6c 6f 67 6c 69 6e 65 |d: %s\n"|,logline|
|00005c40| 29 20 3b 09 2f 2a 20 75 | 70 64 61 74 65 20 22 72 |) ;./* u|pdate "r|
|00005c50| 6f 6f 74 22 20 6c 6f 67 | 20 2a 2f 0a 09 66 63 6c |oot" log| */..fcl|
|00005c60| 6f 73 65 28 72 6c 6f 67 | 66 70 29 20 3b 0a 0a 09 |ose(rlog|fp) ;...|
|00005c70| 2f 2a 20 69 6e 73 74 61 | 6c 6c 20 68 61 72 64 20 |/* insta|ll hard |
|00005c80| 6c 69 6e 6b 73 20 74 6f | 20 72 65 6d 61 69 6e 69 |links to| remaini|
|00005c90| 6e 67 20 6e 65 77 73 67 | 72 6f 75 70 73 20 2a 2f |ng newsg|roups */|
|00005ca0| 0a 09 66 6f 72 20 28 69 | 20 3d 20 30 20 3b 20 69 |..for (i| = 0 ; i|
|00005cb0| 20 3c 3d 20 6e 75 6d 67 | 72 6f 75 70 73 20 3b 20 | <= numg|roups ; |
|00005cc0| 69 2b 2b 29 0a 09 20 20 | 7b 20 73 70 72 69 6e 74 |i++).. |{ sprint|
|00005cd0| 66 28 74 66 69 6c 65 2c | 22 25 73 2f 25 73 22 2c |f(tfile,|"%s/%s",|
|00005ce0| 70 61 74 68 6c 69 73 74 | 5b 69 5d 2c 63 6f 6e 74 |pathlist|[i],cont|
|00005cf0| 65 6e 74 5b 34 5d 29 20 | 3b 0a 09 20 20 20 20 73 |ent[4]) |;.. s|
|00005d00| 70 72 69 6e 74 66 28 74 | 6d 70 62 75 66 2c 22 25 |printf(t|mpbuf,"%|
|00005d10| 73 2f 6c 6f 67 22 2c 70 | 61 74 68 6c 69 73 74 5b |s/log",p|athlist[|
|00005d20| 69 5d 29 20 3b 0a 09 20 | 20 20 20 6c 69 6e 6b 28 |i]) ;.. | link(|
|00005d30| 69 6e 73 74 61 6c 6c 66 | 69 6c 65 2c 74 66 69 6c |installf|ile,tfil|
|00005d40| 65 29 20 3b 0a 09 20 20 | 20 20 66 6c 6f 67 66 70 |e) ;.. | flogfp|
|00005d50| 20 3d 20 66 6f 70 65 6e | 28 74 6d 70 62 75 66 2c | = fopen|(tmpbuf,|
|00005d60| 22 61 22 29 20 3b 0a 09 | 20 20 20 20 66 70 72 69 |"a") ;..| fpri|
|00005d70| 6e 74 66 28 66 6c 6f 67 | 66 70 2c 22 25 73 5c 6e |ntf(flog|fp,"%s\n|
|00005d80| 22 2c 6c 6f 67 6c 69 6e | 65 29 20 3b 0a 09 20 20 |",loglin|e) ;.. |
|00005d90| 20 20 66 63 6c 6f 73 65 | 28 66 6c 6f 67 66 70 29 | fclose|(flogfp)|
|00005da0| 20 3b 0a 09 20 20 7d 0a | 20 20 20 20 20 20 7d 0a | ;.. }.| }.|
|00005db0| 20 20 20 20 65 6c 73 65 | 20 69 66 20 28 74 5f 66 | else| if (t_f|
|00005dc0| 6c 61 67 29 0a 20 20 20 | 20 20 20 7b 20 66 70 72 |lag). | { fpr|
|00005dd0| 69 6e 74 66 28 72 6c 6f | 67 66 70 2c 22 53 61 76 |intf(rlo|gfp,"Sav|
|00005de0| 65 64 3a 20 25 73 5c 6e | 22 2c 6c 6f 67 6c 69 6e |ed: %s\n|",loglin|
|00005df0| 65 29 20 3b 09 2f 2a 20 | 75 70 64 61 74 65 20 22 |e) ;./* |update "|
|00005e00| 72 6f 6f 74 22 20 6c 6f | 67 20 2a 2f 0a 09 66 63 |root" lo|g */..fc|
|00005e10| 6c 6f 73 65 28 72 6c 6f | 67 66 70 29 20 3b 0a 0a |lose(rlo|gfp) ;..|
|00005e20| 09 2f 2a 20 75 70 64 61 | 74 65 20 22 6c 65 61 66 |./* upda|te "leaf|
|00005e30| 22 20 6c 6f 67 20 66 6f | 72 20 65 61 63 68 20 6c |" log fo|r each l|
|00005e40| 65 61 66 20 2a 2f 0a 09 | 66 6f 72 20 28 69 20 3d |eaf */..|for (i =|
|00005e50| 20 30 20 3b 20 69 20 3c | 3d 20 6e 75 6d 67 72 6f | 0 ; i <|= numgro|
|00005e60| 75 70 73 20 3b 20 69 2b | 2b 29 0a 09 20 20 7b 20 |ups ; i+|+).. { |
|00005e70| 73 70 72 69 6e 74 66 28 | 74 6d 70 62 75 66 2c 22 |sprintf(|tmpbuf,"|
|00005e80| 25 73 2f 6c 6f 67 22 2c | 70 61 74 68 6c 69 73 74 |%s/log",|pathlist|
|00005e90| 5b 69 5d 29 20 3b 0a 09 | 20 20 20 20 66 6c 6f 67 |[i]) ;..| flog|
|00005ea0| 66 70 20 3d 20 66 6f 70 | 65 6e 28 74 6d 70 62 75 |fp = fop|en(tmpbu|
|00005eb0| 66 2c 22 61 22 29 20 3b | 0a 09 20 20 20 20 66 70 |f,"a") ;|.. fp|
|00005ec0| 72 69 6e 74 66 28 66 6c | 6f 67 66 70 2c 22 25 73 |rintf(fl|ogfp,"%s|
|00005ed0| 5c 6e 22 2c 6c 6f 67 6c | 69 6e 65 29 20 3b 0a 09 |\n",logl|ine) ;..|
|00005ee0| 20 20 20 20 66 63 6c 6f | 73 65 28 66 6c 6f 67 66 | fclo|se(flogf|
|00005ef0| 70 29 20 3b 0a 09 20 20 | 7d 0a 20 20 20 20 20 20 |p) ;.. |}. |
|00005f00| 7d 0a 20 20 20 20 65 6c | 73 65 09 2f 2a 20 75 70 |}. el|se./* up|
|00005f10| 64 61 74 65 20 6f 6e 6c | 79 20 4b 52 4f 4f 54 20 |date onl|y KROOT |
|00005f20| 6c 6f 67 20 2a 2f 0a 20 | 20 20 20 20 20 7b 20 66 |log */. | { f|
|00005f30| 70 72 69 6e 74 66 28 72 | 6c 6f 67 66 70 2c 22 44 |printf(r|logfp,"D|
|00005f40| 75 70 6c 69 63 61 74 65 | 20 72 65 71 75 65 73 74 |uplicate| request|
|00005f50| 3a 20 25 73 5c 6e 22 2c | 63 6f 6e 74 65 6e 74 5b |: %s\n",|content[|
|00005f60| 34 5d 29 20 3b 0a 09 66 | 63 6c 6f 73 65 28 72 6c |4]) ;..f|close(rl|
|00005f70| 6f 67 66 70 29 20 3b 0a | 20 20 20 20 20 20 7d 0a |ogfp) ;.| }.|
|00005f80| 20 20 20 20 65 78 69 74 | 28 30 29 20 3b 0a 7d 0a | exit|(0) ;.}.|
|00005f90| 0a 63 68 61 72 20 2a 0a | 6d 61 74 63 68 28 73 2c |.char *.|match(s,|
|00005fa0| 74 29 20 63 68 61 72 20 | 2a 73 2c 20 2a 74 3b 20 |t) char |*s, *t; |
|00005fb0| 20 20 09 2f 2a 20 72 65 | 74 75 72 6e 20 65 6e 64 | ./* re|turn end|
|00005fc0| 20 6f 66 20 74 20 69 6e | 20 73 2c 20 4e 55 4c 4c | of t in| s, NULL|
|00005fd0| 20 69 66 20 6e 6f 6e 65 | 20 2a 2f 0a 7b 20 20 20 | if none| */.{ |
|00005fe0| 77 68 69 6c 65 20 28 2a | 74 20 21 3d 20 4e 55 4c |while (*|t != NUL|
|00005ff0| 4c 20 26 26 20 2a 73 2b | 2b 20 3d 3d 20 2a 74 2b |L && *s+|+ == *t+|
+--------+-------------------------+-------------------------+--------+--------+