home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3650 < prev    next >
SHell self-extracting ARchive  |  1991-07-17  |  27.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: 3650

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 61 6c 74 2e |Newsgrou|ps: alt.|
|00000010| 73 6f 75 72 63 65 73 0a | 46 72 6f 6d 3a 20 6c 61 |sources.|From: la|
|00000020| 6d 70 69 6e 67 40 70 61 | 72 63 2e 78 65 72 6f 78 |mping@pa|rc.xerox|
|00000030| 2e 63 6f 6d 20 28 4a 6f | 68 6e 20 4c 61 6d 70 69 |.com (Jo|hn Lampi|
|00000040| 6e 67 29 0a 53 75 62 6a | 65 63 74 3a 20 73 68 6f |ng).Subj|ect: sho|
|00000050| 70 20 2d 20 6e 6f 6e 73 | 65 6e 73 65 20 66 6f 72 |p - nons|ense for|
|00000060| 20 63 6f 6e 6e 6f 69 73 | 73 65 75 72 73 20 28 70 | connois|seurs (p|
|00000070| 61 72 74 20 31 2f 33 29 | 0a 4d 65 73 73 61 67 65 |art 1/3)|.Message|
|00000080| 2d 49 44 3a 20 3c 31 39 | 39 31 4a 75 6c 31 36 2e |-ID: <19|91Jul16.|
|00000090| 32 32 34 37 35 35 2e 31 | 39 30 39 36 40 70 61 72 |224755.1|9096@par|
|000000a0| 63 2e 78 65 72 6f 78 2e | 63 6f 6d 3e 0a 44 61 74 |c.xerox.|com>.Dat|
|000000b0| 65 3a 20 54 75 65 2c 20 | 31 36 20 4a 75 6c 20 31 |e: Tue, |16 Jul 1|
|000000c0| 39 39 31 20 32 32 3a 34 | 37 3a 35 35 20 47 4d 54 |991 22:4|7:55 GMT|
|000000d0| 0a 0a 0a 53 68 6f 70 20 | 67 65 6e 65 72 61 74 65 |...Shop |generate|
|000000e0| 73 20 61 20 72 61 6e 64 | 6f 6d 20 73 68 6f 70 70 |s a rand|om shopp|
|000000f0| 69 6e 67 20 6c 69 73 74 | 20 6f 66 20 64 65 72 61 |ing list| of dera|
|00000100| 6e 67 65 64 20 69 74 65 | 6d 73 2e 20 20 53 75 63 |nged ite|ms. Suc|
|00000110| 68 20 61 73 3a 0a 0a 20 | 20 20 20 20 20 20 20 48 |h as:.. | H|
|00000120| 65 72 65 20 69 73 20 79 | 6f 75 72 20 73 68 6f 70 |ere is y|our shop|
|00000130| 70 69 6e 67 20 6c 69 73 | 74 3a 0a 20 20 20 20 20 |ping lis|t:. |
|00000140| 20 20 20 28 31 29 20 42 | 75 79 20 26 20 42 72 65 | (1) B|uy & Bre|
|00000150| 61 6b 20 72 6f 6f 73 74 | 65 72 20 73 6b 69 73 0a |ak roost|er skis.|
|00000160| 20 20 20 20 20 20 20 20 | 28 32 29 20 49 6e 65 6c | |(2) Inel|
|00000170| 65 67 61 6e 74 20 73 6f | 66 61 73 0a 20 20 20 20 |egant so|fas. |
|00000180| 20 20 20 20 28 33 29 20 | 50 6f 6c 65 6d 69 63 61 | (3) |Polemica|
|00000190| 6c 20 62 72 65 61 74 68 | 20 6c 65 73 69 6f 6e 73 |l breath| lesions|
|000001a0| 0a 0a 59 6f 75 20 63 61 | 6e 20 64 6f 20 61 6c 6c |..You ca|n do all|
|000001b0| 20 6d 61 6e 6e 65 72 20 | 6f 66 20 72 69 64 69 63 | manner |of ridic|
|000001c0| 75 6c 6f 75 73 20 74 68 | 69 6e 67 73 20 77 69 74 |ulous th|ings wit|
|000001d0| 68 20 74 68 69 73 2e 20 | 20 46 6f 72 20 65 78 61 |h this. | For exa|
|000001e0| 6d 70 6c 65 2c 0a 74 68 | 65 20 78 74 65 72 6d 20 |mple,.th|e xterm |
|000001f0| 77 69 6e 64 6f 77 20 49 | 27 6d 20 77 6f 72 6b 69 |window I|'m worki|
|00000200| 6e 67 20 69 6e 20 72 69 | 67 68 74 20 6e 6f 77 20 |ng in ri|ght now |
|00000210| 62 65 61 72 73 20 74 68 | 65 20 74 69 74 6c 65 20 |bears th|e title |
|00000220| 0a 22 41 6e 74 61 67 6f | 6e 69 73 74 69 63 20 73 |."Antago|nistic s|
|00000230| 6e 6f 72 65 20 62 61 63 | 6f 6e 2e 22 20 20 41 6c |nore bac|on." Al|
|00000240| 73 6f 2c 20 74 68 69 73 | 20 69 73 20 6e 69 63 65 |so, this| is nice|
|00000250| 20 74 6f 20 70 75 74 20 | 69 6e 20 61 0a 43 20 73 | to put |in a.C s|
|00000260| 68 65 6c 6c 20 2e 6c 6f | 67 6f 75 74 20 70 72 6f |hell .lo|gout pro|
|00000270| 67 72 61 6d 20 77 68 65 | 6e 20 79 6f 75 27 72 65 |gram whe|n you're|
|00000280| 20 77 6f 72 6b 69 6e 67 | 20 6f 6e 20 61 20 70 68 | working| on a ph|
|00000290| 79 73 69 63 61 6c 20 74 | 65 72 6d 69 6e 61 6c 2e |ysical t|erminal.|
|000002a0| 0a 0a 53 6f 6d 65 20 70 | 65 6f 70 6c 65 20 28 6c |..Some p|eople (l|
|000002b0| 69 6b 65 20 6d 65 29 20 | 66 69 6e 64 20 74 68 69 |ike me) |find thi|
|000002c0| 73 20 73 6f 72 74 20 6f | 66 20 74 68 69 6e 67 20 |s sort o|f thing |
|000002d0| 66 75 6e 6e 79 2c 20 62 | 75 74 20 64 6f 6e 27 74 |funny, b|ut don't|
|000002e0| 20 77 6f 72 72 79 2e 2e | 2e 0a 77 65 27 72 65 20 | worry..|..we're |
|000002f0| 67 65 74 74 69 6e 67 20 | 70 72 6f 66 65 73 73 69 |getting |professi|
|00000300| 6f 6e 61 6c 20 68 65 6c | 70 2e 0a 0a 54 68 65 20 |onal hel|p...The |
|00000310| 70 69 6e 64 65 78 20 70 | 72 6f 67 72 61 6d 2c 20 |pindex p|rogram, |
|00000320| 61 6c 73 6f 20 70 6f 73 | 74 65 64 20 74 6f 20 61 |also pos|ted to a|
|00000330| 6c 74 2e 73 6f 75 72 63 | 65 73 2c 20 69 73 20 72 |lt.sourc|es, is r|
|00000340| 65 71 75 69 72 65 64 20 | 66 6f 72 20 74 68 65 20 |equired |for the |
|00000350| 75 73 65 20 0a 6f 66 20 | 73 68 6f 70 2e 20 20 42 |use .of |shop. B|
|00000360| 65 20 73 75 72 65 20 74 | 6f 20 69 6e 73 74 61 6c |e sure t|o instal|
|00000370| 6c 20 69 74 20 62 65 66 | 6f 72 65 20 69 6e 73 74 |l it bef|ore inst|
|00000380| 61 6c 6c 69 6e 67 20 73 | 68 6f 70 2e 0a 0a 49 27 |alling s|hop...I'|
|00000390| 76 65 20 73 75 63 63 65 | 73 73 66 75 6c 6c 79 20 |ve succe|ssfully |
|000003a0| 63 6f 6d 70 69 6c 65 64 | 20 74 68 69 73 20 70 61 |compiled| this pa|
|000003b0| 63 6b 61 67 65 20 6f 6e | 20 44 47 2f 55 58 2c 20 |ckage on| DG/UX, |
|000003c0| 53 75 6e 4f 53 2c 20 61 | 6e 64 20 76 61 6e 69 6c |SunOS, a|nd vanil|
|000003d0| 6c 61 0a 53 56 52 34 20 | 73 79 73 74 65 6d 73 2e |la.SVR4 |systems.|
|000003e0| 20 20 49 27 64 20 6c 69 | 6b 65 20 74 6f 20 68 65 | I'd li|ke to he|
|000003f0| 61 72 20 6f 66 20 70 65 | 6f 70 6c 65 27 73 20 65 |ar of pe|ople's e|
|00000400| 78 70 65 72 69 65 6e 63 | 65 73 20 77 69 74 68 20 |xperienc|es with |
|00000410| 73 65 74 74 69 6e 67 0a | 75 70 20 74 68 65 20 70 |setting.|up the p|
|00000420| 61 63 6b 61 67 65 20 75 | 6e 64 65 72 20 6f 74 68 |ackage u|nder oth|
|00000430| 65 72 20 6f 70 65 72 61 | 74 69 6e 67 20 73 79 73 |er opera|ting sys|
|00000440| 74 65 6d 73 3b 20 6d 79 | 20 65 2d 6d 61 69 6c 20 |tems; my| e-mail |
|00000450| 61 64 64 72 65 73 73 20 | 0a 69 73 20 72 69 63 65 |address |.is rice|
|00000460| 40 64 67 2d 72 74 70 2e | 64 67 2e 63 6f 6d 20 2e |@dg-rtp.|dg.com .|
|00000470| 20 20 41 6c 73 6f 2c 20 | 70 6c 65 61 73 65 20 64 | Also, |please d|
|00000480| 72 6f 70 20 6d 65 20 61 | 20 6e 6f 74 65 20 63 6f |rop me a| note co|
|00000490| 6e 63 65 72 6e 69 6e 67 | 0a 62 75 67 73 2c 20 65 |ncerning|.bugs, e|
|000004a0| 6e 68 61 6e 63 65 6d 65 | 6e 74 73 2c 20 61 6e 64 |nhanceme|nts, and|
|000004b0| 20 61 6d 75 73 69 6e 67 | 20 61 70 70 6c 69 63 61 | amusing| applica|
|000004c0| 74 69 6f 6e 73 2e 0a 0a | 54 68 69 73 20 69 73 20 |tions...|This is |
|000004d0| 70 61 72 74 20 31 2f 33 | 2e 20 20 54 68 65 20 73 |part 1/3|. The s|
|000004e0| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 20 62 65 6c |hell arc|hive bel|
|000004f0| 6f 77 20 63 6f 6e 74 61 | 69 6e 73 20 61 20 52 45 |ow conta|ins a RE|
|00000500| 41 44 4d 45 20 66 69 6c | 65 2c 20 0a 61 20 6d 61 |ADME fil|e, .a ma|
|00000510| 6e 20 70 61 67 65 2c 20 | 61 6e 64 20 61 6c 6c 20 |n page, |and all |
|00000520| 6f 66 20 74 68 65 20 43 | 20 73 6f 75 72 63 65 20 |of the C| source |
|00000530| 6d 6f 64 75 6c 65 73 2e | 20 20 50 61 72 74 20 32 |modules.| Part 2|
|00000540| 2f 33 20 63 6f 6e 74 61 | 69 6e 73 20 74 68 65 20 |/3 conta|ins the |
|00000550| 0a 70 72 6f 67 72 61 6d | 27 73 20 76 6f 63 61 62 |.program|'s vocab|
|00000560| 75 6c 61 72 79 2c 20 61 | 6e 64 20 70 61 72 74 20 |ulary, a|nd part |
|00000570| 33 2f 33 20 69 73 20 61 | 20 50 6f 73 74 53 63 72 |3/3 is a| PostScr|
|00000580| 69 70 74 20 6d 61 6e 20 | 70 61 67 65 2e 0a 0a 42 |ipt man |page...B|
|00000590| 72 69 61 6e 20 52 69 63 | 65 20 20 20 72 69 63 65 |rian Ric|e rice|
|000005a0| 40 64 67 2d 72 74 70 2e | 64 67 2e 63 6f 6d 20 20 |@dg-rtp.|dg.com |
|000005b0| 20 2b 31 20 39 31 39 20 | 32 34 38 2d 36 33 32 38 | +1 919 |248-6328|
|000005c0| 0a 44 47 2f 55 58 20 50 | 72 6f 64 75 63 74 20 41 |.DG/UX P|roduct A|
|000005d0| 73 73 75 72 61 6e 63 65 | 20 45 6e 67 69 6e 65 65 |ssurance| Enginee|
|000005e0| 72 69 6e 67 0a 44 61 74 | 61 20 47 65 6e 65 72 61 |ring.Dat|a Genera|
|000005f0| 6c 20 43 6f 72 70 2e 2c | 20 52 65 73 65 61 72 63 |l Corp.,| Researc|
|00000600| 68 20 54 72 69 61 6e 67 | 6c 65 20 50 61 72 6b 2c |h Triang|le Park,|
|00000610| 20 4e 2e 43 2e 0a 22 4a | 6f 69 6e 20 77 69 74 68 | N.C.."J|oin with|
|00000620| 20 6d 65 20 69 6e 20 61 | 20 4d 41 53 53 20 52 41 | me in a| MASS RA|
|00000630| 4c 4c 59 20 66 6f 72 20 | 54 52 41 44 49 54 49 4f |LLY for |TRADITIO|
|00000640| 4e 41 4c 20 4d 45 4e 54 | 41 4c 20 41 54 54 49 54 |NAL MENT|AL ATTIT|
|00000650| 55 44 45 53 21 21 22 20 | 20 2d 2d 5a 69 70 70 79 |UDES!!" | --Zippy|
|00000660| 0a 0a 23 21 20 2f 62 69 | 6e 2f 73 68 0a 23 20 54 |..#! /bi|n/sh.# T|
|00000670| 68 69 73 20 69 73 20 61 | 20 73 68 65 6c 6c 20 61 |his is a| shell a|
|00000680| 72 63 68 69 76 65 2e 20 | 20 52 65 6d 6f 76 65 20 |rchive. | Remove |
|00000690| 61 6e 79 74 68 69 6e 67 | 20 62 65 66 6f 72 65 20 |anything| before |
|000006a0| 74 68 69 73 20 6c 69 6e | 65 2c 20 74 68 65 6e 20 |this lin|e, then |
|000006b0| 66 65 65 64 20 69 74 0a | 23 20 69 6e 74 6f 20 61 |feed it.|# into a|
|000006c0| 20 73 68 65 6c 6c 20 76 | 69 61 20 22 73 68 20 66 | shell v|ia "sh f|
|000006d0| 69 6c 65 22 20 6f 72 20 | 73 69 6d 69 6c 61 72 2e |ile" or |similar.|
|000006e0| 20 20 54 6f 20 6f 76 65 | 72 77 72 69 74 65 20 65 | To ove|rwrite e|
|000006f0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 73 2c 0a 23 |xisting |files,.#|
|00000700| 20 74 79 70 65 20 22 73 | 68 20 66 69 6c 65 20 2d | type "s|h file -|
|00000710| 63 22 2e 0a 23 20 54 68 | 65 20 74 6f 6f 6c 20 74 |c"..# Th|e tool t|
|00000720| 68 61 74 20 67 65 6e 65 | 72 61 74 65 64 20 74 68 |hat gene|rated th|
|00000730| 69 73 20 61 70 70 65 61 | 72 65 64 20 69 6e 20 74 |is appea|red in t|
|00000740| 68 65 20 63 6f 6d 70 2e | 73 6f 75 72 63 65 73 2e |he comp.|sources.|
|00000750| 75 6e 69 78 20 6e 65 77 | 73 67 72 6f 75 70 3b 0a |unix new|sgroup;.|
|00000760| 23 20 73 65 6e 64 20 6d | 61 69 6c 20 74 6f 20 63 |# send m|ail to c|
|00000770| 6f 6d 70 2d 73 6f 75 72 | 63 65 73 2d 75 6e 69 78 |omp-sour|ces-unix|
|00000780| 40 75 75 6e 65 74 2e 75 | 75 2e 6e 65 74 20 69 66 |@uunet.u|u.net if|
|00000790| 20 79 6f 75 20 77 61 6e | 74 20 74 68 61 74 20 74 | you wan|t that t|
|000007a0| 6f 6f 6c 2e 0a 23 20 49 | 66 20 74 68 69 73 20 61 |ool..# I|f this a|
|000007b0| 72 63 68 69 76 65 20 69 | 73 20 63 6f 6d 70 6c 65 |rchive i|s comple|
|000007c0| 74 65 2c 20 79 6f 75 20 | 77 69 6c 6c 20 73 65 65 |te, you |will see|
|000007d0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|000007e0| 65 73 73 61 67 65 20 61 | 74 20 74 68 65 20 65 6e |essage a|t the en|
|000007f0| 64 3a 0a 23 09 09 22 45 | 6e 64 20 6f 66 20 73 68 |d:.#.."E|nd of sh|
|00000800| 65 6c 6c 20 61 72 63 68 | 69 76 65 2e 22 0a 23 20 |ell arch|ive.".# |
|00000810| 43 6f 6e 74 65 6e 74 73 | 3a 20 20 52 45 41 44 4d |Contents|: READM|
|00000820| 45 20 4d 61 6b 65 66 69 | 6c 65 20 61 78 61 74 63 |E Makefi|le axatc|
|00000830| 68 61 72 2e 63 20 63 61 | 70 77 6f 72 64 73 2e 63 |har.c ca|pwords.c|
|00000840| 20 67 65 74 63 6f 75 6e | 74 2e 63 20 67 65 74 6e | getcoun|t.c getn|
|00000850| 74 68 2e 63 0a 23 20 20 | 20 67 65 74 69 74 65 6d |th.c.# | getitem|
|00000860| 2e 63 20 6d 79 5f 72 61 | 6e 64 2e 63 20 73 68 6f |.c my_ra|nd.c sho|
|00000870| 70 2e 63 20 73 68 6f 70 | 2e 68 20 73 68 6f 70 2e |p.c shop|.h shop.|
|00000880| 36 20 73 68 6f 70 2e 6c | 70 0a 23 20 57 72 61 70 |6 shop.l|p.# Wrap|
|00000890| 70 65 64 20 62 79 20 72 | 69 63 65 40 6d 69 72 61 |ped by r|ice@mira|
|000008a0| 67 65 20 6f 6e 20 4d 6f | 6e 20 4a 75 6c 20 20 31 |ge on Mo|n Jul 1|
|000008b0| 20 31 39 3a 31 30 3a 35 | 34 20 31 39 39 31 0a 50 | 19:10:5|4 1991.P|
|000008c0| 41 54 48 3d 2f 62 69 6e | 3a 2f 75 73 72 2f 62 69 |ATH=/bin|:/usr/bi|
|000008d0| 6e 3a 2f 75 73 72 2f 75 | 63 62 20 3b 20 65 78 70 |n:/usr/u|cb ; exp|
|000008e0| 6f 72 74 20 50 41 54 48 | 0a 69 66 20 74 65 73 74 |ort PATH|.if test|
|000008f0| 20 2d 66 20 27 52 45 41 | 44 4d 45 27 20 2d 61 20 | -f 'REA|DME' -a |
|00000900| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00000910| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00000920| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00000930| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00000940| 6c 65 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 0a |le \"'RE|ADME'\".|
|00000950| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00000960| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 52 45 |Extracti|ng \"'RE|
|00000970| 41 44 4d 45 27 5c 22 20 | 5c 28 32 33 33 31 20 63 |ADME'\" |\(2331 c|
|00000980| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00000990| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 52 45 41 44 4d |"s/^X//"| >'READM|
|000009a0| 45 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |E' <<'EN|D_OF_FIL|
|000009b0| 45 27 0a 58 52 45 41 44 | 4d 45 20 66 69 6c 65 20 |E'.XREAD|ME file |
|000009c0| 66 6f 72 20 73 68 6f 70 | 0a 58 3d 3d 3d 3d 3d 3d |for shop|.X======|
|000009d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 58 |========|======.X|
|000009e0| 0a 58 48 6f 77 64 79 2e | 20 20 54 68 69 73 20 70 |.XHowdy.| This p|
|000009f0| 72 6f 67 72 61 6d 20 69 | 73 20 63 61 6c 6c 65 64 |rogram i|s called|
|00000a00| 20 73 68 6f 70 2c 20 61 | 6e 64 20 69 74 20 69 73 | shop, a|nd it is|
|00000a10| 20 65 78 74 72 65 6d 65 | 6c 79 20 73 69 6c 6c 79 | extreme|ly silly|
|00000a20| 2e 0a 58 49 74 20 67 65 | 6e 65 72 61 74 65 73 20 |..XIt ge|nerates |
|00000a30| 61 20 72 61 6e 64 6f 6d | 20 73 68 6f 70 70 69 6e |a random| shoppin|
|00000a40| 67 20 6c 69 73 74 20 6f | 66 20 64 65 72 61 6e 67 |g list o|f derang|
|00000a50| 65 64 20 69 74 65 6d 73 | 2e 20 20 53 75 63 68 20 |ed items|. Such |
|00000a60| 61 73 3a 0a 58 0a 58 20 | 20 20 20 20 20 20 20 48 |as:.X.X | H|
|00000a70| 65 72 65 20 69 73 20 79 | 6f 75 72 20 73 68 6f 70 |ere is y|our shop|
|00000a80| 70 69 6e 67 20 6c 69 73 | 74 3a 0a 58 20 20 20 20 |ping lis|t:.X |
|00000a90| 20 20 20 20 28 31 29 20 | 42 75 79 20 26 20 42 72 | (1) |Buy & Br|
|00000aa0| 65 61 6b 20 72 6f 6f 73 | 74 65 72 20 73 6b 69 73 |eak roos|ter skis|
|00000ab0| 0a 58 20 20 20 20 20 20 | 20 20 28 32 29 20 49 6e |.X | (2) In|
|00000ac0| 65 6c 65 67 61 6e 74 20 | 73 6f 66 61 73 0a 58 20 |elegant |sofas.X |
|00000ad0| 20 20 20 20 20 20 20 28 | 33 29 20 50 6f 6c 65 6d | (|3) Polem|
|00000ae0| 69 63 61 6c 20 62 72 65 | 61 74 68 20 6c 65 73 69 |ical bre|ath lesi|
|00000af0| 6f 6e 73 0a 58 0a 58 59 | 6f 75 20 63 61 6e 20 64 |ons.X.XY|ou can d|
|00000b00| 6f 20 61 6c 6c 20 6d 61 | 6e 6e 65 72 20 6f 66 20 |o all ma|nner of |
|00000b10| 72 69 64 69 63 75 6c 6f | 75 73 20 74 68 69 6e 67 |ridiculo|us thing|
|00000b20| 73 20 77 69 74 68 20 74 | 68 69 73 2e 20 20 46 6f |s with t|his. Fo|
|00000b30| 72 20 65 78 61 6d 70 6c | 65 2c 0a 58 74 68 65 20 |r exampl|e,.Xthe |
|00000b40| 78 74 65 72 6d 20 77 69 | 6e 64 6f 77 20 49 27 6d |xterm wi|ndow I'm|
|00000b50| 20 77 6f 72 6b 69 6e 67 | 20 69 6e 20 72 69 67 68 | working| in righ|
|00000b60| 74 20 6e 6f 77 20 62 65 | 61 72 73 20 74 68 65 20 |t now be|ars the |
|00000b70| 74 69 74 6c 65 20 0a 58 | 22 41 6e 74 61 67 6f 6e |title .X|"Antagon|
|00000b80| 69 73 74 69 63 20 73 6e | 6f 72 65 20 62 61 63 6f |istic sn|ore baco|
|00000b90| 6e 2e 22 20 20 41 6c 73 | 6f 2c 20 74 68 69 73 20 |n." Als|o, this |
|00000ba0| 69 73 20 6e 69 63 65 20 | 74 6f 20 70 75 74 20 69 |is nice |to put i|
|00000bb0| 6e 20 61 0a 58 43 20 73 | 68 65 6c 6c 20 2e 6c 6f |n a.XC s|hell .lo|
|00000bc0| 67 6f 75 74 20 70 72 6f | 67 72 61 6d 2e 0a 58 0a |gout pro|gram..X.|
|00000bd0| 58 53 6f 6d 65 20 70 65 | 6f 70 6c 65 20 28 6c 69 |XSome pe|ople (li|
|00000be0| 6b 65 20 6d 65 29 20 66 | 69 6e 64 20 74 68 69 73 |ke me) f|ind this|
|00000bf0| 20 73 6f 72 74 20 6f 66 | 20 74 68 69 6e 67 20 66 | sort of| thing f|
|00000c00| 75 6e 6e 79 2c 20 62 75 | 74 20 64 6f 6e 27 74 20 |unny, bu|t don't |
|00000c10| 77 6f 72 72 79 2e 2e 2e | 0a 58 77 65 27 72 65 20 |worry...|.Xwe're |
|00000c20| 67 65 74 74 69 6e 67 20 | 70 72 6f 66 65 73 73 69 |getting |professi|
|00000c30| 6f 6e 61 6c 20 68 65 6c | 70 2e 0a 58 0a 58 54 68 |onal hel|p..X.XTh|
|00000c40| 65 20 70 69 6e 64 65 78 | 20 70 72 6f 67 72 61 6d |e pindex| program|
|00000c50| 2c 20 61 6c 73 6f 20 70 | 6f 73 74 65 64 20 74 6f |, also p|osted to|
|00000c60| 20 61 6c 74 2e 73 6f 75 | 72 63 65 73 2c 20 69 73 | alt.sou|rces, is|
|00000c70| 20 72 65 71 75 69 72 65 | 64 20 66 6f 72 20 74 68 | require|d for th|
|00000c80| 65 20 75 73 65 20 0a 58 | 6f 66 20 73 68 6f 70 2e |e use .X|of shop.|
|00000c90| 20 20 42 65 20 73 75 72 | 65 20 74 6f 20 69 6e 73 | Be sur|e to ins|
|00000ca0| 74 61 6c 6c 20 69 74 2c | 20 69 6e 63 6c 75 64 69 |tall it,| includi|
|00000cb0| 6e 67 20 74 68 65 20 70 | 61 74 63 68 20 77 68 69 |ng the p|atch whi|
|00000cc0| 63 68 20 75 70 64 61 74 | 65 73 20 70 69 6e 64 65 |ch updat|es pinde|
|00000cd0| 78 2e 63 20 0a 58 74 6f | 20 72 65 76 69 73 69 6f |x.c .Xto| revisio|
|00000ce0| 6e 20 32 2e 32 2c 20 62 | 65 66 6f 72 65 20 69 6e |n 2.2, b|efore in|
|00000cf0| 73 74 61 6c 6c 69 6e 67 | 20 73 68 6f 70 2e 0a 58 |stalling| shop..X|
|00000d00| 0a 58 48 65 72 65 27 73 | 20 77 68 61 74 20 74 68 |.XHere's| what th|
|00000d10| 69 73 20 70 61 63 6b 61 | 67 65 20 63 6f 6e 74 61 |is packa|ge conta|
|00000d20| 69 6e 73 3a 0a 58 0a 58 | 52 45 41 44 4d 45 0a 58 |ins:.X.X|README.X|
|00000d30| 09 54 68 69 73 20 66 69 | 6c 65 2e 0a 58 73 68 6f |.This fi|le..Xsho|
|00000d40| 70 2e 36 0a 58 09 54 68 | 65 20 74 72 6f 66 66 20 |p.6.X.Th|e troff |
|00000d50| 2d 6d 61 6e 20 73 6f 75 | 72 63 65 20 66 6f 72 20 |-man sou|rce for |
|00000d60| 74 68 65 20 6d 61 6e 20 | 70 61 67 65 2e 0a 58 73 |the man |page..Xs|
|00000d70| 68 6f 70 2e 6c 70 0a 58 | 09 41 20 6d 61 6e 20 70 |hop.lp.X|.A man p|
|00000d80| 61 67 65 20 73 75 69 74 | 61 62 6c 65 20 66 6f 72 |age suit|able for|
|00000d90| 20 70 72 69 6e 74 69 6e | 67 20 6f 6e 20 61 20 6c | printin|g on a l|
|00000da0| 69 6e 65 20 70 72 69 6e | 74 65 72 2e 0a 58 09 41 |ine prin|ter..X.A|
|00000db0| 20 50 6f 73 74 53 63 72 | 69 70 74 20 63 6f 70 79 | PostScr|ipt copy|
|00000dc0| 20 6f 66 20 74 68 65 20 | 6d 61 6e 20 70 61 67 65 | of the |man page|
|00000dd0| 20 68 61 73 20 61 6c 73 | 6f 20 62 65 65 6e 20 70 | has als|o been p|
|00000de0| 6f 73 74 65 64 20 74 6f | 20 0a 58 09 61 6c 74 2e |osted to| .X.alt.|
|00000df0| 73 6f 75 72 63 65 73 2e | 20 20 0a 58 4d 61 6b 65 |sources.| .XMake|
|00000e00| 66 69 6c 65 0a 58 09 41 | 20 6d 61 6b 65 66 69 6c |file.X.A| makefil|
|00000e10| 65 20 66 6f 72 20 74 68 | 65 20 77 68 6f 6c 65 20 |e for th|e whole |
|00000e20| 70 61 63 6b 61 67 65 2e | 20 20 59 6f 75 27 6c 6c |package.| You'll|
|00000e30| 20 77 61 6e 74 20 74 6f | 20 67 65 74 20 69 6e 0a | want to| get in.|
|00000e40| 58 09 61 6e 64 20 65 64 | 69 74 20 74 68 65 20 66 |X.and ed|it the f|
|00000e50| 69 72 73 74 20 70 61 72 | 74 20 6f 66 20 74 68 69 |irst par|t of thi|
|00000e60| 73 2c 20 73 69 6e 63 65 | 20 69 74 20 63 6f 6e 74 |s, since| it cont|
|00000e70| 61 69 6e 73 20 61 20 77 | 68 6f 6c 65 0a 58 09 62 |ains a w|hole.X.b|
|00000e80| 75 6e 63 68 20 6f 66 20 | 63 6f 6e 66 69 67 75 72 |unch of |configur|
|00000e90| 61 62 6c 65 20 69 74 65 | 6d 73 2e 0a 58 6e 6f 75 |able ite|ms..Xnou|
|00000ea0| 6e 73 2e 72 61 77 0a 58 | 61 64 6a 73 2e 72 61 77 |ns.raw.X|adjs.raw|
|00000eb0| 0a 58 09 54 68 65 20 70 | 72 6f 67 72 61 6d 27 73 |.X.The p|rogram's|
|00000ec0| 20 76 6f 63 61 62 75 6c | 61 72 79 2c 20 69 6e 20 | vocabul|ary, in |
|00000ed0| 61 20 6e 6f 6e 2d 69 6e | 64 65 78 65 64 20 66 6f |a non-in|dexed fo|
|00000ee0| 72 6d 61 74 2e 20 20 61 | 64 6a 73 2e 72 61 77 0a |rmat. a|djs.raw.|
|00000ef0| 58 09 63 6f 6e 74 61 69 | 6e 73 20 6f 6e 65 20 61 |X.contai|ns one a|
|00000f00| 64 6a 65 63 74 69 76 65 | 2d 6c 69 6b 65 20 74 68 |djective|-like th|
|00000f10| 69 6e 67 20 70 65 72 20 | 6c 69 6e 65 2e 20 20 6e |ing per |line. n|
|00000f20| 6f 75 6e 73 2e 72 61 77 | 20 63 6f 6e 74 61 69 6e |ouns.raw| contain|
|00000f30| 73 0a 58 09 70 61 69 72 | 73 20 6f 66 20 6c 69 6e |s.X.pair|s of lin|
|00000f40| 65 73 3a 20 74 68 65 20 | 66 69 72 73 74 20 6c 69 |es: the |first li|
|00000f50| 6e 65 20 69 6e 20 65 61 | 63 68 20 70 61 69 72 20 |ne in ea|ch pair |
|00000f60| 69 73 20 61 20 6e 6f 75 | 6e 2d 6c 69 6b 65 20 74 |is a nou|n-like t|
|00000f70| 68 69 6e 67 2c 0a 58 09 | 61 6e 64 20 74 68 65 20 |hing,.X.|and the |
|00000f80| 73 65 63 6f 6e 64 20 6c | 69 6e 65 20 69 73 20 69 |second l|ine is i|
|00000f90| 74 73 20 70 6c 75 72 61 | 6c 20 66 6f 72 6d 20 28 |ts plura|l form (|
|00000fa0| 6f 72 2c 20 69 66 20 66 | 6f 72 20 73 6f 6d 65 20 |or, if f|or some |
|00000fb0| 72 65 61 73 6f 6e 0a 58 | 09 69 74 27 73 20 6e 6f |reason.X|.it's no|
|00000fc0| 74 20 77 6f 72 6b 61 62 | 6c 65 2c 20 73 6f 6d 65 |t workab|le, some|
|00000fd0| 20 6f 74 68 65 72 20 70 | 6c 75 72 61 6c 20 6f 72 | other p|lural or|
|00000fe0| 20 63 6f 6c 6c 65 63 74 | 69 76 65 20 74 68 69 6e | collect|ive thin|
|00000ff0| 67 29 2e 20 20 4f 66 0a | 58 09 63 6f 75 72 73 65 |g). Of.|X.course|
|00001000| 2c 20 79 6f 75 20 6d 61 | 79 20 63 75 73 74 6f 6d |, you ma|y custom|
|00001010| 69 7a 65 20 74 68 65 73 | 65 2e 0a 58 09 54 68 65 |ize thes|e..X.The|
|00001020| 20 6d 61 6b 65 66 69 6c | 65 20 66 6f 72 20 73 68 | makefil|e for sh|
|00001030| 6f 70 20 72 75 6e 73 20 | 70 69 6e 64 65 78 20 74 |op runs |pindex t|
|00001040| 6f 20 74 72 61 6e 73 6c | 61 74 65 20 74 68 65 73 |o transl|ate thes|
|00001050| 65 20 66 69 6c 65 73 20 | 69 6e 74 6f 20 0a 58 09 |e files |into .X.|
|00001060| 74 68 65 20 69 6e 64 65 | 78 65 64 20 66 6f 72 6d |the inde|xed form|
|00001070| 61 74 20 77 68 69 63 68 | 20 73 68 6f 70 20 72 65 |at which| shop re|
|00001080| 71 75 69 72 65 73 2e 20 | 20 0a 58 73 68 6f 70 2e |quires. | .Xshop.|
|00001090| 63 20 0a 58 73 68 6f 70 | 2e 68 0a 58 61 78 61 74 |c .Xshop|.h.Xaxat|
|000010a0| 63 68 61 72 2e 63 20 0a | 58 63 61 70 77 6f 72 64 |char.c .|Xcapword|
|000010b0| 73 2e 63 20 0a 58 67 65 | 74 63 6f 75 6e 74 2e 63 |s.c .Xge|tcount.c|
|000010c0| 20 0a 58 67 65 74 69 74 | 65 6d 2e 63 0a 58 67 65 | .Xgetit|em.c.Xge|
|000010d0| 74 6e 74 68 2e 63 0a 58 | 6d 79 5f 72 61 6e 64 2e |tnth.c.X|my_rand.|
|000010e0| 63 0a 58 09 56 61 72 69 | 6f 75 73 20 73 6f 75 72 |c.X.Vari|ous sour|
|000010f0| 63 65 20 6d 6f 64 75 6c | 65 73 20 66 6f 72 20 73 |ce modul|es for s|
|00001100| 68 6f 70 20 70 72 6f 70 | 65 72 2e 20 20 4e 6f 74 |hop prop|er. Not|
|00001110| 65 20 65 73 70 65 63 69 | 61 6c 6c 79 0a 58 09 6d |e especi|ally.X.m|
|00001120| 79 5f 72 61 6e 64 2e 63 | 3b 20 69 74 20 63 6f 6e |y_rand.c|; it con|
|00001130| 74 61 69 6e 73 20 61 20 | 72 61 6e 64 6f 6d 20 6e |tains a |random n|
|00001140| 75 6d 62 65 72 20 66 75 | 6e 63 74 69 6f 6e 20 77 |umber fu|nction w|
|00001150| 68 69 63 68 20 72 65 74 | 75 72 6e 73 0a 58 09 61 |hich ret|urns.X.a|
|00001160| 20 6c 6f 6e 67 20 69 6e | 74 65 67 65 72 2e 20 20 | long in|teger. |
|00001170| 49 66 20 6d 79 5f 72 61 | 6e 64 2e 63 20 64 6f 65 |If my_ra|nd.c doe|
|00001180| 73 6e 27 74 20 63 6f 6d | 70 69 6c 65 20 6f 6e 20 |sn't com|pile on |
|00001190| 79 6f 75 72 20 73 79 73 | 74 65 6d 2c 0a 58 09 79 |your sys|tem,.X.y|
|000011a0| 6f 75 20 63 61 6e 20 6a | 75 73 74 20 73 75 70 70 |ou can j|ust supp|
|000011b0| 6c 79 20 79 6f 75 72 20 | 6f 77 6e 20 65 71 75 69 |ly your |own equi|
|000011c0| 76 61 6c 65 6e 74 20 6d | 6f 64 75 6c 65 2e 0a 58 |valent m|odule..X|
|000011d0| 0a 58 49 27 76 65 20 73 | 75 63 63 65 73 73 66 75 |.XI've s|uccessfu|
|000011e0| 6c 6c 79 20 63 6f 6d 70 | 69 6c 65 64 20 74 68 69 |lly comp|iled thi|
|000011f0| 73 20 70 61 63 6b 61 67 | 65 20 6f 6e 20 44 47 2f |s packag|e on DG/|
|00001200| 55 58 2c 20 53 75 6e 4f | 53 2c 20 61 6e 64 20 76 |UX, SunO|S, and v|
|00001210| 61 6e 69 6c 6c 61 0a 58 | 53 56 52 34 20 73 79 73 |anilla.X|SVR4 sys|
|00001220| 74 65 6d 73 2e 20 20 49 | 27 64 20 6c 69 6b 65 20 |tems. I|'d like |
|00001230| 74 6f 20 68 65 61 72 20 | 6f 66 20 70 65 6f 70 6c |to hear |of peopl|
|00001240| 65 27 73 20 65 78 70 65 | 72 69 65 6e 63 65 73 20 |e's expe|riences |
|00001250| 77 69 74 68 20 73 65 74 | 74 69 6e 67 0a 58 75 70 |with set|ting.Xup|
|00001260| 20 74 68 65 20 70 61 63 | 6b 61 67 65 20 75 6e 64 | the pac|kage und|
|00001270| 65 72 20 6f 74 68 65 72 | 20 6f 70 65 72 61 74 69 |er other| operati|
|00001280| 6e 67 20 73 79 73 74 65 | 6d 73 3b 20 6d 79 20 65 |ng syste|ms; my e|
|00001290| 2d 6d 61 69 6c 20 61 64 | 64 72 65 73 73 20 0a 58 |-mail ad|dress .X|
|000012a0| 69 73 20 72 69 63 65 40 | 64 67 2d 72 74 70 2e 64 |is rice@|dg-rtp.d|
|000012b0| 67 2e 63 6f 6d 20 2e 20 | 20 41 6c 73 6f 2c 20 70 |g.com . | Also, p|
|000012c0| 6c 65 61 73 65 20 64 72 | 6f 70 20 6d 65 20 61 20 |lease dr|op me a |
|000012d0| 6e 6f 74 65 20 63 6f 6e | 63 65 72 6e 69 6e 67 0a |note con|cerning.|
|000012e0| 58 62 75 67 73 2c 20 65 | 6e 68 61 6e 63 65 6d 65 |Xbugs, e|nhanceme|
|000012f0| 6e 74 73 2c 20 61 6e 64 | 20 61 6d 75 73 69 6e 67 |nts, and| amusing|
|00001300| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 2e 0a 0a | applica|tions...|
|00001310| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 65 63 68 6f |END_OF_F|ILE.echo|
|00001320| 20 73 68 61 72 3a 20 4e | 45 57 4c 49 4e 45 20 61 | shar: N|EWLINE a|
|00001330| 70 70 65 6e 64 65 64 20 | 74 6f 20 5c 22 27 52 45 |ppended |to \"'RE|
|00001340| 41 44 4d 45 27 5c 22 0a | 69 66 20 74 65 73 74 20 |ADME'\".|if test |
|00001350| 32 33 33 32 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |2332 -ne| `wc -c |
|00001360| 3c 27 52 45 41 44 4d 45 | 27 60 3b 20 74 68 65 6e |<'README|'`; then|
|00001370| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00001380| 5c 22 27 52 45 41 44 4d | 45 27 5c 22 20 75 6e 70 |\"'READM|E'\" unp|
|00001390| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|000013a0| 20 73 69 7a 65 21 0a 66 | 69 0a 23 20 65 6e 64 20 | size!.f|i.# end |
|000013b0| 6f 66 20 27 52 45 41 44 | 4d 45 27 0a 66 69 0a 69 |of 'READ|ME'.fi.i|
|000013c0| 66 20 74 65 73 74 20 2d | 66 20 27 4d 61 6b 65 66 |f test -|f 'Makef|
|000013d0| 69 6c 65 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |ile' -a |"${1}" !|
|000013e0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|000013f0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00001400| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00001410| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 4d 61 |sting fi|le \"'Ma|
|00001420| 6b 65 66 69 6c 65 27 5c | 22 0a 65 6c 73 65 0a 65 |kefile'\|".else.e|
|00001430| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00001440| 74 69 6e 67 20 5c 22 27 | 4d 61 6b 65 66 69 6c 65 |ting \"'|Makefile|
|00001450| 27 5c 22 20 5c 28 35 31 | 36 34 20 63 68 61 72 61 |'\" \(51|64 chara|
|00001460| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00001470| 58 2f 2f 22 20 3e 27 4d | 61 6b 65 66 69 6c 65 27 |X//" >'M|akefile'|
|00001480| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00001490| 0a 58 23 20 54 68 69 73 | 20 69 73 20 74 68 65 20 |.X# This| is the |
|000014a0| 6d 61 6b 65 66 69 6c 65 | 20 66 6f 72 20 73 68 6f |makefile| for sho|
|000014b0| 70 2e 20 0a 58 23 20 4e | 6f 74 65 20 74 68 61 74 |p. .X# N|ote that|
|000014c0| 20 74 68 65 20 72 61 6e | 64 6f 6d 20 66 75 6e 63 | the ran|dom func|
|000014d0| 74 69 6f 6e 2c 20 6c 6f | 6e 67 20 6d 79 5f 72 61 |tion, lo|ng my_ra|
|000014e0| 6e 64 28 29 20 69 6e 20 | 6d 79 5f 72 61 6e 64 2e |nd() in |my_rand.|
|000014f0| 63 2c 20 69 73 20 6f 6e | 6c 79 20 0a 58 23 20 73 |c, is on|ly .X# s|
|00001500| 75 69 74 61 62 6c 65 20 | 69 66 20 74 68 65 20 73 |uitable |if the s|
|00001510| 69 7a 65 20 6f 66 20 61 | 20 6c 6f 6e 67 20 6f 6e |ize of a| long on|
|00001520| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 20 69 73 20 | your sy|stem is |
|00001530| 33 32 20 62 69 74 73 20 | 6f 72 20 6d 6f 72 65 2e |32 bits |or more.|
|00001540| 0a 58 23 20 49 66 20 6e | 6f 74 2c 20 6a 75 73 74 |.X# If n|ot, just|
|00001550| 20 77 72 69 74 65 20 61 | 20 6d 79 5f 72 61 6e 64 | write a| my_rand|
|00001560| 28 29 20 69 6e 20 74 65 | 72 6d 73 20 6f 66 20 77 |() in te|rms of w|
|00001570| 68 61 74 65 76 65 72 20 | 72 61 6e 64 6f 6d 2d 6e |hatever |random-n|
|00001580| 75 6d 62 65 72 20 0a 58 | 23 20 67 65 6e 65 72 61 |umber .X|# genera|
|00001590| 74 69 6f 6e 20 66 61 63 | 69 6c 69 74 79 20 79 6f |tion fac|ility yo|
|000015a0| 75 72 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 6f |ur envir|onment o|
|000015b0| 66 66 65 72 73 2e 0a 58 | 23 0a 58 23 20 4e 6f 74 |ffers..X|#.X# Not|
|000015c0| 65 20 61 6c 73 6f 20 74 | 68 61 74 20 69 66 20 79 |e also t|hat if y|
|000015d0| 6f 75 20 77 69 73 68 20 | 74 6f 20 75 70 64 61 74 |ou wish |to updat|
|000015e0| 65 20 73 68 6f 70 27 73 | 20 64 61 74 61 62 61 73 |e shop's| databas|
|000015f0| 65 20 6f 66 20 70 68 72 | 61 73 65 73 0a 58 23 20 |e of phr|ases.X# |
|00001600| 61 6e 64 20 77 6f 72 64 | 73 2c 20 79 6f 75 20 6d |and word|s, you m|
|00001610| 61 79 20 64 6f 20 73 6f | 20 62 79 20 65 64 69 74 |ay do so| by edit|
|00001620| 69 6e 67 20 74 68 65 20 | 72 61 77 20 66 69 6c 65 |ing the |raw file|
|00001630| 73 20 28 6e 6f 74 65 20 | 74 68 65 0a 58 23 20 6e |s (note |the.X# n|
|00001640| 6f 75 6e 20 66 69 6c 65 | 27 73 20 66 6f 72 6d 61 |oun file|'s forma|
|00001650| 74 3a 20 69 6e 20 65 61 | 63 68 20 70 61 69 72 20 |t: in ea|ch pair |
|00001660| 6f 66 20 6c 69 6e 65 73 | 2c 20 74 68 65 20 66 69 |of lines|, the fi|
|00001670| 72 73 74 20 69 73 20 74 | 68 65 0a 58 23 20 73 69 |rst is t|he.X# si|
|00001680| 6e 67 75 6c 61 72 20 61 | 6e 64 20 74 68 65 20 73 |ngular a|nd the s|
|00001690| 65 63 6f 6e 64 20 69 73 | 20 74 68 65 20 70 6c 75 |econd is| the plu|
|000016a0| 72 61 6c 29 20 74 68 65 | 6e 20 67 69 76 69 6e 67 |ral) the|n giving|
|000016b0| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 0a 58 23 0a | the com|mand.X#.|
|000016c0| 58 23 20 20 20 20 20 20 | 20 20 6d 61 6b 65 20 6c |X# | make l|
|000016d0| 69 73 74 73 0a 58 0a 58 | 23 20 42 72 69 61 6e 20 |ists.X.X|# Brian |
|000016e0| 52 69 63 65 20 20 72 69 | 63 65 40 64 67 2d 72 74 |Rice ri|ce@dg-rt|
|000016f0| 70 2e 64 67 2e 63 6f 6d | 20 20 24 44 61 74 65 3a |p.dg.com| $Date:|
|00001700| 20 39 31 2f 30 37 2f 30 | 31 20 31 38 3a 34 35 3a | 91/07/0|1 18:45:|
|00001710| 35 36 20 24 0a 58 0a 58 | 49 4e 53 54 41 4c 4c 5f |56 $.X.X|INSTALL_|
|00001720| 44 49 52 3d 2f 75 73 72 | 2f 6c 6f 63 61 6c 2f 62 |DIR=/usr|/local/b|
|00001730| 69 6e 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |in.X | |
|00001740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 23 20 53 | | # S|
|00001750| 65 74 20 74 6f 20 62 65 | 20 74 68 65 20 64 69 72 |et to be| the dir|
|00001760| 65 63 74 6f 72 79 20 69 | 6e 74 6f 20 77 68 69 63 |ectory i|nto whic|
|00001770| 68 20 79 6f 75 20 77 6f | 75 6c 64 0a 58 20 20 20 |h you wo|uld.X |
|00001780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001790| 20 20 20 20 20 20 23 20 | 6c 69 6b 65 20 74 68 65 | # |like the|
|000017a0| 20 73 68 6f 70 20 65 78 | 65 63 75 74 61 62 6c 65 | shop ex|ecutable|
|000017b0| 20 74 6f 20 62 65 20 63 | 6f 70 69 65 64 2e 0a 58 | to be c|opied..X|
|000017c0| 53 48 4f 50 4c 49 42 5f | 44 49 52 3d 2f 75 73 72 |SHOPLIB_|DIR=/usr|
|000017d0| 2f 6c 6f 63 61 6c 2f 6c | 69 62 2f 73 68 6f 70 0a |/local/l|ib/shop.|
|000017e0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|000017f0| 20 20 20 20 20 20 20 20 | 20 20 23 20 53 65 74 20 | | # Set |
|00001800| 74 6f 20 62 65 20 74 68 | 65 20 64 69 72 65 63 74 |to be th|e direct|
|00001810| 6f 72 79 20 77 68 65 72 | 65 20 69 6e 64 65 78 65 |ory wher|e indexe|
|00001820| 64 20 64 61 74 61 20 66 | 69 6c 65 73 20 0a 58 20 |d data f|iles .X |
|00001830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001840| 20 20 20 20 20 20 20 20 | 23 20 73 68 6f 75 6c 64 | |# should|
|00001850| 20 6c 69 76 65 2e 20 20 | 54 68 69 73 20 6d 75 73 | live. |This mus|
|00001860| 74 20 62 65 20 61 6e 20 | 61 62 73 6f 6c 75 74 65 |t be an |absolute|
|00001870| 20 70 61 74 68 6e 61 6d | 65 2d 2d 0a 58 20 20 20 | pathnam|e--.X |
|00001880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001890| 20 20 20 20 20 20 23 20 | 74 68 61 74 20 69 73 2c | # |that is,|
|000018a0| 20 69 74 20 6d 75 73 74 | 20 68 61 76 65 20 74 68 | it must| have th|
|000018b0| 65 20 73 61 6d 65 20 69 | 6e 74 65 72 70 72 65 74 |e same i|nterpret|
|000018c0| 61 74 69 6f 6e 0a 58 20 | 20 20 20 20 20 20 20 20 |ation.X | |
|000018d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000018e0| 23 20 72 65 67 61 72 64 | 6c 65 73 73 20 6f 66 20 |# regard|less of |
|000018f0| 77 68 61 74 20 79 6f 75 | 72 20 63 75 72 72 65 6e |what you|r curren|
|00001900| 74 20 77 6f 72 6b 69 6e | 67 20 64 69 72 65 63 74 |t workin|g direct|
|00001910| 6f 72 79 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |ory.X | |
|00001920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|00001930| 69 73 2e 20 20 28 55 6e | 64 65 72 20 55 4e 49 58 |is. (Un|der UNIX|
|00001940| 2c 20 74 68 69 73 20 77 | 6f 75 6c 64 20 6d 65 61 |, this w|ould mea|
|00001950| 6e 20 74 68 61 74 20 74 | 68 65 0a 58 20 20 20 20 |n that t|he.X |
|00001960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001970| 20 20 20 20 20 23 20 70 | 61 74 68 6e 61 6d 65 20 | # p|athname |
|00001980| 6d 75 73 74 20 62 65 67 | 69 6e 20 77 69 74 68 20 |must beg|in with |
|00001990| 61 20 73 6c 61 73 68 2e | 29 0a 58 50 49 4e 44 45 |a slash.|).XPINDE|
|000019a0| 58 5f 44 49 52 3d 2f 75 | 73 72 2f 6c 6f 63 61 6c |X_DIR=/u|sr/local|
|000019b0| 2f 62 69 6e 0a 58 20 20 | 20 20 20 20 20 20 20 20 |/bin.X | |
|000019c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 23 | | #|
|000019d0| 20 53 65 74 20 74 6f 20 | 62 65 20 74 68 65 20 64 | Set to |be the d|
|000019e0| 69 72 65 63 74 6f 72 79 | 20 69 6e 20 77 68 69 63 |irectory| in whic|
|000019f0| 68 20 79 6f 75 20 68 61 | 76 65 0a 58 20 20 20 20 |h you ha|ve.X |
|00001a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a10| 20 20 20 20 20 23 20 69 | 6e 73 74 61 6c 6c 65 64 | # i|nstalled|
|00001a20| 20 70 69 6e 64 65 78 20 | 28 61 6c 73 6f 20 70 6f | pindex |(also po|
|00001a30| 73 74 65 64 20 74 6f 20 | 61 6c 74 2e 73 6f 75 72 |sted to |alt.sour|
|00001a40| 63 65 73 29 2e 0a 58 20 | 20 20 20 20 20 20 20 20 |ces)..X | |
|00001a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001a60| 23 20 49 66 20 79 6f 75 | 20 68 61 76 65 6e 27 74 |# If you| haven't|
|00001a70| 20 69 6e 73 74 61 6c 6c | 65 64 20 70 69 6e 64 65 | install|ed pinde|
|00001a80| 78 20 79 65 74 2c 20 67 | 6f 20 64 6f 0a 58 20 20 |x yet, g|o do.X |
|00001a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001aa0| 20 20 20 20 20 20 20 23 | 20 69 74 20 6e 6f 77 21 | #| it now!|
|00001ab0| 0a 58 52 41 57 5f 46 49 | 4c 45 53 5f 44 49 52 3d |.XRAW_FI|LES_DIR=|
|00001ac0| 2e 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |..X | |
|00001ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 23 20 53 65 | | # Se|
|00001ae0| 74 20 74 6f 20 62 65 20 | 74 68 65 20 64 69 72 65 |t to be |the dire|
|00001af0| 63 74 6f 72 79 20 77 68 | 65 72 65 20 73 6f 75 72 |ctory wh|ere sour|
|00001b00| 63 65 20 64 61 74 61 0a | 58 20 20 20 20 20 20 20 |ce data.|X |
|00001b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b20| 20 20 23 20 66 69 6c 65 | 73 20 6c 69 76 65 2e 0a | # file|s live..|
|00001b30| 58 43 46 4c 41 47 53 3d | 0a 58 20 20 20 20 20 20 |XCFLAGS=|.X |
|00001b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b50| 20 20 20 23 20 43 6f 6d | 70 69 6c 61 74 69 6f 6e | # Com|pilation|
|00001b60| 20 66 6c 61 67 73 2e 0a | 58 4c 46 4c 41 47 53 3d | flags..|XLFLAGS=|
|00001b70| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00001b80| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 4c 69 6e | | # Lin|
|00001b90| 6b 20 65 64 69 74 6f 72 | 20 66 6c 61 67 73 2e 0a |k editor| flags..|
|00001ba0| 58 43 43 3d 2f 75 73 72 | 2f 62 69 6e 2f 63 63 0a |XCC=/usr|/bin/cc.|
|00001bb0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00001bc0| 20 20 20 20 20 20 20 20 | 20 20 23 20 59 6f 75 72 | | # Your|
|00001bd0| 20 43 20 63 6f 6d 70 69 | 6c 65 72 2e 0a 58 50 57 | C compi|ler..XPW|
|00001be0| 44 5f 53 55 50 50 4f 52 | 54 45 44 3d 31 0a 58 20 |D_SUPPOR|TED=1.X |
|00001bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c00| 20 20 20 20 20 20 20 20 | 23 20 53 65 74 20 74 6f | |# Set to|
|00001c10| 20 31 20 69 66 20 79 6f | 75 72 20 73 79 73 74 65 | 1 if yo|ur syste|
|00001c20| 6d 20 73 75 70 70 6f 72 | 74 73 20 75 69 64 73 2c |m suppor|ts uids,|
|00001c30| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00001c40| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 64 65 6c | | # del|
|00001c50| 69 76 65 72 65 64 20 74 | 68 72 6f 75 67 68 20 74 |ivered t|hrough t|
|00001c60| 68 65 20 67 65 74 70 77 | 65 6e 74 20 66 61 63 69 |he getpw|ent faci|
|00001c70| 6c 69 74 79 2e 0a 58 20 | 20 20 20 20 20 20 20 20 |lity..X | |
|00001c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c90| 23 20 4f 74 68 65 72 77 | 69 73 65 2c 20 73 65 74 |# Otherw|ise, set|
|00001ca0| 20 74 6f 20 30 2e 0a 58 | 44 45 46 41 55 4c 54 5f | to 0..X|DEFAULT_|
|00001cb0| 4e 41 4d 45 3d 22 4d 61 | 72 6b 20 4d 63 41 75 6c |NAME="Ma|rk McAul|
|00001cc0| 69 66 66 65 22 0a 58 20 | 20 20 20 20 20 20 20 20 |iffe".X | |
|00001cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ce0| 23 20 53 65 74 20 74 68 | 69 73 20 74 6f 20 61 20 |# Set th|is to a |
|00001cf0| 6e 61 6d 65 20 74 6f 20 | 75 73 65 20 66 6f 72 20 |name to |use for |
|00001d00| 74 68 65 20 2d 6d 0a 58 | 20 20 20 20 20 20 20 20 |the -m.X| |
|00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001d20| 20 23 20 6f 70 74 69 6f | 6e 20 69 66 20 79 6f 75 | # optio|n if you|
|00001d30| 72 20 73 79 73 74 65 6d | 20 64 6f 65 73 20 6e 6f |r system| does no|
|00001d40| 74 20 73 75 70 70 6f 72 | 74 20 67 65 74 70 77 65 |t suppor|t getpwe|
|00001d50| 6e 74 2e 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |nt..X | |
|00001d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|00001d70| 28 49 74 20 69 73 20 69 | 67 6e 6f 72 65 64 20 69 |(It is i|gnored i|
|00001d80| 66 20 50 57 44 5f 53 55 | 50 50 4f 52 54 45 44 20 |f PWD_SU|PPORTED |
|00001d90| 69 73 20 31 2e 29 0a 58 | 56 45 52 42 4f 53 45 5f |is 1.).X|VERBOSE_|
|00001da0| 47 45 43 4f 53 3d 31 0a | 58 20 20 20 20 20 20 20 |GECOS=1.|X |
|00001db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001dc0| 20 20 23 20 53 65 74 20 | 74 6f 20 31 20 69 66 20 | # Set |to 1 if |
|00001dd0| 74 68 65 20 63 6f 6d 6d | 65 6e 74 20 66 69 65 6c |the comm|ent fiel|
|00001de0| 64 20 6f 66 20 75 73 65 | 72 6e 61 6d 65 73 20 61 |d of use|rnames a|
|00001df0| 74 20 79 6f 75 72 0a 58 | 20 20 20 20 20 20 20 20 |t your.X| |
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e10| 20 23 20 73 69 74 65 20 | 68 61 73 20 66 69 65 6c | # site |has fiel|
|00001e20| 64 73 20 6f 74 68 65 72 | 20 74 68 61 6e 20 74 68 |ds other| than th|
|00001e30| 65 20 75 73 65 72 27 73 | 20 72 65 61 6c 20 6e 61 |e user's| real na|
|00001e40| 6d 65 2d 2d 0a 58 20 20 | 20 20 20 20 20 20 20 20 |me--.X | |
|00001e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 23 | | #|
|00001e60| 20 66 6f 72 20 69 6e 73 | 74 61 6e 63 65 2e 2e 2e | for ins|tance...|
|00001e70| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00001e80| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 20 20 20 | | # |
|00001e90| 20 20 20 20 20 42 72 69 | 61 6e 20 52 69 63 65 2c | Bri|an Rice,|
|00001ea0| 2c 32 34 38 36 33 32 38 | 2c 0a 58 20 20 20 20 20 |,2486328|,.X |
|00001eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ec0| 20 20 20 20 23 20 49 66 | 20 74 68 65 20 63 6f 6d | # If| the com|
|00001ed0| 6d 65 6e 74 20 66 69 65 | 6c 64 20 68 61 73 20 6e |ment fie|ld has n|
|00001ee0| 6f 74 68 69 6e 67 20 62 | 75 74 20 6e 61 6d 65 73 |othing b|ut names|
|00001ef0| 20 69 6e 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 | in.X | |
|00001f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|00001f10| 69 74 2c 20 73 65 74 20 | 56 45 52 42 4f 53 45 5f |it, set |VERBOSE_|
|00001f20| 47 45 43 4f 53 20 74 6f | 20 30 2e 0a 58 20 20 20 |GECOS to| 0..X |
|00001f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f40| 20 20 20 20 20 20 23 20 | 57 68 79 20 69 73 20 69 | # |Why is i|
|00001f50| 74 20 63 61 6c 6c 65 64 | 20 47 45 43 4f 53 3f 20 |t called| GECOS? |
|00001f60| 20 54 68 6f 73 65 20 70 | 65 73 6b 79 20 68 69 73 | Those p|esky his|
|00001f70| 74 6f 72 69 63 61 6c 20 | 0a 58 20 20 20 20 20 20 |torical |.X |
|00001f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f90| 20 20 20 23 20 72 65 61 | 73 6f 6e 73 2e 0a 58 47 | # rea|sons..XG|
|00001fa0| 45 43 4f 53 5f 44 45 4c | 49 4d 49 54 45 52 53 3d |ECOS_DEL|IMITERS=|
|00001fb0| 22 2c 22 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |",".X | |
|00001fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|00001fd0| 41 20 6c 69 73 74 20 6f | 66 20 61 6c 6c 20 63 68 |A list o|f all ch|
|00001fe0| 61 72 61 63 74 65 72 73 | 20 77 68 69 63 68 20 73 |aracters| which s|
|00001ff0| 65 72 76 65 20 74 6f 20 | 6d 61 72 6b 20 74 68 65 |erve to |mark the|
|00002000| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00002010| 20 20 20 20 20 20 20 20 | 20 20 20 23 20 65 6e 64 | | # end|
|00002020| 20 6f 66 20 75 73 65 72 | 73 27 20 72 65 61 6c 20 | of user|s' real |
|00002030| 6e 61 6d 65 73 20 69 6e | 20 74 68 65 20 63 6f 6d |names in| the com|
|00002040| 6d 65 6e 74 20 66 69 65 | 6c 64 20 61 74 20 0a 58 |ment fie|ld at .X|
|00002050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002060| 20 20 20 20 20 20 20 20 | 20 23 20 79 6f 75 72 20 | | # your |
|00002070| 73 69 74 65 2e 0a 58 50 | 41 54 48 4e 41 4d 45 5f |site..XP|ATHNAME_|
|00002080| 53 45 50 3d 2f 0a 58 20 | 20 20 20 20 20 20 20 20 |SEP=/.X | |
|00002090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000020a0| 23 20 54 68 65 20 63 68 | 61 72 61 63 74 65 72 20 |# The ch|aracter |
|000020b0| 77 68 69 63 68 20 73 65 | 70 61 72 61 74 65 73 20 |which se|parates |
|000020c0| 70 61 74 68 6e 61 6d 65 | 20 63 6f 6d 70 6f 6e 65 |pathname| compone|
|000020d0| 6e 74 73 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |nts.X | |
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 23 20 | | # |
|000020f0| 61 74 20 79 6f 75 72 20 | 73 69 74 65 2e 0a 58 43 |at your |site..XC|
|00002100| 4f 50 59 3d 63 70 0a 58 | 20 20 20 20 20 20 20 20 |OPY=cp.X| |
|00002110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002120| 20 23 20 59 6f 75 72 20 | 63 6f 6d 6d 61 6e 64 20 | # Your |command |
|00002130| 66 6f 72 20 63 6f 70 79 | 69 6e 67 20 61 20 66 69 |for copy|ing a fi|
|00002140| 6c 65 2e 0a 58 45 58 45 | 43 41 42 4c 45 3d 63 68 |le..XEXE|CABLE=ch|
|00002150| 6d 6f 64 20 37 35 35 0a | 58 20 20 20 20 20 20 20 |mod 755.|X |
|00002160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002170| 20 20 23 20 59 6f 75 72 | 20 63 6f 6d 6d 61 6e 64 | # Your| command|
|00002180| 20 66 6f 72 20 6d 61 6b | 69 6e 67 20 61 20 66 69 | for mak|ing a fi|
|00002190| 6c 65 20 65 78 65 63 75 | 74 61 62 6c 65 2e 0a 58 |le execu|table..X|
|000021a0| 54 4f 55 43 48 3d 74 6f | 75 63 68 0a 58 20 20 20 |TOUCH=to|uch.X |
|000021b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000021c0| 20 20 20 20 20 20 23 20 | 59 6f 75 72 20 63 6f 6d | # |Your com|
|000021d0| 6d 61 6e 64 20 66 6f 72 | 20 74 6f 75 63 68 69 6e |mand for| touchin|
|000021e0| 67 20 61 20 66 69 6c 65 | 2e 0a 58 4d 4b 44 49 52 |g a file|..XMKDIR|
|000021f0| 3d 6d 6b 64 69 72 0a 58 | 20 20 20 20 20 20 20 20 |=mkdir.X| |
|00002200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002210| 20 23 20 59 6f 75 72 20 | 63 6f 6d 6d 61 6e 64 20 | # Your |command |
|00002220| 66 6f 72 20 63 72 65 61 | 74 69 6e 67 20 61 20 64 |for crea|ting a d|
|00002230| 69 72 65 63 74 6f 72 79 | 2e 0a 58 0a 58 23 20 54 |irectory|..X.X# T|
|00002240| 68 61 74 27 73 20 61 6c | 6c 20 74 68 65 20 64 65 |hat's al|l the de|
|00002250| 66 69 6e 65 73 2e 0a 58 | 0a 58 4e 4f 55 4e 46 49 |fines..X|.XNOUNFI|
|00002260| 4c 45 3d 24 28 53 48 4f | 50 4c 49 42 5f 44 49 52 |LE=$(SHO|PLIB_DIR|
|00002270| 29 24 28 50 41 54 48 4e | 41 4d 45 5f 53 45 50 29 |)$(PATHN|AME_SEP)|
|00002280| 6e 6f 75 6e 73 2e 64 61 | 74 0a 58 50 4c 55 52 41 |nouns.da|t.XPLURA|
|00002290| 4c 46 49 4c 45 3d 24 28 | 53 48 4f 50 4c 49 42 5f |LFILE=$(|SHOPLIB_|
|000022a0| 44 49 52 29 24 28 50 41 | 54 48 4e 41 4d 45 5f 53 |DIR)$(PA|THNAME_S|
|000022b0| 45 50 29 70 6c 75 72 61 | 6c 73 2e 64 61 74 0a 58 |EP)plura|ls.dat.X|
|000022c0| 41 44 4a 46 49 4c 45 3d | 24 28 53 48 4f 50 4c 49 |ADJFILE=|$(SHOPLI|
|000022d0| 42 5f 44 49 52 29 24 28 | 50 41 54 48 4e 41 4d 45 |B_DIR)$(|PATHNAME|
|000022e0| 5f 53 45 50 29 61 64 6a | 73 2e 64 61 74 0a 58 0a |_SEP)adj|s.dat.X.|
|000022f0| 58 52 41 57 4e 4f 55 4e | 46 49 4c 45 3d 24 28 52 |XRAWNOUN|FILE=$(R|
|00002300| 41 57 5f 46 49 4c 45 53 | 5f 44 49 52 29 24 28 50 |AW_FILES|_DIR)$(P|
|00002310| 41 54 48 4e 41 4d 45 5f | 53 45 50 29 6e 6f 75 6e |ATHNAME_|SEP)noun|
|00002320| 73 2e 72 61 77 0a 58 52 | 41 57 41 44 4a 46 49 4c |s.raw.XR|AWADJFIL|
|00002330| 45 3d 24 28 52 41 57 5f | 46 49 4c 45 53 5f 44 49 |E=$(RAW_|FILES_DI|
|00002340| 52 29 24 28 50 41 54 48 | 4e 41 4d 45 5f 53 45 50 |R)$(PATH|NAME_SEP|
|00002350| 29 61 64 6a 73 2e 72 61 | 77 0a 58 0a 58 69 6e 73 |)adjs.ra|w.X.Xins|
|00002360| 74 61 6c 6c 3a 20 6d 61 | 6b 65 64 69 72 73 20 6c |tall: ma|kedirs l|
|00002370| 69 73 74 73 20 73 68 6f | 70 20 0a 58 6d 61 6b 65 |ists sho|p .Xmake|
|00002380| 64 69 72 73 3a 0a 58 09 | 2d 24 28 4d 4b 44 49 52 |dirs:.X.|-$(MKDIR|
|00002390| 29 20 24 28 49 4e 53 54 | 41 4c 4c 5f 44 49 52 29 |) $(INST|ALL_DIR)|
|000023a0| 20 0a 58 09 2d 24 28 4d | 4b 44 49 52 29 20 24 28 | .X.-$(M|KDIR) $(|
|000023b0| 53 48 4f 50 4c 49 42 5f | 44 49 52 29 0a 58 09 2d |SHOPLIB_|DIR).X.-|
|000023c0| 24 28 54 4f 55 43 48 29 | 20 6d 61 6b 65 64 69 72 |$(TOUCH)| makedir|
|000023d0| 73 0a 58 6c 69 73 74 73 | 3a 20 24 28 52 41 57 4e |s.Xlists|: $(RAWN|
|000023e0| 4f 55 4e 46 49 4c 45 29 | 20 24 28 52 41 57 41 44 |OUNFILE)| $(RAWAD|
|000023f0| 4a 46 49 4c 45 29 0a 58 | 09 24 28 50 49 4e 44 45 |JFILE).X|.$(PINDE|
|00002400| 58 5f 44 49 52 29 24 28 | 50 41 54 48 4e 41 4d 45 |X_DIR)$(|PATHNAME|
|00002410| 5f 53 45 50 29 70 69 6e | 64 65 78 20 24 28 52 41 |_SEP)pin|dex $(RA|
|00002420| 57 41 44 4a 46 49 4c 45 | 29 20 24 28 41 44 4a 46 |WADJFILE|) $(ADJF|
|00002430| 49 4c 45 29 0a 58 09 24 | 28 50 49 4e 44 45 58 5f |ILE).X.$|(PINDEX_|
|00002440| 44 49 52 29 24 28 50 41 | 54 48 4e 41 4d 45 5f 53 |DIR)$(PA|THNAME_S|
|00002450| 45 50 29 70 69 6e 64 65 | 78 20 2d 32 20 24 28 52 |EP)pinde|x -2 $(R|
|00002460| 41 57 4e 4f 55 4e 46 49 | 4c 45 29 20 5c 0a 58 09 |AWNOUNFI|LE) \.X.|
|00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002490| 20 20 20 24 28 4e 4f 55 | 4e 46 49 4c 45 29 20 24 | $(NOU|NFILE) $|
|000024a0| 28 50 4c 55 52 41 4c 46 | 49 4c 45 29 0a 58 09 2d |(PLURALF|ILE).X.-|
|000024b0| 24 28 54 4f 55 43 48 29 | 20 6c 69 73 74 73 0a 58 |$(TOUCH)| lists.X|
|000024c0| 73 68 6f 70 3a 20 73 68 | 6f 70 2e 6f 20 63 61 70 |shop: sh|op.o cap|
|000024d0| 77 6f 72 64 73 2e 6f 20 | 67 65 74 63 6f 75 6e 74 |words.o |getcount|
|000024e0| 2e 6f 20 67 65 74 6e 74 | 68 2e 6f 20 5c 0a 58 20 |.o getnt|h.o \.X |
|000024f0| 20 20 20 20 20 67 65 74 | 69 74 65 6d 2e 6f 20 6d | get|item.o m|
|00002500| 79 5f 72 61 6e 64 2e 6f | 20 61 78 61 74 63 68 61 |y_rand.o| axatcha|
|00002510| 72 2e 6f 0a 58 09 24 28 | 43 43 29 20 24 28 4c 46 |r.o.X.$(|CC) $(LF|
|00002520| 4c 41 47 53 29 20 2d 6f | 20 73 68 6f 70 20 73 68 |LAGS) -o| shop sh|
|00002530| 6f 70 2e 6f 20 63 61 70 | 77 6f 72 64 73 2e 6f 20 |op.o cap|words.o |
|00002540| 67 65 74 63 6f 75 6e 74 | 2e 6f 20 5c 0a 58 09 09 |getcount|.o \.X..|
|00002550| 67 65 74 6e 74 68 2e 6f | 20 67 65 74 69 74 65 6d |getnth.o| getitem|
|00002560| 2e 6f 20 61 78 61 74 63 | 68 61 72 2e 6f 20 6d 79 |.o axatc|har.o my|
|00002570| 5f 72 61 6e 64 2e 6f 0a | 58 09 2d 24 28 43 4f 50 |_rand.o.|X.-$(COP|
|00002580| 59 29 20 73 68 6f 70 20 | 24 28 49 4e 53 54 41 4c |Y) shop |$(INSTAL|
|00002590| 4c 5f 44 49 52 29 0a 58 | 09 2d 24 28 45 58 45 43 |L_DIR).X|.-$(EXEC|
|000025a0| 41 42 4c 45 29 20 24 28 | 49 4e 53 54 41 4c 4c 5f |ABLE) $(|INSTALL_|
|000025b0| 44 49 52 29 24 28 50 41 | 54 48 4e 41 4d 45 5f 53 |DIR)$(PA|THNAME_S|
|000025c0| 45 50 29 73 68 6f 70 0a | 58 73 68 6f 70 2e 6f 3a |EP)shop.|Xshop.o:|
|000025d0| 20 73 68 6f 70 2e 63 20 | 73 68 6f 70 2e 68 0a 58 | shop.c |shop.h.X|
|000025e0| 09 24 28 43 43 29 20 24 | 28 43 46 4c 41 47 53 29 |.$(CC) $|(CFLAGS)|
|000025f0| 20 2d 63 20 73 68 6f 70 | 2e 63 20 2d 44 56 45 52 | -c shop|.c -DVER|
|00002600| 42 4f 53 45 5f 47 45 43 | 4f 53 3d 24 28 56 45 52 |BOSE_GEC|OS=$(VER|
|00002610| 42 4f 53 45 5f 47 45 43 | 4f 53 29 20 5c 0a 58 09 |BOSE_GEC|OS) \.X.|
|00002620| 2d 44 50 57 44 5f 53 55 | 50 50 4f 52 54 45 44 3d |-DPWD_SU|PPORTED=|
|00002630| 24 28 50 57 44 5f 53 55 | 50 50 4f 52 54 45 44 29 |$(PWD_SU|PPORTED)|
|00002640| 20 2d 44 44 45 46 41 55 | 4c 54 5f 4e 41 4d 45 3d | -DDEFAU|LT_NAME=|
|00002650| 5c 22 24 28 44 45 46 41 | 55 4c 54 5f 4e 41 4d 45 |\"$(DEFA|ULT_NAME|
|00002660| 29 5c 22 20 0a 58 63 61 | 70 77 6f 72 64 73 2e 6f |)\" .Xca|pwords.o|
|00002670| 3a 20 63 61 70 77 6f 72 | 64 73 2e 63 20 73 68 6f |: capwor|ds.c sho|
|00002680| 70 2e 68 0a 58 09 24 28 | 43 43 29 20 24 28 43 46 |p.h.X.$(|CC) $(CF|
|00002690| 4c 41 47 53 29 20 2d 63 | 20 63 61 70 77 6f 72 64 |LAGS) -c| capword|
|000026a0| 73 2e 63 20 5c 0a 58 09 | 2d 44 50 57 44 5f 53 55 |s.c \.X.|-DPWD_SU|
|000026b0| 50 50 4f 52 54 45 44 3d | 24 28 50 57 44 5f 53 55 |PPORTED=|$(PWD_SU|
|000026c0| 50 50 4f 52 54 45 44 29 | 0a 58 61 78 61 74 63 68 |PPORTED)|.Xaxatch|
|000026d0| 61 72 2e 6f 3a 20 61 78 | 61 74 63 68 61 72 2e 63 |ar.o: ax|atchar.c|
|000026e0| 0a 58 09 24 28 43 43 29 | 20 24 28 43 46 4c 41 47 |.X.$(CC)| $(CFLAG|
|000026f0| 53 29 20 2d 63 20 61 78 | 61 74 63 68 61 72 2e 63 |S) -c ax|atchar.c|
|00002700| 20 5c 0a 58 09 2d 44 47 | 45 43 4f 53 5f 44 45 4c | \.X.-DG|ECOS_DEL|
|00002710| 49 4d 49 54 45 52 53 3d | 5c 22 24 28 47 45 43 4f |IMITERS=|\"$(GECO|
|00002720| 53 5f 44 45 4c 49 4d 49 | 54 45 52 53 29 5c 22 20 |S_DELIMI|TERS)\" |
|00002730| 5c 0a 58 09 2d 44 50 57 | 44 5f 53 55 50 50 4f 52 |\.X.-DPW|D_SUPPOR|
|00002740| 54 45 44 3d 24 28 50 57 | 44 5f 53 55 50 50 4f 52 |TED=$(PW|D_SUPPOR|
|00002750| 54 45 44 29 0a 58 67 65 | 74 63 6f 75 6e 74 2e 6f |TED).Xge|tcount.o|
|00002760| 3a 20 67 65 74 63 6f 75 | 6e 74 2e 63 0a 58 09 24 |: getcou|nt.c.X.$|
|00002770| 28 43 43 29 20 24 28 43 | 46 4c 41 47 53 29 20 2d |(CC) $(C|FLAGS) -|
|00002780| 63 20 67 65 74 63 6f 75 | 6e 74 2e 63 0a 58 67 65 |c getcou|nt.c.Xge|
|00002790| 74 6e 74 68 2e 6f 3a 20 | 67 65 74 6e 74 68 2e 63 |tnth.o: |getnth.c|
|000027a0| 20 0a 58 09 24 28 43 43 | 29 20 24 28 43 46 4c 41 | .X.$(CC|) $(CFLA|
|000027b0| 47 53 29 20 2d 63 20 67 | 65 74 6e 74 68 2e 63 20 |GS) -c g|etnth.c |
|000027c0| 5c 0a 58 09 2d 44 4e 4f | 55 4e 5f 46 49 4c 45 3d |\.X.-DNO|UN_FILE=|
|000027d0| 5c 22 24 28 4e 4f 55 4e | 46 49 4c 45 29 5c 22 20 |\"$(NOUN|FILE)\" |
|000027e0| 5c 0a 58 09 2d 44 50 4c | 55 52 41 4c 5f 46 49 4c |\.X.-DPL|URAL_FIL|
|000027f0| 45 3d 5c 22 24 28 50 4c | 55 52 41 4c 46 49 4c 45 |E=\"$(PL|URALFILE|
|00002800| 29 5c 22 20 5c 0a 58 09 | 2d 44 41 44 4a 5f 46 49 |)\" \.X.|-DADJ_FI|
|00002810| 4c 45 3d 5c 22 24 28 41 | 44 4a 46 49 4c 45 29 5c |LE=\"$(A|DJFILE)\|
|00002820| 22 20 0a 58 67 65 74 69 | 74 65 6d 2e 6f 3a 20 67 |" .Xgeti|tem.o: g|
|00002830| 65 74 69 74 65 6d 2e 63 | 20 73 68 6f 70 2e 68 20 |etitem.c| shop.h |
|00002840| 0a 58 09 24 28 43 43 29 | 20 24 28 43 46 4c 41 47 |.X.$(CC)| $(CFLAG|
|00002850| 53 29 20 2d 63 20 67 65 | 74 69 74 65 6d 2e 63 20 |S) -c ge|titem.c |
|00002860| 5c 0a 58 09 2d 44 4e 4f | 55 4e 5f 46 49 4c 45 3d |\.X.-DNO|UN_FILE=|
|00002870| 5c 22 24 28 4e 4f 55 4e | 46 49 4c 45 29 5c 22 20 |\"$(NOUN|FILE)\" |
|00002880| 5c 0a 58 09 2d 44 50 4c | 55 52 41 4c 5f 46 49 4c |\.X.-DPL|URAL_FIL|
|00002890| 45 3d 5c 22 24 28 50 4c | 55 52 41 4c 46 49 4c 45 |E=\"$(PL|URALFILE|
|000028a0| 29 5c 22 20 5c 0a 58 09 | 2d 44 41 44 4a 5f 46 49 |)\" \.X.|-DADJ_FI|
|000028b0| 4c 45 3d 5c 22 24 28 41 | 44 4a 46 49 4c 45 29 5c |LE=\"$(A|DJFILE)\|
|000028c0| 22 20 0a 58 6d 79 5f 72 | 61 6e 64 2e 6f 3a 20 6d |" .Xmy_r|and.o: m|
|000028d0| 79 5f 72 61 6e 64 2e 63 | 0a 58 09 24 28 43 43 29 |y_rand.c|.X.$(CC)|
|000028e0| 20 24 28 43 46 4c 41 47 | 53 29 20 2d 63 20 6d 79 | $(CFLAG|S) -c my|
|000028f0| 5f 72 61 6e 64 2e 63 0a | 58 0a 58 23 20 52 43 53 |_rand.c.|X.X# RCS|
|00002900| 20 69 64 20 6f 66 20 74 | 68 69 73 20 6d 61 6b 65 | id of t|his make|
|00002910| 66 69 6c 65 20 69 73 20 | 24 57 68 61 74 3a 20 3c |file is |$What: <|
|00002920| 40 28 23 29 20 4d 61 6b | 65 66 69 6c 65 2c 76 09 |@(#) Mak|efile,v.|
|00002930| 32 2e 31 3e 20 24 2e 0a | 0a 45 4e 44 5f 4f 46 5f |2.1> $..|.END_OF_|
|00002940| 46 49 4c 45 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |FILE.ech|o shar: |
|00002950| 4e 45 57 4c 49 4e 45 20 | 61 70 70 65 6e 64 65 64 |NEWLINE |appended|
|00002960| 20 74 6f 20 5c 22 27 4d | 61 6b 65 66 69 6c 65 27 | to \"'M|akefile'|
|00002970| 5c 22 0a 69 66 20 74 65 | 73 74 20 35 31 36 35 20 |\".if te|st 5165 |
|00002980| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 4d 61 6b |-ne `wc |-c <'Mak|
|00002990| 65 66 69 6c 65 27 60 3b | 20 74 68 65 6e 0a 20 20 |efile'`;| then. |
|000029a0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|000029b0| 4d 61 6b 65 66 69 6c 65 | 27 5c 22 20 75 6e 70 61 |Makefile|'\" unpa|
|000029c0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|000029d0| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|000029e0| 66 20 27 4d 61 6b 65 66 | 69 6c 65 27 0a 66 69 0a |f 'Makef|ile'.fi.|
|000029f0| 69 66 20 74 65 73 74 20 | 2d 66 20 27 61 78 61 74 |if test |-f 'axat|
|00002a00| 63 68 61 72 2e 63 27 20 | 2d 61 20 22 24 7b 31 7d |char.c' |-a "${1}|
|00002a10| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00002a20| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00002a30| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00002a40| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00002a50| 27 61 78 61 74 63 68 61 | 72 2e 63 27 5c 22 0a 65 |'axatcha|r.c'\".e|
|00002a60| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00002a70| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 61 78 61 |xtractin|g \"'axa|
|00002a80| 74 63 68 61 72 2e 63 27 | 5c 22 20 5c 28 32 39 39 |tchar.c'|\" \(299|
|00002a90| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00002aa0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 61 78 61 |d "s/^X/|/" >'axa|
|00002ab0| 74 63 68 61 72 2e 63 27 | 20 3c 3c 27 45 4e 44 5f |tchar.c'| <<'END_|
|00002ac0| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 20 61 78 5f |OF_FILE'|.X/* ax_|
|00002ad0| 61 74 5f 63 68 61 72 2e | 63 20 0a 58 20 20 20 70 |at_char.|c .X p|
|00002ae0| 61 72 74 20 6f 66 20 74 | 68 65 20 73 68 6f 70 20 |art of t|he shop |
|00002af0| 70 61 63 6b 61 67 65 20 | 2a 2f 0a 58 0a 58 23 69 |package |*/.X.X#i|
|00002b00| 66 20 50 57 44 5f 53 55 | 50 50 4f 52 54 45 44 0a |f PWD_SU|PPORTED.|
|00002b10| 58 73 74 61 74 69 63 20 | 63 68 61 72 20 72 63 73 |Xstatic |char rcs|
|00002b20| 69 64 5b 5d 20 3d 20 22 | 24 57 68 61 74 3a 20 3c |id[] = "|$What: <|
|00002b30| 40 28 23 29 20 61 78 61 | 74 63 68 61 72 2e 63 2c |@(#) axa|tchar.c,|
|00002b40| 76 09 32 2e 31 3e 20 24 | 22 3b 0a 58 0a 58 23 69 |v.2.1> $|";.X.X#i|
|00002b50| 6e 63 6c 75 64 65 20 3c | 73 74 72 69 6e 67 2e 68 |nclude <|string.h|
|00002b60| 3e 0a 58 0a 58 63 68 61 | 72 20 2a 61 78 5f 61 74 |>.X.Xcha|r *ax_at|
|00002b70| 5f 63 68 61 72 28 62 75 | 66 66 29 0a 58 63 68 61 |_char(bu|ff).Xcha|
|00002b80| 72 20 2a 62 75 66 66 3b | 0a 58 7b 0a 58 09 63 68 |r *buff;|.X{.X.ch|
|00002b90| 61 72 20 2a 73 2c 20 2a | 73 74 72 70 62 72 6b 28 |ar *s, *|strpbrk(|
|00002ba0| 29 3b 0a 58 0a 58 09 69 | 66 20 28 28 73 20 3d 20 |);.X.X.i|f ((s = |
|00002bb0| 73 74 72 70 62 72 6b 28 | 62 75 66 66 2c 47 45 43 |strpbrk(|buff,GEC|
|00002bc0| 4f 53 5f 44 45 4c 49 4d | 49 54 45 52 53 29 29 20 |OS_DELIM|ITERS)) |
|00002bd0| 21 3d 20 4e 55 4c 4c 29 | 20 7b 0a 58 09 09 2a 73 |!= NULL)| {.X..*s|
|00002be0| 20 3d 20 27 5c 30 27 3b | 0a 58 09 7d 0a 58 09 72 | = '\0';|.X.}.X.r|
|00002bf0| 65 74 75 72 6e 20 62 75 | 66 66 3b 0a 58 7d 0a 58 |eturn bu|ff;.X}.X|
|00002c00| 23 65 6e 64 69 66 0a 0a | 45 4e 44 5f 4f 46 5f 46 |#endif..|END_OF_F|
|00002c10| 49 4c 45 0a 65 63 68 6f | 20 73 68 61 72 3a 20 4e |ILE.echo| shar: N|
|00002c20| 45 57 4c 49 4e 45 20 61 | 70 70 65 6e 64 65 64 20 |EWLINE a|ppended |
|00002c30| 74 6f 20 5c 22 27 61 78 | 61 74 63 68 61 72 2e 63 |to \"'ax|atchar.c|
|00002c40| 27 5c 22 0a 69 66 20 74 | 65 73 74 20 33 30 30 20 |'\".if t|est 300 |
|00002c50| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 61 78 61 |-ne `wc |-c <'axa|
|00002c60| 74 63 68 61 72 2e 63 27 | 60 3b 20 74 68 65 6e 0a |tchar.c'|`; then.|
|00002c70| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00002c80| 22 27 61 78 61 74 63 68 | 61 72 2e 63 27 5c 22 20 |"'axatch|ar.c'\" |
|00002c90| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00002ca0| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|00002cb0| 6e 64 20 6f 66 20 27 61 | 78 61 74 63 68 61 72 2e |nd of 'a|xatchar.|
|00002cc0| 63 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |c'.fi.if| test -f|
|00002cd0| 20 27 63 61 70 77 6f 72 | 64 73 2e 63 27 20 2d 61 | 'capwor|ds.c' -a|
|00002ce0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00002cf0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00002d00| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00002d10| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00002d20| 69 6c 65 20 5c 22 27 63 | 61 70 77 6f 72 64 73 2e |ile \"'c|apwords.|
|00002d30| 63 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |c'\".els|e.echo s|
|00002d40| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00002d50| 5c 22 27 63 61 70 77 6f | 72 64 73 2e 63 27 5c 22 |\"'capwo|rds.c'\"|
|00002d60| 20 5c 28 33 33 31 20 63 | 68 61 72 61 63 74 65 72 | \(331 c|haracter|
|00002d70| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00002d80| 20 3e 27 63 61 70 77 6f | 72 64 73 2e 63 27 20 3c | >'capwo|rds.c' <|
|00002d90| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00002da0| 23 69 6e 63 6c 75 64 65 | 20 3c 63 74 79 70 65 2e |#include| <ctype.|
|00002db0| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 73 68 |h>.X#inc|lude "sh|
|00002dc0| 6f 70 2e 68 22 0a 58 0a | 58 63 68 61 72 20 2a 63 |op.h".X.|Xchar *c|
|00002dd0| 61 70 5f 77 6f 72 64 73 | 28 62 75 66 66 29 0a 58 |ap_words|(buff).X|
|00002de0| 63 68 61 72 20 2a 62 75 | 66 66 3b 0a 58 7b 0a 58 |char *bu|ff;.X{.X|
|00002df0| 09 42 4f 4f 4c 45 41 4e | 20 63 61 70 6e 65 78 74 |.BOOLEAN| capnext|
|00002e00| 20 3d 20 54 52 55 45 3b | 0a 58 09 63 68 61 72 20 | = TRUE;|.X.char |
|00002e10| 2a 73 3b 0a 58 0a 58 09 | 73 20 3d 20 62 75 66 66 |*s;.X.X.|s = buff|
|00002e20| 3b 0a 58 0a 58 09 77 68 | 69 6c 65 20 28 2a 73 29 |;.X.X.wh|ile (*s)|
|00002e30| 20 7b 0a 58 09 09 69 66 | 20 28 69 73 61 6c 70 68 | {.X..if| (isalph|
|00002e40| 61 28 2a 73 29 29 20 7b | 0a 58 09 09 09 69 66 20 |a(*s)) {|.X...if |
|00002e50| 28 63 61 70 6e 65 78 74 | 29 20 7b 0a 58 09 09 09 |(capnext|) {.X...|
|00002e60| 09 2a 73 20 3d 20 74 6f | 75 70 70 65 72 28 2a 73 |.*s = to|upper(*s|
|00002e70| 29 3b 0a 58 09 09 09 7d | 0a 58 09 09 09 63 61 70 |);.X...}|.X...cap|
|00002e80| 6e 65 78 74 20 3d 20 46 | 41 4c 53 45 3b 0a 58 09 |next = F|ALSE;.X.|
|00002e90| 09 7d 20 65 6c 73 65 20 | 69 66 20 28 69 73 73 70 |.} else |if (issp|
|00002ea0| 61 63 65 28 2a 73 29 29 | 20 7b 0a 58 09 09 09 63 |ace(*s))| {.X...c|
|00002eb0| 61 70 6e 65 78 74 20 3d | 20 54 52 55 45 3b 0a 58 |apnext =| TRUE;.X|
|00002ec0| 09 09 7d 20 65 6c 73 65 | 20 7b 0a 58 09 09 09 63 |..} else| {.X...c|
|00002ed0| 61 70 6e 65 78 74 20 3d | 20 46 41 4c 53 45 3b 0a |apnext =| FALSE;.|
|00002ee0| 58 09 09 7d 0a 58 09 09 | 2b 2b 73 3b 0a 58 09 7d |X..}.X..|++s;.X.}|
|00002ef0| 0a 58 0a 58 09 72 65 74 | 75 72 6e 20 62 75 66 66 |.X.X.ret|urn buff|
|00002f00| 3b 0a 58 7d 0a 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |;.X}..EN|D_OF_FIL|
|00002f10| 45 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 4e 45 57 |E.echo s|har: NEW|
|00002f20| 4c 49 4e 45 20 61 70 70 | 65 6e 64 65 64 20 74 6f |LINE app|ended to|
|00002f30| 20 5c 22 27 63 61 70 77 | 6f 72 64 73 2e 63 27 5c | \"'capw|ords.c'\|
|00002f40| 22 0a 69 66 20 74 65 73 | 74 20 33 33 32 20 2d 6e |".if tes|t 332 -n|
|00002f50| 65 20 60 77 63 20 2d 63 | 20 3c 27 63 61 70 77 6f |e `wc -c| <'capwo|
|00002f60| 72 64 73 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |rds.c'`;| then. |
|00002f70| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00002f80| 63 61 70 77 6f 72 64 73 | 2e 63 27 5c 22 20 75 6e |capwords|.c'\" un|
|00002f90| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00002fa0| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00002fb0| 20 6f 66 20 27 63 61 70 | 77 6f 72 64 73 2e 63 27 | of 'cap|words.c'|
|00002fc0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00002fd0| 67 65 74 63 6f 75 6e 74 | 2e 63 27 20 2d 61 20 22 |getcount|.c' -a "|
|00002fe0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00002ff0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00003000| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00003010| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|00003020| 65 20 5c 22 27 67 65 74 | 63 6f 75 6e 74 2e 63 27 |e \"'get|count.c'|
|00003030| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00003040| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00003050| 27 67 65 74 63 6f 75 6e | 74 2e 63 27 5c 22 20 5c |'getcoun|t.c'\" \|
|00003060| 28 34 30 34 20 63 68 61 | 72 61 63 74 65 72 73 5c |(404 cha|racters\|
|00003070| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00003080| 27 67 65 74 63 6f 75 6e | 74 2e 63 27 20 3c 3c 27 |'getcoun|t.c' <<'|
|00003090| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2f 2a |END_OF_F|ILE'.X/*|
|000030a0| 0a 58 20 2a 20 67 65 74 | 5f 63 6f 75 6e 74 2e 63 |.X * get|_count.c|
|000030b0| 20 20 42 72 69 61 6e 20 | 52 69 63 65 20 20 72 69 | Brian |Rice ri|
|000030c0| 63 65 40 64 67 2d 72 74 | 70 2e 64 67 2e 63 6f 6d |ce@dg-rt|p.dg.com|
|000030d0| 20 20 31 39 38 39 0a 58 | 20 2a 20 54 68 69 73 20 | 1989.X| * This |
|000030e0| 72 6f 75 74 69 6e 65 20 | 69 73 20 70 61 72 74 20 |routine |is part |
|000030f0| 6f 66 20 74 68 65 20 73 | 68 6f 70 20 70 61 63 6b |of the s|hop pack|
|00003100| 61 67 65 2e 0a 58 20 2a | 20 49 74 20 74 61 6b 65 |age..X *| It take|
|00003110| 73 20 61 64 76 61 6e 74 | 61 67 65 20 6f 66 20 74 |s advant|age of t|
|00003120| 68 65 20 66 61 63 74 20 | 74 68 61 74 20 74 68 65 |he fact |that the|
|00003130| 20 66 69 72 73 74 20 73 | 69 7a 65 6f 66 28 6c 6f | first s|izeof(lo|
|00003140| 6e 67 29 20 62 79 74 65 | 73 0a 58 20 2a 20 69 6e |ng) byte|s.X * in|
|00003150| 20 74 68 65 20 66 69 6c | 65 20 6e 61 6d 65 64 20 | the fil|e named |
|00003160| 62 79 20 66 20 61 72 65 | 20 61 20 6c 6f 6e 67 20 |by f are| a long |
|00003170| 77 68 69 63 68 20 67 69 | 76 65 73 20 74 68 65 20 |which gi|ves the |
|00003180| 6e 75 6d 62 65 72 20 6f | 66 0a 58 20 2a 20 69 74 |number o|f.X * it|
|00003190| 65 6d 73 20 69 6e 20 74 | 68 61 74 20 66 69 6c 65 |ems in t|hat file|
|000031a0| 2e 0a 58 20 2a 2f 0a 58 | 23 69 6e 63 6c 75 64 65 |..X */.X|#include|
|000031b0| 20 3c 73 74 64 69 6f 2e | 68 3e 0a 58 0a 58 6c 6f | <stdio.|h>.X.Xlo|
|000031c0| 6e 67 20 69 6e 74 20 67 | 65 74 5f 63 6f 75 6e 74 |ng int g|et_count|
|000031d0| 28 66 29 0a 58 46 49 4c | 45 20 2a 66 3b 0a 58 7b |(f).XFIL|E *f;.X{|
|000031e0| 0a 58 09 6c 6f 6e 67 20 | 69 6e 74 20 63 20 3d 20 |.X.long |int c = |
|000031f0| 30 4c 3b 0a 58 0a 58 20 | 20 20 20 20 20 20 20 72 |0L;.X.X | r|
|00003200| 65 77 69 6e 64 28 66 29 | 3b 0a 58 09 28 76 6f 69 |ewind(f)|;.X.(voi|
|00003210| 64 29 20 66 72 65 61 64 | 28 26 63 2c 73 69 7a 65 |d) fread|(&c,size|
|00003220| 6f 66 20 63 2c 31 2c 66 | 29 3b 0a 58 0a 58 20 20 |of c,1,f|);.X.X |
|00003230| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 63 3b 0a | re|turn c;.|
|00003240| 58 7d 0a 58 0a 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |X}.X..EN|D_OF_FIL|
|00003250| 45 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 4e 45 57 |E.echo s|har: NEW|
|00003260| 4c 49 4e 45 20 61 70 70 | 65 6e 64 65 64 20 74 6f |LINE app|ended to|
|00003270| 20 5c 22 27 67 65 74 63 | 6f 75 6e 74 2e 63 27 5c | \"'getc|ount.c'\|
|00003280| 22 0a 69 66 20 74 65 73 | 74 20 34 30 35 20 2d 6e |".if tes|t 405 -n|
|00003290| 65 20 60 77 63 20 2d 63 | 20 3c 27 67 65 74 63 6f |e `wc -c| <'getco|
|000032a0| 75 6e 74 2e 63 27 60 3b | 20 74 68 65 6e 0a 20 20 |unt.c'`;| then. |
|000032b0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|000032c0| 67 65 74 63 6f 75 6e 74 | 2e 63 27 5c 22 20 75 6e |getcount|.c'\" un|
|000032d0| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|000032e0| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|000032f0| 20 6f 66 20 27 67 65 74 | 63 6f 75 6e 74 2e 63 27 | of 'get|count.c'|
|00003300| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00003310| 67 65 74 6e 74 68 2e 63 | 27 20 2d 61 20 22 24 7b |getnth.c|' -a "${|
|00003320| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00003330| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00003340| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00003350| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00003360| 5c 22 27 67 65 74 6e 74 | 68 2e 63 27 5c 22 0a 65 |\"'getnt|h.c'\".e|
|00003370| 6c 73 65 0a 65 63 68 6f | 20 73 68 61 72 3a 20 45 |lse.echo| shar: E|
|00003380| 78 74 72 61 63 74 69 6e | 67 20 5c 22 27 67 65 74 |xtractin|g \"'get|
|00003390| 6e 74 68 2e 63 27 5c 22 | 20 5c 28 37 37 37 20 63 |nth.c'\"| \(777 c|
|000033a0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|000033b0| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 67 65 74 6e 74 |"s/^X//"| >'getnt|
|000033c0| 68 2e 63 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |h.c' <<'|END_OF_F|
|000033d0| 49 4c 45 27 0a 58 2f 2a | 0a 58 20 2a 20 67 65 74 |ILE'.X/*|.X * get|
|000033e0| 5f 6e 74 68 5f 73 74 72 | 69 6e 67 2e 63 20 20 42 |_nth_str|ing.c B|
|000033f0| 72 69 61 6e 20 52 69 63 | 65 20 20 72 69 63 65 40 |rian Ric|e rice@|
|00003400| 64 67 2d 72 74 70 2e 64 | 67 2e 63 6f 6d 20 20 31 |dg-rtp.d|g.com 1|
|00003410| 39 38 39 0a 58 20 2a 20 | 54 68 69 73 20 72 6f 75 |989.X * |This rou|
|00003420| 74 69 6e 65 20 69 73 20 | 70 61 72 74 20 6f 66 20 |tine is |part of |
|00003430| 74 68 65 20 73 68 6f 70 | 20 70 61 63 6b 61 67 65 |the shop| package|
|00003440| 2e 0a 58 20 2a 20 49 74 | 20 74 61 6b 65 73 20 61 |..X * It| takes a|
|00003450| 64 76 61 6e 74 61 67 65 | 20 6f 66 20 74 68 65 20 |dvantage| of the |
|00003460| 66 61 63 74 20 74 68 61 | 74 20 74 68 65 20 66 69 |fact tha|t the fi|
|00003470| 72 73 74 20 73 69 7a 65 | 6f 66 28 6c 6f 6e 67 29 |rst size|of(long)|
|00003480| 20 62 79 74 65 73 0a 58 | 20 2a 20 69 6e 20 74 68 | bytes.X| * in th|
|00003490| 65 20 66 69 6c 65 20 6e | 61 6d 65 64 20 62 79 20 |e file n|amed by |
|000034a0| 66 20 61 72 65 20 61 20 | 6c 6f 6e 67 20 77 68 69 |f are a |long whi|
|000034b0| 63 68 20 67 69 76 65 73 | 20 74 68 65 20 6e 75 6d |ch gives| the num|
|000034c0| 62 65 72 20 6f 66 0a 58 | 20 2a 20 69 74 65 6d 73 |ber of.X| * items|
|000034d0| 20 69 6e 20 74 68 61 74 | 20 66 69 6c 65 2e 0a 58 | in that| file..X|
|000034e0| 20 2a 2f 0a 58 0a 58 23 | 69 6e 63 6c 75 64 65 20 | */.X.X#|include |
|000034f0| 3c 73 74 64 69 6f 2e 68 | 3e 0a 58 23 69 6e 63 6c |<stdio.h|>.X#incl|
|00003500| 75 64 65 20 22 73 68 6f | 70 2e 68 22 0a 58 0a 58 |ude "sho|p.h".X.X|
|00003510| 63 68 61 72 20 2a 67 65 | 74 5f 6e 74 68 5f 73 74 |char *ge|t_nth_st|
|00003520| 72 69 6e 67 28 66 2c 6e | 2c 62 75 66 66 2c 6c 29 |ring(f,n|,buff,l)|
|00003530| 0a 58 46 49 4c 45 20 2a | 66 3b 0a 58 6c 6f 6e 67 |.XFILE *|f;.Xlong|
|00003540| 20 69 6e 74 20 6e 3b 0a | 58 63 68 61 72 20 2a 62 | int n;.|Xchar *b|
|00003550| 75 66 66 3b 20 0a 58 69 | 6e 74 20 6c 3b 20 0a 58 |uff; .Xi|nt l; .X|
|00003560| 7b 20 0a 58 09 6c 6f 6e | 67 20 69 6e 74 20 62 65 |{ .X.lon|g int be|
|00003570| 67 69 6e 5f 6c 6f 63 2c | 20 65 6e 64 5f 6c 6f 63 |gin_loc,| end_loc|
|00003580| 3b 0a 58 09 69 6e 74 20 | 73 5f 6c 65 6e 67 74 68 |;.X.int |s_length|
|00003590| 3b 0a 58 0a 58 09 28 76 | 6f 69 64 29 20 66 73 65 |;.X.X.(v|oid) fse|
|000035a0| 65 6b 28 66 2c 6e 2a 42 | 59 54 45 5f 43 4f 55 4e |ek(f,n*B|YTE_COUN|
|000035b0| 54 5f 53 49 5a 45 2b 49 | 54 45 4d 5f 43 4f 55 4e |T_SIZE+I|TEM_COUN|
|000035c0| 54 5f 53 49 5a 45 2c 30 | 29 3b 0a 58 09 28 76 6f |T_SIZE,0|);.X.(vo|
|000035d0| 69 64 29 20 66 72 65 61 | 64 28 26 62 65 67 69 6e |id) frea|d(&begin|
|000035e0| 5f 6c 6f 63 2c 73 69 7a | 65 6f 66 20 62 65 67 69 |_loc,siz|eof begi|
|000035f0| 6e 5f 6c 6f 63 2c 31 2c | 66 29 3b 0a 58 09 28 76 |n_loc,1,|f);.X.(v|
|00003600| 6f 69 64 29 20 66 72 65 | 61 64 28 26 65 6e 64 5f |oid) fre|ad(&end_|
|00003610| 6c 6f 63 2c 73 69 7a 65 | 6f 66 20 65 6e 64 5f 6c |loc,size|of end_l|
|00003620| 6f 63 2c 31 2c 66 29 3b | 0a 58 0a 58 09 73 5f 6c |oc,1,f);|.X.X.s_l|
|00003630| 65 6e 67 74 68 20 3d 20 | 65 6e 64 5f 6c 6f 63 20 |ength = |end_loc |
|00003640| 2d 20 62 65 67 69 6e 5f | 6c 6f 63 3b 0a 58 0a 58 |- begin_|loc;.X.X|
|00003650| 09 69 66 20 28 73 5f 6c | 65 6e 67 74 68 20 3e 20 |.if (s_l|ength > |
|00003660| 6c 20 2d 20 31 29 0a 58 | 09 09 73 5f 6c 65 6e 67 |l - 1).X|..s_leng|
|00003670| 74 68 20 3d 20 6c 20 2d | 20 31 3b 0a 58 0a 58 09 |th = l -| 1;.X.X.|
|00003680| 28 76 6f 69 64 29 20 66 | 73 65 65 6b 28 66 2c 62 |(void) f|seek(f,b|
|00003690| 65 67 69 6e 5f 6c 6f 63 | 2c 30 29 3b 0a 58 0a 58 |egin_loc|,0);.X.X|
|000036a0| 09 28 76 6f 69 64 29 20 | 66 72 65 61 64 28 62 75 |.(void) |fread(bu|
|000036b0| 66 66 2c 73 69 7a 65 6f | 66 28 63 68 61 72 29 2c |ff,sizeo|f(char),|
|000036c0| 73 5f 6c 65 6e 67 74 68 | 2c 66 29 3b 0a 58 0a 58 |s_length|,f);.X.X|
|000036d0| 20 20 20 20 20 20 20 20 | 62 75 66 66 5b 73 5f 6c | |buff[s_l|
|000036e0| 65 6e 67 74 68 5d 20 3d | 20 27 5c 30 27 3b 0a 58 |ength] =| '\0';.X|
|000036f0| 0a 58 09 72 65 74 75 72 | 6e 20 62 75 66 66 3b 0a |.X.retur|n buff;.|
|00003700| 58 7d 0a 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |X}..END_|OF_FILE.|
|00003710| 65 63 68 6f 20 73 68 61 | 72 3a 20 4e 45 57 4c 49 |echo sha|r: NEWLI|
|00003720| 4e 45 20 61 70 70 65 6e | 64 65 64 20 74 6f 20 5c |NE appen|ded to \|
|00003730| 22 27 67 65 74 6e 74 68 | 2e 63 27 5c 22 0a 69 66 |"'getnth|.c'\".if|
|00003740| 20 74 65 73 74 20 37 37 | 38 20 2d 6e 65 20 60 77 | test 77|8 -ne `w|
|00003750| 63 20 2d 63 20 3c 27 67 | 65 74 6e 74 68 2e 63 27 |c -c <'g|etnth.c'|
|00003760| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00003770| 20 73 68 61 72 3a 20 5c | 22 27 67 65 74 6e 74 68 | shar: \|"'getnth|
|00003780| 2e 63 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |.c'\" un|packed w|
|00003790| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|000037a0| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 67 65 74 |fi.# end| of 'get|
|000037b0| 6e 74 68 2e 63 27 0a 66 | 69 0a 69 66 20 74 65 73 |nth.c'.f|i.if tes|
|000037c0| 74 20 2d 66 20 27 67 65 | 74 69 74 65 6d 2e 63 27 |t -f 'ge|titem.c'|
|000037d0| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000037e0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000037f0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|00003800| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|00003810| 67 20 66 69 6c 65 20 5c | 22 27 67 65 74 69 74 65 |g file \|"'getite|
|00003820| 6d 2e 63 27 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |m.c'\".e|lse.echo|
|00003830| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00003840| 67 20 5c 22 27 67 65 74 | 69 74 65 6d 2e 63 27 5c |g \"'get|item.c'\|
|00003850| 22 20 5c 28 32 39 33 36 | 20 63 68 61 72 61 63 74 |" \(2936| charact|
|00003860| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00003870| 2f 22 20 3e 27 67 65 74 | 69 74 65 6d 2e 63 27 20 |/" >'get|item.c' |
|00003880| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00003890| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |X#includ|e <stdio|
|000038a0| 2e 68 3e 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 73 |.h>.X#in|clude <s|
|000038b0| 74 72 69 6e 67 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |tring.h>|.X#inclu|
|000038c0| 64 65 20 3c 73 79 73 2f | 74 79 70 65 73 2e 68 3e |de <sys/|types.h>|
|000038d0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 73 68 6f 70 |.X#inclu|de "shop|
|000038e0| 2e 68 22 0a 58 0a 58 73 | 74 61 74 69 63 20 46 49 |.h".X.Xs|tatic FI|
|000038f0| 4c 45 20 2a 6e 6f 75 6e | 66 69 6c 65 2c 20 2a 70 |LE *noun|file, *p|
|00003900| 6c 75 72 61 6c 66 69 6c | 65 2c 20 2a 61 64 6a 66 |luralfil|e, *adjf|
|00003910| 69 6c 65 3b 0a 58 73 74 | 61 74 69 63 20 69 6e 74 |ile;.Xst|atic int|
|00003920| 20 66 69 6c 65 73 5f 6f | 70 65 6e 65 64 20 3d 20 | files_o|pened = |
|00003930| 46 41 4c 53 45 3b 0a 58 | 73 74 61 74 69 63 20 6c |FALSE;.X|static l|
|00003940| 6f 6e 67 20 69 6e 74 20 | 6e 75 6d 62 65 72 5f 6f |ong int |number_o|
|00003950| 66 5f 6e 6f 75 6e 73 20 | 3d 20 2d 31 4c 3b 0a 58 |f_nouns |= -1L;.X|
|00003960| 73 74 61 74 69 63 20 6c | 6f 6e 67 20 69 6e 74 20 |static l|ong int |
|00003970| 6e 75 6d 62 65 72 5f 6f | 66 5f 70 6c 75 72 61 6c |number_o|f_plural|
|00003980| 73 20 3d 20 2d 31 4c 3b | 0a 58 73 74 61 74 69 63 |s = -1L;|.Xstatic|
|00003990| 20 6c 6f 6e 67 20 69 6e | 74 20 6e 75 6d 62 65 72 | long in|t number|
|000039a0| 5f 6f 66 5f 61 64 6a 73 | 20 3d 20 2d 31 4c 3b 0a |_of_adjs| = -1L;.|
|000039b0| 58 0a 58 65 78 74 65 72 | 6e 20 63 68 61 72 20 2a |X.Xexter|n char *|
|000039c0| 63 6d 64 6e 61 6d 65 3b | 0a 58 0a 58 63 68 61 72 |cmdname;|.X.Xchar|
|000039d0| 20 2a 67 65 74 69 74 65 | 6d 28 62 75 66 66 29 0a | *getite|m(buff).|
|000039e0| 58 63 68 61 72 20 2a 62 | 75 66 66 3b 0a 58 7b 0a |Xchar *b|uff;.X{.|
|000039f0| 58 20 20 20 20 20 20 20 | 20 6c 6f 6e 67 20 69 6e |X | long in|
|00003a00| 74 20 6d 79 5f 72 61 6e | 64 28 29 3b 0a 58 0a 58 |t my_ran|d();.X.X|
|00003a10| 20 20 20 20 20 20 20 20 | 6c 6f 6e 67 20 69 6e 74 | |long int|
|00003a20| 20 77 68 69 63 68 5f 6e | 6f 75 6e 31 20 3d 20 30 | which_n|oun1 = 0|
|00003a30| 4c 3b 0a 58 20 20 20 20 | 20 20 20 20 6c 6f 6e 67 |L;.X | long|
|00003a40| 20 69 6e 74 20 77 68 69 | 63 68 5f 6e 6f 75 6e 32 | int whi|ch_noun2|
|00003a50| 20 3d 20 30 4c 3b 0a 58 | 20 20 20 20 20 20 20 20 | = 0L;.X| |
|00003a60| 6c 6f 6e 67 20 69 6e 74 | 20 77 68 69 63 68 5f 61 |long int| which_a|
|00003a70| 64 6a 31 20 3d 20 30 4c | 3b 0a 58 20 20 20 20 20 |dj1 = 0L|;.X |
|00003a80| 20 20 20 6c 6f 6e 67 20 | 69 6e 74 20 77 68 69 63 | long |int whic|
|00003a90| 68 5f 61 64 6a 32 20 3d | 20 30 4c 3b 0a 58 0a 58 |h_adj2 =| 0L;.X.X|
|00003aa0| 20 20 20 20 20 20 20 20 | 63 68 61 72 20 61 64 6a | |char adj|
|00003ab0| 31 5b 4d 41 58 5f 57 4f | 52 44 5f 4c 45 4e 5d 2c |1[MAX_WO|RD_LEN],|
|00003ac0| 20 61 64 6a 32 5b 4d 41 | 58 5f 57 4f 52 44 5f 4c | adj2[MA|X_WORD_L|
|00003ad0| 45 4e 5d 2c 20 0a 58 09 | 20 20 20 6e 6f 75 6e 31 |EN], .X.| noun1|
|00003ae0| 5b 4d 41 58 5f 57 4f 52 | 44 5f 4c 45 4e 5d 2c 20 |[MAX_WOR|D_LEN], |
|00003af0| 6e 6f 75 6e 32 5b 4d 41 | 58 5f 57 4f 52 44 5f 4c |noun2[MA|X_WORD_L|
|00003b00| 45 4e 5d 3b 0a 58 09 63 | 68 61 72 20 2a 67 65 74 |EN];.X.c|har *get|
|00003b10| 5f 6e 74 68 5f 73 74 72 | 69 6e 67 28 29 3b 0a 58 |_nth_str|ing();.X|
|00003b20| 09 6c 6f 6e 67 20 69 6e | 74 20 67 65 74 5f 63 6f |.long in|t get_co|
|00003b30| 75 6e 74 28 29 3b 0a 58 | 0a 58 09 69 66 20 28 21 |unt();.X|.X.if (!|
|00003b40| 66 69 6c 65 73 5f 6f 70 | 65 6e 65 64 29 20 7b 0a |files_op|ened) {.|
|00003b50| 58 09 09 6e 6f 75 6e 66 | 69 6c 65 20 3d 20 66 6f |X..nounf|ile = fo|
|00003b60| 70 65 6e 28 4e 4f 55 4e | 5f 46 49 4c 45 2c 22 72 |pen(NOUN|_FILE,"r|
|00003b70| 22 29 3b 0a 58 20 20 20 | 20 20 20 20 20 09 69 66 |");.X | .if|
|00003b80| 20 28 6e 6f 75 6e 66 69 | 6c 65 20 3d 3d 20 4e 55 | (nounfi|le == NU|
|00003b90| 4c 4c 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |LL) {.X | |
|00003ba0| 20 20 20 20 20 20 20 09 | 28 76 6f 69 64 29 20 66 | .|(void) f|
|00003bb0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 0a 58 |printf(s|tderr,.X|
|00003bc0| 09 09 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|00003bd0| 20 20 22 25 73 3a 20 63 | 6f 75 6c 64 6e 27 74 20 | "%s: c|ouldn't |
|00003be0| 6f 70 65 6e 20 6e 6f 75 | 6e 20 66 69 6c 65 2e 5c |open nou|n file.\|
|00003bf0| 6e 22 2c 0a 58 09 09 09 | 20 20 20 20 20 20 20 20 |n",.X...| |
|00003c00| 20 20 20 20 20 20 20 63 | 6d 64 6e 61 6d 65 29 3b | c|mdname);|
|00003c10| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003c20| 20 20 09 65 78 69 74 28 | 31 29 3b 0a 58 20 20 20 | .exit(|1);.X |
|00003c30| 20 20 20 20 20 09 7d 0a | 58 20 0a 58 20 20 20 20 | .}.|X .X |
|00003c40| 20 20 20 20 09 70 6c 75 | 72 61 6c 66 69 6c 65 20 | .plu|ralfile |
|00003c50| 3d 20 66 6f 70 65 6e 28 | 50 4c 55 52 41 4c 5f 46 |= fopen(|PLURAL_F|
|00003c60| 49 4c 45 2c 22 72 22 29 | 3b 0a 58 20 20 20 20 20 |ILE,"r")|;.X |
|00003c70| 20 20 20 09 69 66 20 28 | 70 6c 75 72 61 6c 66 69 | .if (|pluralfi|
|00003c80| 6c 65 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 0a 58 09 |le == NU|LL) {.X.|
|00003c90| 09 09 28 76 6f 69 64 29 | 20 66 70 72 69 6e 74 66 |..(void)| fprintf|
|00003ca0| 28 73 74 64 65 72 72 2c | 0a 58 09 09 09 20 20 20 |(stderr,|.X... |
|00003cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 25 73 3a | | "%s:|
|00003cc0| 20 63 6f 75 6c 64 6e 27 | 74 20 6f 70 65 6e 20 70 | couldn'|t open p|
|00003cd0| 6c 75 72 61 6c 20 66 69 | 6c 65 2e 5c 6e 22 2c 0a |lural fi|le.\n",.|
|00003ce0| 58 09 09 09 20 20 20 20 | 20 20 20 20 20 20 20 20 |X... | |
|00003cf0| 20 20 20 63 6d 64 6e 61 | 6d 65 29 3b 0a 58 20 20 | cmdna|me);.X |
|00003d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 09 65 | | .e|
|00003d10| 78 69 74 28 31 29 3b 0a | 58 20 20 20 20 20 20 20 |xit(1);.|X |
|00003d20| 20 09 7d 0a 58 20 0a 58 | 20 20 20 20 20 20 20 20 | .}.X .X| |
|00003d30| 09 61 64 6a 66 69 6c 65 | 20 3d 20 66 6f 70 65 6e |.adjfile| = fopen|
|00003d40| 28 41 44 4a 5f 46 49 4c | 45 2c 22 72 22 29 3b 0a |(ADJ_FIL|E,"r");.|
|00003d50| 58 20 20 20 20 20 20 20 | 20 09 69 66 20 28 61 64 |X | .if (ad|
|00003d60| 6a 66 69 6c 65 20 3d 3d | 20 4e 55 4c 4c 29 20 7b |jfile ==| NULL) {|
|00003d70| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003d80| 20 20 09 28 76 6f 69 64 | 29 20 66 70 72 69 6e 74 | .(void|) fprint|
|00003d90| 66 28 73 74 64 65 72 72 | 2c 0a 58 09 09 09 20 20 |f(stderr|,.X... |
|00003da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 25 73 | | "%s|
|00003db0| 3a 20 63 6f 75 6c 64 6e | 27 74 20 6f 70 65 6e 20 |: couldn|'t open |
|00003dc0| 61 64 6a 65 63 74 69 76 | 65 20 66 69 6c 65 2e 5c |adjectiv|e file.\|
|00003dd0| 6e 22 2c 0a 58 09 09 09 | 09 09 63 6d 64 6e 61 6d |n",.X...|..cmdnam|
|00003de0| 65 29 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |e);.X | |
|00003df0| 20 20 20 20 20 09 65 78 | 69 74 28 31 29 3b 0a 58 | .ex|it(1);.X|
|00003e00| 20 20 20 20 20 20 20 20 | 09 7d 0a 58 09 09 66 69 | |.}.X..fi|
|00003e10| 6c 65 73 5f 6f 70 65 6e | 65 64 20 3d 20 54 52 55 |les_open|ed = TRU|
|00003e20| 45 3b 0a 58 09 7d 0a 58 | 20 0a 58 09 69 66 20 28 |E;.X.}.X| .X.if (|
|00003e30| 6e 75 6d 62 65 72 5f 6f | 66 5f 6e 6f 75 6e 73 20 |number_o|f_nouns |
|00003e40| 3c 20 30 29 20 7b 0a 58 | 09 09 6e 75 6d 62 65 72 |< 0) {.X|..number|
|00003e50| 5f 6f 66 5f 61 64 6a 73 | 20 3d 20 67 65 74 5f 63 |_of_adjs| = get_c|
|00003e60| 6f 75 6e 74 28 61 64 6a | 66 69 6c 65 29 3b 0a 58 |ount(adj|file);.X|
|00003e70| 20 20 20 20 20 20 20 20 | 09 6e 75 6d 62 65 72 5f | |.number_|
|00003e80| 6f 66 5f 6e 6f 75 6e 73 | 20 3d 20 67 65 74 5f 63 |of_nouns| = get_c|
|00003e90| 6f 75 6e 74 28 6e 6f 75 | 6e 66 69 6c 65 29 3b 0a |ount(nou|nfile);.|
|00003ea0| 58 20 20 20 20 20 20 20 | 20 09 6e 75 6d 62 65 72 |X | .number|
|00003eb0| 5f 6f 66 5f 70 6c 75 72 | 61 6c 73 20 3d 20 67 65 |_of_plur|als = ge|
|00003ec0| 74 5f 63 6f 75 6e 74 28 | 70 6c 75 72 61 6c 66 69 |t_count(|pluralfi|
|00003ed0| 6c 65 29 3b 0a 58 20 20 | 20 20 20 20 20 20 09 69 |le);.X | .i|
|00003ee0| 66 20 28 6e 75 6d 62 65 | 72 5f 6f 66 5f 70 6c 75 |f (numbe|r_of_plu|
|00003ef0| 72 61 6c 73 20 21 3d 20 | 6e 75 6d 62 65 72 5f 6f |rals != |number_o|
|00003f00| 66 5f 6e 6f 75 6e 73 29 | 20 7b 0a 58 20 20 20 20 |f_nouns)| {.X |
|00003f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 09 28 76 6f | | .(vo|
|00003f20| 69 64 29 20 66 70 72 69 | 6e 74 66 28 73 74 64 65 |id) fpri|ntf(stde|
|00003f30| 72 72 2c 0a 58 09 22 25 | 73 3a 20 70 6c 75 72 61 |rr,.X."%|s: plura|
|00003f40| 6c 20 66 69 6c 65 20 68 | 61 73 20 25 64 20 65 6c |l file h|as %d el|
|00003f50| 65 6d 65 6e 74 73 3b 20 | 6e 6f 75 6e 20 66 69 6c |ements; |noun fil|
|00003f60| 65 2c 20 25 64 5c 6e 22 | 2c 0a 58 20 20 20 20 20 |e, %d\n"|,.X |
|00003f70| 20 20 20 63 6d 64 6e 61 | 6d 65 2c 6e 75 6d 62 65 | cmdna|me,numbe|
|00003f80| 72 5f 6f 66 5f 70 6c 75 | 72 61 6c 73 2c 20 6e 75 |r_of_plu|rals, nu|
|00003f90| 6d 62 65 72 5f 6f 66 5f | 6e 6f 75 6e 73 29 3b 0a |mber_of_|nouns);.|
|00003fa0| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003fb0| 20 09 65 78 69 74 28 31 | 29 3b 0a 58 20 20 20 20 | .exit(1|);.X |
|00003fc0| 20 20 20 20 09 7d 0a 58 | 09 7d 0a 58 0a 58 20 20 | .}.X|.}.X.X |
|00003fd0| 20 20 20 20 20 20 6e 6f | 75 6e 31 5b 30 5d 20 3d | no|un1[0] =|
|00003fe0| 20 27 5c 30 27 3b 0a 58 | 20 20 20 20 20 20 20 20 | '\0';.X| |
|00003ff0| 6e 6f 75 6e 32 5b 30 5d | 20 3d 20 27 5c 30 27 3b |noun2[0]| = '\0';|
|00004000| 0a 58 20 20 20 20 20 20 | 20 20 61 64 6a 31 5b 30 |.X | adj1[0|
|00004010| 5d 20 3d 20 27 5c 30 27 | 3b 0a 58 20 20 20 20 20 |] = '\0'|;.X |
|00004020| 20 20 20 61 64 6a 32 5b | 30 5d 20 3d 20 27 5c 30 | adj2[|0] = '\0|
|00004030| 27 3b 0a 58 0a 58 09 73 | 77 69 74 63 68 28 6d 79 |';.X.X.s|witch(my|
|00004040| 5f 72 61 6e 64 28 29 20 | 25 20 35 29 20 7b 0a 58 |_rand() |% 5) {.X|
|00004050| 09 09 63 61 73 65 20 34 | 3a 20 2f 2a 46 41 4c 4c |..case 4|: /*FALL|
|00004060| 54 48 52 4f 55 47 48 2a | 2f 0a 58 09 09 63 61 73 |THROUGH*|/.X..cas|
|00004070| 65 20 33 3a 0a 58 09 09 | 09 77 68 69 63 68 5f 6e |e 3:.X..|.which_n|
|00004080| 6f 75 6e 31 20 3d 20 28 | 6c 6f 6e 67 29 20 28 6d |oun1 = (|long) (m|
|00004090| 79 5f 72 61 6e 64 28 29 | 20 25 20 6e 75 6d 62 65 |y_rand()| % numbe|
|000040a0| 72 5f 6f 66 5f 6e 6f 75 | 6e 73 29 3b 0a 58 09 09 |r_of_nou|ns);.X..|
|000040b0| 09 67 65 74 5f 6e 74 68 | 5f 73 74 72 69 6e 67 28 |.get_nth|_string(|
|000040c0| 6e 6f 75 6e 66 69 6c 65 | 2c 0a 58 09 09 09 20 20 |nounfile|,.X... |
|000040d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 77 68 69 | | whi|
|000040e0| 63 68 5f 6e 6f 75 6e 31 | 2c 6e 6f 75 6e 31 2c 4d |ch_noun1|,noun1,M|
|000040f0| 41 58 5f 57 4f 52 44 5f | 4c 45 4e 29 3b 0a 58 09 |AX_WORD_|LEN);.X.|
|00004100| 09 09 28 76 6f 69 64 29 | 20 73 74 72 63 61 74 28 |..(void)| strcat(|
|00004110| 6e 6f 75 6e 31 2c 22 20 | 22 29 3b 0a 58 09 09 20 |noun1," |");.X.. |
|00004120| 20 20 20 20 20 20 20 2f | 2a 46 41 4c 4c 54 48 52 | /|*FALLTHR|
|00004130| 4f 55 47 48 2a 2f 0a 58 | 09 09 63 61 73 65 20 32 |OUGH*/.X|..case 2|
|00004140| 3a 20 2f 2a 46 41 4c 4c | 54 48 52 4f 55 47 48 2a |: /*FALL|THROUGH*|
|00004150| 2f 0a 58 09 09 63 61 73 | 65 20 31 3a 20 2f 2a 46 |/.X..cas|e 1: /*F|
|00004160| 41 4c 4c 54 48 52 4f 55 | 47 48 2a 2f 0a 58 09 09 |ALLTHROU|GH*/.X..|
|00004170| 63 61 73 65 20 30 3a 20 | 0a 58 09 09 09 77 68 69 |case 0: |.X...whi|
|00004180| 6c 65 20 28 28 77 68 69 | 63 68 5f 6e 6f 75 6e 32 |le ((whi|ch_noun2|
|00004190| 20 3d 20 0a 58 09 09 09 | 20 20 20 20 20 20 20 20 | = .X...| |
|000041a0| 28 6c 6f 6e 67 29 20 28 | 6d 79 5f 72 61 6e 64 28 |(long) (|my_rand(|
|000041b0| 29 20 25 20 6e 75 6d 62 | 65 72 5f 6f 66 5f 6e 6f |) % numb|er_of_no|
|000041c0| 75 6e 73 29 29 20 0a 58 | 09 09 09 20 20 20 20 20 |uns)) .X|... |
|000041d0| 20 20 3d 3d 20 77 68 69 | 63 68 5f 6e 6f 75 6e 31 | == whi|ch_noun1|
|000041e0| 29 0a 58 09 09 09 09 2f | 2a 20 64 6f 20 6e 6f 74 |).X..../|* do not|
|000041f0| 68 69 6e 67 20 2a 2f 3b | 0a 58 09 09 09 67 65 74 |hing */;|.X...get|
|00004200| 5f 6e 74 68 5f 73 74 72 | 69 6e 67 28 70 6c 75 72 |_nth_str|ing(plur|
|00004210| 61 6c 66 69 6c 65 2c 0a | 58 09 09 09 20 20 20 20 |alfile,.|X... |
|00004220| 20 20 20 20 20 20 20 20 | 20 20 20 77 68 69 63 68 | | which|
|00004230| 5f 6e 6f 75 6e 32 2c 6e | 6f 75 6e 32 2c 4d 41 58 |_noun2,n|oun2,MAX|
|00004240| 5f 57 4f 52 44 5f 4c 45 | 4e 29 3b 0a 58 09 7d 0a |_WORD_LE|N);.X.}.|
|00004250| 58 0a 58 09 73 77 69 74 | 63 68 28 6d 79 5f 72 61 |X.X.swit|ch(my_ra|
|00004260| 6e 64 28 29 20 25 20 34 | 29 20 7b 0a 58 09 09 63 |nd() % 4|) {.X..c|
|00004270| 61 73 65 20 33 3a 0a 58 | 09 09 09 77 68 69 63 68 |ase 3:.X|...which|
|00004280| 5f 61 64 6a 31 20 3d 20 | 28 6c 6f 6e 67 29 20 28 |_adj1 = |(long) (|
|00004290| 6d 79 5f 72 61 6e 64 28 | 29 20 25 20 6e 75 6d 62 |my_rand(|) % numb|
|000042a0| 65 72 5f 6f 66 5f 61 64 | 6a 73 29 3b 0a 58 09 09 |er_of_ad|js);.X..|
|000042b0| 09 67 65 74 5f 6e 74 68 | 5f 73 74 72 69 6e 67 28 |.get_nth|_string(|
|000042c0| 61 64 6a 66 69 6c 65 2c | 77 68 69 63 68 5f 61 64 |adjfile,|which_ad|
|000042d0| 6a 31 2c 61 64 6a 31 2c | 4d 41 58 5f 57 4f 52 44 |j1,adj1,|MAX_WORD|
|000042e0| 5f 4c 45 4e 29 3b 0a 58 | 09 09 09 28 76 6f 69 64 |_LEN);.X|...(void|
|000042f0| 29 20 73 74 72 63 61 74 | 28 61 64 6a 31 2c 22 20 |) strcat|(adj1," |
|00004300| 22 29 3b 0a 58 09 09 20 | 20 20 20 20 20 20 20 2f |");.X.. | /|
|00004310| 2a 46 41 4c 4c 54 48 52 | 4f 55 47 48 2a 2f 0a 58 |*FALLTHR|OUGH*/.X|
|00004320| 09 09 63 61 73 65 20 32 | 3a 20 2f 2a 46 41 4c 4c |..case 2|: /*FALL|
|00004330| 54 48 52 4f 55 47 48 2a | 2f 0a 58 09 09 63 61 73 |THROUGH*|/.X..cas|
|00004340| 65 20 31 3a 20 2f 2a 46 | 41 4c 4c 54 48 52 4f 55 |e 1: /*F|ALLTHROU|
|00004350| 47 48 2a 2f 0a 58 09 09 | 63 61 73 65 20 30 3a 20 |GH*/.X..|case 0: |
|00004360| 0a 58 09 09 09 77 68 69 | 6c 65 20 28 28 77 68 69 |.X...whi|le ((whi|
|00004370| 63 68 5f 61 64 6a 32 20 | 3d 20 0a 58 09 09 09 20 |ch_adj2 |= .X... |
|00004380| 20 20 28 6c 6f 6e 67 29 | 20 28 6d 79 5f 72 61 6e | (long)| (my_ran|
|00004390| 64 28 29 20 25 20 6e 75 | 6d 62 65 72 5f 6f 66 5f |d() % nu|mber_of_|
|000043a0| 61 64 6a 73 29 29 20 3d | 3d 20 77 68 69 63 68 5f |adjs)) =|= which_|
|000043b0| 61 64 6a 31 29 0a 58 09 | 09 09 09 2f 2a 20 64 6f |adj1).X.|.../* do|
|000043c0| 20 6e 6f 74 68 69 6e 67 | 20 2a 2f 3b 0a 58 09 09 | nothing| */;.X..|
|000043d0| 09 67 65 74 5f 6e 74 68 | 5f 73 74 72 69 6e 67 28 |.get_nth|_string(|
|000043e0| 61 64 6a 66 69 6c 65 2c | 77 68 69 63 68 5f 61 64 |adjfile,|which_ad|
|000043f0| 6a 32 2c 61 64 6a 32 2c | 4d 41 58 5f 57 4f 52 44 |j2,adj2,|MAX_WORD|
|00004400| 5f 4c 45 4e 29 3b 0a 58 | 09 09 09 28 76 6f 69 64 |_LEN);.X|...(void|
|00004410| 29 20 73 74 72 63 61 74 | 28 61 64 6a 32 2c 22 20 |) strcat|(adj2," |
|00004420| 22 29 3b 0a 58 09 7d 0a | 58 0a 58 09 28 76 6f 69 |");.X.}.|X.X.(voi|
|00004430| 64 29 20 73 70 72 69 6e | 74 66 28 62 75 66 66 2c |d) sprin|tf(buff,|
|00004440| 22 25 73 25 73 25 73 25 | 73 22 2c 61 64 6a 31 2c |"%s%s%s%|s",adj1,|
|00004450| 61 64 6a 32 2c 6e 6f 75 | 6e 31 2c 6e 6f 75 6e 32 |adj2,nou|n1,noun2|
|00004460| 29 3b 0a 58 0a 58 09 72 | 65 74 75 72 6e 20 62 75 |);.X.X.r|eturn bu|
|00004470| 66 66 3b 0a 58 7d 0a 0a | 45 4e 44 5f 4f 46 5f 46 |ff;.X}..|END_OF_F|
|00004480| 49 4c 45 0a 65 63 68 6f | 20 73 68 61 72 3a 20 4e |ILE.echo| shar: N|
|00004490| 45 57 4c 49 4e 45 20 61 | 70 70 65 6e 64 65 64 20 |EWLINE a|ppended |
|000044a0| 74 6f 20 5c 22 27 67 65 | 74 69 74 65 6d 2e 63 27 |to \"'ge|titem.c'|
|000044b0| 5c 22 0a 69 66 20 74 65 | 73 74 20 32 39 33 37 20 |\".if te|st 2937 |
|000044c0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 67 65 74 |-ne `wc |-c <'get|
|000044d0| 69 74 65 6d 2e 63 27 60 | 3b 20 74 68 65 6e 0a 20 |item.c'`|; then. |
|000044e0| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|000044f0| 27 67 65 74 69 74 65 6d | 2e 63 27 5c 22 20 75 6e |'getitem|.c'\" un|
|00004500| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00004510| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00004520| 20 6f 66 20 27 67 65 74 | 69 74 65 6d 2e 63 27 0a | of 'get|item.c'.|
|00004530| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 6d |fi.if te|st -f 'm|
|00004540| 79 5f 72 61 6e 64 2e 63 | 27 20 2d 61 20 22 24 7b |y_rand.c|' -a "${|
|00004550| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00004560| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00004570| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00004580| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00004590| 5c 22 27 6d 79 5f 72 61 | 6e 64 2e 63 27 5c 22 0a |\"'my_ra|nd.c'\".|
|000045a0| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|000045b0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 6d 79 |Extracti|ng \"'my|
|000045c0| 5f 72 61 6e 64 2e 63 27 | 5c 22 20 5c 28 31 33 36 |_rand.c'|\" \(136|
|000045d0| 39 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |9 charac|ters\).s|
|000045e0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 6d 79 |ed "s/^X|//" >'my|
|000045f0| 5f 72 61 6e 64 2e 63 27 | 20 3c 3c 27 45 4e 44 5f |_rand.c'| <<'END_|
|00004600| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 20 0a 58 20 |OF_FILE'|.X/* .X |
|00004610| 2a 20 6d 79 5f 72 61 6e | 64 2e 63 20 24 44 61 74 |* my_ran|d.c $Dat|
|00004620| 65 3a 20 39 31 2f 30 37 | 2f 30 31 20 31 38 3a 34 |e: 91/07|/01 18:4|
|00004630| 35 3a 32 35 20 24 0a 58 | 20 2a 20 24 57 68 61 74 |5:25 $.X| * $What|
|00004640| 3a 20 3c 40 28 23 29 20 | 6d 79 5f 72 61 6e 64 2e |: <@(#) |my_rand.|
|00004650| 63 2c 76 09 32 2e 31 3e | 20 24 20 0a 58 20 2a 2f |c,v.2.1>| $ .X */|
|00004660| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 54 68 69 73 20 |.X.X/*.X| * This |
|00004670| 72 61 6e 64 6f 6d 20 6e | 75 6d 62 65 72 20 67 65 |random n|umber ge|
|00004680| 6e 65 72 61 74 6f 72 20 | 69 73 20 66 72 6f 6d 20 |nerator |is from |
|00004690| 50 61 72 6b 20 61 6e 64 | 20 4d 69 6c 6c 65 72 2c |Park and| Miller,|
|000046a0| 20 0a 58 20 2a 20 22 52 | 61 6e 64 6f 6d 20 4e 75 | .X * "R|andom Nu|
|000046b0| 6d 62 65 72 20 47 65 6e | 65 72 61 74 6f 72 73 3a |mber Gen|erators:|
|000046c0| 20 47 6f 6f 64 20 4f 6e | 65 73 20 41 72 65 20 48 | Good On|es Are H|
|000046d0| 61 72 64 20 74 6f 20 46 | 69 6e 64 2c 22 0a 58 20 |ard to F|ind,".X |
|000046e0| 2a 20 5f 43 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e |* _Commu|nication|
|000046f0| 73 20 6f 66 20 74 68 65 | 20 41 43 4d 5f 2c 20 76 |s of the| ACM_, v|
|00004700| 6f 6c 2e 20 33 31 2c 20 | 6e 6f 2e 20 31 30 20 28 |ol. 31, |no. 10 (|
|00004710| 4f 63 74 2e 20 31 39 38 | 38 29 2c 0a 58 20 2a 20 |Oct. 198|8),.X * |
|00004720| 70 70 2e 20 31 31 39 32 | 2d 31 32 30 31 2e 20 0a |pp. 1192|-1201. .|
|00004730| 58 20 2a 0a 58 20 2a 20 | 4e 4f 54 45 20 74 68 61 |X *.X * |NOTE tha|
|00004740| 74 20 74 68 69 73 20 69 | 6d 70 6c 65 6d 65 6e 74 |t this i|mplement|
|00004750| 61 74 69 6f 6e 20 69 73 | 20 6f 6e 6c 79 20 73 75 |ation is| only su|
|00004760| 69 74 61 62 6c 65 20 6f | 6e 20 73 79 73 74 65 6d |itable o|n system|
|00004770| 73 0a 58 20 2a 20 77 68 | 65 72 65 20 61 20 6c 6f |s.X * wh|ere a lo|
|00004780| 6e 67 20 69 6e 74 65 67 | 65 72 20 69 73 20 33 32 |ng integ|er is 32|
|00004790| 20 62 69 74 73 20 77 69 | 64 65 2e 0a 58 20 2a 2f | bits wi|de..X */|
|000047a0| 0a 58 0a 58 2f 2a 20 0a | 58 20 2a 20 49 20 75 73 |.X.X/* .|X * I us|
|000047b0| 65 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 74 69 |e the cu|rrent ti|
|000047c0| 6d 65 20 28 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |me (the |number o|
|000047d0| 66 20 73 65 63 6f 6e 64 | 73 20 73 69 6e 63 65 20 |f second|s since |
|000047e0| 74 68 65 20 55 4e 49 58 | 20 0a 58 20 2a 20 65 70 |the UNIX| .X * ep|
|000047f0| 6f 63 68 2c 20 61 73 20 | 72 65 74 75 72 6e 65 64 |och, as |returned|
|00004800| 20 62 79 20 74 69 6d 65 | 28 29 29 20 61 73 20 61 | by time|()) as a|
|00004810| 20 72 61 6e 64 6f 6d 20 | 6e 75 6d 62 65 72 20 73 | random |number s|
|00004820| 65 65 64 2e 20 20 4f 62 | 76 69 6f 75 73 6c 79 2c |eed. Ob|viously,|
|00004830| 20 0a 58 20 2a 20 69 66 | 20 79 6f 75 72 20 73 79 | .X * if| your sy|
|00004840| 73 74 65 6d 20 64 6f 65 | 73 6e 27 74 20 73 75 70 |stem doe|sn't sup|
|00004850| 70 6f 72 74 20 74 69 6d | 65 28 29 2c 20 79 6f 75 |port tim|e(), you|
|00004860| 20 77 69 6c 6c 20 68 61 | 76 65 20 64 6f 20 74 6f | will ha|ve do to|
|00004870| 0a 58 20 2a 20 73 6f 6d | 65 74 68 69 6e 67 20 65 |.X * som|ething e|
|00004880| 6c 73 65 2e 20 20 4e 6f | 74 65 20 61 6c 73 6f 20 |lse. No|te also |
|00004890| 74 68 61 74 20 74 68 65 | 72 65 27 73 20 6e 6f 74 |that the|re's not|
|000048a0| 68 69 6e 67 20 73 70 65 | 63 69 61 6c 20 61 62 6f |hing spe|cial abo|
|000048b0| 75 74 0a 58 20 2a 20 65 | 69 74 68 65 72 20 74 69 |ut.X * e|ither ti|
|000048c0| 6d 65 20 6f 72 20 74 68 | 65 20 55 4e 49 58 20 65 |me or th|e UNIX e|
|000048d0| 70 6f 63 68 3b 20 61 6e | 79 20 72 6f 75 74 69 6e |poch; an|y routin|
|000048e0| 65 20 77 68 69 63 68 20 | 72 65 74 75 72 6e 73 20 |e which |returns |
|000048f0| 61 20 0a 58 20 2a 20 6c | 6f 6e 67 20 69 6e 74 20 |a .X * l|ong int |
|00004900| 61 6e 64 20 64 6f 65 73 | 6e 27 74 20 61 6c 77 61 |and does|n't alwa|
|00004910| 79 73 20 72 65 74 75 72 | 6e 20 74 68 65 20 73 61 |ys retur|n the sa|
|00004920| 6d 65 20 74 68 69 6e 67 | 20 77 69 6c 6c 20 62 65 |me thing| will be|
|00004930| 20 4f 2e 4b 2e 0a 58 20 | 2a 2f 0a 58 0a 58 23 69 | O.K..X |*/.X.X#i|
|00004940| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 74 79 70 65 |nclude <|sys/type|
|00004950| 73 2e 68 3e 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |s.h>.X#i|nclude <|
|00004960| 74 69 6d 65 2e 68 3e 0a | 58 0a 58 23 69 66 6e 64 |time.h>.|X.X#ifnd|
|00004970| 65 66 20 4e 55 4c 4c 0a | 58 23 64 65 66 69 6e 65 |ef NULL.|X#define|
|00004980| 20 4e 55 4c 4c 20 30 0a | 58 23 65 6e 64 69 66 0a | NULL 0.|X#endif.|
|00004990| 58 0a 58 23 69 6e 63 6c | 75 64 65 20 22 73 68 6f |X.X#incl|ude "sho|
|000049a0| 70 2e 68 22 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 |p.h".X.X|#define |
|000049b0| 41 20 31 36 38 30 37 0a | 58 23 64 65 66 69 6e 65 |A 16807.|X#define|
|000049c0| 20 4d 20 32 31 34 37 34 | 38 33 36 34 37 0a 58 23 | M 21474|83647.X#|
|000049d0| 64 65 66 69 6e 65 20 51 | 20 31 32 37 37 37 33 0a |define Q| 127773.|
|000049e0| 58 23 64 65 66 69 6e 65 | 20 52 20 32 38 33 36 0a |X#define| R 2836.|
|000049f0| 58 0a 58 2f 2a 0a 58 20 | 2a 20 51 20 69 73 20 4d |X.X/*.X |* Q is M|
|00004a00| 20 2f 20 41 2c 20 77 68 | 69 6c 65 20 52 20 69 73 | / A, wh|ile R is|
|00004a10| 20 4d 20 6d 6f 64 20 41 | 2e 0a 58 20 2a 2f 0a 58 | M mod A|..X */.X|
|00004a20| 0a 58 73 74 61 74 69 63 | 20 42 4f 4f 4c 45 41 4e |.Xstatic| BOOLEAN|
|00004a30| 20 73 65 65 64 5f 73 65 | 74 20 3d 20 46 41 4c 53 | seed_se|t = FALS|
|00004a40| 45 3b 0a 58 73 74 61 74 | 69 63 20 6c 6f 6e 67 20 |E;.Xstat|ic long |
|00004a50| 69 6e 74 20 6d 79 5f 73 | 65 65 64 3b 0a 58 0a 58 |int my_s|eed;.X.X|
|00004a60| 6c 6f 6e 67 20 69 6e 74 | 20 6d 79 5f 72 61 6e 64 |long int| my_rand|
|00004a70| 28 29 0a 58 7b 0a 58 09 | 6c 6f 6e 67 20 69 6e 74 |().X{.X.|long int|
|00004a80| 20 6c 6f 2c 20 68 69 2c | 20 74 65 73 74 3b 0a 58 | lo, hi,| test;.X|
|00004a90| 09 74 69 6d 65 5f 74 20 | 74 69 6d 65 28 29 3b 0a |.time_t |time();.|
|00004aa0| 58 0a 58 09 69 66 20 28 | 21 73 65 65 64 5f 73 65 |X.X.if (|!seed_se|
|00004ab0| 74 29 20 7b 0a 58 09 09 | 6d 79 5f 73 65 65 64 20 |t) {.X..|my_seed |
|00004ac0| 3d 20 28 6c 6f 6e 67 20 | 69 6e 74 29 20 74 69 6d |= (long |int) tim|
|00004ad0| 65 28 4e 55 4c 4c 29 3b | 0a 58 09 09 73 65 65 64 |e(NULL);|.X..seed|
|00004ae0| 5f 73 65 74 20 3d 20 54 | 52 55 45 3b 0a 58 09 7d |_set = T|RUE;.X.}|
|00004af0| 0a 58 0a 58 09 68 69 20 | 3d 20 28 6c 6f 6e 67 29 |.X.X.hi |= (long)|
|00004b00| 20 28 6d 79 5f 73 65 65 | 64 20 2f 20 51 29 3b 0a | (my_see|d / Q);.|
|00004b10| 58 09 6c 6f 20 3d 20 6d | 79 5f 73 65 65 64 20 2d |X.lo = m|y_seed -|
|00004b20| 20 51 20 2a 20 68 69 3b | 0a 58 09 74 65 73 74 20 | Q * hi;|.X.test |
|00004b30| 3d 20 41 20 2a 20 6c 6f | 20 2d 20 52 20 2a 20 68 |= A * lo| - R * h|
|00004b40| 69 3b 0a 58 09 69 66 20 | 28 74 65 73 74 20 3e 20 |i;.X.if |(test > |
|00004b50| 30 29 20 7b 0a 58 09 09 | 6d 79 5f 73 65 65 64 20 |0) {.X..|my_seed |
|00004b60| 3d 20 74 65 73 74 3b 0a | 58 09 7d 20 65 6c 73 65 |= test;.|X.} else|
|00004b70| 20 7b 0a 58 09 09 6d 79 | 5f 73 65 65 64 20 3d 20 | {.X..my|_seed = |
|00004b80| 74 65 73 74 20 2b 20 4d | 3b 0a 58 09 7d 0a 58 09 |test + M|;.X.}.X.|
|00004b90| 72 65 74 75 72 6e 20 6d | 79 5f 73 65 65 64 3b 0a |return m|y_seed;.|
|00004ba0| 58 7d 0a 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |X}..END_|OF_FILE.|
|00004bb0| 65 63 68 6f 20 73 68 61 | 72 3a 20 4e 45 57 4c 49 |echo sha|r: NEWLI|
|00004bc0| 4e 45 20 61 70 70 65 6e | 64 65 64 20 74 6f 20 5c |NE appen|ded to \|
|00004bd0| 22 27 6d 79 5f 72 61 6e | 64 2e 63 27 5c 22 0a 69 |"'my_ran|d.c'\".i|
|00004be0| 66 20 74 65 73 74 20 31 | 33 37 30 20 2d 6e 65 20 |f test 1|370 -ne |
|00004bf0| 60 77 63 20 2d 63 20 3c | 27 6d 79 5f 72 61 6e 64 |`wc -c <|'my_rand|
|00004c00| 2e 63 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.c'`; th|en. e|
|00004c10| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 6d 79 5f |cho shar|: \"'my_|
|00004c20| 72 61 6e 64 2e 63 27 5c | 22 20 75 6e 70 61 63 6b |rand.c'\|" unpack|
|00004c30| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00004c40| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00004c50| 27 6d 79 5f 72 61 6e 64 | 2e 63 27 0a 66 69 0a 69 |'my_rand|.c'.fi.i|
|00004c60| 66 20 74 65 73 74 20 2d | 66 20 27 73 68 6f 70 2e |f test -|f 'shop.|
|00004c70| 63 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |c' -a "$|{1}" != |
|00004c80| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00004c90| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00004ca0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00004cb0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 73 68 6f 70 |ing file| \"'shop|
|00004cc0| 2e 63 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |.c'\".el|se.echo |
|00004cd0| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|00004ce0| 20 5c 22 27 73 68 6f 70 | 2e 63 27 5c 22 20 5c 28 | \"'shop|.c'\" \(|
|00004cf0| 31 39 36 35 20 63 68 61 | 72 61 63 74 65 72 73 5c |1965 cha|racters\|
|00004d00| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00004d10| 27 73 68 6f 70 2e 63 27 | 20 3c 3c 27 45 4e 44 5f |'shop.c'| <<'END_|
|00004d20| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 0a 58 20 2a |OF_FILE'|.X/*.X *|
|00004d30| 20 73 68 6f 70 20 20 42 | 72 69 61 6e 20 52 69 63 | shop B|rian Ric|
|00004d40| 65 20 20 72 69 63 65 40 | 64 67 2d 72 74 70 2e 64 |e rice@|dg-rtp.d|
|00004d50| 67 2e 63 6f 6d 20 20 31 | 39 38 39 2d 39 31 0a 58 |g.com 1|989-91.X|
|00004d60| 20 2a 0a 58 20 2a 20 54 | 68 69 73 20 69 73 20 73 | *.X * T|his is s|
|00004d70| 68 6f 70 2e 63 2c 20 74 | 68 65 20 6d 61 69 6e 20 |hop.c, t|he main |
|00004d80| 72 6f 75 74 69 6e 65 2e | 0a 58 20 2a 0a 58 20 2a |routine.|.X *.X *|
|00004d90| 20 24 44 61 74 65 3a 20 | 39 31 2f 30 37 2f 30 31 | $Date: |91/07/01|
|00004da0| 20 31 38 3a 34 35 3a 33 | 31 20 24 0a 58 20 2a 2f | 18:45:3|1 $.X */|
|00004db0| 0a 58 0a 58 73 74 61 74 | 69 63 20 63 68 61 72 20 |.X.Xstat|ic char |
|00004dc0| 72 63 73 69 64 5b 5d 20 | 3d 20 22 24 57 68 61 74 |rcsid[] |= "$What|
|00004dd0| 3a 20 3c 40 28 23 29 20 | 73 68 6f 70 2e 63 2c 76 |: <@(#) |shop.c,v|
|00004de0| 09 32 2e 31 3e 20 24 22 | 3b 0a 58 0a 58 23 69 6e |.2.1> $"|;.X.X#in|
|00004df0| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 20 |clude <s|tdio.h> |
|00004e00| 0a 58 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 72 69 |.X#inclu|de <stri|
|00004e10| 6e 67 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |ng.h>.X#|include |
|00004e20| 3c 63 74 79 70 65 2e 68 | 3e 0a 58 0a 58 23 69 66 |<ctype.h|>.X.X#if|
|00004e30| 20 50 57 44 5f 53 55 50 | 50 4f 52 54 45 44 0a 58 | PWD_SUP|PORTED.X|
|00004e40| 23 69 6e 63 6c 75 64 65 | 20 3c 70 77 64 2e 68 3e |#include| <pwd.h>|
|00004e50| 0a 58 23 65 6e 64 69 66 | 0a 58 0a 58 23 69 6e 63 |.X#endif|.X.X#inc|
|00004e60| 6c 75 64 65 20 22 73 68 | 6f 70 2e 68 22 0a 58 0a |lude "sh|op.h".X.|
|00004e70| 58 63 68 61 72 20 2a 63 | 6d 64 6e 61 6d 65 3b 0a |Xchar *c|mdname;.|
|00004e80| 58 0a 58 6d 61 69 6e 28 | 61 72 67 63 2c 61 72 67 |X.Xmain(|argc,arg|
|00004e90| 76 29 0a 58 69 6e 74 20 | 61 72 67 63 3b 0a 58 63 |v).Xint |argc;.Xc|
|00004ea0| 68 61 72 20 2a 61 72 67 | 76 5b 5d 3b 0a 58 7b 0a |har *arg|v[];.X{.|
|00004eb0| 58 09 63 68 61 72 20 2a | 67 65 74 69 74 65 6d 28 |X.char *|getitem(|
|00004ec0| 29 3b 0a 58 09 63 68 61 | 72 20 2a 63 61 70 5f 77 |);.X.cha|r *cap_w|
|00004ed0| 6f 72 64 73 28 29 3b 0a | 58 23 69 66 20 50 57 44 |ords();.|X#if PWD|
|00004ee0| 5f 53 55 50 50 4f 52 54 | 45 44 0a 58 20 20 20 20 |_SUPPORT|ED.X |
|00004ef0| 20 20 20 20 73 74 72 75 | 63 74 20 70 61 73 73 77 | stru|ct passw|
|00004f00| 64 20 2a 67 65 74 70 77 | 75 69 64 28 29 2c 20 2a |d *getpw|uid(), *|
|00004f10| 6d 79 5f 70 61 73 73 77 | 64 3b 0a 58 23 69 66 20 |my_passw|d;.X#if |
|00004f20| 56 45 52 42 4f 53 45 5f | 47 45 43 4f 53 0a 58 09 |VERBOSE_|GECOS.X.|
|00004f30| 63 68 61 72 20 2a 61 78 | 5f 61 74 5f 63 68 61 72 |char *ax|_at_char|
|00004f40| 28 29 3b 0a 58 23 65 6e | 64 69 66 0a 58 23 65 6e |();.X#en|dif.X#en|
|00004f50| 64 69 66 0a 58 09 63 68 | 61 72 20 6d 79 5f 74 65 |dif.X.ch|ar my_te|
|00004f60| 78 74 5b 4d 59 5f 54 45 | 58 54 5f 4c 45 4e 47 54 |xt[MY_TE|XT_LENGT|
|00004f70| 48 5d 3b 0a 58 09 42 4f | 4f 4c 45 41 4e 20 6d 69 |H];.X.BO|OLEAN mi|
|00004f80| 64 64 6e 61 6d 65 20 3d | 20 46 41 4c 53 45 3b 0a |ddname =| FALSE;.|
|00004f90| 58 09 42 4f 4f 4c 45 41 | 4e 20 68 65 61 64 65 72 |X.BOOLEA|N header|
|00004fa0| 20 3d 20 54 52 55 45 3b | 0a 58 09 42 4f 4f 4c 45 | = TRUE;|.X.BOOLE|
|00004fb0| 41 4e 20 6e 75 6d 62 65 | 72 73 20 3d 20 54 52 55 |AN numbe|rs = TRU|
|00004fc0| 45 3b 0a 58 09 69 6e 74 | 20 69 6e 78 3b 0a 58 09 |E;.X.int| inx;.X.|
|00004fd0| 69 6e 74 20 69 74 65 6d | 63 6f 75 6e 74 20 3d 20 |int item|count = |
|00004fe0| 44 45 46 41 55 4c 54 5f | 49 54 45 4d 43 4f 55 4e |DEFAULT_|ITEMCOUN|
|00004ff0| 54 3b 0a 58 09 63 68 61 | 72 20 2a 73 3b 0a 58 0a |T;.X.cha|r *s;.X.|
|00005000| 58 09 63 6d 64 6e 61 6d | 65 20 3d 20 61 72 67 76 |X.cmdnam|e = argv|
|00005010| 5b 30 5d 3b 0a 58 0a 58 | 09 77 68 69 6c 65 20 28 |[0];.X.X|.while (|
|00005020| 2d 2d 61 72 67 63 20 3e | 20 30 29 20 7b 0a 58 09 |--argc >| 0) {.X.|
|00005030| 09 73 77 69 74 63 68 20 | 28 28 2a 2b 2b 61 72 67 |.switch |((*++arg|
|00005040| 76 29 5b 30 5d 29 20 7b | 0a 58 09 09 09 63 61 73 |v)[0]) {|.X...cas|
|00005050| 65 20 27 2d 27 3a 0a 58 | 09 09 09 09 66 6f 72 20 |e '-':.X|....for |
|00005060| 28 73 20 3d 20 61 72 67 | 76 5b 30 5d 2b 31 3b 20 |(s = arg|v[0]+1; |
|00005070| 2a 73 3b 20 73 2b 2b 29 | 0a 58 09 09 09 09 09 73 |*s; s++)|.X.....s|
|00005080| 77 69 74 63 68 20 28 2a | 73 29 20 7b 0a 58 09 09 |witch (*|s) {.X..|
|00005090| 09 09 09 09 63 61 73 65 | 20 27 68 27 3a 20 68 65 |....case| 'h': he|
|000050a0| 61 64 65 72 20 3d 20 46 | 41 4c 53 45 3b 0a 58 09 |ader = F|ALSE;.X.|
|000050b0| 09 09 09 09 20 20 09 20 | 20 09 20 20 62 72 65 61 |.... . | . brea|
|000050c0| 6b 3b 0a 58 09 09 09 09 | 09 09 63 61 73 65 20 27 |k;.X....|..case '|
|000050d0| 6e 27 3a 20 6e 75 6d 62 | 65 72 73 20 3d 20 46 41 |n': numb|ers = FA|
|000050e0| 4c 53 45 3b 0a 58 09 09 | 09 09 09 09 20 20 09 20 |LSE;.X..|.... . |
|000050f0| 20 62 72 65 61 6b 3b 0a | 58 09 09 09 09 09 09 63 | break;.|X......c|
|00005100| 61 73 65 20 27 6d 27 3a | 20 6d 69 64 64 6e 61 6d |ase 'm':| middnam|
|00005110| 65 20 3d 20 54 52 55 45 | 3b 0a 58 09 09 09 09 09 |e = TRUE|;.X.....|
|00005120| 09 20 20 09 20 20 62 72 | 65 61 6b 3b 0a 58 09 09 |. . br|eak;.X..|
|00005130| 09 09 09 09 64 65 66 61 | 75 6c 74 3a 0a 58 09 09 |....defa|ult:.X..|
|00005140| 09 09 09 09 09 20 20 28 | 76 6f 69 64 29 20 0a 58 |..... (|void) .X|
|00005150| 09 09 09 09 09 09 20 20 | 20 20 20 20 20 20 20 20 |...... | |
|00005160| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 0a |fprintf(|stderr,.|
|00005170| 58 09 09 09 09 09 09 20 | 20 20 20 20 20 20 20 20 |X...... | |
|00005180| 20 20 20 20 20 53 48 4f | 50 5f 55 53 41 47 45 2c | SHO|P_USAGE,|
|00005190| 0a 58 09 09 09 09 09 09 | 20 20 20 20 20 20 20 20 |.X......| |
|000051a0| 20 20 20 20 20 20 63 6d | 64 6e 61 6d 65 29 3b 0a | cm|dname);.|
|000051b0| 58 09 09 09 09 09 09 09 | 20 20 65 78 69 74 28 31 |X.......| exit(1|
|000051c0| 29 3b 0a 58 09 09 09 09 | 09 7d 0a 58 09 09 09 09 |);.X....|.}.X....|
|000051d0| 62 72 65 61 6b 3b 0a 58 | 09 09 09 63 61 73 65 20 |break;.X|...case |
|000051e0| 27 30 27 3a 0a 58 09 09 | 09 63 61 73 65 20 27 31 |'0':.X..|.case '1|
|000051f0| 27 3a 0a 58 09 09 09 63 | 61 73 65 20 27 32 27 3a |':.X...c|ase '2':|
|00005200| 0a 58 09 09 09 63 61 73 | 65 20 27 33 27 3a 0a 58 |.X...cas|e '3':.X|
|00005210| 09 09 09 63 61 73 65 20 | 27 34 27 3a 0a 58 09 09 |...case |'4':.X..|
|00005220| 09 63 61 73 65 20 27 35 | 27 3a 0a 58 09 09 09 63 |.case '5|':.X...c|
|00005230| 61 73 65 20 27 36 27 3a | 0a 58 09 09 09 63 61 73 |ase '6':|.X...cas|
|00005240| 65 20 27 37 27 3a 0a 58 | 09 09 09 63 61 73 65 20 |e '7':.X|...case |
|00005250| 27 38 27 3a 0a 58 09 09 | 09 63 61 73 65 20 27 39 |'8':.X..|.case '9|
|00005260| 27 3a 20 69 74 65 6d 63 | 6f 75 6e 74 20 3d 20 61 |': itemc|ount = a|
|00005270| 74 6f 69 28 61 72 67 76 | 5b 30 5d 29 3b 0a 58 09 |toi(argv|[0]);.X.|
|00005280| 09 09 09 20 20 62 72 65 | 61 6b 3b 0a 58 09 09 7d |... bre|ak;.X..}|
|00005290| 0a 58 09 7d 0a 58 09 0a | 58 09 69 66 20 28 6d 69 |.X.}.X..|X.if (mi|
|000052a0| 64 64 6e 61 6d 65 29 20 | 7b 0a 58 23 69 66 20 50 |ddname) |{.X#if P|
|000052b0| 57 44 5f 53 55 50 50 4f | 52 54 45 44 0a 58 09 09 |WD_SUPPO|RTED.X..|
|000052c0| 6d 79 5f 70 61 73 73 77 | 64 20 3d 20 67 65 74 70 |my_passw|d = getp|
|000052d0| 77 75 69 64 28 67 65 74 | 75 69 64 28 29 29 3b 0a |wuid(get|uid());.|
|000052e0| 58 23 65 6e 64 69 66 0a | 58 0a 58 09 09 28 76 6f |X#endif.|X.X..(vo|
|000052f0| 69 64 29 20 70 72 69 6e | 74 66 28 22 25 73 2c 20 |id) prin|tf("%s, |
|00005300| 79 6f 75 72 20 6d 69 64 | 64 6c 65 20 6e 61 6d 65 |your mid|dle name|
|00005310| 20 69 73 20 5c 22 25 73 | 2e 5c 22 5c 6e 22 2c 0a | is \"%s|.\"\n",.|
|00005320| 58 23 69 66 20 50 57 44 | 5f 53 55 50 50 4f 52 54 |X#if PWD|_SUPPORT|
|00005330| 45 44 0a 58 23 69 66 20 | 56 45 52 42 4f 53 45 5f |ED.X#if |VERBOSE_|
|00005340| 47 45 43 4f 53 0a 58 09 | 09 20 20 09 61 78 5f 61 |GECOS.X.|. .ax_a|
|00005350| 74 5f 63 68 61 72 28 6d | 79 5f 70 61 73 73 77 64 |t_char(m|y_passwd|
|00005360| 2d 3e 70 77 5f 67 65 63 | 6f 73 29 2c 0a 58 23 65 |->pw_gec|os),.X#e|
|00005370| 6c 73 65 0a 58 09 09 20 | 20 09 6d 79 5f 70 61 73 |lse.X.. | .my_pas|
|00005380| 73 77 64 2d 3e 70 77 5f | 67 65 63 6f 73 2c 0a 58 |swd->pw_|gecos,.X|
|00005390| 23 65 6e 64 69 66 0a 58 | 23 65 6c 73 65 0a 58 09 |#endif.X|#else.X.|
|000053a0| 09 09 44 45 46 41 55 4c | 54 5f 4e 41 4d 45 2c 0a |..DEFAUL|T_NAME,.|
|000053b0| 58 23 65 6e 64 69 66 0a | 58 09 09 20 20 09 63 61 |X#endif.|X.. .ca|
|000053c0| 70 5f 77 6f 72 64 73 28 | 67 65 74 69 74 65 6d 28 |p_words(|getitem(|
|000053d0| 6d 79 5f 74 65 78 74 29 | 29 29 3b 0a 58 09 7d 20 |my_text)|));.X.} |
|000053e0| 65 6c 73 65 20 7b 0a 58 | 09 09 69 66 20 28 68 65 |else {.X|..if (he|
|000053f0| 61 64 65 72 29 20 7b 0a | 58 09 09 09 28 76 6f 69 |ader) {.|X...(voi|
|00005400| 64 29 20 70 72 69 6e 74 | 66 28 48 45 41 44 45 52 |d) print|f(HEADER|
|00005410| 5f 4d 53 47 29 3b 0a 58 | 09 09 7d 0a 58 0a 58 09 |_MSG);.X|..}.X.X.|
|00005420| 09 66 6f 72 20 28 69 6e | 78 3d 30 3b 20 69 6e 78 |.for (in|x=0; inx|
|00005430| 20 3c 20 69 74 65 6d 63 | 6f 75 6e 74 3b 20 69 6e | < itemc|ount; in|
|00005440| 78 2b 2b 29 20 7b 0a 58 | 09 09 09 28 76 6f 69 64 |x++) {.X|...(void|
|00005450| 29 20 67 65 74 69 74 65 | 6d 28 6d 79 5f 74 65 78 |) getite|m(my_tex|
|00005460| 74 29 3b 0a 58 09 09 09 | 6d 79 5f 74 65 78 74 5b |t);.X...|my_text[|
|00005470| 30 5d 20 3d 20 74 6f 75 | 70 70 65 72 28 6d 79 5f |0] = tou|pper(my_|
|00005480| 74 65 78 74 5b 30 5d 29 | 3b 0a 58 09 09 09 69 66 |text[0])|;.X...if|
|00005490| 20 28 6e 75 6d 62 65 72 | 73 29 20 7b 0a 58 09 09 | (number|s) {.X..|
|000054a0| 09 09 28 76 6f 69 64 29 | 20 70 72 69 6e 74 66 28 |..(void)| printf(|
|000054b0| 22 28 25 64 29 20 25 73 | 22 2c 69 6e 78 2b 31 2c |"(%d) %s|",inx+1,|
|000054c0| 6d 79 5f 74 65 78 74 29 | 3b 0a 58 09 09 09 7d 20 |my_text)|;.X...} |
|000054d0| 65 6c 73 65 20 7b 0a 58 | 09 09 09 09 28 76 6f 69 |else {.X|....(voi|
|000054e0| 64 29 20 66 70 75 74 73 | 28 6d 79 5f 74 65 78 74 |d) fputs|(my_text|
|000054f0| 2c 73 74 64 6f 75 74 29 | 3b 0a 58 09 09 09 7d 0a |,stdout)|;.X...}.|
|00005500| 58 09 09 09 28 76 6f 69 | 64 29 20 70 75 74 63 28 |X...(voi|d) putc(|
|00005510| 27 5c 6e 27 2c 73 74 64 | 6f 75 74 29 3b 0a 58 09 |'\n',std|out);.X.|
|00005520| 09 7d 0a 58 09 7d 0a 58 | 09 65 78 69 74 28 30 29 |.}.X.}.X|.exit(0)|
|00005530| 3b 0a 58 09 2f 2a 4e 4f | 54 52 45 41 43 48 45 44 |;.X./*NO|TREACHED|
|00005540| 2a 2f 0a 58 7d 0a 0a 45 | 4e 44 5f 4f 46 5f 46 49 |*/.X}..E|ND_OF_FI|
|00005550| 4c 45 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 4e 45 |LE.echo |shar: NE|
|00005560| 57 4c 49 4e 45 20 61 70 | 70 65 6e 64 65 64 20 74 |WLINE ap|pended t|
|00005570| 6f 20 5c 22 27 73 68 6f | 70 2e 63 27 5c 22 0a 69 |o \"'sho|p.c'\".i|
|00005580| 66 20 74 65 73 74 20 31 | 39 36 36 20 2d 6e 65 20 |f test 1|966 -ne |
|00005590| 60 77 63 20 2d 63 20 3c | 27 73 68 6f 70 2e 63 27 |`wc -c <|'shop.c'|
|000055a0| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|000055b0| 20 73 68 61 72 3a 20 5c | 22 27 73 68 6f 70 2e 63 | shar: \|"'shop.c|
|000055c0| 27 5c 22 20 75 6e 70 61 | 63 6b 65 64 20 77 69 74 |'\" unpa|cked wit|
|000055d0| 68 20 77 72 6f 6e 67 20 | 73 69 7a 65 21 0a 66 69 |h wrong |size!.fi|
|000055e0| 0a 23 20 65 6e 64 20 6f | 66 20 27 73 68 6f 70 2e |.# end o|f 'shop.|
|000055f0| 63 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |c'.fi.if| test -f|
|00005600| 20 27 73 68 6f 70 2e 68 | 27 20 2d 61 20 22 24 7b | 'shop.h|' -a "${|
|00005610| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00005620| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00005630| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00005640| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00005650| 5c 22 27 73 68 6f 70 2e | 68 27 5c 22 0a 65 6c 73 |\"'shop.|h'\".els|
|00005660| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|00005670| 72 61 63 74 69 6e 67 20 | 5c 22 27 73 68 6f 70 2e |racting |\"'shop.|
|00005680| 68 27 5c 22 20 5c 28 34 | 30 38 20 63 68 61 72 61 |h'\" \(4|08 chara|
|00005690| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|000056a0| 58 2f 2f 22 20 3e 27 73 | 68 6f 70 2e 68 27 20 3c |X//" >'s|hop.h' <|
|000056b0| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|000056c0| 2f 2a 0a 58 20 2a 20 73 | 68 6f 70 2e 68 20 20 24 |/*.X * s|hop.h $|
|000056d0| 44 61 74 65 3a 20 39 31 | 2f 30 37 2f 30 31 20 31 |Date: 91|/07/01 1|
|000056e0| 38 3a 34 35 3a 35 30 20 | 24 0a 58 20 2a 20 24 57 |8:45:50 |$.X * $W|
|000056f0| 68 61 74 3a 20 3c 40 28 | 23 29 20 73 68 6f 70 2e |hat: <@(|#) shop.|
|00005700| 68 2c 76 09 32 2e 31 3e | 20 24 0a 58 20 2a 2f 0a |h,v.2.1>| $.X */.|
|00005710| 58 0a 58 23 69 66 6e 64 | 65 66 20 54 52 55 45 0a |X.X#ifnd|ef TRUE.|
|00005720| 58 23 64 65 66 69 6e 65 | 20 54 52 55 45 20 31 0a |X#define| TRUE 1.|
|00005730| 58 23 64 65 66 69 6e 65 | 20 46 41 4c 53 45 20 30 |X#define| FALSE 0|
|00005740| 0a 58 23 65 6e 64 69 66 | 0a 58 23 69 66 6e 64 65 |.X#endif|.X#ifnde|
|00005750| 66 20 42 4f 4f 4c 45 41 | 4e 0a 58 23 64 65 66 69 |f BOOLEA|N.X#defi|
|00005760| 6e 65 20 42 4f 4f 4c 45 | 41 4e 20 63 68 61 72 0a |ne BOOLE|AN char.|
|00005770| 58 23 65 6e 64 69 66 0a | 58 23 64 65 66 69 6e 65 |X#endif.|X#define|
|00005780| 20 42 59 54 45 5f 43 4f | 55 4e 54 5f 53 49 5a 45 | BYTE_CO|UNT_SIZE|
|00005790| 20 34 0a 58 23 64 65 66 | 69 6e 65 20 49 54 45 4d | 4.X#def|ine ITEM|
|000057a0| 5f 43 4f 55 4e 54 5f 53 | 49 5a 45 20 34 0a 58 23 |_COUNT_S|IZE 4.X#|
|000057b0| 64 65 66 69 6e 65 20 4d | 41 58 5f 57 4f 52 44 5f |define M|AX_WORD_|
|000057c0| 4c 45 4e 20 33 32 0a 58 | 23 64 65 66 69 6e 65 20 |LEN 32.X|#define |
|000057d0| 44 45 46 41 55 4c 54 5f | 49 54 45 4d 43 4f 55 4e |DEFAULT_|ITEMCOUN|
|000057e0| 54 20 33 0a 58 23 64 65 | 66 69 6e 65 20 4d 59 5f |T 3.X#de|fine MY_|
|000057f0| 54 45 58 54 5f 4c 45 4e | 47 54 48 20 31 32 38 0a |TEXT_LEN|GTH 128.|
|00005800| 58 23 64 65 66 69 6e 65 | 20 48 45 41 44 45 52 5f |X#define| HEADER_|
|00005810| 4d 53 47 20 22 48 65 72 | 65 20 69 73 20 79 6f 75 |MSG "Her|e is you|
|00005820| 72 20 73 68 6f 70 70 69 | 6e 67 20 6c 69 73 74 3a |r shoppi|ng list:|
|00005830| 5c 6e 22 0a 58 20 0a 58 | 23 64 65 66 69 6e 65 20 |\n".X .X|#define |
|00005840| 53 48 4f 50 5f 55 53 41 | 47 45 20 22 25 73 3a 20 |SHOP_USA|GE "%s: |
|00005850| 6c 65 67 61 6c 20 6f 70 | 74 69 6f 6e 73 20 61 72 |legal op|tions ar|
|00005860| 65 20 68 20 6d 20 6e 5c | 6e 22 0a 0a 45 4e 44 5f |e h m n\|n"..END_|
|00005870| 4f 46 5f 46 49 4c 45 0a | 65 63 68 6f 20 73 68 61 |OF_FILE.|echo sha|
|00005880| 72 3a 20 4e 45 57 4c 49 | 4e 45 20 61 70 70 65 6e |r: NEWLI|NE appen|
|00005890| 64 65 64 20 74 6f 20 5c | 22 27 73 68 6f 70 2e 68 |ded to \|"'shop.h|
|000058a0| 27 5c 22 0a 69 66 20 74 | 65 73 74 20 34 30 39 20 |'\".if t|est 409 |
|000058b0| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 73 68 6f |-ne `wc |-c <'sho|
|000058c0| 70 2e 68 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |p.h'`; t|hen. |
|000058d0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 73 68 |echo sha|r: \"'sh|
|000058e0| 6f 70 2e 68 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |op.h'\" |unpacked|
|000058f0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00005900| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 73 |!.fi.# e|nd of 's|
|00005910| 68 6f 70 2e 68 27 0a 66 | 69 0a 69 66 20 74 65 73 |hop.h'.f|i.if tes|
|00005920| 74 20 2d 66 20 27 73 68 | 6f 70 2e 36 27 20 2d 61 |t -f 'sh|op.6' -a|
|00005930| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00005940| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00005950| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00005960| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00005970| 69 6c 65 20 5c 22 27 73 | 68 6f 70 2e 36 27 5c 22 |ile \"'s|hop.6'\"|
|00005980| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00005990| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 73 | Extract|ing \"'s|
|000059a0| 68 6f 70 2e 36 27 5c 22 | 20 5c 28 32 31 34 37 20 |hop.6'\"| \(2147 |
|000059b0| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|000059c0| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 73 68 6f 70 | "s/^X//|" >'shop|
|000059d0| 2e 36 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.6' <<'E|ND_OF_FI|
|000059e0| 4c 45 27 0a 58 2e 5c 22 | 20 24 57 68 61 74 3a 20 |LE'.X.\"| $What: |
|000059f0| 3c 40 28 23 29 20 73 68 | 6f 70 2e 36 2c 76 09 32 |<@(#) sh|op.6,v.2|
|00005a00| 2e 31 3e 20 24 0a 58 2e | 52 56 20 32 2e 30 30 0a |.1> $.X.|RV 2.00.|
|00005a10| 58 2e 54 48 20 73 68 6f | 70 20 36 0a 58 2e 4d 58 |X.TH sho|p 6.X.MX|
|00005a20| 20 22 73 68 6f 70 28 36 | 29 22 0a 58 2e 53 48 20 | "shop(6|)".X.SH |
|00005a30| 4e 41 4d 45 0a 58 73 68 | 6f 70 20 5c 2d 20 70 72 |NAME.Xsh|op \- pr|
|00005a40| 69 6e 74 20 61 20 73 68 | 6f 70 70 69 6e 67 20 6c |int a sh|opping l|
|00005a50| 69 73 74 0a 58 2e 53 48 | 20 53 59 4e 54 41 58 0a |ist.X.SH| SYNTAX.|
|00005a60| 58 2e 42 20 73 68 6f 70 | 20 0a 58 5b 20 5b 0a 58 |X.B shop| .X[ [.X|
|00005a70| 2e 42 20 5c 2d 68 6e 0a | 58 5d 20 5b 20 5c 66 49 |.B \-hn.|X] [ \fI|
|00005a80| 6e 75 6d 62 65 72 5c 66 | 50 20 5d 20 5d 0a 58 2e |number\f|P ] ].X.|
|00005a90| 50 50 0a 58 2e 42 20 73 | 68 6f 70 20 5c 2d 6d 0a |PP.X.B s|hop \-m.|
|00005aa0| 58 2e 53 48 20 44 45 53 | 43 52 49 50 54 49 4f 4e |X.SH DES|CRIPTION|
|00005ab0| 0a 58 2e 49 20 53 68 6f | 70 5c 5e 0a 58 73 75 67 |.X.I Sho|p\^.Xsug|
|00005ac0| 67 65 73 74 73 20 73 6f | 6d 65 20 69 74 65 6d 73 |gests so|me items|
|00005ad0| 20 77 68 69 63 68 20 79 | 6f 75 20 6d 61 79 20 77 | which y|ou may w|
|00005ae0| 61 6e 74 20 74 6f 20 70 | 69 63 6b 20 75 70 20 6f |ant to p|ick up o|
|00005af0| 6e 20 79 6f 75 72 0a 58 | 6e 65 78 74 20 76 69 73 |n your.X|next vis|
|00005b00| 69 74 20 74 6f 20 74 68 | 65 20 66 69 76 65 2d 61 |it to th|e five-a|
|00005b10| 6e 64 2d 64 69 6d 65 2e | 0a 58 59 6f 75 20 6d 61 |nd-dime.|.XYou ma|
|00005b20| 79 20 73 70 65 63 69 66 | 79 20 61 20 6e 6f 6e 2d |y specif|y a non-|
|00005b30| 6e 65 67 61 74 69 76 65 | 20 69 6e 74 65 67 65 72 |negative| integer|
|00005b40| 20 6f 6e 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 | on the |command |
|00005b50| 6c 69 6e 65 0a 58 74 6f | 20 73 70 65 63 69 66 79 |line.Xto| specify|
|00005b60| 20 68 6f 77 20 6d 61 6e | 79 20 73 75 67 67 65 73 | how man|y sugges|
|00005b70| 74 69 6f 6e 73 20 79 6f | 75 20 77 6f 75 6c 64 20 |tions yo|u would |
|00005b80| 6c 69 6b 65 3b 20 74 68 | 65 20 64 65 66 61 75 6c |like; th|e defaul|
|00005b90| 74 0a 58 69 73 20 74 68 | 72 65 65 2e 0a 58 2e 50 |t.Xis th|ree..X.P|
|00005ba0| 50 0a 58 57 68 65 6e 20 | 0a 58 2e 49 20 73 68 6f |P.XWhen |.X.I sho|
|00005bb0| 70 5c 5e 0a 58 69 73 20 | 75 73 65 64 20 77 69 74 |p\^.Xis |used wit|
|00005bc0| 68 20 74 68 65 0a 58 2e | 42 20 5c 2d 6d 0a 58 66 |h the.X.|B \-m.Xf|
|00005bd0| 6c 61 67 20 28 74 68 65 | 20 4d 61 72 6b 20 4d 63 |lag (the| Mark Mc|
|00005be0| 41 75 6c 69 66 66 65 20 | 4d 65 6d 6f 72 69 61 6c |Auliffe |Memorial|
|00005bf0| 20 4f 70 74 69 6f 6e 29 | 2c 20 73 68 6f 70 20 77 | Option)|, shop w|
|00005c00| 69 6c 6c 20 69 6e 73 74 | 65 61 64 20 0a 58 61 63 |ill inst|ead .Xac|
|00005c10| 63 75 73 65 20 79 6f 75 | 20 6f 66 20 68 61 76 69 |cuse you| of havi|
|00005c20| 6e 67 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |ng a par|ticular |
|00005c30| 6d 69 64 64 6c 65 20 6e | 61 6d 65 2e 0a 58 2e 50 |middle n|ame..X.P|
|00005c40| 50 0a 58 2e 53 48 20 4f | 50 54 49 4f 4e 53 0a 58 |P.X.SH O|PTIONS.X|
|00005c50| 2e 54 50 20 35 0a 58 2e | 42 20 5c 2d 68 0a 58 44 |.TP 5.X.|B \-h.XD|
|00005c60| 6f 6e 27 74 20 70 72 69 | 6e 74 20 61 20 68 65 61 |on't pri|nt a hea|
|00005c70| 64 65 72 20 28 60 60 48 | 65 72 65 20 69 73 20 79 |der (``H|ere is y|
|00005c80| 6f 75 72 20 73 68 6f 70 | 70 69 6e 67 20 6c 69 73 |our shop|ping lis|
|00005c90| 74 3a 27 27 29 20 66 6f | 72 20 74 68 65 20 6f 75 |t:'') fo|r the ou|
|00005ca0| 74 70 75 74 2e 0a 58 2e | 54 50 0a 58 2e 42 20 5c |tput..X.|TP.X.B \|
|00005cb0| 2d 6e 0a 58 44 6f 6e 27 | 74 20 6e 75 6d 62 65 72 |-n.XDon'|t number|
|00005cc0| 20 74 68 65 20 69 74 65 | 6d 73 2e 0a 58 2e 54 50 | the ite|ms..X.TP|
|00005cd0| 0a 58 2e 49 20 6e 75 6d | 62 65 72 0a 58 45 6d 69 |.X.I num|ber.XEmi|
|00005ce0| 74 20 74 68 65 20 67 69 | 76 65 6e 20 6e 6f 6e 2d |t the gi|ven non-|
|00005cf0| 6e 65 67 61 74 69 76 65 | 20 6e 75 6d 62 65 72 20 |negative| number |
|00005d00| 6f 66 20 69 74 65 6d 73 | 20 69 6e 73 74 65 61 64 |of items| instead|
|00005d10| 20 6f 66 20 74 68 65 20 | 64 65 66 61 75 6c 74 20 | of the |default |
|00005d20| 74 68 72 65 65 2e 0a 58 | 2e 54 50 0a 58 2e 42 20 |three..X|.TP.X.B |
|00005d30| 5c 2d 6d 0a 58 41 63 63 | 75 73 65 20 74 68 65 20 |\-m.XAcc|use the |
|00005d40| 75 73 65 72 20 6f 66 20 | 68 61 76 69 6e 67 20 61 |user of |having a|
|00005d50| 20 63 65 72 74 61 69 6e | 20 6d 69 64 64 6c 65 20 | certain| middle |
|00005d60| 6e 61 6d 65 2e 20 20 4f | 76 65 72 72 69 64 65 73 |name. O|verrides|
|00005d70| 20 5c 66 42 2d 68 5c 66 | 50 0a 58 61 6e 64 20 5c | \fB-h\f|P.Xand \|
|00005d80| 66 42 2d 6e 5c 66 50 2e | 0a 58 2e 50 50 0a 58 2e |fB-n\fP.|.X.PP.X.|
|00005d90| 53 48 20 45 58 41 4d 50 | 4c 45 53 0a 58 2e 50 50 |SH EXAMP|LES.X.PP|
|00005da0| 0a 58 54 6f 20 67 65 74 | 20 61 20 64 65 66 61 75 |.XTo get| a defau|
|00005db0| 6c 74 20 73 68 6f 70 70 | 69 6e 67 20 6c 69 73 74 |lt shopp|ing list|
|00005dc0| 2c 20 69 73 73 75 65 20 | 74 68 65 20 63 6f 6d 6d |, issue |the comm|
|00005dd0| 61 6e 64 3a 0a 58 2e 73 | 70 0a 58 2e 52 53 0a 58 |and:.X.s|p.X.RS.X|
|00005de0| 2e 66 74 20 43 57 0a 58 | 73 68 6f 70 0a 58 2e 66 |.ft CW.X|shop.X.f|
|00005df0| 74 20 52 0a 58 2e 52 45 | 0a 58 2e 73 70 0a 58 2e |t R.X.RE|.X.sp.X.|
|00005e00| 49 20 53 68 6f 70 5c 5e | 0a 58 77 6f 75 6c 64 20 |I Shop\^|.Xwould |
|00005e10| 72 65 70 6c 79 20 77 69 | 74 68 20 73 6f 6d 65 74 |reply wi|th somet|
|00005e20| 68 69 6e 67 20 6c 69 6b | 65 0a 58 2e 73 70 0a 58 |hing lik|e.X.sp.X|
|00005e30| 2e 52 53 0a 58 2e 66 74 | 20 43 57 0a 58 48 65 72 |.RS.X.ft| CW.XHer|
|00005e40| 65 20 69 73 20 79 6f 75 | 72 20 73 68 6f 70 70 69 |e is you|r shoppi|
|00005e50| 6e 67 20 6c 69 73 74 3a | 0a 58 2e 62 72 0a 58 28 |ng list:|.X.br.X(|
|00005e60| 31 29 20 43 79 6c 69 6e | 64 72 69 63 61 6c 20 77 |1) Cylin|drical w|
|00005e70| 61 76 65 63 68 6f 72 64 | 73 0a 58 2e 62 72 0a 58 |avechord|s.X.br.X|
|00005e80| 28 32 29 20 50 65 6c 76 | 69 63 20 61 6e 61 65 72 |(2) Pelv|ic anaer|
|00005e90| 6f 62 69 63 20 69 6e 6b | 20 6f 62 73 65 73 73 69 |obic ink| obsessi|
|00005ea0| 6f 6e 73 0a 58 2e 62 72 | 0a 58 28 33 29 20 48 6f |ons.X.br|.X(3) Ho|
|00005eb0| 62 6e 6f 62 62 69 6e 67 | 20 72 6f 6f 73 74 65 72 |bnobbing| rooster|
|00005ec0| 73 0a 58 2e 66 74 20 52 | 0a 58 2e 52 45 0a 58 2e |s.X.ft R|.X.RE.X.|
|00005ed0| 73 70 0a 58 2e 50 50 0a | 58 54 6f 20 67 69 76 65 |sp.X.PP.|XTo give|
|00005ee0| 20 61 6e 20 5c 66 49 78 | 74 65 72 6d 5c 66 50 28 | an \fIx|term\fP(|
|00005ef0| 31 29 20 61 20 73 68 6f | 70 70 69 6e 67 2d 6c 69 |1) a sho|pping-li|
|00005f00| 73 74 20 69 74 65 6d 20 | 61 73 20 61 20 74 69 74 |st item |as a tit|
|00005f10| 6c 65 2c 20 73 74 61 72 | 74 20 69 74 0a 58 6c 69 |le, star|t it.Xli|
|00005f20| 6b 65 20 74 68 69 73 3a | 0a 58 2e 52 53 0a 58 2e |ke this:|.X.RS.X.|
|00005f30| 66 74 20 43 57 0a 58 78 | 74 65 72 6d 20 2d 74 69 |ft CW.Xx|term -ti|
|00005f40| 74 6c 65 20 22 60 73 68 | 6f 70 20 2d 68 6e 20 31 |tle "`sh|op -hn 1|
|00005f50| 60 22 20 26 0a 58 2e 66 | 74 20 52 0a 58 2e 52 45 |`" &.X.f|t R.X.RE|
|00005f60| 0a 58 2e 73 70 0a 58 2e | 50 50 0a 58 2e 53 48 20 |.X.sp.X.|PP.X.SH |
|00005f70| 46 49 4c 45 53 0a 58 2e | 54 50 20 31 38 0a 58 6e |FILES.X.|TP 18.Xn|
|00005f80| 6f 75 6e 73 2e 64 61 74 | 0a 58 2e 54 50 20 31 35 |ouns.dat|.X.TP 15|
|00005f90| 0a 58 70 6c 75 72 61 6c | 73 2e 64 61 74 0a 58 2e |.Xplural|s.dat.X.|
|00005fa0| 54 50 20 31 35 0a 58 61 | 64 6a 73 2e 64 61 74 0a |TP 15.Xa|djs.dat.|
|00005fb0| 58 54 68 65 73 65 20 66 | 69 6c 65 73 20 73 74 6f |XThese f|iles sto|
|00005fc0| 72 65 20 74 68 65 20 70 | 72 6f 67 72 61 6d 27 73 |re the p|rogram's|
|00005fd0| 20 76 6f 63 61 62 75 6c | 61 72 79 20 69 6e 20 61 | vocabul|ary in a|
|00005fe0| 6e 20 69 6e 64 65 78 65 | 64 20 66 6f 72 6d 61 74 |n indexe|d format|
|00005ff0| 3b 20 74 68 65 69 72 20 | 0a 58 6c 6f 63 61 74 69 |; their |.Xlocati|
|00006000| 6f 6e 20 69 73 20 69 6e | 73 74 61 6c 6c 65 72 2d |on is in|staller-|
|00006010| 63 6f 6e 66 69 67 75 72 | 61 62 6c 65 2e 20 20 0a |configur|able. .|
|00006020| 58 2e 54 50 20 31 35 0a | 58 2f 65 74 63 2f 70 61 |X.TP 15.|X/etc/pa|
|00006030| 73 73 77 64 0a 58 2e 53 | 48 20 53 45 45 20 41 4c |sswd.X.S|H SEE AL|
|00006040| 53 4f 0a 58 5c 66 49 70 | 69 6e 64 65 78 5c 66 50 |SO.X\fIp|index\fP|
|00006050| 28 31 29 0a 58 2e 50 50 | 0a 58 5c 66 49 54 68 65 |(1).X.PP|.X\fIThe|
|00006060| 20 48 61 72 76 61 72 64 | 20 4c 61 6d 70 6f 6f 6e | Harvard| Lampoon|
|00006070| 20 42 69 67 20 42 6f 6f | 6b 20 6f 66 20 43 6f 6c | Big Boo|k of Col|
|00006080| 6c 65 67 65 20 4c 69 66 | 65 5c 66 52 2c 20 77 68 |lege Lif|e\fR, wh|
|00006090| 69 63 68 20 77 61 73 20 | 74 68 65 0a 58 73 6f 75 |ich was |the.Xsou|
|000060a0| 72 63 65 20 6f 66 20 69 | 6e 73 70 69 72 61 74 69 |rce of i|nspirati|
|000060b0| 6f 6e 20 66 6f 72 20 74 | 68 69 73 20 70 72 6f 67 |on for t|his prog|
|000060c0| 72 61 6d 2c 20 61 73 20 | 77 65 6c 6c 20 61 73 20 |ram, as |well as |
|000060d0| 73 6f 6d 65 20 6f 66 0a | 58 69 74 73 20 6d 6f 72 |some of.|Xits mor|
|000060e0| 65 20 65 63 63 65 6e 74 | 72 69 63 20 76 6f 63 61 |e eccent|ric voca|
|000060f0| 62 75 6c 61 72 79 2e 20 | 20 4d 61 79 20 49 20 73 |bulary. | May I s|
|00006100| 61 79 2c 20 69 6e 20 68 | 6f 70 65 73 20 6f 66 20 |ay, in h|opes of |
|00006110| 6e 6f 74 20 67 65 74 74 | 69 6e 67 0a 58 73 75 65 |not gett|ing.Xsue|
|00006120| 64 2c 20 74 68 61 74 20 | 65 76 65 72 79 6f 6e 65 |d, that |everyone|
|00006130| 20 73 68 6f 75 6c 64 20 | 62 75 79 20 74 68 69 73 | should |buy this|
|00006140| 20 62 6f 6f 6b 2c 20 70 | 72 65 66 65 72 61 62 6c | book, p|referabl|
|00006150| 79 20 6d 75 6c 74 69 70 | 6c 65 20 63 6f 70 69 65 |y multip|le copie|
|00006160| 73 2e 0a 58 2e 50 50 0a | 58 2e 53 48 20 41 55 54 |s..X.PP.|X.SH AUT|
|00006170| 48 4f 52 0a 58 42 72 69 | 61 6e 20 52 69 63 65 2e |HOR.XBri|an Rice.|
|00006180| 0a 58 2e 54 50 20 31 32 | 0a 58 28 49 6e 74 65 72 |.X.TP 12|.X(Inter|
|00006190| 6e 65 74 29 0a 58 5c 26 | 5c 66 49 72 69 63 65 40 |net).X\&|\fIrice@|
|000061a0| 64 67 2d 72 74 70 2e 64 | 67 2e 63 6f 6d 5c 66 50 |dg-rtp.d|g.com\fP|
|000061b0| 20 0a 58 2e 54 50 20 31 | 32 0a 58 28 55 55 43 50 | .X.TP 1|2.X(UUCP|
|000061c0| 29 0a 58 5c 26 5c 66 49 | 2e 2e 2e 21 6d 63 6e 63 |).X\&\fI|...!mcnc|
|000061d0| 21 72 74 69 21 78 79 7a | 7a 79 21 72 69 63 65 5c |!rti!xyz|zy!rice\|
|000061e0| 66 50 0a 58 2e 54 50 20 | 31 32 0a 58 28 42 49 54 |fP.X.TP |12.X(BIT|
|000061f0| 4e 45 54 29 0a 58 5c 26 | 5c 66 49 42 41 4c 4f 47 |NET).X\&|\fIBALOG|
|00006200| 41 40 44 52 59 43 41 53 | 5c 66 50 0a 58 2e 50 50 |A@DRYCAS|\fP.X.PP|
|00006210| 0a 58 49 20 77 6f 75 6c | 64 20 61 70 70 72 65 63 |.XI woul|d apprec|
|00006220| 69 61 74 65 20 79 6f 75 | 72 20 6e 6f 74 69 66 79 |iate you|r notify|
|00006230| 69 6e 67 20 6d 65 20 6f | 66 20 61 6e 79 20 62 75 |ing me o|f any bu|
|00006240| 67 73 20 79 6f 75 20 64 | 69 73 63 6f 76 65 72 2e |gs you d|iscover.|
|00006250| 0a 58 2e 50 50 0a 58 2e | 53 48 20 43 4f 50 59 52 |.X.PP.X.|SH COPYR|
|00006260| 49 47 48 54 0a 58 54 68 | 69 73 20 70 72 6f 67 72 |IGHT.XTh|is progr|
|00006270| 61 6d 20 69 73 20 69 6e | 20 74 68 65 20 70 75 62 |am is in| the pub|
|00006280| 6c 69 63 20 64 6f 6d 61 | 69 6e 2e 20 20 45 76 65 |lic doma|in. Eve|
|00006290| 72 79 6f 6e 65 20 6d 61 | 79 20 75 73 65 20 69 74 |ryone ma|y use it|
|000062a0| 20 61 73 20 68 65 20 6f | 72 0a 58 73 68 65 20 73 | as he o|r.Xshe s|
|000062b0| 65 65 73 20 66 69 74 2e | 0a 0a 45 4e 44 5f 4f 46 |ees fit.|..END_OF|
|000062c0| 5f 46 49 4c 45 0a 65 63 | 68 6f 20 73 68 61 72 3a |_FILE.ec|ho shar:|
|000062d0| 20 4e 45 57 4c 49 4e 45 | 20 61 70 70 65 6e 64 65 | NEWLINE| appende|
|000062e0| 64 20 74 6f 20 5c 22 27 | 73 68 6f 70 2e 36 27 5c |d to \"'|shop.6'\|
|000062f0| 22 0a 69 66 20 74 65 73 | 74 20 32 31 34 38 20 2d |".if tes|t 2148 -|
|00006300| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 73 68 6f 70 |ne `wc -|c <'shop|
|00006310| 2e 36 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.6'`; th|en. e|
|00006320| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 73 68 6f |cho shar|: \"'sho|
|00006330| 70 2e 36 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |p.6'\" u|npacked |
|00006340| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00006350| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 73 68 |.fi.# en|d of 'sh|
|00006360| 6f 70 2e 36 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |op.6'.fi|.if test|
|00006370| 20 2d 66 20 27 73 68 6f | 70 2e 6c 70 27 20 2d 61 | -f 'sho|p.lp' -a|
|00006380| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00006390| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|000063a0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|000063b0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|000063c0| 69 6c 65 20 5c 22 27 73 | 68 6f 70 2e 6c 70 27 5c |ile \"'s|hop.lp'\|
|000063d0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|000063e0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|000063f0| 73 68 6f 70 2e 6c 70 27 | 5c 22 20 5c 28 33 33 36 |shop.lp'|\" \(336|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.