home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-09-07 | 12.1 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).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Sep 7 16:05:34 1995, modified Thu Sep 7 16:05:34 1995, creator 'MPS ', type ASCII, 11658 bytes "PDUtilities.c" , at 0x2e0a 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 |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 50 44 55 74 69 6c | 69 74 69 65 73 2e 63 00 |..PDUtil|ities.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 2d 8a 00 | 00 01 ac ac 75 01 0e ac |.....-..|....u...|
|00000060| 75 01 0e 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 3a 2b 00 00 |........|....:+..|
|00000080| 2f 2a 20 50 44 55 74 69 | 6c 69 74 69 65 73 2e 63 |/* PDUti|lities.c|
|00000090| 3a 20 55 74 69 6c 69 74 | 79 20 72 6f 75 74 69 6e |: Utilit|y routin|
|000000a0| 65 73 20 66 6f 72 20 50 | 72 6f 6a 65 63 74 44 72 |es for P|rojectDr|
|000000b0| 61 67 0d 20 2a 0d 20 2a | 20 41 20 73 65 74 20 6f |ag. *. *| A set o|
|000000c0| 66 20 61 70 70 6c 65 74 | 73 20 66 6f 72 20 64 72 |f applet|s for dr|
|000000d0| 61 67 20 61 6e 64 20 64 | 72 6f 70 20 73 6f 75 72 |ag and d|rop sour|
|000000e0| 63 65 20 63 6f 6e 74 72 | 6f 6c 20 62 79 20 54 69 |ce contr|ol by Ti|
|000000f0| 6d 20 4d 61 72 6f 6e 65 | 79 2e 0d 20 2a 20 53 65 |m Marone|y.. * Se|
|00000100| 65 20 64 65 76 65 6c 6f | 70 2c 20 69 73 73 75 65 |e develo|p, issue|
|00000110| 20 32 33 20 66 6f 72 20 | 64 65 74 61 69 6c 73 2e | 23 for |details.|
|00000120| 0d 20 2a 0d 20 2a 20 42 | 75 69 6c 74 20 6f 6e 20 |. *. * B|uilt on |
|00000130| 44 72 6f 70 53 68 65 6c | 6c 20 62 79 20 4c 65 6f |DropShel|l by Leo|
|00000140| 6e 61 72 64 20 52 6f 73 | 65 6e 74 68 6f 6c 2c 20 |nard Ros|enthol, |
|00000150| 53 74 65 70 68 61 6e 20 | 53 6f 6d 6f 67 79 69 2c |Stephan |Somogyi,|
|00000160| 20 61 6e 64 20 4d 61 72 | 73 68 61 6c 6c 20 43 6c | and Mar|shall Cl|
|00000170| 6f 77 2c 0d 20 2a 20 61 | 6e 64 20 75 73 69 6e 67 |ow,. * a|nd using|
|00000180| 20 74 68 65 20 4d 6f 72 | 65 46 69 6c 65 73 20 75 | the Mor|eFiles u|
|00000190| 74 69 6c 69 74 69 65 73 | 20 62 79 20 4a 69 6d 20 |tilities| by Jim |
|000001a0| 4c 75 74 68 65 72 2e 0d | 20 2a 0d 20 2a 20 54 68 |Luther..| *. * Th|
|000001b0| 69 73 20 73 6f 66 74 77 | 61 72 65 20 69 73 20 66 |is softw|are is f|
|000001c0| 72 65 65 2c 20 62 75 74 | 20 64 6f 6e 27 74 20 6d |ree, but| don't m|
|000001d0| 6f 64 69 66 79 20 61 6e | 64 20 72 65 64 69 73 74 |odify an|d redist|
|000001e0| 72 69 62 75 74 65 20 69 | 74 20 77 69 74 68 6f 75 |ribute i|t withou|
|000001f0| 74 0d 20 2a 20 63 68 61 | 6e 67 69 6e 67 20 74 68 |t. * cha|nging th|
|00000200| 65 20 73 74 61 74 75 73 | 20 77 69 6e 64 6f 77 20 |e status| window |
|00000210| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 79 6f 75 72 |to indic|ate your|
|00000220| 20 6e 61 6d 65 20 61 6e | 64 20 79 6f 75 72 20 63 | name an|d your c|
|00000230| 68 61 6e 67 65 73 21 0d | 20 2a 2f 0d 20 0d 23 69 |hanges!.| */. .#i|
|00000240| 6e 63 6c 75 64 65 20 3c | 45 72 72 6f 72 73 2e 68 |nclude <|Errors.h|
|00000250| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 46 6f 6c 64 |>.#inclu|de <Fold|
|00000260| 65 72 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ers.h>.#|include |
|00000270| 3c 52 65 73 6f 75 72 63 | 65 73 2e 68 3e 0d 23 69 |<Resourc|es.h>.#i|
|00000280| 6e 63 6c 75 64 65 20 3c | 53 63 72 69 70 74 2e 68 |nclude <|Script.h|
|00000290| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 44 69 61 6c |>.#inclu|de <Dial|
|000002a0| 6f 67 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ogs.h>.#|include |
|000002b0| 3c 54 6f 6f 6c 55 74 69 | 6c 73 2e 68 3e 0d 23 69 |<ToolUti|ls.h>.#i|
|000002c0| 6e 63 6c 75 64 65 20 3c | 46 69 6e 64 65 72 2e 68 |nclude <|Finder.h|
|000002d0| 3e 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 50 44 55 |>..#incl|ude "PDU|
|000002e0| 74 69 6c 69 74 69 65 73 | 2e 68 22 0d 23 69 6e 63 |tilities|.h".#inc|
|000002f0| 6c 75 64 65 20 22 4d 6f | 72 65 46 69 6c 65 73 45 |lude "Mo|reFilesE|
|00000300| 78 74 72 61 73 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |xtras.h"|.#includ|
|00000310| 65 20 22 44 53 55 74 69 | 6c 73 2e 68 22 0d 0d 0d |e "DSUti|ls.h"...|
|00000320| 2f 2a 20 75 74 69 6c 69 | 74 79 20 72 6f 75 74 69 |/* utili|ty routi|
|00000330| 6e 65 20 74 6f 20 66 69 | 6e 64 20 28 61 6e 64 20 |ne to fi|nd (and |
|00000340| 63 72 65 61 74 65 20 69 | 66 20 6e 65 63 65 73 73 |create i|f necess|
|00000350| 73 61 72 79 29 20 74 68 | 65 20 50 72 6f 6a 65 63 |sary) th|e Projec|
|00000360| 74 44 72 61 67 0d 20 2a | 20 50 72 65 66 65 72 65 |tDrag. *| Prefere|
|00000370| 6e 63 65 73 20 66 6f 6c | 64 65 72 20 69 6e 73 69 |nces fol|der insi|
|00000380| 64 65 20 74 68 65 20 53 | 79 73 74 65 6d 20 46 6f |de the S|ystem Fo|
|00000390| 6c 64 65 72 27 73 20 50 | 72 65 66 65 72 65 6e 63 |lder's P|referenc|
|000003a0| 65 73 20 66 6f 6c 64 65 | 72 0d 20 2a 2f 0d 20 0d |es folde|r. */. .|
|000003b0| 4f 53 45 72 72 20 46 69 | 6e 64 50 72 65 66 65 72 |OSErr Fi|ndPrefer|
|000003c0| 65 6e 63 65 73 46 6f 6c | 64 65 72 28 73 68 6f 72 |encesFol|der(shor|
|000003d0| 74 20 2a 76 52 65 66 4e | 75 6d 2c 20 6c 6f 6e 67 |t *vRefN|um, long|
|000003e0| 20 2a 66 6f 6c 64 65 72 | 49 44 29 0d 7b 0d 09 4f | *folder|ID).{..O|
|000003f0| 53 45 72 72 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |SErr err| = noErr|
|00000400| 3b 0d 09 46 53 53 70 65 | 63 20 6f 75 72 46 6f 6c |;..FSSpe|c ourFol|
|00000410| 64 65 72 3b 0d 09 42 6f | 6f 6c 65 61 6e 20 69 73 |der;..Bo|olean is|
|00000420| 46 6f 6c 64 65 72 3b 0d | 09 0d 09 65 72 72 20 3d |Folder;.|...err =|
|00000430| 20 46 69 6e 64 46 6f 6c | 64 65 72 20 28 6b 4f 6e | FindFol|der (kOn|
|00000440| 53 79 73 74 65 6d 44 69 | 73 6b 2c 20 6b 50 72 65 |SystemDi|sk, kPre|
|00000450| 66 65 72 65 6e 63 65 73 | 46 6f 6c 64 65 72 54 79 |ferences|FolderTy|
|00000460| 70 65 2c 20 74 72 75 65 | 2c 20 26 6f 75 72 46 6f |pe, true|, &ourFo|
|00000470| 6c 64 65 72 2e 76 52 65 | 66 4e 75 6d 2c 20 26 6f |lder.vRe|fNum, &o|
|00000480| 75 72 46 6f 6c 64 65 72 | 2e 70 61 72 49 44 29 3b |urFolder|.parID);|
|00000490| 0d 09 69 66 20 28 65 72 | 72 20 21 3d 20 6e 6f 45 |..if (er|r != noE|
|000004a0| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 65 72 72 |rr)...re|turn err|
|000004b0| 3b 0d 09 47 65 74 49 6e | 64 53 74 72 69 6e 67 28 |;..GetIn|dString(|
|000004c0| 6f 75 72 46 6f 6c 64 65 | 72 2e 6e 61 6d 65 2c 20 |ourFolde|r.name, |
|000004d0| 6b 50 72 6f 6a 65 63 74 | 44 72 61 67 53 74 72 69 |kProject|DragStri|
|000004e0| 6e 67 73 2c 20 6b 50 72 | 65 66 73 46 6f 6c 64 65 |ngs, kPr|efsFolde|
|000004f0| 72 4e 61 6d 65 29 3b 0d | 09 65 72 72 20 3d 20 44 |rName);.|.err = D|
|00000500| 69 72 49 44 46 72 6f 6d | 46 53 53 70 65 63 28 26 |irIDFrom|FSSpec(&|
|00000510| 6f 75 72 46 6f 6c 64 65 | 72 2c 20 66 6f 6c 64 65 |ourFolde|r, folde|
|00000520| 72 49 44 2c 20 26 69 73 | 46 6f 6c 64 65 72 29 3b |rID, &is|Folder);|
|00000530| 0d 09 69 66 20 28 65 72 | 72 20 3d 3d 20 64 69 72 |..if (er|r == dir|
|00000540| 4e 46 45 72 72 20 7c 7c | 20 65 72 72 20 3d 3d 20 |NFErr ||| err == |
|00000550| 66 6e 66 45 72 72 29 0d | 09 09 65 72 72 20 3d 20 |fnfErr).|..err = |
|00000560| 46 53 70 44 69 72 43 72 | 65 61 74 65 28 26 6f 75 |FSpDirCr|eate(&ou|
|00000570| 72 46 6f 6c 64 65 72 2c | 20 73 6d 53 79 73 74 65 |rFolder,| smSyste|
|00000580| 6d 53 63 72 69 70 74 2c | 20 66 6f 6c 64 65 72 49 |mScript,| folderI|
|00000590| 44 29 3b 0d 09 65 6c 73 | 65 20 69 66 20 28 21 69 |D);..els|e if (!i|
|000005a0| 73 46 6f 6c 64 65 72 29 | 0d 09 09 65 72 72 20 3d |sFolder)|...err =|
|000005b0| 20 64 69 72 4e 46 45 72 | 72 3b 20 2f 2a 20 69 73 | dirNFEr|r; /* is|
|000005c0| 6e 27 74 20 74 68 65 72 | 65 20 61 6e 20 69 73 41 |n't ther|e an isA|
|000005d0| 46 69 6c 65 45 72 72 3f | 20 2a 2f 0d 09 69 66 20 |FileErr?| */..if |
|000005e0| 28 65 72 72 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 09 |(err == |noErr)..|
|000005f0| 09 2a 76 52 65 66 4e 75 | 6d 20 3d 20 6f 75 72 46 |.*vRefNu|m = ourF|
|00000600| 6f 6c 64 65 72 2e 76 52 | 65 66 4e 75 6d 3b 0d 09 |older.vR|efNum;..|
|00000610| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 7d 0d 0d 0d |return e|rr;.}...|
|00000620| 76 6f 69 64 20 41 70 70 | 65 6e 64 53 74 72 69 6e |void App|endStrin|
|00000630| 67 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |g(unsign|ed char |
|00000640| 2a 6f 72 69 67 69 6e 61 | 6c 2c 20 75 6e 73 69 67 |*origina|l, unsig|
|00000650| 6e 65 64 20 63 68 61 72 | 20 2a 61 70 70 65 6e 64 |ned char| *append|
|00000660| 29 0d 09 2f 2f 20 61 70 | 70 65 6e 64 20 6f 6e 65 |)..// ap|pend one|
|00000670| 20 50 61 73 63 61 6c 20 | 73 74 72 69 6e 67 20 74 | Pascal |string t|
|00000680| 6f 20 61 6e 6f 74 68 65 | 72 0d 7b 0d 09 69 6e 74 |o anothe|r.{..int|
|00000690| 20 6c 65 6e 67 74 68 3b | 0d 09 69 66 20 28 6f 72 | length;|..if (or|
|000006a0| 69 67 69 6e 61 6c 20 3d | 3d 20 30 20 7c 7c 20 61 |iginal =|= 0 || a|
|000006b0| 70 70 65 6e 64 20 3d 3d | 20 30 29 20 72 65 74 75 |ppend ==| 0) retu|
|000006c0| 72 6e 3b 0d 09 6c 65 6e | 67 74 68 20 3d 20 61 70 |rn;..len|gth = ap|
|000006d0| 70 65 6e 64 5b 30 5d 3b | 0d 09 69 66 20 28 6f 72 |pend[0];|..if (or|
|000006e0| 69 67 69 6e 61 6c 5b 30 | 5d 20 2b 20 6c 65 6e 67 |iginal[0|] + leng|
|000006f0| 74 68 20 3e 20 32 35 35 | 29 0d 09 09 6c 65 6e 67 |th > 255|)...leng|
|00000700| 74 68 20 3d 20 32 35 35 | 20 2d 20 6f 72 69 67 69 |th = 255| - origi|
|00000710| 6e 61 6c 5b 30 5d 3b 0d | 09 69 66 20 28 6c 65 6e |nal[0];.|.if (len|
|00000720| 67 74 68 20 3d 3d 20 30 | 29 20 72 65 74 75 72 6e |gth == 0|) return|
|00000730| 3b 0d 09 42 6c 6f 63 6b | 4d 6f 76 65 28 61 70 70 |;..Block|Move(app|
|00000740| 65 6e 64 20 2b 20 31 2c | 20 6f 72 69 67 69 6e 61 |end + 1,| origina|
|00000750| 6c 20 2b 20 6f 72 69 67 | 69 6e 61 6c 5b 30 5d 20 |l + orig|inal[0] |
|00000760| 2b 20 31 2c 20 6c 65 6e | 67 74 68 29 3b 0d 09 6f |+ 1, len|gth);..o|
|00000770| 72 69 67 69 6e 61 6c 5b | 30 5d 20 2b 3d 20 6c 65 |riginal[|0] += le|
|00000780| 6e 67 74 68 3b 0d 7d 0d | 0d 0d 4f 53 45 72 72 20 |ngth;.}.|..OSErr |
|00000790| 50 72 6f 63 65 73 73 46 | 69 6c 65 4f 72 46 6f 6c |ProcessF|ileOrFol|
|000007a0| 64 65 72 28 46 53 53 70 | 65 63 20 2a 73 70 65 63 |der(FSSp|ec *spec|
|000007b0| 2c 20 76 6f 69 64 20 28 | 2a 64 6f 46 69 6c 65 29 |, void (|*doFile)|
|000007c0| 28 46 53 53 70 65 63 20 | 2a 73 70 65 63 2c 20 42 |(FSSpec |*spec, B|
|000007d0| 6f 6f 6c 65 61 6e 20 64 | 6f 69 6e 67 46 6f 6c 64 |oolean d|oingFold|
|000007e0| 65 72 29 2c 0d 09 09 09 | 09 09 09 20 4f 53 45 72 |er),....|... OSEr|
|000007f0| 72 20 28 2a 64 6f 46 6f | 6c 64 65 72 29 28 73 68 |r (*doFo|lder)(sh|
|00000800| 6f 72 74 20 76 52 65 66 | 4e 75 6d 2c 20 6c 6f 6e |ort vRef|Num, lon|
|00000810| 67 20 66 6f 6c 64 65 72 | 49 44 2c 0d 09 09 09 09 |g folder|ID,.....|
|00000820| 09 09 20 09 09 09 09 20 | 20 76 6f 69 64 20 28 2a |.. .... | void (*|
|00000830| 64 6f 46 69 6c 65 29 28 | 46 53 53 70 65 63 20 2a |doFile)(|FSSpec *|
|00000840| 73 70 65 63 2c 20 42 6f | 6f 6c 65 61 6e 20 64 6f |spec, Bo|olean do|
|00000850| 69 6e 67 46 6f 6c 64 65 | 72 29 29 29 0d 7b 0d 09 |ingFolde|r))).{..|
|00000860| 69 66 20 28 73 70 65 63 | 2d 3e 6e 61 6d 65 5b 30 |if (spec|->name[0|
|00000870| 5d 20 3d 3d 20 30 29 0d | 09 7b 0d 09 09 72 65 74 |] == 0).|.{...ret|
|00000880| 75 72 6e 20 28 2a 64 6f | 46 6f 6c 64 65 72 29 28 |urn (*do|Folder)(|
|00000890| 73 70 65 63 2d 3e 76 52 | 65 66 4e 75 6d 2c 20 73 |spec->vR|efNum, s|
|000008a0| 70 65 63 2d 3e 70 61 72 | 49 44 2c 20 64 6f 46 69 |pec->par|ID, doFi|
|000008b0| 6c 65 29 3b 0d 09 7d 0d | 09 65 6c 73 65 0d 09 7b |le);..}.|.else..{|
|000008c0| 0d 09 09 43 49 6e 66 6f | 50 42 52 65 63 20 70 62 |...CInfo|PBRec pb|
|000008d0| 3b 0d 09 09 0d 09 09 70 | 62 2e 68 46 69 6c 65 49 |;......p|b.hFileI|
|000008e0| 6e 66 6f 2e 69 6f 56 52 | 65 66 4e 75 6d 20 3d 20 |nfo.ioVR|efNum = |
|000008f0| 73 70 65 63 2d 3e 76 52 | 65 66 4e 75 6d 3b 0d 09 |spec->vR|efNum;..|
|00000900| 09 70 62 2e 68 46 69 6c | 65 49 6e 66 6f 2e 69 6f |.pb.hFil|eInfo.io|
|00000910| 44 69 72 49 44 20 3d 20 | 73 70 65 63 2d 3e 70 61 |DirID = |spec->pa|
|00000920| 72 49 44 3b 0d 09 09 70 | 62 2e 68 46 69 6c 65 49 |rID;...p|b.hFileI|
|00000930| 6e 66 6f 2e 69 6f 4e 61 | 6d 65 50 74 72 20 3d 20 |nfo.ioNa|mePtr = |
|00000940| 73 70 65 63 2d 3e 6e 61 | 6d 65 3b 0d 09 09 70 62 |spec->na|me;...pb|
|00000950| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 46 44 69 |.hFileIn|fo.ioFDi|
|00000960| 72 49 6e 64 65 78 20 3d | 20 28 73 70 65 63 2d 3e |rIndex =| (spec->|
|00000970| 6e 61 6d 65 5b 30 5d 20 | 3d 3d 20 30 29 20 3f 20 |name[0] |== 0) ? |
|00000980| 2d 31 20 3a 20 30 3b 0d | 09 09 50 42 47 65 74 43 |-1 : 0;.|..PBGetC|
|00000990| 61 74 49 6e 66 6f 53 79 | 6e 63 28 26 70 62 29 3b |atInfoSy|nc(&pb);|
|000009a0| 0d 09 09 69 66 20 28 70 | 62 2e 68 46 69 6c 65 49 |...if (p|b.hFileI|
|000009b0| 6e 66 6f 2e 69 6f 52 65 | 73 75 6c 74 20 21 3d 20 |nfo.ioRe|sult != |
|000009c0| 6e 6f 45 72 72 29 20 72 | 65 74 75 72 6e 20 70 62 |noErr) r|eturn pb|
|000009d0| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 52 65 73 |.hFileIn|fo.ioRes|
|000009e0| 75 6c 74 3b 0d 09 09 69 | 66 20 28 28 70 62 2e 68 |ult;...i|f ((pb.h|
|000009f0| 46 69 6c 65 49 6e 66 6f | 2e 69 6f 46 6c 41 74 74 |FileInfo|.ioFlAtt|
|00000a00| 72 69 62 20 26 20 30 78 | 31 30 29 20 3d 3d 20 30 |rib & 0x|10) == 0|
|00000a10| 29 0d 09 09 09 28 2a 64 | 6f 46 69 6c 65 29 28 73 |)....(*d|oFile)(s|
|00000a20| 70 65 63 2c 20 66 61 6c | 73 65 29 3b 0d 09 09 65 |pec, fal|se);...e|
|00000a30| 6c 73 65 0d 09 09 09 28 | 2a 64 6f 46 6f 6c 64 65 |lse....(|*doFolde|
|00000a40| 72 29 28 73 70 65 63 2d | 3e 76 52 65 66 4e 75 6d |r)(spec-|>vRefNum|
|00000a50| 2c 20 70 62 2e 64 69 72 | 49 6e 66 6f 2e 69 6f 44 |, pb.dir|Info.ioD|
|00000a60| 72 44 69 72 49 44 2c 20 | 64 6f 46 69 6c 65 29 3b |rDirID, |doFile);|
|00000a70| 0d 09 7d 0d 09 72 65 74 | 75 72 6e 20 6e 6f 45 72 |..}..ret|urn noEr|
|00000a80| 72 3b 0d 7d 0d 0d 0d 4f | 53 45 72 72 20 50 72 6f |r;.}...O|SErr Pro|
|00000a90| 63 65 73 73 46 6f 6c 64 | 65 72 28 73 68 6f 72 74 |cessFold|er(short|
|00000aa0| 20 76 52 65 66 4e 75 6d | 2c 20 6c 6f 6e 67 20 66 | vRefNum|, long f|
|00000ab0| 6f 6c 64 65 72 49 44 2c | 20 76 6f 69 64 20 28 2a |olderID,| void (*|
|00000ac0| 64 6f 46 69 6c 65 29 28 | 46 53 53 70 65 63 20 2a |doFile)(|FSSpec *|
|00000ad0| 73 70 65 63 2c 20 42 6f | 6f 6c 65 61 6e 20 64 6f |spec, Bo|olean do|
|00000ae0| 69 6e 67 46 6f 6c 64 65 | 72 29 29 0d 7b 0d 09 43 |ingFolde|r)).{..C|
|00000af0| 49 6e 66 6f 50 42 52 65 | 63 20 70 62 3b 0d 09 4f |InfoPBRe|c pb;..O|
|00000b00| 53 45 72 72 20 65 72 72 | 20 3d 20 6e 6f 45 72 72 |SErr err| = noErr|
|00000b10| 3b 0d 09 0d 09 2f 2a 20 | 66 6f 72 20 61 6c 6c 20 |;..../* |for all |
|00000b20| 74 68 65 20 69 74 65 6d | 73 20 69 6e 20 74 68 65 |the item|s in the|
|00000b30| 20 66 6f 6c 64 65 72 20 | 2a 2f 0d 09 66 6f 72 20 | folder |*/..for |
|00000b40| 28 70 62 2e 68 46 69 6c | 65 49 6e 66 6f 2e 69 6f |(pb.hFil|eInfo.io|
|00000b50| 46 44 69 72 49 6e 64 65 | 78 20 3d 20 31 3b 20 65 |FDirInde|x = 1; e|
|00000b60| 72 72 20 3d 3d 20 6e 6f | 45 72 72 20 26 26 20 21 |rr == no|Err && !|
|00000b70| 67 44 6f 6e 65 3b 20 70 | 62 2e 68 46 69 6c 65 49 |gDone; p|b.hFileI|
|00000b80| 6e 66 6f 2e 69 6f 46 44 | 69 72 49 6e 64 65 78 2b |nfo.ioFD|irIndex+|
|00000b90| 2b 29 0d 09 7b 0d 09 09 | 46 53 53 70 65 63 20 73 |+)..{...|FSSpec s|
|00000ba0| 70 65 63 3b 0d 09 09 42 | 6f 6f 6c 65 61 6e 20 69 |pec;...B|oolean i|
|00000bb0| 73 46 69 6c 65 3b 0d 0d | 09 09 73 70 65 63 2e 6e |sFile;..|..spec.n|
|00000bc0| 61 6d 65 5b 30 5d 20 3d | 20 30 3b 0d 09 09 70 62 |ame[0] =| 0;...pb|
|00000bd0| 2e 68 46 69 6c 65 49 6e | 66 6f 2e 69 6f 4e 61 6d |.hFileIn|fo.ioNam|
|00000be0| 65 50 74 72 20 3d 20 73 | 70 65 63 2e 6e 61 6d 65 |ePtr = s|pec.name|
|00000bf0| 3b 0d 09 09 70 62 2e 68 | 46 69 6c 65 49 6e 66 6f |;...pb.h|FileInfo|
|00000c00| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 76 52 65 |.ioVRefN|um = vRe|
|00000c10| 66 4e 75 6d 3b 0d 09 09 | 70 62 2e 68 46 69 6c 65 |fNum;...|pb.hFile|
|00000c20| 49 6e 66 6f 2e 69 6f 44 | 69 72 49 44 20 3d 20 66 |Info.ioD|irID = f|
|00000c30| 6f 6c 64 65 72 49 44 3b | 0d 09 09 65 72 72 20 3d |olderID;|...err =|
|00000c40| 20 50 42 47 65 74 43 61 | 74 49 6e 66 6f 53 79 6e | PBGetCa|tInfoSyn|
|00000c50| 63 28 26 70 62 29 3b 0d | 09 09 69 66 20 28 65 72 |c(&pb);.|..if (er|
|00000c60| 72 20 21 3d 20 6e 6f 45 | 72 72 29 20 62 72 65 61 |r != noE|rr) brea|
|00000c70| 6b 3b 0d 09 09 0d 09 09 | 69 73 46 69 6c 65 20 3d |k;......|isFile =|
|00000c80| 20 28 28 70 62 2e 68 46 | 69 6c 65 49 6e 66 6f 2e | ((pb.hF|ileInfo.|
|00000c90| 69 6f 46 6c 41 74 74 72 | 69 62 20 26 20 30 78 31 |ioFlAttr|ib & 0x1|
|00000ca0| 30 29 20 3d 3d 20 30 29 | 3b 0d 09 09 0d 09 09 69 |0) == 0)|;......i|
|00000cb0| 66 20 28 69 73 46 69 6c | 65 29 0d 09 09 7b 0d 09 |f (isFil|e)...{..|
|00000cc0| 09 09 73 70 65 63 2e 76 | 52 65 66 4e 75 6d 20 3d |..spec.v|RefNum =|
|00000cd0| 20 76 52 65 66 4e 75 6d | 3b 0d 09 09 09 73 70 65 | vRefNum|;....spe|
|00000ce0| 63 2e 70 61 72 49 44 20 | 3d 20 66 6f 6c 64 65 72 |c.parID |= folder|
|00000cf0| 49 44 3b 0d 09 09 09 28 | 2a 64 6f 46 69 6c 65 29 |ID;....(|*doFile)|
|00000d00| 28 26 73 70 65 63 2c 20 | 74 72 75 65 29 3b 0d 09 |(&spec, |true);..|
|00000d10| 09 7d 0d 09 09 65 6c 73 | 65 0d 09 09 7b 0d 09 09 |.}...els|e...{...|
|00000d20| 09 50 72 6f 63 65 73 73 | 46 6f 6c 64 65 72 28 76 |.Process|Folder(v|
|00000d30| 52 65 66 4e 75 6d 2c 20 | 70 62 2e 64 69 72 49 6e |RefNum, |pb.dirIn|
|00000d40| 66 6f 2e 69 6f 44 72 44 | 69 72 49 44 2c 20 64 6f |fo.ioDrD|irID, do|
|00000d50| 46 69 6c 65 29 3b 0d 09 | 09 7d 0d 09 7d 0d 09 69 |File);..|.}..}..i|
|00000d60| 66 20 28 65 72 72 20 3d | 3d 20 66 6e 66 45 72 72 |f (err =|= fnfErr|
|00000d70| 29 0d 09 09 65 72 72 20 | 3d 20 6e 6f 45 72 72 3b |)...err |= noErr;|
|00000d80| 20 2f 2a 20 65 6e 64 20 | 6f 66 20 6c 6f 6f 70 20 | /* end |of loop |
|00000d90| 2a 2f 0d 09 72 65 74 75 | 72 6e 20 65 72 72 3b 0d |*/..retu|rn err;.|
|00000da0| 7d 0d 0d 0d 4f 53 45 72 | 72 20 4d 61 6b 65 46 75 |}...OSEr|r MakeFu|
|00000db0| 6c 6c 50 61 74 68 4e 61 | 6d 65 28 46 53 53 70 65 |llPathNa|me(FSSpe|
|00000dc0| 63 20 2a 73 70 65 63 2c | 20 53 74 72 32 35 35 20 |c *spec,| Str255 |
|00000dd0| 66 75 6c 6c 50 61 74 68 | 4e 61 6d 65 29 0d 7b 0d |fullPath|Name).{.|
|00000de0| 09 43 49 6e 66 6f 50 42 | 52 65 63 20 70 62 3b 0d |.CInfoPB|Rec pb;.|
|00000df0| 09 4f 53 45 72 72 20 65 | 72 72 20 3d 20 6e 6f 45 |.OSErr e|rr = noE|
|00000e00| 72 72 3b 0d 09 73 68 6f | 72 74 20 76 52 65 66 4e |rr;..sho|rt vRefN|
|00000e10| 75 6d 20 3d 20 73 70 65 | 63 2d 3e 76 52 65 66 4e |um = spe|c->vRefN|
|00000e20| 75 6d 3b 0d 09 6c 6f 6e | 67 20 66 6f 6c 64 65 72 |um;..lon|g folder|
|00000e30| 49 44 20 3d 20 73 70 65 | 63 2d 3e 70 61 72 49 44 |ID = spe|c->parID|
|00000e40| 3b 0d 09 0d 09 69 66 20 | 28 73 70 65 63 2d 3e 6e |;....if |(spec->n|
|00000e50| 61 6d 65 5b 30 5d 20 3d | 3d 20 30 29 0d 09 09 66 |ame[0] =|= 0)...f|
|00000e60| 75 6c 6c 50 61 74 68 4e | 61 6d 65 5b 30 5d 20 3d |ullPathN|ame[0] =|
|00000e70| 20 30 3b 0d 09 65 6c 73 | 65 0d 09 09 42 6c 6f 63 | 0;..els|e...Bloc|
|00000e80| 6b 4d 6f 76 65 28 73 70 | 65 63 2d 3e 6e 61 6d 65 |kMove(sp|ec->name|
|00000e90| 2c 20 66 75 6c 6c 50 61 | 74 68 4e 61 6d 65 2c 20 |, fullPa|thName, |
|00000ea0| 73 70 65 63 2d 3e 6e 61 | 6d 65 5b 30 5d 20 2b 20 |spec->na|me[0] + |
|00000eb0| 31 29 3b 0d 09 0d 09 64 | 6f 0d 09 7b 0d 09 09 53 |1);....d|o..{...S|
|00000ec0| 74 72 33 31 20 66 6f 6c | 64 65 72 4e 61 6d 65 3b |tr31 fol|derName;|
|00000ed0| 0d 0d 09 09 66 6f 6c 64 | 65 72 4e 61 6d 65 5b 30 |....fold|erName[0|
|00000ee0| 5d 20 3d 20 30 3b 0d 09 | 09 70 62 2e 68 46 69 6c |] = 0;..|.pb.hFil|
|00000ef0| 65 49 6e 66 6f 2e 69 6f | 4e 61 6d 65 50 74 72 20 |eInfo.io|NamePtr |
|00000f00| 3d 20 66 6f 6c 64 65 72 | 4e 61 6d 65 3b 0d 09 09 |= folder|Name;...|
|00000f10| 70 62 2e 68 46 69 6c 65 | 49 6e 66 6f 2e 69 6f 56 |pb.hFile|Info.ioV|
|00000f20| 52 65 66 4e 75 6d 20 3d | 20 76 52 65 66 4e 75 6d |RefNum =| vRefNum|
|00000f30| 3b 0d 09 09 70 62 2e 68 | 46 69 6c 65 49 6e 66 6f |;...pb.h|FileInfo|
|00000f40| 2e 69 6f 44 69 72 49 44 | 20 3d 20 66 6f 6c 64 65 |.ioDirID| = folde|
|00000f50| 72 49 44 3b 0d 09 09 70 | 62 2e 68 46 69 6c 65 49 |rID;...p|b.hFileI|
|00000f60| 6e 66 6f 2e 69 6f 46 44 | 69 72 49 6e 64 65 78 20 |nfo.ioFD|irIndex |
|00000f70| 3d 20 2d 31 3b 0d 09 09 | 65 72 72 20 3d 20 50 42 |= -1;...|err = PB|
|00000f80| 47 65 74 43 61 74 49 6e | 66 6f 53 79 6e 63 28 26 |GetCatIn|foSync(&|
|00000f90| 70 62 29 3b 0d 09 09 69 | 66 20 28 65 72 72 20 3d |pb);...i|f (err =|
|00000fa0| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 7b 0d 09 09 09 |= noErr)|...{....|
|00000fb0| 69 66 20 28 66 75 6c 6c | 50 61 74 68 4e 61 6d 65 |if (full|PathName|
|00000fc0| 5b 30 5d 20 3e 20 30 29 | 0d 09 09 09 09 42 6c 6f |[0] > 0)|.....Blo|
|00000fd0| 63 6b 4d 6f 76 65 28 66 | 75 6c 6c 50 61 74 68 4e |ckMove(f|ullPathN|
|00000fe0| 61 6d 65 20 2b 20 31 2c | 20 66 75 6c 6c 50 61 74 |ame + 1,| fullPat|
|00000ff0| 68 4e 61 6d 65 20 2b 20 | 32 20 2b 20 66 6f 6c 64 |hName + |2 + fold|
|00001000| 65 72 4e 61 6d 65 5b 30 | 5d 2c 20 66 75 6c 6c 50 |erName[0|], fullP|
|00001010| 61 74 68 4e 61 6d 65 5b | 30 5d 29 3b 0d 09 09 09 |athName[|0]);....|
|00001020| 42 6c 6f 63 6b 4d 6f 76 | 65 28 66 6f 6c 64 65 72 |BlockMov|e(folder|
|00001030| 4e 61 6d 65 20 2b 20 31 | 2c 20 66 75 6c 6c 50 61 |Name + 1|, fullPa|
|00001040| 74 68 4e 61 6d 65 20 2b | 20 31 2c 20 66 6f 6c 64 |thName +| 1, fold|
|00001050| 65 72 4e 61 6d 65 5b 30 | 5d 29 3b 0d 09 09 09 66 |erName[0|]);....f|
|00001060| 75 6c 6c 50 61 74 68 4e | 61 6d 65 5b 66 6f 6c 64 |ullPathN|ame[fold|
|00001070| 65 72 4e 61 6d 65 5b 30 | 5d 20 2b 20 31 5d 20 3d |erName[0|] + 1] =|
|00001080| 20 27 3a 27 3b 0d 09 09 | 09 66 75 6c 6c 50 61 74 | ':';...|.fullPat|
|00001090| 68 4e 61 6d 65 5b 30 5d | 20 2b 3d 20 66 6f 6c 64 |hName[0]| += fold|
|000010a0| 65 72 4e 61 6d 65 5b 30 | 5d 20 2b 20 31 3b 0d 09 |erName[0|] + 1;..|
|000010b0| 09 09 66 6f 6c 64 65 72 | 49 44 20 3d 20 70 62 2e |..folder|ID = pb.|
|000010c0| 64 69 72 49 6e 66 6f 2e | 69 6f 44 72 50 61 72 49 |dirInfo.|ioDrParI|
|000010d0| 44 3b 0d 09 09 7d 0d 09 | 7d 20 77 68 69 6c 65 20 |D;...}..|} while |
|000010e0| 28 65 72 72 20 3d 3d 20 | 6e 6f 45 72 72 20 26 26 |(err == |noErr &&|
|000010f0| 20 66 6f 6c 64 65 72 49 | 44 20 21 3d 20 66 73 52 | folderI|D != fsR|
|00001100| 74 50 61 72 49 44 29 3b | 0d 09 72 65 74 75 72 6e |tParID);|..return|
|00001110| 20 65 72 72 3b 0d 7d 0d | 0d 0d 4f 53 45 72 72 20 | err;.}.|..OSErr |
|00001120| 45 78 74 72 61 63 74 43 | 4b 49 44 28 46 53 53 70 |ExtractC|KID(FSSp|
|00001130| 65 63 20 2a 66 69 6c 65 | 2c 20 43 4b 49 44 48 61 |ec *file|, CKIDHa|
|00001140| 6e 64 6c 65 20 2a 74 68 | 65 43 4b 49 44 29 0d 7b |ndle *th|eCKID).{|
|00001150| 0d 09 2f 2a 20 6f 70 65 | 6e 20 74 68 65 20 72 65 |../* ope|n the re|
|00001160| 73 6f 75 72 63 65 20 66 | 69 6c 65 20 2a 2f 0d 09 |source f|ile */..|
|00001170| 73 68 6f 72 74 20 72 65 | 66 4e 75 6d 20 3d 20 46 |short re|fNum = F|
|00001180| 53 70 4f 70 65 6e 52 65 | 73 46 69 6c 65 28 66 69 |SpOpenRe|sFile(fi|
|00001190| 6c 65 2c 20 66 73 52 64 | 50 65 72 6d 29 3b 0d 09 |le, fsRd|Perm);..|
|000011a0| 69 66 20 28 72 65 66 4e | 75 6d 20 3c 20 30 29 0d |if (refN|um < 0).|
|000011b0| 09 09 72 65 74 75 72 6e | 20 52 65 73 45 72 72 6f |..return| ResErro|
|000011c0| 72 28 29 3b 0d 09 0d 09 | 2f 2a 20 67 65 74 20 74 |r();....|/* get t|
|000011d0| 68 65 20 43 4b 49 44 20 | 66 72 6f 6d 20 69 74 20 |he CKID |from it |
|000011e0| 61 6e 64 20 63 6c 6f 6e | 65 20 69 74 20 2a 2f 0d |and clon|e it */.|
|000011f0| 09 2a 74 68 65 43 4b 49 | 44 20 3d 20 28 43 4b 49 |.*theCKI|D = (CKI|
|00001200| 44 48 61 6e 64 6c 65 29 | 20 47 65 74 31 49 6e 64 |DHandle)| Get1Ind|
|00001210| 52 65 73 6f 75 72 63 65 | 28 27 63 6b 69 64 27 2c |Resource|('ckid',|
|00001220| 20 31 29 3b 0d 09 69 66 | 20 28 2a 74 68 65 43 4b | 1);..if| (*theCK|
|00001230| 49 44 20 3d 3d 20 4e 55 | 4c 4c 29 0d 09 7b 0d 09 |ID == NU|LL)..{..|
|00001240| 09 43 6c 6f 73 65 52 65 | 73 46 69 6c 65 28 72 65 |.CloseRe|sFile(re|
|00001250| 66 4e 75 6d 29 3b 0d 09 | 09 72 65 74 75 72 6e 20 |fNum);..|.return |
|00001260| 72 65 73 4e 6f 74 46 6f | 75 6e 64 3b 0d 09 7d 0d |resNotFo|und;..}.|
|00001270| 09 44 65 74 61 63 68 52 | 65 73 6f 75 72 63 65 28 |.DetachR|esource(|
|00001280| 28 48 61 6e 64 6c 65 29 | 2a 74 68 65 43 4b 49 44 |(Handle)|*theCKID|
|00001290| 29 3b 0d 09 0d 09 2f 2a | 20 63 6c 6f 73 65 20 74 |);..../*| close t|
|000012a0| 68 65 20 72 65 73 6f 75 | 72 63 65 20 66 69 6c 65 |he resou|rce file|
|000012b0| 20 2a 2f 0d 09 43 6c 6f | 73 65 52 65 73 46 69 6c | */..Clo|seResFil|
|000012c0| 65 28 72 65 66 4e 75 6d | 29 3b 0d 09 72 65 74 75 |e(refNum|);..retu|
|000012d0| 72 6e 20 6e 6f 45 72 72 | 3b 0d 7d 0d 0d 73 74 61 |rn noErr|;.}..sta|
|000012e0| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 49 73 43 6f |tic Bool|ean IsCo|
|000012f0| 6d 6d 61 6e 64 4b 65 79 | 28 45 76 65 6e 74 52 65 |mmandKey|(EventRe|
|00001300| 63 6f 72 64 20 2a 65 76 | 65 6e 74 29 0d 7b 0d 09 |cord *ev|ent).{..|
|00001310| 72 65 74 75 72 6e 20 28 | 65 76 65 6e 74 2d 3e 77 |return (|event->w|
|00001320| 68 61 74 20 3d 3d 20 6b | 65 79 44 6f 77 6e 29 20 |hat == k|eyDown) |
|00001330| 26 26 20 28 28 65 76 65 | 6e 74 2d 3e 6d 6f 64 69 |&& ((eve|nt->modi|
|00001340| 66 69 65 72 73 20 26 20 | 63 6d 64 4b 65 79 29 20 |fiers & |cmdKey) |
|00001350| 21 3d 20 30 29 3b 0d 7d | 0d 0d 70 61 73 63 61 6c |!= 0);.}|..pascal|
|00001360| 20 42 6f 6f 6c 65 61 6e | 20 50 72 6f 6a 65 63 74 | Boolean| Project|
|00001370| 44 72 61 67 49 64 6c 65 | 50 72 6f 63 28 45 76 65 |DragIdle|Proc(Eve|
|00001380| 6e 74 52 65 63 6f 72 64 | 20 2a 74 68 65 45 76 65 |ntRecord| *theEve|
|00001390| 6e 74 2c 20 6c 6f 6e 67 | 20 2a 73 6c 65 65 70 54 |nt, long| *sleepT|
|000013a0| 69 6d 65 2c 20 52 67 6e | 48 61 6e 64 6c 65 20 2a |ime, Rgn|Handle *|
|000013b0| 6d 6f 75 73 65 52 67 6e | 29 0d 7b 0d 09 69 66 20 |mouseRgn|).{..if |
|000013c0| 28 74 68 65 45 76 65 6e | 74 2d 3e 77 68 61 74 20 |(theEven|t->what |
|000013d0| 3d 3d 20 6e 75 6c 6c 45 | 76 65 6e 74 29 0d 09 7b |== nullE|vent)..{|
|000013e0| 0d 09 09 2a 6d 6f 75 73 | 65 52 67 6e 20 3d 20 4e |...*mous|eRgn = N|
|000013f0| 55 4c 4c 3b 0d 09 09 2a | 73 6c 65 65 70 54 69 6d |ULL;...*|sleepTim|
|00001400| 65 20 3d 20 31 30 3b 0d | 09 7d 0d 09 65 6c 73 65 |e = 10;.|.}..else|
|00001410| 20 69 66 20 28 21 49 73 | 43 6f 6d 6d 61 6e 64 4b | if (!Is|CommandK|
|00001420| 65 79 28 74 68 65 45 76 | 65 6e 74 29 20 26 26 20 |ey(theEv|ent) && |
|00001430| 49 73 44 69 61 6c 6f 67 | 45 76 65 6e 74 28 74 68 |IsDialog|Event(th|
|00001440| 65 45 76 65 6e 74 29 29 | 0d 09 7b 0d 09 09 44 69 |eEvent))|..{...Di|
|00001450| 61 6c 6f 67 50 74 72 20 | 64 69 61 6c 6f 67 3b 0d |alogPtr |dialog;.|
|00001460| 09 09 73 68 6f 72 74 20 | 69 74 65 6d 48 69 74 3b |..short |itemHit;|
|00001470| 0d 09 09 0d 09 09 44 69 | 61 6c 6f 67 53 65 6c 65 |......Di|alogSele|
|00001480| 63 74 28 74 68 65 45 76 | 65 6e 74 2c 20 26 64 69 |ct(theEv|ent, &di|
|00001490| 61 6c 6f 67 2c 20 26 69 | 74 65 6d 48 69 74 29 3b |alog, &i|temHit);|
|000014a0| 0d 09 7d 0d 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |..}..ret|urn fals|
|000014b0| 65 3b 0d 7d 0d 0d 0d 73 | 68 6f 72 74 20 52 65 70 |e;.}...s|hort Rep|
|000014c0| 6c 61 63 65 53 74 72 69 | 6e 67 28 48 61 6e 64 6c |laceStri|ng(Handl|
|000014d0| 65 20 62 61 73 65 54 65 | 78 74 2c 20 53 74 72 69 |e baseTe|xt, Stri|
|000014e0| 6e 67 50 74 72 20 6b 65 | 79 2c 20 53 74 72 69 6e |ngPtr ke|y, Strin|
|000014f0| 67 50 74 72 20 73 75 62 | 73 74 69 74 75 74 69 6f |gPtr sub|stitutio|
|00001500| 6e 54 65 78 74 29 0d 7b | 0d 09 4f 53 45 72 72 20 |nText).{|..OSErr |
|00001510| 65 72 72 20 3d 20 6e 6f | 45 72 72 3b 0d 09 48 61 |err = no|Err;..Ha|
|00001520| 6e 64 6c 65 20 68 20 3d | 20 4e 55 4c 4c 3b 0d 09 |ndle h =| NULL;..|
|00001530| 0d 09 65 72 72 20 3d 20 | 50 74 72 54 6f 48 61 6e |..err = |PtrToHan|
|00001540| 64 28 73 75 62 73 74 69 | 74 75 74 69 6f 6e 54 65 |d(substi|tutionTe|
|00001550| 78 74 20 2b 20 31 2c 20 | 26 68 2c 20 73 75 62 73 |xt + 1, |&h, subs|
|00001560| 74 69 74 75 74 69 6f 6e | 54 65 78 74 5b 30 5d 29 |titution|Text[0])|
|00001570| 3b 0d 09 69 66 20 28 65 | 72 72 20 21 3d 20 6e 6f |;..if (e|rr != no|
|00001580| 45 72 72 29 20 72 65 74 | 75 72 6e 20 65 72 72 3b |Err) ret|urn err;|
|00001590| 0d 09 65 72 72 20 3d 20 | 52 65 70 6c 61 63 65 54 |..err = |ReplaceT|
|000015a0| 65 78 74 28 62 61 73 65 | 54 65 78 74 2c 20 68 2c |ext(base|Text, h,|
|000015b0| 20 6b 65 79 29 3b 0d 09 | 44 69 73 70 6f 73 65 48 | key);..|DisposeH|
|000015c0| 61 6e 64 6c 65 28 68 29 | 3b 0d 09 72 65 74 75 72 |andle(h)|;..retur|
|000015d0| 6e 20 65 72 72 3b 0d 7d | 0d 0d 0d 76 6f 69 64 20 |n err;.}|...void |
|000015e0| 52 65 70 6c 61 63 65 49 | 6e 49 6e 64 53 74 72 69 |ReplaceI|nIndStri|
|000015f0| 6e 67 28 53 74 72 69 6e | 67 50 74 72 20 73 74 72 |ng(Strin|gPtr str|
|00001600| 69 6e 67 4f 75 74 2c 20 | 73 68 6f 72 74 20 73 74 |ingOut, |short st|
|00001610| 72 4c 69 73 74 49 44 2c | 20 73 68 6f 72 74 20 73 |rListID,| short s|
|00001620| 74 72 49 6e 64 65 78 2c | 0d 09 09 09 09 09 09 53 |trIndex,|.......S|
|00001630| 74 72 69 6e 67 50 74 72 | 20 70 61 72 61 6d 31 2c |tringPtr| param1,|
|00001640| 20 53 74 72 69 6e 67 50 | 74 72 20 70 61 72 61 6d | StringP|tr param|
|00001650| 32 2c 0d 09 09 09 09 09 | 20 20 20 20 53 74 72 69 |2,......| Stri|
|00001660| 6e 67 50 74 72 20 70 61 | 72 61 6d 33 2c 20 53 74 |ngPtr pa|ram3, St|
|00001670| 72 69 6e 67 50 74 72 20 | 70 61 72 61 6d 34 29 0d |ringPtr |param4).|
|00001680| 7b 0d 09 48 61 6e 64 6c | 65 20 68 3b 0d 09 4f 53 |{..Handl|e h;..OS|
|00001690| 45 72 72 20 65 72 72 3b | 0d 09 0d 09 47 65 74 49 |Err err;|....GetI|
|000016a0| 6e 64 53 74 72 69 6e 67 | 28 73 74 72 69 6e 67 4f |ndString|(stringO|
|000016b0| 75 74 2c 20 73 74 72 4c | 69 73 74 49 44 2c 20 73 |ut, strL|istID, s|
|000016c0| 74 72 49 6e 64 65 78 29 | 3b 0d 09 65 72 72 20 3d |trIndex)|;..err =|
|000016d0| 20 50 74 72 54 6f 48 61 | 6e 64 28 73 74 72 69 6e | PtrToHa|nd(strin|
|000016e0| 67 4f 75 74 20 2b 20 31 | 2c 20 26 68 2c 20 73 74 |gOut + 1|, &h, st|
|000016f0| 72 69 6e 67 4f 75 74 5b | 30 5d 29 3b 0d 09 69 66 |ringOut[|0]);..if|
|00001700| 20 28 70 61 72 61 6d 31 | 20 21 3d 20 4e 55 4c 4c | (param1| != NULL|
|00001710| 29 0d 09 09 65 72 72 20 | 3d 20 52 65 70 6c 61 63 |)...err |= Replac|
|00001720| 65 53 74 72 69 6e 67 28 | 68 2c 20 22 5c 70 3c 31 |eString(|h, "\p<1|
|00001730| 3e 22 2c 20 70 61 72 61 | 6d 31 29 3b 0d 09 65 6c |>", para|m1);..el|
|00001740| 73 65 0d 09 09 65 72 72 | 20 3d 20 52 65 70 6c 61 |se...err| = Repla|
|00001750| 63 65 53 74 72 69 6e 67 | 28 68 2c 20 22 5c 70 3c |ceString|(h, "\p<|
|00001760| 31 3e 22 2c 20 22 5c 70 | 22 29 3b 0d 09 69 66 20 |1>", "\p|");..if |
|00001770| 28 70 61 72 61 6d 32 20 | 21 3d 20 4e 55 4c 4c 29 |(param2 |!= NULL)|
|00001780| 0d 09 09 65 72 72 20 3d | 20 52 65 70 6c 61 63 65 |...err =| Replace|
|00001790| 53 74 72 69 6e 67 28 68 | 2c 20 22 5c 70 3c 32 3e |String(h|, "\p<2>|
|000017a0| 22 2c 20 70 61 72 61 6d | 32 29 3b 0d 09 65 6c 73 |", param|2);..els|
|000017b0| 65 0d 09 09 65 72 72 20 | 3d 20 52 65 70 6c 61 63 |e...err |= Replac|
|000017c0| 65 53 74 72 69 6e 67 28 | 68 2c 20 22 5c 70 3c 32 |eString(|h, "\p<2|
|000017d0| 3e 22 2c 20 22 5c 70 22 | 29 3b 0d 09 69 66 20 28 |>", "\p"|);..if (|
|000017e0| 70 61 72 61 6d 33 20 21 | 3d 20 4e 55 4c 4c 29 0d |param3 !|= NULL).|
|000017f0| 09 09 65 72 72 20 3d 20 | 52 65 70 6c 61 63 65 53 |..err = |ReplaceS|
|00001800| 74 72 69 6e 67 28 68 2c | 20 22 5c 70 3c 33 3e 22 |tring(h,| "\p<3>"|
|00001810| 2c 20 70 61 72 61 6d 33 | 29 3b 0d 09 65 6c 73 65 |, param3|);..else|
|00001820| 0d 09 09 65 72 72 20 3d | 20 52 65 70 6c 61 63 65 |...err =| Replace|
|00001830| 53 74 72 69 6e 67 28 68 | 2c 20 22 5c 70 3c 33 3e |String(h|, "\p<3>|
|00001840| 22 2c 20 22 5c 70 22 29 | 3b 0d 09 69 66 20 28 70 |", "\p")|;..if (p|
|00001850| 61 72 61 6d 34 20 21 3d | 20 4e 55 4c 4c 29 0d 09 |aram4 !=| NULL)..|
|00001860| 09 65 72 72 20 3d 20 52 | 65 70 6c 61 63 65 53 74 |.err = R|eplaceSt|
|00001870| 72 69 6e 67 28 68 2c 20 | 22 5c 70 3c 34 3e 22 2c |ring(h, |"\p<4>",|
|00001880| 20 70 61 72 61 6d 34 29 | 3b 0d 09 65 6c 73 65 0d | param4)|;..else.|
|00001890| 09 09 65 72 72 20 3d 20 | 52 65 70 6c 61 63 65 53 |..err = |ReplaceS|
|000018a0| 74 72 69 6e 67 28 68 2c | 20 22 5c 70 3c 34 3e 22 |tring(h,| "\p<4>"|
|000018b0| 2c 20 22 5c 70 22 29 3b | 0d 09 73 74 72 69 6e 67 |, "\p");|..string|
|000018c0| 4f 75 74 5b 30 5d 20 3d | 20 47 65 74 48 61 6e 64 |Out[0] =| GetHand|
|000018d0| 6c 65 53 69 7a 65 28 68 | 29 3b 0d 09 42 6c 6f 63 |leSize(h|);..Bloc|
|000018e0| 6b 4d 6f 76 65 44 61 74 | 61 28 2a 68 2c 20 73 74 |kMoveDat|a(*h, st|
|000018f0| 72 69 6e 67 4f 75 74 20 | 2b 20 31 2c 20 73 74 72 |ringOut |+ 1, str|
|00001900| 69 6e 67 4f 75 74 5b 30 | 5d 29 3b 0d 09 44 69 73 |ingOut[0|]);..Dis|
|00001910| 70 6f 73 65 48 61 6e 64 | 6c 65 28 68 29 3b 0d 7d |poseHand|le(h);.}|
|00001920| 0d 0d 0d 6c 6f 6e 67 20 | 4c 69 6e 65 53 69 7a 65 |...long |LineSize|
|00001930| 28 53 74 72 69 6e 67 50 | 74 72 20 74 68 65 4c 69 |(StringP|tr theLi|
|00001940| 6e 65 2c 20 6c 6f 6e 67 | 20 6d 61 78 53 69 7a 65 |ne, long| maxSize|
|00001950| 29 0d 7b 0d 09 6c 6f 6e | 67 20 6c 65 6e 67 74 68 |).{..lon|g length|
|00001960| 3b 0d 09 66 6f 72 20 28 | 6c 65 6e 67 74 68 20 3d |;..for (|length =|
|00001970| 20 30 3b 20 6d 61 78 53 | 69 7a 65 20 3e 20 30 3b | 0; maxS|ize > 0;|
|00001980| 20 74 68 65 4c 69 6e 65 | 2b 2b 2c 20 6d 61 78 53 | theLine|++, maxS|
|00001990| 69 7a 65 2d 2d 29 0d 09 | 7b 0d 09 09 6c 65 6e 67 |ize--)..|{...leng|
|000019a0| 74 68 2b 2b 3b 0d 09 09 | 69 66 20 28 2a 74 68 65 |th++;...|if (*the|
|000019b0| 4c 69 6e 65 20 3d 3d 20 | 27 5c 6e 27 29 20 62 72 |Line == |'\n') br|
|000019c0| 65 61 6b 3b 20 2f 2a 20 | 61 66 74 65 72 20 69 6e |eak; /* |after in|
|000019d0| 63 72 65 6d 65 6e 74 69 | 6e 67 20 74 68 65 20 6c |crementi|ng the l|
|000019e0| 65 6e 67 74 68 20 74 6f | 20 69 6e 63 6c 75 64 65 |ength to| include|
|000019f0| 20 74 68 69 73 20 2a 2f | 0d 09 7d 0d 09 72 65 74 | this */|..}..ret|
|00001a00| 75 72 6e 20 6c 65 6e 67 | 74 68 3b 0d 7d 0d 0d 0d |urn leng|th;.}...|
|00001a10| 42 6f 6f 6c 65 61 6e 20 | 4d 61 74 63 68 4c 69 6e |Boolean |MatchLin|
|00001a20| 65 55 6e 74 69 6c 43 68 | 61 72 28 53 74 72 69 6e |eUntilCh|ar(Strin|
|00001a30| 67 50 74 72 20 6c 69 6e | 65 31 2c 20 6c 6f 6e 67 |gPtr lin|e1, long|
|00001a40| 20 6c 65 6e 31 2c 20 53 | 74 72 69 6e 67 50 74 72 | len1, S|tringPtr|
|00001a50| 20 6c 69 6e 65 32 2c 20 | 6c 6f 6e 67 20 6c 65 6e | line2, |long len|
|00001a60| 32 2c 20 63 68 61 72 20 | 75 6e 74 69 6c 43 68 61 |2, char |untilCha|
|00001a70| 72 29 0d 7b 0d 09 6c 6f | 6e 67 20 69 2c 20 6a 3b |r).{..lo|ng i, j;|
|00001a80| 0d 09 09 0d 09 66 6f 72 | 20 28 69 20 3d 20 6a 20 |.....for| (i = j |
|00001a90| 3d 20 30 3b 20 69 20 3c | 20 6c 65 6e 31 20 26 26 |= 0; i <| len1 &&|
|00001aa0| 20 6a 20 3c 20 6c 65 6e | 32 3b 20 29 0d 09 7b 0d | j < len|2; )..{.|
|00001ab0| 09 09 69 66 20 28 75 6e | 74 69 6c 43 68 61 72 20 |..if (un|tilChar |
|00001ac0| 21 3d 20 30 20 26 26 20 | 6c 69 6e 65 32 5b 6a 5d |!= 0 && |line2[j]|
|00001ad0| 20 3d 3d 20 75 6e 74 69 | 6c 43 68 61 72 29 0d 09 | == unti|lChar)..|
|00001ae0| 09 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 20 2f |..return| true; /|
|00001af0| 2a 20 77 65 20 72 65 61 | 63 68 65 64 20 74 68 65 |* we rea|ched the|
|00001b00| 20 73 74 6f 70 20 63 68 | 61 72 61 63 74 65 72 20 | stop ch|aracter |
|00001b10| 2a 2f 0d 09 09 09 0d 09 | 09 69 66 20 28 6c 69 6e |*/......|.if (lin|
|00001b20| 65 31 5b 69 5d 20 3d 3d | 20 27 5c 6e 27 20 7c 7c |e1[i] ==| '\n' |||
|00001b30| 20 6c 69 6e 65 32 5b 6a | 5d 20 3d 3d 20 27 5c 6e | line2[j|] == '\n|
|00001b40| 27 29 0d 09 09 7b 0d 09 | 09 09 2f 2a 20 69 66 20 |')...{..|../* if |
|00001b50| 77 65 20 72 65 61 63 68 | 20 74 68 65 20 65 6e 64 |we reach| the end|
|00001b60| 20 6f 66 20 6c 69 6e 65 | 20 6f 6e 20 6f 6e 65 2c | of line| on one,|
|00001b70| 20 77 65 20 6d 75 73 74 | 20 72 65 61 63 68 20 69 | we must| reach i|
|00001b80| 74 20 6f 6e 20 74 68 65 | 20 6f 74 68 65 72 20 2a |t on the| other *|
|00001b90| 2f 0d 09 09 09 72 65 74 | 75 72 6e 20 6c 69 6e 65 |/....ret|urn line|
|00001ba0| 31 5b 69 5d 20 3d 3d 20 | 27 5c 6e 27 20 26 26 20 |1[i] == |'\n' && |
|00001bb0| 6c 69 6e 65 32 5b 6a 5d | 20 3d 3d 20 27 5c 6e 27 |line2[j]| == '\n'|
|00001bc0| 3b 0d 09 09 7d 0d 09 09 | 65 6c 73 65 20 69 66 20 |;...}...|else if |
|00001bd0| 28 6c 69 6e 65 31 5b 69 | 5d 20 3d 3d 20 27 20 27 |(line1[i|] == ' '|
|00001be0| 20 7c 7c 20 6c 69 6e 65 | 31 5b 69 5d 20 3d 3d 20 | || line|1[i] == |
|00001bf0| 27 5c 74 27 29 0d 09 09 | 7b 0d 09 09 09 2f 2a 20 |'\t')...|{..../* |
|00001c00| 61 6e 79 20 61 6d 6f 75 | 6e 74 20 6f 66 20 77 68 |any amou|nt of wh|
|00001c10| 69 74 65 20 73 70 61 63 | 65 20 6d 61 74 63 68 65 |ite spac|e matche|
|00001c20| 73 20 61 6e 79 20 6f 74 | 68 65 72 20 2a 2f 0d 09 |s any ot|her */..|
|00001c30| 09 09 69 66 20 28 6c 69 | 6e 65 32 5b 6a 5d 20 21 |..if (li|ne2[j] !|
|00001c40| 3d 20 27 20 27 20 26 26 | 20 6c 69 6e 65 32 5b 6a |= ' ' &&| line2[j|
|00001c50| 5d 20 21 3d 20 27 5c 74 | 27 29 0d 09 09 09 09 72 |] != '\t|').....r|
|00001c60| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 09 09 09 |eturn fa|lse;....|
|00001c70| 69 2b 2b 2c 20 6a 2b 2b | 3b 20 2f 2a 20 77 65 20 |i++, j++|; /* we |
|00001c80| 6b 6e 6f 77 20 74 68 65 | 73 65 20 63 68 61 72 61 |know the|se chara|
|00001c90| 63 74 65 72 73 20 61 72 | 65 20 62 6c 61 6e 6b 73 |cters ar|e blanks|
|00001ca0| 20 2a 2f 0d 09 09 09 77 | 68 69 6c 65 20 28 69 20 | */....w|hile (i |
|00001cb0| 3c 20 6c 65 6e 31 20 26 | 26 20 6c 69 6e 65 31 5b |< len1 &|& line1[|
|00001cc0| 69 5d 20 3d 3d 20 27 20 | 27 20 7c 7c 20 6c 69 6e |i] == ' |' || lin|
|00001cd0| 65 31 5b 69 5d 20 3d 3d | 20 27 5c 74 27 29 0d 09 |e1[i] ==| '\t')..|
|00001ce0| 09 09 09 69 2b 2b 3b 0d | 09 09 09 77 68 69 6c 65 |...i++;.|...while|
|00001cf0| 20 28 6a 20 3c 20 6c 65 | 6e 32 20 26 26 20 6c 69 | (j < le|n2 && li|
|00001d00| 6e 65 32 5b 6a 5d 20 3d | 3d 20 27 20 27 20 7c 7c |ne2[j] =|= ' ' |||
|00001d10| 20 6c 69 6e 65 32 5b 6a | 5d 20 3d 3d 20 27 5c 74 | line2[j|] == '\t|
|00001d20| 27 29 0d 09 09 09 09 6a | 2b 2b 3b 0d 09 09 7d 0d |').....j|++;...}.|
|00001d30| 09 09 65 6c 73 65 20 69 | 66 20 28 6c 69 6e 65 31 |..else i|f (line1|
|00001d40| 5b 69 5d 20 21 3d 20 6c | 69 6e 65 32 5b 6a 5d 29 |[i] != l|ine2[j])|
|00001d50| 0d 09 09 7b 0d 09 09 09 | 72 65 74 75 72 6e 20 66 |...{....|return f|
|00001d60| 61 6c 73 65 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |alse;...|}...else|
|00001d70| 20 2f 2a 20 73 74 69 6c | 6c 20 6d 61 74 63 68 69 | /* stil|l matchi|
|00001d80| 6e 67 2c 20 67 6f 20 6f | 6e 20 74 6f 20 6e 65 78 |ng, go o|n to nex|
|00001d90| 74 20 63 68 61 72 61 63 | 74 65 72 20 2a 2f 0d 09 |t charac|ter */..|
|00001da0| 09 7b 0d 09 09 09 69 2b | 2b 2c 20 6a 2b 2b 3b 20 |.{....i+|+, j++; |
|00001db0| 2f 2a 20 74 68 69 73 20 | 69 73 20 68 65 72 65 20 |/* this |is here |
|00001dc0| 69 6e 73 74 65 61 64 20 | 6f 66 20 69 6e 20 22 66 |instead |of in "f|
|00001dd0| 6f 72 22 20 62 65 63 61 | 75 73 65 0d 09 09 09 09 |or" beca|use.....|
|00001de0| 09 20 20 20 2a 20 74 68 | 65 73 65 20 76 61 72 69 |. * th|ese vari|
|00001df0| 61 62 6c 65 73 20 67 65 | 74 20 63 68 61 6e 67 65 |ables ge|t change|
|00001e00| 64 20 69 6e 74 65 72 6e | 61 6c 6c 79 0d 09 09 09 |d intern|ally....|
|00001e10| 09 09 20 20 20 2a 2f 0d | 09 09 7d 0d 09 7d 0d 09 |.. */.|..}..}..|
|00001e20| 0d 09 2f 2a 20 69 66 20 | 77 65 20 67 65 74 20 68 |../* if |we get h|
|00001e30| 65 72 65 2c 20 61 6c 6c | 20 63 68 61 72 61 63 74 |ere, all| charact|
|00001e40| 65 72 73 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |ers shou|ld have |
|00001e50| 62 65 65 6e 20 65 78 68 | 61 75 73 74 65 64 20 28 |been exh|austed (|
|00001e60| 61 73 20 61 6d 20 49 29 | 3b 0d 09 20 2a 20 74 68 |as am I)|;.. * th|
|00001e70| 65 20 6f 6e 6c 79 20 65 | 78 63 65 70 74 69 6f 6e |e only e|xception|
|00001e80| 20 69 73 20 74 68 61 74 | 20 6f 6e 65 20 6d 61 79 | is that| one may|
|00001e90| 20 73 74 69 6c 6c 20 68 | 61 76 65 20 61 6e 20 75 | still h|ave an u|
|00001ea0| 6e 65 78 68 61 75 73 74 | 65 64 20 65 6e 64 20 6f |nexhaust|ed end o|
|00001eb0| 66 20 6c 69 6e 65 2e 2e | 2e 0d 09 20 2a 2f 0d 09 |f line..|... */..|
|00001ec0| 72 65 74 75 72 6e 20 28 | 6c 65 6e 31 20 3d 3d 20 |return (|len1 == |
|00001ed0| 69 20 7c 7c 20 28 6c 65 | 6e 31 20 3d 3d 20 69 20 |i || (le|n1 == i |
|00001ee0| 2b 20 31 20 26 26 20 6c | 69 6e 65 31 5b 69 5d 20 |+ 1 && l|ine1[i] |
|00001ef0| 3d 3d 20 27 5c 6e 27 29 | 29 0d 09 09 09 26 26 20 |== '\n')|)....&& |
|00001f00| 28 6c 65 6e 32 20 3d 3d | 20 6a 20 7c 7c 20 28 6c |(len2 ==| j || (l|
|00001f10| 65 6e 32 20 3d 3d 20 6a | 20 2b 20 31 20 26 26 20 |en2 == j| + 1 && |
|00001f20| 6c 69 6e 65 32 5b 6a 5d | 20 3d 3d 20 27 5c 6e 27 |line2[j]| == '\n'|
|00001f30| 29 29 3b 0d 7d 0d 0d 0d | 42 6f 6f 6c 65 61 6e 20 |));.}...|Boolean |
|00001f40| 4d 61 74 63 68 4c 69 6e | 65 28 53 74 72 69 6e 67 |MatchLin|e(String|
|00001f50| 50 74 72 20 6c 69 6e 65 | 31 2c 20 6c 6f 6e 67 20 |Ptr line|1, long |
|00001f60| 6c 65 6e 31 2c 20 53 74 | 72 69 6e 67 50 74 72 20 |len1, St|ringPtr |
|00001f70| 6c 69 6e 65 32 2c 20 6c | 6f 6e 67 20 6c 65 6e 32 |line2, l|ong len2|
|00001f80| 29 0d 7b 0d 09 72 65 74 | 75 72 6e 20 4d 61 74 63 |).{..ret|urn Matc|
|00001f90| 68 4c 69 6e 65 55 6e 74 | 69 6c 43 68 61 72 28 6c |hLineUnt|ilChar(l|
|00001fa0| 69 6e 65 31 2c 20 6c 65 | 6e 31 2c 20 6c 69 6e 65 |ine1, le|n1, line|
|00001fb0| 32 2c 20 6c 65 6e 32 2c | 20 30 29 3b 0d 7d 0d 0d |2, len2,| 0);.}..|
|00001fc0| 0d 4f 53 45 72 72 20 47 | 65 74 46 69 6c 65 44 61 |.OSErr G|etFileDa|
|00001fd0| 74 61 28 46 53 53 70 65 | 63 20 2a 66 69 6c 65 2c |ta(FSSpe|c *file,|
|00001fe0| 20 48 61 6e 64 6c 65 20 | 2a 66 69 6c 65 44 61 74 | Handle |*fileDat|
|00001ff0| 61 2c 20 73 68 6f 72 74 | 20 2a 72 65 66 4e 75 6d |a, short| *refNum|
|00002000| 29 0d 7b 0d 09 4f 53 45 | 72 72 20 65 72 72 3b 0d |).{..OSE|rr err;.|
|00002010| 09 49 4f 50 61 72 61 6d | 20 69 6f 3b 0d 09 6c 6f |.IOParam| io;..lo|
|00002020| 6e 67 20 63 6f 75 6e 74 | 3b 0d 09 0d 09 2a 66 69 |ng count|;....*fi|
|00002030| 6c 65 44 61 74 61 20 3d | 20 4e 55 4c 4c 3b 0d 09 |leData =| NULL;..|
|00002040| 2a 72 65 66 4e 75 6d 20 | 3d 20 2d 31 3b 0d 09 0d |*refNum |= -1;...|
|00002050| 09 65 72 72 20 3d 20 46 | 53 70 4f 70 65 6e 44 46 |.err = F|SpOpenDF|
|00002060| 28 66 69 6c 65 2c 20 66 | 73 52 64 57 72 50 65 72 |(file, f|sRdWrPer|
|00002070| 6d 2c 20 72 65 66 4e 75 | 6d 29 3b 0d 09 69 66 20 |m, refNu|m);..if |
|00002080| 28 65 72 72 20 21 3d 20 | 6e 6f 45 72 72 29 20 67 |(err != |noErr) g|
|00002090| 6f 74 6f 20 45 72 72 6f | 72 45 78 69 74 3b 0d 09 |oto Erro|rExit;..|
|000020a0| 65 72 72 20 3d 20 47 65 | 74 45 4f 46 28 2a 72 65 |err = Ge|tEOF(*re|
|000020b0| 66 4e 75 6d 2c 20 26 63 | 6f 75 6e 74 29 3b 0d 09 |fNum, &c|ount);..|
|000020c0| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|000020d0| 29 20 67 6f 74 6f 20 45 | 72 72 6f 72 45 78 69 74 |) goto E|rrorExit|
|000020e0| 3b 0d 09 2a 66 69 6c 65 | 44 61 74 61 20 3d 20 54 |;..*file|Data = T|
|000020f0| 65 6d 70 4e 65 77 48 61 | 6e 64 6c 65 28 63 6f 75 |empNewHa|ndle(cou|
|00002100| 6e 74 2c 20 26 65 72 72 | 29 3b 0d 09 69 66 20 28 |nt, &err|);..if (|
|00002110| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 67 6f |err != n|oErr) go|
|00002120| 74 6f 20 45 72 72 6f 72 | 45 78 69 74 3b 0d 09 48 |to Error|Exit;..H|
|00002130| 4c 6f 63 6b 28 2a 66 69 | 6c 65 44 61 74 61 29 3b |Lock(*fi|leData);|
|00002140| 0d 09 69 6f 2e 69 6f 43 | 6f 6d 70 6c 65 74 69 6f |..io.ioC|ompletio|
|00002150| 6e 20 3d 20 4e 55 4c 4c | 3b 0d 09 69 6f 2e 69 6f |n = NULL|;..io.io|
|00002160| 52 65 66 4e 75 6d 20 3d | 20 2a 72 65 66 4e 75 6d |RefNum =| *refNum|
|00002170| 3b 0d 09 69 6f 2e 69 6f | 42 75 66 66 65 72 20 3d |;..io.io|Buffer =|
|00002180| 20 2a 2a 66 69 6c 65 44 | 61 74 61 3b 0d 09 69 6f | **fileD|ata;..io|
|00002190| 2e 69 6f 52 65 71 43 6f | 75 6e 74 20 3d 20 63 6f |.ioReqCo|unt = co|
|000021a0| 75 6e 74 3b 0d 09 69 6f | 2e 69 6f 50 6f 73 4d 6f |unt;..io|.ioPosMo|
|000021b0| 64 65 20 3d 20 66 73 46 | 72 6f 6d 53 74 61 72 74 |de = fsF|romStart|
|000021c0| 3b 0d 09 69 6f 2e 69 6f | 50 6f 73 4f 66 66 73 65 |;..io.io|PosOffse|
|000021d0| 74 20 3d 20 30 3b 0d 09 | 50 42 52 65 61 64 41 73 |t = 0;..|PBReadAs|
|000021e0| 79 6e 63 28 28 50 61 72 | 6d 42 6c 6b 50 74 72 29 |ync((Par|mBlkPtr)|
|000021f0| 26 69 6f 29 3b 0d 09 77 | 68 69 6c 65 20 28 69 6f |&io);..w|hile (io|
|00002200| 2e 69 6f 52 65 73 75 6c | 74 20 3d 3d 20 31 29 0d |.ioResul|t == 1).|
|00002210| 09 7b 0d 09 09 45 76 65 | 6e 74 52 65 63 6f 72 64 |.{...Eve|ntRecord|
|00002220| 20 65 76 65 6e 74 3b 0d | 09 09 57 61 69 74 4e 65 | event;.|..WaitNe|
|00002230| 78 74 45 76 65 6e 74 28 | 65 76 65 72 79 45 76 65 |xtEvent(|everyEve|
|00002240| 6e 74 2c 20 26 65 76 65 | 6e 74 2c 20 31 30 2c 20 |nt, &eve|nt, 10, |
|00002250| 4e 55 4c 4c 29 3b 0d 09 | 7d 0d 09 65 72 72 20 3d |NULL);..|}..err =|
|00002260| 20 69 6f 2e 69 6f 52 65 | 73 75 6c 74 3b 0d 09 69 | io.ioRe|sult;..i|
|00002270| 66 20 28 65 72 72 20 21 | 3d 20 6e 6f 45 72 72 29 |f (err !|= noErr)|
|00002280| 20 67 6f 74 6f 20 45 72 | 72 6f 72 45 78 69 74 3b | goto Er|rorExit;|
|00002290| 0d 09 48 55 6e 6c 6f 63 | 6b 28 2a 66 69 6c 65 44 |..HUnloc|k(*fileD|
|000022a0| 61 74 61 29 3b 0d 09 72 | 65 74 75 72 6e 20 6e 6f |ata);..r|eturn no|
|000022b0| 45 72 72 3b 0d 0d 45 72 | 72 6f 72 45 78 69 74 3a |Err;..Er|rorExit:|
|000022c0| 0d 09 69 66 20 28 2a 72 | 65 66 4e 75 6d 20 21 3d |..if (*r|efNum !=|
|000022d0| 20 2d 31 29 0d 09 7b 0d | 09 09 46 53 43 6c 6f 73 | -1)..{.|..FSClos|
|000022e0| 65 28 2a 72 65 66 4e 75 | 6d 29 3b 0d 09 09 2a 72 |e(*refNu|m);...*r|
|000022f0| 65 66 4e 75 6d 20 3d 20 | 2d 31 3b 0d 09 7d 0d 09 |efNum = |-1;..}..|
|00002300| 69 66 20 28 2a 66 69 6c | 65 44 61 74 61 20 21 3d |if (*fil|eData !=|
|00002310| 20 4e 55 4c 4c 29 0d 09 | 7b 0d 09 09 44 69 73 70 | NULL)..|{...Disp|
|00002320| 6f 73 65 48 61 6e 64 6c | 65 28 2a 66 69 6c 65 44 |oseHandl|e(*fileD|
|00002330| 61 74 61 29 3b 0d 09 09 | 2a 66 69 6c 65 44 61 74 |ata);...|*fileDat|
|00002340| 61 20 3d 20 4e 55 4c 4c | 3b 0d 09 7d 0d 09 72 65 |a = NULL|;..}..re|
|00002350| 74 75 72 6e 20 65 72 72 | 3b 0d 7d 0d 0d 0d 4f 53 |turn err|;.}...OS|
|00002360| 45 72 72 20 57 72 69 74 | 65 46 69 6c 65 57 69 74 |Err Writ|eFileWit|
|00002370| 68 48 65 61 64 65 72 28 | 73 68 6f 72 74 20 72 65 |hHeader(|short re|
|00002380| 66 4e 75 6d 2c 20 48 61 | 6e 64 6c 65 20 66 69 6c |fNum, Ha|ndle fil|
|00002390| 65 44 61 74 61 2c 20 6c | 6f 6e 67 20 73 74 61 72 |eData, l|ong star|
|000023a0| 74 4f 66 66 73 65 74 2c | 20 53 74 72 69 6e 67 48 |tOffset,| StringH|
|000023b0| 61 6e 64 6c 65 20 68 65 | 61 64 65 72 29 0d 7b 0d |andle he|ader).{.|
|000023c0| 09 4f 53 45 72 72 20 65 | 72 72 20 3d 20 6e 6f 45 |.OSErr e|rr = noE|
|000023d0| 72 72 3b 0d 09 42 79 74 | 65 20 73 74 61 74 65 3b |rr;..Byt|e state;|
|000023e0| 0d 09 49 4f 50 61 72 61 | 6d 20 69 6f 3b 0d 09 0d |..IOPara|m io;...|
|000023f0| 09 2f 2a 20 7a 65 72 6f | 20 74 68 65 20 66 69 6c |./* zero| the fil|
|00002400| 65 20 2a 2f 0d 09 65 72 | 72 20 3d 20 53 65 74 45 |e */..er|r = SetE|
|00002410| 4f 46 28 72 65 66 4e 75 | 6d 2c 20 30 29 3b 0d 09 |OF(refNu|m, 0);..|
|00002420| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|00002430| 29 20 72 65 74 75 72 6e | 20 65 72 72 3b 0d 09 65 |) return| err;..e|
|00002440| 72 72 20 3d 20 53 65 74 | 46 50 6f 73 28 72 65 66 |rr = Set|FPos(ref|
|00002450| 4e 75 6d 2c 20 66 73 46 | 72 6f 6d 53 74 61 72 74 |Num, fsF|romStart|
|00002460| 2c 20 30 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |, 0);..i|f (err !|
|00002470| 3d 20 6e 6f 45 72 72 29 | 20 72 65 74 75 72 6e 20 |= noErr)| return |
|00002480| 65 72 72 3b 0d 09 0d 09 | 2f 2a 20 77 72 69 74 65 |err;....|/* write|
|00002490| 20 6f 75 74 20 74 68 65 | 20 68 65 61 64 65 72 20 | out the| header |
|000024a0| 74 6f 20 74 68 65 20 66 | 69 6c 65 20 2a 2f 0d 09 |to the f|ile */..|
|000024b0| 69 66 20 28 68 65 61 64 | 65 72 20 21 3d 20 4e 55 |if (head|er != NU|
|000024c0| 4c 4c 29 0d 09 7b 0d 09 | 09 73 74 61 74 65 20 3d |LL)..{..|.state =|
|000024d0| 20 48 47 65 74 53 74 61 | 74 65 28 68 65 61 64 65 | HGetSta|te(heade|
|000024e0| 72 29 3b 0d 09 09 48 4c | 6f 63 6b 28 68 65 61 64 |r);...HL|ock(head|
|000024f0| 65 72 29 3b 0d 09 09 69 | 6f 2e 69 6f 43 6f 6d 70 |er);...i|o.ioComp|
|00002500| 6c 65 74 69 6f 6e 20 3d | 20 4e 55 4c 4c 3b 0d 09 |letion =| NULL;..|
|00002510| 09 69 6f 2e 69 6f 52 65 | 66 4e 75 6d 20 3d 20 72 |.io.ioRe|fNum = r|
|00002520| 65 66 4e 75 6d 3b 0d 09 | 09 69 6f 2e 69 6f 42 75 |efNum;..|.io.ioBu|
|00002530| 66 66 65 72 20 3d 20 2a | 68 65 61 64 65 72 3b 0d |ffer = *|header;.|
|00002540| 09 09 69 6f 2e 69 6f 52 | 65 71 43 6f 75 6e 74 20 |..io.ioR|eqCount |
|00002550| 3d 20 47 65 74 48 61 6e | 64 6c 65 53 69 7a 65 28 |= GetHan|dleSize(|
|00002560| 68 65 61 64 65 72 29 3b | 0d 09 09 69 6f 2e 69 6f |header);|...io.io|
|00002570| 50 6f 73 4d 6f 64 65 20 | 3d 20 66 73 46 72 6f 6d |PosMode |= fsFrom|
|00002580| 53 74 61 72 74 3b 0d 09 | 09 69 6f 2e 69 6f 50 6f |Start;..|.io.ioPo|
|00002590| 73 4f 66 66 73 65 74 20 | 3d 20 30 3b 0d 09 09 50 |sOffset |= 0;...P|
|000025a0| 42 57 72 69 74 65 41 73 | 79 6e 63 28 28 50 61 72 |BWriteAs|ync((Par|
|000025b0| 6d 42 6c 6b 50 74 72 29 | 26 69 6f 29 3b 0d 09 09 |mBlkPtr)|&io);...|
|000025c0| 77 68 69 6c 65 20 28 69 | 6f 2e 69 6f 52 65 73 75 |while (i|o.ioResu|
|000025d0| 6c 74 20 3d 3d 20 31 29 | 0d 09 09 7b 0d 09 09 09 |lt == 1)|...{....|
|000025e0| 45 76 65 6e 74 52 65 63 | 6f 72 64 20 65 76 65 6e |EventRec|ord even|
|000025f0| 74 3b 0d 09 09 09 57 61 | 69 74 4e 65 78 74 45 76 |t;....Wa|itNextEv|
|00002600| 65 6e 74 28 65 76 65 72 | 79 45 76 65 6e 74 2c 20 |ent(ever|yEvent, |
|00002610| 26 65 76 65 6e 74 2c 20 | 31 30 2c 20 4e 55 4c 4c |&event, |10, NULL|
|00002620| 29 3b 0d 09 09 7d 0d 09 | 09 65 72 72 20 3d 20 69 |);...}..|.err = i|
|00002630| 6f 2e 69 6f 52 65 73 75 | 6c 74 3b 0d 09 09 48 53 |o.ioResu|lt;...HS|
|00002640| 65 74 53 74 61 74 65 28 | 68 65 61 64 65 72 2c 20 |etState(|header, |
|00002650| 73 74 61 74 65 29 3b 0d | 09 09 69 66 20 28 65 72 |state);.|..if (er|
|00002660| 72 20 21 3d 20 6e 6f 45 | 72 72 29 20 72 65 74 75 |r != noE|rr) retu|
|00002670| 72 6e 20 65 72 72 3b 0d | 09 7d 0d 09 0d 09 2f 2a |rn err;.|.}..../*|
|00002680| 20 63 6f 70 79 20 74 68 | 65 20 64 61 74 61 20 66 | copy th|e data f|
|00002690| 6f 72 6b 20 66 72 6f 6d | 20 74 68 65 20 73 74 61 |ork from| the sta|
|000026a0| 72 74 20 6f 66 66 73 65 | 74 20 74 6f 20 74 68 65 |rt offse|t to the|
|000026b0| 20 66 69 6c 65 20 2a 2f | 0d 09 73 74 61 74 65 20 | file */|..state |
|000026c0| 3d 20 48 47 65 74 53 74 | 61 74 65 28 66 69 6c 65 |= HGetSt|ate(file|
|000026d0| 44 61 74 61 29 3b 0d 09 | 48 4c 6f 63 6b 28 66 69 |Data);..|HLock(fi|
|000026e0| 6c 65 44 61 74 61 29 3b | 0d 09 69 6f 2e 69 6f 43 |leData);|..io.ioC|
|000026f0| 6f 6d 70 6c 65 74 69 6f | 6e 20 3d 20 4e 55 4c 4c |ompletio|n = NULL|
|00002700| 3b 0d 09 69 6f 2e 69 6f | 52 65 66 4e 75 6d 20 3d |;..io.io|RefNum =|
|00002710| 20 72 65 66 4e 75 6d 3b | 0d 09 69 6f 2e 69 6f 42 | refNum;|..io.ioB|
|00002720| 75 66 66 65 72 20 3d 20 | 28 2a 66 69 6c 65 44 61 |uffer = |(*fileDa|
|00002730| 74 61 29 20 2b 20 73 74 | 61 72 74 4f 66 66 73 65 |ta) + st|artOffse|
|00002740| 74 3b 0d 09 69 6f 2e 69 | 6f 52 65 71 43 6f 75 6e |t;..io.i|oReqCoun|
|00002750| 74 20 3d 20 47 65 74 48 | 61 6e 64 6c 65 53 69 7a |t = GetH|andleSiz|
|00002760| 65 28 66 69 6c 65 44 61 | 74 61 29 20 2d 20 73 74 |e(fileDa|ta) - st|
|00002770| 61 72 74 4f 66 66 73 65 | 74 3b 0d 09 69 6f 2e 69 |artOffse|t;..io.i|
|00002780| 6f 50 6f 73 4d 6f 64 65 | 20 3d 20 66 73 46 72 6f |oPosMode| = fsFro|
|00002790| 6d 53 74 61 72 74 3b 0d | 09 69 6f 2e 69 6f 50 6f |mStart;.|.io.ioPo|
|000027a0| 73 4f 66 66 73 65 74 20 | 3d 20 47 65 74 48 61 6e |sOffset |= GetHan|
|000027b0| 64 6c 65 53 69 7a 65 28 | 68 65 61 64 65 72 29 3b |dleSize(|header);|
|000027c0| 0d 09 50 42 57 72 69 74 | 65 41 73 79 6e 63 28 28 |..PBWrit|eAsync((|
|000027d0| 50 61 72 6d 42 6c 6b 50 | 74 72 29 26 69 6f 29 3b |ParmBlkP|tr)&io);|
|000027e0| 0d 09 77 68 69 6c 65 20 | 28 69 6f 2e 69 6f 52 65 |..while |(io.ioRe|
|000027f0| 73 75 6c 74 20 3d 3d 20 | 31 29 0d 09 7b 0d 09 09 |sult == |1)..{...|
|00002800| 45 76 65 6e 74 52 65 63 | 6f 72 64 20 65 76 65 6e |EventRec|ord even|
|00002810| 74 3b 0d 09 09 57 61 69 | 74 4e 65 78 74 45 76 65 |t;...Wai|tNextEve|
|00002820| 6e 74 28 65 76 65 72 79 | 45 76 65 6e 74 2c 20 26 |nt(every|Event, &|
|00002830| 65 76 65 6e 74 2c 20 31 | 30 2c 20 4e 55 4c 4c 29 |event, 1|0, NULL)|
|00002840| 3b 0d 09 7d 0d 09 65 72 | 72 20 3d 20 69 6f 2e 69 |;..}..er|r = io.i|
|00002850| 6f 52 65 73 75 6c 74 3b | 0d 09 48 53 65 74 53 74 |oResult;|..HSetSt|
|00002860| 61 74 65 28 66 69 6c 65 | 44 61 74 61 2c 20 73 74 |ate(file|Data, st|
|00002870| 61 74 65 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |ate);..i|f (err !|
|00002880| 3d 20 6e 6f 45 72 72 29 | 20 72 65 74 75 72 6e 20 |= noErr)| return |
|00002890| 65 72 72 3b 0d 09 0d 09 | 72 65 74 75 72 6e 20 6e |err;....|return n|
|000028a0| 6f 45 72 72 3b 0d 7d 0d | 0d 0d 2f 2a 20 53 65 74 |oErr;.}.|../* Set|
|000028b0| 46 69 6c 65 4c 61 62 65 | 6c 20 77 61 73 20 63 72 |FileLabe|l was cr|
|000028c0| 69 62 62 65 64 20 66 72 | 6f 6d 20 43 68 61 6e 67 |ibbed fr|om Chang|
|000028d0| 65 46 44 46 6c 61 67 73 | 20 69 6e 20 4d 6f 72 65 |eFDFlags| in More|
|000028e0| 46 69 6c 65 73 45 78 74 | 72 61 73 2e 63 20 2a 2f |FilesExt|ras.c */|
|000028f0| 0d 0d 4f 53 45 72 72 20 | 53 65 74 46 69 6c 65 4c |..OSErr |SetFileL|
|00002900| 61 62 65 6c 28 46 53 53 | 70 65 63 20 2a 66 69 6c |abel(FSS|pec *fil|
|00002910| 65 2c 20 73 68 6f 72 74 | 20 6c 61 62 65 6c 2c 20 |e, short| label, |
|00002920| 73 68 6f 72 74 20 2a 6f | 6c 64 4c 61 62 65 6c 29 |short *o|ldLabel)|
|00002930| 0d 7b 0d 09 43 49 6e 66 | 6f 50 42 52 65 63 20 70 |.{..CInf|oPBRec p|
|00002940| 62 3b 0d 09 4f 53 45 72 | 72 20 65 72 72 3b 0d 09 |b;..OSEr|r err;..|
|00002950| 73 68 6f 72 74 20 72 65 | 61 6c 56 52 65 66 4e 75 |short re|alVRefNu|
|00002960| 6d 3b 0d 09 6c 6f 6e 67 | 20 70 61 72 49 44 3b 0d |m;..long| parID;.|
|00002970| 0d 09 69 66 20 28 66 69 | 6c 65 2d 3e 6e 61 6d 65 |..if (fi|le->name|
|00002980| 5b 30 5d 20 3d 3d 20 30 | 29 0d 09 09 70 62 2e 68 |[0] == 0|)...pb.h|
|00002990| 46 69 6c 65 49 6e 66 6f | 2e 69 6f 4e 61 6d 65 50 |FileInfo|.ioNameP|
|000029a0| 74 72 20 3d 20 4e 55 4c | 4c 3b 0d 09 65 6c 73 65 |tr = NUL|L;..else|
|000029b0| 0d 09 09 70 62 2e 68 46 | 69 6c 65 49 6e 66 6f 2e |...pb.hF|ileInfo.|
|000029c0| 69 6f 4e 61 6d 65 50 74 | 72 20 3d 20 66 69 6c 65 |ioNamePt|r = file|
|000029d0| 2d 3e 6e 61 6d 65 3b 0d | 09 70 62 2e 68 46 69 6c |->name;.|.pb.hFil|
|000029e0| 65 49 6e 66 6f 2e 69 6f | 56 52 65 66 4e 75 6d 20 |eInfo.io|VRefNum |
|000029f0| 3d 20 66 69 6c 65 2d 3e | 76 52 65 66 4e 75 6d 3b |= file->|vRefNum;|
|00002a00| 0d 09 70 62 2e 68 46 69 | 6c 65 49 6e 66 6f 2e 69 |..pb.hFi|leInfo.i|
|00002a10| 6f 44 69 72 49 44 20 3d | 20 66 69 6c 65 2d 3e 70 |oDirID =| file->p|
|00002a20| 61 72 49 44 3b 0d 09 70 | 62 2e 68 46 69 6c 65 49 |arID;..p|b.hFileI|
|00002a30| 6e 66 6f 2e 69 6f 46 44 | 69 72 49 6e 64 65 78 20 |nfo.ioFD|irIndex |
|00002a40| 3d 20 30 3b 09 2f 2a 20 | 75 73 65 20 69 6f 4e 61 |= 0;./* |use ioNa|
|00002a50| 6d 65 50 74 72 20 61 6e | 64 20 69 6f 44 69 72 49 |mePtr an|d ioDirI|
|00002a60| 44 20 2a 2f 0d 09 65 72 | 72 20 3d 20 50 42 47 65 |D */..er|r = PBGe|
|00002a70| 74 43 61 74 49 6e 66 6f | 53 79 6e 63 28 26 70 62 |tCatInfo|Sync(&pb|
|00002a80| 29 3b 0d 09 69 66 20 28 | 20 65 72 72 20 3d 3d 20 |);..if (| err == |
|00002a90| 6e 6f 45 72 72 20 29 0d | 09 7b 0d 09 09 70 61 72 |noErr ).|.{...par|
|00002aa0| 49 44 20 3d 20 70 62 2e | 68 46 69 6c 65 49 6e 66 |ID = pb.|hFileInf|
|00002ab0| 6f 2e 69 6f 46 6c 50 61 | 72 49 44 3b 09 2f 2a 20 |o.ioFlPa|rID;./* |
|00002ac0| 73 61 76 65 20 70 61 72 | 65 6e 74 20 64 69 72 49 |save par|ent dirI|
|00002ad0| 44 20 66 6f 72 20 42 75 | 6d 70 44 61 74 65 20 63 |D for Bu|mpDate c|
|00002ae0| 61 6c 6c 20 2a 2f 0d 0d | 09 09 69 66 20 28 6f 6c |all */..|..if (ol|
|00002af0| 64 4c 61 62 65 6c 20 21 | 3d 20 4e 55 4c 4c 29 0d |dLabel !|= NULL).|
|00002b00| 09 09 09 2a 6f 6c 64 4c | 61 62 65 6c 20 3d 20 28 |...*oldL|abel = (|
|00002b10| 70 62 2e 68 46 69 6c 65 | 49 6e 66 6f 2e 69 6f 46 |pb.hFile|Info.ioF|
|00002b20| 6c 46 6e 64 72 49 6e 66 | 6f 2e 66 64 46 6c 61 67 |lFndrInf|o.fdFlag|
|00002b30| 73 20 3e 3e 20 31 29 20 | 26 20 6b 43 6f 6c 6f 72 |s >> 1) |& kColor|
|00002b40| 3b 0d 0d 09 09 70 62 2e | 68 46 69 6c 65 49 6e 66 |;....pb.|hFileInf|
|00002b50| 6f 2e 69 6f 46 6c 46 6e | 64 72 49 6e 66 6f 2e 66 |o.ioFlFn|drInfo.f|
|00002b60| 64 46 6c 61 67 73 20 26 | 3d 20 7e 6b 43 6f 6c 6f |dFlags &|= ~kColo|
|00002b70| 72 3b 20 2f 2a 20 63 6c | 65 61 72 20 74 68 65 20 |r; /* cl|ear the |
|00002b80| 62 69 74 73 20 2a 2f 0d | 09 09 70 62 2e 68 46 69 |bits */.|..pb.hFi|
|00002b90| 6c 65 49 6e 66 6f 2e 69 | 6f 46 6c 46 6e 64 72 49 |leInfo.i|oFlFndrI|
|00002ba0| 6e 66 6f 2e 66 64 46 6c | 61 67 73 20 7c 3d 20 28 |nfo.fdFl|ags |= (|
|00002bb0| 6c 61 62 65 6c 20 3c 3c | 20 31 29 20 26 20 6b 43 |label <<| 1) & kC|
|00002bc0| 6f 6c 6f 72 3b 20 2f 2a | 20 73 65 74 20 74 68 65 |olor; /*| set the|
|00002bd0| 20 62 69 74 73 20 2a 2f | 0d 09 0d 09 09 70 62 2e | bits */|.....pb.|
|00002be0| 68 46 69 6c 65 49 6e 66 | 6f 2e 69 6f 44 69 72 49 |hFileInf|o.ioDirI|
|00002bf0| 44 20 3d 20 66 69 6c 65 | 2d 3e 70 61 72 49 44 3b |D = file|->parID;|
|00002c00| 0d 09 09 65 72 72 20 3d | 20 50 42 53 65 74 43 61 |...err =| PBSetCa|
|00002c10| 74 49 6e 66 6f 53 79 6e | 63 28 26 70 62 29 3b 09 |tInfoSyn|c(&pb);.|
|00002c20| 2f 2a 20 6e 6f 77 2c 20 | 73 61 76 65 20 74 68 65 |/* now, |save the|
|00002c30| 20 6e 65 77 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e | new inf|ormation|
|00002c40| 20 62 61 63 6b 20 74 6f | 20 64 69 73 6b 20 2a 2f | back to| disk */|
|00002c50| 0d 0d 09 09 69 66 20 28 | 20 28 65 72 72 20 3d 3d |....if (| (err ==|
|00002c60| 20 6e 6f 45 72 72 29 20 | 26 26 20 28 70 61 72 49 | noErr) |&& (parI|
|00002c70| 44 20 21 3d 20 66 73 52 | 74 50 61 72 49 44 29 20 |D != fsR|tParID) |
|00002c80| 29 20 2f 2a 20 63 61 6e | 27 74 20 62 75 6d 70 20 |) /* can|'t bump |
|00002c90| 66 73 52 74 50 61 72 49 | 44 20 2a 2f 0d 09 09 7b |fsRtParI|D */...{|
|00002ca0| 0d 09 09 09 2f 2a 20 67 | 65 74 20 74 68 65 20 72 |..../* g|et the r|
|00002cb0| 65 61 6c 20 76 52 65 66 | 4e 75 6d 20 69 6e 20 63 |eal vRef|Num in c|
|00002cc0| 61 73 65 20 61 20 66 75 | 6c 6c 20 70 61 74 68 6e |ase a fu|ll pathn|
|00002cd0| 61 6d 65 20 77 61 73 20 | 70 61 73 73 65 64 20 2a |ame was |passed *|
|00002ce0| 2f 0d 09 09 09 65 72 72 | 20 3d 20 44 65 74 65 72 |/....err| = Deter|
|00002cf0| 6d 69 6e 65 56 52 65 66 | 4e 75 6d 28 28 53 74 72 |mineVRef|Num((Str|
|00002d00| 69 6e 67 50 74 72 29 66 | 69 6c 65 2d 3e 6e 61 6d |ingPtr)f|ile->nam|
|00002d10| 65 2c 20 66 69 6c 65 2d | 3e 76 52 65 66 4e 75 6d |e, file-|>vRefNum|
|00002d20| 2c 20 26 72 65 61 6c 56 | 52 65 66 4e 75 6d 29 3b |, &realV|RefNum);|
|00002d30| 0d 09 09 09 69 66 20 28 | 20 65 72 72 20 3d 3d 20 |....if (| err == |
|00002d40| 6e 6f 45 72 72 20 29 0d | 09 09 09 7b 0d 09 09 09 |noErr ).|...{....|
|00002d50| 09 65 72 72 20 3d 20 42 | 75 6d 70 44 61 74 65 28 |.err = B|umpDate(|
|00002d60| 72 65 61 6c 56 52 65 66 | 4e 75 6d 2c 20 70 61 72 |realVRef|Num, par|
|00002d70| 49 44 2c 20 4e 55 4c 4c | 29 3b 0d 09 09 09 09 09 |ID, NULL|);......|
|00002d80| 2f 2a 20 61 6e 64 20 62 | 75 6d 70 20 74 68 65 20 |/* and b|ump the |
|00002d90| 70 61 72 65 6e 74 20 64 | 69 72 65 63 74 6f 72 79 |parent d|irectory|
|00002da0| 27 73 20 6d 6f 64 20 64 | 61 74 65 20 74 6f 20 77 |'s mod d|ate to w|
|00002db0| 61 6b 65 20 75 70 20 74 | 68 65 20 46 69 6e 64 65 |ake up t|he Finde|
|00002dc0| 72 20 2a 2f 0d 09 09 09 | 09 09 2f 2a 20 74 6f 20 |r */....|../* to |
|00002dd0| 74 68 65 20 63 68 61 6e | 67 65 20 77 65 20 6a 75 |the chan|ge we ju|
|00002de0| 73 74 20 6d 61 64 65 20 | 2a 2f 0d 09 09 09 7d 0d |st made |*/....}.|
|00002df0| 09 09 7d 0d 09 7d 0d 09 | 72 65 74 75 72 6e 20 28 |..}..}..|return (|
|00002e00| 20 65 72 72 20 29 3b 0d | 7d 0d 00 00 00 00 00 00 | err );.|}.......|
|00002e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e80| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00002e90| 01 03 02 35 00 00 00 00 | 00 00 00 87 00 00 00 97 |...5....|........|
|00002ea0| 00 02 00 00 05 24 00 00 | 00 e6 06 00 00 17 00 4c |.....$..|.......L|
|00002eb0| 0d 50 44 55 74 69 6c 69 | 74 69 65 73 2e 63 02 00 |.PDUtili|ties.c..|
|00002ec0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00002ed0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 ab d5 42 67 00 00 | 2d 8a 00 00 01 ac 00 00 |....Bg..|-.......|
|00002f00| 00 16 06 00 00 19 00 4c | 00 00 1c 27 00 00 1c 9d |.......L|...'....|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 02 00 00 | 06 5a 00 00 00 32 04 01 |........|.Z...2..|
|00002f30| 00 b9 00 4c 00 00 1d 4a | 00 00 1e 1e 00 00 2e fd |...L...J|........|
|00002f40| 00 ff 02 2b 00 00 00 00 | 00 00 00 9d 00 00 00 a1 |...+....|........|
|00002f50| 00 02 00 00 06 5e 00 00 | 00 16 06 00 00 1b 00 4c |.....^..|.......L|
|00002f60| 00 00 1d a7 00 00 1e 1e | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 02 00 00 |........|........|
|00002f80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 6c 64 65 |...H..Mo|naco.lde|
|00002f90| 00 ff a4 80 6f 72 74 20 | 2a 76 52 65 66 4e 75 6d |....ort |*vRefNum|
|00002fa0| 2c 20 6c 6f 6e 67 00 06 | 00 04 00 2a 00 20 02 61 |, long..|...*. .a|
|00002fb0| 02 1c 00 50 00 20 01 dd | 02 3d ac 74 c8 ce 00 00 |...P. ..|.=.t....|
|00002fc0| 2a c2 00 00 2a c2 00 00 | 27 f6 01 00 00 00 00 1e |*...*...|'.......|
|00002fd0| 00 2a 00 20 02 61 02 1c | 00 50 00 20 01 dd 02 3d |.*. .a..|.P. ...=|
|00002fe0| 00 00 27 f6 00 00 00 00 | 00 00 00 00 00 00 00 00 |..'.....|........|
|00002ff0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 e6 |.....n..|.n...>..|
|00003000| 06 48 22 28 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |.H"(....|.>..MPSR|
|00003010| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00003020| 03 f0 ff ff 00 00 00 4c | 00 f0 b8 94 00 00 00 00 |.......L|........|
|00003030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+