home *** CD-ROM | disk | FTP | other *** search
MacBinary | 2002-11-01 | 15.3 KB | [TEXT/CWIE] |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: HexCompare.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Fri Nov 1 16:48:03 2002, modified Fri Nov 1 16:48:03 2002, creator 'CWIE', type ASCII, 14793 bytes "HexCompare.c" , at 0x3a49 520 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 48 65 78 43 6f 6d | 70 61 72 65 2e 63 00 00 |..HexCom|pare.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 39 c9 00 | 00 02 08 b9 e8 a7 13 b9 |.....9..|........|
|00000060| e8 a7 13 00 00 0c 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c3 07 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 54 68 | 65 20 63 6f 6e 74 65 6e |/*. * Th|e conten|
|00000090| 74 73 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 20 |ts of th|is file |
|000000a0| 61 72 65 20 73 75 62 6a | 65 63 74 20 74 6f 20 74 |are subj|ect to t|
|000000b0| 68 65 20 4d 6f 7a 69 6c | 6c 61 20 50 75 62 6c 69 |he Mozil|la Publi|
|000000c0| 63 0d 20 2a 20 4c 69 63 | 65 6e 73 65 20 56 65 72 |c. * Lic|ense Ver|
|000000d0| 73 69 6f 6e 20 31 2e 31 | 20 28 74 68 65 20 22 4c |sion 1.1| (the "L|
|000000e0| 69 63 65 6e 73 65 22 29 | 3b 20 79 6f 75 20 6d 61 |icense")|; you ma|
|000000f0| 79 20 6e 6f 74 20 75 73 | 65 20 74 68 69 73 20 66 |y not us|e this f|
|00000100| 69 6c 65 0d 20 2a 20 65 | 78 63 65 70 74 20 69 6e |ile. * e|xcept in|
|00000110| 20 63 6f 6d 70 6c 69 61 | 6e 63 65 20 77 69 74 68 | complia|nce with|
|00000120| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 2e 20 59 6f | the Lic|ense. Yo|
|00000130| 75 20 6d 61 79 20 6f 62 | 74 61 69 6e 20 61 20 63 |u may ob|tain a c|
|00000140| 6f 70 79 20 6f 66 0d 20 | 2a 20 74 68 65 20 4c 69 |opy of. |* the Li|
|00000150| 63 65 6e 73 65 20 61 74 | 20 68 74 74 70 3a 2f 2f |cense at| http://|
|00000160| 77 77 77 2e 6d 6f 7a 69 | 6c 6c 61 2e 6f 72 67 2f |www.mozi|lla.org/|
|00000170| 4d 50 4c 2f 0d 20 2a 20 | 0d 20 2a 20 53 6f 66 74 |MPL/. * |. * Soft|
|00000180| 77 61 72 65 20 64 69 73 | 74 72 69 62 75 74 65 64 |ware dis|tributed|
|00000190| 20 75 6e 64 65 72 20 74 | 68 65 20 4c 69 63 65 6e | under t|he Licen|
|000001a0| 73 65 20 69 73 20 64 69 | 73 74 72 69 62 75 74 65 |se is di|stribute|
|000001b0| 64 20 6f 6e 20 61 6e 20 | 22 41 53 0d 20 2a 20 49 |d on an |"AS. * I|
|000001c0| 53 22 20 62 61 73 69 73 | 2c 20 57 49 54 48 4f 55 |S" basis|, WITHOU|
|000001d0| 54 20 57 41 52 52 41 4e | 54 59 20 4f 46 20 41 4e |T WARRAN|TY OF AN|
|000001e0| 59 20 4b 49 4e 44 2c 20 | 65 69 74 68 65 72 20 65 |Y KIND, |either e|
|000001f0| 78 70 72 65 73 73 20 6f | 72 0d 20 2a 20 69 6d 70 |xpress o|r. * imp|
|00000200| 6c 69 65 64 2e 20 53 65 | 65 20 74 68 65 20 4c 69 |lied. Se|e the Li|
|00000210| 63 65 6e 73 65 20 66 6f | 72 20 74 68 65 20 73 70 |cense fo|r the sp|
|00000220| 65 63 69 66 69 63 20 6c | 61 6e 67 75 61 67 65 20 |ecific l|anguage |
|00000230| 67 6f 76 65 72 6e 69 6e | 67 0d 20 2a 20 72 69 67 |governin|g. * rig|
|00000240| 68 74 73 20 61 6e 64 20 | 6c 69 6d 69 74 61 74 69 |hts and |limitati|
|00000250| 6f 6e 73 20 75 6e 64 65 | 72 20 74 68 65 20 4c 69 |ons unde|r the Li|
|00000260| 63 65 6e 73 65 2e 0d 20 | 2a 20 0d 20 2a 20 54 68 |cense.. |* . * Th|
|00000270| 65 20 4f 72 69 67 69 6e | 61 6c 20 43 6f 64 65 20 |e Origin|al Code |
|00000280| 69 73 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |is Copyr|ight 199|
|00000290| 33 20 4a 69 6d 20 42 75 | 6d 67 61 72 64 6e 65 72 |3 Jim Bu|mgardner|
|000002a0| 2e 0d 20 2a 20 0d 20 2a | 20 54 68 65 20 49 6e 69 |.. * . *| The Ini|
|000002b0| 74 69 61 6c 20 44 65 76 | 65 6c 6f 70 65 72 20 6f |tial Dev|eloper o|
|000002c0| 66 20 74 68 65 20 4f 72 | 69 67 69 6e 61 6c 20 43 |f the Or|iginal C|
|000002d0| 6f 64 65 20 69 73 20 4a | 69 6d 20 42 75 6d 67 61 |ode is J|im Bumga|
|000002e0| 72 64 6e 65 72 0d 20 2a | 20 50 6f 72 74 69 6f 6e |rdner. *| Portion|
|000002f0| 73 20 63 72 65 61 74 65 | 64 20 62 79 20 4c 61 6e |s create|d by Lan|
|00000300| 65 20 52 6f 61 74 68 65 | 20 61 72 65 0d 20 2a 20 |e Roathe| are. * |
|00000310| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 43 6f |Copyrigh|t (C) Co|
|00000320| 70 79 72 69 67 68 74 20 | a9 20 31 39 39 36 2d 32 |pyright |. 1996-2|
|00000330| 30 30 32 2e 0d 20 2a 20 | 41 6c 6c 20 52 69 67 68 |002.. * |All Righ|
|00000340| 74 73 20 52 65 73 65 72 | 76 65 64 2e 0d 20 2a 0d |ts Reser|ved.. *.|
|00000350| 20 2a 20 4d 6f 64 69 66 | 69 65 64 3a 20 24 44 61 | * Modif|ied: $Da|
|00000360| 74 65 3a 20 32 30 30 32 | 2f 31 31 2f 30 31 20 32 |te: 2002|/11/01 2|
|00000370| 33 3a 34 38 3a 30 31 20 | 24 0d 20 2a 20 52 65 76 |3:48:01 |$. * Rev|
|00000380| 69 73 69 6f 6e 3a 20 24 | 49 64 3a 20 48 65 78 43 |ision: $|Id: HexC|
|00000390| 6f 6d 70 61 72 65 2e 63 | 2c 76 20 31 2e 32 30 20 |ompare.c|,v 1.20 |
|000003a0| 32 30 30 32 2f 31 31 2f | 30 31 20 32 33 3a 34 38 |2002/11/|01 23:48|
|000003b0| 3a 30 31 20 72 61 76 69 | 6e 67 20 45 78 70 20 24 |:01 ravi|ng Exp $|
|000003c0| 0d 20 2a 0d 20 2a 20 43 | 6f 6e 74 72 69 62 75 74 |. *. * C|ontribut|
|000003d0| 6f 72 28 73 29 3a 0d 20 | 2a 09 09 4c 61 6e 65 20 |or(s):. |*..Lane |
|000003e0| 52 6f 61 74 68 65 0d 20 | 2a 09 09 4e 69 63 6b 20 |Roathe. |*..Nick |
|000003f0| 53 68 61 6e 6b 73 0d 20 | 2a 09 09 4e 69 63 6b 20 |Shanks. |*..Nick |
|00000400| 50 69 73 73 61 72 6f 20 | 4a 72 2e 20 28 4e 50 29 |Pissaro |Jr. (NP)|
|00000410| 0d 20 2a 2f 0d 0d 2f 2f | 20 30 35 2f 31 30 2f 30 |. */..//| 05/10/0|
|00000420| 31 20 2d 20 47 41 42 3a | 20 4d 50 57 20 65 6e 76 |1 - GAB:| MPW env|
|00000430| 69 72 6f 6e 6d 65 6e 74 | 20 73 75 70 70 6f 72 74 |ironment| support|
|00000440| 0d 23 69 66 64 65 66 20 | 5f 5f 4d 50 57 5f 5f 0d |.#ifdef |__MPW__.|
|00000450| 23 69 6e 63 6c 75 64 65 | 20 22 4d 50 57 49 6e 63 |#include| "MPWInc|
|00000460| 6c 75 64 65 73 2e 68 22 | 0d 23 65 6e 64 69 66 0d |ludes.h"|.#endif.|
|00000470| 0d 23 69 6e 63 6c 75 64 | 65 20 22 48 65 78 43 6f |.#includ|e "HexCo|
|00000480| 6d 70 61 72 65 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |mpare.h"|.#includ|
|00000490| 65 20 22 45 64 69 74 52 | 6f 75 74 69 6e 65 73 2e |e "EditR|outines.|
|000004a0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 45 64 69 |h".#incl|ude "Edi|
|000004b0| 74 53 63 72 6f 6c 6c 62 | 61 72 2e 68 22 0d 23 69 |tScrollb|ar.h".#i|
|000004c0| 6e 63 6c 75 64 65 20 22 | 4d 61 69 6e 2e 68 22 0d |nclude "|Main.h".|
|000004d0| 23 69 6e 63 6c 75 64 65 | 20 22 50 72 65 66 73 2e |#include| "Prefs.|
|000004e0| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 55 74 69 |h".#incl|ude "Uti|
|000004f0| 6c 69 74 79 2e 68 22 0d | 0d 2f 2f 20 76 61 72 69 |lity.h".|.// vari|
|00000500| 61 62 6c 65 73 0d 2f 2f | 4c 52 20 31 38 30 20 65 |ables.//|LR 180 e|
|00000510| 78 74 65 72 6e 20 73 68 | 6f 72 74 20 43 6f 6d 70 |xtern sh|ort Comp|
|00000520| 61 72 65 46 6c 61 67 3b | 0d 65 78 74 65 72 6e 20 |areFlag;|.extern |
|00000530| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 09 67 53 |unsigned| char.gS|
|00000540| 65 61 72 63 68 42 75 66 | 66 65 72 5b 32 35 36 5d |earchBuf|fer[256]|
|00000550| 3b 0d 0d 57 69 6e 64 6f | 77 52 65 66 09 09 43 6f |;..Windo|wRef..Co|
|00000560| 6d 70 57 69 6e 64 31 20 | 3d 20 4e 55 4c 4c 2c 0d |mpWind1 |= NULL,.|
|00000570| 09 09 09 09 43 6f 6d 70 | 57 69 6e 64 32 20 3d 20 |....Comp|Wind2 = |
|00000580| 4e 55 4c 4c 3b 0d 42 6f | 6f 6c 65 61 6e 09 09 09 |NULL;.Bo|olean...|
|00000590| 57 65 46 6f 75 6e 64 57 | 69 6e 64 31 20 3d 20 66 |WeFoundW|ind1 = f|
|000005a0| 61 6c 73 65 2c 0d 09 09 | 09 09 57 65 46 6f 75 6e |alse,...|..WeFoun|
|000005b0| 64 57 69 6e 64 32 20 3d | 20 66 61 6c 73 65 3b 0d |dWind2 =| false;.|
|000005c0| 0d 2f 2a 2a 2a 20 50 45 | 52 46 4f 52 4d 20 54 45 |./*** PE|RFORM TE|
|000005d0| 58 54 20 43 4f 4d 50 41 | 52 45 20 2a 2a 2a 2f 0d |XT COMPA|RE ***/.|
|000005e0| 2f 2f 4c 52 20 31 38 35 | 20 2d 2d 20 74 68 69 73 |//LR 185| -- this|
|000005f0| 20 6f 6e 65 20 72 6f 75 | 74 69 6e 65 20 6e 6f 77 | one rou|tine now|
|00000600| 20 70 65 72 66 6f 72 6d | 73 20 45 49 54 48 45 52 | perform|s EITHER|
|00000610| 20 6d 61 74 63 68 20 6f | 72 20 64 69 66 66 20 63 | match o|r diff c|
|00000620| 6f 6d 70 61 72 69 73 6f | 6e 73 2e 2e 2e 61 6e 64 |ompariso|ns...and|
|00000630| 20 57 41 59 20 66 61 73 | 74 65 72 20 3a 29 0d 42 | WAY fas|ter :).B|
|00000640| 6f 6f 6c 65 61 6e 20 50 | 65 72 66 6f 72 6d 54 65 |oolean P|erformTe|
|00000650| 78 74 43 6f 6d 70 61 72 | 65 28 20 45 64 69 74 57 |xtCompar|e( EditW|
|00000660| 69 6e 64 6f 77 50 74 72 | 20 64 57 69 6e 31 2c 20 |indowPtr| dWin1, |
|00000670| 45 64 69 74 57 69 6e 64 | 6f 77 50 74 72 20 64 57 |EditWind|owPtr dW|
|00000680| 69 6e 32 20 29 0d 7b 0d | 2f 2f 09 72 65 74 75 72 |in2 ).{.|//.retur|
|00000690| 6e 73 20 64 69 66 66 65 | 72 65 6e 63 65 73 20 69 |ns diffe|rences i|
|000006a0| 6e 20 64 61 74 61 20 6f | 66 20 74 77 6f 20 65 64 |n data o|f two ed|
|000006b0| 69 74 20 77 69 6e 64 6f | 77 73 0d 09 42 79 74 65 |it windo|ws..Byte|
|000006c0| 09 09 63 68 31 2c 20 63 | 68 32 3b 0d 09 73 68 6f |..ch1, c|h2;..sho|
|000006d0| 72 74 09 09 6d 61 74 63 | 68 49 64 78 2c 20 6d 61 |rt..matc|hIdx, ma|
|000006e0| 74 63 68 43 6e 74 3b 0d | 09 6c 6f 6e 67 09 09 61 |tchCnt;.|.long..a|
|000006f0| 64 64 72 31 2c 20 61 64 | 64 72 32 2c 20 6d 61 74 |ddr1, ad|dr2, mat|
|00000700| 63 68 41 64 64 72 31 2c | 20 6d 61 74 63 68 41 64 |chAddr1,| matchAd|
|00000710| 64 72 32 2c 20 61 64 6a | 75 73 74 3b 0d 09 72 65 |dr2, adj|ust;..re|
|00000720| 67 69 73 74 65 72 20 09 | 45 64 69 74 43 68 75 6e |gister .|EditChun|
|00000730| 6b 20 2a 2a 63 31 2c 20 | 2a 2a 63 32 3b 0d 0d 09 |k **c1, |**c2;...|
|00000740| 4d 79 53 65 74 43 75 72 | 73 6f 72 28 20 43 5f 57 |MySetCur|sor( C_W|
|00000750| 61 74 63 68 20 29 3b 0d | 0d 09 2f 2f 20 53 65 61 |atch );.|..// Sea|
|00000760| 72 63 68 20 69 6e 20 44 | 69 72 65 63 74 69 6f 6e |rch in D|irection|
|00000770| 20 67 50 72 65 66 73 2e | 73 65 61 72 63 68 46 6f | gPrefs.|searchFo|
|00000780| 72 77 61 72 64 20 66 6f | 72 20 74 65 78 74 20 67 |rward fo|r text g|
|00000790| 53 65 61 72 63 68 42 75 | 66 66 65 72 0d 0d 09 61 |SearchBu|ffer...a|
|000007a0| 64 64 72 31 20 3d 20 64 | 57 69 6e 31 2d 3e 73 74 |ddr1 = d|Win1->st|
|000007b0| 61 72 74 53 65 6c 3b 0d | 09 61 64 64 72 32 20 3d |artSel;.|.addr2 =|
|000007c0| 20 64 57 69 6e 32 2d 3e | 73 74 61 72 74 53 65 6c | dWin2->|startSel|
|000007d0| 3b 0d 0d 09 69 66 28 20 | 67 50 72 65 66 73 2e 73 |;...if( |gPrefs.s|
|000007e0| 65 61 72 63 68 46 6f 72 | 77 61 72 64 20 29 0d 09 |earchFor|ward )..|
|000007f0| 09 61 64 6a 75 73 74 20 | 3d 20 31 3b 0d 09 65 6c |.adjust |= 1;..el|
|00000800| 73 65 0d 09 09 61 64 6a | 75 73 74 20 3d 20 2d 31 |se...adj|ust = -1|
|00000810| 3b 0d 09 0d 09 2f 2f 20 | 31 20 3d 20 62 79 74 65 |;....// |1 = byte|
|00000820| 2c 20 32 20 3d 20 77 6f | 72 64 73 2c 20 34 20 3d |, 2 = wo|rds, 4 =|
|00000830| 20 6c 6f 6e 67 73 2c 20 | 65 63 74 2e 2e 2e 0d 09 | longs, |ect.....|
|00000840| 6d 61 74 63 68 43 6e 74 | 20 3d 20 67 50 72 65 66 |matchCnt| = gPref|
|00000850| 73 2e 73 65 61 72 63 68 | 53 69 7a 65 3b 0d 0d 09 |s.search|Size;...|
|00000860| 2f 2f 4c 52 20 31 38 35 | 20 2d 2d 20 77 65 20 68 |//LR 185| -- we h|
|00000870| 61 6e 64 6c 65 20 74 68 | 65 20 63 68 75 63 6b 73 |andle th|e chucks|
|00000880| 20 6f 75 72 73 65 6c 66 | 20 74 6f 20 73 70 65 65 | ourself| to spee|
|00000890| 64 20 75 70 20 73 65 61 | 72 63 68 69 6e 67 21 0d |d up sea|rching!.|
|000008a0| 09 2f 2f 09 09 09 67 65 | 74 20 74 68 65 20 63 68 |.//...ge|t the ch|
|000008b0| 75 6e 6b 20 66 6f 72 20 | 74 68 65 20 63 75 72 72 |unk for |the curr|
|000008c0| 65 6e 74 20 61 64 64 72 | 65 73 73 20 26 20 6c 6f |ent addr|ess & lo|
|000008d0| 61 64 20 69 74 2e 0d 0d | 09 63 31 20 3d 20 47 65 |ad it...|.c1 = Ge|
|000008e0| 74 43 68 75 6e 6b 42 79 | 41 64 64 72 28 20 64 57 |tChunkBy|Addr( dW|
|000008f0| 69 6e 31 2c 20 61 64 64 | 72 31 20 29 3b 0d 09 63 |in1, add|r1 );..c|
|00000900| 32 20 3d 20 47 65 74 43 | 68 75 6e 6b 42 79 41 64 |2 = GetC|hunkByAd|
|00000910| 64 72 28 20 64 57 69 6e | 32 2c 20 61 64 64 72 32 |dr( dWin|2, addr2|
|00000920| 20 29 3b 0d 09 69 66 28 | 20 21 63 31 20 7c 7c 20 | );..if(| !c1 || |
|00000930| 21 63 32 20 29 0d 09 09 | 67 6f 74 6f 20 46 61 69 |!c2 )...|goto Fai|
|00000940| 6c 75 72 65 3b 09 2f 2f | 20 73 68 6f 75 6c 64 20 |lure;.//| should |
|00000950| 6e 65 76 65 72 20 68 61 | 70 70 65 6e 2c 20 62 75 |never ha|ppen, bu|
|00000960| 74 2e 2e 2e 0d 0d 09 4c | 6f 61 64 43 68 75 6e 6b |t......L|oadChunk|
|00000970| 28 20 64 57 69 6e 31 2c | 20 63 31 20 29 3b 0d 09 |( dWin1,| c1 );..|
|00000980| 4c 6f 61 64 43 68 75 6e | 6b 28 20 64 57 69 6e 32 |LoadChun|k( dWin2|
|00000990| 2c 20 63 32 20 29 3b 0d | 0d 09 6d 61 74 63 68 49 |, c2 );.|..matchI|
|000009a0| 64 78 20 3d 20 30 3b 0d | 09 61 64 64 72 31 20 2b |dx = 0;.|.addr1 +|
|000009b0| 3d 20 61 64 6a 75 73 74 | 3b 0d 09 61 64 64 72 32 |= adjust|;..addr2|
|000009c0| 20 2b 3d 20 61 64 6a 75 | 73 74 3b 0d 0d 09 2f 2f | += adju|st;...//|
|000009d0| 4c 52 20 31 38 35 20 2d | 2d 20 72 65 2d 77 72 69 |LR 185 -|- re-wri|
|000009e0| 74 65 20 6f 66 20 63 6f | 6d 70 61 72 65 20 6c 6f |te of co|mpare lo|
|000009f0| 6f 70 3b 20 69 74 20 77 | 61 73 20 70 61 74 68 65 |op; it w|as pathe|
|00000a00| 74 69 63 61 6c 6c 79 20 | 73 6c 6f 77 2c 20 65 74 |tically |slow, et|
|00000a10| 63 2e 0d 09 77 68 69 6c | 65 28 20 61 64 64 72 31 |c...whil|e( addr1|
|00000a20| 20 3e 3d 20 30 20 26 26 | 20 61 64 64 72 31 20 3c | >= 0 &&| addr1 <|
|00000a30| 20 64 57 69 6e 31 2d 3e | 66 69 6c 65 53 69 7a 65 | dWin1->|fileSize|
|00000a40| 20 26 26 20 61 64 64 72 | 32 20 3e 3d 20 30 20 26 | && addr|2 >= 0 &|
|00000a50| 26 20 61 64 64 72 32 20 | 3c 20 64 57 69 6e 32 2d |& addr2 |< dWin2-|
|00000a60| 3e 66 69 6c 65 53 69 7a | 65 20 29 0d 09 7b 0d 09 |>fileSiz|e )..{..|
|00000a70| 09 69 66 28 20 21 28 61 | 64 64 72 31 20 25 20 34 |.if( !(a|ddr1 % 4|
|00000a80| 30 39 36 29 20 29 09 09 | 2f 2f 4c 52 20 31 2e 37 |096) )..|//LR 1.7|
|00000a90| 32 20 2d 2d 20 64 6f 6e | 27 74 20 73 6c 6f 77 20 |2 -- don|'t slow |
|00000aa0| 6f 75 72 20 73 65 61 72 | 63 68 65 73 20 64 6f 77 |our sear|ches dow|
|00000ab0| 6e 20 75 6e 6e 65 63 65 | 73 73 61 72 69 6c 79 21 |n unnece|ssarily!|
|00000ac0| 0d 09 09 7b 0d 09 09 09 | 69 66 28 20 43 68 65 63 |...{....|if( Chec|
|00000ad0| 6b 46 6f 72 41 62 6f 72 | 74 28 29 20 29 09 2f 2f |kForAbor|t() ).//|
|00000ae0| 4c 52 3a 20 31 2e 36 36 | 20 2d 20 61 6c 6c 6f 77 |LR: 1.66| - allow|
|00000af0| 20 75 73 65 72 20 74 6f | 20 61 62 6f 72 74 20 74 | user to| abort t|
|00000b00| 68 65 20 73 65 61 72 63 | 68 0d 09 09 09 09 62 72 |he searc|h.....br|
|00000b10| 65 61 6b 3b 0d 09 09 7d | 0d 0d 2f 2f 31 38 35 09 |eak;...}|..//185.|
|00000b20| 09 63 68 31 20 3d 20 47 | 65 74 42 79 74 65 28 20 |.ch1 = G|etByte( |
|00000b30| 64 57 69 6e 31 2c 20 61 | 64 64 72 31 20 29 3b 0d |dWin1, a|ddr1 );.|
|00000b40| 2f 2f 31 38 35 09 09 63 | 68 32 20 3d 20 47 65 74 |//185..c|h2 = Get|
|00000b50| 42 79 74 65 28 20 64 57 | 69 6e 32 2c 20 61 64 64 |Byte( dW|in2, add|
|00000b60| 72 32 20 29 3b 0d 09 09 | 63 68 31 20 3d 20 28 42 |r2 );...|ch1 = (B|
|00000b70| 79 74 65 29 20 28 2a 28 | 2a 63 31 29 2d 3e 64 61 |yte) (*(|*c1)->da|
|00000b80| 74 61 29 5b 61 64 64 72 | 31 20 2d 20 28 2a 63 31 |ta)[addr|1 - (*c1|
|00000b90| 29 2d 3e 61 64 64 72 5d | 3b 0d 09 09 63 68 32 20 |)->addr]|;...ch2 |
|00000ba0| 3d 20 28 42 79 74 65 29 | 20 28 2a 28 2a 63 32 29 |= (Byte)| (*(*c2)|
|00000bb0| 2d 3e 64 61 74 61 29 5b | 61 64 64 72 32 20 2d 20 |->data)[|addr2 - |
|00000bc0| 28 2a 63 32 29 2d 3e 61 | 64 64 72 5d 3b 0d 09 09 |(*c2)->a|ddr];...|
|00000bd0| 69 66 28 20 28 67 50 72 | 65 66 73 2e 73 65 61 72 |if( (gPr|efs.sear|
|00000be0| 63 68 54 79 70 65 20 3d | 3d 20 43 4d 5f 44 69 66 |chType =|= CM_Dif|
|00000bf0| 66 65 72 65 6e 74 20 26 | 26 20 63 68 31 20 21 3d |ferent &|& ch1 !=|
|00000c00| 20 63 68 32 29 20 7c 7c | 20 28 67 50 72 65 66 73 | ch2) ||| (gPrefs|
|00000c10| 2e 73 65 61 72 63 68 54 | 79 70 65 20 3d 3d 20 43 |.searchT|ype == C|
|00000c20| 4d 5f 4d 61 74 63 68 20 | 26 26 20 63 68 31 20 3d |M_Match |&& ch1 =|
|00000c30| 3d 20 63 68 32 29 20 29 | 0d 09 09 7b 0d 09 09 09 |= ch2) )|...{....|
|00000c40| 69 66 28 20 6d 61 74 63 | 68 49 64 78 20 3d 3d 20 |if( matc|hIdx == |
|00000c50| 30 20 29 0d 09 09 09 7b | 0d 09 09 09 09 6d 61 74 |0 )....{|.....mat|
|00000c60| 63 68 41 64 64 72 31 20 | 3d 20 61 64 64 72 31 3b |chAddr1 |= addr1;|
|00000c70| 0d 09 09 09 09 6d 61 74 | 63 68 41 64 64 72 32 20 |.....mat|chAddr2 |
|00000c80| 3d 20 61 64 64 72 32 3b | 0d 09 09 09 7d 0d 09 09 |= addr2;|....}...|
|00000c90| 09 2b 2b 6d 61 74 63 68 | 49 64 78 3b 0d 0d 09 09 |.++match|Idx;....|
|00000ca0| 09 69 66 28 20 6d 61 74 | 63 68 49 64 78 20 3e 3d |.if( mat|chIdx >=|
|00000cb0| 20 6d 61 74 63 68 43 6e | 74 20 29 0d 09 09 09 09 | matchCn|t ).....|
|00000cc0| 67 6f 74 6f 20 53 75 63 | 63 65 73 73 3b 0d 0d 09 |goto Suc|cess;...|
|00000cd0| 09 09 2b 2b 61 64 64 72 | 31 3b 0d 09 09 09 2b 2b |..++addr|1;....++|
|00000ce0| 61 64 64 72 32 3b 0d 09 | 09 09 69 66 28 20 61 64 |addr2;..|..if( ad|
|00000cf0| 64 72 31 20 3d 3d 20 64 | 57 69 6e 31 2d 3e 66 69 |dr1 == d|Win1->fi|
|00000d00| 6c 65 53 69 7a 65 20 29 | 0d 09 09 09 7b 0d 09 09 |leSize )|....{...|
|00000d10| 09 09 6d 61 74 63 68 49 | 64 78 20 3d 20 30 3b 0d |..matchI|dx = 0;.|
|00000d20| 09 09 09 09 61 64 64 72 | 31 20 3d 20 6d 61 74 63 |....addr|1 = matc|
|00000d30| 68 41 64 64 72 31 3b 0d | 09 09 09 09 61 64 64 72 |hAddr1;.|....addr|
|00000d40| 32 20 3d 20 6d 61 74 63 | 68 41 64 64 72 32 3b 0d |2 = matc|hAddr2;.|
|00000d50| 09 09 09 7d 0d 09 09 09 | 65 6c 73 65 0d 09 09 09 |...}....|else....|
|00000d60| 09 63 6f 6e 74 69 6e 75 | 65 3b 0d 09 09 7d 0d 09 |.continu|e;...}..|
|00000d70| 09 65 6c 73 65 20 69 66 | 28 20 6d 61 74 63 68 49 |.else if|( matchI|
|00000d80| 64 78 20 29 09 2f 2f 20 | 69 66 20 77 65 20 77 65 |dx ).// |if we we|
|00000d90| 72 65 20 69 6e 20 61 20 | 6d 61 74 63 68 2c 20 62 |re in a |match, b|
|00000da0| 61 63 6b 20 69 74 20 6f | 75 74 21 0d 09 09 7b 0d |ack it o|ut!...{.|
|00000db0| 09 09 09 6d 61 74 63 68 | 49 64 78 20 3d 20 30 3b |...match|Idx = 0;|
|00000dc0| 0d 09 09 09 61 64 64 72 | 31 20 3d 20 6d 61 74 63 |....addr|1 = matc|
|00000dd0| 68 41 64 64 72 31 3b 0d | 09 09 09 61 64 64 72 32 |hAddr1;.|...addr2|
|00000de0| 20 3d 20 6d 61 74 63 68 | 41 64 64 72 32 3b 0d 09 | = match|Addr2;..|
|00000df0| 09 7d 0d 09 09 61 64 64 | 72 31 20 2b 3d 20 61 64 |.}...add|r1 += ad|
|00000e00| 6a 75 73 74 3b 0d 09 09 | 61 64 64 72 32 20 2b 3d |just;...|addr2 +=|
|00000e10| 20 61 64 6a 75 73 74 3b | 0d 0d 09 09 2f 2f 4c 52 | adjust;|....//LR|
|00000e20| 20 31 38 35 20 2d 2d 20 | 4f 4b 2c 20 68 65 72 65 | 185 -- |OK, here|
|00000e30| 20 77 65 20 6d 75 73 74 | 20 68 61 6e 64 6c 65 20 | we must| handle |
|00000e40| 6d 6f 76 69 6e 67 20 74 | 6f 20 61 20 6e 65 77 20 |moving t|o a new |
|00000e50| 63 68 75 6e 6b 20 69 66 | 20 6f 75 74 73 69 64 65 |chunk if| outside|
|00000e60| 20 63 75 72 72 65 6e 74 | 20 6f 6e 65 0d 09 09 69 | current| one...i|
|00000e70| 66 28 20 61 64 64 72 31 | 20 3c 20 28 2a 63 31 29 |f( addr1| < (*c1)|
|00000e80| 2d 3e 61 64 64 72 20 29 | 0d 09 09 7b 0d 09 09 09 |->addr )|...{....|
|00000e90| 55 6e 6c 6f 61 64 43 68 | 75 6e 6b 28 20 64 57 69 |UnloadCh|unk( dWi|
|00000ea0| 6e 31 2c 20 63 31 2c 20 | 74 72 75 65 20 29 3b 0d |n1, c1, |true );.|
|00000eb0| 09 09 09 63 31 20 3d 20 | 28 2a 63 31 29 2d 3e 70 |...c1 = |(*c1)->p|
|00000ec0| 72 65 76 3b 0d 09 09 09 | 67 6f 74 6f 20 6e 63 31 |rev;....|goto nc1|
|00000ed0| 3b 0d 09 09 7d 0d 09 09 | 65 6c 73 65 20 69 66 28 |;...}...|else if(|
|00000ee0| 20 61 64 64 72 31 20 3e | 3d 20 28 2a 63 31 29 2d | addr1 >|= (*c1)-|
|00000ef0| 3e 61 64 64 72 20 2b 20 | 28 2a 63 31 29 2d 3e 73 |>addr + |(*c1)->s|
|00000f00| 69 7a 65 20 29 0d 09 09 | 7b 0d 09 09 09 55 6e 6c |ize )...|{....Unl|
|00000f10| 6f 61 64 43 68 75 6e 6b | 28 20 64 57 69 6e 31 2c |oadChunk|( dWin1,|
|00000f20| 20 63 31 2c 20 74 72 75 | 65 20 29 3b 0d 09 09 09 | c1, tru|e );....|
|00000f30| 63 31 20 3d 20 28 2a 63 | 31 29 2d 3e 6e 65 78 74 |c1 = (*c|1)->next|
|00000f40| 3b 0d 6e 63 31 3a 0d 09 | 09 09 69 66 28 20 21 63 |;.nc1:..|..if( !c|
|00000f50| 31 20 29 0d 09 09 09 09 | 67 6f 74 6f 20 46 61 69 |1 ).....|goto Fai|
|00000f60| 6c 75 72 65 3b 0d 0d 09 | 09 09 4c 6f 61 64 43 68 |lure;...|..LoadCh|
|00000f70| 75 6e 6b 28 20 64 57 69 | 6e 31 2c 20 63 31 20 29 |unk( dWi|n1, c1 )|
|00000f80| 3b 09 2f 2f 20 6e 6f 20 | 63 68 65 63 6b 2c 20 6d |;.// no |check, m|
|00000f90| 6f 73 74 20 6c 69 6b 65 | 6c 79 20 6e 6f 74 20 6c |ost like|ly not l|
|00000fa0| 6f 61 64 65 64 2c 20 61 | 6e 64 20 63 68 65 63 6b |oaded, a|nd check|
|00000fb0| 65 64 20 69 6e 20 72 6f | 75 74 69 6e 65 20 61 6e |ed in ro|utine an|
|00000fc0| 79 77 61 79 0d 09 09 7d | 0d 0d 09 09 69 66 28 20 |yway...}|....if( |
|00000fd0| 61 64 64 72 32 20 3c 20 | 28 2a 63 32 29 2d 3e 61 |addr2 < |(*c2)->a|
|00000fe0| 64 64 72 20 29 0d 09 09 | 7b 0d 09 09 09 55 6e 6c |ddr )...|{....Unl|
|00000ff0| 6f 61 64 43 68 75 6e 6b | 28 20 64 57 69 6e 32 2c |oadChunk|( dWin2,|
|00001000| 20 63 32 2c 20 74 72 75 | 65 20 29 3b 0d 09 09 09 | c2, tru|e );....|
|00001010| 63 32 20 3d 20 28 2a 63 | 32 29 2d 3e 70 72 65 76 |c2 = (*c|2)->prev|
|00001020| 3b 0d 09 09 09 67 6f 74 | 6f 20 6e 63 32 3b 0d 09 |;....got|o nc2;..|
|00001030| 09 7d 0d 09 09 65 6c 73 | 65 20 69 66 28 20 61 64 |.}...els|e if( ad|
|00001040| 64 72 32 20 3e 3d 20 28 | 2a 63 32 29 2d 3e 61 64 |dr2 >= (|*c2)->ad|
|00001050| 64 72 20 2b 20 28 2a 63 | 32 29 2d 3e 73 69 7a 65 |dr + (*c|2)->size|
|00001060| 20 29 0d 09 09 7b 0d 09 | 09 09 55 6e 6c 6f 61 64 | )...{..|..Unload|
|00001070| 43 68 75 6e 6b 28 20 64 | 57 69 6e 32 2c 20 63 32 |Chunk( d|Win2, c2|
|00001080| 2c 20 74 72 75 65 20 29 | 3b 0d 09 09 09 63 32 20 |, true )|;....c2 |
|00001090| 3d 20 28 2a 63 32 29 2d | 3e 6e 65 78 74 3b 0d 6e |= (*c2)-|>next;.n|
|000010a0| 63 32 3a 0d 09 09 09 69 | 66 28 20 21 63 32 20 29 |c2:....i|f( !c2 )|
|000010b0| 0d 09 09 09 09 67 6f 74 | 6f 20 46 61 69 6c 75 72 |.....got|o Failur|
|000010c0| 65 3b 0d 0d 09 09 09 4c | 6f 61 64 43 68 75 6e 6b |e;.....L|oadChunk|
|000010d0| 28 20 64 57 69 6e 32 2c | 20 63 32 20 29 3b 09 2f |( dWin2,| c2 );./|
|000010e0| 2f 20 6e 6f 20 63 68 65 | 63 6b 2c 20 6d 6f 73 74 |/ no che|ck, most|
|000010f0| 20 6c 69 6b 65 6c 79 20 | 6e 6f 74 20 6c 6f 61 64 | likely |not load|
|00001100| 65 64 2c 20 61 6e 64 20 | 63 68 65 63 6b 65 64 20 |ed, and |checked |
|00001110| 69 6e 20 72 6f 75 74 69 | 6e 65 20 61 6e 79 77 61 |in routi|ne anywa|
|00001120| 79 0d 09 09 7d 0d 09 7d | 0d 0d 46 61 69 6c 75 72 |y...}..}|..Failur|
|00001130| 65 3a 0d 09 53 79 73 42 | 65 65 70 28 20 31 20 29 |e:..SysB|eep( 1 )|
|00001140| 3b 0d 09 4d 79 53 65 74 | 43 75 72 73 6f 72 28 20 |;..MySet|Cursor( |
|00001150| 43 5f 41 72 72 6f 77 20 | 29 3b 0d 09 72 65 74 75 |C_Arrow |);..retu|
|00001160| 72 6e 20 66 61 6c 73 65 | 3b 0d 0d 53 75 63 63 65 |rn false|;..Succe|
|00001170| 73 73 3a 0d 09 53 65 6c | 65 63 74 57 69 6e 64 6f |ss:..Sel|ectWindo|
|00001180| 77 28 20 64 57 69 6e 31 | 2d 3e 6f 57 69 6e 2e 74 |w( dWin1|->oWin.t|
|00001190| 68 65 57 69 6e 20 29 3b | 0d 09 64 57 69 6e 31 2d |heWin );|..dWin1-|
|000011a0| 3e 73 74 61 72 74 53 65 | 6c 20 3d 20 6d 61 74 63 |>startSe|l = matc|
|000011b0| 68 41 64 64 72 31 3b 0d | 09 64 57 69 6e 31 2d 3e |hAddr1;.|.dWin1->|
|000011c0| 65 6e 64 53 65 6c 20 3d | 20 64 57 69 6e 31 2d 3e |endSel =| dWin1->|
|000011d0| 73 74 61 72 74 53 65 6c | 20 2b 20 67 50 72 65 66 |startSel| + gPref|
|000011e0| 73 2e 73 65 61 72 63 68 | 53 69 7a 65 3b 0d 09 53 |s.search|Size;..S|
|000011f0| 63 72 6f 6c 6c 54 6f 53 | 65 6c 65 63 74 69 6f 6e |crollToS|election|
|00001200| 28 20 64 57 69 6e 31 2c | 20 64 57 69 6e 31 2d 3e |( dWin1,| dWin1->|
|00001210| 73 74 61 72 74 53 65 6c | 2c 20 74 72 75 65 20 29 |startSel|, true )|
|00001220| 3b 0d 0d 09 53 65 6c 65 | 63 74 57 69 6e 64 6f 77 |;...Sele|ctWindow|
|00001230| 28 20 64 57 69 6e 32 2d | 3e 6f 57 69 6e 2e 74 68 |( dWin2-|>oWin.th|
|00001240| 65 57 69 6e 20 29 3b 0d | 09 64 57 69 6e 32 2d 3e |eWin );.|.dWin2->|
|00001250| 73 74 61 72 74 53 65 6c | 20 3d 20 6d 61 74 63 68 |startSel| = match|
|00001260| 41 64 64 72 32 3b 0d 09 | 64 57 69 6e 32 2d 3e 65 |Addr2;..|dWin2->e|
|00001270| 6e 64 53 65 6c 20 3d 20 | 64 57 69 6e 32 2d 3e 73 |ndSel = |dWin2->s|
|00001280| 74 61 72 74 53 65 6c 20 | 2b 20 67 50 72 65 66 73 |tartSel |+ gPrefs|
|00001290| 2e 73 65 61 72 63 68 53 | 69 7a 65 3b 0d 09 53 63 |.searchS|ize;..Sc|
|000012a0| 72 6f 6c 6c 54 6f 53 65 | 6c 65 63 74 69 6f 6e 28 |rollToSe|lection(|
|000012b0| 20 64 57 69 6e 32 2c 20 | 64 57 69 6e 32 2d 3e 73 | dWin2, |dWin2->s|
|000012c0| 74 61 72 74 53 65 6c 2c | 20 74 72 75 65 20 29 3b |tartSel,| true );|
|000012d0| 0d 0d 09 4d 79 53 65 74 | 43 75 72 73 6f 72 28 20 |...MySet|Cursor( |
|000012e0| 43 5f 41 72 72 6f 77 20 | 29 3b 0d 09 72 65 74 75 |C_Arrow |);..retu|
|000012f0| 72 6e 20 74 72 75 65 3b | 0d 7d 0d 0d 2f 2a 2a 2a |rn true;|.}../***|
|00001300| 20 50 45 52 46 4f 52 4d | 20 54 45 58 54 20 4d 41 | PERFORM| TEXT MA|
|00001310| 54 43 48 20 43 4f 4d 50 | 41 52 45 20 2a 2a 2a 2f |TCH COMP|ARE ***/|
|00001320| 0d 2f 2a 31 38 35 0d 42 | 6f 6f 6c 65 61 6e 20 50 |./*185.B|oolean P|
|00001330| 65 72 66 6f 72 6d 54 65 | 78 74 4d 61 74 63 68 43 |erformTe|xtMatchC|
|00001340| 6f 6d 70 61 72 65 28 20 | 45 64 69 74 57 69 6e 64 |ompare( |EditWind|
|00001350| 6f 77 50 74 72 20 64 57 | 69 6e 2c 20 45 64 69 74 |owPtr dW|in, Edit|
|00001360| 57 69 6e 64 6f 77 50 74 | 72 20 64 57 69 6e 32 20 |WindowPt|r dWin2 |
|00001370| 29 0d 7b 0d 2f 2f 09 72 | 65 74 75 72 6e 73 20 6d |).{.//.r|eturns m|
|00001380| 61 74 63 68 65 73 20 69 | 6e 20 64 61 74 61 20 6f |atches i|n data o|
|00001390| 66 20 74 77 6f 20 65 64 | 69 74 20 77 69 6e 64 6f |f two ed|it windo|
|000013a0| 77 73 0d 09 42 79 74 65 | 09 09 63 68 2c 20 63 68 |ws..Byte|..ch, ch|
|000013b0| 32 3b 0d 09 73 68 6f 72 | 74 09 09 09 6d 61 74 63 |2;..shor|t...matc|
|000013c0| 68 49 64 78 2c 20 6d 61 | 74 63 68 43 6e 74 3b 0d |hIdx, ma|tchCnt;.|
|000013d0| 09 6c 6f 6e 67 09 09 61 | 64 64 72 2c 20 61 64 64 |.long..a|ddr, add|
|000013e0| 72 32 2c 20 6d 61 74 63 | 68 41 64 64 72 3b 0d 0d |r2, matc|hAddr;..|
|000013f0| 09 4d 79 53 65 74 43 75 | 72 73 6f 72 28 20 43 5f |.MySetCu|rsor( C_|
|00001400| 57 61 74 63 68 20 29 3b | 0d 0d 09 2f 2f 20 53 65 |Watch );|...// Se|
|00001410| 61 72 63 68 20 69 6e 20 | 44 69 72 65 63 74 69 6f |arch in |Directio|
|00001420| 6e 20 67 50 72 65 66 73 | 2e 73 65 61 72 63 68 46 |n gPrefs|.searchF|
|00001430| 6f 72 77 61 72 64 0d 09 | 2f 2f 20 66 6f 72 20 74 |orward..|// for t|
|00001440| 65 78 74 20 67 53 65 61 | 72 63 68 42 75 66 66 65 |ext gSea|rchBuffe|
|00001450| 72 0d 0d 09 69 66 28 20 | 67 50 72 65 66 73 2e 73 |r...if( |gPrefs.s|
|00001460| 65 61 72 63 68 46 6f 72 | 77 61 72 64 20 29 0d 09 |earchFor|ward )..|
|00001470| 7b 0d 09 09 61 64 64 72 | 20 3d 20 64 57 69 6e 2d |{...addr| = dWin-|
|00001480| 3e 65 6e 64 53 65 6c 3b | 0d 09 09 61 64 64 72 32 |>endSel;|...addr2|
|00001490| 20 3d 20 64 57 69 6e 32 | 2d 3e 65 6e 64 53 65 6c | = dWin2|->endSel|
|000014a0| 3b 0d 09 7d 0d 09 65 6c | 73 65 0d 09 7b 0d 09 09 |;..}..el|se..{...|
|000014b0| 61 64 64 72 20 3d 20 64 | 57 69 6e 2d 3e 73 74 61 |addr = d|Win->sta|
|000014c0| 72 74 53 65 6c 20 2d 20 | 31 3b 0d 09 09 61 64 64 |rtSel - |1;...add|
|000014d0| 72 32 20 3d 20 64 57 69 | 6e 32 2d 3e 73 74 61 72 |r2 = dWi|n2->star|
|000014e0| 74 53 65 6c 20 2d 20 31 | 3b 0d 09 09 69 66 28 20 |tSel - 1|;...if( |
|000014f0| 61 64 64 72 20 3c 20 30 | 20 29 09 72 65 74 75 72 |addr < 0| ).retur|
|00001500| 6e 20 66 61 6c 73 65 3b | 0d 09 09 69 66 28 20 61 |n false;|...if( a|
|00001510| 64 64 72 32 20 3c 20 30 | 20 29 09 72 65 74 75 72 |ddr2 < 0| ).retur|
|00001520| 6e 20 66 61 6c 73 65 3b | 0d 09 7d 0d 09 0d 09 2f |n false;|..}..../|
|00001530| 2f 20 31 20 3d 20 62 79 | 74 65 2c 20 32 20 3d 20 |/ 1 = by|te, 2 = |
|00001540| 77 6f 72 64 73 2c 20 34 | 20 3d 20 6c 6f 6e 67 73 |words, 4| = longs|
|00001550| 2c 20 65 63 74 2e 2e 2e | 0d 09 6d 61 74 63 68 43 |, ect...|..matchC|
|00001560| 6e 74 3d 67 50 72 65 66 | 73 2e 73 65 61 72 63 68 |nt=gPref|s.search|
|00001570| 53 69 7a 65 2b 31 3b 0d | 09 69 66 28 20 67 50 72 |Size+1;.|.if( gPr|
|00001580| 65 66 73 2e 73 65 61 72 | 63 68 53 69 7a 65 3d 3d |efs.sear|chSize==|
|00001590| 43 4d 5f 4c 6f 6e 67 20 | 29 20 6d 61 74 63 68 43 |CM_Long |) matchC|
|000015a0| 6e 74 20 2b 3d 20 31 3b | 0d 0d 09 6d 61 74 63 68 |nt += 1;|...match|
|000015b0| 49 64 78 20 3d 20 30 3b | 0d 09 77 68 69 6c 65 20 |Idx = 0;|..while |
|000015c0| 28 20 21 43 68 65 63 6b | 46 6f 72 41 62 6f 72 74 |( !Check|ForAbort|
|000015d0| 28 29 20 29 09 09 2f 2f | 20 4c 52 3a 20 31 2e 37 |() )..//| LR: 1.7|
|000015e0| 20 2d 2d 20 61 6c 6c 6f | 77 20 61 62 6f 72 74 69 | -- allo|w aborti|
|000015f0| 6e 67 20 63 6f 6d 70 61 | 72 65 73 21 0d 09 7b 0d |ng compa|res!..{.|
|00001600| 09 09 63 68 20 3d 20 47 | 65 74 42 79 74 65 28 20 |..ch = G|etByte( |
|00001610| 64 57 69 6e 2c 20 61 64 | 64 72 20 29 3b 0d 09 09 |dWin, ad|dr );...|
|00001620| 63 68 32 20 3d 20 47 65 | 74 42 79 74 65 28 20 64 |ch2 = Ge|tByte( d|
|00001630| 57 69 6e 32 2c 20 61 64 | 64 72 32 20 29 3b 0d 09 |Win2, ad|dr2 );..|
|00001640| 09 69 66 28 20 63 68 20 | 3d 3d 20 63 68 32 20 29 |.if( ch |== ch2 )|
|00001650| 0d 09 09 7b 0d 09 09 09 | 69 66 28 20 6d 61 74 63 |...{....|if( matc|
|00001660| 68 49 64 78 20 3d 3d 20 | 30 20 29 20 6d 61 74 63 |hIdx == |0 ) matc|
|00001670| 68 41 64 64 72 20 3d 20 | 61 64 64 72 3b 0d 09 09 |hAddr = |addr;...|
|00001680| 09 2b 2b 6d 61 74 63 68 | 49 64 78 3b 0d 09 09 09 |.++match|Idx;....|
|00001690| 69 66 28 20 6d 61 74 63 | 68 49 64 78 20 3e 3d 20 |if( matc|hIdx >= |
|000016a0| 6d 61 74 63 68 43 6e 74 | 20 29 0d 09 09 09 09 67 |matchCnt| ).....g|
|000016b0| 6f 74 6f 20 53 75 63 63 | 65 73 73 3b 0d 09 09 09 |oto Succ|ess;....|
|000016c0| 2b 2b 61 64 64 72 3b 0d | 09 09 09 2b 2b 61 64 64 |++addr;.|...++add|
|000016d0| 72 32 3b 0d 09 09 09 69 | 66 28 20 61 64 64 72 20 |r2;....i|f( addr |
|000016e0| 3d 3d 20 64 57 69 6e 2d | 3e 66 69 6c 65 53 69 7a |== dWin-|>fileSiz|
|000016f0| 65 20 29 0d 09 09 09 7b | 0d 09 09 09 09 6d 61 74 |e )....{|.....mat|
|00001700| 63 68 49 64 78 20 3d 20 | 30 3b 0d 09 09 09 09 61 |chIdx = |0;.....a|
|00001710| 64 64 72 20 3d 20 6d 61 | 74 63 68 41 64 64 72 3b |ddr = ma|tchAddr;|
|00001720| 0d 09 09 09 7d 0d 09 09 | 09 65 6c 73 65 0d 09 09 |....}...|.else...|
|00001730| 09 09 63 6f 6e 74 69 6e | 75 65 3b 0d 09 09 7d 0d |..contin|ue;...}.|
|00001740| 09 09 65 6c 73 65 0d 09 | 09 7b 0d 09 09 09 69 66 |..else..|.{....if|
|00001750| 28 20 6d 61 74 63 68 49 | 64 78 20 29 20 7b 0d 09 |( matchI|dx ) {..|
|00001760| 09 09 09 6d 61 74 63 68 | 49 64 78 20 3d 20 30 3b |...match|Idx = 0;|
|00001770| 0d 09 09 09 09 61 64 64 | 72 20 3d 20 6d 61 74 63 |.....add|r = matc|
|00001780| 68 41 64 64 72 3b 0d 09 | 09 09 7d 0d 09 09 7d 0d |hAddr;..|..}...}.|
|00001790| 09 09 69 66 28 20 67 50 | 72 65 66 73 2e 73 65 61 |..if( gP|refs.sea|
|000017a0| 72 63 68 46 6f 72 77 61 | 72 64 20 29 0d 09 09 7b |rchForwa|rd )...{|
|000017b0| 0d 09 09 09 2b 2b 61 64 | 64 72 3b 0d 09 09 09 2b |....++ad|dr;....+|
|000017c0| 2b 61 64 64 72 32 3b 0d | 09 09 09 69 66 28 20 61 |+addr2;.|...if( a|
|000017d0| 64 64 72 32 20 3d 3d 20 | 64 57 69 6e 32 2d 3e 66 |ddr2 == |dWin2->f|
|000017e0| 69 6c 65 53 69 7a 65 20 | 29 0d 09 09 09 09 67 6f |ileSize |).....go|
|000017f0| 74 6f 20 46 61 69 6c 75 | 72 65 3b 0d 09 09 09 69 |to Failu|re;....i|
|00001800| 66 28 20 61 64 64 72 20 | 3d 3d 20 64 57 69 6e 2d |f( addr |== dWin-|
|00001810| 3e 66 69 6c 65 53 69 7a | 65 20 29 0d 09 09 09 09 |>fileSiz|e ).....|
|00001820| 67 6f 74 6f 20 46 61 69 | 6c 75 72 65 3b 0d 09 09 |goto Fai|lure;...|
|00001830| 7d 0d 09 09 65 6c 73 65 | 0d 09 09 7b 0d 09 09 09 |}...else|...{....|
|00001840| 2d 2d 61 64 64 72 3b 0d | 09 09 09 2d 2d 61 64 64 |--addr;.|...--add|
|00001850| 72 32 3b 0d 09 09 09 69 | 66 28 20 61 64 64 72 20 |r2;....i|f( addr |
|00001860| 3c 20 30 20 29 0d 09 09 | 09 09 67 6f 74 6f 20 46 |< 0 )...|..goto F|
|00001870| 61 69 6c 75 72 65 3b 0d | 09 09 09 69 66 28 20 61 |ailure;.|...if( a|
|00001880| 64 64 72 32 20 3c 20 30 | 20 29 0d 09 09 09 09 67 |ddr2 < 0| ).....g|
|00001890| 6f 74 6f 20 46 61 69 6c | 75 72 65 3b 0d 09 09 7d |oto Fail|ure;...}|
|000018a0| 0d 09 7d 0d 0d 46 61 69 | 6c 75 72 65 3a 0d 09 53 |..}..Fai|lure:..S|
|000018b0| 79 73 42 65 65 70 28 20 | 31 20 29 3b 0d 09 4d 79 |ysBeep( |1 );..My|
|000018c0| 53 65 74 43 75 72 73 6f | 72 28 20 43 5f 41 72 72 |SetCurso|r( C_Arr|
|000018d0| 6f 77 20 29 3b 0d 09 72 | 65 74 75 72 6e 20 66 61 |ow );..r|eturn fa|
|000018e0| 6c 73 65 3b 0d 0d 53 75 | 63 63 65 73 73 3a 0d 09 |lse;..Su|ccess:..|
|000018f0| 53 65 6c 65 63 74 57 69 | 6e 64 6f 77 28 20 64 57 |SelectWi|ndow( dW|
|00001900| 69 6e 2d 3e 6f 57 69 6e | 2e 74 68 65 57 69 6e 20 |in->oWin|.theWin |
|00001910| 29 3b 0d 09 64 57 69 6e | 2d 3e 73 74 61 72 74 53 |);..dWin|->startS|
|00001920| 65 6c 20 3d 20 6d 61 74 | 63 68 41 64 64 72 3b 0d |el = mat|chAddr;.|
|00001930| 09 64 57 69 6e 2d 3e 65 | 6e 64 53 65 6c 20 3d 20 |.dWin->e|ndSel = |
|00001940| 64 57 69 6e 2d 3e 73 74 | 61 72 74 53 65 6c 20 2b |dWin->st|artSel +|
|00001950| 20 67 50 72 65 66 73 2e | 73 65 61 72 63 68 53 69 | gPrefs.|searchSi|
|00001960| 7a 65 20 2b 20 31 3b 0d | 09 69 66 28 20 67 50 72 |ze + 1;.|.if( gPr|
|00001970| 65 66 73 2e 73 65 61 72 | 63 68 53 69 7a 65 3d 3d |efs.sear|chSize==|
|00001980| 43 4d 5f 4c 6f 6e 67 20 | 29 20 64 57 69 6e 2d 3e |CM_Long |) dWin->|
|00001990| 65 6e 64 53 65 6c 20 2b | 3d 20 31 3b 0d 09 53 63 |endSel +|= 1;..Sc|
|000019a0| 72 6f 6c 6c 54 6f 53 65 | 6c 65 63 74 69 6f 6e 28 |rollToSe|lection(|
|000019b0| 20 64 57 69 6e 2c 20 64 | 57 69 6e 2d 3e 73 74 61 | dWin, d|Win->sta|
|000019c0| 72 74 53 65 6c 2c 20 74 | 72 75 65 20 29 3b 0d 0d |rtSel, t|rue );..|
|000019d0| 09 53 65 6c 65 63 74 57 | 69 6e 64 6f 77 28 20 64 |.SelectW|indow( d|
|000019e0| 57 69 6e 32 2d 3e 6f 57 | 69 6e 2e 74 68 65 57 69 |Win2->oW|in.theWi|
|000019f0| 6e 20 29 3b 0d 09 64 57 | 69 6e 32 2d 3e 73 74 61 |n );..dW|in2->sta|
|00001a00| 72 74 53 65 6c 20 3d 20 | 6d 61 74 63 68 41 64 64 |rtSel = |matchAdd|
|00001a10| 72 3b 0d 09 64 57 69 6e | 32 2d 3e 65 6e 64 53 65 |r;..dWin|2->endSe|
|00001a20| 6c 20 3d 20 64 57 69 6e | 32 2d 3e 73 74 61 72 74 |l = dWin|2->start|
|00001a30| 53 65 6c 20 2b 20 67 50 | 72 65 66 73 2e 73 65 61 |Sel + gP|refs.sea|
|00001a40| 72 63 68 53 69 7a 65 20 | 2b 20 31 3b 0d 09 69 66 |rchSize |+ 1;..if|
|00001a50| 28 20 67 50 72 65 66 73 | 2e 73 65 61 72 63 68 53 |( gPrefs|.searchS|
|00001a60| 69 7a 65 3d 3d 43 4d 5f | 4c 6f 6e 67 20 29 20 64 |ize==CM_|Long ) d|
|00001a70| 57 69 6e 32 2d 3e 65 6e | 64 53 65 6c 20 2b 3d 20 |Win2->en|dSel += |
|00001a80| 31 3b 0d 09 53 63 72 6f | 6c 6c 54 6f 53 65 6c 65 |1;..Scro|llToSele|
|00001a90| 63 74 69 6f 6e 28 20 64 | 57 69 6e 32 2c 20 64 57 |ction( d|Win2, dW|
|00001aa0| 69 6e 32 2d 3e 73 74 61 | 72 74 53 65 6c 2c 20 74 |in2->sta|rtSel, t|
|00001ab0| 72 75 65 20 29 3b 0d 0d | 09 4d 79 53 65 74 43 75 |rue );..|.MySetCu|
|00001ac0| 72 73 6f 72 28 20 43 5f | 41 72 72 6f 77 20 29 3b |rsor( C_|Arrow );|
|00001ad0| 0d 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 7d |..return| true;.}|
|00001ae0| 0d 2a 2f 0d 0d 2f 2a 2a | 2a 20 44 4f 20 43 4f 4d |.*/../**|* DO COM|
|00001af0| 50 41 52 49 53 4f 4e 20 | 2a 2a 2a 2f 0d 76 6f 69 |PARISON |***/.voi|
|00001b00| 64 20 44 6f 43 6f 6d 70 | 61 72 69 73 6f 6e 28 20 |d DoComp|arison( |
|00001b10| 76 6f 69 64 20 29 0d 7b | 0d 09 47 72 61 66 50 74 |void ).{|..GrafPt|
|00001b20| 72 09 09 6f 6c 64 50 6f | 72 74 3b 0d 09 0d 09 57 |r..oldPo|rt;....W|
|00001b30| 69 6e 64 6f 77 52 65 66 | 09 74 68 65 57 69 6e 3b |indowRef|.theWin;|
|00001b40| 0d 09 0d 09 44 69 61 6c | 6f 67 50 74 72 09 70 44 |....Dial|ogPtr.pD|
|00001b50| 6c 67 3b 0d 2f 2f 20 4c | 52 3a 20 76 31 2e 36 2e |lg;.// L|R: v1.6.|
|00001b60| 35 09 48 61 6e 64 6c 65 | 20 09 09 69 48 61 6e 64 |5.Handle| ..iHand|
|00001b70| 6c 65 3b 0d 2f 2f 20 4c | 52 3a 20 76 31 2e 36 2e |le;.// L|R: v1.6.|
|00001b80| 35 09 52 65 63 74 20 09 | 09 69 52 65 63 74 3b 0d |5.Rect .|.iRect;.|
|00001b90| 09 73 68 6f 72 74 20 69 | 54 79 70 65 2c 20 6f 6c |.short i|Type, ol|
|00001ba0| 64 44 69 72 20 3d 20 67 | 50 72 65 66 73 2e 73 65 |dDir = g|Prefs.se|
|00001bb0| 61 72 63 68 46 6f 72 77 | 61 72 64 3b 0d 09 45 76 |archForw|ard;..Ev|
|00001bc0| 65 6e 74 52 65 63 6f 72 | 64 09 74 68 65 45 76 65 |entRecor|d.theEve|
|00001bd0| 6e 74 3b 0d 0d 09 2f 2f | 20 70 75 74 20 75 70 20 |nt;...//| put up |
|00001be0| 64 69 61 6c 6f 67 20 61 | 6e 64 20 6c 65 74 20 75 |dialog a|nd let u|
|00001bf0| 73 65 72 20 73 68 6f 72 | 74 65 72 61 63 74 0d 0d |ser shor|teract..|
|00001c00| 09 47 65 74 50 6f 72 74 | 28 20 26 6f 6c 64 50 6f |.GetPort|( &oldPo|
|00001c10| 72 74 20 29 3b 0d 0d 09 | 70 44 6c 67 20 3d 20 47 |rt );...|pDlg = G|
|00001c20| 65 74 4e 65 77 44 69 61 | 6c 6f 67 20 28 20 64 6c |etNewDia|log ( dl|
|00001c30| 67 43 6f 6d 70 61 72 65 | 2c 20 30 4c 2c 20 6b 46 |gCompare|, 0L, kF|
|00001c40| 69 72 73 74 57 69 6e 64 | 6f 77 4f 66 43 6c 61 73 |irstWind|owOfClas|
|00001c50| 73 20 29 3b 0d 0d 09 4d | 6f 76 65 57 69 6e 64 6f |s );...M|oveWindo|
|00001c60| 77 28 20 47 65 74 44 69 | 61 6c 6f 67 57 69 6e 64 |w( GetDi|alogWind|
|00001c70| 6f 77 28 20 70 44 6c 67 | 20 29 2c 20 32 32 2c 20 |ow( pDlg| ), 22, |
|00001c80| 67 2e 6d 61 78 48 65 69 | 67 68 74 20 2d 36 34 20 |g.maxHei|ght -64 |
|00001c90| 2b 38 2c 20 74 72 75 65 | 20 29 3b 0d 2f 2f 4c 52 |+8, true| );.//LR|
|00001ca0| 20 31 2e 37 33 09 53 65 | 74 50 6f 72 74 28 20 28 | 1.73.Se|tPort( (|
|00001cb0| 47 72 61 66 50 74 72 29 | 47 65 74 44 69 61 6c 6f |GrafPtr)|GetDialo|
|00001cc0| 67 50 6f 72 74 28 20 70 | 44 6c 67 20 29 20 29 3b |gPort( p|Dlg ) );|
|00001cd0| 0d 09 53 65 74 50 6f 72 | 74 44 69 61 6c 6f 67 50 |..SetPor|tDialogP|
|00001ce0| 6f 72 74 28 20 70 44 6c | 67 20 29 3b 0d 0d 09 53 |ort( pDl|g );...S|
|00001cf0| 65 74 44 69 61 6c 6f 67 | 44 65 66 61 75 6c 74 49 |etDialog|DefaultI|
|00001d00| 74 65 6d 28 20 70 44 6c | 67 2c 20 31 20 29 3b 09 |tem( pDl|g, 1 );.|
|00001d10| 2f 2f 20 4c 52 3a 20 76 | 31 2e 36 2e 35 20 4c 52 |// LR: v|1.6.5 LR|
|00001d20| 20 2d 2d 20 63 6f 72 72 | 65 63 74 20 77 61 79 20 | -- corr|ect way |
|00001d30| 6f 66 20 73 68 6f 77 69 | 6e 67 20 64 65 66 61 75 |of showi|ng defau|
|00001d40| 6c 74 20 62 75 74 74 6f | 6e 0d 2f 2a 0d 09 47 65 |lt butto|n./*..Ge|
|00001d50| 74 44 69 61 6c 6f 67 49 | 74 65 6d 20 28 20 70 44 |tDialogI|tem ( pD|
|00001d60| 6c 67 2c 20 31 2c 20 26 | 69 54 79 70 65 2c 20 26 |lg, 1, &|iType, &|
|00001d70| 69 48 61 6e 64 6c 65 2c | 20 26 69 52 65 63 74 20 |iHandle,| &iRect |
|00001d80| 29 3b 09 2f 2f 20 72 69 | 6e 67 20 61 72 6f 75 6e |);.// ri|ng aroun|
|00001d90| 64 20 4f 4b 0d 09 50 65 | 6e 53 69 7a 65 28 20 33 |d OK..Pe|nSize( 3|
|00001da0| 2c 20 33 20 29 3b 0d 09 | 49 6e 73 65 74 52 65 63 |, 3 );..|InsetRec|
|00001db0| 74 28 20 26 69 52 65 63 | 74 2c 20 2d 34 2c 20 2d |t( &iRec|t, -4, -|
|00001dc0| 34 20 29 3b 0d 09 46 72 | 61 6d 65 52 6f 75 6e 64 |4 );..Fr|ameRound|
|00001dd0| 52 65 63 74 28 20 26 69 | 52 65 63 74 2c 20 31 36 |Rect( &i|Rect, 16|
|00001de0| 2c 20 31 36 20 29 3b 0d | 2a 2f 0d 2f 2f 4c 52 20 |, 16 );.|*/.//LR |
|00001df0| 31 38 30 09 44 72 61 77 | 50 61 67 65 28 20 28 45 |180.Draw|Page( (E|
|00001e00| 64 69 74 57 69 6e 64 6f | 77 50 74 72 29 20 47 65 |ditWindo|wPtr) Ge|
|00001e10| 74 57 52 65 66 43 6f 6e | 28 20 43 6f 6d 70 57 69 |tWRefCon|( CompWi|
|00001e20| 6e 64 31 20 29 20 29 3b | 0d 09 55 70 64 61 74 65 |nd1 ) );|..Update|
|00001e30| 4f 6e 73 63 72 65 65 6e | 28 20 43 6f 6d 70 57 69 |Onscreen|( CompWi|
|00001e40| 6e 64 31 20 29 3b 0d 2f | 2f 4c 52 20 31 38 30 09 |nd1 );./|/LR 180.|
|00001e50| 44 72 61 77 50 61 67 65 | 28 20 28 45 64 69 74 57 |DrawPage|( (EditW|
|00001e60| 69 6e 64 6f 77 50 74 72 | 29 20 47 65 74 57 52 65 |indowPtr|) GetWRe|
|00001e70| 66 43 6f 6e 28 20 43 6f | 6d 70 57 69 6e 64 32 20 |fCon( Co|mpWind2 |
|00001e80| 29 20 29 3b 0d 09 55 70 | 64 61 74 65 4f 6e 73 63 |) );..Up|dateOnsc|
|00001e90| 72 65 65 6e 28 20 43 6f | 6d 70 57 69 6e 64 32 20 |reen( Co|mpWind2 |
|00001ea0| 29 3b 0d 09 09 09 0d 09 | 2f 2f 20 73 68 6f 77 20 |);......|// show |
|00001eb0| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00001ec0| 74 68 65 20 77 69 6e 64 | 6f 77 73 0d 09 53 68 6f |the wind|ows..Sho|
|00001ed0| 77 57 69 6e 64 6f 77 28 | 20 47 65 74 44 69 61 6c |wWindow(| GetDial|
|00001ee0| 6f 67 57 69 6e 64 6f 77 | 28 20 70 44 6c 67 20 29 |ogWindow|( pDlg )|
|00001ef0| 20 29 3b 0d 09 44 72 61 | 77 44 69 61 6c 6f 67 28 | );..Dra|wDialog(|
|00001f00| 20 70 44 6c 67 20 29 3b | 0d 0d 09 2f 2f 20 68 61 | pDlg );|...// ha|
|00001f10| 6e 64 6c 65 20 65 76 65 | 6e 74 20 70 72 6f 63 65 |ndle eve|nt proce|
|00001f20| 73 73 69 6e 67 0d 09 64 | 6f 0d 09 7b 0d 09 09 74 |ssing..d|o..{...t|
|00001f30| 68 65 57 69 6e 20 3d 20 | 4e 55 4c 4c 3b 0d 09 09 |heWin = |NULL;...|
|00001f40| 57 61 69 74 4e 65 78 74 | 45 76 65 6e 74 28 20 65 |WaitNext|Event( e|
|00001f50| 76 65 72 79 45 76 65 6e | 74 2c 20 26 74 68 65 45 |veryEven|t, &theE|
|00001f60| 76 65 6e 74 2c 20 31 30 | 4c 2c 20 4e 55 4c 4c 20 |vent, 10|L, NULL |
|00001f70| 29 3b 0d 0d 09 09 69 66 | 28 20 21 43 6f 6d 70 57 |);....if|( !CompW|
|00001f80| 69 6e 64 31 20 7c 7c 20 | 21 43 6f 6d 70 57 69 6e |ind1 || |!CompWin|
|00001f90| 64 32 20 29 09 2f 2f 31 | 2e 37 33 20 4c 52 20 3a |d2 ).//1|.73 LR :|
|00001fa0| 65 78 69 74 20 69 66 20 | 75 73 65 72 20 63 6c 6f |exit if |user clo|
|00001fb0| 73 65 73 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 77 |ses one |of the w|
|00001fc0| 69 6e 64 6f 77 73 21 0d | 09 09 09 69 54 79 70 65 |indows!.|...iType|
|00001fd0| 20 3d 20 34 3b 0d 09 09 | 65 6c 73 65 0d 09 09 09 | = 4;...|else....|
|00001fe0| 69 54 79 70 65 20 3d 20 | 30 3b 0d 0d 09 09 2f 2f |iType = |0;....//|
|00001ff0| 20 49 66 20 74 68 65 20 | 63 6c 69 63 6b 20 69 73 | If the |click is|
|00002000| 20 69 6e 20 74 68 65 20 | 64 69 61 6c 6f 67 20 77 | in the |dialog w|
|00002010| 69 6e 64 6f 77 2c 20 6d | 61 6b 65 20 73 75 72 65 |indow, m|ake sure|
|00002020| 20 69 74 20 61 6c 77 61 | 79 73 20 70 72 6f 63 65 | it alwa|ys proce|
|00002030| 73 73 65 73 20 74 68 65 | 20 63 6c 69 63 6b 2c 20 |sses the| click, |
|00002040| 72 65 67 61 72 64 6c 65 | 73 73 0d 09 09 2f 2f 20 |regardle|ss...// |
|00002050| 6f 66 20 77 68 65 74 68 | 65 72 20 69 74 20 69 73 |of wheth|er it is|
|00002060| 20 6f 6e 20 74 6f 70 20 | 6f 72 20 6e 6f 74 2e 2d | on top |or not.-|
|00002070| 2d 4e 50 4a 72 2e 0d 09 | 09 69 66 28 20 74 68 65 |-NPJr...|.if( the|
|00002080| 45 76 65 6e 74 2e 77 68 | 61 74 20 3d 3d 20 6d 6f |Event.wh|at == mo|
|00002090| 75 73 65 44 6f 77 6e 20 | 29 0d 09 09 09 46 69 6e |useDown |)....Fin|
|000020a0| 64 57 69 6e 64 6f 77 28 | 20 74 68 65 45 76 65 6e |dWindow(| theEven|
|000020b0| 74 2e 77 68 65 72 65 2c | 20 26 74 68 65 57 69 6e |t.where,| &theWin|
|000020c0| 20 29 3b 0d 09 09 0d 09 | 09 69 66 20 28 20 47 65 | );.....|.if ( Ge|
|000020d0| 74 44 69 61 6c 6f 67 57 | 69 6e 64 6f 77 28 20 70 |tDialogW|indow( p|
|000020e0| 44 6c 67 20 29 20 3d 3d | 20 74 68 65 57 69 6e 20 |Dlg ) ==| theWin |
|000020f0| 7c 7c 20 49 73 44 69 61 | 6c 6f 67 45 76 65 6e 74 ||| IsDia|logEvent|
|00002100| 28 20 26 74 68 65 45 76 | 65 6e 74 20 29 20 29 0d |( &theEv|ent ) ).|
|00002110| 09 09 7b 0d 09 09 09 69 | 66 28 20 74 68 65 57 69 |..{....i|f( theWi|
|00002120| 6e 20 21 3d 20 46 72 6f | 6e 74 4e 6f 6e 46 6c 6f |n != Fro|ntNonFlo|
|00002130| 61 74 69 6e 67 57 69 6e | 64 6f 77 28 29 20 29 0d |atingWin|dow() ).|
|00002140| 09 09 09 09 53 65 6c 65 | 63 74 57 69 6e 64 6f 77 |....Sele|ctWindow|
|00002150| 28 20 74 68 65 57 69 6e | 20 29 3b 0d 09 09 09 0d |( theWin| );.....|
|00002160| 09 09 09 44 69 61 6c 6f | 67 53 65 6c 65 63 74 28 |...Dialo|gSelect(|
|00002170| 20 26 74 68 65 45 76 65 | 6e 74 2c 20 26 70 44 6c | &theEve|nt, &pDl|
|00002180| 67 2c 20 26 69 54 79 70 | 65 20 29 3b 0d 09 09 0d |g, &iTyp|e );....|
|00002190| 09 09 09 69 66 28 20 69 | 54 79 70 65 3d 3d 31 20 |...if( i|Type==1 |
|000021a0| 29 09 09 09 2f 2f 20 68 | 61 6e 64 6c 65 20 66 69 |)...// h|andle fi|
|000021b0| 6e 64 20 66 6f 72 77 61 | 72 64 20 68 65 72 65 0d |nd forwa|rd here.|
|000021c0| 09 09 09 7b 0d 09 09 09 | 09 67 50 72 65 66 73 2e |...{....|.gPrefs.|
|000021d0| 73 65 61 72 63 68 46 6f | 72 77 61 72 64 20 3d 20 |searchFo|rward = |
|000021e0| 74 72 75 65 3b 0d 09 09 | 09 09 50 65 72 66 6f 72 |true;...|..Perfor|
|000021f0| 6d 54 65 78 74 43 6f 6d | 70 61 72 65 28 20 28 45 |mTextCom|pare( (E|
|00002200| 64 69 74 57 69 6e 64 6f | 77 50 74 72 29 20 47 65 |ditWindo|wPtr) Ge|
|00002210| 74 57 52 65 66 43 6f 6e | 28 20 43 6f 6d 70 57 69 |tWRefCon|( CompWi|
|00002220| 6e 64 31 20 29 2c 20 28 | 45 64 69 74 57 69 6e 64 |nd1 ), (|EditWind|
|00002230| 6f 77 50 74 72 29 20 47 | 65 74 57 52 65 66 43 6f |owPtr) G|etWRefCo|
|00002240| 6e 28 20 43 6f 6d 70 57 | 69 6e 64 32 20 29 20 29 |n( CompW|ind2 ) )|
|00002250| 3b 0d 0d 2f 2a 31 38 35 | 09 09 09 09 69 66 28 20 |;../*185|....if( |
|00002260| 67 50 72 65 66 73 2e 73 | 65 61 72 63 68 54 79 70 |gPrefs.s|earchTyp|
|00002270| 65 20 3d 3d 20 43 4d 5f | 4d 61 74 63 68 20 29 0d |e == CM_|Match ).|
|00002280| 09 09 09 09 09 50 65 72 | 66 6f 72 6d 54 65 78 74 |.....Per|formText|
|00002290| 4d 61 74 63 68 43 6f 6d | 70 61 72 65 28 20 28 45 |MatchCom|pare( (E|
|000022a0| 64 69 74 57 69 6e 64 6f | 77 50 74 72 29 20 47 65 |ditWindo|wPtr) Ge|
|000022b0| 74 57 52 65 66 43 6f 6e | 28 20 43 6f 6d 70 57 69 |tWRefCon|( CompWi|
|000022c0| 6e 64 31 20 29 2c 20 28 | 45 64 69 74 57 69 6e 64 |nd1 ), (|EditWind|
|000022d0| 6f 77 50 74 72 29 20 47 | 65 74 57 52 65 66 43 6f |owPtr) G|etWRefCo|
|000022e0| 6e 28 20 43 6f 6d 70 57 | 69 6e 64 32 20 29 20 29 |n( CompW|ind2 ) )|
|000022f0| 3b 0d 09 09 09 09 65 6c | 73 65 0d 09 09 09 09 09 |;.....el|se......|
|00002300| 50 65 72 66 6f 72 6d 54 | 65 78 74 44 69 66 66 65 |PerformT|extDiffe|
|00002310| 72 65 6e 63 65 43 6f 6d | 70 61 72 65 28 20 28 45 |renceCom|pare( (E|
|00002320| 64 69 74 57 69 6e 64 6f | 77 50 74 72 29 20 47 65 |ditWindo|wPtr) Ge|
|00002330| 74 57 52 65 66 43 6f 6e | 28 20 43 6f 6d 70 57 69 |tWRefCon|( CompWi|
|00002340| 6e 64 31 20 29 2c 20 28 | 45 64 69 74 57 69 6e 64 |nd1 ), (|EditWind|
|00002350| 6f 77 50 74 72 29 20 47 | 65 74 57 52 65 66 43 6f |owPtr) G|etWRefCo|
|00002360| 6e 28 20 43 6f 6d 70 57 | 69 6e 64 32 20 29 20 29 |n( CompW|ind2 ) )|
|00002370| 3b 0d 2a 2f 0d 09 09 09 | 09 53 65 6c 65 63 74 57 |;.*/....|.SelectW|
|00002380| 69 6e 64 6f 77 28 20 28 | 57 69 6e 64 6f 77 52 65 |indow( (|WindowRe|
|00002390| 66 29 70 44 6c 67 20 29 | 3b 0d 09 09 09 7d 0d 09 |f)pDlg )|;....}..|
|000023a0| 09 09 69 66 28 20 69 54 | 79 70 65 3d 3d 33 20 29 |..if( iT|ype==3 )|
|000023b0| 09 09 09 2f 2f 20 68 61 | 6e 64 6c 65 20 66 69 6e |...// ha|ndle fin|
|000023c0| 64 20 62 61 63 6b 77 61 | 72 64 20 68 65 72 65 0d |d backwa|rd here.|
|000023d0| 09 09 09 7b 0d 09 09 09 | 09 67 50 72 65 66 73 2e |...{....|.gPrefs.|
|000023e0| 73 65 61 72 63 68 46 6f | 72 77 61 72 64 20 3d 20 |searchFo|rward = |
|000023f0| 66 61 6c 73 65 3b 0d 09 | 09 09 09 50 65 72 66 6f |false;..|...Perfo|
|00002400| 72 6d 54 65 78 74 43 6f | 6d 70 61 72 65 28 20 28 |rmTextCo|mpare( (|
|00002410| 45 64 69 74 57 69 6e 64 | 6f 77 50 74 72 29 20 47 |EditWind|owPtr) G|
|00002420| 65 74 57 52 65 66 43 6f | 6e 28 20 43 6f 6d 70 57 |etWRefCo|n( CompW|
|00002430| 69 6e 64 31 20 29 2c 20 | 28 45 64 69 74 57 69 6e |ind1 ), |(EditWin|
|00002440| 64 6f 77 50 74 72 29 20 | 47 65 74 57 52 65 66 43 |dowPtr) |GetWRefC|
|00002450| 6f 6e 28 20 43 6f 6d 70 | 57 69 6e 64 32 20 29 20 |on( Comp|Wind2 ) |
|00002460| 29 3b 0d 0d 2f 2a 31 38 | 35 09 09 09 09 69 66 28 |);../*18|5....if(|
|00002470| 20 67 50 72 65 66 73 2e | 73 65 61 72 63 68 54 79 | gPrefs.|searchTy|
|00002480| 70 65 20 3d 3d 20 43 4d | 5f 4d 61 74 63 68 20 29 |pe == CM|_Match )|
|00002490| 0d 09 09 09 09 09 50 65 | 72 66 6f 72 6d 54 65 78 |......Pe|rformTex|
|000024a0| 74 4d 61 74 63 68 43 6f | 6d 70 61 72 65 28 20 28 |tMatchCo|mpare( (|
|000024b0| 45 64 69 74 57 69 6e 64 | 6f 77 50 74 72 29 20 47 |EditWind|owPtr) G|
|000024c0| 65 74 57 52 65 66 43 6f | 6e 28 20 43 6f 6d 70 57 |etWRefCo|n( CompW|
|000024d0| 69 6e 64 31 20 29 2c 20 | 28 45 64 69 74 57 69 6e |ind1 ), |(EditWin|
|000024e0| 64 6f 77 50 74 72 29 20 | 47 65 74 57 52 65 66 43 |dowPtr) |GetWRefC|
|000024f0| 6f 6e 28 20 43 6f 6d 70 | 57 69 6e 64 32 20 29 20 |on( Comp|Wind2 ) |
|00002500| 29 3b 0d 09 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |);.....e|lse.....|
|00002510| 09 50 65 72 66 6f 72 6d | 54 65 78 74 44 69 66 66 |.Perform|TextDiff|
|00002520| 65 72 65 6e 63 65 43 6f | 6d 70 61 72 65 28 20 28 |erenceCo|mpare( (|
|00002530| 45 64 69 74 57 69 6e 64 | 6f 77 50 74 72 29 20 47 |EditWind|owPtr) G|
|00002540| 65 74 57 52 65 66 43 6f | 6e 28 20 43 6f 6d 70 57 |etWRefCo|n( CompW|
|00002550| 69 6e 64 31 20 29 2c 20 | 28 45 64 69 74 57 69 6e |ind1 ), |(EditWin|
|00002560| 64 6f 77 50 74 72 29 20 | 47 65 74 57 52 65 66 43 |dowPtr) |GetWRefC|
|00002570| 6f 6e 28 20 43 6f 6d 70 | 57 69 6e 64 32 20 29 20 |on( Comp|Wind2 ) |
|00002580| 29 3b 0d 2a 2f 0d 09 09 | 09 09 53 65 6c 65 63 74 |);.*/...|..Select|
|00002590| 57 69 6e 64 6f 77 28 20 | 28 57 69 6e 64 6f 77 52 |Window( |(WindowR|
|000025a0| 65 66 29 70 44 6c 67 20 | 29 3b 0d 09 09 09 7d 0d |ef)pDlg |);....}.|
|000025b0| 09 09 7d 0d 09 09 65 6c | 73 65 0d 09 09 09 44 6f |..}...el|se....Do|
|000025c0| 45 76 65 6e 74 28 20 26 | 74 68 65 45 76 65 6e 74 |Event( &|theEvent|
|000025d0| 20 29 3b 0d 0d 09 7d 20 | 77 68 69 6c 65 20 28 21 | );...} |while (!|
|000025e0| 67 2e 71 75 69 74 46 6c | 61 67 20 26 26 20 28 69 |g.quitFl|ag && (i|
|000025f0| 54 79 70 65 20 21 3d 20 | 32 29 20 26 26 20 28 69 |Type != |2) && (i|
|00002600| 54 79 70 65 20 21 3d 20 | 34 29 29 3b 09 2f 2f 20 |Type != |4));.// |
|00002610| 32 20 3d 20 44 6f 6e 65 | 2c 20 34 20 3d 20 44 72 |2 = Done|, 4 = Dr|
|00002620| 6f 70 20 6f 75 74 20 61 | 6e 64 20 65 64 69 74 0d |op out a|nd edit.|
|00002630| 09 09 09 0d 09 2f 2f 20 | 43 6c 6f 73 65 20 64 69 |.....// |Close di|
|00002640| 61 6c 6f 67 0d 09 44 69 | 73 70 6f 73 65 44 69 61 |alog..Di|sposeDia|
|00002650| 6c 6f 67 28 20 70 44 6c | 67 20 29 3b 0d 09 53 65 |log( pDl|g );..Se|
|00002660| 74 50 6f 72 74 28 20 6f | 6c 64 50 6f 72 74 20 29 |tPort( o|ldPort )|
|00002670| 3b 0d 0d 09 69 66 28 20 | 69 54 79 70 65 20 3d 3d |;...if( |iType ==|
|00002680| 20 32 20 29 0d 09 7b 0d | 09 09 69 66 28 20 43 6f | 2 )..{.|..if( Co|
|00002690| 6d 70 57 69 6e 64 31 20 | 26 26 20 21 20 57 65 46 |mpWind1 |&& ! WeF|
|000026a0| 6f 75 6e 64 57 69 6e 64 | 31 20 29 0d 09 09 09 43 |oundWind|1 )....C|
|000026b0| 6c 6f 73 65 45 64 69 74 | 57 69 6e 64 6f 77 28 20 |loseEdit|Window( |
|000026c0| 43 6f 6d 70 57 69 6e 64 | 31 20 29 3b 09 09 2f 2f |CompWind|1 );..//|
|000026d0| 20 63 6c 6f 73 65 20 77 | 69 6e 64 6f 77 73 20 28 | close w|indows (|
|000026e0| 31 2e 37 20 76 73 20 64 | 69 73 70 6f 73 69 6e 67 |1.7 vs d|isposing|
|000026f0| 20 74 68 65 6d 21 29 20 | 69 66 20 64 6f 6e 65 20 | them!) |if done |
|00002700| 28 20 69 65 2c 20 6e 6f | 74 20 65 64 69 74 69 6e |( ie, no|t editin|
|00002710| 67 20 29 0d 09 09 69 66 | 28 20 43 6f 6d 70 57 69 |g )...if|( CompWi|
|00002720| 6e 64 32 20 26 26 20 21 | 20 57 65 46 6f 75 6e 64 |nd2 && !| WeFound|
|00002730| 57 69 6e 64 32 20 29 0d | 09 09 09 43 6c 6f 73 65 |Wind2 ).|...Close|
|00002740| 45 64 69 74 57 69 6e 64 | 6f 77 28 20 43 6f 6d 70 |EditWind|ow( Comp|
|00002750| 57 69 6e 64 32 20 29 3b | 0d 09 7d 0d 0d 09 43 6f |Wind2 );|..}...Co|
|00002760| 6d 70 57 69 6e 64 31 20 | 3d 20 43 6f 6d 70 57 69 |mpWind1 |= CompWi|
|00002770| 6e 64 32 20 3d 20 4e 55 | 4c 4c 3b 0d 09 57 65 46 |nd2 = NU|LL;..WeF|
|00002780| 6f 75 6e 64 57 69 6e 64 | 31 20 3d 20 57 65 46 6f |oundWind|1 = WeFo|
|00002790| 75 6e 64 57 69 6e 64 32 | 20 3d 20 66 61 6c 73 65 |undWind2| = false|
|000027a0| 3b 0d 09 67 50 72 65 66 | 73 2e 73 65 61 72 63 68 |;..gPref|s.search|
|000027b0| 46 6f 72 77 61 72 64 20 | 3d 20 6f 6c 64 44 69 72 |Forward |= oldDir|
|000027c0| 3b 0d 7d 0d 0d 2f 2a 2a | 2a 2a 20 47 45 54 20 43 |;.}../**|** GET C|
|000027d0| 4f 4d 50 41 52 45 20 46 | 49 4c 45 53 20 2a 2a 2a |OMPARE F|ILES ***|
|000027e0| 2f 0d 2f 2f 4c 52 20 31 | 38 30 20 2d 2d 20 70 61 |/.//LR 1|80 -- pa|
|000027f0| 73 73 20 69 6e 20 6d 6f | 64 69 66 69 65 72 73 20 |ss in mo|difiers |
|00002800| 73 6f 20 77 65 20 63 61 | 6e 20 73 65 65 20 69 66 |so we ca|n see if|
|00002810| 20 77 65 20 77 61 6e 74 | 20 74 6f 20 66 6f 72 63 | we want| to forc|
|00002820| 65 20 66 69 6c 65 20 73 | 65 6c 65 63 74 69 6f 6e |e file s|election|
|00002830| 20 64 69 61 6c 6f 67 73 | 0d 0d 42 6f 6f 6c 65 61 | dialogs|..Boolea|
|00002840| 6e 20 47 65 74 43 6f 6d | 70 61 72 65 46 69 6c 65 |n GetCom|pareFile|
|00002850| 73 28 20 73 68 6f 72 74 | 20 6d 6f 64 69 66 69 65 |s( short| modifie|
|00002860| 72 73 20 29 0d 7b 0d 2f | 2f 09 6d 61 69 6e 20 68 |rs ).{./|/.main h|
|00002870| 61 6e 64 6c 65 72 20 66 | 6f 72 20 74 68 65 20 63 |andler f|or the c|
|00002880| 6f 6d 70 61 72 65 20 6f | 66 20 74 68 65 20 63 6f |ompare o|f the co|
|00002890| 6e 74 65 6e 74 73 20 6f | 66 20 74 77 6f 20 77 69 |ntents o|f two wi|
|000028a0| 6e 64 6f 77 73 0d 2f 2f | 4c 52 20 31 38 30 09 73 |ndows.//|LR 180.s|
|000028b0| 68 6f 72 74 20 09 09 69 | 54 79 70 65 3b 0d 09 45 |hort ..i|Type;..E|
|000028c0| 64 69 74 57 69 6e 64 6f | 77 50 74 72 20 65 77 31 |ditWindo|wPtr ew1|
|000028d0| 2c 20 65 77 32 3b 0d 0d | 09 2f 2f 20 63 6c 6f 73 |, ew2;..|.// clos|
|000028e0| 65 20 70 72 65 76 69 6f | 75 73 20 66 69 6c 65 20 |e previo|us file |
|000028f0| 63 6f 6d 70 61 72 65 20 | 77 69 6e 64 6f 77 73 20 |compare |windows |
|00002900| 69 66 20 6f 70 65 6e 0d | 0d 09 2f 2f 20 4e 50 20 |if open.|..// NP |
|00002910| 31 37 37 20 2d 2d 20 69 | 66 20 77 69 6e 64 6f 77 |177 -- i|f window|
|00002920| 73 20 61 72 65 20 6f 70 | 65 6e 20 75 73 65 20 74 |s are op|en use t|
|00002930| 68 65 6d 20 69 6e 73 74 | 65 61 64 20 6f 66 20 61 |hem inst|ead of a|
|00002940| 73 6b 69 6e 67 2e 0d 09 | 2f 2f 20 4c 52 20 31 38 |sking...|// LR 18|
|00002950| 30 20 2d 2d 20 69 66 20 | 27 4f 70 74 69 6f 6e 27 |0 -- if |'Option'|
|00002960| 20 70 72 65 73 73 65 64 | 20 74 68 65 6e 20 77 65 | pressed| then we|
|00002970| 20 64 6f 20 69 74 20 74 | 68 65 20 6f 6c 64 2d 66 | do it t|he old-f|
|00002980| 61 73 68 69 6f 6e 20 77 | 61 79 20 3a 29 0d 0d 09 |ashion w|ay :)...|
|00002990| 69 66 28 20 6d 6f 64 69 | 66 69 65 72 73 20 26 20 |if( modi|fiers & |
|000029a0| 6f 70 74 69 6f 6e 4b 65 | 79 20 29 0d 09 7b 09 0d |optionKe|y )..{..|
|000029b0| 09 09 69 66 28 20 43 6f | 6d 70 57 69 6e 64 31 20 |..if( Co|mpWind1 |
|000029c0| 29 09 44 69 73 70 6f 73 | 65 45 64 69 74 57 69 6e |).Dispos|eEditWin|
|000029d0| 64 6f 77 28 20 43 6f 6d | 70 57 69 6e 64 31 20 29 |dow( Com|pWind1 )|
|000029e0| 3b 0d 09 09 69 66 28 20 | 43 6f 6d 70 57 69 6e 64 |;...if( |CompWind|
|000029f0| 32 20 29 09 44 69 73 70 | 6f 73 65 45 64 69 74 57 |2 ).Disp|oseEditW|
|00002a00| 69 6e 64 6f 77 28 20 43 | 6f 6d 70 57 69 6e 64 32 |indow( C|ompWind2|
|00002a10| 20 29 3b 0d 09 7d 0d 09 | 65 6c 73 65 09 2f 2f 20 | );..}..|else.// |
|00002a20| 4e 50 20 31 37 37 20 2d | 2d 20 53 65 65 20 69 66 |NP 177 -|- See if|
|00002a30| 20 74 68 65 72 65 20 61 | 72 65 20 77 69 6e 64 6f | there a|re windo|
|00002a40| 77 73 20 77 65 20 63 61 | 6e 20 75 73 65 20 61 6c |ws we ca|n use al|
|00002a50| 72 65 61 64 79 2e 20 52 | 65 61 72 72 61 6e 67 65 |ready. R|earrange|
|00002a60| 20 74 68 65 6d 20 66 6f | 72 20 64 6f 69 6e 67 20 | them fo|r doing |
|00002a70| 74 68 65 20 63 6f 6d 70 | 61 72 69 73 6f 6e 2e 0d |the comp|arison..|
|00002a80| 09 7b 0d 09 09 43 6f 6d | 70 57 69 6e 64 31 20 3d |.{...Com|pWind1 =|
|00002a90| 20 43 6f 6d 70 57 69 6e | 64 32 20 3d 20 4e 55 4c | CompWin|d2 = NUL|
|00002aa0| 4c 3b 0d 09 09 57 65 46 | 6f 75 6e 64 57 69 6e 64 |L;...WeF|oundWind|
|00002ab0| 31 20 3d 20 57 65 46 6f | 75 6e 64 57 69 6e 64 32 |1 = WeFo|undWind2|
|00002ac0| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 09 0d 09 09 65 | = false|;......e|
|00002ad0| 77 31 20 3d 20 46 69 6e | 64 46 69 72 73 74 45 64 |w1 = Fin|dFirstEd|
|00002ae0| 69 74 57 69 6e 64 6f 77 | 28 29 3b 09 09 09 2f 2f |itWindow|();...//|
|00002af0| 20 6c 6f 6f 6b 20 66 6f | 72 20 31 73 74 20 77 69 | look fo|r 1st wi|
|00002b00| 6e 64 6f 77 0d 09 09 69 | 66 28 20 65 77 31 20 29 |ndow...i|f( ew1 )|
|00002b10| 0d 09 09 7b 0d 09 09 09 | 43 6f 6d 70 57 69 6e 64 |...{....|CompWind|
|00002b20| 31 20 3d 20 65 77 31 2d | 3e 6f 57 69 6e 2e 74 68 |1 = ew1-|>oWin.th|
|00002b30| 65 57 69 6e 3b 0d 09 09 | 09 57 65 46 6f 75 6e 64 |eWin;...|.WeFound|
|00002b40| 57 69 6e 64 31 20 3d 20 | 74 72 75 65 3b 09 09 09 |Wind1 = |true;...|
|00002b50| 09 2f 2f 20 57 65 20 66 | 6f 75 6e 64 20 69 74 2c |.// We f|ound it,|
|00002b60| 20 77 65 20 73 68 6f 75 | 6c 64 6e 27 74 20 64 65 | we shou|ldn't de|
|00002b70| 73 74 72 6f 79 20 69 74 | 2e 0d 09 09 09 53 69 7a |stroy it|.....Siz|
|00002b80| 65 45 64 69 74 57 69 6e | 64 6f 77 28 20 43 6f 6d |eEditWin|dow( Com|
|00002b90| 70 57 69 6e 64 31 2c 20 | 6b 57 69 6e 64 6f 77 43 |pWind1, |kWindowC|
|00002ba0| 6f 6d 70 61 72 65 54 6f | 70 20 29 3b 0d 0d 09 09 |ompareTo|p );....|
|00002bb0| 09 65 77 32 20 3d 20 46 | 69 6e 64 4e 65 78 74 45 |.ew2 = F|indNextE|
|00002bc0| 64 69 74 57 69 6e 64 6f | 77 28 20 65 77 31 20 29 |ditWindo|w( ew1 )|
|00002bd0| 3b 09 2f 2f 20 6c 6f 6f | 6b 20 66 6f 72 20 32 6e |;.// loo|k for 2n|
|00002be0| 64 20 77 69 6e 64 6f 77 | 0d 09 09 09 69 66 28 20 |d window|....if( |
|00002bf0| 65 77 32 20 29 0d 09 09 | 09 7b 0d 09 09 09 09 43 |ew2 )...|.{.....C|
|00002c00| 6f 6d 70 57 69 6e 64 32 | 20 3d 20 65 77 32 2d 3e |ompWind2| = ew2->|
|00002c10| 6f 57 69 6e 2e 74 68 65 | 57 69 6e 3b 0d 09 09 09 |oWin.the|Win;....|
|00002c20| 09 57 65 46 6f 75 6e 64 | 57 69 6e 64 32 20 3d 20 |.WeFound|Wind2 = |
|00002c30| 74 72 75 65 3b 0d 09 09 | 09 09 53 69 7a 65 45 64 |true;...|..SizeEd|
|00002c40| 69 74 57 69 6e 64 6f 77 | 28 20 43 6f 6d 70 57 69 |itWindow|( CompWi|
|00002c50| 6e 64 32 2c 20 6b 57 69 | 6e 64 6f 77 43 6f 6d 70 |nd2, kWi|ndowComp|
|00002c60| 61 72 65 42 74 6d 20 29 | 3b 0d 09 09 09 7d 0d 09 |areBtm )|;....}..|
|00002c70| 09 7d 0d 09 7d 0d 0d 09 | 2f 2f 20 4e 50 20 31 37 |.}..}...|// NP 17|
|00002c80| 37 20 2d 2d 20 4f 70 65 | 6e 20 66 69 6c 65 73 20 |7 -- Ope|n files |
|00002c90| 66 6f 72 20 63 6f 6d 70 | 61 72 69 6e 67 20 69 66 |for comp|aring if|
|00002ca0| 20 77 65 20 64 69 64 20 | 6e 6f 74 20 66 69 6e 64 | we did |not find|
|00002cb0| 20 77 69 6e 64 6f 77 73 | 20 74 6f 20 73 74 61 72 | windows| to star|
|00002cc0| 74 20 77 69 74 68 2e 0d | 09 0d 09 69 66 28 20 21 |t with..|...if( !|
|00002cd0| 20 43 6f 6d 70 57 69 6e | 64 31 20 29 0d 09 7b 0d | CompWin|d1 )..{.|
|00002ce0| 2f 2f 4c 52 20 31 38 30 | 09 09 43 6f 6d 70 61 72 |//LR 180|..Compar|
|00002cf0| 65 46 6c 61 67 3d 31 3b | 0d 09 09 69 66 28 20 2d |eFlag=1;|...if( -|
|00002d00| 31 20 3d 3d 20 41 73 6b | 45 64 69 74 57 69 6e 64 |1 == Ask|EditWind|
|00002d10| 6f 77 28 20 6b 57 69 6e | 64 6f 77 43 6f 6d 70 61 |ow( kWin|dowCompa|
|00002d20| 72 65 54 6f 70 20 29 20 | 29 0d 09 09 7b 0d 2f 2f |reTop ) |)...{.//|
|00002d30| 4c 52 20 31 38 30 09 09 | 09 43 6f 6d 70 61 72 65 |LR 180..|.Compare|
|00002d40| 46 6c 61 67 20 3d 20 30 | 3b 0d 09 09 09 72 65 74 |Flag = 0|;....ret|
|00002d50| 75 72 6e 20 66 61 6c 73 | 65 3b 09 09 2f 2f 20 69 |urn fals|e;..// i|
|00002d60| 66 20 43 61 6e 63 65 6c | 2c 20 65 78 69 74 0d 09 |f Cancel|, exit..|
|00002d70| 09 7d 0d 09 7d 0d 09 0d | 09 69 66 28 20 21 20 43 |.}..}...|.if( ! C|
|00002d80| 6f 6d 70 57 69 6e 64 32 | 20 29 0d 09 7b 0d 2f 2f |ompWind2| )..{.//|
|00002d90| 4c 52 20 31 38 30 09 09 | 43 6f 6d 70 61 72 65 46 |LR 180..|CompareF|
|00002da0| 6c 61 67 3d 32 3b 0d 09 | 09 69 66 28 20 2d 31 20 |lag=2;..|.if( -1 |
|00002db0| 3d 3d 20 41 73 6b 45 64 | 69 74 57 69 6e 64 6f 77 |== AskEd|itWindow|
|00002dc0| 28 20 6b 57 69 6e 64 6f | 77 43 6f 6d 70 61 72 65 |( kWindo|wCompare|
|00002dd0| 42 74 6d 20 29 20 29 0d | 09 09 09 67 6f 74 6f 20 |Btm ) ).|...goto |
|00002de0| 63 6f 6d 70 65 78 69 74 | 3b 0d 09 7d 0d 0d 09 69 |compexit|;..}...i|
|00002df0| 66 28 20 43 6f 6d 70 57 | 69 6e 64 31 20 3d 3d 20 |f( CompW|ind1 == |
|00002e00| 43 6f 6d 70 57 69 6e 64 | 32 20 7c 7c 20 21 43 6f |CompWind|2 || !Co|
|00002e10| 6d 70 57 69 6e 64 31 20 | 7c 7c 20 21 43 6f 6d 70 |mpWind1 ||| !Comp|
|00002e20| 57 69 6e 64 32 20 29 09 | 2f 2f 4c 52 20 31 38 30 |Wind2 ).|//LR 180|
|00002e30| 20 2d 2d 20 69 66 20 73 | 61 6d 65 20 77 69 6e 64 | -- if s|ame wind|
|00002e40| 6f 77 20 77 65 20 63 6f | 6d 70 61 72 65 20 74 6f |ow we co|mpare to|
|00002e50| 20 61 6e 20 6f 70 65 6e | 20 66 69 6c 65 0d 09 09 | an open| file...|
|00002e60| 67 6f 74 6f 20 63 6f 6d | 70 65 78 69 74 3b 0d 0d |goto com|pexit;..|
|00002e70| 09 65 77 31 20 3d 20 28 | 45 64 69 74 57 69 6e 64 |.ew1 = (|EditWind|
|00002e80| 6f 77 50 74 72 29 47 65 | 74 57 52 65 66 43 6f 6e |owPtr)Ge|tWRefCon|
|00002e90| 28 20 43 6f 6d 70 57 69 | 6e 64 31 20 29 3b 0d 09 |( CompWi|nd1 );..|
|00002ea0| 65 77 32 20 3d 20 28 45 | 64 69 74 57 69 6e 64 6f |ew2 = (E|ditWindo|
|00002eb0| 77 50 74 72 29 47 65 74 | 57 52 65 66 43 6f 6e 28 |wPtr)Get|WRefCon(|
|00002ec0| 20 43 6f 6d 70 57 69 6e | 64 32 20 29 3b 0d 0d 09 | CompWin|d2 );...|
|00002ed0| 2f 2f 20 4c 52 3a 20 76 | 31 2e 36 2e 35 20 64 6f |// LR: v|1.6.5 do|
|00002ee0| 6e 27 74 20 61 6c 6c 6f | 77 20 63 6f 6d 70 61 72 |n't allo|w compar|
|00002ef0| 69 6e 67 20 61 20 66 69 | 6c 65 20 74 6f 20 69 74 |ing a fi|le to it|
|00002f00| 73 65 6c 66 21 0d 09 69 | 66 28 20 65 77 31 20 26 |self!..i|f( ew1 &|
|00002f10| 26 20 65 77 32 09 26 26 | 20 28 65 77 31 2d 3e 66 |& ew2.&&| (ew1->f|
|00002f20| 73 53 70 65 63 2e 76 52 | 65 66 4e 75 6d 20 3d 3d |sSpec.vR|efNum ==|
|00002f30| 20 65 77 32 2d 3e 66 73 | 53 70 65 63 2e 76 52 65 | ew2->fs|Spec.vRe|
|00002f40| 66 4e 75 6d 29 0d 09 09 | 09 09 09 26 26 20 28 65 |fNum)...|...&& (e|
|00002f50| 77 31 2d 3e 66 73 53 70 | 65 63 2e 70 61 72 49 44 |w1->fsSp|ec.parID|
|00002f60| 20 3d 3d 20 65 77 32 2d | 3e 66 73 53 70 65 63 2e | == ew2-|>fsSpec.|
|00002f70| 70 61 72 49 44 29 0d 09 | 09 09 09 09 26 26 20 21 |parID)..|....&& !|
|00002f80| 4d 61 63 43 6f 6d 70 61 | 72 65 53 74 72 69 6e 67 |MacCompa|reString|
|00002f90| 28 20 65 77 31 2d 3e 66 | 73 53 70 65 63 2e 6e 61 |( ew1->f|sSpec.na|
|00002fa0| 6d 65 2c 20 65 77 32 2d | 3e 66 73 53 70 65 63 2e |me, ew2-|>fsSpec.|
|00002fb0| 6e 61 6d 65 2c 20 4e 55 | 4c 4c 20 29 20 29 0d 09 |name, NU|LL ) )..|
|00002fc0| 7b 0d 63 6f 6d 70 65 78 | 69 74 3a 0d 09 09 69 66 |{.compex|it:...if|
|00002fd0| 28 20 43 6f 6d 70 57 69 | 6e 64 31 20 26 26 20 21 |( CompWi|nd1 && !|
|00002fe0| 20 57 65 46 6f 75 6e 64 | 57 69 6e 64 31 20 29 0d | WeFound|Wind1 ).|
|00002ff0| 09 09 09 43 6c 6f 73 65 | 45 64 69 74 57 69 6e 64 |...Close|EditWind|
|00003000| 6f 77 28 20 43 6f 6d 70 | 57 69 6e 64 31 20 29 3b |ow( Comp|Wind1 );|
|00003010| 09 09 2f 2f 20 63 6c 6f | 73 65 20 77 69 6e 64 6f |..// clo|se windo|
|00003020| 77 73 20 28 31 2e 37 20 | 76 73 20 64 69 73 70 6f |ws (1.7 |vs dispo|
|00003030| 73 69 6e 67 20 74 68 65 | 6d 21 29 20 69 66 20 64 |sing the|m!) if d|
|00003040| 6f 6e 65 20 28 20 69 65 | 2c 20 6e 6f 74 20 65 64 |one ( ie|, not ed|
|00003050| 69 74 69 6e 67 20 29 0d | 09 09 69 66 28 20 43 6f |iting ).|..if( Co|
|00003060| 6d 70 57 69 6e 64 32 20 | 26 26 20 21 20 57 65 46 |mpWind2 |&& ! WeF|
|00003070| 6f 75 6e 64 57 69 6e 64 | 32 20 29 0d 09 09 09 43 |oundWind|2 )....C|
|00003080| 6c 6f 73 65 45 64 69 74 | 57 69 6e 64 6f 77 28 20 |loseEdit|Window( |
|00003090| 43 6f 6d 70 57 69 6e 64 | 32 20 29 3b 0d 09 09 0d |CompWind|2 );....|
|000030a0| 09 09 43 6f 6d 70 57 69 | 6e 64 31 20 3d 20 43 6f |..CompWi|nd1 = Co|
|000030b0| 6d 70 57 69 6e 64 32 20 | 3d 20 4e 55 4c 4c 3b 0d |mpWind2 |= NULL;.|
|000030c0| 09 09 57 65 46 6f 75 6e | 64 57 69 6e 64 31 20 3d |..WeFoun|dWind1 =|
|000030d0| 20 57 65 46 6f 75 6e 64 | 57 69 6e 64 32 20 3d 20 | WeFound|Wind2 = |
|000030e0| 66 61 6c 73 65 3b 0d 2f | 2f 4c 52 20 31 38 30 09 |false;./|/LR 180.|
|000030f0| 09 43 6f 6d 70 61 72 65 | 46 6c 61 67 20 3d 20 30 |.Compare|Flag = 0|
|00003100| 3b 0d 0d 09 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |;....ret|urn fals|
|00003110| 65 3b 0d 09 7d 0d 0d 2f | 2f 4c 52 20 31 38 30 09 |e;..}../|/LR 180.|
|00003120| 43 6f 6d 70 61 72 65 46 | 6c 61 67 20 3d 20 30 3b |CompareF|lag = 0;|
|00003130| 0d 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 7d |..return| true;.}|
|00003140| 0d 0d 2f 2a 2a 2a 20 43 | 4f 4d 50 41 52 49 53 4f |../*** C|OMPARISO|
|00003150| 4e 20 50 52 45 46 45 52 | 45 4e 43 45 53 20 2a 2a |N PREFER|ENCES **|
|00003160| 2a 2f 0d 76 6f 69 64 20 | 43 6f 6d 70 61 72 69 73 |*/.void |Comparis|
|00003170| 6f 6e 50 72 65 66 65 72 | 65 6e 63 65 73 28 20 76 |onPrefer|ences( v|
|00003180| 6f 69 64 20 29 0d 7b 0d | 2f 2f 09 68 61 6e 64 6c |oid ).{.|//.handl|
|00003190| 65 72 20 66 6f 72 20 74 | 68 65 20 6f 70 74 69 6f |er for t|he optio|
|000031a0| 6e 73 20 64 69 61 6c 6f | 67 20 66 6f 72 20 63 6f |ns dialo|g for co|
|000031b0| 6d 70 61 72 65 2e 0d 09 | 47 72 61 66 50 74 72 09 |mpare...|GrafPtr.|
|000031c0| 09 6f 6c 64 50 6f 72 74 | 3b 0d 09 44 69 61 6c 6f |.oldPort|;..Dialo|
|000031d0| 67 50 74 72 09 70 44 6c | 67 3b 0d 2f 2f 20 4c 52 |gPtr.pDl|g;.// LR|
|000031e0| 3a 20 76 31 2e 36 2e 35 | 09 48 61 6e 64 6c 65 20 |: v1.6.5|.Handle |
|000031f0| 09 09 69 48 61 6e 64 6c | 65 3b 0d 09 73 68 6f 72 |..iHandl|e;..shor|
|00003200| 74 20 09 09 69 54 79 70 | 65 2c 20 72 61 64 69 6f |t ..iTyp|e, radio|
|00003210| 31 2c 20 72 61 64 69 6f | 32 3b 0d 2f 2f 20 4c 52 |1, radio|2;.// LR|
|00003220| 3a 20 76 31 2e 36 2e 35 | 09 52 65 63 74 20 09 09 |: v1.6.5|.Rect ..|
|00003230| 69 52 65 63 74 3b 0d 0d | 09 47 65 74 50 6f 72 74 |iRect;..|.GetPort|
|00003240| 28 20 26 6f 6c 64 50 6f | 72 74 20 29 3b 0d 09 2f |( &oldPo|rt );../|
|00003250| 2f 20 6d 61 6b 65 20 64 | 69 61 6c 6f 67 0d 09 70 |/ make d|ialog..p|
|00003260| 44 6c 67 20 3d 20 47 65 | 74 4e 65 77 44 69 61 6c |Dlg = Ge|tNewDial|
|00003270| 6f 67 20 28 20 64 6c 67 | 43 6f 6d 70 61 72 65 50 |og ( dlg|CompareP|
|00003280| 72 65 66 2c 20 30 4c 2c | 20 6b 46 69 72 73 74 57 |ref, 0L,| kFirstW|
|00003290| 69 6e 64 6f 77 4f 66 43 | 6c 61 73 73 20 29 3b 0d |indowOfC|lass );.|
|000032a0| 0d 09 53 65 74 50 6f 72 | 74 44 69 61 6c 6f 67 50 |..SetPor|tDialogP|
|000032b0| 6f 72 74 28 20 70 44 6c | 67 20 29 3b 0d 0d 09 72 |ort( pDl|g );...r|
|000032c0| 61 64 69 6f 31 20 3d 20 | 67 50 72 65 66 73 2e 73 |adio1 = |gPrefs.s|
|000032d0| 65 61 72 63 68 53 69 7a | 65 3b 0d 09 72 61 64 69 |earchSiz|e;..radi|
|000032e0| 6f 32 20 3d 20 67 50 72 | 65 66 73 2e 73 65 61 72 |o2 = gPr|efs.sear|
|000032f0| 63 68 54 79 70 65 3b 0d | 0d 09 2f 2f 20 69 6e 69 |chType;.|..// ini|
|00003300| 74 20 72 61 64 69 6f 20 | 62 75 74 74 6f 6e 73 20 |t radio |buttons |
|00003310| 74 6f 20 63 75 72 72 65 | 6e 74 20 73 65 74 74 69 |to curre|nt setti|
|00003320| 6e 67 73 2e 2e 2e 0d 09 | 53 65 74 43 6f 6e 74 72 |ngs.....|SetContr|
|00003330| 6f 6c 28 20 70 44 6c 67 | 2c 20 43 50 5f 42 79 74 |ol( pDlg|, CP_Byt|
|00003340| 65 73 2c 20 67 50 72 65 | 66 73 2e 73 65 61 72 63 |es, gPre|fs.searc|
|00003350| 68 53 69 7a 65 20 3d 3d | 20 43 4d 5f 42 79 74 65 |hSize ==| CM_Byte|
|00003360| 20 29 3b 0d 09 53 65 74 | 43 6f 6e 74 72 6f 6c 28 | );..Set|Control(|
|00003370| 20 70 44 6c 67 2c 20 43 | 50 5f 57 6f 72 64 73 2c | pDlg, C|P_Words,|
|00003380| 20 67 50 72 65 66 73 2e | 73 65 61 72 63 68 53 69 | gPrefs.|searchSi|
|00003390| 7a 65 20 3d 3d 20 43 4d | 5f 57 6f 72 64 20 29 3b |ze == CM|_Word );|
|000033a0| 0d 09 53 65 74 43 6f 6e | 74 72 6f 6c 28 20 70 44 |..SetCon|trol( pD|
|000033b0| 6c 67 2c 20 43 50 5f 4c | 6f 6e 67 73 2c 20 67 50 |lg, CP_L|ongs, gP|
|000033c0| 72 65 66 73 2e 73 65 61 | 72 63 68 53 69 7a 65 20 |refs.sea|rchSize |
|000033d0| 3d 3d 20 43 4d 5f 4c 6f | 6e 67 20 29 3b 0d 09 53 |== CM_Lo|ng );..S|
|000033e0| 65 74 43 6f 6e 74 72 6f | 6c 28 20 70 44 6c 67 2c |etContro|l( pDlg,|
|000033f0| 20 43 50 5f 44 69 66 66 | 65 72 65 6e 74 2c 20 67 | CP_Diff|erent, g|
|00003400| 50 72 65 66 73 2e 73 65 | 61 72 63 68 54 79 70 65 |Prefs.se|archType|
|00003410| 20 3d 3d 20 43 4d 5f 44 | 69 66 66 65 72 65 6e 74 | == CM_D|ifferent|
|00003420| 20 29 3b 0d 09 53 65 74 | 43 6f 6e 74 72 6f 6c 28 | );..Set|Control(|
|00003430| 20 70 44 6c 67 2c 20 43 | 50 5f 4d 61 74 63 68 2c | pDlg, C|P_Match,|
|00003440| 20 67 50 72 65 66 73 2e | 73 65 61 72 63 68 54 79 | gPrefs.|searchTy|
|00003450| 70 65 20 3d 3d 20 43 4d | 5f 4d 61 74 63 68 20 29 |pe == CM|_Match )|
|00003460| 3b 0d 09 53 65 74 43 6f | 6e 74 72 6f 6c 28 20 70 |;..SetCo|ntrol( p|
|00003470| 44 6c 67 2c 20 43 50 5f | 43 61 73 65 2c 20 67 50 |Dlg, CP_|Case, gP|
|00003480| 72 65 66 73 2e 73 65 61 | 72 63 68 43 61 73 65 20 |refs.sea|rchCase |
|00003490| 29 3b 0d 0d 09 53 65 74 | 44 69 61 6c 6f 67 44 65 |);...Set|DialogDe|
|000034a0| 66 61 75 6c 74 49 74 65 | 6d 28 20 70 44 6c 67 2c |faultIte|m( pDlg,|
|000034b0| 20 43 50 5f 44 6f 6e 65 | 20 29 3b 09 2f 2f 20 4c | CP_Done| );.// L|
|000034c0| 52 3a 20 76 31 2e 36 2e | 35 20 4c 52 20 2d 2d 20 |R: v1.6.|5 LR -- |
|000034d0| 63 6f 72 72 65 63 74 20 | 77 61 79 20 6f 66 20 73 |correct |way of s|
|000034e0| 68 6f 77 69 6e 67 20 64 | 65 66 61 75 6c 74 20 62 |howing d|efault b|
|000034f0| 75 74 74 6f 6e 0d 0d 09 | 53 68 6f 77 57 69 6e 64 |utton...|ShowWind|
|00003500| 6f 77 28 20 47 65 74 44 | 69 61 6c 6f 67 57 69 6e |ow( GetD|ialogWin|
|00003510| 64 6f 77 28 20 70 44 6c | 67 20 29 20 29 3b 09 2f |dow( pDl|g ) );./|
|00003520| 2f 20 4c 52 20 31 2e 37 | 33 20 2d 2d 20 64 69 61 |/ LR 1.7|3 -- dia|
|00003530| 6c 6f 67 20 6e 6f 77 20 | 68 69 64 64 65 6e 20 61 |log now |hidden a|
|00003540| 74 20 66 69 72 73 74 20 | 6c 61 75 6e 63 68 21 0d |t first |launch!.|
|00003550| 0d 09 2f 2f 20 68 61 6e | 64 6c 65 20 65 76 65 6e |..// han|dle even|
|00003560| 74 20 70 72 6f 63 65 73 | 73 69 6e 67 0d 09 64 6f |t proces|sing..do|
|00003570| 0d 09 7b 0d 09 09 4d 6f | 64 61 6c 44 69 61 6c 6f |..{...Mo|dalDialo|
|00003580| 67 28 20 4e 55 4c 4c 2c | 20 26 69 54 79 70 65 20 |g( NULL,| &iType |
|00003590| 29 3b 0d 09 09 73 77 69 | 74 63 68 20 28 20 69 54 |);...swi|tch ( iT|
|000035a0| 79 70 65 20 29 0d 09 09 | 7b 0d 09 09 09 2f 2f 20 |ype )...|{....// |
|000035b0| 68 61 6e 64 6c 65 20 65 | 61 63 68 20 72 61 64 69 |handle e|ach radi|
|000035c0| 6f 20 62 75 74 74 6f 6e | 2e 2e 2e 0d 09 09 09 63 |o button|.......c|
|000035d0| 61 73 65 20 43 50 5f 42 | 79 74 65 73 3a 0d 09 09 |ase CP_B|ytes:...|
|000035e0| 09 09 72 61 64 69 6f 31 | 20 3d 20 43 4d 5f 42 79 |..radio1| = CM_By|
|000035f0| 74 65 3b 0d 09 09 09 09 | 53 65 74 43 6f 6e 74 72 |te;.....|SetContr|
|00003600| 6f 6c 28 20 70 44 6c 67 | 2c 20 43 50 5f 42 79 74 |ol( pDlg|, CP_Byt|
|00003610| 65 73 2c 20 31 20 29 3b | 0d 09 09 09 09 53 65 74 |es, 1 );|.....Set|
|00003620| 43 6f 6e 74 72 6f 6c 28 | 20 70 44 6c 67 2c 20 43 |Control(| pDlg, C|
|00003630| 50 5f 57 6f 72 64 73 2c | 20 30 20 29 3b 0d 09 09 |P_Words,| 0 );...|
|00003640| 09 09 53 65 74 43 6f 6e | 74 72 6f 6c 28 20 70 44 |..SetCon|trol( pD|
|00003650| 6c 67 2c 20 43 50 5f 4c | 6f 6e 67 73 2c 20 30 20 |lg, CP_L|ongs, 0 |
|00003660| 29 3b 0d 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |);.....b|reak;...|
|00003670| 09 0d 09 09 09 63 61 73 | 65 20 43 50 5f 57 6f 72 |.....cas|e CP_Wor|
|00003680| 64 73 3a 0d 09 09 09 09 | 72 61 64 69 6f 31 20 3d |ds:.....|radio1 =|
|00003690| 20 43 4d 5f 57 6f 72 64 | 3b 0d 09 09 09 09 53 65 | CM_Word|;.....Se|
|000036a0| 74 43 6f 6e 74 72 6f 6c | 28 20 70 44 6c 67 2c 20 |tControl|( pDlg, |
|000036b0| 43 50 5f 42 79 74 65 73 | 2c 20 30 20 29 3b 0d 09 |CP_Bytes|, 0 );..|
|000036c0| 09 09 09 53 65 74 43 6f | 6e 74 72 6f 6c 28 20 70 |...SetCo|ntrol( p|
|000036d0| 44 6c 67 2c 20 43 50 5f | 57 6f 72 64 73 2c 20 31 |Dlg, CP_|Words, 1|
|000036e0| 20 29 3b 0d 09 09 09 09 | 53 65 74 43 6f 6e 74 72 | );.....|SetContr|
|000036f0| 6f 6c 28 20 70 44 6c 67 | 2c 20 43 50 5f 4c 6f 6e |ol( pDlg|, CP_Lon|
|00003700| 67 73 2c 20 30 20 29 3b | 0d 09 09 09 09 62 72 65 |gs, 0 );|.....bre|
|00003710| 61 6b 3b 0d 09 09 09 0d | 09 09 09 63 61 73 65 20 |ak;.....|...case |
|00003720| 43 50 5f 4c 6f 6e 67 73 | 3a 0d 09 09 09 09 72 61 |CP_Longs|:.....ra|
|00003730| 64 69 6f 31 20 3d 20 43 | 4d 5f 4c 6f 6e 67 3b 0d |dio1 = C|M_Long;.|
|00003740| 09 09 09 09 53 65 74 43 | 6f 6e 74 72 6f 6c 28 20 |....SetC|ontrol( |
|00003750| 70 44 6c 67 2c 20 43 50 | 5f 42 79 74 65 73 2c 20 |pDlg, CP|_Bytes, |
|00003760| 30 20 29 3b 0d 09 09 09 | 09 53 65 74 43 6f 6e 74 |0 );....|.SetCont|
|00003770| 72 6f 6c 28 20 70 44 6c | 67 2c 20 43 50 5f 57 6f |rol( pDl|g, CP_Wo|
|00003780| 72 64 73 2c 20 30 20 29 | 3b 0d 09 09 09 09 53 65 |rds, 0 )|;.....Se|
|00003790| 74 43 6f 6e 74 72 6f 6c | 28 20 70 44 6c 67 2c 20 |tControl|( pDlg, |
|000037a0| 43 50 5f 4c 6f 6e 67 73 | 2c 20 31 20 29 3b 0d 09 |CP_Longs|, 1 );..|
|000037b0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 0d 09 |...break|;.......|
|000037c0| 09 09 63 61 73 65 20 43 | 50 5f 44 69 66 66 65 72 |..case C|P_Differ|
|000037d0| 65 6e 74 3a 0d 09 09 09 | 09 72 61 64 69 6f 32 20 |ent:....|.radio2 |
|000037e0| 3d 20 43 4d 5f 44 69 66 | 66 65 72 65 6e 74 3b 0d |= CM_Dif|ferent;.|
|000037f0| 09 09 09 09 53 65 74 43 | 6f 6e 74 72 6f 6c 28 20 |....SetC|ontrol( |
|00003800| 70 44 6c 67 2c 20 43 50 | 5f 44 69 66 66 65 72 65 |pDlg, CP|_Differe|
|00003810| 6e 74 2c 20 31 20 29 3b | 0d 09 09 09 09 53 65 74 |nt, 1 );|.....Set|
|00003820| 43 6f 6e 74 72 6f 6c 28 | 20 70 44 6c 67 2c 20 43 |Control(| pDlg, C|
|00003830| 50 5f 4d 61 74 63 68 2c | 20 30 20 29 3b 0d 09 09 |P_Match,| 0 );...|
|00003840| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 0d 09 09 09 |..break;|........|
|00003850| 63 61 73 65 20 43 50 5f | 4d 61 74 63 68 3a 0d 09 |case CP_|Match:..|
|00003860| 09 09 09 72 61 64 69 6f | 32 20 3d 20 43 4d 5f 4d |...radio|2 = CM_M|
|00003870| 61 74 63 68 3b 0d 09 09 | 09 09 53 65 74 43 6f 6e |atch;...|..SetCon|
|00003880| 74 72 6f 6c 28 20 70 44 | 6c 67 2c 20 43 50 5f 44 |trol( pD|lg, CP_D|
|00003890| 69 66 66 65 72 65 6e 74 | 2c 20 30 20 29 3b 0d 09 |ifferent|, 0 );..|
|000038a0| 09 09 09 53 65 74 43 6f | 6e 74 72 6f 6c 28 20 70 |...SetCo|ntrol( p|
|000038b0| 44 6c 67 2c 20 43 50 5f | 4d 61 74 63 68 2c 20 31 |Dlg, CP_|Match, 1|
|000038c0| 20 29 3b 0d 09 09 09 09 | 62 72 65 61 6b 3b 0d 0d | );.....|break;..|
|000038d0| 09 09 09 63 61 73 65 20 | 43 50 5f 43 61 73 65 3a |...case |CP_Case:|
|000038e0| 0d 09 09 09 09 67 50 72 | 65 66 73 2e 73 65 61 72 |.....gPr|efs.sear|
|000038f0| 63 68 43 61 73 65 20 5e | 3d 20 31 3b 0d 09 09 09 |chCase ^|= 1;....|
|00003900| 09 53 65 74 43 6f 6e 74 | 72 6f 6c 28 20 70 44 6c |.SetCont|rol( pDl|
|00003910| 67 2c 20 43 50 5f 43 61 | 73 65 2c 20 67 50 72 65 |g, CP_Ca|se, gPre|
|00003920| 66 73 2e 73 65 61 72 63 | 68 43 61 73 65 20 29 3b |fs.searc|hCase );|
|00003930| 0d 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 7d 0d |.....bre|ak;...}.|
|00003940| 09 7d 20 77 68 69 6c 65 | 28 20 28 20 69 54 79 70 |.} while|( ( iTyp|
|00003950| 65 20 21 3d 20 43 50 5f | 44 6f 6e 65 20 29 20 26 |e != CP_|Done ) &|
|00003960| 26 20 28 20 69 54 79 70 | 65 20 21 3d 20 43 50 5f |& ( iTyp|e != CP_|
|00003970| 43 61 6e 63 65 6c 20 29 | 20 29 3b 0d 09 0d 09 69 |Cancel )| );....i|
|00003980| 66 28 20 69 54 79 70 65 | 3d 3d 43 50 5f 44 6f 6e |f( iType|==CP_Don|
|00003990| 65 20 29 0d 09 7b 0d 09 | 09 2f 2f 20 63 68 61 6e |e )..{..|.// chan|
|000039a0| 67 65 20 66 6c 61 67 73 | 20 62 61 73 65 64 20 6f |ge flags| based o|
|000039b0| 6e 20 77 68 69 63 68 20 | 6f 6e 65 20 69 73 20 73 |n which |one is s|
|000039c0| 65 6c 65 63 74 65 64 0d | 09 09 67 50 72 65 66 73 |elected.|..gPrefs|
|000039d0| 2e 73 65 61 72 63 68 53 | 69 7a 65 20 3d 20 72 61 |.searchS|ize = ra|
|000039e0| 64 69 6f 31 3b 0d 09 09 | 67 50 72 65 66 73 2e 73 |dio1;...|gPrefs.s|
|000039f0| 65 61 72 63 68 54 79 70 | 65 20 3d 20 72 61 64 69 |earchTyp|e = radi|
|00003a00| 6f 32 3b 0d 09 7d 09 09 | 0d 09 2f 2f 20 63 6c 6f |o2;..}..|..// clo|
|00003a10| 73 65 20 74 68 65 57 69 | 6e 0d 09 44 69 73 70 6f |se theWi|n..Dispo|
|00003a20| 73 65 44 69 61 6c 6f 67 | 28 20 70 44 6c 67 20 29 |seDialog|( pDlg )|
|00003a30| 3b 0d 09 53 65 74 50 6f | 72 74 28 20 6f 6c 64 50 |;..SetPo|rt( oldP|
|00003a40| 6f 72 74 20 29 3b 0d 7d | 0d 00 00 00 00 00 00 00 |ort );.}|........|
|00003a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a80| 00 00 01 00 00 00 01 9f | 00 00 00 9f 00 00 00 69 |........|.......i|
|00003a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b80| 00 00 00 47 b6 42 4d f4 | 3f e5 32 30 00 04 00 00 |...G.BM.|?.20....|
|00003b90| 00 01 00 00 00 00 b9 e7 | 4c db b9 e7 4c db 00 00 |........|L...L...|
|00003ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 06 72 |........|.......r|
|00003bb0| 61 76 69 6e 67 00 00 00 | 0c 48 65 78 43 6f 6d 70 |aving...|.HexComp|
|00003bc0| 61 72 65 2e 63 00 00 00 | 00 00 00 00 00 00 04 00 |are.c...|........|
|00003bd0| 01 00 01 00 00 00 48 00 | 09 4d 6f 6e 61 63 6f 00 |......H.|.Monaco.|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 02 00 04 00 2e 00 |........|........|
|00003c00| 0a 01 c8 02 80 00 2e 00 | 0a 01 c8 02 80 b9 e7 5c |........|.......\|
|00003c10| 14 00 00 24 5d 00 00 24 | 5d 00 00 20 3f 01 00 00 |...$]..$|].. ?...|
|00003c20| 00 01 00 00 00 01 9f 00 | 00 00 9f 00 00 00 69 53 |........|......iS|
|00003c30| 4f 52 54 05 36 00 80 00 | 1c 00 5a 00 02 4d 50 53 |ORT.6...|..Z..MPS|
|00003c40| 52 00 00 00 1a 4d 57 42 | 42 00 00 00 26 63 6b 69 |R....MWB|B...&cki|
|00003c50| 64 00 00 00 32 03 ed ff | ff 00 00 00 53 00 00 00 |d...2...|....S...|
|00003c60| 00 03 f0 ff ff 00 00 00 | 4b 00 00 00 00 00 80 00 |........|K.......|
|00003c70| 00 00 00 00 00 00 00 00 | 00 0e 50 72 6f 6a 65 63 |........|..Projec|
|00003c80| 74 6f 72 20 44 61 74 61 | 00 00 00 00 00 00 00 00 |tor Data|........|
|00003c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+