home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 June: Reference Library / Dev.CD Jun 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 25 / develop issue 25 code / toolfrontend.sea / ToolFrontEnd / ToolFrontEnd Source / ToolFrontEnd Compiler / ToolFrontEnd.c < prev    next >
MacBinary  |  1996-02-29  |  12.4 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
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, Thu Feb 29 14:01:34 1996, modified Thu Feb 29 14:01:34 1996, creator 'CWIE', type ASCII, 12029 bytes "ToolFrontEnd.c" , at 0x2f7d 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 54 6f 6f 6c 46 72 | 6f 6e 74 45 6e 64 2e 63 |..ToolFr|ontEnd.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 2e fd 00 | 00 01 9a ad 5b a8 8e ad |........|....[...|
|00000060| 5b a8 8e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |[.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 41 17 00 00 |........|....A...|
|00000080| 0d 2f 2a 20 73 74 61 6e | 64 61 72 64 20 68 65 61 |./* stan|dard hea|
|00000090| 64 65 72 73 20 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |ders */.|#include|
|000000a0| 20 3c 63 74 79 70 65 2e | 68 3e 0d 23 69 6e 63 6c | <ctype.|h>.#incl|
|000000b0| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0d 23 69 |ude <std|io.h>.#i|
|000000c0| 6e 63 6c 75 64 65 20 3c | 73 74 72 69 6e 67 2e 68 |nclude <|string.h|
|000000d0| 3e 0d 0d 2f 2a 20 73 79 | 73 74 65 6d 20 68 65 61 |>../* sy|stem hea|
|000000e0| 64 65 72 73 20 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |ders */.|#include|
|000000f0| 20 3c 47 65 73 74 61 6c | 74 2e 68 3e 0d 23 69 6e | <Gestal|t.h>.#in|
|00000100| 63 6c 75 64 65 20 3c 4c | 6f 77 4d 65 6d 2e 68 3e |clude <L|owMem.h>|
|00000110| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 53 74 72 69 6e |.#includ|e <Strin|
|00000120| 67 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |gs.h>.#i|nclude <|
|00000130| 54 65 78 74 55 74 69 6c | 73 2e 68 3e 0d 23 69 6e |TextUtil|s.h>.#in|
|00000140| 63 6c 75 64 65 20 3c 43 | 6f 64 65 46 72 61 67 6d |clude <C|odeFragm|
|00000150| 65 6e 74 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |ents.h>.|#include|
|00000160| 20 3c 52 65 73 6f 75 72 | 63 65 73 2e 68 3e 0d 23 | <Resour|ces.h>.#|
|00000170| 69 6e 63 6c 75 64 65 20 | 3c 4d 69 78 65 64 4d 6f |include |<MixedMo|
|00000180| 64 65 2e 68 3e 0d 0d 2f | 2a 20 63 6f 6d 70 69 6c |de.h>../|* compil|
|00000190| 65 72 20 68 65 61 64 65 | 72 73 20 2a 2f 0d 23 69 |er heade|rs */.#i|
|000001a0| 6e 63 6c 75 64 65 20 3c | 41 34 53 74 75 66 66 2e |nclude <|A4Stuff.|
|000001b0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 44 72 6f |h>.#incl|ude <Dro|
|000001c0| 70 49 6e 43 6f 6d 70 69 | 6c 65 72 2e 68 3e 0d 0d |pInCompi|ler.h>..|
|000001d0| 2f 2a 20 70 72 6f 6a 65 | 63 74 20 68 65 61 64 65 |/* proje|ct heade|
|000001e0| 72 73 20 2a 2f 0d 23 69 | 6e 63 6c 75 64 65 20 22 |rs */.#i|nclude "|
|000001f0| 54 6f 6f 6c 46 72 6f 6e | 74 45 6e 64 2e 68 22 0d |ToolFron|tEnd.h".|
|00000200| 23 69 6e 63 6c 75 64 65 | 20 22 54 6f 6f 6c 53 65 |#include| "ToolSe|
|00000210| 72 76 65 72 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |rver.h".|#include|
|00000220| 20 22 46 75 6c 6c 50 61 | 74 68 2e 68 22 0d 0d 0d | "FullPa|th.h"...|
|00000230| 0d 2f 2a 20 70 72 6f 74 | 6f 74 79 70 65 73 20 6f |./* prot|otypes o|
|00000240| 66 20 6c 6f 63 61 6c 20 | 66 75 6e 63 74 69 6f 6e |f local |function|
|00000250| 73 20 2a 2f 0d 73 74 61 | 74 69 63 20 4f 53 45 72 |s */.sta|tic OSEr|
|00000260| 72 09 43 6f 6d 70 69 6c | 65 28 54 6f 6f 6c 46 72 |r.Compil|e(ToolFr|
|00000270| 6f 6e 74 45 6e 64 53 74 | 61 74 75 73 2a 20 73 74 |ontEndSt|atus* st|
|00000280| 61 74 75 73 29 3b 0d 73 | 74 61 74 69 63 20 4f 53 |atus);.s|tatic OS|
|00000290| 45 72 72 09 50 72 6f 63 | 65 73 73 46 69 6c 65 28 |Err.Proc|essFile(|
|000002a0| 54 6f 6f 6c 46 72 6f 6e | 74 45 6e 64 53 74 61 74 |ToolFron|tEndStat|
|000002b0| 75 73 2a 20 73 74 61 74 | 75 73 2c 20 54 6f 6f 6c |us* stat|us, Tool|
|000002c0| 46 72 6f 6e 74 45 6e 64 | 50 72 65 66 20 2a 2a 70 |FrontEnd|Pref **p|
|000002d0| 72 65 66 73 2c 0d 09 09 | 09 09 09 09 09 73 68 6f |refs,...|.....sho|
|000002e0| 72 74 20 63 75 72 72 65 | 6e 74 45 78 74 65 6e 73 |rt curre|ntExtens|
|000002f0| 69 6f 6e 29 3b 0d 0d 0d | 2f 2f 20 6d 69 78 65 64 |ion);...|// mixed|
|00000300| 20 6d 6f 64 65 20 69 6e | 66 6f 20 66 6f 72 20 69 | mode in|fo for i|
|00000310| 6e 63 6c 75 64 65 20 66 | 69 6c 65 20 73 63 61 6e |nclude f|ile scan|
|00000320| 6e 65 72 73 0d 65 6e 75 | 6d 0d 7b 0d 09 75 70 70 |ners.enu|m.{..upp|
|00000330| 53 63 61 6e 6e 65 72 45 | 6e 74 72 79 50 6f 69 6e |ScannerE|ntryPoin|
|00000340| 74 49 6e 66 6f 20 3d 20 | 6b 50 61 73 63 61 6c 53 |tInfo = |kPascalS|
|00000350| 74 61 63 6b 42 61 73 65 | 64 0d 09 09 20 7c 20 52 |tackBase|d... | R|
|00000360| 45 53 55 4c 54 5f 53 49 | 5a 45 28 53 49 5a 45 5f |ESULT_SI|ZE(SIZE_|
|00000370| 43 4f 44 45 28 73 69 7a | 65 6f 66 28 4f 53 45 72 |CODE(siz|eof(OSEr|
|00000380| 72 29 29 29 0d 09 09 20 | 7c 20 53 54 41 43 4b 5f |r)))... || STACK_|
|00000390| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE|
|000003a0| 52 28 31 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(1, SIZ|E_CODE(s|
|000003b0| 69 7a 65 6f 66 28 54 6f | 6f 6c 46 72 6f 6e 74 45 |izeof(To|olFrontE|
|000003c0| 6e 64 53 74 61 74 75 73 | 2a 29 29 29 0d 7d 3b 0d |ndStatus|*))).};.|
|000003d0| 0d 0d 2f 2a 0d 20 2a 09 | 6d 61 69 6e 09 2d 09 6d |../*. *.|main.-.m|
|000003e0| 61 69 6e 20 65 6e 74 72 | 79 2d 70 6f 69 6e 74 20 |ain entr|y-point |
|000003f0| 66 6f 72 20 54 6f 6f 6c | 46 72 6f 6e 74 45 6e 64 |for Tool|FrontEnd|
|00000400| 20 54 6f 6f 6c 0d 20 2a | 0d 20 2a 2f 0d 0d 70 61 | Tool. *|. */..pa|
|00000410| 73 63 61 6c 20 73 68 6f | 72 74 20 6d 61 69 6e 28 |scal sho|rt main(|
|00000420| 43 6f 6d 70 69 6c 65 72 | 50 61 72 61 6d 65 74 65 |Compiler|Paramete|
|00000430| 72 42 6c 6f 63 6b 50 74 | 72 20 63 70 62 29 0d 7b |rBlockPt|r cpb).{|
|00000440| 0d 09 73 68 6f 72 74 09 | 09 09 09 09 72 65 73 75 |..short.|....resu|
|00000450| 6c 74 3b 0d 09 54 6f 6f | 6c 46 72 6f 6e 74 45 6e |lt;..Too|lFrontEn|
|00000460| 64 53 74 61 74 75 73 2a | 09 09 73 74 61 74 75 73 |dStatus*|..status|
|00000470| 3b 0d 09 4f 53 45 72 72 | 09 09 09 09 09 65 72 72 |;..OSErr|.....err|
|00000480| 3b 0d 09 0d 09 2f 2a 20 | 73 65 74 20 75 70 20 67 |;..../* |set up g|
|00000490| 6c 6f 62 61 6c 20 77 6f | 72 6c 64 20 28 36 38 4b |lobal wo|rld (68K|
|000004a0| 20 6f 6e 6c 79 29 20 2a | 2f 0d 09 45 6e 74 65 72 | only) *|/..Enter|
|000004b0| 43 6f 64 65 52 65 73 6f | 75 72 63 65 28 29 3b 0d |CodeReso|urce();.|
|000004c0| 09 0d 09 72 65 73 75 6c | 74 20 3d 20 6e 6f 45 72 |...resul|t = noEr|
|000004d0| 72 3b 0d 09 0d 09 2f 2a | 20 64 69 73 70 61 74 63 |r;..../*| dispatc|
|000004e0| 68 20 6f 6e 20 63 6f 6d | 70 69 6c 65 72 20 72 65 |h on com|piler re|
|000004f0| 71 75 65 73 74 20 2a 2f | 0d 09 73 77 69 74 63 68 |quest */|..switch|
|00000500| 20 28 63 70 62 2d 3e 72 | 65 71 75 65 73 74 29 0d | (cpb->r|equest).|
|00000510| 09 7b 0d 09 63 61 73 65 | 20 72 65 71 49 6e 69 74 |.{..case| reqInit|
|00000520| 43 6f 6d 70 69 6c 65 72 | 3a 0d 09 09 2f 2a 20 63 |Compiler|:.../* c|
|00000530| 6f 6d 70 69 6c 65 72 20 | 68 61 73 20 6a 75 73 74 |ompiler |has just|
|00000540| 20 62 65 65 6e 20 6c 6f | 61 64 65 64 20 69 6e 74 | been lo|aded int|
|00000550| 6f 20 6d 65 6d 6f 72 79 | 20 2a 2f 0d 09 09 62 72 |o memory| */...br|
|00000560| 65 61 6b 3b 0d 09 09 0d | 09 63 61 73 65 20 72 65 |eak;....|.case re|
|00000570| 71 54 65 72 6d 43 6f 6d | 70 69 6c 65 72 3a 0d 09 |qTermCom|piler:..|
|00000580| 09 2f 2a 20 63 6f 6d 70 | 69 6c 65 72 20 69 73 20 |./* comp|iler is |
|00000590| 61 62 6f 75 74 20 74 6f | 20 62 65 20 75 6e 6c 6f |about to| be unlo|
|000005a0| 61 64 65 64 20 66 72 6f | 6d 20 6d 65 6d 6f 72 79 |aded fro|m memory|
|000005b0| 20 2a 2f 0d 09 09 62 72 | 65 61 6b 3b 0d 09 09 0d | */...br|eak;....|
|000005c0| 09 63 61 73 65 20 72 65 | 71 43 6f 6d 70 69 6c 65 |.case re|qCompile|
|000005d0| 3a 0d 09 09 2f 2a 20 63 | 6f 6d 70 69 6c 65 20 61 |:.../* c|ompile a|
|000005e0| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 20 2a 2f 0d | source |file */.|
|000005f0| 09 09 73 74 61 74 75 73 | 20 3d 20 28 54 6f 6f 6c |..status| = (Tool|
|00000600| 46 72 6f 6e 74 45 6e 64 | 53 74 61 74 75 73 2a 29 |FrontEnd|Status*)|
|00000610| 4e 65 77 50 74 72 43 6c | 65 61 72 28 73 69 7a 65 |NewPtrCl|ear(size|
|00000620| 6f 66 28 54 6f 6f 6c 46 | 72 6f 6e 74 45 6e 64 53 |of(ToolF|rontEndS|
|00000630| 74 61 74 75 73 29 29 3b | 0d 09 09 65 72 72 20 3d |tatus));|...err =|
|00000640| 20 4d 65 6d 45 72 72 6f | 72 28 29 3b 0d 09 09 69 | MemErro|r();...i|
|00000650| 66 20 28 65 72 72 20 3d | 3d 20 6e 6f 45 72 72 29 |f (err =|= noErr)|
|00000660| 0d 09 09 7b 0d 09 09 09 | 69 6e 74 20 69 3b 0d 09 |...{....|int i;..|
|00000670| 09 09 73 74 61 74 75 73 | 2d 3e 63 70 62 20 3d 20 |..status|->cpb = |
|00000680| 63 70 62 3b 0d 09 09 09 | 65 72 72 20 3d 20 43 6f |cpb;....|err = Co|
|00000690| 6d 70 69 6c 65 28 73 74 | 61 74 75 73 29 3b 0d 09 |mpile(st|atus);..|
|000006a0| 09 09 66 6f 72 20 28 69 | 20 3d 20 30 3b 20 69 20 |..for (i| = 0; i |
|000006b0| 3c 20 73 74 61 74 75 73 | 2d 3e 6e 75 6d 46 6f 6c |< status|->numFol|
|000006c0| 64 65 72 50 61 74 68 73 | 3b 20 69 2b 2b 29 0d 09 |derPaths|; i++)..|
|000006d0| 09 09 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |...Dispo|seHandle|
|000006e0| 28 73 74 61 74 75 73 2d | 3e 66 6f 6c 64 65 72 50 |(status-|>folderP|
|000006f0| 61 74 68 73 5b 69 5d 2e | 70 61 74 68 29 3b 0d 09 |aths[i].|path);..|
|00000700| 09 09 44 69 73 70 6f 73 | 65 50 74 72 28 28 50 74 |..Dispos|ePtr((Pt|
|00000710| 72 29 73 74 61 74 75 73 | 29 3b 0d 09 09 7d 0d 09 |r)status|);...}..|
|00000720| 09 72 65 73 75 6c 74 20 | 3d 20 28 65 72 72 20 3d |.result |= (err =|
|00000730| 3d 20 6e 6f 45 72 72 29 | 3b 0d 09 09 62 72 65 61 |= noErr)|;...brea|
|00000740| 6b 3b 0d 09 09 0d 09 64 | 65 66 61 75 6c 74 3a 0d |k;.....d|efault:.|
|00000750| 09 09 72 65 73 75 6c 74 | 20 3d 20 70 61 72 61 6d |..result| = param|
|00000760| 45 72 72 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 09 7d |Err;...b|reak;..}|
|00000770| 0d 09 0d 09 2f 2a 20 74 | 65 61 72 20 64 6f 77 6e |..../* t|ear down|
|00000780| 20 67 6c 6f 62 61 6c 20 | 77 6f 72 6c 64 20 28 36 | global |world (6|
|00000790| 38 4b 20 6f 6e 6c 79 29 | 20 2a 2f 0d 09 45 78 69 |8K only)| */..Exi|
|000007a0| 74 43 6f 64 65 52 65 73 | 6f 75 72 63 65 28 29 3b |tCodeRes|ource();|
|000007b0| 0d 09 0d 09 2f 2a 20 72 | 65 74 75 72 6e 20 72 65 |..../* r|eturn re|
|000007c0| 73 75 6c 74 20 63 6f 64 | 65 20 2a 2f 0d 09 72 65 |sult cod|e */..re|
|000007d0| 74 75 72 6e 20 28 72 65 | 73 75 6c 74 29 3b 0d 7d |turn (re|sult);.}|
|000007e0| 0d 0d 0d 73 74 61 74 69 | 63 20 4f 53 45 72 72 09 |...stati|c OSErr.|
|000007f0| 43 6f 6d 70 69 6c 65 28 | 54 6f 6f 6c 46 72 6f 6e |Compile(|ToolFron|
|00000800| 74 45 6e 64 53 74 61 74 | 75 73 2a 20 73 74 61 74 |tEndStat|us* stat|
|00000810| 75 73 29 0d 7b 0d 09 48 | 61 6e 64 6c 65 09 09 09 |us).{..H|andle...|
|00000820| 09 70 72 65 66 73 48 61 | 6e 64 3b 0d 09 54 6f 6f |.prefsHa|nd;..Too|
|00000830| 6c 46 72 6f 6e 74 45 6e | 64 50 72 65 66 2a 2a 09 |lFrontEn|dPref**.|
|00000840| 70 72 65 66 73 3b 0d 09 | 4f 53 45 72 72 09 09 09 |prefs;..|OSErr...|
|00000850| 09 65 72 72 3b 0d 09 73 | 68 6f 72 74 09 09 09 09 |.err;..s|hort....|
|00000860| 63 75 72 72 65 6e 74 45 | 78 74 65 6e 73 69 6f 6e |currentE|xtension|
|00000870| 3b 0d 09 0d 09 2f 2a 20 | 4c 6f 61 64 20 69 6e 20 |;..../* |Load in |
|00000880| 6f 75 72 20 70 72 65 66 | 73 2e 20 2a 2f 0d 09 65 |our pref|s. */..e|
|00000890| 72 72 20 3d 20 43 57 43 | 6f 6d 70 47 65 74 50 72 |rr = CWC|ompGetPr|
|000008a0| 65 66 65 72 65 6e 63 65 | 73 28 73 74 61 74 75 73 |eference|s(status|
|000008b0| 2d 3e 63 70 62 2c 20 6b | 54 6f 6f 6c 46 72 6f 6e |->cpb, k|ToolFron|
|000008c0| 74 45 6e 64 50 61 6e 65 | 6c 4e 61 6d 65 2c 20 26 |tEndPane|lName, &|
|000008d0| 70 72 65 66 73 48 61 6e | 64 29 3b 0d 09 69 66 20 |prefsHan|d);..if |
|000008e0| 28 65 72 72 20 21 3d 20 | 6e 6f 45 72 72 29 20 72 |(err != |noErr) r|
|000008f0| 65 74 75 72 6e 20 65 72 | 72 3b 0d 09 70 72 65 66 |eturn er|r;..pref|
|00000900| 73 20 3d 20 28 54 6f 6f | 6c 46 72 6f 6e 74 45 6e |s = (Too|lFrontEn|
|00000910| 64 50 72 65 66 48 61 6e | 64 6c 65 29 70 72 65 66 |dPrefHan|dle)pref|
|00000920| 73 48 61 6e 64 3b 0d 09 | 0d 09 73 74 61 74 75 73 |sHand;..|..status|
|00000930| 2d 3e 6c 69 6e 65 63 6f | 75 6e 74 20 3d 20 30 3b |->lineco|unt = 0;|
|00000940| 0d 09 0d 09 2f 2f 20 66 | 69 6e 64 20 74 68 65 20 |....// f|ind the |
|00000950| 65 78 74 65 6e 73 69 6f | 6e 20 6f 66 20 74 68 69 |extensio|n of thi|
|00000960| 73 20 66 69 6c 65 0d 09 | 7b 0d 09 09 53 74 72 31 |s file..|{...Str1|
|00000970| 35 20 65 78 74 65 6e 73 | 69 6f 6e 3b 0d 09 09 69 |5 extens|ion;...i|
|00000980| 6e 74 20 69 3b 0d 09 09 | 42 79 74 65 20 73 74 61 |nt i;...|Byte sta|
|00000990| 74 65 3b 0d 09 09 0d 09 | 09 66 6f 72 20 28 69 20 |te;.....|.for (i |
|000009a0| 3d 20 73 74 61 74 75 73 | 2d 3e 63 70 62 2d 3e 73 |= status|->cpb->s|
|000009b0| 6f 75 72 63 65 66 69 6c | 65 2e 6e 61 6d 65 5b 30 |ourcefil|e.name[0|
|000009c0| 5d 3b 20 69 20 3e 20 30 | 20 26 26 20 73 74 61 74 |]; i > 0| && stat|
|000009d0| 75 73 2d 3e 63 70 62 2d | 3e 73 6f 75 72 63 65 66 |us->cpb-|>sourcef|
|000009e0| 69 6c 65 2e 6e 61 6d 65 | 5b 69 5d 20 21 3d 20 27 |ile.name|[i] != '|
|000009f0| 2e 27 3b 20 69 2d 2d 29 | 0d 09 09 09 3b 0d 09 09 |.'; i--)|....;...|
|00000a00| 69 66 20 28 69 20 3c 20 | 30 29 20 72 65 74 75 72 |if (i < |0) retur|
|00000a10| 6e 20 70 61 72 61 6d 45 | 72 72 3b 0d 09 09 65 78 |n paramE|rr;...ex|
|00000a20| 74 65 6e 73 69 6f 6e 5b | 30 5d 20 3d 20 73 74 61 |tension[|0] = sta|
|00000a30| 74 75 73 2d 3e 63 70 62 | 2d 3e 73 6f 75 72 63 65 |tus->cpb|->source|
|00000a40| 66 69 6c 65 2e 6e 61 6d | 65 5b 30 5d 20 2d 20 28 |file.nam|e[0] - (|
|00000a50| 69 20 2d 20 31 29 3b 0d | 09 09 42 6c 6f 63 6b 4d |i - 1);.|..BlockM|
|00000a60| 6f 76 65 44 61 74 61 28 | 73 74 61 74 75 73 2d 3e |oveData(|status->|
|00000a70| 63 70 62 2d 3e 73 6f 75 | 72 63 65 66 69 6c 65 2e |cpb->sou|rcefile.|
|00000a80| 6e 61 6d 65 20 2b 20 69 | 2c 20 65 78 74 65 6e 73 |name + i|, extens|
|00000a90| 69 6f 6e 20 2b 20 31 2c | 20 65 78 74 65 6e 73 69 |ion + 1,| extensi|
|00000aa0| 6f 6e 5b 30 5d 29 3b 0d | 09 09 0d 09 09 73 74 61 |on[0]);.|.....sta|
|00000ab0| 74 65 20 3d 20 48 47 65 | 74 53 74 61 74 65 28 28 |te = HGe|tState((|
|00000ac0| 48 61 6e 64 6c 65 29 70 | 72 65 66 73 29 3b 0d 09 |Handle)p|refs);..|
|00000ad0| 09 48 4c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 70 |.HLock((|Handle)p|
|00000ae0| 72 65 66 73 29 3b 0d 09 | 09 66 6f 72 20 28 69 20 |refs);..|.for (i |
|00000af0| 3d 20 30 2c 20 63 75 72 | 72 65 6e 74 45 78 74 65 |= 0, cur|rentExte|
|00000b00| 6e 73 69 6f 6e 20 3d 20 | 2d 31 3b 20 69 20 3c 20 |nsion = |-1; i < |
|00000b10| 28 2a 70 72 65 66 73 29 | 2d 3e 6e 75 6d 45 78 74 |(*prefs)|->numExt|
|00000b20| 65 6e 73 69 6f 6e 73 3b | 20 69 2b 2b 29 0d 09 09 |ensions;| i++)...|
|00000b30| 7b 0d 09 09 09 69 66 20 | 28 45 71 75 61 6c 53 74 |{....if |(EqualSt|
|00000b40| 72 69 6e 67 28 65 78 74 | 65 6e 73 69 6f 6e 2c 20 |ring(ext|ension, |
|00000b50| 28 2a 70 72 65 66 73 29 | 2d 3e 65 78 74 65 6e 73 |(*prefs)|->extens|
|00000b60| 69 6f 6e 73 5b 69 5d 2e | 65 78 74 65 6e 73 69 6f |ions[i].|extensio|
|00000b70| 6e 2c 20 66 61 6c 73 65 | 2c 20 74 72 75 65 29 29 |n, false|, true))|
|00000b80| 0d 09 09 09 7b 0d 09 09 | 09 09 63 75 72 72 65 6e |....{...|..curren|
|00000b90| 74 45 78 74 65 6e 73 69 | 6f 6e 20 3d 20 69 3b 0d |tExtensi|on = i;.|
|00000ba0| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 7d 0d |....brea|k;....}.|
|00000bb0| 09 09 7d 0d 09 09 48 53 | 65 74 53 74 61 74 65 28 |..}...HS|etState(|
|00000bc0| 28 48 61 6e 64 6c 65 29 | 70 72 65 66 73 2c 20 73 |(Handle)|prefs, s|
|00000bd0| 74 61 74 65 29 3b 0d 09 | 09 69 66 20 28 63 75 72 |tate);..|.if (cur|
|00000be0| 72 65 6e 74 45 78 74 65 | 6e 73 69 6f 6e 20 3d 3d |rentExte|nsion ==|
|00000bf0| 20 2d 31 29 20 72 65 74 | 75 72 6e 20 70 61 72 61 | -1) ret|urn para|
|00000c00| 6d 45 72 72 3b 0d 09 7d | 0d 09 0d 09 2f 2f 20 70 |mErr;..}|....// p|
|00000c10| 72 6f 63 65 73 73 20 69 | 6e 63 6c 75 64 65 20 66 |rocess i|nclude f|
|00000c20| 69 6c 65 73 0d 09 69 66 | 20 28 28 2a 70 72 65 66 |iles..if| ((*pref|
|00000c30| 73 29 2d 3e 65 78 74 65 | 6e 73 69 6f 6e 73 5b 63 |s)->exte|nsions[c|
|00000c40| 75 72 72 65 6e 74 45 78 | 74 65 6e 73 69 6f 6e 5d |urrentEx|tension]|
|00000c50| 2e 73 63 61 6e 6e 65 72 | 5b 30 5d 20 21 3d 20 30 |.scanner|[0] != 0|
|00000c60| 29 0d 09 7b 0d 09 09 65 | 72 72 20 3d 20 50 72 6f |)..{...e|rr = Pro|
|00000c70| 63 65 73 73 46 69 6c 65 | 28 73 74 61 74 75 73 2c |cessFile|(status,|
|00000c80| 20 70 72 65 66 73 2c 20 | 63 75 72 72 65 6e 74 45 | prefs, |currentE|
|00000c90| 78 74 65 6e 73 69 6f 6e | 29 3b 0d 09 7d 0d 09 0d |xtension|);..}...|
|00000ca0| 09 2f 2f 20 6e 6f 77 20 | 62 75 69 6c 64 20 74 68 |.// now |build th|
|00000cb0| 65 20 54 6f 6f 6c 53 65 | 72 76 65 72 20 63 6f 6d |e ToolSe|rver com|
|00000cc0| 6d 61 6e 64 0d 09 7b 0d | 09 09 48 61 6e 64 6c 65 |mand..{.|..Handle|
|00000cd0| 20 63 6f 6d 6d 61 6e 64 | 48 61 6e 64 6c 65 20 3d | command|Handle =|
|00000ce0| 20 4e 65 77 48 61 6e 64 | 6c 65 28 30 29 3b 0d 09 | NewHand|le(0);..|
|00000cf0| 09 41 45 44 65 73 63 20 | 63 6f 6d 6d 61 6e 64 3b |.AEDesc |command;|
|00000d00| 0d 09 09 43 53 74 72 69 | 6e 67 48 61 6e 64 6c 65 |...CStri|ngHandle|
|00000d10| 20 6f 75 74 70 75 74 20 | 3d 20 4e 55 4c 4c 2c 20 | output |= NULL, |
|00000d20| 64 69 61 67 6e 6f 73 74 | 69 63 20 3d 20 4e 55 4c |diagnost|ic = NUL|
|00000d30| 4c 3b 0d 09 09 53 74 72 | 33 31 20 6e 61 6d 65 53 |L;...Str|31 nameS|
|00000d40| 74 65 6d 3b 0d 09 09 0d | 09 09 2f 2f 20 70 61 72 |tem;....|..// par|
|00000d50| 61 6d 65 74 65 72 69 7a | 65 20 74 68 65 20 54 6f |ameteriz|e the To|
|00000d60| 6f 6c 53 65 72 76 65 72 | 20 63 6f 6d 6d 61 6e 64 |olServer| command|
|00000d70| 20 6c 69 6e 65 0d 09 09 | 0d 09 09 69 66 20 28 73 | line...|...if (s|
|00000d80| 74 61 74 75 73 2d 3e 6e | 75 6d 46 6f 6c 64 65 72 |tatus->n|umFolder|
|00000d90| 50 61 74 68 73 20 3e 20 | 30 29 0d 09 09 7b 0d 09 |Paths > |0)...{..|
|00000da0| 09 09 2f 2f 20 61 64 64 | 20 74 68 65 20 49 6e 63 |..// add| the Inc|
|00000db0| 6c 75 64 65 46 69 6c 65 | 73 20 76 61 72 69 61 62 |ludeFile|s variab|
|00000dc0| 6c 65 0d 09 09 09 69 6e | 74 20 69 3b 0d 0d 09 09 |le....in|t i;....|
|00000dd0| 09 50 74 72 41 6e 64 48 | 61 6e 64 28 22 53 65 74 |.PtrAndH|and("Set|
|00000de0| 20 49 6e 63 6c 75 64 65 | 46 69 6c 65 73 20 5c 27 | Include|Files \'|
|00000df0| 22 2c 20 63 6f 6d 6d 61 | 6e 64 48 61 6e 64 6c 65 |", comma|ndHandle|
|00000e00| 2c 20 73 69 7a 65 6f 66 | 28 22 53 65 74 20 49 6e |, sizeof|("Set In|
|00000e10| 63 6c 75 64 65 46 69 6c | 65 73 20 5c 27 22 29 20 |cludeFil|es \'") |
|00000e20| 2d 20 31 29 3b 0d 09 09 | 09 66 6f 72 20 28 69 20 |- 1);...|.for (i |
|00000e30| 3d 20 30 3b 20 69 20 3c | 20 73 74 61 74 75 73 2d |= 0; i <| status-|
|00000e40| 3e 6e 75 6d 46 6f 6c 64 | 65 72 50 61 74 68 73 3b |>numFold|erPaths;|
|00000e50| 20 69 2b 2b 29 0d 09 09 | 09 7b 0d 09 09 09 09 63 | i++)...|.{.....c|
|00000e60| 68 61 72 20 73 70 61 63 | 65 20 3d 20 27 20 27 2c |har spac|e = ' ',|
|00000e70| 20 71 75 6f 74 65 20 3d | 20 27 5c 22 27 3b 0d 09 | quote =| '\"';..|
|00000e80| 09 09 09 42 79 74 65 20 | 73 74 61 74 65 3b 0d 09 |...Byte |state;..|
|00000e90| 09 09 09 0d 09 09 09 09 | 73 74 61 74 65 20 3d 20 |........|state = |
|00000ea0| 48 47 65 74 53 74 61 74 | 65 28 28 48 61 6e 64 6c |HGetStat|e((Handl|
|00000eb0| 65 29 70 72 65 66 73 29 | 3b 0d 09 09 09 09 48 4c |e)prefs)|;.....HL|
|00000ec0| 6f 63 6b 28 28 48 61 6e | 64 6c 65 29 70 72 65 66 |ock((Han|dle)pref|
|00000ed0| 73 29 3b 0d 09 09 09 09 | 50 74 72 41 6e 64 48 61 |s);.....|PtrAndHa|
|00000ee0| 6e 64 28 28 2a 70 72 65 | 66 73 29 2d 3e 65 78 74 |nd((*pre|fs)->ext|
|00000ef0| 65 6e 73 69 6f 6e 73 5b | 63 75 72 72 65 6e 74 45 |ensions[|currentE|
|00000f00| 78 74 65 6e 73 69 6f 6e | 5d 2e 69 6e 63 6c 75 64 |xtension|].includ|
|00000f10| 65 46 69 6c 65 41 72 67 | 20 2b 20 31 2c 0d 09 09 |eFileArg| + 1,...|
|00000f20| 09 09 09 09 09 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |.....com|mandHand|
|00000f30| 6c 65 2c 20 28 2a 70 72 | 65 66 73 29 2d 3e 65 78 |le, (*pr|efs)->ex|
|00000f40| 74 65 6e 73 69 6f 6e 73 | 5b 63 75 72 72 65 6e 74 |tensions|[current|
|00000f50| 45 78 74 65 6e 73 69 6f | 6e 5d 2e 69 6e 63 6c 75 |Extensio|n].inclu|
|00000f60| 64 65 46 69 6c 65 41 72 | 67 5b 30 5d 29 3b 0d 09 |deFileAr|g[0]);..|
|00000f70| 09 09 09 48 53 65 74 53 | 74 61 74 65 28 28 48 61 |...HSetS|tate((Ha|
|00000f80| 6e 64 6c 65 29 70 72 65 | 66 73 2c 20 73 74 61 74 |ndle)pre|fs, stat|
|00000f90| 65 29 3b 0d 09 09 09 09 | 50 74 72 41 6e 64 48 61 |e);.....|PtrAndHa|
|00000fa0| 6e 64 28 26 73 70 61 63 | 65 2c 20 63 6f 6d 6d 61 |nd(&spac|e, comma|
|00000fb0| 6e 64 48 61 6e 64 6c 65 | 2c 20 31 29 3b 0d 09 09 |ndHandle|, 1);...|
|00000fc0| 09 09 50 74 72 41 6e 64 | 48 61 6e 64 28 26 71 75 |..PtrAnd|Hand(&qu|
|00000fd0| 6f 74 65 2c 20 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |ote, com|mandHand|
|00000fe0| 6c 65 2c 20 31 29 3b 0d | 09 09 09 09 48 61 6e 64 |le, 1);.|....Hand|
|00000ff0| 41 6e 64 48 61 6e 64 28 | 73 74 61 74 75 73 2d 3e |AndHand(|status->|
|00001000| 66 6f 6c 64 65 72 50 61 | 74 68 73 5b 69 5d 2e 70 |folderPa|ths[i].p|
|00001010| 61 74 68 2c 20 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |ath, com|mandHand|
|00001020| 6c 65 29 3b 0d 09 09 09 | 09 50 74 72 41 6e 64 48 |le);....|.PtrAndH|
|00001030| 61 6e 64 28 26 71 75 6f | 74 65 2c 20 63 6f 6d 6d |and(&quo|te, comm|
|00001040| 61 6e 64 48 61 6e 64 6c | 65 2c 20 31 29 3b 0d 09 |andHandl|e, 1);..|
|00001050| 09 09 09 50 74 72 41 6e | 64 48 61 6e 64 28 26 73 |...PtrAn|dHand(&s|
|00001060| 70 61 63 65 2c 20 63 6f | 6d 6d 61 6e 64 48 61 6e |pace, co|mmandHan|
|00001070| 64 6c 65 2c 20 31 29 3b | 0d 09 09 09 7d 0d 09 09 |dle, 1);|....}...|
|00001080| 09 50 74 72 41 6e 64 48 | 61 6e 64 28 22 5c 27 3b |.PtrAndH|and("\';|
|00001090| 20 22 2c 20 63 6f 6d 6d | 61 6e 64 48 61 6e 64 6c | ", comm|andHandl|
|000010a0| 65 2c 20 73 69 7a 65 6f | 66 28 22 5c 27 3b 20 22 |e, sizeo|f("\'; "|
|000010b0| 29 20 2d 20 31 29 3b 0d | 09 09 7d 0d 09 09 0d 09 |) - 1);.|..}.....|
|000010c0| 09 2f 2f 20 61 64 64 20 | 74 68 65 20 53 6f 75 72 |.// add |the Sour|
|000010d0| 63 65 46 69 6c 65 20 76 | 61 72 69 61 62 6c 65 20 |ceFile v|ariable |
|000010e0| 2d 2d 20 58 58 58 20 2d | 2d 20 69 66 20 6e 6f 74 |-- XXX -|- if not|
|000010f0| 20 73 61 76 65 64 2c 20 | 75 73 65 20 74 65 6d 70 | saved, |use temp|
|00001100| 20 66 69 6c 65 20 69 6e | 73 74 65 61 64 21 0d 09 | file in|stead!..|
|00001110| 09 7b 0d 09 09 09 48 61 | 6e 64 6c 65 20 66 69 6c |.{....Ha|ndle fil|
|00001120| 65 4e 61 6d 65 3b 0d 09 | 09 09 73 68 6f 72 74 20 |eName;..|..short |
|00001130| 66 69 6c 65 4e 61 6d 65 | 53 69 7a 65 3b 0d 09 09 |fileName|Size;...|
|00001140| 09 0d 09 09 09 50 74 72 | 41 6e 64 48 61 6e 64 28 |.....Ptr|AndHand(|
|00001150| 22 53 65 74 20 53 6f 75 | 72 63 65 46 69 6c 65 20 |"Set Sou|rceFile |
|00001160| 5c 27 22 2c 20 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |\'", com|mandHand|
|00001170| 6c 65 2c 20 73 69 7a 65 | 6f 66 28 22 53 65 74 20 |le, size|of("Set |
|00001180| 53 6f 75 72 63 65 46 69 | 6c 65 20 5c 27 22 29 20 |SourceFi|le \'") |
|00001190| 2d 20 31 29 3b 0d 09 09 | 09 65 72 72 20 3d 20 46 |- 1);...|.err = F|
|000011a0| 53 70 47 65 74 46 75 6c | 6c 50 61 74 68 28 26 73 |SpGetFul|lPath(&s|
|000011b0| 74 61 74 75 73 2d 3e 63 | 70 62 2d 3e 73 6f 75 72 |tatus->c|pb->sour|
|000011c0| 63 65 66 69 6c 65 2c 20 | 26 66 69 6c 65 4e 61 6d |cefile, |&fileNam|
|000011d0| 65 53 69 7a 65 2c 20 26 | 66 69 6c 65 4e 61 6d 65 |eSize, &|fileName|
|000011e0| 29 3b 0d 09 09 09 69 66 | 20 28 65 72 72 20 3d 3d |);....if| (err ==|
|000011f0| 20 6e 6f 45 72 72 29 0d | 09 09 09 7b 0d 09 09 09 | noErr).|...{....|
|00001200| 09 48 61 6e 64 41 6e 64 | 48 61 6e 64 28 66 69 6c |.HandAnd|Hand(fil|
|00001210| 65 4e 61 6d 65 2c 20 63 | 6f 6d 6d 61 6e 64 48 61 |eName, c|ommandHa|
|00001220| 6e 64 6c 65 29 3b 0d 09 | 09 09 09 44 69 73 70 6f |ndle);..|...Dispo|
|00001230| 73 65 48 61 6e 64 6c 65 | 28 66 69 6c 65 4e 61 6d |seHandle|(fileNam|
|00001240| 65 29 3b 0d 09 09 09 09 | 50 74 72 41 6e 64 48 61 |e);.....|PtrAndHa|
|00001250| 6e 64 28 22 5c 27 3b 20 | 22 2c 20 63 6f 6d 6d 61 |nd("\'; |", comma|
|00001260| 6e 64 48 61 6e 64 6c 65 | 2c 20 73 69 7a 65 6f 66 |ndHandle|, sizeof|
|00001270| 28 22 5c 27 3b 20 22 29 | 20 2d 20 31 29 3b 0d 09 |("\'; ")| - 1);..|
|00001280| 09 09 7d 0d 09 09 7d 0d | 09 0d 09 09 2f 2f 20 61 |..}...}.|....// a|
|00001290| 64 64 20 74 68 65 20 53 | 6f 75 72 63 65 46 69 6c |dd the S|ourceFil|
|000012a0| 65 53 74 65 6d 20 76 61 | 72 69 61 62 6c 65 0d 09 |eStem va|riable..|
|000012b0| 09 69 66 20 28 65 72 72 | 20 3d 3d 20 6e 6f 45 72 |.if (err| == noEr|
|000012c0| 72 29 0d 09 09 7b 0d 09 | 09 09 69 6e 74 20 69 3b |r)...{..|..int i;|
|000012d0| 0d 09 09 09 0d 09 09 09 | 42 6c 6f 63 6b 4d 6f 76 |........|BlockMov|
|000012e0| 65 44 61 74 61 28 73 74 | 61 74 75 73 2d 3e 63 70 |eData(st|atus->cp|
|000012f0| 62 2d 3e 73 6f 75 72 63 | 65 66 69 6c 65 2e 6e 61 |b->sourc|efile.na|
|00001300| 6d 65 2c 20 6e 61 6d 65 | 53 74 65 6d 2c 20 73 74 |me, name|Stem, st|
|00001310| 61 74 75 73 2d 3e 63 70 | 62 2d 3e 73 6f 75 72 63 |atus->cp|b->sourc|
|00001320| 65 66 69 6c 65 2e 6e 61 | 6d 65 5b 30 5d 20 2b 20 |efile.na|me[0] + |
|00001330| 31 29 3b 0d 09 09 09 66 | 6f 72 20 28 69 20 3d 20 |1);....f|or (i = |
|00001340| 6e 61 6d 65 53 74 65 6d | 5b 30 5d 3b 20 69 20 3e |nameStem|[0]; i >|
|00001350| 20 30 3b 20 69 2d 2d 29 | 0d 09 09 09 7b 0d 09 09 | 0; i--)|....{...|
|00001360| 09 09 69 66 20 28 6e 61 | 6d 65 53 74 65 6d 5b 69 |..if (na|meStem[i|
|00001370| 5d 20 3d 3d 20 27 2e 27 | 29 0d 09 09 09 09 7b 0d |] == '.'|).....{.|
|00001380| 09 09 09 09 09 6e 61 6d | 65 53 74 65 6d 5b 30 5d |.....nam|eStem[0]|
|00001390| 20 3d 20 69 20 2d 20 31 | 3b 0d 09 09 09 09 09 62 | = i - 1|;......b|
|000013a0| 72 65 61 6b 3b 0d 09 09 | 09 09 7d 0d 09 09 09 7d |reak;...|..}....}|
|000013b0| 0d 09 09 09 0d 09 09 09 | 50 74 72 41 6e 64 48 61 |........|PtrAndHa|
|000013c0| 6e 64 28 22 53 65 74 20 | 53 6f 75 72 63 65 46 69 |nd("Set |SourceFi|
|000013d0| 6c 65 53 74 65 6d 20 5c | 27 22 2c 20 63 6f 6d 6d |leStem \|'", comm|
|000013e0| 61 6e 64 48 61 6e 64 6c | 65 2c 20 73 69 7a 65 6f |andHandl|e, sizeo|
|000013f0| 66 28 22 53 65 74 20 53 | 6f 75 72 63 65 46 69 6c |f("Set S|ourceFil|
|00001400| 65 53 74 65 6d 20 5c 27 | 22 29 20 2d 20 31 29 3b |eStem \'|") - 1);|
|00001410| 0d 09 09 09 50 74 72 41 | 6e 64 48 61 6e 64 28 6e |....PtrA|ndHand(n|
|00001420| 61 6d 65 53 74 65 6d 20 | 2b 20 31 2c 20 63 6f 6d |ameStem |+ 1, com|
|00001430| 6d 61 6e 64 48 61 6e 64 | 6c 65 2c 20 6e 61 6d 65 |mandHand|le, name|
|00001440| 53 74 65 6d 5b 30 5d 29 | 3b 0d 09 09 09 50 74 72 |Stem[0])|;....Ptr|
|00001450| 41 6e 64 48 61 6e 64 28 | 22 5c 27 3b 20 22 2c 20 |AndHand(|"\'; ", |
|00001460| 63 6f 6d 6d 61 6e 64 48 | 61 6e 64 6c 65 2c 20 73 |commandH|andle, s|
|00001470| 69 7a 65 6f 66 28 22 5c | 27 3b 20 22 29 20 2d 20 |izeof("\|'; ") - |
|00001480| 31 29 3b 0d 09 09 7d 0d | 09 09 0d 09 09 2f 2f 20 |1);...}.|.....// |
|00001490| 61 64 64 20 74 68 65 20 | 44 69 72 65 63 74 6f 72 |add the |Director|
|000014a0| 79 20 63 6f 6d 6d 61 6e | 64 20 74 6f 20 67 6f 20 |y comman|d to go |
|000014b0| 74 6f 20 74 68 65 20 70 | 72 6f 6a 65 63 74 20 66 |to the p|roject f|
|000014c0| 6f 6c 64 65 72 0d 09 09 | 69 66 20 28 65 72 72 20 |older...|if (err |
|000014d0| 3d 3d 20 6e 6f 45 72 72 | 29 0d 09 09 7b 0d 09 09 |== noErr|)...{...|
|000014e0| 09 73 68 6f 72 74 20 64 | 69 72 4e 61 6d 65 4c 65 |.short d|irNameLe|
|000014f0| 6e 67 74 68 3b 0d 09 09 | 09 48 61 6e 64 6c 65 20 |ngth;...|.Handle |
|00001500| 64 69 72 4e 61 6d 65 3b | 0d 09 09 09 0d 09 09 09 |dirName;|........|
|00001510| 65 72 72 20 3d 20 47 65 | 74 46 75 6c 6c 50 61 74 |err = Ge|tFullPat|
|00001520| 68 28 73 74 61 74 75 73 | 2d 3e 63 70 62 2d 3e 74 |h(status|->cpb->t|
|00001530| 61 72 67 65 74 66 69 6c | 65 2e 76 52 65 66 4e 75 |argetfil|e.vRefNu|
|00001540| 6d 2c 20 73 74 61 74 75 | 73 2d 3e 63 70 62 2d 3e |m, statu|s->cpb->|
|00001550| 74 61 72 67 65 74 66 69 | 6c 65 2e 70 61 72 49 44 |targetfi|le.parID|
|00001560| 2c 20 4e 55 4c 4c 2c 20 | 26 64 69 72 4e 61 6d 65 |, NULL, |&dirName|
|00001570| 4c 65 6e 67 74 68 2c 20 | 26 64 69 72 4e 61 6d 65 |Length, |&dirName|
|00001580| 29 3b 0d 09 09 09 0d 09 | 09 09 69 66 20 28 65 72 |);......|..if (er|
|00001590| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 09 7b |r == noE|rr)....{|
|000015a0| 0d 09 09 09 09 50 74 72 | 41 6e 64 48 61 6e 64 28 |.....Ptr|AndHand(|
|000015b0| 22 44 69 72 65 63 74 6f | 72 79 20 5c 27 22 2c 20 |"Directo|ry \'", |
|000015c0| 63 6f 6d 6d 61 6e 64 48 | 61 6e 64 6c 65 2c 20 73 |commandH|andle, s|
|000015d0| 69 7a 65 6f 66 28 22 44 | 69 72 65 63 74 6f 72 79 |izeof("D|irectory|
|000015e0| 20 5c 27 22 29 20 2d 20 | 31 29 3b 0d 09 09 09 09 | \'") - |1);.....|
|000015f0| 48 61 6e 64 41 6e 64 48 | 61 6e 64 28 64 69 72 4e |HandAndH|and(dirN|
|00001600| 61 6d 65 2c 20 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |ame, com|mandHand|
|00001610| 6c 65 29 3b 0d 09 09 09 | 09 50 74 72 41 6e 64 48 |le);....|.PtrAndH|
|00001620| 61 6e 64 28 22 5c 27 3b | 20 22 2c 20 63 6f 6d 6d |and("\';| ", comm|
|00001630| 61 6e 64 48 61 6e 64 6c | 65 2c 20 73 69 7a 65 6f |andHandl|e, sizeo|
|00001640| 66 28 22 5c 27 3b 20 22 | 29 20 2d 20 31 29 3b 0d |f("\'; "|) - 1);.|
|00001650| 09 09 09 09 44 69 73 70 | 6f 73 65 48 61 6e 64 6c |....Disp|oseHandl|
|00001660| 65 28 64 69 72 4e 61 6d | 65 29 3b 0d 09 09 09 7d |e(dirNam|e);....}|
|00001670| 0d 09 09 7d 0d 09 09 0d | 09 09 2f 2f 20 61 64 64 |...}....|..// add|
|00001680| 20 74 68 65 20 45 78 65 | 63 75 74 65 20 63 6f 6d | the Exe|cute com|
|00001690| 6d 61 6e 64 20 66 6f 72 | 20 74 68 65 20 73 63 72 |mand for| the scr|
|000016a0| 69 70 74 20 69 6e 63 6c | 75 64 65 20 66 69 6c 65 |ipt incl|ude file|
|000016b0| 2c 20 69 66 20 61 6e 79 | 0d 09 09 69 66 20 28 28 |, if any|...if ((|
|000016c0| 65 72 72 20 3d 3d 20 6e | 6f 45 72 72 29 20 26 26 |err == n|oErr) &&|
|000016d0| 20 28 2a 70 72 65 66 73 | 29 2d 3e 73 63 72 69 70 | (*prefs|)->scrip|
|000016e0| 74 49 6e 63 6c 75 64 65 | 46 69 6c 65 5b 30 5d 20 |tInclude|File[0] |
|000016f0| 21 3d 20 30 29 0d 09 09 | 7b 0d 09 09 09 53 74 72 |!= 0)...|{....Str|
|00001700| 33 31 20 69 6e 63 6c 75 | 64 65 46 69 6c 65 4e 61 |31 inclu|deFileNa|
|00001710| 6d 65 3b 0d 09 09 09 46 | 53 53 70 65 63 20 69 6e |me;....F|SSpec in|
|00001720| 63 6c 75 64 65 53 70 65 | 63 3b 0d 09 09 09 42 6f |cludeSpe|c;....Bo|
|00001730| 6f 6c 65 61 6e 20 61 6c | 72 65 61 64 79 69 6e 63 |olean al|readyinc|
|00001740| 6c 75 64 65 64 3b 0d 09 | 09 09 48 61 6e 64 6c 65 |luded;..|..Handle|
|00001750| 20 68 61 6e 64 20 3d 20 | 4e 55 4c 4c 3b 0d 09 09 | hand = |NULL;...|
|00001760| 09 6c 6f 6e 67 20 73 69 | 7a 65 3b 0d 09 09 09 0d |.long si|ze;.....|
|00001770| 09 09 09 42 79 74 65 20 | 73 74 61 74 65 20 3d 20 |...Byte |state = |
|00001780| 48 47 65 74 53 74 61 74 | 65 28 28 48 61 6e 64 6c |HGetStat|e((Handl|
|00001790| 65 29 70 72 65 66 73 29 | 3b 0d 09 09 09 48 4c 6f |e)prefs)|;....HLo|
|000017a0| 63 6b 28 28 48 61 6e 64 | 6c 65 29 70 72 65 66 73 |ck((Hand|le)prefs|
|000017b0| 29 3b 0d 09 09 09 42 6c | 6f 63 6b 4d 6f 76 65 44 |);....Bl|ockMoveD|
|000017c0| 61 74 61 28 28 2a 70 72 | 65 66 73 29 2d 3e 73 63 |ata((*pr|efs)->sc|
|000017d0| 72 69 70 74 49 6e 63 6c | 75 64 65 46 69 6c 65 2c |riptIncl|udeFile,|
|000017e0| 20 69 6e 63 6c 75 64 65 | 46 69 6c 65 4e 61 6d 65 | include|FileName|
|000017f0| 2c 0d 09 09 09 09 09 09 | 20 20 28 2a 70 72 65 66 |,.......| (*pref|
|00001800| 73 29 2d 3e 73 63 72 69 | 70 74 49 6e 63 6c 75 64 |s)->scri|ptInclud|
|00001810| 65 46 69 6c 65 5b 30 5d | 20 2b 20 31 29 3b 0d 09 |eFile[0]| + 1);..|
|00001820| 09 09 48 53 65 74 53 74 | 61 74 65 28 28 48 61 6e |..HSetSt|ate((Han|
|00001830| 64 6c 65 29 70 72 65 66 | 73 2c 20 73 74 61 74 65 |dle)pref|s, state|
|00001840| 29 3b 0d 09 09 09 0d 09 | 09 09 65 72 72 20 3d 20 |);......|..err = |
|00001850| 43 57 43 6f 6d 70 46 69 | 6e 64 49 6e 63 6c 75 64 |CWCompFi|ndInclud|
|00001860| 65 46 69 6c 65 28 73 74 | 61 74 75 73 2d 3e 63 70 |eFile(st|atus->cp|
|00001870| 62 2c 20 69 6e 63 6c 75 | 64 65 46 69 6c 65 4e 61 |b, inclu|deFileNa|
|00001880| 6d 65 2c 20 74 72 75 65 | 2c 20 26 68 61 6e 64 2c |me, true|, &hand,|
|00001890| 20 26 73 69 7a 65 2c 0d | 09 09 09 09 09 09 09 09 | &size,.|........|
|000018a0| 09 09 26 69 6e 63 6c 75 | 64 65 53 70 65 63 2c 20 |..&inclu|deSpec, |
|000018b0| 26 61 6c 72 65 61 64 79 | 69 6e 63 6c 75 64 65 64 |&already|included|
|000018c0| 2c 20 66 61 6c 73 65 29 | 3b 0d 09 09 09 69 66 20 |, false)|;....if |
|000018d0| 28 65 72 72 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |(err != |noErr)..|
|000018e0| 09 09 7b 0d 09 09 09 09 | 43 57 43 6f 6d 70 4f 53 |..{.....|CWCompOS|
|000018f0| 45 72 72 6f 72 4d 65 73 | 73 61 67 65 28 73 74 61 |ErrorMes|sage(sta|
|00001900| 74 75 73 2d 3e 63 70 62 | 2c 20 22 54 68 65 20 69 |tus->cpb|, "The i|
|00001910| 6e 63 6c 75 64 65 20 66 | 69 6c 65 20 63 6f 75 6c |nclude f|ile coul|
|00001920| 64 20 6e 6f 74 20 62 65 | 20 66 6f 75 6e 64 2e 22 |d not be| found."|
|00001930| 2c 20 65 72 72 29 3b 0d | 09 09 09 7d 0d 09 09 09 |, err);.|...}....|
|00001940| 65 6c 73 65 0d 09 09 09 | 7b 0d 09 09 09 09 73 68 |else....|{.....sh|
|00001950| 6f 72 74 20 69 6e 63 4e | 61 6d 65 4c 65 6e 67 74 |ort incN|ameLengt|
|00001960| 68 3b 0d 09 09 09 09 48 | 61 6e 64 6c 65 20 69 6e |h;.....H|andle in|
|00001970| 63 4e 61 6d 65 3b 0d 09 | 09 09 09 0d 09 09 09 09 |cName;..|........|
|00001980| 69 66 20 28 68 61 6e 64 | 20 21 3d 20 4e 55 4c 4c |if (hand| != NULL|
|00001990| 29 0d 09 09 09 09 7b 0d | 09 09 09 09 09 2f 2f 20 |).....{.|.....// |
|000019a0| 58 58 58 20 2d 2d 20 66 | 69 6c 65 20 69 73 20 6f |XXX -- f|ile is o|
|000019b0| 70 65 6e 20 69 6e 20 49 | 44 45 20 77 69 6e 64 6f |pen in I|DE windo|
|000019c0| 77 20 2d 2d 20 75 73 65 | 20 74 65 6d 70 20 66 69 |w -- use| temp fi|
|000019d0| 6c 65 20 65 76 65 6e 74 | 75 61 6c 6c 79 0d 09 09 |le event|ually...|
|000019e0| 09 09 09 43 57 43 6f 6d | 70 45 72 72 6f 72 4d 65 |...CWCom|pErrorMe|
|000019f0| 73 73 61 67 65 28 73 74 | 61 74 75 73 2d 3e 63 70 |ssage(st|atus->cp|
|00001a00| 62 2c 20 22 54 68 65 20 | 69 6e 63 6c 75 64 65 20 |b, "The |include |
|00001a10| 66 69 6c 65 20 69 73 20 | 6f 70 65 6e 2e 20 50 6c |file is |open. Pl|
|00001a20| 65 61 73 65 20 63 6c 6f | 73 65 20 69 74 20 66 69 |ease clo|se it fi|
|00001a30| 72 73 74 2e 22 29 3b 0d | 09 09 09 09 09 65 72 72 |rst.");.|.....err|
|00001a40| 20 3d 20 70 61 72 61 6d | 45 72 72 3b 0d 09 09 09 | = param|Err;....|
|00001a50| 09 7d 0d 09 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |.}.....e|lse.....|
|00001a60| 7b 0d 09 09 09 09 09 65 | 72 72 20 3d 20 46 53 70 |{......e|rr = FSp|
|00001a70| 47 65 74 46 75 6c 6c 50 | 61 74 68 28 26 69 6e 63 |GetFullP|ath(&inc|
|00001a80| 6c 75 64 65 53 70 65 63 | 2c 20 26 69 6e 63 4e 61 |ludeSpec|, &incNa|
|00001a90| 6d 65 4c 65 6e 67 74 68 | 2c 20 26 69 6e 63 4e 61 |meLength|, &incNa|
|00001aa0| 6d 65 29 3b 0d 09 09 09 | 09 09 69 66 20 28 65 72 |me);....|..if (er|
|00001ab0| 72 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 09 09 |r != noE|rr).....|
|00001ac0| 09 7b 0d 09 09 09 09 09 | 09 43 57 43 6f 6d 70 4f |.{......|.CWCompO|
|00001ad0| 53 45 72 72 6f 72 4d 65 | 73 73 61 67 65 28 73 74 |SErrorMe|ssage(st|
|00001ae0| 61 74 75 73 2d 3e 63 70 | 62 2c 20 22 45 72 72 6f |atus->cp|b, "Erro|
|00001af0| 72 20 67 65 74 74 69 6e | 67 20 66 75 6c 6c 20 70 |r gettin|g full p|
|00001b00| 61 74 68 20 6e 61 6d 65 | 20 66 72 6f 6d 20 69 6e |ath name| from in|
|00001b10| 63 6c 75 64 65 20 66 69 | 6c 65 2e 22 2c 20 65 72 |clude fi|le.", er|
|00001b20| 72 29 3b 0d 09 09 09 09 | 09 7d 0d 09 09 09 09 09 |r);.....|.}......|
|00001b30| 65 6c 73 65 0d 09 09 09 | 09 09 7b 0d 09 09 09 09 |else....|..{.....|
|00001b40| 09 09 50 74 72 41 6e 64 | 48 61 6e 64 28 22 45 78 |..PtrAnd|Hand("Ex|
|00001b50| 65 63 75 74 65 20 5c 27 | 22 2c 20 63 6f 6d 6d 61 |ecute \'|", comma|
|00001b60| 6e 64 48 61 6e 64 6c 65 | 2c 20 73 69 7a 65 6f 66 |ndHandle|, sizeof|
|00001b70| 28 22 45 78 65 63 75 74 | 65 20 5c 27 22 29 20 2d |("Execut|e \'") -|
|00001b80| 20 31 29 3b 0d 09 09 09 | 09 09 09 48 61 6e 64 41 | 1);....|...HandA|
|00001b90| 6e 64 48 61 6e 64 28 69 | 6e 63 4e 61 6d 65 2c 20 |ndHand(i|ncName, |
|00001ba0| 63 6f 6d 6d 61 6e 64 48 | 61 6e 64 6c 65 29 3b 0d |commandH|andle);.|
|00001bb0| 09 09 09 09 09 09 50 74 | 72 41 6e 64 48 61 6e 64 |......Pt|rAndHand|
|00001bc0| 28 22 5c 27 3b 20 22 2c | 20 63 6f 6d 6d 61 6e 64 |("\'; ",| command|
|00001bd0| 48 61 6e 64 6c 65 2c 20 | 73 69 7a 65 6f 66 28 22 |Handle, |sizeof("|
|00001be0| 5c 27 3b 20 22 29 20 2d | 20 31 29 3b 0d 09 09 09 |\'; ") -| 1);....|
|00001bf0| 09 09 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |...Dispo|seHandle|
|00001c00| 28 69 6e 63 4e 61 6d 65 | 29 3b 0d 09 09 09 09 09 |(incName|);......|
|00001c10| 7d 0d 09 09 09 09 7d 0d | 09 09 09 7d 0d 09 09 7d |}.....}.|...}...}|
|00001c20| 0d 0d 09 09 2f 2f 20 61 | 64 64 20 74 68 65 20 74 |....// a|dd the t|
|00001c30| 65 6d 70 6c 61 74 65 20 | 63 6f 6d 6d 61 6e 64 20 |emplate |command |
|00001c40| 6c 69 6e 65 20 66 72 6f | 6d 20 70 72 65 66 73 0d |line fro|m prefs.|
|00001c50| 09 09 69 66 20 28 65 72 | 72 20 3d 3d 20 6e 6f 45 |..if (er|r == noE|
|00001c60| 72 72 29 0d 09 09 7b 0d | 09 09 09 42 79 74 65 20 |rr)...{.|...Byte |
|00001c70| 73 74 61 74 65 20 3d 20 | 48 47 65 74 53 74 61 74 |state = |HGetStat|
|00001c80| 65 28 28 48 61 6e 64 6c | 65 29 70 72 65 66 73 29 |e((Handl|e)prefs)|
|00001c90| 3b 0d 09 09 09 48 4c 6f | 63 6b 28 28 48 61 6e 64 |;....HLo|ck((Hand|
|00001ca0| 6c 65 29 70 72 65 66 73 | 29 3b 0d 09 09 09 50 74 |le)prefs|);....Pt|
|00001cb0| 72 41 6e 64 48 61 6e 64 | 28 28 2a 70 72 65 66 73 |rAndHand|((*prefs|
|00001cc0| 29 2d 3e 65 78 74 65 6e | 73 69 6f 6e 73 5b 63 75 |)->exten|sions[cu|
|00001cd0| 72 72 65 6e 74 45 78 74 | 65 6e 73 69 6f 6e 5d 2e |rrentExt|ension].|
|00001ce0| 63 6f 6d 6d 61 6e 64 54 | 65 6d 70 6c 61 74 65 20 |commandT|emplate |
|00001cf0| 2b 20 31 2c 20 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |+ 1, com|mandHand|
|00001d00| 6c 65 2c 0d 09 09 09 09 | 09 09 28 2a 70 72 65 66 |le,.....|..(*pref|
|00001d10| 73 29 2d 3e 65 78 74 65 | 6e 73 69 6f 6e 73 5b 63 |s)->exte|nsions[c|
|00001d20| 75 72 72 65 6e 74 45 78 | 74 65 6e 73 69 6f 6e 5d |urrentEx|tension]|
|00001d30| 2e 63 6f 6d 6d 61 6e 64 | 54 65 6d 70 6c 61 74 65 |.command|Template|
|00001d40| 5b 30 5d 29 3b 0d 09 09 | 09 48 53 65 74 53 74 61 |[0]);...|.HSetSta|
|00001d50| 74 65 28 28 48 61 6e 64 | 6c 65 29 70 72 65 66 73 |te((Hand|le)prefs|
|00001d60| 2c 20 73 74 61 74 65 29 | 3b 0d 09 09 7d 0d 0d 09 |, state)|;...}...|
|00001d70| 09 2f 2f 20 6d 61 6b 65 | 20 74 68 65 20 54 6f 6f |.// make| the Too|
|00001d80| 6c 53 65 72 76 65 72 20 | 63 6f 6d 6d 61 6e 64 09 |lServer |command.|
|00001d90| 09 0d 09 09 69 66 20 28 | 65 72 72 20 3d 3d 20 6e |....if (|err == n|
|00001da0| 6f 45 72 72 29 0d 09 09 | 7b 0d 09 09 09 48 4c 6f |oErr)...|{....HLo|
|00001db0| 63 6b 28 63 6f 6d 6d 61 | 6e 64 48 61 6e 64 6c 65 |ck(comma|ndHandle|
|00001dc0| 29 3b 0d 09 09 09 63 6f | 6d 6d 61 6e 64 2e 64 65 |);....co|mmand.de|
|00001dd0| 73 63 72 69 70 74 6f 72 | 54 79 70 65 20 3d 20 74 |scriptor|Type = t|
|00001de0| 79 70 65 4e 75 6c 6c 3b | 0d 09 09 09 63 6f 6d 6d |ypeNull;|....comm|
|00001df0| 61 6e 64 2e 64 61 74 61 | 48 61 6e 64 6c 65 20 3d |and.data|Handle =|
|00001e00| 20 4e 55 4c 4c 3b 0d 09 | 09 09 65 72 72 20 3d 20 | NULL;..|..err = |
|00001e10| 41 45 43 72 65 61 74 65 | 4c 69 73 74 28 4e 55 4c |AECreate|List(NUL|
|00001e20| 4c 2c 20 30 2c 20 66 61 | 6c 73 65 2c 20 26 63 6f |L, 0, fa|lse, &co|
|00001e30| 6d 6d 61 6e 64 29 3b 0d | 09 09 09 69 66 20 28 65 |mmand);.|...if (e|
|00001e40| 72 72 20 3d 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |rr == no|Err)....|
|00001e50| 09 65 72 72 20 3d 20 41 | 45 50 75 74 50 74 72 28 |.err = A|EPutPtr(|
|00001e60| 26 63 6f 6d 6d 61 6e 64 | 2c 20 30 2c 20 74 79 70 |&command|, 0, typ|
|00001e70| 65 43 68 61 72 2c 20 2a | 63 6f 6d 6d 61 6e 64 48 |eChar, *|commandH|
|00001e80| 61 6e 64 6c 65 2c 20 47 | 65 74 48 61 6e 64 6c 65 |andle, G|etHandle|
|00001e90| 53 69 7a 65 28 63 6f 6d | 6d 61 6e 64 48 61 6e 64 |Size(com|mandHand|
|00001ea0| 6c 65 29 29 3b 0d 09 09 | 7d 0d 09 09 44 69 73 70 |le));...|}...Disp|
|00001eb0| 6f 73 65 48 61 6e 64 6c | 65 28 63 6f 6d 6d 61 6e |oseHandl|e(comman|
|00001ec0| 64 48 61 6e 64 6c 65 29 | 3b 0d 09 09 0d 09 09 69 |dHandle)|;......i|
|00001ed0| 66 20 28 65 72 72 20 3d | 3d 20 6e 6f 45 72 72 29 |f (err =|= noErr)|
|00001ee0| 0d 09 09 7b 0d 09 09 09 | 2f 2f 20 58 58 58 20 63 |...{....|// XXX c|
|00001ef0| 72 65 61 74 65 20 61 20 | 70 72 6f 67 72 65 73 73 |reate a |progress|
|00001f00| 20 69 6e 64 69 63 61 74 | 6f 72 20 77 69 6e 64 6f | indicat|or windo|
|00001f10| 77 0d 09 0d 09 09 09 2f | 2f 20 73 65 6e 64 20 74 |w....../|/ send t|
|00001f20| 68 65 20 54 6f 6f 6c 53 | 65 72 76 65 72 20 63 6f |he ToolS|erver co|
|00001f30| 6d 6d 61 6e 64 20 2d 2d | 20 58 58 58 20 77 69 74 |mmand --| XXX wit|
|00001f40| 68 20 70 72 6f 67 72 65 | 73 73 20 69 6e 64 69 63 |h progre|ss indic|
|00001f50| 61 74 6f 72 20 69 64 6c | 65 50 72 6f 63 0d 09 09 |ator idl|eProc...|
|00001f60| 09 65 72 72 20 3d 20 54 | 6f 6f 6c 53 65 72 76 65 |.err = T|oolServe|
|00001f70| 72 43 6f 6d 6d 61 6e 64 | 28 26 63 6f 6d 6d 61 6e |rCommand|(&comman|
|00001f80| 64 2c 20 26 6f 75 74 70 | 75 74 2c 20 26 64 69 61 |d, &outp|ut, &dia|
|00001f90| 67 6e 6f 73 74 69 63 2c | 20 4e 55 4c 4c 2c 20 4e |gnostic,| NULL, N|
|00001fa0| 55 4c 4c 29 3b 0d 09 09 | 09 41 45 44 69 73 70 6f |ULL);...|.AEDispo|
|00001fb0| 73 65 44 65 73 63 28 26 | 63 6f 6d 6d 61 6e 64 29 |seDesc(&|command)|
|00001fc0| 3b 0d 09 0d 09 09 09 2f | 2f 20 58 58 58 20 72 65 |;....../|/ XXX re|
|00001fd0| 6d 6f 76 65 20 74 68 65 | 20 70 72 6f 67 72 65 73 |move the| progres|
|00001fe0| 73 20 69 6e 64 69 63 61 | 74 6f 72 0d 0d 09 09 09 |s indica|tor.....|
|00001ff0| 2f 2f 20 73 68 6f 77 20 | 6e 75 6d 62 65 72 20 6f |// show |number o|
|00002000| 66 20 6c 69 6e 65 73 20 | 70 72 6f 63 65 73 73 65 |f lines |processe|
|00002010| 64 0d 09 09 09 43 57 43 | 6f 6d 70 44 69 73 70 6c |d....CWC|ompDispl|
|00002020| 61 79 4c 69 6e 65 73 28 | 73 74 61 74 75 73 2d 3e |ayLines(|status->|
|00002030| 63 70 62 2c 20 73 74 61 | 74 75 73 2d 3e 6c 69 6e |cpb, sta|tus->lin|
|00002040| 65 63 6f 75 6e 74 29 3b | 0d 0d 09 09 09 2f 2f 20 |ecount);|.....// |
|00002050| 64 69 73 70 6c 61 79 20 | 61 6e 79 20 64 69 61 67 |display |any diag|
|00002060| 6e 6f 73 74 69 63 20 72 | 65 73 75 6c 74 0d 09 09 |nostic r|esult...|
|00002070| 09 69 66 20 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |.if (err| != noEr|
|00002080| 72 29 0d 09 09 09 7b 0d | 09 09 09 09 69 66 20 28 |r)....{.|....if (|
|00002090| 64 69 61 67 6e 6f 73 74 | 69 63 20 21 3d 20 4e 55 |diagnost|ic != NU|
|000020a0| 4c 4c 29 0d 09 09 09 09 | 7b 0d 09 09 09 09 09 63 |LL).....|{......c|
|000020b0| 68 61 72 20 6e 75 6c 6c | 20 3d 20 30 3b 0d 09 09 |har null| = 0;...|
|000020c0| 09 09 09 50 74 72 41 6e | 64 48 61 6e 64 28 26 6e |...PtrAn|dHand(&n|
|000020d0| 75 6c 6c 2c 20 28 48 61 | 6e 64 6c 65 29 64 69 61 |ull, (Ha|ndle)dia|
|000020e0| 67 6e 6f 73 74 69 63 2c | 20 31 29 3b 0d 09 09 09 |gnostic,| 1);....|
|000020f0| 09 09 48 4c 6f 63 6b 28 | 28 48 61 6e 64 6c 65 29 |..HLock(|(Handle)|
|00002100| 64 69 61 67 6e 6f 73 74 | 69 63 29 3b 0d 09 09 09 |diagnost|ic);....|
|00002110| 09 09 43 57 43 6f 6d 70 | 45 72 72 6f 72 4d 65 73 |..CWComp|ErrorMes|
|00002120| 73 61 67 65 28 73 74 61 | 74 75 73 2d 3e 63 70 62 |sage(sta|tus->cpb|
|00002130| 2c 20 28 63 6f 6e 73 74 | 20 63 68 61 72 2a 29 2a |, (const| char*)*|
|00002140| 64 69 61 67 6e 6f 73 74 | 69 63 29 3b 0d 09 09 09 |diagnost|ic);....|
|00002150| 09 7d 0d 09 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |.}.....e|lse.....|
|00002160| 7b 0d 09 09 09 09 09 43 | 57 43 6f 6d 70 4f 53 45 |{......C|WCompOSE|
|00002170| 72 72 6f 72 4d 65 73 73 | 61 67 65 28 73 74 61 74 |rrorMess|age(stat|
|00002180| 75 73 2d 3e 63 70 62 2c | 20 22 54 6f 6f 6c 53 65 |us->cpb,| "ToolSe|
|00002190| 72 76 65 72 20 65 72 72 | 6f 72 2e 20 22 2c 20 65 |rver err|or. ", e|
|000021a0| 72 72 29 3b 0d 09 09 09 | 09 7d 0d 09 09 09 7d 0d |rr);....|.}....}.|
|000021b0| 23 69 66 20 30 0d 09 09 | 09 65 6c 73 65 0d 09 09 |#if 0...|.else...|
|000021c0| 09 7b 0d 09 09 09 09 2f | 2f 20 58 58 58 20 74 65 |.{...../|/ XXX te|
|000021d0| 73 74 20 63 6f 64 65 20 | 66 6f 72 20 61 20 66 75 |st code |for a fu|
|000021e0| 74 75 72 65 20 76 65 72 | 73 69 6f 6e 0d 09 09 09 |ture ver|sion....|
|000021f0| 09 46 53 53 70 65 63 20 | 74 65 73 74 53 70 65 63 |.FSSpec |testSpec|
|00002200| 3b 0d 09 09 09 09 75 6e | 73 69 67 6e 65 64 20 6c |;.....un|signed l|
|00002210| 6f 6e 67 20 74 69 6d 65 | 3b 0d 09 09 09 09 48 61 |ong time|;.....Ha|
|00002220| 6e 64 6c 65 20 70 61 74 | 68 3b 0d 09 09 09 09 73 |ndle pat|h;.....s|
|00002230| 68 6f 72 74 20 6c 65 6e | 3b 0d 09 09 09 09 63 68 |hort len|;.....ch|
|00002240| 61 72 20 63 3b 0d 09 09 | 09 09 0d 09 09 09 09 74 |ar c;...|.......t|
|00002250| 65 73 74 53 70 65 63 2e | 76 52 65 66 4e 75 6d 20 |estSpec.|vRefNum |
|00002260| 3d 20 73 74 61 74 75 73 | 2d 3e 63 70 62 2d 3e 74 |= status|->cpb->t|
|00002270| 61 72 67 65 74 66 69 6c | 65 2e 76 52 65 66 4e 75 |argetfil|e.vRefNu|
|00002280| 6d 3b 0d 09 09 09 09 74 | 65 73 74 53 70 65 63 2e |m;.....t|estSpec.|
|00002290| 70 61 72 49 44 20 3d 20 | 73 74 61 74 75 73 2d 3e |parID = |status->|
|000022a0| 63 70 62 2d 3e 74 61 72 | 67 65 74 66 69 6c 65 2e |cpb->tar|getfile.|
|000022b0| 70 61 72 49 44 3b 0d 09 | 09 09 09 42 6c 6f 63 6b |parID;..|...Block|
|000022c0| 4d 6f 76 65 44 61 74 61 | 28 6e 61 6d 65 53 74 65 |MoveData|(nameSte|
|000022d0| 6d 2c 20 74 65 73 74 53 | 70 65 63 2e 6e 61 6d 65 |m, testS|pec.name|
|000022e0| 2c 20 6e 61 6d 65 53 74 | 65 6d 5b 30 5d 20 2b 20 |, nameSt|em[0] + |
|000022f0| 31 29 3b 0d 09 09 09 09 | 42 6c 6f 63 6b 4d 6f 76 |1);.....|BlockMov|
|00002300| 65 44 61 74 61 28 22 2e | 78 68 22 2c 20 74 65 73 |eData(".|xh", tes|
|00002310| 74 53 70 65 63 2e 6e 61 | 6d 65 20 2b 20 6e 61 6d |tSpec.na|me + nam|
|00002320| 65 53 74 65 6d 5b 30 5d | 20 2b 20 31 2c 20 33 29 |eStem[0]| + 1, 3)|
|00002330| 3b 0d 09 09 09 09 74 65 | 73 74 53 70 65 63 2e 6e |;.....te|stSpec.n|
|00002340| 61 6d 65 5b 30 5d 20 2b | 3d 20 33 3b 0d 09 09 09 |ame[0] +|= 3;....|
|00002350| 09 65 72 72 20 3d 20 46 | 53 70 47 65 74 46 75 6c |.err = F|SpGetFul|
|00002360| 6c 50 61 74 68 28 26 74 | 65 73 74 53 70 65 63 2c |lPath(&t|estSpec,|
|00002370| 20 26 6c 65 6e 2c 20 26 | 70 61 74 68 29 3b 0d 09 | &len, &|path);..|
|00002380| 09 09 09 69 66 20 28 65 | 72 72 20 21 3d 20 6e 6f |...if (e|rr != no|
|00002390| 45 72 72 29 20 44 65 62 | 75 67 53 74 72 28 22 5c |Err) Deb|ugStr("\|
|000023a0| 70 67 6f 6c 64 61 72 6e | 69 74 21 22 29 3b 0d 09 |pgoldarn|it!");..|
|000023b0| 09 09 09 63 20 3d 20 30 | 3b 0d 09 09 09 09 50 74 |...c = 0|;.....Pt|
|000023c0| 72 41 6e 64 48 61 6e 64 | 28 26 63 2c 20 70 61 74 |rAndHand|(&c, pat|
|000023d0| 68 2c 20 31 29 3b 0d 09 | 09 09 09 48 4c 6f 63 6b |h, 1);..|...HLock|
|000023e0| 28 70 61 74 68 29 3b 0d | 09 09 09 09 65 72 72 20 |(path);.|....err |
|000023f0| 3d 20 43 57 43 6f 6d 70 | 47 65 74 50 72 65 63 6f |= CWComp|GetPreco|
|00002400| 6d 70 69 6c 65 64 48 65 | 61 64 65 72 53 70 65 63 |mpiledHe|aderSpec|
|00002410| 28 73 74 61 74 75 73 2d | 3e 63 70 62 2c 20 26 74 |(status-|>cpb, &t|
|00002420| 65 73 74 53 70 65 63 2c | 20 28 63 68 61 72 2a 29 |estSpec,| (char*)|
|00002430| 2a 70 61 74 68 29 3b 0d | 09 09 09 09 69 66 20 28 |*path);.|....if (|
|00002440| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 44 65 |err != n|oErr) De|
|00002450| 62 75 67 53 74 72 28 22 | 5c 70 66 75 67 21 22 29 |bugStr("|\pfug!")|
|00002460| 3b 0d 09 09 09 09 47 65 | 74 44 61 74 65 54 69 6d |;.....Ge|tDateTim|
|00002470| 65 28 26 74 69 6d 65 29 | 3b 0d 09 09 09 09 43 57 |e(&time)|;.....CW|
|00002480| 43 6f 6d 70 53 65 74 4d | 6f 64 44 61 74 65 28 73 |CompSetM|odDate(s|
|00002490| 74 61 74 75 73 2d 3e 63 | 70 62 2c 20 26 74 65 73 |tatus->c|pb, &tes|
|000024a0| 74 53 70 65 63 2c 20 74 | 69 6d 65 29 3b 0d 09 09 |tSpec, t|ime);...|
|000024b0| 09 09 2f 2f 69 66 20 28 | 65 72 72 20 21 3d 20 6e |..//if (|err != n|
|000024c0| 6f 45 72 72 29 20 44 65 | 62 75 67 53 74 72 28 22 |oErr) De|bugStr("|
|000024d0| 5c 70 68 65 63 6b 21 22 | 29 3b 0d 09 09 09 7d 0d |\pheck!"|);....}.|
|000024e0| 23 65 6e 64 69 66 0d 09 | 09 7d 0d 09 09 69 66 20 |#endif..|.}...if |
|000024f0| 28 6f 75 74 70 75 74 20 | 21 3d 20 4e 55 4c 4c 29 |(output |!= NULL)|
|00002500| 20 44 69 73 70 6f 73 65 | 48 61 6e 64 6c 65 28 28 | Dispose|Handle((|
|00002510| 48 61 6e 64 6c 65 29 6f | 75 74 70 75 74 29 3b 0d |Handle)o|utput);.|
|00002520| 09 09 69 66 20 28 64 69 | 61 67 6e 6f 73 74 69 63 |..if (di|agnostic|
|00002530| 20 21 3d 20 4e 55 4c 4c | 29 20 44 69 73 70 6f 73 | != NULL|) Dispos|
|00002540| 65 48 61 6e 64 6c 65 28 | 28 48 61 6e 64 6c 65 29 |eHandle(|(Handle)|
|00002550| 64 69 61 67 6e 6f 73 74 | 69 63 29 3b 0d 09 7d 0d |diagnost|ic);..}.|
|00002560| 09 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 7d |...retur|n err;.}|
|00002570| 0d 0d 0d 73 74 61 74 69 | 63 20 4f 53 45 72 72 09 |...stati|c OSErr.|
|00002580| 50 72 6f 63 65 73 73 46 | 69 6c 65 28 54 6f 6f 6c |ProcessF|ile(Tool|
|00002590| 46 72 6f 6e 74 45 6e 64 | 53 74 61 74 75 73 2a 20 |FrontEnd|Status* |
|000025a0| 73 74 61 74 75 73 2c 20 | 54 6f 6f 6c 46 72 6f 6e |status, |ToolFron|
|000025b0| 74 45 6e 64 50 72 65 66 | 2a 2a 20 70 72 65 66 73 |tEndPref|** prefs|
|000025c0| 2c 0d 09 09 09 09 09 09 | 09 73 68 6f 72 74 20 63 |,.......|.short c|
|000025d0| 75 72 72 65 6e 74 45 78 | 74 65 6e 73 69 6f 6e 29 |urrentEx|tension)|
|000025e0| 0d 7b 0d 09 4f 53 45 72 | 72 20 65 72 72 3b 0d 09 |.{..OSEr|r err;..|
|000025f0| 46 43 42 50 42 52 65 63 | 20 70 62 3b 0d 09 46 53 |FCBPBRec| pb;..FS|
|00002600| 53 70 65 63 20 73 70 65 | 63 3b 0d 09 43 49 6e 66 |Spec spe|c;..CInf|
|00002610| 6f 50 42 52 65 63 20 63 | 69 3b 0d 23 69 66 20 47 |oPBRec c|i;.#if G|
|00002620| 45 4e 45 52 41 54 49 4e | 47 43 46 4d 0d 09 6c 6f |ENERATIN|GCFM..lo|
|00002630| 6e 67 20 72 65 73 70 6f | 6e 73 65 3b 0d 23 65 6e |ng respo|nse;.#en|
|00002640| 64 69 66 0d 09 0d 09 2f | 2f 20 66 69 6e 64 20 74 |dif..../|/ find t|
|00002650| 68 65 20 73 63 61 6e 6e | 65 72 20 66 6f 6c 64 65 |he scann|er folde|
|00002660| 72 20 61 6e 64 20 66 69 | 6c 65 0d 09 70 62 2e 69 |r and fi|le..pb.i|
|00002670| 6f 46 43 42 49 6e 64 78 | 20 3d 20 30 3b 20 2f 2f |oFCBIndx| = 0; //|
|00002680| 20 75 73 65 20 69 6f 52 | 65 66 4e 75 6d 0d 09 70 | use ioR|efNum..p|
|00002690| 62 2e 69 6f 52 65 66 4e | 75 6d 20 3d 20 4c 4d 47 |b.ioRefN|um = LMG|
|000026a0| 65 74 43 75 72 41 70 52 | 65 66 4e 75 6d 28 29 3b |etCurApR|efNum();|
|000026b0| 0d 09 70 62 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |..pb.ioN|amePtr =|
|000026c0| 20 4e 55 4c 4c 3b 0d 09 | 65 72 72 20 3d 20 50 42 | NULL;..|err = PB|
|000026d0| 47 65 74 46 43 42 49 6e | 66 6f 53 79 6e 63 28 26 |GetFCBIn|foSync(&|
|000026e0| 70 62 29 3b 0d 09 69 66 | 20 28 65 72 72 20 21 3d |pb);..if| (err !=|
|000026f0| 20 6e 6f 45 72 72 29 20 | 72 65 74 75 72 6e 20 65 | noErr) |return e|
|00002700| 72 72 3b 0d 09 47 65 74 | 49 6e 64 53 74 72 69 6e |rr;..Get|IndStrin|
|00002710| 67 28 73 70 65 63 2e 6e | 61 6d 65 2c 20 31 32 39 |g(spec.n|ame, 129|
|00002720| 2c 20 31 29 3b 20 2f 2f | 20 43 6f 64 65 57 61 72 |, 1); //| CodeWar|
|00002730| 72 69 6f 72 20 50 6c 75 | 67 69 6e 73 0d 09 63 69 |rior Plu|gins..ci|
|00002740| 2e 64 69 72 49 6e 66 6f | 2e 69 6f 4e 61 6d 65 50 |.dirInfo|.ioNameP|
|00002750| 74 72 20 3d 20 73 70 65 | 63 2e 6e 61 6d 65 3b 0d |tr = spe|c.name;.|
|00002760| 09 63 69 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 56 52 |.ci.dirI|nfo.ioVR|
|00002770| 65 66 4e 75 6d 20 3d 20 | 70 62 2e 69 6f 46 43 42 |efNum = |pb.ioFCB|
|00002780| 56 52 65 66 4e 75 6d 3b | 0d 09 63 69 2e 64 69 72 |VRefNum;|..ci.dir|
|00002790| 49 6e 66 6f 2e 69 6f 44 | 72 44 69 72 49 44 20 3d |Info.ioD|rDirID =|
|000027a0| 20 70 62 2e 69 6f 46 43 | 42 50 61 72 49 44 3b 0d | pb.ioFC|BParID;.|
|000027b0| 09 63 69 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 46 44 |.ci.dirI|nfo.ioFD|
|000027c0| 69 72 49 6e 64 65 78 20 | 3d 20 30 3b 0d 09 65 72 |irIndex |= 0;..er|
|000027d0| 72 20 3d 20 50 42 47 65 | 74 43 61 74 49 6e 66 6f |r = PBGe|tCatInfo|
|000027e0| 53 79 6e 63 28 26 63 69 | 29 3b 0d 09 69 66 20 28 |Sync(&ci|);..if (|
|000027f0| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 72 65 |err != n|oErr) re|
|00002800| 74 75 72 6e 20 65 72 72 | 3b 0d 09 47 65 74 49 6e |turn err|;..GetIn|
|00002810| 64 53 74 72 69 6e 67 28 | 73 70 65 63 2e 6e 61 6d |dString(|spec.nam|
|00002820| 65 2c 20 31 32 39 2c 20 | 32 29 3b 20 2f 2f 20 49 |e, 129, |2); // I|
|00002830| 6e 63 6c 75 64 65 20 53 | 63 61 6e 6e 65 72 73 0d |nclude S|canners.|
|00002840| 09 63 69 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 4e 61 |.ci.dirI|nfo.ioNa|
|00002850| 6d 65 50 74 72 20 3d 20 | 73 70 65 63 2e 6e 61 6d |mePtr = |spec.nam|
|00002860| 65 3b 0d 09 63 69 2e 64 | 69 72 49 6e 66 6f 2e 69 |e;..ci.d|irInfo.i|
|00002870| 6f 56 52 65 66 4e 75 6d | 20 3d 20 70 62 2e 69 6f |oVRefNum| = pb.io|
|00002880| 46 43 42 56 52 65 66 4e | 75 6d 3b 0d 09 63 69 2e |FCBVRefN|um;..ci.|
|00002890| 64 69 72 49 6e 66 6f 2e | 69 6f 44 72 44 69 72 49 |dirInfo.|ioDrDirI|
|000028a0| 44 20 3d 20 63 69 2e 64 | 69 72 49 6e 66 6f 2e 69 |D = ci.d|irInfo.i|
|000028b0| 6f 44 72 44 69 72 49 44 | 3b 0d 09 63 69 2e 64 69 |oDrDirID|;..ci.di|
|000028c0| 72 49 6e 66 6f 2e 69 6f | 46 44 69 72 49 6e 64 65 |rInfo.io|FDirInde|
|000028d0| 78 20 3d 20 30 3b 0d 09 | 65 72 72 20 3d 20 50 42 |x = 0;..|err = PB|
|000028e0| 47 65 74 43 61 74 49 6e | 66 6f 53 79 6e 63 28 26 |GetCatIn|foSync(&|
|000028f0| 63 69 29 3b 0d 09 69 66 | 20 28 65 72 72 20 21 3d |ci);..if| (err !=|
|00002900| 20 6e 6f 45 72 72 29 20 | 72 65 74 75 72 6e 20 65 | noErr) |return e|
|00002910| 72 72 3b 0d 09 73 70 65 | 63 2e 76 52 65 66 4e 75 |rr;..spe|c.vRefNu|
|00002920| 6d 20 3d 20 70 62 2e 69 | 6f 46 43 42 56 52 65 66 |m = pb.i|oFCBVRef|
|00002930| 4e 75 6d 3b 0d 09 73 70 | 65 63 2e 70 61 72 49 44 |Num;..sp|ec.parID|
|00002940| 20 3d 20 63 69 2e 64 69 | 72 49 6e 66 6f 2e 69 6f | = ci.di|rInfo.io|
|00002950| 44 72 44 69 72 49 44 3b | 0d 09 42 6c 6f 63 6b 4d |DrDirID;|..BlockM|
|00002960| 6f 76 65 44 61 74 61 28 | 28 2a 70 72 65 66 73 29 |oveData(|(*prefs)|
|00002970| 2d 3e 65 78 74 65 6e 73 | 69 6f 6e 73 5b 63 75 72 |->extens|ions[cur|
|00002980| 72 65 6e 74 45 78 74 65 | 6e 73 69 6f 6e 5d 2e 73 |rentExte|nsion].s|
|00002990| 63 61 6e 6e 65 72 2c 20 | 73 70 65 63 2e 6e 61 6d |canner, |spec.nam|
|000029a0| 65 2c 0d 09 09 09 09 09 | 28 2a 70 72 65 66 73 29 |e,......|(*prefs)|
|000029b0| 2d 3e 65 78 74 65 6e 73 | 69 6f 6e 73 5b 63 75 72 |->extens|ions[cur|
|000029c0| 72 65 6e 74 45 78 74 65 | 6e 73 69 6f 6e 5d 2e 73 |rentExte|nsion].s|
|000029d0| 63 61 6e 6e 65 72 5b 30 | 5d 20 2b 20 31 29 3b 0d |canner[0|] + 1);.|
|000029e0| 0d 23 69 66 20 47 45 4e | 45 52 41 54 49 4e 47 43 |.#if GEN|ERATINGC|
|000029f0| 46 4d 0d 09 2f 2f 20 69 | 66 20 6f 6e 20 50 6f 77 |FM..// i|f on Pow|
|00002a00| 65 72 50 43 2e 2e 2e 0d | 09 65 72 72 20 3d 20 47 |erPC....|.err = G|
|00002a10| 65 73 74 61 6c 74 28 67 | 65 73 74 61 6c 74 53 79 |estalt(g|estaltSy|
|00002a20| 73 41 72 63 68 69 74 65 | 63 74 75 72 65 2c 20 26 |sArchite|cture, &|
|00002a30| 72 65 73 70 6f 6e 73 65 | 29 3b 0d 09 69 66 20 28 |response|);..if (|
|00002a40| 65 72 72 20 3d 3d 20 6e | 6f 45 72 72 20 26 26 20 |err == n|oErr && |
|00002a50| 72 65 73 70 6f 6e 73 65 | 20 3d 3d 20 67 65 73 74 |response| == gest|
|00002a60| 61 6c 74 50 6f 77 65 72 | 50 43 29 0d 09 7b 0d 09 |altPower|PC)..{..|
|00002a70| 09 2f 2f 20 6c 6f 61 64 | 20 63 6f 64 65 20 66 72 |.// load| code fr|
|00002a80| 61 67 6d 65 6e 74 0d 09 | 09 43 46 72 61 67 43 6f |agment..|.CFragCo|
|00002a90| 6e 6e 65 63 74 69 6f 6e | 49 44 20 63 6f 6e 6e 49 |nnection|ID connI|
|00002aa0| 44 3b 0d 09 09 53 74 72 | 32 35 35 20 65 72 72 4e |D;...Str|255 errN|
|00002ab0| 61 6d 65 3b 0d 09 09 55 | 6e 69 76 65 72 73 61 6c |ame;...U|niversal|
|00002ac0| 50 72 6f 63 50 74 72 20 | 6e 65 77 52 6f 75 74 69 |ProcPtr |newRouti|
|00002ad0| 6e 65 20 3d 20 30 3b 0d | 09 09 50 74 72 20 6d 61 |ne = 0;.|..Ptr ma|
|00002ae0| 69 6e 41 64 64 72 3b 0d | 0d 09 09 65 72 72 20 3d |inAddr;.|...err =|
|00002af0| 20 47 65 74 44 69 73 6b | 46 72 61 67 6d 65 6e 74 | GetDisk|Fragment|
|00002b00| 28 26 73 70 65 63 2c 20 | 30 2c 20 6b 57 68 6f 6c |(&spec, |0, kWhol|
|00002b10| 65 46 6f 72 6b 2c 20 4e | 55 4c 4c 2c 20 6b 4c 6f |eFork, N|ULL, kLo|
|00002b20| 61 64 4e 65 77 43 6f 70 | 79 2c 20 26 63 6f 6e 6e |adNewCop|y, &conn|
|00002b30| 49 44 2c 20 26 6d 61 69 | 6e 41 64 64 72 2c 0d 09 |ID, &mai|nAddr,..|
|00002b40| 09 09 09 09 09 09 09 65 | 72 72 4e 61 6d 65 29 3b |.......e|rrName);|
|00002b50| 0d 09 09 69 66 20 28 65 | 72 72 20 21 3d 20 6e 6f |...if (e|rr != no|
|00002b60| 45 72 72 29 20 72 65 74 | 75 72 6e 20 65 72 72 3b |Err) ret|urn err;|
|00002b70| 0d 09 09 0d 09 09 2f 2f | 20 63 61 6c 6c 20 6d 61 |......//| call ma|
|00002b80| 69 6e 20 65 6e 74 72 79 | 20 70 6f 69 6e 74 0d 09 |in entry| point..|
|00002b90| 09 6e 65 77 52 6f 75 74 | 69 6e 65 20 3d 20 4e 65 |.newRout|ine = Ne|
|00002ba0| 77 52 6f 75 74 69 6e 65 | 44 65 73 63 72 69 70 74 |wRoutine|Descript|
|00002bb0| 6f 72 28 28 50 72 6f 63 | 50 74 72 29 6d 61 69 6e |or((Proc|Ptr)main|
|00002bc0| 41 64 64 72 2c 20 75 70 | 70 53 63 61 6e 6e 65 72 |Addr, up|pScanner|
|00002bd0| 45 6e 74 72 79 50 6f 69 | 6e 74 49 6e 66 6f 2c 20 |EntryPoi|ntInfo, |
|00002be0| 47 65 74 43 75 72 72 65 | 6e 74 41 72 63 68 69 74 |GetCurre|ntArchit|
|00002bf0| 65 63 74 75 72 65 28 29 | 29 3b 0d 09 09 69 66 20 |ecture()|);...if |
|00002c00| 28 6e 65 77 52 6f 75 74 | 69 6e 65 20 3d 3d 20 4e |(newRout|ine == N|
|00002c10| 55 4c 4c 29 0d 09 09 7b | 0d 09 09 09 65 72 72 20 |ULL)...{|....err |
|00002c20| 3d 20 4d 65 6d 45 72 72 | 6f 72 28 29 3b 0d 09 09 |= MemErr|or();...|
|00002c30| 09 43 6c 6f 73 65 43 6f | 6e 6e 65 63 74 69 6f 6e |.CloseCo|nnection|
|00002c40| 28 26 63 6f 6e 6e 49 44 | 29 3b 0d 09 09 09 72 65 |(&connID|);....re|
|00002c50| 74 75 72 6e 20 65 72 72 | 3b 0d 09 09 7d 0d 09 09 |turn err|;...}...|
|00002c60| 65 72 72 20 3d 20 43 61 | 6c 6c 55 6e 69 76 65 72 |err = Ca|llUniver|
|00002c70| 73 61 6c 50 72 6f 63 28 | 6e 65 77 52 6f 75 74 69 |salProc(|newRouti|
|00002c80| 6e 65 2c 20 75 70 70 53 | 63 61 6e 6e 65 72 45 6e |ne, uppS|cannerEn|
|00002c90| 74 72 79 50 6f 69 6e 74 | 49 6e 66 6f 2c 20 73 74 |tryPoint|Info, st|
|00002ca0| 61 74 75 73 29 3b 0d 09 | 09 0d 09 09 2f 2f 20 75 |atus);..|....// u|
|00002cb0| 6e 6c 6f 61 64 20 63 6f | 64 65 20 66 72 61 67 6d |nload co|de fragm|
|00002cc0| 65 6e 74 0d 09 09 43 6c | 6f 73 65 43 6f 6e 6e 65 |ent...Cl|oseConne|
|00002cd0| 63 74 69 6f 6e 28 26 63 | 6f 6e 6e 49 44 29 3b 0d |ction(&c|onnID);.|
|00002ce0| 09 7d 0d 09 65 6c 73 65 | 20 2f 2f 20 36 38 4b 0d |.}..else| // 68K.|
|00002cf0| 23 65 6e 64 69 66 0d 09 | 7b 0d 09 09 48 61 6e 64 |#endif..|{...Hand|
|00002d00| 6c 65 20 68 3b 0d 09 09 | 70 61 73 63 61 6c 20 4f |le h;...|pascal O|
|00002d10| 53 45 72 72 20 28 2a 66 | 29 28 54 6f 6f 6c 46 72 |SErr (*f|)(ToolFr|
|00002d20| 6f 6e 74 45 6e 64 53 74 | 61 74 75 73 2a 20 73 74 |ontEndSt|atus* st|
|00002d30| 61 74 75 73 29 3b 0d 09 | 09 73 68 6f 72 74 20 72 |atus);..|.short r|
|00002d40| 65 66 4e 75 6d 3b 0d 09 | 09 0d 09 09 2f 2f 20 6f |efNum;..|....// o|
|00002d50| 70 65 6e 20 72 65 73 6f | 75 72 63 65 20 66 69 6c |pen reso|urce fil|
|00002d60| 65 0d 09 09 72 65 66 4e | 75 6d 20 3d 20 46 53 70 |e...refN|um = FSp|
|00002d70| 4f 70 65 6e 52 65 73 46 | 69 6c 65 28 26 73 70 65 |OpenResF|ile(&spe|
|00002d80| 63 2c 20 66 73 52 64 50 | 65 72 6d 29 3b 0d 09 09 |c, fsRdP|erm);...|
|00002d90| 69 66 20 28 72 65 66 4e | 75 6d 20 3c 20 30 29 20 |if (refN|um < 0) |
|00002da0| 72 65 74 75 72 6e 20 52 | 65 73 45 72 72 6f 72 28 |return R|esError(|
|00002db0| 29 3b 0d 09 09 0d 09 09 | 2f 2f 20 6c 6f 61 64 20 |);......|// load |
|00002dc0| 63 6f 64 65 20 72 65 73 | 6f 75 72 63 65 0d 09 09 |code res|ource...|
|00002dd0| 68 20 3d 20 47 65 74 31 | 52 65 73 6f 75 72 63 65 |h = Get1|Resource|
|00002de0| 28 27 53 63 61 6e 27 2c | 20 31 32 38 29 3b 0d 09 |('Scan',| 128);..|
|00002df0| 09 69 66 20 28 68 20 3d | 3d 20 30 29 0d 09 09 7b |.if (h =|= 0)...{|
|00002e00| 0d 09 09 09 43 6c 6f 73 | 65 52 65 73 46 69 6c 65 |....Clos|eResFile|
|00002e10| 28 72 65 66 4e 75 6d 29 | 3b 0d 09 09 09 72 65 74 |(refNum)|;....ret|
|00002e20| 75 72 6e 20 72 65 73 4e | 6f 74 46 6f 75 6e 64 3b |urn resN|otFound;|
|00002e30| 0d 09 09 7d 0d 09 09 0d | 09 09 2f 2f 20 63 61 6c |...}....|..// cal|
|00002e40| 6c 20 6d 61 69 6e 20 65 | 6e 74 72 79 20 70 6f 69 |l main e|ntry poi|
|00002e50| 6e 74 0d 09 09 48 4e 6f | 50 75 72 67 65 28 68 29 |nt...HNo|Purge(h)|
|00002e60| 3b 0d 09 09 48 4c 6f 63 | 6b 28 68 29 3b 0d 09 09 |;...HLoc|k(h);...|
|00002e70| 66 20 3d 20 28 70 61 73 | 63 61 6c 20 4f 53 45 72 |f = (pas|cal OSEr|
|00002e80| 72 20 28 2a 29 28 54 6f | 6f 6c 46 72 6f 6e 74 45 |r (*)(To|olFrontE|
|00002e90| 6e 64 53 74 61 74 75 73 | 2a 20 73 74 61 74 75 73 |ndStatus|* status|
|00002ea0| 29 29 28 2a 68 29 3b 0d | 09 09 65 72 72 20 3d 20 |))(*h);.|..err = |
|00002eb0| 28 2a 66 29 28 73 74 61 | 74 75 73 29 3b 0d 09 09 |(*f)(sta|tus);...|
|00002ec0| 0d 09 09 2f 2f 20 63 6c | 6f 73 65 20 72 65 73 6f |...// cl|ose reso|
|00002ed0| 75 72 63 65 20 66 69 6c | 65 0d 09 09 43 6c 6f 73 |urce fil|e...Clos|
|00002ee0| 65 52 65 73 46 69 6c 65 | 28 72 65 66 4e 75 6d 29 |eResFile|(refNum)|
|00002ef0| 3b 0d 09 7d 0d 09 0d 09 | 69 66 20 28 65 72 72 20 |;..}....|if (err |
|00002f00| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 7b 0d 09 09 53 |!= noErr|)..{...S|
|00002f10| 74 72 33 31 20 73 3b 0d | 09 09 4e 75 6d 54 6f 53 |tr31 s;.|..NumToS|
|00002f20| 74 72 69 6e 67 28 65 72 | 72 2c 20 73 29 3b 0d 09 |tring(er|r, s);..|
|00002f30| 09 70 32 63 73 74 72 28 | 73 29 3b 0d 09 09 43 57 |.p2cstr(|s);...CW|
|00002f40| 43 6f 6d 70 45 72 72 6f | 72 4d 65 73 73 61 67 65 |CompErro|rMessage|
|00002f50| 28 73 74 61 74 75 73 2d | 3e 63 70 62 2c 20 28 63 |(status-|>cpb, (c|
|00002f60| 68 61 72 2a 29 73 29 3b | 0d 09 7d 0d 09 0d 09 72 |har*)s);|..}....r|
|00002f70| 65 74 75 72 6e 20 65 72 | 72 3b 0d 7d 0d 00 00 00 |eturn er|r;.}....|
|00002f80| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00002f90| 68 0b 06 00 00 00 1c 01 | 5a 00 01 70 72 65 66 00 |h.......|Z..pref.|
|00002fa0| 17 00 12 53 54 52 23 00 | 00 01 32 00 64 ff ff 00 |...STR#.|..2.d...|
|00002fb0| 0e 54 6f 6f 6c 46 72 6f | 6e 74 45 6e 64 2e 63 74 |.ToolFro|ntEnd.ct|
|00002fc0| 02 00 00 00 54 45 58 54 | 43 57 49 45 01 00 ff ff |....TEXT|CWIE....|
|00002fd0| 00 00 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |..TEXTCW|IE......|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 ac 2f fd 57 00 00 | 2e fd 00 00 01 9a 00 7f |.../.W..|........|
|00003000| 8d 00 13 00 00 0d d2 00 | 00 00 00 6d 15 00 20 00 |........|...m.. .|
|00003010| 00 0f e6 00 00 00 00 21 | 30 00 27 00 00 11 f1 00 |.......!|0.'.....|
|00003020| 00 00 00 29 7c 00 33 00 | 00 12 09 00 00 00 00 56 |...)|.3.|.......V|
|00003030| 5c 00 3e 00 00 12 19 00 | 00 00 00 78 90 00 4a 00 |\.>.....|...x..J.|
|00003040| 00 12 d9 00 00 00 00 3d | c7 00 59 00 00 13 0d 00 |.......=|..Y.....|
|00003050| 00 00 00 4d c2 00 68 00 | 00 13 1b 00 00 00 00 05 |...M..h.|........|
|00003060| 81 00 78 00 00 13 49 00 | 00 00 00 12 12 00 88 00 |..x...I.|........|
|00003070| 00 13 59 00 00 00 00 5d | f7 00 94 00 00 13 61 00 |..Y....]|......a.|
|00003080| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00003090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030a0| 00 00 00 00 00 00 00 03 | 00 04 00 28 00 0a 01 c2 |........|...(....|
|000030b0| 02 80 00 28 00 0a 01 c2 | 02 80 ad 5b 70 ec 00 00 |...(....|...[p...|
|000030c0| 1a aa 00 00 1a aa 00 00 | 16 ec 01 00 00 00 00 04 |........|........|
|000030d0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|000030e0| 00 00 00 46 01 a5 9e fc | 2e a4 00 00 00 1c 00 46 |...F....|.......F|
|000030f0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00003100| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00003110| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00003120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+