home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume6 / help / part1 next >
SHell self-extracting ARchive  |  1986-11-30  |  40.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail text default
99% file makefile script, ASCII text, with overstriking default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 76 30 36 69 30 34 35 |Subject:| v06i045|
|00000010| 3a 20 20 48 65 6c 70 20 | 70 72 6f 67 72 61 6d 73 |: Help |programs|
|00000020| 20 28 68 65 6c 70 29 2c | 20 50 61 72 74 31 2f 32 | (help),| Part1/2|
|00000030| 0a 4e 65 77 73 67 72 6f | 75 70 73 3a 20 6d 6f 64 |.Newsgro|ups: mod|
|00000040| 2e 73 6f 75 72 63 65 73 | 0a 41 70 70 72 6f 76 65 |.sources|.Approve|
|00000050| 64 3a 20 72 73 40 6d 69 | 72 72 6f 72 2e 55 55 43 |d: rs@mi|rror.UUC|
|00000060| 50 0a 0a 53 75 62 6d 69 | 74 74 65 64 20 62 79 3a |P..Submi|tted by:|
|00000070| 20 74 61 6c 63 6f 74 74 | 21 73 65 69 73 6d 6f 21 | talcott|!seismo!|
|00000080| 77 75 63 73 21 6e 7a 20 | 28 4e 65 61 6c 20 5a 69 |wucs!nz |(Neal Zi|
|00000090| 72 69 6e 67 29 0a 4d 6f | 64 2e 73 6f 75 72 63 65 |ring).Mo|d.source|
|000000a0| 73 3a 20 56 6f 6c 75 6d | 65 20 36 2c 20 49 73 73 |s: Volum|e 6, Iss|
|000000b0| 75 65 20 34 35 0a 41 72 | 63 68 69 76 65 2d 6e 61 |ue 45.Ar|chive-na|
|000000c0| 6d 65 3a 20 68 65 6c 70 | 2f 50 61 72 74 31 0a 0a |me: help|/Part1..|
|000000d0| 5b 20 20 54 68 69 73 20 | 66 69 72 73 74 20 70 61 |[ This |first pa|
|000000e0| 72 74 20 63 6f 6e 74 61 | 69 6e 73 20 70 72 6f 67 |rt conta|ins prog|
|000000f0| 72 61 6d 20 61 6e 64 20 | 64 6f 63 75 6d 65 6e 74 |ram and |document|
|00000100| 61 74 69 6f 6e 3b 20 74 | 68 65 20 6e 65 78 74 0a |ation; t|he next.|
|00000110| 20 20 20 70 61 72 74 20 | 63 6f 6e 74 61 69 6e 73 | part |contains|
|00000120| 20 61 20 73 6d 61 6c 6c | 20 64 6f 63 75 6d 65 6e | a small| documen|
|00000130| 74 61 74 69 6f 6e 20 74 | 72 65 65 2e 20 20 2d 2d |tation t|ree. --|
|00000140| 72 24 20 5d 0a 0a 23 21 | 20 2f 62 69 6e 2f 73 68 |r$ ]..#!| /bin/sh|
|00000150| 0a 23 20 54 68 69 73 20 | 69 73 20 61 20 73 68 65 |.# This |is a she|
|00000160| 6c 6c 20 61 72 63 68 69 | 76 65 2c 20 6d 65 61 6e |ll archi|ve, mean|
|00000170| 69 6e 67 3a 0a 23 20 31 | 2e 20 52 65 6d 6f 76 65 |ing:.# 1|. Remove|
|00000180| 20 65 76 65 72 79 74 68 | 69 6e 67 20 61 62 6f 76 | everyth|ing abov|
|00000190| 65 20 74 68 65 20 23 21 | 20 2f 62 69 6e 2f 73 68 |e the #!| /bin/sh|
|000001a0| 20 6c 69 6e 65 2e 0a 23 | 20 32 2e 20 53 61 76 65 | line..#| 2. Save|
|000001b0| 20 74 68 65 20 72 65 73 | 75 6c 74 69 6e 67 20 74 | the res|ulting t|
|000001c0| 65 78 74 20 69 6e 20 61 | 20 66 69 6c 65 2e 0a 23 |ext in a| file..#|
|000001d0| 20 33 2e 20 45 78 65 63 | 75 74 65 20 74 68 65 20 | 3. Exec|ute the |
|000001e0| 66 69 6c 65 20 77 69 74 | 68 20 2f 62 69 6e 2f 73 |file wit|h /bin/s|
|000001f0| 68 20 28 6e 6f 74 20 63 | 73 68 29 20 74 6f 20 63 |h (not c|sh) to c|
|00000200| 72 65 61 74 65 20 74 68 | 65 20 66 69 6c 65 73 3a |reate th|e files:|
|00000210| 0a 23 09 4d 61 6b 65 66 | 69 6c 65 0a 23 09 52 45 |.#.Makef|ile.#.RE|
|00000220| 41 44 4d 45 0a 23 09 68 | 65 6c 70 2e 31 0a 23 09 |ADME.#.h|elp.1.#.|
|00000230| 68 65 6c 70 2e 68 0a 23 | 09 68 65 6c 70 2e 63 0a |help.h.#|.help.c.|
|00000240| 23 20 54 68 69 73 20 61 | 72 63 68 69 76 65 20 63 |# This a|rchive c|
|00000250| 72 65 61 74 65 64 3a 20 | 54 75 65 20 4a 75 6e 20 |reated: |Tue Jun |
|00000260| 20 33 20 30 38 3a 32 30 | 3a 30 34 20 31 39 38 36 | 3 08:20|:04 1986|
|00000270| 0a 23 20 42 79 3a 09 4e | 65 61 6c 20 5a 69 72 69 |.# By:.N|eal Ziri|
|00000280| 6e 67 20 28 57 61 73 68 | 69 6e 67 74 6f 6e 20 55 |ng (Wash|ington U|
|00000290| 2e 20 45 6e 67 69 6e 65 | 65 72 69 6e 67 20 43 6f |. Engine|ering Co|
|000002a0| 6d 70 75 74 65 72 20 4c | 61 62 29 0a 65 78 70 6f |mputer L|ab).expo|
|000002b0| 72 74 20 50 41 54 48 3b | 20 50 41 54 48 3d 2f 62 |rt PATH;| PATH=/b|
|000002c0| 69 6e 3a 24 50 41 54 48 | 0a 69 66 20 74 65 73 74 |in:$PATH|.if test|
|000002d0| 20 2d 66 20 27 4d 61 6b | 65 66 69 6c 65 27 0a 74 | -f 'Mak|efile'.t|
|000002e0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|000002f0| 77 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |will not| over-wr|
|00000300| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|00000310| 65 20 22 27 4d 61 6b 65 | 66 69 6c 65 27 22 0a 65 |e "'Make|file'".e|
|00000320| 6c 73 65 0a 63 61 74 20 | 3c 3c 20 5c 53 48 41 52 |lse.cat |<< \SHAR|
|00000330| 5f 45 4f 46 20 3e 20 27 | 4d 61 6b 65 66 69 6c 65 |_EOF > '|Makefile|
|00000340| 27 0a 23 0a 23 20 20 68 | 65 6c 70 20 4d 61 6b 65 |'.#.# h|elp Make|
|00000350| 66 69 6c 65 2c 20 31 2e | 31 09 37 2f 32 37 2f 38 |file, 1.|1.7/27/8|
|00000360| 34 0a 23 0a 43 46 4c 41 | 47 53 3d 20 2d 4f 0a 53 |4.#.CFLA|GS= -O.S|
|00000370| 52 43 53 3d 20 68 65 6c | 70 2e 68 20 68 65 6c 70 |RCS= hel|p.h help|
|00000380| 2e 63 0a 44 45 53 54 44 | 49 52 3d 0a 0a 68 65 6c |.c.DESTD|IR=..hel|
|00000390| 70 3a 09 68 65 6c 70 2e | 6f 20 0a 09 24 7b 43 43 |p:.help.|o ..${CC|
|000003a0| 7d 20 24 7b 43 46 4c 41 | 47 53 7d 20 68 65 6c 70 |} ${CFLA|GS} help|
|000003b0| 2e 6f 20 2d 6f 20 68 65 | 6c 70 0a 0a 69 6e 73 74 |.o -o he|lp..inst|
|000003c0| 61 6c 6c 3a 20 68 65 6c | 70 0a 09 69 6e 73 74 61 |all: hel|p..insta|
|000003d0| 6c 6c 20 2d 73 20 2d 63 | 20 68 65 6c 70 20 24 28 |ll -s -c| help $(|
|000003e0| 44 45 53 54 44 49 52 29 | 2f 75 73 72 2f 6c 6f 63 |DESTDIR)|/usr/loc|
|000003f0| 61 6c 2f 62 69 6e 0a 0a | 68 65 6c 70 2e 6f 3a 20 |al/bin..|help.o: |
|00000400| 68 65 6c 70 2e 68 20 2f | 75 73 72 2f 69 6e 63 6c |help.h /|usr/incl|
|00000410| 75 64 65 2f 73 79 73 2f | 66 69 6c 65 2e 68 20 2f |ude/sys/|file.h /|
|00000420| 75 73 72 2f 69 6e 63 6c | 75 64 65 2f 73 79 73 2f |usr/incl|ude/sys/|
|00000430| 70 61 72 61 6d 2e 68 0a | 0a 63 69 3a 0a 09 63 69 |param.h.|.ci:..ci|
|00000440| 20 2d 6c 20 24 7b 53 52 | 43 53 7d 0a 0a 63 6c 65 | -l ${SR|CS}..cle|
|00000450| 61 6e 3a 20 20 0a 09 72 | 6d 20 2d 66 20 2a 2e 6f |an: ..r|m -f *.o|
|00000460| 20 68 65 6c 70 0a 0a 53 | 48 41 52 5f 45 4f 46 0a | help..S|HAR_EOF.|
|00000470| 66 69 20 23 20 65 6e 64 | 20 6f 66 20 6f 76 65 72 |fi # end| of over|
|00000480| 77 72 69 74 69 6e 67 20 | 63 68 65 63 6b 0a 69 66 |writing |check.if|
|00000490| 20 74 65 73 74 20 2d 66 | 20 27 52 45 41 44 4d 45 | test -f| 'README|
|000004a0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|000004b0| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|000004c0| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000004d0| 66 69 6c 65 20 22 27 52 | 45 41 44 4d 45 27 22 0a |file "'R|EADME'".|
|000004e0| 65 6c 73 65 0a 63 61 74 | 20 3c 3c 20 5c 53 48 41 |else.cat| << \SHA|
|000004f0| 52 5f 45 4f 46 20 3e 20 | 27 52 45 41 44 4d 45 27 |R_EOF > |'README'|
|00000500| 0a 0a 20 48 65 6c 70 20 | 69 73 20 61 20 66 61 63 |.. Help |is a fac|
|00000510| 69 6c 69 74 79 20 66 6f | 72 20 63 6c 69 6d 62 69 |ility fo|r climbi|
|00000520| 6e 67 20 61 20 74 72 65 | 65 20 73 74 72 75 63 74 |ng a tre|e struct|
|00000530| 75 72 65 2e 0a 0a 20 48 | 65 6c 70 20 63 6f 6d 65 |ure... H|elp come|
|00000540| 73 20 69 6e 20 74 77 6f | 20 74 79 70 65 73 3a 20 |s in two| types: |
|00000550| 61 20 68 65 6c 70 20 74 | 6f 70 69 63 20 77 69 74 |a help t|opic wit|
|00000560| 68 20 73 75 62 74 6f 70 | 69 63 73 2c 20 6f 72 20 |h subtop|ics, or |
|00000570| 61 20 68 65 6c 70 20 74 | 6f 70 69 63 0a 20 77 69 |a help t|opic. wi|
|00000580| 74 68 6f 75 74 20 61 6e | 79 20 73 75 62 74 6f 70 |thout an|y subtop|
|00000590| 69 63 73 2e 20 20 0a 0a | 09 54 6f 70 69 63 73 20 |ics. ..|.Topics |
|000005a0| 74 68 61 74 20 68 61 76 | 65 20 6e 6f 20 73 75 62 |that hav|e no sub|
|000005b0| 74 6f 70 69 63 73 20 72 | 65 73 69 64 65 20 69 6e |topics r|eside in|
|000005c0| 20 74 68 65 20 64 69 72 | 65 63 74 6f 72 79 20 74 | the dir|ectory t|
|000005d0| 68 65 79 20 61 72 65 0a | 09 61 20 73 75 62 74 6f |hey are.|.a subto|
|000005e0| 70 69 63 20 6f 66 2c 20 | 77 69 74 68 20 66 69 6c |pic of, |with fil|
|000005f0| 65 6e 61 6d 65 73 20 60 | 74 6f 70 69 63 6e 61 6d |enames `|topicnam|
|00000600| 65 2e 48 4c 50 27 0a 0a | 09 54 6f 70 69 63 73 20 |e.HLP'..|.Topics |
|00000610| 74 68 61 74 20 68 61 76 | 65 20 73 75 62 74 6f 70 |that hav|e subtop|
|00000620| 69 63 73 20 6f 66 20 74 | 68 65 69 72 20 6f 77 6e |ics of t|heir own|
|00000630| 20 72 65 73 69 64 65 20 | 69 6e 20 64 69 72 65 63 | reside |in direc|
|00000640| 74 6f 72 69 65 73 0a 09 | 77 68 69 63 68 20 61 72 |tories..|which ar|
|00000650| 65 20 73 75 62 64 69 72 | 65 63 74 6f 72 69 65 73 |e subdir|ectories|
|00000660| 20 6f 66 20 74 68 65 20 | 68 65 6c 70 20 74 6f 70 | of the |help top|
|00000670| 69 63 20 6f 66 20 77 68 | 69 63 68 20 74 68 65 79 |ic of wh|ich they|
|00000680| 20 61 72 65 0a 09 73 75 | 62 74 6f 70 69 63 73 2c | are..su|btopics,|
|00000690| 20 61 6e 64 20 68 61 76 | 65 20 66 69 6c 65 6e 61 | and hav|e filena|
|000006a0| 6d 65 73 20 60 2e 48 4c | 50 27 20 20 54 68 69 65 |mes `.HL|P' Thie|
|000006b0| 72 20 73 75 62 74 6f 70 | 69 63 73 20 68 61 76 65 |r subtop|ics have|
|000006c0| 20 74 68 65 0a 09 66 69 | 6c 65 6e 61 6d 65 73 20 | the..fi|lenames |
|000006d0| 60 74 6f 70 69 63 6e 61 | 6d 65 2e 48 4c 50 27 2e |`topicna|me.HLP'.|
|000006e0| 20 20 41 20 64 69 72 65 | 63 74 6f 72 79 20 66 6f | A dire|ctory fo|
|000006f0| 72 20 61 20 73 75 62 74 | 6f 70 69 63 20 6a 75 73 |r a subt|opic jus|
|00000700| 74 0a 09 68 61 73 20 74 | 68 65 20 73 75 62 74 6f |t..has t|he subto|
|00000710| 70 69 63 27 73 20 6e 61 | 6d 65 20 61 73 20 69 74 |pic's na|me as it|
|00000720| 73 20 64 69 72 65 63 74 | 6f 72 79 20 6e 61 6d 65 |s direct|ory name|
|00000730| 2e 0a 0a 09 46 6f 72 20 | 69 6e 73 74 61 6e 63 65 |....For |instance|
|00000740| 2c 20 69 66 20 79 6f 75 | 20 68 61 64 20 61 20 68 |, if you| had a h|
|00000750| 65 6c 70 20 74 6f 70 69 | 63 20 22 6c 73 22 20 77 |elp topi|c "ls" w|
|00000760| 69 74 68 20 73 6f 6d 65 | 20 73 75 62 74 6f 70 69 |ith some| subtopi|
|00000770| 63 73 2c 0a 09 2f 75 73 | 72 2f 68 65 6c 70 2f 6c |cs,../us|r/help/l|
|00000780| 73 20 77 6f 75 6c 64 20 | 62 65 20 61 20 64 69 72 |s would |be a dir|
|00000790| 65 63 74 6f 72 79 2c 20 | 63 6f 6e 74 61 69 6e 69 |ectory, |containi|
|000007a0| 6e 67 20 74 68 65 20 66 | 69 6c 65 73 0a 0a 09 09 |ng the f|iles....|
|000007b0| 2f 75 73 72 2f 68 65 6c | 70 2f 6c 73 2f 2e 48 4c |/usr/hel|p/ls/.HL|
|000007c0| 50 09 6d 61 69 6e 20 68 | 65 6c 70 20 74 65 78 74 |P.main h|elp text|
|000007d0| 0a 09 09 2f 75 73 72 2f | 68 65 6c 70 2f 6c 73 2f |.../usr/|help/ls/|
|000007e0| 2e 4d 41 4e 55 41 4c 09 | 73 68 65 6c 6c 20 73 63 |.MANUAL.|shell sc|
|000007f0| 72 69 70 74 20 66 6f 72 | 20 61 63 63 65 73 73 69 |ript for| accessi|
|00000800| 6e 67 20 6d 61 6e 20 70 | 61 67 65 0a 09 09 2f 75 |ng man p|age.../u|
|00000810| 73 72 2f 68 65 6c 70 2f | 6c 73 2f 6f 70 74 69 6f |sr/help/|ls/optio|
|00000820| 6e 73 2e 48 4c 50 09 68 | 65 6c 70 20 66 6f 72 20 |ns.HLP.h|elp for |
|00000830| 6c 73 20 6f 70 74 69 6f | 6e 73 0a 09 09 2f 75 73 |ls optio|ns.../us|
|00000840| 72 2f 68 65 6c 70 2f 6c | 73 2f 6f 75 74 70 75 74 |r/help/l|s/output|
|00000850| 2e 48 4c 50 09 09 68 65 | 6c 70 20 66 6f 72 20 6c |.HLP..he|lp for l|
|00000860| 73 20 6f 75 74 70 75 74 | 20 66 6f 72 6d 61 74 0a |s output| format.|
|00000870| 0a 09 49 66 20 79 6f 75 | 20 68 61 64 20 61 20 73 |..If you| had a s|
|00000880| 69 6d 70 6c 65 20 68 65 | 6c 70 20 66 6f 72 20 74 |imple he|lp for t|
|00000890| 68 65 20 77 68 6f 20 63 | 6f 6d 6d 61 6e 64 2c 20 |he who c|ommand, |
|000008a0| 22 77 68 6f 22 2c 20 69 | 74 20 77 6f 75 6c 64 20 |"who", i|t would |
|000008b0| 63 6f 6d 70 72 69 73 65 | 0a 09 74 68 65 20 66 6f |comprise|..the fo|
|000008c0| 6c 6c 6f 77 69 6e 67 20 | 66 69 6c 65 73 20 61 74 |llowing |files at|
|000008d0| 20 74 68 65 20 74 6f 70 | 20 6c 65 76 65 6c 3a 0a | the top| level:.|
|000008e0| 0a 09 09 2f 75 73 72 2f | 68 65 6c 70 2f 77 68 6f |.../usr/|help/who|
|000008f0| 2e 48 4c 50 09 68 65 6c | 70 20 74 65 78 74 20 66 |.HLP.hel|p text f|
|00000900| 6f 72 20 77 68 6f 28 31 | 29 0a 09 09 2f 75 73 72 |or who(1|).../usr|
|00000910| 2f 68 65 6c 70 2f 77 68 | 6f 2e 4d 41 4e 55 41 4c |/help/wh|o.MANUAL|
|00000920| 09 73 63 72 69 70 74 20 | 66 6f 72 20 61 63 63 65 |.script |for acce|
|00000930| 73 73 69 6e 67 20 77 68 | 6f 28 31 29 20 6d 61 6e |ssing wh|o(1) man|
|00000940| 20 70 61 67 65 0a 0a 54 | 6f 20 6d 61 6b 65 20 68 | page..T|o make h|
|00000950| 65 6c 70 2c 20 63 64 20 | 74 6f 20 74 68 65 20 64 |elp, cd |to the d|
|00000960| 69 72 65 63 74 6f 72 79 | 2c 20 61 6e 64 20 74 79 |irectory|, and ty|
|00000970| 70 65 3a 20 0a 0a 09 25 | 20 6d 61 6b 65 20 68 65 |pe: ...%| make he|
|00000980| 6c 70 0a 0a 6f 72 0a 0a | 09 25 20 6d 61 6b 65 20 |lp..or..|.% make |
|00000990| 69 6e 73 74 61 6c 6c 0a | 0a 69 66 20 79 6f 75 20 |install.|.if you |
|000009a0| 61 72 65 20 61 6d 62 69 | 74 69 6f 75 73 2e 20 20 |are ambi|tious. |
|000009b0| 54 68 65 20 73 6f 75 72 | 63 65 20 66 6f 72 20 68 |The sour|ce for h|
|000009c0| 65 6c 70 20 69 73 20 6f | 6e 65 20 43 20 6d 6f 64 |elp is o|ne C mod|
|000009d0| 75 6c 65 2c 20 68 65 6c | 70 2e 63 2c 20 77 69 74 |ule, hel|p.c, wit|
|000009e0| 68 20 61 20 0a 68 65 61 | 64 65 72 20 66 69 6c 65 |h a .hea|der file|
|000009f0| 2c 20 68 65 6c 70 2e 68 | 2e 0a 0a 48 65 6c 70 20 |, help.h|...Help |
|00000a00| 75 73 65 73 20 74 68 65 | 20 6d 6f 72 65 28 31 29 |uses the| more(1)|
|00000a10| 20 70 72 6f 67 72 61 6d | 20 74 6f 20 72 65 61 64 | program| to read|
|00000a20| 20 68 65 6c 70 20 74 65 | 78 74 73 2e 20 20 4d 61 | help te|xts. Ma|
|00000a30| 6b 65 20 73 75 72 65 20 | 74 68 61 74 20 6d 6f 72 |ke sure |that mor|
|00000a40| 65 0a 72 65 73 69 64 65 | 73 20 6f 6e 20 74 68 65 |e.reside|s on the|
|00000a50| 20 70 61 74 68 20 73 70 | 65 63 69 66 69 65 64 20 | path sp|ecified |
|00000a60| 62 79 20 74 68 65 20 56 | 49 45 57 50 52 4f 47 52 |by the V|IEWPROGR|
|00000a70| 41 4d 20 64 65 66 69 6e | 65 64 20 73 79 6d 62 6f |AM defin|ed symbo|
|00000a80| 6c 20 69 6e 20 68 65 6c | 70 2e 68 2e 0a 0a 53 48 |l in hel|p.h...SH|
|00000a90| 41 52 5f 45 4f 46 0a 66 | 69 20 23 20 65 6e 64 20 |AR_EOF.f|i # end |
|00000aa0| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|00000ab0| 68 65 63 6b 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |heck.if |test -f |
|00000ac0| 27 68 65 6c 70 2e 31 27 | 0a 74 68 65 6e 0a 09 65 |'help.1'|.then..e|
|00000ad0| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|00000ae0| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00000af0| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 68 65 |isting f|ile "'he|
|00000b00| 6c 70 2e 31 27 22 0a 65 | 6c 73 65 0a 63 61 74 20 |lp.1'".e|lse.cat |
|00000b10| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00000b20| 68 65 6c 70 2e 31 27 0a | 2e 54 48 20 48 45 4c 50 |help.1'.|.TH HELP|
|00000b30| 20 31 20 22 32 39 20 4e | 6f 76 65 6d 62 65 72 20 | 1 "29 N|ovember |
|00000b40| 31 39 38 34 22 0a 2e 55 | 43 20 34 0a 2e 53 48 20 |1984"..U|C 4..SH |
|00000b50| 4e 41 4d 45 0a 68 65 6c | 70 20 5c 2d 20 75 73 65 |NAME.hel|p \- use|
|00000b60| 72 2d 66 72 69 65 6e 64 | 6c 79 20 64 6f 63 75 6d |r-friend|ly docum|
|00000b70| 65 6e 74 61 74 69 6f 6e | 20 72 65 61 64 65 72 0a |entation| reader.|
|00000b80| 2e 53 48 20 53 59 4e 4f | 50 53 49 53 0a 2e 42 20 |.SH SYNO|PSIS..B |
|00000b90| 68 65 6c 70 0a 5b 20 2d | 64 6c 71 43 6e 20 5b 20 |help.[ -|dlqCn [ |
|00000ba0| 5c 66 49 6f 70 74 69 6f | 6e 2d 61 72 67 73 5c 66 |\fIoptio|n-args\f|
|00000bb0| 50 20 5d 20 5d 5c 20 5c | 20 5c 20 5b 20 5c 66 49 |P ] ]\ \| \ [ \fI|
|00000bc0| 74 6f 70 69 63 2d 70 61 | 74 68 5c 66 50 20 5d 0a |topic-pa|th\fP ].|
|00000bd0| 2e 62 72 0a 2e 53 48 20 | 44 45 53 43 52 49 50 54 |.br..SH |DESCRIPT|
|00000be0| 49 4f 4e 0a 2e 49 20 48 | 65 6c 70 0a 69 73 20 61 |ION..I H|elp.is a|
|00000bf0| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 72 | documen|tation r|
|00000c00| 65 61 64 65 72 20 62 61 | 73 65 64 20 72 6f 75 67 |eader ba|sed roug|
|00000c10| 68 6c 79 20 6f 6e 20 74 | 68 65 20 56 4d 53 28 74 |hly on t|he VMS(t|
|00000c20| 6d 29 20 68 65 6c 70 20 | 66 61 63 69 6c 69 74 79 |m) help |facility|
|00000c30| 2e 0a 44 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 20 |..Docume|ntation |
|00000c40| 74 65 78 74 73 20 61 72 | 65 20 61 72 72 61 6e 67 |texts ar|e arrang|
|00000c50| 65 64 20 69 6e 20 61 20 | 74 72 65 65 2c 20 61 6e |ed in a |tree, an|
|00000c60| 64 20 74 68 65 20 75 73 | 65 72 20 72 65 61 64 73 |d the us|er reads|
|00000c70| 20 74 68 65 6d 20 77 69 | 74 68 0a 2e 49 20 6d 6f | them wi|th..I mo|
|00000c80| 72 65 28 31 29 2e 0a 2e | 49 20 48 65 6c 70 0a 61 |re(1)...|I Help.a|
|00000c90| 6c 6c 6f 77 73 20 64 6f | 63 75 6d 65 6e 74 61 74 |llows do|cumentat|
|00000ca0| 69 6f 6e 20 74 6f 20 62 | 65 20 74 72 65 61 74 65 |ion to b|e treate|
|00000cb0| 64 20 61 73 20 61 6e 20 | 6e 2d 74 72 65 65 2c 20 |d as an |n-tree, |
|00000cc0| 74 68 65 0a 73 74 72 75 | 63 74 75 72 65 20 6f 66 |the.stru|cture of|
|00000cd0| 20 74 68 65 20 68 65 6c | 70 20 74 72 65 65 20 69 | the hel|p tree i|
|00000ce0| 73 20 74 68 65 20 73 74 | 72 75 63 74 75 72 65 20 |s the st|ructure |
|00000cf0| 6f 66 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 79 |of the d|irectory|
|00000d00| 20 74 72 65 65 20 69 6e | 0a 77 68 69 63 68 20 74 | tree in|.which t|
|00000d10| 68 65 20 68 65 6c 70 20 | 66 69 6c 65 73 20 72 65 |he help |files re|
|00000d20| 73 69 64 65 2e 20 20 46 | 75 72 74 68 65 72 2c 20 |side. F|urther, |
|00000d30| 0a 2e 49 20 68 65 6c 70 | 0a 73 75 70 70 6f 72 74 |..I help|.support|
|00000d40| 73 20 61 20 75 73 65 72 | 2d 74 72 61 6e 73 6c 75 |s a user|-translu|
|00000d50| 63 65 6e 74 20 63 72 6f | 73 73 2d 72 65 66 65 72 |cent cro|ss-refer|
|00000d60| 65 6e 63 65 20 66 61 63 | 69 6c 69 74 79 2e 0a 2e |ence fac|ility...|
|00000d70| 50 50 0a 54 68 65 20 68 | 65 6c 70 20 70 72 6f 67 |PP.The h|elp prog|
|00000d80| 72 61 6d 20 69 73 20 69 | 6e 76 6f 6b 65 64 20 66 |ram is i|nvoked f|
|00000d90| 72 6f 6d 20 74 68 65 20 | 73 68 65 6c 6c 20 61 73 |rom the |shell as|
|00000da0| 20 73 68 6f 77 6e 20 62 | 65 6c 6f 77 2e 0a 2e 50 | shown b|elow...P|
|00000db0| 50 0a 09 68 65 6c 70 20 | 20 5b 20 2d 64 6c 71 43 |P..help | [ -dlqC|
|00000dc0| 6e 20 5b 6f 70 74 69 6f | 6e 2d 61 72 67 73 5d 20 |n [optio|n-args] |
|00000dd0| 5d 20 74 6f 70 69 63 20 | 73 75 62 2d 74 6f 70 69 |] topic |sub-topi|
|00000de0| 63 20 73 75 62 2d 73 75 | 62 2d 74 6f 70 69 63 20 |c sub-su|b-topic |
|00000df0| 2e 2e 2e 0a 2e 50 50 0a | 2e 49 20 54 6f 70 69 63 |.....PP.|.I Topic|
|00000e00| 0a 6d 61 79 20 62 65 20 | 61 6e 79 20 74 6f 70 2d |.may be |any top-|
|00000e10| 6c 65 76 65 6c 20 68 65 | 6c 70 20 66 69 6c 65 20 |level he|lp file |
|00000e20| 6e 61 6d 65 2e 20 20 41 | 20 0a 2e 49 20 74 6f 70 |name. A| ..I top|
|00000e30| 69 63 2d 70 61 74 68 0a | 69 73 20 61 20 70 61 74 |ic-path.|is a pat|
|00000e40| 68 20 6f 66 20 74 6f 70 | 69 63 73 20 61 6e 64 20 |h of top|ics and |
|00000e50| 74 68 65 69 72 20 73 75 | 62 74 6f 70 69 63 73 2c |their su|btopics,|
|00000e60| 20 64 6f 77 6e 20 69 6e | 74 6f 20 74 68 65 20 74 | down in|to the t|
|00000e70| 72 65 65 2e 0a 54 6f 70 | 69 63 20 61 6e 64 20 73 |ree..Top|ic and s|
|00000e80| 75 62 74 6f 70 69 63 20 | 6e 61 6d 65 73 20 6d 61 |ubtopic |names ma|
|00000e90| 79 20 62 65 20 61 62 62 | 72 65 76 69 61 74 65 64 |y be abb|reviated|
|00000ea0| 2c 20 62 75 74 20 6e 6f | 20 77 69 6c 64 2d 63 61 |, but no| wild-ca|
|00000eb0| 72 64 73 0a 61 72 65 20 | 72 65 63 6f 67 6e 69 7a |rds.are |recogniz|
|00000ec0| 65 64 2e 0a 49 66 20 61 | 6e 79 20 73 77 69 74 63 |ed..If a|ny switc|
|00000ed0| 68 65 73 20 61 72 65 20 | 70 72 65 73 65 6e 74 20 |hes are |present |
|00000ee0| 74 68 65 79 20 61 6c 6c | 20 6d 75 73 74 20 66 6f |they all| must fo|
|00000ef0| 6c 6c 6f 77 20 61 20 73 | 69 6e 67 6c 65 20 64 61 |llow a s|ingle da|
|00000f00| 73 68 2c 0a 61 6e 64 20 | 62 65 20 74 68 65 20 66 |sh,.and |be the f|
|00000f10| 69 72 73 74 20 6f 70 74 | 69 6f 6e 20 6f 6e 20 74 |irst opt|ion on t|
|00000f20| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 6c 69 6e 65 2e |he comma|nd line.|
|00000f30| 0a 2e 50 50 0a 54 68 65 | 20 6f 70 74 69 6f 6e 73 |..PP.The| options|
|00000f40| 20 61 72 65 3a 0a 2e 54 | 50 20 35 0a 2e 42 20 64 | are:..T|P 5..B d|
|00000f50| 0a 4e 65 78 74 20 61 72 | 67 75 6d 65 6e 74 20 69 |.Next ar|gument i|
|00000f60| 73 20 74 68 65 20 68 65 | 6c 70 20 72 6f 6f 74 20 |s the he|lp root |
|00000f70| 64 69 72 65 63 74 6f 72 | 79 2e 20 20 44 65 66 61 |director|y. Defa|
|00000f80| 75 6c 74 20 69 73 20 2f | 75 73 72 2f 68 65 6c 70 |ult is /|usr/help|
|00000f90| 2e 0a 2e 54 50 20 35 0a | 2e 42 20 6c 0a 55 73 65 |...TP 5.|.B l.Use|
|00000fa0| 20 6c 69 73 74 2d 6f 6e | 6c 79 20 6d 6f 64 65 2e | list-on|ly mode.|
|00000fb0| 20 20 4f 6e 6c 79 20 74 | 68 65 20 6c 69 73 74 20 | Only t|he list |
|00000fc0| 6f 66 20 73 75 62 74 6f | 70 69 63 73 20 66 6f 72 |of subto|pics for|
|00000fd0| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 2d 6c 69 6e | the com|mand-lin|
|00000fe0| 65 0a 68 65 6c 70 20 70 | 61 74 68 20 69 73 20 70 |e.help p|ath is p|
|00000ff0| 72 69 6e 74 65 64 2e 20 | 20 49 6e 74 65 72 61 63 |rinted. | Interac|
|00001000| 74 69 76 65 20 6d 6f 64 | 65 20 69 73 20 6e 6f 74 |tive mod|e is not|
|00001010| 20 75 73 65 64 2e 0a 2e | 54 50 20 35 0a 2e 42 20 | used...|TP 5..B |
|00001020| 71 0a 55 73 65 20 74 65 | 78 74 2d 6f 6e 6c 79 20 |q.Use te|xt-only |
|00001030| 6d 6f 64 65 2e 20 20 4f | 6e 6c 79 20 74 68 65 20 |mode. O|nly the |
|00001040| 74 65 78 74 20 6f 66 20 | 74 68 65 20 68 65 6c 70 |text of |the help|
|00001050| 20 70 61 74 68 20 69 73 | 20 70 72 69 6e 74 65 64 | path is| printed|
|00001060| 2e 0a 49 6e 74 65 72 61 | 63 74 69 76 65 0a 6d 6f |..Intera|ctive.mo|
|00001070| 64 65 20 69 73 20 6e 6f | 74 20 75 73 65 64 2e 0a |de is no|t used..|
|00001080| 2e 54 50 20 35 0a 2e 42 | 20 43 0a 46 6f 72 63 65 |.TP 5..B| C.Force|
|00001090| 73 20 6d 75 6c 74 69 2d | 63 6f 6c 75 6d 6e 20 6f |s multi-|column o|
|000010a0| 75 74 70 75 74 20 6f 66 | 20 73 75 62 74 6f 70 69 |utput of| subtopi|
|000010b0| 63 20 6c 69 73 74 73 2e | 0a 54 68 69 73 20 69 73 |c lists.|.This is|
|000010c0| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 66 6f 72 | the def|ault for|
|000010d0| 20 69 6e 74 65 72 61 63 | 74 69 76 65 20 6d 6f 64 | interac|tive mod|
|000010e0| 65 2e 0a 2e 54 50 20 35 | 0a 2e 42 20 6e 0a 46 6f |e...TP 5|..B n.Fo|
|000010f0| 72 63 65 20 6f 6e 65 2d | 74 6f 70 69 63 2d 70 65 |rce one-|topic-pe|
|00001100| 72 2d 6c 69 6e 65 20 6f | 75 74 70 75 74 20 6f 66 |r-line o|utput of|
|00001110| 20 74 68 65 20 73 75 62 | 74 6f 70 69 63 73 20 6c | the sub|topics l|
|00001120| 69 73 74 73 2e 0a 54 68 | 69 73 20 69 73 20 74 68 |ists..Th|is is th|
|00001130| 65 20 64 65 66 61 75 6c | 74 20 66 6f 72 20 6c 69 |e defaul|t for li|
|00001140| 73 74 20 6d 6f 64 65 2e | 0a 2e 50 50 0a 54 68 65 |st mode.|..PP.The|
|00001150| 20 68 65 6c 70 20 69 6e | 74 65 72 61 63 74 69 76 | help in|teractiv|
|00001160| 65 20 6d 6f 64 65 20 61 | 73 6b 73 20 74 68 65 20 |e mode a|sks the |
|00001170| 75 73 65 72 20 77 68 61 | 74 20 68 65 6c 70 20 68 |user wha|t help h|
|00001180| 65 20 77 6f 75 6c 64 20 | 6c 69 6b 65 20 6e 65 78 |e would |like nex|
|00001190| 74 2e 0a 54 68 65 20 70 | 72 6f 6d 70 74 20 6c 6f |t..The p|rompt lo|
|000011a0| 6f 6b 73 20 6c 69 6b 65 | 20 74 68 69 73 3a 0a 2e |oks like| this:..|
|000011b0| 50 50 0a 48 65 6c 70 20 | 54 6f 70 69 63 3f 0a 2e |PP.Help |Topic?..|
|000011c0| 50 50 0a 6f 72 20 6c 69 | 6b 65 20 74 68 69 73 3a |PP.or li|ke this:|
|000011d0| 0a 2e 50 50 0a 76 69 20 | 63 6f 6d 6d 61 6e 64 73 |..PP.vi |commands|
|000011e0| 20 64 65 6c 65 74 69 6f | 6e 20 73 75 62 74 6f 70 | deletio|n subtop|
|000011f0| 69 63 3f 0a 2e 50 50 0a | 0a 57 68 65 72 65 20 22 |ic?..PP.|.Where "|
|00001200| 76 69 20 63 6f 6d 6d 61 | 6e 64 73 20 64 65 6c 65 |vi comma|nds dele|
|00001210| 74 69 6f 6e 22 20 69 73 | 20 74 68 65 20 0a 2e 49 |tion" is| the ..I|
|00001220| 20 22 74 6f 70 69 63 2d | 70 61 74 68 22 0a 66 6f | "topic-|path".fo|
|00001230| 6c 6c 6f 77 65 64 20 74 | 6f 20 72 65 61 63 68 20 |llowed t|o reach |
|00001240| 74 68 69 73 20 70 72 6f | 6d 70 74 2e 0a 54 68 65 |this pro|mpt..The|
|00001250| 20 70 61 74 68 20 69 73 | 20 70 72 69 6e 74 65 64 | path is| printed|
|00001260| 20 66 6f 72 20 65 61 63 | 68 20 70 72 6f 6d 70 74 | for eac|h prompt|
|00001270| 2c 20 61 6e 64 20 61 73 | 20 61 20 68 65 61 64 65 |, and as| a heade|
|00001280| 72 20 66 6f 72 20 65 61 | 63 68 20 68 65 6c 70 0a |r for ea|ch help.|
|00001290| 74 65 78 74 2e 0a 2e 50 | 50 0a 54 68 65 20 66 6f |text...P|P.The fo|
|000012a0| 6c 6c 6f 77 69 6e 67 20 | 63 6f 6d 6d 61 6e 64 73 |llowing |commands|
|000012b0| 20 61 72 65 20 6d 65 61 | 6e 69 6e 67 66 75 6c 20 | are mea|ningful |
|000012c0| 69 6e 20 74 6f 20 74 68 | 65 20 22 74 6f 70 69 63 |in to th|e "topic|
|000012d0| 3f 22 20 70 72 6f 6d 70 | 74 3a 0a 2e 54 50 20 35 |?" promp|t:..TP 5|
|000012e0| 0a 2e 42 20 3f 0a 50 72 | 69 6e 74 20 63 75 72 72 |..B ?.Pr|int curr|
|000012f0| 65 6e 74 20 68 65 6c 70 | 20 61 6e 64 20 73 75 62 |ent help| and sub|
|00001300| 74 6f 70 69 63 2d 6c 69 | 73 74 20 61 67 61 69 6e |topic-li|st again|
|00001310| 2e 0a 2e 54 50 20 35 0a | 2e 42 20 22 2e 3c 74 6f |...TP 5.|.B ".<to|
|00001320| 70 69 63 2d 6e 61 6d 65 | 3e 22 0a 44 6f 20 61 20 |pic-name|>".Do a |
|00001330| 55 4e 49 58 20 50 72 6f | 67 72 61 6d 6d 65 72 27 |UNIX Pro|grammer'|
|00001340| 73 20 4d 61 6e 75 61 6c | 20 6c 6f 6f 6b 75 70 20 |s Manual| lookup |
|00001350| 28 69 66 20 70 6f 73 73 | 69 62 6c 65 29 2e 20 20 |(if poss|ible). |
|00001360| 49 66 20 6f 74 68 65 72 | 20 63 68 61 72 61 63 74 |If other| charact|
|00001370| 65 72 73 0a 66 6f 6c 6c | 6f 77 20 74 68 65 20 64 |ers.foll|ow the d|
|00001380| 6f 74 2c 20 74 68 65 79 | 20 61 72 65 20 74 61 6b |ot, they| are tak|
|00001390| 65 6e 20 61 73 20 74 68 | 65 20 66 69 6c 65 6e 61 |en as th|e filena|
|000013a0| 6d 65 20 66 6f 72 20 74 | 68 65 20 2e 4d 41 4e 55 |me for t|he .MANU|
|000013b0| 41 4c 20 66 69 6c 65 2e | 0a 28 65 2e 67 2e 20 63 |AL file.|.(e.g. c|
|000013c0| 6f 6d 6d 61 6e 64 20 27 | 2e 77 68 6f 27 20 6c 6f |ommand '|.who' lo|
|000013d0| 6f 6b 73 20 66 6f 72 20 | 66 69 6c 65 20 77 68 6f |oks for |file who|
|000013e0| 2e 4d 41 4e 55 41 4c 29 | 0a 2e 54 50 20 35 0a 2e |.MANUAL)|..TP 5..|
|000013f0| 42 20 22 52 65 74 75 72 | 6e 20 3c 43 52 3e 22 0a |B "Retur|n <CR>".|
|00001400| 45 78 69 74 20 74 68 69 | 73 20 6c 65 76 65 6c 20 |Exit thi|s level |
|00001410| 6f 66 20 68 65 6c 70 2e | 20 20 49 66 20 61 74 20 |of help.| If at |
|00001420| 74 6f 70 20 6c 65 76 65 | 6c 2c 20 67 6f 65 73 20 |top leve|l, goes |
|00001430| 62 61 63 6b 20 74 6f 20 | 63 61 6c 6c 69 6e 67 0a |back to |calling.|
|00001440| 70 72 6f 67 72 61 6d 2e | 0a 2e 54 50 20 35 0a 2e |program.|..TP 5..|
|00001450| 42 20 22 3c 73 75 62 74 | 6f 70 69 63 2d 6e 61 6d |B "<subt|opic-nam|
|00001460| 65 3e 22 0a 52 65 61 64 | 20 74 68 65 20 64 6f 63 |e>".Read| the doc|
|00001470| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 66 6f 72 20 74 |umentati|on for t|
|00001480| 68 69 73 20 73 75 62 74 | 6f 70 69 63 2c 20 6f 72 |his subt|opic, or|
|00001490| 20 61 6c 6c 20 73 75 62 | 74 6f 70 69 63 73 20 66 | all sub|topics f|
|000014a0| 6f 72 20 77 68 69 63 68 | 0a 74 68 69 73 20 69 73 |or which|.this is|
|000014b0| 20 61 20 6c 65 67 61 6c | 20 61 62 62 72 65 76 69 | a legal| abbrevi|
|000014c0| 61 74 69 6f 6e 2e 20 20 | 57 69 6c 64 63 61 72 64 |ation. |Wildcard|
|000014d0| 73 20 61 72 65 20 6e 6f | 74 20 70 65 72 6d 69 74 |s are no|t permit|
|000014e0| 74 65 64 2c 20 62 75 74 | 20 61 0a 73 68 6f 72 74 |ted, but| a.short|
|000014f0| 20 61 62 62 72 65 76 69 | 61 74 69 6f 6e 20 6d 61 | abbrevi|ation ma|
|00001500| 74 63 68 65 73 20 65 76 | 65 72 79 74 68 69 6e 67 |tches ev|erything|
|00001510| 20 6c 6f 6e 67 65 72 2e | 0a 2e 54 50 20 35 0a 2e | longer.|..TP 5..|
|00001520| 42 20 22 23 22 0a 4c 69 | 73 74 20 74 68 65 20 61 |B "#".Li|st the a|
|00001530| 76 61 69 6c 61 62 6c 65 | 20 73 75 62 74 6f 70 69 |vailable| subtopi|
|00001540| 63 73 20 61 67 61 69 6e | 2e 20 20 54 68 69 73 20 |cs again|. This |
|00001550| 6c 69 73 74 73 20 74 68 | 65 20 73 75 62 74 6f 70 |lists th|e subtop|
|00001560| 69 63 73 20 6f 66 20 74 | 68 69 73 0a 6e 6f 64 65 |ics of t|his.node|
|00001570| 2c 20 61 6e 64 20 72 65 | 2d 70 72 6f 6d 70 74 73 |, and re|-prompts|
|00001580| 20 74 68 65 20 75 73 65 | 72 2e 20 20 54 68 65 20 | the use|r. The |
|00001590| 68 65 6c 70 20 74 65 78 | 74 20 69 73 20 4e 4f 54 |help tex|t is NOT|
|000015a0| 20 72 65 2d 70 72 69 6e | 74 65 64 2e 0a 2e 54 50 | re-prin|ted...TP|
|000015b0| 20 35 0a 2e 42 20 22 24 | 3c 74 6f 70 69 63 6e 61 | 5..B "$|<topicna|
|000015c0| 6d 65 3e 22 0a 4c 69 73 | 74 20 73 6f 6d 65 20 69 |me>".Lis|t some i|
|000015d0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 6f 6e 20 74 68 |nformati|on on th|
|000015e0| 65 20 66 69 6c 65 73 20 | 74 68 61 74 20 6d 61 6b |e files |that mak|
|000015f0| 65 20 75 70 20 74 68 69 | 73 20 74 6f 70 69 63 2e |e up thi|s topic.|
|00001600| 20 20 46 69 6c 65 73 0a | 74 68 61 74 20 6d 61 74 | Files.|that mat|
|00001610| 63 68 20 74 68 65 20 61 | 62 62 72 65 76 69 61 74 |ch the a|bbreviat|
|00001620| 69 6f 6e 20 6f 66 20 60 | 74 6f 70 69 63 6e 61 6d |ion of `|topicnam|
|00001630| 65 27 20 61 72 65 20 6c | 6f 6f 6b 65 64 20 75 70 |e' are l|ooked up|
|00001640| 20 77 69 74 68 20 0a 2e | 49 20 66 69 6c 65 28 31 | with ..|I file(1|
|00001650| 29 2e 0a 2e 50 50 0a 4f | 6e 20 34 2e 32 42 53 44 |)...PP.O|n 4.2BSD|
|00001660| 20 55 6e 69 78 20 73 79 | 73 74 65 6d 73 2c 20 0a | Unix sy|stems, .|
|00001670| 2e 49 20 68 65 6c 70 0a | 73 75 70 70 6f 72 74 73 |.I help.|supports|
|00001680| 20 61 20 6c 69 6d 69 74 | 65 64 20 66 6f 72 6d 20 | a limit|ed form |
|00001690| 6f 66 20 54 77 65 6e 65 | 78 2d 73 74 79 6c 65 20 |of Twene|x-style |
|000016a0| 6e 61 6d 65 2d 63 6f 6d | 70 6c 65 74 69 6f 6e 2e |name-com|pletion.|
|000016b0| 0a 54 68 65 20 45 53 43 | 61 70 65 20 63 68 61 72 |.The ESC|ape char|
|000016c0| 61 63 74 65 72 20 69 6e | 76 6f 6b 65 73 20 63 6f |acter in|vokes co|
|000016d0| 6d 70 6c 65 74 69 6f 6e | 20 6f 66 20 61 20 74 6f |mpletion| of a to|
|000016e0| 70 69 63 20 6e 61 6d 65 | 2c 20 74 68 65 20 5e 44 |pic name|, the ^D|
|000016f0| 20 63 68 61 72 61 63 74 | 65 72 0a 70 72 6f 64 75 | charact|er.produ|
|00001700| 63 65 73 20 61 6e 20 61 | 6c 70 68 61 62 65 74 69 |ces an a|lphabeti|
|00001710| 7a 65 64 20 6c 69 73 74 | 20 6f 66 20 70 6f 73 73 |zed list| of poss|
|00001720| 69 62 6c 65 20 63 6f 6d | 70 6c 65 74 69 6f 6e 73 |ible com|pletions|
|00001730| 2e 0a 43 6f 6d 70 6c 65 | 74 69 6f 6e 20 69 73 20 |..Comple|tion is |
|00001740| 63 61 6c 6c 65 64 20 60 | 60 6c 69 6d 69 74 65 64 |called `|`limited|
|00001750| 27 27 20 62 65 63 61 75 | 73 65 20 6f 6e 6c 79 20 |'' becau|se only |
|00001760| 61 20 75 6e 69 71 75 65 | 20 61 62 62 72 65 76 69 |a unique| abbrevi|
|00001770| 61 74 69 6f 6e 0a 63 61 | 6e 20 62 65 20 66 69 6c |ation.ca|n be fil|
|00001780| 6c 65 64 20 6f 75 74 20 | 77 69 74 68 20 74 68 65 |led out |with the|
|00001790| 20 45 53 43 61 70 65 20 | 6b 65 79 20 28 75 6e 6c | ESCape |key (unl|
|000017a0| 69 6b 65 20 74 68 65 20 | 54 77 65 6e 65 78 20 5c |ike the |Twenex \|
|000017b0| 66 49 63 73 68 5c 66 50 | 29 2e 0a 2e 73 70 20 31 |fIcsh\fP|)...sp 1|
|000017c0| 0a 2e 50 50 0a 2e 42 20 | 22 48 45 4c 50 20 46 49 |..PP..B |"HELP FI|
|000017d0| 4c 45 53 22 0a 2e 50 50 | 0a 48 65 6c 70 20 66 69 |LES"..PP|.Help fi|
|000017e0| 6c 65 73 20 61 72 65 20 | 74 68 65 20 74 65 78 74 |les are |the text|
|000017f0| 20 61 6e 64 20 64 69 72 | 65 63 74 6f 72 69 65 73 | and dir|ectories|
|00001800| 20 6f 66 20 74 68 65 20 | 0a 2e 49 20 68 65 6c 70 | of the |..I help|
|00001810| 0a 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 74 |.documen|tation t|
|00001820| 72 65 65 2e 0a 54 68 65 | 72 65 20 61 72 65 20 66 |ree..The|re are f|
|00001830| 6f 75 72 20 6b 69 6e 64 | 73 20 6f 66 20 68 65 6c |our kind|s of hel|
|00001840| 70 20 66 69 6c 65 73 3a | 20 74 6f 70 69 63 20 64 |p files:| topic d|
|00001850| 69 72 65 63 74 6f 72 79 | 2c 20 68 65 6c 70 20 66 |irectory|, help f|
|00001860| 69 6c 65 2c 0a 73 75 62 | 74 6f 70 69 63 20 66 69 |ile,.sub|topic fi|
|00001870| 6c 65 2c 20 61 6e 64 20 | 6d 61 6e 75 61 6c 20 66 |le, and |manual f|
|00001880| 69 6c 65 2e 0a 2e 50 50 | 0a 41 20 74 6f 70 69 63 |ile...PP|.A topic|
|00001890| 20 64 69 72 65 63 74 6f | 72 79 20 69 73 20 61 20 | directo|ry is a |
|000018a0| 64 69 72 65 63 74 6f 72 | 79 20 77 69 74 68 20 74 |director|y with t|
|000018b0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 73 |he name |of the s|
|000018c0| 75 62 74 6f 70 69 63 20 | 69 74 0a 64 65 73 63 72 |ubtopic |it.descr|
|000018d0| 69 62 65 73 20 28 65 2e | 67 2e 20 20 2f 75 73 72 |ibes (e.|g. /usr|
|000018e0| 2f 68 65 6c 70 2f 6c 73 | 2f 6f 70 74 69 6f 6e 73 |/help/ls|/options|
|000018f0| 20 69 73 20 61 20 74 6f | 70 69 63 20 64 69 72 65 | is a to|pic dire|
|00001900| 63 74 6f 72 79 20 61 62 | 6f 75 74 20 74 68 65 0a |ctory ab|out the.|
|00001910| 74 6f 70 69 63 20 6f 66 | 20 6f 70 74 69 6f 6e 73 |topic of| options|
|00001920| 20 66 6f 72 20 0a 2e 49 | 20 6c 73 28 31 29 29 2e | for ..I| ls(1)).|
|00001930| 0a 2e 50 50 0a 41 20 68 | 65 6c 70 20 66 69 6c 65 |..PP.A h|elp file|
|00001940| 20 69 73 20 61 20 66 69 | 6c 65 20 6f 66 20 66 6f | is a fi|le of fo|
|00001950| 72 6d 61 74 74 65 64 20 | 74 65 78 74 20 77 69 74 |rmatted |text wit|
|00001960| 68 20 74 68 65 20 6e 61 | 6d 65 20 22 2e 48 4c 50 |h the na|me ".HLP|
|00001970| 22 2e 20 20 49 74 0a 72 | 65 73 69 64 65 73 20 69 |". It.r|esides i|
|00001980| 6e 20 74 68 65 20 74 6f | 70 69 63 20 64 69 72 65 |n the to|pic dire|
|00001990| 63 74 6f 72 79 20 66 6f | 72 20 77 68 69 63 68 20 |ctory fo|r which |
|000019a0| 69 74 20 69 73 20 74 68 | 65 20 64 65 73 63 72 69 |it is th|e descri|
|000019b0| 70 74 69 6f 6e 20 74 65 | 78 74 2e 0a 2e 50 50 0a |ption te|xt...PP.|
|000019c0| 41 20 73 75 62 74 6f 70 | 69 63 20 66 69 6c 65 20 |A subtop|ic file |
|000019d0| 68 61 73 20 74 68 65 20 | 6e 61 6d 65 20 20 22 73 |has the |name "s|
|000019e0| 75 62 74 6f 70 69 63 2d | 6e 61 6d 65 2e 48 4c 50 |ubtopic-|name.HLP|
|000019f0| 22 2e 20 20 49 74 20 63 | 6f 6e 74 61 69 6e 73 20 |". It c|ontains |
|00001a00| 74 68 65 0a 74 65 78 74 | 20 66 6f 72 20 61 20 73 |the.text| for a s|
|00001a10| 75 62 74 6f 70 69 63 20 | 77 68 69 63 68 20 64 6f |ubtopic |which do|
|00001a20| 65 73 20 6e 6f 74 20 69 | 74 73 65 6c 66 20 68 61 |es not i|tself ha|
|00001a30| 76 65 20 61 6e 79 20 73 | 75 62 74 6f 70 69 63 73 |ve any s|ubtopics|
|00001a40| 2e 0a 2e 50 50 0a 41 20 | 6d 61 6e 75 61 6c 20 66 |...PP.A |manual f|
|00001a50| 69 6c 65 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ile cont|ains the|
|00001a60| 20 63 6f 6d 6d 61 6e 64 | 73 20 74 6f 20 62 65 20 | command|s to be |
|00001a70| 67 69 76 65 6e 20 74 6f | 20 0a 2e 49 20 73 68 28 |given to| ..I sh(|
|00001a80| 31 29 0a 77 68 65 6e 20 | 74 68 65 20 75 73 65 72 |1).when |the user|
|00001a90| 20 67 69 76 65 73 20 74 | 68 65 20 6c 6f 6f 6b 75 | gives t|he looku|
|00001aa0| 70 20 6d 61 6e 75 61 6c | 20 63 6f 6d 6d 61 6e 64 |p manual| command|
|00001ab0| 20 28 2e 29 2e 0a 54 68 | 69 73 20 66 69 6c 65 20 | (.)..Th|is file |
|00001ac0| 68 61 73 20 6e 61 6d 65 | 20 3c 74 6f 70 69 63 3e |has name| <topic>|
|00001ad0| 2e 4d 41 4e 55 41 4c 2e | 20 20 54 68 65 72 65 66 |.MANUAL.| Theref|
|00001ae0| 6f 72 65 20 74 68 65 20 | 6d 61 6e 75 61 6c 20 63 |ore the |manual c|
|00001af0| 6f 6d 6d 61 6e 64 0a 73 | 63 72 69 70 74 20 66 6f |ommand.s|cript fo|
|00001b00| 72 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6e 6f |r the cu|rrent no|
|00001b10| 64 65 20 69 73 20 6a 75 | 73 74 20 22 2e 4d 41 4e |de is ju|st ".MAN|
|00001b20| 55 41 4c 22 2e 0a 2e 62 | 72 0a 41 20 6d 61 6e 75 |UAL"...b|r.A manu|
|00001b30| 61 6c 20 66 69 6c 65 20 | 72 65 73 69 64 65 73 20 |al file |resides |
|00001b40| 69 6e 20 74 68 65 20 73 | 61 6d 65 20 74 6f 70 69 |in the s|ame topi|
|00001b50| 63 20 64 69 72 65 63 74 | 6f 72 79 20 61 73 20 74 |c direct|ory as t|
|00001b60| 68 65 20 68 65 6c 70 20 | 74 65 78 74 20 0a 77 68 |he help |text .wh|
|00001b70| 6f 73 65 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |ose corr|espondin|
|00001b80| 67 0a 6d 61 6e 75 61 6c | 20 69 74 20 61 63 63 65 |g.manual| it acce|
|00001b90| 73 73 65 73 2e 20 20 0a | 54 68 65 20 6d 61 6e 75 |sses. .|The manu|
|00001ba0| 61 6c 20 6d 61 79 20 62 | 65 20 61 20 73 68 65 6c |al may b|e a shel|
|00001bb0| 6c 20 73 63 72 69 70 74 | 20 6f 72 20 61 20 62 69 |l script| or a bi|
|00001bc0| 6e 61 72 79 20 66 69 6c | 65 2c 20 62 75 74 20 69 |nary fil|e, but i|
|00001bd0| 74 20 6d 75 73 74 20 62 | 65 20 6d 61 72 6b 65 64 |t must b|e marked|
|00001be0| 0a 65 78 65 63 75 74 61 | 62 6c 65 20 62 79 20 61 |.executa|ble by a|
|00001bf0| 6c 6c 20 75 73 65 72 73 | 2e 0a 2e 50 50 0a 41 20 |ll users|...PP.A |
|00001c00| 68 65 6c 70 0a 2e 49 20 | 22 63 72 6f 73 73 2d 72 |help..I |"cross-r|
|00001c10| 65 66 65 72 65 6e 63 65 | 20 66 69 6c 65 22 0a 68 |eference| file".h|
|00001c20| 61 73 20 74 68 65 20 65 | 78 74 65 6e 73 69 6f 6e |as the e|xtension|
|00001c30| 20 22 2e 58 52 45 46 22 | 2e 20 20 41 20 63 72 6f | ".XREF"|. A cro|
|00001c40| 73 73 2d 72 65 66 65 72 | 65 6e 63 65 20 69 73 20 |ss-refer|ence is |
|00001c50| 6e 6f 74 20 6c 69 73 74 | 65 64 20 6f 6e 20 74 68 |not list|ed on th|
|00001c60| 65 20 0a 73 75 62 74 6f | 70 69 63 73 20 6c 69 73 |e .subto|pics lis|
|00001c70| 74 2c 20 65 76 65 6e 20 | 74 68 6f 75 67 68 20 69 |t, even |though i|
|00001c80| 74 20 72 65 73 69 64 65 | 73 20 69 6e 20 74 68 65 |t reside|s in the|
|00001c90| 20 73 61 6d 65 20 64 69 | 72 65 63 74 6f 72 69 65 | same di|rectorie|
|00001ca0| 73 20 61 73 20 74 68 65 | 0a 6f 74 68 65 72 20 68 |s as the|.other h|
|00001cb0| 65 6c 70 20 66 69 6c 65 | 73 2e 0a 54 68 65 72 65 |elp file|s..There|
|00001cc0| 20 61 72 65 20 74 77 6f | 20 6b 69 6e 64 73 20 6f | are two| kinds o|
|00001cd0| 66 20 63 72 6f 73 73 20 | 72 65 66 65 72 65 6e 63 |f cross |referenc|
|00001ce0| 65 20 66 69 6c 65 73 3b | 20 0a 2e 49 20 64 69 72 |e files;| ..I dir|
|00001cf0| 65 63 74 0a 72 65 66 65 | 72 65 6e 63 65 73 20 61 |ect.refe|rences a|
|00001d00| 6e 64 0a 2e 49 20 61 70 | 6f 6c 6f 67 79 0a 72 65 |nd..I ap|ology.re|
|00001d10| 66 65 72 65 6e 63 65 2e | 20 20 41 6e 20 61 70 6f |ference.| An apo|
|00001d20| 6c 6f 67 79 20 72 65 66 | 65 72 65 6e 63 65 20 69 |logy ref|erence i|
|00001d30| 73 20 6a 75 73 74 20 73 | 6f 6d 65 20 74 65 78 74 |s just s|ome text|
|00001d40| 2c 20 61 70 6f 6c 6f 67 | 69 7a 69 6e 67 20 66 6f |, apolog|izing fo|
|00001d50| 72 20 74 68 65 20 0a 6c | 61 63 6b 20 6f 66 20 64 |r the .l|ack of d|
|00001d60| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 6e 20 |ocumenta|tion on |
|00001d70| 61 20 70 61 72 74 69 63 | 75 6c 61 72 20 74 6f 70 |a partic|ular top|
|00001d80| 69 63 2e 0a 41 20 64 69 | 72 65 63 74 20 72 65 66 |ic..A di|rect ref|
|00001d90| 65 72 65 6e 63 65 20 69 | 73 20 61 20 6f 6e 65 2d |erence i|s a one-|
|00001da0| 6c 69 6e 65 20 66 69 6c | 65 2c 20 74 68 65 20 66 |line fil|e, the f|
|00001db0| 69 72 73 74 20 63 68 61 | 72 61 63 74 65 72 20 6f |irst cha|racter o|
|00001dc0| 66 20 77 68 69 63 68 20 | 6d 75 73 74 0a 62 65 20 |f which |must.be |
|00001dd0| 74 68 65 20 66 6c 61 67 | 20 27 40 27 2e 20 20 54 |the flag| '@'. T|
|00001de0| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 65 20 6c |he rest |of the l|
|00001df0| 69 6e 65 20 69 73 20 61 | 20 73 65 71 75 65 6e 63 |ine is a| sequenc|
|00001e00| 65 20 6f 66 20 77 6f 72 | 64 73 2c 20 73 65 70 61 |e of wor|ds, sepa|
|00001e10| 72 61 74 65 64 20 62 79 | 0a 73 70 61 63 65 73 2c |rated by|.spaces,|
|00001e20| 20 73 70 65 63 69 66 69 | 6e 67 20 74 68 65 20 63 | specifi|ng the c|
|00001e30| 72 6f 73 73 2d 72 65 66 | 65 72 65 6e 63 65 20 68 |ross-ref|erence h|
|00001e40| 65 6c 70 20 70 61 74 68 | 2e 20 20 46 6f 72 20 69 |elp path|. For i|
|00001e50| 6e 73 74 61 6e 63 65 2c | 20 74 68 65 20 66 69 6c |nstance,| the fil|
|00001e60| 65 0a 2f 75 73 72 2f 68 | 65 6c 70 2f 6c 70 72 2e |e./usr/h|elp/lpr.|
|00001e70| 58 52 45 46 20 6d 69 67 | 68 74 20 63 6f 6e 74 61 |XREF mig|ht conta|
|00001e80| 69 6e 20 74 68 65 20 74 | 65 78 74 3a 0a 2e 50 50 |in the t|ext:..PP|
|00001e90| 0a 5c 20 40 20 70 72 69 | 6e 74 69 6e 67 20 6c 70 |.\ @ pri|nting lp|
|00001ea0| 72 0a 2e 4c 50 0a 54 68 | 65 72 65 66 6f 72 65 2c |r..LP.Th|erefore,|
|00001eb0| 20 6c 70 72 2e 58 52 45 | 46 20 69 73 20 61 20 64 | lpr.XRE|F is a d|
|00001ec0| 69 72 65 63 74 20 63 72 | 6f 73 73 2d 72 65 66 65 |irect cr|oss-refe|
|00001ed0| 72 65 6e 63 65 20 66 69 | 6c 65 2e 0a 2e 73 70 20 |rence fi|le...sp |
|00001ee0| 31 0a 2e 50 50 0a 54 68 | 65 20 75 73 75 61 6c 20 |1..PP.Th|e usual |
|00001ef0| 77 61 79 20 6f 66 20 63 | 61 6c 6c 69 6e 67 20 68 |way of c|alling h|
|00001f00| 65 6c 70 20 69 73 20 74 | 6f 20 6a 75 73 74 20 74 |elp is t|o just t|
|00001f10| 79 70 65 20 0a 2e 73 70 | 20 31 0a 25 0a 2e 49 20 |ype ..sp| 1.%..I |
|00001f20| 68 65 6c 70 0a 2e 50 50 | 0a 69 6e 20 74 68 65 20 |help..PP|.in the |
|00001f30| 73 68 65 6c 6c 2e 20 20 | 54 68 69 73 20 62 72 69 |shell. |This bri|
|00001f40| 6e 67 73 20 75 70 20 68 | 65 6c 70 20 69 6e 74 65 |ngs up h|elp inte|
|00001f50| 72 61 63 74 69 76 65 20 | 6d 6f 64 65 20 61 74 20 |ractive |mode at |
|00001f60| 74 68 65 20 74 6f 70 20 | 6c 65 76 65 6c 0a 6f 66 |the top |level.of|
|00001f70| 20 74 6f 70 69 63 73 2e | 20 20 54 68 65 20 75 73 | topics.| The us|
|00001f80| 65 72 20 63 61 6e 20 61 | 6c 77 61 79 73 20 61 62 |er can a|lways ab|
|00001f90| 6f 72 74 20 77 69 74 68 | 20 63 74 72 6c 2f 44 2e |ort with| ctrl/D.|
|00001fa0| 0a 2e 53 48 20 41 55 54 | 48 4f 52 0a 4e 65 61 6c |..SH AUT|HOR.Neal|
|00001fb0| 20 5a 69 72 69 6e 67 20 | 77 69 74 68 20 47 65 6f | Ziring |with Geo|
|00001fc0| 72 67 65 20 52 6f 62 62 | 65 72 74 2c 20 57 61 73 |rge Robb|ert, Was|
|00001fd0| 68 69 6e 67 74 6f 6e 20 | 55 6e 69 76 65 72 73 69 |hington |Universi|
|00001fe0| 74 79 20 69 6e 20 53 74 | 2e 20 4c 6f 75 69 73 2e |ty in St|. Louis.|
|00001ff0| 0a 2e 53 48 20 46 49 4c | 45 53 0a 2f 75 73 72 2f |..SH FIL|ES./usr/|
|00002000| 6c 6f 63 61 6c 2f 62 69 | 6e 2f 68 65 6c 70 0a 2e |local/bi|n/help..|
|00002010| 62 72 0a 2f 75 73 72 2f | 68 65 6c 70 2a 0a 2e 62 |br./usr/|help*..b|
|00002020| 72 0a 2f 75 73 72 2f 75 | 63 62 2f 6d 6f 72 65 0a |r./usr/u|cb/more.|
|00002030| 2e 62 72 0a 2f 62 69 6e | 2f 73 68 0a 2e 53 48 20 |.br./bin|/sh..SH |
|00002040| 22 53 45 45 20 41 4c 53 | 4f 22 0a 6d 6f 72 65 28 |"SEE ALS|O".more(|
|00002050| 31 29 2c 20 6d 61 6e 28 | 31 29 2c 20 73 68 28 31 |1), man(|1), sh(1|
|00002060| 29 2c 20 73 79 73 74 65 | 6d 28 32 29 2c 20 61 63 |), syste|m(2), ac|
|00002070| 63 65 73 73 28 32 29 0a | 2e 53 48 20 44 49 41 47 |cess(2).|.SH DIAG|
|00002080| 4e 4f 53 54 49 43 53 0a | 45 72 72 6f 72 20 6d 65 |NOSTICS.|Error me|
|00002090| 73 73 61 67 65 73 20 61 | 72 65 20 70 72 69 6e 74 |ssages a|re print|
|000020a0| 65 64 20 77 68 65 6e 65 | 76 65 72 20 61 20 72 65 |ed whene|ver a re|
|000020b0| 71 75 65 73 74 20 69 73 | 20 6d 61 64 65 20 74 6f |quest is| made to|
|000020c0| 20 67 65 74 0a 64 6f 63 | 75 6d 65 6e 74 61 74 69 | get.doc|umentati|
|000020d0| 6f 6e 20 74 68 61 74 20 | 64 6f 65 73 20 6e 6f 74 |on that |does not|
|000020e0| 20 65 78 69 73 74 73 2c | 20 6f 72 20 69 73 20 6e | exists,| or is n|
|000020f0| 6f 74 20 61 63 63 65 73 | 73 69 62 6c 65 2e 20 20 |ot acces|sible. |
|00002100| 0a 2e 50 50 0a 53 69 67 | 6e 61 6c 73 20 61 72 65 |..PP.Sig|nals are|
|00002110| 20 6e 6f 74 20 74 72 61 | 70 70 65 64 2e 0a 2e 53 | not tra|pped...S|
|00002120| 48 20 42 55 47 53 0a 54 | 68 65 20 66 69 6c 65 20 |H BUGS.T|he file |
|00002130| 6e 61 6d 69 6e 67 20 63 | 6f 6e 76 65 6e 74 69 6f |naming c|onventio|
|00002140| 6e 73 20 61 72 65 20 73 | 6f 6d 65 77 68 61 74 20 |ns are s|omewhat |
|00002150| 73 74 72 69 63 74 2e 0a | 2e 50 50 0a 4e 6f 20 77 |strict..|.PP.No w|
|00002160| 69 6c 64 63 61 72 64 73 | 20 61 6c 6c 6f 77 65 64 |ildcards| allowed|
|00002170| 20 69 6e 20 74 6f 70 69 | 63 20 6e 61 6d 65 73 2e | in topi|c names.|
|00002180| 20 20 28 43 6f 75 6c 64 | 20 68 61 76 65 20 6d 61 | (Could| have ma|
|00002190| 64 65 20 74 68 65 6d 20 | 72 65 67 2e 20 65 78 70 |de them |reg. exp|
|000021a0| 2e 0a 62 75 74 20 74 68 | 61 74 20 77 6f 75 6c 64 |..but th|at would|
|000021b0| 20 62 65 20 63 6f 6e 66 | 75 73 69 6e 67 20 74 6f | be conf|using to|
|000021c0| 20 6e 6f 76 69 63 65 73 | 2e 29 0a 2e 50 50 0a 54 | novices|.)..PP.T|
|000021d0| 65 72 6d 69 6e 61 6c 20 | 74 79 70 65 20 69 73 20 |erminal |type is |
|000021e0| 6e 6f 74 20 63 68 65 63 | 6b 65 64 2c 20 74 68 65 |not chec|ked, the|
|000021f0| 20 64 69 73 70 6c 61 79 | 20 69 73 20 61 73 73 75 | display| is assu|
|00002200| 6d 65 64 20 74 6f 20 62 | 65 20 61 74 20 6c 65 61 |med to b|e at lea|
|00002210| 73 74 20 37 36 0a 63 6f | 6c 75 6d 6e 73 20 77 69 |st 76.co|lumns wi|
|00002220| 64 65 2e 0a 2e 50 50 0a | 54 68 65 72 65 20 69 73 |de...PP.|There is|
|00002230| 20 6e 6f 20 77 61 79 20 | 66 6f 72 20 74 68 65 20 | no way |for the |
|00002240| 75 73 65 72 20 74 6f 20 | 73 70 65 63 69 66 79 20 |user to |specify |
|00002250| 61 6e 6f 74 68 65 72 20 | 70 72 6f 67 72 61 6d 20 |another |program |
|00002260| 66 6f 72 20 76 69 65 77 | 69 6e 67 0a 66 69 6c 65 |for view|ing.file|
|00002270| 73 20 28 22 6d 6f 72 65 | 20 2d 64 22 20 69 73 20 |s ("more| -d" is |
|00002280| 61 6c 77 61 79 73 20 75 | 73 65 64 2e 29 20 20 54 |always u|sed.) T|
|00002290| 68 69 73 20 69 73 20 63 | 6f 64 65 64 20 69 6e 74 |his is c|oded int|
|000022a0| 6f 20 74 68 65 20 68 65 | 61 64 65 72 20 66 69 6c |o the he|ader fil|
|000022b0| 65 2e 0a 2e 50 50 0a 54 | 68 65 20 61 6c 67 6f 72 |e...PP.T|he algor|
|000022c0| 69 74 68 6d 20 75 73 65 | 64 20 66 6f 72 20 73 65 |ithm use|d for se|
|000022d0| 6c 65 63 74 69 6e 67 20 | 61 6d 6f 75 6e 67 20 61 |lecting |amoung a|
|000022e0| 6d 62 69 67 75 6f 75 73 | 20 68 65 6c 70 20 70 61 |mbiguous| help pa|
|000022f0| 74 68 73 20 69 73 0a 6e | 6f 6e 2d 6f 62 76 69 6f |ths is.n|on-obvio|
|00002300| 75 73 2c 20 61 6e 64 20 | 63 61 6e 20 62 65 20 63 |us, and |can be c|
|00002310| 6f 6e 66 75 73 69 6e 67 | 20 77 68 65 6e 20 74 6f |onfusing| when to|
|00002320| 6f 2d 73 68 6f 72 74 20 | 61 62 62 72 65 76 69 61 |o-short |abbrevia|
|00002330| 74 69 6f 6e 73 20 61 72 | 65 20 75 73 65 64 2e 0a |tions ar|e used..|
|00002340| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 20 23 20 65 |.SHAR_EO|F.fi # e|
|00002350| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00002360| 67 20 63 68 65 63 6b 0a | 69 66 20 74 65 73 74 20 |g check.|if test |
|00002370| 2d 66 20 27 68 65 6c 70 | 2e 68 27 0a 74 68 65 6e |-f 'help|.h'.then|
|00002380| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|00002390| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|000023a0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|000023b0| 27 68 65 6c 70 2e 68 27 | 22 0a 65 6c 73 65 0a 63 |'help.h'|".else.c|
|000023c0| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|000023d0| 3e 20 27 68 65 6c 70 2e | 68 27 0a 0a 09 2f 2a 0a |> 'help.|h'.../*.|
|000023e0| 20 20 20 20 20 20 20 20 | 20 2a 09 68 65 6c 70 2e | | *.help.|
|000023f0| 68 3a 20 68 65 61 64 65 | 72 20 66 69 6c 65 20 66 |h: heade|r file f|
|00002400| 6f 72 20 74 68 65 20 56 | 4d 53 2d 68 65 6c 70 20 |or the V|MS-help |
|00002410| 65 6d 75 6c 61 74 6f 72 | 0a 09 20 2a 2f 0a 0a 23 |emulator|.. */..#|
|00002420| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|00002430| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 63 74 79 70 |>.#inclu|de <ctyp|
|00002440| 65 2e 68 3e 0a 23 64 65 | 66 69 6e 65 20 42 53 44 |e.h>.#de|fine BSD|
|00002450| 0a 2f 2a 20 23 64 65 66 | 69 6e 65 20 55 53 47 20 |./* #def|ine USG |
|00002460| 2a 2f 0a 23 69 66 64 65 | 66 20 55 53 47 0a 23 69 |*/.#ifde|f USG.#i|
|00002470| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 74 79 70 65 |nclude <|sys/type|
|00002480| 73 2e 68 3e 0a 23 65 6e | 64 69 66 0a 23 69 6e 63 |s.h>.#en|dif.#inc|
|00002490| 6c 75 64 65 20 3c 73 79 | 73 2f 66 69 6c 65 2e 68 |lude <sy|s/file.h|
|000024a0| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |>.#inclu|de <sys/|
|000024b0| 70 61 72 61 6d 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |param.h>|.#includ|
|000024c0| 65 20 3c 73 79 73 2f 64 | 69 72 2e 68 3e 0a 23 69 |e <sys/d|ir.h>.#i|
|000024d0| 66 64 65 66 20 42 53 44 | 0a 23 69 6e 63 6c 75 64 |fdef BSD|.#includ|
|000024e0| 65 20 3c 73 79 73 2f 69 | 6f 63 74 6c 2e 68 3e 0a |e <sys/i|octl.h>.|
|000024f0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 73 69 |#include| <sys/si|
|00002500| 67 6e 61 6c 2e 68 3e 0a | 23 65 6e 64 69 66 0a 0a |gnal.h>.|#endif..|
|00002510| 0a 23 64 65 66 69 6e 65 | 20 69 73 77 68 69 74 65 |.#define| iswhite|
|00002520| 28 5f 63 29 20 20 20 20 | 20 20 20 28 5f 63 20 3d |(_c) | (_c =|
|00002530| 3d 27 20 27 20 7c 7c 20 | 5f 63 20 3d 3d 27 09 27 |=' ' || |_c =='.'|
|00002540| 20 7c 7c 20 5f 63 20 3d | 3d 27 5c 6e 27 20 7c 7c | || _c =|='\n' |||
|00002550| 20 5f 63 20 3d 3d 27 5c | 72 27 29 0a 23 64 65 66 | _c =='\|r').#def|
|00002560| 69 6e 65 20 50 52 4f 4d | 50 54 20 22 20 54 6f 70 |ine PROM|PT " Top|
|00002570| 69 63 3f 20 22 0a 23 64 | 65 66 69 6e 65 20 53 55 |ic? ".#d|efine SU|
|00002580| 42 50 52 4f 4d 50 54 20 | 22 73 75 62 74 6f 70 69 |BPROMPT |"subtopi|
|00002590| 63 3f 20 22 0a 23 64 65 | 66 69 6e 65 20 48 45 4c |c? ".#de|fine HEL|
|000025a0| 50 45 58 09 22 2e 48 4c | 50 22 09 09 09 09 2f 2a |PEX.".HL|P"..../*|
|000025b0| 20 68 65 6c 70 20 65 78 | 74 65 6e 73 69 6f 6e 20 | help ex|tension |
|000025c0| 2a 2f 0a 23 64 65 66 69 | 6e 65 09 4d 41 4e 45 58 |*/.#defi|ne.MANEX|
|000025d0| 09 22 2e 4d 41 4e 55 41 | 4c 22 09 09 09 2f 2a 20 |.".MANUA|L".../* |
|000025e0| 6d 61 6e 75 61 6c 20 66 | 69 6c 65 6e 61 6d 65 2a |manual f|ilename*|
|000025f0| 2f 0a 23 64 65 66 69 6e | 65 20 4d 41 4e 5f 53 55 |/.#defin|e MAN_SU|
|00002600| 42 45 58 20 22 2f 2e 4d | 41 4e 55 41 4c 22 20 20 |BEX "/.M|ANUAL" |
|00002610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002620| 20 20 2f 2a 20 6f 74 68 | 65 72 20 6d 61 6e 20 66 | /* oth|er man f|
|00002630| 69 6c 65 6e 61 6d 65 20 | 2a 2f 0a 23 64 65 66 69 |ilename |*/.#defi|
|00002640| 6e 65 20 58 52 45 46 45 | 58 20 20 22 2e 58 52 45 |ne XREFE|X ".XRE|
|00002650| 46 22 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |F" | |
|00002660| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 63 72 | | /* cr|
|00002670| 6f 73 73 20 72 65 66 65 | 72 65 6e 63 65 20 2a 2f |oss refe|rence */|
|00002680| 0a 23 64 65 66 69 6e 65 | 20 49 4e 46 4f 48 45 41 |.#define| INFOHEA|
|00002690| 44 20 22 66 69 6c 65 20 | 22 0a 23 64 65 66 69 6e |D "file |".#defin|
|000026a0| 65 20 49 4e 46 4f 54 41 | 49 4c 20 22 20 7c 20 73 |e INFOTA|IL " | s|
|000026b0| 65 64 20 27 73 2f 5e 2f | 20 20 20 20 20 2f 27 22 |ed 's/^/| /'"|
|000026c0| 0a 0a 23 64 65 66 69 6e | 65 20 4c 46 20 27 5c 6e |..#defin|e LF '\n|
|000026d0| 27 0a 23 64 65 66 69 6e | 65 20 52 45 54 20 27 5c |'.#defin|e RET '\|
|000026e0| 72 27 0a 23 64 65 66 69 | 6e 65 20 45 53 43 20 27 |r'.#defi|ne ESC '|
|000026f0| 5c 30 33 33 27 0a 0a 23 | 64 65 66 69 6e 65 09 4d |\033'..#|define.M|
|00002700| 41 58 4c 49 4e 45 4c 45 | 4e 09 31 32 38 0a 23 64 |AXLINELE|N.128.#d|
|00002710| 65 66 69 6e 65 09 4d 41 | 58 4e 41 4d 45 4c 45 4e |efine.MA|XNAMELEN|
|00002720| 09 20 32 34 09 09 2f 2a | 20 6d 61 78 20 6c 65 6e |. 24../*| max len|
|00002730| 67 74 68 20 6f 66 20 4e | 41 4d 45 20 6f 66 20 74 |gth of N|AME of t|
|00002740| 6f 70 69 78 20 2a 2f 0a | 23 64 65 66 69 6e 65 09 |opix */.|#define.|
|00002750| 4d 41 58 4e 41 4d 45 53 | 09 32 35 36 09 09 2f 2a |MAXNAMES|.256../*|
|00002760| 20 6d 61 78 69 6d 75 6d | 20 6e 75 6d 62 65 72 20 | maximum| number |
|00002770| 6f 66 20 73 75 62 74 6f | 70 69 63 73 20 2a 2f 0a |of subto|pics */.|
|00002780| 23 64 65 66 69 6e 65 20 | 43 4f 4c 55 4d 4e 53 50 |#define |COLUMNSP|
|00002790| 41 43 45 09 20 20 33 0a | 23 64 65 66 69 6e 65 20 |ACE. 3.|#define |
|000027a0| 54 45 52 4d 57 49 44 09 | 09 20 37 38 0a 23 64 65 |TERMWID.|. 78.#de|
|000027b0| 66 69 6e 65 20 48 45 4c | 50 44 49 52 20 22 2f 75 |fine HEL|PDIR "/u|
|000027c0| 73 72 2f 68 65 6c 70 22 | 0a 23 64 65 66 69 6e 65 |sr/help"|.#define|
|000027d0| 20 56 49 45 57 50 52 4f | 47 52 41 4d 20 20 22 2f | VIEWPRO|GRAM "/|
|000027e0| 75 73 72 2f 75 63 62 2f | 6d 6f 72 65 22 20 20 20 |usr/ucb/|more" |
|000027f0| 20 2f 2a 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 6c | /* prog|ram to l|
|00002800| 6f 6f 6b 20 61 74 20 74 | 65 78 74 20 2a 2f 0a 23 |ook at t|ext */.#|
|00002810| 64 65 66 69 6e 65 20 56 | 49 45 57 50 52 4f 47 4f |define V|IEWPROGO|
|00002820| 50 54 53 31 20 22 2d 64 | 22 0a 23 64 65 66 69 6e |PTS1 "-d|".#defin|
|00002830| 65 20 56 49 45 57 50 52 | 4f 47 4f 50 54 53 32 20 |e VIEWPR|OGOPTS2 |
|00002840| 22 2d 31 38 22 0a 23 64 | 65 66 69 6e 65 20 53 48 |"-18".#d|efine SH|
|00002850| 45 4c 4c 50 52 4f 47 20 | 20 20 20 22 2f 62 69 6e |ELLPROG | "/bin|
|00002860| 2f 73 68 22 09 09 2f 2a | 20 70 72 6f 67 72 61 6d |/sh"../*| program|
|00002870| 20 74 6f 20 65 78 65 63 | 75 74 65 20 74 65 78 74 | to exec|ute text|
|00002880| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 53 48 45 4c | */.#def|ine SHEL|
|00002890| 4c 4f 50 54 53 20 20 20 | 20 22 2d 63 22 0a 0a 63 |LOPTS | "-c"..c|
|000028a0| 68 61 72 20 09 70 72 6f | 67 6e 61 6d 65 5b 4d 41 |har .pro|gname[MA|
|000028b0| 58 4e 41 4d 45 4c 45 4e | 5d 3b 0a 63 68 61 72 09 |XNAMELEN|];.char.|
|000028c0| 6f 6c 64 64 69 72 5b 4d | 41 58 4e 41 4d 45 4c 45 |olddir[M|AXNAMELE|
|000028d0| 4e 20 2b 20 36 38 5d 3b | 0a 63 68 61 72 09 6e 65 |N + 68];|.char.ne|
|000028e0| 77 64 69 72 5b 4d 41 58 | 4e 41 4d 45 4c 45 4e 20 |wdir[MAX|NAMELEN |
|000028f0| 2b 20 36 38 5d 3b 0a 63 | 68 61 72 09 2a 68 65 6c |+ 68];.c|har.*hel|
|00002900| 70 64 69 72 3b 0a 63 68 | 61 72 09 2a 2a 65 6e 76 |pdir;.ch|ar.**env|
|00002910| 69 72 6f 6e 3b 09 2f 2a | 20 65 6e 76 69 72 6f 6e |iron;./*| environ|
|00002920| 6d 65 6e 74 2c 20 66 6f | 72 20 66 6f 72 6b 73 20 |ment, fo|r forks |
|00002930| 2a 2f 0a 63 68 61 72 20 | 20 20 20 67 62 6c 5f 70 |*/.char | gbl_p|
|00002940| 70 74 5b 4d 41 58 4c 49 | 4e 45 4c 45 4e 5d 3b 0a |pt[MAXLI|NELEN];.|
|00002950| 0a 69 6e 74 09 64 75 6d | 62 5f 66 6c 61 67 3b 0a |.int.dum|b_flag;.|
|00002960| 69 6e 74 09 6c 69 73 74 | 5f 66 6c 61 67 3b 0a 69 |int.list|_flag;.i|
|00002970| 6e 74 09 63 6f 6c 5f 66 | 6c 61 67 3b 0a 69 6e 74 |nt.col_f|lag;.int|
|00002980| 09 66 72 73 74 5f 66 6c | 61 67 3b 0a 0a 63 68 61 |.frst_fl|ag;..cha|
|00002990| 72 09 2a 68 65 6c 70 63 | 6d 64 73 5b 5d 20 3d 0a |r.*helpc|mds[] =.|
|000029a0| 09 7b 20 22 52 65 74 75 | 72 6e 20 2d 20 45 78 69 |.{ "Retu|rn - Exi|
|000029b0| 74 20 74 68 69 73 20 6c | 65 76 65 6c 20 6f 66 20 |t this l|evel of |
|000029c0| 68 65 6c 70 22 2c 0a 09 | 20 20 22 2a 09 20 20 2d |help",..| "*. -|
|000029d0| 20 50 72 69 6e 74 20 74 | 68 69 73 20 6d 65 73 73 | Print t|his mess|
|000029e0| 61 67 65 22 2c 0a 09 20 | 20 22 3f 09 20 20 2d 20 |age",.. | "?. - |
|000029f0| 52 65 70 72 69 6e 74 20 | 74 68 69 73 20 68 65 6c |Reprint |this hel|
|00002a00| 70 20 61 6e 64 20 69 74 | 73 20 73 75 62 74 6f 70 |p and it|s subtop|
|00002a10| 69 63 73 22 2c 0a 09 20 | 20 22 23 09 20 20 2d 20 |ics",.. | "#. - |
|00002a20| 52 65 70 72 69 6e 74 20 | 6a 75 73 74 20 73 75 62 |Reprint |just sub|
|00002a30| 74 6f 70 69 63 73 20 6f | 66 20 74 68 69 73 20 68 |topics o|f this h|
|00002a40| 65 6c 70 22 2c 0a 09 20 | 20 22 2e 09 20 20 2d 20 |elp",.. | ".. - |
|00002a50| 4c 6f 6f 6b 20 61 74 20 | 63 75 72 72 65 6e 74 20 |Look at |current |
|00002a60| 6d 61 6e 75 61 6c 20 70 | 61 67 65 2c 20 69 66 20 |manual p|age, if |
|00002a70| 61 6e 79 22 2c 0a 09 20 | 20 22 24 3c 74 6f 70 69 |any",.. | "$<topi|
|00002a80| 63 3e 09 2d 20 47 65 74 | 20 69 6e 66 6f 72 6d 61 |c>.- Get| informa|
|00002a90| 74 69 6f 6e 20 6f 6e 20 | 74 6f 70 69 63 20 66 69 |tion on |topic fi|
|00002aa0| 6c 65 73 22 2c 0a 09 20 | 20 22 2e 3c 74 6f 70 69 |les",.. | ".<topi|
|00002ab0| 63 3e 09 2d 20 4c 6f 6f | 6b 20 61 74 20 74 6f 70 |c>.- Loo|k at top|
|00002ac0| 69 63 20 6d 61 6e 75 61 | 6c 20 70 61 67 65 2c 20 |ic manua|l page, |
|00002ad0| 69 66 20 61 6e 79 22 2c | 0a 09 20 20 22 3c 74 6f |if any",|.. "<to|
|00002ae0| 70 69 63 3e 20 09 2d 20 | 4c 6f 6f 6b 20 61 74 20 |pic> .- |Look at |
|00002af0| 68 65 6c 70 20 66 6f 72 | 20 73 75 62 74 6f 70 69 |help for| subtopi|
|00002b00| 63 20 60 74 6f 70 69 63 | 27 22 20 2c 0a 09 20 20 |c `topic|'" ,.. |
|00002b10| 4e 55 4c 4c 0a 09 7d 3b | 0a 0a 23 69 66 64 65 66 |NULL..};|..#ifdef|
|00002b20| 20 42 53 44 0a 73 74 72 | 75 63 74 20 74 63 68 61 | BSD.str|uct tcha|
|00002b30| 72 73 20 20 2a 69 6e 69 | 74 5f 74 63 68 61 72 73 |rs *ini|t_tchars|
|00002b40| 20 3d 20 4e 55 4c 4c 3b | 0a 73 74 72 75 63 74 20 | = NULL;|.struct |
|00002b50| 74 63 68 61 72 73 20 20 | 2a 68 65 72 65 5f 74 63 |tchars |*here_tc|
|00002b60| 68 61 72 73 20 3d 20 4e | 55 4c 4c 3b 0a 0a 23 64 |hars = N|ULL;..#d|
|00002b70| 65 66 69 6e 65 20 53 65 | 74 5f 54 63 5f 49 6e 69 |efine Se|t_Tc_Ini|
|00002b80| 74 28 46 44 29 20 5c 0a | 20 20 20 20 20 20 20 20 |t(FD) \.| |
|00002b90| 28 28 69 6e 69 74 5f 74 | 63 68 61 72 73 3d 3d 4e |((init_t|chars==N|
|00002ba0| 55 4c 4c 29 3f 28 30 29 | 3a 28 69 6f 63 74 6c 28 |ULL)?(0)|:(ioctl(|
|00002bb0| 46 44 2c 54 49 4f 43 53 | 45 54 43 2c 69 6e 69 74 |FD,TIOCS|ETC,init|
|00002bc0| 5f 74 63 68 61 72 73 29 | 29 29 0a 23 64 65 66 69 |_tchars)|)).#defi|
|00002bd0| 6e 65 20 53 65 74 5f 54 | 63 5f 48 65 72 65 28 46 |ne Set_T|c_Here(F|
|00002be0| 44 29 20 5c 0a 20 20 20 | 20 20 20 20 20 28 28 68 |D) \. | ((h|
|00002bf0| 65 72 65 5f 74 63 68 61 | 72 73 3d 3d 4e 55 4c 4c |ere_tcha|rs==NULL|
|00002c00| 29 3f 28 30 29 3a 28 69 | 6f 63 74 6c 28 46 44 2c |)?(0):(i|octl(FD,|
|00002c10| 54 49 4f 43 53 45 54 43 | 2c 68 65 72 65 5f 74 63 |TIOCSETC|,here_tc|
|00002c20| 68 61 72 73 29 29 29 0a | 0a 69 6e 74 20 69 73 5f |hars))).|.int is_|
|00002c30| 74 74 79 20 3d 20 30 3b | 0a 63 68 61 72 20 2a 72 |tty = 0;|.char *r|
|00002c40| 65 61 64 5f 72 65 73 70 | 28 29 3b 0a 0a 23 64 65 |ead_resp|();..#de|
|00002c50| 66 69 6e 65 20 45 53 43 | 5f 43 4f 4d 50 20 20 20 |fine ESC|_COMP |
|00002c60| 20 20 20 20 31 0a 23 64 | 65 66 69 6e 65 20 43 54 | 1.#d|efine CT|
|00002c70| 52 4c 44 5f 43 4f 4d 50 | 20 20 20 20 2d 31 0a 23 |RLD_COMP| -1.#|
|00002c80| 64 65 66 69 6e 65 20 53 | 50 45 43 5f 43 48 41 52 |define S|PEC_CHAR|
|00002c90| 53 20 20 22 2e 24 3f 2a | 23 22 0a 0a 63 68 61 72 |S ".$?*|#"..char|
|00002ca0| 20 67 62 6c 5f 6d 61 74 | 63 68 5b 4d 41 58 4e 41 | gbl_mat|ch[MAXNA|
|00002cb0| 4d 45 4c 45 4e 5d 3b 0a | 0a 23 65 6c 73 65 0a 23 |MELEN];.|.#else.#|
|00002cc0| 64 65 66 69 6e 65 20 53 | 65 74 5f 54 63 5f 49 6e |define S|et_Tc_In|
|00002cd0| 69 74 20 20 31 0a 23 64 | 65 66 69 6e 65 20 53 65 |it 1.#d|efine Se|
|00002ce0| 74 5f 54 63 5f 48 65 72 | 65 20 20 30 0a 23 65 6e |t_Tc_Her|e 0.#en|
|00002cf0| 64 69 66 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 20 |dif.SHAR|_EOF.fi |
|00002d00| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00002d10| 74 69 6e 67 20 63 68 65 | 63 6b 0a 69 66 20 74 65 |ting che|ck.if te|
|00002d20| 73 74 20 2d 66 20 27 68 | 65 6c 70 2e 63 27 0a 74 |st -f 'h|elp.c'.t|
|00002d30| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00002d40| 77 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |will not| over-wr|
|00002d50| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|00002d60| 65 20 22 27 68 65 6c 70 | 2e 63 27 22 0a 65 6c 73 |e "'help|.c'".els|
|00002d70| 65 0a 63 61 74 20 3c 3c | 20 5c 53 48 41 52 5f 45 |e.cat <<| \SHAR_E|
|00002d80| 4f 46 20 3e 20 27 68 65 | 6c 70 2e 63 27 0a 23 69 |OF > 'he|lp.c'.#i|
|00002d90| 6e 63 6c 75 64 65 20 22 | 68 65 6c 70 2e 68 22 0a |nclude "|help.h".|
|00002da0| 23 64 65 66 69 6e 65 20 | 4d 41 58 4d 41 54 43 48 |#define |MAXMATCH|
|00002db0| 45 53 09 32 34 0a 0a 20 | 2f 2a 20 2a 2a 2a 2a 2a |ES.24.. |/* *****|
|00002dc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002dd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002de0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002df0| 2a 2a 2a 2a 2a 2a 2a 0a | 20 20 2a 20 09 09 09 48 |*******.| * ...H|
|00002e00| 20 20 20 45 20 20 20 4c | 20 20 20 50 20 20 20 20 | E L| P |
|00002e10| 21 21 0a 20 20 2a 09 09 | 20 20 20 20 20 3d 3d 3d |!!. *..| ===|
|00002e20| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002e30| 3d 3d 3d 3d 3d 3d 0a 20 | 20 2a 0a 20 20 2a 20 09 |======. | *. * .|
|00002e40| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 65 6d 75 |This pro|gram emu|
|00002e50| 6c 61 74 65 73 20 74 68 | 65 20 56 4d 53 20 68 65 |lates th|e VMS he|
|00002e60| 6c 70 20 66 61 63 69 6c | 69 74 79 20 69 6e 20 74 |lp facil|ity in t|
|00002e70| 68 65 20 55 4e 49 58 0a | 20 20 2a 20 20 65 6e 76 |he UNIX.| * env|
|00002e80| 69 72 6f 6e 6d 65 6e 74 | 2e 20 20 54 68 65 20 6d |ironment|. The m|
|00002e90| 61 69 6e 20 72 6f 75 74 | 69 6e 65 20 48 45 4c 50 |ain rout|ine HELP|
|00002ea0| 31 20 6c 6f 6f 6b 73 20 | 75 70 20 68 65 6c 70 20 |1 looks |up help |
|00002eb0| 61 6e 64 20 0a 20 20 2a | 20 20 73 75 62 74 6f 70 |and . *| subtop|
|00002ec0| 69 63 73 20 66 6f 72 20 | 68 65 6c 70 2e 20 20 54 |ics for |help. T|
|00002ed0| 68 65 20 68 65 6c 70 20 | 74 65 78 74 73 20 66 6f |he help |texts fo|
|00002ee0| 72 20 76 61 72 69 6f 75 | 73 20 74 6f 70 69 78 20 |r variou|s topix |
|00002ef0| 0a 20 20 2a 20 20 61 72 | 65 20 74 72 65 65 2d 73 |. * ar|e tree-s|
|00002f00| 74 72 75 63 74 75 72 65 | 64 2e 20 20 41 20 64 69 |tructure|d. A di|
|00002f10| 72 65 63 74 6f 72 79 20 | 69 73 20 64 65 66 69 6e |rectory |is defin|
|00002f20| 65 64 20 61 73 20 61 20 | 22 68 65 6c 70 22 0a 20 |ed as a |"help". |
|00002f30| 20 2a 20 20 64 69 72 65 | 63 74 6f 72 79 2c 20 69 | * dire|ctory, i|
|00002f40| 74 20 68 61 73 20 66 6f | 75 72 20 74 79 70 65 73 |t has fo|ur types|
|00002f50| 20 6f 66 20 66 69 6c 65 | 73 20 69 6e 20 69 74 3a | of file|s in it:|
|00002f60| 0a 20 20 2a 09 09 6d 61 | 69 6e 20 68 65 6c 70 20 |. *..ma|in help |
|00002f70| 74 65 78 74 3a 20 09 2e | 48 4c 50 0a 20 20 2a 09 |text: ..|HLP. *.|
|00002f80| 09 6d 61 6e 75 61 6c 20 | 70 61 67 65 20 6e 61 6d |.manual |page nam|
|00002f90| 65 3a 09 2e 4d 41 4e 55 | 41 4c 0a 20 20 2a 09 09 |e:..MANU|AL. *..|
|00002fa0| 73 75 62 74 6f 70 69 63 | 20 74 65 78 74 73 3a 09 |subtopic| texts:.|
|00002fb0| 09 3c 74 6f 70 69 63 6e | 61 6d 65 3e 2e 48 4c 50 |.<topicn|ame>.HLP|
|00002fc0| 0a 20 20 2a 09 09 73 75 | 62 74 6f 70 69 63 20 64 |. *..su|btopic d|
|00002fd0| 69 72 65 63 74 6f 72 69 | 65 73 3a 09 3c 74 6f 70 |irectori|es:.<top|
|00002fe0| 69 63 6e 61 6d 65 3e 0a | 20 20 2a 20 20 20 20 20 |icname>.| * |
|00002ff0| 20 20 20 20 20 20 20 20 | 73 75 62 74 6f 70 69 63 | |subtopic|
|00003000| 20 63 72 6f 73 73 2d 72 | 65 66 73 3a 20 20 20 20 | cross-r|efs: |
|00003010| 3c 74 6f 70 69 63 6e 61 | 6d 65 3e 2e 58 52 45 46 |<topicna|me>.XREF|
|00003020| 0a 20 20 2a 0a 20 20 2a | 09 53 75 62 74 6f 70 69 |. *. *|.Subtopi|
|00003030| 63 20 6e 61 6d 65 73 20 | 6d 75 73 74 20 73 74 61 |c names |must sta|
|00003040| 72 74 20 77 69 74 68 20 | 61 6e 20 61 6c 70 68 61 |rt with |an alpha|
|00003050| 6e 75 6d 65 72 69 63 0a | 20 20 2a 20 20 63 68 61 |numeric.| * cha|
|00003060| 72 61 63 74 65 72 2e 20 | 20 50 72 65 66 65 72 61 |racter. | Prefera|
|00003070| 62 6c 79 20 61 6c 6c 20 | 73 75 62 74 6f 70 69 63 |bly all |subtopic|
|00003080| 73 20 77 69 6c 6c 20 73 | 74 61 72 74 20 77 69 74 |s will s|tart wit|
|00003090| 68 0a 20 20 2a 20 20 6c | 6f 77 65 72 63 61 73 65 |h. * l|owercase|
|000030a0| 20 6c 65 74 74 65 72 73 | 2e 0a 20 20 2a 0a 20 20 | letters|.. *. |
|000030b0| 2a 09 54 68 65 20 72 6f | 75 74 69 6e 65 20 68 65 |*.The ro|utine he|
|000030c0| 6c 70 31 20 69 73 20 72 | 65 63 75 72 73 69 76 65 |lp1 is r|ecursive|
|000030d0| 2c 20 69 74 20 64 65 73 | 63 65 6e 64 73 20 74 68 |, it des|cends th|
|000030e0| 65 09 74 72 65 65 0a 20 | 20 2a 20 20 73 74 72 75 |e.tree. | * stru|
|000030f0| 63 74 75 72 65 2e 0a 20 | 20 2a 2f 0a 0a 20 20 6d |cture.. | */.. m|
|00003100| 61 69 6e 28 61 72 67 63 | 2c 20 61 72 67 76 29 0a |ain(argc|, argv).|
|00003110| 20 20 09 69 6e 74 20 61 | 72 67 63 3b 0a 09 63 68 | .int a|rgc;..ch|
|00003120| 61 72 20 2a 61 72 67 76 | 5b 5d 3b 0a 20 20 7b 0a |ar *argv|[];. {.|
|00003130| 09 69 6e 74 20 69 2c 6a | 2c 6b 3b 0a 09 69 6e 74 |.int i,j|,k;..int|
|00003140| 20 6c 6f 6e 67 6c 65 6e | 3b 0a 09 63 68 61 72 20 | longlen|;..char |
|00003150| 79 65 73 6e 6f 5b 31 30 | 5d 3b 0a 09 63 68 61 72 |yesno[10|];..char|
|00003160| 20 2a 6f 70 74 73 3b 0a | 09 09 0a 09 73 74 72 63 | *opts;.|....strc|
|00003170| 70 79 28 70 72 6f 67 6e | 61 6d 65 2c 61 72 67 76 |py(progn|ame,argv|
|00003180| 5b 30 5d 29 3b 0a 09 68 | 65 6c 70 64 69 72 20 3d |[0]);..h|elpdir =|
|00003190| 20 4e 55 4c 4c 3b 0a 09 | 67 65 74 77 64 28 6f 6c | NULL;..|getwd(ol|
|000031a0| 64 64 69 72 29 3b 0a 09 | 64 75 6d 62 5f 66 6c 61 |ddir);..|dumb_fla|
|000031b0| 67 20 3d 20 30 3b 0a 09 | 6c 69 73 74 5f 66 6c 61 |g = 0;..|list_fla|
|000031c0| 67 20 3d 20 30 3b 0a 09 | 66 72 73 74 5f 66 6c 61 |g = 0;..|frst_fla|
|000031d0| 67 20 3d 20 31 3b 0a 09 | 63 6f 6c 5f 66 6c 61 67 |g = 1;..|col_flag|
|000031e0| 20 20 3d 20 31 3b 0a 0a | 09 61 72 67 63 2d 2d 3b | = 1;..|.argc--;|
|000031f0| 0a 09 69 66 20 28 2a 28 | 2a 2b 2b 61 72 67 76 29 |..if (*(|*++argv)|
|00003200| 20 3d 3d 20 27 2d 27 29 | 20 7b 09 09 2f 2a 20 6d | == '-')| {../* m|
|00003210| 75 73 74 20 62 65 20 6f | 70 74 69 6f 6e 73 20 2a |ust be o|ptions *|
|00003220| 2f 0a 09 09 66 6f 72 20 | 28 6f 70 74 73 20 3d 20 |/...for |(opts = |
|00003230| 2a 61 72 67 76 3b 20 2a | 6f 70 74 73 20 21 3d 20 |*argv; *|opts != |
|00003240| 27 5c 30 27 3b 20 6f 70 | 74 73 2b 2b 29 20 7b 0a |'\0'; op|ts++) {.|
|00003250| 09 09 09 73 77 69 74 63 | 68 28 2a 6f 70 74 73 29 |...switc|h(*opts)|
|00003260| 20 7b 0a 09 09 09 20 20 | 20 63 61 73 65 20 27 2d | {.... | case '-|
|00003270| 27 20 3a 09 0a 09 09 09 | 20 20 20 09 62 72 65 61 |' :.....| .brea|
|00003280| 6b 3b 0a 0a 09 09 09 20 | 20 20 63 61 73 65 20 27 |k;..... | case '|
|00003290| 64 27 20 3a 09 0a 09 09 | 09 20 20 20 09 69 66 20 |d' :....|. .if |
|000032a0| 28 61 72 67 63 20 3e 20 | 31 29 20 7b 0a 09 09 09 |(argc > |1) {....|
|000032b0| 09 09 68 65 6c 70 64 69 | 72 20 3d 20 2a 2b 2b 61 |..helpdi|r = *++a|
|000032c0| 72 67 76 3b 0a 09 09 09 | 09 09 61 72 67 63 2d 2d |rgv;....|..argc--|
|000032d0| 3b 0a 09 09 09 09 7d 0a | 09 09 09 09 62 72 65 61 |;.....}.|....brea|
|000032e0| 6b 3b 0a 0a 09 09 09 20 | 20 20 63 61 73 65 20 27 |k;..... | case '|
|000032f0| 6c 27 20 3a 0a 09 09 09 | 20 20 20 09 6c 69 73 74 |l' :....| .list|
|00003300| 5f 66 6c 61 67 20 3d 20 | 31 3b 0a 09 09 09 09 63 |_flag = |1;.....c|
|00003310| 6f 6c 5f 66 6c 61 67 20 | 3d 20 30 3b 0a 09 09 09 |ol_flag |= 0;....|
|00003320| 09 62 72 65 61 6b 3b 0a | 0a 09 09 09 20 20 20 63 |.break;.|.... c|
|00003330| 61 73 65 20 27 71 27 20 | 3a 0a 09 09 09 20 20 20 |ase 'q' |:.... |
|00003340| 09 64 75 6d 62 5f 66 6c | 61 67 20 3d 20 31 3b 0a |.dumb_fl|ag = 1;.|
|00003350| 09 09 09 09 62 72 65 61 | 6b 3b 0a 0a 09 09 09 20 |....brea|k;..... |
|00003360| 20 20 63 61 73 65 20 27 | 43 27 20 3a 0a 09 09 09 | case '|C' :....|
|00003370| 20 20 20 09 63 6f 6c 5f | 66 6c 61 67 20 3d 20 31 | .col_|flag = 1|
|00003380| 3b 0a 09 09 09 09 62 72 | 65 61 6b 3b 0a 0a 09 09 |;.....br|eak;....|
|00003390| 09 20 20 20 63 61 73 65 | 20 27 6e 27 20 3a 0a 09 |. case| 'n' :..|
|000033a0| 09 09 20 20 20 09 63 6f | 6c 5f 66 6c 61 67 20 3d |.. .co|l_flag =|
|000033b0| 20 30 3b 0a 0a 09 09 09 | 20 20 20 64 65 66 61 75 | 0;.....| defau|
|000033c0| 6c 74 3a 0a 09 09 09 20 | 20 20 20 20 20 20 20 66 |lt:.... | f|
|000033d0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 22 25 |printf(s|tderr,"%|
|000033e0| 73 3a 20 25 63 3a 20 62 | 61 64 20 6f 70 74 69 6f |s: %c: b|ad optio|
|000033f0| 6e 2e 5c 6e 22 2c 0a 09 | 09 09 09 09 70 72 6f 67 |n.\n",..|....prog|
|00003400| 6e 61 6d 65 2c 2a 6f 70 | 74 73 29 3b 0a 09 09 09 |name,*op|ts);....|
|00003410| 09 62 72 65 61 6b 3b 0a | 09 09 09 7d 0a 09 09 7d |.break;.|...}...}|
|00003420| 0a 09 09 61 72 67 63 2d | 2d 3b 20 61 72 67 76 2b |...argc-|-; argv+|
|00003430| 2b 3b 0a 09 7d 0a 0a 09 | 69 66 20 28 68 65 6c 70 |+;..}...|if (help|
|00003440| 64 69 72 20 3d 3d 20 4e | 55 4c 4c 29 20 68 65 6c |dir == N|ULL) hel|
|00003450| 70 64 69 72 20 3d 20 48 | 45 4c 50 44 49 52 3b 0a |pdir = H|ELPDIR;.|
|00003460| 0a 09 69 66 20 28 63 68 | 64 69 72 28 68 65 6c 70 |..if (ch|dir(help|
|00003470| 64 69 72 29 20 3c 20 30 | 29 20 7b 0a 09 09 66 70 |dir) < 0|) {...fp|
|00003480| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 25 73 |rintf(st|derr,"%s|
|00003490| 3a 20 25 73 3a 20 68 65 | 6c 70 20 64 69 72 65 63 |: %s: he|lp direc|
|000034a0| 74 6f 72 79 20 6e 6f 74 | 20 66 6f 75 6e 64 2e 5c |tory not| found.\|
|000034b0| 6e 22 2c 0a 09 09 09 70 | 72 6f 67 6e 61 6d 65 2c |n",....p|rogname,|
|000034c0| 68 65 6c 70 64 69 72 29 | 3b 0a 09 09 65 78 69 74 |helpdir)|;...exit|
|000034d0| 28 31 29 3b 0a 09 7d 0a | 0a 23 69 66 64 65 66 20 |(1);..}.|.#ifdef |
|000034e0| 42 53 44 0a 09 69 6e 69 | 74 5f 66 75 6e 6b 79 28 |BSD..ini|t_funky(|
|000034f0| 29 3b 0a 23 65 6e 64 69 | 66 0a 09 69 66 20 28 61 |);.#endi|f..if (a|
|00003500| 72 67 63 20 3e 3d 20 31 | 29 20 7b 09 09 2f 2a 20 |rgc >= 1|) {../* |
|00003510| 74 72 65 61 74 20 76 65 | 63 74 6f 72 20 61 73 20 |treat ve|ctor as |
|00003520| 61 20 68 65 6c 70 20 70 | 61 74 68 20 2a 2f 0a 23 |a help p|ath */.#|
|00003530| 69 66 64 65 66 20 44 45 | 42 55 47 0a 09 20 20 20 |ifdef DE|BUG.. |
|00003540| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00003550| 22 20 68 65 6c 70 20 70 | 61 74 68 20 76 65 63 74 |" help p|ath vect|
|00003560| 6f 72 2c 20 61 72 67 63 | 3d 25 64 2c 20 2a 61 72 |or, argc|=%d, *ar|
|00003570| 67 76 3d 25 73 2e 5c 6e | 22 2c 0a 09 09 20 20 20 |gv=%s.\n|",... |
|00003580| 20 61 72 67 63 2c 2a 61 | 72 67 76 29 3b 0a 23 65 | argc,*a|rgv);.#e|
|00003590| 6e 64 69 66 0a 09 20 20 | 20 20 68 65 6c 70 31 28 |ndif.. | help1(|
|000035a0| 20 22 22 2c 20 61 72 67 | 76 2c 20 30 2c 20 30 2c | "", arg|v, 0, 0,|
|000035b0| 20 30 29 3b 0a 0a 09 7d | 0a 09 65 6c 73 65 09 68 | 0);...}|..else.h|
|000035c0| 65 6c 70 31 28 20 22 22 | 2c 20 4e 55 4c 4c 2c 20 |elp1( ""|, NULL, |
|000035d0| 30 2c 20 30 2c 20 30 29 | 3b 0a 0a 09 65 78 69 74 |0, 0, 0)|;...exit|
|000035e0| 28 30 29 3b 0a 20 7d 0a | 0a 0a 0a 0a 20 2f 2a 20 |(0);. }.|.... /* |
|000035f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003600| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003610| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003620| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 0a 20 |********|******. |
|00003630| 20 2a 20 70 72 69 6e 74 | 68 65 6c 70 3a 20 67 69 | * print|help: gi|
|00003640| 76 65 6e 20 61 20 73 74 | 72 69 6e 67 2c 20 70 6f |ven a st|ring, po|
|00003650| 70 20 2e 48 4c 50 20 6f | 6e 20 74 68 65 20 65 6e |p .HLP o|n the en|
|00003660| 64 20 61 6e 64 20 64 6f | 20 6d 6f 72 65 28 31 29 |d and do| more(1)|
|00003670| 2e 0a 20 20 2a 0a 20 20 | 2a 09 54 68 69 73 20 72 |.. *. |*.This r|
|00003680| 6f 75 74 69 6e 65 20 73 | 65 6e 64 73 20 61 20 68 |outine s|ends a h|
|00003690| 65 6c 70 20 66 69 6c 65 | 20 74 6f 20 6d 6f 72 65 |elp file| to more|
|000036a0| 28 31 29 2e 20 20 41 20 | 73 74 72 69 6e 67 0a 20 |(1). A |string. |
|000036b0| 20 2a 20 20 69 73 20 70 | 61 73 73 65 64 20 69 6e | * is p|assed in|
|000036c0| 2c 20 77 68 69 63 68 20 | 69 73 20 74 68 65 20 6e |, which |is the n|
|000036d0| 61 6d 65 20 6f 66 20 61 | 20 68 65 6c 70 2e 20 20 |ame of a| help. |
|000036e0| 49 66 20 74 68 65 20 73 | 74 72 69 6e 67 0a 20 20 |If the s|tring. |
|000036f0| 2a 20 20 69 73 20 6e 69 | 6c 2c 20 74 68 65 6e 20 |* is ni|l, then |
|00003700| 6a 75 73 74 20 75 73 65 | 20 74 68 65 20 6e 61 6d |just use| the nam|
|00003710| 65 20 48 4c 50 2e 0a 20 | 20 2a 09 54 68 65 20 72 |e HLP.. | *.The r|
|00003720| 65 74 75 72 6e 20 76 61 | 6c 75 65 20 69 73 20 2d |eturn va|lue is -|
|00003730| 31 20 69 66 20 6e 6f 20 | 68 65 6c 70 20 66 69 6c |1 if no |help fil|
|00003740| 65 20 69 73 20 61 63 63 | 65 73 73 69 62 6c 65 2c |e is acc|essible,|
|00003750| 20 0a 20 20 2a 20 20 30 | 20 69 66 20 74 68 65 20 | . * 0| if the |
|00003760| 6d 6f 72 65 28 31 29 20 | 63 6f 6d 6d 61 6e 64 20 |more(1) |command |
|00003770| 77 61 73 20 63 61 6c 6c | 65 64 20 6f 6b 61 79 20 |was call|ed okay |
|00003780| 77 69 74 68 20 66 6b 6f | 66 66 28 29 3b 0a 20 20 |with fko|ff();. |
|00003790| 2a 2f 0a 0a 20 20 70 72 | 69 6e 74 68 65 6c 70 28 |*/.. pr|inthelp(|
|000037a0| 68 73 2c 20 70 61 74 68 | 29 0a 20 20 09 63 68 61 |hs, path|). .cha|
|000037b0| 72 20 2a 68 73 3b 0a 20 | 20 7b 0a 09 63 68 61 72 |r *hs;. | {..char|
|000037c0| 20 66 69 6c 65 6e 61 6d | 65 5b 4d 41 58 4e 41 4d | filenam|e[MAXNAM|
|000037d0| 45 4c 45 4e 5d 2c 20 63 | 6f 6d 6d 5b 4d 41 58 4e |ELEN], c|omm[MAXN|
|000037e0| 41 4d 45 4c 45 4e 20 2b | 20 32 30 5d 3b 0a 0a 09 |AMELEN +| 20];...|
|000037f0| 69 66 20 28 68 73 20 3d | 3d 20 4e 55 4c 4c 29 20 |if (hs =|= NULL) |
|00003800| 73 74 72 63 70 79 28 66 | 69 6c 65 6e 61 6d 65 2c |strcpy(f|ilename,|
|00003810| 48 45 4c 50 45 58 29 3b | 0a 09 65 6c 73 65 20 69 |HELPEX);|..else i|
|00003820| 66 20 28 73 74 72 6c 65 | 6e 28 68 73 29 20 3c 20 |f (strle|n(hs) < |
|00003830| 31 29 20 73 74 72 63 70 | 79 28 66 69 6c 65 6e 61 |1) strcp|y(filena|
|00003840| 6d 65 2c 20 48 45 4c 50 | 45 58 29 3b 0a 09 65 6c |me, HELP|EX);..el|
|00003850| 73 65 20 7b 0a 09 09 73 | 74 72 63 70 79 28 66 69 |se {...s|trcpy(fi|
|00003860| 6c 65 6e 61 6d 65 2c 20 | 68 73 29 3b 0a 09 09 73 |lename, |hs);...s|
|00003870| 74 72 63 61 74 28 66 69 | 6c 65 6e 61 6d 65 2c 48 |trcat(fi|lename,H|
|00003880| 45 4c 50 45 58 29 3b 0a | 09 7d 0a 0a 09 69 66 20 |ELPEX);.|.}...if |
|00003890| 28 20 61 63 63 65 73 73 | 28 66 69 6c 65 6e 61 6d |( access|(filenam|
|000038a0| 65 2c 20 52 5f 4f 4b 29 | 20 3c 20 30 20 29 20 7b |e, R_OK)| < 0 ) {|
|000038b0| 0a 09 09 70 72 69 6e 74 | 66 28 22 5c 6e 20 53 6f |...print|f("\n So|
|000038c0| 72 72 79 2c 20 6e 6f 20 | 68 65 6c 70 20 74 65 78 |rry, no |help tex|
|000038d0| 74 20 66 6f 72 20 25 73 | 2e 5c 6e 22 2c 0a 09 09 |t for %s|.\n",...|
|000038e0| 09 28 68 73 3d 3d 4e 55 | 4c 4c 29 3f 22 74 68 69 |.(hs==NU|LL)?"thi|
|000038f0| 73 20 74 6f 70 69 63 22 | 3a 68 73 20 29 3b 0a 09 |s topic"|:hs );..|
|00003900| 09 72 65 74 75 72 6e 28 | 2d 31 29 3b 0a 09 7d 0a |.return(|-1);..}.|
|00003910| 0a 09 69 66 20 28 70 61 | 74 68 20 21 3d 20 4e 55 |..if (pa|th != NU|
|00003920| 4c 4c 29 20 70 72 69 6e | 74 66 28 22 5c 6e 20 48 |LL) prin|tf("\n H|
|00003930| 45 4c 50 3a 20 25 73 5c | 6e 22 2c 70 61 74 68 29 |ELP: %s\|n",path)|
|00003940| 3b 0a 0a 09 66 6b 6f 66 | 66 28 56 49 45 57 50 52 |;...fkof|f(VIEWPR|
|00003950| 4f 47 52 41 4d 2c 56 49 | 45 57 50 52 4f 47 4f 50 |OGRAM,VI|EWPROGOP|
|00003960| 54 53 31 2c 56 49 45 57 | 50 52 4f 47 4f 50 54 53 |TS1,VIEW|PROGOPTS|
|00003970| 32 2c 66 69 6c 65 6e 61 | 6d 65 2c 4e 55 4c 4c 29 |2,filena|me,NULL)|
|00003980| 3b 0a 0a 09 72 65 74 75 | 72 6e 28 30 29 3b 0a 20 |;...retu|rn(0);. |
|00003990| 20 7d 0a 0a 0a 0a 2f 2a | 20 2a 2a 2a 2a 2a 2a 2a | }..../*| *******|
|000039a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000039b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000039c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000039d0| 2a 2a 2a 2a 2a 2a 0a 20 | 2a 20 70 72 69 6e 74 74 |******. |* printt|
|000039e0| 6f 70 69 78 3a 20 70 72 | 69 6e 74 20 74 68 65 20 |opix: pr|int the |
|000039f0| 74 6f 70 69 63 73 20 61 | 76 61 69 6c 61 62 6c 65 |topics a|vailable|
|00003a00| 20 69 6e 20 74 68 69 73 | 20 64 69 72 65 63 74 6f | in this| directo|
|00003a10| 72 79 0a 20 2a 09 09 69 | 6e 20 61 20 6e 69 63 65 |ry. *..i|n a nice|
|00003a20| 20 66 6f 72 6d 61 74 2e | 0a 20 2a 0a 20 2a 09 54 | format.|. *. *.T|
|00003a30| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 64 6f 65 73 |his rout|ine does|
|00003a40| 20 61 20 64 69 72 65 63 | 74 6f 72 79 20 6f 66 20 | a direc|tory of |
|00003a50| 68 65 6c 70 20 6f 70 74 | 69 6f 6e 73 2c 20 0a 20 |help opt|ions, . |
|00003a60| 2a 20 20 61 6e 64 20 70 | 72 69 6e 74 73 20 74 68 |* and p|rints th|
|00003a70| 65 6d 20 6f 75 74 20 69 | 6e 20 61 20 6d 61 6e 6e |em out i|n a mann|
|00003a80| 65 72 20 73 69 6d 69 6c | 61 72 20 74 6f 20 74 68 |er simil|ar to th|
|00003a90| 61 74 20 6f 66 20 6c 73 | 28 31 29 2e 0a 20 2a 20 |at of ls|(1).. * |
|00003aa0| 20 41 6c 6c 20 66 69 6c | 65 6e 61 6d 65 73 20 77 | All fil|enames w|
|00003ab0| 68 69 63 68 20 73 74 61 | 72 74 20 77 69 74 68 20 |hich sta|rt with |
|00003ac0| 61 6e 79 74 68 69 6e 67 | 20 6f 74 68 65 72 20 74 |anything| other t|
|00003ad0| 68 61 6e 20 6e 75 6d 62 | 65 72 73 20 0a 20 2a 20 |han numb|ers . * |
|00003ae0| 20 6f 72 20 6c 65 74 74 | 65 72 73 20 61 72 65 20 | or lett|ers are |
|00003af0| 6e 6f 74 20 6b 65 70 74 | 2e 20 20 45 78 74 65 6e |not kept|. Exten|
|00003b00| 73 69 6f 6e 73 20 61 72 | 65 20 73 74 72 69 70 70 |sions ar|e stripp|
|00003b10| 65 64 20 6f 66 66 2e 0a | 20 2a 09 0a 20 2a 09 54 |ed off..| *.. *.T|
|00003b20| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 73 75 62 |he numbe|r of sub|
|00003b30| 74 6f 70 69 63 73 20 66 | 6f 75 6e 64 20 69 73 20 |topics f|ound is |
|00003b40| 72 65 74 75 72 6e 65 64 | 2c 20 61 6c 6f 6e 67 20 |returned|, along |
|00003b50| 77 69 74 68 0a 20 2a 20 | 20 61 20 70 6f 69 6e 74 |with. * | a point|
|00003b60| 65 72 20 74 6f 20 61 20 | 6e 75 6c 6c 2d 74 65 72 |er to a |null-ter|
|00003b70| 6d 69 6e 61 74 65 64 20 | 76 65 63 74 6f 72 20 6f |minated |vector o|
|00003b80| 66 20 73 74 72 69 6e 67 | 20 70 6f 69 6e 74 65 72 |f string| pointer|
|00003b90| 73 2e 0a 20 2a 20 20 49 | 66 20 74 68 65 20 6d 6f |s.. * I|f the mo|
|00003ba0| 64 65 20 69 73 20 6e 6f | 6e 2d 7a 65 72 6f 2c 20 |de is no|n-zero, |
|00003bb0| 69 74 20 6d 65 61 6e 73 | 20 6a 75 73 74 20 75 73 |it means| just us|
|00003bc0| 65 20 74 68 65 20 73 74 | 72 69 6e 67 73 20 73 74 |e the st|rings st|
|00003bd0| 6f 72 65 64 0a 20 2a 20 | 20 69 6e 20 74 6f 70 69 |ored. * | in topi|
|00003be0| 78 2e 20 20 49 66 20 6d | 6f 64 65 3d 3d 30 2c 20 |x. If m|ode==0, |
|00003bf0| 74 68 65 6e 20 72 65 2d | 61 6c 6c 6f 63 61 74 65 |then re-|allocate|
|00003c00| 20 73 70 61 63 65 20 61 | 6e 64 20 72 65 2d 63 68 | space a|nd re-ch|
|00003c10| 65 63 6b 0a 20 2a 20 20 | 74 68 65 20 64 69 72 65 |eck. * |the dire|
|00003c20| 63 74 6f 72 79 2e 20 20 | 49 66 20 6d 6f 64 65 0a |ctory. |If mode.|
|00003c30| 20 2a 2f 0a 0a 20 70 72 | 69 6e 74 74 6f 70 69 78 | */.. pr|inttopix|
|00003c40| 28 20 74 6f 70 69 78 2c | 20 6d 6f 64 65 2c 20 73 |( topix,| mode, s|
|00003c50| 75 70 72 65 73 73 29 0a | 20 09 63 68 61 72 20 2a |upress).| .char *|
|00003c60| 74 6f 70 69 78 5b 5d 3b | 0a 09 69 6e 74 20 6d 6f |topix[];|..int mo|
|00003c70| 64 65 2c 20 73 75 70 72 | 65 73 73 3b 0a 7b 0a 09 |de, supr|ess;.{..|
|00003c80| 69 6e 74 20 69 2c 6a 2c | 6b 2c 6c 2c 78 72 65 66 |int i,j,|k,l,xref|
|00003c90| 73 20 3d 20 30 3b 0a 09 | 69 6e 74 20 20 6e 61 6d |s = 0;..|int nam|
|00003ca0| 65 77 69 64 74 68 2c 20 | 74 6f 74 61 6c 6e 61 6d |ewidth, |totalnam|
|00003cb0| 65 73 3b 0a 09 63 68 61 | 72 20 2a 6d 61 6c 6c 6f |es;..cha|r *mallo|
|00003cc0| 63 28 29 2c 20 2a 6e 62 | 75 66 3b 0a 09 63 68 61 |c(), *nb|uf;..cha|
|00003cd0| 72 20 2a 74 68 69 73 6e | 61 6d 65 2c 20 2a 69 6e |r *thisn|ame, *in|
|00003ce0| 64 65 78 28 29 3b 0a 09 | 63 68 61 72 20 2a 73 31 |dex();..|char *s1|
|00003cf0| 2c 20 2a 73 32 2c 20 2a | 2a 6e 78 74 6e 61 6d 65 |, *s2, *|*nxtname|
|00003d00| 2c 20 2a 6e 78 63 6e 74 | 3b 0a 09 73 74 72 75 63 |, *nxcnt|;..struc|
|00003d10| 74 20 64 69 72 65 63 74 | 20 2a 72 65 61 64 64 69 |t direct| *readdi|
|00003d20| 72 28 29 2c 20 2a 66 69 | 6c 65 64 61 74 3b 0a 09 |r(), *fi|ledat;..|
|00003d30| 44 49 52 20 2a 64 69 72 | 70 2c 20 2a 6f 70 65 6e |DIR *dir|p, *open|
|00003d40| 64 69 72 28 29 3b 0a 0a | 09 69 66 20 28 20 6d 6f |dir();..|.if ( mo|
|00003d50| 64 65 20 29 20 7b 0a 09 | 09 66 6f 72 28 6e 78 74 |de ) {..|.for(nxt|
|00003d60| 6e 61 6d 65 3d 74 6f 70 | 69 78 2c 20 69 3d 30 3b |name=top|ix, i=0;|
|00003d70| 20 2a 6e 78 74 6e 61 6d | 65 2b 2b 20 21 3d 20 4e | *nxtnam|e++ != N|
|00003d80| 55 4c 4c 3b 20 69 2b 2b | 20 29 3b 0a 09 09 74 6f |ULL; i++| );...to|
|00003d90| 74 61 6c 6e 61 6d 65 73 | 20 3d 20 69 3b 0a 09 09 |talnames| = i;...|
|00003da0| 67 6f 74 6f 20 69 6e 70 | 75 74 74 6f 70 69 78 3b |goto inp|uttopix;|
|00003db0| 0a 09 7d 0a 0a 09 2f 2a | 20 69 66 20 6d 6f 64 65 |..}.../*| if mode|
|00003dc0| 20 69 73 20 7a 65 72 6f | 2c 20 74 68 65 6e 20 61 | is zero|, then a|
|00003dd0| 6c 6c 6f 63 61 74 65 20 | 73 70 61 63 65 20 61 6e |llocate |space an|
|00003de0| 64 20 73 65 61 72 63 68 | 20 74 68 65 20 64 69 72 |d search| the dir|
|00003df0| 65 63 74 6f 72 79 20 2a | 2f 0a 09 6e 62 75 66 20 |ectory *|/..nbuf |
|00003e00| 3d 20 6d 61 6c 6c 6f 63 | 28 20 4d 41 58 4e 41 4d |= malloc|( MAXNAM|
|00003e10| 45 53 20 2a 20 4d 41 58 | 4e 41 4d 45 4c 45 4e 20 |ES * MAX|NAMELEN |
|00003e20| 29 3b 0a 09 6e 78 63 6e | 74 3d 6e 62 75 66 3b 0a |);..nxcn|t=nbuf;.|
|00003e30| 09 64 69 72 70 20 3d 20 | 6f 70 65 6e 64 69 72 28 |.dirp = |opendir(|
|00003e40| 22 2e 22 29 3b 0a 09 69 | 66 20 28 64 69 72 70 20 |".");..i|f (dirp |
|00003e50| 3d 3d 20 4e 55 4c 4c 29 | 20 7b 0a 09 09 66 70 72 |== NULL)| {...fpr|
|00003e60| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 25 73 3a |intf(std|err,"%s:|
|00003e70| 20 43 61 6e 6e 6f 74 20 | 6f 70 65 6e 20 68 65 6c | Cannot |open hel|
|00003e80| 70 20 64 69 72 65 63 74 | 6f 72 79 2e 5c 6e 22 2c |p direct|ory.\n",|
|00003e90| 70 72 6f 67 6e 61 6d 65 | 29 3b 0a 09 09 72 65 74 |progname|);...ret|
|00003ea0| 75 72 6e 28 2d 31 29 3b | 0a 09 7d 0a 0a 09 66 6f |urn(-1);|..}...fo|
|00003eb0| 72 28 6e 78 74 6e 61 6d | 65 3d 74 6f 70 69 78 2c |r(nxtnam|e=topix,|
|00003ec0| 20 69 3d 30 3b 20 69 20 | 3c 20 28 4d 41 58 4e 41 | i=0; i |< (MAXNA|
|00003ed0| 4d 45 53 2d 31 29 20 3b | 20 29 20 7b 0a 09 09 66 |MES-1) ;| ) {...f|
|00003ee0| 69 6c 65 64 61 74 20 3d | 20 72 65 61 64 64 69 72 |iledat =| readdir|
|00003ef0| 28 64 69 72 70 29 3b 0a | 09 09 69 66 20 28 66 69 |(dirp);.|..if (fi|
|00003f00| 6c 65 64 61 74 20 3d 3d | 20 4e 55 4c 4c 29 20 62 |ledat ==| NULL) b|
|00003f10| 72 65 61 6b 3b 0a 09 09 | 74 68 69 73 6e 61 6d 65 |reak;...|thisname|
|00003f20| 20 3d 20 66 69 6c 65 64 | 61 74 2d 3e 64 5f 6e 61 | = filed|at->d_na|
|00003f30| 6d 65 3b 0a 09 09 69 66 | 20 28 20 21 28 69 73 61 |me;...if| ( !(isa|
|00003f40| 6c 6e 75 6d 28 2a 74 68 | 69 73 6e 61 6d 65 29 29 |lnum(*th|isname))|
|00003f50| 20 29 20 20 20 20 2f 2a | 20 69 66 20 6e 6f 74 20 | ) /*| if not |
|00003f60| 69 6e 20 5b 30 2d 39 41 | 2d 5a 61 2d 7a 5d 20 2a |in [0-9A|-Za-z] *|
|00003f70| 2f 0a 09 09 09 09 63 6f | 6e 74 69 6e 75 65 3b 09 |/.....co|ntinue;.|
|00003f80| 2f 2a 20 64 6f 20 74 68 | 65 20 6e 65 78 74 20 6f |/* do th|e next o|
|00003f90| 6e 65 2e 20 20 20 20 20 | 20 2a 2f 0a 09 09 2a 6e |ne. | */...*n|
|00003fa0| 78 63 6e 74 20 3d 20 27 | 5c 30 27 3b 0a 09 09 69 |xcnt = '|\0';...i|
|00003fb0| 66 20 28 20 28 73 31 20 | 3d 20 69 6e 64 65 78 28 |f ( (s1 |= index(|
|00003fc0| 74 68 69 73 6e 61 6d 65 | 2c 27 2e 27 29 29 20 21 |thisname|,'.')) !|
|00003fd0| 3d 20 4e 55 4c 4c 29 20 | 7b 0a 09 09 09 69 66 20 |= NULL) |{....if |
|00003fe0| 28 73 74 72 63 6d 70 28 | 73 31 2c 20 48 45 4c 50 |(strcmp(|s1, HELP|
|00003ff0| 45 58 29 20 3d 3d 20 30 | 29 20 2a 73 31 20 3d 20 |EX) == 0|) *s1 = |
|00004000| 27 5c 30 27 3b 0a 09 09 | 09 65 6c 73 65 20 69 66 |'\0';...|.else if|
|00004010| 20 28 20 73 74 72 63 6d | 70 28 73 31 2c 20 4d 41 | ( strcm|p(s1, MA|
|00004020| 4e 45 58 29 20 3d 3d 20 | 30 29 20 63 6f 6e 74 69 |NEX) == |0) conti|
|00004030| 6e 75 65 3b 0a 09 09 09 | 65 6c 73 65 20 69 66 20 |nue;....|else if |
|00004040| 28 20 73 74 72 63 6d 70 | 28 73 31 2c 20 58 52 45 |( strcmp|(s1, XRE|
|00004050| 46 45 58 29 20 3d 3d 20 | 30 29 20 7b 0a 09 09 09 |FEX) == |0) {....|
|00004060| 20 20 20 20 2f 2a 20 6d | 61 72 6b 20 78 72 65 66 | /* m|ark xref|
|00004070| 20 77 69 74 68 20 61 74 | 20 73 69 67 6e 20 69 6e | with at| sign in|
|00004080| 20 66 69 72 73 74 20 63 | 68 61 72 20 2a 2f 0a 09 | first c|har */..|
|00004090| 09 09 20 20 20 20 73 74 | 72 63 70 79 28 6e 78 63 |.. st|rcpy(nxc|
|000040a0| 6e 74 2c 22 40 22 29 3b | 0a 09 09 09 7d 0a 09 09 |nt,"@");|....}...|
|000040b0| 7d 0a 09 09 69 66 20 28 | 73 74 72 6c 65 6e 28 74 |}...if (|strlen(t|
|000040c0| 68 69 73 6e 61 6d 65 29 | 20 3e 3d 20 4d 41 58 4e |hisname)| >= MAXN|
|000040d0| 41 4d 45 4c 45 4e 20 2d | 20 31 29 0a 09 09 09 2a |AMELEN -| 1)....*|
|000040e0| 28 74 68 69 73 6e 61 6d | 65 2b 4d 41 58 4e 41 4d |(thisnam|e+MAXNAM|
|000040f0| 45 4c 45 4e 2d 31 29 20 | 3d 20 27 5c 30 27 3b 0a |ELEN-1) |= '\0';.|
|00004100| 09 09 2f 2a 20 63 6f 70 | 79 20 69 6e 20 64 61 74 |../* cop|y in dat|
|00004110| 61 20 66 72 6f 6d 20 74 | 68 69 73 20 6c 6f 6f 70 |a from t|his loop|
|00004120| 20 2a 2f 0a 09 09 69 66 | 20 28 2a 6e 78 63 6e 74 | */...if| (*nxcnt|
|00004130| 20 3d 3d 20 27 5c 30 27 | 29 20 73 74 72 63 70 79 | == '\0'|) strcpy|
|00004140| 28 6e 78 63 6e 74 2c 74 | 68 69 73 6e 61 6d 65 29 |(nxcnt,t|hisname)|
|00004150| 3b 0a 09 09 65 6c 73 65 | 20 73 74 72 63 61 74 28 |;...else| strcat(|
|00004160| 6e 78 63 6e 74 2c 74 68 | 69 73 6e 61 6d 65 29 3b |nxcnt,th|isname);|
|00004170| 0a 09 09 2a 6e 78 74 6e | 61 6d 65 2b 2b 20 3d 20 |...*nxtn|ame++ = |
|00004180| 6e 78 63 6e 74 3b 20 0a | 09 09 2f 2a 20 75 70 64 |nxcnt; .|../* upd|
|00004190| 61 74 65 20 70 6f 69 6e | 74 65 72 73 20 66 6f 72 |ate poin|ters for|
|000041a0| 20 6e 65 78 74 20 6c 6f | 6f 70 20 2a 2f 0a 09 09 | next lo|op */...|
|000041b0| 6e 78 63 6e 74 20 2b 3d | 20 73 74 72 6c 65 6e 28 |nxcnt +=| strlen(|
|000041c0| 74 68 69 73 6e 61 6d 65 | 29 20 2b 20 28 28 2a 6e |thisname|) + ((*n|
|000041d0| 78 63 6e 74 3d 3d 27 40 | 27 29 3f 28 32 29 3a 28 |xcnt=='@|')?(2):(|
|000041e0| 31 29 29 3b 0a 09 09 69 | 2b 2b 3b 0a 09 7d 0a 09 |1));...i|++;..}..|
|000041f0| 2a 6e 78 74 6e 61 6d 65 | 2b 2b 20 3d 20 4e 55 4c |*nxtname|++ = NUL|
|00004200| 4c 3b 0a 09 74 6f 74 61 | 6c 6e 61 6d 65 73 20 3d |L;..tota|lnames =|
|00004210| 20 69 3b 0a 09 63 6c 6f | 73 65 64 69 72 28 64 69 | i;..clo|sedir(di|
|00004220| 72 70 29 3b 0a 0a 09 69 | 66 20 28 74 6f 74 61 6c |rp);...i|f (total|
|00004230| 6e 61 6d 65 73 20 3d 3d | 20 30 29 20 72 65 74 75 |names ==| 0) retu|
|00004240| 72 6e 28 30 29 3b 0a 09 | 0a 09 2f 2a 20 73 6f 72 |rn(0);..|../* sor|
|00004250| 74 20 74 68 65 20 6e 61 | 6d 65 73 20 69 6e 20 61 |t the na|mes in a|
|00004260| 73 63 65 6e 64 69 6e 67 | 20 6f 72 64 65 72 20 77 |scending| order w|
|00004270| 69 74 68 20 65 78 63 68 | 61 6e 67 65 20 61 6c 67 |ith exch|ange alg|
|00004280| 6f 72 69 74 68 6d 20 2a | 2f 0a 09 66 6f 72 28 69 |orithm *|/..for(i|
|00004290| 3d 30 3b 20 69 20 3c 20 | 74 6f 74 61 6c 6e 61 6d |=0; i < |totalnam|
|000042a0| 65 73 2d 31 3b 20 69 2b | 2b 29 0a 09 09 66 6f 72 |es-1; i+|+)...for|
|000042b0| 28 6a 3d 69 2b 31 3b 20 | 6a 20 3c 74 6f 74 61 6c |(j=i+1; |j <total|
|000042c0| 6e 61 6d 65 73 3b 20 6a | 2b 2b 29 0a 09 09 09 69 |names; j|++)....i|
|000042d0| 66 20 28 73 74 72 63 6d | 70 28 74 6f 70 69 78 5b |f (strcm|p(topix[|
|000042e0| 69 5d 2c 74 6f 70 69 78 | 5b 6a 5d 29 20 3e 20 30 |i],topix|[j]) > 0|
|000042f0| 29 20 7b 0a 09 09 09 09 | 74 68 69 73 6e 61 6d 65 |) {.....|thisname|
|00004300| 20 3d 20 74 6f 70 69 78 | 5b 69 5d 3b 0a 09 09 09 | = topix|[i];....|
|00004310| 09 74 6f 70 69 78 5b 69 | 5d 20 3d 20 74 6f 70 69 |.topix[i|] = topi|
|00004320| 78 5b 6a 5d 3b 0a 09 09 | 09 09 74 6f 70 69 78 5b |x[j];...|..topix[|
|00004330| 6a 5d 20 3d 20 74 68 69 | 73 6e 61 6d 65 3b 0a 09 |j] = thi|sname;..|
|00004340| 09 09 7d 0a 09 20 20 20 | 20 0a 0a 20 69 6e 70 75 |..}.. | .. inpu|
|00004350| 74 74 6f 70 69 78 3a 0a | 09 69 66 20 28 73 75 70 |ttopix:.|.if (sup|
|00004360| 72 65 73 73 29 20 72 65 | 74 75 72 6e 28 74 6f 74 |ress) re|turn(tot|
|00004370| 61 6c 6e 61 6d 65 73 29 | 3b 0a 09 65 6c 73 65 20 |alnames)|;..else |
|00004380| 7b 0a 09 20 20 20 20 69 | 66 20 28 63 6f 6c 5f 66 |{.. i|f (col_f|
|00004390| 6c 61 67 29 20 70 72 69 | 6e 74 66 28 22 5c 6e 20 |lag) pri|ntf("\n |
|000043a0| 53 75 62 74 6f 70 69 63 | 73 3a 5c 6e 22 29 3b 0a |Subtopic|s:\n");.|
|000043b0| 09 20 20 20 20 70 72 69 | 6e 74 6c 69 73 74 28 74 |. pri|ntlist(t|
|000043c0| 6f 70 69 78 2c 20 74 6f | 74 61 6c 6e 61 6d 65 73 |opix, to|talnames|
|000043d0| 29 3b 0a 09 20 20 20 20 | 72 65 74 75 72 6e 28 74 |);.. |return(t|
|000043e0| 6f 74 61 6c 6e 61 6d 65 | 73 29 3b 0a 09 7d 0a 0a |otalname|s);..}..|
|000043f0| 7d 0a 0a 0a 0a 20 2f 2a | 20 2a 2a 2a 2a 2a 2a 2a |}.... /*| *******|
|00004400| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004410| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004420| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004430| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0a 20 20 2a 20 68 65 |********|*. * he|
|00004440| 6c 70 31 3a 20 64 65 73 | 63 65 6e 64 20 72 65 63 |lp1: des|cend rec|
|00004450| 75 72 73 69 76 65 20 68 | 65 6c 70 20 74 72 65 65 |ursive h|elp tree|
|00004460| 20 61 6e 64 20 70 72 6f | 76 69 64 65 20 73 6f 6d | and pro|vide som|
|00004470| 65 0a 20 20 2a 09 20 20 | 20 20 20 75 73 65 72 20 |e. *. | user |
|00004480| 73 65 72 76 69 63 65 73 | 2e 0a 20 20 2a 0a 20 20 |services|.. *. |
|00004490| 2a 09 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 69 |*.This r|outine i|
|000044a0| 73 20 74 68 65 20 68 65 | 61 72 74 20 6f 66 20 74 |s the he|art of t|
|000044b0| 68 65 20 6e 65 77 20 55 | 4e 49 58 20 68 65 6c 70 |he new U|NIX help|
|000044c0| 20 66 61 63 69 6c 69 74 | 79 2e 0a 20 20 2a 20 20 | facilit|y.. * |
|000044d0| 49 74 20 63 6c 69 6d 62 | 73 20 72 65 63 75 72 73 |It climb|s recurs|
|000044e0| 69 76 65 6c 79 20 61 72 | 6f 75 6e 64 20 61 6e 20 |ively ar|ound an |
|000044f0| 6e 2d 74 72 65 65 20 6f | 66 20 64 6f 63 75 6d 65 |n-tree o|f docume|
|00004500| 6e 74 61 74 69 6f 6e 20 | 66 69 6c 65 73 0a 20 20 |ntation |files. |
|00004510| 2a 20 20 61 6e 64 20 64 | 69 72 65 63 74 6f 72 69 |* and d|irectori|
|00004520| 65 73 2e 20 20 54 68 65 | 20 72 6f 75 74 69 6e 65 |es. The| routine|
|00004530| 20 70 72 69 6e 74 68 65 | 6c 70 28 29 20 6f 75 74 | printhe|lp() out|
|00004540| 70 75 74 73 20 61 20 66 | 69 6c 65 20 6f 66 0a 20 |puts a f|ile of. |
|00004550| 20 2a 20 20 68 65 6c 70 | 20 74 65 78 74 2c 20 74 | * help| text, t|
|00004560| 68 65 20 72 6f 75 74 69 | 6e 65 20 70 72 69 6e 74 |he routi|ne print|
|00004570| 74 6f 70 69 78 20 70 72 | 69 6e 74 73 20 6f 75 74 |topix pr|ints out|
|00004580| 20 61 6c 6c 20 73 75 62 | 74 6f 70 69 63 73 2e 0a | all sub|topics..|
|00004590| 20 20 2a 0a 20 20 2a 09 | 54 68 69 73 20 72 6f 75 | *. *.|This rou|
|000045a0| 74 69 6e 65 20 63 61 6e | 20 6f 70 65 72 61 74 65 |tine can| operate|
|000045b0| 20 69 6e 20 69 6e 74 65 | 72 61 63 74 69 76 65 20 | in inte|ractive |
|000045c0| 6d 6f 64 65 2c 20 6f 72 | 20 6e 6f 74 2e 20 20 54 |mode, or| not. T|
|000045d0| 68 65 0a 20 20 2a 20 20 | 62 61 73 69 63 20 63 79 |he. * |basic cy|
|000045e0| 63 6c 65 20 6f 66 20 6f | 70 65 72 61 74 69 6f 6e |cle of o|peration|
|000045f0| 20 69 73 3a 0a 20 20 2a | 09 09 69 66 20 28 6e 6f | is:. *|..if (no|
|00004600| 74 20 6c 69 73 74 2d 6f | 6e 6c 79 2d 6d 6f 64 65 |t list-o|nly-mode|
|00004610| 29 20 70 72 69 6e 74 20 | 68 65 6c 70 2e 0a 20 20 |) print |help.. |
|00004620| 2a 09 09 69 66 20 28 6e | 6f 74 20 71 75 69 65 74 |*..if (n|ot quiet|
|00004630| 2d 6d 6f 64 65 29 09 70 | 72 69 6e 74 20 6c 69 73 |-mode).p|rint lis|
|00004640| 74 2e 0a 20 20 2a 09 09 | 69 66 20 28 6e 6f 74 20 |t.. *..|if (not |
|00004650| 69 6e 74 65 72 61 63 74 | 69 76 65 29 09 72 65 74 |interact|ive).ret|
|00004660| 75 72 6e 2e 0a 20 20 2a | 09 09 70 72 69 6e 74 20 |urn.. *|..print |
|00004670| 70 72 6f 6d 70 74 20 61 | 6e 64 20 64 6f 20 63 6f |prompt a|nd do co|
|00004680| 6d 6d 61 6e 64 73 2e 0a | 20 20 2a 09 09 72 65 74 |mmands..| *..ret|
|00004690| 75 72 6e 2e 0a 20 20 2a | 0a 20 20 2a 09 54 68 65 |urn.. *|. *.The|
|000046a0| 72 65 20 61 72 65 20 61 | 20 6e 75 6d 62 65 72 20 |re are a| number |
|000046b0| 6f 66 20 63 6f 6d 6d 61 | 6e 64 73 20 61 76 61 69 |of comma|nds avai|
|000046c0| 6c 61 62 6c 65 20 69 6e | 20 74 68 65 0a 20 20 2a |lable in| the. *|
|000046d0| 20 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 6d 6f | intera|ctive mo|
|000046e0| 64 65 2c 20 74 68 65 79 | 20 61 72 65 3a 0a 20 20 |de, they| are:. |
|000046f0| 2a 0a 20 20 2a 09 09 62 | 6c 61 6e 6b 20 6c 69 6e |*. *..b|lank lin|
|00004700| 65 3a 09 75 70 20 72 65 | 63 75 72 73 69 76 65 20 |e:.up re|cursive |
|00004710| 6c 65 76 65 6c 2e 0a 20 | 20 2a 09 09 73 75 62 74 |level.. | *..subt|
|00004720| 6f 70 69 63 20 6e 61 6d | 65 3a 09 72 65 63 75 72 |opic nam|e:.recur|
|00004730| 73 65 20 74 6f 20 73 75 | 62 74 6f 70 69 63 2e 0a |se to su|btopic..|
|00004740| 20 20 2a 09 09 3f 3a 09 | 09 6c 69 73 74 20 74 6f | *..?:.|.list to|
|00004750| 70 69 63 73 20 61 67 61 | 69 6e 2e 0a 20 20 2a 09 |pics aga|in.. *.|
|00004760| 09 2a 3a 09 09 67 65 74 | 20 6c 69 73 74 20 6f 66 |.*:..get| list of|
|00004770| 20 63 6f 6d 6d 61 6e 64 | 73 0a 20 20 2a 09 09 24 | command|s. *..$|
|00004780| 3a 09 09 67 65 74 20 69 | 6e 66 6f 20 6f 6e 20 74 |:..get i|nfo on t|
|00004790| 6f 70 69 78 0a 20 20 2a | 09 09 5e 44 3a 09 09 71 |opix. *|..^D:..q|
|000047a0| 75 69 74 20 68 65 6c 70 | 20 70 72 6f 67 72 61 6d |uit help| program|
|000047b0| 2e 0a 20 20 2a 09 09 2e | 3a 09 09 6d 61 6e 20 70 |.. *...|:..man p|
|000047c0| 61 67 65 20 28 69 66 20 | 61 6e 79 29 2e 0a 20 20 |age (if |any).. |
|000047d0| 2a 09 09 23 09 09 6c 69 | 73 74 20 74 6f 70 69 63 |*..#..li|st topic|
|000047e0| 73 20 61 67 61 69 6e 0a | 20 20 2a 09 09 0a 20 20 |s again.| *... |
|000047f0| 2a 2f 0a 0a 20 20 68 65 | 6c 70 31 28 70 70 74 2c |*/.. he|lp1(ppt,|
|00004800| 73 76 65 63 2c 73 6b 69 | 70 2c 78 72 65 66 2c 63 |svec,ski|p,xref,c|
|00004810| 6f 6d 70 5f 66 6c 61 67 | 29 0a 20 20 09 63 68 61 |omp_flag|). .cha|
|00004820| 72 20 2a 70 70 74 3b 0a | 09 63 68 61 72 20 2a 73 |r *ppt;.|.char *s|
|00004830| 76 65 63 5b 5d 3b 0a 09 | 73 68 6f 72 74 20 20 73 |vec[];..|short s|
|00004840| 6b 69 70 3b 0a 09 73 68 | 6f 72 74 20 20 78 72 65 |kip;..sh|ort xre|
|00004850| 66 3b 20 20 20 20 20 20 | 20 2f 2a 20 6e 6f 6e 2d |f; | /* non-|
|00004860| 7a 65 72 6f 20 69 66 20 | 64 6f 69 6e 67 20 78 72 |zero if |doing xr|
|00004870| 65 66 20 2a 2f 0a 09 73 | 68 6f 72 74 20 20 63 6f |ef */..s|hort co|
|00004880| 6d 70 5f 66 6c 61 67 3b | 20 20 2f 2a 20 6e 6f 6e |mp_flag;| /* non|
|00004890| 2d 7a 65 72 6f 20 69 66 | 20 64 6f 69 6e 67 20 63 |-zero if| doing c|
|000048a0| 6f 6d 70 6c 65 74 69 6f | 6e 73 20 2a 2f 0a 7b 20 |ompletio|ns */.{ |
|000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 74 | | /* t|
|000048d0| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 69 73 20 74 |his rout|ine is t|
|000048e0| 6f 6f 20 62 69 67 2c 20 | 65 68 3f 20 2a 2f 0a 09 |oo big, |eh? */..|
|000048f0| 69 6e 74 20 69 2c 6a 2c | 6b 2c 20 65 72 72 3b 0a |int i,j,|k, err;.|
|00004900| 09 69 6e 74 20 6e 6f 5f | 73 75 62 73 3b 0a 09 63 |.int no_|subs;..c|
|00004910| 68 61 72 20 61 6e 73 77 | 65 72 5b 4d 41 58 4c 49 |har answ|er[MAXLI|
|00004920| 4e 45 4c 45 4e 5d 3b 0a | 09 63 68 61 72 20 66 75 |NELEN];.|.char fu|
|00004930| 6c 6c 70 61 74 68 5b 4d | 41 58 4e 41 4d 45 4c 45 |llpath[M|AXNAMELE|
|00004940| 4e 20 2b 20 32 39 5d 3b | 0a 09 63 68 61 72 20 79 |N + 29];|..char y|
|00004950| 65 73 6e 6f 5b 31 30 5d | 3b 0a 09 63 68 61 72 20 |esno[10]|;..char |
|00004960| 2a 74 6f 70 69 78 5b 4d | 41 58 4e 41 4d 45 53 5d |*topix[M|AXNAMES]|
|00004970| 2c 20 2a 6d 78 5b 4d 41 | 58 4d 41 54 43 48 45 53 |, *mx[MA|XMATCHES|
|00004980| 5d 3b 0a 09 69 6e 74 20 | 20 6d 61 74 63 68 76 28 |];..int | matchv(|
|00004990| 29 3b 0a 09 63 68 61 72 | 20 2a 69 6e 64 65 78 28 |);..char| *index(|
|000049a0| 29 2c 20 2a 67 65 74 65 | 6e 76 28 29 3b 0a 09 63 |), *gete|nv();..c|
|000049b0| 68 61 72 20 2a 73 31 2c | 20 2a 73 32 2c 20 2a 73 |har *s1,| *s2, *s|
|000049c0| 33 2c 20 2a 72 65 73 74 | 3b 0a 09 63 68 61 72 20 |3, *rest|;..char |
|000049d0| 2a 77 76 65 63 5b 4d 41 | 58 4d 41 54 43 48 45 53 |*wvec[MA|XMATCHES|
|000049e0| 5d 3b 0a 09 63 68 61 72 | 20 63 6d 64 62 75 66 5b |];..char| cmdbuf[|
|000049f0| 39 30 5d 3b 0a 0a 0a 09 | 69 66 20 28 63 6f 6d 70 |90];....|if (comp|
|00004a00| 5f 66 6c 61 67 29 20 7b | 0a 09 20 20 20 20 70 72 |_flag) {|.. pr|
|00004a10| 69 6e 74 74 6f 70 69 78 | 28 20 74 6f 70 69 78 2c |inttopix|( topix,|
|00004a20| 20 30 2c 20 31 29 3b 0a | 09 20 20 20 20 69 66 20 | 0, 1);.|. if |
|00004a30| 28 20 28 6b 20 3d 20 6d | 61 74 63 68 76 28 20 2a |( (k = m|atchv( *|
|00004a40| 73 76 65 63 2c 20 74 6f | 70 69 78 2c 20 6d 78 29 |svec, to|pix, mx)|
|00004a50| 29 20 3d 3d 20 30 29 20 | 72 65 74 75 72 6e 28 2d |) == 0) |return(-|
|00004a60| 31 29 3b 0a 09 20 20 20 | 20 2f 2a 20 69 66 20 74 |1);.. | /* if t|
|00004a70| 68 65 72 65 20 69 73 20 | 6d 6f 72 65 20 74 68 61 |here is |more tha|
|00004a80| 6e 20 6f 6e 65 20 6d 61 | 74 63 68 2c 20 61 6e 64 |n one ma|tch, and|
|00004a90| 20 77 65 20 61 72 65 20 | 6e 6f 74 20 61 74 20 65 | we are |not at e|
|00004aa0| 6e 64 2c 20 66 6c 75 62 | 20 2a 2f 0a 09 20 20 20 |nd, flub| */.. |
|00004ab0| 20 69 66 20 28 20 73 76 | 65 63 5b 31 5d 20 21 3d | if ( sv|ec[1] !=|
|00004ac0| 20 4e 55 4c 4c 20 20 26 | 26 20 20 6b 20 3e 20 31 | NULL &|& k > 1|
|00004ad0| 20 29 20 72 65 74 75 72 | 6e 28 2d 31 29 3b 0a 09 | ) retur|n(-1);..|
|00004ae0| 20 20 20 20 2f 2a 20 69 | 66 20 77 65 20 61 72 65 | /* i|f we are|
|00004af0| 20 6e 6f 74 20 61 74 20 | 65 6e 64 2c 20 67 6f 20 | not at |end, go |
|00004b00| 64 6f 77 6e 20 6f 6e 65 | 20 6c 65 76 65 6c 20 2a |down one| level *|
|00004b10| 2f 0a 09 20 20 20 20 69 | 66 20 28 20 73 76 65 63 |/.. i|f ( svec|
|00004b20| 5b 31 5d 20 21 3d 20 4e | 55 4c 4c 20 29 20 7b 0a |[1] != N|ULL ) {.|
|00004b30| 09 09 69 66 20 28 20 63 | 68 64 69 72 28 20 6d 78 |..if ( c|hdir( mx|
|00004b40| 5b 30 5d 20 29 20 3c 20 | 30 29 20 72 65 74 75 72 |[0] ) < |0) retur|
|00004b50| 6e 28 2d 31 29 3b 0a 09 | 09 65 6c 73 65 20 7b 0a |n(-1);..|.else {.|
|00004b60| 09 09 20 20 20 20 6b 20 | 3d 20 68 65 6c 70 31 28 |.. k |= help1(|
|00004b70| 70 70 74 2c 20 73 76 65 | 63 2b 31 2c 20 30 2c 20 |ppt, sve|c+1, 0, |
|00004b80| 30 2c 20 63 6f 6d 70 5f | 66 6c 61 67 29 3b 0a 09 |0, comp_|flag);..|
|00004b90| 09 20 20 20 20 63 68 64 | 69 72 28 22 2e 2e 22 29 |. chd|ir("..")|
|00004ba0| 3b 0a 09 09 20 20 20 20 | 72 65 74 75 72 6e 28 6b |;... |return(k|
|00004bb0| 29 3b 0a 09 09 7d 0a 09 | 20 20 20 20 7d 0a 09 20 |);...}..| }.. |
|00004bc0| 20 20 20 2f 2a 20 69 66 | 20 77 65 20 61 72 65 20 | /* if| we are |
|00004bd0| 61 74 20 65 6e 64 2c 20 | 74 68 65 6e 20 64 6f 20 |at end, |then do |
|00004be0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 61 63 74 69 |appropri|ate acti|
|00004bf0| 6f 6e 20 6f 6e 20 63 6f | 6d 70 5f 66 6c 61 67 20 |on on co|mp_flag |
|00004c00| 2a 2f 0a 09 20 20 20 20 | 65 6c 73 65 20 7b 0a 09 |*/.. |else {..|
|00004c10| 09 73 74 72 63 70 79 28 | 67 62 6c 5f 6d 61 74 63 |.strcpy(|gbl_matc|
|00004c20| 68 2c 20 6d 78 5b 30 5d | 29 3b 0a 09 09 69 66 20 |h, mx[0]|);...if |
|00004c30| 28 20 63 6f 6d 70 5f 66 | 6c 61 67 20 3d 3d 20 43 |( comp_f|lag == C|
|00004c40| 54 52 4c 44 5f 43 4f 4d | 50 20 29 20 7b 0a 09 09 |TRLD_COM|P ) {...|
|00004c50| 20 20 20 20 66 70 75 74 | 73 28 22 5c 6e 22 2c 73 | fput|s("\n",s|
|00004c60| 74 64 6f 75 74 29 3b 0a | 09 09 20 20 20 20 70 72 |tdout);.|.. pr|
|00004c70| 69 6e 74 6c 69 73 74 28 | 6d 78 2c 6b 29 3b 0a 09 |intlist(|mx,k);..|
|00004c80| 09 7d 0a 09 20 20 20 20 | 7d 0a 09 20 20 20 20 72 |.}.. |}.. r|
|00004c90| 65 74 75 72 6e 28 30 29 | 3b 0a 09 7d 0a 0a 09 69 |eturn(0)|;..}...i|
|00004ca0| 66 20 28 20 73 76 65 63 | 20 21 3d 20 4e 55 4c 4c |f ( svec| != NULL|
|00004cb0| 20 20 26 26 20 2a 73 76 | 65 63 20 21 3d 20 4e 55 | && *sv|ec != NU|
|00004cc0| 4c 4c 29 20 7b 0a 09 20 | 20 20 20 70 72 69 6e 74 |LL) {.. | print|
|00004cd0| 74 6f 70 69 78 28 20 74 | 6f 70 69 78 2c 20 30 2c |topix( t|opix, 0,|
|00004ce0| 20 31 29 3b 0a 09 20 20 | 20 20 69 66 20 28 20 28 | 1);.. | if ( (|
|00004cf0| 6b 20 3d 20 6d 61 74 63 | 68 76 28 2a 73 76 65 63 |k = matc|hv(*svec|
|00004d00| 2c 20 74 6f 70 69 78 2c | 20 6d 78 29 29 20 3d 3d |, topix,| mx)) ==|
|00004d10| 20 30 29 20 7b 0a 09 09 | 70 72 69 6e 74 66 28 22 | 0) {...|printf("|
|00004d20| 20 73 6f 72 72 79 2c 20 | 6e 6f 20 64 69 72 65 63 | sorry, |no direc|
|00004d30| 74 20 68 65 6c 70 20 70 | 61 74 68 20 74 6f 20 25 |t help p|ath to %|
|00004d40| 73 20 25 73 5c 6e 22 2c | 70 70 74 2c 2a 73 76 65 |s %s\n",|ppt,*sve|
|00004d50| 63 29 3b 0a 09 09 69 66 | 20 28 20 28 6b 20 3d 20 |c);...if| ( (k = |
|00004d60| 78 72 65 66 5f 6d 61 74 | 63 68 76 28 2a 73 76 65 |xref_mat|chv(*sve|
|00004d70| 63 2c 20 74 6f 70 69 78 | 2c 20 6d 78 29 29 20 3d |c, topix|, mx)) =|
|00004d80| 3d 20 30 29 20 7b 0a 09 | 09 20 20 20 20 70 72 69 |= 0) {..|. pri|
|00004d90| 6e 74 66 28 22 20 20 20 | 20 6e 6f 20 63 72 6f 73 |ntf(" | no cros|
|00004da0| 73 2d 72 65 66 65 72 65 | 6e 63 65 73 2c 20 65 69 |s-refere|nces, ei|
|00004db0| 74 68 65 72 2e 5c 6e 5c | 6e 22 29 3b 0a 09 09 20 |ther.\n\|n");... |
|00004dc0| 20 20 20 69 66 20 28 73 | 74 72 6c 65 6e 28 70 70 | if (s|trlen(pp|
|00004dd0| 74 29 20 3d 3d 20 30 29 | 20 68 65 6c 70 31 28 70 |t) == 0)| help1(p|
|00004de0| 70 74 2c 4e 55 4c 4c 2c | 31 2c 30 2c 20 30 29 3b |pt,NULL,|1,0, 0);|
|00004df0| 0a 09 09 20 20 20 20 72 | 65 74 75 72 6e 28 2d 31 |... r|eturn(-1|
|00004e00| 29 3b 0a 09 09 7d 0a 09 | 09 65 6c 73 65 20 7b 0a |);...}..|.else {.|
|00004e10| 09 09 20 20 20 20 64 6f | 5f 78 72 65 66 28 70 70 |.. do|_xref(pp|
|00004e20| 74 2c 2a 73 76 65 63 2c | 6d 78 29 3b 0a 09 09 20 |t,*svec,|mx);... |
|00004e30| 20 20 20 69 66 20 28 73 | 74 72 6c 65 6e 28 70 70 | if (s|trlen(pp|
|00004e40| 74 29 20 3d 3d 20 30 29 | 20 68 65 6c 70 31 28 70 |t) == 0)| help1(p|
|00004e50| 70 74 2c 4e 55 4c 4c 2c | 31 2c 30 2c 20 30 29 3b |pt,NULL,|1,0, 0);|
|00004e60| 0a 09 09 20 20 20 20 72 | 65 74 75 72 6e 28 2d 31 |... r|eturn(-1|
|00004e70| 29 3b 0a 09 09 7d 0a 09 | 20 20 20 20 7d 0a 0a 09 |);...}..| }...|
|00004e80| 20 20 20 20 66 6f 72 28 | 69 20 3d 20 30 2c 20 6a | for(|i = 0, j|
|00004e90| 20 3d 20 30 2c 20 65 72 | 72 20 3d 20 2d 31 3b 20 | = 0, er|r = -1; |
|00004ea0| 6d 78 5b 69 5d 20 21 3d | 20 4e 55 4c 4c 3b 20 29 |mx[i] !=| NULL; )|
|00004eb0| 20 7b 0a 09 09 69 66 20 | 28 69 20 3e 20 30 29 0a | {...if |(i > 0).|
|00004ec0| 09 09 20 20 6a 20 3d 20 | 74 61 6b 65 69 74 28 22 |.. j = |takeit("|
|00004ed0| 20 4e 65 78 74 20 68 65 | 6c 70 20 70 61 74 68 3a | Next he|lp path:|
|00004ee0| 20 25 73 20 25 73 5c 6e | 54 72 79 20 69 74 3f 22 | %s %s\n|Try it?"|
|00004ef0| 2c 70 70 74 2c 6d 78 5b | 69 5d 29 3b 0a 09 09 69 |,ppt,mx[|i]);...i|
|00004f00| 66 20 28 6a 20 3d 3d 20 | 31 29 20 7b 20 69 2b 2b |f (j == |1) { i++|
|00004f10| 3b 20 63 6f 6e 74 69 6e | 75 65 3b 20 7d 0a 09 09 |; contin|ue; }...|
|00004f20| 69 66 20 28 6a 20 3c 20 | 30 29 20 20 62 72 65 61 |if (j < |0) brea|
|00004f30| 6b 3b 0a 09 09 73 74 72 | 63 70 79 28 66 75 6c 6c |k;...str|cpy(full|
|00004f40| 70 61 74 68 2c 70 70 74 | 29 3b 0a 09 09 73 74 72 |path,ppt|);...str|
|00004f50| 63 61 74 28 66 75 6c 6c | 70 61 74 68 2c 22 20 22 |cat(full|path," "|
|00004f60| 29 3b 0a 09 09 73 74 72 | 63 61 74 28 66 75 6c 6c |);...str|cat(full|
|00004f70| 70 61 74 68 2c 6d 78 5b | 69 5d 29 3b 0a 0a 09 09 |path,mx[|i]);....|
|00004f80| 69 66 20 28 20 63 68 64 | 69 72 28 6d 78 5b 69 5d |if ( chd|ir(mx[i]|
|00004f90| 29 20 3c 20 30 29 20 7b | 0a 09 09 20 20 20 20 69 |) < 0) {|... i|
|00004fa0| 66 20 28 20 2a 28 73 76 | 65 63 20 2b 20 31 29 20 |f ( *(sv|ec + 1) |
|00004fb0| 21 3d 20 4e 55 4c 4c 20 | 29 20 7b 0a 09 09 09 69 |!= NULL |) {....i|
|00004fc0| 2b 2b 3b 0a 09 09 09 63 | 6f 6e 74 69 6e 75 65 3b |++;....c|ontinue;|
|00004fd0| 0a 09 09 20 20 20 20 7d | 0a 09 09 20 20 20 20 69 |... }|... i|
|00004fe0| 66 20 28 6c 69 73 74 5f | 66 6c 61 67 29 20 0a 09 |f (list_|flag) ..|
|00004ff0| 09 09 72 65 74 75 72 6e | 28 2d 31 29 3b 0a 09 09 |..return|(-1);...|
|00005000| 20 20 20 20 65 6c 73 65 | 0a 09 09 09 70 72 69 6e | else|....prin|
|00005010| 74 68 65 6c 70 28 20 6d | 78 5b 69 5d 2c 66 75 6c |thelp( m|x[i],ful|
|00005020| 6c 70 61 74 68 29 3b 0a | 09 09 20 20 20 20 70 72 |lpath);.|.. pr|
|00005030| 69 6e 74 66 28 22 5c 6e | 22 29 3b 0a 09 09 20 20 |intf("\n|");... |
|00005040| 20 20 69 66 20 28 21 64 | 75 6d 62 5f 66 6c 61 67 | if (!d|umb_flag|
|00005050| 29 20 68 65 6c 70 31 28 | 70 70 74 2c 4e 55 4c 4c |) help1(|ppt,NULL|
|00005060| 2c 31 2c 30 2c 20 30 29 | 3b 0a 09 09 20 20 20 20 |,1,0, 0)|;... |
|00005070| 65 72 72 20 3d 20 30 3b | 0a 09 09 7d 0a 09 09 65 |err = 0;|...}...e|
|00005080| 6c 73 65 20 7b 0a 09 09 | 20 20 20 20 69 66 20 28 |lse {...| if (|
|00005090| 20 68 65 6c 70 31 28 66 | 75 6c 6c 70 61 74 68 2c | help1(f|ullpath,|
|000050a0| 28 73 76 65 63 2b 31 29 | 2c 30 2c 30 2c 20 30 29 |(svec+1)|,0,0, 0)|
|000050b0| 20 3e 3d 20 30 29 20 7b | 0a 09 09 09 65 72 72 20 | >= 0) {|....err |
|000050c0| 3d 20 30 3b 0a 09 09 09 | 63 68 64 69 72 28 22 2e |= 0;....|chdir(".|
|000050d0| 2e 22 29 3b 0a 09 09 09 | 70 72 69 6e 74 66 28 22 |.");....|printf("|
|000050e0| 5c 6e 22 29 3b 0a 09 09 | 09 69 66 20 28 21 64 75 |\n");...|.if (!du|
|000050f0| 6d 62 5f 66 6c 61 67 29 | 20 68 65 6c 70 31 28 70 |mb_flag)| help1(p|
|00005100| 70 74 2c 4e 55 4c 4c 2c | 31 2c 78 72 65 66 2c 20 |pt,NULL,|1,xref, |
|00005110| 30 29 3b 0a 09 09 20 20 | 20 20 7d 0a 09 09 20 20 |0);... | }... |
|00005120| 20 20 65 6c 73 65 20 63 | 68 64 69 72 28 22 2e 2e | else c|hdir("..|
|00005130| 22 29 3b 0a 09 09 7d 0a | 09 09 69 2b 2b 3b 0a 09 |");...}.|..i++;..|
|00005140| 20 20 20 20 7d 0a 09 20 | 20 20 20 72 65 74 75 72 | }.. | retur|
|00005150| 6e 28 65 72 72 29 3b 0a | 09 7d 0a 0a 09 69 66 20 |n(err);.|.}...if |
|00005160| 28 20 21 6c 69 73 74 5f | 66 6c 61 67 20 26 26 20 |( !list_|flag && |
|00005170| 21 73 6b 69 70 29 20 0a | 09 20 20 20 20 69 66 20 |!skip) .|. if |
|00005180| 28 70 72 69 6e 74 68 65 | 6c 70 28 4e 55 4c 4c 2c |(printhe|lp(NULL,|
|00005190| 20 70 70 74 29 20 3c 20 | 30 29 20 7b 0a 09 09 72 | ppt) < |0) {...r|
|000051a0| 65 74 75 72 6e 28 2d 31 | 29 3b 0a 09 20 20 20 20 |eturn(-1|);.. |
|000051b0| 7d 0a 0a 09 69 66 20 28 | 20 21 6c 69 73 74 5f 66 |}...if (| !list_f|
|000051c0| 6c 61 67 20 26 26 20 21 | 64 75 6d 62 5f 66 6c 61 |lag && !|dumb_fla|
|000051d0| 67 20 26 26 20 28 20 61 | 63 63 65 73 73 28 4d 41 |g && ( a|ccess(MA|
|000051e0| 4e 45 58 2c 20 52 5f 4f | 4b 29 20 3e 3d 20 30 29 |NEX, R_O|K) >= 0)|
|000051f0| 20 26 26 20 21 73 6b 69 | 70 29 0a 09 09 70 72 69 | && !ski|p)...pri|
|00005200| 6e 74 66 28 22 5c 6e 09 | 4d 61 6e 75 61 6c 20 70 |ntf("\n.|Manual p|
|00005210| 61 67 65 20 49 53 20 61 | 76 61 69 6c 61 62 6c 65 |age IS a|vailable|
|00005220| 2e 5c 6e 22 29 3b 0a 0a | 09 69 66 20 28 20 21 64 |.\n");..|.if ( !d|
|00005230| 75 6d 62 5f 66 6c 61 67 | 20 29 20 7b 0a 09 20 20 |umb_flag| ) {.. |
|00005240| 20 20 69 66 20 28 20 70 | 72 69 6e 74 74 6f 70 69 | if ( p|rinttopi|
|00005250| 78 28 20 74 6f 70 69 78 | 2c 20 30 2c 20 73 6b 69 |x( topix|, 0, ski|
|00005260| 70 29 20 3c 3d 20 30 20 | 29 20 7b 0a 09 09 6e 6f |p) <= 0 |) {...no|
|00005270| 5f 73 75 62 73 20 3d 20 | 31 3b 0a 09 20 20 20 20 |_subs = |1;.. |
|00005280| 7d 0a 09 20 20 20 20 65 | 6c 73 65 20 6e 6f 5f 73 |}.. e|lse no_s|
|00005290| 75 62 73 3d 20 30 3b 0a | 09 7d 0a 0a 09 69 66 20 |ubs= 0;.|.}...if |
|000052a0| 28 20 64 75 6d 62 5f 66 | 6c 61 67 20 20 7c 7c 20 |( dumb_f|lag || |
|000052b0| 20 6c 69 73 74 5f 66 6c | 61 67 20 29 20 72 65 74 | list_fl|ag ) ret|
|000052c0| 75 72 6e 28 30 29 3b 0a | 0a 09 77 68 69 6c 65 20 |urn(0);.|..while |
|000052d0| 28 78 72 65 66 20 3d 3d | 20 30 29 20 7b 0a 09 09 |(xref ==| 0) {...|
|000052e0| 69 66 20 28 66 72 73 74 | 5f 66 6c 61 67 29 20 7b |if (frst|_flag) {|
|000052f0| 0a 09 09 09 70 72 69 6e | 74 66 28 22 20 28 74 79 |....prin|tf(" (ty|
|00005300| 70 65 20 27 2a 27 20 66 | 6f 72 20 63 6f 6d 6d 61 |pe '*' f|or comma|
|00005310| 6e 64 73 29 5c 6e 22 29 | 3b 0a 09 09 09 66 72 73 |nds)\n")|;....frs|
|00005320| 74 5f 66 6c 61 67 20 3d | 20 30 3b 0a 09 09 7d 0a |t_flag =| 0;...}.|
|00005330| 0a 0a 09 09 2f 2a 20 6e | 6f 77 2c 20 70 72 6f 6d |..../* n|ow, prom|
|00005340| 70 74 20 61 6e 64 20 77 | 61 69 74 20 66 6f 72 20 |pt and w|ait for |
|00005350| 75 73 65 72 20 72 65 73 | 70 6f 6e 73 65 20 2a 2f |user res|ponse */|
|00005360| 0a 0a 09 09 69 66 20 28 | 20 73 74 72 6c 65 6e 28 |....if (| strlen(|
|00005370| 70 70 74 29 20 3c 20 31 | 20 29 20 73 70 72 69 6e |ppt) < 1| ) sprin|
|00005380| 74 66 28 67 62 6c 5f 70 | 70 74 2c 22 20 48 65 6c |tf(gbl_p|pt," Hel|
|00005390| 70 20 25 73 22 2c 50 52 | 4f 4d 50 54 29 3b 0a 09 |p %s",PR|OMPT);..|
|000053a0| 09 65 6c 73 65 09 09 20 | 73 70 72 69 6e 74 66 28 |.else.. |sprintf(|
|000053b0| 67 62 6c 5f 70 70 74 2c | 22 20 20 25 73 20 25 73 |gbl_ppt,|" %s %s|
|000053c0| 22 2c 70 70 74 2c 53 55 | 42 50 52 4f 4d 50 54 29 |",ppt,SU|BPROMPT)|
|000053d0| 3b 0a 09 09 66 70 75 74 | 73 28 67 62 6c 5f 70 70 |;...fput|s(gbl_pp|
|000053e0| 74 2c 73 74 64 6f 75 74 | 29 3b 0a 23 69 66 6e 64 |t,stdout|);.#ifnd|
|000053f0| 65 66 20 42 53 44 0a 09 | 09 69 66 20 28 20 66 67 |ef BSD..|.if ( fg|
|00005400| 65 74 73 28 61 6e 73 77 | 65 72 2c 20 4d 41 58 4c |ets(answ|er, MAXL|
|00005410| 49 4e 45 4c 45 4e 2d 31 | 2c 20 73 74 64 69 6e 29 |INELEN-1|, stdin)|
|00005420| 20 3d 3d 20 4e 55 4c 4c | 20 29 20 7b 0a 09 09 09 | == NULL| ) {....|
|00005430| 70 72 69 6e 74 66 28 22 | 5c 6e 62 79 65 2e 2e 2e |printf("|\nbye...|
|00005440| 5c 6e 22 29 3b 0a 09 09 | 09 65 78 69 74 28 31 29 |\n");...|.exit(1)|
|00005450| 3b 0a 09 09 7d 0a 23 65 | 6c 73 65 0a 09 09 69 66 |;...}.#e|lse...if|
|00005460| 20 28 72 65 61 64 5f 67 | 65 74 73 28 73 74 64 69 | (read_g|ets(stdi|
|00005470| 6e 2d 3e 5f 66 69 6c 65 | 2c 20 61 6e 73 77 65 72 |n->_file|, answer|
|00005480| 2c 20 4d 41 58 4c 49 4e | 45 4c 45 4e 20 2d 20 31 |, MAXLIN|ELEN - 1|
|00005490| 2c 20 31 29 20 3c 20 30 | 29 20 7b 0a 09 09 20 20 |, 1) < 0|) {... |
|000054a0| 20 20 20 20 20 20 70 72 | 69 6e 74 66 28 22 5c 6e | pr|intf("\n|
|000054b0| 62 79 65 2e 2e 2e 5c 6e | 22 29 3b 0a 09 09 09 65 |bye...\n|");....e|
|000054c0| 78 69 74 28 31 29 3b 0a | 09 09 7d 0a 23 65 6e 64 |xit(1);.|..}.#end|
|000054d0| 69 66 0a 0a 09 09 2f 2a | 20 66 69 72 73 74 20 72 |if..../*| first r|
|000054e0| 65 6d 6f 76 65 20 61 6e | 79 20 6c 65 61 64 69 6e |emove an|y leadin|
|000054f0| 67 20 62 6c 61 6e 6b 73 | 20 6f 72 20 74 61 62 73 |g blanks| or tabs|
|00005500| 20 2a 2f 0a 09 09 66 6f | 72 28 73 31 3d 61 6e 73 | */...fo|r(s1=ans|
|00005510| 77 65 72 3b 20 2a 73 31 | 20 3d 3d 20 27 20 27 20 |wer; *s1| == ' ' |
|00005520| 7c 7c 20 2a 73 31 20 3d | 3d 20 27 09 27 3b 20 73 ||| *s1 =|= '.'; s|
|00005530| 31 2b 2b 29 3b 0a 0a 09 | 09 2f 2a 20 63 68 6f 70 |1++);...|./* chop|
|00005540| 20 6f 66 66 20 61 6c 6c | 20 6f 66 20 61 6e 73 77 | off all| of answ|
|00005550| 65 72 20 61 66 74 65 72 | 20 66 69 72 73 74 20 77 |er after| first w|
|00005560| 6f 72 64 2e 20 2a 2f 0a | 09 09 73 32 20 3d 20 69 |ord. */.|..s2 = i|
|00005570| 6e 64 65 78 28 73 31 2c | 27 20 27 29 3b 0a 09 09 |ndex(s1,|' ');...|
|00005580| 69 66 20 28 73 32 20 3d | 3d 20 4e 55 4c 4c 29 20 |if (s2 =|= NULL) |
|00005590| 20 73 32 20 3d 20 69 6e | 64 65 78 28 73 31 2c 27 | s2 = in|dex(s1,'|
|000055a0| 09 27 29 3b 0a 09 09 69 | 66 20 28 73 32 20 3d 3d |.');...i|f (s2 ==|
|000055b0| 20 4e 55 4c 4c 29 20 20 | 73 32 20 3d 20 69 6e 64 | NULL) |s2 = ind|
|000055c0| 65 78 28 73 31 2c 27 5c | 6e 27 29 3b 0a 09 09 69 |ex(s1,'\|n');...i|
|000055d0| 66 20 28 73 32 29 0a 09 | 09 20 20 7b 20 2a 73 32 |f (s2)..|. { *s2|
|000055e0| 20 3d 20 27 5c 30 27 3b | 20 72 65 73 74 20 3d 20 | = '\0';| rest = |
|000055f0| 2b 2b 73 32 3b 20 7d 0a | 09 09 65 6c 73 65 20 7b |++s2; }.|..else {|
|00005600| 0a 09 09 20 20 20 20 72 | 65 73 74 20 3d 20 73 32 |... r|est = s2|
|00005610| 20 3d 20 73 31 20 2b 20 | 73 74 72 6c 65 6e 28 73 | = s1 + |strlen(s|
|00005620| 31 29 3b 0a 09 09 7d 0a | 09 09 6d 61 6b 65 77 76 |1);...}.|..makewv|
|00005630| 65 63 28 72 65 73 74 2c | 77 76 65 63 2c 4d 41 58 |ec(rest,|wvec,MAX|
|00005640| 4d 41 54 43 48 45 53 29 | 3b 0a 0a 09 09 69 66 20 |MATCHES)|;....if |
|00005650| 28 20 73 74 72 6c 65 6e | 28 73 31 29 20 3d 3d 20 |( strlen|(s1) == |
|00005660| 30 20 29 09 09 2f 2a 20 | 20 6f 6e 20 62 6c 61 6e |0 )../* | on blan|
|00005670| 6b 20 6c 69 6e 65 2c 20 | 2a 2f 0a 09 09 09 62 72 |k line, |*/....br|
|00005680| 65 61 6b 3b 09 09 09 2f | 2a 20 70 6f 70 20 75 70 |eak;.../|* pop up|
|00005690| 20 6f 6e 65 20 6c 65 76 | 65 6c 2a 2f 0a 0a 09 09 | one lev|el*/....|
|000056a0| 73 77 69 74 63 68 20 28 | 2a 73 31 29 20 7b 0a 09 |switch (|*s1) {..|
|000056b0| 20 20 20 20 09 20 20 20 | 20 63 61 73 65 20 27 3f | . | case '?|
|000056c0| 27 3a 09 09 09 2f 2a 20 | 3f 3a 20 70 72 69 6e 74 |':.../* |?: print|
|000056d0| 20 73 74 75 66 66 20 61 | 67 61 69 6e 20 2a 2f 0a | stuff a|gain */.|
|000056e0| 09 09 20 20 20 20 09 70 | 72 69 6e 74 68 65 6c 70 |.. .p|rinthelp|
|000056f0| 28 4e 55 4c 4c 2c 20 70 | 70 74 29 3b 0a 09 09 09 |(NULL, p|pt);....|
|00005700| 69 66 20 28 20 61 63 63 | 65 73 73 28 4d 41 4e 45 |if ( acc|ess(MANE|
|00005710| 58 2c 20 52 5f 4f 4b 29 | 20 3e 3d 20 30 20 29 0a |X, R_OK)| >= 0 ).|
|00005720| 09 09 09 20 20 20 20 70 | 72 69 6e 74 66 28 22 5c |... p|rintf("\|
|00005730| 6e 09 4d 61 6e 75 61 6c | 20 70 61 67 65 20 49 53 |n.Manual| page IS|
|00005740| 20 61 76 61 69 6c 61 62 | 6c 65 2e 5c 6e 22 29 3b | availab|le.\n");|
|00005750| 0a 09 20 20 20 20 09 09 | 69 66 20 28 21 6e 6f 5f |.. ..|if (!no_|
|00005760| 73 75 62 73 29 20 70 72 | 69 6e 74 74 6f 70 69 78 |subs) pr|inttopix|
|00005770| 28 74 6f 70 69 78 2c 20 | 31 2c 30 29 3b 0a 09 09 |(topix, |1,0);...|
|00005780| 09 65 6c 73 65 09 70 72 | 69 6e 74 66 28 22 5c 6e |.else.pr|intf("\n|
|00005790| 20 53 6f 72 72 79 2c 20 | 6e 6f 20 73 75 62 74 6f | Sorry, |no subto|
|000057a0| 70 69 63 73 2e 5c 6e 5c | 6e 22 29 3b 0a 09 09 09 |pics.\n\|n");....|
|000057b0| 62 72 65 61 6b 3b 0a 0a | 09 09 20 20 20 20 63 61 |break;..|.. ca|
|000057c0| 73 65 20 27 23 27 3a 0a | 09 09 09 69 66 20 28 21 |se '#':.|...if (!|
|000057d0| 6e 6f 5f 73 75 62 73 29 | 20 70 72 69 6e 74 74 6f |no_subs)| printto|
|000057e0| 70 69 78 28 20 74 6f 70 | 69 78 2c 20 31 2c 30 29 |pix( top|ix, 1,0)|
|000057f0| 3b 0a 09 09 09 65 6c 73 | 65 20 20 20 20 70 72 69 |;....els|e pri|
|00005800| 6e 74 66 28 22 5c 6e 20 | 53 6f 72 72 79 2c 20 6e |ntf("\n |Sorry, n|
|00005810| 6f 20 73 75 62 74 6f 70 | 69 63 73 2e 5c 6e 5c 6e |o subtop|ics.\n\n|
|00005820| 22 29 3b 0a 09 09 09 62 | 72 65 61 6b 3b 0a 0a 09 |");....b|reak;...|
|00005830| 09 20 20 20 20 63 61 73 | 65 20 27 2a 27 3a 09 09 |. cas|e '*':..|
|00005840| 09 2f 2a 20 2a 3a 20 6c | 69 73 74 20 63 6f 6d 6d |./* *: l|ist comm|
|00005850| 61 6e 64 73 20 2a 2f 0a | 09 09 09 70 72 69 6e 74 |ands */.|...print|
|00005860| 66 28 22 5c 6e 22 29 3b | 0a 09 09 20 20 20 20 20 |f("\n");|... |
|00005870| 20 20 20 66 6f 72 28 69 | 3d 30 3b 20 68 65 6c 70 | for(i|=0; help|
|00005880| 63 6d 64 73 5b 69 5d 20 | 21 3d 20 4e 55 4c 4c 3b |cmds[i] |!= NULL;|
|00005890| 20 69 2b 2b 29 20 7b 0a | 09 09 09 09 70 72 69 6e | i++) {.|....prin|
|000058a0| 74 66 28 22 09 25 73 5c | 6e 22 2c 68 65 6c 70 63 |tf(".%s\|n",helpc|
|000058b0| 6d 64 73 5b 69 5d 29 3b | 0a 09 09 09 7d 0a 09 09 |mds[i]);|....}...|
|000058c0| 09 70 72 69 6e 74 66 28 | 22 5c 6e 22 29 3b 0a 09 |.printf(|"\n");..|
|000058d0| 09 09 62 72 65 61 6b 3b | 0a 0a 09 09 20 20 20 20 |..break;|.... |
|000058e0| 63 61 73 65 20 27 24 27 | 3a 09 09 09 2f 2a 20 24 |case '$'|:.../* $|
|000058f0| 3a 20 66 69 6e 64 20 6f | 75 74 20 61 62 6f 75 74 |: find o|ut about|
|00005900| 20 66 69 6c 65 73 20 2a | 2f 0a 09 09 20 20 20 20 | files *|/... |
|00005910| 09 73 32 20 3d 20 73 31 | 20 2b 20 31 3b 0a 09 09 |.s2 = s1| + 1;...|
|00005920| 09 69 66 20 28 6e 6f 5f | 73 75 62 73 29 20 7b 0a |.if (no_|subs) {.|
|00005930| 09 09 09 09 70 72 69 6e | 74 66 28 22 5c 6e 20 53 |....prin|tf("\n S|
|00005940| 6f 72 72 79 2c 20 6e 6f | 20 73 75 62 74 6f 70 69 |orry, no| subtopi|
|00005950| 63 73 2e 5c 6e 5c 6e 22 | 29 3b 0a 09 09 20 20 20 |cs.\n\n"|);... |
|00005960| 20 09 09 62 72 65 61 6b | 3b 0a 09 09 09 7d 0a 09 | ..break|;....}..|
|00005970| 09 09 73 74 72 63 70 79 | 28 63 6d 64 62 75 66 2c |..strcpy|(cmdbuf,|
|00005980| 20 49 4e 46 4f 48 45 41 | 44 29 3b 0a 09 09 09 73 | INFOHEA|D);....s|
|00005990| 74 72 63 61 74 28 63 6d | 64 62 75 66 2c 73 32 29 |trcat(cm|dbuf,s2)|
|000059a0| 3b 0a 09 09 09 73 74 72 | 63 61 74 28 63 6d 64 62 |;....str|cat(cmdb|
|000059b0| 75 66 2c 22 2a 20 22 29 | 3b 0a 09 09 09 73 74 72 |uf,"* ")|;....str|
|000059c0| 63 61 74 28 63 6d 64 62 | 75 66 2c 20 49 4e 46 4f |cat(cmdb|uf, INFO|
|000059d0| 54 41 49 4c 29 3b 0a 09 | 09 09 70 72 69 6e 74 66 |TAIL);..|..printf|
|000059e0| 28 22 5c 6e 20 46 69 6c | 65 20 69 6e 66 6f 72 6d |("\n Fil|e inform|
|000059f0| 61 74 69 6f 6e 3a 20 5c | 6e 22 29 3b 0a 09 09 09 |ation: \|n");....|
|00005a00| 73 79 73 74 65 6d 28 63 | 6d 64 62 75 66 29 3b 0a |system(c|mdbuf);.|
|00005a10| 09 09 09 70 72 69 6e 74 | 66 28 22 5c 6e 22 29 3b |...print|f("\n");|
|00005a20| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 20 20 20 |....brea|k;... |
|00005a30| 20 20 20 20 20 0a 0a 09 | 20 20 20 20 09 20 20 20 | ...| . |
|00005a40| 20 63 61 73 65 20 27 2e | 27 3a 09 09 09 2f 2a 20 | case '.|':.../* |
|00005a50| 2e 3a 20 64 6f 20 6d 61 | 6e 70 61 67 65 20 69 66 |.: do ma|npage if|
|00005a60| 20 61 6e 79 20 2a 2f 0a | 09 09 20 20 20 20 09 73 | any */.|.. .s|
|00005a70| 32 20 3d 20 73 31 20 2b | 20 31 3b 0a 09 09 09 69 |2 = s1 +| 1;....i|
|00005a80| 66 20 28 6e 6f 5f 73 75 | 62 73 29 20 7b 0a 09 09 |f (no_su|bs) {...|
|00005a90| 09 09 70 72 69 6e 74 66 | 28 22 5c 6e 20 53 6f 72 |..printf|("\n Sor|
|00005aa0| 72 79 2c 20 6e 6f 20 73 | 75 62 74 6f 70 69 63 73 |ry, no s|ubtopics|
|00005ab0| 2e 5c 6e 5c 6e 22 29 3b | 0a 09 09 20 20 20 20 09 |.\n\n");|... .|
|00005ac0| 09 62 72 65 61 6b 3b 0a | 09 09 09 7d 0a 09 09 09 |.break;.|...}....|
|00005ad0| 69 66 20 28 20 2a 73 32 | 20 3d 3d 20 27 5c 30 27 |if ( *s2| == '\0'|
|00005ae0| 20 29 20 7b 0a 09 09 09 | 09 6d 78 5b 30 5d 20 3d | ) {....|.mx[0] =|
|00005af0| 20 22 22 3b 20 20 6d 78 | 5b 31 5d 20 3d 20 4e 55 | ""; mx|[1] = NU|
|00005b00| 4c 4c 3b 20 6b 20 3d 20 | 31 3b 0a 09 09 09 7d 0a |LL; k = |1;....}.|
|00005b10| 09 09 09 65 6c 73 65 20 | 69 66 20 28 20 28 6b 20 |...else |if ( (k |
|00005b20| 3d 20 6d 61 74 63 68 76 | 28 20 73 32 2c 20 74 6f |= matchv|( s2, to|
|00005b30| 70 69 78 2c 20 6d 78 29 | 29 20 3d 3d 20 30 20 29 |pix, mx)|) == 0 )|
|00005b40| 20 7b 0a 09 09 09 20 20 | 20 70 72 69 6e 74 66 28 | {.... | printf(|
|00005b50| 22 5c 6e 20 53 6f 72 72 | 79 2c 20 6e 6f 20 74 6f |"\n Sorr|y, no to|
|00005b60| 70 69 63 73 20 6d 61 74 | 63 68 20 25 73 5c 6e 22 |pics mat|ch %s\n"|
|00005b70| 2c 73 32 29 3b 0a 09 09 | 09 20 20 20 70 72 69 6e |,s2);...|. prin|
|00005b80| 74 66 28 22 20 28 6c 69 | 73 74 20 63 6d 6e 64 73 |tf(" (li|st cmnds|
|00005b90| 20 77 69 74 68 20 27 2a | 27 2c 20 74 6f 70 69 78 | with '*|', topix|
|00005ba0| 20 77 69 74 68 20 27 23 | 27 29 5c 6e 22 29 3b 0a | with '#|')\n");.|
|00005bb0| 09 09 09 7d 0a 09 09 09 | 66 6f 72 28 20 69 3d 30 |...}....|for( i=0|
|00005bc0| 3b 20 69 20 3c 20 6b 3b | 20 69 2b 2b 20 29 20 7b |; i < k;| i++ ) {|
|00005bd0| 0a 09 09 09 09 73 74 72 | 63 70 79 28 63 6d 64 62 |.....str|cpy(cmdb|
|00005be0| 75 66 2c 6d 78 5b 69 5d | 29 3b 0a 09 09 09 09 73 |uf,mx[i]|);.....s|
|00005bf0| 74 72 63 61 74 28 63 6d | 64 62 75 66 2c 4d 41 4e |trcat(cm|dbuf,MAN|
|00005c00| 45 58 29 3b 0a 09 09 09 | 09 69 66 20 28 61 63 63 |EX);....|.if (acc|
|00005c10| 65 73 73 28 63 6d 64 62 | 75 66 2c 20 52 5f 4f 4b |ess(cmdb|uf, R_OK|
|00005c20| 7c 58 5f 4f 4b 20 29 20 | 3c 20 30 29 20 7b 0a 09 ||X_OK ) |< 0) {..|
|00005c30| 09 09 09 20 20 20 20 20 | 20 20 20 73 74 72 63 70 |... | strcp|
|00005c40| 79 28 63 6d 64 62 75 66 | 2c 6d 78 5b 69 5d 29 3b |y(cmdbuf|,mx[i]);|
|00005c50| 0a 09 09 09 09 09 73 74 | 72 63 61 74 28 63 6d 64 |......st|rcat(cmd|
|00005c60| 62 75 66 2c 4d 41 4e 5f | 53 55 42 45 58 29 3b 0a |buf,MAN_|SUBEX);.|
|00005c70| 09 09 09 09 09 69 66 20 | 28 61 63 63 65 73 73 28 |.....if |(access(|
|00005c80| 63 6d 64 62 75 66 2c 52 | 5f 4f 4b 7c 58 5f 4f 4b |cmdbuf,R|_OK|X_OK|
|00005c90| 29 20 3c 20 30 29 20 7b | 0a 09 09 09 09 09 20 20 |) < 0) {|...... |
|00005ca0| 20 20 70 72 69 6e 74 66 | 28 22 5c 6e 20 53 6f 72 | printf|("\n Sor|
|00005cb0| 72 79 2c 20 25 73 20 66 | 6f 72 20 25 73 2e 5c 6e |ry, %s f|or %s.\n|
|00005cc0| 5c 6e 22 2c 0a 09 09 09 | 09 09 20 20 20 20 20 20 |\n",....|.. |
|00005cd0| 22 4e 6f 20 6d 61 6e 75 | 61 6c 20 72 65 66 65 72 |"No manu|al refer|
|00005ce0| 65 6e 63 65 20 61 76 61 | 69 6c 61 62 6c 65 22 2c |ence ava|ilable",|
|00005cf0| 0a 09 09 09 09 09 20 20 | 20 20 20 20 28 73 74 72 |...... | (str|
|00005d00| 6c 65 6e 28 73 32 29 3d | 3d 30 29 3f 70 70 74 3a |len(s2)=|=0)?ppt:|
|00005d10| 6d 78 5b 69 5d 29 3b 0a | 09 09 09 09 09 20 20 20 |mx[i]);.|..... |
|00005d20| 20 63 6f 6e 74 69 6e 75 | 65 3b 0a 09 09 09 09 09 | continu|e;......|
|00005d30| 7d 0a 09 09 09 09 7d 0a | 09 09 09 09 69 66 20 28 |}.....}.|....if (|
|00005d40| 69 20 3e 20 30 29 20 7b | 0a 20 09 09 09 09 20 20 |i > 0) {|. .... |
|00005d50| 20 20 20 6b 3d 0a 09 09 | 09 09 20 20 20 20 20 74 | k=...|.. t|
|00005d60| 61 6b 65 69 74 28 22 20 | 4e 65 78 74 20 6d 61 6e |akeit(" |Next man|
|00005d70| 20 70 61 67 65 3a 20 25 | 73 2e 5c 6e 20 54 61 6b | page: %|s.\n Tak|
|00005d80| 65 20 69 74 3f 20 22 2c | 0a 09 09 09 09 09 6d 78 |e it? ",|......mx|
|00005d90| 5b 69 5d 29 3b 0a 09 09 | 09 09 20 20 20 20 20 69 |[i]);...|.. i|
|00005da0| 66 20 28 6b 20 3d 3d 20 | 20 31 29 20 63 6f 6e 74 |f (k == | 1) cont|
|00005db0| 69 6e 75 65 3b 0a 09 09 | 09 09 20 20 20 20 20 69 |inue;...|.. i|
|00005dc0| 66 20 28 6b 20 3d 3d 20 | 2d 31 29 20 62 72 65 61 |f (k == |-1) brea|
|00005dd0| 6b 3b 0a 09 09 09 09 7d | 0a 09 09 09 09 70 72 69 |k;.....}|.....pri|
|00005de0| 6e 74 66 28 22 20 2e 2e | 2e 64 6f 69 6e 67 20 25 |ntf(" ..|.doing %|
|00005df0| 73 5c 6e 5c 6e 22 2c 63 | 6d 64 62 75 66 29 3b 0a |s\n\n",c|mdbuf);.|
|00005e00| 09 09 09 09 66 6b 6f 66 | 66 28 53 48 45 4c 4c 50 |....fkof|f(SHELLP|
|00005e10| 52 4f 47 2c 53 48 45 4c | 4c 4f 50 54 53 2c 63 6d |ROG,SHEL|LOPTS,cm|
|00005e20| 64 62 75 66 2c 4e 55 4c | 4c 29 3b 0a 09 09 09 09 |dbuf,NUL|L);.....|
|00005e30| 09 2f 2a 20 73 6f 75 72 | 63 65 20 63 6f 6e 74 65 |./* sour|ce conte|
|00005e40| 6e 74 73 20 6f 66 20 2e | 4d 41 4e 55 41 4c 20 66 |nts of .|MANUAL f|
|00005e50| 69 6c 65 20 2a 2f 0a 09 | 09 09 7d 0a 09 09 09 62 |ile */..|..}....b|
|00005e60| 72 65 61 6b 3b 0a 0a 0a | 09 09 20 20 20 20 64 65 |reak;...|.. de|
|00005e70| 66 61 75 6c 74 3a 09 09 | 09 2f 2a 20 6d 75 73 74 |fault:..|./* must|
|00005e80| 20 62 65 20 61 20 74 6f | 70 69 63 20 73 70 65 63 | be a to|pic spec|
|00005e90| 20 2a 2f 0a 09 09 20 20 | 20 20 20 20 20 20 69 66 | */... | if|
|00005ea0| 20 28 20 6e 6f 5f 73 75 | 62 73 20 29 20 20 7b 0a | ( no_su|bs ) {.|
|00005eb0| 09 09 09 09 70 72 69 6e | 74 66 28 22 5c 6e 20 53 |....prin|tf("\n S|
|00005ec0| 6f 72 72 79 2c 20 6e 6f | 20 73 75 62 74 6f 70 69 |orry, no| subtopi|
|00005ed0| 63 73 2e 5c 6e 5c 6e 22 | 29 3b 0a 09 09 20 20 20 |cs.\n\n"|);... |
|00005ee0| 20 09 09 62 72 65 61 6b | 3b 0a 09 09 09 7d 0a 09 | ..break|;....}..|
|00005ef0| 09 09 69 66 20 28 20 28 | 6b 20 3d 20 6d 61 74 63 |..if ( (|k = matc|
|00005f00| 68 76 28 20 73 31 2c 20 | 74 6f 70 69 78 2c 20 6d |hv( s1, |topix, m|
|00005f10| 78 29 29 20 3d 3d 20 30 | 20 29 20 7b 0a 09 09 09 |x)) == 0| ) {....|
|00005f20| 20 20 20 70 72 69 6e 74 | 66 28 22 5c 6e 20 53 6f | print|f("\n So|
|00005f30| 72 72 79 2c 20 6e 6f 20 | 64 69 72 65 63 74 20 68 |rry, no |direct h|
|00005f40| 65 6c 70 20 66 6f 72 20 | 20 25 73 5c 6e 22 2c 73 |elp for | %s\n",s|
|00005f50| 31 29 3b 0a 09 09 09 20 | 20 20 69 66 20 28 20 28 |1);.... | if ( (|
|00005f60| 6b 20 3d 20 78 72 65 66 | 5f 6d 61 74 63 68 76 28 |k = xref|_matchv(|
|00005f70| 73 31 2c 74 6f 70 69 78 | 2c 6d 78 29 29 20 3d 3d |s1,topix|,mx)) ==|
|00005f80| 20 30 29 20 7b 0a 09 09 | 09 20 20 20 20 20 20 20 | 0) {...|. |
|00005f90| 70 72 69 6e 74 66 28 22 | 20 6e 6f 20 63 72 6f 73 |printf("| no cros|
|00005fa0| 73 2d 72 65 66 65 72 65 | 6e 63 65 73 20 74 6f 20 |s-refere|nces to |
|00005fb0| 20 25 73 5c 6e 22 2c 73 | 31 29 3b 0a 09 09 09 20 | %s\n",s|1);.... |
|00005fc0| 20 20 20 20 20 20 70 72 | 69 6e 74 66 28 0a 09 09 | pr|intf(...|
|00005fd0| 09 09 22 20 28 6c 69 73 | 74 20 63 6d 6e 64 73 20 |.." (lis|t cmnds |
|00005fe0| 77 69 74 68 20 27 2a 27 | 2c 20 74 6f 70 69 63 73 |with '*'|, topics|
|00005ff0| 20 77 69 74 68 20 27 23 | 27 29 5c 6e 22 29 3b 0a | with '#|')\n");.|
|00006000| 09 09 09 20 20 20 20 20 | 20 20 62 72 65 61 6b 3b |... | break;|
|00006010| 09 2f 2a 20 6c 65 61 76 | 65 20 73 77 69 74 63 68 |./* leav|e switch|
|00006020| 20 2a 2f 0a 09 09 09 20 | 20 20 7d 0a 09 09 09 20 | */.... | }.... |
|00006030| 20 20 65 6c 73 65 20 7b | 0a 09 09 09 20 20 20 20 | else {|.... |
|00006040| 20 20 20 64 6f 5f 78 72 | 65 66 28 70 70 74 2c 73 | do_xr|ef(ppt,s|
|00006050| 31 2c 6d 78 29 3b 0a 09 | 09 09 20 20 20 20 20 20 |1,mx);..|.. |
|00006060| 20 62 72 65 61 6b 3b 20 | 20 20 2f 2a 20 6c 65 61 | break; | /* lea|
|00006070| 76 65 20 73 77 69 74 63 | 68 20 2a 2f 0a 09 09 09 |ve switc|h */....|
|00006080| 20 20 20 7d 0a 09 09 09 | 7d 0a 0a 09 09 09 2f 2a | }....|}...../*|
|00006090| 20 73 74 65 70 20 74 68 | 72 75 20 73 75 62 2d 74 | step th|ru sub-t|
|000060a0| 6f 70 69 63 73 20 74 68 | 61 74 20 6d 61 74 63 68 |opics th|at match|
|000060b0| 20 73 72 63 20 2a 2f 0a | 09 09 20 20 20 20 20 20 | src */.|.. |
|000060c0| 20 20 66 6f 72 28 69 3d | 30 3b 20 69 20 3c 20 6b | for(i=|0; i < k|
|000060d0| 3b 20 69 2b 2b 29 20 7b | 0a 09 09 09 20 20 20 20 |; i++) {|.... |
|000060e0| 73 33 20 3d 20 6d 78 5b | 69 5d 3b 0a 0a 09 09 09 |s3 = mx[|i];.....|
|000060f0| 20 20 20 20 69 66 20 28 | 69 20 3e 20 30 29 20 7b | if (|i > 0) {|
|00006100| 0a 09 09 09 20 20 20 20 | 20 20 20 20 6a 3d 74 61 |.... | j=ta|
|00006110| 6b 65 69 74 28 22 5c 6e | 4e 65 78 74 20 25 73 20 |keit("\n|Next %s |
|00006120| 73 75 62 74 6f 70 69 63 | 3a 20 25 73 5c 6e 54 61 |subtopic|: %s\nTa|
|00006130| 6b 65 20 69 74 3f 22 2c | 0a 09 09 09 09 09 20 70 |ke it?",|...... p|
|00006140| 70 74 2c 73 33 29 3b 0a | 09 09 09 09 69 66 20 28 |pt,s3);.|....if (|
|00006150| 6a 20 3d 3d 20 20 31 29 | 20 63 6f 6e 74 69 6e 75 |j == 1)| continu|
|00006160| 65 3b 0a 09 09 09 09 69 | 66 20 28 6a 20 3d 3d 20 |e;.....i|f (j == |
|00006170| 2d 31 29 20 62 72 65 61 | 6b 3b 0a 09 09 09 20 20 |-1) brea|k;.... |
|00006180| 20 20 7d 0a 0a 09 09 09 | 20 20 20 20 69 66 20 28 | }.....| if (|
|00006190| 20 63 68 64 69 72 28 73 | 33 29 20 3e 3d 20 30 20 | chdir(s|3) >= 0 |
|000061a0| 29 20 7b 20 20 2f 2a 20 | 64 69 72 65 63 74 6f 72 |) { /* |director|
|000061b0| 79 20 20 73 75 62 74 6f | 70 69 63 20 2a 2f 0a 09 |y subto|pic */..|
|000061c0| 09 09 20 20 20 20 09 73 | 74 72 63 70 79 28 66 75 |.. .s|trcpy(fu|
|000061d0| 6c 6c 70 61 74 68 2c 70 | 70 74 29 3b 0a 09 09 09 |llpath,p|pt);....|
|000061e0| 20 20 20 20 09 73 74 72 | 63 61 74 28 66 75 6c 6c | .str|cat(full|
|000061f0| 70 61 74 68 2c 22 20 22 | 29 3b 0a 09 09 09 20 20 |path," "|);.... |
|00006200| 20 20 09 73 74 72 63 61 | 74 28 66 75 6c 6c 70 61 | .strca|t(fullpa|
|00006210| 74 68 2c 73 33 29 3b 0a | 09 09 09 20 20 20 20 09 |th,s3);.|... .|
|00006220| 68 65 6c 70 31 28 66 75 | 6c 6c 70 61 74 68 2c 77 |help1(fu|llpath,w|
|00006230| 76 65 63 2c 30 2c 30 2c | 20 30 29 3b 09 2f 2a 20 |vec,0,0,| 0);./* |
|00006240| 72 65 63 75 72 73 65 20 | 2a 2f 0a 09 09 09 09 69 |recurse |*/.....i|
|00006250| 66 20 28 20 73 74 72 63 | 6d 70 28 67 65 74 77 64 |f ( strc|mp(getwd|
|00006260| 28 6e 65 77 64 69 72 29 | 2c 68 65 6c 70 64 69 72 |(newdir)|,helpdir|
|00006270| 29 20 29 0a 09 09 09 09 | 09 63 68 64 69 72 28 22 |) ).....|.chdir("|
|00006280| 2e 2e 22 29 3b 0a 09 09 | 09 20 20 20 20 7d 09 09 |..");...|. }..|
|00006290| 09 2f 2a 20 65 6c 73 65 | 20 74 65 78 74 20 73 75 |./* else| text su|
|000062a0| 62 74 6f 70 69 63 20 2a | 2f 0a 09 09 09 20 20 20 |btopic *|/.... |
|000062b0| 20 65 6c 73 65 20 20 7b | 0a 09 09 09 09 73 74 72 | else {|.....str|
|000062c0| 63 70 79 28 66 75 6c 6c | 70 61 74 68 2c 20 70 70 |cpy(full|path, pp|
|000062d0| 74 29 3b 0a 09 09 09 09 | 73 74 72 63 61 74 28 66 |t);.....|strcat(f|
|000062e0| 75 6c 6c 70 61 74 68 2c | 20 22 20 22 29 3b 0a 09 |ullpath,| " ");..|
|000062f0| 09 09 09 73 74 72 63 61 | 74 28 66 75 6c 6c 70 61 |...strca|t(fullpa|
|00006300| 74 68 2c 20 73 33 29 3b | 0a 09 09 09 09 70 72 69 |th, s3);|.....pri|
|00006310| 6e 74 68 65 6c 70 28 73 | 33 2c 20 66 75 6c 6c 70 |nthelp(s|3, fullp|
|00006320| 61 74 68 29 3b 0a 09 09 | 09 20 20 20 20 7d 0a 09 |ath);...|. }..|
|00006330| 09 09 7d 0a 0a 09 09 7d | 09 2f 2a 20 65 6e 64 20 |..}....}|./* end |
|00006340| 6f 66 20 73 77 69 74 63 | 68 20 2a 2f 0a 0a 09 7d |of switc|h */...}|
|00006350| 09 2f 2a 20 65 6e 64 20 | 6f 66 20 77 68 69 6c 65 |./* end |of while|
|00006360| 28 31 29 20 2a 2f 0a 0a | 09 69 66 20 28 21 6e 6f |(1) */..|.if (!no|
|00006370| 5f 73 75 62 73 20 26 26 | 20 28 2a 74 6f 70 69 78 |_subs &&| (*topix|
|00006380| 20 21 3d 20 4e 55 4c 4c | 29 20 29 20 66 72 65 65 | != NULL|) ) free|
|00006390| 28 20 2a 74 6f 70 69 78 | 20 29 3b 0a 0a 09 72 65 |( *topix| );...re|
|000063a0| 74 75 72 6e 28 30 29 3b | 0a 0a 20 20 7d 09 2f 2a |turn(0);|.. }./*|
|000063b0| 20 65 6e 64 20 6f 66 20 | 68 65 6c 70 31 20 2a 2f | end of |help1 */|
|000063c0| 0a 0a 0a 2f 2a 20 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.../* **|********|
|000063d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000063e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000063f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.