home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: part04
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 30 38 69 30 31 |Subject:| v08i01|
|00000010| 31 3a 20 20 41 20 4d 69 | 63 72 6f 2d 45 6d 61 63 |1: A Mi|cro-Emac|
|00000020| 73 20 76 61 72 69 61 6e | 74 20 74 68 61 74 20 72 |s varian|t that r|
|00000030| 65 73 65 6d 62 6c 65 73 | 20 47 4e 55 20 45 6d 61 |esembles| GNU Ema|
|00000040| 63 73 0a 4e 65 77 73 67 | 72 6f 75 70 73 3a 20 6d |cs.Newsg|roups: m|
|00000050| 6f 64 2e 73 6f 75 72 63 | 65 73 0a 41 70 70 72 6f |od.sourc|es.Appro|
|00000060| 76 65 64 3a 20 6d 69 72 | 72 6f 72 21 72 73 0a 0a |ved: mir|ror!rs..|
|00000070| 53 75 62 6d 69 74 74 65 | 64 20 62 79 3a 20 42 6f |Submitte|d by: Bo|
|00000080| 62 20 4c 61 72 73 6f 6e | 20 3c 73 65 69 73 6d 6f |b Larson| <seismo|
|00000090| 21 75 73 63 2d 6f 62 65 | 72 6f 6e 21 62 6c 61 72 |!usc-obe|ron!blar|
|000000a0| 73 6f 6e 3e 0a 4d 6f 64 | 2e 73 6f 75 72 63 65 73 |son>.Mod|.sources|
|000000b0| 3a 20 56 6f 6c 75 6d 65 | 20 38 2c 20 49 73 73 75 |: Volume| 8, Issu|
|000000c0| 65 20 31 31 0a 41 72 63 | 68 69 76 65 2d 6e 61 6d |e 11.Arc|hive-nam|
|000000d0| 65 3a 20 6d 69 63 72 6f | 67 6e 75 2f 50 61 72 74 |e: micro|gnu/Part|
|000000e0| 30 34 0a 0a 0a 23 21 20 | 2f 62 69 6e 2f 73 68 0a |04...#! |/bin/sh.|
|000000f0| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|00000100| 6c 20 61 72 63 68 69 76 | 65 2c 20 6d 65 61 6e 69 |l archiv|e, meani|
|00000110| 6e 67 3a 0a 23 20 31 2e | 20 52 65 6d 6f 76 65 20 |ng:.# 1.| Remove |
|00000120| 65 76 65 72 79 74 68 69 | 6e 67 20 61 62 6f 76 65 |everythi|ng above|
|00000130| 20 74 68 65 20 23 21 20 | 2f 62 69 6e 2f 73 68 20 | the #! |/bin/sh |
|00000140| 6c 69 6e 65 2e 0a 23 20 | 32 2e 20 53 61 76 65 20 |line..# |2. Save |
|00000150| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 74 65 |the resu|lting te|
|00000160| 78 74 20 69 6e 20 61 20 | 66 69 6c 65 2e 0a 23 20 |xt in a |file..# |
|00000170| 33 2e 20 45 78 65 63 75 | 74 65 20 74 68 65 20 66 |3. Execu|te the f|
|00000180| 69 6c 65 20 77 69 74 68 | 20 2f 62 69 6e 2f 73 68 |ile with| /bin/sh|
|00000190| 20 28 6e 6f 74 20 63 73 | 68 29 20 74 6f 20 63 72 | (not cs|h) to cr|
|000001a0| 65 61 74 65 20 74 68 65 | 20 66 69 6c 65 73 3a 0a |eate the| files:.|
|000001b0| 23 09 73 65 61 72 63 68 | 2e 63 0a 23 09 73 79 6d |#.search|.c.#.sym|
|000001c0| 62 6f 6c 2e 63 0a 23 09 | 77 69 6e 64 6f 77 2e 63 |bol.c.#.|window.c|
|000001d0| 0a 23 09 74 74 79 2f 74 | 65 72 6d 63 61 70 2f 74 |.#.tty/t|ermcap/t|
|000001e0| 74 79 2e 63 0a 23 09 74 | 74 79 2f 74 65 72 6d 63 |ty.c.#.t|ty/termc|
|000001f0| 61 70 2f 72 65 61 64 6d | 65 0a 23 09 74 74 79 2f |ap/readm|e.#.tty/|
|00000200| 74 65 72 6d 63 61 70 2f | 74 74 79 64 65 66 2e 68 |termcap/|ttydef.h|
|00000210| 0a 23 20 54 68 69 73 20 | 61 72 63 68 69 76 65 20 |.# This |archive |
|00000220| 63 72 65 61 74 65 64 3a | 20 53 61 74 20 4e 6f 76 |created:| Sat Nov|
|00000230| 20 31 35 20 31 35 3a 30 | 36 3a 35 30 20 31 39 38 | 15 15:0|6:50 198|
|00000240| 36 0a 65 78 70 6f 72 74 | 20 50 41 54 48 3b 20 50 |6.export| PATH; P|
|00000250| 41 54 48 3d 2f 62 69 6e | 3a 24 50 41 54 48 0a 69 |ATH=/bin|:$PATH.i|
|00000260| 66 20 74 65 73 74 20 21 | 20 2d 64 20 73 79 73 0a |f test !| -d sys.|
|00000270| 74 68 65 6e 0a 6d 6b 64 | 69 72 20 73 79 73 0a 66 |then.mkd|ir sys.f|
|00000280| 69 0a 69 66 20 74 65 73 | 74 20 21 20 2d 64 20 74 |i.if tes|t ! -d t|
|00000290| 74 79 0a 74 68 65 6e 0a | 6d 6b 64 69 72 20 74 74 |ty.then.|mkdir tt|
|000002a0| 79 0a 66 69 0a 69 66 20 | 74 65 73 74 20 21 20 2d |y.fi.if |test ! -|
|000002b0| 64 20 74 74 79 2f 74 65 | 72 6d 63 61 70 0a 74 68 |d tty/te|rmcap.th|
|000002c0| 65 6e 0a 6d 6b 64 69 72 | 20 74 74 79 2f 74 65 72 |en.mkdir| tty/ter|
|000002d0| 6d 63 61 70 0a 66 69 0a | 69 66 20 74 65 73 74 20 |mcap.fi.|if test |
|000002e0| 2d 66 20 27 73 65 61 72 | 63 68 2e 63 27 0a 74 68 |-f 'sear|ch.c'.th|
|000002f0| 65 6e 0a 09 65 63 68 6f | 20 73 68 61 72 3a 20 77 |en..echo| shar: w|
|00000300| 69 6c 6c 20 6e 6f 74 20 | 6f 76 65 72 2d 77 72 69 |ill not |over-wri|
|00000310| 74 65 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |te exist|ing file|
|00000320| 20 22 27 73 65 61 72 63 | 68 2e 63 27 22 0a 65 6c | "'searc|h.c'".el|
|00000330| 73 65 0a 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f |se.cat <|< \SHAR_|
|00000340| 45 4f 46 20 3e 20 27 73 | 65 61 72 63 68 2e 63 27 |EOF > 's|earch.c'|
|00000350| 0a 2f 2a 0a 20 2a 20 09 | 09 53 65 61 72 63 68 20 |./*. * .|.Search |
|00000360| 63 6f 6d 6d 61 6e 64 73 | 2e 0a 20 2a 20 54 68 65 |commands|.. * The|
|00000370| 20 66 75 6e 63 74 69 6f | 6e 73 20 69 6e 20 74 68 | functio|ns in th|
|00000380| 69 73 20 66 69 6c 65 20 | 69 6d 70 6c 65 6d 65 6e |is file |implemen|
|00000390| 74 20 74 68 65 0a 20 2a | 20 73 65 61 72 63 68 20 |t the. *| search |
|000003a0| 63 6f 6d 6d 61 6e 64 73 | 20 28 62 6f 74 68 20 70 |commands| (both p|
|000003b0| 6c 61 69 6e 20 61 6e 64 | 20 69 6e 63 72 65 6d 65 |lain and| increme|
|000003c0| 6e 74 61 6c 20 73 65 61 | 72 63 68 65 73 0a 20 2a |ntal sea|rches. *|
|000003d0| 20 61 72 65 20 73 75 70 | 70 6f 72 74 65 64 29 20 | are sup|ported) |
|000003e0| 61 6e 64 20 74 68 65 20 | 71 75 65 72 79 2d 72 65 |and the |query-re|
|000003f0| 70 6c 61 63 65 20 63 6f | 6d 6d 61 6e 64 2e 0a 20 |place co|mmand.. |
|00000400| 2a 0a 20 2a 20 54 68 65 | 20 70 6c 61 69 6e 20 6f |*. * The| plain o|
|00000410| 6c 64 20 73 65 61 72 63 | 68 20 63 6f 64 65 20 69 |ld searc|h code i|
|00000420| 73 20 70 61 72 74 20 6f | 66 20 74 68 65 20 6f 72 |s part o|f the or|
|00000430| 69 67 69 6e 61 6c 0a 20 | 2a 20 4d 69 63 72 6f 45 |iginal. |* MicroE|
|00000440| 4d 41 43 53 20 22 64 69 | 73 74 72 69 62 75 74 69 |MACS "di|stributi|
|00000450| 6f 6e 22 2e 20 54 68 65 | 20 69 6e 63 72 65 6d 65 |on". The| increme|
|00000460| 6e 74 61 6c 20 73 65 61 | 72 63 68 20 63 6f 64 65 |ntal sea|rch code|
|00000470| 2c 0a 20 2a 20 61 6e 64 | 20 74 68 65 20 71 75 65 |,. * and| the que|
|00000480| 72 79 2d 72 65 70 6c 61 | 63 65 20 63 6f 64 65 2c |ry-repla|ce code,|
|00000490| 20 69 73 20 62 79 20 52 | 69 63 68 20 45 6c 6c 69 | is by R|ich Elli|
|000004a0| 73 6f 6e 2e 0a 20 2a 2f | 0a 23 69 6e 63 6c 75 64 |son.. */|.#includ|
|000004b0| 65 09 22 64 65 66 2e 68 | 22 0a 0a 23 64 65 66 69 |e."def.h|"..#defi|
|000004c0| 6e 65 20 53 52 43 48 5f | 42 45 47 49 4e 09 28 30 |ne SRCH_|BEGIN.(0|
|000004d0| 29 09 09 09 2f 2a 20 53 | 65 61 72 63 68 20 73 75 |).../* S|earch su|
|000004e0| 62 2d 63 6f 64 65 73 2e | 09 2a 2f 0a 23 64 65 66 |b-codes.|.*/.#def|
|000004f0| 69 6e 65 09 53 52 43 48 | 5f 46 4f 52 57 09 28 2d |ine.SRCH|_FORW.(-|
|00000500| 31 29 0a 23 64 65 66 69 | 6e 65 20 53 52 43 48 5f |1).#defi|ne SRCH_|
|00000510| 42 41 43 4b 09 28 2d 32 | 29 0a 23 64 65 66 69 6e |BACK.(-2|).#defin|
|00000520| 65 20 53 52 43 48 5f 4e | 4f 50 52 09 28 2d 33 29 |e SRCH_N|OPR.(-3)|
|00000530| 0a 23 64 65 66 69 6e 65 | 20 53 52 43 48 5f 41 43 |.#define| SRCH_AC|
|00000540| 43 4d 09 28 2d 34 29 0a | 23 64 65 66 69 6e 65 09 |CM.(-4).|#define.|
|00000550| 53 52 43 48 5f 4d 41 52 | 4b 09 28 2d 35 29 0a 0a |SRCH_MAR|K.(-5)..|
|00000560| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 20 |typedef |struct |
|00000570| 7b 0a 09 69 6e 74 09 73 | 5f 63 6f 64 65 3b 0a 09 |{..int.s|_code;..|
|00000580| 4c 49 4e 45 09 2a 73 5f | 64 6f 74 70 3b 0a 09 69 |LINE.*s_|dotp;..i|
|00000590| 6e 74 09 73 5f 64 6f 74 | 6f 3b 0a 7d 09 53 52 43 |nt.s_dot|o;.}.SRC|
|000005a0| 48 43 4f 4d 3b 0a 0a 73 | 74 61 74 69 63 09 53 52 |HCOM;..s|tatic.SR|
|000005b0| 43 48 43 4f 4d 09 63 6d | 64 73 5b 4e 53 52 43 48 |CHCOM.cm|ds[NSRCH|
|000005c0| 5d 3b 0a 73 74 61 74 69 | 63 09 69 6e 74 09 63 69 |];.stati|c.int.ci|
|000005d0| 70 3b 0a 0a 69 6e 74 09 | 73 72 63 68 5f 6c 61 73 |p;..int.|srch_las|
|000005e0| 74 64 69 72 20 3d 20 53 | 52 43 48 5f 4e 4f 50 52 |tdir = S|RCH_NOPR|
|000005f0| 3b 09 09 2f 2a 20 4c 61 | 73 74 20 73 65 61 72 63 |;../* La|st searc|
|00000600| 68 20 66 6c 61 67 73 2e | 09 2a 2f 0a 0a 2f 2a 0a |h flags.|.*/../*.|
|00000610| 20 2a 20 53 65 61 72 63 | 68 20 66 6f 72 77 61 72 | * Searc|h forwar|
|00000620| 64 2e 0a 20 2a 20 47 65 | 74 20 61 20 73 65 61 72 |d.. * Ge|t a sear|
|00000630| 63 68 20 73 74 72 69 6e | 67 20 66 72 6f 6d 20 74 |ch strin|g from t|
|00000640| 68 65 20 75 73 65 72 2c | 20 61 6e 64 20 73 65 61 |he user,| and sea|
|00000650| 72 63 68 20 66 6f 72 20 | 69 74 2c 0a 20 2a 20 73 |rch for |it,. * s|
|00000660| 74 61 72 74 69 6e 67 20 | 61 74 20 22 2e 22 2e 20 |tarting |at ".". |
|00000670| 49 66 20 66 6f 75 6e 64 | 2c 20 22 2e 22 20 67 65 |If found|, "." ge|
|00000680| 74 73 20 6d 6f 76 65 64 | 20 74 6f 20 6a 75 73 74 |ts moved| to just|
|00000690| 20 61 66 74 65 72 20 74 | 68 65 0a 20 2a 20 6d 61 | after t|he. * ma|
|000006a0| 74 63 68 65 64 20 63 68 | 61 72 61 63 74 65 72 73 |tched ch|aracters|
|000006b0| 2c 20 61 6e 64 20 64 69 | 73 70 6c 61 79 20 64 6f |, and di|splay do|
|000006c0| 65 73 20 61 6c 6c 20 74 | 68 65 20 68 61 72 64 20 |es all t|he hard |
|000006d0| 73 74 75 66 66 2e 0a 20 | 2a 20 49 66 20 6e 6f 74 |stuff.. |* If not|
|000006e0| 20 66 6f 75 6e 64 2c 20 | 69 74 20 6a 75 73 74 20 | found, |it just |
|000006f0| 70 72 69 6e 74 73 20 61 | 20 6d 65 73 73 61 67 65 |prints a| message|
|00000700| 2e 0a 20 2a 2f 0a 2f 2a | 41 52 47 53 55 53 45 44 |.. */./*|ARGSUSED|
|00000710| 2a 2f 0a 66 6f 72 77 73 | 65 61 72 63 68 28 66 2c |*/.forws|earch(f,|
|00000720| 20 6e 2c 20 6b 29 20 7b | 0a 09 72 65 67 69 73 74 | n, k) {|..regist|
|00000730| 65 72 20 69 6e 74 09 73 | 3b 0a 0a 09 69 66 20 28 |er int.s|;...if (|
|00000740| 28 73 3d 72 65 61 64 70 | 61 74 74 65 72 6e 28 22 |(s=readp|attern("|
|00000750| 53 65 61 72 63 68 22 29 | 29 20 21 3d 20 54 52 55 |Search")|) != TRU|
|00000760| 45 29 0a 09 09 72 65 74 | 75 72 6e 20 28 73 29 3b |E)...ret|urn (s);|
|00000770| 0a 09 69 66 20 28 66 6f | 72 77 73 72 63 68 28 29 |..if (fo|rwsrch()|
|00000780| 20 3d 3d 20 46 41 4c 53 | 45 29 20 7b 0a 09 09 65 | == FALS|E) {...e|
|00000790| 77 70 72 69 6e 74 66 28 | 22 53 65 61 72 63 68 20 |wprintf(|"Search |
|000007a0| 66 61 69 6c 65 64 3a 20 | 5c 22 25 73 5c 22 22 2c |failed: |\"%s\"",|
|000007b0| 20 70 61 74 29 3b 0a 09 | 09 72 65 74 75 72 6e 20 | pat);..|.return |
|000007c0| 28 46 41 4c 53 45 29 3b | 0a 09 7d 0a 09 73 72 63 |(FALSE);|..}..src|
|000007d0| 68 5f 6c 61 73 74 64 69 | 72 20 3d 20 53 52 43 48 |h_lastdi|r = SRCH|
|000007e0| 5f 46 4f 52 57 3b 0a 09 | 72 65 74 75 72 6e 20 28 |_FORW;..|return (|
|000007f0| 54 52 55 45 29 3b 0a 7d | 0a 0a 2f 2a 0a 20 2a 20 |TRUE);.}|../*. * |
|00000800| 52 65 76 65 72 73 65 20 | 73 65 61 72 63 68 2e 0a |Reverse |search..|
|00000810| 20 2a 20 47 65 74 20 61 | 20 73 65 61 72 63 68 20 | * Get a| search |
|00000820| 73 74 72 69 6e 67 20 66 | 72 6f 6d 20 74 68 65 20 |string f|rom the |
|00000830| 20 75 73 65 72 2c 20 61 | 6e 64 20 73 65 61 72 63 | user, a|nd searc|
|00000840| 68 2c 20 73 74 61 72 74 | 69 6e 67 20 61 74 20 22 |h, start|ing at "|
|00000850| 2e 22 0a 20 2a 20 61 6e | 64 20 70 72 6f 63 65 65 |.". * an|d procee|
|00000860| 64 69 6e 67 20 74 6f 77 | 61 72 64 20 74 68 65 20 |ding tow|ard the |
|00000870| 66 72 6f 6e 74 20 6f 66 | 20 74 68 65 20 62 75 66 |front of| the buf|
|00000880| 66 65 72 2e 20 49 66 20 | 66 6f 75 6e 64 20 22 2e |fer. If |found ".|
|00000890| 22 20 69 73 20 6c 65 66 | 74 0a 20 2a 20 70 6f 69 |" is lef|t. * poi|
|000008a0| 6e 74 69 6e 67 20 61 74 | 20 74 68 65 20 66 69 72 |nting at| the fir|
|000008b0| 73 74 20 63 68 61 72 61 | 63 74 65 72 20 6f 66 20 |st chara|cter of |
|000008c0| 74 68 65 20 70 61 74 74 | 65 72 6e 20 5b 74 68 65 |the patt|ern [the|
|000008d0| 20 6c 61 73 74 20 63 68 | 61 72 61 63 74 65 72 20 | last ch|aracter |
|000008e0| 74 68 61 74 0a 20 2a 20 | 77 61 73 20 6d 61 74 63 |that. * |was matc|
|000008f0| 68 65 64 5d 2e 0a 20 2a | 2f 0a 2f 2a 41 52 47 53 |hed].. *|/./*ARGS|
|00000900| 55 53 45 44 2a 2f 0a 62 | 61 63 6b 73 65 61 72 63 |USED*/.b|acksearc|
|00000910| 68 28 66 2c 20 6e 2c 20 | 6b 29 20 7b 0a 09 72 65 |h(f, n, |k) {..re|
|00000920| 67 69 73 74 65 72 20 69 | 6e 74 09 73 3b 0a 0a 09 |gister i|nt.s;...|
|00000930| 69 66 20 28 28 73 3d 72 | 65 61 64 70 61 74 74 65 |if ((s=r|eadpatte|
|00000940| 72 6e 28 22 53 65 61 72 | 63 68 20 62 61 63 6b 77 |rn("Sear|ch backw|
|00000950| 61 72 64 22 29 29 20 21 | 3d 20 54 52 55 45 29 0a |ard")) !|= TRUE).|
|00000960| 09 09 72 65 74 75 72 6e | 20 28 73 29 3b 0a 09 69 |..return| (s);..i|
|00000970| 66 20 28 62 61 63 6b 73 | 72 63 68 28 29 20 3d 3d |f (backs|rch() ==|
|00000980| 20 46 41 4c 53 45 29 20 | 7b 0a 09 09 65 77 70 72 | FALSE) |{...ewpr|
|00000990| 69 6e 74 66 28 22 53 65 | 61 72 63 68 20 66 61 69 |intf("Se|arch fai|
|000009a0| 6c 65 64 3a 20 5c 22 25 | 73 5c 22 22 2c 20 70 61 |led: \"%|s\"", pa|
|000009b0| 74 29 3b 0a 09 09 72 65 | 74 75 72 6e 20 28 46 41 |t);...re|turn (FA|
|000009c0| 4c 53 45 29 3b 0a 09 7d | 0a 09 73 72 63 68 5f 6c |LSE);..}|..srch_l|
|000009d0| 61 73 74 64 69 72 20 3d | 20 53 52 43 48 5f 42 41 |astdir =| SRCH_BA|
|000009e0| 43 4b 3b 0a 09 72 65 74 | 75 72 6e 20 28 54 52 55 |CK;..ret|urn (TRU|
|000009f0| 45 29 3b 0a 7d 0a 0a 2f | 2a 20 0a 20 2a 20 53 65 |E);.}../|* . * Se|
|00000a00| 61 72 63 68 20 61 67 61 | 69 6e 2c 20 75 73 69 6e |arch aga|in, usin|
|00000a10| 67 20 74 68 65 20 73 61 | 6d 65 20 73 65 61 72 63 |g the sa|me searc|
|00000a20| 68 20 73 74 72 69 6e 67 | 0a 20 2a 20 61 6e 64 20 |h string|. * and |
|00000a30| 64 69 72 65 63 74 69 6f | 6e 20 61 73 20 74 68 65 |directio|n as the|
|00000a40| 20 6c 61 73 74 20 73 65 | 61 72 63 68 20 63 6f 6d | last se|arch com|
|00000a50| 6d 61 6e 64 2e 20 54 68 | 65 20 64 69 72 65 63 74 |mand. Th|e direct|
|00000a60| 69 6f 6e 0a 20 2a 20 68 | 61 73 20 62 65 65 6e 20 |ion. * h|as been |
|00000a70| 73 61 76 65 64 20 69 6e | 20 22 73 72 63 68 5f 6c |saved in| "srch_l|
|00000a80| 61 73 74 64 69 72 22 2c | 20 73 6f 20 79 6f 75 20 |astdir",| so you |
|00000a90| 6b 6e 6f 77 20 77 68 69 | 63 68 20 77 61 79 0a 20 |know whi|ch way. |
|00000aa0| 2a 20 74 6f 20 67 6f 2e | 0a 20 2a 2f 0a 2f 2a 41 |* to go.|. */./*A|
|00000ab0| 52 47 53 55 53 45 44 2a | 2f 0a 73 65 61 72 63 68 |RGSUSED*|/.search|
|00000ac0| 61 67 61 69 6e 28 66 2c | 20 6e 2c 20 6b 29 20 7b |again(f,| n, k) {|
|00000ad0| 0a 09 69 66 20 28 73 72 | 63 68 5f 6c 61 73 74 64 |..if (sr|ch_lastd|
|00000ae0| 69 72 20 3d 3d 20 53 52 | 43 48 5f 46 4f 52 57 29 |ir == SR|CH_FORW)|
|00000af0| 20 7b 0a 09 09 69 66 20 | 28 66 6f 72 77 73 72 63 | {...if |(forwsrc|
|00000b00| 68 28 29 20 3d 3d 20 46 | 41 4c 53 45 29 20 7b 0a |h() == F|ALSE) {.|
|00000b10| 09 09 09 65 77 70 72 69 | 6e 74 66 28 22 53 65 61 |...ewpri|ntf("Sea|
|00000b20| 72 63 68 20 66 61 69 6c | 65 64 3a 20 5c 22 25 73 |rch fail|ed: \"%s|
|00000b30| 5c 22 22 2c 20 70 61 74 | 29 3b 0a 09 09 09 72 65 |\"", pat|);....re|
|00000b40| 74 75 72 6e 20 28 46 41 | 4c 53 45 29 3b 0a 09 09 |turn (FA|LSE);...|
|00000b50| 7d 0a 09 09 72 65 74 75 | 72 6e 20 28 54 52 55 45 |}...retu|rn (TRUE|
|00000b60| 29 3b 0a 09 7d 0a 09 69 | 66 20 28 73 72 63 68 5f |);..}..i|f (srch_|
|00000b70| 6c 61 73 74 64 69 72 20 | 3d 3d 20 53 52 43 48 5f |lastdir |== SRCH_|
|00000b80| 42 41 43 4b 29 20 7b 0a | 09 09 69 66 20 28 62 61 |BACK) {.|..if (ba|
|00000b90| 63 6b 73 72 63 68 28 29 | 20 3d 3d 20 46 41 4c 53 |cksrch()| == FALS|
|00000ba0| 45 29 20 7b 0a 09 09 09 | 65 77 70 72 69 6e 74 66 |E) {....|ewprintf|
|00000bb0| 28 22 53 65 61 72 63 68 | 20 66 61 69 6c 65 64 3a |("Search| failed:|
|00000bc0| 20 5c 22 25 73 5c 22 22 | 2c 20 70 61 74 29 3b 0a | \"%s\""|, pat);.|
|00000bd0| 09 09 09 72 65 74 75 72 | 6e 20 28 46 41 4c 53 45 |...retur|n (FALSE|
|00000be0| 29 3b 0a 09 09 7d 0a 09 | 09 72 65 74 75 72 6e 20 |);...}..|.return |
|00000bf0| 28 54 52 55 45 29 3b 0a | 09 7d 0a 09 65 77 70 72 |(TRUE);.|.}..ewpr|
|00000c00| 69 6e 74 66 28 22 4e 6f | 20 6c 61 73 74 20 73 65 |intf("No| last se|
|00000c10| 61 72 63 68 22 29 3b 0a | 09 72 65 74 75 72 6e 20 |arch");.|.return |
|00000c20| 28 46 41 4c 53 45 29 3b | 0a 7d 0a 0a 2f 2a 0a 20 |(FALSE);|.}../*. |
|00000c30| 2a 20 55 73 65 20 69 6e | 63 72 65 6d 65 6e 74 61 |* Use in|crementa|
|00000c40| 6c 20 73 65 61 72 63 68 | 69 6e 67 2c 20 69 6e 69 |l search|ing, ini|
|00000c50| 74 69 61 6c 6c 79 20 69 | 6e 20 74 68 65 20 66 6f |tially i|n the fo|
|00000c60| 72 77 61 72 64 20 64 69 | 72 65 63 74 69 6f 6e 2e |rward di|rection.|
|00000c70| 0a 20 2a 20 69 73 65 61 | 72 63 68 20 69 67 6e 6f |. * isea|rch igno|
|00000c80| 72 65 73 20 61 6e 79 20 | 65 78 70 6c 69 63 69 74 |res any |explicit|
|00000c90| 20 61 72 67 75 6d 65 6e | 74 73 2e 0a 20 2a 2f 0a | argumen|ts.. */.|
|00000ca0| 2f 2a 41 52 47 53 55 53 | 45 44 2a 2f 0a 66 6f 72 |/*ARGSUS|ED*/.for|
|00000cb0| 77 69 73 65 61 72 63 68 | 28 66 2c 20 6e 2c 20 6b |wisearch|(f, n, k|
|00000cc0| 29 20 7b 0a 09 72 65 74 | 75 72 6e 20 28 69 73 65 |) {..ret|urn (ise|
|00000cd0| 61 72 63 68 28 53 52 43 | 48 5f 46 4f 52 57 29 29 |arch(SRC|H_FORW))|
|00000ce0| 3b 0a 7d 0a 0a 2f 2a 0a | 20 2a 20 55 73 65 20 69 |;.}../*.| * Use i|
|00000cf0| 6e 63 72 65 6d 65 6e 74 | 61 6c 20 73 65 61 72 63 |ncrement|al searc|
|00000d00| 68 69 6e 67 2c 20 69 6e | 69 74 69 61 6c 6c 79 20 |hing, in|itially |
|00000d10| 69 6e 20 74 68 65 20 72 | 65 76 65 72 73 65 20 64 |in the r|everse d|
|00000d20| 69 72 65 63 74 69 6f 6e | 2e 0a 20 2a 20 69 73 65 |irection|.. * ise|
|00000d30| 61 72 63 68 20 69 67 6e | 6f 72 65 73 20 61 6e 79 |arch ign|ores any|
|00000d40| 20 65 78 70 6c 69 63 69 | 74 20 61 72 67 75 6d 65 | explici|t argume|
|00000d50| 6e 74 73 2e 0a 20 2a 2f | 0a 2f 2a 41 52 47 53 55 |nts.. */|./*ARGSU|
|00000d60| 53 45 44 2a 2f 0a 62 61 | 63 6b 69 73 65 61 72 63 |SED*/.ba|ckisearc|
|00000d70| 68 28 66 2c 20 6e 2c 20 | 6b 29 20 7b 0a 09 72 65 |h(f, n, |k) {..re|
|00000d80| 74 75 72 6e 20 28 69 73 | 65 61 72 63 68 28 53 52 |turn (is|earch(SR|
|00000d90| 43 48 5f 42 41 43 4b 29 | 29 3b 0a 7d 0a 0a 2f 2a |CH_BACK)|);.}../*|
|00000da0| 0a 20 2a 20 49 6e 63 72 | 65 6d 65 6e 74 61 6c 20 |. * Incr|emental |
|00000db0| 53 65 61 72 63 68 2e 0a | 20 2a 09 64 69 72 20 69 |Search..| *.dir i|
|00000dc0| 73 20 75 73 65 64 20 61 | 73 20 74 68 65 20 69 6e |s used a|s the in|
|00000dd0| 69 74 69 61 6c 20 64 69 | 72 65 63 74 69 6f 6e 20 |itial di|rection |
|00000de0| 74 6f 20 73 65 61 72 63 | 68 2e 0a 20 2a 09 5e 53 |to searc|h.. *.^S|
|00000df0| 09 73 77 69 74 63 68 20 | 64 69 72 65 63 74 69 6f |.switch |directio|
|00000e00| 6e 20 74 6f 20 66 6f 72 | 77 61 72 64 0a 20 2a 09 |n to for|ward. *.|
|00000e10| 5e 52 09 73 77 69 74 63 | 68 20 64 69 72 65 63 74 |^R.switc|h direct|
|00000e20| 69 6f 6e 20 74 6f 20 72 | 65 76 65 72 73 65 0a 20 |ion to r|everse. |
|00000e30| 2a 09 5e 51 09 71 75 6f | 74 65 20 6e 65 78 74 20 |*.^Q.quo|te next |
|00000e40| 63 68 61 72 61 63 74 65 | 72 20 28 61 6c 6c 6f 77 |characte|r (allow|
|00000e50| 73 20 73 65 61 72 63 68 | 69 6e 67 20 66 6f 72 20 |s search|ing for |
|00000e60| 5e 4e 20 65 74 63 2e 29 | 0a 20 2a 09 3c 45 53 43 |^N etc.)|. *.<ESC|
|00000e70| 3e 09 65 78 69 74 20 66 | 72 6f 6d 20 49 73 65 61 |>.exit f|rom Isea|
|00000e80| 72 63 68 0a 20 2a 09 3c | 44 45 4c 3e 09 75 6e 64 |rch. *.<|DEL>.und|
|00000e90| 6f 65 73 20 6c 61 73 74 | 20 63 68 61 72 61 63 74 |oes last| charact|
|00000ea0| 65 72 20 74 79 70 65 64 | 2e 20 28 74 72 69 63 6b |er typed|. (trick|
|00000eb0| 79 20 6a 6f 62 20 74 6f | 20 64 6f 20 74 68 69 73 |y job to| do this|
|00000ec0| 20 63 6f 72 72 65 63 74 | 6c 79 29 2e 0a 20 2a 09 | correct|ly).. *.|
|00000ed0| 6f 74 68 65 72 20 5e 09 | 65 78 69 74 20 73 65 61 |other ^.|exit sea|
|00000ee0| 72 63 68 2c 20 64 6f 6e | 27 74 20 73 65 74 20 6d |rch, don|'t set m|
|00000ef0| 61 72 6b 0a 20 2a 09 65 | 6c 73 65 09 61 63 63 75 |ark. *.e|lse.accu|
|00000f00| 6d 75 6c 61 74 65 20 69 | 6e 74 6f 20 73 65 61 72 |mulate i|nto sear|
|00000f10| 63 68 20 73 74 72 69 6e | 67 0a 20 2a 2f 0a 69 73 |ch strin|g. */.is|
|00000f20| 65 61 72 63 68 28 64 69 | 72 29 20 7b 0a 09 72 65 |earch(di|r) {..re|
|00000f30| 67 69 73 74 65 72 20 69 | 6e 74 09 63 3b 0a 09 72 |gister i|nt.c;..r|
|00000f40| 65 67 69 73 74 65 72 20 | 4c 49 4e 45 09 2a 63 6c |egister |LINE.*cl|
|00000f50| 70 3b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |p;..regi|ster int|
|00000f60| 09 63 62 6f 3b 0a 09 72 | 65 67 69 73 74 65 72 20 |.cbo;..r|egister |
|00000f70| 69 6e 74 09 73 75 63 63 | 65 73 73 3b 0a 09 69 6e |int.succ|ess;..in|
|00000f80| 74 09 09 70 70 74 72 3b | 0a 09 63 68 61 72 09 09 |t..pptr;|..char..|
|00000f90| 6f 70 61 74 5b 4e 50 41 | 54 5d 3b 0a 0a 09 66 6f |opat[NPA|T];...fo|
|00000fa0| 72 20 28 63 69 70 3d 30 | 3b 20 63 69 70 3c 4e 53 |r (cip=0|; cip<NS|
|00000fb0| 52 43 48 3b 20 63 69 70 | 2b 2b 29 0a 09 09 63 6d |RCH; cip|++)...cm|
|00000fc0| 64 73 5b 63 69 70 5d 2e | 73 5f 63 6f 64 65 20 3d |ds[cip].|s_code =|
|00000fd0| 20 53 52 43 48 5f 4e 4f | 50 52 3b 0a 09 28 56 4f | SRCH_NO|PR;..(VO|
|00000fe0| 49 44 29 20 73 74 72 63 | 70 79 28 6f 70 61 74 2c |ID) strc|py(opat,|
|00000ff0| 20 70 61 74 29 3b 0a 09 | 63 69 70 20 3d 20 30 3b | pat);..|cip = 0;|
|00001000| 0a 09 70 70 74 72 20 3d | 20 2d 31 3b 0a 09 63 6c |..pptr =| -1;..cl|
|00001010| 70 20 3d 20 63 75 72 77 | 70 2d 3e 77 5f 64 6f 74 |p = curw|p->w_dot|
|00001020| 70 3b 0a 09 63 62 6f 20 | 3d 20 63 75 72 77 70 2d |p;..cbo |= curwp-|
|00001030| 3e 77 5f 64 6f 74 6f 3b | 0a 09 69 73 5f 6c 70 75 |>w_doto;|..is_lpu|
|00001040| 73 68 28 29 3b 0a 09 69 | 73 5f 63 70 75 73 68 28 |sh();..i|s_cpush(|
|00001050| 53 52 43 48 5f 42 45 47 | 49 4e 29 3b 0a 09 73 75 |SRCH_BEG|IN);..su|
|00001060| 63 63 65 73 73 20 3d 20 | 54 52 55 45 3b 0a 09 69 |ccess = |TRUE;..i|
|00001070| 73 5f 70 72 6f 6d 70 74 | 28 64 69 72 2c 20 54 52 |s_prompt|(dir, TR|
|00001080| 55 45 2c 20 73 75 63 63 | 65 73 73 29 3b 0a 09 66 |UE, succ|ess);..f|
|00001090| 6f 72 20 28 3b 3b 29 20 | 7b 0a 09 09 75 70 64 61 |or (;;) |{...upda|
|000010a0| 74 65 28 29 3b 0a 09 09 | 73 77 69 74 63 68 20 28 |te();...|switch (|
|000010b0| 63 20 3d 20 28 63 68 61 | 72 29 20 67 65 74 6b 65 |c = (cha|r) getke|
|000010c0| 79 28 4b 51 55 4f 54 45 | 29 29 20 7b 0a 09 09 63 |y(KQUOTE|)) {...c|
|000010d0| 61 73 65 20 4d 45 54 41 | 43 48 3a 0a 09 09 09 73 |ase META|CH:....s|
|000010e0| 72 63 68 5f 6c 61 73 74 | 64 69 72 20 3d 20 64 69 |rch_last|dir = di|
|000010f0| 72 3b 0a 09 09 09 63 75 | 72 77 70 2d 3e 77 5f 6d |r;....cu|rwp->w_m|
|00001100| 61 72 6b 70 20 3d 20 63 | 6c 70 3b 0a 09 09 09 63 |arkp = c|lp;....c|
|00001110| 75 72 77 70 2d 3e 77 5f | 6d 61 72 6b 6f 20 3d 20 |urwp->w_|marko = |
|00001120| 63 62 6f 3b 0a 09 09 09 | 69 66 20 28 6b 62 64 6d |cbo;....|if (kbdm|
|00001130| 6f 70 20 3d 3d 20 4e 55 | 4c 4c 29 20 65 77 70 72 |op == NU|LL) ewpr|
|00001140| 69 6e 74 66 28 22 4d 61 | 72 6b 20 73 65 74 22 29 |intf("Ma|rk set")|
|00001150| 3b 0a 09 09 09 72 65 74 | 75 72 6e 20 28 54 52 55 |;....ret|urn (TRU|
|00001160| 45 29 3b 0a 0a 09 09 63 | 61 73 65 20 43 43 48 52 |E);....c|ase CCHR|
|00001170| 28 27 47 27 29 3a 0a 09 | 09 09 69 66 20 28 73 75 |('G'):..|..if (su|
|00001180| 63 63 65 73 73 20 21 3d | 20 54 52 55 45 29 20 7b |ccess !=| TRUE) {|
|00001190| 0a 09 09 09 09 77 68 69 | 6c 65 20 28 69 73 5f 70 |.....whi|le (is_p|
|000011a0| 65 65 6b 28 29 20 3d 3d | 20 53 52 43 48 5f 41 43 |eek() ==| SRCH_AC|
|000011b0| 43 4d 29 0a 09 09 09 09 | 09 69 66 20 28 69 73 5f |CM).....|.if (is_|
|000011c0| 75 6e 64 6f 28 26 70 70 | 74 72 2c 20 26 64 69 72 |undo(&pp|tr, &dir|
|000011d0| 29 20 3d 3d 20 46 41 4c | 53 45 29 0a 09 09 09 09 |) == FAL|SE).....|
|000011e0| 09 09 62 72 65 61 6b 3b | 0a 09 09 09 09 73 75 63 |..break;|.....suc|
|000011f0| 63 65 73 73 20 3d 20 54 | 52 55 45 3b 0a 09 09 09 |cess = T|RUE;....|
|00001200| 09 69 73 5f 70 72 6f 6d | 70 74 28 64 69 72 2c 20 |.is_prom|pt(dir, |
|00001210| 70 70 74 72 20 3c 20 30 | 2c 20 73 75 63 63 65 73 |pptr < 0|, succes|
|00001220| 73 29 3b 0a 09 09 09 09 | 62 72 65 61 6b 3b 0a 09 |s);.....|break;..|
|00001230| 09 09 7d 0a 09 09 09 63 | 75 72 77 70 2d 3e 77 5f |..}....c|urwp->w_|
|00001240| 64 6f 74 70 20 3d 20 63 | 6c 70 3b 0a 09 09 09 63 |dotp = c|lp;....c|
|00001250| 75 72 77 70 2d 3e 77 5f | 64 6f 74 6f 20 3d 20 63 |urwp->w_|doto = c|
|00001260| 62 6f 3b 0a 09 09 09 63 | 75 72 77 70 2d 3e 77 5f |bo;....c|urwp->w_|
|00001270| 66 6c 61 67 20 7c 3d 20 | 57 46 4d 4f 56 45 3b 0a |flag |= |WFMOVE;.|
|00001280| 09 09 09 73 72 63 68 5f | 6c 61 73 74 64 69 72 20 |...srch_|lastdir |
|00001290| 3d 20 64 69 72 3b 0a 09 | 09 09 28 56 4f 49 44 29 |= dir;..|..(VOID)|
|000012a0| 20 63 74 72 6c 67 28 46 | 41 4c 53 45 2c 20 30 2c | ctrlg(F|ALSE, 0,|
|000012b0| 20 4b 52 41 4e 44 4f 4d | 29 3b 0a 09 09 09 28 56 | KRANDOM|);....(V|
|000012c0| 4f 49 44 29 20 73 74 72 | 63 70 79 28 70 61 74 2c |OID) str|cpy(pat,|
|000012d0| 20 6f 70 61 74 29 3b 0a | 09 09 09 72 65 74 75 72 | opat);.|...retur|
|000012e0| 6e 20 41 42 4f 52 54 3b | 0a 0a 09 09 63 61 73 65 |n ABORT;|....case|
|000012f0| 20 43 43 48 52 28 27 53 | 27 29 3a 0a 09 09 09 69 | CCHR('S|'):....i|
|00001300| 66 20 28 64 69 72 20 3d | 3d 20 53 52 43 48 5f 42 |f (dir =|= SRCH_B|
|00001310| 41 43 4b 29 20 7b 0a 09 | 09 09 09 64 69 72 20 3d |ACK) {..|...dir =|
|00001320| 20 53 52 43 48 5f 46 4f | 52 57 3b 0a 09 09 09 09 | SRCH_FO|RW;.....|
|00001330| 69 73 5f 6c 70 75 73 68 | 28 29 3b 0a 09 09 09 09 |is_lpush|();.....|
|00001340| 69 73 5f 63 70 75 73 68 | 28 53 52 43 48 5f 46 4f |is_cpush|(SRCH_FO|
|00001350| 52 57 29 3b 0a 09 09 09 | 09 73 75 63 63 65 73 73 |RW);....|.success|
|00001360| 20 3d 20 54 52 55 45 3b | 0a 09 09 09 7d 0a 09 09 | = TRUE;|....}...|
|00001370| 09 69 66 20 28 73 75 63 | 63 65 73 73 3d 3d 46 41 |.if (suc|cess==FA|
|00001380| 4c 53 45 20 26 26 20 64 | 69 72 3d 3d 53 52 43 48 |LSE && d|ir==SRCH|
|00001390| 5f 46 4f 52 57 29 0a 09 | 09 09 09 62 72 65 61 6b |_FORW)..|...break|
|000013a0| 3b 0a 09 09 09 69 73 5f | 6c 70 75 73 68 28 29 3b |;....is_|lpush();|
|000013b0| 0a 09 09 09 70 70 74 72 | 20 3d 20 73 74 72 6c 65 |....pptr| = strle|
|000013c0| 6e 28 70 61 74 29 3b 0a | 09 09 09 28 56 4f 49 44 |n(pat);.|...(VOID|
|000013d0| 29 20 66 6f 72 77 63 68 | 61 72 28 46 41 4c 53 45 |) forwch|ar(FALSE|
|000013e0| 2c 20 31 2c 20 4b 52 41 | 4e 44 4f 4d 29 3b 0a 09 |, 1, KRA|NDOM);..|
|000013f0| 09 09 69 66 20 28 69 73 | 5f 66 69 6e 64 28 53 52 |..if (is|_find(SR|
|00001400| 43 48 5f 46 4f 52 57 29 | 20 21 3d 20 46 41 4c 53 |CH_FORW)| != FALS|
|00001410| 45 29 20 69 73 5f 63 70 | 75 73 68 28 53 52 43 48 |E) is_cp|ush(SRCH|
|00001420| 5f 4d 41 52 4b 29 3b 0a | 09 09 09 65 6c 73 65 20 |_MARK);.|...else |
|00001430| 7b 0a 09 09 09 09 28 56 | 4f 49 44 29 20 62 61 63 |{.....(V|OID) bac|
|00001440| 6b 63 68 61 72 28 46 41 | 4c 53 45 2c 20 31 2c 20 |kchar(FA|LSE, 1, |
|00001450| 4b 52 41 4e 44 4f 4d 29 | 3b 0a 09 09 09 09 74 74 |KRANDOM)|;.....tt|
|00001460| 62 65 65 70 28 29 3b 0a | 09 09 09 09 73 75 63 63 |beep();.|....succ|
|00001470| 65 73 73 20 3d 20 46 41 | 4c 53 45 3b 0a 09 09 09 |ess = FA|LSE;....|
|00001480| 7d 0a 09 09 09 69 73 5f | 70 72 6f 6d 70 74 28 64 |}....is_|prompt(d|
|00001490| 69 72 2c 20 70 70 74 72 | 20 3c 20 30 2c 20 73 75 |ir, pptr| < 0, su|
|000014a0| 63 63 65 73 73 29 3b 0a | 09 09 09 62 72 65 61 6b |ccess);.|...break|
|000014b0| 3b 0a 0a 09 09 63 61 73 | 65 20 43 43 48 52 28 27 |;....cas|e CCHR('|
|000014c0| 52 27 29 3a 0a 09 09 09 | 69 66 20 28 64 69 72 20 |R'):....|if (dir |
|000014d0| 3d 3d 20 53 52 43 48 5f | 46 4f 52 57 29 20 7b 0a |== SRCH_|FORW) {.|
|000014e0| 09 09 09 09 64 69 72 20 | 3d 20 53 52 43 48 5f 42 |....dir |= SRCH_B|
|000014f0| 41 43 4b 3b 0a 09 09 09 | 09 69 73 5f 6c 70 75 73 |ACK;....|.is_lpus|
|00001500| 68 28 29 3b 0a 09 09 09 | 09 69 73 5f 63 70 75 73 |h();....|.is_cpus|
|00001510| 68 28 53 52 43 48 5f 42 | 41 43 4b 29 3b 0a 09 09 |h(SRCH_B|ACK);...|
|00001520| 09 09 73 75 63 63 65 73 | 73 20 3d 20 54 52 55 45 |..succes|s = TRUE|
|00001530| 3b 0a 09 09 09 7d 0a 09 | 09 09 69 66 20 28 73 75 |;....}..|..if (su|
|00001540| 63 63 65 73 73 3d 3d 46 | 41 4c 53 45 20 26 26 20 |ccess==F|ALSE && |
|00001550| 64 69 72 3d 3d 53 52 43 | 48 5f 42 41 43 4b 29 0a |dir==SRC|H_BACK).|
|00001560| 09 09 09 09 62 72 65 61 | 6b 3b 0a 09 09 09 69 73 |....brea|k;....is|
|00001570| 5f 6c 70 75 73 68 28 29 | 3b 0a 09 09 09 70 70 74 |_lpush()|;....ppt|
|00001580| 72 20 3d 20 73 74 72 6c | 65 6e 28 70 61 74 29 3b |r = strl|en(pat);|
|00001590| 0a 09 09 09 28 56 4f 49 | 44 29 20 62 61 63 6b 63 |....(VOI|D) backc|
|000015a0| 68 61 72 28 46 41 4c 53 | 45 2c 20 31 2c 20 4b 52 |har(FALS|E, 1, KR|
|000015b0| 41 4e 44 4f 4d 29 3b 0a | 09 09 09 69 66 20 28 69 |ANDOM);.|...if (i|
|000015c0| 73 5f 66 69 6e 64 28 53 | 52 43 48 5f 42 41 43 4b |s_find(S|RCH_BACK|
|000015d0| 29 20 21 3d 20 46 41 4c | 53 45 29 20 69 73 5f 63 |) != FAL|SE) is_c|
|000015e0| 70 75 73 68 28 53 52 43 | 48 5f 4d 41 52 4b 29 3b |push(SRC|H_MARK);|
|000015f0| 0a 09 09 09 65 6c 73 65 | 20 7b 0a 09 09 09 09 28 |....else| {.....(|
|00001600| 56 4f 49 44 29 20 66 6f | 72 77 63 68 61 72 28 46 |VOID) fo|rwchar(F|
|00001610| 41 4c 53 45 2c 20 31 2c | 20 4b 52 41 4e 44 4f 4d |ALSE, 1,| KRANDOM|
|00001620| 29 3b 0a 09 09 09 09 74 | 74 62 65 65 70 28 29 3b |);.....t|tbeep();|
|00001630| 0a 09 09 09 09 73 75 63 | 63 65 73 73 20 3d 20 46 |.....suc|cess = F|
|00001640| 41 4c 53 45 3b 0a 09 09 | 09 7d 0a 09 09 09 69 73 |ALSE;...|.}....is|
|00001650| 5f 70 72 6f 6d 70 74 28 | 64 69 72 2c 20 70 70 74 |_prompt(|dir, ppt|
|00001660| 72 20 3c 20 30 2c 20 73 | 75 63 63 65 73 73 29 3b |r < 0, s|uccess);|
|00001670| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 0a 09 09 63 61 |....brea|k;....ca|
|00001680| 73 65 20 30 78 37 46 3a | 0a 09 09 09 69 66 20 28 |se 0x7F:|....if (|
|00001690| 69 73 5f 75 6e 64 6f 28 | 26 70 70 74 72 2c 20 26 |is_undo(|&pptr, &|
|000016a0| 64 69 72 29 20 21 3d 20 | 54 52 55 45 29 20 72 65 |dir) != |TRUE) re|
|000016b0| 74 75 72 6e 20 46 41 4c | 53 45 3b 0a 09 09 09 69 |turn FAL|SE;....i|
|000016c0| 66 20 28 69 73 5f 70 65 | 65 6b 28 29 20 21 3d 20 |f (is_pe|ek() != |
|000016d0| 53 52 43 48 5f 41 43 43 | 4d 29 20 73 75 63 63 65 |SRCH_ACC|M) succe|
|000016e0| 73 73 20 3d 20 54 52 55 | 45 3b 0a 09 09 09 69 73 |ss = TRU|E;....is|
|000016f0| 5f 70 72 6f 6d 70 74 28 | 64 69 72 2c 20 70 70 74 |_prompt(|dir, ppt|
|00001700| 72 20 3c 20 30 2c 20 73 | 75 63 63 65 73 73 29 3b |r < 0, s|uccess);|
|00001710| 0a 09 09 09 62 72 65 61 | 6b 3b 0a 0a 09 09 63 61 |....brea|k;....ca|
|00001720| 73 65 20 43 43 48 52 28 | 27 51 27 29 3a 0a 09 09 |se CCHR(|'Q'):...|
|00001730| 09 63 20 3d 20 28 63 68 | 61 72 29 20 67 65 74 6b |.c = (ch|ar) getk|
|00001740| 65 79 28 4b 51 55 4f 54 | 45 29 3b 0a 09 09 09 67 |ey(KQUOT|E);....g|
|00001750| 6f 74 6f 20 20 61 64 64 | 63 68 61 72 3b 0a 09 09 |oto add|char;...|
|00001760| 63 61 73 65 20 43 43 48 | 52 28 27 4d 27 29 3a 0a |case CCH|R('M'):.|
|00001770| 09 09 09 63 20 3d 20 43 | 43 48 52 28 27 4a 27 29 |...c = C|CHR('J')|
|00001780| 3b 0a 09 09 63 61 73 65 | 20 43 43 48 52 28 27 4a |;...case| CCHR('J|
|00001790| 27 29 3a 0a 09 09 09 67 | 6f 74 6f 20 20 61 64 64 |'):....g|oto add|
|000017a0| 63 68 61 72 3b 0a 0a 09 | 09 64 65 66 61 75 6c 74 |char;...|.default|
|000017b0| 3a 0a 09 09 09 69 66 20 | 28 49 53 43 54 52 4c 28 |:....if |(ISCTRL(|
|000017c0| 63 29 20 21 3d 20 46 41 | 4c 53 45 29 20 7b 0a 09 |c) != FA|LSE) {..|
|000017d0| 09 09 09 63 20 2b 3d 20 | 27 40 27 3b 0a 09 09 09 |...c += |'@';....|
|000017e0| 09 63 20 7c 3d 20 4b 43 | 54 52 4c 3b 0a 09 09 09 |.c |= KC|TRL;....|
|000017f0| 09 73 75 63 63 65 73 73 | 20 3d 20 65 78 65 63 75 |.success| = execu|
|00001800| 74 65 28 28 4b 45 59 29 | 20 63 2c 20 46 41 4c 53 |te((KEY)| c, FALS|
|00001810| 45 2c 20 31 29 3b 0a 09 | 09 09 09 63 75 72 77 70 |E, 1);..|...curwp|
|00001820| 2d 3e 77 5f 6d 61 72 6b | 70 20 3d 20 63 6c 70 3b |->w_mark|p = clp;|
|00001830| 0a 09 09 09 09 63 75 72 | 77 70 2d 3e 77 5f 6d 61 |.....cur|wp->w_ma|
|00001840| 72 6b 6f 20 3d 20 63 62 | 6f 3b 0a 09 09 09 09 69 |rko = cb|o;.....i|
|00001850| 66 20 28 6b 62 64 6d 6f | 70 20 3d 3d 20 4e 55 4c |f (kbdmo|p == NUL|
|00001860| 4c 29 20 65 77 70 72 69 | 6e 74 66 28 22 4d 61 72 |L) ewpri|ntf("Mar|
|00001870| 6b 20 73 65 74 22 29 3b | 0a 09 09 09 09 63 75 72 |k set");|.....cur|
|00001880| 77 70 2d 3e 77 5f 66 6c | 61 67 20 7c 3d 20 57 46 |wp->w_fl|ag |= WF|
|00001890| 4d 4f 56 45 3b 0a 09 09 | 09 09 72 65 74 75 72 6e |MOVE;...|..return|
|000018a0| 20 28 73 75 63 63 65 73 | 73 29 3b 0a 09 09 09 7d | (succes|s);....}|
|000018b0| 09 09 09 09 0a 09 09 61 | 64 64 63 68 61 72 3a 0a |.......a|ddchar:.|
|000018c0| 09 09 09 69 66 20 28 70 | 70 74 72 20 3d 3d 20 2d |...if (p|ptr == -|
|000018d0| 31 29 0a 09 09 09 09 70 | 70 74 72 20 3d 20 30 3b |1).....p|ptr = 0;|
|000018e0| 0a 09 09 09 69 66 20 28 | 70 70 74 72 20 3d 3d 20 |....if (|pptr == |
|000018f0| 30 29 0a 09 09 09 09 73 | 75 63 63 65 73 73 20 3d |0).....s|uccess =|
|00001900| 20 54 52 55 45 3b 0a 09 | 09 09 70 61 74 5b 70 70 | TRUE;..|..pat[pp|
|00001910| 74 72 2b 2b 5d 20 3d 20 | 63 3b 0a 09 09 09 69 66 |tr++] = |c;....if|
|00001920| 20 28 70 70 74 72 20 3d | 3d 20 4e 50 41 54 29 20 | (pptr =|= NPAT) |
|00001930| 7b 0a 09 09 09 09 65 77 | 70 72 69 6e 74 66 28 22 |{.....ew|printf("|
|00001940| 50 61 74 74 65 72 6e 20 | 74 6f 6f 20 6c 6f 6e 67 |Pattern |too long|
|00001950| 22 29 3b 0a 09 09 09 09 | 72 65 74 75 72 6e 20 46 |");.....|return F|
|00001960| 41 4c 53 45 3b 0a 09 09 | 09 7d 0a 09 09 09 70 61 |ALSE;...|.}....pa|
|00001970| 74 5b 70 70 74 72 5d 20 | 3d 20 27 5c 30 27 3b 0a |t[pptr] |= '\0';.|
|00001980| 09 09 09 69 73 5f 6c 70 | 75 73 68 28 29 3b 0a 09 |...is_lp|ush();..|
|00001990| 09 09 69 66 20 28 73 75 | 63 63 65 73 73 20 21 3d |..if (su|ccess !=|
|000019a0| 20 46 41 4c 53 45 29 20 | 7b 0a 09 09 09 09 69 66 | FALSE) |{.....if|
|000019b0| 20 28 69 73 5f 66 69 6e | 64 28 64 69 72 29 20 21 | (is_fin|d(dir) !|
|000019c0| 3d 20 46 41 4c 53 45 29 | 0a 09 09 09 09 09 69 73 |= FALSE)|......is|
|000019d0| 5f 63 70 75 73 68 28 63 | 29 3b 0a 09 09 09 09 65 |_cpush(c|);.....e|
|000019e0| 6c 73 65 20 7b 0a 09 09 | 09 09 09 73 75 63 63 65 |lse {...|...succe|
|000019f0| 73 73 20 3d 20 46 41 4c | 53 45 3b 0a 09 09 09 09 |ss = FAL|SE;.....|
|00001a00| 09 74 74 62 65 65 70 28 | 29 3b 0a 09 09 09 09 09 |.ttbeep(|);......|
|00001a10| 69 73 5f 63 70 75 73 68 | 28 53 52 43 48 5f 41 43 |is_cpush|(SRCH_AC|
|00001a20| 43 4d 29 3b 0a 09 09 09 | 09 7d 0a 09 09 09 7d 20 |CM);....|.}....} |
|00001a30| 65 6c 73 65 0a 09 09 09 | 09 69 73 5f 63 70 75 73 |else....|.is_cpus|
|00001a40| 68 28 53 52 43 48 5f 41 | 43 43 4d 29 3b 0a 09 09 |h(SRCH_A|CCM);...|
|00001a50| 09 69 73 5f 70 72 6f 6d | 70 74 28 64 69 72 2c 20 |.is_prom|pt(dir, |
|00001a60| 46 41 4c 53 45 2c 20 73 | 75 63 63 65 73 73 29 3b |FALSE, s|uccess);|
|00001a70| 0a 09 09 7d 0a 09 7d 0a | 7d 0a 0a 69 73 5f 63 70 |...}..}.|}..is_cp|
|00001a80| 75 73 68 28 63 6d 64 29 | 20 72 65 67 69 73 74 65 |ush(cmd)| registe|
|00001a90| 72 20 69 6e 74 20 63 6d | 64 3b 20 7b 0a 09 69 66 |r int cm|d; {..if|
|00001aa0| 20 28 2b 2b 63 69 70 20 | 3e 3d 20 4e 53 52 43 48 | (++cip |>= NSRCH|
|00001ab0| 29 0a 09 09 63 69 70 20 | 3d 20 30 3b 0a 09 63 6d |)...cip |= 0;..cm|
|00001ac0| 64 73 5b 63 69 70 5d 2e | 73 5f 63 6f 64 65 20 3d |ds[cip].|s_code =|
|00001ad0| 20 63 6d 64 3b 0a 7d 0a | 0a 69 73 5f 6c 70 75 73 | cmd;.}.|.is_lpus|
|00001ae0| 68 28 29 20 7b 0a 09 72 | 65 67 69 73 74 65 72 20 |h() {..r|egister |
|00001af0| 69 6e 74 09 63 74 70 3b | 0a 0a 09 63 74 70 20 3d |int.ctp;|...ctp =|
|00001b00| 20 63 69 70 2b 31 3b 0a | 09 69 66 20 28 63 74 70 | cip+1;.|.if (ctp|
|00001b10| 20 3e 3d 20 4e 53 52 43 | 48 29 0a 09 09 63 74 70 | >= NSRC|H)...ctp|
|00001b20| 20 3d 20 30 3b 0a 09 63 | 6d 64 73 5b 63 74 70 5d | = 0;..c|mds[ctp]|
|00001b30| 2e 73 5f 63 6f 64 65 20 | 3d 20 53 52 43 48 5f 4e |.s_code |= SRCH_N|
|00001b40| 4f 50 52 3b 0a 09 63 6d | 64 73 5b 63 74 70 5d 2e |OPR;..cm|ds[ctp].|
|00001b50| 73 5f 64 6f 74 6f 20 3d | 20 63 75 72 77 70 2d 3e |s_doto =| curwp->|
|00001b60| 77 5f 64 6f 74 6f 3b 0a | 09 63 6d 64 73 5b 63 74 |w_doto;.|.cmds[ct|
|00001b70| 70 5d 2e 73 5f 64 6f 74 | 70 20 3d 20 63 75 72 77 |p].s_dot|p = curw|
|00001b80| 70 2d 3e 77 5f 64 6f 74 | 70 3b 0a 7d 0a 0a 69 73 |p->w_dot|p;.}..is|
|00001b90| 5f 70 6f 70 28 29 20 7b | 0a 09 69 66 20 28 63 6d |_pop() {|..if (cm|
|00001ba0| 64 73 5b 63 69 70 5d 2e | 73 5f 63 6f 64 65 20 21 |ds[cip].|s_code !|
|00001bb0| 3d 20 53 52 43 48 5f 4e | 4f 50 52 29 20 7b 0a 09 |= SRCH_N|OPR) {..|
|00001bc0| 09 63 75 72 77 70 2d 3e | 77 5f 64 6f 74 6f 20 20 |.curwp->|w_doto |
|00001bd0| 3d 20 63 6d 64 73 5b 63 | 69 70 5d 2e 73 5f 64 6f |= cmds[c|ip].s_do|
|00001be0| 74 6f 3b 20 0a 09 09 63 | 75 72 77 70 2d 3e 77 5f |to; ...c|urwp->w_|
|00001bf0| 64 6f 74 70 20 20 3d 20 | 63 6d 64 73 5b 63 69 70 |dotp = |cmds[cip|
|00001c00| 5d 2e 73 5f 64 6f 74 70 | 3b 0a 09 09 63 75 72 77 |].s_dotp|;...curw|
|00001c10| 70 2d 3e 77 5f 66 6c 61 | 67 20 7c 3d 20 57 46 4d |p->w_fla|g |= WFM|
|00001c20| 4f 56 45 3b 0a 09 09 63 | 6d 64 73 5b 63 69 70 5d |OVE;...c|mds[cip]|
|00001c30| 2e 73 5f 63 6f 64 65 20 | 3d 20 53 52 43 48 5f 4e |.s_code |= SRCH_N|
|00001c40| 4f 50 52 3b 0a 09 7d 0a | 09 69 66 20 28 2d 2d 63 |OPR;..}.|.if (--c|
|00001c50| 69 70 20 3c 3d 20 30 29 | 0a 09 09 63 69 70 20 3d |ip <= 0)|...cip =|
|00001c60| 20 4e 53 52 43 48 2d 31 | 3b 0a 7d 0a 0a 69 73 5f | NSRCH-1|;.}..is_|
|00001c70| 70 65 65 6b 28 29 20 7b | 0a 09 72 65 74 75 72 6e |peek() {|..return|
|00001c80| 20 63 6d 64 73 5b 63 69 | 70 5d 2e 73 5f 63 6f 64 | cmds[ci|p].s_cod|
|00001c90| 65 3b 0a 7d 0a 0a 69 73 | 5f 75 6e 64 6f 28 70 70 |e;.}..is|_undo(pp|
|00001ca0| 74 72 2c 20 64 69 72 29 | 20 72 65 67 69 73 74 65 |tr, dir)| registe|
|00001cb0| 72 20 69 6e 74 20 2a 70 | 70 74 72 3b 20 72 65 67 |r int *p|ptr; reg|
|00001cc0| 69 73 74 65 72 20 69 6e | 74 20 2a 64 69 72 3b 20 |ister in|t *dir; |
|00001cd0| 7b 0a 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 09 |{..regis|ter int.|
|00001ce0| 72 65 64 6f 20 3d 20 46 | 41 4c 53 45 20 3b 0a 09 |redo = F|ALSE ;..|
|00001cf0| 73 77 69 74 63 68 20 28 | 63 6d 64 73 5b 63 69 70 |switch (|cmds[cip|
|00001d00| 5d 2e 73 5f 63 6f 64 65 | 29 20 7b 0a 09 63 61 73 |].s_code|) {..cas|
|00001d10| 65 20 53 52 43 48 5f 42 | 45 47 49 4e 3a 0a 09 63 |e SRCH_B|EGIN:..c|
|00001d20| 61 73 65 20 53 52 43 48 | 5f 4e 4f 50 52 3a 0a 09 |ase SRCH|_NOPR:..|
|00001d30| 09 2a 70 70 74 72 20 3d | 20 2d 31 3b 0a 09 63 61 |.*pptr =| -1;..ca|
|00001d40| 73 65 20 53 52 43 48 5f | 4d 41 52 4b 3a 0a 09 09 |se SRCH_|MARK:...|
|00001d50| 62 72 65 61 6b 3b 0a 0a | 09 63 61 73 65 20 53 52 |break;..|.case SR|
|00001d60| 43 48 5f 46 4f 52 57 3a | 0a 09 09 2a 64 69 72 20 |CH_FORW:|...*dir |
|00001d70| 3d 20 53 52 43 48 5f 42 | 41 43 4b 3b 0a 09 09 72 |= SRCH_B|ACK;...r|
|00001d80| 65 64 6f 20 3d 20 54 52 | 55 45 3b 0a 09 09 62 72 |edo = TR|UE;...br|
|00001d90| 65 61 6b 3b 0a 0a 09 63 | 61 73 65 20 53 52 43 48 |eak;...c|ase SRCH|
|00001da0| 5f 42 41 43 4b 3a 0a 09 | 09 2a 64 69 72 20 3d 20 |_BACK:..|.*dir = |
|00001db0| 53 52 43 48 5f 46 4f 52 | 57 3b 0a 09 09 72 65 64 |SRCH_FOR|W;...red|
|00001dc0| 6f 20 3d 20 54 52 55 45 | 3b 0a 09 09 62 72 65 61 |o = TRUE|;...brea|
|00001dd0| 6b 3b 0a 0a 09 63 61 73 | 65 20 53 52 43 48 5f 41 |k;...cas|e SRCH_A|
|00001de0| 43 43 4d 3a 0a 09 64 65 | 66 61 75 6c 74 3a 0a 09 |CCM:..de|fault:..|
|00001df0| 09 2a 70 70 74 72 20 2d | 3d 20 31 3b 0a 09 09 69 |.*pptr -|= 1;...i|
|00001e00| 66 20 28 2a 70 70 74 72 | 20 3c 20 30 29 0a 09 09 |f (*pptr| < 0)...|
|00001e10| 09 2a 70 70 74 72 20 3d | 20 30 3b 0a 09 09 70 61 |.*pptr =| 0;...pa|
|00001e20| 74 5b 2a 70 70 74 72 5d | 20 3d 20 27 5c 30 27 3b |t[*pptr]| = '\0';|
|00001e30| 0a 09 09 62 72 65 61 6b | 3b 0a 09 7d 0a 09 69 73 |...break|;..}..is|
|00001e40| 5f 70 6f 70 28 29 3b 0a | 09 69 66 20 28 72 65 64 |_pop();.|.if (red|
|00001e50| 6f 29 20 72 65 74 75 72 | 6e 20 69 73 5f 75 6e 64 |o) retur|n is_und|
|00001e60| 6f 28 70 70 74 72 2c 20 | 64 69 72 29 3b 0a 09 72 |o(pptr, |dir);..r|
|00001e70| 65 74 75 72 6e 20 28 54 | 52 55 45 29 3b 0a 7d 0a |eturn (T|RUE);.}.|
|00001e80| 0a 69 73 5f 66 69 6e 64 | 28 64 69 72 29 20 72 65 |.is_find|(dir) re|
|00001e90| 67 69 73 74 65 72 20 69 | 6e 74 20 64 69 72 3b 20 |gister i|nt dir; |
|00001ea0| 7b 0a 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 09 |{..regis|ter int.|
|00001eb0| 70 6c 65 6e 2c 20 6f 64 | 6f 74 6f 3b 0a 09 72 65 |plen, od|oto;..re|
|00001ec0| 67 69 73 74 65 72 20 4c | 49 4e 45 09 2a 6f 64 6f |gister L|INE.*odo|
|00001ed0| 74 70 20 3b 0a 0a 09 6f | 64 6f 74 6f 20 3d 20 63 |tp ;...o|doto = c|
|00001ee0| 75 72 77 70 2d 3e 77 5f | 64 6f 74 6f 3b 0a 09 6f |urwp->w_|doto;..o|
|00001ef0| 64 6f 74 70 20 3d 20 63 | 75 72 77 70 2d 3e 77 5f |dotp = c|urwp->w_|
|00001f00| 64 6f 74 70 3b 0a 09 70 | 6c 65 6e 20 3d 20 73 74 |dotp;..p|len = st|
|00001f10| 72 6c 65 6e 28 70 61 74 | 29 3b 0a 09 69 66 20 28 |rlen(pat|);..if (|
|00001f20| 70 6c 65 6e 20 21 3d 20 | 30 29 20 7b 0a 09 09 69 |plen != |0) {...i|
|00001f30| 66 20 28 64 69 72 3d 3d | 53 52 43 48 5f 46 4f 52 |f (dir==|SRCH_FOR|
|00001f40| 57 29 20 7b 0a 09 09 09 | 28 56 4f 49 44 29 20 62 |W) {....|(VOID) b|
|00001f50| 61 63 6b 63 68 61 72 28 | 54 52 55 45 2c 20 70 6c |ackchar(|TRUE, pl|
|00001f60| 65 6e 2c 20 4b 52 41 4e | 44 4f 4d 29 3b 0a 09 09 |en, KRAN|DOM);...|
|00001f70| 09 69 66 20 28 66 6f 72 | 77 73 72 63 68 28 29 20 |.if (for|wsrch() |
|00001f80| 3d 3d 20 46 41 4c 53 45 | 29 20 7b 0a 09 09 09 09 |== FALSE|) {.....|
|00001f90| 63 75 72 77 70 2d 3e 77 | 5f 64 6f 74 6f 20 3d 20 |curwp->w|_doto = |
|00001fa0| 6f 64 6f 74 6f 3b 0a 09 | 09 09 09 63 75 72 77 70 |odoto;..|...curwp|
|00001fb0| 2d 3e 77 5f 64 6f 74 70 | 20 3d 20 6f 64 6f 74 70 |->w_dotp| = odotp|
|00001fc0| 3b 0a 09 09 09 09 72 65 | 74 75 72 6e 20 28 46 41 |;.....re|turn (FA|
|00001fd0| 4c 53 45 29 3b 0a 09 09 | 09 7d 0a 09 09 09 72 65 |LSE);...|.}....re|
|00001fe0| 74 75 72 6e 20 28 54 52 | 55 45 29 3b 0a 09 09 7d |turn (TR|UE);...}|
|00001ff0| 0a 09 09 69 66 20 28 64 | 69 72 3d 3d 53 52 43 48 |...if (d|ir==SRCH|
|00002000| 5f 42 41 43 4b 29 20 7b | 0a 09 09 09 28 56 4f 49 |_BACK) {|....(VOI|
|00002010| 44 29 20 66 6f 72 77 63 | 68 61 72 28 54 52 55 45 |D) forwc|har(TRUE|
|00002020| 2c 20 70 6c 65 6e 2c 20 | 4b 52 41 4e 44 4f 4d 29 |, plen, |KRANDOM)|
|00002030| 3b 0a 09 09 09 69 66 20 | 28 62 61 63 6b 73 72 63 |;....if |(backsrc|
|00002040| 68 28 29 20 3d 3d 20 46 | 41 4c 53 45 29 20 7b 0a |h() == F|ALSE) {.|
|00002050| 09 09 09 09 63 75 72 77 | 70 2d 3e 77 5f 64 6f 74 |....curw|p->w_dot|
|00002060| 6f 20 3d 20 6f 64 6f 74 | 6f 3b 0a 09 09 09 09 63 |o = odot|o;.....c|
|00002070| 75 72 77 70 2d 3e 77 5f | 64 6f 74 70 20 3d 20 6f |urwp->w_|dotp = o|
|00002080| 64 6f 74 70 3b 0a 09 09 | 09 09 72 65 74 75 72 6e |dotp;...|..return|
|00002090| 20 28 46 41 4c 53 45 29 | 3b 0a 09 09 09 7d 0a 09 | (FALSE)|;....}..|
|000020a0| 09 09 72 65 74 75 72 6e | 20 28 54 52 55 45 29 3b |..return| (TRUE);|
|000020b0| 0a 09 09 7d 0a 09 09 65 | 77 70 72 69 6e 74 66 28 |...}...e|wprintf(|
|000020c0| 22 62 61 64 20 63 61 6c | 6c 20 74 6f 20 69 73 5f |"bad cal|l to is_|
|000020d0| 66 69 6e 64 22 29 3b 0a | 09 09 72 65 74 75 72 6e |find");.|..return|
|000020e0| 20 46 41 4c 53 45 3b 0a | 09 7d 0a 09 72 65 74 75 | FALSE;.|.}..retu|
|000020f0| 72 6e 20 28 46 41 4c 53 | 45 29 3b 0a 7d 0a 0a 2f |rn (FALS|E);.}../|
|00002100| 2a 0a 20 2a 20 49 66 20 | 63 61 6c 6c 65 64 20 77 |*. * If |called w|
|00002110| 69 74 68 20 22 64 69 72 | 22 20 6e 6f 74 20 6f 6e |ith "dir|" not on|
|00002120| 65 20 6f 66 20 53 52 43 | 48 5f 46 4f 52 57 0a 20 |e of SRC|H_FORW. |
|00002130| 2a 20 6f 72 20 53 52 43 | 48 5f 42 41 43 4b 2c 20 |* or SRC|H_BACK, |
|00002140| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 75 73 65 |this rou|tine use|
|00002150| 64 20 74 6f 20 70 72 69 | 6e 74 20 61 6e 20 65 72 |d to pri|nt an er|
|00002160| 72 6f 72 0a 20 2a 20 6d | 65 73 73 61 67 65 2e 20 |ror. * m|essage. |
|00002170| 49 74 20 61 6c 73 6f 20 | 75 73 65 64 20 74 6f 20 |It also |used to |
|00002180| 72 65 74 75 72 6e 20 54 | 52 55 45 20 6f 72 20 46 |return T|RUE or F|
|00002190| 41 4c 53 45 2c 0a 20 2a | 20 64 65 70 65 6e 64 69 |ALSE,. *| dependi|
|000021a0| 6e 67 20 6f 6e 20 69 66 | 20 69 74 20 6c 69 6b 65 |ng on if| it like|
|000021b0| 64 20 74 68 65 20 22 64 | 69 72 22 2e 20 48 6f 77 |d the "d|ir". How|
|000021c0| 65 76 65 72 2c 20 6e 6f | 6e 65 0a 20 2a 20 6f 66 |ever, no|ne. * of|
|000021d0| 20 74 68 65 20 63 61 6c | 6c 65 72 73 20 6c 6f 6f | the cal|lers loo|
|000021e0| 6b 65 64 20 61 74 20 74 | 68 65 20 73 74 61 74 75 |ked at t|he statu|
|000021f0| 73 2c 20 73 6f 20 49 20 | 6a 75 73 74 0a 20 2a 20 |s, so I |just. * |
|00002200| 6d 61 64 65 20 74 68 65 | 20 63 68 65 63 6b 69 6e |made the| checkin|
|00002210| 67 20 76 61 6e 69 73 68 | 2e 0a 20 2a 2f 0a 69 73 |g vanish|.. */.is|
|00002220| 5f 70 72 6f 6d 70 74 28 | 64 69 72 2c 20 66 6c 61 |_prompt(|dir, fla|
|00002230| 67 2c 20 73 75 63 63 65 | 73 73 29 20 7b 0a 09 56 |g, succe|ss) {..V|
|00002240| 4f 49 44 20 69 73 5f 64 | 73 70 6c 28 29 3b 0a 0a |OID is_d|spl();..|
|00002250| 09 69 66 20 28 64 69 72 | 20 3d 3d 20 53 52 43 48 |.if (dir| == SRCH|
|00002260| 5f 46 4f 52 57 29 20 7b | 0a 09 09 69 66 20 28 73 |_FORW) {|...if (s|
|00002270| 75 63 63 65 73 73 20 21 | 3d 20 46 41 4c 53 45 29 |uccess !|= FALSE)|
|00002280| 0a 09 09 09 69 73 5f 64 | 73 70 6c 28 22 49 2d 73 |....is_d|spl("I-s|
|00002290| 65 61 72 63 68 22 2c 20 | 66 6c 61 67 29 3b 0a 09 |earch", |flag);..|
|000022a0| 09 65 6c 73 65 0a 09 09 | 09 69 73 5f 64 73 70 6c |.else...|.is_dspl|
|000022b0| 28 22 46 61 69 6c 69 6e | 67 20 49 2d 73 65 61 72 |("Failin|g I-sear|
|000022c0| 63 68 22 2c 20 66 6c 61 | 67 29 3b 0a 09 7d 20 65 |ch", fla|g);..} e|
|000022d0| 6c 73 65 20 69 66 20 28 | 64 69 72 20 3d 3d 20 53 |lse if (|dir == S|
|000022e0| 52 43 48 5f 42 41 43 4b | 29 20 7b 0a 09 09 69 66 |RCH_BACK|) {...if|
|000022f0| 20 28 73 75 63 63 65 73 | 73 20 21 3d 20 46 41 4c | (succes|s != FAL|
|00002300| 53 45 29 0a 09 09 09 69 | 73 5f 64 73 70 6c 28 22 |SE)....i|s_dspl("|
|00002310| 49 2d 73 65 61 72 63 68 | 20 62 61 63 6b 77 61 72 |I-search| backwar|
|00002320| 64 22 2c 20 66 6c 61 67 | 29 3b 0a 09 09 65 6c 73 |d", flag|);...els|
|00002330| 65 0a 09 09 09 69 73 5f | 64 73 70 6c 28 22 46 61 |e....is_|dspl("Fa|
|00002340| 69 6c 69 6e 67 20 49 2d | 73 65 61 72 63 68 20 62 |iling I-|search b|
|00002350| 61 63 6b 77 61 72 64 22 | 2c 20 66 6c 61 67 29 3b |ackward"|, flag);|
|00002360| 0a 09 7d 20 65 6c 73 65 | 20 65 77 70 72 69 6e 74 |..} else| ewprint|
|00002370| 66 28 22 42 72 6f 6b 65 | 6e 20 63 61 6c 6c 20 74 |f("Broke|n call t|
|00002380| 6f 20 69 73 5f 70 72 6f | 6d 70 74 22 29 3b 0a 7d |o is_pro|mpt");.}|
|00002390| 0a 0a 2f 2a 0a 20 2a 20 | 50 72 6f 6d 70 74 20 77 |../*. * |Prompt w|
|000023a0| 72 69 74 69 6e 67 20 72 | 6f 75 74 69 6e 65 20 66 |riting r|outine f|
|000023b0| 6f 72 20 74 68 65 20 69 | 6e 63 72 65 6d 65 6e 74 |or the i|ncrement|
|000023c0| 61 6c 20 73 65 61 72 63 | 68 2e 20 0a 20 2a 20 54 |al searc|h. . * T|
|000023d0| 68 65 20 22 70 72 6f 6d | 70 74 22 20 69 73 20 6a |he "prom|pt" is j|
|000023e0| 75 73 74 20 61 20 73 74 | 72 69 6e 67 2e 20 54 68 |ust a st|ring. Th|
|000023f0| 65 20 22 66 6c 61 67 22 | 20 64 65 74 65 72 6d 69 |e "flag"| determi|
|00002400| 6e 65 73 0a 20 2a 20 77 | 68 65 74 68 65 72 20 70 |nes. * w|hether p|
|00002410| 61 74 20 73 68 6f 75 6c | 64 20 62 65 20 70 72 69 |at shoul|d be pri|
|00002420| 6e 74 65 64 2e 0a 20 2a | 2f 0a 56 4f 49 44 0a 69 |nted.. *|/.VOID.i|
|00002430| 73 5f 64 73 70 6c 28 70 | 72 6f 6d 70 74 2c 20 66 |s_dspl(p|rompt, f|
|00002440| 6c 61 67 29 20 63 68 61 | 72 20 2a 70 72 6f 6d 70 |lag) cha|r *promp|
|00002450| 74 3b 20 7b 0a 0a 09 69 | 66 20 28 6b 62 64 6d 6f |t; {...i|f (kbdmo|
|00002460| 70 20 21 3d 20 4e 55 4c | 4c 29 20 72 65 74 75 72 |p != NUL|L) retur|
|00002470| 6e 3b 0a 09 69 66 20 28 | 66 6c 61 67 20 21 3d 20 |n;..if (|flag != |
|00002480| 46 41 4c 53 45 29 0a 09 | 09 65 77 70 72 69 6e 74 |FALSE)..|.ewprint|
|00002490| 66 28 22 25 73 3a 20 22 | 2c 20 70 72 6f 6d 70 74 |f("%s: "|, prompt|
|000024a0| 29 3b 0a 09 65 6c 73 65 | 0a 09 09 65 77 70 72 69 |);..else|...ewpri|
|000024b0| 6e 74 66 28 22 25 73 3a | 20 25 73 22 2c 20 70 72 |ntf("%s:| %s", pr|
|000024c0| 6f 6d 70 74 2c 20 70 61 | 74 29 3b 0a 7d 0a 0a 2f |ompt, pa|t);.}../|
|000024d0| 2a 0a 20 2a 20 51 75 65 | 72 79 20 52 65 70 6c 61 |*. * Que|ry Repla|
|000024e0| 63 65 2e 0a 20 2a 09 52 | 65 70 6c 61 63 65 20 73 |ce.. *.R|eplace s|
|000024f0| 74 72 69 6e 67 73 20 73 | 65 6c 65 63 74 69 76 65 |trings s|elective|
|00002500| 6c 79 2e 20 20 44 6f 65 | 73 20 61 20 73 65 61 72 |ly. Doe|s a sear|
|00002510| 63 68 20 61 6e 64 20 72 | 65 70 6c 61 63 65 20 6f |ch and r|eplace o|
|00002520| 70 65 72 61 74 69 6f 6e | 2e 0a 20 2a 2f 0a 2f 2a |peration|.. */./*|
|00002530| 41 52 47 53 55 53 45 44 | 2a 2f 0a 71 75 65 72 79 |ARGSUSED|*/.query|
|00002540| 72 65 70 6c 28 66 2c 20 | 6e 2c 20 6b 29 20 7b 0a |repl(f, |n, k) {.|
|00002550| 09 72 65 67 69 73 74 65 | 72 20 69 6e 74 09 73 3b |.registe|r int.s;|
|00002560| 0a 09 72 65 67 69 73 74 | 65 72 20 69 6e 74 09 72 |..regist|er int.r|
|00002570| 63 6e 74 20 3d 20 30 3b | 09 2f 2a 20 52 65 70 6c |cnt = 0;|./* Repl|
|00002580| 61 63 65 6d 65 6e 74 73 | 20 6d 61 64 65 20 73 6f |acements| made so|
|00002590| 20 66 61 72 09 2a 2f 0a | 09 72 65 67 69 73 74 65 | far.*/.|.registe|
|000025a0| 72 20 69 6e 74 09 70 6c | 65 6e 3b 09 09 2f 2a 20 |r int.pl|en;../* |
|000025b0| 6c 65 6e 67 74 68 20 6f | 66 20 66 6f 75 6e 64 20 |length o|f found |
|000025c0| 73 74 72 69 6e 67 09 2a | 2f 0a 09 63 68 61 72 09 |string.*|/..char.|
|000025d0| 09 6e 65 77 73 5b 4e 50 | 41 54 5d 3b 09 2f 2a 20 |.news[NP|AT];./* |
|000025e0| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 73 74 72 69 |replacem|ent stri|
|000025f0| 6e 67 09 09 2a 2f 0a 0a | 09 69 66 20 28 28 73 3d |ng..*/..|.if ((s=|
|00002600| 72 65 61 64 70 61 74 74 | 65 72 6e 28 22 51 75 65 |readpatt|ern("Que|
|00002610| 72 79 20 72 65 70 6c 61 | 63 65 22 29 29 20 21 3d |ry repla|ce")) !=|
|00002620| 20 54 52 55 45 29 0a 09 | 09 72 65 74 75 72 6e 20 | TRUE)..|.return |
|00002630| 28 73 29 3b 0a 09 69 66 | 20 28 28 73 3d 65 72 65 |(s);..if| ((s=ere|
|00002640| 70 6c 79 28 22 51 75 65 | 72 79 20 72 65 70 6c 61 |ply("Que|ry repla|
|00002650| 63 65 20 25 73 20 77 69 | 74 68 3a 20 22 2c 6e 65 |ce %s wi|th: ",ne|
|00002660| 77 73 2c 20 4e 50 41 54 | 2c 20 70 61 74 29 29 20 |ws, NPAT|, pat)) |
|00002670| 3d 3d 20 41 42 4f 52 54 | 29 0a 09 09 72 65 74 75 |== ABORT|)...retu|
|00002680| 72 6e 20 28 73 29 3b 0a | 09 69 66 20 28 73 20 3d |rn (s);.|.if (s =|
|00002690| 3d 20 46 41 4c 53 45 29 | 0a 09 09 6e 65 77 73 5b |= FALSE)|...news[|
|000026a0| 30 5d 20 3d 20 27 5c 30 | 27 3b 0a 09 69 66 20 28 |0] = '\0|';..if (|
|000026b0| 6b 62 64 6d 6f 70 20 3d | 3d 20 4e 55 4c 4c 29 20 |kbdmop =|= NULL) |
|000026c0| 65 77 70 72 69 6e 74 66 | 28 22 51 75 65 72 79 20 |ewprintf|("Query |
|000026d0| 72 65 70 6c 61 63 69 6e | 67 20 25 73 20 77 69 74 |replacin|g %s wit|
|000026e0| 68 20 25 73 3a 22 2c 20 | 70 61 74 2c 20 6e 65 77 |h %s:", |pat, new|
|000026f0| 73 29 3b 0a 09 70 6c 65 | 6e 20 3d 20 73 74 72 6c |s);..ple|n = strl|
|00002700| 65 6e 28 70 61 74 29 3b | 0a 0a 09 2f 2a 0a 09 20 |en(pat);|.../*.. |
|00002710| 2a 20 53 65 61 72 63 68 | 20 66 6f 72 77 61 72 64 |* Search| forward|
|00002720| 20 72 65 70 65 61 74 65 | 64 6c 79 2c 20 63 68 65 | repeate|dly, che|
|00002730| 63 6b 69 6e 67 20 65 61 | 63 68 20 74 69 6d 65 20 |cking ea|ch time |
|00002740| 77 68 65 74 68 65 72 20 | 74 6f 20 69 6e 73 65 72 |whether |to inser|
|00002750| 74 0a 09 20 2a 20 6f 72 | 20 6e 6f 74 2e 20 20 54 |t.. * or| not. T|
|00002760| 68 65 20 22 21 22 20 63 | 61 73 65 20 6d 61 6b 65 |he "!" c|ase make|
|00002770| 73 20 74 68 65 20 63 68 | 65 63 6b 20 61 6c 77 61 |s the ch|eck alwa|
|00002780| 79 73 20 74 72 75 65 2c | 20 73 6f 20 69 74 20 67 |ys true,| so it g|
|00002790| 65 74 73 20 70 75 74 0a | 09 20 2a 20 69 6e 74 6f |ets put.|. * into|
|000027a0| 20 61 20 74 69 67 68 74 | 65 72 20 6c 6f 6f 70 20 | a tight|er loop |
|000027b0| 66 6f 72 20 65 66 66 69 | 63 69 65 6e 63 79 2e 0a |for effi|ciency..|
|000027c0| 09 20 2a 2f 0a 0a 09 77 | 68 69 6c 65 20 28 66 6f |. */...w|hile (fo|
|000027d0| 72 77 73 72 63 68 28 29 | 20 3d 3d 20 54 52 55 45 |rwsrch()| == TRUE|
|000027e0| 29 20 7b 0a 09 72 65 74 | 72 79 3a 0a 09 09 75 70 |) {..ret|ry:...up|
|000027f0| 64 61 74 65 28 29 3b 0a | 09 09 73 77 69 74 63 68 |date();.|..switch|
|00002800| 20 28 67 65 74 6b 65 79 | 28 4b 51 55 4f 54 45 29 | (getkey|(KQUOTE)|
|00002810| 29 20 7b 0a 09 09 63 61 | 73 65 20 27 20 27 3a 0a |) {...ca|se ' ':.|
|00002820| 09 09 09 69 66 20 28 6c | 72 65 70 6c 61 63 65 28 |...if (l|replace(|
|00002830| 28 52 53 49 5a 45 29 20 | 70 6c 65 6e 2c 20 6e 65 |(RSIZE) |plen, ne|
|00002840| 77 73 2c 20 66 29 20 3d | 3d 20 46 41 4c 53 45 29 |ws, f) =|= FALSE)|
|00002850| 0a 09 09 09 09 72 65 74 | 75 72 6e 20 28 46 41 4c |.....ret|urn (FAL|
|00002860| 53 45 29 3b 0a 09 09 09 | 72 63 6e 74 2b 2b 3b 0a |SE);....|rcnt++;.|
|00002870| 09 09 09 62 72 65 61 6b | 3b 0a 0a 09 09 63 61 73 |...break|;....cas|
|00002880| 65 20 27 2e 27 3a 0a 09 | 09 09 69 66 20 28 6c 72 |e '.':..|..if (lr|
|00002890| 65 70 6c 61 63 65 28 28 | 52 53 49 5a 45 29 20 70 |eplace((|RSIZE) p|
|000028a0| 6c 65 6e 2c 20 6e 65 77 | 73 2c 20 66 29 20 3d 3d |len, new|s, f) ==|
|000028b0| 20 46 41 4c 53 45 29 0a | 09 09 09 09 72 65 74 75 | FALSE).|....retu|
|000028c0| 72 6e 20 28 46 41 4c 53 | 45 29 3b 0a 09 09 09 72 |rn (FALS|E);....r|
|000028d0| 63 6e 74 2b 2b 3b 0a 09 | 09 09 67 6f 74 6f 20 73 |cnt++;..|..goto s|
|000028e0| 74 6f 70 73 65 61 72 63 | 68 3b 0a 0a 09 09 63 61 |topsearc|h;....ca|
|000028f0| 73 65 20 43 43 48 52 28 | 27 47 27 29 3a 09 2f 2a |se CCHR(|'G'):./*|
|00002900| 20 5e 47 20 6f 72 20 45 | 53 43 20 2a 2f 0a 09 09 | ^G or E|SC */...|
|00002910| 09 28 56 4f 49 44 29 20 | 63 74 72 6c 67 28 46 41 |.(VOID) |ctrlg(FA|
|00002920| 4c 53 45 2c 20 30 2c 20 | 4b 52 41 4e 44 4f 4d 29 |LSE, 0, |KRANDOM)|
|00002930| 3b 0a 09 09 63 61 73 65 | 20 30 33 33 3a 0a 09 09 |;...case| 033:...|
|00002940| 09 67 6f 74 6f 20 73 74 | 6f 70 73 65 61 72 63 68 |.goto st|opsearch|
|00002950| 3b 0a 0a 09 09 63 61 73 | 65 20 27 21 27 3a 0a 09 |;....cas|e '!':..|
|00002960| 09 09 64 6f 20 7b 0a 09 | 09 09 09 69 66 20 28 6c |..do {..|...if (l|
|00002970| 72 65 70 6c 61 63 65 28 | 28 52 53 49 5a 45 29 20 |replace(|(RSIZE) |
|00002980| 70 6c 65 6e 2c 20 6e 65 | 77 73 2c 20 66 29 20 3d |plen, ne|ws, f) =|
|00002990| 3d 20 46 41 4c 53 45 29 | 0a 09 09 09 09 09 72 65 |= FALSE)|......re|
|000029a0| 74 75 72 6e 20 28 46 41 | 4c 53 45 29 3b 0a 09 09 |turn (FA|LSE);...|
|000029b0| 09 09 72 63 6e 74 2b 2b | 3b 0a 09 09 09 7d 20 77 |..rcnt++|;....} w|
|000029c0| 68 69 6c 65 20 28 66 6f | 72 77 73 72 63 68 28 29 |hile (fo|rwsrch()|
|000029d0| 20 3d 3d 20 54 52 55 45 | 29 3b 0a 09 09 09 67 6f | == TRUE|);....go|
|000029e0| 74 6f 20 73 74 6f 70 73 | 65 61 72 63 68 3b 0a 0a |to stops|earch;..|
|000029f0| 09 09 63 61 73 65 20 30 | 78 37 46 3a 09 09 2f 2a |..case 0|x7F:../*|
|00002a00| 20 54 6f 20 6e 6f 74 20 | 72 65 70 6c 61 63 65 20 | To not |replace |
|00002a10| 2a 2f 0a 09 09 09 62 72 | 65 61 6b 3b 0a 0a 09 09 |*/....br|eak;....|
|00002a20| 64 65 66 61 75 6c 74 3a | 0a 65 77 70 72 69 6e 74 |default:|.ewprint|
|00002a30| 66 28 22 3c 53 50 3e 20 | 72 65 70 6c 61 63 65 2c |f("<SP> |replace,|
|00002a40| 20 5b 2e 5d 20 72 65 70 | 2d 65 6e 64 2c 20 3c 44 | [.] rep|-end, <D|
|00002a50| 45 4c 3e 20 64 6f 6e 27 | 74 2c 20 5b 21 5d 20 72 |EL> don'|t, [!] r|
|00002a60| 65 70 6c 20 72 65 73 74 | 20 3c 45 53 43 3e 20 71 |epl rest| <ESC> q|
|00002a70| 75 69 74 22 29 3b 0a 09 | 09 09 67 6f 74 6f 20 72 |uit");..|..goto r|
|00002a80| 65 74 72 79 3b 0a 09 09 | 7d 0a 09 7d 0a 73 74 6f |etry;...|}..}.sto|
|00002a90| 70 73 65 61 72 63 68 3a | 0a 09 63 75 72 77 70 2d |psearch:|..curwp-|
|00002aa0| 3e 77 5f 66 6c 61 67 20 | 7c 3d 20 57 46 48 41 52 |>w_flag ||= WFHAR|
|00002ab0| 44 3b 0a 09 75 70 64 61 | 74 65 28 29 3b 0a 09 69 |D;..upda|te();..i|
|00002ac0| 66 20 28 6b 62 64 6d 6f | 70 20 3d 3d 20 4e 55 4c |f (kbdmo|p == NUL|
|00002ad0| 4c 29 20 7b 0a 09 09 69 | 66 20 28 72 63 6e 74 20 |L) {...i|f (rcnt |
|00002ae0| 3d 3d 20 30 29 0a 09 09 | 09 65 77 70 72 69 6e 74 |== 0)...|.ewprint|
|00002af0| 66 28 22 28 4e 6f 20 72 | 65 70 6c 61 63 65 6d 65 |f("(No r|eplaceme|
|00002b00| 6e 74 73 20 64 6f 6e 65 | 29 22 29 3b 0a 09 09 65 |nts done|)");...e|
|00002b10| 6c 73 65 20 69 66 20 28 | 72 63 6e 74 20 3d 3d 20 |lse if (|rcnt == |
|00002b20| 31 29 0a 09 09 09 65 77 | 70 72 69 6e 74 66 28 22 |1)....ew|printf("|
|00002b30| 28 31 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 20 64 |(1 repla|cement d|
|00002b40| 6f 6e 65 29 22 29 3b 0a | 09 09 65 6c 73 65 0a 09 |one)");.|..else..|
|00002b50| 09 09 65 77 70 72 69 6e | 74 66 28 22 28 25 64 20 |..ewprin|tf("(%d |
|00002b60| 72 65 70 6c 61 63 65 6d | 65 6e 74 73 20 64 6f 6e |replacem|ents don|
|00002b70| 65 29 22 2c 20 72 63 6e | 74 29 3b 0a 09 7d 0a 09 |e)", rcn|t);..}..|
|00002b80| 72 65 74 75 72 6e 20 54 | 52 55 45 3b 0a 7d 0a 0a |return T|RUE;.}..|
|00002b90| 2f 2a 0a 20 2a 20 54 68 | 69 73 20 72 6f 75 74 69 |/*. * Th|is routi|
|00002ba0| 6e 65 20 64 6f 65 73 20 | 74 68 65 20 72 65 61 6c |ne does |the real|
|00002bb0| 20 77 6f 72 6b 20 6f 66 | 20 61 0a 20 2a 20 66 6f | work of| a. * fo|
|00002bc0| 72 77 61 72 64 20 73 65 | 61 72 63 68 2e 20 54 68 |rward se|arch. Th|
|00002bd0| 65 20 70 61 74 74 65 72 | 6e 20 69 73 20 73 69 74 |e patter|n is sit|
|00002be0| 74 69 6e 67 20 69 6e 20 | 74 68 65 20 65 78 74 65 |ting in |the exte|
|00002bf0| 72 6e 61 6c 0a 20 2a 20 | 76 61 72 69 61 62 6c 65 |rnal. * |variable|
|00002c00| 20 22 70 61 74 22 2e 20 | 49 66 20 66 6f 75 6e 64 | "pat". |If found|
|00002c10| 2c 20 64 6f 74 20 69 73 | 20 75 70 64 61 74 65 64 |, dot is| updated|
|00002c20| 2c 20 74 68 65 20 77 69 | 6e 64 6f 77 20 73 79 73 |, the wi|ndow sys|
|00002c30| 74 65 6d 0a 20 2a 20 69 | 73 20 6e 6f 74 69 66 69 |tem. * i|s notifi|
|00002c40| 65 64 20 6f 66 20 74 68 | 65 20 63 68 61 6e 67 65 |ed of th|e change|
|00002c50| 2c 20 61 6e 64 20 54 52 | 55 45 20 69 73 20 72 65 |, and TR|UE is re|
|00002c60| 74 75 72 6e 65 64 2e 20 | 49 66 20 74 68 65 0a 20 |turned. |If the. |
|00002c70| 2a 20 73 74 72 69 6e 67 | 20 69 73 6e 27 74 20 66 |* string| isn't f|
|00002c80| 6f 75 6e 64 2c 20 46 41 | 4c 53 45 20 69 73 20 72 |ound, FA|LSE is r|
|00002c90| 65 74 75 72 6e 65 64 2e | 0a 20 2a 2f 0a 66 6f 72 |eturned.|. */.for|
|00002ca0| 77 73 72 63 68 28 29 20 | 7b 0a 09 72 65 67 69 73 |wsrch() |{..regis|
|00002cb0| 74 65 72 20 4c 49 4e 45 | 09 2a 63 6c 70 3b 0a 09 |ter LINE|.*clp;..|
|00002cc0| 72 65 67 69 73 74 65 72 | 20 69 6e 74 09 63 62 6f |register| int.cbo|
|00002cd0| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 4c 49 4e 45 |;..regis|ter LINE|
|00002ce0| 09 2a 74 6c 70 3b 0a 09 | 72 65 67 69 73 74 65 72 |.*tlp;..|register|
|00002cf0| 20 69 6e 74 09 74 62 6f | 3b 0a 09 72 65 67 69 73 | int.tbo|;..regis|
|00002d00| 74 65 72 20 63 68 61 72 | 09 2a 70 70 3b 0a 09 72 |ter char|.*pp;..r|
|00002d10| 65 67 69 73 74 65 72 20 | 69 6e 74 09 63 3b 0a 0a |egister |int.c;..|
|00002d20| 09 63 6c 70 20 3d 20 63 | 75 72 77 70 2d 3e 77 5f |.clp = c|urwp->w_|
|00002d30| 64 6f 74 70 3b 0a 09 63 | 62 6f 20 3d 20 63 75 72 |dotp;..c|bo = cur|
|00002d40| 77 70 2d 3e 77 5f 64 6f | 74 6f 3b 0a 09 77 68 69 |wp->w_do|to;..whi|
|00002d50| 6c 65 20 28 63 6c 70 20 | 21 3d 20 63 75 72 62 70 |le (clp |!= curbp|
|00002d60| 2d 3e 62 5f 6c 69 6e 65 | 70 29 20 7b 0a 09 09 69 |->b_line|p) {...i|
|00002d70| 66 20 28 63 62 6f 20 3d | 3d 20 6c 6c 65 6e 67 74 |f (cbo =|= llengt|
|00002d80| 68 28 63 6c 70 29 29 20 | 7b 0a 09 09 09 63 6c 70 |h(clp)) |{....clp|
|00002d90| 20 3d 20 6c 66 6f 72 77 | 28 63 6c 70 29 3b 0a 09 | = lforw|(clp);..|
|00002da0| 09 09 63 62 6f 20 3d 20 | 30 3b 0a 09 09 09 63 20 |..cbo = |0;....c |
|00002db0| 3d 20 53 45 4f 4c 3b 0a | 09 09 7d 20 65 6c 73 65 |= SEOL;.|..} else|
|00002dc0| 0a 09 09 09 63 20 3d 20 | 6c 67 65 74 63 28 63 6c |....c = |lgetc(cl|
|00002dd0| 70 2c 20 63 62 6f 2b 2b | 29 3b 0a 09 09 69 66 20 |p, cbo++|);...if |
|00002de0| 28 65 71 28 63 2c 20 70 | 61 74 5b 30 5d 29 20 21 |(eq(c, p|at[0]) !|
|00002df0| 3d 20 46 41 4c 53 45 29 | 20 7b 0a 09 09 09 74 6c |= FALSE)| {....tl|
|00002e00| 70 20 3d 20 63 6c 70 3b | 0a 09 09 09 74 62 6f 20 |p = clp;|....tbo |
|00002e10| 3d 20 63 62 6f 3b 0a 09 | 09 09 70 70 20 20 3d 20 |= cbo;..|..pp = |
|00002e20| 26 70 61 74 5b 31 5d 3b | 0a 09 09 09 77 68 69 6c |&pat[1];|....whil|
|00002e30| 65 20 28 2a 70 70 20 21 | 3d 20 30 29 20 7b 0a 09 |e (*pp !|= 0) {..|
|00002e40| 09 09 09 69 66 20 28 74 | 6c 70 20 3d 3d 20 63 75 |...if (t|lp == cu|
|00002e50| 72 62 70 2d 3e 62 5f 6c | 69 6e 65 70 29 0a 09 09 |rbp->b_l|inep)...|
|00002e60| 09 09 09 67 6f 74 6f 20 | 66 61 69 6c 3b 0a 09 09 |...goto |fail;...|
|00002e70| 09 09 69 66 20 28 74 62 | 6f 20 3d 3d 20 6c 6c 65 |..if (tb|o == lle|
|00002e80| 6e 67 74 68 28 74 6c 70 | 29 29 20 7b 0a 09 09 09 |ngth(tlp|)) {....|
|00002e90| 09 09 74 6c 70 20 3d 20 | 6c 66 6f 72 77 28 74 6c |..tlp = |lforw(tl|
|00002ea0| 70 29 3b 0a 09 09 09 09 | 09 69 66 20 28 74 6c 70 |p);.....|.if (tlp|
|00002eb0| 20 3d 3d 20 63 75 72 62 | 70 2d 3e 62 5f 6c 69 6e | == curb|p->b_lin|
|00002ec0| 65 70 29 0a 09 09 09 09 | 09 09 67 6f 74 6f 20 66 |ep).....|..goto f|
|00002ed0| 61 69 6c 3b 0a 09 09 09 | 09 09 74 62 6f 20 3d 20 |ail;....|..tbo = |
|00002ee0| 30 3b 0a 09 09 09 09 09 | 63 20 3d 20 53 45 4f 4c |0;......|c = SEOL|
|00002ef0| 3b 0a 09 09 09 09 7d 20 | 65 6c 73 65 0a 09 09 09 |;.....} |else....|
|00002f00| 09 09 63 20 3d 20 6c 67 | 65 74 63 28 74 6c 70 2c |..c = lg|etc(tlp,|
|00002f10| 20 74 62 6f 2b 2b 29 3b | 0a 09 09 09 09 69 66 20 | tbo++);|.....if |
|00002f20| 28 65 71 28 63 2c 20 2a | 70 70 2b 2b 29 20 3d 3d |(eq(c, *|pp++) ==|
|00002f30| 20 46 41 4c 53 45 29 0a | 09 09 09 09 09 67 6f 74 | FALSE).|.....got|
|00002f40| 6f 20 66 61 69 6c 3b 0a | 09 09 09 7d 0a 09 09 09 |o fail;.|...}....|
|00002f50| 63 75 72 77 70 2d 3e 77 | 5f 64 6f 74 70 20 20 3d |curwp->w|_dotp =|
|00002f60| 20 74 6c 70 3b 0a 09 09 | 09 63 75 72 77 70 2d 3e | tlp;...|.curwp->|
|00002f70| 77 5f 64 6f 74 6f 20 20 | 3d 20 74 62 6f 3b 0a 09 |w_doto |= tbo;..|
|00002f80| 09 09 63 75 72 77 70 2d | 3e 77 5f 66 6c 61 67 20 |..curwp-|>w_flag |
|00002f90| 7c 3d 20 57 46 4d 4f 56 | 45 3b 0a 09 09 09 72 65 ||= WFMOV|E;....re|
|00002fa0| 74 75 72 6e 20 28 54 52 | 55 45 29 3b 0a 09 09 7d |turn (TR|UE);...}|
|00002fb0| 0a 09 66 61 69 6c 3a 09 | 3b 0a 09 7d 0a 09 72 65 |..fail:.|;..}..re|
|00002fc0| 74 75 72 6e 20 28 46 41 | 4c 53 45 29 3b 0a 7d 0a |turn (FA|LSE);.}.|
|00002fd0| 0a 2f 2a 0a 20 2a 20 54 | 68 69 73 20 72 6f 75 74 |./*. * T|his rout|
|00002fe0| 69 6e 65 20 64 6f 65 73 | 20 74 68 65 20 72 65 61 |ine does| the rea|
|00002ff0| 6c 20 77 6f 72 6b 20 6f | 66 20 61 0a 20 2a 20 62 |l work o|f a. * b|
|00003000| 61 63 6b 77 61 72 64 20 | 73 65 61 72 63 68 2e 20 |ackward |search. |
|00003010| 54 68 65 20 70 61 74 74 | 65 72 6e 20 69 73 20 73 |The patt|ern is s|
|00003020| 69 74 74 69 6e 67 20 69 | 6e 20 74 68 65 20 65 78 |itting i|n the ex|
|00003030| 74 65 72 6e 61 6c 0a 20 | 2a 20 76 61 72 69 61 62 |ternal. |* variab|
|00003040| 6c 65 20 22 70 61 74 22 | 2e 20 49 66 20 66 6f 75 |le "pat"|. If fou|
|00003050| 6e 64 2c 20 64 6f 74 20 | 69 73 20 75 70 64 61 74 |nd, dot |is updat|
|00003060| 65 64 2c 20 74 68 65 20 | 77 69 6e 64 6f 77 20 73 |ed, the |window s|
|00003070| 79 73 74 65 6d 0a 20 2a | 20 69 73 20 6e 6f 74 69 |ystem. *| is noti|
|00003080| 66 69 65 64 20 6f 66 20 | 74 68 65 20 63 68 61 6e |fied of |the chan|
|00003090| 67 65 2c 20 61 6e 64 20 | 54 52 55 45 20 69 73 20 |ge, and |TRUE is |
|000030a0| 72 65 74 75 72 6e 65 64 | 2e 20 49 66 20 74 68 65 |returned|. If the|
|000030b0| 0a 20 2a 20 73 74 72 69 | 6e 67 20 69 73 6e 27 74 |. * stri|ng isn't|
|000030c0| 20 66 6f 75 6e 64 2c 20 | 46 41 4c 53 45 20 69 73 | found, |FALSE is|
|000030d0| 20 72 65 74 75 72 6e 65 | 64 2e 0a 20 2a 2f 0a 62 | returne|d.. */.b|
|000030e0| 61 63 6b 73 72 63 68 28 | 29 20 7b 0a 09 72 65 67 |acksrch(|) {..reg|
|000030f0| 69 73 74 65 72 20 4c 49 | 4e 45 09 2a 63 6c 70 3b |ister LI|NE.*clp;|
|00003100| 0a 09 72 65 67 69 73 74 | 65 72 20 69 6e 74 09 63 |..regist|er int.c|
|00003110| 62 6f 3b 0a 09 72 65 67 | 69 73 74 65 72 20 4c 49 |bo;..reg|ister LI|
|00003120| 4e 45 09 2a 74 6c 70 3b | 0a 09 72 65 67 69 73 74 |NE.*tlp;|..regist|
|00003130| 65 72 20 69 6e 74 09 74 | 62 6f 3b 0a 09 72 65 67 |er int.t|bo;..reg|
|00003140| 69 73 74 65 72 20 69 6e | 74 09 63 3b 0a 09 72 65 |ister in|t.c;..re|
|00003150| 67 69 73 74 65 72 20 63 | 68 61 72 09 2a 65 70 70 |gister c|har.*epp|
|00003160| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |;..regis|ter char|
|00003170| 09 2a 70 70 3b 0a 0a 09 | 66 6f 72 20 28 65 70 70 |.*pp;...|for (epp|
|00003180| 20 3d 20 26 70 61 74 5b | 30 5d 3b 20 65 70 70 5b | = &pat[|0]; epp[|
|00003190| 31 5d 20 21 3d 20 30 3b | 20 2b 2b 65 70 70 29 0a |1] != 0;| ++epp).|
|000031a0| 09 09 3b 0a 09 63 6c 70 | 20 3d 20 63 75 72 77 70 |..;..clp| = curwp|
|000031b0| 2d 3e 77 5f 64 6f 74 70 | 3b 0a 09 63 62 6f 20 3d |->w_dotp|;..cbo =|
|000031c0| 20 63 75 72 77 70 2d 3e | 77 5f 64 6f 74 6f 3b 0a | curwp->|w_doto;.|
|000031d0| 09 66 6f 72 20 28 3b 3b | 29 20 7b 0a 09 09 69 66 |.for (;;|) {...if|
|000031e0| 20 28 63 62 6f 20 3d 3d | 20 30 29 20 7b 0a 09 09 | (cbo ==| 0) {...|
|000031f0| 09 63 6c 70 20 3d 20 6c | 62 61 63 6b 28 63 6c 70 |.clp = l|back(clp|
|00003200| 29 3b 0a 09 09 09 69 66 | 20 28 63 6c 70 20 3d 3d |);....if| (clp ==|
|00003210| 20 63 75 72 62 70 2d 3e | 62 5f 6c 69 6e 65 70 29 | curbp->|b_linep)|
|00003220| 0a 09 09 09 09 72 65 74 | 75 72 6e 20 28 46 41 4c |.....ret|urn (FAL|
|00003230| 53 45 29 3b 0a 09 09 09 | 63 62 6f 20 3d 20 6c 6c |SE);....|cbo = ll|
|00003240| 65 6e 67 74 68 28 63 6c | 70 29 2b 31 3b 0a 09 09 |ength(cl|p)+1;...|
|00003250| 7d 0a 09 09 69 66 20 28 | 2d 2d 63 62 6f 20 3d 3d |}...if (|--cbo ==|
|00003260| 20 6c 6c 65 6e 67 74 68 | 28 63 6c 70 29 29 0a 09 | llength|(clp))..|
|00003270| 09 09 63 20 3d 20 53 45 | 4f 4c 3b 0a 09 09 65 6c |..c = SE|OL;...el|
|00003280| 73 65 0a 09 09 09 63 20 | 3d 20 6c 67 65 74 63 28 |se....c |= lgetc(|
|00003290| 63 6c 70 2c 63 62 6f 29 | 3b 0a 09 09 69 66 20 28 |clp,cbo)|;...if (|
|000032a0| 65 71 28 63 2c 20 2a 65 | 70 70 29 20 21 3d 20 46 |eq(c, *e|pp) != F|
|000032b0| 41 4c 53 45 29 20 7b 0a | 09 09 09 74 6c 70 20 3d |ALSE) {.|...tlp =|
|000032c0| 20 63 6c 70 3b 0a 09 09 | 09 74 62 6f 20 3d 20 63 | clp;...|.tbo = c|
|000032d0| 62 6f 3b 0a 09 09 09 70 | 70 20 20 3d 20 65 70 70 |bo;....p|p = epp|
|000032e0| 3b 0a 09 09 09 77 68 69 | 6c 65 20 28 70 70 20 21 |;....whi|le (pp !|
|000032f0| 3d 20 26 70 61 74 5b 30 | 5d 29 20 7b 0a 09 09 09 |= &pat[0|]) {....|
|00003300| 09 69 66 20 28 74 62 6f | 20 3d 3d 20 30 29 20 7b |.if (tbo| == 0) {|
|00003310| 0a 09 09 09 09 09 74 6c | 70 20 3d 20 6c 62 61 63 |......tl|p = lbac|
|00003320| 6b 28 74 6c 70 29 3b 0a | 09 09 09 09 09 69 66 20 |k(tlp);.|.....if |
|00003330| 28 74 6c 70 20 3d 3d 20 | 63 75 72 62 70 2d 3e 62 |(tlp == |curbp->b|
|00003340| 5f 6c 69 6e 65 70 29 0a | 09 09 09 09 09 09 67 6f |_linep).|......go|
|00003350| 74 6f 20 66 61 69 6c 3b | 0a 09 09 09 09 09 74 62 |to fail;|......tb|
|00003360| 6f 20 3d 20 6c 6c 65 6e | 67 74 68 28 74 6c 70 29 |o = llen|gth(tlp)|
|00003370| 2b 31 3b 0a 09 09 09 09 | 7d 0a 09 09 09 09 69 66 |+1;.....|}.....if|
|00003380| 20 28 2d 2d 74 62 6f 20 | 3d 3d 20 6c 6c 65 6e 67 | (--tbo |== lleng|
|00003390| 74 68 28 74 6c 70 29 29 | 0a 09 09 09 09 09 63 20 |th(tlp))|......c |
|000033a0| 3d 20 53 45 4f 4c 3b 0a | 09 09 09 09 65 6c 73 65 |= SEOL;.|....else|
|000033b0| 0a 09 09 09 09 09 63 20 | 3d 20 6c 67 65 74 63 28 |......c |= lgetc(|
|000033c0| 74 6c 70 2c 74 62 6f 29 | 3b 0a 09 09 09 09 69 66 |tlp,tbo)|;.....if|
|000033d0| 20 28 65 71 28 63 2c 20 | 2a 2d 2d 70 70 29 20 3d | (eq(c, |*--pp) =|
|000033e0| 3d 20 46 41 4c 53 45 29 | 0a 09 09 09 09 09 67 6f |= FALSE)|......go|
|000033f0| 74 6f 20 66 61 69 6c 3b | 0a 09 09 09 7d 0a 09 09 |to fail;|....}...|
|00003400| 09 63 75 72 77 70 2d 3e | 77 5f 64 6f 74 70 20 20 |.curwp->|w_dotp |
|00003410| 3d 20 74 6c 70 3b 0a 09 | 09 09 63 75 72 77 70 2d |= tlp;..|..curwp-|
|00003420| 3e 77 5f 64 6f 74 6f 20 | 20 3d 20 74 62 6f 3b 0a |>w_doto | = tbo;.|
|00003430| 09 09 09 63 75 72 77 70 | 2d 3e 77 5f 66 6c 61 67 |...curwp|->w_flag|
|00003440| 20 7c 3d 20 57 46 4d 4f | 56 45 3b 0a 09 09 09 72 | |= WFMO|VE;....r|
|00003450| 65 74 75 72 6e 20 28 54 | 52 55 45 29 3b 0a 09 09 |eturn (T|RUE);...|
|00003460| 7d 0a 09 66 61 69 6c 3a | 09 3b 0a 09 7d 0a 7d 0a |}..fail:|.;..}.}.|
|00003470| 0a 2f 2a 0a 20 2a 20 43 | 6f 6d 70 61 72 65 20 74 |./*. * C|ompare t|
|00003480| 77 6f 20 63 68 61 72 61 | 63 74 65 72 73 2e 0a 20 |wo chara|cters.. |
|00003490| 2a 20 54 68 65 20 22 62 | 63 22 20 63 6f 6d 65 73 |* The "b|c" comes|
|000034a0| 20 66 72 6f 6d 20 74 68 | 65 20 62 75 66 66 65 72 | from th|e buffer|
|000034b0| 2e 0a 20 2a 20 49 74 20 | 68 61 73 20 69 74 73 20 |.. * It |has its |
|000034c0| 63 61 73 65 20 66 6f 6c | 64 65 64 20 6f 75 74 2e |case fol|ded out.|
|000034d0| 20 54 68 65 0a 20 2a 20 | 22 70 63 22 20 69 73 20 | The. * |"pc" is |
|000034e0| 66 72 6f 6d 20 74 68 65 | 20 70 61 74 74 65 72 6e |from the| pattern|
|000034f0| 2e 0a 20 2a 2f 0a 65 71 | 28 62 63 2c 20 70 63 29 |.. */.eq|(bc, pc)|
|00003500| 20 7b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 | {..regi|ster int|
|00003510| 09 69 62 63 3b 0a 09 72 | 65 67 69 73 74 65 72 20 |.ibc;..r|egister |
|00003520| 69 6e 74 09 69 70 63 3b | 0a 0a 09 69 62 63 20 3d |int.ipc;|...ibc =|
|00003530| 20 62 63 20 26 20 30 78 | 46 46 3b 0a 09 69 70 63 | bc & 0x|FF;..ipc|
|00003540| 20 3d 20 70 63 20 26 20 | 30 78 46 46 3b 0a 09 69 | = pc & |0xFF;..i|
|00003550| 66 20 28 49 53 4c 4f 57 | 45 52 28 69 62 63 29 20 |f (ISLOW|ER(ibc) |
|00003560| 21 3d 20 46 41 4c 53 45 | 29 0a 09 09 69 62 63 20 |!= FALSE|)...ibc |
|00003570| 3d 20 54 4f 55 50 50 45 | 52 28 69 62 63 29 3b 0a |= TOUPPE|R(ibc);.|
|00003580| 09 69 66 20 28 49 53 4c | 4f 57 45 52 28 69 70 63 |.if (ISL|OWER(ipc|
|00003590| 29 20 21 3d 20 46 41 4c | 53 45 29 0a 09 09 69 70 |) != FAL|SE)...ip|
|000035a0| 63 20 3d 20 54 4f 55 50 | 50 45 52 28 69 70 63 29 |c = TOUP|PER(ipc)|
|000035b0| 3b 0a 09 69 66 20 28 69 | 62 63 20 3d 3d 20 69 70 |;..if (i|bc == ip|
|000035c0| 63 29 0a 09 09 72 65 74 | 75 72 6e 20 28 54 52 55 |c)...ret|urn (TRU|
|000035d0| 45 29 3b 0a 09 72 65 74 | 75 72 6e 20 28 46 41 4c |E);..ret|urn (FAL|
|000035e0| 53 45 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 20 52 65 |SE);.}..|/*. * Re|
|000035f0| 61 64 20 61 20 70 61 74 | 74 65 72 6e 2e 0a 20 2a |ad a pat|tern.. *|
|00003600| 20 53 74 61 73 68 20 69 | 74 20 69 6e 20 74 68 65 | Stash i|t in the|
|00003610| 20 65 78 74 65 72 6e 61 | 6c 20 76 61 72 69 61 62 | externa|l variab|
|00003620| 6c 65 20 22 70 61 74 22 | 2e 20 54 68 65 20 22 70 |le "pat"|. The "p|
|00003630| 61 74 22 20 69 73 0a 20 | 2a 20 6e 6f 74 20 75 70 |at" is. |* not up|
|00003640| 64 61 74 65 64 20 69 66 | 20 74 68 65 20 75 73 65 |dated if| the use|
|00003650| 72 20 74 79 70 65 73 20 | 69 6e 20 61 6e 20 65 6d |r types |in an em|
|00003660| 70 74 79 20 6c 69 6e 65 | 2e 20 49 66 20 74 68 65 |pty line|. If the|
|00003670| 20 75 73 65 72 20 74 79 | 70 65 64 0a 20 2a 20 61 | user ty|ped. * a|
|00003680| 6e 20 65 6d 70 74 79 20 | 6c 69 6e 65 2c 20 61 6e |n empty |line, an|
|00003690| 64 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 6f 6c |d there |is no ol|
|000036a0| 64 20 70 61 74 74 65 72 | 6e 2c 20 69 74 20 69 73 |d patter|n, it is|
|000036b0| 20 61 6e 20 65 72 72 6f | 72 2e 0a 20 2a 20 44 69 | an erro|r.. * Di|
|000036c0| 73 70 6c 61 79 20 74 68 | 65 20 6f 6c 64 20 70 61 |splay th|e old pa|
|000036d0| 74 74 65 72 6e 2c 20 69 | 6e 20 74 68 65 20 73 74 |ttern, i|n the st|
|000036e0| 79 6c 65 20 6f 66 20 4a | 65 66 66 20 4c 6f 6d 69 |yle of J|eff Lomi|
|000036f0| 63 6b 61 2e 20 54 68 65 | 72 65 20 69 73 0a 20 2a |cka. The|re is. *|
|00003700| 20 73 6f 6d 65 20 64 6f | 2d 69 74 2d 79 6f 75 72 | some do|-it-your|
|00003710| 73 65 6c 66 20 63 6f 6e | 74 72 6f 6c 20 65 78 70 |self con|trol exp|
|00003720| 61 6e 73 69 6f 6e 2e 0a | 20 2a 2f 0a 72 65 61 64 |ansion..| */.read|
|00003730| 70 61 74 74 65 72 6e 28 | 70 72 6f 6d 70 74 29 20 |pattern(|prompt) |
|00003740| 63 68 61 72 20 2a 70 72 | 6f 6d 70 74 3b 20 7b 0a |char *pr|ompt; {.|
|00003750| 09 72 65 67 69 73 74 65 | 72 20 69 6e 74 09 73 3b |.registe|r int.s;|
|00003760| 0a 09 63 68 61 72 09 09 | 74 70 61 74 5b 4e 50 41 |..char..|tpat[NPA|
|00003770| 54 5d 3b 0a 0a 09 69 66 | 20 28 74 70 61 74 5b 30 |T];...if| (tpat[0|
|00003780| 5d 20 3d 3d 20 27 5c 30 | 27 29 20 73 20 3d 20 65 |] == '\0|') s = e|
|00003790| 72 65 70 6c 79 28 22 25 | 73 3a 20 22 2c 20 74 70 |reply("%|s: ", tp|
|000037a0| 61 74 2c 20 4e 50 41 54 | 2c 20 70 72 6f 6d 70 74 |at, NPAT|, prompt|
|000037b0| 29 3b 0a 09 65 6c 73 65 | 20 73 20 3d 20 65 72 65 |);..else| s = ere|
|000037c0| 70 6c 79 28 22 25 73 3a | 20 28 64 65 66 61 75 6c |ply("%s:| (defaul|
|000037d0| 74 20 25 73 29 20 22 2c | 20 74 70 61 74 2c 20 4e |t %s) ",| tpat, N|
|000037e0| 50 41 54 2c 20 70 72 6f | 6d 70 74 2c 20 70 61 74 |PAT, pro|mpt, pat|
|000037f0| 29 3b 0a 0a 09 69 66 20 | 28 73 20 3d 3d 20 54 52 |);...if |(s == TR|
|00003800| 55 45 29 09 09 09 09 2f | 2a 20 53 70 65 63 69 66 |UE)..../|* Specif|
|00003810| 69 65 64 09 09 2a 2f 0a | 09 09 28 56 4f 49 44 29 |ied..*/.|..(VOID)|
|00003820| 20 73 74 72 63 70 79 28 | 70 61 74 2c 20 74 70 61 | strcpy(|pat, tpa|
|00003830| 74 29 3b 0a 09 65 6c 73 | 65 20 69 66 20 28 73 3d |t);..els|e if (s=|
|00003840| 3d 46 41 4c 53 45 20 26 | 26 20 70 61 74 5b 30 5d |=FALSE &|& pat[0]|
|00003850| 21 3d 30 29 09 09 2f 2a | 20 43 52 2c 20 62 75 74 |!=0)../*| CR, but|
|00003860| 20 6f 6c 64 20 6f 6e 65 | 09 2a 2f 0a 09 09 73 20 | old one|.*/...s |
|00003870| 3d 20 54 52 55 45 3b 0a | 09 72 65 74 75 72 6e 20 |= TRUE;.|.return |
|00003880| 28 73 29 3b 0a 7d 0a 53 | 48 41 52 5f 45 4f 46 0a |(s);.}.S|HAR_EOF.|
|00003890| 66 69 20 23 20 65 6e 64 | 20 6f 66 20 6f 76 65 72 |fi # end| of over|
|000038a0| 77 72 69 74 69 6e 67 20 | 63 68 65 63 6b 0a 69 66 |writing |check.if|
|000038b0| 20 74 65 73 74 20 2d 66 | 20 27 73 79 6d 62 6f 6c | test -f| 'symbol|
|000038c0| 2e 63 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |.c'.then|..echo s|
|000038d0| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|000038e0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|000038f0| 67 20 66 69 6c 65 20 22 | 27 73 79 6d 62 6f 6c 2e |g file "|'symbol.|
|00003900| 63 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |c'".else|.cat << |
|00003910| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 73 79 6d |\SHAR_EO|F > 'sym|
|00003920| 62 6f 6c 2e 63 27 0a 2f | 2a 0a 20 2a 20 53 79 6d |bol.c'./|*. * Sym|
|00003930| 62 6f 6c 20 74 61 62 6c | 65 73 2c 20 61 6e 64 20 |bol tabl|es, and |
|00003940| 6b 65 79 6d 61 70 20 73 | 65 74 75 70 2e 0a 20 2a |keymap s|etup.. *|
|00003950| 20 54 68 65 20 74 65 72 | 6d 69 6e 61 6c 20 73 70 | The ter|minal sp|
|00003960| 65 63 69 66 69 63 20 70 | 61 72 74 73 20 6f 66 20 |ecific p|arts of |
|00003970| 62 75 69 6c 64 69 6e 67 | 20 74 68 65 0a 20 2a 20 |building| the. * |
|00003980| 6b 65 79 6d 61 70 20 68 | 61 73 20 62 65 65 6e 20 |keymap h|as been |
|00003990| 6d 6f 76 65 64 20 74 6f | 20 61 20 62 65 74 74 65 |moved to| a bette|
|000039a0| 72 20 70 6c 61 63 65 2e | 0a 20 2a 2f 0a 23 69 6e |r place.|. */.#in|
|000039b0| 63 6c 75 64 65 09 22 64 | 65 66 2e 68 22 0a 0a 23 |clude."d|ef.h"..#|
|000039c0| 69 66 64 65 66 09 48 41 | 53 48 0a 53 69 6e 63 65 |ifdef.HA|SH.Since|
|000039d0| 20 79 6f 75 27 72 65 20 | 73 65 65 69 6e 67 20 74 | you're |seeing t|
|000039e0| 68 69 73 2c 20 79 6f 75 | 20 6d 75 73 74 20 68 61 |his, you| must ha|
|000039f0| 76 65 20 64 65 66 69 6e | 65 64 20 48 41 53 48 20 |ve defin|ed HASH |
|00003a00| 74 6f 20 74 72 79 20 61 | 6e 64 20 67 65 74 20 74 |to try a|nd get t|
|00003a10| 68 65 0a 68 61 73 68 69 | 6e 67 20 63 6f 64 65 20 |he.hashi|ng code |
|00003a20| 62 61 63 6b 2e 20 59 6f | 75 27 72 65 20 67 65 74 |back. Yo|u're get|
|00003a30| 74 69 6e 67 20 61 6e 20 | 65 72 72 6f 72 20 62 65 |ting an |error be|
|00003a40| 63 61 75 73 65 20 49 20 | 28 6d 77 6d 40 75 63 62 |cause I |(mwm@ucb|
|00003a50| 76 61 78 29 20 77 61 6e | 74 20 79 6f 75 0a 74 6f |vax) wan|t you.to|
|00003a60| 20 72 65 61 64 20 74 68 | 69 73 2e 0a 0a 57 69 74 | read th|is...Wit|
|00003a70| 68 20 74 68 65 20 63 68 | 61 6e 67 65 20 69 6e 20 |h the ch|ange in |
|00003a80| 66 75 6e 63 74 69 6f 6e | 20 63 6f 6d 70 6c 65 74 |function| complet|
|00003a90| 69 6f 6e 2c 20 74 68 65 | 72 65 20 69 73 20 61 74 |ion, the|re is at|
|00003aa0| 20 6c 65 61 73 74 20 6f | 6e 65 20 6c 69 6e 65 61 | least o|ne linea|
|00003ab0| 72 20 73 65 61 72 63 68 | 0a 74 68 72 6f 75 67 68 |r search|.through|
|00003ac0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 6c 69 | the fun|ction li|
|00003ad0| 73 74 20 66 6f 72 20 65 | 76 65 72 79 20 68 61 73 |st for e|very has|
|00003ae0| 68 20 6c 6f 6f 6b 75 70 | 20 28 69 67 6e 6f 72 69 |h lookup| (ignori|
|00003af0| 6e 67 20 74 68 65 20 73 | 74 61 72 74 75 70 20 63 |ng the s|tartup c|
|00003b00| 6f 64 65 29 2e 0a 47 69 | 76 65 6e 20 74 68 61 74 |ode)..Gi|ven that|
|00003b10| 20 74 68 65 72 65 20 61 | 72 65 20 70 72 6f 62 61 | there a|re proba|
|00003b20| 62 6c 79 20 61 63 74 75 | 61 6c 6c 79 20 4d 41 4e |bly actu|ally MAN|
|00003b30| 59 20 6d 6f 72 65 20 6c | 69 6e 65 61 72 20 73 65 |Y more l|inear se|
|00003b40| 61 72 63 68 65 73 20 66 | 6f 72 0a 63 6f 6d 70 6c |arches f|or.compl|
|00003b50| 65 74 69 6f 6e 20 74 68 | 61 6e 20 66 75 6c 6c 6e |etion th|an fulln|
|00003b60| 61 6d 65 20 6c 6f 6f 6b | 75 70 73 2c 20 73 6f 6d |ame look|ups, som|
|00003b70| 65 20 73 74 72 75 63 74 | 75 72 65 20 6f 74 68 65 |e struct|ure othe|
|00003b80| 72 20 74 68 61 6e 20 61 | 20 68 61 73 68 20 74 61 |r than a| hash ta|
|00003b90| 62 6c 65 20 69 73 0a 62 | 65 74 74 65 72 20 73 75 |ble is.b|etter su|
|00003ba0| 69 74 65 64 20 74 6f 20 | 74 68 69 73 20 70 75 72 |ited to |this pur|
|00003bb0| 70 6f 73 65 2e 20 49 20 | 73 75 67 67 65 73 74 20 |pose. I |suggest |
|00003bc0| 74 72 79 69 6e 67 20 73 | 6f 72 74 69 6e 67 20 74 |trying s|orting t|
|00003bd0| 68 65 20 6c 69 73 74 73 | 20 66 6f 72 20 6d 6f 72 |he lists| for mor|
|00003be0| 65 0a 73 70 65 65 64 2c | 20 74 68 65 6e 20 67 6f |e.speed,| then go|
|00003bf0| 69 6e 67 20 74 6f 20 61 | 20 62 69 6e 61 72 79 20 |ing to a| binary |
|00003c00| 73 65 61 72 63 68 20 74 | 72 65 65 2c 20 61 6e 64 |search t|ree, and|
|00003c10| 20 66 69 6e 61 6c 6c 79 | 20 67 6f 69 6e 67 20 74 | finally| going t|
|00003c20| 6f 20 61 20 74 72 69 65 | 2e 0a 23 65 6e 64 69 66 |o a trie|..#endif|
|00003c30| 09 48 41 53 48 0a 0a 2f | 2a 0a 20 2a 20 44 65 66 |.HASH../|*. * Def|
|00003c40| 69 6e 65 64 20 68 65 72 | 65 20 73 6f 20 74 6f 20 |ined her|e so to |
|00003c50| 63 6f 6c 6c 65 63 74 20 | 74 68 65 20 23 69 66 64 |collect |the #ifd|
|00003c60| 65 66 20 4d 45 59 4e 20 | 63 6f 6e 66 69 67 20 73 |ef MEYN |config s|
|00003c70| 74 75 66 66 20 69 6e 20 | 6f 6e 65 20 66 69 6c 65 |tuff in |one file|
|00003c80| 0a 20 2a 20 49 66 20 79 | 6f 75 20 73 65 74 20 65 |. * If y|ou set e|
|00003c90| 69 74 68 65 72 20 4d 49 | 4e 44 45 4e 54 20 6f 72 |ither MI|NDENT or|
|00003ca0| 20 4d 46 49 4c 4c 2c 20 | 74 68 65 6e 20 79 6f 75 | MFILL, |then you|
|00003cb0| 20 6e 65 65 64 20 74 6f | 20 63 68 61 6e 67 65 20 | need to| change |
|00003cc0| 74 68 65 20 62 69 6e 64 | 69 6e 67 73 0a 20 2a 20 |the bind|ings. * |
|00003cd0| 69 6e 20 74 68 69 73 20 | 66 69 6c 65 20 74 6f 20 |in this |file to |
|00003ce0| 6d 61 74 63 68 3a 20 4b | 43 54 52 4c 7c 27 4d 27 |match: K|CTRL|'M'|
|00003cf0| 20 2d 3e 20 6e 65 77 6c | 69 6e 65 2d 61 6e 64 2d | -> newl|ine-and-|
|00003d00| 69 6e 64 65 6e 74 20 61 | 6e 64 20 4b 43 54 52 4c |indent a|nd KCTRL|
|00003d10| 7c 27 4a 27 20 2d 3e 0a | 20 2a 20 69 6e 73 65 72 ||'J' ->.| * inser|
|00003d20| 74 2d 6e 65 77 6c 69 6e | 65 20 66 6f 72 20 4d 49 |t-newlin|e for MI|
|00003d30| 4e 44 45 4e 54 2c 20 61 | 6e 64 20 27 20 27 20 2d |NDENT, a|nd ' ' -|
|00003d40| 3e 20 69 6e 73 65 72 74 | 2d 77 69 74 68 2d 77 72 |> insert|-with-wr|
|00003d50| 61 70 20 66 6f 72 20 4d | 46 49 4c 4c 2e 0a 20 2a |ap for M|FILL.. *|
|00003d60| 20 4d 45 59 4e 20 69 73 | 20 75 73 65 64 20 66 6f | MEYN is| used fo|
|00003d70| 72 20 63 6f 6d 70 69 6c | 65 2d 74 69 6d 65 20 63 |r compil|e-time c|
|00003d80| 75 73 74 6f 6d 69 7a 61 | 74 69 6f 6e 20 6f 66 20 |ustomiza|tion of |
|00003d90| 74 68 65 20 73 79 73 74 | 65 6d 20 66 6f 72 20 6d |the syst|em for m|
|00003da0| 69 63 72 6f 73 2e 0a 20 | 2a 2f 0a 23 69 66 6e 64 |icros.. |*/.#ifnd|
|00003db0| 65 66 09 4d 45 59 4e 0a | 69 6e 74 09 6d 6f 64 65 |ef.MEYN.|int.mode|
|00003dc0| 20 3d 20 30 3b 09 09 09 | 2f 2a 20 41 6c 6c 20 6d | = 0;...|/* All m|
|00003dd0| 6f 64 65 73 20 6f 66 66 | 09 09 2a 2f 0a 23 65 6c |odes off|..*/.#el|
|00003de0| 73 65 0a 69 6e 74 09 6d | 6f 64 65 20 3d 20 4d 42 |se.int.m|ode = MB|
|00003df0| 53 4d 41 50 7c 4d 49 4e | 44 45 4e 54 3b 0a 23 65 |SMAP|MIN|DENT;.#e|
|00003e00| 6e 64 69 66 0a 0a 2f 2a | 0a 20 2a 20 44 65 66 69 |ndif../*|. * Defi|
|00003e10| 6e 65 64 20 62 79 20 22 | 6d 61 69 6e 2e 63 22 2e |ned by "|main.c".|
|00003e20| 0a 20 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |. */.ext|ern.int.|
|00003e30| 63 74 72 6c 67 28 29 3b | 09 09 2f 2a 20 41 62 6f |ctrlg();|../* Abo|
|00003e40| 72 74 20 6f 75 74 20 6f | 66 20 74 68 69 6e 67 73 |rt out o|f things|
|00003e50| 09 09 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |..*/.ext|ern.int.|
|00003e60| 71 75 69 74 28 29 3b 09 | 09 09 2f 2a 20 51 75 69 |quit();.|../* Qui|
|00003e70| 74 09 09 09 09 2a 2f 0a | 65 78 74 65 72 6e 09 69 |t....*/.|extern.i|
|00003e80| 6e 74 09 63 74 6c 78 6c | 70 28 29 3b 09 09 2f 2a |nt.ctlxl|p();../*|
|00003e90| 20 42 65 67 69 6e 20 6d | 61 63 72 6f 09 09 09 2a | Begin m|acro...*|
|00003ea0| 2f 0a 65 78 74 65 72 6e | 09 69 6e 74 09 63 74 6c |/.extern|.int.ctl|
|00003eb0| 78 72 70 28 29 3b 09 09 | 2f 2a 20 45 6e 64 20 6d |xrp();..|/* End m|
|00003ec0| 61 63 72 6f 09 09 09 2a | 2f 0a 65 78 74 65 72 6e |acro...*|/.extern|
|00003ed0| 09 69 6e 74 09 63 74 6c | 78 65 28 29 3b 09 09 2f |.int.ctl|xe();../|
|00003ee0| 2a 20 45 78 65 63 75 74 | 65 20 6d 61 63 72 6f 09 |* Execut|e macro.|
|00003ef0| 09 2a 2f 0a 65 78 74 65 | 72 6e 20 20 69 6e 74 09 |.*/.exte|rn int.|
|00003f00| 73 68 6f 77 76 65 72 73 | 69 6f 6e 28 29 3b 09 09 |showvers|ion();..|
|00003f10| 2f 2a 20 53 68 6f 77 20 | 76 65 72 73 69 6f 6e 20 |/* Show |version |
|00003f20| 6e 75 6d 62 65 72 73 2c | 20 65 74 63 2e 09 2a 2f |numbers,| etc..*/|
|00003f30| 0a 0a 2f 2a 0a 20 2a 20 | 44 65 66 69 6e 65 64 20 |../*. * |Defined |
|00003f40| 62 79 20 22 73 65 61 72 | 63 68 2e 63 22 2e 0a 20 |by "sear|ch.c".. |
|00003f50| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 66 6f |*/.exter|n.int.fo|
|00003f60| 72 77 73 65 61 72 63 68 | 28 29 3b 09 09 2f 2a 20 |rwsearch|();../* |
|00003f70| 53 65 61 72 63 68 20 66 | 6f 72 77 61 72 64 09 09 |Search f|orward..|
|00003f80| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 62 61 |*/.exter|n.int.ba|
|00003f90| 63 6b 73 65 61 72 63 68 | 28 29 3b 09 09 2f 2a 20 |cksearch|();../* |
|00003fa0| 53 65 61 72 63 68 20 62 | 61 63 6b 77 61 72 64 73 |Search b|ackwards|
|00003fb0| 09 09 2a 2f 0a 65 78 74 | 65 72 6e 20 20 69 6e 74 |..*/.ext|ern int|
|00003fc0| 09 73 65 61 72 63 68 61 | 67 61 69 6e 28 29 3b 09 |.searcha|gain();.|
|00003fd0| 09 2f 2a 20 52 65 70 65 | 61 74 20 6c 61 73 74 20 |./* Repe|at last |
|00003fe0| 73 65 61 72 63 68 20 63 | 6f 6d 6d 61 6e 64 09 2a |search c|ommand.*|
|00003ff0| 2f 0a 65 78 74 65 72 6e | 20 20 69 6e 74 09 66 6f |/.extern| int.fo|
|00004000| 72 77 69 73 65 61 72 63 | 68 28 29 3b 09 09 2f 2a |rwisearc|h();../*|
|00004010| 20 49 6e 63 72 65 6d 65 | 6e 74 61 6c 20 73 65 61 | Increme|ntal sea|
|00004020| 72 63 68 20 66 6f 72 77 | 61 72 64 09 2a 2f 0a 65 |rch forw|ard.*/.e|
|00004030| 78 74 65 72 6e 20 20 69 | 6e 74 09 62 61 63 6b 69 |xtern i|nt.backi|
|00004040| 73 65 61 72 63 68 28 29 | 3b 09 09 2f 2a 20 49 6e |search()|;../* In|
|00004050| 63 72 65 6d 65 6e 74 61 | 6c 20 73 65 61 72 63 68 |crementa|l search|
|00004060| 20 62 61 63 6b 77 61 72 | 64 73 09 2a 2f 0a 65 78 | backwar|ds.*/.ex|
|00004070| 74 65 72 6e 20 20 69 6e | 74 09 71 75 65 72 79 72 |tern in|t.queryr|
|00004080| 65 70 6c 28 29 3b 09 09 | 2f 2a 20 51 75 65 72 79 |epl();..|/* Query|
|00004090| 20 72 65 70 6c 61 63 65 | 09 09 2a 2f 0a 0a 2f 2a | replace|..*/../*|
|000040a0| 0a 20 2a 20 44 65 66 69 | 6e 65 64 20 62 79 20 22 |. * Defi|ned by "|
|000040b0| 62 61 73 69 63 2e 63 22 | 2e 0a 20 2a 2f 0a 65 78 |basic.c"|.. */.ex|
|000040c0| 74 65 72 6e 09 69 6e 74 | 09 67 6f 74 6f 62 6f 6c |tern.int|.gotobol|
|000040d0| 28 29 3b 09 09 2f 2a 20 | 4d 6f 76 65 20 74 6f 20 |();../* |Move to |
|000040e0| 73 74 61 72 74 20 6f 66 | 20 6c 69 6e 65 09 2a 2f |start of| line.*/|
|000040f0| 0a 65 78 74 65 72 6e 09 | 69 6e 74 09 62 61 63 6b |.extern.|int.back|
|00004100| 63 68 61 72 28 29 3b 09 | 09 2f 2a 20 4d 6f 76 65 |char();.|./* Move|
|00004110| 20 62 61 63 6b 77 61 72 | 64 20 62 79 20 63 68 61 | backwar|d by cha|
|00004120| 72 61 63 74 65 72 73 09 | 2a 2f 0a 65 78 74 65 72 |racters.|*/.exter|
|00004130| 6e 09 69 6e 74 09 67 6f | 74 6f 65 6f 6c 28 29 3b |n.int.go|toeol();|
|00004140| 09 09 2f 2a 20 4d 6f 76 | 65 20 74 6f 20 65 6e 64 |../* Mov|e to end|
|00004150| 20 6f 66 20 6c 69 6e 65 | 09 09 2a 2f 0a 65 78 74 | of line|..*/.ext|
|00004160| 65 72 6e 09 69 6e 74 09 | 66 6f 72 77 63 68 61 72 |ern.int.|forwchar|
|00004170| 28 29 3b 09 09 2f 2a 20 | 4d 6f 76 65 20 66 6f 72 |();../* |Move for|
|00004180| 77 61 72 64 20 62 79 20 | 63 68 61 72 61 63 74 65 |ward by |characte|
|00004190| 72 73 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |rs.*/.ex|tern.int|
|000041a0| 09 67 6f 74 6f 62 6f 62 | 28 29 3b 09 09 2f 2a 20 |.gotobob|();../* |
|000041b0| 4d 6f 76 65 20 74 6f 20 | 73 74 61 72 74 20 6f 66 |Move to |start of|
|000041c0| 20 62 75 66 66 65 72 09 | 2a 2f 0a 65 78 74 65 72 | buffer.|*/.exter|
|000041d0| 6e 09 69 6e 74 09 67 6f | 74 6f 65 6f 62 28 29 3b |n.int.go|toeob();|
|000041e0| 09 09 2f 2a 20 4d 6f 76 | 65 20 74 6f 20 65 6e 64 |../* Mov|e to end|
|000041f0| 20 6f 66 20 62 75 66 66 | 65 72 09 2a 2f 0a 65 78 | of buff|er.*/.ex|
|00004200| 74 65 72 6e 09 69 6e 74 | 09 66 6f 72 77 6c 69 6e |tern.int|.forwlin|
|00004210| 65 28 29 3b 09 09 2f 2a | 20 4d 6f 76 65 20 66 6f |e();../*| Move fo|
|00004220| 72 77 61 72 64 20 62 79 | 20 6c 69 6e 65 73 09 2a |rward by| lines.*|
|00004230| 2f 0a 65 78 74 65 72 6e | 09 69 6e 74 09 62 61 63 |/.extern|.int.bac|
|00004240| 6b 6c 69 6e 65 28 29 3b | 09 09 2f 2a 20 4d 6f 76 |kline();|../* Mov|
|00004250| 65 20 62 61 63 6b 77 61 | 72 64 20 62 79 20 6c 69 |e backwa|rd by li|
|00004260| 6e 65 73 09 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |nes.*/.e|xtern.in|
|00004270| 74 09 66 6f 72 77 70 61 | 67 65 28 29 3b 09 09 2f |t.forwpa|ge();../|
|00004280| 2a 20 4d 6f 76 65 20 66 | 6f 72 77 61 72 64 20 62 |* Move f|orward b|
|00004290| 79 20 70 61 67 65 73 09 | 2a 2f 0a 65 78 74 65 72 |y pages.|*/.exter|
|000042a0| 6e 09 69 6e 74 09 62 61 | 63 6b 70 61 67 65 28 29 |n.int.ba|ckpage()|
|000042b0| 3b 09 09 2f 2a 20 4d 6f | 76 65 20 62 61 63 6b 77 |;../* Mo|ve backw|
|000042c0| 61 72 64 20 62 79 20 70 | 61 67 65 73 09 2a 2f 0a |ard by p|ages.*/.|
|000042d0| 65 78 74 65 72 6e 09 69 | 6e 74 09 70 61 67 65 6e |extern.i|nt.pagen|
|000042e0| 65 78 74 28 29 3b 09 09 | 2f 2a 20 50 61 67 65 20 |ext();..|/* Page |
|000042f0| 66 6f 72 77 61 72 64 20 | 6e 65 78 74 20 77 69 6e |forward |next win|
|00004300| 64 6f 77 09 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |dow.*/.e|xtern.in|
|00004310| 74 09 73 65 74 6d 61 72 | 6b 28 29 3b 09 09 2f 2a |t.setmar|k();../*|
|00004320| 20 53 65 74 20 6d 61 72 | 6b 09 09 09 2a 2f 0a 65 | Set mar|k...*/.e|
|00004330| 78 74 65 72 6e 09 69 6e | 74 09 73 77 61 70 6d 61 |xtern.in|t.swapma|
|00004340| 72 6b 28 29 3b 09 09 2f | 2a 20 53 77 61 70 20 22 |rk();../|* Swap "|
|00004350| 2e 22 20 61 6e 64 20 6d | 61 72 6b 09 09 2a 2f 0a |." and m|ark..*/.|
|00004360| 65 78 74 65 72 6e 09 69 | 6e 74 09 67 6f 74 6f 6c |extern.i|nt.gotol|
|00004370| 69 6e 65 28 29 3b 09 09 | 2f 2a 20 47 6f 20 74 6f |ine();..|/* Go to|
|00004380| 20 61 20 73 70 65 63 69 | 66 69 65 64 20 6c 69 6e | a speci|fied lin|
|00004390| 65 2e 09 2a 2f 0a 0a 2f | 2a 0a 20 2a 20 44 65 66 |e..*/../|*. * Def|
|000043a0| 69 6e 65 64 20 62 79 20 | 22 62 75 66 66 65 72 2e |ined by |"buffer.|
|000043b0| 63 22 2e 0a 20 2a 2f 0a | 65 78 74 65 72 6e 09 69 |c".. */.|extern.i|
|000043c0| 6e 74 09 6c 69 73 74 62 | 75 66 66 65 72 73 28 29 |nt.listb|uffers()|
|000043d0| 3b 09 09 2f 2a 20 44 69 | 73 70 6c 61 79 20 6c 69 |;../* Di|splay li|
|000043e0| 73 74 20 6f 66 20 62 75 | 66 66 65 72 73 09 2a 2f |st of bu|ffers.*/|
|000043f0| 0a 65 78 74 65 72 6e 09 | 69 6e 74 09 75 73 65 62 |.extern.|int.useb|
|00004400| 75 66 66 65 72 28 29 3b | 09 09 2f 2a 20 53 77 69 |uffer();|../* Swi|
|00004410| 74 63 68 20 61 20 77 69 | 6e 64 6f 77 20 74 6f 20 |tch a wi|ndow to |
|00004420| 61 20 62 75 66 66 65 72 | 09 2a 2f 0a 65 78 74 65 |a buffer|.*/.exte|
|00004430| 72 6e 09 69 6e 74 09 70 | 6f 70 74 6f 62 75 66 66 |rn.int.p|optobuff|
|00004440| 65 72 28 29 3b 09 09 2f | 2a 20 4f 74 68 65 72 20 |er();../|* Other |
|00004450| 77 69 6e 64 6f 77 20 74 | 6f 20 61 20 62 75 66 66 |window t|o a buff|
|00004460| 65 72 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |er.*/.ex|tern.int|
|00004470| 09 6b 69 6c 6c 62 75 66 | 66 65 72 28 29 3b 09 09 |.killbuf|fer();..|
|00004480| 2f 2a 20 4d 61 6b 65 20 | 61 20 62 75 66 66 65 72 |/* Make |a buffer|
|00004490| 20 67 6f 20 61 77 61 79 | 2e 09 2a 2f 0a 65 78 74 | go away|..*/.ext|
|000044a0| 65 72 6e 09 69 6e 74 09 | 73 61 76 65 62 75 66 66 |ern.int.|savebuff|
|000044b0| 65 72 73 28 29 3b 09 09 | 2f 2a 20 53 61 76 65 20 |ers();..|/* Save |
|000044c0| 75 6e 6d 6f 64 69 66 69 | 65 64 20 62 75 66 66 65 |unmodifi|ed buffe|
|000044d0| 72 73 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |rs.*/.ex|tern.int|
|000044e0| 09 62 75 66 66 65 72 69 | 6e 73 65 72 74 28 29 3b |.bufferi|nsert();|
|000044f0| 09 09 2f 2a 20 49 6e 73 | 65 72 74 20 62 75 66 66 |../* Ins|ert buff|
|00004500| 65 72 20 69 6e 74 6f 20 | 61 6e 6f 74 68 65 72 09 |er into |another.|
|00004510| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 6e 6f |*/.exter|n.int.no|
|00004520| 74 6d 6f 64 69 66 69 65 | 64 28 29 3b 09 09 2f 2a |tmodifie|d();../*|
|00004530| 20 52 65 73 65 74 20 6d | 6f 64 69 66 69 63 61 74 | Reset m|odificat|
|00004540| 69 6f 6e 20 66 6c 61 67 | 09 2a 2f 0a 0a 23 69 66 |ion flag|.*/..#if|
|00004550| 64 65 66 09 44 49 52 4c | 49 53 54 0a 2f 2a 0a 20 |def.DIRL|IST./*. |
|00004560| 2a 20 44 65 66 69 6e 65 | 64 20 62 79 20 22 64 69 |* Define|d by "di|
|00004570| 72 6c 69 73 74 2e 63 22 | 2e 0a 20 2a 2f 0a 65 78 |rlist.c"|.. */.ex|
|00004580| 74 65 72 6e 09 69 6e 74 | 09 64 69 72 6c 69 73 74 |tern.int|.dirlist|
|00004590| 28 29 3b 09 09 2f 2a 20 | 44 69 72 65 63 74 6f 72 |();../* |Director|
|000045a0| 79 20 6c 69 73 74 2e 09 | 09 2a 2f 0a 23 65 6e 64 |y list..|.*/.#end|
|000045b0| 69 66 0a 0a 2f 2a 0a 20 | 2a 20 44 65 66 69 6e 65 |if../*. |* Define|
|000045c0| 64 20 62 79 20 22 66 69 | 6c 65 2e 63 22 2e 0a 20 |d by "fi|le.c".. |
|000045d0| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 66 69 |*/.exter|n.int.fi|
|000045e0| 6c 65 76 69 73 69 74 28 | 29 3b 09 09 2f 2a 20 47 |levisit(|);../* G|
|000045f0| 65 74 20 61 20 66 69 6c | 65 2c 20 72 65 61 64 20 |et a fil|e, read |
|00004600| 77 72 69 74 65 09 2a 2f | 0a 65 78 74 65 72 6e 09 |write.*/|.extern.|
|00004610| 69 6e 74 09 70 6f 70 74 | 6f 66 69 6c 65 28 29 3b |int.popt|ofile();|
|00004620| 09 09 2f 2a 20 47 65 74 | 20 61 20 66 69 6c 65 2c |../* Get| a file,|
|00004630| 20 6f 74 68 65 72 20 77 | 69 6e 64 6f 77 09 2a 2f | other w|indow.*/|
|00004640| 0a 65 78 74 65 72 6e 09 | 69 6e 74 09 66 69 6c 65 |.extern.|int.file|
|00004650| 77 72 69 74 65 28 29 3b | 09 09 2f 2a 20 57 72 69 |write();|../* Wri|
|00004660| 74 65 20 61 20 66 69 6c | 65 09 09 09 2a 2f 0a 65 |te a fil|e...*/.e|
|00004670| 78 74 65 72 6e 09 69 6e | 74 09 66 69 6c 65 73 61 |xtern.in|t.filesa|
|00004680| 76 65 28 29 3b 09 09 2f | 2a 20 53 61 76 65 20 63 |ve();../|* Save c|
|00004690| 75 72 72 65 6e 74 20 66 | 69 6c 65 09 09 2a 2f 0a |urrent f|ile..*/.|
|000046a0| 65 78 74 65 72 6e 09 69 | 6e 74 09 66 69 6c 65 69 |extern.i|nt.filei|
|000046b0| 6e 73 65 72 74 28 29 3b | 09 09 2f 2a 20 49 6e 73 |nsert();|../* Ins|
|000046c0| 65 72 74 20 66 69 6c 65 | 20 69 6e 74 6f 20 62 75 |ert file| into bu|
|000046d0| 66 66 65 72 09 2a 2f 0a | 0a 2f 2a 0a 20 2a 20 44 |ffer.*/.|./*. * D|
|000046e0| 65 66 69 6e 65 64 20 62 | 79 20 22 6d 61 74 63 68 |efined b|y "match|
|000046f0| 2e 63 22 0a 20 2a 2f 0a | 65 78 74 65 72 6e 09 69 |.c". */.|extern.i|
|00004700| 6e 74 09 62 6c 69 6e 6b | 70 61 72 65 6e 28 29 3b |nt.blink|paren();|
|00004710| 09 09 2f 2a 20 46 61 6b | 65 20 62 6c 69 6e 6b 2d |../* Fak|e blink-|
|00004720| 6d 61 74 63 68 69 6e 67 | 2d 70 61 72 65 6e 20 76 |matching|-paren v|
|00004730| 61 72 20 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |ar */.ex|tern.int|
|00004740| 09 73 68 6f 77 6d 61 74 | 63 68 28 29 3b 09 09 2f |.showmat|ch();../|
|00004750| 2a 20 48 61 63 6b 20 74 | 6f 20 73 68 6f 77 20 6d |* Hack t|o show m|
|00004760| 61 74 63 68 69 6e 67 20 | 70 61 72 65 6e 09 20 2a |atching |paren. *|
|00004770| 2f 0a 0a 2f 2a 0a 20 2a | 20 44 65 66 69 6e 65 64 |/../*. *| Defined|
|00004780| 20 62 79 20 22 72 61 6e | 64 6f 6d 2e 63 22 2e 0a | by "ran|dom.c"..|
|00004790| 20 2a 2f 0a 65 78 74 65 | 72 6e 09 69 6e 74 09 73 | */.exte|rn.int.s|
|000047a0| 65 6c 66 69 6e 73 65 72 | 74 28 29 3b 09 09 2f 2a |elfinser|t();../*|
|000047b0| 20 49 6e 73 65 72 74 20 | 63 68 61 72 61 63 74 65 | Insert |characte|
|000047c0| 72 09 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |r..*/.ex|tern.int|
|000047d0| 09 73 68 6f 77 63 70 6f | 73 28 29 3b 09 09 2f 2a |.showcpo|s();../*|
|000047e0| 20 53 68 6f 77 20 74 68 | 65 20 63 75 72 73 6f 72 | Show th|e cursor|
|000047f0| 20 70 6f 73 69 74 69 6f | 6e 09 2a 2f 0a 65 78 74 | positio|n.*/.ext|
|00004800| 65 72 6e 09 69 6e 74 09 | 74 77 69 64 64 6c 65 28 |ern.int.|twiddle(|
|00004810| 29 3b 09 09 2f 2a 20 54 | 77 69 64 64 6c 65 20 63 |);../* T|widdle c|
|00004820| 68 61 72 61 63 74 65 72 | 73 09 09 2a 2f 0a 65 78 |haracter|s..*/.ex|
|00004830| 74 65 72 6e 09 69 6e 74 | 09 71 75 6f 74 65 28 29 |tern.int|.quote()|
|00004840| 3b 09 09 2f 2a 20 49 6e | 73 65 72 74 20 6c 69 74 |;../* In|sert lit|
|00004850| 65 72 61 6c 09 09 2a 2f | 0a 65 78 74 65 72 6e 09 |eral..*/|.extern.|
|00004860| 69 6e 74 09 6f 70 65 6e | 6c 69 6e 65 28 29 3b 09 |int.open|line();.|
|00004870| 09 2f 2a 20 4f 70 65 6e | 20 75 70 20 61 20 62 6c |./* Open| up a bl|
|00004880| 61 6e 6b 20 6c 69 6e 65 | 09 09 2a 2f 0a 65 78 74 |ank line|..*/.ext|
|00004890| 65 72 6e 09 69 6e 74 09 | 6e 65 77 6c 69 6e 65 28 |ern.int.|newline(|
|000048a0| 29 3b 09 09 2f 2a 20 49 | 6e 73 65 72 74 20 43 52 |);../* I|nsert CR|
|000048b0| 2d 4c 46 09 09 09 2a 2f | 0a 65 78 74 65 72 6e 09 |-LF...*/|.extern.|
|000048c0| 69 6e 74 09 64 65 62 6c | 61 6e 6b 28 29 3b 09 09 |int.debl|ank();..|
|000048d0| 2f 2a 20 44 65 6c 65 74 | 65 20 62 6c 61 6e 6b 20 |/* Delet|e blank |
|000048e0| 6c 69 6e 65 73 09 09 2a | 2f 0a 65 78 74 65 72 6e |lines..*|/.extern|
|000048f0| 09 69 6e 74 09 64 65 6c | 77 68 69 74 65 28 29 3b |.int.del|white();|
|00004900| 09 09 2f 2a 20 44 65 6c | 65 74 65 20 65 78 74 72 |../* Del|ete extr|
|00004910| 61 20 77 68 69 74 65 73 | 70 61 63 65 09 2a 2f 0a |a whites|pace.*/.|
|00004920| 65 78 74 65 72 6e 09 69 | 6e 74 09 69 6e 64 65 6e |extern.i|nt.inden|
|00004930| 74 28 29 3b 09 09 2f 2a | 20 49 6e 73 65 72 74 20 |t();../*| Insert |
|00004940| 43 52 2d 4c 46 2c 20 74 | 68 65 6e 20 69 6e 64 65 |CR-LF, t|hen inde|
|00004950| 6e 74 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |nt.*/.ex|tern.int|
|00004960| 09 66 6f 72 77 64 65 6c | 28 29 3b 09 09 2f 2a 20 |.forwdel|();../* |
|00004970| 46 6f 72 77 61 72 64 20 | 64 65 6c 65 74 65 09 09 |Forward |delete..|
|00004980| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 62 61 |*/.exter|n.int.ba|
|00004990| 63 6b 64 65 6c 28 29 3b | 09 09 2f 2a 20 42 61 63 |ckdel();|../* Bac|
|000049a0| 6b 77 61 72 64 20 64 65 | 6c 65 74 65 20 69 6e 09 |kward de|lete in.|
|000049b0| 09 2a 2f 0a 65 78 74 65 | 72 6e 09 69 6e 74 09 6b |.*/.exte|rn.int.k|
|000049c0| 69 6c 6c 6c 69 6e 65 28 | 29 3b 09 09 2f 2a 20 4b |illline(|);../* K|
|000049d0| 69 6c 6c 20 66 6f 72 77 | 61 72 64 09 09 09 2a 2f |ill forw|ard...*/|
|000049e0| 0a 65 78 74 65 72 6e 09 | 69 6e 74 09 79 61 6e 6b |.extern.|int.yank|
|000049f0| 28 29 3b 09 09 09 2f 2a | 20 59 61 6e 6b 20 62 61 |();.../*| Yank ba|
|00004a00| 63 6b 20 66 72 6f 6d 20 | 6b 69 6c 6c 62 75 66 66 |ck from |killbuff|
|00004a10| 65 72 2e 09 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |er..*/.e|xtern.in|
|00004a20| 74 09 62 73 6d 61 70 6d | 6f 64 65 28 29 3b 09 09 |t.bsmapm|ode();..|
|00004a30| 2f 2a 20 73 65 74 20 62 | 73 6d 61 70 20 6d 6f 64 |/* set b|smap mod|
|00004a40| 65 09 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |e..*/.ex|tern.int|
|00004a50| 09 66 6c 6f 77 6d 6f 64 | 65 28 29 3b 09 09 2f 2a |.flowmod|e();../*|
|00004a60| 20 73 65 74 20 66 6c 6f | 77 20 6d 6f 64 65 09 09 | set flo|w mode..|
|00004a70| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 69 6e |*/.exter|n.int.in|
|00004a80| 64 65 6e 74 6d 6f 64 65 | 28 29 3b 09 09 2f 2a 20 |dentmode|();../* |
|00004a90| 73 65 74 20 61 75 74 6f | 2d 69 6e 64 65 6e 74 20 |set auto|-indent |
|00004aa0| 6d 6f 64 65 09 09 2a 2f | 0a 65 78 74 65 72 6e 09 |mode..*/|.extern.|
|00004ab0| 69 6e 74 09 66 69 6c 6c | 6d 6f 64 65 28 29 3b 09 |int.fill|mode();.|
|00004ac0| 09 2f 2a 20 73 65 74 20 | 77 6f 72 64 2d 77 72 61 |./* set |word-wra|
|00004ad0| 70 20 6d 6f 64 65 09 09 | 2a 2f 0a 0a 2f 2a 0a 20 |p mode..|*/../*. |
|00004ae0| 2a 20 44 65 66 69 6e 65 | 64 20 62 79 20 22 72 65 |* Define|d by "re|
|00004af0| 67 69 6f 6e 2e 63 22 2e | 0a 20 2a 2f 0a 65 78 74 |gion.c".|. */.ext|
|00004b00| 65 72 6e 09 69 6e 74 09 | 6b 69 6c 6c 72 65 67 69 |ern.int.|killregi|
|00004b10| 6f 6e 28 29 3b 09 09 2f | 2a 20 4b 69 6c 6c 20 72 |on();../|* Kill r|
|00004b20| 65 67 69 6f 6e 2e 09 09 | 09 2a 2f 0a 65 78 74 65 |egion...|.*/.exte|
|00004b30| 72 6e 09 69 6e 74 09 63 | 6f 70 79 72 65 67 69 6f |rn.int.c|opyregio|
|00004b40| 6e 28 29 3b 09 09 2f 2a | 20 43 6f 70 79 20 72 65 |n();../*| Copy re|
|00004b50| 67 69 6f 6e 20 74 6f 20 | 6b 69 6c 6c 20 62 75 66 |gion to |kill buf|
|00004b60| 66 65 72 2e 09 2a 2f 0a | 65 78 74 65 72 6e 09 69 |fer..*/.|extern.i|
|00004b70| 6e 74 09 6c 6f 77 65 72 | 72 65 67 69 6f 6e 28 29 |nt.lower|region()|
|00004b80| 3b 09 09 2f 2a 20 4c 6f | 77 65 72 20 63 61 73 65 |;../* Lo|wer case|
|00004b90| 20 72 65 67 69 6f 6e 2e | 09 09 2a 2f 0a 65 78 74 | region.|..*/.ext|
|00004ba0| 65 72 6e 09 69 6e 74 09 | 75 70 70 65 72 72 65 67 |ern.int.|upperreg|
|00004bb0| 69 6f 6e 28 29 3b 09 09 | 2f 2a 20 55 70 70 65 72 |ion();..|/* Upper|
|00004bc0| 20 63 61 73 65 20 72 65 | 67 69 6f 6e 2e 09 09 2a | case re|gion...*|
|00004bd0| 2f 0a 23 69 66 64 65 66 | 09 50 52 45 46 49 58 52 |/.#ifdef|.PREFIXR|
|00004be0| 45 47 49 4f 4e 0a 65 78 | 74 65 72 6e 09 69 6e 74 |EGION.ex|tern.int|
|00004bf0| 09 70 72 65 66 69 78 72 | 65 67 69 6f 6e 28 29 3b |.prefixr|egion();|
|00004c00| 09 09 2f 2a 20 50 72 65 | 66 69 78 20 61 6c 6c 20 |../* Pre|fix all |
|00004c10| 6c 69 6e 65 73 20 69 6e | 20 72 65 67 69 6f 6e 09 |lines in| region.|
|00004c20| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 73 65 |*/.exter|n.int.se|
|00004c30| 74 70 72 65 66 69 78 28 | 29 3b 09 09 2f 2a 20 53 |tprefix(|);../* S|
|00004c40| 65 74 20 6c 69 6e 65 20 | 70 72 65 66 69 78 20 73 |et line |prefix s|
|00004c50| 74 72 69 6e 67 09 2a 2f | 0a 23 65 6e 64 69 66 0a |tring.*/|.#endif.|
|00004c60| 0a 2f 2a 0a 20 2a 20 44 | 65 66 69 6e 65 64 20 62 |./*. * D|efined b|
|00004c70| 79 20 22 73 70 61 77 6e | 2e 63 22 2e 0a 20 2a 2f |y "spawn|.c".. */|
|00004c80| 0a 65 78 74 65 72 6e 09 | 69 6e 74 09 73 70 61 77 |.extern.|int.spaw|
|00004c90| 6e 63 6c 69 28 29 3b 09 | 09 2f 2a 20 52 75 6e 20 |ncli();.|./* Run |
|00004ca0| 43 4c 49 20 69 6e 20 61 | 20 73 75 62 6a 6f 62 2e |CLI in a| subjob.|
|00004cb0| 09 09 2a 2f 0a 23 69 66 | 64 65 66 09 56 4d 53 0a |..*/.#if|def.VMS.|
|00004cc0| 65 78 74 65 72 6e 09 69 | 6e 74 09 61 74 74 61 63 |extern.i|nt.attac|
|00004cd0| 68 74 6f 70 61 72 65 6e | 74 28 29 3b 09 2f 2a 20 |htoparen|t();./* |
|00004ce0| 41 74 74 61 63 68 20 74 | 6f 20 70 61 72 65 6e 74 |Attach t|o parent|
|00004cf0| 20 70 72 6f 63 65 73 73 | 09 2a 2f 0a 23 65 6e 64 | process|.*/.#end|
|00004d00| 69 66 0a 0a 2f 2a 0a 20 | 2a 20 44 65 66 69 6e 65 |if../*. |* Define|
|00004d10| 64 20 62 79 20 22 77 69 | 6e 64 6f 77 2e 63 22 2e |d by "wi|ndow.c".|
|00004d20| 0a 20 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |. */.ext|ern.int.|
|00004d30| 72 65 70 6f 73 69 74 69 | 6f 6e 28 29 3b 09 09 2f |repositi|on();../|
|00004d40| 2a 20 52 65 70 6f 73 69 | 74 69 6f 6e 20 77 69 6e |* Reposi|tion win|
|00004d50| 64 6f 77 09 09 2a 2f 0a | 65 78 74 65 72 6e 09 69 |dow..*/.|extern.i|
|00004d60| 6e 74 09 72 65 66 72 65 | 73 68 28 29 3b 09 09 2f |nt.refre|sh();../|
|00004d70| 2a 20 52 65 66 72 65 73 | 68 20 74 68 65 20 73 63 |* Refres|h the sc|
|00004d80| 72 65 65 6e 09 09 2a 2f | 0a 65 78 74 65 72 6e 09 |reen..*/|.extern.|
|00004d90| 69 6e 74 09 6e 65 78 74 | 77 69 6e 64 28 29 3b 09 |int.next|wind();.|
|00004da0| 09 2f 2a 20 4d 6f 76 65 | 20 74 6f 20 74 68 65 20 |./* Move| to the |
|00004db0| 6e 65 78 74 20 77 69 6e | 64 6f 77 09 2a 2f 0a 65 |next win|dow.*/.e|
|00004dc0| 78 74 65 72 6e 20 20 69 | 6e 74 09 70 72 65 76 77 |xtern i|nt.prevw|
|00004dd0| 69 6e 64 28 29 3b 09 09 | 2f 2a 20 4d 6f 76 65 20 |ind();..|/* Move |
|00004de0| 74 6f 20 74 68 65 20 70 | 72 65 76 69 6f 75 73 20 |to the p|revious |
|00004df0| 77 69 6e 64 6f 77 09 2a | 2f 0a 65 78 74 65 72 6e |window.*|/.extern|
|00004e00| 09 69 6e 74 09 6f 6e 6c | 79 77 69 6e 64 28 29 3b |.int.onl|ywind();|
|00004e10| 09 09 2f 2a 20 4d 61 6b | 65 20 63 75 72 72 65 6e |../* Mak|e curren|
|00004e20| 74 20 77 69 6e 64 6f 77 | 20 6f 6e 6c 79 20 6f 6e |t window| only on|
|00004e30| 65 09 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |e.*/.ext|ern.int.|
|00004e40| 73 70 6c 69 74 77 69 6e | 64 28 29 3b 09 09 2f 2a |splitwin|d();../*|
|00004e50| 20 53 70 6c 69 74 20 63 | 75 72 72 65 6e 74 20 77 | Split c|urrent w|
|00004e60| 69 6e 64 6f 77 09 09 2a | 2f 0a 65 78 74 65 72 6e |indow..*|/.extern|
|00004e70| 09 69 6e 74 09 64 65 6c | 77 69 6e 64 28 29 3b 09 |.int.del|wind();.|
|00004e80| 09 2f 2a 20 44 65 6c 65 | 74 65 20 63 75 72 72 65 |./* Dele|te curre|
|00004e90| 6e 74 20 77 69 6e 64 6f | 77 09 2a 2f 0a 65 78 74 |nt windo|w.*/.ext|
|00004ea0| 65 72 6e 09 69 6e 74 09 | 65 6e 6c 61 72 67 65 77 |ern.int.|enlargew|
|00004eb0| 69 6e 64 28 29 3b 09 09 | 2f 2a 20 45 6e 6c 61 72 |ind();..|/* Enlar|
|00004ec0| 67 65 20 64 69 73 70 6c | 61 79 20 77 69 6e 64 6f |ge displ|ay windo|
|00004ed0| 77 2e 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |w..*/.ex|tern.int|
|00004ee0| 09 73 68 72 69 6e 6b 77 | 69 6e 64 28 29 3b 09 09 |.shrinkw|ind();..|
|00004ef0| 2f 2a 20 53 68 72 69 6e | 6b 20 77 69 6e 64 6f 77 |/* Shrin|k window|
|00004f00| 2e 09 09 2a 2f 0a 0a 2f | 2a 0a 20 2a 20 44 65 66 |...*/../|*. * Def|
|00004f10| 69 6e 65 64 20 62 79 20 | 22 77 6f 72 64 2e 63 22 |ined by |"word.c"|
|00004f20| 2e 0a 20 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |.. */.ex|tern.int|
|00004f30| 09 62 61 63 6b 77 6f 72 | 64 28 29 3b 09 09 2f 2a |.backwor|d();../*|
|00004f40| 20 42 61 63 6b 75 70 20 | 62 79 20 77 6f 72 64 73 | Backup |by words|
|00004f50| 09 09 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |..*/.ext|ern.int.|
|00004f60| 66 6f 72 77 77 6f 72 64 | 28 29 3b 09 09 2f 2a 20 |forwword|();../* |
|00004f70| 41 64 76 61 6e 63 65 20 | 62 79 20 77 6f 72 64 73 |Advance |by words|
|00004f80| 09 09 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |..*/.ext|ern.int.|
|00004f90| 75 70 70 65 72 77 6f 72 | 64 28 29 3b 09 09 2f 2a |upperwor|d();../*|
|00004fa0| 20 55 70 70 65 72 20 63 | 61 73 65 20 77 6f 72 64 | Upper c|ase word|
|00004fb0| 2e 09 09 2a 2f 0a 65 78 | 74 65 72 6e 09 69 6e 74 |...*/.ex|tern.int|
|00004fc0| 09 6c 6f 77 65 72 77 6f | 72 64 28 29 3b 09 09 2f |.lowerwo|rd();../|
|00004fd0| 2a 20 4c 6f 77 65 72 20 | 63 61 73 65 20 77 6f 72 |* Lower |case wor|
|00004fe0| 64 2e 09 09 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |d...*/.e|xtern.in|
|00004ff0| 74 09 63 61 70 77 6f 72 | 64 28 29 3b 09 09 2f 2a |t.capwor|d();../*|
|00005000| 20 49 6e 69 74 69 61 6c | 20 63 61 70 69 74 61 6c | Initial| capital|
|00005010| 69 7a 65 20 77 6f 72 64 | 2e 09 2a 2f 0a 65 78 74 |ize word|..*/.ext|
|00005020| 65 72 6e 09 69 6e 74 09 | 64 65 6c 66 77 6f 72 64 |ern.int.|delfword|
|00005030| 28 29 3b 09 09 2f 2a 20 | 44 65 6c 65 74 65 20 66 |();../* |Delete f|
|00005040| 6f 72 77 61 72 64 20 77 | 6f 72 64 2e 09 09 2a 2f |orward w|ord...*/|
|00005050| 0a 65 78 74 65 72 6e 09 | 69 6e 74 09 64 65 6c 62 |.extern.|int.delb|
|00005060| 77 6f 72 64 28 29 3b 09 | 09 2f 2a 20 44 65 6c 65 |word();.|./* Dele|
|00005070| 74 65 20 62 61 63 6b 77 | 61 72 64 20 77 6f 72 64 |te backw|ard word|
|00005080| 2e 09 2a 2f 0a 0a 2f 2a | 0a 20 2a 20 44 65 66 69 |..*/../*|. * Defi|
|00005090| 6e 65 64 20 62 79 20 22 | 65 78 74 65 6e 64 2e 63 |ned by "|extend.c|
|000050a0| 22 2e 0a 20 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |".. */.e|xtern.in|
|000050b0| 74 09 65 78 74 65 6e 64 | 28 29 3b 09 09 2f 2a 20 |t.extend|();../* |
|000050c0| 45 78 74 65 6e 64 65 64 | 20 63 6f 6d 6d 61 6e 64 |Extended| command|
|000050d0| 73 2e 09 09 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |s...*/.e|xtern.in|
|000050e0| 74 09 64 65 73 63 6b 65 | 79 28 29 3b 09 09 2f 2a |t.descke|y();../*|
|000050f0| 20 48 65 6c 70 20 6b 65 | 79 2e 09 09 09 2a 2f 0a | Help ke|y....*/.|
|00005100| 65 78 74 65 72 6e 09 69 | 6e 74 09 62 69 6e 64 74 |extern.i|nt.bindt|
|00005110| 6f 6b 65 79 28 29 3b 09 | 09 2f 2a 20 4d 6f 64 69 |okey();.|./* Modi|
|00005120| 66 79 20 6b 65 79 20 62 | 69 6e 64 69 6e 67 73 2e |fy key b|indings.|
|00005130| 09 09 2a 2f 0a 65 78 74 | 65 72 6e 09 69 6e 74 09 |..*/.ext|ern.int.|
|00005140| 75 6e 73 65 74 6b 65 79 | 28 29 3b 09 09 2f 2a 20 |unsetkey|();../* |
|00005150| 55 6e 62 69 6e 64 20 61 | 20 6b 65 79 2e 09 09 2a |Unbind a| key...*|
|00005160| 2f 0a 65 78 74 65 72 6e | 09 69 6e 74 09 77 61 6c |/.extern|.int.wal|
|00005170| 6c 63 68 61 72 74 28 29 | 3b 09 09 2f 2a 20 4d 61 |lchart()|;../* Ma|
|00005180| 6b 65 20 77 61 6c 6c 20 | 63 68 61 72 74 2e 09 09 |ke wall |chart...|
|00005190| 2a 2f 0a 23 69 66 64 65 | 66 09 53 54 41 52 54 55 |*/.#ifde|f.STARTU|
|000051a0| 50 0a 65 78 74 65 72 6e | 09 69 6e 74 09 65 76 61 |P.extern|.int.eva|
|000051b0| 6c 65 78 70 72 28 29 3b | 09 09 2f 2a 20 45 78 74 |lexpr();|../* Ext|
|000051c0| 65 6e 64 65 64 20 63 6f | 6d 6d 61 6e 64 73 20 28 |ended co|mmands (|
|000051d0| 61 67 61 69 6e 29 09 2a | 2f 0a 65 78 74 65 72 6e |again).*|/.extern|
|000051e0| 09 69 6e 74 09 65 76 61 | 6c 62 75 66 66 65 72 28 |.int.eva|lbuffer(|
|000051f0| 29 3b 09 09 2f 2a 20 45 | 76 61 6c 75 61 74 65 20 |);../* E|valuate |
|00005200| 63 75 72 72 65 6e 74 20 | 62 75 66 66 65 72 09 2a |current |buffer.*|
|00005210| 2f 0a 65 78 74 65 72 6e | 09 69 6e 74 09 65 76 61 |/.extern|.int.eva|
|00005220| 6c 66 69 6c 65 28 29 3b | 09 09 2f 2a 20 45 76 61 |lfile();|../* Eva|
|00005230| 6c 75 61 74 65 20 61 20 | 66 69 6c 65 09 09 2a 2f |luate a |file..*/|
|00005240| 0a 23 65 6e 64 69 66 0a | 0a 2f 2a 0a 20 2a 20 64 |.#endif.|./*. * d|
|00005250| 65 66 69 6e 65 64 20 62 | 79 20 22 70 61 72 61 67 |efined b|y "parag|
|00005260| 72 61 70 68 2e 63 22 20 | 2d 20 74 68 65 20 70 61 |raph.c" |- the pa|
|00005270| 72 61 67 72 61 70 68 20 | 6a 75 73 74 69 66 69 63 |ragraph |justific|
|00005280| 61 74 69 6f 6e 20 63 6f | 64 65 2e 0a 20 2a 2f 0a |ation co|de.. */.|
|00005290| 65 78 74 65 72 6e 09 69 | 6e 74 09 67 6f 74 6f 62 |extern.i|nt.gotob|
|000052a0| 6f 70 28 29 3b 09 09 2f | 2a 20 4d 6f 76 65 20 74 |op();../|* Move t|
|000052b0| 6f 20 73 74 61 72 74 20 | 6f 66 20 70 61 72 61 67 |o start |of parag|
|000052c0| 72 61 70 68 2e 09 2a 2f | 0a 65 78 74 65 72 6e 09 |raph..*/|.extern.|
|000052d0| 69 6e 74 09 67 6f 74 6f | 65 6f 70 28 29 3b 09 09 |int.goto|eop();..|
|000052e0| 2f 2a 20 4d 6f 76 65 20 | 74 6f 20 65 6e 64 20 6f |/* Move |to end o|
|000052f0| 66 20 70 61 72 61 67 72 | 61 70 68 2e 09 2a 2f 0a |f paragr|aph..*/.|
|00005300| 65 78 74 65 72 6e 09 69 | 6e 74 09 66 69 6c 6c 70 |extern.i|nt.fillp|
|00005310| 61 72 61 28 29 3b 09 09 | 2f 2a 20 4a 75 73 74 69 |ara();..|/* Justi|
|00005320| 66 79 20 61 20 70 61 72 | 61 67 72 61 70 68 2e 09 |fy a par|agraph..|
|00005330| 09 2a 2f 0a 65 78 74 65 | 72 6e 09 69 6e 74 09 6b |.*/.exte|rn.int.k|
|00005340| 69 6c 6c 70 61 72 61 28 | 29 3b 09 09 2f 2a 20 44 |illpara(|);../* D|
|00005350| 65 6c 65 74 65 20 61 20 | 70 61 72 61 67 72 61 70 |elete a |paragrap|
|00005360| 68 2e 09 09 2a 2f 0a 65 | 78 74 65 72 6e 09 69 6e |h...*/.e|xtern.in|
|00005370| 74 09 73 65 74 66 69 6c | 6c 63 6f 6c 28 29 3b 09 |t.setfil|lcol();.|
|00005380| 09 2f 2a 20 53 65 74 20 | 66 69 6c 6c 20 63 6f 6c |./* Set |fill col|
|00005390| 75 6d 6e 20 66 6f 72 20 | 6a 75 73 74 69 66 79 2e |umn for |justify.|
|000053a0| 09 2a 2f 0a 65 78 74 65 | 72 6e 09 69 6e 74 09 66 |.*/.exte|rn.int.f|
|000053b0| 69 6c 6c 77 6f 72 64 28 | 29 3b 09 09 2f 2a 20 49 |illword(|);../* I|
|000053c0| 6e 73 65 72 74 20 63 68 | 61 72 20 77 69 74 68 20 |nsert ch|ar with |
|000053d0| 77 6f 72 64 20 77 72 61 | 70 2e 09 2a 2f 0a 0a 2f |word wra|p..*/../|
|000053e0| 2a 0a 20 2a 20 64 65 66 | 69 6e 65 64 20 62 79 20 |*. * def|ined by |
|000053f0| 70 72 65 66 69 78 2e 63 | 0a 20 2a 2f 0a 65 78 74 |prefix.c|. */.ext|
|00005400| 65 72 6e 09 69 6e 74 09 | 68 65 6c 70 28 29 3b 09 |ern.int.|help();.|
|00005410| 09 09 2f 2a 20 50 61 72 | 73 65 20 68 65 6c 70 20 |../* Par|se help |
|00005420| 6b 65 79 2e 09 09 2a 2f | 0a 65 78 74 65 72 6e 09 |key...*/|.extern.|
|00005430| 69 6e 74 09 63 74 6c 78 | 34 68 61 63 6b 28 29 3b |int.ctlx|4hack();|
|00005440| 09 09 2f 2a 20 50 61 72 | 73 65 20 61 20 70 6f 70 |../* Par|se a pop|
|00005450| 2d 74 6f 20 6b 65 79 2e | 09 09 2a 2f 0a 0a 74 79 |-to key.|..*/..ty|
|00005460| 70 65 64 65 66 09 73 74 | 72 75 63 74 09 7b 0a 09 |pedef.st|ruct.{..|
|00005470| 4b 45 59 09 6b 5f 6b 65 | 79 3b 09 09 09 2f 2a 20 |KEY.k_ke|y;.../* |
|00005480| 4b 65 79 20 74 6f 20 62 | 69 6e 64 2e 09 09 09 2a |Key to b|ind....*|
|00005490| 2f 0a 09 69 6e 74 09 28 | 2a 6b 5f 66 75 6e 63 70 |/..int.(|*k_funcp|
|000054a0| 29 28 29 3b 09 09 2f 2a | 20 46 75 6e 63 74 69 6f |)();../*| Functio|
|000054b0| 6e 2e 09 09 09 2a 2f 0a | 09 63 68 61 72 09 2a 6b |n....*/.|.char.*k|
|000054c0| 5f 6e 61 6d 65 3b 09 09 | 2f 2a 20 46 75 6e 63 74 |_name;..|/* Funct|
|000054d0| 69 6f 6e 20 6e 61 6d 65 | 20 73 74 72 69 6e 67 2e |ion name| string.|
|000054e0| 09 2a 2f 0a 7d 09 4b 45 | 59 54 41 42 3b 0a 0a 2f |.*/.}.KE|YTAB;../|
|000054f0| 2a 0a 20 2a 20 44 65 66 | 61 75 6c 74 20 6b 65 79 |*. * Def|ault key|
|00005500| 20 62 69 6e 64 69 6e 67 | 20 74 61 62 6c 65 2e 20 | binding| table. |
|00005510| 54 68 69 73 20 63 6f 6e | 74 61 69 6e 73 0a 20 2a |This con|tains. *|
|00005520| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 6e 61 | the fun|ction na|
|00005530| 6d 65 73 2c 20 74 68 65 | 20 73 79 6d 62 6f 6c 20 |mes, the| symbol |
|00005540| 74 61 62 6c 65 20 6e 61 | 6d 65 2c 20 61 6e 64 20 |table na|me, and |
|00005550| 28 70 6f 73 73 69 62 6c | 79 29 0a 20 2a 20 61 20 |(possibl|y). * a |
|00005560| 6b 65 79 20 62 69 6e 64 | 69 6e 67 20 66 6f 72 20 |key bind|ing for |
|00005570| 74 68 65 20 62 75 69 6c | 74 69 6e 20 66 75 6e 63 |the buil|tin func|
|00005580| 74 69 6f 6e 73 2e 20 54 | 68 65 72 65 20 61 72 65 |tions. T|here are|
|00005590| 20 6e 6f 0a 20 2a 20 62 | 69 6e 64 69 6e 67 73 20 | no. * b|indings |
|000055a0| 66 6f 72 20 43 2d 55 20 | 6f 72 20 43 2d 58 2e 20 |for C-U |or C-X. |
|000055b0| 54 68 65 73 65 20 61 72 | 65 20 64 6f 6e 65 20 77 |These ar|e done w|
|000055c0| 69 74 68 20 73 70 65 63 | 69 61 6c 0a 20 2a 20 63 |ith spec|ial. * c|
|000055d0| 6f 64 65 2c 20 62 75 74 | 20 73 68 6f 75 6c 64 20 |ode, but| should |
|000055e0| 62 65 20 64 6f 6e 65 20 | 6e 6f 72 6d 61 6c 6c 79 |be done |normally|
|000055f0| 2e 0a 20 2a 2f 0a 4b 45 | 59 54 41 42 09 6b 65 79 |.. */.KE|YTAB.key|
|00005600| 5b 5d 20 3d 20 7b 0a 23 | 69 66 64 65 66 09 4d 45 |[] = {.#|ifdef.ME|
|00005610| 59 4e 09 09 2f 2a 20 41 | 64 64 20 6d 65 79 65 72 |YN../* A|dd meyer|
|00005620| 27 73 20 70 65 63 75 6c | 69 61 72 20 62 69 6e 64 |'s pecul|iar bind|
|00005630| 69 6e 67 73 20 2a 2f 0a | 09 4b 43 54 52 4c 7c 27 |ings */.|.KCTRL|'|
|00005640| 4a 27 2c 09 6e 65 77 6c | 69 6e 65 2c 09 22 69 6e |J',.newl|ine,."in|
|00005650| 73 65 72 74 2d 6e 65 77 | 6c 69 6e 65 22 2c 0a 09 |sert-new|line",..|
|00005660| 4b 43 54 52 4c 7c 27 4d | 27 2c 09 69 6e 64 65 6e |KCTRL|'M|',.inden|
|00005670| 74 2c 09 09 22 6e 65 77 | 6c 69 6e 65 2d 61 6e 64 |t,.."new|line-and|
|00005680| 2d 69 6e 64 65 6e 74 22 | 2c 0a 09 4b 43 54 4c 58 |-indent"|,..KCTLX|
|00005690| 7c 27 4e 27 2c 09 6e 65 | 78 74 77 69 6e 64 2c 20 ||'N',.ne|xtwind, |
|000056a0| 09 22 6e 65 78 74 2d 77 | 69 6e 64 6f 77 22 2c 0a |."next-w|indow",.|
|000056b0| 09 4b 43 54 4c 58 7c 27 | 50 27 2c 09 70 72 65 76 |.KCTLX|'|P',.prev|
|000056c0| 77 69 6e 64 2c 09 22 70 | 72 65 76 69 6f 75 73 2d |wind,."p|revious-|
|000056d0| 77 69 6e 64 6f 77 22 2c | 0a 09 4b 4d 45 54 41 7c |window",|..KMETA||
|000056e0| 4b 43 54 52 4c 7c 27 43 | 27 2c 71 75 69 74 2c 09 |KCTRL|'C|',quit,.|
|000056f0| 09 22 73 61 76 65 2d 62 | 75 66 66 65 72 73 2d 6b |."save-b|uffers-k|
|00005700| 69 6c 6c 2d 65 6d 61 63 | 73 22 2c 0a 09 4b 4d 45 |ill-emac|s",..KME|
|00005710| 54 41 7c 4b 43 54 52 4c | 7c 27 4c 27 2c 72 65 66 |TA|KCTRL||'L',ref|
|00005720| 72 65 73 68 2c 09 22 72 | 65 64 72 61 77 2d 64 69 |resh,."r|edraw-di|
|00005730| 73 70 6c 61 79 22 2c 0a | 09 4b 4d 45 54 41 7c 27 |splay",.|.KMETA|'|
|00005740| 47 27 2c 09 67 6f 74 6f | 6c 69 6e 65 2c 09 22 67 |G',.goto|line,."g|
|00005750| 6f 74 6f 2d 6c 69 6e 65 | 22 2c 0a 09 4b 4d 45 54 |oto-line|",..KMET|
|00005760| 41 7c 27 4a 27 2c 09 66 | 69 6c 6c 70 61 72 61 2c |A|'J',.f|illpara,|
|00005770| 09 22 66 69 6c 6c 2d 70 | 61 72 61 67 72 61 70 68 |."fill-p|aragraph|
|00005780| 22 2c 0a 09 4b 4d 45 54 | 41 7c 27 51 27 2c 09 71 |",..KMET|A|'Q',.q|
|00005790| 75 65 72 79 72 65 70 6c | 2c 09 22 71 75 65 72 79 |ueryrepl|,."query|
|000057a0| 2d 72 65 70 6c 61 63 65 | 22 2c 0a 23 65 6e 64 69 |-replace|",.#endi|
|000057b0| 66 0a 09 4b 43 54 52 4c | 7c 27 40 27 2c 09 73 65 |f..KCTRL||'@',.se|
|000057c0| 74 6d 61 72 6b 2c 09 22 | 73 65 74 2d 6d 61 72 6b |tmark,."|set-mark|
|000057d0| 2d 63 6f 6d 6d 61 6e 64 | 22 2c 0a 09 4b 43 54 52 |-command|",..KCTR|
|000057e0| 4c 7c 27 41 27 2c 09 67 | 6f 74 6f 62 6f 6c 2c 09 |L|'A',.g|otobol,.|
|000057f0| 22 62 65 67 69 6e 6e 69 | 6e 67 2d 6f 66 2d 6c 69 |"beginni|ng-of-li|
|00005800| 6e 65 22 2c 0a 09 4b 43 | 54 52 4c 7c 27 42 27 2c |ne",..KC|TRL|'B',|
|00005810| 09 62 61 63 6b 63 68 61 | 72 2c 09 22 62 61 63 6b |.backcha|r,."back|
|00005820| 77 61 72 64 2d 63 68 61 | 72 22 2c 0a 09 4b 43 54 |ward-cha|r",..KCT|
|00005830| 52 4c 7c 27 44 27 2c 09 | 66 6f 72 77 64 65 6c 2c |RL|'D',.|forwdel,|
|00005840| 09 22 64 65 6c 65 74 65 | 2d 63 68 61 72 22 2c 0a |."delete|-char",.|
|00005850| 09 4b 43 54 52 4c 7c 27 | 45 27 2c 09 67 6f 74 6f |.KCTRL|'|E',.goto|
|00005860| 65 6f 6c 2c 09 22 65 6e | 64 2d 6f 66 2d 6c 69 6e |eol,."en|d-of-lin|
|00005870| 65 22 2c 0a 09 4b 43 54 | 52 4c 7c 27 46 27 2c 09 |e",..KCT|RL|'F',.|
|00005880| 66 6f 72 77 63 68 61 72 | 2c 09 22 66 6f 72 77 61 |forwchar|,."forwa|
|00005890| 72 64 2d 63 68 61 72 22 | 2c 0a 09 4b 43 54 52 4c |rd-char"|,..KCTRL|
|000058a0| 7c 27 47 27 2c 09 63 74 | 72 6c 67 2c 09 09 22 6b ||'G',.ct|rlg,.."k|
|000058b0| 65 79 62 6f 61 72 64 2d | 71 75 69 74 22 2c 0a 09 |eyboard-|quit",..|
|000058c0| 4b 43 54 52 4c 7c 27 48 | 27 2c 09 68 65 6c 70 2c |KCTRL|'H|',.help,|
|000058d0| 09 09 22 68 65 6c 70 22 | 2c 0a 09 4b 43 54 52 4c |.."help"|,..KCTRL|
|000058e0| 7c 27 49 27 2c 09 73 65 | 6c 66 69 6e 73 65 72 74 ||'I',.se|lfinsert|
|000058f0| 2c 09 22 73 65 6c 66 2d | 69 6e 73 65 72 74 2d 63 |,."self-|insert-c|
|00005900| 6f 6d 6d 61 6e 64 22 2c | 0a 23 69 66 6e 64 65 66 |ommand",|.#ifndef|
|00005910| 09 4d 45 59 4e 0a 09 4b | 43 54 52 4c 7c 27 4a 27 |.MEYN..K|CTRL|'J'|
|00005920| 2c 09 69 6e 64 65 6e 74 | 2c 09 09 22 6e 65 77 6c |,.indent|,.."newl|
|00005930| 69 6e 65 2d 61 6e 64 2d | 69 6e 64 65 6e 74 22 2c |ine-and-|indent",|
|00005940| 0a 23 65 6e 64 69 66 0a | 09 4b 43 54 52 4c 7c 27 |.#endif.|.KCTRL|'|
|00005950| 4c 27 2c 09 72 65 70 6f | 73 69 74 69 6f 6e 2c 09 |L',.repo|sition,.|
|00005960| 22 72 65 63 65 6e 74 65 | 72 22 2c 0a 09 4b 43 54 |"recente|r",..KCT|
|00005970| 52 4c 7c 27 4b 27 2c 09 | 6b 69 6c 6c 6c 69 6e 65 |RL|'K',.|killline|
|00005980| 2c 09 22 6b 69 6c 6c 2d | 6c 69 6e 65 22 2c 0a 23 |,."kill-|line",.#|
|00005990| 69 66 6e 64 65 66 09 4d | 45 59 4e 0a 09 4b 43 54 |ifndef.M|EYN..KCT|
|000059a0| 52 4c 7c 27 4d 27 2c 09 | 6e 65 77 6c 69 6e 65 2c |RL|'M',.|newline,|
|000059b0| 09 22 69 6e 73 65 72 74 | 2d 6e 65 77 6c 69 6e 65 |."insert|-newline|
|000059c0| 22 2c 0a 23 65 6e 64 69 | 66 0a 09 4b 43 54 52 4c |",.#endi|f..KCTRL|
|000059d0| 7c 27 4e 27 2c 09 66 6f | 72 77 6c 69 6e 65 2c 09 ||'N',.fo|rwline,.|
|000059e0| 22 6e 65 78 74 2d 6c 69 | 6e 65 22 2c 0a 09 4b 43 |"next-li|ne",..KC|
|000059f0| 54 52 4c 7c 27 4f 27 2c | 09 6f 70 65 6e 6c 69 6e |TRL|'O',|.openlin|
|00005a00| 65 2c 09 22 6f 70 65 6e | 2d 6c 69 6e 65 22 2c 0a |e,."open|-line",.|
|00005a10| 09 4b 43 54 52 4c 7c 27 | 50 27 2c 09 62 61 63 6b |.KCTRL|'|P',.back|
|00005a20| 6c 69 6e 65 2c 09 22 70 | 72 65 76 69 6f 75 73 2d |line,."p|revious-|
|00005a30| 6c 69 6e 65 22 2c 0a 09 | 4b 43 54 52 4c 7c 27 51 |line",..|KCTRL|'Q|
|00005a40| 27 2c 09 71 75 6f 74 65 | 2c 09 09 22 71 75 6f 74 |',.quote|,.."quot|
|00005a50| 65 64 2d 69 6e 73 65 72 | 74 22 2c 0a 09 4b 43 54 |ed-inser|t",..KCT|
|00005a60| 52 4c 7c 27 52 27 2c 09 | 62 61 63 6b 69 73 65 61 |RL|'R',.|backisea|
|00005a70| 72 63 68 2c 09 22 69 73 | 65 61 72 63 68 2d 62 61 |rch,."is|earch-ba|
|00005a80| 63 6b 77 61 72 64 22 2c | 0a 09 4b 43 54 52 4c 7c |ckward",|..KCTRL||
|00005a90| 27 53 27 2c 09 66 6f 72 | 77 69 73 65 61 72 63 68 |'S',.for|wisearch|
|00005aa0| 2c 09 22 69 73 65 61 72 | 63 68 2d 66 6f 72 77 61 |,."isear|ch-forwa|
|00005ab0| 72 64 22 2c 0a 09 4b 43 | 54 52 4c 7c 27 54 27 2c |rd",..KC|TRL|'T',|
|00005ac0| 09 74 77 69 64 64 6c 65 | 2c 09 22 74 72 61 6e 73 |.twiddle|,."trans|
|00005ad0| 70 6f 73 65 2d 63 68 61 | 72 73 22 2c 0a 09 4b 43 |pose-cha|rs",..KC|
|00005ae0| 54 52 4c 7c 27 56 27 2c | 09 66 6f 72 77 70 61 67 |TRL|'V',|.forwpag|
|00005af0| 65 2c 09 22 73 63 72 6f | 6c 6c 2d 75 70 22 2c 0a |e,."scro|ll-up",.|
|00005b00| 09 4b 43 54 52 4c 7c 27 | 57 27 2c 09 6b 69 6c 6c |.KCTRL|'|W',.kill|
|00005b10| 72 65 67 69 6f 6e 2c 09 | 22 6b 69 6c 6c 2d 72 65 |region,.|"kill-re|
|00005b20| 67 69 6f 6e 22 2c 0a 09 | 4b 43 54 52 4c 7c 27 59 |gion",..|KCTRL|'Y|
|00005b30| 27 2c 09 79 61 6e 6b 2c | 09 09 22 79 61 6e 6b 22 |',.yank,|.."yank"|
|00005b40| 2c 0a 23 69 66 64 65 66 | 09 56 4d 53 0a 09 4b 43 |,.#ifdef|.VMS..KC|
|00005b50| 54 52 4c 7c 27 5a 27 2c | 09 61 74 74 61 63 68 74 |TRL|'Z',|.attacht|
|00005b60| 6f 70 61 72 65 6e 74 2c | 09 22 73 75 73 70 65 6e |oparent,|."suspen|
|00005b70| 64 2d 65 6d 61 63 73 22 | 2c 0a 23 65 6c 73 65 0a |d-emacs"|,.#else.|
|00005b80| 09 4b 43 54 52 4c 7c 27 | 5a 27 2c 09 73 70 61 77 |.KCTRL|'|Z',.spaw|
|00005b90| 6e 63 6c 69 2c 09 22 73 | 75 73 70 65 6e 64 2d 65 |ncli,."s|uspend-e|
|00005ba0| 6d 61 63 73 22 2c 0a 23 | 65 6e 64 69 66 0a 09 4b |macs",.#|endif..K|
|00005bb0| 43 54 4c 58 7c 4b 43 54 | 52 4c 7c 27 42 27 2c 6c |CTLX|KCT|RL|'B',l|
|00005bc0| 69 73 74 62 75 66 66 65 | 72 73 2c 09 22 6c 69 73 |istbuffe|rs,."lis|
|00005bd0| 74 2d 62 75 66 66 65 72 | 73 22 2c 0a 23 69 66 6e |t-buffer|s",.#ifn|
|00005be0| 64 65 66 09 4d 45 59 4e | 0a 09 4b 43 54 4c 58 7c |def.MEYN|..KCTLX||
|00005bf0| 4b 43 54 52 4c 7c 27 43 | 27 2c 71 75 69 74 2c 09 |KCTRL|'C|',quit,.|
|00005c00| 09 22 73 61 76 65 2d 62 | 75 66 66 65 72 73 2d 6b |."save-b|uffers-k|
|00005c10| 69 6c 6c 2d 65 6d 61 63 | 73 22 2c 0a 23 65 6e 64 |ill-emac|s",.#end|
|00005c20| 69 66 0a 23 69 66 64 65 | 66 09 44 49 52 4c 49 53 |if.#ifde|f.DIRLIS|
|00005c30| 54 0a 09 4b 43 54 4c 58 | 7c 4b 43 54 52 4c 7c 27 |T..KCTLX||KCTRL|'|
|00005c40| 44 27 2c 64 69 72 6c 69 | 73 74 2c 09 22 64 69 73 |D',dirli|st,."dis|
|00005c50| 70 6c 61 79 2d 64 69 72 | 65 63 74 6f 72 79 22 2c |play-dir|ectory",|
|00005c60| 0a 23 65 6e 64 69 66 0a | 09 4b 43 54 4c 58 7c 4b |.#endif.|.KCTLX|K|
|00005c70| 43 54 52 4c 7c 27 46 27 | 2c 66 69 6c 65 76 69 73 |CTRL|'F'|,filevis|
|00005c80| 69 74 2c 09 22 66 69 6e | 64 2d 66 69 6c 65 22 2c |it,."fin|d-file",|
|00005c90| 0a 09 4b 43 54 4c 58 7c | 4b 43 54 52 4c 7c 27 4c |..KCTLX||KCTRL|'L|
|00005ca0| 27 2c 6c 6f 77 65 72 72 | 65 67 69 6f 6e 2c 09 22 |',lowerr|egion,."|
|00005cb0| 64 6f 77 6e 63 61 73 65 | 2d 72 65 67 69 6f 6e 22 |downcase|-region"|
|00005cc0| 2c 0a 09 4b 43 54 4c 58 | 7c 4b 43 54 52 4c 7c 27 |,..KCTLX||KCTRL|'|
|00005cd0| 4f 27 2c 64 65 62 6c 61 | 6e 6b 2c 09 22 64 65 6c |O',debla|nk,."del|
|00005ce0| 65 74 65 2d 62 6c 61 6e | 6b 2d 6c 69 6e 65 73 22 |ete-blan|k-lines"|
|00005cf0| 2c 0a 09 4b 43 54 4c 58 | 7c 4b 43 54 52 4c 7c 27 |,..KCTLX||KCTRL|'|
|00005d00| 53 27 2c 66 69 6c 65 73 | 61 76 65 2c 09 22 73 61 |S',files|ave,."sa|
|00005d10| 76 65 2d 62 75 66 66 65 | 72 22 2c 0a 09 4b 43 54 |ve-buffe|r",..KCT|
|00005d20| 4c 58 7c 4b 43 54 52 4c | 7c 27 55 27 2c 75 70 70 |LX|KCTRL||'U',upp|
|00005d30| 65 72 72 65 67 69 6f 6e | 2c 09 22 75 70 63 61 73 |erregion|,."upcas|
|00005d40| 65 2d 72 65 67 69 6f 6e | 22 2c 0a 09 4b 43 54 4c |e-region|",..KCTL|
|00005d50| 58 7c 4b 43 54 52 4c 7c | 27 57 27 2c 66 69 6c 65 |X|KCTRL||'W',file|
|00005d60| 77 72 69 74 65 2c 09 22 | 77 72 69 74 65 2d 66 69 |write,."|write-fi|
|00005d70| 6c 65 22 2c 0a 09 4b 43 | 54 4c 58 7c 4b 43 54 52 |le",..KC|TLX|KCTR|
|00005d80| 4c 7c 27 58 27 2c 73 77 | 61 70 6d 61 72 6b 2c 09 |L|'X',sw|apmark,.|
|00005d90| 22 65 78 63 68 61 6e 67 | 65 2d 70 6f 69 6e 74 2d |"exchang|e-point-|
|00005da0| 61 6e 64 2d 6d 61 72 6b | 22 2c 0a 09 4b 43 54 4c |and-mark|",..KCTL|
|00005db0| 58 7c 27 3d 27 2c 09 73 | 68 6f 77 63 70 6f 73 2c |X|'=',.s|howcpos,|
|00005dc0| 09 22 77 68 61 74 2d 63 | 75 72 73 6f 72 2d 70 6f |."what-c|ursor-po|
|00005dd0| 73 69 74 69 6f 6e 22 2c | 0a 09 4b 43 54 4c 58 7c |sition",|..KCTLX||
|00005de0| 27 28 27 2c 09 63 74 6c | 78 6c 70 2c 09 09 22 73 |'(',.ctl|xlp,.."s|
|00005df0| 74 61 72 74 2d 6b 62 64 | 2d 6d 61 63 72 6f 22 2c |tart-kbd|-macro",|
|00005e00| 0a 09 4b 43 54 4c 58 7c | 27 29 27 2c 09 63 74 6c |..KCTLX||')',.ctl|
|00005e10| 78 72 70 2c 09 09 22 65 | 6e 64 2d 6b 62 64 2d 6d |xrp,.."e|nd-kbd-m|
|00005e20| 61 63 72 6f 22 2c 0a 09 | 4b 43 54 4c 58 7c 27 5e |acro",..|KCTLX|'^|
|00005e30| 27 2c 09 65 6e 6c 61 72 | 67 65 77 69 6e 64 2c 09 |',.enlar|gewind,.|
|00005e40| 22 65 6e 6c 61 72 67 65 | 2d 77 69 6e 64 6f 77 22 |"enlarge|-window"|
|00005e50| 2c 0a 09 4b 43 54 4c 58 | 7c 27 30 27 2c 09 64 65 |,..KCTLX||'0',.de|
|00005e60| 6c 77 69 6e 64 2c 09 22 | 64 65 6c 65 74 65 2d 77 |lwind,."|delete-w|
|00005e70| 69 6e 64 6f 77 22 2c 0a | 09 4b 43 54 4c 58 7c 27 |indow",.|.KCTLX|'|
|00005e80| 31 27 2c 09 6f 6e 6c 79 | 77 69 6e 64 2c 09 22 64 |1',.only|wind,."d|
|00005e90| 65 6c 65 74 65 2d 6f 74 | 68 65 72 2d 77 69 6e 64 |elete-ot|her-wind|
|00005ea0| 6f 77 73 22 2c 0a 09 4b | 43 54 4c 58 7c 27 32 27 |ows",..K|CTLX|'2'|
|00005eb0| 2c 09 73 70 6c 69 74 77 | 69 6e 64 2c 09 22 73 70 |,.splitw|ind,."sp|
|00005ec0| 6c 69 74 2d 77 69 6e 64 | 6f 77 2d 76 65 72 74 69 |lit-wind|ow-verti|
|00005ed0| 63 61 6c 6c 79 22 2c 0a | 09 4b 43 54 4c 58 7c 27 |cally",.|.KCTLX|'|
|00005ee0| 34 27 2c 09 63 74 6c 78 | 34 68 61 63 6b 2c 09 22 |4',.ctlx|4hack,."|
|00005ef0| 63 74 72 6c 78 2d 66 6f | 75 72 2d 68 61 63 6b 22 |ctrlx-fo|ur-hack"|
|00005f00| 2c 0a 09 4b 43 54 4c 58 | 7c 27 42 27 2c 09 75 73 |,..KCTLX||'B',.us|
|00005f10| 65 62 75 66 66 65 72 2c | 09 22 73 77 69 74 63 68 |ebuffer,|."switch|
|00005f20| 2d 74 6f 2d 62 75 66 66 | 65 72 22 2c 0a 09 4b 43 |-to-buff|er",..KC|
|00005f30| 54 4c 58 7c 27 45 27 2c | 09 63 74 6c 78 65 2c 09 |TLX|'E',|.ctlxe,.|
|00005f40| 09 22 63 61 6c 6c 2d 6c | 61 73 74 2d 6b 62 64 2d |."call-l|ast-kbd-|
|00005f50| 6d 61 63 72 6f 22 2c 0a | 09 4b 43 54 4c 58 7c 27 |macro",.|.KCTLX|'|
|00005f60| 46 27 2c 09 73 65 74 66 | 69 6c 6c 63 6f 6c 2c 09 |F',.setf|illcol,.|
|00005f70| 22 73 65 74 2d 66 69 6c | 6c 2d 63 6f 6c 75 6d 6e |"set-fil|l-column|
|00005f80| 22 2c 0a 09 4b 43 54 4c | 58 7c 27 49 27 2c 09 66 |",..KCTL|X|'I',.f|
|00005f90| 69 6c 65 69 6e 73 65 72 | 74 2c 09 22 69 6e 73 65 |ileinser|t,."inse|
|00005fa0| 72 74 2d 66 69 6c 65 22 | 2c 0a 09 4b 43 54 4c 58 |rt-file"|,..KCTLX|
|00005fb0| 7c 27 4b 27 2c 09 6b 69 | 6c 6c 62 75 66 66 65 72 ||'K',.ki|llbuffer|
|00005fc0| 2c 09 22 6b 69 6c 6c 2d | 62 75 66 66 65 72 22 2c |,."kill-|buffer",|
|00005fd0| 0a 09 4b 43 54 4c 58 7c | 27 53 27 2c 09 73 61 76 |..KCTLX||'S',.sav|
|00005fe0| 65 62 75 66 66 65 72 73 | 2c 09 22 73 61 76 65 2d |ebuffers|,."save-|
|00005ff0| 73 6f 6d 65 2d 62 75 66 | 66 65 72 73 22 2c 0a 23 |some-buf|fers",.#|
|00006000| 69 66 6e 64 65 66 09 4d | 45 59 4e 0a 09 4b 43 54 |ifndef.M|EYN..KCT|
|00006010| 4c 58 7c 27 4f 27 2c 09 | 6e 65 78 74 77 69 6e 64 |LX|'O',.|nextwind|
|00006020| 2c 09 22 6e 65 78 74 2d | 77 69 6e 64 6f 77 22 2c |,."next-|window",|
|00006030| 0a 09 4b 4d 45 54 41 7c | 27 25 27 2c 09 71 75 65 |..KMETA||'%',.que|
|00006040| 72 79 72 65 70 6c 2c 09 | 22 71 75 65 72 79 2d 72 |ryrepl,.|"query-r|
|00006050| 65 70 6c 61 63 65 22 2c | 0a 23 65 6e 64 69 66 0a |eplace",|.#endif.|
|00006060| 09 4b 4d 45 54 41 7c 4b | 43 54 52 4c 7c 27 56 27 |.KMETA|K|CTRL|'V'|
|00006070| 2c 70 61 67 65 6e 65 78 | 74 2c 09 22 73 63 72 6f |,pagenex|t,."scro|
|00006080| 6c 6c 2d 6f 74 68 65 72 | 2d 77 69 6e 64 6f 77 22 |ll-other|-window"|
|00006090| 2c 0a 09 4b 4d 45 54 41 | 7c 27 3e 27 2c 09 67 6f |,..KMETA||'>',.go|
|000060a0| 74 6f 65 6f 62 2c 09 22 | 65 6e 64 2d 6f 66 2d 62 |toeob,."|end-of-b|
|000060b0| 75 66 66 65 72 22 2c 0a | 09 4b 4d 45 54 41 7c 27 |uffer",.|.KMETA|'|
|000060c0| 3c 27 2c 09 67 6f 74 6f | 62 6f 62 2c 09 22 62 65 |<',.goto|bob,."be|
|000060d0| 67 69 6e 6e 69 6e 67 2d | 6f 66 2d 62 75 66 66 65 |ginning-|of-buffe|
|000060e0| 72 22 2c 0a 09 4b 4d 45 | 54 41 7c 27 5b 27 2c 09 |r",..KME|TA|'[',.|
|000060f0| 67 6f 74 6f 62 6f 70 2c | 09 22 62 61 63 6b 77 61 |gotobop,|."backwa|
|00006100| 72 64 2d 70 61 72 61 67 | 72 61 70 68 22 2c 0a 09 |rd-parag|raph",..|
|00006110| 4b 4d 45 54 41 7c 27 5d | 27 2c 09 67 6f 74 6f 65 |KMETA|']|',.gotoe|
|00006120| 6f 70 2c 09 22 66 6f 72 | 77 61 72 64 2d 70 61 72 |op,."for|ward-par|
|00006130| 61 67 72 61 70 68 22 2c | 0a 09 4b 4d 45 54 41 7c |agraph",|..KMETA||
|00006140| 27 20 27 2c 09 64 65 6c | 77 68 69 74 65 2c 09 22 |' ',.del|white,."|
|00006150| 6a 75 73 74 2d 6f 6e 65 | 2d 73 70 61 63 65 22 2c |just-one|-space",|
|00006160| 0a 09 4b 4d 45 54 41 7c | 27 42 27 2c 09 62 61 63 |..KMETA||'B',.bac|
|00006170| 6b 77 6f 72 64 2c 09 22 | 62 61 63 6b 77 61 72 64 |kword,."|backward|
|00006180| 2d 77 6f 72 64 22 2c 0a | 09 4b 4d 45 54 41 7c 27 |-word",.|.KMETA|'|
|00006190| 43 27 2c 09 63 61 70 77 | 6f 72 64 2c 09 22 63 61 |C',.capw|ord,."ca|
|000061a0| 70 69 74 61 6c 69 7a 65 | 2d 77 6f 72 64 22 2c 0a |pitalize|-word",.|
|000061b0| 09 4b 4d 45 54 41 7c 27 | 44 27 2c 09 64 65 6c 66 |.KMETA|'|D',.delf|
|000061c0| 77 6f 72 64 2c 09 22 6b | 69 6c 6c 2d 77 6f 72 64 |word,."k|ill-word|
|000061d0| 22 2c 0a 09 4b 4d 45 54 | 41 7c 27 46 27 2c 09 66 |",..KMET|A|'F',.f|
|000061e0| 6f 72 77 77 6f 72 64 2c | 09 22 66 6f 72 77 61 72 |orwword,|."forwar|
|000061f0| 64 2d 77 6f 72 64 22 2c | 0a 09 4b 4d 45 54 41 7c |d-word",|..KMETA||
|00006200| 27 4c 27 2c 09 6c 6f 77 | 65 72 77 6f 72 64 2c 09 |'L',.low|erword,.|
|00006210| 22 64 6f 77 6e 63 61 73 | 65 2d 77 6f 72 64 22 2c |"downcas|e-word",|
|00006220| 0a 23 69 66 6e 64 65 66 | 09 4d 45 59 4e 0a 09 4b |.#ifndef|.MEYN..K|
|00006230| 4d 45 54 41 7c 27 51 27 | 2c 09 66 69 6c 6c 70 61 |META|'Q'|,.fillpa|
|00006240| 72 61 2c 09 22 66 69 6c | 6c 2d 70 61 72 61 67 72 |ra,."fil|l-paragr|
|00006250| 61 70 68 22 2c 0a 23 65 | 6e 64 69 66 0a 09 4b 4d |aph",.#e|ndif..KM|
|00006260| 45 54 41 7c 27 52 27 2c | 09 62 61 63 6b 73 65 61 |ETA|'R',|.backsea|
|00006270| 72 63 68 2c 09 22 73 65 | 61 72 63 68 2d 62 61 63 |rch,."se|arch-bac|
|00006280| 6b 77 61 72 64 22 2c 0a | 09 4b 4d 45 54 41 7c 27 |kward",.|.KMETA|'|
|00006290| 53 27 2c 09 66 6f 72 77 | 73 65 61 72 63 68 2c 09 |S',.forw|search,.|
|000062a0| 22 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 22 |"search-|forward"|
|000062b0| 2c 0a 09 4b 4d 45 54 41 | 7c 27 55 27 2c 09 75 70 |,..KMETA||'U',.up|
|000062c0| 70 65 72 77 6f 72 64 2c | 09 22 75 70 63 61 73 65 |perword,|."upcase|
|000062d0| 2d 77 6f 72 64 22 2c 0a | 09 4b 4d 45 54 41 7c 27 |-word",.|.KMETA|'|
|000062e0| 56 27 2c 09 62 61 63 6b | 70 61 67 65 2c 09 22 73 |V',.back|page,."s|
|000062f0| 63 72 6f 6c 6c 2d 64 6f | 77 6e 22 2c 0a 09 4b 4d |croll-do|wn",..KM|
|00006300| 45 54 41 7c 27 57 27 2c | 09 63 6f 70 79 72 65 67 |ETA|'W',|.copyreg|
|00006310| 69 6f 6e 2c 09 22 63 6f | 70 79 2d 72 65 67 69 6f |ion,."co|py-regio|
|00006320| 6e 2d 61 73 2d 6b 69 6c | 6c 22 2c 0a 09 4b 4d 45 |n-as-kil|l",..KME|
|00006330| 54 41 7c 27 58 27 2c 09 | 65 78 74 65 6e 64 2c 09 |TA|'X',.|extend,.|
|00006340| 09 22 65 78 65 63 75 74 | 65 2d 65 78 74 65 6e 64 |."execut|e-extend|
|00006350| 65 64 2d 63 6f 6d 6d 61 | 6e 64 22 2c 0a 09 4b 4d |ed-comma|nd",..KM|
|00006360| 45 54 41 7c 27 7e 27 2c | 09 6e 6f 74 6d 6f 64 69 |ETA|'~',|.notmodi|
|00006370| 66 69 65 64 2c 09 22 6e | 6f 74 2d 6d 6f 64 69 66 |fied,."n|ot-modif|
|00006380| 69 65 64 22 2c 0a 23 69 | 66 6e 64 65 66 09 4d 45 |ied",.#i|fndef.ME|
|00006390| 59 4e 0a 09 2d 31 2c 09 | 09 70 72 65 76 77 69 6e |YN..-1,.|.prevwin|
|000063a0| 64 2c 09 22 70 72 65 76 | 69 6f 75 73 2d 77 69 6e |d,."prev|ious-win|
|000063b0| 64 6f 77 22 2c 0a 09 2d | 31 2c 09 09 72 65 66 72 |dow",..-|1,..refr|
|000063c0| 65 73 68 2c 09 22 72 65 | 64 72 61 77 2d 64 69 73 |esh,."re|draw-dis|
|000063d0| 70 6c 61 79 22 2c 0a 09 | 2d 31 2c 09 09 67 6f 74 |play",..|-1,..got|
|000063e0| 6f 6c 69 6e 65 2c 09 22 | 67 6f 74 6f 2d 6c 69 6e |oline,."|goto-lin|
|000063f0| 65 22 2c 0a 23 65 6e 64 | 69 66 0a 23 69 66 64 65 |e",.#end|if.#ifde|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.