home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 July / APC47-2.ISO / mac / fetch / fetch303.hqx / Fetch 3.0.3 Installer / FetchAE.cp < prev    next >
MacBinary  |  1996-12-30  |  25.1 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: FetchAE.cp

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert MS-DOS Code Page Info (other/dosCodePage) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Dec 30 11:30:51 1996, modified Mon Dec 30 11:30:51 1996, creator 'CWIE', type ASCII, 24994 bytes "FetchAE.cp" , at 0x6222 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 0a 46 65 74 63 68 41 | 45 2e 63 70 00 00 00 00 |..FetchA|E.cp....|
|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 61 a2 00 | 00 01 9a ae ed 9e bb ae |.....a..|........|
|00000060| ed 9e bb 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 d5 92 00 00 |........|........|
|00000080| 2f 2a 0d 20 09 46 65 74 | 63 68 41 45 2e 63 70 20 |/*. .Fet|chAE.cp |
|00000090| 2d 2d 20 73 61 6d 70 6c | 65 20 41 70 70 6c 65 20 |-- sampl|e Apple |
|000000a0| 45 76 65 6e 74 20 63 6f | 64 65 20 66 6f 72 20 46 |Event co|de for F|
|000000b0| 65 74 63 68 0d 20 09 0d | 20 09 43 6f 70 79 72 69 |etch. ..| .Copyri|
|000000c0| 67 68 74 20 a9 20 31 39 | 39 36 2c 20 54 72 75 73 |ght . 19|96, Trus|
|000000d0| 74 65 65 73 20 6f 66 20 | 44 61 72 74 6d 6f 75 74 |tees of |Dartmout|
|000000e0| 68 20 43 6f 6c 6c 65 67 | 65 0d 20 09 41 6c 6c 20 |h Colleg|e. .All |
|000000f0| 52 69 67 68 74 73 20 52 | 65 73 65 72 76 65 64 2e |Rights R|eserved.|
|00000100| 0d 20 09 0d 20 09 44 69 | 73 74 72 69 62 75 74 69 |. .. .Di|stributi|
|00000110| 6f 6e 20 61 6e 64 20 75 | 73 65 20 6f 66 20 74 68 |on and u|se of th|
|00000120| 69 73 20 63 6f 64 65 20 | 69 73 20 68 65 72 65 62 |is code |is hereb|
|00000130| 79 20 70 65 72 6d 69 74 | 74 65 64 2c 20 70 72 6f |y permit|ted, pro|
|00000140| 76 69 64 65 64 20 74 68 | 61 74 20 61 6e 79 20 72 |vided th|at any r|
|00000150| 65 73 75 6c 74 69 6e 67 | 0d 20 09 77 6f 72 6b 20 |esulting|. .work |
|00000160| 69 6e 63 6c 75 64 65 73 | 20 74 68 65 20 63 6f 70 |includes| the cop|
|00000170| 79 72 69 67 68 74 20 73 | 74 61 74 65 6d 65 6e 74 |yright s|tatement|
|00000180| 20 61 62 6f 76 65 2e 0d | 2a 2f 0d 0d 23 69 6e 63 | above..|*/..#inc|
|00000190| 6c 75 64 65 20 3c 73 74 | 72 69 6e 67 2e 68 3e 0d |lude <st|ring.h>.|
|000001a0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 41 45 4f 62 6a |.#includ|e <AEObj|
|000001b0| 65 63 74 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |ects.h>.|#include|
|000001c0| 20 3c 41 45 50 61 63 6b | 4f 62 6a 65 63 74 2e 68 | <AEPack|Object.h|
|000001d0| 3e 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 46 65 74 |>..#incl|ude "Fet|
|000001e0| 63 68 41 45 2e 68 22 0d | 0d 73 74 61 74 69 63 20 |chAE.h".|.static |
|000001f0| 76 6f 69 64 20 49 6e 69 | 74 44 65 73 63 28 41 45 |void Ini|tDesc(AE|
|00000200| 44 65 73 63 20 2a 64 65 | 73 63 29 3b 0d 73 74 61 |Desc *de|sc);.sta|
|00000210| 74 69 63 20 76 6f 69 64 | 20 44 69 73 70 6f 73 65 |tic void| Dispose|
|00000220| 44 65 73 63 28 41 45 44 | 65 73 63 20 2a 64 65 73 |Desc(AED|esc *des|
|00000230| 63 29 3b 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |c);.stat|ic void |
|00000240| 43 53 74 72 69 6e 67 54 | 6f 44 65 73 63 28 63 68 |CStringT|oDesc(ch|
|00000250| 61 72 20 2a 76 61 6c 75 | 65 70 2c 20 44 65 73 63 |ar *valu|ep, Desc|
|00000260| 54 79 70 65 20 64 54 79 | 70 65 2c 20 41 45 44 65 |Type dTy|pe, AEDe|
|00000270| 73 63 20 2a 64 65 73 63 | 29 3b 0d 73 74 61 74 69 |sc *desc|);.stati|
|00000280| 63 20 76 6f 69 64 20 44 | 65 73 63 54 79 70 65 54 |c void D|escTypeT|
|00000290| 6f 44 65 73 63 28 4f 53 | 54 79 70 65 20 76 61 6c |oDesc(OS|Type val|
|000002a0| 75 65 2c 20 44 65 73 63 | 54 79 70 65 20 64 54 79 |ue, Desc|Type dTy|
|000002b0| 70 65 2c 20 41 45 44 65 | 73 63 20 2a 64 65 73 63 |pe, AEDe|sc *desc|
|000002c0| 29 3b 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 4c |);.stati|c void L|
|000002d0| 6f 6e 67 54 6f 44 65 73 | 63 28 6c 6f 6e 67 20 76 |ongToDes|c(long v|
|000002e0| 61 6c 75 65 2c 20 44 65 | 73 63 54 79 70 65 20 64 |alue, De|scType d|
|000002f0| 54 79 70 65 2c 20 41 45 | 44 65 73 63 20 2a 64 65 |Type, AE|Desc *de|
|00000300| 73 63 29 3b 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |sc);.sta|tic void|
|00000310| 20 46 53 53 70 65 63 54 | 6f 44 65 73 63 28 46 53 | FSSpecT|oDesc(FS|
|00000320| 53 70 65 63 20 2a 76 61 | 6c 75 65 70 2c 20 44 65 |Spec *va|luep, De|
|00000330| 73 63 54 79 70 65 20 64 | 54 79 70 65 2c 20 41 45 |scType d|Type, AE|
|00000340| 44 65 73 63 20 2a 64 65 | 73 63 29 3b 0d 73 74 61 |Desc *de|sc);.sta|
|00000350| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 66 69 6e 64 |tic Bool|ean find|
|00000360| 50 72 6f 63 65 73 73 42 | 79 53 69 67 6e 61 74 75 |ProcessB|ySignatu|
|00000370| 72 65 28 4f 53 54 79 70 | 65 20 73 69 67 2c 20 50 |re(OSTyp|e sig, P|
|00000380| 72 6f 63 65 73 73 53 65 | 72 69 61 6c 4e 75 6d 62 |rocessSe|rialNumb|
|00000390| 65 72 20 2a 70 73 6e 5f | 70 2c 20 6c 6f 6e 67 20 |er *psn_|p, long |
|000003a0| 2a 70 72 6f 63 5f 6d 6f | 64 65 5f 70 29 3b 0d 73 |*proc_mo|de_p);.s|
|000003b0| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 20 66 69 |tatic Bo|olean fi|
|000003c0| 6e 64 41 70 70 42 79 53 | 69 67 6e 61 74 75 72 65 |ndAppByS|ignature|
|000003d0| 28 4f 53 54 79 70 65 20 | 73 69 67 2c 20 46 53 53 |(OSType |sig, FSS|
|000003e0| 70 65 63 20 2a 66 73 70 | 65 63 5f 70 29 3b 0d 73 |pec *fsp|ec_p);.s|
|000003f0| 74 61 74 69 63 20 4f 53 | 45 72 72 20 49 6e 69 74 |tatic OS|Err Init|
|00000400| 41 45 54 6f 41 70 70 28 | 4f 53 54 79 70 65 20 61 |AEToApp(|OSType a|
|00000410| 70 70 53 69 67 2c 20 41 | 45 45 76 65 6e 74 43 6c |ppSig, A|EEventCl|
|00000420| 61 73 73 20 65 76 65 6e | 74 43 6c 61 73 73 2c 20 |ass even|tClass, |
|00000430| 41 45 45 76 65 6e 74 49 | 44 20 65 76 65 6e 74 49 |AEEventI|D eventI|
|00000440| 44 2c 20 0d 09 09 09 41 | 70 70 6c 65 45 76 65 6e |D, ....A|ppleEven|
|00000450| 74 20 2a 61 65 76 74 2c | 20 42 6f 6f 6c 65 61 6e |t *aevt,| Boolean|
|00000460| 20 2a 72 75 6e 6e 69 6e | 67 29 3b 0d 73 74 61 74 | *runnin|g);.stat|
|00000470| 69 63 20 4f 53 45 72 72 | 20 53 65 6e 64 41 45 54 |ic OSErr| SendAET|
|00000480| 6f 41 70 70 28 4f 53 54 | 79 70 65 20 61 70 70 53 |oApp(OST|ype appS|
|00000490| 69 67 2c 20 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ig, Appl|eEvent *|
|000004a0| 61 65 76 74 2c 20 41 70 | 70 6c 65 45 76 65 6e 74 |aevt, Ap|pleEvent|
|000004b0| 20 2a 61 65 72 65 70 6c | 79 2c 20 41 45 49 64 6c | *aerepl|y, AEIdl|
|000004c0| 65 55 50 50 20 69 64 6c | 65 55 50 50 2c 20 42 6f |eUPP idl|eUPP, Bo|
|000004d0| 6f 6c 65 61 6e 20 72 75 | 6e 6e 69 6e 67 29 3b 0d |olean ru|nning);.|
|000004e0| 73 74 61 74 69 63 20 4f | 53 45 72 72 20 53 65 6e |static O|SErr Sen|
|000004f0| 64 44 69 72 65 63 74 41 | 70 70 6c 65 45 76 65 6e |dDirectA|ppleEven|
|00000500| 74 28 4f 53 54 79 70 65 | 20 61 70 70 53 69 67 2c |t(OSType| appSig,|
|00000510| 20 41 45 45 76 65 6e 74 | 43 6c 61 73 73 20 65 76 | AEEvent|Class ev|
|00000520| 65 6e 74 43 6c 61 73 73 | 2c 20 41 45 45 76 65 6e |entClass|, AEEven|
|00000530| 74 49 44 20 65 76 65 6e | 74 49 44 2c 0d 09 09 09 |tID even|tID,....|
|00000540| 09 41 45 44 65 73 63 20 | 2a 64 69 72 65 63 74 44 |.AEDesc |*directD|
|00000550| 65 73 63 2c 20 41 70 70 | 6c 65 45 76 65 6e 74 20 |esc, App|leEvent |
|00000560| 2a 61 65 72 65 70 6c 79 | 2c 20 41 45 49 64 6c 65 |*aereply|, AEIdle|
|00000570| 55 50 50 20 69 64 6c 65 | 55 50 50 29 3b 0d 73 74 |UPP idle|UPP);.st|
|00000580| 61 74 69 63 20 4f 53 45 | 72 72 20 53 65 6e 64 44 |atic OSE|rr SendD|
|00000590| 69 72 65 63 74 41 70 70 | 6c 65 45 76 65 6e 74 57 |irectApp|leEventW|
|000005a0| 69 74 68 41 72 67 28 4f | 53 54 79 70 65 20 61 70 |ithArg(O|SType ap|
|000005b0| 70 53 69 67 2c 20 41 45 | 45 76 65 6e 74 43 6c 61 |pSig, AE|EventCla|
|000005c0| 73 73 20 65 76 65 6e 74 | 43 6c 61 73 73 2c 20 41 |ss event|Class, A|
|000005d0| 45 45 76 65 6e 74 49 44 | 20 65 76 65 6e 74 49 44 |EEventID| eventID|
|000005e0| 2c 0d 09 09 09 09 41 45 | 44 65 73 63 20 2a 64 69 |,.....AE|Desc *di|
|000005f0| 72 65 63 74 44 65 73 63 | 2c 20 41 45 4b 65 79 77 |rectDesc|, AEKeyw|
|00000600| 6f 72 64 20 61 72 67 4b | 65 79 2c 20 41 45 44 65 |ord argK|ey, AEDe|
|00000610| 73 63 20 2a 61 72 67 44 | 65 73 63 2c 0d 09 09 09 |sc *argD|esc,....|
|00000620| 09 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 61 65 72 |.AppleEv|ent *aer|
|00000630| 65 70 6c 79 2c 20 41 45 | 49 64 6c 65 55 50 50 20 |eply, AE|IdleUPP |
|00000640| 69 64 6c 65 55 50 50 29 | 3b 0d 73 74 61 74 69 63 |idleUPP)|;.static|
|00000650| 20 4f 53 45 72 72 20 53 | 65 6e 64 44 69 72 65 63 | OSErr S|endDirec|
|00000660| 74 41 70 70 6c 65 45 76 | 65 6e 74 57 69 74 68 54 |tAppleEv|entWithT|
|00000670| 68 72 65 65 41 72 67 73 | 28 4f 53 54 79 70 65 20 |hreeArgs|(OSType |
|00000680| 61 70 70 53 69 67 2c 20 | 41 45 45 76 65 6e 74 43 |appSig, |AEEventC|
|00000690| 6c 61 73 73 20 65 76 65 | 6e 74 43 6c 61 73 73 2c |lass eve|ntClass,|
|000006a0| 20 41 45 45 76 65 6e 74 | 49 44 20 65 76 65 6e 74 | AEEvent|ID event|
|000006b0| 49 44 2c 0d 09 09 09 09 | 41 45 44 65 73 63 20 2a |ID,.....|AEDesc *|
|000006c0| 64 69 72 65 63 74 44 65 | 73 63 2c 20 41 45 4b 65 |directDe|sc, AEKe|
|000006d0| 79 77 6f 72 64 20 61 72 | 67 4b 65 79 2c 20 41 45 |yword ar|gKey, AE|
|000006e0| 44 65 73 63 20 2a 61 72 | 67 44 65 73 63 2c 0d 09 |Desc *ar|gDesc,..|
|000006f0| 09 09 09 41 45 4b 65 79 | 77 6f 72 64 20 61 72 67 |...AEKey|word arg|
|00000700| 32 4b 65 79 2c 20 41 45 | 44 65 73 63 20 2a 61 72 |2Key, AE|Desc *ar|
|00000710| 67 32 44 65 73 63 2c 0d | 09 09 09 09 41 45 4b 65 |g2Desc,.|....AEKe|
|00000720| 79 77 6f 72 64 20 61 72 | 67 33 4b 65 79 2c 20 41 |yword ar|g3Key, A|
|00000730| 45 44 65 73 63 20 2a 61 | 72 67 33 44 65 73 63 2c |EDesc *a|rg3Desc,|
|00000740| 0d 09 09 09 09 41 70 70 | 6c 65 45 76 65 6e 74 20 |.....App|leEvent |
|00000750| 2a 61 65 72 65 70 6c 79 | 2c 20 41 45 49 64 6c 65 |*aereply|, AEIdle|
|00000760| 55 50 50 20 69 64 6c 65 | 55 50 50 29 3b 0d 73 74 |UPP idle|UPP);.st|
|00000770| 61 74 69 63 20 4f 53 45 | 72 72 20 53 65 6e 64 43 |atic OSE|rr SendC|
|00000780| 72 65 61 74 65 41 70 70 | 6c 65 45 76 65 6e 74 28 |reateApp|leEvent(|
|00000790| 4f 53 54 79 70 65 20 61 | 70 70 53 69 67 2c 20 44 |OSType a|ppSig, D|
|000007a0| 65 73 63 54 79 70 65 20 | 6f 62 6a 43 6c 61 73 73 |escType |objClass|
|000007b0| 2c 20 41 45 44 65 73 63 | 20 2a 69 6e 73 65 72 74 |, AEDesc| *insert|
|000007c0| 4c 6f 63 44 65 73 63 2c | 0d 09 09 09 09 41 45 44 |LocDesc,|.....AED|
|000007d0| 65 73 63 20 2a 64 61 74 | 61 44 65 73 63 2c 20 41 |esc *dat|aDesc, A|
|000007e0| 45 44 65 73 63 20 2a 70 | 72 6f 70 44 65 73 63 2c |EDesc *p|ropDesc,|
|000007f0| 20 0d 09 09 09 09 41 70 | 70 6c 65 45 76 65 6e 74 | .....Ap|pleEvent|
|00000800| 20 2a 61 65 72 65 70 6c | 79 2c 20 41 45 49 64 6c | *aerepl|y, AEIdl|
|00000810| 65 55 50 50 20 69 64 6c | 65 55 50 50 29 3b 0d 73 |eUPP idl|eUPP);.s|
|00000820| 74 61 74 69 63 20 4f 53 | 45 72 72 20 53 65 6e 64 |tatic OS|Err Send|
|00000830| 4d 6f 76 65 43 6c 6f 6e | 65 41 70 70 6c 65 45 76 |MoveClon|eAppleEv|
|00000840| 65 6e 74 28 4f 53 54 79 | 70 65 20 61 70 70 53 69 |ent(OSTy|pe appSi|
|00000850| 67 2c 20 41 45 45 76 65 | 6e 74 49 44 20 65 76 65 |g, AEEve|ntID eve|
|00000860| 6e 74 49 44 2c 20 41 45 | 44 65 73 63 20 2a 64 69 |ntID, AE|Desc *di|
|00000870| 72 65 63 74 44 65 73 63 | 2c 20 0d 09 09 09 09 41 |rectDesc|, .....A|
|00000880| 45 44 65 73 63 20 2a 69 | 6e 73 65 72 74 4c 6f 63 |EDesc *i|nsertLoc|
|00000890| 44 65 73 63 2c 20 41 70 | 70 6c 65 45 76 65 6e 74 |Desc, Ap|pleEvent|
|000008a0| 20 2a 61 65 72 65 70 6c | 79 2c 20 41 45 49 64 6c | *aerepl|y, AEIdl|
|000008b0| 65 55 50 50 20 69 64 6c | 65 55 50 50 29 3b 0d 73 |eUPP idl|eUPP);.s|
|000008c0| 74 61 74 69 63 20 4f 53 | 45 72 72 20 43 72 65 61 |tatic OS|Err Crea|
|000008d0| 74 65 46 6f 72 6d 4e 61 | 6d 65 4f 53 70 65 63 28 |teFormNa|meOSpec(|
|000008e0| 63 68 61 72 20 2a 6e 61 | 6d 65 2c 20 44 65 73 63 |char *na|me, Desc|
|000008f0| 54 79 70 65 20 6f 62 6a | 43 6c 61 73 73 2c 20 41 |Type obj|Class, A|
|00000900| 45 44 65 73 63 20 2a 63 | 6f 6e 74 61 69 6e 65 72 |EDesc *c|ontainer|
|00000910| 44 65 73 63 2c 20 41 45 | 44 65 73 63 20 2a 6f 73 |Desc, AE|Desc *os|
|00000920| 70 65 63 44 65 73 63 29 | 3b 0d 73 74 61 74 69 63 |pecDesc)|;.static|
|00000930| 20 4f 53 45 72 72 20 43 | 72 65 61 74 65 50 72 6f | OSErr C|reatePro|
|00000940| 70 65 72 74 79 4f 53 70 | 65 63 28 44 65 73 63 54 |pertyOSp|ec(DescT|
|00000950| 79 70 65 20 70 72 6f 70 | 43 6f 64 65 2c 20 41 45 |ype prop|Code, AE|
|00000960| 44 65 73 63 20 2a 63 6f | 6e 74 61 69 6e 65 72 44 |Desc *co|ntainerD|
|00000970| 65 73 63 2c 20 41 45 44 | 65 73 63 20 2a 6f 73 70 |esc, AED|esc *osp|
|00000980| 65 63 44 65 73 63 29 3b | 0d 0d 2f 2a 0d 20 2a 20 |ecDesc);|../*. * |
|00000990| 49 6e 69 74 44 65 73 63 | 28 29 20 2d 2d 0d 20 2a |InitDesc|() --. *|
|000009a0| 09 49 6e 69 74 69 61 6c | 69 7a 65 20 61 20 64 65 |.Initial|ize a de|
|000009b0| 73 63 72 69 70 74 6f 72 | 2e 0d 20 2a 2f 0d 76 6f |scriptor|.. */.vo|
|000009c0| 69 64 20 49 6e 69 74 44 | 65 73 63 28 41 45 44 65 |id InitD|esc(AEDe|
|000009d0| 73 63 20 2a 64 65 73 63 | 29 0d 7b 0d 09 64 65 73 |sc *desc|).{..des|
|000009e0| 63 2d 3e 64 65 73 63 72 | 69 70 74 6f 72 54 79 70 |c->descr|iptorTyp|
|000009f0| 65 20 3d 20 74 79 70 65 | 4e 75 6c 6c 3b 0d 09 64 |e = type|Null;..d|
|00000a00| 65 73 63 2d 3e 64 61 74 | 61 48 61 6e 64 6c 65 20 |esc->dat|aHandle |
|00000a10| 3d 20 6e 69 6c 3b 0d 7d | 0d 0d 2f 2a 0d 20 2a 20 |= nil;.}|../*. * |
|00000a20| 44 69 73 70 6f 73 65 44 | 65 73 63 28 29 20 2d 2d |DisposeD|esc() --|
|00000a30| 0d 20 2a 09 44 69 73 70 | 6f 73 65 20 6f 66 20 64 |. *.Disp|ose of d|
|00000a40| 65 73 63 72 69 70 74 6f | 72 20 64 61 74 61 20 61 |escripto|r data a|
|00000a50| 6e 64 20 6d 61 72 6b 20 | 64 65 73 63 72 69 70 74 |nd mark |descript|
|00000a60| 6f 72 20 61 73 20 65 6d | 70 74 79 2e 0d 20 2a 2f |or as em|pty.. */|
|00000a70| 0d 76 6f 69 64 20 44 69 | 73 70 6f 73 65 44 65 73 |.void Di|sposeDes|
|00000a80| 63 28 41 45 44 65 73 63 | 20 2a 64 65 73 63 29 0d |c(AEDesc| *desc).|
|00000a90| 7b 0d 09 69 66 20 28 64 | 65 73 63 2d 3e 64 61 74 |{..if (d|esc->dat|
|00000aa0| 61 48 61 6e 64 6c 65 20 | 21 3d 20 6e 69 6c 29 0d |aHandle |!= nil).|
|00000ab0| 09 09 28 76 6f 69 64 29 | 20 41 45 44 69 73 70 6f |..(void)| AEDispo|
|00000ac0| 73 65 44 65 73 63 28 64 | 65 73 63 29 3b 0d 09 49 |seDesc(d|esc);..I|
|00000ad0| 6e 69 74 44 65 73 63 28 | 64 65 73 63 29 3b 0d 7d |nitDesc(|desc);.}|
|00000ae0| 0d 0d 2f 2a 0d 20 2a 20 | 43 53 74 72 69 6e 67 54 |../*. * |CStringT|
|00000af0| 6f 44 65 73 63 28 29 20 | 2d 2d 20 0d 20 2a 09 50 |oDesc() |-- . *.P|
|00000b00| 75 74 20 61 20 43 20 73 | 74 72 69 6e 67 20 69 6e |ut a C s|tring in|
|00000b10| 74 6f 20 61 20 64 65 73 | 63 72 69 70 74 6f 72 20 |to a des|criptor |
|00000b20| 72 65 63 6f 72 64 2e 0d | 20 2a 2f 0d 76 6f 69 64 |record..| */.void|
|00000b30| 20 43 53 74 72 69 6e 67 | 54 6f 44 65 73 63 28 63 | CString|ToDesc(c|
|00000b40| 68 61 72 20 2a 76 61 6c | 75 65 70 2c 20 44 65 73 |har *val|uep, Des|
|00000b50| 63 54 79 70 65 20 64 54 | 79 70 65 2c 20 41 45 44 |cType dT|ype, AED|
|00000b60| 65 73 63 20 2a 64 65 73 | 63 29 0d 7b 0d 09 64 65 |esc *des|c).{..de|
|00000b70| 73 63 2d 3e 64 65 73 63 | 72 69 70 74 6f 72 54 79 |sc->desc|riptorTy|
|00000b80| 70 65 20 3d 20 64 54 79 | 70 65 3b 0d 09 69 66 20 |pe = dTy|pe;..if |
|00000b90| 28 64 54 79 70 65 20 3d | 3d 20 74 79 70 65 43 68 |(dType =|= typeCh|
|00000ba0| 61 72 29 0d 09 09 28 76 | 6f 69 64 29 20 50 74 72 |ar)...(v|oid) Ptr|
|00000bb0| 54 6f 48 61 6e 64 28 76 | 61 6c 75 65 70 2c 20 26 |ToHand(v|aluep, &|
|00000bc0| 64 65 73 63 2d 3e 64 61 | 74 61 48 61 6e 64 6c 65 |desc->da|taHandle|
|00000bd0| 2c 20 73 74 72 6c 65 6e | 28 76 61 6c 75 65 70 29 |, strlen|(valuep)|
|00000be0| 29 3b 0d 09 65 6c 73 65 | 20 69 66 20 28 64 54 79 |);..else| if (dTy|
|00000bf0| 70 65 20 3d 3d 20 74 79 | 70 65 49 6e 74 6c 54 65 |pe == ty|peIntlTe|
|00000c00| 78 74 29 0d 09 7b 0d 09 | 09 64 65 73 63 2d 3e 64 |xt)..{..|.desc->d|
|00000c10| 61 74 61 48 61 6e 64 6c | 65 20 3d 20 4e 65 77 48 |ataHandl|e = NewH|
|00000c20| 61 6e 64 6c 65 28 34 2b | 76 61 6c 75 65 70 5b 30 |andle(4+|valuep[0|
|00000c30| 5d 29 3b 0d 09 09 2a 28 | 73 68 6f 72 74 20 2a 29 |]);...*(|short *)|
|00000c40| 20 2a 64 65 73 63 2d 3e | 64 61 74 61 48 61 6e 64 | *desc->|dataHand|
|00000c50| 6c 65 20 3d 20 73 6d 52 | 6f 6d 61 6e 3b 0d 09 09 |le = smR|oman;...|
|00000c60| 2a 28 73 68 6f 72 74 20 | 2a 29 20 28 2a 64 65 73 |*(short |*) (*des|
|00000c70| 63 2d 3e 64 61 74 61 48 | 61 6e 64 6c 65 20 2b 20 |c->dataH|andle + |
|00000c80| 32 29 20 3d 20 6c 61 6e | 67 45 6e 67 6c 69 73 68 |2) = lan|gEnglish|
|00000c90| 3b 0d 09 09 42 6c 6f 63 | 6b 4d 6f 76 65 44 61 74 |;...Bloc|kMoveDat|
|00000ca0| 61 28 76 61 6c 75 65 70 | 2c 20 2a 64 65 73 63 2d |a(valuep|, *desc-|
|00000cb0| 3e 64 61 74 61 48 61 6e | 64 6c 65 20 2b 20 34 2c |>dataHan|dle + 4,|
|00000cc0| 20 73 74 72 6c 65 6e 28 | 76 61 6c 75 65 70 29 29 | strlen(|valuep))|
|00000cd0| 3b 0d 09 7d 0d 09 65 6c | 73 65 0d 09 09 49 6e 69 |;..}..el|se...Ini|
|00000ce0| 74 44 65 73 63 28 64 65 | 73 63 29 3b 0d 7d 20 2f |tDesc(de|sc);.} /|
|00000cf0| 2a 20 43 53 74 72 69 6e | 67 54 6f 44 65 73 63 28 |* CStrin|gToDesc(|
|00000d00| 29 20 2a 2f 0d 0d 2f 2a | 0d 20 2a 20 44 65 73 63 |) */../*|. * Desc|
|00000d10| 54 79 70 65 54 6f 44 65 | 73 63 28 29 20 2d 2d 20 |TypeToDe|sc() -- |
|00000d20| 0d 20 2a 09 50 75 74 20 | 61 6e 20 4f 53 54 79 70 |. *.Put |an OSTyp|
|00000d30| 65 20 69 6e 74 6f 20 61 | 20 64 65 73 63 72 69 70 |e into a| descrip|
|00000d40| 74 6f 72 20 72 65 63 6f | 72 64 2e 0d 20 2a 2f 0d |tor reco|rd.. */.|
|00000d50| 76 6f 69 64 20 44 65 73 | 63 54 79 70 65 54 6f 44 |void Des|cTypeToD|
|00000d60| 65 73 63 28 4f 53 54 79 | 70 65 20 76 61 6c 75 65 |esc(OSTy|pe value|
|00000d70| 2c 20 44 65 73 63 54 79 | 70 65 20 64 54 79 70 65 |, DescTy|pe dType|
|00000d80| 2c 20 41 45 44 65 73 63 | 20 2a 64 65 73 63 29 0d |, AEDesc| *desc).|
|00000d90| 7b 0d 09 64 65 73 63 2d | 3e 64 65 73 63 72 69 70 |{..desc-|>descrip|
|00000da0| 74 6f 72 54 79 70 65 20 | 3d 20 64 54 79 70 65 3b |torType |= dType;|
|00000db0| 0d 09 28 76 6f 69 64 29 | 20 50 74 72 54 6f 48 61 |..(void)| PtrToHa|
|00000dc0| 6e 64 28 26 76 61 6c 75 | 65 2c 20 26 64 65 73 63 |nd(&valu|e, &desc|
|00000dd0| 2d 3e 64 61 74 61 48 61 | 6e 64 6c 65 2c 20 73 69 |->dataHa|ndle, si|
|00000de0| 7a 65 6f 66 28 76 61 6c | 75 65 29 29 3b 0d 7d 20 |zeof(val|ue));.} |
|00000df0| 2f 2a 20 44 65 73 63 54 | 79 70 65 54 6f 44 65 73 |/* DescT|ypeToDes|
|00000e00| 63 28 29 20 2a 2f 0d 0d | 2f 2a 0d 20 2a 20 4c 6f |c() */..|/*. * Lo|
|00000e10| 6e 67 54 6f 44 65 73 63 | 28 29 20 2d 2d 20 0d 20 |ngToDesc|() -- . |
|00000e20| 2a 09 50 75 74 20 61 20 | 6c 6f 6e 67 69 6e 74 20 |*.Put a |longint |
|00000e30| 69 6e 74 6f 20 61 20 64 | 65 73 63 72 69 70 74 6f |into a d|escripto|
|00000e40| 72 20 72 65 63 6f 72 64 | 2e 0d 20 2a 2f 0d 76 6f |r record|.. */.vo|
|00000e50| 69 64 20 4c 6f 6e 67 54 | 6f 44 65 73 63 28 6c 6f |id LongT|oDesc(lo|
|00000e60| 6e 67 20 76 61 6c 75 65 | 2c 20 44 65 73 63 54 79 |ng value|, DescTy|
|00000e70| 70 65 20 64 54 79 70 65 | 2c 20 41 45 44 65 73 63 |pe dType|, AEDesc|
|00000e80| 20 2a 64 65 73 63 29 0d | 7b 0d 09 64 65 73 63 2d | *desc).|{..desc-|
|00000e90| 3e 64 65 73 63 72 69 70 | 74 6f 72 54 79 70 65 20 |>descrip|torType |
|00000ea0| 3d 20 64 54 79 70 65 3b | 0d 09 69 66 20 28 64 54 |= dType;|..if (dT|
|00000eb0| 79 70 65 20 3d 3d 20 74 | 79 70 65 4c 6f 6e 67 44 |ype == t|ypeLongD|
|00000ec0| 61 74 65 54 69 6d 65 29 | 0d 09 7b 0d 09 09 64 65 |ateTime)|..{...de|
|00000ed0| 73 63 2d 3e 64 61 74 61 | 48 61 6e 64 6c 65 20 3d |sc->data|Handle =|
|00000ee0| 20 4e 65 77 48 61 6e 64 | 6c 65 28 38 29 3b 0d 09 | NewHand|le(8);..|
|00000ef0| 09 2a 28 6c 6f 6e 67 20 | 2a 29 20 2a 64 65 73 63 |.*(long |*) *desc|
|00000f00| 2d 3e 64 61 74 61 48 61 | 6e 64 6c 65 20 3d 20 30 |->dataHa|ndle = 0|
|00000f10| 3b 0d 09 09 2a 28 6c 6f | 6e 67 20 2a 29 20 28 2a |;...*(lo|ng *) (*|
|00000f20| 64 65 73 63 2d 3e 64 61 | 74 61 48 61 6e 64 6c 65 |desc->da|taHandle|
|00000f30| 20 2b 20 34 29 20 3d 20 | 76 61 6c 75 65 3b 0d 09 | + 4) = |value;..|
|00000f40| 7d 0d 09 65 6c 73 65 0d | 09 09 28 76 6f 69 64 29 |}..else.|..(void)|
|00000f50| 20 50 74 72 54 6f 48 61 | 6e 64 28 26 76 61 6c 75 | PtrToHa|nd(&valu|
|00000f60| 65 2c 20 26 64 65 73 63 | 2d 3e 64 61 74 61 48 61 |e, &desc|->dataHa|
|00000f70| 6e 64 6c 65 2c 20 73 69 | 7a 65 6f 66 28 76 61 6c |ndle, si|zeof(val|
|00000f80| 75 65 29 29 3b 0d 7d 20 | 2f 2a 20 4c 6f 6e 67 54 |ue));.} |/* LongT|
|00000f90| 6f 44 65 73 63 28 29 20 | 2a 2f 0d 0d 2f 2a 0d 20 |oDesc() |*/../*. |
|00000fa0| 2a 20 46 53 53 70 65 63 | 54 6f 44 65 73 63 28 29 |* FSSpec|ToDesc()|
|00000fb0| 20 2d 2d 20 0d 20 2a 09 | 50 75 74 20 61 20 46 69 | -- . *.|Put a Fi|
|00000fc0| 6c 65 20 53 79 73 74 65 | 6d 20 53 70 65 63 20 69 |le Syste|m Spec i|
|00000fd0| 6e 74 6f 20 61 20 64 65 | 73 63 72 69 70 74 6f 72 |nto a de|scriptor|
|00000fe0| 20 72 65 63 6f 72 64 2e | 0d 20 2a 2f 0d 76 6f 69 | record.|. */.voi|
|00000ff0| 64 20 46 53 53 70 65 63 | 54 6f 44 65 73 63 28 46 |d FSSpec|ToDesc(F|
|00001000| 53 53 70 65 63 20 2a 76 | 61 6c 75 65 70 2c 20 44 |SSpec *v|aluep, D|
|00001010| 65 73 63 54 79 70 65 20 | 64 54 79 70 65 2c 20 41 |escType |dType, A|
|00001020| 45 44 65 73 63 20 2a 64 | 65 73 63 29 0d 7b 0d 09 |EDesc *d|esc).{..|
|00001030| 4f 53 45 72 72 09 6f 73 | 73 74 61 74 3b 0d 09 0d |OSErr.os|stat;...|
|00001040| 09 64 65 73 63 2d 3e 64 | 65 73 63 72 69 70 74 6f |.desc->d|escripto|
|00001050| 72 54 79 70 65 20 3d 20 | 64 54 79 70 65 3b 0d 09 |rType = |dType;..|
|00001060| 69 66 20 28 64 54 79 70 | 65 20 3d 3d 20 74 79 70 |if (dTyp|e == typ|
|00001070| 65 46 53 53 29 0d 09 09 | 28 76 6f 69 64 29 20 50 |eFSS)...|(void) P|
|00001080| 74 72 54 6f 48 61 6e 64 | 28 76 61 6c 75 65 70 2c |trToHand|(valuep,|
|00001090| 20 26 64 65 73 63 2d 3e | 64 61 74 61 48 61 6e 64 | &desc->|dataHand|
|000010a0| 6c 65 2c 20 73 69 7a 65 | 6f 66 28 46 53 53 70 65 |le, size|of(FSSpe|
|000010b0| 63 29 29 3b 0d 09 65 6c | 73 65 20 69 66 20 28 64 |c));..el|se if (d|
|000010c0| 54 79 70 65 20 3d 3d 20 | 74 79 70 65 41 6c 69 61 |Type == |typeAlia|
|000010d0| 73 29 0d 09 7b 0d 09 09 | 6f 73 73 74 61 74 20 3d |s)..{...|osstat =|
|000010e0| 20 4e 65 77 41 6c 69 61 | 73 28 6e 69 6c 2c 20 76 | NewAlia|s(nil, v|
|000010f0| 61 6c 75 65 70 2c 20 28 | 41 6c 69 61 73 48 61 6e |aluep, (|AliasHan|
|00001100| 64 6c 65 20 2a 29 20 26 | 64 65 73 63 2d 3e 64 61 |dle *) &|desc->da|
|00001110| 74 61 48 61 6e 64 6c 65 | 29 3b 0d 09 09 69 66 20 |taHandle|);...if |
|00001120| 28 6f 73 73 74 61 74 20 | 21 3d 20 6e 6f 45 72 72 |(osstat |!= noErr|
|00001130| 29 0d 09 09 09 49 6e 69 | 74 44 65 73 63 28 64 65 |)....Ini|tDesc(de|
|00001140| 73 63 29 3b 0d 09 7d 0d | 09 65 6c 73 65 0d 09 09 |sc);..}.|.else...|
|00001150| 49 6e 69 74 44 65 73 63 | 28 64 65 73 63 29 3b 0d |InitDesc|(desc);.|
|00001160| 7d 20 2f 2a 20 46 53 53 | 70 65 63 54 6f 44 65 73 |} /* FSS|pecToDes|
|00001170| 63 28 29 20 2a 2f 0d 0d | 2f 2a 0d 20 2a 20 66 69 |c() */..|/*. * fi|
|00001180| 6e 64 50 72 6f 63 65 73 | 73 42 79 53 69 67 6e 61 |ndProces|sBySigna|
|00001190| 74 75 72 65 28 29 20 2d | 2d 20 0d 20 2a 09 46 69 |ture() -|- . *.Fi|
|000011a0| 6e 64 20 61 20 72 75 6e | 6e 69 6e 67 20 70 72 6f |nd a run|ning pro|
|000011b0| 63 65 73 73 20 62 61 73 | 65 64 20 6f 6e 20 69 74 |cess bas|ed on it|
|000011c0| 73 20 73 69 67 6e 61 74 | 75 72 65 0d 20 2a 09 53 |s signat|ure. *.S|
|000011d0| 65 65 20 49 4d 2d 56 49 | 20 32 39 2d 31 31 20 0d |ee IM-VI| 29-11 .|
|000011e0| 20 2a 2f 0d 42 6f 6f 6c | 65 61 6e 20 66 69 6e 64 | */.Bool|ean find|
|000011f0| 50 72 6f 63 65 73 73 42 | 79 53 69 67 6e 61 74 75 |ProcessB|ySignatu|
|00001200| 72 65 28 4f 53 54 79 70 | 65 20 73 69 67 2c 20 50 |re(OSTyp|e sig, P|
|00001210| 72 6f 63 65 73 73 53 65 | 72 69 61 6c 4e 75 6d 62 |rocessSe|rialNumb|
|00001220| 65 72 20 2a 70 73 6e 5f | 70 2c 20 6c 6f 6e 67 20 |er *psn_|p, long |
|00001230| 2a 70 72 6f 63 5f 6d 6f | 64 65 5f 70 29 0d 7b 0d |*proc_mo|de_p).{.|
|00001240| 09 50 72 6f 63 65 73 73 | 49 6e 66 6f 52 65 63 09 |.Process|InfoRec.|
|00001250| 09 70 72 6f 63 49 6e 66 | 6f 3b 0d 0d 09 70 73 6e |.procInf|o;...psn|
|00001260| 5f 70 2d 3e 68 69 67 68 | 4c 6f 6e 67 4f 66 50 53 |_p->high|LongOfPS|
|00001270| 4e 20 3d 20 30 3b 0d 09 | 70 73 6e 5f 70 2d 3e 6c |N = 0;..|psn_p->l|
|00001280| 6f 77 4c 6f 6e 67 4f 66 | 50 53 4e 20 3d 20 6b 4e |owLongOf|PSN = kN|
|00001290| 6f 50 72 6f 63 65 73 73 | 3b 0d 09 0d 09 70 72 6f |oProcess|;....pro|
|000012a0| 63 49 6e 66 6f 2e 70 72 | 6f 63 65 73 73 49 6e 66 |cInfo.pr|ocessInf|
|000012b0| 6f 4c 65 6e 67 74 68 20 | 3d 20 73 69 7a 65 6f 66 |oLength |= sizeof|
|000012c0| 28 70 72 6f 63 49 6e 66 | 6f 29 3b 0d 09 70 72 6f |(procInf|o);..pro|
|000012d0| 63 49 6e 66 6f 2e 70 72 | 6f 63 65 73 73 4e 61 6d |cInfo.pr|ocessNam|
|000012e0| 65 20 3d 20 4e 55 4c 4c | 3b 0d 09 70 72 6f 63 49 |e = NULL|;..procI|
|000012f0| 6e 66 6f 2e 70 72 6f 63 | 65 73 73 41 70 70 53 70 |nfo.proc|essAppSp|
|00001300| 65 63 20 3d 20 4e 55 4c | 4c 3b 0d 09 0d 09 77 68 |ec = NUL|L;....wh|
|00001310| 69 6c 65 20 28 47 65 74 | 4e 65 78 74 50 72 6f 63 |ile (Get|NextProc|
|00001320| 65 73 73 28 70 73 6e 5f | 70 29 20 3d 3d 20 6e 6f |ess(psn_|p) == no|
|00001330| 45 72 72 29 0d 09 09 69 | 66 20 28 47 65 74 50 72 |Err)...i|f (GetPr|
|00001340| 6f 63 65 73 73 49 6e 66 | 6f 72 6d 61 74 69 6f 6e |ocessInf|ormation|
|00001350| 28 70 73 6e 5f 70 2c 20 | 26 70 72 6f 63 49 6e 66 |(psn_p, |&procInf|
|00001360| 6f 29 20 3d 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |o) == no|Err)....|
|00001370| 69 66 20 28 28 70 72 6f | 63 49 6e 66 6f 2e 70 72 |if ((pro|cInfo.pr|
|00001380| 6f 63 65 73 73 54 79 70 | 65 20 3d 3d 20 27 41 50 |ocessTyp|e == 'AP|
|00001390| 50 4c 27 29 20 26 26 0d | 09 09 09 09 28 70 72 6f |PL') &&.|....(pro|
|000013a0| 63 49 6e 66 6f 2e 70 72 | 6f 63 65 73 73 53 69 67 |cInfo.pr|ocessSig|
|000013b0| 6e 61 74 75 72 65 20 3d | 3d 20 73 69 67 29 29 0d |nature =|= sig)).|
|000013c0| 09 09 09 7b 0d 09 09 09 | 09 2a 70 72 6f 63 5f 6d |...{....|.*proc_m|
|000013d0| 6f 64 65 5f 70 20 3d 20 | 70 72 6f 63 49 6e 66 6f |ode_p = |procInfo|
|000013e0| 2e 70 72 6f 63 65 73 73 | 4d 6f 64 65 3b 0d 09 09 |.process|Mode;...|
|000013f0| 09 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 09 |..return| true;..|
|00001400| 09 09 7d 0d 09 09 09 09 | 0d 09 72 65 74 75 72 6e |..}.....|..return|
|00001410| 20 66 61 6c 73 65 3b 0d | 7d 20 2f 2a 20 66 69 6e | false;.|} /* fin|
|00001420| 64 50 72 6f 63 65 73 73 | 42 79 53 69 67 6e 61 74 |dProcess|BySignat|
|00001430| 75 72 65 28 29 20 2a 2f | 0d 0d 2f 2a 0d 20 2a 20 |ure() */|../*. * |
|00001440| 66 69 6e 64 41 70 70 42 | 79 53 69 67 6e 61 74 75 |findAppB|ySignatu|
|00001450| 72 65 28 29 20 2d 2d 20 | 0d 20 2a 09 55 73 65 20 |re() -- |. *.Use |
|00001460| 74 68 65 20 64 65 73 6b | 74 6f 70 20 64 61 74 61 |the desk|top data|
|00001470| 62 61 73 65 20 74 6f 20 | 66 69 6e 64 20 61 6e 20 |base to |find an |
|00001480| 61 70 70 20 77 69 74 68 | 20 74 68 69 73 20 73 69 |app with| this si|
|00001490| 67 20 6f 6e 20 61 20 6d | 6f 75 6e 74 65 64 20 76 |g on a m|ounted v|
|000014a0| 6f 6c 75 6d 65 2e 0d 20 | 2a 2f 0d 42 6f 6f 6c 65 |olume.. |*/.Boole|
|000014b0| 61 6e 20 66 69 6e 64 41 | 70 70 42 79 53 69 67 6e |an findA|ppBySign|
|000014c0| 61 74 75 72 65 28 4f 53 | 54 79 70 65 20 73 69 67 |ature(OS|Type sig|
|000014d0| 2c 20 46 53 53 70 65 63 | 20 2a 66 73 70 65 63 5f |, FSSpec| *fspec_|
|000014e0| 70 29 0d 7b 0d 09 50 61 | 72 61 6d 42 6c 6f 63 6b |p).{..Pa|ramBlock|
|000014f0| 52 65 63 09 09 70 62 3b | 0d 09 48 50 61 72 61 6d |Rec..pb;|..HParam|
|00001500| 42 6c 6f 63 6b 52 65 63 | 09 09 68 70 62 3b 0d 09 |BlockRec|..hpb;..|
|00001510| 47 65 74 56 6f 6c 50 61 | 72 6d 73 49 6e 66 6f 42 |GetVolPa|rmsInfoB|
|00001520| 75 66 66 65 72 09 76 6f | 6c 50 61 72 6d 73 3b 0d |uffer.vo|lParms;.|
|00001530| 09 44 54 50 42 52 65 63 | 09 09 09 64 74 70 62 3b |.DTPBRec|...dtpb;|
|00001540| 0d 09 4f 53 45 72 72 09 | 09 09 6f 73 73 74 61 74 |..OSErr.|..osstat|
|00001550| 3b 0d 0d 09 2f 2a 20 66 | 6f 72 20 65 61 63 68 20 |;.../* f|or each |
|00001560| 76 6f 6c 75 6d 65 20 2a | 2f 0d 09 70 62 2e 76 6f |volume *|/..pb.vo|
|00001570| 6c 75 6d 65 50 61 72 61 | 6d 2e 69 6f 43 6f 6d 70 |lumePara|m.ioComp|
|00001580| 6c 65 74 69 6f 6e 20 3d | 20 4e 55 4c 4c 3b 0d 09 |letion =| NULL;..|
|00001590| 70 62 2e 76 6f 6c 75 6d | 65 50 61 72 61 6d 2e 69 |pb.volum|eParam.i|
|000015a0| 6f 4e 61 6d 65 50 74 72 | 20 3d 20 4e 55 4c 4c 3b |oNamePtr| = NULL;|
|000015b0| 0d 09 70 62 2e 76 6f 6c | 75 6d 65 50 61 72 61 6d |..pb.vol|umeParam|
|000015c0| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 30 3b 0d |.ioVRefN|um = 0;.|
|000015d0| 09 70 62 2e 76 6f 6c 75 | 6d 65 50 61 72 61 6d 2e |.pb.volu|meParam.|
|000015e0| 69 6f 56 6f 6c 49 6e 64 | 65 78 20 3d 20 31 3b 0d |ioVolInd|ex = 1;.|
|000015f0| 09 6f 73 73 74 61 74 20 | 3d 20 50 42 47 65 74 56 |.osstat |= PBGetV|
|00001600| 49 6e 66 6f 28 26 70 62 | 2c 20 66 61 6c 73 65 29 |Info(&pb|, false)|
|00001610| 3b 0d 09 77 68 69 6c 65 | 20 28 6f 73 73 74 61 74 |;..while| (osstat|
|00001620| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 09 7b 0d 09 09 | == noEr|r)..{...|
|00001630| 2f 2a 20 63 68 65 63 6b | 20 74 6f 20 73 65 65 20 |/* check| to see |
|00001640| 69 66 20 69 74 20 73 75 | 70 70 6f 72 74 73 20 74 |if it su|pports t|
|00001650| 68 65 20 64 65 73 6b 74 | 6f 70 20 6d 61 6e 61 67 |he deskt|op manag|
|00001660| 65 72 20 2a 2f 0d 09 09 | 68 70 62 2e 69 6f 50 61 |er */...|hpb.ioPa|
|00001670| 72 61 6d 2e 69 6f 43 6f | 6d 70 6c 65 74 69 6f 6e |ram.ioCo|mpletion|
|00001680| 20 3d 20 4e 55 4c 4c 3b | 0d 09 09 68 70 62 2e 69 | = NULL;|...hpb.i|
|00001690| 6f 50 61 72 61 6d 2e 69 | 6f 56 52 65 66 4e 75 6d |oParam.i|oVRefNum|
|000016a0| 20 3d 20 70 62 2e 76 6f | 6c 75 6d 65 50 61 72 61 | = pb.vo|lumePara|
|000016b0| 6d 2e 69 6f 56 52 65 66 | 4e 75 6d 3b 0d 09 09 68 |m.ioVRef|Num;...h|
|000016c0| 70 62 2e 69 6f 50 61 72 | 61 6d 2e 69 6f 4e 61 6d |pb.ioPar|am.ioNam|
|000016d0| 65 50 74 72 20 3d 20 4e | 55 4c 4c 3b 0d 09 09 68 |ePtr = N|ULL;...h|
|000016e0| 70 62 2e 69 6f 50 61 72 | 61 6d 2e 69 6f 42 75 66 |pb.ioPar|am.ioBuf|
|000016f0| 66 65 72 20 3d 20 28 50 | 74 72 29 20 26 76 6f 6c |fer = (P|tr) &vol|
|00001700| 50 61 72 6d 73 3b 0d 09 | 09 68 70 62 2e 69 6f 50 |Parms;..|.hpb.ioP|
|00001710| 61 72 61 6d 2e 69 6f 52 | 65 71 43 6f 75 6e 74 20 |aram.ioR|eqCount |
|00001720| 3d 20 73 69 7a 65 6f 66 | 28 76 6f 6c 50 61 72 6d |= sizeof|(volParm|
|00001730| 73 29 3b 0d 09 09 6f 73 | 73 74 61 74 20 3d 20 50 |s);...os|stat = P|
|00001740| 42 48 47 65 74 56 6f 6c | 50 61 72 6d 73 28 26 68 |BHGetVol|Parms(&h|
|00001750| 70 62 2c 20 66 61 6c 73 | 65 29 3b 0d 09 09 69 66 |pb, fals|e);...if|
|00001760| 20 28 28 6f 73 73 74 61 | 74 20 3d 3d 20 6e 6f 45 | ((ossta|t == noE|
|00001770| 72 72 29 20 26 26 20 28 | 76 6f 6c 50 61 72 6d 73 |rr) && (|volParms|
|00001780| 2e 76 4d 41 74 74 72 69 | 62 20 26 20 28 31 20 3c |.vMAttri|b & (1 <|
|00001790| 3c 20 62 48 61 73 44 65 | 73 6b 74 6f 70 4d 67 72 |< bHasDe|sktopMgr|
|000017a0| 29 29 29 0d 09 09 7b 0d | 09 09 09 2f 2a 20 66 69 |)))...{.|.../* fi|
|000017b0| 6e 64 20 6f 75 74 20 74 | 68 65 20 44 65 73 6b 74 |nd out t|he Deskt|
|000017c0| 6f 70 20 72 65 66 65 72 | 65 6e 63 65 20 6e 75 6d |op refer|ence num|
|000017d0| 62 65 72 20 2a 2f 0d 09 | 09 09 64 74 70 62 2e 69 |ber */..|..dtpb.i|
|000017e0| 6f 4e 61 6d 65 50 74 72 | 20 3d 20 4e 55 4c 4c 3b |oNamePtr| = NULL;|
|000017f0| 0d 09 09 09 64 74 70 62 | 2e 69 6f 56 52 65 66 4e |....dtpb|.ioVRefN|
|00001800| 75 6d 20 3d 20 70 62 2e | 76 6f 6c 75 6d 65 50 61 |um = pb.|volumePa|
|00001810| 72 61 6d 2e 69 6f 56 52 | 65 66 4e 75 6d 3b 0d 09 |ram.ioVR|efNum;..|
|00001820| 09 09 6f 73 73 74 61 74 | 20 3d 20 50 42 44 54 47 |..osstat| = PBDTG|
|00001830| 65 74 50 61 74 68 28 26 | 64 74 70 62 29 3b 0d 09 |etPath(&|dtpb);..|
|00001840| 09 09 69 66 20 28 6f 73 | 73 74 61 74 20 3d 3d 20 |..if (os|stat == |
|00001850| 6e 6f 45 72 72 29 0d 09 | 09 09 7b 0d 09 09 09 09 |noErr)..|..{.....|
|00001860| 2f 2a 20 73 65 61 72 63 | 68 20 74 68 69 73 20 44 |/* searc|h this D|
|00001870| 65 73 6b 74 6f 70 20 64 | 61 74 61 62 61 73 65 20 |esktop d|atabase |
|00001880| 66 6f 72 20 61 6e 20 61 | 70 70 20 77 69 74 68 20 |for an a|pp with |
|00001890| 74 68 65 20 72 69 67 68 | 74 20 73 69 67 6e 61 74 |the righ|t signat|
|000018a0| 75 72 65 20 2a 2f 0d 09 | 09 09 09 64 74 70 62 2e |ure */..|...dtpb.|
|000018b0| 69 6f 43 6f 6d 70 6c 65 | 74 69 6f 6e 20 3d 20 4e |ioComple|tion = N|
|000018c0| 55 4c 4c 3b 0d 09 09 09 | 09 64 74 70 62 2e 69 6f |ULL;....|.dtpb.io|
|000018d0| 4e 61 6d 65 50 74 72 20 | 3d 20 28 53 74 72 69 6e |NamePtr |= (Strin|
|000018e0| 67 50 74 72 29 20 26 28 | 66 73 70 65 63 5f 70 2d |gPtr) &(|fspec_p-|
|000018f0| 3e 6e 61 6d 65 29 3b 0d | 09 09 09 09 64 74 70 62 |>name);.|....dtpb|
|00001900| 2e 69 6f 49 6e 64 65 78 | 20 3d 20 30 3b 0d 09 09 |.ioIndex| = 0;...|
|00001910| 09 09 64 74 70 62 2e 69 | 6f 46 69 6c 65 43 72 65 |..dtpb.i|oFileCre|
|00001920| 61 74 6f 72 20 3d 20 73 | 69 67 3b 0d 09 09 09 09 |ator = s|ig;.....|
|00001930| 6f 73 73 74 61 74 20 3d | 20 50 42 44 54 47 65 74 |osstat =| PBDTGet|
|00001940| 41 50 50 4c 28 26 64 74 | 70 62 2c 20 66 61 6c 73 |APPL(&dt|pb, fals|
|00001950| 65 29 3b 0d 09 09 09 09 | 69 66 20 28 6f 73 73 74 |e);.....|if (osst|
|00001960| 61 74 20 3d 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |at == no|Err)....|
|00001970| 09 7b 0d 09 09 09 09 09 | 2f 2a 20 66 6f 75 6e 64 |.{......|/* found|
|00001980| 20 74 68 65 20 61 70 70 | 20 2a 2f 0d 09 09 09 09 | the app| */.....|
|00001990| 09 66 73 70 65 63 5f 70 | 2d 3e 76 52 65 66 4e 75 |.fspec_p|->vRefNu|
|000019a0| 6d 20 3d 20 70 62 2e 76 | 6f 6c 75 6d 65 50 61 72 |m = pb.v|olumePar|
|000019b0| 61 6d 2e 69 6f 56 52 65 | 66 4e 75 6d 3b 0d 09 09 |am.ioVRe|fNum;...|
|000019c0| 09 09 09 66 73 70 65 63 | 5f 70 2d 3e 70 61 72 49 |...fspec|_p->parI|
|000019d0| 44 20 3d 20 64 74 70 62 | 2e 69 6f 41 50 50 4c 50 |D = dtpb|.ioAPPLP|
|000019e0| 61 72 49 44 3b 0d 09 09 | 09 09 09 72 65 74 75 72 |arID;...|...retur|
|000019f0| 6e 20 74 72 75 65 3b 0d | 09 09 09 09 7d 20 2f 2a |n true;.|....} /*|
|00001a00| 20 50 42 44 54 47 65 74 | 41 50 50 4c 20 3d 3d 20 | PBDTGet|APPL == |
|00001a10| 6e 6f 45 72 72 20 2a 2f | 0d 09 09 09 7d 20 2f 2a |noErr */|....} /*|
|00001a20| 20 50 42 44 54 47 65 74 | 50 61 74 68 20 3d 3d 20 | PBDTGet|Path == |
|00001a30| 6e 6f 45 72 72 20 2a 2f | 0d 09 09 7d 20 2f 2a 20 |noErr */|...} /* |
|00001a40| 50 42 48 47 65 74 56 6f | 6c 50 61 72 6d 73 20 3d |PBHGetVo|lParms =|
|00001a50| 3d 20 6e 6f 45 72 72 20 | 2a 2f 0d 09 0d 09 09 70 |= noErr |*/.....p|
|00001a60| 62 2e 76 6f 6c 75 6d 65 | 50 61 72 61 6d 2e 69 6f |b.volume|Param.io|
|00001a70| 56 6f 6c 49 6e 64 65 78 | 2b 2b 3b 0d 09 09 6f 73 |VolIndex|++;...os|
|00001a80| 73 74 61 74 20 3d 20 50 | 42 47 65 74 56 49 6e 66 |stat = P|BGetVInf|
|00001a90| 6f 28 26 70 62 2c 20 66 | 61 6c 73 65 29 3b 0d 09 |o(&pb, f|alse);..|
|00001aa0| 7d 20 2f 2a 20 77 68 69 | 6c 65 20 50 42 47 65 74 |} /* whi|le PBGet|
|00001ab0| 56 49 6e 66 6f 20 3d 3d | 20 6e 6f 45 72 72 20 2a |VInfo ==| noErr *|
|00001ac0| 2f 0d 09 0d 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |/....ret|urn fals|
|00001ad0| 65 3b 0d 7d 20 2f 2a 20 | 66 69 6e 64 41 70 70 42 |e;.} /* |findAppB|
|00001ae0| 79 53 69 67 6e 61 74 75 | 72 65 28 29 20 2a 2f 0d |ySignatu|re() */.|
|00001af0| 0d 2f 2a 0d 20 2a 20 49 | 6e 69 74 41 45 54 6f 41 |./*. * I|nitAEToA|
|00001b00| 70 70 28 29 20 2d 2d 20 | 0d 20 2a 09 49 6e 69 74 |pp() -- |. *.Init|
|00001b10| 69 61 6c 69 7a 65 20 61 | 6e 20 61 70 70 6c 65 20 |ialize a|n apple |
|00001b20| 65 76 65 6e 74 20 74 6f | 20 62 65 20 73 65 6e 74 |event to| be sent|
|00001b30| 20 74 6f 20 61 6e 20 61 | 70 70 6c 69 63 61 74 69 | to an a|pplicati|
|00001b40| 6f 6e 2e 20 20 52 65 74 | 75 72 6e 20 74 68 65 20 |on. Ret|urn the |
|00001b50| 65 76 65 6e 74 2c 20 61 | 6e 64 0d 20 2a 09 77 68 |event, a|nd. *.wh|
|00001b60| 65 74 68 65 72 20 74 68 | 65 20 61 70 70 6c 69 63 |ether th|e applic|
|00001b70| 61 74 69 6f 6e 20 69 73 | 20 63 75 72 72 65 6e 74 |ation is| current|
|00001b80| 6c 79 20 72 75 6e 6e 69 | 6e 67 2e 0d 20 2a 2f 0d |ly runni|ng.. */.|
|00001b90| 4f 53 45 72 72 20 49 6e | 69 74 41 45 54 6f 41 70 |OSErr In|itAEToAp|
|00001ba0| 70 28 4f 53 54 79 70 65 | 20 61 70 70 53 69 67 2c |p(OSType| appSig,|
|00001bb0| 20 41 45 45 76 65 6e 74 | 43 6c 61 73 73 20 65 76 | AEEvent|Class ev|
|00001bc0| 65 6e 74 43 6c 61 73 73 | 2c 20 41 45 45 76 65 6e |entClass|, AEEven|
|00001bd0| 74 49 44 20 65 76 65 6e | 74 49 44 2c 20 0d 09 09 |tID even|tID, ...|
|00001be0| 09 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 61 65 76 |.AppleEv|ent *aev|
|00001bf0| 74 2c 20 42 6f 6f 6c 65 | 61 6e 20 2a 72 75 6e 6e |t, Boole|an *runn|
|00001c00| 69 6e 67 29 0d 7b 0d 09 | 41 45 44 65 73 63 09 09 |ing).{..|AEDesc..|
|00001c10| 09 61 64 64 72 44 65 73 | 63 3b 0d 09 50 72 6f 63 |.addrDes|c;..Proc|
|00001c20| 65 73 73 53 65 72 69 61 | 6c 4e 75 6d 62 65 72 09 |essSeria|lNumber.|
|00001c30| 70 73 6e 3b 0d 09 6c 6f | 6e 67 09 09 09 64 75 6d |psn;..lo|ng...dum|
|00001c40| 6d 79 3b 0d 09 4f 53 45 | 72 72 09 09 09 6f 73 73 |my;..OSE|rr...oss|
|00001c50| 74 61 74 3b 0d 0d 09 49 | 6e 69 74 44 65 73 63 28 |tat;...I|nitDesc(|
|00001c60| 26 61 64 64 72 44 65 73 | 63 29 3b 0d 09 6f 73 73 |&addrDes|c);..oss|
|00001c70| 74 61 74 20 3d 20 6e 6f | 45 72 72 3b 0d 09 0d 09 |tat = no|Err;....|
|00001c80| 2a 72 75 6e 6e 69 6e 67 | 20 3d 20 66 69 6e 64 50 |*running| = findP|
|00001c90| 72 6f 63 65 73 73 42 79 | 53 69 67 6e 61 74 75 72 |rocessBy|Signatur|
|00001ca0| 65 28 61 70 70 53 69 67 | 2c 20 26 70 73 6e 2c 20 |e(appSig|, &psn, |
|00001cb0| 26 64 75 6d 6d 79 29 3b | 0d 09 69 66 20 28 2a 72 |&dummy);|..if (*r|
|00001cc0| 75 6e 6e 69 6e 67 29 0d | 09 09 6f 73 73 74 61 74 |unning).|..osstat|
|00001cd0| 20 3d 20 41 45 43 72 65 | 61 74 65 44 65 73 63 28 | = AECre|ateDesc(|
|00001ce0| 74 79 70 65 50 72 6f 63 | 65 73 73 53 65 72 69 61 |typeProc|essSeria|
|00001cf0| 6c 4e 75 6d 62 65 72 2c | 20 26 70 73 6e 2c 20 73 |lNumber,| &psn, s|
|00001d00| 69 7a 65 6f 66 28 70 73 | 6e 29 2c 20 26 61 64 64 |izeof(ps|n), &add|
|00001d10| 72 44 65 73 63 29 3b 0d | 09 65 6c 73 65 0d 09 09 |rDesc);.|.else...|
|00001d20| 6f 73 73 74 61 74 20 3d | 20 41 45 43 72 65 61 74 |osstat =| AECreat|
|00001d30| 65 44 65 73 63 28 74 79 | 70 65 41 70 70 6c 53 69 |eDesc(ty|peApplSi|
|00001d40| 67 6e 61 74 75 72 65 2c | 20 26 61 70 70 53 69 67 |gnature,| &appSig|
|00001d50| 2c 20 73 69 7a 65 6f 66 | 28 4f 53 54 79 70 65 29 |, sizeof|(OSType)|
|00001d60| 2c 20 26 61 64 64 72 44 | 65 73 63 29 3b 0d 09 69 |, &addrD|esc);..i|
|00001d70| 66 20 28 6f 73 73 74 61 | 74 20 21 3d 20 6e 6f 45 |f (ossta|t != noE|
|00001d80| 72 72 29 20 0d 09 09 67 | 6f 74 6f 20 65 78 69 74 |rr) ...g|oto exit|
|00001d90| 3b 0d 09 0d 09 6f 73 73 | 74 61 74 20 3d 20 41 45 |;....oss|tat = AE|
|00001da0| 43 72 65 61 74 65 41 70 | 70 6c 65 45 76 65 6e 74 |CreateAp|pleEvent|
|00001db0| 28 65 76 65 6e 74 43 6c | 61 73 73 2c 20 65 76 65 |(eventCl|ass, eve|
|00001dc0| 6e 74 49 44 2c 20 26 61 | 64 64 72 44 65 73 63 2c |ntID, &a|ddrDesc,|
|00001dd0| 20 0d 09 09 09 09 6b 41 | 75 74 6f 47 65 6e 65 72 | .....kA|utoGener|
|00001de0| 61 74 65 52 65 74 75 72 | 6e 49 44 2c 20 6b 41 6e |ateRetur|nID, kAn|
|00001df0| 79 54 72 61 6e 73 61 63 | 74 69 6f 6e 49 44 2c 0d |yTransac|tionID,.|
|00001e00| 09 09 09 09 61 65 76 74 | 29 3b 0d 65 78 69 74 3a |....aevt|);.exit:|
|00001e10| 0d 09 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 61 |..Dispos|eDesc(&a|
|00001e20| 64 64 72 44 65 73 63 29 | 3b 0d 09 72 65 74 75 72 |ddrDesc)|;..retur|
|00001e30| 6e 20 6f 73 73 74 61 74 | 3b 0d 7d 20 2f 2a 20 49 |n osstat|;.} /* I|
|00001e40| 6e 69 74 41 45 54 6f 41 | 70 70 28 29 20 2a 2f 0d |nitAEToA|pp() */.|
|00001e50| 0d 2f 2a 0d 20 2a 20 53 | 65 6e 64 41 45 54 6f 41 |./*. * S|endAEToA|
|00001e60| 70 70 28 29 20 2d 2d 0d | 20 2a 09 53 65 6e 64 20 |pp() --.| *.Send |
|00001e70| 61 6e 20 41 70 70 6c 65 | 20 45 76 65 6e 74 20 74 |an Apple| Event t|
|00001e80| 6f 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |o an app|lication|
|00001e90| 2c 20 77 68 69 63 68 20 | 6d 61 79 20 6f 72 20 6d |, which |may or m|
|00001ea0| 61 79 20 6e 6f 74 20 62 | 65 20 72 75 6e 6e 69 6e |ay not b|e runnin|
|00001eb0| 67 2e 20 20 49 66 20 69 | 74 20 69 73 6e 27 74 0d |g. If i|t isn't.|
|00001ec0| 20 2a 09 72 75 6e 6e 69 | 6e 67 2c 20 74 68 65 20 | *.runni|ng, the |
|00001ed0| 65 76 65 6e 74 20 72 65 | 70 6c 79 20 77 6f 6e 27 |event re|ply won'|
|00001ee0| 74 20 62 65 20 66 69 6c | 6c 65 64 20 69 6e 2e 2e |t be fil|led in..|
|00001ef0| 2e 2e 0d 20 2a 2f 0d 4f | 53 45 72 72 20 53 65 6e |... */.O|SErr Sen|
|00001f00| 64 41 45 54 6f 41 70 70 | 28 4f 53 54 79 70 65 20 |dAEToApp|(OSType |
|00001f10| 61 70 70 53 69 67 2c 20 | 41 70 70 6c 65 45 76 65 |appSig, |AppleEve|
|00001f20| 6e 74 20 2a 61 65 76 74 | 2c 20 41 70 70 6c 65 45 |nt *aevt|, AppleE|
|00001f30| 76 65 6e 74 20 2a 61 65 | 72 65 70 6c 79 2c 20 41 |vent *ae|reply, A|
|00001f40| 45 49 64 6c 65 55 50 50 | 20 69 64 6c 65 55 50 50 |EIdleUPP| idleUPP|
|00001f50| 2c 20 42 6f 6f 6c 65 61 | 6e 20 72 75 6e 6e 69 6e |, Boolea|n runnin|
|00001f60| 67 29 0d 7b 0d 09 4c 61 | 75 6e 63 68 50 61 72 61 |g).{..La|unchPara|
|00001f70| 6d 42 6c 6f 63 6b 52 65 | 63 09 6c 70 62 3b 0d 09 |mBlockRe|c.lpb;..|
|00001f80| 41 45 44 65 73 63 09 09 | 09 61 70 70 50 61 72 6d |AEDesc..|.appParm|
|00001f90| 44 65 73 63 3b 0d 09 41 | 45 44 65 73 63 09 09 09 |Desc;..A|EDesc...|
|00001fa0| 72 65 70 6c 79 44 65 73 | 63 3b 0d 09 41 70 70 6c |replyDes|c;..Appl|
|00001fb0| 65 45 76 65 6e 74 09 09 | 6d 79 72 65 70 6c 79 3b |eEvent..|myreply;|
|00001fc0| 0d 09 41 70 70 6c 65 45 | 76 65 6e 74 09 09 2a 72 |..AppleE|vent..*r|
|00001fd0| 65 70 6c 79 70 3b 0d 09 | 46 53 53 70 65 63 09 09 |eplyp;..|FSSpec..|
|00001fe0| 09 61 70 70 46 73 70 65 | 63 3b 0d 09 4f 53 45 72 |.appFspe|c;..OSEr|
|00001ff0| 72 09 09 09 6f 73 73 74 | 61 74 20 3d 20 6e 6f 45 |r...osst|at = noE|
|00002000| 72 72 3b 0d 09 0d 09 49 | 6e 69 74 44 65 73 63 28 |rr;....I|nitDesc(|
|00002010| 26 61 70 70 50 61 72 6d | 44 65 73 63 29 3b 0d 09 |&appParm|Desc);..|
|00002020| 49 6e 69 74 44 65 73 63 | 28 26 6d 79 72 65 70 6c |InitDesc|(&myrepl|
|00002030| 79 29 3b 0d 09 49 6e 69 | 74 44 65 73 63 28 26 72 |y);..Ini|tDesc(&r|
|00002040| 65 70 6c 79 44 65 73 63 | 29 3b 0d 09 0d 09 69 66 |eplyDesc|);....if|
|00002050| 20 28 72 75 6e 6e 69 6e | 67 29 0d 09 7b 0d 09 09 | (runnin|g)..{...|
|00002060| 2f 2a 20 74 68 65 20 61 | 70 70 20 69 73 20 72 75 |/* the a|pp is ru|
|00002070| 6e 6e 69 6e 67 2c 20 6a | 75 73 74 20 73 65 6e 64 |nning, j|ust send|
|00002080| 20 74 68 65 20 65 76 65 | 6e 74 20 2a 2f 0d 09 09 | the eve|nt */...|
|00002090| 72 65 70 6c 79 70 20 3d | 20 61 65 72 65 70 6c 79 |replyp =| aereply|
|000020a0| 20 3f 20 61 65 72 65 70 | 6c 79 20 3a 20 26 6d 79 | ? aerep|ly : &my|
|000020b0| 72 65 70 6c 79 3b 0d 09 | 09 6f 73 73 74 61 74 20 |reply;..|.osstat |
|000020c0| 3d 20 41 45 53 65 6e 64 | 28 61 65 76 74 2c 20 72 |= AESend|(aevt, r|
|000020d0| 65 70 6c 79 70 2c 20 6b | 41 45 57 61 69 74 52 65 |eplyp, k|AEWaitRe|
|000020e0| 70 6c 79 20 2b 20 6b 41 | 45 43 61 6e 49 6e 74 65 |ply + kA|ECanInte|
|000020f0| 72 61 63 74 20 2b 20 6b | 41 45 43 61 6e 53 77 69 |ract + k|AECanSwi|
|00002100| 74 63 68 4c 61 79 65 72 | 20 2b 20 6b 41 45 44 6f |tchLayer| + kAEDo|
|00002110| 6e 74 52 65 63 6f 6e 6e | 65 63 74 2c 0d 09 09 09 |ntReconn|ect,....|
|00002120| 09 6b 41 45 4e 6f 72 6d | 61 6c 50 72 69 6f 72 69 |.kAENorm|alPriori|
|00002130| 74 79 2c 20 6b 41 45 44 | 65 66 61 75 6c 74 54 69 |ty, kAED|efaultTi|
|00002140| 6d 65 6f 75 74 2c 20 69 | 64 6c 65 55 50 50 2c 20 |meout, i|dleUPP, |
|00002150| 6e 69 6c 29 3b 0d 09 09 | 69 66 20 28 6f 73 73 74 |nil);...|if (osst|
|00002160| 61 74 20 3d 3d 20 2d 36 | 30 33 29 0d 09 09 09 2f |at == -6|03)..../|
|00002170| 2a 20 69 67 6e 6f 72 65 | 20 74 68 69 73 20 65 72 |* ignore| this er|
|00002180| 72 6f 72 2c 20 69 74 20 | 64 6f 65 73 6e 27 74 20 |ror, it |doesn't |
|00002190| 73 65 65 6d 20 74 6f 20 | 6d 61 74 74 65 72 20 2a |seem to |matter *|
|000021a0| 2f 0d 09 09 09 6f 73 73 | 74 61 74 20 3d 20 6e 6f |/....oss|tat = no|
|000021b0| 45 72 72 3b 0d 09 09 69 | 66 20 28 6f 73 73 74 61 |Err;...i|f (ossta|
|000021c0| 74 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 7b 0d |t == noE|rr)...{.|
|000021d0| 09 09 09 6f 73 73 74 61 | 74 20 3d 20 41 45 47 65 |...ossta|t = AEGe|
|000021e0| 74 50 61 72 61 6d 44 65 | 73 63 28 72 65 70 6c 79 |tParamDe|sc(reply|
|000021f0| 70 2c 20 6b 65 79 45 72 | 72 6f 72 4e 75 6d 62 65 |p, keyEr|rorNumbe|
|00002200| 72 2c 20 74 79 70 65 4c | 6f 6e 67 49 6e 74 65 67 |r, typeL|ongInteg|
|00002210| 65 72 2c 20 26 72 65 70 | 6c 79 44 65 73 63 29 3b |er, &rep|lyDesc);|
|00002220| 0d 09 09 09 69 66 20 28 | 6f 73 73 74 61 74 20 3d |....if (|osstat =|
|00002230| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 09 09 6f 73 73 |= noErr)|.....oss|
|00002240| 74 61 74 20 3d 20 2a 2a | 28 6c 6f 6e 67 20 2a 2a |tat = **|(long **|
|00002250| 29 20 72 65 70 6c 79 44 | 65 73 63 2e 64 61 74 61 |) replyD|esc.data|
|00002260| 48 61 6e 64 6c 65 3b 0d | 09 09 09 65 6c 73 65 20 |Handle;.|...else |
|00002270| 69 66 20 28 6f 73 73 74 | 61 74 20 3d 3d 20 65 72 |if (osst|at == er|
|00002280| 72 41 45 44 65 73 63 4e | 6f 74 46 6f 75 6e 64 29 |rAEDescN|otFound)|
|00002290| 0d 09 09 09 09 2f 2a 20 | 6e 6f 20 65 72 72 6f 72 |...../* |no error|
|000022a0| 20 63 6f 64 65 2c 20 6e | 6f 20 65 72 72 6f 72 20 | code, n|o error |
|000022b0| 2a 2f 0d 09 09 09 09 6f | 73 73 74 61 74 20 3d 20 |*/.....o|sstat = |
|000022c0| 6e 6f 45 72 72 3b 0d 09 | 09 7d 0d 09 7d 20 2f 2f |noErr;..|.}..} //|
|000022d0| 20 72 75 6e 6e 69 6e 67 | 0d 09 65 6c 73 65 20 69 | running|..else i|
|000022e0| 66 20 28 66 69 6e 64 41 | 70 70 42 79 53 69 67 6e |f (findA|ppBySign|
|000022f0| 61 74 75 72 65 28 61 70 | 70 53 69 67 2c 20 26 61 |ature(ap|pSig, &a|
|00002300| 70 70 46 73 70 65 63 29 | 29 0d 09 7b 0d 09 09 2f |ppFspec)|)..{.../|
|00002310| 2a 20 77 65 20 6e 65 65 | 64 20 74 6f 20 6c 61 75 |* we nee|d to lau|
|00002320| 6e 63 68 20 74 68 65 20 | 61 70 70 20 77 69 74 68 |nch the |app with|
|00002330| 20 74 68 65 20 65 76 65 | 6e 74 20 2a 2f 0d 09 09 | the eve|nt */...|
|00002340| 6f 73 73 74 61 74 20 3d | 20 41 45 43 6f 65 72 63 |osstat =| AECoerc|
|00002350| 65 44 65 73 63 28 61 65 | 76 74 2c 20 74 79 70 65 |eDesc(ae|vt, type|
|00002360| 41 70 70 50 61 72 61 6d | 65 74 65 72 73 2c 20 26 |AppParam|eters, &|
|00002370| 61 70 70 50 61 72 6d 44 | 65 73 63 29 3b 0d 09 09 |appParmD|esc);...|
|00002380| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00002390| 45 72 72 29 0d 09 09 09 | 67 6f 74 6f 20 65 78 69 |Err)....|goto exi|
|000023a0| 74 3b 0d 09 09 0d 09 09 | 48 4c 6f 63 6b 28 61 70 |t;......|HLock(ap|
|000023b0| 70 50 61 72 6d 44 65 73 | 63 2e 64 61 74 61 48 61 |pParmDes|c.dataHa|
|000023c0| 6e 64 6c 65 29 3b 0d 09 | 09 0d 09 09 2f 2a 20 63 |ndle);..|..../* c|
|000023d0| 61 6c 6c 20 4c 61 75 6e | 63 68 41 70 70 6c 69 63 |all Laun|chApplic|
|000023e0| 61 74 69 6f 6e 20 2a 2f | 0d 09 09 6c 70 62 2e 6c |ation */|...lpb.l|
|000023f0| 61 75 6e 63 68 42 6c 6f | 63 6b 49 44 20 3d 20 65 |aunchBlo|ckID = e|
|00002400| 78 74 65 6e 64 65 64 42 | 6c 6f 63 6b 3b 0d 09 09 |xtendedB|lock;...|
|00002410| 6c 70 62 2e 6c 61 75 6e | 63 68 45 50 42 4c 65 6e |lpb.laun|chEPBLen|
|00002420| 67 74 68 20 3d 20 65 78 | 74 65 6e 64 65 64 42 6c |gth = ex|tendedBl|
|00002430| 6f 63 6b 4c 65 6e 3b 0d | 09 09 6c 70 62 2e 6c 61 |ockLen;.|..lpb.la|
|00002440| 75 6e 63 68 46 69 6c 65 | 46 6c 61 67 73 20 3d 20 |unchFile|Flags = |
|00002450| 6c 61 75 6e 63 68 4e 6f | 46 69 6c 65 46 6c 61 67 |launchNo|FileFlag|
|00002460| 73 3b 0d 09 09 6c 70 62 | 2e 6c 61 75 6e 63 68 43 |s;...lpb|.launchC|
|00002470| 6f 6e 74 72 6f 6c 46 6c | 61 67 73 20 3d 20 6c 61 |ontrolFl|ags = la|
|00002480| 75 6e 63 68 43 6f 6e 74 | 69 6e 75 65 20 2b 20 6c |unchCont|inue + l|
|00002490| 61 75 6e 63 68 44 6f 6e | 74 53 77 69 74 63 68 3b |aunchDon|tSwitch;|
|000024a0| 0d 09 09 6c 70 62 2e 6c | 61 75 6e 63 68 41 70 70 |...lpb.l|aunchApp|
|000024b0| 53 70 65 63 20 3d 20 26 | 61 70 70 46 73 70 65 63 |Spec = &|appFspec|
|000024c0| 3b 0d 09 09 6c 70 62 2e | 6c 61 75 6e 63 68 41 70 |;...lpb.|launchAp|
|000024d0| 70 50 61 72 61 6d 65 74 | 65 72 73 20 3d 20 28 41 |pParamet|ers = (A|
|000024e0| 70 70 50 61 72 61 6d 65 | 74 65 72 73 50 74 72 29 |ppParame|tersPtr)|
|000024f0| 20 2a 61 70 70 50 61 72 | 6d 44 65 73 63 2e 64 61 | *appPar|mDesc.da|
|00002500| 74 61 48 61 6e 64 6c 65 | 3b 0d 09 09 54 48 7a 09 |taHandle|;...THz.|
|00002510| 6f 6c 64 5a 6f 6e 65 20 | 3d 20 47 65 74 5a 6f 6e |oldZone |= GetZon|
|00002520| 65 28 29 3b 0d 09 09 6f | 73 73 74 61 74 20 3d 20 |e();...o|sstat = |
|00002530| 4c 61 75 6e 63 68 41 70 | 70 6c 69 63 61 74 69 6f |LaunchAp|plicatio|
|00002540| 6e 28 26 6c 70 62 29 3b | 0d 09 09 69 66 20 28 6f |n(&lpb);|...if (o|
|00002550| 73 73 74 61 74 20 3d 3d | 20 2d 36 30 33 29 0d 09 |sstat ==| -603)..|
|00002560| 09 09 2f 2a 20 69 67 6e | 6f 72 65 20 74 68 69 73 |../* ign|ore this|
|00002570| 20 65 72 72 6f 72 2c 20 | 69 74 20 64 6f 65 73 6e | error, |it doesn|
|00002580| 27 74 20 73 65 65 6d 20 | 74 6f 20 6d 61 74 74 65 |'t seem |to matte|
|00002590| 72 20 2a 2f 0d 09 09 09 | 6f 73 73 74 61 74 20 3d |r */....|osstat =|
|000025a0| 20 6e 6f 45 72 72 3b 0d | 09 09 53 65 74 5a 6f 6e | noErr;.|..SetZon|
|000025b0| 65 28 6f 6c 64 5a 6f 6e | 65 29 3b 0d 09 7d 20 2f |e(oldZon|e);..} /|
|000025c0| 2f 20 66 69 6e 64 41 70 | 70 42 79 53 69 67 6e 61 |/ findAp|pBySigna|
|000025d0| 74 75 72 65 28 29 0d 09 | 65 6c 73 65 0d 09 09 2f |ture()..|else.../|
|000025e0| 2a 20 61 70 70 20 63 61 | 6e 27 74 20 62 65 20 66 |* app ca|n't be f|
|000025f0| 6f 75 6e 64 20 2a 2f 0d | 09 09 6f 73 73 74 61 74 |ound */.|..osstat|
|00002600| 20 3d 20 66 6e 66 45 72 | 72 3b 0d 0d 65 78 69 74 | = fnfEr|r;..exit|
|00002610| 3a 0d 09 44 69 73 70 6f | 73 65 44 65 73 63 28 26 |:..Dispo|seDesc(&|
|00002620| 61 70 70 50 61 72 6d 44 | 65 73 63 29 3b 0d 09 44 |appParmD|esc);..D|
|00002630| 69 73 70 6f 73 65 44 65 | 73 63 28 26 6d 79 72 65 |isposeDe|sc(&myre|
|00002640| 70 6c 79 29 3b 0d 09 44 | 69 73 70 6f 73 65 44 65 |ply);..D|isposeDe|
|00002650| 73 63 28 26 72 65 70 6c | 79 44 65 73 63 29 3b 0d |sc(&repl|yDesc);.|
|00002660| 09 72 65 74 75 72 6e 20 | 6f 73 73 74 61 74 3b 0d |.return |osstat;.|
|00002670| 7d 20 2f 2a 20 53 65 6e | 64 41 45 54 6f 41 70 70 |} /* Sen|dAEToApp|
|00002680| 28 29 20 2a 2f 0d 0d 2f | 2a 0d 20 2a 20 53 65 6e |() */../|*. * Sen|
|00002690| 64 44 69 72 65 63 74 41 | 70 70 6c 65 45 76 65 6e |dDirectA|ppleEven|
|000026a0| 74 28 29 20 2d 2d 20 0d | 20 2a 09 53 65 6e 64 20 |t() -- .| *.Send |
|000026b0| 61 20 73 69 6d 70 6c 65 | 20 65 76 65 6e 74 20 77 |a simple| event w|
|000026c0| 2f 20 6a 75 73 74 20 61 | 20 64 69 72 65 63 74 20 |/ just a| direct |
|000026d0| 70 61 72 61 6d 65 74 65 | 72 2e 0d 20 2a 2f 0d 4f |paramete|r.. */.O|
|000026e0| 53 45 72 72 20 53 65 6e | 64 44 69 72 65 63 74 41 |SErr Sen|dDirectA|
|000026f0| 70 70 6c 65 45 76 65 6e | 74 28 4f 53 54 79 70 65 |ppleEven|t(OSType|
|00002700| 20 61 70 70 53 69 67 2c | 20 41 45 45 76 65 6e 74 | appSig,| AEEvent|
|00002710| 43 6c 61 73 73 20 65 76 | 65 6e 74 43 6c 61 73 73 |Class ev|entClass|
|00002720| 2c 20 41 45 45 76 65 6e | 74 49 44 20 65 76 65 6e |, AEEven|tID even|
|00002730| 74 49 44 2c 0d 09 09 09 | 09 41 45 44 65 73 63 20 |tID,....|.AEDesc |
|00002740| 2a 64 69 72 65 63 74 44 | 65 73 63 2c 20 41 70 70 |*directD|esc, App|
|00002750| 6c 65 45 76 65 6e 74 20 | 2a 61 65 72 65 70 6c 79 |leEvent |*aereply|
|00002760| 2c 20 41 45 49 64 6c 65 | 55 50 50 20 69 64 6c 65 |, AEIdle|UPP idle|
|00002770| 55 50 50 29 0d 7b 0d 09 | 41 70 70 6c 65 45 76 65 |UPP).{..|AppleEve|
|00002780| 6e 74 09 61 65 76 74 3b | 0d 09 4f 53 45 72 72 09 |nt.aevt;|..OSErr.|
|00002790| 09 6f 73 73 74 61 74 3b | 0d 09 42 6f 6f 6c 65 61 |.osstat;|..Boolea|
|000027a0| 6e 09 09 72 75 6e 6e 69 | 6e 67 3b 0d 0d 09 49 6e |n..runni|ng;...In|
|000027b0| 69 74 44 65 73 63 28 26 | 61 65 76 74 29 3b 0d 09 |itDesc(&|aevt);..|
|000027c0| 6f 73 73 74 61 74 20 3d | 20 6e 6f 45 72 72 3b 0d |osstat =| noErr;.|
|000027d0| 09 0d 09 2f 2a 20 63 72 | 65 61 74 65 20 74 68 65 |.../* cr|eate the|
|000027e0| 20 65 76 65 6e 74 20 2a | 2f 0d 09 6f 73 73 74 61 | event *|/..ossta|
|000027f0| 74 20 3d 20 49 6e 69 74 | 41 45 54 6f 41 70 70 28 |t = Init|AEToApp(|
|00002800| 61 70 70 53 69 67 2c 20 | 65 76 65 6e 74 43 6c 61 |appSig, |eventCla|
|00002810| 73 73 2c 20 65 76 65 6e | 74 49 44 2c 20 26 61 65 |ss, even|tID, &ae|
|00002820| 76 74 2c 20 26 72 75 6e | 6e 69 6e 67 29 3b 0d 09 |vt, &run|ning);..|
|00002830| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00002840| 45 72 72 29 20 0d 09 09 | 67 6f 74 6f 20 65 78 69 |Err) ...|goto exi|
|00002850| 74 3b 0d 09 09 0d 09 2f | 2a 20 61 64 64 20 64 69 |t;...../|* add di|
|00002860| 72 65 63 74 20 6f 62 6a | 65 63 74 20 2a 2f 0d 09 |rect obj|ect */..|
|00002870| 6f 73 73 74 61 74 20 3d | 20 41 45 50 75 74 50 61 |osstat =| AEPutPa|
|00002880| 72 61 6d 44 65 73 63 28 | 26 61 65 76 74 2c 20 6b |ramDesc(|&aevt, k|
|00002890| 65 79 44 69 72 65 63 74 | 4f 62 6a 65 63 74 2c 20 |eyDirect|Object, |
|000028a0| 64 69 72 65 63 74 44 65 | 73 63 29 3b 0d 09 69 66 |directDe|sc);..if|
|000028b0| 20 28 6f 73 73 74 61 74 | 20 21 3d 20 6e 6f 45 72 | (osstat| != noEr|
|000028c0| 72 29 20 0d 09 09 67 6f | 74 6f 20 65 78 69 74 3b |r) ...go|to exit;|
|000028d0| 0d 09 09 0d 09 2f 2a 20 | 73 65 6e 64 20 74 68 65 |...../* |send the|
|000028e0| 20 65 76 65 6e 74 20 2a | 2f 0d 09 6f 73 73 74 61 | event *|/..ossta|
|000028f0| 74 20 3d 20 53 65 6e 64 | 41 45 54 6f 41 70 70 28 |t = Send|AEToApp(|
|00002900| 61 70 70 53 69 67 2c 20 | 26 61 65 76 74 2c 20 61 |appSig, |&aevt, a|
|00002910| 65 72 65 70 6c 79 2c 20 | 69 64 6c 65 55 50 50 2c |ereply, |idleUPP,|
|00002920| 20 72 75 6e 6e 69 6e 67 | 29 3b 0d 09 0d 65 78 69 | running|);...exi|
|00002930| 74 3a 0d 09 44 69 73 70 | 6f 73 65 44 65 73 63 28 |t:..Disp|oseDesc(|
|00002940| 26 61 65 76 74 29 3b 0d | 09 72 65 74 75 72 6e 20 |&aevt);.|.return |
|00002950| 6f 73 73 74 61 74 3b 0d | 7d 20 2f 2a 20 53 65 6e |osstat;.|} /* Sen|
|00002960| 64 44 69 72 65 63 74 41 | 70 70 6c 65 45 76 65 6e |dDirectA|ppleEven|
|00002970| 74 20 2a 2f 0d 0d 2f 2a | 0d 20 2a 20 53 65 6e 64 |t */../*|. * Send|
|00002980| 44 69 72 65 63 74 41 70 | 70 6c 65 45 76 65 6e 74 |DirectAp|pleEvent|
|00002990| 57 69 74 68 41 72 67 28 | 29 20 2d 2d 20 0d 20 2a |WithArg(|) -- . *|
|000029a0| 09 53 65 6e 64 20 61 20 | 73 69 6d 70 6c 65 20 65 |.Send a |simple e|
|000029b0| 76 65 6e 74 20 77 2f 20 | 61 20 64 69 72 65 63 74 |vent w/ |a direct|
|000029c0| 20 70 61 72 61 6d 65 74 | 65 72 20 61 6e 64 20 6f | paramet|er and o|
|000029d0| 6e 65 20 6f 74 68 65 72 | 20 61 72 67 75 6d 65 6e |ne other| argumen|
|000029e0| 74 2e 0d 20 2a 2f 0d 4f | 53 45 72 72 20 53 65 6e |t.. */.O|SErr Sen|
|000029f0| 64 44 69 72 65 63 74 41 | 70 70 6c 65 45 76 65 6e |dDirectA|ppleEven|
|00002a00| 74 57 69 74 68 41 72 67 | 28 4f 53 54 79 70 65 20 |tWithArg|(OSType |
|00002a10| 61 70 70 53 69 67 2c 20 | 41 45 45 76 65 6e 74 43 |appSig, |AEEventC|
|00002a20| 6c 61 73 73 20 65 76 65 | 6e 74 43 6c 61 73 73 2c |lass eve|ntClass,|
|00002a30| 20 41 45 45 76 65 6e 74 | 49 44 20 65 76 65 6e 74 | AEEvent|ID event|
|00002a40| 49 44 2c 0d 09 09 09 09 | 41 45 44 65 73 63 20 2a |ID,.....|AEDesc *|
|00002a50| 64 69 72 65 63 74 44 65 | 73 63 2c 20 41 45 4b 65 |directDe|sc, AEKe|
|00002a60| 79 77 6f 72 64 20 61 72 | 67 4b 65 79 2c 20 41 45 |yword ar|gKey, AE|
|00002a70| 44 65 73 63 20 2a 61 72 | 67 44 65 73 63 2c 0d 09 |Desc *ar|gDesc,..|
|00002a80| 09 09 09 41 70 70 6c 65 | 45 76 65 6e 74 20 2a 61 |...Apple|Event *a|
|00002a90| 65 72 65 70 6c 79 2c 20 | 41 45 49 64 6c 65 55 50 |ereply, |AEIdleUP|
|00002aa0| 50 20 69 64 6c 65 55 50 | 50 29 0d 7b 0d 09 41 70 |P idleUP|P).{..Ap|
|00002ab0| 70 6c 65 45 76 65 6e 74 | 09 61 65 76 74 3b 0d 09 |pleEvent|.aevt;..|
|00002ac0| 4f 53 45 72 72 09 09 6f | 73 73 74 61 74 3b 0d 09 |OSErr..o|sstat;..|
|00002ad0| 42 6f 6f 6c 65 61 6e 09 | 09 72 75 6e 6e 69 6e 67 |Boolean.|.running|
|00002ae0| 3b 0d 0d 09 49 6e 69 74 | 44 65 73 63 28 26 61 65 |;...Init|Desc(&ae|
|00002af0| 76 74 29 3b 0d 09 6f 73 | 73 74 61 74 20 3d 20 6e |vt);..os|stat = n|
|00002b00| 6f 45 72 72 3b 0d 09 0d | 09 2f 2a 20 63 72 65 61 |oErr;...|./* crea|
|00002b10| 74 65 20 74 68 65 20 65 | 76 65 6e 74 20 2a 2f 0d |te the e|vent */.|
|00002b20| 09 6f 73 73 74 61 74 20 | 3d 20 49 6e 69 74 41 45 |.osstat |= InitAE|
|00002b30| 54 6f 41 70 70 28 61 70 | 70 53 69 67 2c 20 65 76 |ToApp(ap|pSig, ev|
|00002b40| 65 6e 74 43 6c 61 73 73 | 2c 20 65 76 65 6e 74 49 |entClass|, eventI|
|00002b50| 44 2c 20 26 61 65 76 74 | 2c 20 26 72 75 6e 6e 69 |D, &aevt|, &runni|
|00002b60| 6e 67 29 3b 0d 09 69 66 | 20 28 6f 73 73 74 61 74 |ng);..if| (osstat|
|00002b70| 20 21 3d 20 6e 6f 45 72 | 72 29 20 0d 09 09 67 6f | != noEr|r) ...go|
|00002b80| 74 6f 20 65 78 69 74 3b | 0d 09 09 0d 09 2f 2a 20 |to exit;|...../* |
|00002b90| 61 64 64 20 64 69 72 65 | 63 74 20 6f 62 6a 65 63 |add dire|ct objec|
|00002ba0| 74 20 2a 2f 0d 09 6f 73 | 73 74 61 74 20 3d 20 41 |t */..os|stat = A|
|00002bb0| 45 50 75 74 50 61 72 61 | 6d 44 65 73 63 28 26 61 |EPutPara|mDesc(&a|
|00002bc0| 65 76 74 2c 20 6b 65 79 | 44 69 72 65 63 74 4f 62 |evt, key|DirectOb|
|00002bd0| 6a 65 63 74 2c 20 64 69 | 72 65 63 74 44 65 73 63 |ject, di|rectDesc|
|00002be0| 29 3b 0d 09 69 66 20 28 | 6f 73 73 74 61 74 20 21 |);..if (|osstat !|
|00002bf0| 3d 20 6e 6f 45 72 72 29 | 20 0d 09 09 67 6f 74 6f |= noErr)| ...goto|
|00002c00| 20 65 78 69 74 3b 0d 09 | 09 0d 09 2f 2a 20 61 64 | exit;..|.../* ad|
|00002c10| 64 20 61 72 67 75 6d 65 | 6e 74 20 2a 2f 0d 09 6f |d argume|nt */..o|
|00002c20| 73 73 74 61 74 20 3d 20 | 41 45 50 75 74 50 61 72 |sstat = |AEPutPar|
|00002c30| 61 6d 44 65 73 63 28 26 | 61 65 76 74 2c 20 61 72 |amDesc(&|aevt, ar|
|00002c40| 67 4b 65 79 2c 20 61 72 | 67 44 65 73 63 29 3b 0d |gKey, ar|gDesc);.|
|00002c50| 09 69 66 20 28 6f 73 73 | 74 61 74 20 21 3d 20 6e |.if (oss|tat != n|
|00002c60| 6f 45 72 72 29 20 0d 09 | 09 67 6f 74 6f 20 65 78 |oErr) ..|.goto ex|
|00002c70| 69 74 3b 0d 09 09 0d 09 | 2f 2a 20 73 65 6e 64 20 |it;.....|/* send |
|00002c80| 74 68 65 20 65 76 65 6e | 74 20 2a 2f 0d 09 6f 73 |the even|t */..os|
|00002c90| 73 74 61 74 20 3d 20 53 | 65 6e 64 41 45 54 6f 41 |stat = S|endAEToA|
|00002ca0| 70 70 28 61 70 70 53 69 | 67 2c 20 26 61 65 76 74 |pp(appSi|g, &aevt|
|00002cb0| 2c 20 61 65 72 65 70 6c | 79 2c 20 69 64 6c 65 55 |, aerepl|y, idleU|
|00002cc0| 50 50 2c 20 72 75 6e 6e | 69 6e 67 29 3b 0d 09 0d |PP, runn|ing);...|
|00002cd0| 65 78 69 74 3a 0d 09 44 | 69 73 70 6f 73 65 44 65 |exit:..D|isposeDe|
|00002ce0| 73 63 28 26 61 65 76 74 | 29 3b 0d 09 72 65 74 75 |sc(&aevt|);..retu|
|00002cf0| 72 6e 20 6f 73 73 74 61 | 74 3b 0d 7d 20 2f 2a 20 |rn ossta|t;.} /* |
|00002d00| 53 65 6e 64 44 69 72 65 | 63 74 41 70 70 6c 65 45 |SendDire|ctAppleE|
|00002d10| 76 65 6e 74 57 69 74 68 | 41 72 67 20 2a 2f 0d 0d |ventWith|Arg */..|
|00002d20| 2f 2a 0d 20 2a 20 53 65 | 6e 64 44 69 72 65 63 74 |/*. * Se|ndDirect|
|00002d30| 41 70 70 6c 65 45 76 65 | 6e 74 57 69 74 68 54 68 |AppleEve|ntWithTh|
|00002d40| 72 65 65 41 72 67 73 28 | 29 20 2d 2d 20 0d 20 2a |reeArgs(|) -- . *|
|00002d50| 09 53 65 6e 64 20 6f 75 | 72 73 65 6c 76 65 73 20 |.Send ou|rselves |
|00002d60| 61 6e 20 65 76 65 6e 74 | 20 77 2f 20 61 20 64 69 |an event| w/ a di|
|00002d70| 72 65 63 74 20 70 61 72 | 61 6d 65 74 65 72 20 61 |rect par|ameter a|
|00002d80| 6e 64 20 74 68 72 65 65 | 20 6f 74 68 65 72 20 61 |nd three| other a|
|00002d90| 72 67 75 6d 65 6e 74 73 | 2e 0d 20 2a 2f 0d 4f 53 |rguments|.. */.OS|
|00002da0| 45 72 72 20 53 65 6e 64 | 44 69 72 65 63 74 41 70 |Err Send|DirectAp|
|00002db0| 70 6c 65 45 76 65 6e 74 | 57 69 74 68 54 68 72 65 |pleEvent|WithThre|
|00002dc0| 65 41 72 67 73 28 4f 53 | 54 79 70 65 20 61 70 70 |eArgs(OS|Type app|
|00002dd0| 53 69 67 2c 20 41 45 45 | 76 65 6e 74 43 6c 61 73 |Sig, AEE|ventClas|
|00002de0| 73 20 65 76 65 6e 74 43 | 6c 61 73 73 2c 20 41 45 |s eventC|lass, AE|
|00002df0| 45 76 65 6e 74 49 44 20 | 65 76 65 6e 74 49 44 2c |EventID |eventID,|
|00002e00| 0d 09 09 09 09 41 45 44 | 65 73 63 20 2a 64 69 72 |.....AED|esc *dir|
|00002e10| 65 63 74 44 65 73 63 2c | 20 41 45 4b 65 79 77 6f |ectDesc,| AEKeywo|
|00002e20| 72 64 20 61 72 67 4b 65 | 79 2c 20 41 45 44 65 73 |rd argKe|y, AEDes|
|00002e30| 63 20 2a 61 72 67 44 65 | 73 63 2c 0d 09 09 09 09 |c *argDe|sc,.....|
|00002e40| 41 45 4b 65 79 77 6f 72 | 64 20 61 72 67 32 4b 65 |AEKeywor|d arg2Ke|
|00002e50| 79 2c 20 41 45 44 65 73 | 63 20 2a 61 72 67 32 44 |y, AEDes|c *arg2D|
|00002e60| 65 73 63 2c 0d 09 09 09 | 09 41 45 4b 65 79 77 6f |esc,....|.AEKeywo|
|00002e70| 72 64 20 61 72 67 33 4b | 65 79 2c 20 41 45 44 65 |rd arg3K|ey, AEDe|
|00002e80| 73 63 20 2a 61 72 67 33 | 44 65 73 63 2c 0d 09 09 |sc *arg3|Desc,...|
|00002e90| 09 09 41 70 70 6c 65 45 | 76 65 6e 74 20 2a 61 65 |..AppleE|vent *ae|
|00002ea0| 72 65 70 6c 79 2c 20 41 | 45 49 64 6c 65 55 50 50 |reply, A|EIdleUPP|
|00002eb0| 20 69 64 6c 65 55 50 50 | 29 0d 7b 0d 09 41 70 70 | idleUPP|).{..App|
|00002ec0| 6c 65 45 76 65 6e 74 09 | 61 65 76 74 3b 0d 09 4f |leEvent.|aevt;..O|
|00002ed0| 53 45 72 72 09 09 6f 73 | 73 74 61 74 3b 0d 09 42 |SErr..os|stat;..B|
|00002ee0| 6f 6f 6c 65 61 6e 09 09 | 72 75 6e 6e 69 6e 67 3b |oolean..|running;|
|00002ef0| 0d 0d 09 49 6e 69 74 44 | 65 73 63 28 26 61 65 76 |...InitD|esc(&aev|
|00002f00| 74 29 3b 0d 09 6f 73 73 | 74 61 74 20 3d 20 6e 6f |t);..oss|tat = no|
|00002f10| 45 72 72 3b 0d 09 0d 09 | 2f 2a 20 63 72 65 61 74 |Err;....|/* creat|
|00002f20| 65 20 74 68 65 20 65 76 | 65 6e 74 20 2a 2f 0d 09 |e the ev|ent */..|
|00002f30| 6f 73 73 74 61 74 20 3d | 20 49 6e 69 74 41 45 54 |osstat =| InitAET|
|00002f40| 6f 41 70 70 28 61 70 70 | 53 69 67 2c 20 65 76 65 |oApp(app|Sig, eve|
|00002f50| 6e 74 43 6c 61 73 73 2c | 20 65 76 65 6e 74 49 44 |ntClass,| eventID|
|00002f60| 2c 20 26 61 65 76 74 2c | 20 26 72 75 6e 6e 69 6e |, &aevt,| &runnin|
|00002f70| 67 29 3b 0d 09 69 66 20 | 28 6f 73 73 74 61 74 20 |g);..if |(osstat |
|00002f80| 21 3d 20 6e 6f 45 72 72 | 29 20 0d 09 09 67 6f 74 |!= noErr|) ...got|
|00002f90| 6f 20 65 78 69 74 3b 0d | 09 09 0d 09 2f 2a 20 61 |o exit;.|..../* a|
|00002fa0| 64 64 20 64 69 72 65 63 | 74 20 6f 62 6a 65 63 74 |dd direc|t object|
|00002fb0| 20 2a 2f 0d 09 6f 73 73 | 74 61 74 20 3d 20 41 45 | */..oss|tat = AE|
|00002fc0| 50 75 74 50 61 72 61 6d | 44 65 73 63 28 26 61 65 |PutParam|Desc(&ae|
|00002fd0| 76 74 2c 20 6b 65 79 44 | 69 72 65 63 74 4f 62 6a |vt, keyD|irectObj|
|00002fe0| 65 63 74 2c 20 64 69 72 | 65 63 74 44 65 73 63 29 |ect, dir|ectDesc)|
|00002ff0| 3b 0d 09 69 66 20 28 6f | 73 73 74 61 74 20 21 3d |;..if (o|sstat !=|
|00003000| 20 6e 6f 45 72 72 29 20 | 0d 09 09 67 6f 74 6f 20 | noErr) |...goto |
|00003010| 65 78 69 74 3b 0d 09 09 | 0d 09 2f 2a 20 61 64 64 |exit;...|../* add|
|00003020| 20 61 72 67 75 6d 65 6e | 74 73 20 2a 2f 0d 09 6f | argumen|ts */..o|
|00003030| 73 73 74 61 74 20 3d 20 | 41 45 50 75 74 50 61 72 |sstat = |AEPutPar|
|00003040| 61 6d 44 65 73 63 28 26 | 61 65 76 74 2c 20 61 72 |amDesc(&|aevt, ar|
|00003050| 67 4b 65 79 2c 20 61 72 | 67 44 65 73 63 29 3b 0d |gKey, ar|gDesc);.|
|00003060| 09 69 66 20 28 6f 73 73 | 74 61 74 20 21 3d 20 6e |.if (oss|tat != n|
|00003070| 6f 45 72 72 29 20 0d 09 | 09 67 6f 74 6f 20 65 78 |oErr) ..|.goto ex|
|00003080| 69 74 3b 0d 09 6f 73 73 | 74 61 74 20 3d 20 41 45 |it;..oss|tat = AE|
|00003090| 50 75 74 50 61 72 61 6d | 44 65 73 63 28 26 61 65 |PutParam|Desc(&ae|
|000030a0| 76 74 2c 20 61 72 67 32 | 4b 65 79 2c 20 61 72 67 |vt, arg2|Key, arg|
|000030b0| 32 44 65 73 63 29 3b 0d | 09 69 66 20 28 6f 73 73 |2Desc);.|.if (oss|
|000030c0| 74 61 74 20 21 3d 20 6e | 6f 45 72 72 29 20 0d 09 |tat != n|oErr) ..|
|000030d0| 09 67 6f 74 6f 20 65 78 | 69 74 3b 0d 09 6f 73 73 |.goto ex|it;..oss|
|000030e0| 74 61 74 20 3d 20 41 45 | 50 75 74 50 61 72 61 6d |tat = AE|PutParam|
|000030f0| 44 65 73 63 28 26 61 65 | 76 74 2c 20 61 72 67 33 |Desc(&ae|vt, arg3|
|00003100| 4b 65 79 2c 20 61 72 67 | 33 44 65 73 63 29 3b 0d |Key, arg|3Desc);.|
|00003110| 09 69 66 20 28 6f 73 73 | 74 61 74 20 21 3d 20 6e |.if (oss|tat != n|
|00003120| 6f 45 72 72 29 20 0d 09 | 09 67 6f 74 6f 20 65 78 |oErr) ..|.goto ex|
|00003130| 69 74 3b 0d 09 09 09 09 | 0d 09 2f 2a 20 73 65 6e |it;.....|../* sen|
|00003140| 64 20 74 68 65 20 65 76 | 65 6e 74 20 2a 2f 0d 09 |d the ev|ent */..|
|00003150| 6f 73 73 74 61 74 20 3d | 20 53 65 6e 64 41 45 54 |osstat =| SendAET|
|00003160| 6f 41 70 70 28 61 70 70 | 53 69 67 2c 20 26 61 65 |oApp(app|Sig, &ae|
|00003170| 76 74 2c 20 61 65 72 65 | 70 6c 79 2c 20 69 64 6c |vt, aere|ply, idl|
|00003180| 65 55 50 50 2c 20 72 75 | 6e 6e 69 6e 67 29 3b 0d |eUPP, ru|nning);.|
|00003190| 09 0d 65 78 69 74 3a 0d | 09 44 69 73 70 6f 73 65 |..exit:.|.Dispose|
|000031a0| 44 65 73 63 28 26 61 65 | 76 74 29 3b 0d 09 72 65 |Desc(&ae|vt);..re|
|000031b0| 74 75 72 6e 20 6f 73 73 | 74 61 74 3b 0d 7d 20 2f |turn oss|tat;.} /|
|000031c0| 2a 20 53 65 6e 64 44 69 | 72 65 63 74 41 70 70 6c |* SendDi|rectAppl|
|000031d0| 65 45 76 65 6e 74 57 69 | 74 68 54 68 72 65 65 41 |eEventWi|thThreeA|
|000031e0| 72 67 73 20 2a 2f 0d 0d | 2f 2a 0d 20 2a 20 53 65 |rgs */..|/*. * Se|
|000031f0| 6e 64 43 72 65 61 74 65 | 41 70 70 6c 65 45 76 65 |ndCreate|AppleEve|
|00003200| 6e 74 28 29 20 2d 2d 20 | 0d 20 2a 09 53 65 6e 64 |nt() -- |. *.Send|
|00003210| 20 61 20 43 72 65 61 74 | 65 20 45 6c 65 6d 65 6e | a Creat|e Elemen|
|00003220| 74 20 65 76 65 6e 74 2e | 0d 20 2a 2f 0d 4f 53 45 |t event.|. */.OSE|
|00003230| 72 72 20 53 65 6e 64 43 | 72 65 61 74 65 41 70 70 |rr SendC|reateApp|
|00003240| 6c 65 45 76 65 6e 74 28 | 4f 53 54 79 70 65 20 61 |leEvent(|OSType a|
|00003250| 70 70 53 69 67 2c 20 44 | 65 73 63 54 79 70 65 20 |ppSig, D|escType |
|00003260| 6f 62 6a 43 6c 61 73 73 | 2c 20 41 45 44 65 73 63 |objClass|, AEDesc|
|00003270| 20 2a 69 6e 73 65 72 74 | 4c 6f 63 44 65 73 63 2c | *insert|LocDesc,|
|00003280| 0d 09 09 09 09 41 45 44 | 65 73 63 20 2a 64 61 74 |.....AED|esc *dat|
|00003290| 61 44 65 73 63 2c 20 41 | 45 44 65 73 63 20 2a 70 |aDesc, A|EDesc *p|
|000032a0| 72 6f 70 44 65 73 63 2c | 20 0d 09 09 09 09 41 70 |ropDesc,| .....Ap|
|000032b0| 70 6c 65 45 76 65 6e 74 | 20 2a 61 65 72 65 70 6c |pleEvent| *aerepl|
|000032c0| 79 2c 20 41 45 49 64 6c | 65 55 50 50 20 69 64 6c |y, AEIdl|eUPP idl|
|000032d0| 65 55 50 50 29 0d 7b 0d | 09 41 70 70 6c 65 45 76 |eUPP).{.|.AppleEv|
|000032e0| 65 6e 74 09 61 65 76 74 | 3b 0d 09 4f 53 45 72 72 |ent.aevt|;..OSErr|
|000032f0| 09 09 6f 73 73 74 61 74 | 3b 0d 09 42 6f 6f 6c 65 |..osstat|;..Boole|
|00003300| 61 6e 09 09 72 75 6e 6e | 69 6e 67 3b 0d 0d 09 49 |an..runn|ing;...I|
|00003310| 6e 69 74 44 65 73 63 28 | 26 61 65 76 74 29 3b 0d |nitDesc(|&aevt);.|
|00003320| 09 6f 73 73 74 61 74 20 | 3d 20 6e 6f 45 72 72 3b |.osstat |= noErr;|
|00003330| 0d 09 0d 09 2f 2a 20 63 | 72 65 61 74 65 20 74 68 |..../* c|reate th|
|00003340| 65 20 65 76 65 6e 74 20 | 2a 2f 0d 09 6f 73 73 74 |e event |*/..osst|
|00003350| 61 74 20 3d 20 49 6e 69 | 74 41 45 54 6f 41 70 70 |at = Ini|tAEToApp|
|00003360| 28 61 70 70 53 69 67 2c | 20 6b 41 45 43 6f 72 65 |(appSig,| kAECore|
|00003370| 53 75 69 74 65 2c 20 6b | 41 45 43 72 65 61 74 65 |Suite, k|AECreate|
|00003380| 45 6c 65 6d 65 6e 74 2c | 20 26 61 65 76 74 2c 20 |Element,| &aevt, |
|00003390| 26 72 75 6e 6e 69 6e 67 | 29 3b 0d 09 69 66 20 28 |&running|);..if (|
|000033a0| 6f 73 73 74 61 74 20 21 | 3d 20 6e 6f 45 72 72 29 |osstat !|= noErr)|
|000033b0| 20 0d 09 09 67 6f 74 6f | 20 65 78 69 74 3b 0d 09 | ...goto| exit;..|
|000033c0| 09 0d 09 2f 2a 20 61 64 | 64 20 64 65 73 69 72 65 |.../* ad|d desire|
|000033d0| 64 20 63 6c 61 73 73 20 | 2a 2f 0d 09 6f 73 73 74 |d class |*/..osst|
|000033e0| 61 74 20 3d 20 41 45 50 | 75 74 50 61 72 61 6d 50 |at = AEP|utParamP|
|000033f0| 74 72 28 26 61 65 76 74 | 2c 20 6b 65 79 41 45 4f |tr(&aevt|, keyAEO|
|00003400| 62 6a 65 63 74 43 6c 61 | 73 73 2c 20 74 79 70 65 |bjectCla|ss, type|
|00003410| 54 79 70 65 2c 20 26 6f | 62 6a 43 6c 61 73 73 2c |Type, &o|bjClass,|
|00003420| 20 0d 09 09 09 09 09 09 | 09 73 69 7a 65 6f 66 28 | .......|.sizeof(|
|00003430| 6f 62 6a 43 6c 61 73 73 | 29 29 3b 0d 09 69 66 20 |objClass|));..if |
|00003440| 28 6f 73 73 74 61 74 20 | 21 3d 20 6e 6f 45 72 72 |(osstat |!= noErr|
|00003450| 29 0d 09 09 67 6f 74 6f | 20 65 78 69 74 3b 0d 09 |)...goto| exit;..|
|00003460| 09 0d 09 2f 2a 20 61 64 | 64 20 69 6e 73 65 72 74 |.../* ad|d insert|
|00003470| 69 6f 6e 20 6c 6f 63 61 | 74 69 6f 6e 20 2a 2f 0d |ion loca|tion */.|
|00003480| 09 6f 73 73 74 61 74 20 | 3d 20 41 45 50 75 74 50 |.osstat |= AEPutP|
|00003490| 61 72 61 6d 44 65 73 63 | 28 26 61 65 76 74 2c 20 |aramDesc|(&aevt, |
|000034a0| 6b 65 79 41 45 49 6e 73 | 65 72 74 48 65 72 65 2c |keyAEIns|ertHere,|
|000034b0| 20 69 6e 73 65 72 74 4c | 6f 63 44 65 73 63 29 3b | insertL|ocDesc);|
|000034c0| 0d 09 69 66 20 28 6f 73 | 73 74 61 74 20 21 3d 20 |..if (os|stat != |
|000034d0| 6e 6f 45 72 72 29 20 0d | 09 09 67 6f 74 6f 20 65 |noErr) .|..goto e|
|000034e0| 78 69 74 3b 0d 09 09 0d | 09 2f 2a 20 61 64 64 20 |xit;....|./* add |
|000034f0| 69 6e 69 74 69 61 6c 20 | 64 61 74 61 2c 20 69 66 |initial |data, if|
|00003500| 20 28 74 68 65 72 65 20 | 69 73 20 73 6f 6d 65 20 | (there |is some |
|00003510| 2a 2f 0d 09 69 66 20 28 | 64 61 74 61 44 65 73 63 |*/..if (|dataDesc|
|00003520| 20 26 26 20 28 64 61 74 | 61 44 65 73 63 2d 3e 64 | && (dat|aDesc->d|
|00003530| 65 73 63 72 69 70 74 6f | 72 54 79 70 65 20 21 3d |escripto|rType !=|
|00003540| 20 74 79 70 65 4e 75 6c | 6c 29 29 0d 09 7b 0d 09 | typeNul|l))..{..|
|00003550| 09 6f 73 73 74 61 74 20 | 3d 20 41 45 50 75 74 50 |.osstat |= AEPutP|
|00003560| 61 72 61 6d 44 65 73 63 | 28 26 61 65 76 74 2c 20 |aramDesc|(&aevt, |
|00003570| 6b 65 79 41 45 44 61 74 | 61 2c 20 64 61 74 61 44 |keyAEDat|a, dataD|
|00003580| 65 73 63 29 3b 0d 09 09 | 69 66 20 28 6f 73 73 74 |esc);...|if (osst|
|00003590| 61 74 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |at != no|Err)....|
|000035a0| 67 6f 74 6f 20 65 78 69 | 74 3b 0d 09 7d 0d 09 0d |goto exi|t;..}...|
|000035b0| 09 2f 2a 20 61 64 64 20 | 69 6e 69 74 69 61 6c 20 |./* add |initial |
|000035c0| 70 72 6f 70 65 72 74 79 | 20 76 61 6c 75 65 73 2c |property| values,|
|000035d0| 20 69 66 20 28 74 68 65 | 72 65 20 61 72 65 20 73 | if (the|re are s|
|000035e0| 6f 6d 65 20 2a 2f 0d 09 | 69 66 20 28 70 72 6f 70 |ome */..|if (prop|
|000035f0| 44 65 73 63 20 26 26 20 | 28 70 72 6f 70 44 65 73 |Desc && |(propDes|
|00003600| 63 2d 3e 64 65 73 63 72 | 69 70 74 6f 72 54 79 70 |c->descr|iptorTyp|
|00003610| 65 20 21 3d 20 74 79 70 | 65 4e 75 6c 6c 29 29 0d |e != typ|eNull)).|
|00003620| 09 7b 0d 09 09 6f 73 73 | 74 61 74 20 3d 20 41 45 |.{...oss|tat = AE|
|00003630| 50 75 74 50 61 72 61 6d | 44 65 73 63 28 26 61 65 |PutParam|Desc(&ae|
|00003640| 76 74 2c 20 6b 65 79 41 | 45 50 72 6f 70 44 61 74 |vt, keyA|EPropDat|
|00003650| 61 2c 20 70 72 6f 70 44 | 65 73 63 29 3b 0d 09 09 |a, propD|esc);...|
|00003660| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00003670| 45 72 72 29 0d 09 09 09 | 67 6f 74 6f 20 65 78 69 |Err)....|goto exi|
|00003680| 74 3b 0d 09 7d 0d 09 0d | 09 2f 2a 20 73 65 6e 64 |t;..}...|./* send|
|00003690| 20 74 68 65 20 65 76 65 | 6e 74 20 2a 2f 0d 09 6f | the eve|nt */..o|
|000036a0| 73 73 74 61 74 20 3d 20 | 53 65 6e 64 41 45 54 6f |sstat = |SendAETo|
|000036b0| 41 70 70 28 61 70 70 53 | 69 67 2c 20 26 61 65 76 |App(appS|ig, &aev|
|000036c0| 74 2c 20 61 65 72 65 70 | 6c 79 2c 20 69 64 6c 65 |t, aerep|ly, idle|
|000036d0| 55 50 50 2c 20 72 75 6e | 6e 69 6e 67 29 3b 0d 09 |UPP, run|ning);..|
|000036e0| 0d 65 78 69 74 3a 0d 09 | 44 69 73 70 6f 73 65 44 |.exit:..|DisposeD|
|000036f0| 65 73 63 28 26 61 65 76 | 74 29 3b 0d 09 72 65 74 |esc(&aev|t);..ret|
|00003700| 75 72 6e 20 6f 73 73 74 | 61 74 3b 0d 7d 20 2f 2a |urn osst|at;.} /*|
|00003710| 20 53 65 6e 64 43 72 65 | 61 74 65 41 70 70 6c 65 | SendCre|ateApple|
|00003720| 45 76 65 6e 74 28 29 20 | 2a 2f 0d 0d 2f 2a 0d 20 |Event() |*/../*. |
|00003730| 2a 20 53 65 6e 64 4d 6f | 76 65 43 6c 6f 6e 65 41 |* SendMo|veCloneA|
|00003740| 70 70 6c 65 45 76 65 6e | 74 28 29 20 2d 2d 20 0d |ppleEven|t() -- .|
|00003750| 20 2a 09 53 65 6e 64 20 | 61 20 4d 6f 76 65 20 6f | *.Send |a Move o|
|00003760| 72 20 43 6c 6f 6e 65 20 | 65 76 65 6e 74 2e 0d 20 |r Clone |event.. |
|00003770| 2a 2f 0d 4f 53 45 72 72 | 20 53 65 6e 64 4d 6f 76 |*/.OSErr| SendMov|
|00003780| 65 43 6c 6f 6e 65 41 70 | 70 6c 65 45 76 65 6e 74 |eCloneAp|pleEvent|
|00003790| 28 4f 53 54 79 70 65 20 | 61 70 70 53 69 67 2c 20 |(OSType |appSig, |
|000037a0| 41 45 45 76 65 6e 74 49 | 44 20 65 76 65 6e 74 49 |AEEventI|D eventI|
|000037b0| 44 2c 20 41 45 44 65 73 | 63 20 2a 64 69 72 65 63 |D, AEDes|c *direc|
|000037c0| 74 44 65 73 63 2c 20 0d | 09 09 09 09 41 45 44 65 |tDesc, .|....AEDe|
|000037d0| 73 63 20 2a 69 6e 73 65 | 72 74 4c 6f 63 44 65 73 |sc *inse|rtLocDes|
|000037e0| 63 2c 20 41 70 70 6c 65 | 45 76 65 6e 74 20 2a 61 |c, Apple|Event *a|
|000037f0| 65 72 65 70 6c 79 2c 20 | 41 45 49 64 6c 65 55 50 |ereply, |AEIdleUP|
|00003800| 50 20 69 64 6c 65 55 50 | 50 29 0d 7b 0d 09 41 70 |P idleUP|P).{..Ap|
|00003810| 70 6c 65 45 76 65 6e 74 | 09 61 65 76 74 3b 0d 09 |pleEvent|.aevt;..|
|00003820| 4f 53 45 72 72 09 09 6f | 73 73 74 61 74 3b 0d 09 |OSErr..o|sstat;..|
|00003830| 42 6f 6f 6c 65 61 6e 09 | 09 72 75 6e 6e 69 6e 67 |Boolean.|.running|
|00003840| 3b 0d 0d 09 49 6e 69 74 | 44 65 73 63 28 26 61 65 |;...Init|Desc(&ae|
|00003850| 76 74 29 3b 0d 09 6f 73 | 73 74 61 74 20 3d 20 6e |vt);..os|stat = n|
|00003860| 6f 45 72 72 3b 0d 09 0d | 09 2f 2a 20 63 72 65 61 |oErr;...|./* crea|
|00003870| 74 65 20 74 68 65 20 65 | 76 65 6e 74 20 2a 2f 0d |te the e|vent */.|
|00003880| 09 6f 73 73 74 61 74 20 | 3d 20 49 6e 69 74 41 45 |.osstat |= InitAE|
|00003890| 54 6f 41 70 70 28 61 70 | 70 53 69 67 2c 20 6b 41 |ToApp(ap|pSig, kA|
|000038a0| 45 43 6f 72 65 53 75 69 | 74 65 2c 20 65 76 65 6e |ECoreSui|te, even|
|000038b0| 74 49 44 2c 20 26 61 65 | 76 74 2c 20 26 72 75 6e |tID, &ae|vt, &run|
|000038c0| 6e 69 6e 67 29 3b 0d 09 | 69 66 20 28 6f 73 73 74 |ning);..|if (osst|
|000038d0| 61 74 20 21 3d 20 6e 6f | 45 72 72 29 20 0d 09 09 |at != no|Err) ...|
|000038e0| 67 6f 74 6f 20 65 78 69 | 74 3b 0d 09 09 0d 09 2f |goto exi|t;...../|
|000038f0| 2a 20 61 64 64 20 64 69 | 72 65 63 74 20 6f 62 6a |* add di|rect obj|
|00003900| 65 63 74 20 2a 2f 0d 09 | 6f 73 73 74 61 74 20 3d |ect */..|osstat =|
|00003910| 20 41 45 50 75 74 50 61 | 72 61 6d 44 65 73 63 28 | AEPutPa|ramDesc(|
|00003920| 26 61 65 76 74 2c 20 6b | 65 79 44 69 72 65 63 74 |&aevt, k|eyDirect|
|00003930| 4f 62 6a 65 63 74 2c 20 | 64 69 72 65 63 74 44 65 |Object, |directDe|
|00003940| 73 63 29 3b 0d 09 69 66 | 20 28 6f 73 73 74 61 74 |sc);..if| (osstat|
|00003950| 20 21 3d 20 6e 6f 45 72 | 72 29 20 0d 09 09 67 6f | != noEr|r) ...go|
|00003960| 74 6f 20 65 78 69 74 3b | 0d 09 09 0d 09 2f 2a 20 |to exit;|...../* |
|00003970| 61 64 64 20 69 6e 73 65 | 72 74 69 6f 6e 20 6c 6f |add inse|rtion lo|
|00003980| 63 61 74 69 6f 6e 20 2a | 2f 0d 09 6f 73 73 74 61 |cation *|/..ossta|
|00003990| 74 20 3d 20 41 45 50 75 | 74 50 61 72 61 6d 44 65 |t = AEPu|tParamDe|
|000039a0| 73 63 28 26 61 65 76 74 | 2c 20 6b 65 79 41 45 49 |sc(&aevt|, keyAEI|
|000039b0| 6e 73 65 72 74 48 65 72 | 65 2c 20 69 6e 73 65 72 |nsertHer|e, inser|
|000039c0| 74 4c 6f 63 44 65 73 63 | 29 3b 0d 09 69 66 20 28 |tLocDesc|);..if (|
|000039d0| 6f 73 73 74 61 74 20 21 | 3d 20 6e 6f 45 72 72 29 |osstat !|= noErr)|
|000039e0| 20 0d 09 09 67 6f 74 6f | 20 65 78 69 74 3b 0d 09 | ...goto| exit;..|
|000039f0| 09 0d 09 2f 2a 20 73 65 | 6e 64 20 74 68 65 20 65 |.../* se|nd the e|
|00003a00| 76 65 6e 74 20 2a 2f 0d | 09 6f 73 73 74 61 74 20 |vent */.|.osstat |
|00003a10| 3d 20 53 65 6e 64 41 45 | 54 6f 41 70 70 28 61 70 |= SendAE|ToApp(ap|
|00003a20| 70 53 69 67 2c 20 26 61 | 65 76 74 2c 20 61 65 72 |pSig, &a|evt, aer|
|00003a30| 65 70 6c 79 2c 20 69 64 | 6c 65 55 50 50 2c 20 72 |eply, id|leUPP, r|
|00003a40| 75 6e 6e 69 6e 67 29 3b | 0d 09 0d 65 78 69 74 3a |unning);|...exit:|
|00003a50| 0d 09 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 61 |..Dispos|eDesc(&a|
|00003a60| 65 76 74 29 3b 0d 09 72 | 65 74 75 72 6e 20 6f 73 |evt);..r|eturn os|
|00003a70| 73 74 61 74 3b 0d 7d 20 | 2f 2a 20 53 65 6e 64 4d |stat;.} |/* SendM|
|00003a80| 6f 76 65 43 6c 6f 6e 65 | 41 70 70 6c 65 45 76 65 |oveClone|AppleEve|
|00003a90| 6e 74 28 29 20 2a 2f 0d | 0d 2f 2a 20 0d 20 2a 20 |nt() */.|./* . * |
|00003aa0| 43 72 65 61 74 65 46 6f | 72 6d 4e 61 6d 65 4f 53 |CreateFo|rmNameOS|
|00003ab0| 70 65 63 28 29 20 2d 2d | 0d 20 2a 09 43 72 65 61 |pec() --|. *.Crea|
|00003ac0| 74 65 20 61 20 66 6f 72 | 6d 4e 61 6d 65 20 6f 62 |te a for|mName ob|
|00003ad0| 6a 65 63 74 20 73 70 65 | 63 69 66 69 65 72 2e 0d |ject spe|cifier..|
|00003ae0| 20 2a 2f 0d 4f 53 45 72 | 72 20 43 72 65 61 74 65 | */.OSEr|r Create|
|00003af0| 46 6f 72 6d 4e 61 6d 65 | 4f 53 70 65 63 28 63 68 |FormName|OSpec(ch|
|00003b00| 61 72 20 2a 6e 61 6d 65 | 2c 20 44 65 73 63 54 79 |ar *name|, DescTy|
|00003b10| 70 65 20 6f 62 6a 43 6c | 61 73 73 2c 20 41 45 44 |pe objCl|ass, AED|
|00003b20| 65 73 63 20 2a 63 6f 6e | 74 61 69 6e 65 72 44 65 |esc *con|tainerDe|
|00003b30| 73 63 2c 20 41 45 44 65 | 73 63 20 2a 6f 73 70 65 |sc, AEDe|sc *ospe|
|00003b40| 63 44 65 73 63 29 0d 7b | 0d 09 41 45 44 65 73 63 |cDesc).{|..AEDesc|
|00003b50| 09 6b 65 79 44 65 73 63 | 3b 0d 09 41 45 44 65 73 |.keyDesc|;..AEDes|
|00003b60| 63 09 6e 75 6c 6c 44 65 | 73 63 3b 0d 09 0d 09 49 |c.nullDe|sc;....I|
|00003b70| 6e 69 74 44 65 73 63 28 | 26 6b 65 79 44 65 73 63 |nitDesc(|&keyDesc|
|00003b80| 29 3b 0d 09 49 6e 69 74 | 44 65 73 63 28 26 6e 75 |);..Init|Desc(&nu|
|00003b90| 6c 6c 44 65 73 63 29 3b | 0d 09 43 53 74 72 69 6e |llDesc);|..CStrin|
|00003ba0| 67 54 6f 44 65 73 63 28 | 6e 61 6d 65 2c 20 74 79 |gToDesc(|name, ty|
|00003bb0| 70 65 43 68 61 72 2c 20 | 26 6b 65 79 44 65 73 63 |peChar, |&keyDesc|
|00003bc0| 29 3b 0d 09 4f 53 45 72 | 72 09 6f 73 73 74 61 74 |);..OSEr|r.osstat|
|00003bd0| 20 3d 20 43 72 65 61 74 | 65 4f 62 6a 53 70 65 63 | = Creat|eObjSpec|
|00003be0| 69 66 69 65 72 28 6f 62 | 6a 43 6c 61 73 73 2c 20 |ifier(ob|jClass, |
|00003bf0| 63 6f 6e 74 61 69 6e 65 | 72 44 65 73 63 20 3f 20 |containe|rDesc ? |
|00003c00| 63 6f 6e 74 61 69 6e 65 | 72 44 65 73 63 20 3a 20 |containe|rDesc : |
|00003c10| 26 6e 75 6c 6c 44 65 73 | 63 2c 20 0d 09 09 09 09 |&nullDes|c, .....|
|00003c20| 09 09 66 6f 72 6d 4e 61 | 6d 65 2c 20 26 6b 65 79 |..formNa|me, &key|
|00003c30| 44 65 73 63 2c 20 66 61 | 6c 73 65 2c 20 6f 73 70 |Desc, fa|lse, osp|
|00003c40| 65 63 44 65 73 63 29 3b | 0d 09 44 69 73 70 6f 73 |ecDesc);|..Dispos|
|00003c50| 65 44 65 73 63 28 26 6b | 65 79 44 65 73 63 29 3b |eDesc(&k|eyDesc);|
|00003c60| 0d 09 72 65 74 75 72 6e | 20 6f 73 73 74 61 74 3b |..return| osstat;|
|00003c70| 0d 7d 20 2f 2f 20 43 72 | 65 61 74 65 46 6f 72 6d |.} // Cr|eateForm|
|00003c80| 4e 61 6d 65 4f 53 70 65 | 63 28 29 0d 0d 2f 2a 20 |NameOSpe|c()../* |
|00003c90| 0d 20 2a 20 43 72 65 61 | 74 65 50 72 6f 70 65 72 |. * Crea|teProper|
|00003ca0| 74 79 4f 53 70 65 63 28 | 29 20 2d 2d 0d 20 2a 09 |tyOSpec(|) --. *.|
|00003cb0| 43 72 65 61 74 65 20 61 | 20 66 6f 72 6d 50 72 6f |Create a| formPro|
|00003cc0| 70 65 72 74 79 49 44 20 | 6f 62 6a 65 63 74 20 73 |pertyID |object s|
|00003cd0| 70 65 63 69 66 69 65 72 | 2e 0d 20 2a 2f 0d 4f 53 |pecifier|.. */.OS|
|00003ce0| 45 72 72 20 43 72 65 61 | 74 65 50 72 6f 70 65 72 |Err Crea|teProper|
|00003cf0| 74 79 4f 53 70 65 63 28 | 44 65 73 63 54 79 70 65 |tyOSpec(|DescType|
|00003d00| 20 70 72 6f 70 43 6f 64 | 65 2c 20 41 45 44 65 73 | propCod|e, AEDes|
|00003d10| 63 20 2a 63 6f 6e 74 61 | 69 6e 65 72 44 65 73 63 |c *conta|inerDesc|
|00003d20| 2c 20 41 45 44 65 73 63 | 20 2a 6f 73 70 65 63 44 |, AEDesc| *ospecD|
|00003d30| 65 73 63 29 0d 7b 0d 09 | 41 45 44 65 73 63 09 6b |esc).{..|AEDesc.k|
|00003d40| 65 79 44 65 73 63 3b 0d | 09 41 45 44 65 73 63 09 |eyDesc;.|.AEDesc.|
|00003d50| 6e 75 6c 6c 44 65 73 63 | 3b 0d 09 0d 09 49 6e 69 |nullDesc|;....Ini|
|00003d60| 74 44 65 73 63 28 26 6b | 65 79 44 65 73 63 29 3b |tDesc(&k|eyDesc);|
|00003d70| 0d 09 49 6e 69 74 44 65 | 73 63 28 26 6e 75 6c 6c |..InitDe|sc(&null|
|00003d80| 44 65 73 63 29 3b 0d 09 | 44 65 73 63 54 79 70 65 |Desc);..|DescType|
|00003d90| 54 6f 44 65 73 63 28 70 | 72 6f 70 43 6f 64 65 2c |ToDesc(p|ropCode,|
|00003da0| 20 74 79 70 65 54 79 70 | 65 2c 20 26 6b 65 79 44 | typeTyp|e, &keyD|
|00003db0| 65 73 63 29 3b 0d 09 4f | 53 45 72 72 09 6f 73 73 |esc);..O|SErr.oss|
|00003dc0| 74 61 74 20 3d 20 43 72 | 65 61 74 65 4f 62 6a 53 |tat = Cr|eateObjS|
|00003dd0| 70 65 63 69 66 69 65 72 | 28 63 50 72 6f 70 65 72 |pecifier|(cProper|
|00003de0| 74 79 2c 20 63 6f 6e 74 | 61 69 6e 65 72 44 65 73 |ty, cont|ainerDes|
|00003df0| 63 20 3f 20 63 6f 6e 74 | 61 69 6e 65 72 44 65 73 |c ? cont|ainerDes|
|00003e00| 63 20 3a 20 26 6e 75 6c | 6c 44 65 73 63 2c 20 0d |c : &nul|lDesc, .|
|00003e10| 09 09 09 09 09 09 66 6f | 72 6d 50 72 6f 70 65 72 |......fo|rmProper|
|00003e20| 74 79 49 44 2c 20 26 6b | 65 79 44 65 73 63 2c 20 |tyID, &k|eyDesc, |
|00003e30| 66 61 6c 73 65 2c 20 6f | 73 70 65 63 44 65 73 63 |false, o|specDesc|
|00003e40| 29 3b 0d 09 44 69 73 70 | 6f 73 65 44 65 73 63 28 |);..Disp|oseDesc(|
|00003e50| 26 6b 65 79 44 65 73 63 | 29 3b 0d 09 72 65 74 75 |&keyDesc|);..retu|
|00003e60| 72 6e 20 6f 73 73 74 61 | 74 3b 0d 7d 20 2f 2f 20 |rn ossta|t;.} // |
|00003e70| 43 72 65 61 74 65 50 72 | 6f 70 65 72 74 79 4f 53 |CreatePr|opertyOS|
|00003e80| 70 65 63 28 29 0d 0d 2f | 2a 0d 20 2a 20 46 65 74 |pec()../|*. * Fet|
|00003e90| 63 68 4f 70 65 6e 55 52 | 4c 28 29 20 2d 2d 0d 20 |chOpenUR|L() --. |
|00003ea0| 2a 09 54 65 6c 6c 20 46 | 65 74 63 68 20 74 6f 20 |*.Tell F|etch to |
|00003eb0| 6f 70 65 6e 20 61 20 64 | 69 72 65 63 74 6f 72 79 |open a d|irectory|
|00003ec0| 20 28 73 70 65 63 69 66 | 69 65 64 20 62 79 20 61 | (specif|ied by a|
|00003ed0| 20 55 52 4c 29 2e 0d 20 | 2a 2f 0d 4f 53 45 72 72 | URL).. |*/.OSErr|
|00003ee0| 20 46 65 74 63 68 4f 70 | 65 6e 55 52 4c 28 63 68 | FetchOp|enURL(ch|
|00003ef0| 61 72 20 2a 75 72 6c 2c | 20 41 45 49 64 6c 65 55 |ar *url,| AEIdleU|
|00003f00| 50 50 20 69 64 6c 65 55 | 50 50 29 0d 7b 0d 09 41 |PP idleU|PP).{..A|
|00003f10| 45 44 65 73 63 09 75 72 | 6c 44 65 73 63 3b 0d 09 |EDesc.ur|lDesc;..|
|00003f20| 4f 53 45 72 72 09 6f 73 | 73 74 61 74 20 3d 20 6e |OSErr.os|stat = n|
|00003f30| 6f 45 72 72 3b 0d 09 0d | 09 49 6e 69 74 44 65 73 |oErr;...|.InitDes|
|00003f40| 63 28 26 75 72 6c 44 65 | 73 63 29 3b 0d 09 6f 73 |c(&urlDe|sc);..os|
|00003f50| 73 74 61 74 20 3d 20 43 | 72 65 61 74 65 46 6f 72 |stat = C|reateFor|
|00003f60| 6d 4e 61 6d 65 4f 53 70 | 65 63 28 75 72 6c 2c 20 |mNameOSp|ec(url, |
|00003f70| 63 55 52 4c 2c 20 6e 69 | 6c 2c 20 26 75 72 6c 44 |cURL, ni|l, &urlD|
|00003f80| 65 73 63 29 3b 0d 09 69 | 66 20 28 6f 73 73 74 61 |esc);..i|f (ossta|
|00003f90| 74 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 6f 73 |t == noE|rr)...os|
|00003fa0| 73 74 61 74 20 3d 20 53 | 65 6e 64 44 69 72 65 63 |stat = S|endDirec|
|00003fb0| 74 41 70 70 6c 65 45 76 | 65 6e 74 28 46 45 54 43 |tAppleEv|ent(FETC|
|00003fc0| 48 5f 41 50 50 5f 53 49 | 47 4e 41 54 55 52 45 2c |H_APP_SI|GNATURE,|
|00003fd0| 20 6b 43 6f 72 65 45 76 | 65 6e 74 43 6c 61 73 73 | kCoreEv|entClass|
|00003fe0| 2c 20 6b 41 45 4f 70 65 | 6e 2c 20 26 75 72 6c 44 |, kAEOpe|n, &urlD|
|00003ff0| 65 73 63 2c 0d 09 09 09 | 09 09 09 6e 69 6c 2c 20 |esc,....|...nil, |
|00004000| 69 64 6c 65 55 50 50 29 | 3b 0d 09 44 69 73 70 6f |idleUPP)|;..Dispo|
|00004010| 73 65 44 65 73 63 28 26 | 75 72 6c 44 65 73 63 29 |seDesc(&|urlDesc)|
|00004020| 3b 0d 09 72 65 74 75 72 | 6e 20 6f 73 73 74 61 74 |;..retur|n osstat|
|00004030| 3b 0d 7d 20 2f 2f 20 46 | 65 74 63 68 4f 70 65 6e |;.} // F|etchOpen|
|00004040| 55 52 4c 28 29 0d 0d 0d | 2f 2a 0d 20 2a 20 46 65 |URL()...|/*. * Fe|
|00004050| 74 63 68 50 75 74 28 29 | 20 2d 2d 0d 20 2a 09 54 |tchPut()| --. *.T|
|00004060| 65 6c 6c 20 46 65 74 63 | 68 20 74 6f 20 75 70 6c |ell Fetc|h to upl|
|00004070| 6f 61 64 20 61 20 66 69 | 6c 65 20 6f 72 20 66 6f |oad a fi|le or fo|
|00004080| 6c 64 65 72 20 74 6f 20 | 61 20 55 52 4c 0d 20 2a |lder to |a URL. *|
|00004090| 2f 0d 4f 53 45 72 72 20 | 46 65 74 63 68 50 75 74 |/.OSErr |FetchPut|
|000040a0| 28 46 53 53 70 65 63 20 | 2a 66 73 70 65 63 2c 20 |(FSSpec |*fspec, |
|000040b0| 63 68 61 72 20 2a 75 72 | 6c 2c 20 41 45 49 64 6c |char *ur|l, AEIdl|
|000040c0| 65 55 50 50 20 69 64 6c | 65 55 50 50 29 0d 7b 0d |eUPP idl|eUPP).{.|
|000040d0| 09 41 45 44 65 73 63 09 | 75 72 6c 44 65 73 63 3b |.AEDesc.|urlDesc;|
|000040e0| 0d 09 41 45 44 65 73 63 | 09 66 73 70 65 63 44 65 |..AEDesc|.fspecDe|
|000040f0| 73 63 3b 0d 09 4f 53 45 | 72 72 09 6f 73 73 74 61 |sc;..OSE|rr.ossta|
|00004100| 74 20 3d 20 6e 6f 45 72 | 72 3b 0d 09 0d 09 49 6e |t = noEr|r;....In|
|00004110| 69 74 44 65 73 63 28 26 | 75 72 6c 44 65 73 63 29 |itDesc(&|urlDesc)|
|00004120| 3b 0d 09 49 6e 69 74 44 | 65 73 63 28 26 66 73 70 |;..InitD|esc(&fsp|
|00004130| 65 63 44 65 73 63 29 3b | 0d 09 0d 09 6f 73 73 74 |ecDesc);|....osst|
|00004140| 61 74 20 3d 20 43 72 65 | 61 74 65 46 6f 72 6d 4e |at = Cre|ateFormN|
|00004150| 61 6d 65 4f 53 70 65 63 | 28 75 72 6c 2c 20 63 55 |ameOSpec|(url, cU|
|00004160| 52 4c 2c 20 6e 69 6c 2c | 20 26 75 72 6c 44 65 73 |RL, nil,| &urlDes|
|00004170| 63 29 3b 0d 09 69 66 20 | 28 6f 73 73 74 61 74 20 |c);..if |(osstat |
|00004180| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 09 67 6f 74 6f |!= noErr|)...goto|
|00004190| 20 65 78 69 74 3b 0d 09 | 46 53 53 70 65 63 54 6f | exit;..|FSSpecTo|
|000041a0| 44 65 73 63 28 66 73 70 | 65 63 2c 20 74 79 70 65 |Desc(fsp|ec, type|
|000041b0| 41 6c 69 61 73 2c 20 26 | 66 73 70 65 63 44 65 73 |Alias, &|fspecDes|
|000041c0| 63 29 3b 0d 09 0d 09 6f | 73 73 74 61 74 20 3d 20 |c);....o|sstat = |
|000041d0| 53 65 6e 64 44 69 72 65 | 63 74 41 70 70 6c 65 45 |SendDire|ctAppleE|
|000041e0| 76 65 6e 74 57 69 74 68 | 41 72 67 28 46 45 54 43 |ventWith|Arg(FETC|
|000041f0| 48 5f 41 50 50 5f 53 49 | 47 4e 41 54 55 52 45 2c |H_APP_SI|GNATURE,|
|00004200| 20 6b 41 45 46 65 74 63 | 68 53 75 69 74 65 2c 20 | kAEFetc|hSuite, |
|00004210| 6b 41 45 50 75 74 49 6e | 74 6f 45 76 65 6e 74 2c |kAEPutIn|toEvent,|
|00004220| 20 0d 09 09 09 09 09 09 | 09 26 75 72 6c 44 65 73 | .......|.&urlDes|
|00004230| 63 2c 0d 09 09 09 09 09 | 09 09 6b 41 45 46 65 74 |c,......|..kAEFet|
|00004240| 63 68 50 75 74 49 6e 74 | 6f 49 74 65 6d 73 50 61 |chPutInt|oItemsPa|
|00004250| 72 61 6d 2c 20 26 66 73 | 70 65 63 44 65 73 63 2c |ram, &fs|pecDesc,|
|00004260| 0d 09 09 09 09 09 09 09 | 6e 69 6c 2c 20 69 64 6c |........|nil, idl|
|00004270| 65 55 50 50 29 3b 0d 65 | 78 69 74 3a 0d 09 44 69 |eUPP);.e|xit:..Di|
|00004280| 73 70 6f 73 65 44 65 73 | 63 28 26 75 72 6c 44 65 |sposeDes|c(&urlDe|
|00004290| 73 63 29 3b 0d 09 44 69 | 73 70 6f 73 65 44 65 73 |sc);..Di|sposeDes|
|000042a0| 63 28 26 66 73 70 65 63 | 44 65 73 63 29 3b 0d 09 |c(&fspec|Desc);..|
|000042b0| 72 65 74 75 72 6e 20 6f | 73 73 74 61 74 3b 0d 7d |return o|sstat;.}|
|000042c0| 20 2f 2f 20 46 65 74 63 | 68 50 75 74 28 29 0d 0d | // Fetc|hPut()..|
|000042d0| 2f 2a 0d 20 2a 20 46 65 | 74 63 68 47 65 74 28 29 |/*. * Fe|tchGet()|
|000042e0| 20 2d 2d 0d 20 2a 09 54 | 65 6c 6c 20 46 65 74 63 | --. *.T|ell Fetc|
|000042f0| 68 20 74 6f 20 64 6f 77 | 6e 6c 6f 61 64 20 61 20 |h to dow|nload a |
|00004300| 66 69 6c 65 20 6f 72 20 | 66 6f 6c 64 65 72 20 66 |file or |folder f|
|00004310| 72 6f 6d 20 61 20 55 52 | 4c 20 74 6f 20 61 20 66 |rom a UR|L to a f|
|00004320| 6f 6c 64 65 72 0d 20 2a | 2f 0d 4f 53 45 72 72 20 |older. *|/.OSErr |
|00004330| 46 65 74 63 68 47 65 74 | 28 63 68 61 72 20 2a 75 |FetchGet|(char *u|
|00004340| 72 6c 2c 20 46 53 53 70 | 65 63 20 2a 66 73 70 65 |rl, FSSp|ec *fspe|
|00004350| 63 2c 20 41 45 49 64 6c | 65 55 50 50 20 69 64 6c |c, AEIdl|eUPP idl|
|00004360| 65 55 50 50 29 0d 7b 0d | 09 41 45 44 65 73 63 09 |eUPP).{.|.AEDesc.|
|00004370| 09 6e 75 6c 6c 44 65 73 | 63 3b 0d 09 41 45 44 65 |.nullDes|c;..AEDe|
|00004380| 73 63 09 09 61 65 72 44 | 65 73 63 3b 0d 09 41 45 |sc..aerD|esc;..AE|
|00004390| 44 65 73 63 09 09 69 6e | 73 65 72 74 4c 6f 63 44 |Desc..in|sertLocD|
|000043a0| 65 73 63 3b 0d 09 41 45 | 44 65 73 63 09 09 66 73 |esc;..AE|Desc..fs|
|000043b0| 70 65 63 44 65 73 63 3b | 0d 09 41 45 44 65 73 63 |pecDesc;|..AEDesc|
|000043c0| 09 09 75 72 6c 44 65 73 | 63 3b 0d 09 44 65 73 63 |..urlDes|c;..Desc|
|000043d0| 54 79 70 65 09 70 6f 73 | 69 74 69 6f 6e 43 6f 64 |Type.pos|itionCod|
|000043e0| 65 3b 0d 09 4f 53 45 72 | 72 09 09 6f 73 73 74 61 |e;..OSEr|r..ossta|
|000043f0| 74 3b 0d 0d 09 49 6e 69 | 74 44 65 73 63 28 26 6e |t;...Ini|tDesc(&n|
|00004400| 75 6c 6c 44 65 73 63 29 | 3b 0d 09 49 6e 69 74 44 |ullDesc)|;..InitD|
|00004410| 65 73 63 28 26 61 65 72 | 44 65 73 63 29 3b 0d 09 |esc(&aer|Desc);..|
|00004420| 49 6e 69 74 44 65 73 63 | 28 26 69 6e 73 65 72 74 |InitDesc|(&insert|
|00004430| 4c 6f 63 44 65 73 63 29 | 3b 0d 09 49 6e 69 74 44 |LocDesc)|;..InitD|
|00004440| 65 73 63 28 26 66 73 70 | 65 63 44 65 73 63 29 3b |esc(&fsp|ecDesc);|
|00004450| 0d 09 49 6e 69 74 44 65 | 73 63 28 26 75 72 6c 44 |..InitDe|sc(&urlD|
|00004460| 65 73 63 29 3b 0d 09 6f | 73 73 74 61 74 20 3d 20 |esc);..o|sstat = |
|00004470| 6e 6f 45 72 72 3b 0d 09 | 0d 09 2f 2a 20 66 69 72 |noErr;..|../* fir|
|00004480| 73 74 20 67 65 74 20 4f | 73 70 65 63 20 66 6f 72 |st get O|spec for|
|00004490| 20 74 61 72 67 65 74 20 | 66 6f 6c 64 65 72 20 2a | target |folder *|
|000044a0| 2f 0d 09 46 53 53 70 65 | 63 54 6f 44 65 73 63 28 |/..FSSpe|cToDesc(|
|000044b0| 66 73 70 65 63 2c 20 74 | 79 70 65 41 6c 69 61 73 |fspec, t|ypeAlias|
|000044c0| 2c 20 26 66 73 70 65 63 | 44 65 73 63 29 3b 0d 09 |, &fspec|Desc);..|
|000044d0| 0d 09 2f 2a 20 6e 65 78 | 74 20 62 75 69 6c 64 20 |../* nex|t build |
|000044e0| 69 6e 73 65 72 74 69 6f | 6e 20 6c 6f 63 61 74 69 |insertio|n locati|
|000044f0| 6f 6e 20 28 22 42 65 67 | 69 6e 6e 69 6e 67 20 6f |on ("Beg|inning o|
|00004500| 66 20 61 6c 69 61 73 20 | 66 6f 6f 22 29 20 2a 2f |f alias |foo") */|
|00004510| 0d 09 6f 73 73 74 61 74 | 20 3d 20 41 45 43 72 65 |..osstat| = AECre|
|00004520| 61 74 65 4c 69 73 74 28 | 6e 69 6c 2c 20 30 2c 20 |ateList(|nil, 0, |
|00004530| 74 72 75 65 2c 20 26 61 | 65 72 44 65 73 63 29 3b |true, &a|erDesc);|
|00004540| 0d 09 69 66 20 28 6f 73 | 73 74 61 74 20 21 3d 20 |..if (os|stat != |
|00004550| 6e 6f 45 72 72 29 0d 09 | 09 67 6f 74 6f 20 65 78 |noErr)..|.goto ex|
|00004560| 69 74 3b 0d 09 09 0d 09 | 2f 2a 20 61 64 64 20 6f |it;.....|/* add o|
|00004570| 62 6a 65 63 74 2d 69 6e | 2d 72 65 6c 61 74 69 6f |bject-in|-relatio|
|00004580| 6e 2d 74 6f 20 66 69 65 | 6c 64 20 2a 2f 0d 09 6f |n-to fie|ld */..o|
|00004590| 73 73 74 61 74 20 3d 20 | 41 45 50 75 74 4b 65 79 |sstat = |AEPutKey|
|000045a0| 44 65 73 63 28 26 61 65 | 72 44 65 73 63 2c 20 6b |Desc(&ae|rDesc, k|
|000045b0| 65 79 41 45 4f 62 6a 65 | 63 74 2c 20 26 66 73 70 |eyAEObje|ct, &fsp|
|000045c0| 65 63 44 65 73 63 29 3b | 0d 09 69 66 20 28 6f 73 |ecDesc);|..if (os|
|000045d0| 73 74 61 74 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |stat != |noErr)..|
|000045e0| 09 67 6f 74 6f 20 65 78 | 69 74 3b 0d 09 09 0d 09 |.goto ex|it;.....|
|000045f0| 2f 2a 20 61 64 64 20 70 | 6f 73 69 74 69 6f 6e 69 |/* add p|ositioni|
|00004600| 6e 67 20 66 69 65 6c 64 | 20 2a 2f 0d 09 70 6f 73 |ng field| */..pos|
|00004610| 69 74 69 6f 6e 43 6f 64 | 65 20 3d 20 6b 41 45 42 |itionCod|e = kAEB|
|00004620| 65 67 69 6e 6e 69 6e 67 | 3b 0d 09 6f 73 73 74 61 |eginning|;..ossta|
|00004630| 74 20 3d 20 41 45 50 75 | 74 4b 65 79 50 74 72 28 |t = AEPu|tKeyPtr(|
|00004640| 26 61 65 72 44 65 73 63 | 2c 20 6b 65 79 41 45 50 |&aerDesc|, keyAEP|
|00004650| 6f 73 69 74 69 6f 6e 2c | 20 74 79 70 65 45 6e 75 |osition,| typeEnu|
|00004660| 6d 65 72 61 74 65 64 2c | 20 26 70 6f 73 69 74 69 |merated,| &positi|
|00004670| 6f 6e 43 6f 64 65 2c 0d | 09 09 09 09 73 69 7a 65 |onCode,.|....size|
|00004680| 6f 66 28 70 6f 73 69 74 | 69 6f 6e 43 6f 64 65 29 |of(posit|ionCode)|
|00004690| 29 3b 0d 09 69 66 20 28 | 6f 73 73 74 61 74 20 21 |);..if (|osstat !|
|000046a0| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 67 6f 74 6f 20 |= noErr)|...goto |
|000046b0| 65 78 69 74 3b 0d 09 09 | 0d 09 2f 2a 20 63 6f 65 |exit;...|../* coe|
|000046c0| 72 63 65 20 74 6f 20 74 | 79 70 65 49 6e 73 65 72 |rce to t|ypeInser|
|000046d0| 74 69 6f 6e 4c 6f 63 20 | 2a 2f 0d 09 6f 73 73 74 |tionLoc |*/..osst|
|000046e0| 61 74 20 3d 20 41 45 43 | 6f 65 72 63 65 44 65 73 |at = AEC|oerceDes|
|000046f0| 63 28 26 61 65 72 44 65 | 73 63 2c 20 74 79 70 65 |c(&aerDe|sc, type|
|00004700| 49 6e 73 65 72 74 69 6f | 6e 4c 6f 63 2c 20 26 69 |Insertio|nLoc, &i|
|00004710| 6e 73 65 72 74 4c 6f 63 | 44 65 73 63 29 3b 0d 09 |nsertLoc|Desc);..|
|00004720| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00004730| 45 72 72 29 0d 09 09 67 | 6f 74 6f 20 65 78 69 74 |Err)...g|oto exit|
|00004740| 3b 0d 09 09 0d 09 2f 2a | 20 63 72 65 61 74 65 20 |;...../*| create |
|00004750| 4f 73 70 65 63 20 66 6f | 72 20 69 74 65 6d 20 74 |Ospec fo|r item t|
|00004760| 6f 20 67 65 74 20 2a 2f | 0d 09 6f 73 73 74 61 74 |o get */|..osstat|
|00004770| 20 3d 20 43 72 65 61 74 | 65 46 6f 72 6d 4e 61 6d | = Creat|eFormNam|
|00004780| 65 4f 53 70 65 63 28 75 | 72 6c 2c 20 63 55 52 4c |eOSpec(u|rl, cURL|
|00004790| 2c 20 6e 69 6c 2c 20 26 | 75 72 6c 44 65 73 63 29 |, nil, &|urlDesc)|
|000047a0| 3b 0d 09 69 66 20 28 6f | 73 73 74 61 74 20 21 3d |;..if (o|sstat !=|
|000047b0| 20 6e 6f 45 72 72 29 0d | 09 09 67 6f 74 6f 20 65 | noErr).|..goto e|
|000047c0| 78 69 74 3b 0d 09 09 0d | 09 2f 2a 20 6e 6f 77 20 |xit;....|./* now |
|000047d0| 73 65 6e 64 20 74 68 65 | 20 65 76 65 6e 74 20 2a |send the| event *|
|000047e0| 2f 0d 09 6f 73 73 74 61 | 74 20 3d 20 53 65 6e 64 |/..ossta|t = Send|
|000047f0| 4d 6f 76 65 43 6c 6f 6e | 65 41 70 70 6c 65 45 76 |MoveClon|eAppleEv|
|00004800| 65 6e 74 28 46 45 54 43 | 48 5f 41 50 50 5f 53 49 |ent(FETC|H_APP_SI|
|00004810| 47 4e 41 54 55 52 45 2c | 20 6b 41 45 43 6c 6f 6e |GNATURE,| kAEClon|
|00004820| 65 2c 20 26 75 72 6c 44 | 65 73 63 2c 20 0d 09 09 |e, &urlD|esc, ...|
|00004830| 09 09 09 09 26 69 6e 73 | 65 72 74 4c 6f 63 44 65 |....&ins|ertLocDe|
|00004840| 73 63 2c 20 6e 69 6c 2c | 20 69 64 6c 65 55 50 50 |sc, nil,| idleUPP|
|00004850| 29 3b 0d 09 0d 65 78 69 | 74 3a 09 2f 2a 20 63 6c |);...exi|t:./* cl|
|00004860| 65 61 6e 20 75 70 20 2a | 2f 0d 09 44 69 73 70 6f |ean up *|/..Dispo|
|00004870| 73 65 44 65 73 63 28 26 | 6e 75 6c 6c 44 65 73 63 |seDesc(&|nullDesc|
|00004880| 29 3b 0d 09 44 69 73 70 | 6f 73 65 44 65 73 63 28 |);..Disp|oseDesc(|
|00004890| 26 61 65 72 44 65 73 63 | 29 3b 0d 09 44 69 73 70 |&aerDesc|);..Disp|
|000048a0| 6f 73 65 44 65 73 63 28 | 26 69 6e 73 65 72 74 4c |oseDesc(|&insertL|
|000048b0| 6f 63 44 65 73 63 29 3b | 0d 09 44 69 73 70 6f 73 |ocDesc);|..Dispos|
|000048c0| 65 44 65 73 63 28 26 75 | 72 6c 44 65 73 63 29 3b |eDesc(&u|rlDesc);|
|000048d0| 0d 09 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 66 |..Dispos|eDesc(&f|
|000048e0| 73 70 65 63 44 65 73 63 | 29 3b 0d 09 72 65 74 75 |specDesc|);..retu|
|000048f0| 72 6e 20 6f 73 73 74 61 | 74 3b 0d 7d 20 2f 2f 20 |rn ossta|t;.} // |
|00004900| 46 65 74 63 68 47 65 74 | 28 29 0d 0d 2f 2a 0d 20 |FetchGet|()../*. |
|00004910| 2a 20 46 65 74 63 68 56 | 69 65 77 46 69 6c 65 28 |* FetchV|iewFile(|
|00004920| 29 20 2d 2d 0d 20 2a 09 | 54 65 6c 6c 20 46 65 74 |) --. *.|Tell Fet|
|00004930| 63 68 20 74 6f 20 76 69 | 65 77 20 61 20 66 69 6c |ch to vi|ew a fil|
|00004940| 65 20 28 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |e (speci|fied by |
|00004950| 61 20 55 52 4c 29 2e 0d | 20 2a 2f 0d 4f 53 45 72 |a URL)..| */.OSEr|
|00004960| 72 20 46 65 74 63 68 56 | 69 65 77 46 69 6c 65 28 |r FetchV|iewFile(|
|00004970| 63 68 61 72 20 2a 75 72 | 6c 2c 20 41 45 49 64 6c |char *ur|l, AEIdl|
|00004980| 65 55 50 50 20 69 64 6c | 65 55 50 50 29 0d 7b 0d |eUPP idl|eUPP).{.|
|00004990| 09 41 45 44 65 73 63 09 | 75 72 6c 44 65 73 63 3b |.AEDesc.|urlDesc;|
|000049a0| 0d 09 4f 53 45 72 72 09 | 6f 73 73 74 61 74 20 3d |..OSErr.|osstat =|
|000049b0| 20 6e 6f 45 72 72 3b 0d | 09 0d 09 49 6e 69 74 44 | noErr;.|...InitD|
|000049c0| 65 73 63 28 26 75 72 6c | 44 65 73 63 29 3b 0d 09 |esc(&url|Desc);..|
|000049d0| 6f 73 73 74 61 74 20 3d | 20 43 72 65 61 74 65 46 |osstat =| CreateF|
|000049e0| 6f 72 6d 4e 61 6d 65 4f | 53 70 65 63 28 75 72 6c |ormNameO|Spec(url|
|000049f0| 2c 20 63 55 52 4c 2c 20 | 6e 69 6c 2c 20 26 75 72 |, cURL, |nil, &ur|
|00004a00| 6c 44 65 73 63 29 3b 0d | 09 69 66 20 28 6f 73 73 |lDesc);.|.if (oss|
|00004a10| 74 61 74 20 3d 3d 20 6e | 6f 45 72 72 29 0d 09 09 |tat == n|oErr)...|
|00004a20| 6f 73 73 74 61 74 20 3d | 20 53 65 6e 64 44 69 72 |osstat =| SendDir|
|00004a30| 65 63 74 41 70 70 6c 65 | 45 76 65 6e 74 28 46 45 |ectApple|Event(FE|
|00004a40| 54 43 48 5f 41 50 50 5f | 53 49 47 4e 41 54 55 52 |TCH_APP_|SIGNATUR|
|00004a50| 45 2c 20 6b 41 45 46 65 | 74 63 68 53 75 69 74 65 |E, kAEFe|tchSuite|
|00004a60| 2c 20 6b 41 45 56 69 65 | 77 46 69 6c 65 45 76 65 |, kAEVie|wFileEve|
|00004a70| 6e 74 2c 20 0d 09 09 09 | 09 09 09 26 75 72 6c 44 |nt, ....|...&urlD|
|00004a80| 65 73 63 2c 20 6e 69 6c | 2c 20 69 64 6c 65 55 50 |esc, nil|, idleUP|
|00004a90| 50 29 3b 0d 09 44 69 73 | 70 6f 73 65 44 65 73 63 |P);..Dis|poseDesc|
|00004aa0| 28 26 75 72 6c 44 65 73 | 63 29 3b 0d 09 72 65 74 |(&urlDes|c);..ret|
|00004ab0| 75 72 6e 20 6f 73 73 74 | 61 74 3b 0d 7d 20 2f 2f |urn osst|at;.} //|
|00004ac0| 20 46 65 74 63 68 56 69 | 65 77 46 69 6c 65 28 29 | FetchVi|ewFile()|
|00004ad0| 0d 0d 2f 2a 0d 20 2a 20 | 46 65 74 63 68 49 74 65 |../*. * |FetchIte|
|00004ae0| 6d 45 78 69 73 74 73 28 | 29 20 2d 2d 0d 20 2a 09 |mExists(|) --. *.|
|00004af0| 41 73 6b 20 46 65 74 63 | 68 20 77 68 65 74 68 65 |Ask Fetc|h whethe|
|00004b00| 72 20 61 20 66 69 6c 65 | 20 28 6f 72 20 64 69 72 |r a file| (or dir|
|00004b10| 65 63 74 6f 72 79 29 20 | 69 73 20 69 6e 63 6c 75 |ectory) |is inclu|
|00004b20| 64 65 64 20 69 6e 20 74 | 68 65 20 66 72 6f 6e 74 |ded in t|he front|
|00004b30| 6d 6f 73 74 20 74 72 61 | 6e 73 66 65 72 20 77 69 |most tra|nsfer wi|
|00004b40| 6e 64 6f 77 20 66 69 6c | 65 20 6c 69 73 74 2e 0d |ndow fil|e list..|
|00004b50| 20 2a 2f 0d 4f 53 45 72 | 72 20 46 65 74 63 68 49 | */.OSEr|r FetchI|
|00004b60| 74 65 6d 45 78 69 73 74 | 73 28 63 68 61 72 20 2a |temExist|s(char *|
|00004b70| 66 6e 61 6d 65 2c 20 42 | 6f 6f 6c 65 61 6e 20 2a |fname, B|oolean *|
|00004b80| 65 78 69 73 74 73 2c 20 | 41 45 49 64 6c 65 55 50 |exists, |AEIdleUP|
|00004b90| 50 20 69 64 6c 65 55 50 | 50 29 0d 7b 0d 09 41 70 |P idleUP|P).{..Ap|
|00004ba0| 70 6c 65 45 76 65 6e 74 | 09 61 65 72 65 70 6c 79 |pleEvent|.aereply|
|00004bb0| 3b 0d 09 41 45 44 65 73 | 63 09 09 66 6e 61 6d 65 |;..AEDes|c..fname|
|00004bc0| 44 65 73 63 3b 0d 09 41 | 45 44 65 73 63 09 09 72 |Desc;..A|EDesc..r|
|00004bd0| 65 70 6c 79 44 65 73 63 | 3b 0d 09 4f 53 45 72 72 |eplyDesc|;..OSErr|
|00004be0| 09 09 6f 73 73 74 61 74 | 20 3d 20 6e 6f 45 72 72 |..osstat| = noErr|
|00004bf0| 3b 0d 09 0d 09 49 6e 69 | 74 44 65 73 63 28 26 61 |;....Ini|tDesc(&a|
|00004c00| 65 72 65 70 6c 79 29 3b | 0d 09 49 6e 69 74 44 65 |ereply);|..InitDe|
|00004c10| 73 63 28 26 66 6e 61 6d | 65 44 65 73 63 29 3b 0d |sc(&fnam|eDesc);.|
|00004c20| 09 49 6e 69 74 44 65 73 | 63 28 26 72 65 70 6c 79 |.InitDes|c(&reply|
|00004c30| 44 65 73 63 29 3b 0d 09 | 0d 09 6f 73 73 74 61 74 |Desc);..|..osstat|
|00004c40| 20 3d 20 43 72 65 61 74 | 65 46 6f 72 6d 4e 61 6d | = Creat|eFormNam|
|00004c50| 65 4f 53 70 65 63 28 66 | 6e 61 6d 65 2c 20 63 48 |eOSpec(f|name, cH|
|00004c60| 6f 73 74 49 74 65 6d 2c | 20 6e 69 6c 2c 20 26 66 |ostItem,| nil, &f|
|00004c70| 6e 61 6d 65 44 65 73 63 | 29 3b 0d 09 69 66 20 28 |nameDesc|);..if (|
|00004c80| 6f 73 73 74 61 74 20 21 | 3d 20 6e 6f 45 72 72 29 |osstat !|= noErr)|
|00004c90| 0d 09 09 67 6f 74 6f 20 | 65 78 69 74 3b 0d 09 0d |...goto |exit;...|
|00004ca0| 09 6f 73 73 74 61 74 20 | 3d 20 53 65 6e 64 44 69 |.osstat |= SendDi|
|00004cb0| 72 65 63 74 41 70 70 6c | 65 45 76 65 6e 74 28 46 |rectAppl|eEvent(F|
|00004cc0| 45 54 43 48 5f 41 50 50 | 5f 53 49 47 4e 41 54 55 |ETCH_APP|_SIGNATU|
|00004cd0| 52 45 2c 20 6b 41 45 43 | 6f 72 65 53 75 69 74 65 |RE, kAEC|oreSuite|
|00004ce0| 2c 20 6b 41 45 44 6f 4f | 62 6a 65 63 74 73 45 78 |, kAEDoO|bjectsEx|
|00004cf0| 69 73 74 2c 20 0d 09 09 | 09 09 09 09 26 66 6e 61 |ist, ...|....&fna|
|00004d00| 6d 65 44 65 73 63 2c 20 | 26 61 65 72 65 70 6c 79 |meDesc, |&aereply|
|00004d10| 2c 20 69 64 6c 65 55 50 | 50 29 3b 0d 09 69 66 20 |, idleUP|P);..if |
|00004d20| 28 6f 73 73 74 61 74 20 | 21 3d 20 6e 6f 45 72 72 |(osstat |!= noErr|
|00004d30| 29 0d 09 09 67 6f 74 6f | 20 65 78 69 74 3b 0d 09 |)...goto| exit;..|
|00004d40| 09 0d 09 6f 73 73 74 61 | 74 20 3d 20 41 45 47 65 |...ossta|t = AEGe|
|00004d50| 74 50 61 72 61 6d 44 65 | 73 63 28 26 61 65 72 65 |tParamDe|sc(&aere|
|00004d60| 70 6c 79 2c 20 6b 65 79 | 41 45 52 65 73 75 6c 74 |ply, key|AEResult|
|00004d70| 2c 20 74 79 70 65 42 6f | 6f 6c 65 61 6e 2c 20 26 |, typeBo|olean, &|
|00004d80| 72 65 70 6c 79 44 65 73 | 63 29 3b 0d 09 69 66 20 |replyDes|c);..if |
|00004d90| 28 6f 73 73 74 61 74 20 | 21 3d 20 6e 6f 45 72 72 |(osstat |!= noErr|
|00004da0| 29 0d 09 09 67 6f 74 6f | 20 65 78 69 74 3b 0d 09 |)...goto| exit;..|
|00004db0| 0d 09 2a 65 78 69 73 74 | 73 20 3d 20 2a 2a 72 65 |..*exist|s = **re|
|00004dc0| 70 6c 79 44 65 73 63 2e | 64 61 74 61 48 61 6e 64 |plyDesc.|dataHand|
|00004dd0| 6c 65 20 21 3d 20 30 3b | 0d 09 0d 65 78 69 74 3a |le != 0;|...exit:|
|00004de0| 0d 09 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 61 |..Dispos|eDesc(&a|
|00004df0| 65 72 65 70 6c 79 29 3b | 0d 09 44 69 73 70 6f 73 |ereply);|..Dispos|
|00004e00| 65 44 65 73 63 28 26 66 | 6e 61 6d 65 44 65 73 63 |eDesc(&f|nameDesc|
|00004e10| 29 3b 0d 09 44 69 73 70 | 6f 73 65 44 65 73 63 28 |);..Disp|oseDesc(|
|00004e20| 26 72 65 70 6c 79 44 65 | 73 63 29 3b 0d 09 72 65 |&replyDe|sc);..re|
|00004e30| 74 75 72 6e 20 6f 73 73 | 74 61 74 3b 0d 7d 20 2f |turn oss|tat;.} /|
|00004e40| 2f 20 46 65 74 63 68 49 | 74 65 6d 45 78 69 73 74 |/ FetchI|temExist|
|00004e50| 73 28 29 0d 0d 2f 2a 0d | 20 2a 20 46 65 74 63 68 |s()../*.| * Fetch|
|00004e60| 52 65 6e 61 6d 65 49 74 | 65 6d 28 29 20 2d 2d 0d |RenameIt|em() --.|
|00004e70| 20 2a 09 52 65 6e 61 6d | 65 20 61 6e 20 69 74 65 | *.Renam|e an ite|
|00004e80| 6d 20 69 6e 20 74 68 65 | 20 66 72 6f 6e 74 6d 6f |m in the| frontmo|
|00004e90| 73 74 20 74 72 61 6e 73 | 66 65 72 20 77 69 6e 64 |st trans|fer wind|
|00004ea0| 6f 77 20 66 69 6c 65 20 | 6c 69 73 74 2e 0d 20 2a |ow file |list.. *|
|00004eb0| 2f 0d 4f 53 45 72 72 20 | 46 65 74 63 68 52 65 6e |/.OSErr |FetchRen|
|00004ec0| 61 6d 65 49 74 65 6d 28 | 63 68 61 72 20 2a 6f 6c |ameItem(|char *ol|
|00004ed0| 64 6e 61 6d 65 2c 20 63 | 68 61 72 20 2a 6e 65 77 |dname, c|har *new|
|00004ee0| 6e 61 6d 65 2c 20 41 45 | 49 64 6c 65 55 50 50 20 |name, AE|IdleUPP |
|00004ef0| 69 64 6c 65 55 50 50 29 | 0d 7b 0d 09 41 45 44 65 |idleUPP)|.{..AEDe|
|00004f00| 73 63 09 09 69 74 65 6d | 44 65 73 63 3b 0d 09 41 |sc..item|Desc;..A|
|00004f10| 45 44 65 73 63 09 09 70 | 72 6f 70 44 65 73 63 3b |EDesc..p|ropDesc;|
|00004f20| 0d 09 41 45 44 65 73 63 | 09 09 6e 65 77 6e 61 6d |..AEDesc|..newnam|
|00004f30| 65 44 65 73 63 3b 0d 09 | 4f 53 45 72 72 09 09 6f |eDesc;..|OSErr..o|
|00004f40| 73 73 74 61 74 20 3d 20 | 6e 6f 45 72 72 3b 0d 09 |sstat = |noErr;..|
|00004f50| 0d 09 49 6e 69 74 44 65 | 73 63 28 26 69 74 65 6d |..InitDe|sc(&item|
|00004f60| 44 65 73 63 29 3b 0d 09 | 49 6e 69 74 44 65 73 63 |Desc);..|InitDesc|
|00004f70| 28 26 70 72 6f 70 44 65 | 73 63 29 3b 0d 09 49 6e |(&propDe|sc);..In|
|00004f80| 69 74 44 65 73 63 28 26 | 6e 65 77 6e 61 6d 65 44 |itDesc(&|newnameD|
|00004f90| 65 73 63 29 3b 0d 09 0d | 09 2f 2a 20 63 72 65 61 |esc);...|./* crea|
|00004fa0| 74 65 20 6f 73 70 65 63 | 20 66 6f 72 20 6e 61 6d |te ospec| for nam|
|00004fb0| 65 20 6f 66 20 6e 61 6d | 65 64 20 69 74 65 6d 20 |e of nam|ed item |
|00004fc0| 2a 2f 0d 09 6f 73 73 74 | 61 74 20 3d 20 43 72 65 |*/..osst|at = Cre|
|00004fd0| 61 74 65 46 6f 72 6d 4e | 61 6d 65 4f 53 70 65 63 |ateFormN|ameOSpec|
|00004fe0| 28 6f 6c 64 6e 61 6d 65 | 2c 20 63 48 6f 73 74 49 |(oldname|, cHostI|
|00004ff0| 74 65 6d 2c 20 6e 69 6c | 2c 20 26 69 74 65 6d 44 |tem, nil|, &itemD|
|00005000| 65 73 63 29 3b 0d 09 69 | 66 20 28 6f 73 73 74 61 |esc);..i|f (ossta|
|00005010| 74 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 67 6f |t != noE|rr)...go|
|00005020| 74 6f 20 65 78 69 74 3b | 0d 09 09 0d 09 6f 73 73 |to exit;|.....oss|
|00005030| 74 61 74 20 3d 20 43 72 | 65 61 74 65 50 72 6f 70 |tat = Cr|eateProp|
|00005040| 65 72 74 79 4f 53 70 65 | 63 28 70 4e 61 6d 65 2c |ertyOSpe|c(pName,|
|00005050| 20 26 69 74 65 6d 44 65 | 73 63 2c 20 26 70 72 6f | &itemDe|sc, &pro|
|00005060| 70 44 65 73 63 29 3b 0d | 09 69 66 20 28 6f 73 73 |pDesc);.|.if (oss|
|00005070| 74 61 74 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |tat != n|oErr)...|
|00005080| 67 6f 74 6f 20 65 78 69 | 74 3b 0d 09 09 0d 09 2f |goto exi|t;...../|
|00005090| 2a 20 63 72 65 61 74 65 | 20 64 65 73 63 20 66 6f |* create| desc fo|
|000050a0| 72 20 6e 65 77 20 6e 61 | 6d 65 20 2a 2f 0d 09 43 |r new na|me */..C|
|000050b0| 53 74 72 69 6e 67 54 6f | 44 65 73 63 28 6e 65 77 |StringTo|Desc(new|
|000050c0| 6e 61 6d 65 2c 20 74 79 | 70 65 43 68 61 72 2c 20 |name, ty|peChar, |
|000050d0| 26 6e 65 77 6e 61 6d 65 | 44 65 73 63 29 3b 0d 09 |&newname|Desc);..|
|000050e0| 0d 09 2f 2a 20 73 65 6e | 64 20 74 68 65 20 65 76 |../* sen|d the ev|
|000050f0| 65 6e 74 20 2a 2f 0d 09 | 6f 73 73 74 61 74 20 3d |ent */..|osstat =|
|00005100| 20 53 65 6e 64 44 69 72 | 65 63 74 41 70 70 6c 65 | SendDir|ectApple|
|00005110| 45 76 65 6e 74 57 69 74 | 68 41 72 67 28 46 45 54 |EventWit|hArg(FET|
|00005120| 43 48 5f 41 50 50 5f 53 | 49 47 4e 41 54 55 52 45 |CH_APP_S|IGNATURE|
|00005130| 2c 20 6b 41 45 43 6f 72 | 65 53 75 69 74 65 2c 20 |, kAECor|eSuite, |
|00005140| 6b 41 45 53 65 74 44 61 | 74 61 2c 20 0d 09 09 09 |kAESetDa|ta, ....|
|00005150| 09 09 09 26 70 72 6f 70 | 44 65 73 63 2c 20 6b 65 |...&prop|Desc, ke|
|00005160| 79 41 45 44 61 74 61 2c | 20 26 6e 65 77 6e 61 6d |yAEData,| &newnam|
|00005170| 65 44 65 73 63 2c 20 6e | 69 6c 2c 20 69 64 6c 65 |eDesc, n|il, idle|
|00005180| 55 50 50 29 3b 0d 09 69 | 66 20 28 6f 73 73 74 61 |UPP);..i|f (ossta|
|00005190| 74 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 67 6f |t != noE|rr)...go|
|000051a0| 74 6f 20 65 78 69 74 3b | 0d 09 0d 65 78 69 74 3a |to exit;|...exit:|
|000051b0| 0d 09 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 69 |..Dispos|eDesc(&i|
|000051c0| 74 65 6d 44 65 73 63 29 | 3b 0d 09 44 69 73 70 6f |temDesc)|;..Dispo|
|000051d0| 73 65 44 65 73 63 28 26 | 70 72 6f 70 44 65 73 63 |seDesc(&|propDesc|
|000051e0| 29 3b 0d 09 44 69 73 70 | 6f 73 65 44 65 73 63 28 |);..Disp|oseDesc(|
|000051f0| 26 6e 65 77 6e 61 6d 65 | 44 65 73 63 29 3b 0d 09 |&newname|Desc);..|
|00005200| 72 65 74 75 72 6e 20 6f | 73 73 74 61 74 3b 0d 7d |return o|sstat;.}|
|00005210| 20 2f 2f 20 46 65 74 63 | 68 52 65 6e 61 6d 65 49 | // Fetc|hRenameI|
|00005220| 74 65 6d 28 29 0d 0d 2f | 2a 0d 20 2a 20 46 65 74 |tem()../|*. * Fet|
|00005230| 63 68 43 72 65 61 74 65 | 44 69 72 65 63 74 6f 72 |chCreate|Director|
|00005240| 79 28 29 20 2d 2d 0d 20 | 2a 09 54 65 6c 6c 20 46 |y() --. |*.Tell F|
|00005250| 65 74 63 68 20 74 6f 20 | 63 72 65 61 74 65 20 61 |etch to |create a|
|00005260| 20 64 69 72 65 63 74 6f | 72 79 20 28 69 6e 20 74 | directo|ry (in t|
|00005270| 68 65 20 66 72 6f 6e 74 | 6d 6f 73 74 20 74 72 61 |he front|most tra|
|00005280| 6e 73 66 65 72 20 77 69 | 6e 64 6f 77 29 2e 0d 20 |nsfer wi|ndow).. |
|00005290| 2a 2f 0d 4f 53 45 72 72 | 20 46 65 74 63 68 43 72 |*/.OSErr| FetchCr|
|000052a0| 65 61 74 65 44 69 72 65 | 63 74 6f 72 79 28 63 68 |eateDire|ctory(ch|
|000052b0| 61 72 20 2a 64 69 72 6e | 61 6d 65 2c 20 41 45 49 |ar *dirn|ame, AEI|
|000052c0| 64 6c 65 55 50 50 20 69 | 64 6c 65 55 50 50 29 0d |dleUPP i|dleUPP).|
|000052d0| 7b 0d 09 41 45 44 65 73 | 63 09 09 6e 75 6c 6c 44 |{..AEDes|c..nullD|
|000052e0| 65 73 63 3b 0d 09 41 45 | 44 65 73 63 09 09 61 65 |esc;..AE|Desc..ae|
|000052f0| 72 44 65 73 63 3b 0d 09 | 41 45 44 65 73 63 09 09 |rDesc;..|AEDesc..|
|00005300| 69 6e 73 65 72 74 4c 6f | 63 44 65 73 63 3b 0d 09 |insertLo|cDesc;..|
|00005310| 41 45 44 65 73 63 09 09 | 70 72 6f 70 44 65 73 63 |AEDesc..|propDesc|
|00005320| 3b 0d 09 44 65 73 63 54 | 79 70 65 09 70 6f 73 69 |;..DescT|ype.posi|
|00005330| 74 69 6f 6e 43 6f 64 65 | 3b 0d 09 4f 53 45 72 72 |tionCode|;..OSErr|
|00005340| 09 09 6f 73 73 74 61 74 | 3b 0d 0d 09 49 6e 69 74 |..osstat|;...Init|
|00005350| 44 65 73 63 28 26 6e 75 | 6c 6c 44 65 73 63 29 3b |Desc(&nu|llDesc);|
|00005360| 0d 09 49 6e 69 74 44 65 | 73 63 28 26 61 65 72 44 |..InitDe|sc(&aerD|
|00005370| 65 73 63 29 3b 0d 09 49 | 6e 69 74 44 65 73 63 28 |esc);..I|nitDesc(|
|00005380| 26 69 6e 73 65 72 74 4c | 6f 63 44 65 73 63 29 3b |&insertL|ocDesc);|
|00005390| 0d 09 49 6e 69 74 44 65 | 73 63 28 26 70 72 6f 70 |..InitDe|sc(&prop|
|000053a0| 44 65 73 63 29 3b 0d 09 | 6f 73 73 74 61 74 20 3d |Desc);..|osstat =|
|000053b0| 20 6e 6f 45 72 72 3b 0d | 09 0d 09 2f 2a 20 66 69 | noErr;.|.../* fi|
|000053c0| 72 73 74 20 62 75 69 6c | 64 20 69 6e 73 65 72 74 |rst buil|d insert|
|000053d0| 69 6f 6e 20 6c 6f 63 61 | 74 69 6f 6e 20 28 22 42 |ion loca|tion ("B|
|000053e0| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 6e 75 6c 6c |eginning| of null|
|000053f0| 20 63 6f 6e 74 61 69 6e | 65 72 22 29 20 2a 2f 0d | contain|er") */.|
|00005400| 09 2f 2a 20 4e 4f 54 45 | 3a 20 6e 75 6c 6c 20 63 |./* NOTE|: null c|
|00005410| 6f 6e 74 61 69 6e 65 72 | 20 65 71 75 61 6c 73 20 |ontainer| equals |
|00005420| 74 68 65 20 66 72 6f 6e | 74 20 77 69 6e 64 6f 77 |the fron|t window|
|00005430| 20 69 6e 20 74 68 69 73 | 20 63 61 73 65 20 2a 2f | in this| case */|
|00005440| 0d 09 6f 73 73 74 61 74 | 20 3d 20 41 45 43 72 65 |..osstat| = AECre|
|00005450| 61 74 65 4c 69 73 74 28 | 6e 69 6c 2c 20 30 2c 20 |ateList(|nil, 0, |
|00005460| 74 72 75 65 2c 20 26 61 | 65 72 44 65 73 63 29 3b |true, &a|erDesc);|
|00005470| 0d 09 69 66 20 28 6f 73 | 73 74 61 74 20 21 3d 20 |..if (os|stat != |
|00005480| 6e 6f 45 72 72 29 0d 09 | 09 67 6f 74 6f 20 65 78 |noErr)..|.goto ex|
|00005490| 69 74 3b 0d 09 09 0d 09 | 2f 2a 20 61 64 64 20 6f |it;.....|/* add o|
|000054a0| 62 6a 65 63 74 2d 69 6e | 2d 72 65 6c 61 74 69 6f |bject-in|-relatio|
|000054b0| 6e 2d 74 6f 20 66 69 65 | 6c 64 20 2a 2f 0d 09 6f |n-to fie|ld */..o|
|000054c0| 73 73 74 61 74 20 3d 20 | 41 45 50 75 74 4b 65 79 |sstat = |AEPutKey|
|000054d0| 44 65 73 63 28 26 61 65 | 72 44 65 73 63 2c 20 6b |Desc(&ae|rDesc, k|
|000054e0| 65 79 41 45 4f 62 6a 65 | 63 74 2c 20 26 6e 75 6c |eyAEObje|ct, &nul|
|000054f0| 6c 44 65 73 63 29 3b 0d | 09 69 66 20 28 6f 73 73 |lDesc);.|.if (oss|
|00005500| 74 61 74 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |tat != n|oErr)...|
|00005510| 67 6f 74 6f 20 65 78 69 | 74 3b 0d 09 09 0d 09 2f |goto exi|t;...../|
|00005520| 2a 20 61 64 64 20 70 6f | 73 69 74 69 6f 6e 69 6e |* add po|sitionin|
|00005530| 67 20 66 69 65 6c 64 20 | 2a 2f 0d 09 70 6f 73 69 |g field |*/..posi|
|00005540| 74 69 6f 6e 43 6f 64 65 | 20 3d 20 6b 41 45 42 65 |tionCode| = kAEBe|
|00005550| 67 69 6e 6e 69 6e 67 3b | 0d 09 6f 73 73 74 61 74 |ginning;|..osstat|
|00005560| 20 3d 20 41 45 50 75 74 | 4b 65 79 50 74 72 28 26 | = AEPut|KeyPtr(&|
|00005570| 61 65 72 44 65 73 63 2c | 20 6b 65 79 41 45 50 6f |aerDesc,| keyAEPo|
|00005580| 73 69 74 69 6f 6e 2c 20 | 74 79 70 65 45 6e 75 6d |sition, |typeEnum|
|00005590| 65 72 61 74 65 64 2c 20 | 26 70 6f 73 69 74 69 6f |erated, |&positio|
|000055a0| 6e 43 6f 64 65 2c 0d 09 | 09 09 09 73 69 7a 65 6f |nCode,..|...sizeo|
|000055b0| 66 28 70 6f 73 69 74 69 | 6f 6e 43 6f 64 65 29 29 |f(positi|onCode))|
|000055c0| 3b 0d 09 69 66 20 28 6f | 73 73 74 61 74 20 21 3d |;..if (o|sstat !=|
|000055d0| 20 6e 6f 45 72 72 29 0d | 09 09 67 6f 74 6f 20 65 | noErr).|..goto e|
|000055e0| 78 69 74 3b 0d 09 09 0d | 09 2f 2a 20 63 6f 65 72 |xit;....|./* coer|
|000055f0| 63 65 20 74 6f 20 74 79 | 70 65 49 6e 73 65 72 74 |ce to ty|peInsert|
|00005600| 69 6f 6e 4c 6f 63 20 2a | 2f 0d 09 6f 73 73 74 61 |ionLoc *|/..ossta|
|00005610| 74 20 3d 20 41 45 43 6f | 65 72 63 65 44 65 73 63 |t = AECo|erceDesc|
|00005620| 28 26 61 65 72 44 65 73 | 63 2c 20 74 79 70 65 49 |(&aerDes|c, typeI|
|00005630| 6e 73 65 72 74 69 6f 6e | 4c 6f 63 2c 20 26 69 6e |nsertion|Loc, &in|
|00005640| 73 65 72 74 4c 6f 63 44 | 65 73 63 29 3b 0d 09 69 |sertLocD|esc);..i|
|00005650| 66 20 28 6f 73 73 74 61 | 74 20 21 3d 20 6e 6f 45 |f (ossta|t != noE|
|00005660| 72 72 29 0d 09 09 67 6f | 74 6f 20 65 78 69 74 3b |rr)...go|to exit;|
|00005670| 0d 09 09 0d 09 2f 2a 20 | 62 75 69 6c 64 20 69 6e |...../* |build in|
|00005680| 69 74 69 61 6c 20 70 72 | 6f 70 65 72 74 79 20 64 |itial pr|operty d|
|00005690| 61 74 61 20 2a 2f 0d 09 | 6f 73 73 74 61 74 20 3d |ata */..|osstat =|
|000056a0| 20 41 45 43 72 65 61 74 | 65 4c 69 73 74 28 6e 69 | AECreat|eList(ni|
|000056b0| 6c 2c 20 30 2c 20 74 72 | 75 65 2c 20 26 70 72 6f |l, 0, tr|ue, &pro|
|000056c0| 70 44 65 73 63 29 3b 0d | 09 69 66 20 28 6f 73 73 |pDesc);.|.if (oss|
|000056d0| 74 61 74 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |tat != n|oErr)...|
|000056e0| 67 6f 74 6f 20 65 78 69 | 74 3b 0d 09 09 09 0d 09 |goto exi|t;......|
|000056f0| 2f 2a 20 61 64 64 20 64 | 69 72 20 6e 61 6d 65 20 |/* add d|ir name |
|00005700| 28 63 61 6e 27 74 20 63 | 72 65 61 74 65 20 64 69 |(can't c|reate di|
|00005710| 72 20 77 69 74 68 6f 75 | 74 20 69 74 29 20 2a 2f |r withou|t it) */|
|00005720| 0d 09 6f 73 73 74 61 74 | 20 3d 20 41 45 50 75 74 |..osstat| = AEPut|
|00005730| 4b 65 79 50 74 72 28 26 | 70 72 6f 70 44 65 73 63 |KeyPtr(&|propDesc|
|00005740| 2c 20 70 4e 61 6d 65 2c | 20 74 79 70 65 43 68 61 |, pName,| typeCha|
|00005750| 72 2c 20 64 69 72 6e 61 | 6d 65 2c 20 73 74 72 6c |r, dirna|me, strl|
|00005760| 65 6e 28 64 69 72 6e 61 | 6d 65 29 29 3b 0d 09 69 |en(dirna|me));..i|
|00005770| 66 20 28 6f 73 73 74 61 | 74 20 21 3d 20 6e 6f 45 |f (ossta|t != noE|
|00005780| 72 72 29 0d 09 09 67 6f | 74 6f 20 65 78 69 74 3b |rr)...go|to exit;|
|00005790| 0d 0d 09 2f 2a 20 6e 6f | 77 20 73 65 6e 64 20 74 |.../* no|w send t|
|000057a0| 68 65 20 65 76 65 6e 74 | 20 2a 2f 0d 09 6f 73 73 |he event| */..oss|
|000057b0| 74 61 74 20 3d 20 53 65 | 6e 64 43 72 65 61 74 65 |tat = Se|ndCreate|
|000057c0| 41 70 70 6c 65 45 76 65 | 6e 74 28 46 45 54 43 48 |AppleEve|nt(FETCH|
|000057d0| 5f 41 50 50 5f 53 49 47 | 4e 41 54 55 52 45 2c 20 |_APP_SIG|NATURE, |
|000057e0| 63 48 6f 73 74 44 69 72 | 65 63 74 6f 72 79 2c 20 |cHostDir|ectory, |
|000057f0| 0d 09 09 09 09 09 09 26 | 69 6e 73 65 72 74 4c 6f |.......&|insertLo|
|00005800| 63 44 65 73 63 2c 20 6e | 69 6c 2c 20 26 70 72 6f |cDesc, n|il, &pro|
|00005810| 70 44 65 73 63 2c 20 6e | 69 6c 2c 20 69 64 6c 65 |pDesc, n|il, idle|
|00005820| 55 50 50 29 3b 0d 09 0d | 65 78 69 74 3a 09 2f 2a |UPP);...|exit:./*|
|00005830| 20 63 6c 65 61 6e 20 75 | 70 20 2a 2f 0d 09 44 69 | clean u|p */..Di|
|00005840| 73 70 6f 73 65 44 65 73 | 63 28 26 6e 75 6c 6c 44 |sposeDes|c(&nullD|
|00005850| 65 73 63 29 3b 0d 09 44 | 69 73 70 6f 73 65 44 65 |esc);..D|isposeDe|
|00005860| 73 63 28 26 61 65 72 44 | 65 73 63 29 3b 0d 09 44 |sc(&aerD|esc);..D|
|00005870| 69 73 70 6f 73 65 44 65 | 73 63 28 26 69 6e 73 65 |isposeDe|sc(&inse|
|00005880| 72 74 4c 6f 63 44 65 73 | 63 29 3b 0d 09 44 69 73 |rtLocDes|c);..Dis|
|00005890| 70 6f 73 65 44 65 73 63 | 28 26 70 72 6f 70 44 65 |poseDesc|(&propDe|
|000058a0| 73 63 29 3b 0d 09 72 65 | 74 75 72 6e 20 6f 73 73 |sc);..re|turn oss|
|000058b0| 74 61 74 3b 0d 7d 20 2f | 2f 20 46 65 74 63 68 43 |tat;.} /|/ FetchC|
|000058c0| 72 65 61 74 65 44 69 72 | 65 63 74 6f 72 79 28 29 |reateDir|ectory()|
|000058d0| 0d 0d 2f 2a 0d 20 2a 20 | 46 65 74 63 68 53 65 6e |../*. * |FetchSen|
|000058e0| 64 43 6f 6d 6d 61 6e 64 | 28 29 20 2d 2d 0d 20 2a |dCommand|() --. *|
|000058f0| 09 54 65 6c 6c 20 46 65 | 74 63 68 20 74 6f 20 73 |.Tell Fe|tch to s|
|00005900| 65 6e 64 20 61 20 63 75 | 73 74 6f 6d 20 63 6f 6d |end a cu|stom com|
|00005910| 6d 61 6e 64 20 28 6f 72 | 20 43 52 2d 64 65 6c 69 |mand (or| CR-deli|
|00005920| 6d 69 74 65 64 20 6c 69 | 73 74 20 6f 66 20 63 6f |mited li|st of co|
|00005930| 6d 6d 61 6e 64 73 29 0d | 20 2a 09 74 6f 20 61 20 |mmands).| *.to a |
|00005940| 55 52 4c 20 28 69 2e 65 | 2e 20 63 6f 6e 6e 65 63 |URL (i.e|. connec|
|00005950| 74 20 74 6f 20 74 68 65 | 20 55 52 4c 2c 20 74 68 |t to the| URL, th|
|00005960| 65 6e 20 73 65 6e 64 20 | 74 68 65 20 63 6f 6d 6d |en send |the comm|
|00005970| 61 6e 64 73 29 2e 0d 20 | 2a 2f 0d 4f 53 45 72 72 |ands).. |*/.OSErr|
|00005980| 20 46 65 74 63 68 53 65 | 6e 64 43 6f 6d 6d 61 6e | FetchSe|ndComman|
|00005990| 64 28 63 68 61 72 20 2a | 63 6d 64 2c 20 63 68 61 |d(char *|cmd, cha|
|000059a0| 72 20 2a 75 72 6c 2c 20 | 41 45 49 64 6c 65 55 50 |r *url, |AEIdleUP|
|000059b0| 50 20 69 64 6c 65 55 50 | 50 29 0d 7b 0d 09 41 45 |P idleUP|P).{..AE|
|000059c0| 44 65 73 63 09 75 72 6c | 44 65 73 63 3b 0d 09 41 |Desc.url|Desc;..A|
|000059d0| 45 44 65 73 63 09 63 6d | 64 44 65 73 63 3b 0d 09 |EDesc.cm|dDesc;..|
|000059e0| 4f 53 45 72 72 09 6f 73 | 73 74 61 74 20 3d 20 6e |OSErr.os|stat = n|
|000059f0| 6f 45 72 72 3b 0d 09 0d | 09 49 6e 69 74 44 65 73 |oErr;...|.InitDes|
|00005a00| 63 28 26 75 72 6c 44 65 | 73 63 29 3b 0d 09 49 6e |c(&urlDe|sc);..In|
|00005a10| 69 74 44 65 73 63 28 26 | 63 6d 64 44 65 73 63 29 |itDesc(&|cmdDesc)|
|00005a20| 3b 0d 09 0d 09 6f 73 73 | 74 61 74 20 3d 20 43 72 |;....oss|tat = Cr|
|00005a30| 65 61 74 65 46 6f 72 6d | 4e 61 6d 65 4f 53 70 65 |eateForm|NameOSpe|
|00005a40| 63 28 75 72 6c 2c 20 63 | 55 52 4c 2c 20 6e 69 6c |c(url, c|URL, nil|
|00005a50| 2c 20 26 75 72 6c 44 65 | 73 63 29 3b 0d 09 69 66 |, &urlDe|sc);..if|
|00005a60| 20 28 6f 73 73 74 61 74 | 20 21 3d 20 6e 6f 45 72 | (osstat| != noEr|
|00005a70| 72 29 0d 09 09 67 6f 74 | 6f 20 65 78 69 74 3b 0d |r)...got|o exit;.|
|00005a80| 09 43 53 74 72 69 6e 67 | 54 6f 44 65 73 63 28 63 |.CString|ToDesc(c|
|00005a90| 6d 64 2c 20 74 79 70 65 | 43 68 61 72 2c 20 26 63 |md, type|Char, &c|
|00005aa0| 6d 64 44 65 73 63 29 3b | 0d 09 0d 09 6f 73 73 74 |mdDesc);|....osst|
|00005ab0| 61 74 20 3d 20 53 65 6e | 64 44 69 72 65 63 74 41 |at = Sen|dDirectA|
|00005ac0| 70 70 6c 65 45 76 65 6e | 74 57 69 74 68 41 72 67 |ppleEven|tWithArg|
|00005ad0| 28 46 45 54 43 48 5f 41 | 50 50 5f 53 49 47 4e 41 |(FETCH_A|PP_SIGNA|
|00005ae0| 54 55 52 45 2c 20 6b 41 | 45 46 65 74 63 68 53 75 |TURE, kA|EFetchSu|
|00005af0| 69 74 65 2c 20 6b 41 45 | 53 65 6e 64 46 54 50 43 |ite, kAE|SendFTPC|
|00005b00| 6f 6d 6d 61 6e 64 45 76 | 65 6e 74 2c 20 0d 09 09 |ommandEv|ent, ...|
|00005b10| 09 09 09 09 09 26 75 72 | 6c 44 65 73 63 2c 0d 09 |.....&ur|lDesc,..|
|00005b20| 09 09 09 09 09 09 6b 41 | 45 46 65 74 63 68 53 65 |......kA|EFetchSe|
|00005b30| 6e 64 46 54 50 43 6f 6d | 6d 61 6e 64 73 50 61 72 |ndFTPCom|mandsPar|
|00005b40| 61 6d 2c 20 26 63 6d 64 | 44 65 73 63 2c 0d 09 09 |am, &cmd|Desc,...|
|00005b50| 09 09 09 09 09 6e 69 6c | 2c 20 69 64 6c 65 55 50 |.....nil|, idleUP|
|00005b60| 50 29 3b 0d 65 78 69 74 | 3a 0d 09 44 69 73 70 6f |P);.exit|:..Dispo|
|00005b70| 73 65 44 65 73 63 28 26 | 75 72 6c 44 65 73 63 29 |seDesc(&|urlDesc)|
|00005b80| 3b 0d 09 44 69 73 70 6f | 73 65 44 65 73 63 28 26 |;..Dispo|seDesc(&|
|00005b90| 63 6d 64 44 65 73 63 29 | 3b 0d 09 72 65 74 75 72 |cmdDesc)|;..retur|
|00005ba0| 6e 20 6f 73 73 74 61 74 | 3b 0d 7d 20 2f 2f 20 46 |n osstat|;.} // F|
|00005bb0| 65 74 63 68 53 65 6e 64 | 43 6f 6d 6d 61 6e 64 28 |etchSend|Command(|
|00005bc0| 29 0d 0d 2f 2a 0d 20 2a | 20 46 65 74 63 68 47 65 |)../*. *| FetchGe|
|00005bd0| 74 50 72 65 66 65 72 65 | 6e 63 65 28 29 20 2d 2d |tPrefere|nce() --|
|00005be0| 0d 20 2a 09 47 65 74 20 | 61 6e 20 61 72 62 69 74 |. *.Get |an arbit|
|00005bf0| 72 61 72 79 20 46 65 74 | 63 68 20 70 72 65 66 65 |rary Fet|ch prefe|
|00005c00| 72 65 6e 63 65 2e 0d 20 | 2a 2f 0d 4f 53 45 72 72 |rence.. |*/.OSErr|
|00005c10| 20 46 65 74 63 68 47 65 | 74 50 72 65 66 65 72 65 | FetchGe|tPrefere|
|00005c20| 6e 63 65 28 44 65 73 63 | 54 79 70 65 20 70 72 6f |nce(Desc|Type pro|
|00005c30| 70 43 6f 64 65 2c 20 41 | 45 44 65 73 63 20 2a 76 |pCode, A|EDesc *v|
|00005c40| 61 6c 75 65 44 65 73 63 | 2c 20 41 45 49 64 6c 65 |alueDesc|, AEIdle|
|00005c50| 55 50 50 20 69 64 6c 65 | 55 50 50 29 0d 7b 0d 09 |UPP idle|UPP).{..|
|00005c60| 41 70 70 6c 65 45 76 65 | 6e 74 09 61 65 72 65 70 |AppleEve|nt.aerep|
|00005c70| 6c 79 3b 0d 09 41 45 44 | 65 73 63 09 09 6e 75 6c |ly;..AED|esc..nul|
|00005c80| 6c 44 65 73 63 3b 0d 09 | 41 45 44 65 73 63 09 09 |lDesc;..|AEDesc..|
|00005c90| 70 72 6f 70 44 65 73 63 | 3b 0d 09 4f 53 45 72 72 |propDesc|;..OSErr|
|00005ca0| 09 09 6f 73 73 74 61 74 | 20 3d 20 6e 6f 45 72 72 |..osstat| = noErr|
|00005cb0| 3b 0d 09 0d 09 49 6e 69 | 74 44 65 73 63 28 26 61 |;....Ini|tDesc(&a|
|00005cc0| 65 72 65 70 6c 79 29 3b | 0d 09 49 6e 69 74 44 65 |ereply);|..InitDe|
|00005cd0| 73 63 28 26 6e 75 6c 6c | 44 65 73 63 29 3b 0d 09 |sc(&null|Desc);..|
|00005ce0| 49 6e 69 74 44 65 73 63 | 28 26 70 72 6f 70 44 65 |InitDesc|(&propDe|
|00005cf0| 73 63 29 3b 0d 09 0d 09 | 2f 2a 20 63 72 65 61 74 |sc);....|/* creat|
|00005d00| 65 20 6f 73 70 65 63 20 | 66 6f 72 20 61 70 70 6c |e ospec |for appl|
|00005d10| 69 63 61 74 69 6f 6e 20 | 6f 62 6a 65 63 74 20 70 |ication |object p|
|00005d20| 72 6f 70 65 72 74 79 20 | 28 61 70 70 20 6f 62 6a |roperty |(app obj|
|00005d30| 65 63 74 20 3d 3d 20 6e | 75 6c 6c 29 20 2a 2f 0d |ect == n|ull) */.|
|00005d40| 09 6f 73 73 74 61 74 20 | 3d 20 43 72 65 61 74 65 |.osstat |= Create|
|00005d50| 50 72 6f 70 65 72 74 79 | 4f 53 70 65 63 28 70 72 |Property|OSpec(pr|
|00005d60| 6f 70 43 6f 64 65 2c 20 | 26 6e 75 6c 6c 44 65 73 |opCode, |&nullDes|
|00005d70| 63 2c 20 26 70 72 6f 70 | 44 65 73 63 29 3b 0d 09 |c, &prop|Desc);..|
|00005d80| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00005d90| 45 72 72 29 0d 09 09 67 | 6f 74 6f 20 65 78 69 74 |Err)...g|oto exit|
|00005da0| 3b 0d 09 09 0d 09 2f 2a | 20 73 65 6e 64 20 74 68 |;...../*| send th|
|00005db0| 65 20 65 76 65 6e 74 20 | 2a 2f 0d 09 6f 73 73 74 |e event |*/..osst|
|00005dc0| 61 74 20 3d 20 53 65 6e | 64 44 69 72 65 63 74 41 |at = Sen|dDirectA|
|00005dd0| 70 70 6c 65 45 76 65 6e | 74 28 46 45 54 43 48 5f |ppleEven|t(FETCH_|
|00005de0| 41 50 50 5f 53 49 47 4e | 41 54 55 52 45 2c 20 6b |APP_SIGN|ATURE, k|
|00005df0| 41 45 43 6f 72 65 53 75 | 69 74 65 2c 20 6b 41 45 |AECoreSu|ite, kAE|
|00005e00| 47 65 74 44 61 74 61 2c | 20 0d 09 09 09 09 09 09 |GetData,| .......|
|00005e10| 26 70 72 6f 70 44 65 73 | 63 2c 20 26 61 65 72 65 |&propDes|c, &aere|
|00005e20| 70 6c 79 2c 20 69 64 6c | 65 55 50 50 29 3b 0d 09 |ply, idl|eUPP);..|
|00005e30| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00005e40| 45 72 72 29 0d 09 09 67 | 6f 74 6f 20 65 78 69 74 |Err)...g|oto exit|
|00005e50| 3b 0d 09 09 0d 09 6f 73 | 73 74 61 74 20 3d 20 41 |;.....os|stat = A|
|00005e60| 45 47 65 74 50 61 72 61 | 6d 44 65 73 63 28 26 61 |EGetPara|mDesc(&a|
|00005e70| 65 72 65 70 6c 79 2c 20 | 6b 65 79 41 45 52 65 73 |ereply, |keyAERes|
|00005e80| 75 6c 74 2c 20 74 79 70 | 65 57 69 6c 64 43 61 72 |ult, typ|eWildCar|
|00005e90| 64 2c 20 76 61 6c 75 65 | 44 65 73 63 29 3b 0d 09 |d, value|Desc);..|
|00005ea0| 69 66 20 28 6f 73 73 74 | 61 74 20 21 3d 20 6e 6f |if (osst|at != no|
|00005eb0| 45 72 72 29 0d 09 09 67 | 6f 74 6f 20 65 78 69 74 |Err)...g|oto exit|
|00005ec0| 3b 0d 09 09 0d 65 78 69 | 74 3a 0d 09 44 69 73 70 |;....exi|t:..Disp|
|00005ed0| 6f 73 65 44 65 73 63 28 | 26 61 65 72 65 70 6c 79 |oseDesc(|&aereply|
|00005ee0| 29 3b 0d 09 44 69 73 70 | 6f 73 65 44 65 73 63 28 |);..Disp|oseDesc(|
|00005ef0| 26 6e 75 6c 6c 44 65 73 | 63 29 3b 0d 09 44 69 73 |&nullDes|c);..Dis|
|00005f00| 70 6f 73 65 44 65 73 63 | 28 26 70 72 6f 70 44 65 |poseDesc|(&propDe|
|00005f10| 73 63 29 3b 0d 09 72 65 | 74 75 72 6e 20 6f 73 73 |sc);..re|turn oss|
|00005f20| 74 61 74 3b 0d 7d 20 2f | 2f 20 46 65 74 63 68 47 |tat;.} /|/ FetchG|
|00005f30| 65 74 50 72 65 66 65 72 | 65 6e 63 65 28 29 0d 0d |etPrefer|ence()..|
|00005f40| 2f 2a 0d 20 2a 20 46 65 | 74 63 68 53 65 74 50 72 |/*. * Fe|tchSetPr|
|00005f50| 65 66 65 72 65 6e 63 65 | 28 29 20 2d 2d 0d 20 2a |eference|() --. *|
|00005f60| 09 53 65 74 20 61 6e 20 | 61 72 62 69 74 72 61 72 |.Set an |arbitrar|
|00005f70| 79 20 46 65 74 63 68 20 | 70 72 65 66 65 72 65 6e |y Fetch |preferen|
|00005f80| 63 65 2e 0d 20 2a 2f 0d | 4f 53 45 72 72 20 46 65 |ce.. */.|OSErr Fe|
|00005f90| 74 63 68 53 65 74 50 72 | 65 66 65 72 65 6e 63 65 |tchSetPr|eference|
|00005fa0| 28 44 65 73 63 54 79 70 | 65 20 70 72 6f 70 43 6f |(DescTyp|e propCo|
|00005fb0| 64 65 2c 20 41 45 44 65 | 73 63 20 2a 76 61 6c 75 |de, AEDe|sc *valu|
|00005fc0| 65 44 65 73 63 2c 20 41 | 45 49 64 6c 65 55 50 50 |eDesc, A|EIdleUPP|
|00005fd0| 20 69 64 6c 65 55 50 50 | 29 0d 7b 0d 09 41 45 44 | idleUPP|).{..AED|
|00005fe0| 65 73 63 09 09 6e 75 6c | 6c 44 65 73 63 3b 0d 09 |esc..nul|lDesc;..|
|00005ff0| 41 45 44 65 73 63 09 09 | 70 72 6f 70 44 65 73 63 |AEDesc..|propDesc|
|00006000| 3b 0d 09 4f 53 45 72 72 | 09 09 6f 73 73 74 61 74 |;..OSErr|..osstat|
|00006010| 20 3d 20 6e 6f 45 72 72 | 3b 0d 09 0d 09 49 6e 69 | = noErr|;....Ini|
|00006020| 74 44 65 73 63 28 26 6e | 75 6c 6c 44 65 73 63 29 |tDesc(&n|ullDesc)|
|00006030| 3b 0d 09 49 6e 69 74 44 | 65 73 63 28 26 70 72 6f |;..InitD|esc(&pro|
|00006040| 70 44 65 73 63 29 3b 0d | 09 0d 09 2f 2a 20 63 72 |pDesc);.|.../* cr|
|00006050| 65 61 74 65 20 6f 73 70 | 65 63 20 66 6f 72 20 61 |eate osp|ec for a|
|00006060| 70 70 6c 69 63 61 74 69 | 6f 6e 20 6f 62 6a 65 63 |pplicati|on objec|
|00006070| 74 20 70 72 6f 70 65 72 | 74 79 20 28 61 70 70 20 |t proper|ty (app |
|00006080| 6f 62 6a 65 63 74 20 3d | 3d 20 6e 75 6c 6c 29 20 |object =|= null) |
|00006090| 2a 2f 0d 09 6f 73 73 74 | 61 74 20 3d 20 43 72 65 |*/..osst|at = Cre|
|000060a0| 61 74 65 50 72 6f 70 65 | 72 74 79 4f 53 70 65 63 |atePrope|rtyOSpec|
|000060b0| 28 70 72 6f 70 43 6f 64 | 65 2c 20 26 6e 75 6c 6c |(propCod|e, &null|
|000060c0| 44 65 73 63 2c 20 26 70 | 72 6f 70 44 65 73 63 29 |Desc, &p|ropDesc)|
|000060d0| 3b 0d 09 69 66 20 28 6f | 73 73 74 61 74 20 21 3d |;..if (o|sstat !=|
|000060e0| 20 6e 6f 45 72 72 29 0d | 09 09 67 6f 74 6f 20 65 | noErr).|..goto e|
|000060f0| 78 69 74 3b 0d 09 09 0d | 09 2f 2a 20 73 65 6e 64 |xit;....|./* send|
|00006100| 20 74 68 65 20 65 76 65 | 6e 74 20 2a 2f 0d 09 6f | the eve|nt */..o|
|00006110| 73 73 74 61 74 20 3d 20 | 53 65 6e 64 44 69 72 65 |sstat = |SendDire|
|00006120| 63 74 41 70 70 6c 65 45 | 76 65 6e 74 57 69 74 68 |ctAppleE|ventWith|
|00006130| 41 72 67 28 46 45 54 43 | 48 5f 41 50 50 5f 53 49 |Arg(FETC|H_APP_SI|
|00006140| 47 4e 41 54 55 52 45 2c | 20 6b 41 45 43 6f 72 65 |GNATURE,| kAECore|
|00006150| 53 75 69 74 65 2c 20 6b | 41 45 53 65 74 44 61 74 |Suite, k|AESetDat|
|00006160| 61 2c 20 0d 09 09 09 09 | 09 09 26 70 72 6f 70 44 |a, .....|..&propD|
|00006170| 65 73 63 2c 20 6b 65 79 | 41 45 44 61 74 61 2c 20 |esc, key|AEData, |
|00006180| 76 61 6c 75 65 44 65 73 | 63 2c 20 6e 69 6c 2c 20 |valueDes|c, nil, |
|00006190| 69 64 6c 65 55 50 50 29 | 3b 0d 09 69 66 20 28 6f |idleUPP)|;..if (o|
|000061a0| 73 73 74 61 74 20 21 3d | 20 6e 6f 45 72 72 29 0d |sstat !=| noErr).|
|000061b0| 09 09 67 6f 74 6f 20 65 | 78 69 74 3b 0d 09 0d 65 |..goto e|xit;...e|
|000061c0| 78 69 74 3a 0d 09 44 69 | 73 70 6f 73 65 44 65 73 |xit:..Di|sposeDes|
|000061d0| 63 28 26 6e 75 6c 6c 44 | 65 73 63 29 3b 0d 09 44 |c(&nullD|esc);..D|
|000061e0| 69 73 70 6f 73 65 44 65 | 73 63 28 26 70 72 6f 70 |isposeDe|sc(&prop|
|000061f0| 44 65 73 63 29 3b 0d 09 | 72 65 74 75 72 6e 20 6f |Desc);..|return o|
|00006200| 73 73 74 61 74 3b 0d 7d | 20 2f 2f 20 46 65 74 63 |sstat;.}| // Fetc|
|00006210| 68 53 65 74 50 72 65 66 | 65 72 65 6e 63 65 28 29 |hSetPref|erence()|
|00006220| 0d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006280| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00006290| 64 2f 6b 69 6e 6c 6f 67 | 6f 2e 67 69 66 00 19 91 |d/kinlog|o.gif...|
|000062a0| 3d 32 68 74 74 70 3a 2f | 2f 77 76 69 2e 63 6f 6d |=2http:/|/wvi.com|
|000062b0| 0a 46 65 74 63 68 41 45 | 2e 63 70 68 02 00 02 00 |.FetchAE|.cph....|
|000062c0| 54 45 58 54 43 57 49 45 | 01 00 00 68 01 00 00 00 |TEXTCWIE|...h....|
|000062d0| 02 00 54 45 58 54 43 57 | 49 45 01 00 00 68 01 00 |..TEXTCW|IE...h..|
|000062e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062f0| 00 00 ae e4 4c b7 00 00 | 61 c4 00 00 01 9a 74 6f |....L...|a.....to|
|00006300| 6f 6c 62 61 72 2e 67 69 | 66 00 b0 f6 3f 32 68 74 |olbar.gi|f...?2ht|
|00006310| 74 70 3a 2f 2f 69 6e 74 | 65 72 61 63 74 69 76 65 |tp://int|eractive|
|00006320| 32 2e 77 73 6a 2e 63 6f | 6d 2f 65 64 69 74 69 6f |2.wsj.co|m/editio|
|00006330| 6e 2f 61 64 73 2f 74 65 | 61 73 65 72 73 2f 76 69 |n/ads/te|asers/vi|
|00006340| 73 69 6f 6e 65 65 72 5f | 70 61 70 65 72 69 6e 2e |sioneer_|paperin.|
|00006350| 67 69 66 00 ae b5 39 32 | 68 74 74 70 3a 2f 2f 69 |gif...92|http://i|
|00006360| 6d 61 67 65 73 2e 66 66 | 6c 79 2e 63 6f 6d 2f 69 |mages.ff|ly.com/i|
|00006370| 6d 61 67 65 73 2f 72 65 | 64 64 6f 74 2e 67 69 66 |mages/re|ddot.gif|
|00006380| 00 00 00 48 00 0a 43 6f | 75 72 69 65 72 00 00 00 |...H..Co|urier...|
|00006390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063a0| 00 00 00 00 00 00 00 03 | 00 08 00 40 00 04 03 53 |........|...@...S|
|000063b0| 02 63 00 40 00 04 03 53 | 02 63 ae e9 94 27 00 00 |.c.@...S|.c...'..|
|000063c0| 34 c5 00 00 34 c5 00 00 | 31 88 01 00 00 00 00 04 |4...4...|1.......|
|000063d0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|000063e0| 00 00 00 46 01 cb d7 b8 | 1e 1e 00 00 00 1c 00 46 |...F....|.......F|
|000063f0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.