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 / CheckOut.c < prev    next >
MacBinary  |  1995-09-07  |  4.4 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, Thu Sep 7 16:04:00 1995, modified Thu Sep 7 16:04:00 1995, creator 'MPS ', type ASCII, 3683 bytes "CheckOut.c" , at 0xee3 564 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 0a 43 68 65 63 6b 4f | 75 74 2e 63 00 00 00 00 |..CheckO|ut.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 0e 63 00 | 00 02 34 ac 75 00 b0 ac |......c.|..4.u...|
|00000060| 75 00 b0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |u.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 1a b3 00 00 |........|........|
|00000080| 2f 2a 20 43 68 65 63 6b | 4f 75 74 2e 63 3a 20 43 |/* Check|Out.c: C|
|00000090| 68 65 63 6b 4f 75 74 20 | 61 70 70 6c 65 74 20 66 |heckOut |applet f|
|000000a0| 6f 72 20 50 72 6f 6a 65 | 63 74 44 72 61 67 0d 20 |or Proje|ctDrag. |
|000000b0| 2a 0d 20 2a 20 41 20 73 | 65 74 20 6f 66 20 61 70 |*. * A s|et of ap|
|000000c0| 70 6c 65 74 73 20 66 6f | 72 20 64 72 61 67 20 61 |plets fo|r drag a|
|000000d0| 6e 64 20 64 72 6f 70 20 | 73 6f 75 72 63 65 20 63 |nd drop |source c|
|000000e0| 6f 6e 74 72 6f 6c 20 62 | 79 20 54 69 6d 20 4d 61 |ontrol b|y Tim Ma|
|000000f0| 72 6f 6e 65 79 2e 0d 20 | 2a 20 53 65 65 20 64 65 |roney.. |* See de|
|00000100| 76 65 6c 6f 70 2c 20 69 | 73 73 75 65 20 32 33 20 |velop, i|ssue 23 |
|00000110| 66 6f 72 20 64 65 74 61 | 69 6c 73 2e 0d 20 2a 0d |for deta|ils.. *.|
|00000120| 20 2a 20 42 75 69 6c 74 | 20 6f 6e 20 44 72 6f 70 | * Built| on Drop|
|00000130| 53 68 65 6c 6c 20 62 79 | 20 4c 65 6f 6e 61 72 64 |Shell by| Leonard|
|00000140| 20 52 6f 73 65 6e 74 68 | 6f 6c 2c 20 53 74 65 70 | Rosenth|ol, Step|
|00000150| 68 61 6e 20 53 6f 6d 6f | 67 79 69 2c 20 61 6e 64 |han Somo|gyi, and|
|00000160| 20 4d 61 72 73 68 61 6c | 6c 20 43 6c 6f 77 2c 0d | Marshal|l Clow,.|
|00000170| 20 2a 20 61 6e 64 20 75 | 73 69 6e 67 20 74 68 65 | * and u|sing the|
|00000180| 20 4d 6f 72 65 46 69 6c | 65 73 20 75 74 69 6c 69 | MoreFil|es utili|
|00000190| 74 69 65 73 20 62 79 20 | 4a 69 6d 20 4c 75 74 68 |ties by |Jim Luth|
|000001a0| 65 72 2e 0d 20 2a 0d 20 | 2a 20 54 68 69 73 20 73 |er.. *. |* This s|
|000001b0| 6f 66 74 77 61 72 65 20 | 69 73 20 66 72 65 65 2c |oftware |is free,|
|000001c0| 20 62 75 74 20 64 6f 6e | 27 74 20 6d 6f 64 69 66 | but don|'t modif|
|000001d0| 79 20 61 6e 64 20 72 65 | 64 69 73 74 72 69 62 75 |y and re|distribu|
|000001e0| 74 65 20 69 74 20 77 69 | 74 68 6f 75 74 0d 20 2a |te it wi|thout. *|
|000001f0| 20 63 68 61 6e 67 69 6e | 67 20 74 68 65 20 73 74 | changin|g the st|
|00000200| 61 74 75 73 20 77 69 6e | 64 6f 77 20 74 6f 20 69 |atus win|dow to i|
|00000210| 6e 64 69 63 61 74 65 20 | 79 6f 75 72 20 6e 61 6d |ndicate |your nam|
|00000220| 65 20 61 6e 64 20 79 6f | 75 72 20 63 68 61 6e 67 |e and yo|ur chang|
|00000230| 65 73 21 0d 20 2a 2f 0d | 0d 0d 23 69 6e 63 6c 75 |es!. */.|..#inclu|
|00000240| 64 65 20 3c 45 72 72 6f | 72 73 2e 68 3e 0d 0d 23 |de <Erro|rs.h>..#|
|00000250| 69 6e 63 6c 75 64 65 20 | 22 44 53 55 73 65 72 50 |include |"DSUserP|
|00000260| 72 6f 63 73 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |rocs.h".|#include|
|00000270| 20 22 53 6f 75 72 63 65 | 53 65 72 76 65 72 2e 68 | "Source|Server.h|
|00000280| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 50 44 44 69 |".#inclu|de "PDDi|
|00000290| 61 6c 6f 67 73 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |alogs.h"|.#includ|
|000002a0| 65 20 22 43 6f 6d 6d 65 | 6e 74 73 2e 68 22 0d 23 |e "Comme|nts.h".#|
|000002b0| 69 6e 63 6c 75 64 65 20 | 22 54 61 73 6b 73 41 6e |include |"TasksAn|
|000002c0| 64 45 72 72 6f 72 73 2e | 68 22 0d 23 69 6e 63 6c |dErrors.|h".#incl|
|000002d0| 75 64 65 20 22 46 69 6c | 65 43 61 6e 63 65 6c 2e |ude "Fil|eCancel.|
|000002e0| 68 22 0d 0d 0d 76 6f 69 | 64 20 43 68 65 63 6b 4f |h"...voi|d CheckO|
|000002f0| 75 74 46 69 6c 65 28 46 | 53 53 70 65 63 20 2a 66 |utFile(F|SSpec *f|
|00000300| 69 6c 65 29 3b 0d 0d 0d | 2f 2a 20 54 68 69 73 20 |ile);...|/* This |
|00000310| 72 6f 75 74 69 6e 65 20 | 69 73 20 63 61 6c 6c 65 |routine |is calle|
|00000320| 64 20 66 6f 72 20 65 61 | 63 68 20 66 69 6c 65 20 |d for ea|ch file |
|00000330| 70 61 73 73 65 64 20 69 | 6e 20 74 68 65 20 4f 44 |passed i|n the OD|
|00000340| 4f 43 20 65 76 65 6e 74 | 2e 20 2a 2f 0d 0d 70 61 |OC event|. */..pa|
|00000350| 73 63 61 6c 20 76 6f 69 | 64 20 4f 70 65 6e 44 6f |scal voi|d OpenDo|
|00000360| 63 20 28 20 46 53 53 70 | 65 63 50 74 72 20 6d 79 |c ( FSSp|ecPtr my|
|00000370| 46 53 53 50 74 72 2c 20 | 42 6f 6f 6c 65 61 6e 20 |FSSPtr, |Boolean |
|00000380| 6f 70 65 6e 69 6e 67 2c | 20 48 61 6e 64 6c 65 20 |opening,| Handle |
|00000390| 75 73 65 72 44 61 74 61 | 48 61 6e 64 6c 65 20 29 |userData|Handle )|
|000003a0| 0d 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|000003b0| 64 20 28 20 6f 70 65 6e | 69 6e 67 20 29 0d 23 70 |d ( open|ing ).#p|
|000003c0| 72 61 67 6d 61 20 75 6e | 75 73 65 64 20 28 20 75 |ragma un|used ( u|
|000003d0| 73 65 72 44 61 74 61 48 | 61 6e 64 6c 65 20 29 0d |serDataH|andle ).|
|000003e0| 0d 09 43 68 65 63 6b 4f | 75 74 46 69 6c 65 28 6d |..CheckO|utFile(m|
|000003f0| 79 46 53 53 50 74 72 29 | 3b 0d 7d 0d 0d 0d 76 6f |yFSSPtr)|;.}...vo|
|00000400| 69 64 20 43 68 65 63 6b | 4f 75 74 46 69 6c 65 28 |id Check|OutFile(|
|00000410| 46 53 53 70 65 63 20 2a | 66 69 6c 65 29 0d 7b 0d |FSSpec *|file).{.|
|00000420| 09 53 74 72 36 33 20 75 | 73 65 72 4e 61 6d 65 3b |.Str63 u|serName;|
|00000430| 0d 09 53 74 72 31 35 20 | 6e 69 63 6b 6e 61 6d 65 |..Str15 |nickname|
|00000440| 3b 0d 09 4f 53 45 72 72 | 20 65 72 72 3b 0d 09 43 |;..OSErr| err;..C|
|00000450| 4b 49 44 48 61 6e 64 6c | 65 20 74 68 65 43 4b 49 |KIDHandl|e theCKI|
|00000460| 44 3b 0d 09 41 45 44 65 | 73 63 20 63 6f 6d 6d 61 |D;..AEDe|sc comma|
|00000470| 6e 64 3b 0d 09 53 74 72 | 32 35 35 20 63 6f 6d 6d |nd;..Str|255 comm|
|00000480| 65 6e 74 3b 0d 09 53 74 | 72 32 35 35 20 70 72 6f |ent;..St|r255 pro|
|00000490| 6a 65 63 74 4e 61 6d 65 | 3b 0d 0d 09 54 61 73 6b |jectName|;...Task|
|000004a0| 53 74 61 72 74 28 32 30 | 30 31 2c 20 31 2c 20 66 |Start(20|01, 1, f|
|000004b0| 69 6c 65 2d 3e 6e 61 6d | 65 2c 20 4e 55 4c 4c 2c |ile->nam|e, NULL,|
|000004c0| 20 4e 55 4c 4c 2c 20 4e | 55 4c 4c 29 3b 0d 09 0d | NULL, N|ULL);...|
|000004d0| 09 2f 2a 20 66 69 6e 64 | 20 74 68 65 20 75 73 65 |./* find| the use|
|000004e0| 72 20 6e 61 6d 65 20 61 | 6e 64 20 69 6e 69 74 69 |r name a|nd initi|
|000004f0| 61 6c 73 20 2a 2f 0d 09 | 65 72 72 20 3d 20 47 65 |als */..|err = Ge|
|00000500| 74 55 73 65 72 53 65 74 | 74 69 6e 67 73 28 75 73 |tUserSet|tings(us|
|00000510| 65 72 4e 61 6d 65 2c 20 | 6e 69 63 6b 6e 61 6d 65 |erName, |nickname|
|00000520| 2c 20 66 61 6c 73 65 29 | 3b 0d 09 69 66 20 28 65 |, false)|;..if (e|
|00000530| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |rr != no|Err)..{.|
|00000540| 09 09 67 44 6f 6e 65 20 | 3d 20 74 72 75 65 3b 0d |..gDone |= true;.|
|00000550| 09 09 72 65 74 75 72 6e | 3b 0d 09 7d 0d 0d 09 2f |..return|;..}.../|
|00000560| 2a 20 67 65 74 20 74 68 | 65 20 43 4b 49 44 20 2a |* get th|e CKID *|
|00000570| 2f 0d 09 65 72 72 20 3d | 20 45 78 74 72 61 63 74 |/..err =| Extract|
|00000580| 43 4b 49 44 28 66 69 6c | 65 2c 20 26 74 68 65 43 |CKID(fil|e, &theC|
|00000590| 4b 49 44 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |KID);..i|f (err !|
|000005a0| 3d 20 6e 6f 45 72 72 29 | 0d 09 7b 0d 09 09 52 61 |= noErr)|..{...Ra|
|000005b0| 69 73 65 45 72 72 6f 72 | 53 74 72 69 6e 67 28 6b |iseError|String(k|
|000005c0| 50 72 6f 6a 65 63 74 44 | 72 61 67 53 74 72 69 6e |ProjectD|ragStrin|
|000005d0| 67 73 2c 20 6b 43 61 6e | 74 47 65 74 43 4b 49 44 |gs, kCan|tGetCKID|
|000005e0| 2c 20 66 69 6c 65 2d 3e | 6e 61 6d 65 2c 0d 09 09 |, file->|name,...|
|000005f0| 09 09 09 09 20 4e 55 4c | 4c 2c 20 4e 55 4c 4c 2c |.... NUL|L, NULL,|
|00000600| 20 4e 55 4c 4c 29 3b 0d | 09 09 72 65 74 75 72 6e | NULL);.|..return|
|00000610| 3b 0d 09 7d 0d 09 0d 09 | 2f 2a 20 6d 61 6b 65 20 |;..}....|/* make |
|00000620| 73 75 72 65 20 74 68 65 | 20 66 69 6c 65 20 69 73 |sure the| file is|
|00000630| 20 63 68 65 63 6b 65 64 | 20 69 6e 20 2a 2f 0d 09 | checked| in */..|
|00000640| 69 66 20 28 28 2a 74 68 | 65 43 4b 49 44 29 2d 3e |if ((*th|eCKID)->|
|00000650| 77 72 69 74 65 61 62 6c | 65 20 7c 7c 20 28 2a 74 |writeabl|e || (*t|
|00000660| 68 65 43 4b 49 44 29 2d | 3e 6d 6f 64 69 66 79 52 |heCKID)-|>modifyR|
|00000670| 65 61 64 4f 6e 6c 79 29 | 0d 09 7b 0d 09 09 44 69 |eadOnly)|..{...Di|
|00000680| 73 70 6f 73 65 48 61 6e | 64 6c 65 28 28 48 61 6e |sposeHan|dle((Han|
|00000690| 64 6c 65 29 74 68 65 43 | 4b 49 44 29 3b 0d 09 09 |dle)theC|KID);...|
|000006a0| 52 61 69 73 65 45 72 72 | 6f 72 53 74 72 69 6e 67 |RaiseErr|orString|
|000006b0| 28 6b 50 72 6f 6a 65 63 | 74 44 72 61 67 53 74 72 |(kProjec|tDragStr|
|000006c0| 69 6e 67 73 2c 20 6b 4e | 6f 43 68 65 63 6b 4f 75 |ings, kN|oCheckOu|
|000006d0| 74 50 65 72 6d 69 73 73 | 69 6f 6e 2c 20 66 69 6c |tPermiss|ion, fil|
|000006e0| 65 2d 3e 6e 61 6d 65 2c | 0d 09 09 09 09 09 09 20 |e->name,|....... |
|000006f0| 4e 55 4c 4c 2c 20 4e 55 | 4c 4c 2c 20 4e 55 4c 4c |NULL, NU|LL, NULL|
|00000700| 29 3b 0d 09 09 72 65 74 | 75 72 6e 3b 0d 09 7d 0d |);...ret|urn;..}.|
|00000710| 0d 09 2f 2a 20 67 65 74 | 20 74 68 65 20 63 68 65 |../* get| the che|
|00000720| 63 6b 6f 75 74 20 63 6f | 6d 6d 65 6e 74 20 66 72 |ckout co|mment fr|
|00000730| 6f 6d 20 74 68 65 20 75 | 73 65 72 20 2a 2f 0d 09 |om the u|ser */..|
|00000740| 63 6f 6d 6d 65 6e 74 5b | 30 5d 20 3d 20 30 3b 0d |comment[|0] = 0;.|
|00000750| 09 69 66 20 28 21 47 65 | 74 43 68 61 6e 67 65 43 |.if (!Ge|tChangeC|
|00000760| 6f 6d 6d 65 6e 74 28 66 | 61 6c 73 65 2c 20 66 69 |omment(f|alse, fi|
|00000770| 6c 65 2d 3e 6e 61 6d 65 | 2c 20 63 6f 6d 6d 65 6e |le->name|, commen|
|00000780| 74 29 29 0d 09 7b 0d 09 | 09 44 69 73 70 6f 73 65 |t))..{..|.Dispose|
|00000790| 48 61 6e 64 6c 65 28 28 | 48 61 6e 64 6c 65 29 74 |Handle((|Handle)t|
|000007a0| 68 65 43 4b 49 44 29 3b | 0d 09 09 72 65 74 75 72 |heCKID);|...retur|
|000007b0| 6e 3b 0d 09 7d 0d 09 0d | 09 2f 2a 20 6d 6f 75 6e |n;..}...|./* moun|
|000007c0| 74 20 74 68 65 20 70 72 | 6f 6a 65 63 74 20 2a 2f |t the pr|oject */|
|000007d0| 0d 09 65 72 72 20 3d 20 | 4d 6f 75 6e 74 50 72 6f |..err = |MountPro|
|000007e0| 6a 65 63 74 46 72 6f 6d | 43 4b 49 44 28 74 68 65 |jectFrom|CKID(the|
|000007f0| 43 4b 49 44 2c 20 70 72 | 6f 6a 65 63 74 4e 61 6d |CKID, pr|ojectNam|
|00000800| 65 29 3b 0d 09 69 66 20 | 28 65 72 72 20 21 3d 20 |e);..if |(err != |
|00000810| 6e 6f 45 72 72 29 0d 09 | 7b 0d 09 09 44 69 73 70 |noErr)..|{...Disp|
|00000820| 6f 73 65 48 61 6e 64 6c | 65 28 28 48 61 6e 64 6c |oseHandl|e((Handl|
|00000830| 65 29 74 68 65 43 4b 49 | 44 29 3b 0d 09 09 72 65 |e)theCKI|D);...re|
|00000840| 74 75 72 6e 3b 0d 09 7d | 0d 09 0d 09 2f 2a 20 63 |turn;..}|..../* c|
|00000850| 72 65 61 74 65 20 61 20 | 43 68 65 63 6b 4f 75 74 |reate a |CheckOut|
|00000860| 20 2d 6d 20 63 6f 6d 6d | 61 6e 64 20 66 6f 72 20 | -m comm|and for |
|00000870| 53 6f 75 72 63 65 53 65 | 72 76 65 72 0d 09 20 2a |SourceSe|rver.. *|
|00000880| 20 43 68 65 63 6b 4f 75 | 74 20 2d 6d 20 2d 63 73 | CheckOu|t -m -cs|
|00000890| 20 3c 63 6f 6d 6d 65 6e | 74 3e 20 2d 64 20 3c 64 | <commen|t> -d <d|
|000008a0| 69 72 3e 20 2d 70 72 6f | 6a 65 63 74 20 3c 70 72 |ir> -pro|ject <pr|
|000008b0| 6f 6a 65 63 74 3e 20 2d | 75 20 3c 75 73 65 72 3e |oject> -|u <user>|
|000008c0| 20 3c 66 69 6c 65 3e 0d | 09 20 2a 2f 0d 09 65 72 | <file>.|. */..er|
|000008d0| 72 20 3d 20 43 72 65 61 | 74 65 43 6f 6d 6d 61 6e |r = Crea|teComman|
|000008e0| 64 28 26 63 6f 6d 6d 61 | 6e 64 2c 20 22 43 68 65 |d(&comma|nd, "Che|
|000008f0| 63 6b 4f 75 74 22 29 3b | 0d 09 69 66 20 28 65 72 |ckOut");|..if (er|
|00000900| 72 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 09 65 72 |r == noE|rr)...er|
|00000910| 72 20 3d 20 41 64 64 43 | 53 74 72 69 6e 67 41 72 |r = AddC|StringAr|
|00000920| 67 28 26 63 6f 6d 6d 61 | 6e 64 2c 20 22 2d 6d 22 |g(&comma|nd, "-m"|
|00000930| 29 3b 0d 09 69 66 20 28 | 65 72 72 20 3d 3d 20 6e |);..if (|err == n|
|00000940| 6f 45 72 72 29 0d 09 09 | 65 72 72 20 3d 20 41 64 |oErr)...|err = Ad|
|00000950| 64 43 6f 6d 6d 65 6e 74 | 41 72 67 28 26 63 6f 6d |dComment|Arg(&com|
|00000960| 6d 61 6e 64 2c 20 63 6f | 6d 6d 65 6e 74 29 3b 0d |mand, co|mment);.|
|00000970| 09 69 66 20 28 65 72 72 | 20 3d 3d 20 6e 6f 45 72 |.if (err| == noEr|
|00000980| 72 29 0d 09 09 65 72 72 | 20 3d 20 41 64 64 44 69 |r)...err| = AddDi|
|00000990| 72 41 72 67 28 26 63 6f | 6d 6d 61 6e 64 2c 20 66 |rArg(&co|mmand, f|
|000009a0| 69 6c 65 2d 3e 76 52 65 | 66 4e 75 6d 2c 20 66 69 |ile->vRe|fNum, fi|
|000009b0| 6c 65 2d 3e 70 61 72 49 | 44 29 3b 0d 09 69 66 20 |le->parI|D);..if |
|000009c0| 28 65 72 72 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 09 |(err == |noErr)..|
|000009d0| 09 65 72 72 20 3d 20 41 | 64 64 50 72 6f 6a 65 63 |.err = A|ddProjec|
|000009e0| 74 41 72 67 28 26 63 6f | 6d 6d 61 6e 64 2c 20 70 |tArg(&co|mmand, p|
|000009f0| 72 6f 6a 65 63 74 4e 61 | 6d 65 29 3b 0d 09 69 66 |rojectNa|me);..if|
|00000a00| 20 28 65 72 72 20 3d 3d | 20 6e 6f 45 72 72 29 0d | (err ==| noErr).|
|00000a10| 09 09 65 72 72 20 3d 20 | 41 64 64 55 73 65 72 41 |..err = |AddUserA|
|00000a20| 72 67 28 26 63 6f 6d 6d | 61 6e 64 2c 20 75 73 65 |rg(&comm|and, use|
|00000a30| 72 4e 61 6d 65 29 3b 0d | 09 69 66 20 28 65 72 72 |rName);.|.if (err|
|00000a40| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 09 09 65 72 72 | == noEr|r)...err|
|00000a50| 20 3d 20 41 64 64 50 53 | 74 72 69 6e 67 41 72 67 | = AddPS|tringArg|
|00000a60| 28 26 63 6f 6d 6d 61 6e | 64 2c 20 66 69 6c 65 2d |(&comman|d, file-|
|00000a70| 3e 6e 61 6d 65 29 3b 0d | 09 69 66 20 28 65 72 72 |>name);.|.if (err|
|00000a80| 20 21 3d 20 6e 6f 45 72 | 72 29 0d 09 7b 0d 09 09 | != noEr|r)..{...|
|00000a90| 44 69 73 70 6f 73 65 48 | 61 6e 64 6c 65 28 28 48 |DisposeH|andle((H|
|00000aa0| 61 6e 64 6c 65 29 74 68 | 65 43 4b 49 44 29 3b 0d |andle)th|eCKID);.|
|00000ab0| 09 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |..AEDisp|oseDesc(|
|00000ac0| 26 63 6f 6d 6d 61 6e 64 | 29 3b 0d 09 09 52 61 69 |&command|);...Rai|
|00000ad0| 73 65 45 72 72 6f 72 4e | 75 6d 62 65 72 28 65 72 |seErrorN|umber(er|
|00000ae0| 72 29 3b 0d 09 09 72 65 | 74 75 72 6e 3b 0d 09 7d |r);...re|turn;..}|
|00000af0| 0d 09 0d 09 65 72 72 20 | 3d 20 53 65 6e 64 43 6f |....err |= SendCo|
|00000b00| 6d 6d 61 6e 64 28 26 63 | 6f 6d 6d 61 6e 64 29 3b |mmand(&c|ommand);|
|00000b10| 09 09 2f 2a 20 73 65 6e | 64 20 74 68 65 20 63 6f |../* sen|d the co|
|00000b20| 6d 6d 61 6e 64 20 74 6f | 20 53 6f 75 72 63 65 53 |mmand to| SourceS|
|00000b30| 65 72 76 65 72 20 2a 2f | 0d 09 69 66 20 28 65 72 |erver */|..if (er|
|00000b40| 72 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |r != noE|rr)..{..|
|00000b50| 09 44 69 73 70 6f 73 65 | 48 61 6e 64 6c 65 28 28 |.Dispose|Handle((|
|00000b60| 48 61 6e 64 6c 65 29 74 | 68 65 43 4b 49 44 29 3b |Handle)t|heCKID);|
|00000b70| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 7d 0d 09 0d |...retur|n;..}...|
|00000b80| 09 2f 2a 20 61 64 64 20 | 74 68 65 20 63 68 65 63 |./* add |the chec|
|00000b90| 6b 6f 75 74 20 63 6f 6d | 6d 65 6e 74 20 74 6f 20 |kout com|ment to |
|00000ba0| 74 68 65 20 66 69 6c 65 | 20 2a 2f 0d 09 65 72 72 |the file| */..err|
|00000bb0| 20 3d 20 41 64 64 43 68 | 65 63 6b 6f 75 74 43 6f | = AddCh|eckoutCo|
|00000bc0| 6d 6d 65 6e 74 28 66 69 | 6c 65 2c 20 75 73 65 72 |mment(fi|le, user|
|00000bd0| 4e 61 6d 65 2c 20 6e 69 | 63 6b 6e 61 6d 65 2c 20 |Name, ni|ckname, |
|00000be0| 63 6f 6d 6d 65 6e 74 29 | 3b 0d 09 69 66 20 28 65 |comment)|;..if (e|
|00000bf0| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |rr != no|Err)..{.|
|00000c00| 09 09 2f 2a 20 70 6f 70 | 20 74 68 65 20 63 75 72 |../* pop| the cur|
|00000c10| 72 65 6e 74 20 74 61 73 | 6b 20 61 6e 64 20 73 74 |rent tas|k and st|
|00000c20| 61 72 74 20 61 20 6e 65 | 77 20 6f 6e 65 20 69 66 |art a ne|w one if|
|00000c30| 20 75 73 65 72 20 63 6f | 6e 66 69 72 6d 73 20 63 | user co|nfirms c|
|00000c40| 61 6e 63 65 6c 20 2a 2f | 0d 09 09 69 66 20 28 21 |ancel */|...if (!|
|00000c50| 52 65 73 54 65 78 74 59 | 65 73 4e 6f 28 6b 50 72 |ResTextY|esNo(kPr|
|00000c60| 6f 6a 65 63 74 44 72 61 | 67 53 74 72 69 6e 67 73 |ojectDra|gStrings|
|00000c70| 2c 20 6b 43 68 65 63 6b | 6f 75 74 43 6f 6d 6d 65 |, kCheck|outComme|
|00000c80| 6e 74 46 61 69 6c 65 64 | 43 61 6e 63 65 6c 2c 0d |ntFailed|Cancel,.|
|00000c90| 09 09 09 09 09 09 20 66 | 69 6c 65 2d 3e 6e 61 6d |...... f|ile->nam|
|00000ca0| 65 2c 20 4e 55 4c 4c 2c | 20 4e 55 4c 4c 2c 20 4e |e, NULL,| NULL, N|
|00000cb0| 55 4c 4c 29 29 0d 09 09 | 7b 0d 09 09 09 44 69 73 |ULL))...|{....Dis|
|00000cc0| 70 6f 73 65 48 61 6e 64 | 6c 65 28 28 48 61 6e 64 |poseHand|le((Hand|
|00000cd0| 6c 65 29 74 68 65 43 4b | 49 44 29 3b 0d 09 09 09 |le)theCK|ID);....|
|00000ce0| 52 61 69 73 65 45 72 72 | 6f 72 4e 75 6d 62 65 72 |RaiseErr|orNumber|
|00000cf0| 28 75 73 65 72 43 61 6e | 63 65 6c 65 64 45 72 72 |(userCan|celedErr|
|00000d00| 29 3b 0d 09 09 09 72 65 | 74 75 72 6e 3b 0d 09 09 |);....re|turn;...|
|00000d10| 7d 0d 09 09 0d 09 09 54 | 61 73 6b 44 6f 6e 65 28 |}......T|askDone(|
|00000d20| 29 3b 20 2f 2a 20 6e 6f | 74 20 72 65 61 6c 6c 79 |); /* no|t really|
|00000d30| 21 20 2a 2f 0d 09 09 54 | 61 73 6b 53 74 61 72 74 |! */...T|askStart|
|00000d40| 28 32 30 30 31 2c 20 32 | 2c 20 66 69 6c 65 2d 3e |(2001, 2|, file->|
|00000d50| 6e 61 6d 65 2c 20 4e 55 | 4c 4c 2c 20 4e 55 4c 4c |name, NU|LL, NULL|
|00000d60| 2c 20 4e 55 4c 4c 29 3b | 0d 09 09 65 72 72 20 3d |, NULL);|...err =|
|00000d70| 20 46 69 6c 65 43 61 6e | 63 65 6c 28 66 69 6c 65 | FileCan|cel(file|
|00000d80| 2c 20 74 68 65 43 4b 49 | 44 29 3b 0d 09 09 44 69 |, theCKI|D);...Di|
|00000d90| 73 70 6f 73 65 48 61 6e | 64 6c 65 28 28 48 61 6e |sposeHan|dle((Han|
|00000da0| 64 6c 65 29 74 68 65 43 | 4b 49 44 29 3b 0d 09 09 |dle)theC|KID);...|
|00000db0| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|00000dc0| 29 20 72 65 74 75 72 6e | 3b 0d 09 7d 0d 09 0d 09 |) return|;..}....|
|00000dd0| 2f 2a 20 6d 6f 64 69 66 | 79 20 74 68 65 20 6c 61 |/* modif|y the la|
|00000de0| 62 65 6c 20 74 6f 20 67 | 72 65 65 6e 20 28 32 29 |bel to g|reen (2)|
|00000df0| 20 2a 2f 0d 09 53 65 74 | 46 69 6c 65 4c 61 62 65 | */..Set|FileLabe|
|00000e00| 6c 28 66 69 6c 65 2c 20 | 32 2c 20 4e 55 4c 4c 29 |l(file, |2, NULL)|
|00000e10| 3b 0d 09 0d 09 44 69 73 | 70 6f 73 65 48 61 6e 64 |;....Dis|poseHand|
|00000e20| 6c 65 28 28 48 61 6e 64 | 6c 65 29 74 68 65 43 4b |le((Hand|le)theCK|
|00000e30| 49 44 29 3b 0d 09 54 61 | 73 6b 44 6f 6e 65 28 29 |ID);..Ta|skDone()|
|00000e40| 3b 0d 7d 0d 0d 0d 76 6f | 69 64 20 44 6f 46 69 6c |;.}...vo|id DoFil|
|00000e50| 65 4d 65 6e 75 28 73 68 | 6f 72 74 20 69 74 65 6d |eMenu(sh|ort item|
|00000e60| 49 44 29 0d 7b 0d 09 69 | 66 20 28 20 69 74 65 6d |ID).{..i|f ( item|
|00000e70| 49 44 20 3d 3d 20 31 20 | 29 0d 09 09 53 65 6c 65 |ID == 1 |)...Sele|
|00000e80| 63 74 46 69 6c 65 28 29 | 3b 09 09 2f 2f 20 63 61 |ctFile()|;..// ca|
|00000e90| 6c 6c 20 66 69 6c 65 20 | 73 65 6c 65 63 74 69 6f |ll file |selectio|
|00000ea0| 6e 20 75 73 65 72 50 72 | 6f 63 0d 09 65 6c 73 65 |n userPr|oc..else|
|00000eb0| 0d 09 09 53 65 6e 64 51 | 75 69 74 54 6f 53 65 6c |...SendQ|uitToSel|
|00000ec0| 66 28 29 3b 09 2f 2f 20 | 73 65 6e 64 20 73 65 6c |f();.// |send sel|
|00000ed0| 66 20 61 20 27 71 75 69 | 74 27 20 65 76 65 6e 74 |f a 'qui|t' event|
|00000ee0| 0d 7d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 01 00 00 00 01 ea | 00 00 00 ea 00 00 00 4a |........|.......J|
|00000f10| 01 00 00 0a 1e 2e 03 00 | 00 00 00 01 2d 78 e8 63 |........|....-x.c|
|00000f20| 72 5c 01 03 18 12 1c 2e | 00 13 01 2e 2e 4f 55 cc |r\......|.....OU.|
|00000f30| 0a 43 68 65 63 6b 4f 75 | 74 2e 63 6b 02 00 00 00 |.CheckOu|t.ck....|
|00000f40| 54 45 58 54 4d 50 53 20 | 01 00 01 10 00 28 00 00 |TEXTMPS |.....(..|
|00000f50| 00 00 54 45 58 54 4d 50 | 53 20 01 00 01 10 00 28 |..TEXTMP|S .....(|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 a5 13 ef da 00 00 | 0e 63 00 00 02 34 10 06 |........|.c...4..|
|00000f80| 56 90 60 4c 01 ff 82 cc | 96 12 4f ef 00 0c 11 66 |V.`L....|..O....f|
|00000f90| 10 57 72 50 01 04 e2 8a | 8d 67 01 66 a0 96 73 01 |.WrP....|.g.f..s.|
|00000fa0| 18 c0 ca 13 4e 5e 4e 75 | 4e 56 11 fd f0 5c 01 07 |....N^Nu|NV...\..|
|00000fb0| 18 8c 4d 01 26 6d 11 fe | 0c 51 7e 12 00 92 4e ad |..M.&m..|.Q~...N.|
|00000fc0| 01 2f ea 56 25 12 01 64 | 4e 91 67 de b4 03 b2 80 |./.V%..d|N.g.....|
|00000fd0| 57 c0 02 40 66 78 01 1c | 00 76 9a 14 42 10 48 78 |W..@fx..|.v..B.Hx|
|00000fe0| 0b ea 48 6e 9a 25 12 00 | 54 4e 91 76 11 fe 00 11 |..Hn.%..|TN.v....|
|00000ff0| 42 10 12 20 54 0c a8 02 | 43 4c 49 50 11 00 54 12 |B.. T...|CLIP..T.|
|00001000| 00 00 00 78 00 03 00 00 | 00 48 00 48 00 00 00 00 |...x....|.H.H....|
|00001010| 02 da 02 28 ff e1 ff e1 | 02 f9 02 45 03 47 05 28 |...(....|...E.G.(|
|00001020| 03 fc 00 02 00 00 00 48 | 00 48 00 00 00 00 02 da |.......H|.H......|
|00001030| 02 28 00 01 00 00 00 64 | 00 00 00 01 00 03 03 03 |.(.....d|........|
|00001040| 00 00 00 01 27 0f 00 01 | 00 01 00 00 00 00 00 00 |....'...|........|
|00001050| 00 00 00 00 00 00 68 08 | 00 19 01 90 00 00 00 00 |......h.|........|
|00001060| 20 00 00 00 00 00 00 00 | 00 00 00 01 00 00 00 00 | .......|........|
|00001070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 48 |........|.......H|
|00001080| 00 09 4d 6f 6e 61 63 6f | 00 00 00 00 00 ff 6d 30 |..Monaco|......m0|
|00001090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010a0| 00 00 00 06 00 04 00 16 | 04 12 02 61 06 0e 01 0f |........|...a....|
|000010b0| 00 05 01 db 02 7b ac 74 | c8 70 00 00 0d 4e 00 00 |.....{.t|.p...N..|
|000010c0| 0d 4e 00 00 09 03 01 00 | 00 00 00 1e 00 16 04 12 |.N......|........|
|000010d0| 02 61 06 0e 01 0f 00 05 | 01 db 02 7b 00 00 09 03 |.a......|...{....|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 01 00 00 00 |........|........|
|000010f0| 01 ea 00 00 00 ea 00 00 | 00 4a 00 e6 06 48 22 28 |........|.J...H"(|
|00001100| 00 00 00 1c 00 4a 00 00 | 4d 50 53 52 00 02 00 0a |.....J..|MPSR....|
|00001110| 03 ee ff ff 00 00 00 00 | 00 00 00 00 03 ed ff ff |........|........|
|00001120| 00 00 00 7c 00 00 00 00 | 03 f0 ff ff 00 00 00 c8 |...|....|........|
|00001130| 00 f0 b9 c8 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+