home *** CD-ROM | disk | FTP | other *** search
Unknown | 1993-10-27 | 12.8 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
| |
100%
| gt2
| Kopftext: '/*
| default (weak)
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 2f 2a 0a 2a 2a 20 24 | 56 45 52 3a 20 48 5f 54 |./*.** $|VER: H_T|
|00000010| 6f 44 69 63 74 69 6f 6e | 61 72 79 2e 65 64 67 65 |oDiction|ary.edge|
|00000020| 20 31 2e 33 20 28 53 75 | 6e 64 61 79 20 30 38 2d | 1.3 (Su|nday 08-|
|00000030| 41 75 67 2d 39 33 20 30 | 32 3a 34 33 3a 30 33 29 |Aug-93 0|2:43:03)|
|00000040| 0a 2a 2a 0a 2a 2a 20 53 | 63 72 69 70 74 20 74 6f |.**.** S|cript to|
|00000050| 20 74 72 61 6e 73 66 6f | 72 6d 20 43 20 68 65 61 | transfo|rm C hea|
|00000060| 64 65 72 20 66 69 6c 65 | 73 20 28 2e 68 29 20 74 |der file|s (.h) t|
|00000070| 6f 20 64 69 63 74 69 6f | 6e 61 72 79 20 66 69 6c |o dictio|nary fil|
|00000080| 65 73 20 66 6f 72 20 45 | 64 67 65 2e 20 54 68 65 |es for E|dge. The|
|00000090| 0a 2a 2a 20 73 63 72 69 | 70 74 20 77 69 6c 6c 20 |.** scri|pt will |
|000000a0| 70 75 74 20 61 6c 6c 20 | 74 72 61 6e 73 66 6f 72 |put all |transfor|
|000000b0| 6d 65 64 20 66 69 6c 65 | 73 20 69 6e 20 73 75 62 |med file|s in sub|
|000000c0| 64 69 72 65 63 74 6f 72 | 69 65 73 20 69 6e 20 61 |director|ies in a|
|000000d0| 20 27 48 27 0a 2a 2a 09 | 64 69 72 65 63 74 6f 72 | 'H'.**.|director|
|000000e0| 79 20 69 6e 20 74 68 65 | 20 73 65 6c 65 63 74 65 |y in the| selecte|
|000000f0| 64 20 64 65 73 74 69 6e | 61 74 69 6f 6e 20 64 69 |d destin|ation di|
|00000100| 72 65 63 74 6f 72 79 2e | 20 54 68 65 20 64 69 72 |rectory.| The dir|
|00000110| 65 63 74 6f 72 69 65 73 | 20 77 69 6c 6c 20 62 65 |ectories| will be|
|00000120| 0a 2a 2a 09 63 72 65 61 | 74 65 64 20 69 66 20 74 |.**.crea|ted if t|
|00000130| 68 65 20 64 6f 6e 27 74 | 20 65 78 69 73 74 2e 0a |he don't| exist..|
|00000140| 2a 2a 0a 2a 2a 20 4e 4f | 54 45 3a 20 72 75 6e 6e |**.** NO|TE: runn|
|00000150| 69 6e 67 20 74 68 69 73 | 20 73 63 72 69 70 74 20 |ing this| script |
|00000160| 6f 6e 20 61 6c 6c 20 69 | 6e 6c 63 75 64 65 20 66 |on all i|nlcude f|
|00000170| 69 6c 65 73 20 74 61 6b | 65 73 20 61 20 6c 6f 74 |iles tak|es a lot|
|00000180| 20 6f 66 20 74 69 6d 65 | 2c 20 73 6f 20 62 65 0a | of time|, so be.|
|00000190| 2a 2a 09 09 09 61 77 61 | 72 65 0a 2a 2a 0a 2a 2a |**...awa|re.**.**|
|000001a0| 20 54 68 69 73 20 69 73 | 20 6e 6f 74 20 74 68 65 | This is| not the|
|000001b0| 20 6d 6f 73 74 20 65 66 | 66 65 63 74 69 76 65 20 | most ef|fective |
|000001c0| 77 61 79 20 74 6f 20 64 | 6f 20 74 68 69 73 20 73 |way to d|o this s|
|000001d0| 6f 72 74 20 6f 66 20 74 | 68 69 6e 67 2c 20 62 75 |ort of t|hing, bu|
|000001e0| 74 20 69 74 20 69 73 0a | 2a 2a 09 70 72 65 74 74 |t it is.|**.prett|
|000001f0| 79 20 73 69 6d 70 6c 65 | 20 70 72 6f 67 72 61 6d |y simple| program|
|00000200| 20 61 6e 64 20 69 74 20 | 69 73 20 65 61 73 79 20 | and it |is easy |
|00000210| 74 6f 20 63 68 61 6e 67 | 65 2e 0a 2a 2a 0a 2a 2a |to chang|e..**.**|
|00000220| 20 57 72 69 74 74 65 6e | 20 62 79 20 54 68 6f 6d | Written| by Thom|
|00000230| 61 73 20 6c 69 6c 6a 65 | 74 6f 66 74 0a 2a 2f 0a |as lilje|toft.*/.|
|00000240| 0a 6f 70 74 69 6f 6e 73 | 20 72 65 73 75 6c 74 73 |.options| results|
|00000250| 0a 0a 2f 2a 20 73 65 74 | 20 75 70 20 74 68 65 20 |../* set| up the |
|00000260| 74 79 70 65 73 20 74 61 | 62 6c 65 20 2a 2f 0a 74 |types ta|ble */.t|
|00000270| 79 70 65 73 2e 30 20 3d | 20 32 38 0a 74 79 70 65 |ypes.0 =| 28.type|
|00000280| 73 2e 31 20 3d 20 27 57 | 4f 52 44 27 0a 74 79 70 |s.1 = 'W|ORD'.typ|
|00000290| 65 73 2e 32 20 3d 20 27 | 55 57 4f 52 44 27 0a 74 |es.2 = '|UWORD'.t|
|000002a0| 79 70 65 73 2e 33 20 3d | 20 27 63 68 61 72 27 0a |ypes.3 =| 'char'.|
|000002b0| 74 79 70 65 73 2e 34 20 | 3d 20 27 42 59 54 45 27 |types.4 |= 'BYTE'|
|000002c0| 0a 74 79 70 65 73 2e 35 | 20 3d 20 27 55 42 59 54 |.types.5| = 'UBYT|
|000002d0| 45 27 0a 74 79 70 65 73 | 2e 36 20 3d 20 27 4c 4f |E'.types|.6 = 'LO|
|000002e0| 4e 47 27 0a 74 79 70 65 | 73 2e 37 20 3d 20 27 55 |NG'.type|s.7 = 'U|
|000002f0| 4c 4f 4e 47 27 0a 74 79 | 70 65 73 2e 38 20 3d 20 |LONG'.ty|pes.8 = |
|00000300| 27 41 50 54 52 27 0a 74 | 79 70 65 73 2e 39 20 3d |'APTR'.t|ypes.9 =|
|00000310| 20 27 56 4f 49 44 27 0a | 74 79 70 65 73 2e 31 30 | 'VOID'.|types.10|
|00000320| 20 3d 20 27 42 4f 4f 4c | 27 0a 74 79 70 65 73 2e | = 'BOOL|'.types.|
|00000330| 31 31 20 3d 20 27 73 68 | 6f 72 74 27 0a 74 79 70 |11 = 'sh|ort'.typ|
|00000340| 65 73 2e 31 32 20 3d 20 | 27 55 53 48 4f 52 54 27 |es.12 = |'USHORT'|
|00000350| 0a 74 79 70 65 73 2e 31 | 33 20 3d 20 27 46 4c 4f |.types.1|3 = 'FLO|
|00000360| 41 54 27 0a 74 79 70 65 | 73 2e 31 34 20 3d 20 27 |AT'.type|s.14 = '|
|00000370| 44 4f 55 42 4c 45 27 0a | 74 79 70 65 73 2e 31 35 |DOUBLE'.|types.15|
|00000380| 20 3d 20 27 43 50 54 52 | 27 0a 74 79 70 65 73 2e | = 'CPTR|'.types.|
|00000390| 31 36 20 3d 20 27 42 50 | 54 52 27 0a 74 79 70 65 |16 = 'BP|TR'.type|
|000003a0| 73 2e 31 37 20 3d 20 27 | 42 53 54 52 27 0a 74 79 |s.17 = '|BSTR'.ty|
|000003b0| 70 65 73 2e 31 38 20 3d | 20 27 76 6f 69 64 27 0a |pes.18 =| 'void'.|
|000003c0| 74 79 70 65 73 2e 31 39 | 20 3d 20 27 6c 6f 6e 67 |types.19| = 'long|
|000003d0| 27 0a 74 79 70 65 73 2e | 32 30 20 3d 20 27 69 6e |'.types.|20 = 'in|
|000003e0| 74 27 0a 74 79 70 65 73 | 2e 32 31 20 3d 20 27 46 |t'.types|.21 = 'F|
|000003f0| 49 4c 45 27 0a 74 79 70 | 65 73 2e 32 32 20 3d 20 |ILE'.typ|es.22 = |
|00000400| 27 43 78 4f 62 6a 27 0a | 74 79 70 65 73 2e 32 33 |'CxObj'.|types.23|
|00000410| 20 3d 20 27 54 61 67 27 | 0a 74 79 70 65 73 2e 32 | = 'Tag'|.types.2|
|00000420| 34 20 3d 20 27 53 48 4f | 52 54 27 0a 74 79 70 65 |4 = 'SHO|RT'.type|
|00000430| 73 2e 32 35 20 3d 20 27 | 53 54 52 50 54 52 27 0a |s.25 = '|STRPTR'.|
|00000440| 74 79 70 65 73 2e 32 36 | 20 3d 20 27 41 55 73 65 |types.26| = 'AUse|
|00000450| 72 53 74 75 66 66 27 0a | 74 79 70 65 73 2e 32 37 |rStuff'.|types.27|
|00000460| 20 3d 20 27 42 55 73 65 | 72 53 74 75 66 66 27 0a | = 'BUse|rStuff'.|
|00000470| 74 79 70 65 73 2e 32 38 | 20 3d 20 27 56 55 73 65 |types.28| = 'VUse|
|00000480| 72 53 74 75 66 66 27 0a | 0a 74 79 70 65 73 2e 32 |rStuff'.|.types.2|
|00000490| 39 20 3d 20 27 73 74 72 | 75 63 74 27 0a 74 79 70 |9 = 'str|uct'.typ|
|000004a0| 65 73 2e 33 30 20 3d 20 | 27 75 6e 69 6f 6e 27 0a |es.30 = |'union'.|
|000004b0| 0a 2f 2a 20 67 65 74 20 | 75 73 65 72 73 20 65 72 |./* get |users er|
|000004c0| 72 6f 72 20 6c 65 76 65 | 6c 20 2a 2f 0a 27 67 65 |ror leve|l */.'ge|
|000004d0| 74 65 6e 76 76 61 72 27 | 20 5f 67 65 5f 65 72 72 |tenvvar'| _ge_err|
|000004e0| 6c 65 76 65 6c 0a 65 72 | 72 6c 65 76 65 6c 20 3d |level.er|rlevel =|
|000004f0| 20 72 65 73 75 6c 74 0a | 0a 6f 72 69 67 69 6e 20 | result.|.origin |
|00000500| 3d 20 61 64 64 72 65 73 | 73 28 29 09 2f 2a 20 61 |= addres|s()./* a|
|00000510| 64 64 72 65 73 73 20 6f | 66 20 6f 72 69 67 69 6e |ddress o|f origin|
|00000520| 61 6c 20 66 69 6c 65 20 | 2a 2f 0a 0a 2f 2a 20 6f |al file |*/../* o|
|00000530| 70 65 6e 20 61 20 6e 65 | 77 20 66 69 6c 65 20 74 |pen a ne|w file t|
|00000540| 6f 20 77 6f 72 6b 20 69 | 6e 20 2a 2f 0a 27 6e 65 |o work i|n */.'ne|
|00000550| 77 27 20 68 65 69 67 68 | 74 20 30 0a 69 66 20 52 |w' heigh|t 0.if R|
|00000560| 43 20 7e 3d 20 30 20 74 | 68 65 6e 20 65 78 69 74 |C ~= 0 t|hen exit|
|00000570| 28 65 72 72 6f 72 28 52 | 43 29 29 0a 61 64 64 72 |(error(R|C)).addr|
|00000580| 65 73 73 20 76 61 6c 75 | 65 20 72 65 73 75 6c 74 |ess valu|e result|
|00000590| 0a 0a 27 70 75 74 65 6e | 76 76 61 72 27 20 5f 66 |..'puten|vvar' _f|
|000005a0| 65 5f 66 6c 61 67 73 20 | 22 73 61 66 65 73 61 76 |e_flags |"safesav|
|000005b0| 65 73 7c 65 64 69 74 61 | 62 6c 65 7c 61 75 74 6f |es|edita|ble|auto|
|000005c0| 69 6e 64 65 6e 74 7c 69 | 6e 73 65 72 74 22 0a 2f |indent|i|nsert"./|
|000005d0| 2a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |* | |
|000005e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 00 | | .|
|000005f0| 01 02 03 04 05 06 07 08 | 20 20 0b 20 0c 0e 0f 10 |........| . ....|
|00000600| 11 12 13 14 15 16 17 18 | 19 1a 1b 1c 1d 1e 1f 20 |........|....... |
|00000610| 21 22 23 24 25 26 27 28 | 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'(|)*+,-./0|
|00000620| 31 32 33 34 35 36 37 38 | 39 3a 3b 3c 3d 3e 3f 40 |12345678|9:;<=>?@|
|00000630| 41 42 43 44 45 46 47 48 | 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGH|IJKLMNOP|
|00000640| 51 52 53 54 55 56 57 58 | 59 5a 5b 5c 5d 5e 5f 60 |QRSTUVWX|YZ[\]^_`|
|00000650| 61 62 63 64 65 66 67 68 | 69 6a 6b 6c 6d 6e 6f 70 |abcdefgh|ijklmnop|
|00000660| 71 72 73 74 75 76 77 78 | 79 7a 7b 7c 7d 7e 7f 80 |qrstuvwx|yz{|}~..|
|00000670| 81 82 83 84 85 86 87 88 | 89 8a 8b 8c 8d 8e 8f 90 |........|........|
|00000680| 91 92 93 94 95 96 97 98 | 99 9a 9b 9c 9d 9e 9f a0 |........|........|
|00000690| a1 a2 a3 a4 a5 a6 a7 a8 | a9 aa ab ac ad ae af b0 |........|........|
|000006a0| b1 b2 b3 b4 b5 b6 b7 b8 | b9 ba bb bc bd be bf c0 |........|........|
|000006b0| c1 c2 c3 c4 c5 c6 c7 c8 | c9 ca cb cc cd ce cf d0 |........|........|
|000006c0| d1 d2 d3 d4 d5 d6 d7 d8 | d9 da db dc dd de df e0 |........|........|
|000006d0| e1 e2 e3 e4 e5 e6 e7 e8 | e9 ea eb ec ed ee ef f0 |........|........|
|000006e0| f1 f2 f3 f4 f5 f6 f7 f8 | f9 fa fb fc fd fe ff 2a |........|.......*|
|000006f0| 2f 0a 27 70 75 74 65 6e | 76 76 61 72 27 20 5f 66 |/.'puten|vvar' _f|
|00000700| 65 5f 75 6e 64 6f 62 75 | 66 66 20 30 0a 27 70 75 |e_undobu|ff 0.'pu|
|00000710| 74 65 6e 76 76 61 72 27 | 20 5f 67 65 5f 77 6f 72 |tenvvar'| _ge_wor|
|00000720| 64 64 65 6c 69 6d 69 74 | 65 72 73 20 22 31 31 31 |ddelimit|ers "111|
|00000730| 31 31 31 31 31 31 32 32 | 31 31 32 31 31 31 31 31 |11111122|11211111|
|00000740| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 32 30 30 |11111111|11111200|
|00000750| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 31 31 31 |00000000|00000111|
|00000760| 31 31 31 31 31 31 31 30 | 30 30 30 30 30 31 31 31 |11111110|00000111|
|00000770| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|00000780| 31 31 31 31 31 31 31 31 | 30 30 30 30 31 30 31 31 |11111111|00001011|
|00000790| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|000007a0| 31 31 31 31 31 31 31 31 | 30 30 30 30 31 31 31 31 |11111111|00001111|
|000007b0| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|000007c0| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|000007d0| 31 31 31 31 31 31 31 31 | 30 31 31 31 31 31 31 31 |11111111|01111111|
|000007e0| 31 31 31 31 31 31 31 31 | 30 31 31 31 31 31 31 31 |11111111|01111111|
|000007f0| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|00000800| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|00000810| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 31 31 31 |11111111|11111111|
|00000820| 31 31 31 31 31 31 31 31 | 31 31 31 31 31 22 0a 0a |11111111|11111"..|
|00000830| 2f 2a 20 61 73 6b 20 66 | 6f 72 20 73 6f 72 63 65 |/* ask f|or sorce|
|00000840| 20 64 69 72 65 63 74 6f | 72 79 20 2a 2f 0a 27 72 | directo|ry */.'r|
|00000850| 65 71 75 65 73 74 66 69 | 6c 65 27 20 74 69 74 6c |equestfi|le' titl|
|00000860| 65 20 27 22 53 65 6c 65 | 63 74 20 43 20 48 65 61 |e '"Sele|ct C Hea|
|00000870| 64 65 72 2d 66 69 6c 65 | 20 73 6f 75 72 63 65 20 |der-file| source |
|00000880| 64 69 72 65 63 74 6f 72 | 79 2e 2e 2e 22 27 20 70 |director|y..."' p|
|00000890| 61 74 68 20 27 22 49 4e | 43 4c 55 44 45 3a 22 27 |ath '"IN|CLUDE:"'|
|000008a0| 20 64 69 72 20 67 65 74 | 64 69 72 0a 0a 2f 2a 20 | dir get|dir../* |
|000008b0| 69 66 20 73 6f 6d 65 74 | 68 69 6e 67 20 77 65 6e |if somet|hing wen|
|000008c0| 74 20 77 72 6f 6e 67 20 | 72 65 70 6f 72 74 20 74 |t wrong |report t|
|000008d0| 68 65 20 66 61 75 6c 74 | 20 61 6e 64 20 65 78 69 |he fault| and exi|
|000008e0| 74 20 2a 2f 0a 69 66 20 | 52 43 20 7e 3d 20 30 20 |t */.if |RC ~= 0 |
|000008f0| 74 68 65 6e 20 65 78 69 | 74 28 65 72 72 6f 72 28 |then exi|t(error(|
|00000900| 52 43 29 29 0a 73 6f 75 | 72 63 65 5f 64 69 72 20 |RC)).sou|rce_dir |
|00000910| 3d 20 72 65 73 75 6c 74 | 0a 0a 2f 2a 20 61 73 6b |= result|../* ask|
|00000920| 20 66 6f 72 20 64 65 73 | 74 69 6e 61 74 69 6f 6e | for des|tination|
|00000930| 20 64 69 72 65 63 74 6f | 72 79 20 2a 2f 0a 27 72 | directo|ry */.'r|
|00000940| 65 71 75 65 73 74 66 69 | 6c 65 27 20 74 69 74 6c |equestfi|le' titl|
|00000950| 65 20 27 22 53 65 6c 65 | 63 74 20 64 69 63 74 69 |e '"Sele|ct dicti|
|00000960| 6f 6e 61 72 79 20 6f 75 | 74 70 75 74 20 64 69 72 |onary ou|tput dir|
|00000970| 65 63 74 6f 72 79 2e 2e | 2e 22 27 20 70 61 74 68 |ectory..|."' path|
|00000980| 20 27 22 65 64 67 65 70 | 72 67 3a 64 69 63 74 69 | '"edgep|rg:dicti|
|00000990| 6f 6e 61 72 69 65 73 22 | 27 20 64 69 72 20 67 65 |onaries"|' dir ge|
|000009a0| 74 64 69 72 0a 69 66 20 | 52 43 20 7e 3d 20 30 20 |tdir.if |RC ~= 0 |
|000009b0| 74 68 65 6e 20 65 78 69 | 74 28 65 72 72 6f 72 28 |then exi|t(error(|
|000009c0| 52 43 29 29 0a 64 65 73 | 74 5f 64 69 72 20 3d 20 |RC)).des|t_dir = |
|000009d0| 72 65 73 75 6c 74 7c 7c | 27 48 27 0a 0a 2f 2a 20 |result|||'H'../* |
|000009e0| 63 68 65 63 6b 20 69 66 | 20 74 68 65 20 27 48 27 |check if| the 'H'|
|000009f0| 20 64 69 72 65 63 74 6f | 72 79 20 65 78 69 73 74 | directo|ry exist|
|00000a00| 73 20 69 6e 20 74 68 65 | 20 64 65 73 74 69 6e 61 |s in the| destina|
|00000a10| 74 69 6f 6e 20 64 69 72 | 65 63 74 6f 72 79 2c 20 |tion dir|ectory, |
|00000a20| 69 66 20 6e 6f 74 20 63 | 72 65 61 74 65 20 69 74 |if not c|reate it|
|00000a30| 20 2a 2f 0a 69 66 20 7e | 65 78 69 73 74 73 28 64 | */.if ~|exists(d|
|00000a40| 65 73 74 5f 64 69 72 29 | 20 74 68 65 6e 0a 64 6f |est_dir)| then.do|
|00000a50| 0a 09 61 64 64 72 65 73 | 73 20 63 6f 6d 6d 61 6e |..addres|s comman|
|00000a60| 64 20 6d 61 6b 65 64 69 | 72 20 64 65 73 74 5f 64 |d makedi|r dest_d|
|00000a70| 69 72 0a 09 69 66 20 52 | 43 20 7e 3d 20 30 20 74 |ir..if R|C ~= 0 t|
|00000a80| 68 65 6e 20 65 78 69 74 | 28 64 6f 73 65 72 72 6f |hen exit|(doserro|
|00000a90| 72 28 52 43 29 29 0a 65 | 6e 64 0a 64 65 73 74 5f |r(RC)).e|nd.dest_|
|00000aa0| 64 69 72 20 3d 20 64 65 | 73 74 5f 64 69 72 27 2f |dir = de|st_dir'/|
|00000ab0| 27 0a 0a 2f 2a 20 67 65 | 74 20 6c 69 73 74 20 6f |'../* ge|t list o|
|00000ac0| 66 20 73 6f 75 72 63 65 | 20 64 69 72 65 63 74 6f |f source| directo|
|00000ad0| 72 69 65 73 2c 20 65 2e | 67 20 65 78 65 63 2f 2c |ries, e.|g exec/,|
|00000ae0| 20 67 72 61 70 68 69 63 | 73 2f 2c 20 65 74 63 20 | graphic|s/, etc |
|00000af0| 2a 2f 0a 73 6f 75 72 63 | 65 5f 64 69 72 5f 6c 69 |*/.sourc|e_dir_li|
|00000b00| 73 74 20 3d 20 73 68 6f | 77 64 69 72 28 73 6f 75 |st = sho|wdir(sou|
|00000b10| 72 63 65 5f 64 69 72 2c | 22 64 69 72 22 29 0a 73 |rce_dir,|"dir").s|
|00000b20| 6f 75 72 63 65 5f 64 69 | 72 73 20 3d 20 77 6f 72 |ource_di|rs = wor|
|00000b30| 64 73 28 73 6f 75 72 63 | 65 5f 64 69 72 5f 6c 69 |ds(sourc|e_dir_li|
|00000b40| 73 74 29 0a 0a 2f 2a 20 | 67 65 74 20 61 20 6c 69 |st)../* |get a li|
|00000b50| 73 74 20 6f 66 20 6c 6f | 6f 73 65 20 66 69 6c 65 |st of lo|ose file|
|00000b60| 73 20 69 6e 20 73 6f 75 | 72 63 65 20 64 69 72 65 |s in sou|rce dire|
|00000b70| 63 74 6f 72 79 2c 20 69 | 66 20 61 6e 79 2c 20 61 |ctory, i|f any, a|
|00000b80| 6e 64 20 74 72 61 6e 73 | 66 6f 72 6d 20 74 68 65 |nd trans|form the|
|00000b90| 6d 20 2a 2f 0a 66 69 6c | 65 73 20 3d 20 73 68 6f |m */.fil|es = sho|
|00000ba0| 77 64 69 72 28 73 6f 75 | 72 63 65 5f 64 69 72 2c |wdir(sou|rce_dir,|
|00000bb0| 22 66 69 6c 65 22 29 0a | 63 61 6c 6c 20 74 72 61 |"file").|call tra|
|00000bc0| 6e 73 66 6f 72 6d 28 73 | 6f 75 72 63 65 5f 64 69 |nsform(s|ource_di|
|00000bd0| 72 2c 27 27 2c 66 69 6c | 65 73 2c 64 65 73 74 5f |r,'',fil|es,dest_|
|00000be0| 64 69 72 29 0a 0a 2f 2a | 20 63 72 65 61 74 65 20 |dir)../*| create |
|00000bf0| 61 6e 20 6f 76 65 72 61 | 6c 6c 20 27 61 6c 6c 27 |an overa|ll 'all'|
|00000c00| 20 66 69 6c 65 20 66 6f | 72 20 61 6c 6c 20 64 69 | file fo|r all di|
|00000c10| 63 74 69 6f 6e 61 72 69 | 65 73 20 2a 2f 0a 27 63 |ctionari|es */.'c|
|00000c20| 6c 65 61 72 27 20 66 6f | 72 63 65 0a 27 67 65 74 |lear' fo|rce.'get|
|00000c30| 65 6e 76 76 61 72 27 20 | 5f 67 65 5f 64 61 74 65 |envvar' |_ge_date|
|00000c40| 09 09 2f 2a 20 67 65 74 | 20 63 75 72 72 65 6e 74 |../* get| current|
|00000c50| 20 64 61 74 65 20 61 6e | 64 20 74 69 6d 65 20 2a | date an|d time *|
|00000c60| 2f 0a 64 61 74 65 73 74 | 61 6d 70 20 3d 20 72 65 |/.datest|amp = re|
|00000c70| 73 75 6c 74 0a 27 70 75 | 74 65 6e 76 76 61 72 27 |sult.'pu|tenvvar'|
|00000c80| 20 5f 66 65 5f 64 6f 73 | 6e 61 6d 65 20 64 65 73 | _fe_dos|name des|
|00000c90| 74 5f 64 69 72 22 61 6c | 6c 2e 68 2e 64 69 63 74 |t_dir"al|l.h.dict|
|00000ca0| 69 6f 6e 61 72 79 22 0a | 27 74 65 78 74 27 20 27 |ionary".|'text' '|
|00000cb0| 22 27 22 5c 31 30 3b 20 | 24 56 45 52 3a 20 61 6c |"'"\10; |$VER: al|
|00000cc0| 6c 2e 68 2e 64 69 63 74 | 69 6f 6e 61 72 79 20 31 |l.h.dict|ionary 1|
|00000cd0| 2e 30 20 28 22 64 61 74 | 65 73 74 61 6d 70 22 29 |.0 ("dat|estamp")|
|00000ce0| 5c 31 30 3b 5c 31 30 3b | 20 41 6c 6c 20 73 63 72 |\10;\10;| All scr|
|00000cf0| 69 70 74 20 74 6f 20 69 | 6e 63 6c 75 64 65 20 61 |ipt to i|nclude a|
|00000d00| 6c 6c 20 64 69 63 74 69 | 6f 6e 61 72 69 65 73 2e |ll dicti|onaries.|
|00000d10| 5c 31 30 3b 5c 31 30 3b | 20 43 72 65 61 74 65 64 |\10;\10;| Created|
|00000d20| 20 62 79 20 48 5f 54 6f | 44 69 63 74 69 6f 6e 61 | by H_To|Dictiona|
|00000d30| 72 79 5c 31 30 5c 31 30 | 5c 31 30 22 27 22 27 0a |ry\10\10|\10"'"'.|
|00000d40| 69 66 20 77 6f 72 64 73 | 28 66 69 6c 65 73 29 20 |if words|(files) |
|00000d50| 7e 3d 20 30 20 74 68 65 | 6e 0a 64 6f 0a 09 27 74 |~= 0 the|n.do..'t|
|00000d60| 65 78 74 27 20 27 22 49 | 4e 43 4c 55 44 45 09 6c |ext' '"I|NCLUDE.l|
|00000d70| 6f 6f 73 65 5f 61 6c 6c | 2e 68 2e 64 69 63 74 69 |oose_all|.h.dicti|
|00000d80| 6f 6e 61 72 79 5c 31 30 | 22 27 0a 65 6e 64 0a 64 |onary\10|"'.end.d|
|00000d90| 6f 20 69 20 3d 20 31 20 | 74 6f 20 73 6f 75 72 63 |o i = 1 |to sourc|
|00000da0| 65 5f 64 69 72 73 0a 09 | 27 74 65 78 74 27 20 27 |e_dirs..|'text' '|
|00000db0| 22 27 22 49 4e 43 4c 55 | 44 45 09 22 77 6f 72 64 |"'"INCLU|DE."word|
|00000dc0| 28 73 6f 75 72 63 65 5f | 64 69 72 5f 6c 69 73 74 |(source_|dir_list|
|00000dd0| 2c 69 29 22 2f 22 77 6f | 72 64 28 73 6f 75 72 63 |,i)"/"wo|rd(sourc|
|00000de0| 65 5f 64 69 72 5f 6c 69 | 73 74 2c 69 29 22 5f 61 |e_dir_li|st,i)"_a|
|00000df0| 6c 6c 2e 68 2e 64 69 63 | 74 69 6f 6e 61 72 79 5c |ll.h.dic|tionary\|
|00000e00| 31 30 22 27 22 27 0a 65 | 6e 64 0a 27 73 61 76 65 |10"'"'.e|nd.'save|
|00000e10| 27 20 6e 6f 69 63 6f 6e | 20 6e 6f 62 61 63 6b 75 |' noicon| nobacku|
|00000e20| 70 0a 0a 2f 2a 20 74 68 | 65 6e 2c 20 74 72 61 6e |p../* th|en, tran|
|00000e30| 73 66 6f 72 6d 20 61 6c | 6c 20 66 69 6c 65 73 20 |sform al|l files |
|00000e40| 69 6e 20 61 6c 6c 20 73 | 75 62 2d 64 69 72 65 63 |in all s|ub-direc|
|00000e50| 74 6f 72 69 65 73 20 6f | 66 20 74 68 65 20 73 6f |tories o|f the so|
|00000e60| 75 72 63 65 20 64 69 72 | 65 63 74 6f 72 79 20 2a |urce dir|ectory *|
|00000e70| 2f 0a 64 6f 20 69 20 3d | 20 31 20 74 6f 20 73 6f |/.do i =| 1 to so|
|00000e80| 75 72 63 65 5f 64 69 72 | 73 0a 09 73 75 62 64 69 |urce_dir|s..subdi|
|00000e90| 72 20 3d 20 77 6f 72 64 | 28 73 6f 75 72 63 65 5f |r = word|(source_|
|00000ea0| 64 69 72 5f 6c 69 73 74 | 2c 69 29 0a 09 66 69 6c |dir_list|,i)..fil|
|00000eb0| 65 73 20 3d 20 73 68 6f | 77 64 69 72 28 73 6f 75 |es = sho|wdir(sou|
|00000ec0| 72 63 65 5f 64 69 72 7c | 7c 73 75 62 64 69 72 2c |rce_dir|||subdir,|
|00000ed0| 22 66 69 6c 65 22 29 0a | 09 63 61 6c 6c 20 74 72 |"file").|.call tr|
|00000ee0| 61 6e 73 66 6f 72 6d 28 | 73 6f 75 72 63 65 5f 64 |ansform(|source_d|
|00000ef0| 69 72 2c 73 75 62 64 69 | 72 2c 66 69 6c 65 73 2c |ir,subdi|r,files,|
|00000f00| 64 65 73 74 5f 64 69 72 | 29 0a 65 6e 64 0a 0a 2f |dest_dir|).end../|
|00000f10| 2a 20 63 6c 6f 73 65 20 | 64 6f 77 6e 20 74 68 65 |* close |down the|
|00000f20| 20 66 69 6c 65 20 77 65 | 20 6f 70 65 6e 65 64 20 | file we| opened |
|00000f30| 2a 2f 0a 27 63 6c 6f 73 | 65 27 20 66 6f 72 63 65 |*/.'clos|e' force|
|00000f40| 0a 0a 65 78 69 74 28 30 | 29 0a 0a 0a 2f 2a 0a 2a |..exit(0|).../*.*|
|00000f50| 2a 09 74 72 61 6e 73 66 | 6f 72 6d 20 61 6c 6c 20 |*.transf|orm all |
|00000f60| 66 69 6c 65 73 20 69 6e | 20 74 68 65 20 67 69 76 |files in| the giv|
|00000f70| 65 6e 20 64 69 72 65 63 | 74 6f 72 79 0a 2a 2f 20 |en direc|tory.*/ |
|00000f80| 0a 0a 74 72 61 6e 73 66 | 6f 72 6d 3a 20 70 72 6f |..transf|orm: pro|
|00000f90| 63 65 64 75 72 65 20 65 | 78 70 6f 73 65 20 74 79 |cedure e|xpose ty|
|00000fa0| 70 65 73 2e 0a 09 70 61 | 72 73 65 20 61 72 67 20 |pes...pa|rse arg |
|00000fb0| 73 6f 75 72 63 65 5f 64 | 69 72 2c 73 75 62 5f 64 |source_d|ir,sub_d|
|00000fc0| 69 72 2c 66 69 6c 65 5f | 6c 69 73 74 2c 64 65 73 |ir,file_|list,des|
|00000fd0| 74 5f 64 69 72 0a 0a 09 | 2f 2a 20 63 68 65 63 6b |t_dir...|/* check|
|00000fe0| 20 69 66 20 64 65 73 74 | 69 6e 61 74 69 6f 6e 20 | if dest|ination |
|00000ff0| 64 69 72 65 63 74 6f 72 | 79 20 65 78 69 73 74 73 |director|y exists|
|00001000| 2c 20 69 66 20 6e 6f 74 | 20 2d 20 63 72 65 61 74 |, if not| - creat|
|00001010| 65 20 69 74 20 2a 2f 0a | 09 69 66 20 7e 65 78 69 |e it */.|.if ~exi|
|00001020| 73 74 73 28 64 65 73 74 | 5f 64 69 72 7c 7c 73 75 |sts(dest|_dir||su|
|00001030| 62 5f 64 69 72 29 20 74 | 68 65 6e 0a 09 64 6f 0a |b_dir) t|hen..do.|
|00001040| 09 09 61 64 64 72 65 73 | 73 20 63 6f 6d 6d 61 6e |..addres|s comman|
|00001050| 64 20 6d 61 6b 65 64 69 | 72 20 64 65 73 74 5f 64 |d makedi|r dest_d|
|00001060| 69 72 7c 7c 73 75 62 5f | 64 69 72 0a 09 09 69 66 |ir||sub_|dir...if|
|00001070| 20 52 43 20 7e 3d 20 30 | 20 74 68 65 6e 20 65 78 | RC ~= 0| then ex|
|00001080| 69 74 28 64 6f 73 65 72 | 72 6f 72 28 52 43 29 29 |it(doser|ror(RC))|
|00001090| 0a 09 65 6e 64 0a 09 66 | 69 6c 65 73 20 3d 20 77 |..end..f|iles = w|
|000010a0| 6f 72 64 73 28 66 69 6c | 65 5f 6c 69 73 74 29 0a |ords(fil|e_list).|
|000010b0| 0a 09 2f 2a 20 63 72 65 | 61 74 65 20 61 6e 20 27 |../* cre|ate an '|
|000010c0| 61 6c 6c 27 20 66 69 6c | 65 20 66 6f 72 20 74 68 |all' fil|e for th|
|000010d0| 69 73 20 64 69 72 65 63 | 74 6f 72 79 2c 20 69 66 |is direc|tory, if|
|000010e0| 20 69 74 20 68 61 73 20 | 61 6e 79 20 66 69 6c 65 | it has |any file|
|000010f0| 73 20 2a 2f 0a 09 69 66 | 20 66 69 6c 65 73 20 7e |s */..if| files ~|
|00001100| 3d 20 30 20 74 68 65 6e | 0a 09 64 6f 0a 09 09 27 |= 0 then|..do...'|
|00001110| 63 6c 65 61 72 27 20 66 | 6f 72 63 65 0a 09 09 27 |clear' f|orce...'|
|00001120| 67 65 74 65 6e 76 76 61 | 72 27 20 5f 67 65 5f 64 |getenvva|r' _ge_d|
|00001130| 61 74 65 09 09 2f 2a 20 | 67 65 74 20 63 75 72 72 |ate../* |get curr|
|00001140| 65 6e 74 20 64 61 74 65 | 20 61 6e 64 20 74 69 6d |ent date| and tim|
|00001150| 65 20 2a 2f 0a 09 09 64 | 61 74 65 73 74 61 6d 70 |e */...d|atestamp|
|00001160| 20 3d 20 72 65 73 75 6c | 74 0a 09 09 69 66 20 73 | = resul|t...if s|
|00001170| 75 62 5f 64 69 72 20 7e | 3d 20 27 27 20 74 68 65 |ub_dir ~|= '' the|
|00001180| 6e 0a 09 09 64 6f 0a 09 | 09 09 27 70 75 74 65 6e |n...do..|..'puten|
|00001190| 76 76 61 72 27 20 5f 66 | 65 5f 64 6f 73 6e 61 6d |vvar' _f|e_dosnam|
|000011a0| 65 20 64 65 73 74 5f 64 | 69 72 7c 7c 73 75 62 5f |e dest_d|ir||sub_|
|000011b0| 64 69 72 22 2f 22 73 75 | 62 5f 64 69 72 22 5f 61 |dir"/"su|b_dir"_a|
|000011c0| 6c 6c 2e 68 2e 64 69 63 | 74 69 6f 6e 61 72 79 22 |ll.h.dic|tionary"|
|000011d0| 0a 09 09 09 27 74 65 78 | 74 27 20 27 22 27 22 5c |....'tex|t' '"'"\|
|000011e0| 31 30 3b 20 24 56 45 52 | 3a 20 22 73 75 62 5f 64 |10; $VER|: "sub_d|
|000011f0| 69 72 22 5f 61 6c 6c 2e | 68 2e 64 69 63 74 69 6f |ir"_all.|h.dictio|
|00001200| 6e 61 72 79 20 31 2e 30 | 20 28 22 64 61 74 65 73 |nary 1.0| ("dates|
|00001210| 74 61 6d 70 22 29 5c 31 | 30 3b 5c 31 30 3b 20 41 |tamp")\1|0;\10; A|
|00001220| 6c 6c 20 73 63 72 69 70 | 74 20 66 6f 72 20 22 73 |ll scrip|t for "s|
|00001230| 75 62 5f 64 69 72 22 20 | 64 69 72 65 63 74 6f 72 |ub_dir" |director|
|00001240| 79 2e 5c 31 30 3b 5c 31 | 30 3b 20 43 72 65 61 74 |y.\10;\1|0; Creat|
|00001250| 65 64 20 62 79 20 48 5f | 54 6f 44 69 63 74 69 6f |ed by H_|ToDictio|
|00001260| 6e 61 72 79 5c 31 30 5c | 31 30 5c 31 30 22 27 22 |nary\10\|10\10"'"|
|00001270| 27 0a 09 09 65 6e 64 0a | 09 09 65 6c 73 65 0a 09 |'...end.|..else..|
|00001280| 09 64 6f 0a 09 09 09 27 | 70 75 74 65 6e 76 76 61 |.do....'|putenvva|
|00001290| 72 27 20 5f 66 65 5f 64 | 6f 73 6e 61 6d 65 20 64 |r' _fe_d|osname d|
|000012a0| 65 73 74 5f 64 69 72 22 | 6c 6f 6f 73 65 5f 61 6c |est_dir"|loose_al|
|000012b0| 6c 2e 68 2e 64 69 63 74 | 69 6f 6e 61 72 79 22 0a |l.h.dict|ionary".|
|000012c0| 09 09 09 27 74 65 78 74 | 27 20 27 22 27 22 5c 31 |...'text|' '"'"\1|
|000012d0| 30 3b 20 24 56 45 52 3a | 20 6c 6f 6f 73 65 5f 61 |0; $VER:| loose_a|
|000012e0| 6c 6c 2e 68 2e 64 69 63 | 74 69 6f 6e 61 72 79 20 |ll.h.dic|tionary |
|000012f0| 31 2e 30 20 28 22 64 61 | 74 65 73 74 61 6d 70 22 |1.0 ("da|testamp"|
|00001300| 29 5c 31 30 3b 5c 31 30 | 3b 20 41 6c 6c 20 73 63 |)\10;\10|; All sc|
|00001310| 72 69 70 74 20 66 6f 72 | 20 6c 6f 6f 73 65 20 66 |ript for| loose f|
|00001320| 69 6c 65 73 2e 5c 31 30 | 3b 5c 31 30 3b 20 43 72 |iles.\10|;\10; Cr|
|00001330| 65 61 74 65 64 20 62 79 | 20 48 5f 54 6f 44 69 63 |eated by| H_ToDic|
|00001340| 74 69 6f 6e 61 72 79 5c | 31 30 5c 31 30 5c 31 30 |tionary\|10\10\10|
|00001350| 22 27 22 27 0a 09 09 65 | 6e 64 0a 09 09 64 6f 20 |"'"'...e|nd...do |
|00001360| 69 20 3d 20 31 20 74 6f | 20 66 69 6c 65 73 0a 09 |i = 1 to| files..|
|00001370| 09 09 27 74 65 78 74 27 | 20 27 22 27 22 49 4e 43 |..'text'| '"'"INC|
|00001380| 4c 55 44 45 09 22 77 6f | 72 64 28 66 69 6c 65 5f |LUDE."wo|rd(file_|
|00001390| 6c 69 73 74 2c 69 29 22 | 2e 64 69 63 74 69 6f 6e |list,i)"|.diction|
|000013a0| 61 72 79 5c 31 30 22 27 | 22 27 0a 09 09 65 6e 64 |ary\10"'|"'...end|
|000013b0| 0a 09 09 27 73 61 76 65 | 27 20 6e 6f 69 63 6f 6e |...'save|' noicon|
|000013c0| 20 6e 6f 62 61 63 6b 75 | 70 0a 09 65 6e 64 0a 0a | nobacku|p..end..|
|000013d0| 09 2f 2a 20 63 61 6c 6c | 20 74 68 65 20 61 63 74 |./* call| the act|
|000013e0| 75 61 6c 6c 20 74 72 61 | 6e 73 66 6f 72 6d 20 72 |uall tra|nsform r|
|000013f0| 6f 75 74 69 6e 65 20 6f | 6e 20 61 6c 6c 20 66 69 |outine o|n all fi|
|00001400| 6c 65 73 20 69 6e 20 74 | 68 65 20 67 69 76 65 6e |les in t|he given|
|00001410| 20 64 69 72 65 63 74 6f | 72 79 20 2a 2f 0a 09 64 | directo|ry */..d|
|00001420| 6f 20 69 20 3d 20 31 20 | 74 6f 20 66 69 6c 65 73 |o i = 1 |to files|
|00001430| 0a 09 09 66 69 6c 65 20 | 3d 20 77 6f 72 64 28 66 |...file |= word(f|
|00001440| 69 6c 65 5f 6c 69 73 74 | 2c 69 29 0a 09 09 69 66 |ile_list|,i)...if|
|00001450| 20 73 75 62 5f 64 69 72 | 20 7e 3d 20 22 22 20 74 | sub_dir| ~= "" t|
|00001460| 68 65 6e 0a 09 09 09 63 | 61 6c 6c 20 74 72 61 6e |hen....c|all tran|
|00001470| 73 66 6f 72 6d 66 69 6c | 65 28 73 6f 75 72 63 65 |sformfil|e(source|
|00001480| 5f 64 69 72 7c 7c 73 75 | 62 5f 64 69 72 27 2f 27 |_dir||su|b_dir'/'|
|00001490| 66 69 6c 65 2c 64 65 73 | 74 5f 64 69 72 7c 7c 73 |file,des|t_dir||s|
|000014a0| 75 62 5f 64 69 72 27 2f | 27 66 69 6c 65 27 2e 64 |ub_dir'/|'file'.d|
|000014b0| 69 63 74 69 6f 6e 61 72 | 79 27 29 0a 09 09 65 6c |ictionar|y')...el|
|000014c0| 73 65 0a 09 09 09 63 61 | 6c 6c 20 74 72 61 6e 73 |se....ca|ll trans|
|000014d0| 66 6f 72 6d 66 69 6c 65 | 28 73 6f 75 72 63 65 5f |formfile|(source_|
|000014e0| 64 69 72 7c 7c 66 69 6c | 65 2c 64 65 73 74 5f 64 |dir||fil|e,dest_d|
|000014f0| 69 72 7c 7c 66 69 6c 65 | 27 2e 64 69 63 74 69 6f |ir||file|'.dictio|
|00001500| 6e 61 72 79 27 29 0a 09 | 65 6e 64 0a 72 65 74 75 |nary')..|end.retu|
|00001510| 72 6e 20 31 0a 0a 0a 2f | 2a 0a 2a 2a 20 74 68 65 |rn 1.../|*.** the|
|00001520| 20 61 63 74 75 61 6c 20 | 74 72 61 6e 73 66 6f 72 | actual |transfor|
|00001530| 6d 69 6e 67 20 72 6f 75 | 74 69 6e 67 0a 2a 2f 0a |ming rou|ting.*/.|
|00001540| 0a 74 72 61 6e 73 66 6f | 72 6d 66 69 6c 65 3a 20 |.transfo|rmfile: |
|00001550| 70 72 6f 63 65 64 75 72 | 65 20 65 78 70 6f 73 65 |procedur|e expose|
|00001560| 20 74 79 70 65 73 2e 0a | 09 70 61 72 73 65 20 61 | types..|.parse a|
|00001570| 72 67 20 69 6e 70 75 74 | 5f 66 69 6c 65 2c 6f 75 |rg input|_file,ou|
|00001580| 74 70 75 74 5f 66 69 6c | 65 0a 0a 09 2f 2a 20 66 |tput_fil|e.../* f|
|00001590| 69 72 73 74 20 6c 6f 61 | 64 20 74 68 65 20 66 69 |irst loa|d the fi|
|000015a0| 6c 65 20 2a 2f 0a 09 27 | 6f 70 65 6e 27 20 69 6e |le */..'|open' in|
|000015b0| 70 75 74 5f 66 69 6c 65 | 0a 09 69 66 20 52 43 20 |put_file|..if RC |
|000015c0| 7e 3d 20 30 20 74 68 65 | 6e 20 65 78 69 74 28 65 |~= 0 the|n exit(e|
|000015d0| 72 72 6f 72 28 52 43 29 | 29 0a 09 0a 09 2f 2a 20 |rror(RC)|)..../* |
|000015e0| 73 61 76 65 20 74 68 65 | 20 6f 6c 64 20 6e 61 6d |save the| old nam|
|000015f0| 65 2c 20 73 65 74 20 74 | 68 65 20 6f 75 74 70 75 |e, set t|he outpu|
|00001600| 74 20 70 61 74 68 2f 6e | 61 6d 65 20 61 6e 64 20 |t path/n|ame and |
|00001610| 67 65 74 20 74 68 65 20 | 6f 75 74 70 75 74 20 6e |get the |output n|
|00001620| 61 6d 65 20 2a 2f 0a 09 | 27 67 65 74 65 6e 76 76 |ame */..|'getenvv|
|00001630| 61 72 27 20 5f 66 65 5f | 6e 61 6d 65 0a 09 69 6e |ar' _fe_|name..in|
|00001640| 6e 61 6d 65 20 3d 20 72 | 65 73 75 6c 74 0a 09 27 |name = r|esult..'|
|00001650| 70 75 74 65 6e 76 76 61 | 72 27 20 5f 66 65 5f 64 |putenvva|r' _fe_d|
|00001660| 6f 73 6e 61 6d 65 20 6f | 75 74 70 75 74 5f 66 69 |osname o|utput_fi|
|00001670| 6c 65 0a 09 27 67 65 74 | 65 6e 76 76 61 72 27 20 |le..'get|envvar' |
|00001680| 5f 66 65 5f 6e 61 6d 65 | 0a 09 6f 75 74 6e 61 6d |_fe_name|..outnam|
|00001690| 65 20 3d 20 72 65 73 75 | 6c 74 0a 0a 09 27 67 65 |e = resu|lt...'ge|
|000016a0| 74 65 6e 76 76 61 72 27 | 20 5f 67 65 5f 64 61 74 |tenvvar'| _ge_dat|
|000016b0| 65 09 09 2f 2a 20 67 65 | 74 20 63 75 72 72 65 6e |e../* ge|t curren|
|000016c0| 74 20 64 61 74 65 20 61 | 6e 64 20 74 69 6d 65 20 |t date a|nd time |
|000016d0| 2a 2f 0a 09 64 61 74 65 | 73 74 61 6d 70 20 3d 20 |*/..date|stamp = |
|000016e0| 72 65 73 75 6c 74 0a 0a | 09 2f 2a 20 66 69 6e 64 |result..|./* find|
|000016f0| 20 74 68 69 73 20 66 69 | 6c 65 73 20 72 65 76 69 | this fi|les revi|
|00001700| 73 69 6f 6e 20 6e 75 6d | 62 65 72 2c 20 69 66 20 |sion num|ber, if |
|00001710| 6e 6f 74 20 66 6f 75 6e | 64 20 6d 61 6b 65 20 69 |not foun|d make i|
|00001720| 74 20 27 33 37 27 20 2a | 2f 0a 09 27 70 6f 73 69 |t '37' *|/..'posi|
|00001730| 74 69 6f 6e 27 20 73 6f | 66 0a 09 27 66 69 6e 64 |tion' so|f..'find|
|00001740| 27 20 27 22 24 52 65 76 | 69 73 69 6f 6e 3a 20 22 |' '"$Rev|ision: "|
|00001750| 27 20 66 6f 72 77 61 72 | 64 20 31 20 75 63 65 71 |' forwar|d 1 uceq|
|00001760| 6c 63 20 30 20 77 6f 72 | 64 73 20 30 20 63 69 72 |lc 0 wor|ds 0 cir|
|00001770| 63 75 6c 61 72 20 30 20 | 77 69 6c 64 63 61 72 64 |cular 0 |wildcard|
|00001780| 20 30 0a 09 69 66 20 52 | 43 20 7e 3d 20 30 20 74 | 0..if R|C ~= 0 t|
|00001790| 68 65 6e 0a 09 09 76 65 | 72 73 69 6f 6e 20 3d 20 |hen...ve|rsion = |
|000017a0| 27 33 37 20 27 0a 09 65 | 6c 73 65 0a 09 09 64 6f |'37 '..e|lse...do|
|000017b0| 0a 09 09 27 63 75 72 73 | 6f 72 27 20 72 69 67 68 |...'curs|or' righ|
|000017c0| 74 20 31 31 0a 09 09 27 | 6d 61 72 6b 62 6c 6f 63 |t 11...'|markbloc|
|000017d0| 6b 27 0a 09 09 27 66 69 | 6e 64 27 20 27 22 24 22 |k'...'fi|nd' '"$"|
|000017e0| 27 0a 09 09 27 63 6f 70 | 79 27 20 73 6d 61 6c 6c |'...'cop|y' small|
|000017f0| 63 6c 69 70 0a 09 09 27 | 67 65 74 65 6e 76 76 61 |clip...'|getenvva|
|00001800| 72 27 20 5f 66 65 5f 73 | 6d 61 6c 6c 63 6c 69 70 |r' _fe_s|mallclip|
|00001810| 0a 09 09 76 65 72 73 69 | 6f 6e 20 3d 20 72 65 73 |...versi|on = res|
|00001820| 75 6c 74 0a 09 09 27 70 | 6f 73 69 74 69 6f 6e 27 |ult...'p|osition'|
|00001830| 20 73 6f 66 0a 09 09 65 | 6e 64 0a 09 09 0a 09 2f | sof...e|nd...../|
|00001840| 2a 20 69 6e 73 65 72 74 | 20 61 20 68 65 61 64 65 |* insert| a heade|
|00001850| 72 2c 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 76 65 |r, conta|ining ve|
|00001860| 72 73 69 6f 6e 20 73 74 | 72 69 6e 67 2c 20 6e 61 |rsion st|ring, na|
|00001870| 6d 65 2c 20 61 6e 64 20 | 63 72 65 61 74 6f 72 20 |me, and |creator |
|00001880| 2a 2f 0a 09 27 74 65 78 | 74 27 20 27 22 27 22 5c |*/..'tex|t' '"'"\|
|00001890| 31 30 3b 20 24 56 45 52 | 3a 20 22 6f 75 74 6e 61 |10; $VER|: "outna|
|000018a0| 6d 65 22 20 22 76 65 72 | 73 69 6f 6e 22 28 22 64 |me" "ver|sion"("d|
|000018b0| 61 74 65 73 74 61 6d 70 | 22 29 5c 31 30 3b 5c 31 |atestamp|")\10;\1|
|000018c0| 30 3b 20 44 69 63 74 69 | 6f 6e 61 72 79 20 66 69 |0; Dicti|onary fi|
|000018d0| 6c 65 20 6f 66 20 22 69 | 6e 6e 61 6d 65 22 5c 31 |le of "i|nname"\1|
|000018e0| 30 3b 5c 31 30 3b 20 43 | 72 65 61 74 65 64 20 62 |0;\10; C|reated b|
|000018f0| 79 20 48 5f 54 6f 44 69 | 63 74 69 6f 6e 61 72 79 |y H_ToDi|ctionary|
|00001900| 5c 31 30 5c 31 30 5c 31 | 30 22 27 22 27 0a 0a 09 |\10\10\1|0"'"'...|
|00001910| 2f 2a 20 66 69 72 73 74 | 20 64 65 61 6c 20 77 69 |/* first| deal wi|
|00001920| 74 68 20 74 68 65 20 64 | 69 66 66 65 72 65 6e 74 |th the d|ifferent|
|00001930| 20 74 79 70 65 20 74 79 | 70 65 73 20 2a 2f 0a 09 | type ty|pes */..|
|00001940| 64 6f 20 69 20 3d 20 31 | 20 74 6f 20 74 79 70 65 |do i = 1| to type|
|00001950| 73 2e 30 0a 09 09 27 67 | 6f 74 6f 6c 69 6e 65 27 |s.0...'g|otoline'|
|00001960| 20 38 0a 09 09 64 6f 20 | 66 6f 72 65 76 65 72 0a | 8...do |forever.|
|00001970| 09 09 09 27 66 69 6e 64 | 27 20 27 22 27 74 79 70 |...'find|' '"'typ|
|00001980| 65 73 2e 69 27 22 27 20 | 75 63 65 71 6c 63 20 30 |es.i'"' |uceqlc 0|
|00001990| 20 77 6f 72 64 73 20 31 | 20 63 69 72 63 75 6c 61 | words 1| circula|
|000019a0| 72 20 30 0a 09 09 09 69 | 66 20 52 43 20 7e 3d 20 |r 0....i|f RC ~= |
|000019b0| 30 20 74 68 65 6e 20 6c | 65 61 76 65 0a 0a 09 09 |0 then l|eave....|
|000019c0| 09 70 61 72 73 65 20 76 | 61 72 20 72 65 73 75 6c |.parse v|ar resul|
|000019d0| 74 20 6c 69 6e 65 6e 75 | 6d 62 65 72 20 6f 66 66 |t linenu|mber off|
|000019e0| 73 65 74 20 63 6f 6c 75 | 6d 6e 0a 09 09 09 27 67 |set colu|mn....'g|
|000019f0| 65 74 65 6e 76 76 61 72 | 27 20 5f 77 65 5f 63 6c |etenvvar|' _we_cl|
|00001a00| 69 6e 65 20 72 61 77 0a | 09 09 09 69 66 20 69 6e |ine raw.|...if in|
|00001a10| 64 65 78 28 72 65 73 75 | 6c 74 2c 27 28 27 74 79 |dex(resu|lt,'('ty|
|00001a20| 70 65 73 2e 69 29 20 3d | 20 30 20 74 68 65 6e 0a |pes.i) =| 0 then.|
|00001a30| 09 09 09 64 6f 0a 09 09 | 09 09 69 66 20 28 69 6e |...do...|..if (in|
|00001a40| 64 65 78 28 72 65 73 75 | 6c 74 2c 27 2f 2a 27 29 |dex(resu|lt,'/*')|
|00001a50| 20 3d 20 30 20 7c 20 69 | 6e 64 65 78 28 72 65 73 | = 0 | i|ndex(res|
|00001a60| 75 6c 74 2c 27 2f 2a 27 | 29 20 3e 20 6f 66 66 73 |ult,'/*'|) > offs|
|00001a70| 65 74 29 20 26 20 28 69 | 6e 64 65 78 28 72 65 73 |et) & (i|ndex(res|
|00001a80| 75 6c 74 2c 27 2f 2f 27 | 29 20 3d 20 30 20 7c 20 |ult,'//'|) = 0 | |
|00001a90| 69 6e 64 65 78 28 72 65 | 73 75 6c 74 2c 27 2f 2f |index(re|sult,'//|
|00001aa0| 27 29 20 3e 20 6f 66 66 | 73 65 74 29 20 26 20 28 |') > off|set) & (|
|00001ab0| 69 6e 64 65 78 28 72 65 | 73 75 6c 74 2c 27 2a 27 |index(re|sult,'*'|
|00001ac0| 29 20 3d 20 30 20 7c 20 | 69 6e 64 65 78 28 72 65 |) = 0 | |index(re|
|00001ad0| 73 75 6c 74 2c 27 2a 27 | 29 20 3e 20 6f 66 66 73 |sult,'*'|) > offs|
|00001ae0| 65 74 29 20 26 20 6c 65 | 66 74 28 72 65 73 75 6c |et) & le|ft(resul|
|00001af0| 74 2c 37 29 20 7e 3d 20 | 27 23 64 65 66 69 6e 65 |t,7) ~= |'#define|
|00001b00| 27 20 26 20 6c 65 66 74 | 28 72 65 73 75 6c 74 2c |' & left|(result,|
|00001b10| 37 29 20 7e 3d 20 27 74 | 79 70 65 64 65 66 27 20 |7) ~= 't|ypedef' |
|00001b20| 26 20 6c 65 66 74 28 72 | 65 73 75 6c 74 2c 37 29 |& left(r|esult,7)|
|00001b30| 20 7e 3d 20 27 23 69 66 | 6e 64 65 66 27 20 74 68 | ~= '#if|ndef' th|
|00001b40| 65 6e 0a 09 09 09 09 64 | 6f 0a 09 09 09 09 09 69 |en.....d|o......i|
|00001b50| 66 20 6f 66 66 73 65 74 | 20 7e 3d 20 30 20 74 68 |f offset| ~= 0 th|
|00001b60| 65 6e 0a 09 09 09 09 09 | 64 6f 0a 09 09 09 09 09 |en......|do......|
|00001b70| 09 27 73 65 74 62 6f 6f | 6b 6d 61 72 6b 27 20 31 |.'setboo|kmark' 1|
|00001b80| 0a 09 09 09 09 09 09 27 | 70 72 65 76 69 6f 75 73 |.......'|previous|
|00001b90| 27 20 77 6f 72 64 0a 09 | 09 09 09 09 09 27 70 72 |' word..|.....'pr|
|00001ba0| 65 76 69 6f 75 73 27 20 | 77 6f 72 64 0a 09 09 09 |evious' |word....|
|00001bb0| 09 09 09 70 61 72 73 65 | 20 76 61 72 20 72 65 73 |...parse| var res|
|00001bc0| 75 6c 74 20 6c 69 6e 65 | 6e 75 6d 62 65 72 20 6f |ult line|number o|
|00001bd0| 66 66 73 65 74 20 63 6f | 6c 75 6d 6e 20 61 73 63 |ffset co|lumn asc|
|00001be0| 69 69 0a 09 09 09 09 09 | 09 27 67 6f 74 6f 62 6f |ii......|.'gotobo|
|00001bf0| 6f 6b 6d 61 72 6b 27 20 | 31 0a 09 09 09 09 09 65 |okmark' |1......e|
|00001c00| 6e 64 0a 09 09 09 09 09 | 69 66 20 6f 66 66 73 65 |nd......|if offse|
|00001c10| 74 20 3d 20 30 20 74 68 | 65 6e 0a 09 09 09 09 09 |t = 0 th|en......|
|00001c20| 64 6f 0a 09 09 09 09 09 | 09 27 6e 65 78 74 27 20 |do......|.'next' |
|00001c30| 77 6f 72 64 0a 09 09 09 | 09 09 09 70 61 72 73 65 |word....|...parse|
|00001c40| 20 76 61 72 20 72 65 73 | 75 6c 74 20 6c 69 6e 65 | var res|ult line|
|00001c50| 6e 75 6d 62 65 72 20 6f | 66 66 73 65 74 20 63 6f |number o|ffset co|
|00001c60| 6c 75 6d 6e 20 61 73 63 | 69 69 0a 09 09 09 09 09 |lumn asc|ii......|
|00001c70| 09 69 66 20 61 73 63 69 | 69 20 3d 20 34 32 20 7c |.if asci|i = 42 ||
|00001c80| 20 61 73 63 69 69 20 3d | 20 34 30 20 74 68 65 6e | ascii =| 40 then|
|00001c90| 0a 09 09 09 09 09 09 64 | 6f 0a 09 09 09 09 09 09 |.......d|o.......|
|00001ca0| 09 27 64 65 6c 65 74 65 | 27 20 77 6f 72 64 0a 09 |.'delete|' word..|
|00001cb0| 09 09 09 09 09 09 70 61 | 72 73 65 20 76 61 72 20 |......pa|rse var |
|00001cc0| 72 65 73 75 6c 74 20 6c | 69 6e 65 6e 75 6d 62 65 |result l|inenumbe|
|00001cd0| 72 20 6f 66 66 73 65 74 | 20 63 6f 6c 75 6d 6e 20 |r offset| column |
|00001ce0| 61 73 63 69 69 0a 09 09 | 09 09 09 09 09 69 66 20 |ascii...|.....if |
|00001cf0| 61 73 63 69 69 20 3d 20 | 34 32 20 74 68 65 6e 0a |ascii = |42 then.|
|00001d00| 09 09 09 09 09 09 09 64 | 6f 0a 09 09 09 09 09 09 |.......d|o.......|
|00001d10| 09 09 27 64 65 6c 65 74 | 65 27 20 77 6f 72 64 0a |..'delet|e' word.|
|00001d20| 09 09 09 09 09 09 09 09 | 70 61 72 73 65 20 76 61 |........|parse va|
|00001d30| 72 20 72 65 73 75 6c 74 | 20 6c 69 6e 65 6e 75 6d |r result| linenum|
|00001d40| 62 65 72 20 6f 66 66 73 | 65 74 20 63 6f 6c 75 6d |ber offs|et colum|
|00001d50| 6e 20 61 73 63 69 69 0a | 09 09 09 09 09 09 09 09 |n ascii.|........|
|00001d60| 69 66 20 61 73 63 69 69 | 20 3d 20 34 32 20 74 68 |if ascii| = 42 th|
|00001d70| 65 6e 20 27 64 65 6c 65 | 74 65 27 20 77 6f 72 64 |en 'dele|te' word|
|00001d80| 0a 09 09 09 09 09 09 09 | 65 6e 64 0a 09 09 09 09 |........|end.....|
|00001d90| 09 09 65 6e 64 0a 09 09 | 09 09 09 09 27 64 65 6c |..end...|....'del|
|00001da0| 65 74 65 27 20 73 6f 6c | 0a 09 09 09 09 09 09 27 |ete' sol|.......'|
|00001db0| 74 65 78 74 27 20 27 22 | 57 4f 52 44 09 5c 33 34 |text' '"|WORD.\34|
|00001dc0| 22 27 0a 09 09 09 09 09 | 09 27 70 6f 73 69 74 69 |"'......|.'positi|
|00001dd0| 6f 6e 27 20 65 6f 77 0a | 09 09 09 09 09 09 27 63 |on' eow.|......'c|
|00001de0| 75 72 73 6f 72 27 20 72 | 69 67 68 74 20 31 0a 09 |ursor' r|ight 1..|
|00001df0| 09 09 09 09 09 27 74 65 | 78 74 27 20 27 22 5c 33 |.....'te|xt' '"\3|
|00001e00| 34 5c 31 30 22 27 0a 09 | 09 09 09 09 09 27 67 65 |4\10"'..|.....'ge|
|00001e10| 74 65 6e 76 76 61 72 27 | 20 5f 77 65 5f 63 6c 69 |tenvvar'| _we_cli|
|00001e20| 6e 65 20 72 61 77 0a 09 | 09 09 09 09 09 64 6f 20 |ne raw..|.....do |
|00001e30| 6c 6f 6f 70 20 3d 20 31 | 20 77 68 69 6c 65 20 69 |loop = 1| while i|
|00001e40| 6e 64 65 78 28 72 65 73 | 75 6c 74 2c 27 2c 27 29 |ndex(res|ult,',')|
|00001e50| 20 3e 20 30 20 26 20 28 | 69 6e 64 65 78 28 72 65 | > 0 & (|index(re|
|00001e60| 73 75 6c 74 2c 27 2c 27 | 29 20 3c 20 69 6e 64 65 |sult,','|) < inde|
|00001e70| 78 28 72 65 73 75 6c 74 | 2c 27 2f 2a 27 29 20 7c |x(result|,'/*') ||
|00001e80| 20 69 6e 64 65 78 28 72 | 65 73 75 6c 74 2c 27 2f | index(r|esult,'/|
|00001e90| 2a 27 29 20 3d 20 30 29 | 0a 09 09 09 09 09 09 09 |*') = 0)|........|
|00001ea0| 27 6d 61 72 6b 62 6c 6f | 63 6b 27 0a 09 09 09 09 |'markblo|ck'.....|
|00001eb0| 09 09 09 27 66 6c 61 67 | 27 20 5f 66 65 5f 66 6c |...'flag|' _fe_fl|
|00001ec0| 61 67 73 20 6c 69 6e 65 | 77 72 61 70 20 73 65 74 |ags line|wrap set|
|00001ed0| 0a 09 09 09 09 09 09 09 | 27 63 75 72 73 6f 72 27 |........|'cursor'|
|00001ee0| 20 6c 65 66 74 20 31 0a | 09 09 09 09 09 09 09 27 | left 1.|.......'|
|00001ef0| 66 6c 61 67 27 20 5f 66 | 65 5f 66 6c 61 67 73 20 |flag' _f|e_flags |
|00001f00| 6c 69 6e 65 77 72 61 70 | 20 63 6c 65 61 72 0a 09 |linewrap| clear..|
|00001f10| 09 09 09 09 09 09 27 66 | 69 6e 64 27 20 27 22 2c |......'f|ind' '",|
|00001f20| 22 27 20 77 6f 72 64 73 | 20 30 0a 09 09 09 09 09 |"' words| 0......|
|00001f30| 09 09 69 66 20 52 43 20 | 7e 3d 20 30 20 74 68 65 |..if RC |~= 0 the|
|00001f40| 6e 20 6c 65 61 76 65 20 | 6c 6f 6f 70 0a 09 09 09 |n leave |loop....|
|00001f50| 09 09 09 09 27 6e 65 78 | 74 27 20 77 6f 72 64 0a |....'nex|t' word.|
|00001f60| 09 09 09 09 09 09 09 70 | 61 72 73 65 20 76 61 72 |.......p|arse var|
|00001f70| 20 72 65 73 75 6c 74 20 | 6c 69 6e 65 6e 75 6d 62 | result |linenumb|
|00001f80| 65 72 20 6f 66 66 73 65 | 74 20 63 6f 6c 75 6d 6e |er offse|t column|
|00001f90| 20 61 73 63 69 69 0a 09 | 09 09 09 09 09 09 69 66 | ascii..|......if|
|00001fa0| 20 61 73 63 69 69 20 3d | 20 34 32 20 7c 20 61 73 | ascii =| 42 | as|
|00001fb0| 63 69 69 20 3d 20 34 30 | 20 74 68 65 6e 0a 09 09 |cii = 40| then...|
|00001fc0| 09 09 09 09 09 64 6f 0a | 09 09 09 09 09 09 09 09 |.....do.|........|
|00001fd0| 27 6e 65 78 74 27 20 77 | 6f 72 64 0a 09 09 09 09 |'next' w|ord.....|
|00001fe0| 09 09 09 09 70 61 72 73 | 65 20 76 61 72 20 72 65 |....pars|e var re|
|00001ff0| 75 73 6c 74 20 6c 69 6e | 65 6e 75 6d 62 65 72 20 |uslt lin|enumber |
|00002000| 6f 66 66 73 65 74 20 63 | 6f 6c 75 6d 6e 20 61 73 |offset c|olumn as|
|00002010| 63 69 69 0a 09 09 09 09 | 09 09 09 09 69 66 20 61 |cii.....|....if a|
|00002020| 73 63 69 69 20 3d 20 34 | 32 20 74 68 65 6e 0a 09 |scii = 4|2 then..|
|00002030| 09 09 09 09 09 09 09 64 | 6f 0a 09 09 09 09 09 09 |.......d|o.......|
|00002040| 09 09 09 27 6e 65 78 74 | 27 20 77 6f 72 64 0a 09 |...'next|' word..|
|00002050| 09 09 09 09 09 09 09 09 | 70 61 72 73 65 20 76 61 |........|parse va|
|00002060| 72 20 72 65 73 75 6c 74 | 20 6c 69 6e 65 6e 75 6d |r result| linenum|
|00002070| 62 65 72 20 6f 66 66 73 | 65 74 20 63 6f 6c 75 6d |ber offs|et colum|
|00002080| 6e 20 61 73 63 69 69 0a | 09 09 09 09 09 09 09 09 |n ascii.|........|
|00002090| 09 69 66 20 61 73 63 69 | 69 20 3d 20 34 32 20 74 |.if asci|i = 42 t|
|000020a0| 68 65 6e 20 27 6e 65 78 | 74 27 20 77 6f 72 64 0a |hen 'nex|t' word.|
|000020b0| 09 09 09 09 09 09 09 09 | 65 6e 64 0a 09 09 09 09 |........|end.....|
|000020c0| 09 09 09 65 6e 64 0a 09 | 09 09 09 09 09 09 27 65 |...end..|......'e|
|000020d0| 72 61 73 65 27 0a 09 09 | 09 09 09 09 09 27 74 65 |rase'...|.....'te|
|000020e0| 78 74 27 20 27 22 57 4f | 52 44 09 5c 33 34 22 27 |xt' '"WO|RD.\34"'|
|000020f0| 0a 09 09 09 09 09 09 09 | 27 70 6f 73 69 74 69 6f |........|'positio|
|00002100| 6e 27 20 65 6f 77 0a 09 | 09 09 09 09 09 09 27 63 |n' eow..|......'c|
|00002110| 75 72 73 6f 72 27 20 72 | 69 67 68 74 20 31 0a 09 |ursor' r|ight 1..|
|00002120| 09 09 09 09 09 09 27 74 | 65 78 74 27 20 27 22 5c |......'t|ext' '"\|
|00002130| 33 34 5c 31 30 22 27 0a | 09 09 09 09 09 09 09 27 |34\10"'.|.......'|
|00002140| 67 65 74 65 6e 76 76 61 | 72 27 20 5f 77 65 5f 63 |getenvva|r' _we_c|
|00002150| 6c 69 6e 65 20 72 61 77 | 0a 09 09 09 09 09 09 65 |line raw|.......e|
|00002160| 6e 64 0a 09 09 09 09 09 | 65 6e 64 0a 09 09 09 09 |nd......|end.....|
|00002170| 09 27 70 6f 73 69 74 69 | 6f 6e 27 20 65 6f 6c 0a |.'positi|on' eol.|
|00002180| 09 09 09 09 65 6e 64 0a | 09 09 09 65 6e 64 0a 09 |....end.|...end..|
|00002190| 09 65 6e 64 0a 09 65 6e | 64 0a 0a 09 2f 2a 20 6e |.end..en|d.../* n|
|000021a0| 6f 77 20 64 65 61 6c 20 | 77 69 74 68 20 61 6c 6c |ow deal |with all|
|000021b0| 20 23 64 65 66 69 6e 65 | 20 2a 2f 0a 0a 09 27 67 | #define| */...'g|
|000021c0| 6f 74 6f 6c 69 6e 65 27 | 20 38 0a 09 64 6f 20 66 |otoline'| 8..do f|
|000021d0| 6f 72 65 76 65 72 0a 09 | 09 27 66 69 6e 64 27 20 |orever..|.'find' |
|000021e0| 27 22 23 64 65 66 69 6e | 65 22 27 20 75 63 65 71 |'"#defin|e"' uceq|
|000021f0| 6c 63 20 30 20 77 6f 72 | 64 73 20 31 20 63 69 72 |lc 0 wor|ds 1 cir|
|00002200| 63 75 6c 61 72 20 30 0a | 09 09 69 66 20 52 43 20 |cular 0.|..if RC |
|00002210| 7e 3d 20 30 20 74 68 65 | 6e 20 6c 65 61 76 65 0a |~= 0 the|n leave.|
|00002220| 0a 09 09 70 61 72 73 65 | 20 76 61 72 20 72 65 73 |...parse| var res|
|00002230| 75 6c 74 20 6c 69 6e 65 | 6e 75 6d 62 65 72 20 6f |ult line|number o|
|00002240| 66 66 73 65 74 20 63 6f | 6c 75 6d 6e 20 61 73 63 |ffset co|lumn asc|
|00002250| 69 69 0a 09 09 69 66 20 | 6f 66 66 73 65 74 20 3d |ii...if |offset =|
|00002260| 20 30 20 74 68 65 6e 0a | 09 09 64 6f 0a 09 09 09 | 0 then.|..do....|
|00002270| 27 6e 65 78 74 27 20 77 | 6f 72 64 0a 09 09 09 27 |'next' w|ord....'|
|00002280| 6e 65 78 74 27 20 77 6f | 72 64 0a 09 09 09 27 64 |next' wo|rd....'d|
|00002290| 65 6c 65 74 65 27 20 73 | 6f 6c 0a 09 09 09 27 74 |elete' s|ol....'t|
|000022a0| 65 78 74 27 20 27 22 57 | 4f 52 44 09 5c 33 34 22 |ext' '"W|ORD.\34"|
|000022b0| 27 0a 09 09 09 27 70 6f | 73 69 74 69 6f 6e 27 20 |'....'po|sition' |
|000022c0| 65 6f 77 0a 09 09 09 27 | 63 75 72 73 6f 72 27 20 |eow....'|cursor' |
|000022d0| 72 69 67 68 74 20 31 0a | 09 09 09 27 64 65 6c 65 |right 1.|...'dele|
|000022e0| 74 65 27 20 65 6f 6c 0a | 09 09 09 27 74 65 78 74 |te' eol.|...'text|
|000022f0| 27 20 27 22 5c 33 34 22 | 27 0a 09 09 65 6e 64 0a |' '"\34"|'...end.|
|00002300| 09 65 6e 64 0a 0a 09 2f | 2a 20 74 61 6b 65 20 63 |.end.../|* take c|
|00002310| 61 72 65 20 6f 66 20 73 | 74 72 75 63 74 20 26 20 |are of s|truct & |
|00002320| 75 6e 69 6f 6e 20 2a 2f | 0a 0a 09 27 67 6f 74 6f |union */|...'goto|
|00002330| 6c 69 6e 65 27 20 38 0a | 09 69 20 3d 20 74 79 70 |line' 8.|.i = typ|
|00002340| 65 73 2e 30 20 2b 20 31 | 0a 09 64 6f 20 66 6f 72 |es.0 + 1|..do for|
|00002350| 65 76 65 72 0a 09 09 27 | 66 69 6e 64 27 20 27 22 |ever...'|find' '"|
|00002360| 27 74 79 70 65 73 2e 69 | 27 22 27 20 75 63 65 71 |'types.i|'"' uceq|
|00002370| 6c 63 20 30 20 77 6f 72 | 64 73 20 31 20 63 69 72 |lc 0 wor|ds 1 cir|
|00002380| 63 75 6c 61 72 20 30 20 | 77 69 6c 64 63 61 72 64 |cular 0 |wildcard|
|00002390| 20 30 0a 09 09 69 66 20 | 52 43 20 7e 3d 20 30 20 | 0...if |RC ~= 0 |
|000023a0| 74 68 65 6e 0a 09 09 64 | 6f 0a 09 09 09 69 66 20 |then...d|o....if |
|000023b0| 69 20 3d 20 74 79 70 65 | 73 2e 30 20 2b 20 32 20 |i = type|s.0 + 2 |
|000023c0| 74 68 65 6e 0a 09 09 09 | 09 6c 65 61 76 65 0a 09 |then....|.leave..|
|000023d0| 09 09 65 6c 73 65 0a 09 | 09 09 64 6f 0a 09 09 09 |..else..|..do....|
|000023e0| 09 69 20 3d 20 69 20 2b | 20 31 0a 09 09 09 09 27 |.i = i +| 1.....'|
|000023f0| 67 6f 74 6f 6c 69 6e 65 | 27 20 38 0a 09 09 09 09 |gotoline|' 8.....|
|00002400| 27 66 69 6e 64 27 20 27 | 22 27 74 79 70 65 73 2e |'find' '|"'types.|
|00002410| 69 27 22 27 20 75 63 65 | 71 6c 63 20 30 20 77 6f |i'"' uce|qlc 0 wo|
|00002420| 72 64 73 20 31 20 63 69 | 72 63 75 6c 61 72 20 30 |rds 1 ci|rcular 0|
|00002430| 0a 09 09 09 09 69 66 20 | 52 43 20 7e 3d 20 30 20 |.....if |RC ~= 0 |
|00002440| 74 68 65 6e 20 6c 65 61 | 76 65 0a 09 09 09 65 6e |then lea|ve....en|
|00002450| 64 0a 09 09 65 6e 64 0a | 0a 09 09 70 61 72 73 65 |d...end.|...parse|
|00002460| 20 76 61 72 20 72 65 73 | 75 6c 74 20 6c 69 6e 65 | var res|ult line|
|00002470| 6e 75 6d 62 65 72 20 6f | 66 66 73 65 74 20 63 6f |number o|ffset co|
|00002480| 6c 75 6d 6e 0a 09 09 27 | 67 65 74 65 6e 76 76 61 |lumn...'|getenvva|
|00002490| 72 27 20 5f 77 65 5f 63 | 6c 69 6e 65 20 72 61 77 |r' _we_c|line raw|
|000024a0| 0a 09 09 69 66 20 69 6e | 64 65 78 28 72 65 73 75 |...if in|dex(resu|
|000024b0| 6c 74 2c 27 28 27 74 79 | 70 65 73 2e 69 27 29 27 |lt,'('ty|pes.i')'|
|000024c0| 29 20 3d 20 30 20 74 68 | 65 6e 0a 09 09 64 6f 0a |) = 0 th|en...do.|
|000024d0| 09 09 09 69 66 20 28 69 | 6e 64 65 78 28 72 65 73 |...if (i|ndex(res|
|000024e0| 75 6c 74 2c 27 2a 27 29 | 20 3d 20 30 20 7c 20 69 |ult,'*')| = 0 | i|
|000024f0| 6e 64 65 78 28 72 65 73 | 75 6c 74 2c 27 2a 27 29 |ndex(res|ult,'*')|
|00002500| 20 3e 20 6f 66 66 73 65 | 74 29 20 26 20 28 69 6e | > offse|t) & (in|
|00002510| 64 65 78 28 72 65 73 75 | 6c 74 2c 27 2f 2f 27 29 |dex(resu|lt,'//')|
|00002520| 20 3d 20 30 20 7c 20 69 | 6e 64 65 78 28 72 65 73 | = 0 | i|ndex(res|
|00002530| 75 6c 74 2c 27 2f 2f 27 | 29 20 3e 20 6f 66 66 73 |ult,'//'|) > offs|
|00002540| 65 74 29 20 26 20 28 69 | 6e 64 65 78 28 72 65 73 |et) & (i|ndex(res|
|00002550| 75 6c 74 2c 27 2f 2a 27 | 29 20 3d 20 30 20 7c 20 |ult,'/*'|) = 0 | |
|00002560| 69 6e 64 65 78 28 72 65 | 73 75 6c 74 2c 27 2f 2a |index(re|sult,'/*|
|00002570| 27 29 20 3e 20 6f 66 66 | 73 65 74 29 20 26 20 6c |') > off|set) & l|
|00002580| 65 66 74 28 72 65 73 75 | 6c 74 2c 37 29 20 7e 3d |eft(resu|lt,7) ~=|
|00002590| 20 27 74 79 70 65 64 65 | 66 27 20 74 68 65 6e 0a | 'typede|f' then.|
|000025a0| 09 09 09 64 6f 0a 09 09 | 09 09 69 66 20 69 6e 64 |...do...|..if ind|
|000025b0| 65 78 28 72 65 73 75 6c | 74 2c 27 7b 27 29 20 3e |ex(resul|t,'{') >|
|000025c0| 20 6f 66 66 73 65 74 20 | 74 68 65 6e 0a 09 09 09 | offset |then....|
|000025d0| 09 64 6f 0a 09 09 09 09 | 09 27 6e 65 78 74 27 20 |.do.....|.'next' |
|000025e0| 77 6f 72 64 0a 09 09 09 | 09 09 70 61 72 73 65 20 |word....|..parse |
|000025f0| 76 61 72 20 72 65 73 75 | 6c 74 20 6c 69 6e 65 6e |var resu|lt linen|
|00002600| 75 6d 62 65 72 20 6f 66 | 66 73 65 74 20 63 6f 6c |umber of|fset col|
|00002610| 75 6d 6e 20 61 73 63 69 | 69 0a 09 09 09 09 09 69 |umn asci|i......i|
|00002620| 66 20 61 73 63 69 69 20 | 3d 20 31 32 33 20 74 68 |f ascii |= 123 th|
|00002630| 65 6e 0a 09 09 09 09 09 | 64 6f 0a 09 09 09 09 09 |en......|do......|
|00002640| 09 27 66 69 6e 64 62 72 | 61 63 6b 65 74 27 0a 09 |.'findbr|acket'..|
|00002650| 09 09 09 09 09 27 6e 65 | 78 74 27 20 77 6f 72 64 |.....'ne|xt' word|
|00002660| 0a 09 09 09 09 09 09 27 | 64 65 6c 65 74 65 27 20 |.......'|delete' |
|00002670| 73 6f 6c 0a 09 09 09 09 | 09 09 27 74 65 78 74 27 |sol.....|..'text'|
|00002680| 20 27 22 57 4f 52 44 09 | 5c 33 34 22 27 0a 09 09 | '"WORD.|\34"'...|
|00002690| 09 09 09 09 27 70 6f 73 | 69 74 69 6f 6e 27 20 65 |....'pos|ition' e|
|000026a0| 6f 77 0a 09 09 09 09 09 | 09 27 63 75 72 73 6f 72 |ow......|.'cursor|
|000026b0| 27 20 72 69 67 68 74 20 | 31 0a 09 09 09 09 09 09 |' right |1.......|
|000026c0| 27 74 65 78 74 27 20 27 | 22 5c 33 34 22 27 0a 09 |'text' '|"\34"'..|
|000026d0| 09 09 09 09 09 27 64 65 | 6c 65 74 65 27 20 65 6f |.....'de|lete' eo|
|000026e0| 6c 0a 09 09 09 09 09 09 | 27 67 6f 74 6f 61 75 74 |l.......|'gotoaut|
|000026f0| 6f 27 0a 09 09 09 09 09 | 09 27 64 65 6c 65 74 65 |o'......|.'delete|
|00002700| 27 20 63 68 61 72 0a 09 | 09 09 09 09 65 6e 64 0a |' char..|....end.|
|00002710| 09 09 09 09 09 65 6c 73 | 65 0a 09 09 09 09 09 64 |.....els|e......d|
|00002720| 6f 0a 09 09 09 09 09 09 | 27 64 65 6c 65 74 65 27 |o.......|'delete'|
|00002730| 20 73 6f 6c 0a 09 09 09 | 09 09 09 27 74 65 78 74 | sol....|...'text|
|00002740| 27 20 27 22 57 4f 52 44 | 09 5c 33 34 22 27 0a 09 |' '"WORD|.\34"'..|
|00002750| 09 09 09 09 09 27 70 6f | 73 69 74 69 6f 6e 27 20 |.....'po|sition' |
|00002760| 65 6f 77 0a 09 09 09 09 | 09 09 27 63 75 72 73 6f |eow.....|..'curso|
|00002770| 72 27 20 72 69 67 68 74 | 20 31 0a 09 09 09 09 09 |r' right| 1......|
|00002780| 09 27 74 65 78 74 27 20 | 27 22 5c 33 34 22 27 0a |.'text' |'"\34"'.|
|00002790| 09 09 09 09 09 09 27 64 | 65 6c 65 74 65 27 20 65 |......'d|elete' e|
|000027a0| 6f 6c 0a 09 09 09 09 09 | 65 6e 64 0a 09 09 09 09 |ol......|end.....|
|000027b0| 65 6e 64 0a 09 09 09 09 | 65 6c 73 65 0a 09 09 09 |end.....|else....|
|000027c0| 09 64 6f 0a 09 09 09 09 | 09 69 66 20 6f 66 66 73 |.do.....|.if offs|
|000027d0| 65 74 20 7e 3d 20 30 20 | 74 68 65 6e 0a 09 09 09 |et ~= 0 |then....|
|000027e0| 09 09 64 6f 0a 09 09 09 | 09 09 09 27 73 65 74 62 |..do....|...'setb|
|000027f0| 6f 6f 6b 6d 61 72 6b 27 | 20 31 0a 09 09 09 09 09 |ookmark'| 1......|
|00002800| 09 27 70 72 65 76 69 6f | 75 73 27 20 77 6f 72 64 |.'previo|us' word|
|00002810| 0a 09 09 09 09 09 09 27 | 70 72 65 76 69 6f 75 73 |.......'|previous|
|00002820| 27 20 77 6f 72 64 0a 09 | 09 09 09 09 09 70 61 72 |' word..|.....par|
|00002830| 73 65 20 76 61 72 20 72 | 65 73 75 6c 74 20 6c 69 |se var r|esult li|
|00002840| 6e 65 6e 75 6d 62 65 72 | 20 6f 66 66 73 65 74 20 |nenumber| offset |
|00002850| 63 6f 6c 75 6d 6e 20 61 | 73 63 69 69 0a 09 09 09 |column a|scii....|
|00002860| 09 09 09 27 67 6f 74 6f | 62 6f 6f 6b 6d 61 72 6b |...'goto|bookmark|
|00002870| 27 20 31 0a 09 09 09 09 | 09 65 6e 64 0a 09 09 09 |' 1.....|.end....|
|00002880| 09 09 69 66 20 6f 66 66 | 73 65 74 20 3d 20 30 20 |..if off|set = 0 |
|00002890| 74 68 65 6e 0a 09 09 09 | 09 09 64 6f 0a 09 09 09 |then....|..do....|
|000028a0| 09 09 09 27 6e 65 78 74 | 27 20 77 6f 72 64 0a 09 |...'next|' word..|
|000028b0| 09 09 09 09 09 27 6e 65 | 78 74 27 20 77 6f 72 64 |.....'ne|xt' word|
|000028c0| 0a 09 09 09 09 09 09 70 | 61 72 73 65 20 76 61 72 |.......p|arse var|
|000028d0| 20 72 65 73 75 6c 74 20 | 6c 69 6e 65 6e 75 6d 62 | result |linenumb|
|000028e0| 65 72 20 6f 66 66 73 65 | 74 20 63 6f 6c 75 6d 6e |er offse|t column|
|000028f0| 20 61 73 63 69 69 0a 09 | 09 09 09 09 09 69 66 20 | ascii..|.....if |
|00002900| 61 73 63 69 69 20 3d 20 | 31 30 20 74 68 65 6e 20 |ascii = |10 then |
|00002910| 27 70 72 65 76 69 6f 75 | 73 27 20 77 6f 72 64 0a |'previou|s' word.|
|00002920| 09 09 09 09 09 09 69 66 | 20 61 73 63 69 69 20 3d |......if| ascii =|
|00002930| 20 34 32 20 7c 20 61 73 | 63 69 69 20 3d 20 34 30 | 42 | as|cii = 40|
|00002940| 20 74 68 65 6e 0a 09 09 | 09 09 09 09 64 6f 0a 09 | then...|....do..|
|00002950| 09 09 09 09 09 09 27 64 | 65 6c 65 74 65 27 20 77 |......'d|elete' w|
|00002960| 6f 72 64 0a 09 09 09 09 | 09 09 09 70 61 72 73 65 |ord.....|...parse|
|00002970| 20 76 61 72 20 72 65 73 | 75 6c 74 20 6c 69 6e 65 | var res|ult line|
|00002980| 6e 75 6d 62 65 72 20 6f | 66 66 73 65 74 20 63 6f |number o|ffset co|
|00002990| 6c 75 6d 6e 20 61 73 63 | 69 69 0a 09 09 09 09 09 |lumn asc|ii......|
|000029a0| 09 09 69 66 20 61 73 63 | 69 69 20 3d 20 34 32 20 |..if asc|ii = 42 |
|000029b0| 74 68 65 6e 0a 09 09 09 | 09 09 09 09 64 6f 0a 09 |then....|....do..|
|000029c0| 09 09 09 09 09 09 09 27 | 64 65 6c 65 74 65 27 20 |.......'|delete' |
|000029d0| 77 6f 72 64 0a 09 09 09 | 09 09 09 09 09 70 61 72 |word....|.....par|
|000029e0| 73 65 20 76 61 72 20 72 | 65 73 75 6c 74 20 6c 69 |se var r|esult li|
|000029f0| 6e 65 6e 75 6d 62 65 72 | 20 6f 66 66 73 65 74 20 |nenumber| offset |
|00002a00| 63 6f 6c 75 6d 6e 20 61 | 73 63 69 69 0a 09 09 09 |column a|scii....|
|00002a10| 09 09 09 09 09 69 66 20 | 61 73 63 69 69 20 3d 20 |.....if |ascii = |
|00002a20| 34 32 20 74 68 65 6e 20 | 27 64 65 6c 65 74 65 27 |42 then |'delete'|
|00002a30| 20 77 6f 72 64 0a 09 09 | 09 09 09 09 09 65 6e 64 | word...|.....end|
|00002a40| 0a 09 09 09 09 09 09 65 | 6e 64 0a 09 09 09 09 09 |.......e|nd......|
|00002a50| 09 27 64 65 6c 65 74 65 | 27 20 73 6f 6c 0a 09 09 |.'delete|' sol...|
|00002a60| 09 09 09 09 27 74 65 78 | 74 27 20 27 22 57 4f 52 |....'tex|t' '"WOR|
|00002a70| 44 09 5c 33 34 22 27 0a | 09 09 09 09 09 09 27 70 |D.\34"'.|......'p|
|00002a80| 6f 73 69 74 69 6f 6e 27 | 20 65 6f 77 0a 09 09 09 |osition'| eow....|
|00002a90| 09 09 09 27 63 75 72 73 | 6f 72 27 20 72 69 67 68 |...'curs|or' righ|
|00002aa0| 74 20 31 0a 09 09 09 09 | 09 09 27 74 65 78 74 27 |t 1.....|..'text'|
|00002ab0| 20 27 22 5c 33 34 5c 31 | 30 22 27 0a 09 09 09 09 | '"\34\1|0"'.....|
|00002ac0| 09 09 27 67 65 74 65 6e | 76 76 61 72 27 20 5f 77 |..'geten|vvar' _w|
|00002ad0| 65 5f 63 6c 69 6e 65 20 | 72 61 77 0a 09 09 09 09 |e_cline |raw.....|
|00002ae0| 09 09 64 6f 20 6c 6f 6f | 70 20 3d 20 31 20 77 68 |..do loo|p = 1 wh|
|00002af0| 69 6c 65 20 69 6e 64 65 | 78 28 72 65 73 75 6c 74 |ile inde|x(result|
|00002b00| 2c 27 2c 27 29 20 3e 20 | 30 20 26 20 28 69 6e 64 |,',') > |0 & (ind|
|00002b10| 65 78 28 72 65 73 75 6c | 74 2c 27 2c 27 29 20 3c |ex(resul|t,',') <|
|00002b20| 20 69 6e 64 65 78 28 72 | 65 73 75 6c 74 2c 27 2f | index(r|esult,'/|
|00002b30| 2a 27 29 20 7c 20 69 6e | 64 65 78 28 72 65 73 75 |*') | in|dex(resu|
|00002b40| 6c 74 2c 27 2f 2a 27 29 | 20 3d 20 30 29 0a 09 09 |lt,'/*')| = 0)...|
|00002b50| 09 09 09 09 09 27 6d 61 | 72 6b 62 6c 6f 63 6b 27 |.....'ma|rkblock'|
|00002b60| 0a 09 09 09 09 09 09 09 | 27 66 6c 61 67 27 20 5f |........|'flag' _|
|00002b70| 66 65 5f 66 6c 61 67 73 | 20 6c 69 6e 65 77 72 61 |fe_flags| linewra|
|00002b80| 70 20 73 65 74 0a 09 09 | 09 09 09 09 09 27 63 75 |p set...|.....'cu|
|00002b90| 72 73 6f 72 27 20 6c 65 | 66 74 20 31 0a 09 09 09 |rsor' le|ft 1....|
|00002ba0| 09 09 09 09 27 66 6c 61 | 67 27 20 5f 66 65 5f 66 |....'fla|g' _fe_f|
|00002bb0| 6c 61 67 73 20 6c 69 6e | 65 77 72 61 70 20 63 6c |lags lin|ewrap cl|
|00002bc0| 65 61 72 0a 09 09 09 09 | 09 09 09 27 66 69 6e 64 |ear.....|...'find|
|00002bd0| 27 20 27 22 2c 22 27 20 | 77 6f 72 64 73 20 30 0a |' '","' |words 0.|
|00002be0| 09 09 09 09 09 09 09 69 | 66 20 52 43 20 7e 3d 20 |.......i|f RC ~= |
|00002bf0| 30 20 74 68 65 6e 20 6c | 65 61 76 65 20 6c 6f 6f |0 then l|eave loo|
|00002c00| 70 0a 09 09 09 09 09 09 | 09 27 6e 65 78 74 27 20 |p.......|.'next' |
|00002c10| 77 6f 72 64 0a 09 09 09 | 09 09 09 09 70 61 72 73 |word....|....pars|
|00002c20| 65 20 76 61 72 20 72 65 | 73 75 6c 74 20 6c 69 6e |e var re|sult lin|
|00002c30| 65 6e 75 6d 62 65 72 20 | 6f 66 66 73 65 74 20 63 |enumber |offset c|
|00002c40| 6f 6c 75 6d 6e 20 61 73 | 63 69 69 0a 09 09 09 09 |olumn as|cii.....|
|00002c50| 09 09 09 69 66 20 61 73 | 63 69 69 20 3d 20 34 32 |...if as|cii = 42|
|00002c60| 20 7c 20 61 73 63 69 69 | 20 3d 20 34 30 20 74 68 | | ascii| = 40 th|
|00002c70| 65 6e 0a 09 09 09 09 09 | 09 09 64 6f 0a 09 09 09 |en......|..do....|
|00002c80| 09 09 09 09 09 27 6e 65 | 78 74 27 20 77 6f 72 64 |.....'ne|xt' word|
|00002c90| 0a 09 09 09 09 09 09 09 | 09 70 61 72 73 65 20 76 |........|.parse v|
|00002ca0| 61 72 20 72 65 75 73 6c | 74 20 6c 69 6e 65 6e 75 |ar reusl|t linenu|
|00002cb0| 6d 62 65 72 20 6f 66 66 | 73 65 74 20 63 6f 6c 75 |mber off|set colu|
|00002cc0| 6d 6e 20 61 73 63 69 69 | 0a 09 09 09 09 09 09 09 |mn ascii|........|
|00002cd0| 09 69 66 20 61 73 63 69 | 69 20 3d 20 34 32 20 74 |.if asci|i = 42 t|
|00002ce0| 68 65 6e 0a 09 09 09 09 | 09 09 09 09 64 6f 0a 09 |hen.....|....do..|
|00002cf0| 09 09 09 09 09 09 09 09 | 27 6e 65 78 74 27 20 77 |........|'next' w|
|00002d00| 6f 72 64 0a 09 09 09 09 | 09 09 09 09 09 70 61 72 |ord.....|.....par|
|00002d10| 73 65 20 76 61 72 20 72 | 65 73 75 6c 74 20 6c 69 |se var r|esult li|
|00002d20| 6e 65 6e 75 6d 62 65 72 | 20 6f 66 66 73 65 74 20 |nenumber| offset |
|00002d30| 63 6f 6c 75 6d 6e 20 61 | 73 63 69 69 0a 09 09 09 |column a|scii....|
|00002d40| 09 09 09 09 09 09 69 66 | 20 61 73 63 69 69 20 3d |......if| ascii =|
|00002d50| 20 34 32 20 74 68 65 6e | 20 27 6e 65 78 74 27 20 | 42 then| 'next' |
|00002d60| 77 6f 72 64 0a 09 09 09 | 09 09 09 09 09 65 6e 64 |word....|.....end|
|00002d70| 0a 09 09 09 09 09 09 09 | 65 6e 64 0a 09 09 09 09 |........|end.....|
|00002d80| 09 09 09 27 65 72 61 73 | 65 27 0a 09 09 09 09 09 |...'eras|e'......|
|00002d90| 09 09 27 74 65 78 74 27 | 20 27 22 57 4f 52 44 09 |..'text'| '"WORD.|
|00002da0| 5c 33 34 22 27 0a 09 09 | 09 09 09 09 09 27 70 6f |\34"'...|.....'po|
|00002db0| 73 69 74 69 6f 6e 27 20 | 65 6f 77 0a 09 09 09 09 |sition' |eow.....|
|00002dc0| 09 09 09 27 63 75 72 73 | 6f 72 27 20 72 69 67 68 |...'curs|or' righ|
|00002dd0| 74 20 31 0a 09 09 09 09 | 09 09 09 27 74 65 78 74 |t 1.....|...'text|
|00002de0| 27 20 27 22 5c 33 34 5c | 31 30 22 27 0a 09 09 09 |' '"\34\|10"'....|
|00002df0| 09 09 09 09 27 67 65 74 | 65 6e 76 76 61 72 27 20 |....'get|envvar' |
|00002e00| 5f 77 65 5f 63 6c 69 6e | 65 20 72 61 77 0a 09 09 |_we_clin|e raw...|
|00002e10| 09 09 09 09 65 6e 64 0a | 09 09 09 09 09 65 6e 64 |....end.|.....end|
|00002e20| 0a 09 09 09 09 65 6e 64 | 0a 09 09 09 65 6e 64 0a |.....end|....end.|
|00002e30| 09 09 65 6e 64 0a 09 65 | 6e 64 0a 0a 09 2f 2a 20 |..end..e|nd.../* |
|00002e40| 74 61 6b 65 20 63 61 72 | 65 20 6f 66 20 27 74 79 |take car|e of 'ty|
|00002e50| 70 65 64 65 66 73 27 20 | 2a 2f 0a 09 0a 09 27 67 |pedefs' |*/....'g|
|00002e60| 6f 74 6f 6c 69 6e 65 27 | 20 39 0a 09 64 6f 20 66 |otoline'| 9..do f|
|00002e70| 6f 72 65 76 65 72 0a 09 | 09 27 66 69 6e 64 27 20 |orever..|.'find' |
|00002e80| 27 22 74 79 70 65 64 65 | 66 22 27 20 66 6f 72 77 |'"typede|f"' forw|
|00002e90| 61 72 64 20 31 20 75 63 | 65 71 6c 63 20 30 20 77 |ard 1 uc|eqlc 0 w|
|00002ea0| 6f 72 64 73 20 31 0a 09 | 09 69 66 20 52 43 20 7e |ords 1..|.if RC ~|
|00002eb0| 3d 20 30 20 74 68 65 6e | 20 6c 65 61 76 65 0a 09 |= 0 then| leave..|
|00002ec0| 09 0a 09 09 27 66 69 6e | 64 27 20 27 22 3b 22 27 |....'fin|d' '";"'|
|00002ed0| 0a 09 09 27 74 65 78 74 | 27 20 27 22 5c 33 34 22 |...'text|' '"\34"|
|00002ee0| 27 0a 09 09 27 64 65 6c | 65 74 65 27 20 65 6f 6c |'...'del|ete' eol|
|00002ef0| 0a 09 09 27 70 72 65 76 | 69 6f 75 73 27 20 77 6f |...'prev|ious' wo|
|00002f00| 72 64 0a 09 09 27 70 72 | 65 76 69 6f 75 73 27 20 |rd...'pr|evious' |
|00002f10| 77 6f 72 64 0a 09 09 27 | 64 65 6c 65 74 65 27 20 |word...'|delete' |
|00002f20| 73 6f 6c 0a 09 09 27 74 | 65 78 74 27 20 27 22 57 |sol...'t|ext' '"W|
|00002f30| 4f 52 44 09 5c 33 34 22 | 27 0a 09 09 27 70 6f 73 |ORD.\34"|'...'pos|
|00002f40| 69 74 69 6f 6e 27 20 65 | 6f 6c 0a 09 65 6e 64 0a |ition' e|ol..end.|
|00002f50| 0a 09 2f 2a 0a 09 6e 6f | 77 20 64 65 6c 65 74 65 |../*..no|w delete|
|00002f60| 20 61 6c 6c 20 6c 69 6e | 65 73 20 6e 6f 74 20 62 | all lin|es not b|
|00002f70| 65 67 69 6e 69 6e 67 20 | 77 69 74 68 20 27 57 4f |egining |with 'WO|
|00002f80| 52 44 09 27 20 0a 09 61 | 6e 64 20 61 6c 6c 20 77 |RD.' ..a|nd all w|
|00002f90| 6f 72 64 73 20 77 69 74 | 68 20 6f 6e 6c 79 20 6f |ords wit|h only o|
|00002fa0| 6e 65 20 6f 72 20 74 77 | 6f 20 63 68 61 72 61 63 |ne or tw|o charac|
|00002fb0| 74 65 72 73 0a 09 2a 2f | 0a 0a 09 27 67 6f 74 6f |ters..*/|...'goto|
|00002fc0| 6c 69 6e 65 27 20 39 0a | 09 64 6f 20 66 6f 72 65 |line' 9.|.do fore|
|00002fd0| 76 65 72 0a 09 09 27 67 | 65 74 65 6e 76 76 61 72 |ver...'g|etenvvar|
|00002fe0| 27 20 5f 77 65 5f 63 6c | 69 6e 65 20 72 61 77 0a |' _we_cl|ine raw.|
|00002ff0| 09 09 69 66 20 28 6c 65 | 66 74 28 72 65 73 75 6c |..if (le|ft(resul|
|00003000| 74 2c 35 29 20 7e 3d 20 | 27 57 4f 52 44 09 27 20 |t,5) ~= |'WORD.' |
|00003010| 7c 20 6c 65 6e 67 74 68 | 28 72 65 73 75 6c 74 29 || length|(result)|
|00003020| 20 3c 20 31 31 29 20 26 | 20 6c 65 6e 67 74 68 28 | < 11) &| length(|
|00003030| 72 65 73 75 6c 74 29 20 | 7e 3d 20 30 20 74 68 65 |result) |~= 0 the|
|00003040| 6e 0a 09 09 64 6f 0a 09 | 09 09 27 64 65 6c 65 74 |n...do..|..'delet|
|00003050| 65 20 6c 69 6e 65 27 0a | 09 09 65 6e 64 0a 09 09 |e line'.|..end...|
|00003060| 65 6c 73 65 0a 09 09 64 | 6f 0a 09 09 09 27 63 75 |else...d|o....'cu|
|00003070| 72 73 6f 72 27 20 64 6f | 77 6e 20 31 0a 09 09 09 |rsor' do|wn 1....|
|00003080| 69 66 20 52 43 20 7e 3d | 20 30 20 74 68 65 6e 20 |if RC ~=| 0 then |
|00003090| 6c 65 61 76 65 09 0a 09 | 09 65 6e 64 0a 09 65 6e |leave...|.end..en|
|000030a0| 64 0a 09 0a 09 2f 2a 20 | 73 61 76 65 20 74 68 65 |d..../* |save the|
|000030b0| 20 66 69 6c 65 20 2a 2f | 0a 09 27 66 6c 61 67 27 | file */|..'flag'|
|000030c0| 20 5f 66 65 5f 66 6c 61 | 67 73 20 73 61 66 65 73 | _fe_fla|gs safes|
|000030d0| 61 76 65 73 20 63 6c 65 | 61 72 0a 09 27 73 61 76 |aves cle|ar..'sav|
|000030e0| 65 27 20 6e 6f 69 63 6f | 6e 20 6e 6f 62 61 63 6b |e' noico|n noback|
|000030f0| 75 70 0a 09 69 66 20 52 | 43 20 7e 3d 20 30 20 74 |up..if R|C ~= 0 t|
|00003100| 68 65 6e 0a 09 64 6f 0a | 09 09 27 66 61 75 6c 74 |hen..do.|..'fault|
|00003110| 27 0a 09 09 73 61 79 20 | 72 65 73 75 6c 74 0a 09 |'...say |result..|
|00003120| 65 6e 64 0a 72 65 74 75 | 72 6e 20 31 0a 0a 0a 2f |end.retu|rn 1.../|
|00003130| 2a 0a 2a 2a 20 65 72 72 | 6f 72 20 68 61 6e 64 6c |*.** err|or handl|
|00003140| 69 6e 67 20 72 6f 75 74 | 69 6e 65 73 0a 2a 2f 0a |ing rout|ines.*/.|
|00003150| 0a 65 72 72 6f 72 3a 0a | 09 61 72 67 20 72 63 0a |.error:.|.arg rc.|
|00003160| 0a 09 2f 2a 20 69 66 20 | 74 68 65 20 73 65 76 65 |../* if |the seve|
|00003170| 72 69 74 79 20 6c 65 76 | 65 6c 20 6f 6e 20 74 68 |rity lev|el on th|
|00003180| 65 20 65 72 72 6f 72 20 | 69 73 20 67 72 65 61 74 |e error |is great|
|00003190| 65 72 20 6f 72 20 65 71 | 75 61 6c 20 74 6f 20 74 |er or eq|ual to t|
|000031a0| 68 65 20 75 73 65 72 73 | 0a 09 09 65 72 72 6f 72 |he users|...error|
|000031b0| 20 6c 65 76 65 6c 20 67 | 65 74 20 74 68 65 20 66 | level g|et the f|
|000031c0| 61 75 6c 74 20 73 74 72 | 69 6e 67 20 61 6e 64 20 |ault str|ing and |
|000031d0| 64 69 73 70 6c 61 79 20 | 69 74 20 2a 2f 0a 09 69 |display |it */..i|
|000031e0| 66 20 72 63 20 3e 3d 20 | 65 72 72 6c 65 76 65 6c |f rc >= |errlevel|
|000031f0| 20 74 68 65 6e 0a 09 64 | 6f 0a 09 09 27 66 61 75 | then..d|o...'fau|
|00003200| 6c 74 27 0a 09 09 27 72 | 65 71 75 65 73 74 6e 6f |lt'...'r|equestno|
|00003210| 74 69 66 79 27 20 27 22 | 27 72 65 73 75 6c 74 27 |tify' '"|'result'|
|00003220| 22 27 0a 09 65 6e 64 0a | 09 0a 09 2f 2a 20 69 66 |"'..end.|.../* if|
|00003230| 20 77 65 20 68 61 76 65 | 20 6f 70 65 6e 65 64 20 | we have| opened |
|00003240| 61 20 6e 65 77 20 66 69 | 6c 65 2c 20 63 6c 6f 73 |a new fi|le, clos|
|00003250| 65 20 69 74 20 2a 2f 0a | 09 69 66 20 6f 72 69 67 |e it */.|.if orig|
|00003260| 69 6e 20 7e 3d 20 61 64 | 64 72 65 73 73 28 29 09 |in ~= ad|dress().|
|00003270| 74 68 65 6e 20 27 63 6c | 6f 73 65 27 20 66 6f 72 |then 'cl|ose' for|
|00003280| 63 65 0a 72 65 74 75 72 | 6e 20 72 63 0a 0a 64 6f |ce.retur|n rc..do|
|00003290| 73 65 72 72 6f 72 3a 0a | 09 61 72 67 20 72 63 0a |serror:.|.arg rc.|
|000032a0| 0a 09 2f 2a 20 69 66 20 | 77 65 20 68 61 76 65 20 |../* if |we have |
|000032b0| 6f 70 65 6e 65 64 20 61 | 20 6e 65 77 20 66 69 6c |opened a| new fil|
|000032c0| 65 2c 20 63 6c 6f 73 65 | 20 69 74 20 2a 2f 0a 09 |e, close| it */..|
|000032d0| 69 66 20 6f 72 69 67 69 | 6e 20 7e 3d 20 61 64 64 |if origi|n ~= add|
|000032e0| 72 65 73 73 28 29 09 74 | 68 65 6e 20 27 63 6c 6f |ress().t|hen 'clo|
|000032f0| 73 65 27 20 66 6f 72 63 | 65 0a 72 65 74 75 72 6e |se' forc|e.return|
|00003300| 20 72 63 0a | | rc. | |
+--------+-------------------------+-------------------------+--------+--------+