home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| makefile script, ASCII text
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 61 6c 65 78 | 6a 40 65 71 75 69 6e 6f |om: alex|j@equino|
|00000030| 78 2e 75 6e 72 2e 65 64 | 75 20 28 4a 61 63 6b 20 |x.unr.ed|u (Jack |
|00000040| 41 6c 65 78 61 6e 64 65 | 72 29 0a 53 75 62 6a 65 |Alexande|r).Subje|
|00000050| 63 74 3a 20 76 32 35 69 | 31 34 30 3a 20 69 6c 73 |ct: v25i|140: ils|
|00000060| 20 2d 20 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 | - inter|active "|
|00000070| 6c 73 22 20 61 6e 64 20 | 62 72 6f 77 73 65 72 0a |ls" and |browser.|
|00000080| 53 65 6e 64 65 72 3a 20 | 75 6e 69 78 2d 73 6f 75 |Sender: |unix-sou|
|00000090| 72 63 65 73 2d 6d 6f 64 | 65 72 61 74 6f 72 40 70 |rces-mod|erator@p|
|000000a0| 61 2e 64 65 63 2e 63 6f | 6d 0a 41 70 70 72 6f 76 |a.dec.co|m.Approv|
|000000b0| 65 64 3a 20 76 69 78 69 | 65 40 70 61 2e 64 65 63 |ed: vixi|e@pa.dec|
|000000c0| 2e 63 6f 6d 0a 0a 53 75 | 62 6d 69 74 74 65 64 2d |.com..Su|bmitted-|
|000000d0| 42 79 3a 20 61 6c 65 78 | 6a 40 65 71 75 69 6e 6f |By: alex|j@equino|
|000000e0| 78 2e 75 6e 72 2e 65 64 | 75 20 28 4a 61 63 6b 20 |x.unr.ed|u (Jack |
|000000f0| 41 6c 65 78 61 6e 64 65 | 72 29 0a 50 6f 73 74 69 |Alexande|r).Posti|
|00000100| 6e 67 2d 4e 75 6d 62 65 | 72 3a 20 56 6f 6c 75 6d |ng-Numbe|r: Volum|
|00000110| 65 20 32 35 2c 20 49 73 | 73 75 65 20 31 34 30 0a |e 25, Is|sue 140.|
|00000120| 41 72 63 68 69 76 65 2d | 4e 61 6d 65 3a 20 69 6c |Archive-|Name: il|
|00000130| 73 0a 0a 23 21 20 2f 62 | 69 6e 2f 73 68 0a 23 20 |s..#! /b|in/sh.# |
|00000140| 54 68 69 73 20 69 73 20 | 61 20 73 68 65 6c 6c 20 |This is |a shell |
|00000150| 61 72 63 68 69 76 65 2e | 20 20 52 65 6d 6f 76 65 |archive.| Remove|
|00000160| 20 61 6e 79 74 68 69 6e | 67 20 62 65 66 6f 72 65 | anythin|g before|
|00000170| 20 74 68 69 73 20 6c 69 | 6e 65 2c 20 74 68 65 6e | this li|ne, then|
|00000180| 20 75 6e 70 61 63 6b 0a | 23 20 69 74 20 62 79 20 | unpack.|# it by |
|00000190| 73 61 76 69 6e 67 20 69 | 74 20 69 6e 74 6f 20 61 |saving i|t into a|
|000001a0| 20 66 69 6c 65 20 61 6e | 64 20 74 79 70 69 6e 67 | file an|d typing|
|000001b0| 20 22 73 68 20 66 69 6c | 65 22 2e 20 20 54 6f 20 | "sh fil|e". To |
|000001c0| 6f 76 65 72 77 72 69 74 | 65 20 65 78 69 73 74 69 |overwrit|e existi|
|000001d0| 6e 67 0a 23 20 66 69 6c | 65 73 2c 20 74 79 70 65 |ng.# fil|es, type|
|000001e0| 20 22 73 68 20 66 69 6c | 65 20 2d 63 22 2e 20 20 | "sh fil|e -c". |
|000001f0| 59 6f 75 20 63 61 6e 20 | 61 6c 73 6f 20 66 65 65 |You can |also fee|
|00000200| 64 20 74 68 69 73 20 61 | 73 20 73 74 61 6e 64 61 |d this a|s standa|
|00000210| 72 64 20 69 6e 70 75 74 | 20 76 69 61 0a 23 20 75 |rd input| via.# u|
|00000220| 6e 73 68 61 72 2c 20 6f | 72 20 62 79 20 74 79 70 |nshar, o|r by typ|
|00000230| 69 6e 67 20 22 73 68 20 | 3c 66 69 6c 65 22 2c 20 |ing "sh |<file", |
|00000240| 65 2e 67 2e 2e 20 20 49 | 66 20 74 68 69 73 20 61 |e.g.. I|f this a|
|00000250| 72 63 68 69 76 65 20 69 | 73 20 63 6f 6d 70 6c 65 |rchive i|s comple|
|00000260| 74 65 2c 20 79 6f 75 0a | 23 20 77 69 6c 6c 20 73 |te, you.|# will s|
|00000270| 65 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ee the f|ollowing|
|00000280| 20 6d 65 73 73 61 67 65 | 20 61 74 20 74 68 65 20 | message| at the |
|00000290| 65 6e 64 3a 0a 23 09 09 | 22 45 6e 64 20 6f 66 20 |end:.#..|"End of |
|000002a0| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 2e 22 0a |shell ar|chive.".|
|000002b0| 23 20 43 6f 6e 74 65 6e | 74 73 3a 20 20 4d 41 4e |# Conten|ts: MAN|
|000002c0| 49 46 45 53 54 20 4d 61 | 6b 65 66 69 6c 65 20 52 |IFEST Ma|kefile R|
|000002d0| 45 41 44 4d 45 20 67 65 | 74 2e 63 20 67 65 74 2e |EADME ge|t.c get.|
|000002e0| 68 20 69 6c 73 2e 31 20 | 69 6c 73 2e 63 20 69 6c |h ils.1 |ils.c il|
|000002f0| 73 2e 68 0a 23 20 20 20 | 69 6e 70 75 74 2e 63 20 |s.h.# |input.c |
|00000300| 6d 61 69 6e 2e 63 20 70 | 61 72 73 65 2e 63 20 77 |main.c p|arse.c w|
|00000310| 69 6c 64 6d 61 74 2e 63 | 0a 23 20 57 72 61 70 70 |ildmat.c|.# Wrapp|
|00000320| 65 64 20 62 79 20 76 69 | 78 69 65 40 63 6f 67 6e |ed by vi|xie@cogn|
|00000330| 69 74 69 6f 6e 2e 70 61 | 2e 64 65 63 2e 63 6f 6d |ition.pa|.dec.com|
|00000340| 20 6f 6e 20 53 61 74 20 | 46 65 62 20 32 39 20 32 | on Sat |Feb 29 2|
|00000350| 30 3a 33 30 3a 30 34 20 | 31 39 39 32 0a 50 41 54 |0:30:04 |1992.PAT|
|00000360| 48 3d 2f 62 69 6e 3a 2f | 75 73 72 2f 62 69 6e 3a |H=/bin:/|usr/bin:|
|00000370| 2f 75 73 72 2f 75 63 62 | 20 3b 20 65 78 70 6f 72 |/usr/ucb| ; expor|
|00000380| 74 20 50 41 54 48 0a 69 | 66 20 74 65 73 74 20 2d |t PATH.i|f test -|
|00000390| 66 20 27 4d 41 4e 49 46 | 45 53 54 27 20 2d 61 20 |f 'MANIF|EST' -a |
|000003a0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|000003b0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|000003c0| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|000003d0| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|000003e0| 6c 65 20 5c 22 27 4d 41 | 4e 49 46 45 53 54 27 5c |le \"'MA|NIFEST'\|
|000003f0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00000400| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00000410| 4d 41 4e 49 46 45 53 54 | 27 5c 22 20 5c 28 38 38 |MANIFEST|'\" \(88|
|00000420| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00000430| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 4d 41 4e |d "s/^X/|/" >'MAN|
|00000440| 49 46 45 53 54 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |IFEST' <|<'END_OF|
|00000450| 5f 46 49 4c 45 27 0a 4d | 41 4e 49 46 45 53 54 0a |_FILE'.M|ANIFEST.|
|00000460| 4d 61 6b 65 66 69 6c 65 | 0a 52 45 41 44 4d 45 0a |Makefile|.README.|
|00000470| 67 65 74 2e 63 0a 67 65 | 74 2e 68 0a 69 6c 73 2e |get.c.ge|t.h.ils.|
|00000480| 31 0a 69 6c 73 2e 63 0a | 69 6c 73 2e 68 0a 69 6e |1.ils.c.|ils.h.in|
|00000490| 70 75 74 2e 63 0a 6d 61 | 69 6e 2e 63 0a 70 61 72 |put.c.ma|in.c.par|
|000004a0| 73 65 2e 63 0a 77 69 6c | 64 6d 61 74 2e 63 0a 45 |se.c.wil|dmat.c.E|
|000004b0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|000004c0| 73 74 20 38 38 20 2d 6e | 65 20 60 77 63 20 2d 63 |st 88 -n|e `wc -c|
|000004d0| 20 3c 27 4d 41 4e 49 46 | 45 53 54 27 60 3b 20 74 | <'MANIF|EST'`; t|
|000004e0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|000004f0| 72 3a 20 5c 22 27 4d 41 | 4e 49 46 45 53 54 27 5c |r: \"'MA|NIFEST'\|
|00000500| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00000510| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00000520| 20 65 6e 64 20 6f 66 20 | 27 4d 41 4e 49 46 45 53 | end of |'MANIFES|
|00000530| 54 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |T'.fi.if| test -f|
|00000540| 20 27 4d 61 6b 65 66 69 | 6c 65 27 20 2d 61 20 22 | 'Makefi|le' -a "|
|00000550| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00000560| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00000570| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00000580| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|00000590| 65 20 5c 22 27 4d 61 6b | 65 66 69 6c 65 27 5c 22 |e \"'Mak|efile'\"|
|000005a0| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|000005b0| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 4d | Extract|ing \"'M|
|000005c0| 61 6b 65 66 69 6c 65 27 | 5c 22 20 5c 28 35 32 34 |akefile'|\" \(524|
|000005d0| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|000005e0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 4d 61 6b |d "s/^X/|/" >'Mak|
|000005f0| 65 66 69 6c 65 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |efile' <|<'END_OF|
|00000600| 5f 46 49 4c 45 27 0a 58 | 23 20 4d 61 6b 65 66 69 |_FILE'.X|# Makefi|
|00000610| 6c 65 20 66 6f 72 20 69 | 6c 73 0a 58 23 0a 43 46 |le for i|ls.X#.CF|
|00000620| 4c 41 47 53 20 3d 20 2d | 44 24 28 53 59 53 54 45 |LAGS = -|D$(SYSTE|
|00000630| 4d 29 20 2d 44 4e 4f 44 | 45 42 55 47 20 2d 67 0a |M) -DNOD|EBUG -g.|
|00000640| 58 23 20 66 6f 72 20 53 | 59 53 54 45 4d 2c 20 6d |X# for S|YSTEM, m|
|00000650| 61 6b 65 20 69 74 20 53 | 59 53 54 45 4d 56 20 66 |ake it S|YSTEMV f|
|00000660| 6f 72 20 53 79 73 74 65 | 6d 20 56 20 20 61 6e 64 |or Syste|m V and|
|00000670| 20 42 53 44 20 66 6f 72 | 20 42 65 72 6b 65 6c 79 | BSD for| Berkely|
|00000680| 2e 0a 53 59 53 54 45 4d | 20 3d 20 53 59 53 54 45 |..SYSTEM| = SYSTE|
|00000690| 4d 56 0a 58 0a 43 43 20 | 3d 20 63 63 0a 58 0a 53 |MV.X.CC |= cc.X.S|
|000006a0| 52 43 53 20 3d 20 6d 61 | 69 6e 2e 63 20 69 6c 73 |RCS = ma|in.c ils|
|000006b0| 2e 63 20 70 61 72 73 65 | 2e 63 20 67 65 74 2e 63 |.c parse|.c get.c|
|000006c0| 20 69 6e 70 75 74 2e 63 | 20 77 69 6c 64 6d 61 74 | input.c| wildmat|
|000006d0| 2e 63 20 69 6c 73 2e 68 | 20 67 65 74 2e 68 0a 58 |.c ils.h| get.h.X|
|000006e0| 0a 4d 41 4e 49 46 45 53 | 54 20 3d 20 4d 61 6b 65 |.MANIFES|T = Make|
|000006f0| 66 69 6c 65 20 52 45 41 | 44 4d 45 20 24 28 53 52 |file REA|DME $(SR|
|00000700| 43 53 29 0a 58 0a 4f 42 | 4a 53 20 3d 20 6d 61 69 |CS).X.OB|JS = mai|
|00000710| 6e 2e 6f 20 69 6c 73 2e | 6f 20 70 61 72 73 65 2e |n.o ils.|o parse.|
|00000720| 6f 20 67 65 74 2e 6f 20 | 69 6e 70 75 74 2e 6f 20 |o get.o |input.o |
|00000730| 77 69 6c 64 6d 61 74 2e | 6f 0a 58 0a 61 6c 6c 3a |wildmat.|o.X.all:|
|00000740| 20 69 6c 73 0a 58 0a 63 | 6c 65 61 6e 3a 0a 58 09 | ils.X.c|lean:.X.|
|00000750| 72 6d 20 2d 66 20 2a 2e | 6f 0a 58 09 72 6d 20 2d |rm -f *.|o.X.rm -|
|00000760| 66 20 69 6c 73 0a 58 0a | 69 6c 73 3a 09 24 28 4f |f ils.X.|ils:.$(O|
|00000770| 42 4a 53 29 0a 58 09 24 | 28 43 43 29 20 24 28 4f |BJS).X.$|(CC) $(O|
|00000780| 42 4a 53 29 20 2d 6f 20 | 69 6c 73 20 2d 6c 63 75 |BJS) -o |ils -lcu|
|00000790| 72 73 65 73 20 2d 6c 74 | 65 72 6d 63 61 70 0a 58 |rses -lt|ermcap.X|
|000007a0| 0a 6d 61 69 6e 2e 6f 3a | 09 09 6d 61 69 6e 2e 63 |.main.o:|..main.c|
|000007b0| 20 69 6c 73 2e 68 0a 58 | 0a 69 6c 73 2e 6f 3a 09 | ils.h.X|.ils.o:.|
|000007c0| 09 69 6c 73 2e 63 20 69 | 6c 73 2e 68 0a 58 0a 70 |.ils.c i|ls.h.X.p|
|000007d0| 61 72 73 65 2e 6f 3a 09 | 70 61 72 73 65 2e 63 0a |arse.o:.|parse.c.|
|000007e0| 58 0a 67 65 74 2e 6f 3a | 09 09 67 65 74 2e 63 20 |X.get.o:|..get.c |
|000007f0| 67 65 74 2e 68 0a 58 0a | 69 6e 70 75 74 2e 6f 3a |get.h.X.|input.o:|
|00000800| 09 69 6e 70 75 74 2e 63 | 20 69 6c 73 2e 68 0a 58 |.input.c| ils.h.X|
|00000810| 0a 77 69 6c 64 6d 61 74 | 2e 6f 3a 09 77 69 6c 64 |.wildmat|.o:.wild|
|00000820| 6d 61 74 2e 63 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |mat.c.EN|D_OF_FIL|
|00000830| 45 0a 69 66 20 74 65 73 | 74 20 35 32 34 20 2d 6e |E.if tes|t 524 -n|
|00000840| 65 20 60 77 63 20 2d 63 | 20 3c 27 4d 61 6b 65 66 |e `wc -c| <'Makef|
|00000850| 69 6c 65 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ile'`; t|hen. |
|00000860| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 4d 61 |echo sha|r: \"'Ma|
|00000870| 6b 65 66 69 6c 65 27 5c | 22 20 75 6e 70 61 63 6b |kefile'\|" unpack|
|00000880| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00000890| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|000008a0| 27 4d 61 6b 65 66 69 6c | 65 27 0a 66 69 0a 69 66 |'Makefil|e'.fi.if|
|000008b0| 20 74 65 73 74 20 2d 66 | 20 27 52 45 41 44 4d 45 | test -f| 'README|
|000008c0| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|000008d0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|000008e0| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|000008f0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000900| 6e 67 20 66 69 6c 65 20 | 5c 22 27 52 45 41 44 4d |ng file |\"'READM|
|00000910| 45 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |E'\".els|e.echo s|
|00000920| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00000930| 5c 22 27 52 45 41 44 4d | 45 27 5c 22 20 5c 28 33 |\"'READM|E'\" \(3|
|00000940| 30 37 39 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |079 char|acters\)|
|00000950| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 |.sed "s/|^X//" >'|
|00000960| 52 45 41 44 4d 45 27 20 | 3c 3c 27 45 4e 44 5f 4f |README' |<<'END_O|
|00000970| 46 5f 46 49 4c 45 27 0a | 41 55 54 48 4f 52 3a 20 |F_FILE'.|AUTHOR: |
|00000980| 4a 61 63 6b 20 41 6c 65 | 78 61 6e 64 65 72 0a 44 |Jack Ale|xander.D|
|00000990| 41 54 45 20 4f 46 20 4c | 41 53 54 20 4d 4f 44 53 |ATE OF L|AST MODS|
|000009a0| 3a 20 31 2f 31 31 2f 39 | 31 0a 41 4e 59 20 43 4f |: 1/11/9|1.ANY CO|
|000009b0| 4d 4d 45 4e 54 53 20 4f | 52 20 52 45 51 55 45 53 |MMENTS O|R REQUES|
|000009c0| 54 53 20 46 4f 52 20 43 | 48 41 4e 47 45 53 20 57 |TS FOR C|HANGES W|
|000009d0| 49 4c 4c 20 42 45 20 47 | 52 45 41 54 46 55 4c 4c |ILL BE G|REATFULL|
|000009e0| 59 20 41 43 43 45 50 54 | 45 44 2e 0a 58 2d 2d 2d |Y ACCEPT|ED..X---|
|000009f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a30| 2d 2d 2d 0a 58 28 63 29 | 20 31 39 39 31 20 62 79 |---.X(c)| 1991 by|
|00000a40| 20 4a 61 63 6b 20 41 6c | 65 78 61 6e 64 65 72 0a | Jack Al|exander.|
|00000a50| 4e 4f 20 57 41 52 52 41 | 4e 54 59 20 4f 46 20 41 |NO WARRA|NTY OF A|
|00000a60| 4e 59 20 4b 49 4e 44 20 | 49 53 20 47 49 56 45 4e |NY KIND |IS GIVEN|
|00000a70| 20 57 49 54 48 20 54 48 | 49 53 20 50 52 4f 47 52 | WITH TH|IS PROGR|
|00000a80| 41 4d 2c 20 45 56 45 4e | 20 46 4f 52 0a 58 46 49 |AM, EVEN| FOR.XFI|
|00000a90| 54 4e 45 53 53 20 4f 46 | 20 50 55 52 50 4f 53 45 |TNESS OF| PURPOSE|
|00000aa0| 0a 58 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.X------|--------|
|00000ab0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ac0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ad0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ae0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 0a 49 4c 53 20 2d |--------|.X.ILS -|
|00000af0| 20 49 6e 74 65 72 61 63 | 74 69 76 65 20 22 6c 73 | Interac|tive "ls|
|00000b00| 22 20 61 6e 64 20 62 72 | 6f 77 73 65 72 20 66 6f |" and br|owser fo|
|00000b10| 72 20 55 4e 49 58 20 73 | 79 73 74 65 6d 73 2e 0a |r UNIX s|ystems..|
|00000b20| 58 0a 54 68 69 73 20 68 | 61 73 20 62 65 65 6e 20 |X.This h|as been |
|00000b30| 74 65 73 74 65 64 20 6f | 6e 20 42 53 44 2d 69 73 |tested o|n BSD-is|
|00000b40| 68 20 61 6e 64 20 53 79 | 73 74 65 6d 20 56 20 6d |h and Sy|stem V m|
|00000b50| 61 63 68 69 6e 65 73 20 | 66 72 6f 6d 20 73 65 76 |achines |from sev|
|00000b60| 65 72 61 6c 0a 76 65 6e | 64 6f 72 73 20 69 6e 63 |eral.ven|dors inc|
|00000b70| 6c 75 64 69 6e 67 20 53 | 75 6e 2c 20 4e 43 52 2c |luding S|un, NCR,|
|00000b80| 20 41 54 26 54 2c 20 61 | 6e 64 20 4e 65 58 54 20 | AT&T, a|nd NeXT |
|00000b90| 28 70 72 65 76 69 6f 75 | 73 20 76 65 72 73 69 6f |(previou|s versio|
|00000ba0| 6e 29 2e 0a 58 0a 69 6c | 73 20 69 73 20 22 69 6e |n)..X.il|s is "in|
|00000bb0| 74 65 72 61 63 74 69 76 | 65 20 6c 73 22 2c 20 61 |teractiv|e ls", a|
|00000bc0| 20 75 74 69 6c 69 74 79 | 20 74 6f 20 75 73 65 72 | utility| to user|
|00000bd0| 73 20 74 6f 20 65 61 73 | 69 6c 79 20 6d 6f 76 65 |s to eas|ily move|
|00000be0| 20 61 72 6f 75 6e 64 0a | 61 20 64 69 72 65 63 74 | around.|a direct|
|00000bf0| 6f 72 79 20 74 72 65 65 | 20 61 6e 64 20 70 65 72 |ory tree| and per|
|00000c00| 66 6f 72 6d 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |form ope|rations |
|00000c10| 6f 6e 20 6f 62 6a 65 63 | 74 73 20 69 6e 20 74 68 |on objec|ts in th|
|00000c20| 65 20 64 69 72 65 63 74 | 6f 72 69 65 73 2e 0a 58 |e direct|ories..X|
|00000c30| 45 61 63 68 20 75 73 65 | 72 20 63 61 6e 20 64 65 |Each use|r can de|
|00000c40| 66 69 6e 65 20 74 68 65 | 69 72 20 6f 77 6e 20 61 |fine the|ir own a|
|00000c50| 63 74 69 6f 6e 73 20 62 | 61 73 65 64 20 6f 6e 20 |ctions b|ased on |
|00000c60| 6b 65 79 2d 73 65 71 75 | 65 6e 63 65 73 2e 0a 58 |key-sequ|ences..X|
|00000c70| 0a 54 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 62 |.The num|ber of b|
|00000c80| 75 69 6c 74 2d 69 6e 20 | 63 6f 6d 6d 61 6e 64 73 |uilt-in |commands|
|00000c90| 20 68 61 73 20 62 65 65 | 6e 20 6b 65 70 74 20 74 | has bee|n kept t|
|00000ca0| 6f 20 61 20 6d 69 6e 69 | 6d 75 6d 20 69 6e 74 65 |o a mini|mum inte|
|00000cb0| 6e 74 69 6f 6e 61 6c 6c | 79 2e 0a 54 68 65 20 69 |ntionall|y..The i|
|00000cc0| 64 65 61 20 69 73 20 74 | 6f 20 61 6c 6c 6f 77 20 |dea is t|o allow |
|00000cd0| 74 6f 74 61 6c 20 66 6c | 65 78 69 62 69 6c 69 74 |total fl|exibilit|
|00000ce0| 79 20 62 79 20 61 6c 6c | 6f 77 69 6e 67 20 70 65 |y by all|owing pe|
|00000cf0| 6f 70 6c 65 20 74 6f 0a | 75 73 65 20 74 68 65 20 |ople to.|use the |
|00000d00| 73 61 6d 65 20 74 6f 6f | 6c 73 20 74 68 65 79 27 |same too|ls they'|
|00000d10| 76 65 20 75 73 65 64 20 | 66 6f 72 20 79 65 61 72 |ve used |for year|
|00000d20| 73 20 28 6c 69 74 74 6c | 65 20 73 68 65 6c 6c 20 |s (littl|e shell |
|00000d30| 73 63 72 69 70 74 73 2c | 20 65 74 63 29 2c 0a 61 |scripts,| etc),.a|
|00000d40| 6e 64 20 74 6f 20 6a 75 | 73 74 20 6f 66 66 65 72 |nd to ju|st offer|
|00000d50| 20 74 68 65 6d 20 61 20 | 6d 6f 72 65 20 65 66 66 | them a |more eff|
|00000d60| 69 63 69 65 6e 74 2c 20 | 75 73 65 72 2d 66 72 69 |icient, |user-fri|
|00000d70| 65 6e 64 6c 79 20 77 61 | 79 20 74 6f 20 64 6f 20 |endly wa|y to do |
|00000d80| 69 74 2e 0a 49 20 6b 6e | 6f 77 20 74 68 61 74 20 |it..I kn|ow that |
|00000d90| 74 68 69 73 20 68 61 73 | 20 62 65 65 6e 20 64 6f |this has| been do|
|00000da0| 6e 65 20 62 65 66 6f 72 | 65 2c 20 62 75 74 20 49 |ne befor|e, but I|
|00000db0| 20 64 69 64 6e 27 74 20 | 6c 69 6b 65 20 74 68 65 | didn't |like the|
|00000dc0| 0a 6f 74 68 65 72 73 20 | 6f 6e 65 73 20 74 68 61 |.others |ones tha|
|00000dd0| 74 20 6d 75 63 68 20 62 | 65 63 61 75 73 65 20 74 |t much b|ecause t|
|00000de0| 68 65 79 20 77 65 72 65 | 20 74 6f 20 73 70 65 63 |hey were| to spec|
|00000df0| 69 66 69 63 20 61 6e 64 | 20 6c 69 6d 69 74 69 6e |ific and| limitin|
|00000e00| 67 2e 0a 57 69 74 68 20 | 69 6c 73 2c 20 79 6f 75 |g..With |ils, you|
|00000e10| 20 63 61 6e 20 68 61 76 | 65 20 61 73 20 70 6f 77 | can hav|e as pow|
|00000e20| 65 72 66 75 6c 20 6f 72 | 20 61 73 20 22 73 61 66 |erful or| as "saf|
|00000e30| 65 22 20 61 20 74 6f 6f | 6c 20 61 73 20 79 6f 75 |e" a too|l as you|
|00000e40| 20 6c 69 6b 65 2c 0a 76 | 61 72 79 69 6e 67 20 62 | like,.v|arying b|
|00000e50| 79 20 75 73 65 72 2e 0a | 58 0a 54 68 65 20 6f 70 |y user..|X.The op|
|00000e60| 65 72 61 74 69 6f 6e 73 | 20 61 76 61 69 6c 61 62 |erations| availab|
|00000e70| 6c 65 20 61 72 65 20 64 | 65 66 69 6e 65 64 20 62 |le are d|efined b|
|00000e80| 79 20 74 68 65 20 75 73 | 65 72 20 69 6e 20 24 48 |y the us|er in $H|
|00000e90| 4f 4d 45 2f 2e 69 6c 73 | 0a 69 6e 20 61 20 6d 61 |OME/.ils|.in a ma|
|00000ea0| 6e 6e 65 72 20 61 73 20 | 64 65 73 63 72 69 62 65 |nner as |describe|
|00000eb0| 64 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 69 6c |d in the| file il|
|00000ec0| 73 2e 31 20 66 69 6c 65 | 20 77 68 69 63 68 20 69 |s.1 file| which i|
|00000ed0| 73 20 70 61 72 74 0a 6f | 66 20 74 68 69 73 20 72 |s part.o|f this r|
|00000ee0| 65 6c 65 61 73 65 2e 0a | 58 0a 69 6c 73 20 63 61 |elease..|X.ils ca|
|00000ef0| 6e 20 72 65 61 6c 6c 79 | 20 72 65 70 6c 61 63 65 |n really| replace|
|00000f00| 20 74 68 65 20 75 73 65 | 20 6f 66 20 74 68 65 20 | the use| of the |
|00000f10| 73 68 65 6c 6c 20 61 6c | 6d 6f 73 74 20 65 6e 74 |shell al|most ent|
|00000f20| 69 72 65 6c 79 0a 66 6f | 72 20 6d 61 6e 79 20 75 |irely.fo|r many u|
|00000f30| 73 65 72 73 20 28 49 20 | 75 73 65 20 69 74 20 6d |sers (I |use it m|
|00000f40| 79 73 65 6c 66 20 71 75 | 69 74 65 20 61 20 62 69 |yself qu|ite a bi|
|00000f50| 74 20 2d 2d 20 49 20 67 | 75 65 73 73 20 74 68 61 |t -- I g|uess tha|
|00000f60| 74 27 73 20 77 68 79 0a | 49 20 77 72 6f 74 65 20 |t's why.|I wrote |
|00000f70| 69 74 29 2e 0a 58 0a 4e | 4f 54 45 3a 0a 49 20 72 |it)..X.N|OTE:.I r|
|00000f80| 65 63 6f 6d 6d 65 6e 64 | 20 74 68 61 74 20 79 6f |ecommend| that yo|
|00000f90| 75 20 61 6c 77 61 79 73 | 20 75 73 65 20 74 68 65 |u always| use the|
|00000fa0| 20 2d 46 20 6f 70 74 69 | 6f 6e 2c 20 61 73 20 69 | -F opti|on, as i|
|00000fb0| 74 20 63 65 72 74 61 69 | 6e 6c 79 20 6d 61 6b 65 |t certai|nly make|
|00000fc0| 73 0a 69 64 65 6e 74 69 | 66 69 63 61 74 69 6f 6e |s.identi|fication|
|00000fd0| 20 6f 66 20 64 69 72 65 | 63 74 6f 72 69 65 73 20 | of dire|ctories |
|00000fe0| 65 61 73 79 20 28 70 75 | 74 73 20 27 2f 27 20 61 |easy (pu|ts '/' a|
|00000ff0| 66 74 65 72 20 65 61 63 | 68 20 64 69 72 65 63 74 |fter eac|h direct|
|00001000| 6f 72 79 29 2e 0a 54 68 | 69 73 20 63 61 6e 20 62 |ory)..Th|is can b|
|00001010| 65 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |e automa|tically |
|00001020| 64 6f 6e 65 20 62 79 20 | 6c 69 6e 6b 69 6e 67 20 |done by |linking |
|00001030| 69 6c 66 20 74 6f 20 69 | 6c 73 2c 20 74 68 65 6e |ilf to i|ls, then|
|00001040| 20 6a 75 73 74 20 75 73 | 69 6e 67 0a 74 68 65 20 | just us|ing.the |
|00001050| 6e 61 6d 65 20 69 6c 66 | 20 69 6e 73 74 65 61 64 |name ilf| instead|
|00001060| 20 6f 66 20 69 6c 73 2e | 0a 58 0a 49 4e 50 55 54 | of ils.|.X.INPUT|
|00001070| 3a 0a 73 74 72 69 6e 67 | 20 69 6e 70 75 74 20 69 |:.string| input i|
|00001080| 73 20 64 6f 6e 65 20 75 | 73 69 6e 67 20 61 20 67 |s done u|sing a g|
|00001090| 65 74 73 74 72 69 6e 67 | 20 49 20 77 72 6f 74 65 |etstring| I wrote|
|000010a0| 20 61 20 66 65 77 20 79 | 65 61 72 73 20 62 61 63 | a few y|ears bac|
|000010b0| 6b 2e 20 20 49 74 27 73 | 0a 61 20 6c 69 74 74 6c |k. It's|.a littl|
|000010c0| 65 20 6f 64 64 2c 20 61 | 73 20 69 74 20 77 61 73 |e odd, a|s it was|
|000010d0| 20 77 72 69 74 74 65 6e | 20 66 6f 72 20 70 65 6f | written| for peo|
|000010e0| 70 6c 65 20 74 68 61 74 | 20 64 6f 6e 27 74 20 68 |ple that| don't h|
|000010f0| 61 76 65 20 61 6e 79 20 | 76 69 0a 65 78 70 65 72 |ave any |vi.exper|
|00001100| 69 65 6e 63 65 2c 20 61 | 73 20 65 61 63 68 20 6b |ience, a|s each k|
|00001110| 65 79 20 68 61 73 20 61 | 20 73 70 65 63 69 66 69 |ey has a| specifi|
|00001120| 63 20 66 75 6e 63 74 69 | 6f 6e 2c 20 61 6e 64 20 |c functi|on, and |
|00001130| 79 6f 75 20 61 72 65 20 | 61 6c 77 61 79 73 0a 69 |you are |always.i|
|00001140| 6e 20 69 6e 73 65 72 74 | 20 6d 6f 64 65 2e 20 20 |n insert| mode. |
|00001150| 45 64 69 74 69 6e 67 20 | 69 6e 73 74 72 75 63 74 |Editing |instruct|
|00001160| 69 6f 6e 73 20 63 61 6e | 20 62 65 20 66 6f 75 6e |ions can| be foun|
|00001170| 64 20 69 6e 20 69 6c 73 | 2e 31 2e 0a 58 0a 4f 56 |d in ils|.1..X.OV|
|00001180| 45 52 56 49 45 57 3a 0a | 58 0a 54 68 65 20 75 73 |ERVIEW:.|X.The us|
|00001190| 65 72 20 28 6f 72 20 61 | 64 6d 69 6e 69 73 74 72 |er (or a|dministr|
|000011a0| 61 74 6f 72 29 20 68 61 | 73 20 61 20 66 69 6c 65 |ator) ha|s a file|
|000011b0| 20 63 61 6c 6c 65 64 20 | 2e 69 6c 73 20 69 6e 20 | called |.ils in |
|000011c0| 74 68 65 69 72 20 24 48 | 4f 4d 45 0a 64 69 72 65 |their $H|OME.dire|
|000011d0| 63 74 6f 72 79 2e 20 20 | 41 20 73 61 6d 70 6c 65 |ctory. |A sample|
|000011e0| 20 66 69 6c 65 20 6d 69 | 67 68 74 20 62 65 3a 0a | file mi|ght be:.|
|000011f0| 58 0a 58 23 20 54 68 69 | 73 20 69 73 20 61 20 73 |X.X# Thi|s is a s|
|00001200| 61 6d 70 65 6c 20 2e 69 | 6c 73 20 66 69 6c 65 0a |ampel .i|ls file.|
|00001210| 68 65 6c 70 3a 09 6d 61 | 6e 20 69 6c 73 0a 58 0a |help:.ma|n ils.X.|
|00001220| 6d 3a 09 6d 6f 72 65 20 | 24 66 69 6c 65 0a 58 0a |m:.more |$file.X.|
|00001230| 56 3a 09 76 69 20 24 66 | 69 6c 65 0a 58 0a 4d 3a |V:.vi $f|ile.X.M:|
|00001240| 09 6d 61 6b 65 20 24 69 | 6e 70 75 74 28 4d 61 6b |.make $i|nput(Mak|
|00001250| 65 20 77 68 61 74 20 28 | 52 45 54 55 52 4e 20 66 |e what (|RETURN f|
|00001260| 6f 72 20 64 65 66 61 75 | 6c 74 29 3f 20 29 0a 58 |or defau|lt)? ).X|
|00001270| 0a 6d 76 3a 09 6d 76 20 | 24 66 69 6c 65 20 24 69 |.mv:.mv |$file $i|
|00001280| 6e 70 75 74 28 52 65 6e | 61 6d 65 20 27 24 66 69 |nput(Ren|ame '$fi|
|00001290| 6c 65 27 20 74 6f 3a 20 | 29 0a 58 0a 58 46 3a 09 |le' to: |).X.XF:.|
|000012a0| 66 69 6c 65 20 24 66 69 | 6c 65 0a 58 0a 4c 3a 09 |file $fi|le.X.L:.|
|000012b0| 69 66 28 6c 61 74 65 78 | 20 24 70 72 65 66 69 78 |if(latex| $prefix|
|000012c0| 29 3b 74 68 65 6e 20 69 | 66 28 64 76 69 6a 65 70 |);then i|f(dvijep|
|000012d0| 20 24 70 72 65 66 69 78 | 29 3b 74 68 65 6e 20 6c | $prefix|);then l|
|000012e0| 70 72 20 2d 42 20 24 70 | 72 65 66 69 78 2e 6a 65 |pr -B $p|refix.je|
|000012f0| 70 3b 66 69 3b 66 69 0a | 58 0a 72 6d 3a 09 72 6d |p;fi;fi.|X.rm:.rm|
|00001300| 20 24 66 69 6c 65 0a 58 | 0a 58 2d 2d 2d 2d 2d 2d | $file.X|.X------|
|00001310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001320| 20 65 6e 64 20 6f 66 20 | 65 78 61 6d 70 6c 65 20 | end of |example |
|00001330| 66 69 6c 65 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |file ---|--------|
|00001340| 2d 2d 2d 2d 2d 2d 2d 0a | 58 0a 49 6e 20 74 68 65 |-------.|X.In the|
|00001350| 20 61 62 6f 76 65 20 66 | 69 6c 65 2c 20 6b 65 79 | above f|ile, key|
|00001360| 20 73 65 71 75 65 6e 63 | 65 73 20 22 68 65 6c 70 | sequenc|es "help|
|00001370| 22 2c 20 22 6d 22 2c 20 | 22 4d 22 2c 20 22 6d 76 |", "m", |"M", "mv|
|00001380| 22 2c 20 22 46 22 2c 20 | 22 4c 22 2c 20 22 72 6d |", "F", |"L", "rm|
|00001390| 22 2c 0a 61 6e 64 20 22 | 56 22 20 61 72 65 20 67 |",.and "|V" are g|
|000013a0| 69 76 65 6e 20 61 63 74 | 69 6f 6e 73 2e 0a 58 0a |iven act|ions..X.|
|000013b0| 58 24 66 69 6c 65 20 69 | 73 20 61 20 62 75 69 6c |X$file i|s a buil|
|000013c0| 74 2d 69 6e 20 69 6c 73 | 20 76 61 72 69 61 62 6c |t-in ils| variabl|
|000013d0| 65 20 28 73 65 65 20 69 | 6c 73 2e 31 29 20 74 68 |e (see i|ls.1) th|
|000013e0| 61 74 20 61 6c 77 61 79 | 73 20 63 6f 6e 74 61 69 |at alway|s contai|
|000013f0| 6e 73 20 74 68 65 0a 63 | 75 72 72 65 6e 74 6c 79 |ns the.c|urrently|
|00001400| 20 73 65 6c 65 63 74 65 | 64 20 66 69 6c 65 20 28 | selecte|d file (|
|00001410| 74 68 65 20 6f 6e 65 20 | 70 6f 69 6e 74 65 64 20 |the one |pointed |
|00001420| 61 74 20 62 79 20 74 68 | 65 20 63 75 72 73 6f 72 |at by th|e cursor|
|00001430| 29 2e 20 20 24 70 72 65 | 66 69 78 2c 0a 61 6e 64 |). $pre|fix,.and|
|00001440| 20 24 69 6e 70 75 74 20 | 61 72 65 20 61 6c 73 6f | $input |are also|
|00001450| 20 73 70 65 63 69 61 6c | 20 76 61 72 69 61 62 6c | special| variabl|
|00001460| 65 73 2c 20 61 6e 64 20 | 74 68 65 72 65 20 61 72 |es, and |there ar|
|00001470| 65 20 6f 74 68 65 72 73 | 2e 0a 58 0a 41 6e 79 77 |e others|..X.Anyw|
|00001480| 61 79 2c 20 69 66 20 61 | 6e 79 20 6f 66 20 74 68 |ay, if a|ny of th|
|00001490| 65 20 6b 65 79 20 73 65 | 71 75 65 6e 63 65 73 20 |e key se|quences |
|000014a0| 61 72 65 20 65 6e 65 74 | 65 72 64 20 74 68 72 6f |are enet|erd thro|
|000014b0| 75 67 68 20 74 68 65 20 | 6b 65 79 62 6f 61 72 64 |ugh the |keyboard|
|000014c0| 2c 0a 61 6e 64 20 74 68 | 65 6e 20 45 4e 54 45 52 |,.and th|en ENTER|
|000014d0| 20 6f 72 20 52 45 54 55 | 52 4e 20 69 73 20 70 72 | or RETU|RN is pr|
|000014e0| 65 73 73 65 64 2c 20 74 | 68 65 20 61 63 74 69 6f |essed, t|he actio|
|000014f0| 6e 20 64 65 66 69 6e 65 | 64 20 66 6f 72 0a 74 68 |n define|d for.th|
|00001500| 65 20 6b 65 79 20 73 65 | 71 75 65 6e 63 65 73 20 |e key se|quences |
|00001510| 69 6e 20 65 78 65 63 75 | 74 65 64 2c 20 61 20 6c |in execu|ted, a l|
|00001520| 69 6e 65 20 61 74 20 61 | 20 74 69 6d 65 2c 20 76 |ine at a| time, v|
|00001530| 69 61 20 73 79 73 74 65 | 6d 28 33 29 20 63 61 6c |ia syste|m(3) cal|
|00001540| 6c 73 2e 0a 59 6f 75 20 | 63 61 6e 20 6d 75 6c 74 |ls..You |can mult|
|00001550| 69 70 6c 65 20 61 63 74 | 69 6f 6e 20 6c 69 6e 65 |iple act|ion line|
|00001560| 73 20 66 6f 72 20 65 61 | 63 68 20 6b 65 79 20 73 |s for ea|ch key s|
|00001570| 65 71 75 65 6e 63 65 2c | 20 62 75 74 20 74 68 65 |equence,| but the|
|00001580| 20 65 78 61 6d 70 6c 65 | 0a 64 6f 65 73 6e 27 74 | example|.doesn't|
|00001590| 20 63 6f 6e 74 61 69 6e | 20 61 6e 79 2e 0a 45 4e | contain| any..EN|
|000015a0| 44 5f 4f 46 5f 46 49 4c | 45 0a 69 66 20 74 65 73 |D_OF_FIL|E.if tes|
|000015b0| 74 20 33 30 37 39 20 2d | 6e 65 20 60 77 63 20 2d |t 3079 -|ne `wc -|
|000015c0| 63 20 3c 27 52 45 41 44 | 4d 45 27 60 3b 20 74 68 |c <'READ|ME'`; th|
|000015d0| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|000015e0| 3a 20 5c 22 27 52 45 41 | 44 4d 45 27 5c 22 20 75 |: \"'REA|DME'\" u|
|000015f0| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00001600| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00001610| 64 20 6f 66 20 27 52 45 | 41 44 4d 45 27 0a 66 69 |d of 'RE|ADME'.fi|
|00001620| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 67 65 74 |.if test| -f 'get|
|00001630| 2e 63 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.c' -a "|${1}" !=|
|00001640| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00001650| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00001660| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001670| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 67 65 74 |ting fil|e \"'get|
|00001680| 2e 63 27 5c 22 0a 65 6c | 73 65 0a 65 63 68 6f 20 |.c'\".el|se.echo |
|00001690| 73 68 61 72 3a 20 45 78 | 74 72 61 63 74 69 6e 67 |shar: Ex|tracting|
|000016a0| 20 5c 22 27 67 65 74 2e | 63 27 5c 22 20 5c 28 34 | \"'get.|c'\" \(4|
|000016b0| 37 31 35 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |715 char|acters\)|
|000016c0| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 |.sed "s/|^X//" >'|
|000016d0| 67 65 74 2e 63 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |get.c' <|<'END_OF|
|000016e0| 5f 46 49 4c 45 27 0a 58 | 2f 2a 20 25 57 25 20 67 |_FILE'.X|/* %W% g|
|000016f0| 65 6e 65 72 61 6c 20 67 | 65 74 73 74 72 69 6e 67 |eneral g|etstring|
|00001700| 20 72 6f 75 74 69 6e 65 | 09 09 20 20 20 09 09 20 | routine|.. .. |
|00001710| 20 2a 2f 0a 58 2f 2a 20 | 61 75 74 68 6f 72 3a 20 | */.X/* |author: |
|00001720| 4a 61 63 6b 20 41 6c 65 | 78 61 6e 64 65 72 20 2d |Jack Ale|xander -|
|00001730| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 6d 61 | this ro|utine ma|
|00001740| 79 20 62 65 20 66 72 65 | 65 6c 79 20 64 69 73 74 |y be fre|ely dist|
|00001750| 69 62 75 74 65 64 20 2a | 2f 0a 58 23 69 6e 63 6c |ibuted *|/.X#incl|
|00001760| 75 64 65 09 3c 63 75 72 | 73 65 73 2e 68 3e 0a 58 |ude.<cur|ses.h>.X|
|00001770| 23 69 6e 63 6c 75 64 65 | 09 22 67 65 74 2e 68 22 |#include|."get.h"|
|00001780| 0a 58 0a 67 65 74 5f 6e | 75 6d 28 78 2c 79 2c 64 |.X.get_n|um(x,y,d|
|00001790| 69 67 69 74 73 2c 6c 6f | 77 2c 68 69 67 68 2c 6e |igits,lo|w,high,n|
|000017a0| 75 6d 62 65 72 29 0a 69 | 6e 74 09 78 2c 79 2c 64 |umber).i|nt.x,y,d|
|000017b0| 69 67 69 74 73 2c 6c 6f | 77 2c 68 69 67 68 2c 2a |igits,lo|w,high,*|
|000017c0| 6e 75 6d 62 65 72 3b 0a | 58 7b 0a 58 09 63 68 61 |number;.|X{.X.cha|
|000017d0| 72 09 62 75 66 5b 38 30 | 5d 3b 0a 58 09 69 6e 74 |r.buf[80|];.X.int|
|000017e0| 09 72 65 74 76 61 6c 3b | 0a 58 0a 58 09 62 75 66 |.retval;|.X.X.buf|
|000017f0| 5b 30 5d 3d 27 5c 30 27 | 3b 0a 58 09 6e 6f 65 63 |[0]='\0'|;.X.noec|
|00001800| 68 6f 28 29 3b 0a 58 09 | 72 61 77 28 29 3b 0a 58 |ho();.X.|raw();.X|
|00001810| 09 77 68 69 6c 65 28 31 | 29 0a 58 09 09 73 77 69 |.while(1|).X..swi|
|00001820| 74 63 68 28 67 65 74 73 | 74 28 64 69 67 69 74 73 |tch(gets|t(digits|
|00001830| 2c 78 2c 79 2c 62 75 66 | 2c 64 69 67 69 74 73 2b |,x,y,buf|,digits+|
|00001840| 31 2c 4e 55 4c 4c 2c 4e | 55 4d 5f 4f 4e 4c 59 2c |1,NULL,N|UM_ONLY,|
|00001850| 4e 55 4c 4c 29 29 20 7b | 0a 58 09 09 09 63 61 73 |NULL)) {|.X...cas|
|00001860| 65 20 47 45 54 5f 45 53 | 43 41 50 45 3a 0a 58 09 |e GET_ES|CAPE:.X.|
|00001870| 09 09 09 72 65 74 75 72 | 6e 28 47 45 54 5f 45 53 |...retur|n(GET_ES|
|00001880| 43 41 50 45 29 3b 0a 58 | 09 09 09 63 61 73 65 20 |CAPE);.X|...case |
|00001890| 47 45 54 5f 44 4f 57 4e | 3a 0a 58 09 09 09 63 61 |GET_DOWN|:.X...ca|
|000018a0| 73 65 20 47 45 54 5f 52 | 45 54 55 52 4e 3a 0a 58 |se GET_R|ETURN:.X|
|000018b0| 09 09 09 09 72 65 74 76 | 61 6c 3d 61 74 6f 69 28 |....retv|al=atoi(|
|000018c0| 62 75 66 29 3b 0a 58 09 | 09 09 09 69 66 28 72 65 |buf);.X.|...if(re|
|000018d0| 74 76 61 6c 20 3c 20 6c | 6f 77 20 7c 7c 20 72 65 |tval < l|ow || re|
|000018e0| 74 76 61 6c 3e 68 69 67 | 68 29 0a 58 09 09 09 09 |tval>hig|h).X....|
|000018f0| 09 62 72 65 61 6b 3b 0a | 58 09 09 09 09 2a 6e 75 |.break;.|X....*nu|
|00001900| 6d 62 65 72 20 3d 20 72 | 65 74 76 61 6c 3b 0a 58 |mber = r|etval;.X|
|00001910| 09 09 09 09 65 63 68 6f | 28 29 3b 0a 58 09 09 09 |....echo|();.X...|
|00001920| 09 6e 6f 72 61 77 28 29 | 3b 0a 58 09 09 09 09 72 |.noraw()|;.X....r|
|00001930| 65 74 75 72 6e 28 30 29 | 3b 0a 58 09 09 09 64 65 |eturn(0)|;.X...de|
|00001940| 66 61 75 6c 74 3a 0a 58 | 09 09 09 09 62 72 65 61 |fault:.X|....brea|
|00001950| 6b 3b 0a 58 09 09 7d 0a | 58 7d 0a 58 0a 58 2f 2a |k;.X..}.|X}.X.X/*|
|00001960| 20 61 20 66 65 77 20 68 | 69 6e 74 73 2e 2e 2e 09 | a few h|ints....|
|00001970| 2a 2f 0a 58 2f 2a 20 69 | 64 78 20 3d 20 63 75 72 |*/.X/* i|dx = cur|
|00001980| 72 65 6e 74 20 69 6e 64 | 65 78 20 69 6e 74 6f 20 |rent ind|ex into |
|00001990| 73 74 72 69 6e 67 20 2a | 2f 0a 58 2f 2a 20 63 78 |string *|/.X/* cx|
|000019a0| 20 3d 20 63 75 72 72 65 | 6e 74 20 73 63 72 65 65 | = curre|nt scree|
|000019b0| 6e 20 78 20 70 6f 73 69 | 74 69 6f 6e 20 2a 2f 0a |n x posi|tion */.|
|000019c0| 58 2f 2a 20 63 79 20 3d | 20 63 75 72 72 65 6e 74 |X/* cy =| current|
|000019d0| 20 73 63 72 65 65 6e 20 | 79 20 70 6f 73 69 74 69 | screen |y positi|
|000019e0| 6f 6e 20 2a 2f 0a 58 2f | 2a 20 69 78 20 3d 20 69 |on */.X/|* ix = i|
|000019f0| 6e 69 74 69 61 6c 20 73 | 63 72 65 65 6e 20 78 20 |nitial s|creen x |
|00001a00| 28 75 70 6f 6e 20 63 61 | 6c 6c 2c 20 77 68 65 72 |(upon ca|ll, wher|
|00001a10| 65 20 63 75 72 73 6f 72 | 20 69 73 20 72 65 71 75 |e cursor| is requ|
|00001a20| 65 73 74 65 64 20 74 6f | 20 62 65 20 70 6c 61 63 |ested to| be plac|
|00001a30| 65 64 29 20 2a 2f 0a 58 | 2f 2a 20 69 79 20 3d 20 |ed) */.X|/* iy = |
|00001a40| 69 6e 69 74 69 61 6c 20 | 73 63 72 65 65 6e 20 79 |initial |screen y|
|00001a50| 20 22 20 22 20 22 20 2e | 2e 2e 20 2a 2f 0a 58 2f | " " " .|.. */.X/|
|00001a60| 2a 20 66 77 20 3d 20 66 | 69 65 6c 64 20 77 69 64 |* fw = f|ield wid|
|00001a70| 74 68 20 2a 2f 0a 58 2f | 2a 20 6d 78 20 3d 20 6d |th */.X/|* mx = m|
|00001a80| 61 78 20 6c 65 6e 67 74 | 68 20 6f 66 20 73 74 72 |ax lengt|h of str|
|00001a90| 69 6e 67 20 2a 2f 0a 58 | 2f 2a 20 73 6c 20 3d 20 |ing */.X|/* sl = |
|00001aa0| 73 74 72 69 6e 67 20 6c | 65 6e 67 74 68 20 2a 2f |string l|ength */|
|00001ab0| 0a 58 2f 2a 20 76 61 6c | 69 64 20 3d 20 73 74 72 |.X/* val|id = str|
|00001ac0| 69 6e 67 20 6f 66 20 61 | 63 63 65 70 74 61 62 6c |ing of a|cceptabl|
|00001ad0| 65 20 63 68 61 72 61 63 | 74 65 72 73 20 77 69 74 |e charac|ters wit|
|00001ae0| 68 69 6e 20 74 68 65 20 | 74 79 70 65 20 70 61 73 |hin the |type pas|
|00001af0| 73 65 64 20 69 6e 20 67 | 65 74 74 79 70 65 20 2a |sed in g|ettype *|
|00001b00| 2f 0a 58 2f 2a 20 20 20 | 20 20 20 20 20 20 69 66 |/.X/* | if|
|00001b10| 20 4e 55 4c 4c 2c 20 74 | 68 65 6e 20 61 6c 6c 20 | NULL, t|hen all |
|00001b20| 74 79 70 65 20 6f 66 20 | 63 68 61 72 61 63 74 65 |type of |characte|
|00001b30| 72 73 20 70 61 73 73 65 | 64 20 69 6e 20 67 65 74 |rs passe|d in get|
|00001b40| 74 79 70 65 20 61 72 65 | 20 61 6c 6c 6f 77 65 64 |type are| allowed|
|00001b50| 20 2a 2f 0a 58 0a 69 6e | 74 09 69 64 78 2c 20 63 | */.X.in|t.idx, c|
|00001b60| 78 2c 20 63 79 2c 20 69 | 78 2c 20 69 79 2c 20 66 |x, cy, i|x, iy, f|
|00001b70| 77 2c 20 6d 78 2c 20 73 | 6c 2c 20 72 63 6f 64 65 |w, mx, s|l, rcode|
|00001b80| 3b 0a 58 0a 67 65 74 73 | 74 28 6c 65 6e 2c 73 78 |;.X.gets|t(len,sx|
|00001b90| 2c 73 79 2c 73 74 72 2c | 66 6c 2c 72 65 74 6c 65 |,sy,str,|fl,retle|
|00001ba0| 6e 2c 67 65 74 74 79 70 | 65 2c 76 61 6c 69 64 29 |n,gettyp|e,valid)|
|00001bb0| 0a 69 6e 74 09 6c 65 6e | 2c 20 73 78 2c 20 73 79 |.int.len|, sx, sy|
|00001bc0| 2c 20 66 6c 2c 20 2a 72 | 65 74 6c 65 6e 2c 20 67 |, fl, *r|etlen, g|
|00001bd0| 65 74 74 79 70 65 3b 0a | 63 68 61 72 09 2a 73 74 |ettype;.|char.*st|
|00001be0| 72 2c 20 2a 76 61 6c 69 | 64 3b 0a 58 7b 0a 58 09 |r, *vali|d;.X{.X.|
|00001bf0| 69 6e 74 09 63 3b 0a 58 | 0a 58 0a 58 09 72 63 6f |int.c;.X|.X.X.rco|
|00001c00| 64 65 20 3d 20 49 4e 49 | 54 49 41 4c 3b 0a 58 09 |de = INI|TIAL;.X.|
|00001c10| 69 64 78 3d 30 3b 0a 58 | 09 63 78 3d 69 78 3d 73 |idx=0;.X|.cx=ix=s|
|00001c20| 78 3b 0a 58 09 63 79 3d | 69 79 3d 73 79 3b 0a 58 |x;.X.cy=|iy=sy;.X|
|00001c30| 09 6d 78 20 3d 20 6c 65 | 6e 3b 0a 58 09 66 77 20 |.mx = le|n;.X.fw |
|00001c40| 3d 20 66 6c 3b 0a 58 09 | 73 74 72 5b 6d 78 5d 3d |= fl;.X.|str[mx]=|
|00001c50| 27 5c 30 27 3b 0a 58 09 | 73 6c 3d 73 74 72 6c 65 |'\0';.X.|sl=strle|
|00001c60| 6e 28 73 74 72 29 3b 0a | 58 09 69 66 28 73 6c 21 |n(str);.|X.if(sl!|
|00001c70| 3d 30 29 20 7b 0a 58 09 | 09 69 64 78 20 3d 73 6c |=0) {.X.|.idx =sl|
|00001c80| 3b 09 09 2f 2a 20 70 6c | 61 63 65 20 63 75 72 73 |;../* pl|ace curs|
|00001c90| 6f 72 20 61 74 20 73 74 | 72 69 6e 67 27 73 20 65 |or at st|ring's e|
|00001ca0| 6e 64 20 2a 2f 0a 58 09 | 09 63 78 20 2b 3d 73 6c |nd */.X.|.cx +=sl|
|00001cb0| 3b 0a 58 09 7d 0a 58 23 | 69 66 64 65 66 20 75 6e |;.X.}.X#|ifdef un|
|00001cc0| 64 65 66 0a 58 09 69 6e | 69 74 28 29 3b 0a 58 23 |def.X.in|it();.X#|
|00001cd0| 65 6e 64 69 66 0a 58 09 | 77 68 69 6c 65 28 31 29 |endif.X.|while(1)|
|00001ce0| 20 7b 0a 58 09 09 69 66 | 28 67 65 74 74 79 70 65 | {.X..if|(gettype|
|00001cf0| 3d 3d 53 48 4f 57 29 20 | 7b 09 2f 2a 20 77 61 6e |==SHOW) |{./* wan|
|00001d00| 74 20 6f 6e 6c 79 20 74 | 6f 20 64 69 73 70 6c 61 |t only t|o displa|
|00001d10| 79 20 74 68 65 20 73 74 | 72 69 6e 67 20 2a 2f 0a |y the st|ring */.|
|00001d20| 58 09 09 09 64 72 61 77 | 73 74 72 28 73 74 72 2c |X...draw|str(str,|
|00001d30| 30 29 3b 09 2f 2a 20 64 | 72 61 77 20 74 68 65 20 |0);./* d|raw the |
|00001d40| 73 74 72 69 6e 67 20 2a | 2f 0a 58 23 69 66 64 65 |string *|/.X#ifde|
|00001d50| 66 20 75 6e 64 65 66 0a | 58 09 09 09 64 65 5f 69 |f undef.|X...de_i|
|00001d60| 6e 69 74 28 29 3b 0a 58 | 23 65 6e 64 69 66 0a 58 |nit();.X|#endif.X|
|00001d70| 09 09 09 72 65 74 75 72 | 6e 3b 0a 58 09 09 7d 0a |...retur|n;.X..}.|
|00001d80| 58 09 09 64 72 61 77 73 | 74 72 28 73 74 72 2c 31 |X..draws|tr(str,1|
|00001d90| 29 3b 09 2f 2a 20 64 72 | 61 77 20 74 68 65 20 73 |);./* dr|aw the s|
|00001da0| 74 72 69 6e 67 20 2a 2f | 0a 58 09 09 63 3d 67 65 |tring */|.X..c=ge|
|00001db0| 74 63 68 28 29 26 30 78 | 37 66 3b 0a 58 09 09 73 |tch()&0x|7f;.X..s|
|00001dc0| 77 69 74 63 68 28 63 29 | 20 7b 0a 58 09 09 09 63 |witch(c)| {.X...c|
|00001dd0| 61 73 65 20 47 45 54 5f | 43 4c 45 41 52 3a 0a 58 |ase GET_|CLEAR:.X|
|00001de0| 09 09 09 09 63 6c 65 61 | 72 61 6c 6c 28 73 74 72 |....clea|rall(str|
|00001df0| 29 3b 0a 58 09 09 09 09 | 62 72 65 61 6b 3b 0a 58 |);.X....|break;.X|
|00001e00| 09 09 09 63 61 73 65 20 | 47 45 54 5f 45 53 43 41 |...case |GET_ESCA|
|00001e10| 50 45 3a 0a 58 09 09 09 | 09 72 63 6f 64 65 3d 47 |PE:.X...|.rcode=G|
|00001e20| 45 54 5f 45 53 43 41 50 | 45 3b 0a 58 09 09 09 09 |ET_ESCAP|E;.X....|
|00001e30| 62 72 65 61 6b 3b 0a 58 | 09 09 09 63 61 73 65 20 |break;.X|...case |
|00001e40| 47 45 54 5f 55 50 3a 0a | 58 09 09 09 09 72 63 6f |GET_UP:.|X....rco|
|00001e50| 64 65 3d 64 65 63 5f 79 | 5f 70 6f 73 28 29 3b 0a |de=dec_y|_pos();.|
|00001e60| 58 09 09 09 09 62 72 65 | 61 6b 3b 0a 58 09 09 09 |X....bre|ak;.X...|
|00001e70| 63 61 73 65 20 47 45 54 | 5f 44 4f 57 4e 3a 0a 58 |case GET|_DOWN:.X|
|00001e80| 09 09 09 09 72 63 6f 64 | 65 3d 69 6e 63 5f 79 5f |....rcod|e=inc_y_|
|00001e90| 70 6f 73 28 29 3b 0a 58 | 09 09 09 09 62 72 65 61 |pos();.X|....brea|
|00001ea0| 6b 3b 0a 58 09 09 09 63 | 61 73 65 20 47 45 54 5f |k;.X...c|ase GET_|
|00001eb0| 4c 45 46 54 3a 0a 58 09 | 09 09 09 72 63 6f 64 65 |LEFT:.X.|...rcode|
|00001ec0| 3d 64 65 63 5f 78 5f 70 | 6f 73 28 29 3b 0a 58 09 |=dec_x_p|os();.X.|
|00001ed0| 09 09 09 62 72 65 61 6b | 3b 0a 58 09 09 09 63 61 |...break|;.X...ca|
|00001ee0| 73 65 20 47 45 54 5f 52 | 49 47 48 54 3a 0a 58 09 |se GET_R|IGHT:.X.|
|00001ef0| 09 09 09 72 63 6f 64 65 | 3d 69 6e 63 5f 78 5f 70 |...rcode|=inc_x_p|
|00001f00| 6f 73 28 31 29 3b 0a 58 | 09 09 09 09 62 72 65 61 |os(1);.X|....brea|
|00001f10| 6b 3b 0a 58 09 09 09 63 | 61 73 65 20 47 45 54 5f |k;.X...c|ase GET_|
|00001f20| 44 45 4c 45 54 45 3a 0a | 58 09 09 09 63 61 73 65 |DELETE:.|X...case|
|00001f30| 20 47 45 54 5f 44 45 4c | 45 54 45 32 3a 0a 58 09 | GET_DEL|ETE2:.X.|
|00001f40| 09 09 09 72 65 6d 6f 76 | 65 5f 63 68 61 72 28 73 |...remov|e_char(s|
|00001f50| 74 72 29 3b 0a 58 09 09 | 09 09 62 72 65 61 6b 3b |tr);.X..|..break;|
|00001f60| 0a 58 09 09 09 63 61 73 | 65 20 47 45 54 5f 54 41 |.X...cas|e GET_TA|
|00001f70| 42 3a 0a 58 09 09 09 63 | 61 73 65 20 47 45 54 5f |B:.X...c|ase GET_|
|00001f80| 52 45 54 55 52 4e 3a 0a | 58 09 09 09 09 72 63 6f |RETURN:.|X....rco|
|00001f90| 64 65 20 3d 20 47 45 54 | 5f 52 45 54 55 52 4e 3b |de = GET|_RETURN;|
|00001fa0| 0a 58 09 09 09 09 62 72 | 65 61 6b 3b 0a 58 09 09 |.X....br|eak;.X..|
|00001fb0| 09 64 65 66 61 75 6c 74 | 3a 0a 58 09 09 09 09 73 |.default|:.X....s|
|00001fc0| 77 69 74 63 68 28 67 65 | 74 74 79 70 65 29 20 7b |witch(ge|ttype) {|
|00001fd0| 0a 58 09 09 09 09 09 63 | 61 73 65 20 4e 55 4d 5f |.X.....c|ase NUM_|
|00001fe0| 4f 4e 4c 59 3a 20 2f 2a | 20 6e 75 6d 62 65 72 73 |ONLY: /*| numbers|
|00001ff0| 20 6f 6e 6c 79 20 28 30 | 2d 39 29 20 2a 2f 0a 58 | only (0|-9) */.X|
|00002000| 09 09 09 09 09 09 69 66 | 28 63 3e 3d 27 30 27 20 |......if|(c>='0' |
|00002010| 26 26 20 63 3c 3d 27 39 | 27 29 0a 58 09 09 09 09 |&& c<='9|').X....|
|00002020| 09 09 09 69 66 28 69 6e | 28 63 2c 76 61 6c 69 64 |...if(in|(c,valid|
|00002030| 29 29 0a 58 09 09 09 09 | 09 09 09 09 61 64 64 5f |)).X....|....add_|
|00002040| 63 68 61 72 28 73 74 72 | 2c 63 29 3b 0a 58 09 09 |char(str|,c);.X..|
|00002050| 09 09 09 09 62 72 65 61 | 6b 3b 0a 58 09 09 09 09 |....brea|k;.X....|
|00002060| 09 63 61 73 65 20 4c 45 | 54 54 45 52 5f 4f 4e 4c |.case LE|TTER_ONL|
|00002070| 59 3a 0a 58 09 09 09 09 | 09 2f 2a 20 6c 65 74 74 |Y:.X....|./* lett|
|00002080| 65 72 73 20 61 2d 7a 20 | 61 6e 64 20 41 2d 5a 2c |ers a-z |and A-Z,|
|00002090| 20 61 6e 64 20 27 20 27 | 20 6f 6e 6c 79 20 2a 2f | and ' '| only */|
|000020a0| 0a 58 09 09 09 09 09 09 | 69 66 28 63 3d 3d 27 20 |.X......|if(c==' |
|000020b0| 27 20 7c 7c 20 28 63 3e | 3d 27 61 27 20 26 26 20 |' || (c>|='a' && |
|000020c0| 63 3c 3d 27 7a 27 29 20 | 7c 7c 20 28 63 3e 3d 27 |c<='z') ||| (c>='|
|000020d0| 41 27 20 26 26 20 63 3c | 3d 27 5a 27 29 29 0a 58 |A' && c<|='Z')).X|
|000020e0| 09 09 09 09 09 09 09 69 | 66 28 69 6e 28 63 2c 76 |.......i|f(in(c,v|
|000020f0| 61 6c 69 64 29 29 0a 58 | 09 09 09 09 09 09 09 09 |alid)).X|........|
|00002100| 61 64 64 5f 63 68 61 72 | 28 73 74 72 2c 63 29 3b |add_char|(str,c);|
|00002110| 0a 58 09 09 09 09 09 09 | 62 72 65 61 6b 3b 0a 58 |.X......|break;.X|
|00002120| 09 09 09 09 09 63 61 73 | 65 20 41 4c 4c 5f 41 4c |.....cas|e ALL_AL|
|00002130| 50 48 41 3a 2f 2a 20 61 | 6e 79 20 70 72 69 6e 74 |PHA:/* a|ny print|
|00002140| 61 62 6c 65 20 63 68 61 | 72 73 20 2a 2f 0a 58 09 |able cha|rs */.X.|
|00002150| 09 09 09 09 09 69 66 28 | 63 3e 3d 27 20 27 20 26 |.....if(|c>=' ' &|
|00002160| 26 20 63 3c 3d 30 78 37 | 66 29 0a 58 09 09 09 09 |& c<=0x7|f).X....|
|00002170| 09 09 09 69 66 28 69 6e | 28 63 2c 76 61 6c 69 64 |...if(in|(c,valid|
|00002180| 29 29 0a 58 09 09 09 09 | 09 09 09 09 61 64 64 5f |)).X....|....add_|
|00002190| 63 68 61 72 28 73 74 72 | 2c 63 29 3b 0a 58 09 09 |char(str|,c);.X..|
|000021a0| 09 09 09 09 62 72 65 61 | 6b 3b 0a 58 09 09 09 09 |....brea|k;.X....|
|000021b0| 09 64 65 66 61 75 6c 74 | 3a 0a 58 09 09 09 09 09 |.default|:.X.....|
|000021c0| 09 69 66 28 63 3e 3d 27 | 20 27 20 26 26 20 63 3c |.if(c>='| ' && c<|
|000021d0| 3d 30 78 37 66 29 0a 58 | 09 09 09 09 09 09 09 61 |=0x7f).X|.......a|
|000021e0| 64 64 5f 63 68 61 72 28 | 73 74 72 2c 63 29 3b 0a |dd_char(|str,c);.|
|000021f0| 58 09 09 09 09 09 09 62 | 72 65 61 6b 3b 0a 58 09 |X......b|reak;.X.|
|00002200| 09 09 09 7d 0a 58 09 09 | 09 09 62 72 65 61 6b 3b |...}.X..|..break;|
|00002210| 0a 58 09 09 7d 0a 58 09 | 09 69 66 28 72 63 6f 64 |.X..}.X.|.if(rcod|
|00002220| 65 20 21 3d 20 49 4e 49 | 54 49 41 4c 29 20 7b 0a |e != INI|TIAL) {.|
|00002230| 58 23 69 66 64 65 66 20 | 75 6e 64 65 66 0a 58 09 |X#ifdef |undef.X.|
|00002240| 09 09 64 65 5f 69 6e 69 | 74 28 29 3b 0a 58 23 65 |..de_ini|t();.X#e|
|00002250| 6e 64 69 66 0a 58 09 09 | 09 69 66 28 72 65 74 6c |ndif.X..|.if(retl|
|00002260| 65 6e 20 21 3d 20 4e 55 | 4c 4c 29 0a 58 09 09 09 |en != NU|LL).X...|
|00002270| 09 2a 72 65 74 6c 65 6e | 20 3d 20 73 6c 3b 0a 58 |.*retlen| = sl;.X|
|00002280| 09 09 09 72 65 74 75 72 | 6e 28 72 63 6f 64 65 29 |...retur|n(rcode)|
|00002290| 3b 0a 58 09 09 7d 0a 58 | 09 7d 0a 58 7d 0a 58 0a |;.X..}.X|.}.X}.X.|
|000022a0| 64 65 63 5f 79 5f 70 6f | 73 28 29 0a 58 7b 0a 58 |dec_y_po|s().X{.X|
|000022b0| 09 69 66 28 21 69 64 78 | 29 0a 58 09 09 72 65 74 |.if(!idx|).X..ret|
|000022c0| 75 72 6e 28 47 45 54 5f | 55 50 29 3b 0a 58 09 69 |urn(GET_|UP);.X.i|
|000022d0| 66 28 69 79 20 3e 3d 20 | 63 79 29 20 7b 0a 58 09 |f(iy >= |cy) {.X.|
|000022e0| 09 69 64 78 20 3d 20 30 | 3b 0a 58 09 09 63 78 20 |.idx = 0|;.X..cx |
|000022f0| 3d 20 69 78 3b 0a 58 09 | 09 72 65 74 75 72 6e 28 |= ix;.X.|.return(|
|00002300| 49 4e 49 54 49 41 4c 29 | 3b 0a 58 09 7d 0a 58 09 |INITIAL)|;.X.}.X.|
|00002310| 69 64 78 20 2d 3d 20 66 | 77 3b 0a 58 09 63 79 2d |idx -= f|w;.X.cy-|
|00002320| 2d 3b 0a 58 09 72 65 74 | 75 72 6e 28 49 4e 49 54 |-;.X.ret|urn(INIT|
|00002330| 49 41 4c 29 3b 0a 58 7d | 0a 58 0a 69 6e 63 5f 79 |IAL);.X}|.X.inc_y|
|00002340| 5f 70 6f 73 28 29 0a 58 | 7b 0a 58 09 69 66 28 69 |_pos().X|{.X.if(i|
|00002350| 64 78 3e 3d 6d 78 2d 31 | 20 7c 7c 20 69 64 78 3d |dx>=mx-1| || idx=|
|00002360| 3d 73 6c 29 0a 58 09 09 | 72 65 74 75 72 6e 28 47 |=sl).X..|return(G|
|00002370| 45 54 5f 44 4f 57 4e 29 | 3b 0a 58 09 69 66 28 69 |ET_DOWN)|;.X.if(i|
|00002380| 64 78 2b 66 77 20 3e 3d | 20 20 6d 78 29 20 7b 0a |dx+fw >=| mx) {.|
|00002390| 58 09 09 63 78 20 2b 3d | 20 6d 78 2d 69 64 78 20 |X..cx +=| mx-idx |
|000023a0| 2d 20 28 6d 78 2d 73 6c | 29 3b 0a 58 09 09 69 64 |- (mx-sl|);.X..id|
|000023b0| 78 20 2b 3d 20 6d 78 2d | 69 64 78 20 2d 20 28 6d |x += mx-|idx - (m|
|000023c0| 78 2d 73 6c 29 3b 0a 58 | 23 69 66 64 65 66 20 75 |x-sl);.X|#ifdef u|
|000023d0| 6e 64 65 66 0a 58 09 09 | 63 78 20 2b 3d 20 28 6d |ndef.X..|cx += (m|
|000023e0| 78 20 2d 20 69 64 78 20 | 2d 66 77 29 3b 0a 58 09 |x - idx |-fw);.X.|
|000023f0| 09 69 64 78 20 2b 3d 20 | 28 6d 78 20 2d 20 69 64 |.idx += |(mx - id|
|00002400| 78 20 2d 20 66 77 29 3b | 0a 58 23 65 6e 64 69 66 |x - fw);|.X#endif|
|00002410| 0a 58 09 09 72 65 74 75 | 72 6e 28 49 4e 49 54 49 |.X..retu|rn(INITI|
|00002420| 41 4c 29 3b 0a 58 09 7d | 0a 58 09 69 66 28 69 64 |AL);.X.}|.X.if(id|
|00002430| 78 2b 66 77 20 3e 20 73 | 6c 29 20 7b 0a 58 09 09 |x+fw > s|l) {.X..|
|00002440| 63 78 20 2b 3d 20 73 6c | 20 2d 20 69 64 78 3b 0a |cx += sl| - idx;.|
|00002450| 58 09 09 69 64 78 20 2b | 3d 20 73 6c 20 2d 20 69 |X..idx +|= sl - i|
|00002460| 64 78 3b 0a 58 09 09 72 | 65 74 75 72 6e 28 49 4e |dx;.X..r|eturn(IN|
|00002470| 49 54 49 41 4c 29 3b 0a | 58 09 7d 0a 58 09 69 64 |ITIAL);.|X.}.X.id|
|00002480| 78 20 2b 3d 20 66 77 3b | 0a 58 09 63 79 2b 2b 3b |x += fw;|.X.cy++;|
|00002490| 0a 58 09 72 65 74 75 72 | 6e 28 49 4e 49 54 49 41 |.X.retur|n(INITIA|
|000024a0| 4c 29 3b 0a 58 7d 0a 58 | 0a 69 6e 63 5f 78 5f 70 |L);.X}.X|.inc_x_p|
|000024b0| 6f 73 28 66 6c 61 67 29 | 0a 69 6e 74 09 66 6c 61 |os(flag)|.int.fla|
|000024c0| 67 3b 0a 58 7b 0a 58 09 | 69 66 28 66 6c 61 67 20 |g;.X{.X.|if(flag |
|000024d0| 26 26 20 69 64 78 3d 3d | 73 6c 29 0a 58 09 09 72 |&& idx==|sl).X..r|
|000024e0| 65 74 75 72 6e 28 47 45 | 54 5f 52 49 47 48 54 29 |eturn(GE|T_RIGHT)|
|000024f0| 3b 0a 58 09 69 66 28 69 | 64 78 20 3d 3d 20 6d 78 |;.X.if(i|dx == mx|
|00002500| 29 0a 58 09 09 72 65 74 | 75 72 6e 28 47 45 54 5f |).X..ret|urn(GET_|
|00002510| 52 49 47 48 54 29 3b 0a | 58 09 63 78 2b 2b 3b 0a |RIGHT);.|X.cx++;.|
|00002520| 58 09 69 64 78 2b 2b 3b | 0a 58 09 69 66 28 63 78 |X.idx++;|.X.if(cx|
|00002530| 20 3e 3d 20 28 69 78 2b | 66 77 29 29 20 7b 0a 58 | >= (ix+|fw)) {.X|
|00002540| 09 09 63 78 20 3d 20 69 | 78 3b 0a 58 09 09 63 79 |..cx = i|x;.X..cy|
|00002550| 2b 2b 3b 0a 58 09 7d 0a | 58 09 72 65 74 75 72 6e |++;.X.}.|X.return|
|00002560| 28 49 4e 49 54 49 41 4c | 29 3b 0a 58 7d 0a 58 0a |(INITIAL|);.X}.X.|
|00002570| 64 65 63 5f 78 5f 70 6f | 73 28 29 0a 58 7b 0a 58 |dec_x_po|s().X{.X|
|00002580| 09 69 66 28 69 64 78 3d | 3d 30 29 0a 58 09 09 72 |.if(idx=|=0).X..r|
|00002590| 65 74 75 72 6e 28 47 45 | 54 5f 4c 45 46 54 29 3b |eturn(GE|T_LEFT);|
|000025a0| 0a 58 09 69 64 78 2d 2d | 3b 0a 58 09 63 78 2d 2d |.X.idx--|;.X.cx--|
|000025b0| 3b 0a 58 09 69 66 28 63 | 78 20 3c 20 69 78 29 20 |;.X.if(c|x < ix) |
|000025c0| 7b 0a 58 09 09 63 78 20 | 3d 20 66 77 2b 69 78 2d |{.X..cx |= fw+ix-|
|000025d0| 31 3b 0a 58 09 09 63 79 | 2d 2d 3b 0a 58 09 7d 0a |1;.X..cy|--;.X.}.|
|000025e0| 58 09 72 65 74 75 72 6e | 28 49 4e 49 54 49 41 4c |X.return|(INITIAL|
|000025f0| 29 3b 0a 58 7d 0a 58 0a | 61 64 64 5f 63 68 61 72 |);.X}.X.|add_char|
|00002600| 28 73 74 72 2c 20 63 29 | 0a 63 68 61 72 09 2a 73 |(str, c)|.char.*s|
|00002610| 74 72 3b 0a 63 68 61 72 | 09 63 3b 0a 58 7b 0a 58 |tr;.char|.c;.X{.X|
|00002620| 09 72 65 67 69 73 74 65 | 72 09 69 6e 74 09 69 3b |.registe|r.int.i;|
|00002630| 0a 58 0a 58 09 69 66 28 | 69 6e 63 5f 78 5f 70 6f |.X.X.if(|inc_x_po|
|00002640| 73 28 30 29 21 3d 49 4e | 49 54 49 41 4c 29 0a 58 |s(0)!=IN|ITIAL).X|
|00002650| 09 09 72 65 74 75 72 6e | 3b 0a 58 09 66 6f 72 28 |..return|;.X.for(|
|00002660| 69 3d 6d 78 2d 31 3b 69 | 3e 3d 69 64 78 3b 69 2d |i=mx-1;i|>=idx;i-|
|00002670| 2d 29 0a 58 09 09 73 74 | 72 5b 69 5d 3d 73 74 72 |-).X..st|r[i]=str|
|00002680| 5b 69 2d 31 5d 3b 0a 58 | 09 73 74 72 5b 69 64 78 |[i-1];.X|.str[idx|
|00002690| 20 2d 20 31 5d 20 3d 20 | 63 3b 0a 58 09 69 66 28 | - 1] = |c;.X.if(|
|000026a0| 73 6c 21 3d 6d 78 29 0a | 58 09 09 73 6c 2b 2b 3b |sl!=mx).|X..sl++;|
|000026b0| 0a 58 7d 0a 58 0a 72 65 | 6d 6f 76 65 5f 63 68 61 |.X}.X.re|move_cha|
|000026c0| 72 28 73 74 72 29 0a 63 | 68 61 72 09 2a 73 74 72 |r(str).c|har.*str|
|000026d0| 3b 0a 58 7b 0a 58 09 72 | 65 67 69 73 74 65 72 20 |;.X{.X.r|egister |
|000026e0| 69 6e 74 20 69 3b 0a 58 | 0a 58 09 69 66 28 69 64 |int i;.X|.X.if(id|
|000026f0| 78 20 3e 3d 20 73 6c 29 | 20 7b 09 09 2f 2a 20 72 |x >= sl)| {../* r|
|00002700| 65 6d 6f 76 65 20 63 68 | 61 72 20 62 65 68 69 6e |emove ch|ar behin|
|00002710| 64 20 63 75 72 73 6f 72 | 20 2a 2f 0a 58 09 09 69 |d cursor| */.X..i|
|00002720| 66 28 64 65 63 5f 78 5f | 70 6f 73 28 29 21 3d 49 |f(dec_x_|pos()!=I|
|00002730| 4e 49 54 49 41 4c 29 0a | 58 09 09 09 72 65 74 75 |NITIAL).|X...retu|
|00002740| 72 6e 3b 0a 58 09 09 73 | 74 72 5b 73 6c 2d 31 5d |rn;.X..s|tr[sl-1]|
|00002750| 3d 27 5c 30 27 3b 0a 58 | 09 7d 0a 58 09 65 6c 73 |='\0';.X|.}.X.els|
|00002760| 65 20 0a 58 09 09 66 6f | 72 28 69 3d 69 64 78 3b |e .X..fo|r(i=idx;|
|00002770| 69 3c 6d 78 3b 69 2b 2b | 29 0a 58 09 09 09 73 74 |i<mx;i++|).X...st|
|00002780| 72 5b 69 5d 3d 73 74 72 | 5b 69 2b 31 5d 3b 0a 58 |r[i]=str|[i+1];.X|
|00002790| 09 73 6c 2d 2d 3b 0a 58 | 7d 0a 58 0a 64 72 61 77 |.sl--;.X|}.X.draw|
|000027a0| 73 74 72 28 73 74 72 2c | 72 65 66 72 29 0a 63 68 |str(str,|refr).ch|
|000027b0| 61 72 09 73 74 72 5b 5d | 3b 0a 69 6e 74 09 72 65 |ar.str[]|;.int.re|
|000027c0| 66 72 3b 0a 58 7b 0a 58 | 09 69 6e 74 09 69 2c 20 |fr;.X{.X|.int.i, |
|000027d0| 6a 2c 20 73 2c 20 79 6f | 3b 0a 58 0a 58 09 73 3d |j, s, yo|;.X.X.s=|
|000027e0| 73 6c 3b 0a 58 09 6d 6f | 76 65 28 69 79 2c 69 78 |sl;.X.mo|ve(iy,ix|
|000027f0| 29 3b 0a 58 09 66 6f 72 | 28 69 3d 30 2c 79 6f 3d |);.X.for|(i=0,yo=|
|00002800| 31 3b 69 3c 6d 78 3b 29 | 20 7b 0a 58 09 09 69 66 |1;i<mx;)| {.X..if|
|00002810| 28 69 3e 3d 73 29 20 7b | 0a 58 09 09 09 61 64 64 |(i>=s) {|.X...add|
|00002820| 63 68 28 27 2e 27 29 3b | 0a 58 09 09 09 69 2b 2b |ch('.');|.X...i++|
|00002830| 3b 0a 58 09 09 7d 0a 58 | 09 09 65 6c 73 65 20 69 |;.X..}.X|..else i|
|00002840| 66 28 28 73 2d 69 29 20 | 3c 20 66 77 29 20 7b 0a |f((s-i) |< fw) {.|
|00002850| 58 09 09 09 70 72 69 6e | 74 77 28 22 25 73 22 2c |X...prin|tw("%s",|
|00002860| 26 73 74 72 5b 69 5d 29 | 3b 0a 58 09 09 09 69 20 |&str[i])|;.X...i |
|00002870| 2b 3d 20 73 2d 69 3b 0a | 58 09 09 7d 0a 58 09 09 |+= s-i;.|X..}.X..|
|00002880| 65 6c 73 65 20 7b 0a 58 | 09 09 09 66 6f 72 28 6a |else {.X|...for(j|
|00002890| 3d 30 3b 6a 3c 66 77 3b | 6a 2b 2b 29 0a 58 09 09 |=0;j<fw;|j++).X..|
|000028a0| 09 09 61 64 64 63 68 28 | 73 74 72 5b 69 2b 2b 5d |..addch(|str[i++]|
|000028b0| 29 3b 0a 58 09 09 7d 0a | 58 09 09 69 66 28 28 69 |);.X..}.|X..if((i|
|000028c0| 20 25 20 66 77 29 3d 3d | 30 29 20 7b 0a 58 09 09 | % fw)==|0) {.X..|
|000028d0| 09 6d 6f 76 65 28 69 79 | 20 2b 20 79 6f 2c 69 78 |.move(iy| + yo,ix|
|000028e0| 29 3b 0a 58 09 09 09 79 | 6f 2b 2b 3b 0a 58 09 09 |);.X...y|o++;.X..|
|000028f0| 7d 0a 58 09 7d 0a 58 09 | 6d 6f 76 65 28 63 79 2c |}.X.}.X.|move(cy,|
|00002900| 63 78 29 3b 0a 58 09 69 | 66 28 72 65 66 72 29 0a |cx);.X.i|f(refr).|
|00002910| 58 09 09 72 65 66 72 65 | 73 68 28 29 3b 0a 58 7d |X..refre|sh();.X}|
|00002920| 0a 58 0a 69 6e 69 74 28 | 29 0a 58 7b 0a 58 09 6e |.X.init(|).X{.X.n|
|00002930| 6f 65 63 68 6f 28 29 3b | 0a 58 09 72 61 77 28 29 |oecho();|.X.raw()|
|00002940| 3b 0a 58 7d 0a 58 0a 64 | 65 5f 69 6e 69 74 28 29 |;.X}.X.d|e_init()|
|00002950| 0a 58 7b 0a 58 09 6e 6f | 72 61 77 28 29 3b 0a 58 |.X{.X.no|raw();.X|
|00002960| 09 65 63 68 6f 28 29 3b | 0a 58 7d 0a 58 0a 69 6e |.echo();|.X}.X.in|
|00002970| 28 63 68 2c 61 6c 6c 6f | 77 29 0a 63 68 61 72 09 |(ch,allo|w).char.|
|00002980| 63 68 2c 20 61 6c 6c 6f | 77 5b 5d 3b 0a 58 7b 0a |ch, allo|w[];.X{.|
|00002990| 58 09 72 65 67 69 73 74 | 65 72 20 69 6e 74 09 69 |X.regist|er int.i|
|000029a0| 3b 0a 58 0a 58 09 69 66 | 28 61 6c 6c 6f 77 20 3d |;.X.X.if|(allow =|
|000029b0| 3d 20 4e 55 4c 4c 29 0a | 58 09 09 72 65 74 75 72 |= NULL).|X..retur|
|000029c0| 6e 28 31 29 3b 0a 58 09 | 66 6f 72 28 69 3d 30 3b |n(1);.X.|for(i=0;|
|000029d0| 69 3c 73 74 72 6c 65 6e | 28 61 6c 6c 6f 77 29 3b |i<strlen|(allow);|
|000029e0| 69 2b 2b 29 0a 58 09 09 | 69 66 28 63 68 3d 3d 61 |i++).X..|if(ch==a|
|000029f0| 6c 6c 6f 77 5b 69 5d 29 | 0a 58 09 09 09 72 65 74 |llow[i])|.X...ret|
|00002a00| 75 72 6e 28 31 29 3b 0a | 58 09 72 65 74 75 72 6e |urn(1);.|X.return|
|00002a10| 28 30 29 3b 0a 58 7d 0a | 58 0a 63 6c 65 61 72 61 |(0);.X}.|X.cleara|
|00002a20| 6c 6c 28 73 74 72 29 0a | 63 68 61 72 09 73 74 72 |ll(str).|char.str|
|00002a30| 5b 5d 3b 0a 58 7b 0a 58 | 09 73 6c 3d 69 64 78 3d |[];.X{.X|.sl=idx=|
|00002a40| 30 3b 0a 58 09 63 78 3d | 69 78 3b 0a 58 09 63 79 |0;.X.cx=|ix;.X.cy|
|00002a50| 3d 69 79 3b 0a 58 09 73 | 74 72 5b 30 5d 3d 27 5c |=iy;.X.s|tr[0]='\|
|00002a60| 30 27 3b 0a 58 7d 0a 45 | 4e 44 5f 4f 46 5f 46 49 |0';.X}.E|ND_OF_FI|
|00002a70| 4c 45 0a 69 66 20 74 65 | 73 74 20 34 37 31 35 20 |LE.if te|st 4715 |
|00002a80| 2d 6e 65 20 60 77 63 20 | 2d 63 20 3c 27 67 65 74 |-ne `wc |-c <'get|
|00002a90| 2e 63 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.c'`; th|en. e|
|00002aa0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 67 65 74 |cho shar|: \"'get|
|00002ab0| 2e 63 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |.c'\" un|packed w|
|00002ac0| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00002ad0| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 67 65 74 |fi.# end| of 'get|
|00002ae0| 2e 63 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |.c'.fi.i|f test -|
|00002af0| 66 20 27 67 65 74 2e 68 | 27 20 2d 61 20 22 24 7b |f 'get.h|' -a "${|
|00002b00| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00002b10| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00002b20| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00002b30| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00002b40| 5c 22 27 67 65 74 2e 68 | 27 5c 22 0a 65 6c 73 65 |\"'get.h|'\".else|
|00002b50| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|00002b60| 61 63 74 69 6e 67 20 5c | 22 27 67 65 74 2e 68 27 |acting \|"'get.h'|
|00002b70| 5c 22 20 5c 28 37 39 37 | 20 63 68 61 72 61 63 74 |\" \(797| charact|
|00002b80| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00002b90| 2f 22 20 3e 27 67 65 74 | 2e 68 27 20 3c 3c 27 45 |/" >'get|.h' <<'E|
|00002ba0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 2f 2a 20 |ND_OF_FI|LE'.X/* |
|00002bb0| 64 65 66 69 6e 65 73 20 | 66 6f 72 20 6d 79 20 67 |defines |for my g|
|00002bc0| 65 74 73 74 72 69 6e 67 | 20 72 6f 75 74 69 6e 65 |etstring| routine|
|00002bd0| 20 2a 2f 0a 58 2f 2a 20 | 25 57 25 20 2a 2f 0a 58 | */.X/* |%W% */.X|
|00002be0| 0a 58 23 64 65 66 69 6e | 65 20 49 4e 49 54 49 41 |.X#defin|e INITIA|
|00002bf0| 4c 09 30 0a 58 23 64 65 | 66 69 6e 65 20 47 45 54 |L.0.X#de|fine GET|
|00002c00| 5f 43 4c 45 41 52 09 30 | 78 30 33 09 2f 2a 20 63 |_CLEAR.0|x03./* c|
|00002c10| 6f 6e 74 72 6f 6c 20 63 | 20 2a 2f 0a 58 23 64 65 |ontrol c| */.X#de|
|00002c20| 66 69 6e 65 09 47 45 54 | 5f 55 50 09 09 30 78 30 |fine.GET|_UP..0x0|
|00002c30| 62 09 2f 2a 20 63 6f 6e | 74 72 6f 6c 20 6b 20 2a |b./* con|trol k *|
|00002c40| 2f 0a 58 23 64 65 66 69 | 6e 65 20 47 45 54 5f 44 |/.X#defi|ne GET_D|
|00002c50| 4f 57 4e 09 30 78 30 61 | 09 2f 2a 20 63 6f 6e 74 |OWN.0x0a|./* cont|
|00002c60| 72 6f 6c 20 6a 20 2a 2f | 0a 58 23 64 65 66 69 6e |rol j */|.X#defin|
|00002c70| 65 20 47 45 54 5f 4c 45 | 46 54 09 30 78 30 38 09 |e GET_LE|FT.0x08.|
|00002c80| 2f 2a 20 63 6f 6e 74 72 | 6f 6c 20 68 20 2a 2f 0a |/* contr|ol h */.|
|00002c90| 58 23 64 65 66 69 6e 65 | 20 47 45 54 5f 52 49 47 |X#define| GET_RIG|
|00002ca0| 48 54 09 30 78 30 63 09 | 2f 2a 20 63 6f 6e 74 72 |HT.0x0c.|/* contr|
|00002cb0| 6f 6c 20 6c 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ol l */.|X#define|
|00002cc0| 20 47 45 54 5f 54 41 42 | 09 09 30 78 30 39 09 2f | GET_TAB|..0x09./|
|00002cd0| 2a 20 63 6f 6e 74 72 6f | 6c 20 69 20 2a 2f 0a 58 |* contro|l i */.X|
|00002ce0| 23 64 65 66 69 6e 65 20 | 47 45 54 5f 52 45 54 55 |#define |GET_RETU|
|00002cf0| 52 4e 09 30 78 30 64 09 | 2f 2a 20 63 6f 6e 74 72 |RN.0x0d.|/* contr|
|00002d00| 6f 6c 20 6d 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ol m */.|X#define|
|00002d10| 20 47 45 54 5f 44 45 4c | 45 54 45 20 20 09 32 34 | GET_DEL|ETE .24|
|00002d20| 09 2f 2a 20 63 6f 6e 74 | 72 6f 6c 20 78 20 2a 2f |./* cont|rol x */|
|00002d30| 0a 58 23 64 65 66 69 6e | 65 20 47 45 54 5f 44 45 |.X#defin|e GET_DE|
|00002d40| 4c 45 54 45 32 09 30 78 | 37 66 09 2f 2a 20 64 65 |LETE2.0x|7f./* de|
|00002d50| 6c 65 74 65 20 6b 65 79 | 20 6f 6e 20 6d 6f 73 74 |lete key| on most|
|00002d60| 20 74 65 72 6d 69 6e 61 | 6c 73 20 2a 2f 0a 58 23 | termina|ls */.X#|
|00002d70| 64 65 66 69 6e 65 20 47 | 45 54 5f 45 53 43 41 50 |define G|ET_ESCAP|
|00002d80| 45 09 30 78 31 62 09 2f | 2a 20 65 73 63 61 70 65 |E.0x1b./|* escape|
|00002d90| 20 2a 2f 0a 58 0a 58 2f | 2a 20 74 79 70 65 73 20 | */.X.X/|* types |
|00002da0| 6f 66 20 63 68 61 72 61 | 63 74 65 72 73 20 74 68 |of chara|cters th|
|00002db0| 61 74 20 63 61 6e 20 62 | 65 20 73 70 65 63 69 66 |at can b|e specif|
|00002dc0| 69 65 64 20 66 6f 72 20 | 67 65 74 73 74 72 69 6e |ied for |getstrin|
|00002dd0| 67 20 69 6e 70 75 74 20 | 2a 2f 0a 58 23 64 65 66 |g input |*/.X#def|
|00002de0| 69 6e 65 20 53 48 4f 57 | 09 09 30 20 2f 2a 20 6f |ine SHOW|..0 /* o|
|00002df0| 6e 6c 79 20 73 68 6f 77 | 20 74 68 65 20 73 74 72 |nly show| the str|
|00002e00| 69 6e 67 2c 20 64 6f 6e | 27 74 20 61 73 6b 20 66 |ing, don|'t ask f|
|00002e10| 6f 72 20 69 6e 70 75 74 | 20 2a 2f 0a 58 23 64 65 |or input| */.X#de|
|00002e20| 66 69 6e 65 20 4e 55 4d | 5f 4f 4e 4c 59 09 31 20 |fine NUM|_ONLY.1 |
|00002e30| 2f 2a 20 6f 6e 6c 79 20 | 6e 75 6d 65 72 69 63 20 |/* only |numeric |
|00002e40| 63 68 61 72 61 63 74 65 | 72 73 20 30 2d 39 20 2a |characte|rs 0-9 *|
|00002e50| 2f 0a 58 23 64 65 66 69 | 6e 65 20 4c 45 54 54 45 |/.X#defi|ne LETTE|
|00002e60| 52 5f 4f 4e 4c 59 09 32 | 20 2f 2a 20 6f 6e 6c 79 |R_ONLY.2| /* only|
|00002e70| 20 6c 65 74 74 65 72 73 | 20 61 2d 7a 2c 20 41 2d | letters| a-z, A-|
|00002e80| 5a 20 61 6e 64 20 73 70 | 61 63 65 20 28 27 20 27 |Z and sp|ace (' '|
|00002e90| 29 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 41 4c |) */.X#d|efine AL|
|00002ea0| 4c 5f 41 4c 50 48 41 09 | 33 20 2f 2a 20 61 6c 6c |L_ALPHA.|3 /* all|
|00002eb0| 20 70 72 69 6e 74 61 62 | 6c 65 20 61 73 63 69 69 | printab|le ascii|
|00002ec0| 20 63 68 61 72 61 63 74 | 65 72 73 20 61 72 65 20 | charact|ers are |
|00002ed0| 70 65 72 6d 69 74 74 65 | 64 20 2a 2f 0a 45 4e 44 |permitte|d */.END|
|00002ee0| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00002ef0| 20 37 39 37 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 797 -ne| `wc -c |
|00002f00| 3c 27 67 65 74 2e 68 27 | 60 3b 20 74 68 65 6e 0a |<'get.h'|`; then.|
|00002f10| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00002f20| 22 27 67 65 74 2e 68 27 | 5c 22 20 75 6e 70 61 63 |"'get.h'|\" unpac|
|00002f30| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00002f40| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00002f50| 20 27 67 65 74 2e 68 27 | 0a 66 69 0a 69 66 20 74 | 'get.h'|.fi.if t|
|00002f60| 65 73 74 20 2d 66 20 27 | 69 6c 73 2e 31 27 20 2d |est -f '|ils.1' -|
|00002f70| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00002f80| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00002f90| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00002fa0| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00002fb0| 66 69 6c 65 20 5c 22 27 | 69 6c 73 2e 31 27 5c 22 |file \"'|ils.1'\"|
|00002fc0| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00002fd0| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 69 | Extract|ing \"'i|
|00002fe0| 6c 73 2e 31 27 5c 22 20 | 5c 28 37 37 38 39 20 63 |ls.1'\" |\(7789 c|
|00002ff0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00003000| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 69 6c 73 2e 31 |"s/^X//"| >'ils.1|
|00003010| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|00003020| 27 0a 58 2e 50 55 0a 58 | 2e 54 48 20 49 4c 53 20 |'.X.PU.X|.TH ILS |
|00003030| 31 20 6c 6f 63 61 6c 0a | 58 2e 53 48 20 4e 41 4d |1 local.|X.SH NAM|
|00003040| 45 0a 69 6c 73 20 5c 2d | 20 69 6e 74 65 72 61 63 |E.ils \-| interac|
|00003050| 74 69 76 65 20 64 69 72 | 65 63 74 6f 72 79 20 62 |tive dir|ectory b|
|00003060| 72 6f 77 73 65 72 20 61 | 6e 64 20 76 69 73 75 61 |rowser a|nd visua|
|00003070| 6c 20 73 68 65 6c 6c 0a | 58 2e 53 48 20 53 59 4e |l shell.|X.SH SYN|
|00003080| 4f 50 53 49 53 0a 58 2e | 6c 6c 20 2b 38 0a 58 2e |OPSIS.X.|ll +8.X.|
|00003090| 42 20 69 6c 73 20 5c 5b | 2d 61 46 65 54 72 3c 72 |B ils \[|-aFeTr<r|
|000030a0| 6f 77 73 3e 63 3c 63 6f | 6c 75 6d 6e 73 3e 20 5c |ows>c<co|lumns> \|
|000030b0| 5b 74 69 74 6c 65 5c 5d | 5c 5d 20 5c 5b 20 70 61 |[title\]|\] \[ pa|
|000030c0| 74 74 65 72 6e 31 20 70 | 61 74 74 65 72 6e 32 20 |ttern1 p|attern2 |
|000030d0| 5c 2e 5c 2e 5c 2e 20 70 | 61 74 74 65 72 6e 4e 20 |\.\.\. p|atternN |
|000030e0| 5c 5d 0a 58 2e 6c 6c 20 | 2d 38 0a 58 2e 62 72 0a |\].X.ll |-8.X.br.|
|000030f0| 58 2e 53 48 20 44 45 53 | 43 52 49 50 54 49 4f 4e |X.SH DES|CRIPTION|
|00003100| 0a 58 2e 42 20 69 6c 73 | 0a 77 61 73 20 6f 72 67 |.X.B ils|.was org|
|00003110| 69 6e 61 6c 6c 79 20 6a | 75 73 74 20 61 20 64 72 |inally j|ust a dr|
|00003120| 69 65 63 74 6f 72 79 20 | 62 72 6f 77 73 69 6e 67 |iectory |browsing|
|00003130| 20 75 74 69 6c 69 74 79 | 20 74 6f 20 61 6c 6c 6f | utility| to allo|
|00003140| 77 20 75 73 65 72 73 0a | 74 6f 20 6d 6f 76 65 20 |w users.|to move |
|00003150| 61 72 6f 75 6e 64 20 74 | 68 65 20 73 79 73 74 65 |around t|he syste|
|00003160| 6d 2c 20 64 65 73 63 65 | 6e 64 69 6e 67 20 69 6e |m, desce|nding in|
|00003170| 74 6f 20 64 69 72 65 63 | 74 6f 72 69 65 73 20 74 |to direc|tories t|
|00003180| 68 72 6f 75 67 68 0a 61 | 20 76 69 73 75 61 6c 6c |hrough.a| visuall|
|00003190| 79 2d 6f 72 69 65 6e 74 | 65 64 20 69 6e 74 65 72 |y-orient|ed inter|
|000031a0| 66 61 63 65 2e 0a 58 0a | 53 69 6e 63 65 20 74 68 |face..X.|Since th|
|000031b0| 65 20 6f 72 69 67 69 6e | 61 6c 20 69 6d 70 6c 65 |e origin|al imple|
|000031c0| 6d 65 6e 74 61 74 69 6f | 6e 2c 20 74 68 65 20 66 |mentatio|n, the f|
|000031d0| 75 6e 63 74 69 6f 6e 61 | 6c 69 74 79 20 6f 66 0a |unctiona|lity of.|
|000031e0| 58 2e 42 20 69 6c 73 0a | 68 61 73 20 62 65 65 6e |X.B ils.|has been|
|000031f0| 20 65 78 70 61 6e 64 65 | 64 20 74 6f 20 61 6c 6c | expande|d to all|
|00003200| 6f 77 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 74 6f |ow opera|tions to|
|00003210| 20 62 65 20 70 65 72 66 | 6f 72 6d 65 64 20 6f 6e | be perf|ormed on|
|00003220| 20 74 68 65 20 66 69 6c | 65 73 20 69 6e 20 74 68 | the fil|es in th|
|00003230| 65 0a 64 69 72 65 63 74 | 6f 72 69 65 73 20 63 75 |e.direct|ories cu|
|00003240| 72 72 65 6e 74 6c 79 20 | 62 65 69 6e 67 20 65 78 |rrently |being ex|
|00003250| 61 6d 69 6e 65 64 2e 20 | 20 45 61 63 68 20 75 73 |amined. | Each us|
|00003260| 65 72 20 63 61 6e 20 64 | 65 66 69 6e 65 20 74 68 |er can d|efine th|
|00003270| 65 69 72 20 6f 77 6e 20 | 73 65 74 20 6f 66 0a 6f |eir own |set of.o|
|00003280| 70 65 72 61 74 69 6f 6e | 73 20 75 73 69 6e 67 20 |peration|s using |
|00003290| 62 75 69 6c 74 2d 69 6e | 20 76 61 72 69 61 62 6c |built-in| variabl|
|000032a0| 65 73 2c 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |es, envi|ronment |
|000032b0| 76 61 72 69 61 62 6c 65 | 73 2c 20 61 73 20 77 65 |variable|s, as we|
|000032c0| 6c 6c 20 61 73 0a 6b 65 | 79 62 6f 61 72 64 20 69 |ll as.ke|yboard i|
|000032d0| 6e 70 75 74 2e 20 20 42 | 79 20 63 72 65 61 74 69 |nput. B|y creati|
|000032e0| 6e 67 20 61 20 66 69 6c | 65 2c 20 60 60 2e 69 6c |ng a fil|e, ``.il|
|000032f0| 73 22 20 69 6e 20 74 68 | 65 20 24 48 4f 4d 45 20 |s" in th|e $HOME |
|00003300| 64 69 72 65 63 74 6f 72 | 79 2c 0a 65 61 63 68 20 |director|y,.each |
|00003310| 75 73 65 72 20 63 61 6e | 20 64 65 66 69 6e 65 20 |user can| define |
|00003320| 77 68 61 74 20 73 65 71 | 75 65 6e 63 65 20 6f 66 |what seq|uence of|
|00003330| 20 6b 65 79 73 20 69 6e | 76 6f 6b 65 73 20 61 20 | keys in|vokes a |
|00003340| 73 65 74 20 6f 66 20 73 | 68 65 6c 6c 0a 6f 70 65 |set of s|hell.ope|
|00003350| 72 61 74 69 6f 6e 73 2e | 0a 58 0a 54 68 65 72 65 |rations.|.X.There|
|00003360| 20 61 72 65 20 73 65 76 | 65 72 61 6c 20 6f 70 74 | are sev|eral opt|
|00003370| 69 6f 6e 73 2c 20 73 6f | 6d 65 20 6f 66 20 77 68 |ions, so|me of wh|
|00003380| 69 63 68 20 63 6f 72 72 | 65 73 70 6f 6e 64 73 20 |ich corr|esponds |
|00003390| 74 6f 20 74 68 65 20 6f | 70 74 69 6f 6e 20 6f 66 |to the o|ption of|
|000033a0| 0a 74 68 65 20 73 61 6d | 65 20 6e 61 6d 65 20 69 |.the sam|e name i|
|000033b0| 6e 20 74 68 65 0a 58 2e | 42 20 6c 73 28 31 29 0a |n the.X.|B ls(1).|
|000033c0| 63 6f 6d 6d 61 6e 64 3a | 0a 58 2e 54 50 0a 58 2e |command:|.X.TP.X.|
|000033d0| 42 49 20 5c 2d 61 20 0a | 4c 69 73 74 20 61 6c 6c |BI \-a .|List all|
|000033e0| 20 65 6e 74 72 69 65 73 | 3b 20 75 73 75 61 6c 6c | entries|; usuall|
|000033f0| 79 20 60 2e 27 2c 20 60 | 2e 2e 27 20 61 6e 64 20 |y `.', `|..' and |
|00003400| 61 6c 6c 20 66 69 6c 65 | 73 20 74 68 61 74 20 73 |all file|s that s|
|00003410| 74 61 72 74 20 77 69 74 | 68 20 61 20 60 2e 27 0a |tart wit|h a `.'.|
|00003420| 61 72 65 20 73 75 70 70 | 72 65 73 65 64 2e 20 54 |are supp|resed. T|
|00003430| 68 69 73 20 69 73 20 74 | 68 65 20 64 65 66 61 75 |his is t|he defau|
|00003440| 6c 74 20 69 66 20 74 68 | 65 20 6c 61 73 74 20 63 |lt if th|e last c|
|00003450| 68 61 72 61 63 74 65 72 | 20 6f 66 20 74 68 65 20 |haracter| of the |
|00003460| 6e 61 6d 65 0a 6f 66 20 | 74 68 65 20 70 72 6f 67 |name.of |the prog|
|00003470| 72 61 6d 20 69 73 20 61 | 6e 20 60 61 27 20 28 69 |ram is a|n `a' (i|
|00003480| 2e 65 2e 2c 20 6c 69 6e | 6b 69 6e 67 20 69 6c 61 |.e., lin|king ila|
|00003490| 20 74 6f 20 69 6c 73 29 | 2e 0a 58 2e 54 50 0a 58 | to ils)|..X.TP.X|
|000034a0| 2e 42 49 20 5c 2d 46 0a | 43 61 75 73 65 20 64 69 |.BI \-F.|Cause di|
|000034b0| 72 65 63 74 6f 72 69 65 | 73 20 74 6f 20 62 65 20 |rectorie|s to be |
|000034c0| 6d 61 72 6b 65 64 20 77 | 69 74 68 20 61 20 74 72 |marked w|ith a tr|
|000034d0| 61 69 6c 69 6e 67 20 60 | 2f 27 20 61 6e 64 20 65 |ailing `|/' and e|
|000034e0| 78 65 63 75 74 61 62 6c | 65 20 66 69 6c 65 73 0a |xecutabl|e files.|
|000034f0| 74 6f 20 62 65 20 6d 61 | 72 6b 65 64 20 77 69 74 |to be ma|rked wit|
|00003500| 68 20 61 20 74 72 61 69 | 6c 69 6e 67 20 60 2a 27 |h a trai|ling `*'|
|00003510| 2e 20 20 54 68 69 73 20 | 69 73 20 74 68 65 20 64 |. This |is the d|
|00003520| 65 66 61 75 6c 74 20 69 | 66 20 74 68 65 20 6c 61 |efault i|f the la|
|00003530| 73 74 0a 63 68 61 72 61 | 63 74 65 72 20 6f 66 20 |st.chara|cter of |
|00003540| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |the name| of the |
|00003550| 70 72 6f 67 72 61 6d 20 | 69 73 20 61 20 60 66 27 |program |is a `f'|
|00003560| 20 28 69 2e 65 2e 2c 20 | 6c 69 6e 6b 69 6e 67 20 | (i.e., |linking |
|00003570| 69 6c 66 20 74 6f 20 69 | 6c 73 29 2e 0a 58 2e 54 |ilf to i|ls)..X.T|
|00003580| 50 0a 58 2e 42 49 20 5c | 2d 65 0a 58 45 63 68 6f |P.X.BI \|-e.XEcho|
|00003590| 20 61 6c 6c 20 63 6f 6d | 6d 61 6e 64 73 20 61 73 | all com|mands as|
|000035a0| 20 74 68 65 79 20 61 72 | 65 20 65 78 65 63 75 74 | they ar|e execut|
|000035b0| 65 64 2e 0a 58 2e 54 50 | 0a 58 2e 42 49 20 5c 2d |ed..X.TP|.X.BI \-|
|000035c0| 54 5c 20 5c 3c 74 69 74 | 6c 65 5c 3e 0a 50 72 69 |T\ \<tit|le\>.Pri|
|000035d0| 6e 74 20 61 20 74 69 74 | 6c 65 20 6f 6e 20 74 6f |nt a tit|le on to|
|000035e0| 70 20 6f 66 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |p of the| window |
|000035f0| 6f 72 20 73 63 72 65 65 | 6e 2e 0a 58 2e 54 50 0a |or scree|n..X.TP.|
|00003600| 58 2e 42 49 20 5c 2d 72 | 0a 43 68 61 6e 67 65 20 |X.BI \-r|.Change |
|00003610| 74 68 65 20 76 65 72 74 | 69 63 61 6c 20 73 69 7a |the vert|ical siz|
|00003620| 65 20 6f 66 20 74 68 65 | 20 69 6c 73 20 77 69 6e |e of the| ils win|
|00003630| 64 6f 77 20 66 72 6f 6d | 20 74 68 65 20 64 65 66 |dow from| the def|
|00003640| 61 75 6c 74 2e 20 20 54 | 68 65 20 64 65 66 61 75 |ault. T|he defau|
|00003650| 6c 74 20 69 73 20 74 68 | 65 0a 73 69 7a 65 20 6f |lt is th|e.size o|
|00003660| 66 20 74 68 65 20 73 63 | 72 65 65 6e 20 75 70 6f |f the sc|reen upo|
|00003670| 6e 20 63 61 6c 6c 69 6e | 67 20 69 6c 73 2e 20 20 |n callin|g ils. |
|00003680| 49 66 20 75 73 69 6e 67 | 20 74 68 69 73 20 6f 70 |If using| this op|
|00003690| 74 69 6f 6e 2c 20 74 68 | 65 0a 6e 75 6d 62 65 72 |tion, th|e.number|
|000036a0| 20 6f 66 20 72 6f 77 73 | 20 6d 75 73 74 20 69 6d | of rows| must im|
|000036b0| 6d 65 64 69 61 74 65 6c | 79 20 66 6f 6c 6c 6f 77 |mediatel|y follow|
|000036c0| 2c 20 77 69 74 68 20 6e | 6f 20 77 68 69 74 65 20 |, with n|o white |
|000036d0| 73 70 61 63 65 20 28 69 | 2e 65 2e 2c 20 69 6c 73 |space (i|.e., ils|
|000036e0| 20 2d 72 31 30 29 2e 0a | 58 2e 54 50 0a 58 2e 42 | -r10)..|X.TP.X.B|
|000036f0| 49 20 5c 63 0a 43 68 61 | 6e 67 65 20 74 68 65 20 |I \c.Cha|nge the |
|00003700| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 73 69 7a 65 20 |horizont|al size |
|00003710| 6f 66 20 74 68 65 20 69 | 6c 73 20 77 69 6e 64 6f |of the i|ls windo|
|00003720| 77 20 66 72 6f 6d 20 74 | 68 65 20 64 65 66 61 75 |w from t|he defau|
|00003730| 6c 74 2e 20 20 54 68 65 | 20 64 65 66 61 75 6c 74 |lt. The| default|
|00003740| 0a 69 73 20 74 68 65 20 | 73 69 7a 65 20 6f 66 20 |.is the |size of |
|00003750| 74 68 65 20 73 63 72 65 | 65 6e 20 75 70 6f 6e 20 |the scre|en upon |
|00003760| 63 61 6c 6c 69 6e 67 20 | 69 6c 73 2e 20 20 49 66 |calling |ils. If|
|00003770| 20 75 73 69 6e 67 20 74 | 68 69 73 20 6f 70 74 69 | using t|his opti|
|00003780| 6f 6e 2c 20 74 68 65 0a | 6e 75 6d 62 65 72 20 6f |on, the.|number o|
|00003790| 66 20 63 6f 6c 75 6d 6e | 73 20 6d 75 73 74 20 69 |f column|s must i|
|000037a0| 6d 6d 65 64 69 61 74 65 | 6c 79 20 66 6f 6c 6c 6f |mmediate|ly follo|
|000037b0| 77 2c 20 77 69 74 68 20 | 6e 6f 20 77 68 69 74 65 |w, with |no white|
|000037c0| 20 73 70 61 63 65 20 28 | 69 2e 65 2e 2c 20 69 6c | space (|i.e., il|
|000037d0| 73 20 2d 72 36 30 29 2e | 0a 58 0a 58 2e 53 48 20 |s -r60).|.X.X.SH |
|000037e0| 57 49 4c 44 43 41 52 44 | 49 4e 47 0a 50 61 74 74 |WILDCARD|ING.Patt|
|000037f0| 65 72 6e 73 20 63 61 6e | 20 62 65 20 75 73 65 64 |erns can| be used|
|00003800| 20 69 6e 20 74 6f 20 6d | 61 74 63 68 20 66 69 6c | in to m|atch fil|
|00003810| 65 73 2c 20 6a 75 73 74 | 20 61 73 20 69 6e 20 6c |es, just| as in l|
|00003820| 73 28 31 29 2e 20 20 54 | 6f 0a 70 61 73 73 20 61 |s(1). T|o.pass a|
|00003830| 20 70 61 74 74 65 72 6e | 20 74 6f 20 69 6c 73 2c | pattern| to ils,|
|00003840| 20 61 6e 64 20 74 6f 20 | 61 76 6f 69 64 20 74 68 | and to |avoid th|
|00003850| 65 20 73 68 65 6c 6c 20 | 66 72 6f 6d 0a 65 78 70 |e shell |from.exp|
|00003860| 61 6e 64 69 6e 67 20 69 | 74 20 70 72 69 6f 72 20 |anding i|t prior |
|00003870| 74 6f 20 69 6e 76 6f 6b | 69 6e 67 20 69 6c 73 2c |to invok|ing ils,|
|00003880| 20 74 68 65 20 75 73 65 | 72 20 63 61 6e 20 73 75 | the use|r can su|
|00003890| 72 72 6f 75 6e 64 0a 74 | 68 65 20 70 61 74 74 65 |rround.t|he patte|
|000038a0| 72 6e 20 77 69 74 68 20 | 71 75 6f 74 65 73 20 28 |rn with |quotes (|
|000038b0| 69 2e 65 2e 2c 20 27 69 | 6c 73 20 22 2a 2e 63 22 |i.e., 'i|ls "*.c"|
|000038c0| 27 20 20 69 6e 73 74 65 | 61 64 20 6f 66 20 69 6c |' inste|ad of il|
|000038d0| 73 20 2a 2e 63 29 2e 0a | 54 68 69 73 20 77 69 6c |s *.c)..|This wil|
|000038e0| 6c 20 69 6e 73 75 72 65 | 20 74 68 61 74 20 74 68 |l insure| that th|
|000038f0| 65 20 70 61 74 74 65 72 | 6e 20 6d 61 74 63 68 20 |e patter|n match |
|00003900| 69 73 20 64 6f 6e 65 20 | 6f 6e 20 65 76 65 72 79 |is done |on every|
|00003910| 20 64 69 72 65 63 74 6f | 72 79 0a 64 65 73 63 65 | directo|ry.desce|
|00003920| 6e 64 65 64 20 69 6e 74 | 6f 20 64 75 72 69 6e 67 |nded int|o during|
|00003930| 20 74 68 65 20 65 78 65 | 63 75 74 69 6f 6e 20 6f | the exe|cution o|
|00003940| 66 20 69 6c 73 2e 20 20 | 4f 74 68 65 72 77 69 73 |f ils. |Otherwis|
|00003950| 65 2c 20 69 66 20 6e 6f | 0a 71 75 6f 74 65 73 20 |e, if no|.quotes |
|00003960| 61 72 65 20 75 73 65 64 | 2c 20 74 68 65 20 73 68 |are used|, the sh|
|00003970| 65 6c 6c 20 77 69 6c 6c | 20 65 78 70 61 6e 64 20 |ell will| expand |
|00003980| 74 68 65 20 77 69 6c 64 | 61 72 64 69 6e 67 20 61 |the wild|arding a|
|00003990| 6e 64 20 70 61 73 73 20 | 69 6c 73 0a 61 6c 6c 20 |nd pass |ils.all |
|000039a0| 66 69 6c 65 6e 61 6d 65 | 73 20 74 68 61 74 20 6d |filename|s that m|
|000039b0| 61 74 63 68 20 74 68 65 | 20 70 61 74 74 65 72 6e |atch the| pattern|
|000039c0| 20 69 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | in the |current |
|000039d0| 77 6f 72 6b 69 6e 67 20 | 64 69 72 65 63 74 6f 72 |working |director|
|000039e0| 79 2e 0a 41 6e 79 20 64 | 69 72 65 63 74 6f 72 79 |y..Any d|irectory|
|000039f0| 20 64 65 73 63 65 6e 64 | 65 64 20 69 6e 74 6f 20 | descend|ed into |
|00003a00| 74 68 61 74 20 64 6f 20 | 6e 6f 74 20 63 6f 6e 74 |that do |not cont|
|00003a10| 61 69 6e 20 61 6e 79 20 | 66 69 6c 65 73 20 6f 66 |ain any |files of|
|00003a20| 20 74 68 65 20 73 61 6d | 65 20 6e 61 6d 65 0a 77 | the sam|e name.w|
|00003a30| 69 6c 6c 20 61 70 70 65 | 61 72 20 74 6f 20 74 68 |ill appe|ar to th|
|00003a40| 65 20 75 73 65 72 20 61 | 73 20 61 6e 20 65 6d 70 |e user a|s an emp|
|00003a50| 74 79 20 64 69 72 65 63 | 74 6f 72 79 2e 0a 58 0a |ty direc|tory..X.|
|00003a60| 58 2e 42 20 69 6c 73 0a | 77 69 6c 64 63 61 72 64 |X.B ils.|wildcard|
|00003a70| 69 6e 67 20 77 6f 72 6b | 73 20 65 78 61 63 74 6c |ing work|s exactl|
|00003a80| 79 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 73 68 |y the sa|me as sh|
|00003a90| 28 31 29 2c 20 63 73 68 | 28 31 29 2c 20 61 6e 64 |(1), csh|(1), and|
|00003aa0| 20 6b 73 68 28 31 29 0a | 77 69 6c 64 63 61 72 64 | ksh(1).|wildcard|
|00003ab0| 69 6e 67 20 28 74 68 61 | 6e 6b 73 20 74 6f 20 52 |ing (tha|nks to R|
|00003ac0| 69 63 68 20 53 61 6c 7a | 20 66 6f 72 20 74 68 65 |ich Salz| for the|
|00003ad0| 20 77 69 6c 64 63 61 72 | 64 69 6e 67 20 72 6f 75 | wildcar|ding rou|
|00003ae0| 74 69 6e 65 29 2e 0a 58 | 0a 58 2e 53 48 20 54 48 |tine)..X|.X.SH TH|
|00003af0| 45 20 2e 69 6c 73 20 46 | 49 4c 45 0a 58 45 61 63 |E .ils F|ILE.XEac|
|00003b00| 68 20 75 73 65 72 20 63 | 61 6e 20 73 65 74 20 75 |h user c|an set u|
|00003b10| 70 20 74 68 65 69 72 20 | 6f 77 6e 20 2e 69 6c 73 |p their |own .ils|
|00003b20| 20 66 69 6c 65 20 69 6e | 20 74 68 65 69 72 20 68 | file in| their h|
|00003b30| 6f 6d 65 20 28 24 48 4f | 4d 45 29 20 64 69 72 65 |ome ($HO|ME) dire|
|00003b40| 63 74 6f 72 79 0a 74 6f | 20 64 65 66 69 6e 65 20 |ctory.to| define |
|00003b50| 74 68 65 69 72 20 6f 77 | 6e 20 6b 65 79 20 73 65 |their ow|n key se|
|00003b60| 71 75 65 6e 63 65 73 20 | 61 6e 64 20 63 6f 72 72 |quences |and corr|
|00003b70| 65 73 70 6f 6e 64 69 6e | 67 20 61 63 74 69 6f 6e |espondin|g action|
|00003b80| 73 20 72 65 6c 61 74 65 | 64 20 74 6f 0a 74 68 6f |s relate|d to.tho|
|00003b90| 73 65 20 6b 65 79 20 73 | 65 71 75 65 6e 63 65 73 |se key s|equences|
|00003ba0| 2e 20 20 54 68 65 20 2e | 69 6c 73 20 66 69 6c 65 |. The .|ils file|
|00003bb0| 20 68 61 73 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | has the| followi|
|00003bc0| 6e 67 20 66 6f 72 6d 61 | 74 3a 0a 58 0a 58 2e 6e |ng forma|t:.X.X.n|
|00003bd0| 66 0a 6b 65 79 5f 73 65 | 71 75 65 6e 63 65 3a 20 |f.key_se|quence: |
|00003be0| 20 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 31 | comman|d line 1|
|00003bf0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003c00| 20 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 20 32 | comman|d line 2|
|00003c10| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003c20| 20 20 20 20 20 20 20 2e | 2e 2e 0a 58 20 20 20 20 | .|...X |
|00003c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6f 6d 6d | | comm|
|00003c40| 61 6e 64 20 6c 69 6e 65 | 20 6e 0a 58 2e 66 69 0a |and line| n.X.fi.|
|00003c50| 58 0a 54 68 69 73 20 74 | 65 6c 6c 73 0a 58 2e 42 |X.This t|ells.X.B|
|00003c60| 20 69 6c 73 0a 74 68 61 | 74 20 77 68 65 6e 20 74 | ils.tha|t when t|
|00003c70| 68 65 20 6b 65 79 20 73 | 65 71 75 65 6e 63 65 20 |he key s|equence |
|00003c80| 69 73 20 65 6e 74 65 72 | 65 64 2c 20 65 78 65 63 |is enter|ed, exec|
|00003c90| 75 74 65 20 74 68 65 20 | 73 68 65 6c 6c 20 63 6f |ute the |shell co|
|00003ca0| 6d 6d 61 6e 64 73 0a 69 | 6e 20 63 6f 6d 6d 61 6e |mmands.i|n comman|
|00003cb0| 64 20 6c 69 6e 65 73 20 | 31 20 74 68 72 6f 75 67 |d lines |1 throug|
|00003cc0| 68 20 6e 2e 20 20 4f 6e | 65 20 63 75 72 72 65 6e |h n. On|e curren|
|00003cd0| 74 20 6c 69 6d 69 74 61 | 74 69 6f 6e 0a 58 2e 42 |t limita|tion.X.B|
|00003ce0| 20 69 6c 73 0a 68 61 73 | 20 69 73 20 74 68 61 74 | ils.has| is that|
|00003cf0| 20 65 61 63 68 20 63 6f | 6d 6d 61 6e 64 20 6c 69 | each co|mmand li|
|00003d00| 6e 65 20 69 73 20 65 78 | 65 63 75 74 65 64 20 73 |ne is ex|ecuted s|
|00003d10| 65 70 65 72 61 74 65 6c | 79 2c 20 73 6f 20 74 68 |eperatel|y, so th|
|00003d20| 61 74 0a 6e 6f 20 69 6e | 74 65 72 64 65 70 65 6e |at.no in|terdepen|
|00003d30| 64 65 6e 74 20 6c 69 6e | 65 73 20 63 61 6e 20 62 |dent lin|es can b|
|00003d40| 65 20 75 73 65 64 2e 20 | 20 41 20 63 61 6c 6c 20 |e used. | A call |
|00003d50| 74 6f 20 73 79 73 74 65 | 6d 28 33 29 20 69 73 20 |to syste|m(3) is |
|00003d60| 6d 61 64 65 20 6f 6e 0a | 65 61 63 68 20 6c 69 6e |made on.|each lin|
|00003d70| 65 2c 20 73 6f 20 61 20 | 6e 65 77 20 73 68 65 6c |e, so a |new shel|
|00003d80| 6c 20 63 6f 6d 65 73 20 | 69 6e 74 6f 20 65 78 69 |l comes |into exi|
|00003d90| 73 74 61 6e 63 65 20 66 | 6f 72 20 65 61 63 68 20 |stance f|or each |
|00003da0| 6c 69 6e 65 2e 0a 41 6e | 79 20 65 6e 76 69 72 6f |line..An|y enviro|
|00003db0| 6e 6d 65 6e 74 61 6c 20 | 63 68 61 6e 67 65 73 20 |nmental |changes |
|00003dc0| 6d 61 64 65 20 73 75 63 | 68 20 61 73 20 73 68 65 |made suc|h as she|
|00003dd0| 6c 6c 20 76 61 72 69 61 | 62 6c 65 20 61 73 73 69 |ll varia|ble assi|
|00003de0| 67 6e 6d 65 6e 74 0a 6f | 72 20 63 68 61 6e 67 65 |gnment.o|r change|
|00003df0| 20 6f 66 20 77 6f 72 6b | 69 6e 67 20 64 69 72 65 | of work|ing dire|
|00003e00| 63 74 6f 72 79 20 61 72 | 65 20 6c 6f 73 74 20 61 |ctory ar|e lost a|
|00003e10| 66 74 65 72 20 65 61 63 | 68 20 63 6f 6d 6d 61 6e |fter eac|h comman|
|00003e20| 64 2e 0a 59 6f 75 20 63 | 61 6e 2c 20 68 6f 77 65 |d..You c|an, howe|
|00003e30| 76 65 72 2c 20 68 61 76 | 65 20 6d 75 6c 74 69 70 |ver, hav|e multip|
|00003e40| 6c 65 20 73 68 65 6c 6c | 20 63 6f 6d 6d 61 6e 64 |le shell| command|
|00003e50| 73 20 6f 6e 20 6f 6e 65 | 20 6c 69 6e 65 20 62 79 |s on one| line by|
|00003e60| 20 75 73 69 6e 67 0a 73 | 65 6d 69 63 6f 6c 6f 6e | using.s|emicolon|
|00003e70| 73 20 64 65 6c 69 6d 69 | 74 69 6e 67 20 73 65 70 |s delimi|ting sep|
|00003e80| 65 72 61 74 65 20 63 6f | 6d 6d 61 6e 64 73 2e 0a |erate co|mmands..|
|00003e90| 58 0a 41 6c 6c 20 6c 69 | 6e 65 73 20 74 68 61 74 |X.All li|nes that|
|00003ea0| 20 68 61 76 65 20 61 20 | 60 23 27 20 63 68 61 72 | have a |`#' char|
|00003eb0| 61 63 74 65 72 20 61 73 | 20 74 68 65 20 66 69 72 |acter as| the fir|
|00003ec0| 73 74 20 63 68 61 72 61 | 63 74 65 72 20 61 72 65 |st chara|cter are|
|00003ed0| 0a 61 73 73 75 6d 65 64 | 20 74 6f 20 62 65 20 63 |.assumed| to be c|
|00003ee0| 6f 6d 6d 65 6e 74 73 20 | 61 6e 64 20 61 72 65 20 |omments |and are |
|00003ef0| 73 6b 69 70 70 65 64 2e | 0a 58 2e 53 48 20 55 53 |skipped.|.X.SH US|
|00003f00| 49 4e 47 20 69 6c 73 0a | 75 70 6f 6e 20 65 78 65 |ING ils.|upon exe|
|00003f10| 63 75 74 69 6f 6e 2c 20 | 74 68 65 20 75 73 65 72 |cution, |the user|
|00003f20| 20 77 69 6c 6c 20 73 65 | 65 20 61 20 6c 69 73 74 | will se|e a list|
|00003f30| 69 6e 67 20 6f 66 20 74 | 68 65 20 64 69 72 65 63 |ing of t|he direc|
|00003f40| 74 6f 72 79 2c 0a 76 65 | 72 79 20 73 69 6d 69 6c |tory,.ve|ry simil|
|00003f50| 61 72 20 74 6f 20 74 68 | 65 20 6f 75 74 70 75 74 |ar to th|e output|
|00003f60| 20 6f 66 20 74 68 65 20 | 0a 58 2e 42 20 6c 73 28 | of the |.X.B ls(|
|00003f70| 31 29 0a 63 6f 6d 6d 61 | 6e 64 2e 20 20 4f 6e 20 |1).comma|nd. On |
|00003f80| 74 68 65 20 74 6f 70 20 | 6c 69 6e 65 20 69 73 20 |the top |line is |
|00003f90| 74 68 65 20 70 61 74 68 | 20 6f 66 20 74 68 65 20 |the path| of the |
|00003fa0| 63 75 72 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 |current |director|
|00003fb0| 79 2e 0a 49 66 20 70 6f | 73 73 69 62 6c 65 2c 0a |y..If po|ssible,.|
|00003fc0| 58 2e 42 20 69 6c 73 0a | 77 69 6c 6c 20 64 69 73 |X.B ils.|will dis|
|00003fd0| 70 6c 61 79 20 74 68 65 | 20 66 75 6c 6c 20 70 61 |play the| full pa|
|00003fe0| 74 68 20 6f 66 20 74 68 | 65 20 63 75 72 72 65 6e |th of th|e curren|
|00003ff0| 74 20 77 6f 72 6b 69 6e | 67 20 64 69 72 65 63 74 |t workin|g direct|
|00004000| 6f 72 79 2e 20 20 49 66 | 20 74 68 65 0a 70 61 74 |ory. If| the.pat|
|00004010| 68 20 65 78 63 65 65 64 | 73 20 74 68 65 20 77 69 |h exceed|s the wi|
|00004020| 64 74 68 20 6f 66 20 74 | 68 65 20 73 63 72 65 65 |dth of t|he scree|
|00004030| 6e 20 6f 72 20 77 69 6e | 64 6f 77 2c 20 69 74 20 |n or win|dow, it |
|00004040| 77 69 6c 6c 20 62 65 20 | 74 72 75 6e 63 61 74 65 |will be |truncate|
|00004050| 64 2e 0a 53 69 6e 63 65 | 20 74 68 65 20 72 69 67 |d..Since| the rig|
|00004060| 68 74 2d 6d 6f 73 74 20 | 63 68 61 72 61 63 74 65 |ht-most |characte|
|00004070| 72 73 20 6f 66 20 61 20 | 70 61 74 68 6e 61 6d 65 |rs of a |pathname|
|00004080| 20 61 72 65 20 75 73 75 | 61 6c 6c 79 20 6f 66 20 | are usu|ally of |
|00004090| 74 68 65 20 6d 6f 73 74 | 20 69 6e 74 65 72 65 73 |the most| interes|
|000040a0| 74 2c 0a 74 68 65 20 74 | 72 75 6e 63 61 74 69 6f |t,.the t|runcatio|
|000040b0| 6e 20 69 73 20 64 6f 6e | 65 20 61 74 20 74 68 65 |n is don|e at the|
|000040c0| 20 6c 65 66 74 20 65 6e | 64 2e 20 20 41 73 20 6d | left en|d. As m|
|000040d0| 61 6e 79 20 63 68 61 72 | 61 63 74 65 72 73 20 61 |any char|acters a|
|000040e0| 73 20 77 69 6c 6c 20 66 | 69 74 0a 61 72 65 20 73 |s will f|it.are s|
|000040f0| 68 6f 77 6e 2c 20 61 6e | 64 20 74 68 65 20 70 61 |hown, an|d the pa|
|00004100| 74 68 20 69 73 20 70 72 | 65 63 65 65 64 65 64 20 |th is pr|eceeded |
|00004110| 62 79 20 22 2e 2e 2e 22 | 2e 0a 58 0a 4f 6e 65 20 |by "..."|..X.One |
|00004120| 66 69 6c 65 20 69 73 20 | 61 6c 77 61 79 73 20 74 |file is |always t|
|00004130| 68 65 20 22 63 75 72 72 | 65 6e 74 20 66 69 6c 65 |he "curr|ent file|
|00004140| 22 2c 20 69 74 20 69 73 | 20 70 6f 69 6e 74 65 64 |", it is| pointed|
|00004150| 20 61 74 20 62 79 20 74 | 68 65 0a 58 2e 42 20 69 | at by t|he.X.B i|
|00004160| 6c 73 0a 63 75 72 73 6f | 72 20 60 3e 27 2e 20 20 |ls.curso|r `>'. |
|00004170| 54 6f 20 63 68 61 6e 67 | 65 20 74 68 65 20 63 75 |To chang|e the cu|
|00004180| 72 72 65 6e 74 20 66 69 | 6c 65 2c 20 74 68 65 72 |rrent fi|le, ther|
|00004190| 65 20 61 72 65 20 63 75 | 72 73 6f 72 20 6d 6f 76 |e are cu|rsor mov|
|000041a0| 65 6d 65 6e 74 0a 6b 65 | 79 73 2e 20 20 54 68 65 |ement.ke|ys. The|
|000041b0| 20 64 65 66 61 75 6c 74 | 73 20 61 72 65 20 68 2c | default|s are h,|
|000041c0| 6a 2c 6b 20 61 6e 64 20 | 6c 20 28 61 73 20 69 6e |j,k and |l (as in|
|000041d0| 20 76 69 28 31 29 29 2e | 20 20 49 66 20 61 20 64 | vi(1)).| If a d|
|000041e0| 69 72 65 63 74 6f 72 79 | 0a 68 61 73 20 62 65 65 |irectory|.has bee|
|000041f0| 6e 20 6d 61 64 65 20 74 | 68 65 20 63 75 72 72 65 |n made t|he curre|
|00004200| 6e 74 20 66 69 6c 65 2c | 20 74 68 65 20 75 73 65 |nt file,| the use|
|00004210| 72 20 63 61 6e 20 64 65 | 73 63 65 6e 64 20 69 6e |r can de|scend in|
|00004220| 74 6f 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 79 |to the d|irectory|
|00004230| 0a 62 79 20 70 72 65 73 | 73 69 6e 67 20 74 68 65 |.by pres|sing the|
|00004240| 20 52 45 54 55 52 4e 20 | 6f 72 20 45 4e 54 45 52 | RETURN |or ENTER|
|00004250| 20 6b 65 79 2e 20 20 4f | 6e 63 65 20 74 68 65 20 | key. O|nce the |
|00004260| 75 73 65 72 20 68 61 73 | 20 64 65 73 63 65 6e 64 |user has| descend|
|00004270| 65 64 20 69 6e 74 6f 0a | 61 20 64 69 72 65 63 74 |ed into.|a direct|
|00004280| 6f 72 79 20 74 68 65 20 | 64 69 72 65 63 74 6f 72 |ory the |director|
|00004290| 79 20 62 65 63 6f 6d 65 | 73 20 74 68 65 20 63 75 |y become|s the cu|
|000042a0| 72 72 65 6e 74 20 77 6f | 72 6b 69 6e 67 20 64 69 |rrent wo|rking di|
|000042b0| 72 65 63 74 6f 72 79 2e | 20 20 54 68 65 0a 63 75 |rectory.| The.cu|
|000042c0| 72 72 65 6e 74 20 70 61 | 74 68 20 6f 6e 20 74 68 |rrent pa|th on th|
|000042d0| 65 20 74 6f 70 20 6c 69 | 6e 65 20 77 69 6c 6c 20 |e top li|ne will |
|000042e0| 62 65 20 75 70 64 61 74 | 65 64 2c 20 61 6e 64 20 |be updat|ed, and |
|000042f0| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00004300| 74 68 65 0a 64 69 72 65 | 63 74 6f 72 79 20 77 69 |the.dire|ctory wi|
|00004310| 6c 6c 20 62 65 20 73 68 | 6f 77 6e 20 6f 6e 20 74 |ll be sh|own on t|
|00004320| 68 65 20 73 63 72 65 65 | 6e 2e 0a 58 0a 54 68 65 |he scree|n..X.The|
|00004330| 20 75 73 65 72 20 63 61 | 6e 20 61 6c 73 6f 20 60 | user ca|n also `|
|00004340| 60 66 6f 72 63 65 22 20 | 61 20 63 6f 6d 6d 61 6e |`force" |a comman|
|00004350| 64 20 66 72 6f 6d 20 74 | 68 65 20 6b 65 79 62 6f |d from t|he keybo|
|00004360| 61 72 64 20 62 79 20 70 | 72 65 73 73 69 6e 67 0a |ard by p|ressing.|
|00004370| 74 68 65 20 27 3a 27 20 | 6b 65 79 2e 20 20 54 68 |the ':' |key. Th|
|00004380| 69 73 20 77 69 6c 6c 20 | 70 72 6f 6d 70 74 20 74 |is will |prompt t|
|00004390| 68 65 20 75 73 65 72 20 | 66 6f 72 20 61 20 6c 69 |he user |for a li|
|000043a0| 6e 65 20 6f 66 20 69 6e | 70 75 74 20 77 68 69 63 |ne of in|put whic|
|000043b0| 68 20 77 69 6c 6c 0a 62 | 65 20 73 63 61 6e 65 64 |h will.b|e scaned|
|000043c0| 20 66 6f 72 20 76 61 72 | 69 61 62 6c 65 20 73 75 | for var|iable su|
|000043d0| 62 73 74 69 74 75 74 69 | 6f 6e 2c 20 74 68 65 6e |bstituti|on, then|
|000043e0| 20 65 78 65 63 75 74 65 | 64 20 76 69 61 20 61 20 | execute|d via a |
|000043f0| 63 61 6c 6c 20 74 6f 20 | 73 79 73 74 65 6d 28 33 |call to |system(3|
|00004400| 29 2e 0a 54 68 69 73 20 | 63 61 6e 20 62 65 20 75 |)..This |can be u|
|00004410| 73 65 66 75 6c 20 69 6e | 20 74 68 61 74 20 69 74 |seful in| that it|
|00004420| 20 6d 61 6b 65 73 20 69 | 74 20 73 6f 20 74 68 61 | makes i|t so tha|
|00004430| 74 20 74 68 65 20 75 73 | 65 72 20 72 61 72 65 6c |t the us|er rarel|
|00004440| 79 20 68 61 73 20 74 6f | 0a 6c 65 61 76 65 20 69 |y has to|.leave i|
|00004450| 6c 73 20 74 6f 20 70 65 | 72 66 6f 72 6d 20 61 20 |ls to pe|rform a |
|00004460| 63 6f 6d 6d 61 6e 64 20 | 28 69 2e 65 2c 20 22 3a |command |(i.e, ":|
|00004470| 72 6d 20 2a 2e 6f 22 20 | 77 69 6c 6c 20 69 6e 76 |rm *.o" |will inv|
|00004480| 6f 6b 65 20 61 20 73 68 | 65 6c 6c 0a 61 6e 64 20 |oke a sh|ell.and |
|00004490| 72 65 6d 6f 76 65 20 61 | 6c 6c 20 66 69 6c 65 20 |remove a|ll file |
|000044a0| 65 6e 64 69 6e 67 20 69 | 6e 20 22 2e 6f 22 3b 20 |ending i|n ".o"; |
|000044b0| 22 3a 6d 6f 72 65 20 24 | 66 69 6c 65 22 20 77 69 |":more $|file" wi|
|000044c0| 6c 6c 20 69 6e 76 6f 6b | 65 20 61 20 73 68 65 6c |ll invok|e a shel|
|000044d0| 6c 0a 61 6e 64 20 64 69 | 73 70 6c 61 79 20 74 68 |l.and di|splay th|
|000044e0| 65 20 63 75 75 72 65 6e | 74 6c 79 20 73 65 6c 65 |e cuuren|tly sele|
|000044f0| 63 74 65 64 20 66 69 6c | 65 20 76 69 61 20 74 68 |cted fil|e via th|
|00004500| 65 20 6d 6f 72 65 28 31 | 29 20 63 6f 6d 6d 61 6e |e more(1|) comman|
|00004510| 64 29 2e 0a 58 0a 54 6f | 20 67 6f 20 62 61 63 6b |d)..X.To| go back|
|00004520| 20 75 70 20 6f 6e 65 20 | 6c 65 76 65 6c 20 28 69 | up one |level (i|
|00004530| 2e 65 2e 2c 20 63 64 20 | 2e 2e 29 2c 20 70 72 65 |.e., cd |..), pre|
|00004540| 73 73 20 45 53 43 41 50 | 45 2e 0a 58 0a 54 6f 20 |ss ESCAP|E..X.To |
|00004550| 65 78 69 74 20 69 6c 73 | 2c 20 70 72 65 73 73 20 |exit ils|, press |
|00004560| 63 6f 6e 74 72 6f 6c 2d | 44 2e 0a 58 0a 58 2e 53 |control-|D..X.X.S|
|00004570| 48 20 4b 45 59 42 4f 41 | 52 44 20 49 4e 50 55 54 |H KEYBOA|RD INPUT|
|00004580| 20 61 6e 64 20 53 54 52 | 49 4e 47 20 45 44 49 54 | and STR|ING EDIT|
|00004590| 49 4e 47 0a 57 68 65 6e | 20 65 6e 74 65 72 69 6e |ING.When| enterin|
|000045a0| 67 20 73 74 72 69 6e 67 | 20 66 72 6f 6d 20 74 68 |g string| from th|
|000045b0| 65 20 6b 65 79 62 6f 61 | 72 64 2c 20 74 68 65 72 |e keyboa|rd, ther|
|000045c0| 65 20 69 73 20 6f 6e 65 | 20 69 6d 70 6f 72 74 61 |e is one| importa|
|000045d0| 6e 74 0a 74 68 69 6e 67 | 20 74 6f 20 72 65 6d 65 |nt.thing| to reme|
|000045e0| 6d 62 65 72 3a 20 79 6f | 75 20 61 72 65 20 61 6c |mber: yo|u are al|
|000045f0| 77 61 79 73 20 69 6e 20 | 69 6e 73 65 72 74 20 6d |ways in |insert m|
|00004600| 6f 64 65 2e 0a 54 68 65 | 20 73 74 72 69 6e 67 20 |ode..The| string |
|00004610| 65 64 69 74 69 6e 67 20 | 72 6f 75 74 69 6e 65 73 |editing |routines|
|00004620| 20 69 6e 0a 58 2e 42 20 | 69 6c 73 0a 75 73 65 20 | in.X.B |ils.use |
|00004630| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 6b 65 |the foll|owing ke|
|00004640| 79 73 3a 0a 58 2e 54 50 | 0a 58 2e 42 49 20 45 53 |ys:.X.TP|.X.BI ES|
|00004650| 43 41 50 45 0a 41 62 6f | 72 74 20 65 64 69 74 69 |CAPE.Abo|rt editi|
|00004660| 6e 67 20 74 68 69 73 20 | 73 74 72 69 6e 67 0a 58 |ng this |string.X|
|00004670| 2e 54 50 0a 58 2e 42 49 | 20 63 6f 6e 74 72 6f 6c |.TP.X.BI| control|
|00004680| 2d 78 0a 44 65 6c 65 74 | 65 20 61 20 63 68 61 72 |-x.Delet|e a char|
|00004690| 61 63 74 65 72 0a 58 2e | 54 50 20 2e 42 49 0a 58 |acter.X.|TP .BI.X|
|000046a0| 2e 42 49 20 63 6f 6e 74 | 72 6f 6c 2d 63 0a 43 6c |.BI cont|rol-c.Cl|
|000046b0| 65 61 72 20 65 6e 74 69 | 72 65 20 73 74 72 69 6e |ear enti|re strin|
|000046c0| 67 0a 58 2e 54 50 0a 58 | 2e 42 49 20 6c 65 66 74 |g.X.TP.X|.BI left|
|000046d0| 2d 61 72 72 6f 77 0a 47 | 6f 20 6c 65 66 74 20 6f |-arrow.G|o left o|
|000046e0| 6e 65 20 63 68 61 72 61 | 63 74 65 72 20 77 69 74 |ne chara|cter wit|
|000046f0| 68 69 6e 20 74 68 65 20 | 73 74 72 69 6e 67 0a 58 |hin the |string.X|
|00004700| 2e 54 50 0a 58 2e 42 49 | 20 45 4e 54 45 52 20 28 |.TP.X.BI| ENTER (|
|00004710| 6f 72 20 52 45 54 55 52 | 4e 29 0a 54 68 65 20 66 |or RETUR|N).The f|
|00004720| 69 72 73 74 20 45 4e 54 | 45 52 20 70 75 74 73 20 |irst ENT|ER puts |
|00004730| 79 6f 75 20 61 74 20 74 | 68 65 20 65 6e 64 20 6f |you at t|he end o|
|00004740| 66 20 74 68 65 20 73 74 | 72 69 6e 67 2c 20 74 68 |f the st|ring, th|
|00004750| 65 20 73 65 63 6f 6e 64 | 20 45 4e 54 45 52 0a 77 |e second| ENTER.w|
|00004760| 69 6c 6c 20 70 61 73 73 | 20 74 68 65 20 73 74 72 |ill pass| the str|
|00004770| 69 6e 67 20 62 61 63 6b | 20 74 6f 20 69 6c 73 20 |ing back| to ils |
|00004780| 66 6f 72 20 70 72 6f 63 | 65 73 73 69 6e 67 2c 20 |for proc|essing, |
|00004790| 61 6e 64 20 74 65 72 6d | 69 6e 61 74 65 20 74 68 |and term|inate th|
|000047a0| 65 0a 73 74 72 69 6e 67 | 20 65 64 69 74 2e 20 20 |e.string| edit. |
|000047b0| 49 66 20 79 6f 75 20 61 | 72 65 20 61 6c 72 65 61 |If you a|re alrea|
|000047c0| 64 79 20 6f 6e 20 74 68 | 65 20 6c 61 73 74 20 63 |dy on th|e last c|
|000047d0| 68 61 72 61 63 74 65 72 | 20 69 6e 20 74 68 65 20 |haracter| in the |
|000047e0| 73 74 72 69 6e 67 2c 0a | 74 68 65 6e 20 74 68 65 |string,.|then the|
|000047f0| 20 66 69 72 73 74 20 70 | 72 65 73 73 20 6f 66 20 | first p|ress of |
|00004800| 45 4e 54 45 52 20 77 69 | 6c 6c 20 65 6e 74 65 72 |ENTER wi|ll enter|
|00004810| 20 74 68 65 20 73 74 72 | 69 6e 67 2e 0a 58 0a 41 | the str|ing..X.A|
|00004820| 6c 6c 20 6f 66 20 74 68 | 65 20 63 6f 6d 6d 61 6e |ll of th|e comman|
|00004830| 64 20 6b 65 79 73 20 75 | 73 65 64 20 69 6e 20 65 |d keys u|sed in e|
|00004840| 64 69 74 69 6e 67 20 63 | 61 6e 20 62 65 20 65 61 |diting c|an be ea|
|00004850| 73 69 6c 79 20 63 68 61 | 6e 67 65 64 20 62 79 20 |sily cha|nged by |
|00004860| 6d 6f 64 69 66 79 69 6e | 67 0a 74 68 65 20 66 69 |modifyin|g.the fi|
|00004870| 6c 65 20 22 69 6c 73 2e | 68 22 2c 20 74 68 65 6e |le "ils.|h", then|
|00004880| 20 72 65 2d 6d 61 6b 69 | 6e 67 20 69 6c 73 2e 20 | re-maki|ng ils. |
|00004890| 20 49 6e 20 61 20 6c 61 | 74 65 72 20 72 65 6c 65 | In a la|ter rele|
|000048a0| 61 73 65 2c 20 69 74 20 | 69 73 20 68 6f 70 65 64 |ase, it |is hoped|
|000048b0| 20 74 68 61 74 0a 65 61 | 63 68 20 75 73 65 72 20 | that.ea|ch user |
|000048c0| 63 61 6e 20 64 65 66 69 | 6e 65 20 74 68 65 69 72 |can defi|ne their|
|000048d0| 20 65 64 69 74 69 6e 67 | 20 6b 65 79 20 77 69 74 | editing| key wit|
|000048e0| 68 69 6e 20 74 68 65 69 | 72 20 22 2e 69 6c 73 22 |hin thei|r ".ils"|
|000048f0| 20 66 69 6c 65 2e 0a 58 | 0a 58 2e 53 48 20 56 41 | file..X|.X.SH VA|
|00004900| 52 49 41 42 4c 45 53 20 | 41 4e 44 20 42 55 49 4c |RIABLES |AND BUIL|
|00004910| 54 2d 49 4e 20 43 4f 4d | 4d 41 4e 44 53 0a 58 2e |T-IN COM|MANDS.X.|
|00004920| 42 20 69 6c 73 0a 68 61 | 73 20 73 65 76 65 72 61 |B ils.ha|s severa|
|00004930| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 61 6e 64 20 |l variab|les and |
|00004940| 63 6f 6d 6d 61 6e 64 73 | 20 62 75 69 6c 74 2d 69 |commands| built-i|
|00004950| 6e 3a 0a 58 2e 54 50 0a | 58 2e 42 49 20 24 66 69 |n:.X.TP.|X.BI $fi|
|00004960| 6c 65 0a 74 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |le.the n|ame of t|
|00004970| 68 65 20 66 69 6c 65 20 | 63 75 72 72 65 6e 74 6c |he file |currentl|
|00004980| 79 20 73 65 6c 65 63 74 | 65 64 0a 58 2e 54 50 0a |y select|ed.X.TP.|
|00004990| 58 2e 42 49 20 24 70 72 | 65 66 69 78 0a 74 68 65 |X.BI $pr|efix.the|
|000049a0| 20 70 72 65 66 69 78 20 | 28 61 6c 6c 20 63 68 61 | prefix |(all cha|
|000049b0| 72 61 63 74 65 72 73 20 | 75 70 20 74 6f 20 74 68 |racters |up to th|
|000049c0| 65 20 66 69 72 73 74 20 | 60 2e 27 29 20 6f 66 20 |e first |`.') of |
|000049d0| 74 68 65 0a 66 69 6c 65 | 20 63 75 72 72 65 6e 74 |the.file| current|
|000049e0| 6c 79 20 73 65 6c 65 63 | 74 65 64 0a 58 2e 54 50 |ly selec|ted.X.TP|
|000049f0| 0a 58 2e 42 49 20 24 70 | 61 74 68 0a 74 68 65 20 |.X.BI $p|ath.the |
|00004a00| 63 75 72 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 |current |director|
|00004a10| 79 20 62 65 69 6e 67 20 | 76 69 65 77 65 64 0a 58 |y being |viewed.X|
|00004a20| 2e 54 50 0a 58 2e 42 49 | 20 24 61 6c 6c 5f 66 69 |.TP.X.BI| $all_fi|
|00004a30| 6c 65 73 0a 61 6c 6c 20 | 66 69 6c 65 73 20 69 6e |les.all |files in|
|00004a40| 20 74 68 65 20 64 69 72 | 65 63 74 6f 72 79 20 62 | the dir|ectory b|
|00004a50| 65 69 6e 67 20 76 69 65 | 77 65 64 0a 58 2e 54 50 |eing vie|wed.X.TP|
|00004a60| 0a 58 2e 42 49 20 24 69 | 6e 70 75 74 28 70 72 6f |.X.BI $i|nput(pro|
|00004a70| 6d 70 74 29 0a 76 61 6c | 75 65 20 74 79 70 65 64 |mpt).val|ue typed|
|00004a80| 20 69 6e 20 66 72 6f 6d | 20 6b 65 79 62 6f 61 72 | in from| keyboar|
|00004a90| 64 20 61 66 74 65 72 20 | 75 73 65 72 20 69 73 20 |d after |user is |
|00004aa0| 70 72 6f 6d 70 74 65 64 | 20 77 69 74 68 20 74 68 |prompted| with th|
|00004ab0| 65 20 73 74 72 69 6e 67 | 0a 63 6f 6e 74 61 69 6e |e string|.contain|
|00004ac0| 65 64 20 69 6e 20 70 72 | 6f 6d 70 74 20 28 76 61 |ed in pr|ompt (va|
|00004ad0| 72 69 61 62 6c 65 20 6e | 61 6d 65 73 20 63 61 6e |riable n|ames can|
|00004ae0| 20 62 65 20 75 73 65 64 | 20 69 6e 20 63 6f 6e 74 | be used| in cont|
|00004af0| 72 75 63 74 69 6e 67 20 | 70 72 6f 6d 70 74 29 0a |ructing |prompt).|
|00004b00| 58 2e 54 50 0a 58 2e 42 | 49 20 24 45 4e 56 49 52 |X.TP.X.B|I $ENVIR|
|00004b10| 4f 4e 4d 45 4e 54 5f 56 | 41 52 49 41 42 4c 45 0a |ONMENT_V|ARIABLE.|
|00004b20| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 61 6e 79 |the valu|e of any|
|00004b30| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00004b40| 69 61 62 6c 65 20 63 61 | 6e 20 62 65 20 75 73 65 |iable ca|n be use|
|00004b50| 64 20 28 69 2e 65 2e 2c | 20 24 48 4f 4d 45 20 77 |d (i.e.,| $HOME w|
|00004b60| 69 6c 6c 0a 62 65 20 73 | 75 62 73 74 69 74 75 74 |ill.be s|ubstitut|
|00004b70| 65 64 20 77 69 74 68 20 | 74 68 65 20 76 61 6c 75 |ed with |the valu|
|00004b80| 65 20 6f 66 20 24 48 4f | 4d 45 20 69 6e 20 74 68 |e of $HO|ME in th|
|00004b90| 65 20 75 73 65 72 27 73 | 20 65 6e 76 69 72 6f 6e |e user's| environ|
|00004ba0| 6d 65 6e 74 29 2e 0a 58 | 2e 42 20 69 6c 73 0a 77 |ment)..X|.B ils.w|
|00004bb0| 69 6c 6c 20 75 73 65 20 | 69 74 27 73 20 6f 77 6e |ill use |it's own|
|00004bc0| 20 76 61 72 69 61 62 6c | 65 20 76 61 6c 75 65 73 | variabl|e values|
|00004bd0| 20 62 65 66 6f 72 65 20 | 63 68 65 63 6b 69 6e 67 | before |checking|
|00004be0| 20 66 6f 72 20 61 6e 79 | 20 65 78 69 73 74 69 6e | for any| existin|
|00004bf0| 67 0a 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 76 61 |g.enviro|nment va|
|00004c00| 72 69 61 62 6c 65 73 2e | 20 20 54 68 69 73 20 6d |riables.| This m|
|00004c10| 65 61 6e 73 20 74 68 61 | 74 20 69 73 20 74 68 65 |eans tha|t is the|
|00004c20| 20 75 73 65 72 20 77 61 | 6e 74 73 20 74 6f 0a 75 | user wa|nts to.u|
|00004c30| 73 65 20 74 68 65 20 76 | 61 6c 75 65 20 6f 66 20 |se the v|alue of |
|00004c40| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 24 66 69 |the vari|able $fi|
|00004c50| 6c 65 20 66 72 6f 6d 20 | 68 69 73 20 65 6e 76 69 |le from |his envi|
|00004c60| 72 6f 6e 6d 65 6e 74 2c | 0a 58 2e 42 20 69 6c 73 |ronment,|.X.B ils|
|00004c70| 0a 77 69 6c 6c 20 75 73 | 65 20 74 68 65 20 6e 61 |.will us|e the na|
|00004c80| 6d 65 20 6f 66 20 74 68 | 65 20 63 75 72 72 65 6e |me of th|e curren|
|00004c90| 74 20 66 69 6c 65 20 69 | 6e 73 74 65 61 64 2c 20 |t file i|nstead, |
|00004ca0| 73 69 6e 63 65 20 24 66 | 69 6c 65 20 69 73 0a 61 |since $f|ile is.a|
|00004cb0| 20 62 75 69 6c 74 2d 69 | 6e 20 76 61 72 69 61 62 | built-i|n variab|
|00004cc0| 6c 65 2e 0a 58 0a 58 2e | 53 48 20 53 41 4d 50 4c |le..X.X.|SH SAMPL|
|00004cd0| 45 20 2e 69 6c 73 20 46 | 49 4c 45 0a 58 0a 58 0a |E .ils F|ILE.X.X.|
|00004ce0| 58 2e 6e 66 0a 58 23 20 | 54 68 69 73 20 69 73 20 |X.nf.X# |This is |
|00004cf0| 61 20 73 61 6d 70 6c 65 | 20 2e 69 6c 73 20 66 69 |a sample| .ils fi|
|00004d00| 6c 65 0a 58 23 0a 63 63 | 3a 09 63 63 20 24 66 69 |le.X#.cc|:.cc $fi|
|00004d10| 6c 65 0a 58 0a 52 4d 3a | 09 72 6d 20 24 66 69 6c |le.X.RM:|.rm $fil|
|00004d20| 65 0a 58 0a 56 3a 09 76 | 69 20 24 66 69 6c 65 0a |e.X.V:.v|i $file.|
|00004d30| 58 0a 58 23 20 6d 61 6b | 65 2c 20 63 61 6e 20 63 |X.X# mak|e, can c|
|00004d40| 68 61 6e 67 65 20 64 65 | 66 61 75 6c 74 20 62 79 |hange de|fault by|
|00004d50| 20 65 6e 74 65 72 69 6e | 67 20 61 6e 20 61 6c 65 | enterin|g an ale|
|00004d60| 72 6e 61 74 69 76 65 0a | 58 23 20 28 69 2e 65 2e |rnative.|X# (i.e.|
|00004d70| 2c 20 22 6d 61 6b 65 20 | 69 6e 73 74 61 6c 6c 22 |, "make |install"|
|00004d80| 29 0a 4d 3a 09 6d 61 6b | 65 20 24 69 6e 70 75 74 |).M:.mak|e $input|
|00004d90| 28 4d 61 6b 65 20 77 68 | 61 74 20 28 52 45 54 55 |(Make wh|at (RETU|
|00004da0| 52 4e 20 69 73 20 64 65 | 66 61 75 6c 74 29 3f 20 |RN is de|fault)? |
|00004db0| 29 0a 58 0a 58 23 20 72 | 65 6e 61 6d 65 20 74 68 |).X.X# r|ename th|
|00004dc0| 65 20 66 69 6c 65 0a 6d | 76 3a 09 6d 76 20 24 66 |e file.m|v:.mv $f|
|00004dd0| 69 6c 65 20 28 52 65 6e | 61 6d 65 20 24 66 69 6c |ile (Ren|ame $fil|
|00004de0| 65 20 74 6f 3a 20 29 0a | 58 0a 58 23 20 4c 61 74 |e to: ).|X.X# Lat|
|00004df0| 65 58 20 61 20 66 69 6c | 65 20 61 6e 64 20 70 72 |eX a fil|e and pr|
|00004e00| 69 6e 74 20 69 74 0a 4c | 3a 09 6c 61 74 65 78 20 |int it.L|:.latex |
|00004e10| 24 70 72 65 66 69 78 0a | 58 09 64 76 69 6a 65 70 |$prefix.|X.dvijep|
|00004e20| 20 24 70 72 65 66 69 78 | 0a 58 09 6c 70 72 20 2d | $prefix|.X.lpr -|
|00004e30| 62 20 24 70 72 65 66 69 | 78 2e 6a 65 70 0a 58 0a |b $prefi|x.jep.X.|
|00004e40| 58 23 20 6c 6f 6f 6b 20 | 61 74 20 6d 79 20 64 65 |X# look |at my de|
|00004e50| 66 69 6e 69 74 69 6f 6e | 20 66 69 6c 65 0a 64 65 |finition| file.de|
|00004e60| 66 73 3a 09 6d 6f 72 65 | 20 24 48 4f 4d 45 2f 2e |fs:.more| $HOME/.|
|00004e70| 69 6c 73 0a 58 2e 66 69 | 0a 58 0a 58 2e 53 48 20 |ils.X.fi|.X.X.SH |
|00004e80| 52 45 4c 45 41 53 45 20 | 4e 4f 54 45 53 0a 58 0a |RELEASE |NOTES.X.|
|00004e90| 58 2e 50 50 0a 58 2e 53 | 48 20 22 41 55 54 48 4f |X.PP.X.S|H "AUTHO|
|00004ea0| 52 22 0a 4a 61 63 6b 20 | 41 6c 65 78 61 6e 64 65 |R".Jack |Alexande|
|00004eb0| 72 2c 20 28 6a 61 63 6b | 40 6a 69 6d 69 2e 63 73 |r, (jack|@jimi.cs|
|00004ec0| 2e 75 6e 6c 76 2e 65 64 | 75 29 2c 20 28 6a 61 63 |.unlv.ed|u), (jac|
|00004ed0| 6b 40 65 71 75 69 6e 6f | 78 2e 75 6e 72 2e 65 64 |k@equino|x.unr.ed|
|00004ee0| 75 29 0a 58 2e 53 48 20 | 22 42 55 47 53 22 0a 4e |u).X.SH |"BUGS".N|
|00004ef0| 6f 20 6b 6e 6f 77 6e 20 | 62 75 67 73 0a 45 4e 44 |o known |bugs.END|
|00004f00| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00004f10| 20 37 37 38 39 20 2d 6e | 65 20 60 77 63 20 2d 63 | 7789 -n|e `wc -c|
|00004f20| 20 3c 27 69 6c 73 2e 31 | 27 60 3b 20 74 68 65 6e | <'ils.1|'`; then|
|00004f30| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00004f40| 5c 22 27 69 6c 73 2e 31 | 27 5c 22 20 75 6e 70 61 |\"'ils.1|'\" unpa|
|00004f50| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00004f60| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00004f70| 66 20 27 69 6c 73 2e 31 | 27 0a 66 69 0a 69 66 20 |f 'ils.1|'.fi.if |
|00004f80| 74 65 73 74 20 2d 66 20 | 27 69 6c 73 2e 63 27 20 |test -f |'ils.c' |
|00004f90| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00004fa0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00004fb0| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00004fc0| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|00004fd0| 20 66 69 6c 65 20 5c 22 | 27 69 6c 73 2e 63 27 5c | file \"|'ils.c'\|
|00004fe0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00004ff0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00005000| 69 6c 73 2e 63 27 5c 22 | 20 5c 28 32 35 39 34 30 |ils.c'\"| \(25940|
|00005010| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00005020| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 69 6c 73 |d "s/^X/|/" >'ils|
|00005030| 2e 63 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.c' <<'E|ND_OF_FI|
|00005040| 4c 45 27 0a 58 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |LE'.X/**|********|
|00005050| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005060| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005070| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005080| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005090| 0a 58 20 2a 20 69 6c 73 | 20 2d 20 69 6e 74 65 72 |.X * ils| - inter|
|000050a0| 61 63 74 69 76 65 20 22 | 6c 73 22 20 6c 69 62 72 |active "|ls" libr|
|000050b0| 61 72 79 20 66 6f 72 20 | 61 73 63 69 69 20 74 65 |ary for |ascii te|
|000050c0| 72 6d 69 6e 61 6c 73 2e | 0a 58 20 2a 0a 58 20 2a |rminals.|.X *.X *|
|000050d0| 20 53 75 62 72 6f 75 74 | 69 6e 65 20 69 6c 73 20 | Subrout|ine ils |
|000050e0| 65 78 70 65 63 74 73 20 | 76 61 72 69 61 62 6c 65 |expects |variable|
|000050f0| 20 22 72 6f 77 73 22 2c | 20 61 6e 64 20 22 63 6f | "rows",| and "co|
|00005100| 6c 73 22 20 74 6f 20 62 | 65 20 73 65 74 20 70 72 |ls" to b|e set pr|
|00005110| 69 6f 72 20 74 6f 0a 58 | 20 2a 20 63 61 6c 6c 69 |ior to.X| * calli|
|00005120| 6e 67 2e 20 20 72 6f 77 | 73 20 73 68 6f 75 6c 64 |ng. row|s should|
|00005130| 20 63 6f 6e 74 61 69 6e | 20 74 68 65 20 76 65 72 | contain| the ver|
|00005140| 74 69 63 6c 65 20 73 69 | 7a 65 20 6f 66 20 74 68 |ticle si|ze of th|
|00005150| 65 20 77 69 6e 64 6f 77 | 20 74 6f 0a 58 20 2a 20 |e window| to.X * |
|00005160| 62 65 20 75 73 65 64 2c | 20 61 6e 64 20 63 6f 6c |be used,| and col|
|00005170| 73 20 73 68 6f 75 6c 64 | 20 63 6f 6e 74 61 69 6e |s should| contain|
|00005180| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 73 69 7a 65 | horizon|tal size|
|00005190| 20 28 69 6e 20 63 68 61 | 72 61 63 74 65 72 73 29 | (in cha|racters)|
|000051a0| 2e 0a 58 20 2a 0a 58 20 | 2a 0a 58 20 2a 20 41 75 |..X *.X |*.X * Au|
|000051b0| 74 68 6f 72 3a 20 4a 61 | 63 6b 20 41 6c 65 78 61 |thor: Ja|ck Alexa|
|000051c0| 6e 64 65 72 0a 58 20 2a | 09 20 20 20 6a 61 63 6b |nder.X *|. jack|
|000051d0| 40 6d 61 72 6c 65 79 0a | 58 20 2a 0a 58 20 2a 2f |@marley.|X *.X */|
|000051e0| 0a 58 23 69 6e 63 6c 75 | 64 65 09 22 69 6c 73 2e |.X#inclu|de."ils.|
|000051f0| 68 22 0a 58 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |h".X.X#i|nclude <|
|00005200| 63 75 72 73 65 73 2e 68 | 3e 0a 58 23 69 6e 63 6c |curses.h|>.X#incl|
|00005210| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0a 58 23 |ude <std|io.h>.X#|
|00005220| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 64 69 72 |include |<sys/dir|
|00005230| 2e 68 3e 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 66 |.h>.X#in|clude <f|
|00005240| 63 6e 74 6c 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |cntl.h>.|X#includ|
|00005250| 65 20 3c 65 72 72 6e 6f | 2e 68 3e 0a 58 0a 58 23 |e <errno|.h>.X.X#|
|00005260| 69 6e 63 6c 75 64 65 09 | 22 67 65 74 2e 68 22 09 |include.|"get.h".|
|00005270| 20 20 20 20 20 20 20 2f | 2a 20 6e 65 65 64 20 6b | /|* need k|
|00005280| 65 79 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 66 |ey defin|itions f|
|00005290| 72 6f 6d 20 67 65 74 73 | 74 72 69 6e 67 20 72 6f |rom gets|tring ro|
|000052a0| 75 74 69 6e 65 20 2a 2f | 0a 58 0a 65 78 74 65 72 |utine */|.X.exter|
|000052b0| 6e 09 63 68 61 72 09 2a | 70 6e 61 6d 3b 09 09 2f |n.char.*|pnam;../|
|000052c0| 2a 20 70 72 6f 67 72 61 | 6d 20 6e 61 6d 65 20 2a |* progra|m name *|
|000052d0| 2f 0a 58 0a 69 6e 74 09 | 61 5f 6e 75 6d 2c 20 61 |/.X.int.|a_num, a|
|000052e0| 5f 69 6e 64 3b 09 09 20 | 20 20 20 2f 2a 20 77 6f |_ind;.. | /* wo|
|000052f0| 72 6b 20 76 61 72 69 61 | 62 6c 65 73 20 66 6f 72 |rk varia|bles for|
|00005300| 20 61 72 67 75 6d 65 6e | 74 20 70 72 6f 63 65 73 | argumen|t proces|
|00005310| 73 69 6e 67 20 2a 2f 0a | 69 6e 74 09 73 79 6d 73 |sing */.|int.syms|
|00005320| 3d 30 3b 09 09 09 20 20 | 20 20 2f 2a 20 6e 75 6d |=0;... | /* num|
|00005330| 62 65 72 20 6f 66 20 73 | 79 6d 62 6f 6c 73 20 69 |ber of s|ymbols i|
|00005340| 6e 20 74 61 62 6c 65 20 | 2a 2f 0a 73 74 72 75 63 |n table |*/.struc|
|00005350| 74 09 73 79 6d 62 6f 6c | 09 2a 73 79 6d 74 61 62 |t.symbol|.*symtab|
|00005360| 5b 4d 41 58 5f 53 59 4d | 42 4f 4c 53 5d 3b 20 2f |[MAX_SYM|BOLS]; /|
|00005370| 2a 20 73 79 6d 62 6f 6c | 20 74 61 62 6c 65 20 2a |* symbol| table *|
|00005380| 2f 0a 63 68 61 72 09 2a | 61 72 67 73 5b 49 4c 53 |/.char.*|args[ILS|
|00005390| 5f 4d 41 58 5f 41 52 47 | 53 5d 3b 09 20 20 20 20 |_MAX_ARG|S];. |
|000053a0| 2f 2a 20 61 72 67 75 6d | 65 6e 74 20 6c 69 73 74 |/* argum|ent list|
|000053b0| 20 2a 2f 0a 69 6e 74 09 | 6d 6f 64 65 73 3b 09 09 | */.int.|modes;..|
|000053c0| 09 20 20 20 20 2f 2a 20 | 68 6f 6c 64 20 62 65 68 |. /* |hold beh|
|000053d0| 61 76 69 6f 72 61 6c 20 | 64 61 74 61 20 2a 2f 0a |avioral |data */.|
|000053e0| 58 0a 63 68 61 72 09 63 | 75 72 5f 70 61 74 68 5b |X.char.c|ur_path[|
|000053f0| 4d 41 58 50 41 54 48 5d | 3b 09 20 20 20 20 2f 2a |MAXPATH]|;. /*|
|00005400| 20 63 75 72 72 65 6e 74 | 20 70 61 74 68 20 2a 2f | current| path */|
|00005410| 0a 58 0a 58 0a 58 2f 2a | 20 69 6e 74 65 72 61 63 |.X.X.X/*| interac|
|00005420| 74 69 76 65 20 64 69 72 | 65 63 74 6f 72 79 20 62 |tive dir|ectory b|
|00005430| 72 6f 77 73 65 72 20 2d | 2d 20 6d 61 69 6e 20 72 |rowser -|- main r|
|00005440| 6f 75 74 69 6e 65 20 0a | 58 2a 2a 0a 58 2a 2a 20 |outine .|X**.X** |
|00005450| 76 61 72 69 61 62 6c 65 | 20 70 61 74 74 65 72 6e |variable| pattern|
|00005460| 20 69 6e 20 61 20 74 77 | 6f 20 64 69 6d 65 6e 73 | in a tw|o dimens|
|00005470| 69 6f 6e 61 6c 20 61 72 | 72 61 79 20 63 6f 6e 74 |ional ar|ray cont|
|00005480| 61 69 6e 69 6e 67 20 61 | 6c 6c 20 6f 66 20 74 68 |aining a|ll of th|
|00005490| 65 20 70 61 74 74 65 72 | 6e 73 0a 58 2a 2a 20 74 |e patter|ns.X** t|
|000054a0| 6f 20 75 73 65 20 66 6f | 72 20 70 61 74 74 65 72 |o use fo|r patter|
|000054b0| 6e 20 6d 61 74 63 68 69 | 6e 67 2e 20 20 49 66 20 |n matchi|ng. If |
|000054c0| 70 61 74 74 65 72 6e 5b | 30 5d 20 3d 3d 20 4e 55 |pattern[|0] == NU|
|000054d0| 4c 4c 2c 20 74 68 65 6e | 20 6e 6f 0a 58 2a 2a 20 |LL, then| no.X** |
|000054e0| 70 61 74 74 65 72 6e 73 | 20 61 72 65 20 75 73 65 |patterns| are use|
|000054f0| 64 2c 20 61 6e 64 20 61 | 6c 6c 20 66 69 6c 65 73 |d, and a|ll files|
|00005500| 20 61 72 65 20 73 68 6f | 77 6e 2e 0a 58 2a 2a 0a | are sho|wn..X**.|
|00005510| 58 2a 2a 20 76 61 72 69 | 61 62 6c 65 20 70 61 74 |X** vari|able pat|
|00005520| 68 20 69 73 20 61 20 73 | 74 72 69 6e 67 20 63 6f |h is a s|tring co|
|00005530| 6e 74 61 69 6e 69 6e 67 | 20 74 68 65 20 70 61 74 |ntaining| the pat|
|00005540| 68 20 6f 66 20 74 68 65 | 20 64 69 72 65 63 74 6f |h of the| directo|
|00005550| 72 79 20 66 72 6f 6d 20 | 77 68 69 63 68 0a 58 2a |ry from |which.X*|
|00005560| 2a 20 62 72 6f 77 73 69 | 6e 67 20 77 69 6c 6c 20 |* browsi|ng will |
|00005570| 62 65 67 69 6e 20 28 74 | 79 70 69 63 61 6c 6c 79 |begin (t|ypically|
|00005580| 2c 20 73 61 6d 65 20 61 | 73 20 70 77 64 28 31 29 |, same a|s pwd(1)|
|00005590| 29 2e 0a 58 2a 2a 0a 58 | 2a 2a 20 75 6c 78 2c 20 |)..X**.X|** ulx, |
|000055a0| 75 6c 79 2c 20 6c 72 78 | 2c 20 61 6e 64 20 6c 72 |uly, lrx|, and lr|
|000055b0| 79 20 61 72 65 20 74 68 | 65 20 63 6f 6f 72 64 69 |y are th|e coordi|
|000055c0| 6e 61 74 65 73 20 28 69 | 6e 20 73 63 72 65 65 6e |nates (i|n screen|
|000055d0| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 77 68 65 | coordin|ates whe|
|000055e0| 72 65 0a 58 2a 2a 20 75 | 6e 69 74 73 20 61 72 65 |re.X** u|nits are|
|000055f0| 20 63 68 61 72 61 63 74 | 65 72 73 2e 0a 58 2a 2a | charact|ers..X**|
|00005600| 0a 58 2a 2a 20 6d 20 69 | 73 20 61 6e 20 69 6e 74 |.X** m i|s an int|
|00005610| 65 67 65 72 20 77 68 69 | 63 68 20 6d 61 79 20 63 |eger whi|ch may c|
|00005620| 6f 6e 74 61 69 6e 20 61 | 6e 79 20 62 65 68 61 76 |ontain a|ny behav|
|00005630| 69 6f 72 61 6c 20 63 68 | 61 72 61 63 74 61 72 69 |ioral ch|aractari|
|00005640| 73 74 69 63 73 2e 0a 58 | 2a 2a 20 76 61 72 69 6f |stics..X|** vario|
|00005650| 75 73 20 62 69 74 73 2c | 20 61 73 20 64 65 73 63 |us bits,| as desc|
|00005660| 72 69 62 65 64 20 69 6e | 20 69 6c 73 2e 68 20 63 |ribed in| ils.h c|
|00005670| 61 6e 20 62 65 20 6f 72 | 65 64 20 69 6e 74 6f 20 |an be or|ed into |
|00005680| 74 68 69 73 20 76 61 72 | 69 61 62 6c 65 20 74 6f |this var|iable to|
|00005690| 0a 58 2a 2a 20 63 68 61 | 6e 67 65 20 74 68 65 20 |.X** cha|nge the |
|000056a0| 62 65 68 61 76 69 6f 72 | 20 6f 66 20 69 6c 73 2e |behavior| of ils.|
|000056b0| 0a 58 2a 2a 0a 58 2a 2a | 20 74 69 74 6c 65 20 69 |.X**.X**| title i|
|000056c0| 73 20 61 20 73 74 72 69 | 6e 67 20 77 68 69 63 68 |s a stri|ng which|
|000056d0| 20 69 73 20 64 69 73 70 | 6c 61 79 65 64 20 6f 6e | is disp|layed on|
|000056e0| 20 74 68 65 20 74 6f 70 | 20 6c 69 6e 65 20 6f 66 | the top| line of|
|000056f0| 20 74 68 65 20 77 69 6e | 64 6f 77 2e 20 20 49 66 | the win|dow. If|
|00005700| 0a 58 2a 2a 20 74 69 74 | 6c 65 20 69 73 20 4e 55 |.X** tit|le is NU|
|00005710| 4c 4c 2c 20 74 68 65 6e | 20 6e 6f 20 74 69 74 6c |LL, then| no titl|
|00005720| 65 20 69 73 20 73 68 6f | 77 6e 2c 20 61 6e 64 20 |e is sho|wn, and |
|00005730| 79 6f 75 20 67 65 74 20 | 61 6e 20 65 78 74 72 61 |you get |an extra|
|00005740| 20 6c 69 6e 65 20 66 6f | 72 0a 58 2a 2a 20 65 64 | line fo|r.X** ed|
|00005750| 69 74 69 6e 67 2e 0a 58 | 2a 2a 2f 0a 69 6c 73 28 |iting..X|**/.ils(|
|00005760| 70 61 74 74 65 72 6e 2c | 70 61 74 68 2c 75 6c 78 |pattern,|path,ulx|
|00005770| 2c 75 6c 79 2c 6c 72 78 | 2c 6c 72 79 2c 6d 2c 74 |,uly,lrx|,lry,m,t|
|00005780| 69 74 6c 65 29 0a 63 68 | 61 72 09 2a 70 61 74 74 |itle).ch|ar.*patt|
|00005790| 65 72 6e 5b 5d 2c 2a 70 | 61 74 68 2c 2a 74 69 74 |ern[],*p|ath,*tit|
|000057a0| 6c 65 3b 0a 69 6e 74 09 | 75 6c 78 2c 20 75 6c 79 |le;.int.|ulx, uly|
|000057b0| 2c 20 6c 72 78 2c 20 6c | 72 79 2c 20 6d 3b 0a 58 |, lrx, l|ry, m;.X|
|000057c0| 7b 0a 58 09 73 74 72 75 | 63 74 09 64 5f 65 6e 74 |{.X.stru|ct.d_ent|
|000057d0| 72 79 09 2a 74 6f 70 3b | 09 2f 2a 20 74 68 65 20 |ry.*top;|./* the |
|000057e0| 76 65 72 79 20 74 6f 70 | 20 6f 66 20 74 68 65 20 |very top| of the |
|000057f0| 6b 6e 6f 77 6e 20 64 69 | 72 65 63 74 6f 72 79 20 |known di|rectory |
|00005800| 74 72 65 65 20 2a 2f 0a | 58 0a 58 09 6d 6f 64 65 |tree */.|X.X.mode|
|00005810| 73 20 3d 20 6d 3b 09 09 | 2f 2a 20 6d 61 6b 65 73 |s = m;..|/* makes|
|00005820| 20 75 73 65 72 20 64 65 | 66 69 6e 65 64 20 6d 6f | user de|fined mo|
|00005830| 64 65 73 20 67 6c 6f 62 | 61 6c 20 2a 2f 0a 58 09 |des glob|al */.X.|
|00005840| 74 6f 70 20 3d 20 28 73 | 74 72 75 63 74 20 64 5f |top = (s|truct d_|
|00005850| 65 6e 74 72 79 20 2a 29 | 20 4e 55 4c 4c 3b 09 2f |entry *)| NULL;./|
|00005860| 2a 20 68 61 76 65 6e 27 | 74 20 72 65 61 64 20 61 |* haven'|t read a|
|00005870| 6e 79 20 64 69 72 65 63 | 74 6f 72 69 65 73 20 79 |ny direc|tories y|
|00005880| 65 74 20 2a 2f 0a 58 09 | 63 6c 65 61 72 28 29 3b |et */.X.|clear();|
|00005890| 0a 58 09 72 65 61 64 5f | 69 6c 73 5f 64 65 66 69 |.X.read_|ils_defi|
|000058a0| 6e 65 73 28 29 3b 09 2f | 2a 20 72 65 61 64 20 74 |nes();./|* read t|
|000058b0| 68 69 73 20 75 73 65 72 | 27 73 20 64 65 66 69 6e |his user|'s defin|
|000058c0| 69 74 69 6f 6e 73 20 2a | 2f 0a 58 09 72 65 61 64 |itions *|/.X.read|
|000058d0| 5f 64 69 72 65 63 74 6f | 72 79 28 70 61 74 74 65 |_directo|ry(patte|
|000058e0| 72 6e 2c 70 61 74 68 2c | 26 74 6f 70 29 3b 20 2f |rn,path,|&top); /|
|000058f0| 2a 20 72 65 61 64 20 69 | 6e 20 63 75 72 72 65 6e |* read i|n curren|
|00005900| 74 20 64 69 72 65 63 74 | 6f 72 79 20 2a 2f 0a 58 |t direct|ory */.X|
|00005910| 09 65 64 69 74 5f 64 69 | 72 65 63 74 6f 72 79 28 |.edit_di|rectory(|
|00005920| 70 61 74 74 65 72 6e 2c | 70 61 74 68 2c 26 74 6f |pattern,|path,&to|
|00005930| 70 2c 75 6c 78 2c 75 6c | 79 2c 6c 72 78 2c 6c 72 |p,ulx,ul|y,lrx,lr|
|00005940| 79 2c 74 69 74 6c 65 29 | 3b 20 2f 2a 20 64 6f 20 |y,title)|; /* do |
|00005950| 69 74 20 2a 2f 0a 58 7d | 0a 58 0a 58 2f 2a 20 72 |it */.X}|.X.X/* r|
|00005960| 65 61 64 5f 69 6c 73 5f | 64 65 66 69 6e 65 73 28 |ead_ils_|defines(|
|00005970| 29 20 6c 6f 6f 6b 73 20 | 61 6e 64 20 74 68 65 20 |) looks |and the |
|00005980| 22 2e 69 6c 73 22 20 66 | 69 6c 65 20 66 6f 72 20 |".ils" f|ile for |
|00005990| 74 68 65 20 75 73 65 72 | 2e 20 20 54 68 69 73 20 |the user|. This |
|000059a0| 66 69 6c 65 0a 58 20 20 | 20 63 6f 6e 74 61 69 6e |file.X | contain|
|000059b0| 73 20 61 6c 6c 20 75 73 | 65 72 2d 73 70 65 63 69 |s all us|er-speci|
|000059c0| 66 69 63 20 6b 65 79 20 | 73 65 71 75 65 6e 63 65 |fic key |sequence|
|000059d0| 73 20 61 6e 64 20 63 6f | 72 72 65 73 70 6f 64 69 |s and co|rrespodi|
|000059e0| 6e 67 20 61 63 74 69 6f | 6e 73 20 66 6f 72 0a 58 |ng actio|ns for.X|
|000059f0| 20 20 20 74 68 65 20 6b | 65 79 20 73 65 71 75 65 | the k|ey seque|
|00005a00| 6e 63 65 73 2e 20 2a 2f | 0a 72 65 61 64 5f 69 6c |nces. */|.read_il|
|00005a10| 73 5f 64 65 66 69 6e 65 | 73 28 29 0a 58 7b 0a 58 |s_define|s().X{.X|
|00005a20| 09 63 68 61 72 09 2a 67 | 65 74 65 6e 76 28 29 2c |.char.*g|etenv(),|
|00005a30| 20 2a 61 2c 20 64 75 6d | 6d 79 5b 4d 41 58 50 41 | *a, dum|my[MAXPA|
|00005a40| 54 48 5d 3b 0a 58 09 46 | 49 4c 45 09 2a 66 6f 70 |TH];.X.F|ILE.*fop|
|00005a50| 65 6e 28 29 2c 20 2a 66 | 70 3b 0a 58 09 69 6e 74 |en(), *f|p;.X.int|
|00005a60| 09 6c 6e 75 6d 3d 30 3b | 0a 58 0a 58 09 61 3d 67 |.lnum=0;|.X.X.a=g|
|00005a70| 65 74 65 6e 76 28 22 48 | 4f 4d 45 22 29 3b 09 09 |etenv("H|OME");..|
|00005a80| 2f 2a 20 67 65 74 20 70 | 61 74 68 20 74 6f 20 75 |/* get p|ath to u|
|00005a90| 73 65 72 27 73 20 68 6f | 6d 65 20 64 69 72 65 63 |ser's ho|me direc|
|00005aa0| 74 6f 72 79 20 2a 2f 0a | 58 09 73 70 72 69 6e 74 |tory */.|X.sprint|
|00005ab0| 66 28 64 75 6d 6d 79 2c | 22 25 73 2f 2e 69 6c 73 |f(dummy,|"%s/.ils|
|00005ac0| 22 2c 61 29 3b 09 2f 2a | 20 73 65 74 20 75 70 20 |",a);./*| set up |
|00005ad0| 70 61 74 68 20 74 6f 20 | 74 68 65 20 2e 69 6c 73 |path to |the .ils|
|00005ae0| 20 66 69 6c 65 20 2a 2f | 0a 58 09 69 66 28 28 66 | file */|.X.if((f|
|00005af0| 70 3d 66 6f 70 65 6e 28 | 64 75 6d 6d 79 2c 22 72 |p=fopen(|dummy,"r|
|00005b00| 22 29 29 3d 3d 4e 55 4c | 4c 29 0a 58 09 09 72 65 |"))==NUL|L).X..re|
|00005b10| 74 75 72 6e 3b 09 09 09 | 2f 2a 20 6e 6f 20 22 2e |turn;...|/* no ".|
|00005b20| 69 6c 73 22 20 66 69 6c | 65 20 69 6e 20 68 6f 6d |ils" fil|e in hom|
|00005b30| 65 20 64 69 72 65 63 74 | 6f 72 79 20 2a 2f 0a 58 |e direct|ory */.X|
|00005b40| 09 77 68 69 6c 65 28 66 | 67 65 74 73 28 64 75 6d |.while(f|gets(dum|
|00005b50| 6d 79 2c 4d 41 58 50 41 | 54 48 2c 66 70 29 21 3d |my,MAXPA|TH,fp)!=|
|00005b60| 4e 55 4c 4c 29 20 7b 0a | 58 09 09 6c 6e 75 6d 2b |NULL) {.|X..lnum+|
|00005b70| 2b 3b 09 09 09 2f 2a 20 | 6c 69 6e 65 20 6e 75 6d |+;.../* |line num|
|00005b80| 62 65 72 20 63 6f 75 6e | 74 65 72 20 2a 2f 0a 58 |ber coun|ter */.X|
|00005b90| 09 09 69 66 28 64 75 6d | 6d 79 5b 30 5d 3d 3d 27 |..if(dum|my[0]=='|
|00005ba0| 23 27 29 0a 58 09 09 09 | 63 6f 6e 74 69 6e 75 65 |#').X...|continue|
|00005bb0| 3b 09 2f 2a 20 61 20 63 | 6f 6d 6d 65 6e 74 20 6c |;./* a c|omment l|
|00005bc0| 69 6e 65 20 2a 2f 0a 58 | 09 09 70 61 72 73 65 5f |ine */.X|..parse_|
|00005bd0| 6c 69 6e 65 28 64 75 6d | 6d 79 2c 6c 6e 75 6d 29 |line(dum|my,lnum)|
|00005be0| 3b 20 2f 2a 20 65 6e 74 | 65 72 20 69 6e 74 6f 20 |; /* ent|er into |
|00005bf0| 73 79 6d 62 6f 6c 20 74 | 61 62 6c 65 20 2a 2f 0a |symbol t|able */.|
|00005c00| 58 09 7d 0a 58 09 66 63 | 6c 6f 73 65 28 66 70 29 |X.}.X.fc|lose(fp)|
|00005c10| 3b 0a 58 7d 0a 58 0a 58 | 23 69 66 64 65 66 20 42 |;.X}.X.X|#ifdef B|
|00005c20| 53 44 0a 58 2f 2a 2a 2a | 2a 2a 2a 0a 58 20 2a 20 |SD.X/***|***.X * |
|00005c30| 42 65 72 6b 65 6c 65 79 | 20 55 4e 49 58 20 76 65 |Berkeley| UNIX ve|
|00005c40| 72 73 69 6f 6e 2e 20 72 | 65 61 64 20 64 69 72 65 |rsion. r|ead dire|
|00005c50| 63 74 6f 72 79 20 72 65 | 61 64 73 20 61 6c 6c 20 |ctory re|ads all |
|00005c60| 66 69 6c 65 73 20 69 6e | 20 74 68 65 20 63 75 72 |files in| the cur|
|00005c70| 72 65 6e 74 0a 58 20 2a | 20 64 69 72 65 63 74 6f |rent.X *| directo|
|00005c80| 72 79 2e 0a 58 20 2a 2f | 0a 72 65 61 64 5f 64 69 |ry..X */|.read_di|
|00005c90| 72 65 63 74 6f 72 79 28 | 70 61 74 74 65 72 6e 2c |rectory(|pattern,|
|00005ca0| 70 61 74 68 2c 64 70 74 | 72 29 0a 63 68 61 72 09 |path,dpt|r).char.|
|00005cb0| 2a 70 61 74 74 65 72 6e | 5b 5d 2c 70 61 74 68 5b |*pattern|[],path[|
|00005cc0| 5d 3b 0a 73 74 72 75 63 | 74 09 64 5f 65 6e 74 72 |];.struc|t.d_entr|
|00005cd0| 79 09 2a 2a 64 70 74 72 | 3b 0a 58 7b 0a 58 09 44 |y.**dptr|;.X{.X.D|
|00005ce0| 49 52 09 2a 64 70 2c 20 | 2a 6f 70 65 6e 64 69 72 |IR.*dp, |*opendir|
|00005cf0| 28 29 3b 0a 58 09 73 74 | 72 75 63 74 09 64 69 72 |();.X.st|ruct.dir|
|00005d00| 65 63 74 09 2a 64 69 72 | 70 74 72 2c 20 2a 72 65 |ect.*dir|ptr, *re|
|00005d10| 61 64 64 69 72 28 29 3b | 0a 58 0a 58 09 69 66 28 |addir();|.X.X.if(|
|00005d20| 63 68 64 69 72 28 70 61 | 74 68 29 3c 30 29 0a 58 |chdir(pa|th)<0).X|
|00005d30| 09 09 72 65 74 75 72 6e | 3b 09 09 2f 2a 20 63 61 |..return|;../* ca|
|00005d40| 6e 27 74 20 63 68 61 6e | 67 65 20 74 6f 20 64 65 |n't chan|ge to de|
|00005d50| 73 69 72 65 64 20 64 69 | 72 65 63 74 6f 72 79 20 |sired di|rectory |
|00005d60| 2a 2f 0a 58 09 69 66 28 | 28 64 70 3d 6f 70 65 6e |*/.X.if(|(dp=open|
|00005d70| 64 69 72 28 22 2e 22 29 | 29 3d 3d 4e 55 4c 4c 29 |dir(".")|)==NULL)|
|00005d80| 0a 58 09 09 72 65 74 75 | 72 6e 3b 09 09 2f 2a 20 |.X..retu|rn;../* |
|00005d90| 63 61 6e 27 74 20 6f 70 | 65 6e 20 74 68 65 20 64 |can't op|en the d|
|00005da0| 69 72 65 63 74 6f 72 79 | 20 66 69 6c 65 20 69 74 |irectory| file it|
|00005db0| 73 65 6c 66 20 2a 2f 0a | 58 09 77 68 69 6c 65 28 |self */.|X.while(|
|00005dc0| 28 64 69 72 70 74 72 3d | 72 65 61 64 64 69 72 28 |(dirptr=|readdir(|
|00005dd0| 64 70 29 29 21 3d 4e 55 | 4c 4c 29 09 2f 2a 20 65 |dp))!=NU|LL)./* e|
|00005de0| 6e 64 20 6f 66 20 64 69 | 72 65 63 74 6f 72 79 20 |nd of di|rectory |
|00005df0| 2a 2f 0a 58 09 09 61 64 | 64 5f 65 6e 74 72 79 28 |*/.X..ad|d_entry(|
|00005e00| 70 61 74 74 65 72 6e 2c | 64 69 72 70 74 72 2d 3e |pattern,|dirptr->|
|00005e10| 64 5f 66 69 6c 65 6e 6f | 2c 64 69 72 70 74 72 2d |d_fileno|,dirptr-|
|00005e20| 3e 64 5f 6e 61 6d 65 2c | 64 70 74 72 29 3b 0a 58 |>d_name,|dptr);.X|
|00005e30| 09 63 6c 6f 73 65 64 69 | 72 28 64 70 29 3b 0a 58 |.closedi|r(dp);.X|
|00005e40| 7d 0a 58 23 65 6e 64 69 | 66 20 42 53 44 0a 58 0a |}.X#endi|f BSD.X.|
|00005e50| 58 23 69 66 64 65 66 20 | 53 59 53 54 45 4d 56 0a |X#ifdef |SYSTEMV.|
|00005e60| 58 2f 2a 20 53 59 53 54 | 45 4d 20 56 20 55 6e 69 |X/* SYST|EM V Uni|
|00005e70| 78 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 65 |x versio|n of the|
|00005e80| 20 72 65 61 64 5f 64 69 | 72 65 63 74 6f 72 79 20 | read_di|rectory |
|00005e90| 72 6f 75 74 69 6e 65 2e | 09 2a 2f 0a 72 65 61 64 |routine.|.*/.read|
|00005ea0| 5f 64 69 72 65 63 74 6f | 72 79 28 70 61 74 74 65 |_directo|ry(patte|
|00005eb0| 72 6e 2c 70 61 74 68 2c | 64 70 74 72 29 0a 63 68 |rn,path,|dptr).ch|
|00005ec0| 61 72 09 2a 70 61 74 74 | 65 72 6e 5b 5d 2c 70 61 |ar.*patt|ern[],pa|
|00005ed0| 74 68 5b 5d 3b 0a 73 74 | 72 75 63 74 09 64 5f 65 |th[];.st|ruct.d_e|
|00005ee0| 6e 74 72 79 09 2a 2a 64 | 70 74 72 3b 0a 58 7b 0a |ntry.**d|ptr;.X{.|
|00005ef0| 58 09 73 74 72 75 63 74 | 09 64 69 72 65 63 74 09 |X.struct|.direct.|
|00005f00| 64 3b 0a 58 09 69 6e 74 | 09 66 64 3b 0a 58 0a 58 |d;.X.int|.fd;.X.X|
|00005f10| 09 69 66 28 63 68 64 69 | 72 28 70 61 74 68 29 3c |.if(chdi|r(path)<|
|00005f20| 30 29 09 2f 2a 20 63 61 | 6e 27 74 20 63 68 61 6e |0)./* ca|n't chan|
|00005f30| 67 65 20 74 6f 20 74 68 | 65 20 64 65 73 69 72 65 |ge to th|e desire|
|00005f40| 64 20 64 69 72 65 63 74 | 6f 72 79 20 2a 2f 0a 58 |d direct|ory */.X|
|00005f50| 09 09 72 65 74 75 72 6e | 3b 0a 58 09 69 66 28 28 |..return|;.X.if((|
|00005f60| 66 64 3d 6f 70 65 6e 28 | 22 2e 22 2c 4f 5f 52 44 |fd=open(|".",O_RD|
|00005f70| 4f 4e 4c 59 29 29 3c 30 | 29 09 2f 2a 20 63 61 6e |ONLY))<0|)./* can|
|00005f80| 27 74 20 6f 70 65 6e 20 | 74 68 65 20 64 69 72 65 |'t open |the dire|
|00005f90| 63 74 6f 72 79 20 66 69 | 6c 65 20 2a 2f 0a 58 09 |ctory fi|le */.X.|
|00005fa0| 09 72 65 74 75 72 6e 3b | 0a 58 09 77 68 69 6c 65 |.return;|.X.while|
|00005fb0| 28 72 65 61 64 28 66 64 | 2c 26 64 2c 73 69 7a 65 |(read(fd|,&d,size|
|00005fc0| 6f 66 28 73 74 72 75 63 | 74 20 64 69 72 65 63 74 |of(struc|t direct|
|00005fd0| 29 29 20 3d 3d 20 73 69 | 7a 65 6f 66 28 73 74 72 |)) == si|zeof(str|
|00005fe0| 75 63 74 20 64 69 72 65 | 63 74 29 29 0a 58 09 09 |uct dire|ct)).X..|
|00005ff0| 61 64 64 5f 65 6e 74 72 | 79 28 70 61 74 74 65 72 |add_entr|y(patter|
|00006000| 6e 2c 64 2e 64 5f 69 6e | 6f 2c 64 2e 64 5f 6e 61 |n,d.d_in|o,d.d_na|
|00006010| 6d 65 2c 64 70 74 72 29 | 3b 20 2f 2a 20 61 64 64 |me,dptr)|; /* add|
|00006020| 20 66 69 6c 65 20 2a 2f | 0a 58 09 63 6c 6f 73 65 | file */|.X.close|
|00006030| 28 66 64 29 3b 0a 58 7d | 0a 58 23 65 6e 64 69 66 |(fd);.X}|.X#endif|
|00006040| 20 53 59 53 54 45 4d 56 | 0a 58 0a 58 2f 2a 20 73 | SYSTEMV|.X.X/* s|
|00006050| 68 6f 77 70 61 74 68 20 | 64 69 73 70 6c 61 79 73 |howpath |displays|
|00006060| 20 74 68 65 20 73 74 72 | 69 6e 67 20 69 6e 20 22 | the str|ing in "|
|00006070| 70 61 74 68 22 20 6f 6e | 20 74 68 65 20 74 6f 70 |path" on| the top|
|00006080| 20 6c 69 6e 65 20 6f 66 | 20 74 68 65 20 77 69 6e | line of| the win|
|00006090| 64 6f 77 2e 0a 58 20 20 | 20 54 68 65 20 74 6f 70 |dow..X | The top|
|000060a0| 20 6c 69 6e 65 20 69 73 | 20 64 65 66 69 6e 65 64 | line is| defined|
|000060b0| 20 69 6e 20 75 6c 78 2c | 20 69 6c 79 2e 20 20 4f | in ulx,| ily. O|
|000060c0| 6e 6c 79 20 61 73 20 6d | 75 63 68 20 6f 66 20 74 |nly as m|uch of t|
|000060d0| 68 65 20 70 61 74 68 20 | 61 73 0a 58 20 20 20 63 |he path |as.X c|
|000060e0| 61 6e 20 62 65 20 73 65 | 65 6e 20 69 73 20 64 69 |an be se|en is di|
|000060f0| 73 70 6c 61 79 65 64 2c | 20 74 68 65 20 72 65 73 |splayed,| the res|
|00006100| 74 20 69 73 20 63 75 73 | 74 20 6f 75 74 2e 20 2a |t is cus|t out. *|
|00006110| 2f 0a 73 68 6f 77 70 61 | 74 68 28 70 61 74 68 2c |/.showpa|th(path,|
|00006120| 75 6c 78 2c 20 75 6c 79 | 2c 20 6c 72 78 2c 20 6c |ulx, uly|, lrx, l|
|00006130| 72 79 29 0a 63 68 61 72 | 09 70 61 74 68 5b 5d 3b |ry).char|.path[];|
|00006140| 0a 69 6e 74 09 75 6c 78 | 2c 20 75 6c 79 2c 20 6c |.int.ulx|, uly, l|
|00006150| 72 78 2c 20 6c 72 79 3b | 0a 58 7b 0a 58 09 69 6e |rx, lry;|.X{.X.in|
|00006160| 74 09 6c 3b 0a 58 09 63 | 68 61 72 09 64 75 6d 6d |t.l;.X.c|har.dumm|
|00006170| 79 5b 38 30 5d 3b 0a 58 | 0a 58 09 73 74 61 6e 64 |y[80];.X|.X.stand|
|00006180| 6f 75 74 28 29 3b 09 2f | 2a 20 69 6e 76 65 72 74 |out();./|* invert|
|00006190| 20 74 68 65 20 6c 69 6e | 65 20 2a 2f 0a 58 09 6d | the lin|e */.X.m|
|000061a0| 6f 76 65 28 75 6c 79 2c | 75 6c 78 29 3b 09 2f 2a |ove(uly,|ulx);./*|
|000061b0| 20 6d 6f 76 65 20 74 6f | 20 74 6f 70 20 6c 69 6e | move to| top lin|
|000061c0| 65 20 6f 66 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |e of the| window |
|000061d0| 2a 2f 0a 58 09 69 66 28 | 28 6c 3d 73 74 72 6c 65 |*/.X.if(|(l=strle|
|000061e0| 6e 28 70 61 74 68 29 29 | 3e 28 6c 72 78 2d 75 6c |n(path))|>(lrx-ul|
|000061f0| 79 2d 31 29 29 20 7b 09 | 2f 2a 20 69 73 20 73 74 |y-1)) {.|/* is st|
|00006200| 72 69 6e 67 20 74 6f 6f | 20 6c 6f 6e 67 3f 20 2a |ring too| long? *|
|00006210| 2f 0a 58 09 09 2f 2a 20 | 69 66 20 73 74 72 69 6e |/.X../* |if strin|
|00006220| 67 20 69 73 20 74 6f 6f | 20 6c 6f 6e 67 2c 20 74 |g is too| long, t|
|00006230| 72 75 6e 63 61 74 65 20 | 69 74 2e 20 20 70 72 65 |runcate |it. pre|
|00006240| 63 65 65 64 20 61 6c 6c | 20 74 72 75 6e 63 61 74 |ceed all| truncat|
|00006250| 65 64 0a 58 09 09 20 20 | 20 70 61 74 68 73 20 77 |ed.X.. | paths w|
|00006260| 69 74 68 20 22 2e 2e 2e | 22 20 74 6f 20 73 68 6f |ith "...|" to sho|
|00006270| 77 20 75 73 65 72 20 74 | 68 61 74 20 74 68 65 20 |w user t|hat the |
|00006280| 70 61 74 68 20 77 61 73 | 20 69 6e 64 65 65 64 0a |path was| indeed.|
|00006290| 58 09 09 20 20 20 74 72 | 75 6e 63 61 74 65 64 2e |X.. tr|uncated.|
|000062a0| 20 2a 2f 0a 58 09 09 73 | 70 72 69 6e 74 66 28 64 | */.X..s|printf(d|
|000062b0| 75 6d 6d 79 2c 22 2e 2e | 2e 25 63 25 64 2e 25 64 |ummy,"..|.%c%d.%d|
|000062c0| 73 22 2c 27 25 27 2c 28 | 6c 72 78 2d 75 6c 78 2d |s",'%',(|lrx-ulx-|
|000062d0| 33 29 2c 28 6c 72 78 2d | 75 6c 78 2d 33 29 29 3b |3),(lrx-|ulx-3));|
|000062e0| 0a 58 09 09 70 72 69 6e | 74 77 28 64 75 6d 6d 79 |.X..prin|tw(dummy|
|000062f0| 2c 70 61 74 68 2b 28 6c | 2d 28 6c 72 78 2d 75 6c |,path+(l|-(lrx-ul|
|00006300| 78 2d 33 29 29 29 3b 09 | 2f 2a 20 70 72 69 6e 74 |x-3)));.|/* print|
|00006310| 20 70 61 74 68 20 2a 2f | 0a 58 09 7d 0a 58 09 65 | path */|.X.}.X.e|
|00006320| 6c 73 65 09 2f 2a 20 73 | 74 72 69 6e 67 20 69 73 |lse./* s|tring is|
|00006330| 20 6e 6f 74 20 74 6f 6f | 20 6c 6f 6e 67 2c 20 6a | not too| long, j|
|00006340| 75 73 74 20 70 72 69 6e | 74 20 69 74 20 2a 2f 0a |ust prin|t it */.|
|00006350| 58 09 09 70 72 69 6e 74 | 77 28 70 61 74 68 29 3b |X..print|w(path);|
|00006360| 0a 58 09 73 74 61 6e 64 | 65 6e 64 28 29 3b 20 20 |.X.stand|end(); |
|00006370| 20 2f 2a 20 65 6e 64 20 | 69 6e 76 65 72 74 65 64 | /* end |inverted|
|00006380| 20 6d 6f 64 65 20 2a 2f | 0a 58 09 63 6c 72 74 6f | mode */|.X.clrto|
|00006390| 65 6f 6c 28 29 3b 20 20 | 20 2f 2a 20 67 65 74 20 |eol(); | /* get |
|000063a0| 72 69 64 20 6f 66 20 73 | 74 61 6e 64 65 6e 64 20 |rid of s|tandend |
|000063b0| 63 68 61 72 20 6f 6e 20 | 73 6f 6d 65 20 74 79 70 |char on |some typ|
|000063c0| 65 73 20 6f 66 20 74 65 | 72 6d 69 6e 61 6c 73 20 |es of te|rminals |
|000063d0| 2a 2f 0a 58 7d 0a 58 0a | 58 2f 2a 20 64 69 73 70 |*/.X}.X.|X/* disp|
|000063e0| 6c 61 79 20 61 6e 20 65 | 72 72 6f 72 20 6d 65 73 |lay an e|rror mes|
|000063f0| 73 61 67 65 20 6f 6e 20 | 74 68 65 20 74 6f 70 20 |sage on |the top |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.