home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 23 / develop issue 23 code / projectdrag 1.1b8.sea / ProjectDrag 1.1b8 / Sources / ProjectDrag Sources / SourceServer.c < prev    next >
MacBinary  |  1995-07-07  |  9.6 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Jul 7 17:23:22 1995, modified Fri Jul 7 17:23:22 1995, creator 'MPS ', type ASCII, 9122 bytes "SourceServer.c" , at 0x2422 428 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[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 53 6f 75 72 63 65 | 53 65 72 76 65 72 2e 63 |..Source|Server.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 23 a2 00 | 00 01 ac ac 23 56 4a ac |.....#..|....#VJ.|
|00000060| 23 56 4a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |#VJ.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 14 09 00 00 |........|........|
|00000080| 2f 2a 20 53 6f 75 72 63 | 65 53 65 72 76 65 72 2e |/* Sourc|eServer.|
|00000090| 63 3a 20 48 6f 77 20 74 | 6f 20 63 72 65 61 74 65 |c: How t|o create|
|000000a0| 20 61 6e 64 20 73 65 6e | 64 20 61 6e 20 41 70 70 | and sen|d an App|
|000000b0| 6c 65 45 76 65 6e 74 20 | 74 6f 20 53 6f 75 72 63 |leEvent |to Sourc|
|000000c0| 65 53 65 72 76 65 72 20 | 66 6f 72 20 50 72 6f 6a |eServer |for Proj|
|000000d0| 65 63 74 44 72 61 67 2e | 0d 20 2a 0d 20 2a 20 41 |ectDrag.|. *. * A|
|000000e0| 20 73 65 74 20 6f 66 20 | 61 70 70 6c 65 74 73 20 | set of |applets |
|000000f0| 66 6f 72 20 64 72 61 67 | 20 61 6e 64 20 64 72 6f |for drag| and dro|
|00000100| 70 20 73 6f 75 72 63 65 | 20 63 6f 6e 74 72 6f 6c |p source| control|
|00000110| 20 62 79 20 54 69 6d 20 | 4d 61 72 6f 6e 65 79 2e | by Tim |Maroney.|
|00000120| 0d 20 2a 20 53 65 65 20 | 64 65 76 65 6c 6f 70 2c |. * See |develop,|
|00000130| 20 69 73 73 75 65 20 32 | 33 20 66 6f 72 20 64 65 | issue 2|3 for de|
|00000140| 74 61 69 6c 73 2e 0d 20 | 2a 0d 20 2a 20 42 75 69 |tails.. |*. * Bui|
|00000150| 6c 74 20 6f 6e 20 44 72 | 6f 70 53 68 65 6c 6c 20 |lt on Dr|opShell |
|00000160| 62 79 20 4c 65 6f 6e 61 | 72 64 20 52 6f 73 65 6e |by Leona|rd Rosen|
|00000170| 74 68 6f 6c 2c 20 53 74 | 65 70 68 61 6e 20 53 6f |thol, St|ephan So|
|00000180| 6d 6f 67 79 69 2c 20 61 | 6e 64 20 4d 61 72 73 68 |mogyi, a|nd Marsh|
|00000190| 61 6c 6c 20 43 6c 6f 77 | 2c 0d 20 2a 20 61 6e 64 |all Clow|,. * and|
|000001a0| 20 75 73 69 6e 67 20 74 | 68 65 20 4d 6f 72 65 46 | using t|he MoreF|
|000001b0| 69 6c 65 73 20 75 74 69 | 6c 69 74 69 65 73 20 62 |iles uti|lities b|
|000001c0| 79 20 4a 69 6d 20 4c 75 | 74 68 65 72 2e 0d 20 2a |y Jim Lu|ther.. *|
|000001d0| 0d 20 2a 20 54 68 69 73 | 20 73 6f 66 74 77 61 72 |. * This| softwar|
|000001e0| 65 20 69 73 20 66 72 65 | 65 2c 20 62 75 74 20 64 |e is fre|e, but d|
|000001f0| 6f 6e 27 74 20 6d 6f 64 | 69 66 79 20 61 6e 64 20 |on't mod|ify and |
|00000200| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|00000210| 77 69 74 68 6f 75 74 0d | 20 2a 20 63 68 61 6e 67 |without.| * chang|
|00000220| 69 6e 67 20 74 68 65 20 | 73 74 61 74 75 73 20 77 |ing the |status w|
|00000230| 69 6e 64 6f 77 20 74 6f | 20 69 6e 64 69 63 61 74 |indow to| indicat|
|00000240| 65 20 79 6f 75 72 20 6e | 61 6d 65 20 61 6e 64 20 |e your n|ame and |
|00000250| 79 6f 75 72 20 63 68 61 | 6e 67 65 73 21 0d 20 2a |your cha|nges!. *|
|00000260| 2f 0d 20 0d 23 69 6e 63 | 6c 75 64 65 20 3c 45 72 |/. .#inc|lude <Er|
|00000270| 72 6f 72 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |rors.h>.|#include|
|00000280| 20 3c 46 69 6e 64 65 72 | 2e 68 3e 0d 23 69 6e 63 | <Finder|.h>.#inc|
|00000290| 6c 75 64 65 20 3c 53 74 | 72 69 6e 67 73 2e 68 3e |lude <St|rings.h>|
|000002a0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 72 69 6e |.#includ|e <strin|
|000002b0| 67 2e 68 3e 0d 0d 23 69 | 6e 63 6c 75 64 65 20 22 |g.h>..#i|nclude "|
|000002c0| 53 6f 75 72 63 65 53 65 | 72 76 65 72 2e 68 22 0d |SourceSe|rver.h".|
|000002d0| 23 69 6e 63 6c 75 64 65 | 20 22 4d 6f 72 65 46 69 |#include| "MoreFi|
|000002e0| 6c 65 73 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |les.h".#|include |
|000002f0| 22 4d 6f 72 65 46 69 6c | 65 73 45 78 74 72 61 73 |"MoreFil|esExtras|
|00000300| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 44 53 |.h".#inc|lude "DS|
|00000310| 55 74 69 6c 73 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |Utils.h"|.#includ|
|00000320| 65 20 22 53 69 67 6e 61 | 74 75 72 65 54 6f 41 70 |e "Signa|tureToAp|
|00000330| 70 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 50 |p.h".#in|clude "P|
|00000340| 72 6f 6a 65 63 74 41 6c | 69 61 73 2e 68 22 0d 23 |rojectAl|ias.h".#|
|00000350| 69 6e 63 6c 75 64 65 20 | 22 50 44 44 69 61 6c 6f |include |"PDDialo|
|00000360| 67 73 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |gs.h".#i|nclude "|
|00000370| 50 44 55 74 69 6c 69 74 | 69 65 73 2e 68 22 0d 23 |PDUtilit|ies.h".#|
|00000380| 69 6e 63 6c 75 64 65 20 | 22 54 61 73 6b 73 41 6e |include |"TasksAn|
|00000390| 64 45 72 72 6f 72 73 2e | 68 22 0d 0d 0d 23 64 65 |dErrors.|h"...#de|
|000003a0| 66 69 6e 65 20 6b 53 53 | 43 6f 6d 6d 61 6e 64 49 |fine kSS|CommandI|
|000003b0| 44 20 27 63 6d 6e 64 27 | 0d 0d 0d 0d 2f 2a 20 73 |D 'cmnd'|..../* s|
|000003c0| 65 6e 64 20 61 6e 20 41 | 70 70 6c 65 20 65 76 65 |end an A|pple eve|
|000003d0| 6e 74 20 74 6f 20 53 6f | 75 72 63 65 53 65 72 76 |nt to So|urceServ|
|000003e0| 65 72 2e 20 53 65 65 20 | 64 65 76 65 6c 6f 70 20 |er. See |develop |
|000003f0| 32 33 20 66 6f 72 20 64 | 65 74 61 69 6c 73 20 2a |23 for d|etails *|
|00000400| 2f 0d 0d 4f 53 45 72 72 | 20 53 6f 75 72 63 65 53 |/..OSErr| SourceS|
|00000410| 65 72 76 65 72 43 6f 6d | 6d 61 6e 64 28 41 45 44 |erverCom|mand(AED|
|00000420| 65 73 63 20 2a 63 6f 6d | 6d 61 6e 64 2c 20 43 53 |esc *com|mand, CS|
|00000430| 74 72 69 6e 67 48 61 6e | 64 6c 65 20 2a 6f 75 74 |tringHan|dle *out|
|00000440| 70 75 74 2c 20 43 53 74 | 72 69 6e 67 48 61 6e 64 |put, CSt|ringHand|
|00000450| 6c 65 20 2a 64 69 61 67 | 6e 6f 73 74 69 63 2c 0d |le *diag|nostic,.|
|00000460| 09 09 09 09 09 09 09 41 | 45 49 64 6c 65 55 50 50 |.......A|EIdleUPP|
|00000470| 20 69 64 6c 65 50 72 6f | 63 2c 20 41 45 46 69 6c | idlePro|c, AEFil|
|00000480| 74 65 72 55 50 50 20 66 | 69 6c 74 65 72 50 72 6f |terUPP f|ilterPro|
|00000490| 63 29 0d 7b 0d 09 41 70 | 70 6c 65 45 76 65 6e 74 |c).{..Ap|pleEvent|
|000004a0| 20 61 65 45 76 65 6e 74 | 2c 20 61 65 52 65 70 6c | aeEvent|, aeRepl|
|000004b0| 79 3b 0d 09 41 45 44 65 | 73 63 20 73 6f 75 72 63 |y;..AEDe|sc sourc|
|000004c0| 65 53 65 72 76 65 72 41 | 64 64 72 65 73 73 3b 0d |eServerA|ddress;.|
|000004d0| 09 50 72 6f 63 65 73 73 | 53 65 72 69 61 6c 4e 75 |.Process|SerialNu|
|000004e0| 6d 62 65 72 20 73 6f 75 | 72 63 65 53 65 72 76 65 |mber sou|rceServe|
|000004f0| 72 50 72 6f 63 65 73 73 | 3b 0d 09 46 53 53 70 65 |rProcess|;..FSSpe|
|00000500| 63 20 61 70 70 53 70 65 | 63 3b 20 2f 2a 20 53 69 |c appSpe|c; /* Si|
|00000510| 67 6e 61 74 75 72 65 54 | 6f 41 70 70 20 72 65 71 |gnatureT|oApp req|
|00000520| 75 69 72 65 73 20 74 68 | 69 73 2c 20 64 6f 63 75 |uires th|is, docu|
|00000530| 6d 65 6e 74 61 74 69 6f | 6e 20 74 6f 20 74 68 65 |mentatio|n to the|
|00000540| 20 63 6f 6e 74 72 61 72 | 79 2e 2e 2e 2e 20 2a 2f | contrar|y.... */|
|00000550| 0d 09 6c 6f 6e 67 20 74 | 68 65 4c 6f 6e 67 2c 20 |..long t|heLong, |
|00000560| 74 68 65 53 69 7a 65 3b | 0d 09 44 65 73 63 54 79 |theSize;|..DescTy|
|00000570| 70 65 20 74 68 65 54 79 | 70 65 3b 0d 09 41 45 44 |pe theTy|pe;..AED|
|00000580| 65 73 63 20 70 61 72 61 | 6d 44 65 73 63 3b 0d 09 |esc para|mDesc;..|
|00000590| 4f 53 45 72 72 20 65 72 | 72 3b 0d 0d 09 2f 2a 20 |OSErr er|r;.../* |
|000005a0| 64 65 66 61 75 6c 74 20 | 72 65 70 6c 69 65 73 20 |default |replies |
|000005b0| 2a 2f 0d 09 2a 6f 75 74 | 70 75 74 20 3d 20 4e 55 |*/..*out|put = NU|
|000005c0| 4c 4c 3b 0d 09 2a 64 69 | 61 67 6e 6f 73 74 69 63 |LL;..*di|agnostic|
|000005d0| 20 3d 20 4e 55 4c 4c 3b | 0d 09 0d 09 2f 2a 20 66 | = NULL;|..../* f|
|000005e0| 69 6e 64 20 74 68 65 20 | 53 6f 75 72 63 65 53 65 |ind the |SourceSe|
|000005f0| 72 76 65 72 20 2a 2f 0d | 09 54 61 73 6b 53 74 61 |rver */.|.TaskSta|
|00000600| 72 74 28 6b 50 72 6f 6a | 65 63 74 44 72 61 67 53 |rt(kProj|ectDragS|
|00000610| 74 72 69 6e 67 73 2c 20 | 6b 46 69 6e 64 69 6e 67 |trings, |kFinding|
|00000620| 53 6f 75 72 63 65 53 65 | 72 76 65 72 2c 20 4e 55 |SourceSe|rver, NU|
|00000630| 4c 4c 2c 20 4e 55 4c 4c | 2c 20 4e 55 4c 4c 2c 20 |LL, NULL|, NULL, |
|00000640| 4e 55 4c 4c 29 3b 0d 09 | 65 72 72 20 3d 20 53 69 |NULL);..|err = Si|
|00000650| 67 6e 61 74 75 72 65 54 | 6f 41 70 70 28 6b 53 6f |gnatureT|oApp(kSo|
|00000660| 75 72 63 65 53 65 72 76 | 65 72 43 72 65 61 74 6f |urceServ|erCreato|
|00000670| 72 2c 20 4e 55 4c 4c 2c | 20 26 73 6f 75 72 63 65 |r, NULL,| &source|
|00000680| 53 65 72 76 65 72 50 72 | 6f 63 65 73 73 2c 20 26 |ServerPr|ocess, &|
|00000690| 61 70 70 53 70 65 63 2c | 20 4e 55 4c 4c 2c 0d 09 |appSpec,| NULL,..|
|000006a0| 09 09 09 09 09 20 20 53 | 69 67 32 41 70 70 5f 4c |..... S|ig2App_L|
|000006b0| 61 75 6e 63 68 41 70 70 | 6c 69 63 61 74 69 6f 6e |aunchApp|lication|
|000006c0| 2c 20 6c 61 75 6e 63 68 | 43 6f 6e 74 69 6e 75 65 |, launch|Continue|
|000006d0| 20 2b 20 6c 61 75 6e 63 | 68 44 6f 6e 74 53 77 69 | + launc|hDontSwi|
|000006e0| 74 63 68 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |tch);..i|f (err !|
|000006f0| 3d 20 6e 6f 45 72 72 29 | 20 72 65 74 75 72 6e 20 |= noErr)| return |
|00000700| 65 72 72 3b 0d 09 65 72 | 72 20 3d 20 41 45 43 72 |err;..er|r = AECr|
|00000710| 65 61 74 65 44 65 73 63 | 28 74 79 70 65 50 72 6f |eateDesc|(typePro|
|00000720| 63 65 73 73 53 65 72 69 | 61 6c 4e 75 6d 62 65 72 |cessSeri|alNumber|
|00000730| 2c 20 28 50 74 72 29 20 | 26 73 6f 75 72 63 65 53 |, (Ptr) |&sourceS|
|00000740| 65 72 76 65 72 50 72 6f | 63 65 73 73 2c 20 73 69 |erverPro|cess, si|
|00000750| 7a 65 6f 66 28 50 72 6f | 63 65 73 73 53 65 72 69 |zeof(Pro|cessSeri|
|00000760| 61 6c 4e 75 6d 62 65 72 | 29 2c 0d 09 09 09 09 09 |alNumber|),......|
|00000770| 09 20 26 73 6f 75 72 63 | 65 53 65 72 76 65 72 41 |. &sourc|eServerA|
|00000780| 64 64 72 65 73 73 29 3b | 0d 09 69 66 20 28 65 72 |ddress);|..if (er|
|00000790| 72 20 21 3d 20 6e 6f 45 | 72 72 29 20 72 65 74 75 |r != noE|rr) retu|
|000007a0| 72 6e 20 65 72 72 3b 0d | 09 54 61 73 6b 44 6f 6e |rn err;.|.TaskDon|
|000007b0| 65 28 29 3b 0d 0d 09 2f | 2a 20 43 72 65 61 74 65 |e();.../|* Create|
|000007c0| 20 74 68 65 20 53 6f 75 | 72 63 65 53 65 72 76 65 | the Sou|rceServe|
|000007d0| 72 20 41 70 70 6c 65 20 | 45 76 65 6e 74 20 2a 2f |r Apple |Event */|
|000007e0| 0d 09 65 72 72 20 3d 20 | 41 45 43 72 65 61 74 65 |..err = |AECreate|
|000007f0| 41 70 70 6c 65 45 76 65 | 6e 74 28 6b 53 6f 75 72 |AppleEve|nt(kSour|
|00000800| 63 65 53 65 72 76 65 72 | 54 79 70 65 2c 20 6b 53 |ceServer|Type, kS|
|00000810| 53 43 6f 6d 6d 61 6e 64 | 49 44 2c 20 26 73 6f 75 |SCommand|ID, &sou|
|00000820| 72 63 65 53 65 72 76 65 | 72 41 64 64 72 65 73 73 |rceServe|rAddress|
|00000830| 2c 20 6b 41 75 74 6f 47 | 65 6e 65 72 61 74 65 52 |, kAutoG|enerateR|
|00000840| 65 74 75 72 6e 49 44 2c | 6b 41 6e 79 54 72 61 6e |eturnID,|kAnyTran|
|00000850| 73 61 63 74 69 6f 6e 49 | 44 2c 20 0d 09 09 09 09 |sactionI|D, .....|
|00000860| 09 09 09 20 20 20 26 61 | 65 45 76 65 6e 74 29 3b |... &a|eEvent);|
|00000870| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |..AEDisp|oseDesc(|
|00000880| 26 73 6f 75 72 63 65 53 | 65 72 76 65 72 41 64 64 |&sourceS|erverAdd|
|00000890| 72 65 73 73 29 3b 0d 09 | 69 66 20 28 65 72 72 20 |ress);..|if (err |
|000008a0| 21 3d 20 6e 6f 45 72 72 | 29 20 72 65 74 75 72 6e |!= noErr|) return|
|000008b0| 20 65 72 72 3b 0d 0d 09 | 2f 2a 20 61 64 64 20 74 | err;...|/* add t|
|000008c0| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 64 65 73 63 72 |he comma|nd descr|
|000008d0| 69 70 74 6f 72 20 74 6f | 20 74 68 65 20 65 76 65 |iptor to| the eve|
|000008e0| 6e 74 20 2a 2f 0d 09 65 | 72 72 20 3d 20 41 45 50 |nt */..e|rr = AEP|
|000008f0| 75 74 50 61 72 61 6d 44 | 65 73 63 28 26 61 65 45 |utParamD|esc(&aeE|
|00000900| 76 65 6e 74 2c 20 6b 65 | 79 44 69 72 65 63 74 4f |vent, ke|yDirectO|
|00000910| 62 6a 65 63 74 2c 20 63 | 6f 6d 6d 61 6e 64 29 3b |bject, c|ommand);|
|00000920| 0d 09 69 66 20 28 65 72 | 72 20 21 3d 20 6e 6f 45 |..if (er|r != noE|
|00000930| 72 72 29 20 7b 20 41 45 | 44 69 73 70 6f 73 65 44 |rr) { AE|DisposeD|
|00000940| 65 73 63 28 26 61 65 45 | 76 65 6e 74 29 3b 20 72 |esc(&aeE|vent); r|
|00000950| 65 74 75 72 6e 20 65 72 | 72 3b 20 7d 0d 09 0d 09 |eturn er|r; }....|
|00000960| 2f 2a 20 73 65 6e 64 20 | 74 68 65 20 61 70 70 6c |/* send |the appl|
|00000970| 65 20 65 76 65 6e 74 20 | 2a 2f 0d 09 65 72 72 20 |e event |*/..err |
|00000980| 3d 20 41 45 53 65 6e 64 | 28 26 61 65 45 76 65 6e |= AESend|(&aeEven|
|00000990| 74 2c 20 26 61 65 52 65 | 70 6c 79 2c 20 6b 41 45 |t, &aeRe|ply, kAE|
|000009a0| 57 61 69 74 52 65 70 6c | 79 20 2b 20 6b 41 45 4e |WaitRepl|y + kAEN|
|000009b0| 65 76 65 72 49 6e 74 65 | 72 61 63 74 2c 20 6b 41 |everInte|ract, kA|
|000009c0| 45 4e 6f 72 6d 61 6c 50 | 72 69 6f 72 69 74 79 2c |ENormalP|riority,|
|000009d0| 0d 09 09 09 09 20 6b 4e | 6f 54 69 6d 65 4f 75 74 |..... kN|oTimeOut|
|000009e0| 2c 20 69 64 6c 65 50 72 | 6f 63 2c 20 66 69 6c 74 |, idlePr|oc, filt|
|000009f0| 65 72 50 72 6f 63 29 3b | 0d 09 41 45 44 69 73 70 |erProc);|..AEDisp|
|00000a00| 6f 73 65 44 65 73 63 28 | 26 61 65 45 76 65 6e 74 |oseDesc(|&aeEvent|
|00000a10| 29 3b 0d 09 69 66 20 28 | 65 72 72 20 21 3d 20 6e |);..if (|err != n|
|00000a20| 6f 45 72 72 29 20 72 65 | 74 75 72 6e 20 65 72 72 |oErr) re|turn err|
|00000a30| 3b 0d 0d 09 2f 2a 20 63 | 68 65 63 6b 20 66 6f 72 |;.../* c|heck for|
|00000a40| 20 61 6e 20 65 72 72 6f | 72 20 72 65 74 75 72 6e | an erro|r return|
|00000a50| 20 2a 2f 0d 09 65 72 72 | 20 3d 20 41 45 47 65 74 | */..err| = AEGet|
|00000a60| 50 61 72 61 6d 50 74 72 | 28 26 61 65 52 65 70 6c |ParamPtr|(&aeRepl|
|00000a70| 79 2c 20 6b 65 79 45 72 | 72 6f 72 4e 75 6d 62 65 |y, keyEr|rorNumbe|
|00000a80| 72 2c 20 74 79 70 65 49 | 6e 74 65 67 65 72 2c 20 |r, typeI|nteger, |
|00000a90| 26 74 68 65 54 79 70 65 | 2c 20 26 74 68 65 4c 6f |&theType|, &theLo|
|00000aa0| 6e 67 2c 0d 09 09 09 09 | 09 09 73 69 7a 65 6f 66 |ng,.....|..sizeof|
|00000ab0| 28 6c 6f 6e 67 29 2c 20 | 26 74 68 65 53 69 7a 65 |(long), |&theSize|
|00000ac0| 29 3b 0d 09 69 66 20 28 | 65 72 72 20 21 3d 20 6e |);..if (|err != n|
|00000ad0| 6f 45 72 72 20 7c 7c 20 | 28 65 72 72 20 3d 20 74 |oErr || |(err = t|
|00000ae0| 68 65 4c 6f 6e 67 29 20 | 21 3d 20 6e 6f 45 72 72 |heLong) |!= noErr|
|00000af0| 29 0d 09 09 72 65 74 75 | 72 6e 20 65 72 72 3b 0d |)...retu|rn err;.|
|00000b00| 0d 09 2f 2a 20 67 65 74 | 20 74 68 65 20 63 6f 6d |../* get| the com|
|00000b10| 6d 61 6e 64 20 6f 75 74 | 70 75 74 20 2a 2f 0d 09 |mand out|put */..|
|00000b20| 65 72 72 20 3d 20 41 45 | 47 65 74 50 61 72 61 6d |err = AE|GetParam|
|00000b30| 44 65 73 63 20 28 26 61 | 65 52 65 70 6c 79 2c 20 |Desc (&a|eReply, |
|00000b40| 6b 65 79 44 69 72 65 63 | 74 4f 62 6a 65 63 74 2c |keyDirec|tObject,|
|00000b50| 20 74 79 70 65 43 68 61 | 72 2c 20 26 70 61 72 61 | typeCha|r, &para|
|00000b60| 6d 44 65 73 63 29 3b 0d | 09 69 66 20 28 65 72 72 |mDesc);.|.if (err|
|00000b70| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 09 09 2a 6f 75 | == noEr|r)...*ou|
|00000b80| 74 70 75 74 20 3d 20 28 | 43 53 74 72 69 6e 67 48 |tput = (|CStringH|
|00000b90| 61 6e 64 6c 65 29 70 61 | 72 61 6d 44 65 73 63 2e |andle)pa|ramDesc.|
|00000ba0| 64 61 74 61 48 61 6e 64 | 6c 65 3b 0d 09 0d 09 2f |dataHand|le;..../|
|00000bb0| 2a 20 67 65 74 20 74 68 | 65 20 64 69 61 67 6e 6f |* get th|e diagno|
|00000bc0| 73 74 69 63 20 6f 75 74 | 70 75 74 20 2a 2f 0d 09 |stic out|put */..|
|00000bd0| 65 72 72 20 3d 20 41 45 | 47 65 74 50 61 72 61 6d |err = AE|GetParam|
|00000be0| 44 65 73 63 20 28 26 61 | 65 52 65 70 6c 79 2c 20 |Desc (&a|eReply, |
|00000bf0| 27 64 69 61 67 27 2c 20 | 74 79 70 65 43 68 61 72 |'diag', |typeChar|
|00000c00| 2c 20 26 70 61 72 61 6d | 44 65 73 63 29 3b 0d 09 |, &param|Desc);..|
|00000c10| 69 66 20 28 65 72 72 20 | 3d 3d 20 6e 6f 45 72 72 |if (err |== noErr|
|00000c20| 29 0d 09 09 2a 64 69 61 | 67 6e 6f 73 74 69 63 20 |)...*dia|gnostic |
|00000c30| 3d 20 28 43 53 74 72 69 | 6e 67 48 61 6e 64 6c 65 |= (CStri|ngHandle|
|00000c40| 29 70 61 72 61 6d 44 65 | 73 63 2e 64 61 74 61 48 |)paramDe|sc.dataH|
|00000c50| 61 6e 64 6c 65 3b 0d 09 | 0d 09 2f 2a 20 67 65 74 |andle;..|../* get|
|00000c60| 20 74 68 65 20 4d 50 57 | 20 73 74 61 74 75 73 20 | the MPW| status |
|00000c70| 2d 2d 20 69 74 20 62 65 | 63 6f 6d 65 73 20 6f 75 |-- it be|comes ou|
|00000c80| 72 20 65 72 72 6f 72 20 | 72 65 74 75 72 6e 20 2a |r error |return *|
|00000c90| 2f 0d 09 65 72 72 20 3d | 20 41 45 47 65 74 50 61 |/..err =| AEGetPa|
|00000ca0| 72 61 6d 50 74 72 28 26 | 61 65 52 65 70 6c 79 2c |ramPtr(&|aeReply,|
|00000cb0| 20 27 73 74 61 74 27 2c | 20 74 79 70 65 49 6e 74 | 'stat',| typeInt|
|00000cc0| 65 67 65 72 2c 20 26 74 | 68 65 54 79 70 65 2c 20 |eger, &t|heType, |
|00000cd0| 26 74 68 65 4c 6f 6e 67 | 2c 0d 09 09 09 09 09 09 |&theLong|,.......|
|00000ce0| 73 69 7a 65 6f 66 28 6c | 6f 6e 67 29 2c 20 26 74 |sizeof(l|ong), &t|
|00000cf0| 68 65 53 69 7a 65 29 3b | 0d 09 69 66 20 28 65 72 |heSize);|..if (er|
|00000d00| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 65 72 |r == noE|rr)...er|
|00000d10| 72 20 3d 20 74 68 65 4c | 6f 6e 67 3b 0d 0d 09 41 |r = theL|ong;...A|
|00000d20| 45 44 69 73 70 6f 73 65 | 44 65 73 63 28 26 61 65 |EDispose|Desc(&ae|
|00000d30| 52 65 70 6c 79 29 3b 0d | 0d 09 72 65 74 75 72 6e |Reply);.|..return|
|00000d40| 20 65 72 72 3b 0d 7d 0d | 0d 0d 4f 53 45 72 72 20 | err;.}.|..OSErr |
|00000d50| 43 72 65 61 74 65 43 6f | 6d 6d 61 6e 64 28 41 45 |CreateCo|mmand(AE|
|00000d60| 44 65 73 63 20 2a 63 6f | 6d 6d 61 6e 64 2c 20 43 |Desc *co|mmand, C|
|00000d70| 53 74 72 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 54 65 |String c|ommandTe|
|00000d80| 78 74 29 0d 7b 0d 09 4f | 53 45 72 72 20 65 72 72 |xt).{..O|SErr err|
|00000d90| 20 3d 20 41 45 43 72 65 | 61 74 65 4c 69 73 74 28 | = AECre|ateList(|
|00000da0| 4e 55 4c 4c 2c 20 30 20 | 2c 20 66 61 6c 73 65 2c |NULL, 0 |, false,|
|00000db0| 20 63 6f 6d 6d 61 6e 64 | 29 3b 0d 09 69 66 20 28 | command|);..if (|
|00000dc0| 65 72 72 20 3d 3d 20 6e | 6f 45 72 72 29 0d 09 7b |err == n|oErr)..{|
|00000dd0| 0d 09 09 65 72 72 20 3d | 20 41 64 64 43 53 74 72 |...err =| AddCStr|
|00000de0| 69 6e 67 41 72 67 28 63 | 6f 6d 6d 61 6e 64 2c 20 |ingArg(c|ommand, |
|00000df0| 63 6f 6d 6d 61 6e 64 54 | 65 78 74 29 3b 0d 09 09 |commandT|ext);...|
|00000e00| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|00000e10| 29 20 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |) AEDisp|oseDesc(|
|00000e20| 63 6f 6d 6d 61 6e 64 29 | 3b 0d 09 7d 0d 09 69 66 |command)|;..}..if|
|00000e30| 20 28 65 72 72 20 21 3d | 20 6e 6f 45 72 72 29 0d | (err !=| noErr).|
|00000e40| 09 7b 0d 09 09 2f 2a 20 | 74 68 69 73 20 6d 61 6b |.{.../* |this mak|
|00000e50| 65 73 20 69 74 20 73 61 | 66 65 20 74 6f 20 64 69 |es it sa|fe to di|
|00000e60| 73 70 6f 73 65 20 74 68 | 65 20 64 65 73 63 72 69 |spose th|e descri|
|00000e70| 70 74 6f 72 20 2a 2f 0d | 09 09 63 6f 6d 6d 61 6e |ptor */.|..comman|
|00000e80| 64 2d 3e 64 65 73 63 72 | 69 70 74 6f 72 54 79 70 |d->descr|iptorTyp|
|00000e90| 65 20 3d 20 74 79 70 65 | 4e 75 6c 6c 3b 0d 09 09 |e = type|Null;...|
|00000ea0| 63 6f 6d 6d 61 6e 64 2d | 3e 64 61 74 61 48 61 6e |command-|>dataHan|
|00000eb0| 64 6c 65 20 3d 20 4e 55 | 4c 4c 3b 0d 09 7d 0d 09 |dle = NU|LL;..}..|
|00000ec0| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 7d 0d 0d 0d |return e|rr;.}...|
|00000ed0| 4f 53 45 72 72 20 41 64 | 64 43 6f 6d 6d 65 6e 74 |OSErr Ad|dComment|
|00000ee0| 41 72 67 28 41 45 44 65 | 73 63 20 2a 63 6f 6d 6d |Arg(AEDe|sc *comm|
|00000ef0| 61 6e 64 2c 20 53 74 72 | 69 6e 67 50 74 72 20 63 |and, Str|ingPtr c|
|00000f00| 6f 6d 6d 65 6e 74 29 0d | 7b 0d 09 4f 53 45 72 72 |omment).|{..OSErr|
|00000f10| 20 65 72 72 3b 0d 09 69 | 66 20 28 63 6f 6d 6d 65 | err;..i|f (comme|
|00000f20| 6e 74 5b 30 5d 20 3d 3d | 20 30 29 20 72 65 74 75 |nt[0] ==| 0) retu|
|00000f30| 72 6e 20 6e 6f 45 72 72 | 3b 0d 09 65 72 72 20 3d |rn noErr|;..err =|
|00000f40| 20 41 64 64 43 53 74 72 | 69 6e 67 41 72 67 28 63 | AddCStr|ingArg(c|
|00000f50| 6f 6d 6d 61 6e 64 2c 20 | 22 2d 63 73 22 29 3b 0d |ommand, |"-cs");.|
|00000f60| 09 69 66 20 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |.if (err| != noEr|
|00000f70| 72 29 20 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 09 |r) retur|n err;..|
|00000f80| 65 72 72 20 3d 20 41 64 | 64 50 53 74 72 69 6e 67 |err = Ad|dPString|
|00000f90| 41 72 67 28 63 6f 6d 6d | 61 6e 64 2c 20 63 6f 6d |Arg(comm|and, com|
|00000fa0| 6d 65 6e 74 29 3b 0d 09 | 72 65 74 75 72 6e 20 65 |ment);..|return e|
|00000fb0| 72 72 3b 0d 7d 0d 0d 0d | 4f 53 45 72 72 20 41 64 |rr;.}...|OSErr Ad|
|00000fc0| 64 44 69 72 41 72 67 28 | 41 45 44 65 73 63 20 2a |dDirArg(|AEDesc *|
|00000fd0| 63 6f 6d 6d 61 6e 64 2c | 20 73 68 6f 72 74 20 76 |command,| short v|
|00000fe0| 52 65 66 4e 75 6d 2c 20 | 6c 6f 6e 67 20 66 6f 6c |RefNum, |long fol|
|00000ff0| 64 65 72 49 44 29 0d 7b | 0d 09 46 53 53 70 65 63 |derID).{|..FSSpec|
|00001000| 20 64 69 72 53 70 65 63 | 3b 0d 09 4f 53 45 72 72 | dirSpec|;..OSErr|
|00001010| 20 65 72 72 20 3d 20 41 | 64 64 43 53 74 72 69 6e | err = A|ddCStrin|
|00001020| 67 41 72 67 28 63 6f 6d | 6d 61 6e 64 2c 20 22 2d |gArg(com|mand, "-|
|00001030| 64 22 29 3b 0d 09 69 66 | 20 28 65 72 72 20 21 3d |d");..if| (err !=|
|00001040| 20 6e 6f 45 72 72 29 20 | 72 65 74 75 72 6e 20 65 | noErr) |return e|
|00001050| 72 72 3b 0d 09 64 69 72 | 53 70 65 63 2e 76 52 65 |rr;..dir|Spec.vRe|
|00001060| 66 4e 75 6d 20 3d 20 76 | 52 65 66 4e 75 6d 3b 0d |fNum = v|RefNum;.|
|00001070| 09 64 69 72 53 70 65 63 | 2e 70 61 72 49 44 20 3d |.dirSpec|.parID =|
|00001080| 20 66 6f 6c 64 65 72 49 | 44 3b 0d 09 64 69 72 53 | folderI|D;..dirS|
|00001090| 70 65 63 2e 6e 61 6d 65 | 5b 30 5d 20 3d 20 30 3b |pec.name|[0] = 0;|
|000010a0| 0d 09 65 72 72 20 3d 20 | 41 64 64 46 69 6c 65 4e |..err = |AddFileN|
|000010b0| 61 6d 65 41 72 67 28 63 | 6f 6d 6d 61 6e 64 2c 20 |ameArg(c|ommand, |
|000010c0| 26 64 69 72 53 70 65 63 | 29 3b 0d 09 72 65 74 75 |&dirSpec|);..retu|
|000010d0| 72 6e 20 65 72 72 3b 0d | 7d 0d 0d 0d 4f 53 45 72 |rn err;.|}...OSEr|
|000010e0| 72 20 41 64 64 50 72 6f | 6a 65 63 74 41 72 67 28 |r AddPro|jectArg(|
|000010f0| 41 45 44 65 73 63 20 2a | 63 6f 6d 6d 61 6e 64 2c |AEDesc *|command,|
|00001100| 20 53 74 72 69 6e 67 50 | 74 72 20 70 72 6f 6a 65 | StringP|tr proje|
|00001110| 63 74 4e 61 6d 65 29 0d | 7b 0d 09 4f 53 45 72 72 |ctName).|{..OSErr|
|00001120| 20 65 72 72 20 3d 20 41 | 64 64 43 53 74 72 69 6e | err = A|ddCStrin|
|00001130| 67 41 72 67 28 63 6f 6d | 6d 61 6e 64 2c 20 22 2d |gArg(com|mand, "-|
|00001140| 70 72 6f 6a 65 63 74 22 | 29 3b 0d 09 69 66 20 28 |project"|);..if (|
|00001150| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 72 65 |err != n|oErr) re|
|00001160| 74 75 72 6e 20 65 72 72 | 3b 0d 09 65 72 72 20 3d |turn err|;..err =|
|00001170| 20 41 64 64 50 53 74 72 | 69 6e 67 41 72 67 28 63 | AddPStr|ingArg(c|
|00001180| 6f 6d 6d 61 6e 64 2c 20 | 70 72 6f 6a 65 63 74 4e |ommand, |projectN|
|00001190| 61 6d 65 29 3b 0d 09 72 | 65 74 75 72 6e 20 65 72 |ame);..r|eturn er|
|000011a0| 72 3b 0d 7d 0d 0d 0d 4f | 53 45 72 72 20 41 64 64 |r;.}...O|SErr Add|
|000011b0| 55 73 65 72 41 72 67 28 | 41 45 44 65 73 63 20 2a |UserArg(|AEDesc *|
|000011c0| 63 6f 6d 6d 61 6e 64 2c | 20 53 74 72 69 6e 67 50 |command,| StringP|
|000011d0| 74 72 20 75 73 65 72 4e | 61 6d 65 29 0d 7b 0d 09 |tr userN|ame).{..|
|000011e0| 4f 53 45 72 72 20 65 72 | 72 20 3d 20 41 64 64 43 |OSErr er|r = AddC|
|000011f0| 53 74 72 69 6e 67 41 72 | 67 28 63 6f 6d 6d 61 6e |StringAr|g(comman|
|00001200| 64 2c 20 22 2d 75 22 29 | 3b 0d 09 69 66 20 28 65 |d, "-u")|;..if (e|
|00001210| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 20 72 65 74 |rr != no|Err) ret|
|00001220| 75 72 6e 20 65 72 72 3b | 0d 09 65 72 72 20 3d 20 |urn err;|..err = |
|00001230| 41 64 64 50 53 74 72 69 | 6e 67 41 72 67 28 63 6f |AddPStri|ngArg(co|
|00001240| 6d 6d 61 6e 64 2c 20 75 | 73 65 72 4e 61 6d 65 29 |mmand, u|serName)|
|00001250| 3b 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 7d |;..retur|n err;.}|
|00001260| 0d 0d 0d 4f 53 45 72 72 | 20 41 64 64 46 69 6c 65 |...OSErr| AddFile|
|00001270| 4e 61 6d 65 41 72 67 28 | 41 45 44 65 73 63 20 2a |NameArg(|AEDesc *|
|00001280| 63 6f 6d 6d 61 6e 64 2c | 20 46 53 53 70 65 63 20 |command,| FSSpec |
|00001290| 2a 66 69 6c 65 29 0d 7b | 0d 09 53 74 72 32 35 35 |*file).{|..Str255|
|000012a0| 20 66 69 6c 65 4e 61 6d | 65 3b 0d 09 4f 53 45 72 | fileNam|e;..OSEr|
|000012b0| 72 20 65 72 72 20 3d 20 | 4d 61 6b 65 46 75 6c 6c |r err = |MakeFull|
|000012c0| 50 61 74 68 4e 61 6d 65 | 28 66 69 6c 65 2c 20 66 |PathName|(file, f|
|000012d0| 69 6c 65 4e 61 6d 65 29 | 3b 0d 09 69 66 20 28 65 |ileName)|;..if (e|
|000012e0| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 20 72 65 74 |rr != no|Err) ret|
|000012f0| 75 72 6e 20 65 72 72 3b | 0d 09 65 72 72 20 3d 20 |urn err;|..err = |
|00001300| 41 64 64 50 53 74 72 69 | 6e 67 41 72 67 28 63 6f |AddPStri|ngArg(co|
|00001310| 6d 6d 61 6e 64 2c 20 66 | 69 6c 65 4e 61 6d 65 29 |mmand, f|ileName)|
|00001320| 3b 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 7d |;..retur|n err;.}|
|00001330| 0d 0d 0d 4f 53 45 72 72 | 20 41 64 64 50 53 74 72 |...OSErr| AddPStr|
|00001340| 69 6e 67 41 72 67 28 41 | 45 44 65 73 63 20 2a 63 |ingArg(A|EDesc *c|
|00001350| 6f 6d 6d 61 6e 64 2c 20 | 53 74 72 69 6e 67 50 74 |ommand, |StringPt|
|00001360| 72 20 73 74 72 69 6e 67 | 29 0d 7b 0d 09 4f 53 45 |r string|).{..OSE|
|00001370| 72 72 20 65 72 72 3b 0d | 09 70 32 63 73 74 72 28 |rr err;.|.p2cstr(|
|00001380| 73 74 72 69 6e 67 29 3b | 0d 09 65 72 72 20 3d 20 |string);|..err = |
|00001390| 41 45 50 75 74 50 74 72 | 28 63 6f 6d 6d 61 6e 64 |AEPutPtr|(command|
|000013a0| 2c 20 30 2c 20 74 79 70 | 65 43 68 61 72 2c 20 73 |, 0, typ|eChar, s|
|000013b0| 74 72 69 6e 67 2c 20 73 | 74 72 6c 65 6e 28 73 74 |tring, s|trlen(st|
|000013c0| 72 69 6e 67 29 20 2b 20 | 31 29 3b 0d 09 63 32 70 |ring) + |1);..c2p|
|000013d0| 73 74 72 28 73 74 72 69 | 6e 67 29 3b 0d 09 72 65 |str(stri|ng);..re|
|000013e0| 74 75 72 6e 20 65 72 72 | 3b 0d 7d 0d 0d 0d 4f 53 |turn err|;.}...OS|
|000013f0| 45 72 72 20 41 64 64 43 | 53 74 72 69 6e 67 41 72 |Err AddC|StringAr|
|00001400| 67 28 41 45 44 65 73 63 | 20 2a 63 6f 6d 6d 61 6e |g(AEDesc| *comman|
|00001410| 64 2c 20 43 53 74 72 69 | 6e 67 20 73 74 72 69 6e |d, CStri|ng strin|
|00001420| 67 29 0d 7b 0d 09 4f 53 | 45 72 72 20 65 72 72 20 |g).{..OS|Err err |
|00001430| 3d 20 41 45 50 75 74 50 | 74 72 28 63 6f 6d 6d 61 |= AEPutP|tr(comma|
|00001440| 6e 64 2c 20 30 2c 20 74 | 79 70 65 43 68 61 72 2c |nd, 0, t|ypeChar,|
|00001450| 20 73 74 72 69 6e 67 2c | 20 73 74 72 6c 65 6e 28 | string,| strlen(|
|00001460| 73 74 72 69 6e 67 29 20 | 2b 20 31 29 3b 0d 09 72 |string) |+ 1);..r|
|00001470| 65 74 75 72 6e 20 65 72 | 72 3b 0d 7d 0d 0d 0d 2f |eturn er|r;.}.../|
|00001480| 2a 20 75 74 69 6c 69 74 | 79 20 72 6f 75 74 69 6e |* utilit|y routin|
|00001490| 65 73 20 77 69 74 68 20 | 74 61 73 6b 20 61 6e 64 |es with |task and|
|000014a0| 20 65 72 72 6f 72 20 6e | 6f 74 69 66 69 63 61 74 | error n|otificat|
|000014b0| 69 6f 6e 20 62 75 69 6c | 74 20 69 6e 20 2a 2f 0d |ion buil|t in */.|
|000014c0| 0d 0d 4f 53 45 72 72 20 | 53 65 6e 64 43 6f 6d 6d |..OSErr |SendComm|
|000014d0| 61 6e 64 28 41 45 44 65 | 73 63 20 2a 63 6f 6d 6d |and(AEDe|sc *comm|
|000014e0| 61 6e 64 29 0d 7b 0d 09 | 4f 53 45 72 72 20 65 72 |and).{..|OSErr er|
|000014f0| 72 3b 0d 09 43 53 74 72 | 69 6e 67 48 61 6e 64 6c |r;..CStr|ingHandl|
|00001500| 65 20 6f 75 74 70 75 74 | 20 3d 20 4e 55 4c 4c 2c |e output| = NULL,|
|00001510| 20 64 69 61 67 6e 6f 73 | 74 69 63 20 3d 20 4e 55 | diagnos|tic = NU|
|00001520| 4c 4c 3b 0d 09 0d 09 65 | 72 72 20 3d 20 53 6f 75 |LL;....e|rr = Sou|
|00001530| 72 63 65 53 65 72 76 65 | 72 43 6f 6d 6d 61 6e 64 |rceServe|rCommand|
|00001540| 28 63 6f 6d 6d 61 6e 64 | 2c 20 26 6f 75 74 70 75 |(command|, &outpu|
|00001550| 74 2c 20 26 64 69 61 67 | 6e 6f 73 74 69 63 2c 20 |t, &diag|nostic, |
|00001560| 50 72 6f 6a 65 63 74 44 | 72 61 67 49 64 6c 65 50 |ProjectD|ragIdleP|
|00001570| 72 6f 63 2c 20 4e 55 4c | 4c 29 3b 0d 09 69 66 20 |roc, NUL|L);..if |
|00001580| 28 65 72 72 20 21 3d 20 | 6e 6f 45 72 72 20 7c 7c |(err != |noErr |||
|00001590| 20 64 69 61 67 6e 6f 73 | 74 69 63 20 21 3d 20 4e | diagnos|tic != N|
|000015a0| 55 4c 4c 29 0d 09 7b 0d | 09 09 69 66 20 28 65 72 |ULL)..{.|..if (er|
|000015b0| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 20 65 72 72 20 |r == noE|rr) err |
|000015c0| 3d 20 2d 31 3b 0d 09 09 | 69 66 20 28 64 69 61 67 |= -1;...|if (diag|
|000015d0| 6e 6f 73 74 69 63 20 21 | 3d 20 4e 55 4c 4c 29 0d |nostic !|= NULL).|
|000015e0| 09 09 09 52 65 73 54 65 | 78 74 44 69 73 70 6c 61 |...ResTe|xtDispla|
|000015f0| 79 44 69 61 6c 6f 67 28 | 6b 50 72 6f 6a 65 63 74 |yDialog(|kProject|
|00001600| 44 72 61 67 53 74 72 69 | 6e 67 73 2c 20 6b 50 72 |DragStri|ngs, kPr|
|00001610| 6f 6a 65 63 74 6f 72 45 | 72 72 6f 72 2c 20 64 69 |ojectorE|rror, di|
|00001620| 61 67 6e 6f 73 74 69 63 | 29 3b 0d 09 09 65 6c 73 |agnostic|);...els|
|00001630| 65 0d 09 09 09 52 61 69 | 73 65 45 72 72 6f 72 4e |e....Rai|seErrorN|
|00001640| 75 6d 62 65 72 28 65 72 | 72 29 3b 0d 09 7d 0d 09 |umber(er|r);..}..|
|00001650| 65 6c 73 65 20 69 66 20 | 28 6f 75 74 70 75 74 20 |else if |(output |
|00001660| 21 3d 20 4e 55 4c 4c 29 | 0d 09 09 52 65 73 54 65 |!= NULL)|...ResTe|
|00001670| 78 74 44 69 73 70 6c 61 | 79 44 69 61 6c 6f 67 28 |xtDispla|yDialog(|
|00001680| 6b 50 72 6f 6a 65 63 74 | 44 72 61 67 53 74 72 69 |kProject|DragStri|
|00001690| 6e 67 73 2c 20 6b 50 72 | 6f 6a 65 63 74 6f 72 4f |ngs, kPr|ojectorO|
|000016a0| 75 74 70 75 74 2c 20 6f | 75 74 70 75 74 29 3b 0d |utput, o|utput);.|
|000016b0| 09 69 66 20 28 6f 75 74 | 70 75 74 20 21 3d 20 4e |.if (out|put != N|
|000016c0| 55 4c 4c 29 0d 09 09 44 | 69 73 70 6f 73 65 48 61 |ULL)...D|isposeHa|
|000016d0| 6e 64 6c 65 28 28 48 61 | 6e 64 6c 65 29 6f 75 74 |ndle((Ha|ndle)out|
|000016e0| 70 75 74 29 3b 0d 09 69 | 66 20 28 64 69 61 67 6e |put);..i|f (diagn|
|000016f0| 6f 73 74 69 63 20 21 3d | 20 4e 55 4c 4c 29 0d 09 |ostic !=| NULL)..|
|00001700| 09 44 69 73 70 6f 73 65 | 48 61 6e 64 6c 65 28 28 |.Dispose|Handle((|
|00001710| 48 61 6e 64 6c 65 29 64 | 69 61 67 6e 6f 73 74 69 |Handle)d|iagnosti|
|00001720| 63 29 3b 0d 09 41 45 44 | 69 73 70 6f 73 65 44 65 |c);..AED|isposeDe|
|00001730| 73 63 28 63 6f 6d 6d 61 | 6e 64 29 3b 0d 09 72 65 |sc(comma|nd);..re|
|00001740| 74 75 72 6e 20 65 72 72 | 3b 0d 7d 0d 0d 0d 4f 53 |turn err|;.}...OS|
|00001750| 45 72 72 20 4d 6f 75 6e | 74 50 72 6f 6a 65 63 74 |Err Moun|tProject|
|00001760| 28 41 6c 69 61 73 48 61 | 6e 64 6c 65 20 70 72 6f |(AliasHa|ndle pro|
|00001770| 6a 65 63 74 41 6c 69 61 | 73 29 0d 7b 0d 09 4f 53 |jectAlia|s).{..OS|
|00001780| 45 72 72 20 65 72 72 3b | 0d 09 43 53 74 72 69 6e |Err err;|..CStrin|
|00001790| 67 48 61 6e 64 6c 65 20 | 6f 75 74 70 75 74 20 3d |gHandle |output =|
|000017a0| 20 4e 55 4c 4c 2c 20 64 | 69 61 67 6e 6f 73 74 69 | NULL, d|iagnosti|
|000017b0| 63 20 3d 20 4e 55 4c 4c | 3b 0d 09 0d 09 65 72 72 |c = NULL|;....err|
|000017c0| 20 3d 20 4d 6f 75 6e 74 | 50 72 6f 6a 65 63 74 41 | = Mount|ProjectA|
|000017d0| 6c 69 61 73 28 70 72 6f | 6a 65 63 74 41 6c 69 61 |lias(pro|jectAlia|
|000017e0| 73 2c 20 26 6f 75 74 70 | 75 74 2c 20 26 64 69 61 |s, &outp|ut, &dia|
|000017f0| 67 6e 6f 73 74 69 63 29 | 3b 0d 09 69 66 20 28 65 |gnostic)|;..if (e|
|00001800| 72 72 20 21 3d 20 6e 6f | 45 72 72 20 7c 7c 20 64 |rr != no|Err || d|
|00001810| 69 61 67 6e 6f 73 74 69 | 63 20 21 3d 20 4e 55 4c |iagnosti|c != NUL|
|00001820| 4c 29 0d 09 7b 0d 09 09 | 69 66 20 28 65 72 72 20 |L)..{...|if (err |
|00001830| 3d 3d 20 6e 6f 45 72 72 | 29 20 65 72 72 20 3d 20 |== noErr|) err = |
|00001840| 2d 31 3b 0d 09 09 69 66 | 20 28 64 69 61 67 6e 6f |-1;...if| (diagno|
|00001850| 73 74 69 63 20 21 3d 20 | 4e 55 4c 4c 29 0d 09 09 |stic != |NULL)...|
|00001860| 09 52 65 73 54 65 78 74 | 44 69 73 70 6c 61 79 44 |.ResText|DisplayD|
|00001870| 69 61 6c 6f 67 28 6b 50 | 72 6f 6a 65 63 74 44 72 |ialog(kP|rojectDr|
|00001880| 61 67 53 74 72 69 6e 67 | 73 2c 20 6b 43 61 6e 74 |agString|s, kCant|
|00001890| 46 69 6e 64 50 72 6f 6a | 65 63 74 2c 20 64 69 61 |FindProj|ect, dia|
|000018a0| 67 6e 6f 73 74 69 63 29 | 3b 0d 09 09 65 6c 73 65 |gnostic)|;...else|
|000018b0| 0d 09 09 09 52 61 69 73 | 65 45 72 72 6f 72 4e 75 |....Rais|eErrorNu|
|000018c0| 6d 62 65 72 28 65 72 72 | 29 3b 0d 09 7d 0d 09 69 |mber(err|);..}..i|
|000018d0| 66 20 28 6f 75 74 70 75 | 74 20 21 3d 20 4e 55 4c |f (outpu|t != NUL|
|000018e0| 4c 29 0d 09 09 44 69 73 | 70 6f 73 65 48 61 6e 64 |L)...Dis|poseHand|
|000018f0| 6c 65 28 28 48 61 6e 64 | 6c 65 29 6f 75 74 70 75 |le((Hand|le)outpu|
|00001900| 74 29 3b 0d 09 69 66 20 | 28 64 69 61 67 6e 6f 73 |t);..if |(diagnos|
|00001910| 74 69 63 20 21 3d 20 4e | 55 4c 4c 29 0d 09 09 44 |tic != N|ULL)...D|
|00001920| 69 73 70 6f 73 65 48 61 | 6e 64 6c 65 28 28 48 61 |isposeHa|ndle((Ha|
|00001930| 6e 64 6c 65 29 64 69 61 | 67 6e 6f 73 74 69 63 29 |ndle)dia|gnostic)|
|00001940| 3b 0d 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |;..Dispo|seHandle|
|00001950| 28 28 48 61 6e 64 6c 65 | 29 70 72 6f 6a 65 63 74 |((Handle|)project|
|00001960| 41 6c 69 61 73 29 3b 0d | 09 72 65 74 75 72 6e 20 |Alias);.|.return |
|00001970| 65 72 72 3b 0d 7d 0d 0d | 0d 4f 53 45 72 72 20 4d |err;.}..|.OSErr M|
|00001980| 6f 75 6e 74 50 72 6f 6a | 65 63 74 46 72 6f 6d 46 |ountProj|ectFromF|
|00001990| 6f 6c 64 65 72 28 73 68 | 6f 72 74 20 76 52 65 66 |older(sh|ort vRef|
|000019a0| 4e 75 6d 2c 20 6c 6f 6e | 67 20 66 6f 6c 64 65 72 |Num, lon|g folder|
|000019b0| 49 44 2c 20 53 74 72 69 | 6e 67 50 74 72 20 70 72 |ID, Stri|ngPtr pr|
|000019c0| 6f 6a 65 63 74 4e 61 6d | 65 29 0d 7b 0d 09 41 6c |ojectNam|e).{..Al|
|000019d0| 69 61 73 48 61 6e 64 6c | 65 20 70 72 6f 6a 65 63 |iasHandl|e projec|
|000019e0| 74 41 6c 69 61 73 3b 0d | 09 4f 53 45 72 72 20 65 |tAlias;.|.OSErr e|
|000019f0| 72 72 3b 0d 09 0d 09 54 | 61 73 6b 53 74 61 72 74 |rr;....T|askStart|
|00001a00| 28 6b 50 72 6f 6a 65 63 | 74 44 72 61 67 53 74 72 |(kProjec|tDragStr|
|00001a10| 69 6e 67 73 2c 20 6b 46 | 69 6e 64 69 6e 67 50 72 |ings, kF|indingPr|
|00001a20| 6f 6a 65 63 74 2c 20 4e | 55 4c 4c 2c 20 4e 55 4c |oject, N|ULL, NUL|
|00001a30| 4c 2c 20 4e 55 4c 4c 2c | 20 4e 55 4c 4c 29 3b 0d |L, NULL,| NULL);.|
|00001a40| 09 65 72 72 20 3d 20 46 | 69 6e 64 50 72 6f 6a 65 |.err = F|indProje|
|00001a50| 63 74 41 6c 69 61 73 46 | 72 6f 6d 46 6f 6c 64 65 |ctAliasF|romFolde|
|00001a60| 72 28 76 52 65 66 4e 75 | 6d 2c 20 66 6f 6c 64 65 |r(vRefNu|m, folde|
|00001a70| 72 49 44 2c 20 26 70 72 | 6f 6a 65 63 74 41 6c 69 |rID, &pr|ojectAli|
|00001a80| 61 73 2c 20 70 72 6f 6a | 65 63 74 4e 61 6d 65 29 |as, proj|ectName)|
|00001a90| 3b 0d 09 69 66 20 28 65 | 72 72 20 21 3d 20 6e 6f |;..if (e|rr != no|
|00001aa0| 45 72 72 29 0d 09 7b 0d | 09 09 2f 2a 20 63 6f 75 |Err)..{.|../* cou|
|00001ab0| 6c 64 6e 27 74 20 66 69 | 6e 64 20 69 74 20 2d 2d |ldn't fi|nd it --|
|00001ac0| 20 61 73 6b 20 74 68 65 | 20 75 73 65 72 20 66 6f | ask the| user fo|
|00001ad0| 72 20 6f 6e 65 20 2a 2f | 0d 09 09 46 53 53 70 65 |r one */|...FSSpe|
|00001ae0| 63 20 66 69 6c 65 3b 0d | 09 09 69 66 20 28 53 65 |c file;.|..if (Se|
|00001af0| 6c 65 63 74 50 72 6f 6a | 65 63 74 6f 72 44 42 28 |lectProj|ectorDB(|
|00001b00| 26 66 69 6c 65 2c 20 6b | 50 72 6f 6a 65 63 74 44 |&file, k|ProjectD|
|00001b10| 72 61 67 53 74 72 69 6e | 67 73 2c 20 6b 43 61 6e |ragStrin|gs, kCan|
|00001b20| 74 46 69 6e 64 50 72 6f | 6a 65 63 74 43 61 6e 59 |tFindPro|jectCanY|
|00001b30| 6f 75 2c 20 4e 55 4c 4c | 2c 20 4e 55 4c 4c 29 29 |ou, NULL|, NULL))|
|00001b40| 0d 09 09 7b 0d 09 09 09 | 53 74 72 33 31 20 66 6f |...{....|Str31 fo|
|00001b50| 6c 64 65 72 4e 61 6d 65 | 3b 0d 09 09 09 0d 09 09 |lderName|;.......|
|00001b60| 09 2f 2a 20 67 65 74 20 | 74 68 65 20 6e 61 6d 65 |./* get |the name|
|00001b70| 20 6f 66 20 74 68 65 20 | 70 61 72 65 6e 74 20 6f | of the |parent o|
|00001b80| 66 20 50 72 6f 6a 65 63 | 74 6f 72 44 42 20 2d 2d |f Projec|torDB --|
|00001b90| 20 69 74 27 73 20 74 68 | 65 20 70 72 6f 6a 65 63 | it's th|e projec|
|00001ba0| 74 20 6e 61 6d 65 20 2a | 2f 0d 09 09 09 65 72 72 |t name *|/....err|
|00001bb0| 20 3d 20 47 65 74 44 69 | 72 4e 61 6d 65 28 66 69 | = GetDi|rName(fi|
|00001bc0| 6c 65 2e 76 52 65 66 4e | 75 6d 2c 20 66 69 6c 65 |le.vRefN|um, file|
|00001bd0| 2e 70 61 72 49 44 2c 20 | 70 72 6f 6a 65 63 74 4e |.parID, |projectN|
|00001be0| 61 6d 65 29 3b 0d 09 09 | 09 69 66 20 28 65 72 72 |ame);...|.if (err|
|00001bf0| 20 21 3d 20 6e 6f 45 72 | 72 29 20 72 65 74 75 72 | != noEr|r) retur|
|00001c00| 6e 20 52 61 69 73 65 45 | 72 72 6f 72 4e 75 6d 62 |n RaiseE|rrorNumb|
|00001c10| 65 72 28 65 72 72 29 3b | 0d 09 09 09 0d 09 09 09 |er(err);|........|
|00001c20| 2f 2a 20 67 65 74 20 74 | 68 65 20 6e 61 6d 65 20 |/* get t|he name |
|00001c30| 6f 66 20 74 68 65 20 70 | 61 72 65 6e 74 20 6f 66 |of the p|arent of|
|00001c40| 20 74 68 65 20 63 68 65 | 63 6b 6f 75 74 20 66 6f | the che|ckout fo|
|00001c50| 6c 64 65 72 20 2a 2f 0d | 09 09 09 65 72 72 20 3d |lder */.|...err =|
|00001c60| 20 47 65 74 44 69 72 4e | 61 6d 65 28 76 52 65 66 | GetDirN|ame(vRef|
|00001c70| 4e 75 6d 2c 20 66 6f 6c | 64 65 72 49 44 2c 20 66 |Num, fol|derID, f|
|00001c80| 6f 6c 64 65 72 4e 61 6d | 65 29 3b 0d 09 09 09 69 |olderNam|e);....i|
|00001c90| 66 20 28 65 72 72 20 21 | 3d 20 6e 6f 45 72 72 29 |f (err !|= noErr)|
|00001ca0| 20 72 65 74 75 72 6e 20 | 52 61 69 73 65 45 72 72 | return |RaiseErr|
|00001cb0| 6f 72 4e 75 6d 62 65 72 | 28 65 72 72 29 3b 0d 09 |orNumber|(err);..|
|00001cc0| 09 09 0d 09 09 09 2f 2a | 20 69 66 20 74 68 65 20 |....../*| if the |
|00001cd0| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 63 68 65 63 |name of |the chec|
|00001ce0| 6b 6f 75 74 20 66 6f 6c | 64 65 72 20 69 73 20 64 |kout fol|der is d|
|00001cf0| 69 66 66 65 72 65 6e 74 | 20 66 72 6f 6d 20 74 68 |ifferent| from th|
|00001d00| 65 20 70 72 6f 6a 65 63 | 74 20 6e 61 6d 65 2c 0d |e projec|t name,.|
|00001d10| 09 09 09 20 2a 20 77 65 | 20 6e 65 65 64 20 74 6f |... * we| need to|
|00001d20| 20 63 72 65 61 74 65 20 | 61 20 6d 61 70 70 69 6e | create |a mappin|
|00001d30| 67 20 62 65 74 77 65 65 | 6e 20 74 68 65 6d 0d 09 |g betwee|n them..|
|00001d40| 09 09 20 2a 2f 0d 09 09 | 09 69 66 20 28 21 45 71 |.. */...|.if (!Eq|
|00001d50| 75 61 6c 53 74 72 69 6e | 67 28 66 6f 6c 64 65 72 |ualStrin|g(folder|
|00001d60| 4e 61 6d 65 2c 20 70 72 | 6f 6a 65 63 74 4e 61 6d |Name, pr|ojectNam|
|00001d70| 65 2c 20 66 61 6c 73 65 | 2c 20 66 61 6c 73 65 29 |e, false|, false)|
|00001d80| 29 0d 09 09 09 7b 0d 09 | 09 09 09 65 72 72 20 3d |)....{..|...err =|
|00001d90| 20 41 64 64 4e 61 6d 65 | 4d 61 70 70 69 6e 67 28 | AddName|Mapping(|
|00001da0| 66 6f 6c 64 65 72 4e 61 | 6d 65 2c 20 70 72 6f 6a |folderNa|me, proj|
|00001db0| 65 63 74 4e 61 6d 65 29 | 3b 0d 09 09 09 09 69 66 |ectName)|;.....if|
|00001dc0| 20 28 65 72 72 20 21 3d | 20 6e 6f 45 72 72 29 20 | (err !=| noErr) |
|00001dd0| 72 65 74 75 72 6e 20 52 | 61 69 73 65 45 72 72 6f |return R|aiseErro|
|00001de0| 72 4e 75 6d 62 65 72 28 | 65 72 72 29 3b 0d 09 09 |rNumber(|err);...|
|00001df0| 09 7d 0d 0d 09 09 09 2f | 2a 20 75 73 65 72 20 70 |.}...../|* user p|
|00001e00| 69 63 6b 65 64 20 61 20 | 50 72 6f 6a 65 63 74 6f |icked a |Projecto|
|00001e10| 72 44 42 20 2d 2d 20 6e | 6f 77 20 6d 61 6b 65 20 |rDB -- n|ow make |
|00001e20| 61 6e 20 61 6c 69 61 73 | 20 66 6f 72 20 69 74 20 |an alias| for it |
|00001e30| 2a 2f 0d 09 09 09 65 72 | 72 20 3d 20 4d 61 6b 65 |*/....er|r = Make|
|00001e40| 50 72 6f 6a 65 63 74 41 | 6c 69 61 73 28 66 69 6c |ProjectA|lias(fil|
|00001e50| 65 2e 76 52 65 66 4e 75 | 6d 2c 20 66 69 6c 65 2e |e.vRefNu|m, file.|
|00001e60| 70 61 72 49 44 2c 20 26 | 70 72 6f 6a 65 63 74 41 |parID, &|projectA|
|00001e70| 6c 69 61 73 29 3b 0d 09 | 09 09 69 66 20 28 65 72 |lias);..|..if (er|
|00001e80| 72 20 21 3d 20 6e 6f 45 | 72 72 29 20 72 65 74 75 |r != noE|rr) retu|
|00001e90| 72 6e 20 52 61 69 73 65 | 45 72 72 6f 72 4e 75 6d |rn Raise|ErrorNum|
|00001ea0| 62 65 72 28 65 72 72 29 | 3b 0d 09 09 7d 0d 09 09 |ber(err)|;...}...|
|00001eb0| 65 6c 73 65 0d 09 09 7b | 0d 09 09 09 2f 2a 20 75 |else...{|..../* u|
|00001ec0| 73 65 72 20 63 61 6e 63 | 65 6c 65 64 20 74 68 65 |ser canc|eled the|
|00001ed0| 20 73 74 61 6e 64 61 72 | 64 20 66 69 6c 65 20 64 | standar|d file d|
|00001ee0| 69 61 6c 6f 67 20 2a 2f | 0d 09 09 09 72 65 74 75 |ialog */|....retu|
|00001ef0| 72 6e 20 52 61 69 73 65 | 45 72 72 6f 72 4e 75 6d |rn Raise|ErrorNum|
|00001f00| 62 65 72 28 75 73 65 72 | 43 61 6e 63 65 6c 65 64 |ber(user|Canceled|
|00001f10| 45 72 72 29 3b 0d 09 09 | 7d 0d 09 7d 0d 09 54 61 |Err);...|}..}..Ta|
|00001f20| 73 6b 44 6f 6e 65 28 29 | 3b 0d 09 72 65 74 75 72 |skDone()|;..retur|
|00001f30| 6e 20 4d 6f 75 6e 74 50 | 72 6f 6a 65 63 74 28 70 |n MountP|roject(p|
|00001f40| 72 6f 6a 65 63 74 41 6c | 69 61 73 29 3b 0d 7d 0d |rojectAl|ias);.}.|
|00001f50| 0d 0d 2f 2a 20 66 69 6c | 74 65 72 20 50 72 6f 6a |../* fil|ter Proj|
|00001f60| 65 63 74 6f 72 44 42 20 | 66 69 6c 65 73 20 62 61 |ectorDB |files ba|
|00001f70| 73 65 64 20 6f 6e 20 70 | 72 6f 6a 65 63 74 20 6e |sed on p|roject n|
|00001f80| 61 6d 65 20 2d 2d 20 6d | 75 73 74 20 62 65 20 74 |ame -- m|ust be t|
|00001f90| 68 65 20 73 61 6d 65 20 | 61 73 20 69 6e 20 74 68 |he same |as in th|
|00001fa0| 65 20 43 4b 49 44 20 2a | 2f 0d 0d 70 61 73 63 61 |e CKID *|/..pasca|
|00001fb0| 6c 20 42 6f 6f 6c 65 61 | 6e 20 46 69 6e 64 50 72 |l Boolea|n FindPr|
|00001fc0| 6f 6a 65 63 74 46 69 6c | 65 46 69 6c 74 65 72 28 |ojectFil|eFilter(|
|00001fd0| 43 49 6e 66 6f 50 42 50 | 74 72 20 70 62 2c 20 50 |CInfoPBP|tr pb, P|
|00001fe0| 74 72 20 6d 79 44 61 74 | 61 50 74 72 29 0d 7b 0d |tr myDat|aPtr).{.|
|00001ff0| 09 53 74 72 69 6e 67 50 | 74 72 20 70 72 6f 6a 65 |.StringP|tr proje|
|00002000| 63 74 4e 61 6d 65 20 3d | 20 6d 79 44 61 74 61 50 |ctName =| myDataP|
|00002010| 74 72 3b 0d 09 53 74 72 | 36 33 20 66 6f 6c 64 65 |tr;..Str|63 folde|
|00002020| 72 4e 61 6d 65 3b 0d 09 | 4f 53 45 72 72 20 65 72 |rName;..|OSErr er|
|00002030| 72 3b 0d 09 0d 09 2f 2a | 20 67 65 74 20 74 68 65 |r;..../*| get the|
|00002040| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 70 61 72 | name of| the par|
|00002050| 65 6e 74 20 66 6f 6c 64 | 65 72 20 2a 2f 0d 09 65 |ent fold|er */..e|
|00002060| 72 72 20 3d 20 47 65 74 | 44 69 72 4e 61 6d 65 28 |rr = Get|DirName(|
|00002070| 70 62 2d 3e 68 46 69 6c | 65 49 6e 66 6f 2e 69 6f |pb->hFil|eInfo.io|
|00002080| 56 52 65 66 4e 75 6d 2c | 20 70 62 2d 3e 68 46 69 |VRefNum,| pb->hFi|
|00002090| 6c 65 49 6e 66 6f 2e 69 | 6f 46 6c 50 61 72 49 44 |leInfo.i|oFlParID|
|000020a0| 2c 20 66 6f 6c 64 65 72 | 4e 61 6d 65 29 3b 0d 09 |, folder|Name);..|
|000020b0| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|000020c0| 29 20 72 65 74 75 72 6e | 20 74 72 75 65 3b 20 2f |) return| true; /|
|000020d0| 2a 20 65 72 72 6f 72 20 | 6d 65 61 6e 73 20 73 75 |* error |means su|
|000020e0| 70 70 72 65 73 73 20 2a | 2f 0d 09 0d 09 2f 2a 20 |ppress *|/..../* |
|000020f0| 63 6f 6d 70 61 72 65 20 | 74 68 65 6d 20 2a 2f 0d |compare |them */.|
|00002100| 09 72 65 74 75 72 6e 20 | 21 45 71 75 61 6c 53 74 |.return |!EqualSt|
|00002110| 72 69 6e 67 28 70 72 6f | 6a 65 63 74 4e 61 6d 65 |ring(pro|jectName|
|00002120| 2c 20 66 6f 6c 64 65 72 | 4e 61 6d 65 2c 20 66 61 |, folder|Name, fa|
|00002130| 6c 73 65 2c 20 66 61 6c | 73 65 29 3b 0d 7d 0d 0d |lse, fal|se);.}..|
|00002140| 0d 4f 53 45 72 72 20 4d | 6f 75 6e 74 50 72 6f 6a |.OSErr M|ountProj|
|00002150| 65 63 74 46 72 6f 6d 43 | 4b 49 44 28 43 4b 49 44 |ectFromC|KID(CKID|
|00002160| 48 61 6e 64 6c 65 20 74 | 68 65 43 4b 49 44 2c 20 |Handle t|heCKID, |
|00002170| 53 74 72 69 6e 67 50 74 | 72 20 70 72 6f 6a 65 63 |StringPt|r projec|
|00002180| 74 4e 61 6d 65 29 0d 7b | 0d 09 41 6c 69 61 73 48 |tName).{|..AliasH|
|00002190| 61 6e 64 6c 65 20 70 72 | 6f 6a 65 63 74 41 6c 69 |andle pr|ojectAli|
|000021a0| 61 73 3b 0d 09 4f 53 45 | 72 72 20 65 72 72 3b 0d |as;..OSE|rr err;.|
|000021b0| 09 0d 09 54 61 73 6b 53 | 74 61 72 74 28 6b 50 72 |...TaskS|tart(kPr|
|000021c0| 6f 6a 65 63 74 44 72 61 | 67 53 74 72 69 6e 67 73 |ojectDra|gStrings|
|000021d0| 2c 20 6b 46 69 6e 64 69 | 6e 67 50 72 6f 6a 65 63 |, kFindi|ngProjec|
|000021e0| 74 2c 20 4e 55 4c 4c 2c | 20 4e 55 4c 4c 2c 20 4e |t, NULL,| NULL, N|
|000021f0| 55 4c 4c 2c 20 4e 55 4c | 4c 29 3b 0d 09 65 72 72 |ULL, NUL|L);..err|
|00002200| 20 3d 20 46 69 6e 64 50 | 72 6f 6a 65 63 74 41 6c | = FindP|rojectAl|
|00002210| 69 61 73 46 72 6f 6d 43 | 4b 49 44 28 74 68 65 43 |iasFromC|KID(theC|
|00002220| 4b 49 44 2c 20 26 70 72 | 6f 6a 65 63 74 41 6c 69 |KID, &pr|ojectAli|
|00002230| 61 73 2c 20 70 72 6f 6a | 65 63 74 4e 61 6d 65 29 |as, proj|ectName)|
|00002240| 3b 0d 09 69 66 20 28 65 | 72 72 20 21 3d 20 6e 6f |;..if (e|rr != no|
|00002250| 45 72 72 29 20 0d 09 7b | 0d 09 09 46 53 53 70 65 |Err) ..{|...FSSpe|
|00002260| 63 20 66 69 6c 65 3b 0d | 09 09 53 74 72 33 31 20 |c file;.|..Str31 |
|00002270| 74 6f 70 50 72 6f 6a 65 | 63 74 4e 61 6d 65 3b 0d |topProje|ctName;.|
|00002280| 09 09 0d 09 09 47 65 74 | 54 6f 70 50 72 6f 6a 65 |.....Get|TopProje|
|00002290| 63 74 4e 61 6d 65 28 70 | 72 6f 6a 65 63 74 4e 61 |ctName(p|rojectNa|
|000022a0| 6d 65 2c 20 74 6f 70 50 | 72 6f 6a 65 63 74 4e 61 |me, topP|rojectNa|
|000022b0| 6d 65 29 3b 0d 09 09 69 | 66 20 28 53 65 6c 65 63 |me);...i|f (Selec|
|000022c0| 74 50 72 6f 6a 65 63 74 | 6f 72 44 42 28 26 66 69 |tProject|orDB(&fi|
|000022d0| 6c 65 2c 20 6b 50 72 6f | 6a 65 63 74 44 72 61 67 |le, kPro|jectDrag|
|000022e0| 53 74 72 69 6e 67 73 2c | 20 6b 43 61 6e 74 46 69 |Strings,| kCantFi|
|000022f0| 6e 64 50 72 6f 6a 65 63 | 74 43 61 6e 59 6f 75 2c |ndProjec|tCanYou,|
|00002300| 0d 09 09 09 09 09 09 09 | 09 46 69 6e 64 50 72 6f |........|.FindPro|
|00002310| 6a 65 63 74 46 69 6c 65 | 46 69 6c 74 65 72 2c 20 |jectFile|Filter, |
|00002320| 74 6f 70 50 72 6f 6a 65 | 63 74 4e 61 6d 65 29 29 |topProje|ctName))|
|00002330| 0d 09 09 7b 0d 09 09 09 | 65 72 72 20 3d 20 4d 61 |...{....|err = Ma|
|00002340| 6b 65 50 72 6f 6a 65 63 | 74 41 6c 69 61 73 28 66 |keProjec|tAlias(f|
|00002350| 69 6c 65 2e 76 52 65 66 | 4e 75 6d 2c 20 66 69 6c |ile.vRef|Num, fil|
|00002360| 65 2e 70 61 72 49 44 2c | 20 26 70 72 6f 6a 65 63 |e.parID,| &projec|
|00002370| 74 41 6c 69 61 73 29 3b | 0d 09 09 09 69 66 20 28 |tAlias);|....if (|
|00002380| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 72 65 |err != n|oErr) re|
|00002390| 74 75 72 6e 20 52 61 69 | 73 65 45 72 72 6f 72 4e |turn Rai|seErrorN|
|000023a0| 75 6d 62 65 72 28 65 72 | 72 29 3b 0d 09 09 7d 0d |umber(er|r);...}.|
|000023b0| 09 09 65 6c 73 65 0d 09 | 09 7b 0d 09 09 09 72 65 |..else..|.{....re|
|000023c0| 74 75 72 6e 20 52 61 69 | 73 65 45 72 72 6f 72 4e |turn Rai|seErrorN|
|000023d0| 75 6d 62 65 72 28 75 73 | 65 72 43 61 6e 63 65 6c |umber(us|erCancel|
|000023e0| 65 64 45 72 72 29 3b 0d | 09 09 7d 0d 09 7d 0d 09 |edErr);.|..}..}..|
|000023f0| 54 61 73 6b 44 6f 6e 65 | 28 29 3b 0d 09 72 65 74 |TaskDone|();..ret|
|00002400| 75 72 6e 20 4d 6f 75 6e | 74 50 72 6f 6a 65 63 74 |urn Moun|tProject|
|00002410| 28 70 72 6f 6a 65 63 74 | 41 6c 69 61 73 29 3b 0d |(project|Alias);.|
|00002420| 7d 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |}.......|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002480| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00002490| 63 74 44 72 61 67 2e 68 | 22 0d 23 69 6e 63 6c 75 |ctDrag.h|".#inclu|
|000024a0| 64 65 20 22 43 46 69 6c | 65 73 2e 68 22 0d 23 69 |de "CFil|es.h".#i|
|000024b0| 0e 53 6f 75 72 63 65 53 | 65 72 76 65 72 2e 63 72 |.SourceS|erver.cr|
|000024c0| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 ff ff |....TEXT|MPS ....|
|000024d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 ab d1 5b b7 00 00 | 23 a2 00 00 01 ac 64 65 |....[...|#.....de|
|00002500| 20 3c 41 45 50 61 63 6b | 4f 62 6a 65 63 74 2e 68 | <AEPack|Object.h|
|00002510| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 41 45 4f 62 |>.#inclu|de <AEOb|
|00002520| 6a 65 63 74 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |jects.h>|.#includ|
|00002530| 65 20 3c 46 69 6c 65 73 | 2e 68 3e 0d 23 69 6e 63 |e <Files|.h>.#inc|
|00002540| 6c 75 64 65 20 3c 46 6f | 6c 64 65 72 73 2e 68 3e |lude <Fo|lders.h>|
|00002550| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 41 6c 69 61 73 |.#includ|e <Alias|
|00002560| 65 73 2e 68 3e 0d 0d 23 | 69 66 6e 64 65 66 20 54 |es.h>..#|ifndef T|
|00002570| 48 49 4e 4b 0d 23 64 65 | 66 69 6e 65 20 49 64 6c |HINK.#de|fine Idl|
|00002580| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 75 73 65 |...H..Mo|naco.use|
|00002590| 01 54 e7 50 72 74 2e 68 | 22 0d 0d 23 69 6e 63 6c |.T.Prt.h|"..#incl|
|000025a0| 75 64 65 20 3c 41 00 06 | 00 04 00 50 00 20 01 dd |ude <A..|...P. ..|
|000025b0| 02 3d 00 50 00 20 01 dd | 02 3d ac 23 1e 0a 00 00 |.=.P. ..|.=.#....|
|000025c0| 1e d0 00 00 20 bf 00 00 | 1e 39 01 00 00 00 00 1e |.... ...|.9......|
|000025d0| 00 50 00 20 01 dd 02 3d | 00 50 00 20 01 dd 02 3d |.P. ...=|.P. ...=|
|000025e0| 00 00 1e 39 00 00 00 00 | 00 00 00 00 00 00 00 00 |...9....|........|
|000025f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 73 |.....n..|.n...>.s|
|00002600| ac d8 19 58 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |...X....|.>..MPSR|
|00002610| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00002620| 03 f0 ff ff 00 00 00 4c | 00 74 2d ec 00 00 00 00 |.......L|.t-.....|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+