home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-08-08 | 19.3 KB | [TEXT/KEEN] |
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, Tue Aug 8 20:56:04 1995, modified Tue Aug 8 20:56:04 1995, creator 'KEEN', type ASCII, 18862 bytes "hAWK_FilesandClip.c" , at 0x4a2e 532 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KEEN] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 68 41 57 4b 5f 46 | 69 6c 65 73 61 6e 64 43 |..hAWK_F|ilesandC|
|00000010| 6c 69 70 2e 63 00 00 00 | 00 00 00 00 00 00 00 00 |lip.c...|........|
|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 4b 45 45 | 4e 01 00 00 00 00 00 00 |.TEXTKEE|N.......|
|00000050| 00 00 00 00 00 49 ae 00 | 00 02 14 ac 4d b8 24 ac |.....I..|....M.$.|
|00000060| 4d b8 24 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |M.$.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 da 4f 00 00 |........|.....O..|
|00000080| 2f 2a 20 68 41 57 4b 5f | 46 69 6c 65 73 61 6e 64 |/* hAWK_|Filesand|
|00000090| 43 6c 69 70 2e 63 20 3a | 20 66 69 6e 61 6c 6c 79 |Clip.c :| finally|
|000000a0| 2c 20 73 6f 6d 65 20 66 | 69 6c 65 20 6d 61 6e 69 |, some f|ile mani|
|000000b0| 70 75 6c 61 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |pulation| routine|
|000000c0| 73 20 66 6f 72 20 68 41 | 57 4b 2e 0d 57 68 65 72 |s for hA|WK..Wher|
|000000d0| 65 20 61 20 66 69 6c 65 | 20 6f 72 20 64 69 72 65 |e a file| or dire|
|000000e0| 63 74 6f 72 79 20 6e 61 | 6d 65 20 69 73 20 6e 65 |ctory na|me is ne|
|000000f0| 65 64 65 64 2c 20 74 68 | 65 79 20 6d 75 73 74 20 |eded, th|ey must |
|00000100| 62 65 20 66 75 6c 6c 20 | 70 61 74 68 6e 61 6d 65 |be full |pathname|
|00000110| 73 0d 69 6e 20 6f 72 64 | 65 72 20 74 6f 20 67 69 |s.in ord|er to gi|
|00000120| 76 65 20 70 72 65 64 69 | 63 74 61 62 6c 65 20 72 |ve predi|ctable r|
|00000130| 65 73 75 6c 74 73 2e 0d | 63 6f 70 79 20 3a 20 63 |esults..|copy : c|
|00000140| 6f 70 79 20 61 20 66 69 | 6c 65 20 66 72 6f 6d 20 |opy a fi|le from |
|00000150| 6f 6e 65 20 6c 6f 63 61 | 74 69 6f 6e 20 74 6f 20 |one loca|tion to |
|00000160| 61 6e 6f 74 68 65 72 2c | 20 6f 70 74 69 6f 6e 61 |another,| optiona|
|00000170| 6c 6c 79 20 63 68 61 6e | 67 69 6e 67 20 6e 61 6d |lly chan|ging nam|
|00000180| 65 2e 0d 6c 69 73 74 20 | 3a 20 67 69 76 65 6e 20 |e..list |: given |
|00000190| 66 69 6c 65 20 6f 72 20 | 64 69 72 65 63 74 6f 72 |file or |director|
|000001a0| 79 20 66 75 6c 6c 20 70 | 61 74 68 6e 61 6d 65 2c |y full p|athname,|
|000001b0| 20 72 65 74 75 72 6e 73 | 20 61 72 72 61 79 20 6f | returns| array o|
|000001c0| 66 20 66 75 6c 6c 20 70 | 61 74 68 6e 61 6d 65 73 |f full p|athnames|
|000001d0| 0d 09 66 6f 72 20 61 6c | 6c 20 54 45 58 54 20 66 |..for al|l TEXT f|
|000001e0| 69 6c 65 73 20 69 6e 20 | 74 68 65 20 64 69 72 65 |iles in |the dire|
|000001f0| 63 74 6f 72 79 2e 20 4e | 6f 74 65 20 73 75 62 64 |ctory. N|ote subd|
|00000200| 69 72 65 63 74 6f 72 69 | 65 73 20 61 72 65 20 61 |irectori|es are a|
|00000210| 6c 73 6f 20 65 78 63 6c | 75 64 65 64 2e 0d 6e 65 |lso excl|uded..ne|
|00000220| 73 74 65 64 20 3a 20 67 | 69 76 65 6e 20 66 69 6c |sted : g|iven fil|
|00000230| 65 20 66 75 6c 6c 20 70 | 61 74 68 6e 61 6d 65 2c |e full p|athname,|
|00000240| 20 72 65 74 75 72 6e 73 | 20 61 72 72 61 79 20 6f | returns| array o|
|00000250| 66 20 66 75 6c 6c 20 70 | 61 74 68 6e 61 6d 65 73 |f full p|athnames|
|00000260| 20 66 6f 72 0d 09 64 69 | 72 65 63 74 6f 72 69 65 | for..di|rectorie|
|00000270| 73 20 61 74 20 74 68 65 | 20 73 61 6d 65 20 6c 65 |s at the| same le|
|00000280| 76 65 6c 20 28 22 73 69 | 62 6c 69 6e 67 20 66 6f |vel ("si|bling fo|
|00000290| 6c 64 65 72 73 22 29 3b | 20 67 69 76 65 6e 20 64 |lders");| given d|
|000002a0| 69 72 65 63 74 6f 72 79 | 0d 09 6e 61 6d 65 2c 20 |irectory|..name, |
|000002b0| 72 65 74 75 72 6e 73 20 | 61 72 72 61 79 20 6f 66 |returns |array of|
|000002c0| 20 73 75 62 64 69 72 65 | 63 74 6f 72 69 65 73 2e | subdire|ctories.|
|000002d0| 20 49 6e 20 6f 74 68 65 | 72 20 77 6f 72 64 73 2c | In othe|r words,|
|000002e0| 20 74 68 65 20 73 61 6d | 65 20 61 73 0d 09 6c 69 | the sam|e as..li|
|000002f0| 73 74 20 62 75 74 20 66 | 6f 72 20 66 6f 6c 64 65 |st but f|or folde|
|00000300| 72 73 20 72 61 74 68 65 | 72 20 74 68 61 6e 20 66 |rs rathe|r than f|
|00000310| 69 6c 65 73 2e 0d 72 65 | 6d 6f 76 65 20 3a 20 64 |iles..re|move : d|
|00000320| 65 6c 65 74 65 73 20 61 | 20 66 69 6c 65 0d 72 65 |eletes a| file.re|
|00000330| 6e 61 6d 65 20 3a 20 72 | 65 6e 61 6d 65 73 20 61 |name : r|enames a|
|00000340| 20 66 69 6c 65 20 28 77 | 69 74 68 6f 75 74 20 63 | file (w|ithout c|
|00000350| 68 61 6e 67 69 6e 67 20 | 6c 6f 63 61 74 69 6f 6e |hanging |location|
|00000360| 29 2e 20 4e 6f 74 65 20 | 74 68 65 20 6f 6c 64 20 |). Note |the old |
|00000370| 6e 61 6d 65 0d 09 6d 75 | 73 74 20 62 65 20 61 20 |name..mu|st be a |
|00000380| 66 75 6c 6c 20 70 61 74 | 68 6e 61 6d 65 2c 20 62 |full pat|hname, b|
|00000390| 75 74 20 74 68 65 20 6e | 65 77 20 6e 61 6d 65 20 |ut the n|ew name |
|000003a0| 63 61 6e 20 62 65 20 65 | 69 74 68 65 72 20 61 20 |can be e|ither a |
|000003b0| 66 75 6c 6c 20 70 61 74 | 68 6e 61 6d 65 0d 09 6f |full pat|hname..o|
|000003c0| 72 20 6a 75 73 74 20 61 | 20 66 69 6c 65 20 6e 61 |r just a| file na|
|000003d0| 6d 65 20 70 72 6f 70 65 | 72 20 28 6e 6f 20 63 6f |me prope|r (no co|
|000003e0| 6c 6f 6e 73 29 2e 0d 65 | 78 69 73 74 73 20 3a 20 |lons)..e|xists : |
|000003f0| 72 65 74 75 72 6e 73 20 | 31 20 69 66 20 66 69 6c |returns |1 if fil|
|00000400| 65 20 65 78 69 73 74 73 | 2c 20 30 20 69 66 20 6e |e exists|, 0 if n|
|00000410| 6f 74 0d 66 64 61 74 65 | 20 3a 20 72 65 74 75 72 |ot.fdate| : retur|
|00000420| 6e 73 20 64 61 74 65 2f | 74 69 6d 65 20 6f 66 20 |ns date/|time of |
|00000430| 6c 61 73 74 20 6d 6f 64 | 69 66 69 63 61 74 69 6f |last mod|ificatio|
|00000440| 6e 2c 20 66 6f 72 6d 61 | 74 0d 09 09 09 79 72 3a |n, forma|t....yr:|
|00000450| 6d 6f 3a 64 61 79 3a 68 | 72 3a 6d 69 6e 3a 73 65 |mo:day:h|r:min:se|
|00000460| 63 20 77 68 65 72 65 20 | 79 72 20 69 73 20 34 20 |c where |yr is 4 |
|00000470| 64 69 67 69 74 73 2c 20 | 61 6e 64 20 74 68 65 0d |digits, |and the.|
|00000480| 09 09 09 72 65 73 74 20 | 61 72 65 20 32 20 28 65 |...rest |are 2 (e|
|00000490| 67 20 61 6c 77 61 79 73 | 20 30 31 20 72 61 74 68 |g always| 01 rath|
|000004a0| 65 72 20 74 68 61 6e 20 | 6a 75 73 74 20 31 29 0d |er than |just 1).|
|000004b0| 66 73 69 7a 65 20 3a 20 | 72 65 74 75 72 6e 73 20 |fsize : |returns |
|000004c0| 73 69 7a 65 20 69 6e 20 | 62 79 74 65 73 20 6f 66 |size in |bytes of|
|000004d0| 20 66 69 6c 65 27 73 20 | 64 61 74 61 20 66 6f 72 | file's |data for|
|000004e0| 6b 0d 67 65 74 63 6c 69 | 70 20 3a 20 72 65 74 75 |k.getcli|p : retu|
|000004f0| 72 6e 73 20 63 75 72 72 | 65 6e 74 20 63 61 6c 6c |rns curr|ent call|
|00000500| 69 6e 67 20 61 70 70 27 | 73 20 63 6c 69 70 62 6f |ing app'|s clipbo|
|00000510| 61 72 64 20 74 65 78 74 | 2c 20 61 73 20 61 20 73 |ard text|, as a s|
|00000520| 74 72 69 6e 67 0d 09 28 | 6f 70 74 69 6f 6e 61 6c |tring..(|optional|
|00000530| 20 61 72 67 75 6d 65 6e | 74 20 74 6f 20 73 70 65 | argumen|t to spe|
|00000540| 63 69 66 79 20 6d 61 78 | 20 62 79 74 65 73 20 6f |cify max| bytes o|
|00000550| 66 20 74 65 78 74 20 72 | 65 74 72 69 65 76 65 64 |f text r|etrieved|
|00000560| 29 0d 70 75 74 63 6c 69 | 70 20 3a 20 70 75 74 73 |).putcli|p : puts|
|00000570| 20 61 20 73 74 72 69 6e | 67 20 6f 6e 20 74 68 65 | a strin|g on the|
|00000580| 20 63 61 6c 6c 69 6e 67 | 20 61 70 70 27 73 20 70 | calling| app's p|
|00000590| 72 69 76 61 74 65 20 63 | 6c 69 70 62 6f 61 72 64 |rivate c|lipboard|
|000005a0| 0d 62 65 65 70 20 3a 20 | 64 6f 65 73 20 61 20 53 |.beep : |does a S|
|000005b0| 79 73 42 65 65 70 28 29 | 3b 20 69 66 20 74 68 65 |ysBeep()|; if the|
|000005c0| 20 64 75 72 61 74 69 6f | 6e 20 79 6f 75 20 70 61 | duratio|n you pa|
|000005d0| 73 73 20 69 73 20 3c 3d | 20 30 2c 20 74 68 65 0d |ss is <=| 0, the.|
|000005e0| 09 6d 65 6e 75 20 62 61 | 72 20 77 69 6c 6c 20 66 |.menu ba|r will f|
|000005f0| 6c 61 73 68 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |lash ins|tead of |
|00000600| 61 20 62 65 65 70 0d 2a | 2f 0d 23 69 6e 63 6c 75 |a beep.*|/.#inclu|
|00000610| 64 65 20 22 41 57 4b 2e | 48 22 0d 23 69 6e 63 6c |de "AWK.|H".#incl|
|00000620| 75 64 65 20 3c 46 69 6c | 65 73 2e 68 3e 0d 65 78 |ude <Fil|es.h>.ex|
|00000630| 74 65 72 6e 20 76 6f 69 | 64 20 61 73 73 6f 63 5f |tern voi|d assoc_|
|00000640| 63 6c 65 61 72 28 4e 4f | 44 45 20 2a 73 79 6d 62 |clear(NO|DE *symb|
|00000650| 6f 6c 29 3b 20 2f 2a 20 | 41 52 52 41 59 2e 43 20 |ol); /* |ARRAY.C |
|00000660| 2a 2f 0d 0d 0d 2f 2a 20 | 46 75 6e 63 74 69 6f 6e |*/.../* |Function|
|00000670| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 69 |s define|d in thi|
|00000680| 73 20 66 69 6c 65 20 2a | 2f 0d 73 68 6f 72 74 20 |s file *|/.short |
|00000690| 62 5f 67 65 74 5f 74 77 | 6f 28 4e 4f 44 45 20 2a |b_get_tw|o(NODE *|
|000006a0| 74 72 65 65 2c 20 4e 4f | 44 45 20 2a 2a 72 65 73 |tree, NO|DE **res|
|000006b0| 31 2c 20 4e 4f 44 45 20 | 2a 2a 72 65 73 32 29 3b |1, NODE |**res2);|
|000006c0| 0d 73 68 6f 72 74 20 63 | 5f 67 65 74 5f 74 77 6f |.short c|_get_two|
|000006d0| 28 4e 4f 44 45 20 2a 74 | 72 65 65 2c 20 4e 4f 44 |(NODE *t|ree, NOD|
|000006e0| 45 20 2a 2a 72 65 73 31 | 2c 20 4e 4f 44 45 20 2a |E **res1|, NODE *|
|000006f0| 2a 72 65 73 32 29 3b 0d | 4e 4f 44 45 20 2a 64 6f |*res2);.|NODE *do|
|00000700| 5f 63 6f 70 79 28 4e 4f | 44 45 20 2a 74 72 65 65 |_copy(NO|DE *tree|
|00000710| 29 3b 0d 42 6f 6f 6c 65 | 61 6e 20 63 6f 70 79 5f |);.Boole|an copy_|
|00000720| 66 69 6c 65 28 50 74 72 | 20 6f 6c 64 4e 61 6d 65 |file(Ptr| oldName|
|00000730| 50 2c 20 73 68 6f 72 74 | 20 6f 6c 64 4e 6d 4c 65 |P, short| oldNmLe|
|00000740| 6e 2c 20 50 74 72 20 6e | 65 77 4e 61 6d 65 50 2c |n, Ptr n|ewNameP,|
|00000750| 20 73 68 6f 72 74 20 6e | 65 77 4e 6d 4c 65 6e 29 | short n|ewNmLen)|
|00000760| 3b 0d 4f 53 45 72 72 20 | 43 72 65 61 74 65 44 69 |;.OSErr |CreateDi|
|00000770| 72 65 63 74 6f 72 69 65 | 73 28 53 74 72 69 6e 67 |rectorie|s(String|
|00000780| 50 74 72 20 6e 65 77 4e | 61 6d 65 29 3b 0d 4e 4f |Ptr newN|ame);.NO|
|00000790| 44 45 20 2a 64 6f 5f 6c | 69 73 74 28 4e 4f 44 45 |DE *do_l|ist(NODE|
|000007a0| 20 2a 74 72 65 65 29 3b | 0d 4e 4f 44 45 20 2a 64 | *tree);|.NODE *d|
|000007b0| 6f 5f 6e 65 73 74 65 64 | 28 4e 4f 44 45 20 2a 74 |o_nested|(NODE *t|
|000007c0| 72 65 65 29 3b 0d 73 68 | 6f 72 74 20 6c 69 73 74 |ree);.sh|ort list|
|000007d0| 5f 66 69 6c 65 73 5f 6f | 72 5f 64 69 72 73 28 63 |_files_o|r_dirs(c|
|000007e0| 68 61 72 20 2a 74 68 65 | 4e 61 6d 65 2c 20 73 68 |har *the|Name, sh|
|000007f0| 6f 72 74 20 6e 6d 6c 65 | 6e 2c 20 4e 4f 44 45 20 |ort nmle|n, NODE |
|00000800| 2a 69 6e 64 2c 20 42 6f | 6f 6c 65 61 6e 20 64 69 |*ind, Bo|olean di|
|00000810| 72 73 29 3b 0d 4e 4f 44 | 45 20 2a 64 6f 5f 72 65 |rs);.NOD|E *do_re|
|00000820| 6e 61 6d 65 28 4e 4f 44 | 45 20 2a 74 72 65 65 29 |name(NOD|E *tree)|
|00000830| 3b 0d 42 6f 6f 6c 65 61 | 6e 20 5f 72 65 6e 61 6d |;.Boolea|n _renam|
|00000840| 65 28 50 74 72 20 6f 6c | 64 4e 61 6d 65 50 2c 20 |e(Ptr ol|dNameP, |
|00000850| 73 68 6f 72 74 20 6f 6c | 64 4e 6d 4c 65 6e 2c 20 |short ol|dNmLen, |
|00000860| 50 74 72 20 6e 65 77 4e | 61 6d 65 50 2c 20 73 68 |Ptr newN|ameP, sh|
|00000870| 6f 72 74 20 6e 65 77 4e | 6d 4c 65 6e 29 3b 0d 4e |ort newN|mLen);.N|
|00000880| 4f 44 45 20 2a 64 6f 5f | 72 65 6d 6f 76 65 28 4e |ODE *do_|remove(N|
|00000890| 4f 44 45 20 2a 74 72 65 | 65 29 3b 0d 42 6f 6f 6c |ODE *tre|e);.Bool|
|000008a0| 65 61 6e 20 5f 72 65 6d | 6f 76 65 28 63 68 61 72 |ean _rem|ove(char|
|000008b0| 20 2a 6e 61 6d 65 2c 20 | 73 68 6f 72 74 20 6e 6d | *name, |short nm|
|000008c0| 4c 65 6e 29 3b 0d 4e 4f | 44 45 20 2a 64 6f 5f 65 |Len);.NO|DE *do_e|
|000008d0| 78 69 73 74 73 28 4e 4f | 44 45 20 2a 74 72 65 65 |xists(NO|DE *tree|
|000008e0| 29 3b 0d 42 6f 6f 6c 65 | 61 6e 20 5f 65 78 69 73 |);.Boole|an _exis|
|000008f0| 74 73 28 63 68 61 72 20 | 2a 6e 61 6d 65 2c 20 73 |ts(char |*name, s|
|00000900| 68 6f 72 74 20 6e 6d 4c | 65 6e 29 3b 0d 4e 4f 44 |hort nmL|en);.NOD|
|00000910| 45 20 2a 64 6f 5f 66 64 | 61 74 65 28 4e 4f 44 45 |E *do_fd|ate(NODE|
|00000920| 20 2a 74 72 65 65 29 3b | 0d 4e 4f 44 45 20 2a 5f | *tree);|.NODE *_|
|00000930| 66 64 61 74 65 28 63 68 | 61 72 20 2a 6e 61 6d 65 |fdate(ch|ar *name|
|00000940| 2c 20 73 68 6f 72 74 20 | 6e 6d 4c 65 6e 29 3b 0d |, short |nmLen);.|
|00000950| 4e 4f 44 45 20 2a 64 6f | 5f 66 73 69 7a 65 28 4e |NODE *do|_fsize(N|
|00000960| 4f 44 45 20 2a 74 72 65 | 65 29 3b 0d 6c 6f 6e 67 |ODE *tre|e);.long|
|00000970| 20 5f 66 73 69 7a 65 28 | 63 68 61 72 20 2a 6e 61 | _fsize(|char *na|
|00000980| 6d 65 2c 20 73 68 6f 72 | 74 20 6e 6d 4c 65 6e 29 |me, shor|t nmLen)|
|00000990| 3b 0d 4e 4f 44 45 20 2a | 64 6f 5f 67 65 74 63 6c |;.NODE *|do_getcl|
|000009a0| 69 70 28 4e 4f 44 45 20 | 2a 74 72 65 65 29 3b 0d |ip(NODE |*tree);.|
|000009b0| 4e 4f 44 45 20 2a 5f 67 | 65 74 63 6c 69 70 28 6c |NODE *_g|etclip(l|
|000009c0| 6f 6e 67 20 6d 61 78 42 | 79 74 65 73 29 3b 0d 4e |ong maxB|ytes);.N|
|000009d0| 4f 44 45 20 2a 64 6f 5f | 70 75 74 63 6c 69 70 28 |ODE *do_|putclip(|
|000009e0| 4e 4f 44 45 20 2a 74 72 | 65 65 29 3b 0d 73 68 6f |NODE *tr|ee);.sho|
|000009f0| 72 74 20 5f 70 75 74 63 | 6c 69 70 28 63 68 61 72 |rt _putc|lip(char|
|00000a00| 20 2a 73 74 72 29 3b 0d | 4e 4f 44 45 20 2a 64 6f | *str);.|NODE *do|
|00000a10| 5f 62 65 65 70 28 4e 4f | 44 45 20 2a 74 72 65 65 |_beep(NO|DE *tree|
|00000a20| 29 3b 0d 0d 73 68 6f 72 | 74 20 62 5f 67 65 74 5f |);..shor|t b_get_|
|00000a30| 74 77 6f 28 4e 4f 44 45 | 20 2a 74 72 65 65 2c 20 |two(NODE| *tree, |
|00000a40| 4e 4f 44 45 20 2a 2a 72 | 65 73 31 2c 20 4e 4f 44 |NODE **r|es1, NOD|
|00000a50| 45 20 2a 2a 72 65 73 32 | 29 0d 09 7b 0d 09 69 66 |E **res2|)..{..if|
|00000a60| 20 28 21 74 72 65 65 29 | 0d 09 09 72 65 74 75 72 | (!tree)|...retur|
|00000a70| 6e 20 30 3b 0d 09 2a 72 | 65 73 31 20 3d 20 74 72 |n 0;..*r|es1 = tr|
|00000a80| 65 65 5f 65 76 61 6c 28 | 74 72 65 65 2d 3e 6c 6e |ee_eval(|tree->ln|
|00000a90| 6f 64 65 29 3b 0d 09 69 | 66 20 28 21 74 72 65 65 |ode);..i|f (!tree|
|00000aa0| 2d 3e 72 6e 6f 64 65 29 | 0d 09 09 72 65 74 75 72 |->rnode)|...retur|
|00000ab0| 6e 20 31 3b 0d 09 74 72 | 65 65 20 3d 20 74 72 65 |n 1;..tr|ee = tre|
|00000ac0| 65 2d 3e 72 6e 6f 64 65 | 3b 0d 09 2a 72 65 73 32 |e->rnode|;..*res2|
|00000ad0| 20 3d 20 74 72 65 65 2d | 3e 6c 6e 6f 64 65 3b 0d | = tree-|>lnode;.|
|00000ae0| 09 72 65 74 75 72 6e 20 | 32 3b 0d 09 7d 0d 0d 0d |.return |2;..}...|
|00000af0| 73 68 6f 72 74 20 63 5f | 67 65 74 5f 74 77 6f 28 |short c_|get_two(|
|00000b00| 4e 4f 44 45 20 2a 74 72 | 65 65 2c 20 4e 4f 44 45 |NODE *tr|ee, NODE|
|00000b10| 20 2a 2a 72 65 73 31 2c | 20 4e 4f 44 45 20 2a 2a | **res1,| NODE **|
|00000b20| 72 65 73 32 29 0d 09 7b | 0d 09 69 66 20 28 21 74 |res2)..{|..if (!t|
|00000b30| 72 65 65 29 0d 09 09 72 | 65 74 75 72 6e 20 30 3b |ree)...r|eturn 0;|
|00000b40| 0d 09 2a 72 65 73 31 20 | 3d 20 74 72 65 65 5f 65 |..*res1 |= tree_e|
|00000b50| 76 61 6c 28 74 72 65 65 | 2d 3e 6c 6e 6f 64 65 29 |val(tree|->lnode)|
|00000b60| 3b 0d 09 69 66 20 28 21 | 74 72 65 65 2d 3e 72 6e |;..if (!|tree->rn|
|00000b70| 6f 64 65 29 0d 09 09 72 | 65 74 75 72 6e 20 31 3b |ode)...r|eturn 1;|
|00000b80| 0d 09 74 72 65 65 20 3d | 20 74 72 65 65 2d 3e 72 |..tree =| tree->r|
|00000b90| 6e 6f 64 65 3b 0d 09 2a | 72 65 73 32 20 3d 20 20 |node;..*|res2 = |
|00000ba0| 74 72 65 65 5f 65 76 61 | 6c 28 74 72 65 65 2d 3e |tree_eva|l(tree->|
|00000bb0| 6c 6e 6f 64 65 29 3b 0d | 09 72 65 74 75 72 6e 20 |lnode);.|.return |
|00000bc0| 32 3b 0d 09 7d 0d 4e 4f | 44 45 20 2a 64 6f 5f 63 |2;..}.NO|DE *do_c|
|00000bd0| 6f 70 79 28 4e 4f 44 45 | 20 2a 74 72 65 65 29 0d |opy(NODE| *tree).|
|00000be0| 09 7b 0d 09 4e 4f 44 45 | 20 09 2a 74 31 2c 20 2a |.{..NODE| .*t1, *|
|00000bf0| 74 32 3b 09 2f 2a 20 73 | 74 72 69 6e 67 2c 20 73 |t2;./* s|tring, s|
|00000c00| 74 72 69 6e 67 20 2a 2f | 0d 09 4e 4f 44 45 09 2a |tring */|..NODE.*|
|00000c10| 72 65 73 3b 0d 09 63 68 | 61 72 20 09 2a 66 72 6f |res;..ch|ar .*fro|
|00000c20| 6d 2c 20 2a 74 6f 3b 0d | 09 73 68 6f 72 74 09 09 |m, *to;.|.short..|
|00000c30| 6e 75 6d 5f 61 72 67 73 | 3b 0d 09 0d 09 69 66 20 |num_args|;....if |
|00000c40| 28 28 6e 75 6d 5f 61 72 | 67 73 20 3d 20 63 5f 67 |((num_ar|gs = c_g|
|00000c50| 65 74 5f 74 77 6f 28 74 | 72 65 65 2c 20 26 74 31 |et_two(t|ree, &t1|
|00000c60| 2c 20 26 74 32 29 29 20 | 3c 20 32 29 0d 09 09 66 |, &t2)) |< 2)...f|
|00000c70| 61 74 61 6c 28 22 63 6f | 70 79 20 72 65 71 75 69 |atal("co|py requi|
|00000c80| 72 65 73 20 61 74 20 6c | 65 61 73 74 20 74 77 6f |res at l|east two|
|00000c90| 20 61 72 67 75 6d 65 6e | 74 73 22 29 3b 0d 09 66 | argumen|ts");..f|
|00000ca0| 72 6f 6d 20 3d 20 66 6f | 72 63 65 5f 73 74 72 69 |rom = fo|rce_stri|
|00000cb0| 6e 67 28 74 31 29 2d 3e | 73 74 70 74 72 3b 0d 09 |ng(t1)->|stptr;..|
|00000cc0| 74 6f 20 3d 20 66 6f 72 | 63 65 5f 73 74 72 69 6e |to = for|ce_strin|
|00000cd0| 67 28 74 32 29 2d 3e 73 | 74 70 74 72 3b 0d 09 72 |g(t2)->s|tptr;..r|
|00000ce0| 65 73 20 3d 20 20 74 6d | 70 5f 6e 75 6d 62 65 72 |es = tm|p_number|
|00000cf0| 28 28 41 57 4b 4e 55 4d | 29 0d 09 09 63 6f 70 79 |((AWKNUM|)...copy|
|00000d00| 5f 66 69 6c 65 28 66 72 | 6f 6d 2c 20 74 31 2d 3e |_file(fr|om, t1->|
|00000d10| 73 74 6c 65 6e 2b 31 2c | 20 74 6f 2c 20 74 32 2d |stlen+1,| to, t2-|
|00000d20| 3e 73 74 6c 65 6e 2b 31 | 29 29 3b 0d 09 66 72 65 |>stlen+1|));..fre|
|00000d30| 65 5f 74 65 6d 70 28 74 | 31 29 3b 0d 09 66 72 65 |e_temp(t|1);..fre|
|00000d40| 65 5f 74 65 6d 70 28 74 | 32 29 3b 0d 09 72 65 74 |e_temp(t|2);..ret|
|00000d50| 75 72 6e 20 72 65 73 3b | 0d 09 7d 0d 0d 2f 2a 20 |urn res;|..}../* |
|00000d60| 4f 70 65 6e 20 26 20 63 | 6f 70 79 20 64 61 74 61 |Open & c|opy data|
|00000d70| 20 66 6f 72 6b 73 2c 20 | 61 6e 64 20 72 65 73 6f | forks, |and reso|
|00000d80| 75 72 63 65 20 66 6f 72 | 6b 73 2e 20 55 73 65 20 |urce for|ks. Use |
|00000d90| 61 73 20 62 69 67 20 61 | 20 62 75 66 66 65 72 20 |as big a| buffer |
|00000da0| 61 73 20 79 6f 75 20 63 | 61 6e 20 67 65 74 2e 0d |as you c|an get..|
|00000db0| 52 65 71 75 69 72 65 73 | 20 61 20 6e 6f 6e 2d 65 |Requires| a non-e|
|00000dc0| 6d 70 74 79 20 64 61 74 | 61 20 66 6f 72 6b 20 69 |mpty dat|a fork i|
|00000dd0| 6e 20 6f 72 69 67 69 6e | 61 6c 20 66 69 6c 65 2e |n origin|al file.|
|00000de0| 20 0d 50 72 65 73 65 72 | 76 65 73 20 74 79 70 65 | .Preser|ves type|
|00000df0| 20 61 6e 64 20 63 72 65 | 61 74 6f 72 2e 2a 2f 0d | and cre|ator.*/.|
|00000e00| 42 6f 6f 6c 65 61 6e 20 | 63 6f 70 79 5f 66 69 6c |Boolean |copy_fil|
|00000e10| 65 28 50 74 72 20 6f 6c | 64 4e 61 6d 65 50 2c 20 |e(Ptr ol|dNameP, |
|00000e20| 73 68 6f 72 74 20 6f 6c | 64 4e 6d 4c 65 6e 2c 20 |short ol|dNmLen, |
|00000e30| 50 74 72 20 6e 65 77 4e | 61 6d 65 50 2c 20 73 68 |Ptr newN|ameP, sh|
|00000e40| 6f 72 74 20 6e 65 77 4e | 6d 4c 65 6e 29 0d 09 7b |ort newN|mLen)..{|
|00000e50| 0d 09 49 4f 50 61 72 61 | 6d 20 09 70 62 2c 20 70 |..IOPara|m .pb, p|
|00000e60| 62 4f 75 74 3b 0d 09 46 | 69 6c 65 50 61 72 61 6d |bOut;..F|ileParam|
|00000e70| 09 66 70 62 3b 0d 09 6c | 6f 6e 67 20 20 20 20 09 |.fpb;..l|ong .|
|00000e80| 65 6f 66 2c 20 63 6f 75 | 6e 74 2c 20 62 75 66 53 |eof, cou|nt, bufS|
|00000e90| 69 7a 65 2c 20 6d 69 6e | 42 75 66 2c 20 6e 75 6d |ize, min|Buf, num|
|00000ea0| 4c 65 66 74 2c 20 74 68 | 65 54 79 70 65 2c 20 74 |Left, th|eType, t|
|00000eb0| 68 65 43 72 65 61 74 6f | 72 3b 0d 09 48 61 6e 64 |heCreato|r;..Hand|
|00000ec0| 6c 65 20 09 09 68 44 61 | 74 61 3b 0d 09 63 68 61 |le ..hDa|ta;..cha|
|00000ed0| 72 09 09 6f 6c 64 4e 61 | 6d 65 5b 32 35 36 5d 2c |r..oldNa|me[256],|
|00000ee0| 20 6e 65 77 4e 61 6d 65 | 5b 32 35 36 5d 3b 0d 09 | newName|[256];..|
|00000ef0| 4f 53 45 72 72 20 09 09 | 49 4f 52 65 73 75 6c 74 |OSErr ..|IOResult|
|00000f00| 3b 0d 09 73 68 6f 72 74 | 09 09 09 69 3b 0d 23 64 |;..short|...i;.#d|
|00000f10| 65 66 69 6e 65 20 46 69 | 6c 65 45 72 72 6f 72 28 |efine Fi|leError(|
|00000f20| 78 29 0d 0d 09 42 6c 6f | 63 6b 4d 6f 76 65 28 6f |x)...Blo|ckMove(o|
|00000f30| 6c 64 4e 61 6d 65 50 2c | 20 6f 6c 64 4e 61 6d 65 |ldNameP,| oldName|
|00000f40| 2c 20 6f 6c 64 4e 6d 4c | 65 6e 29 3b 0d 09 43 74 |, oldNmL|en);..Ct|
|00000f50| 6f 50 73 74 72 28 6f 6c | 64 4e 61 6d 65 29 3b 0d |oPstr(ol|dName);.|
|00000f60| 09 66 70 62 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |.fpb.ioN|amePtr =|
|00000f70| 20 28 53 74 72 69 6e 67 | 50 74 72 29 20 6f 6c 64 | (String|Ptr) old|
|00000f80| 4e 61 6d 65 3b 0d 09 66 | 70 62 2e 69 6f 56 52 65 |Name;..f|pb.ioVRe|
|00000f90| 66 4e 75 6d 20 3d 20 30 | 3b 0d 09 66 70 62 2e 69 |fNum = 0|;..fpb.i|
|00000fa0| 6f 46 56 65 72 73 4e 75 | 6d 20 3d 20 30 3b 0d 09 |oFVersNu|m = 0;..|
|00000fb0| 66 70 62 2e 69 6f 46 44 | 69 72 49 6e 64 65 78 20 |fpb.ioFD|irIndex |
|00000fc0| 3d 20 30 3b 0d 09 69 66 | 20 28 50 42 47 65 74 46 |= 0;..if| (PBGetF|
|00000fd0| 49 6e 66 6f 53 79 6e 63 | 28 28 50 61 72 6d 42 6c |InfoSync|((ParmBl|
|00000fe0| 6b 50 74 72 29 26 66 70 | 62 29 20 21 3d 20 6e 6f |kPtr)&fp|b) != no|
|00000ff0| 45 72 72 29 0d 09 09 72 | 65 74 75 72 6e 28 46 41 |Err)...r|eturn(FA|
|00001000| 4c 53 45 29 3b 0d 09 74 | 68 65 54 79 70 65 20 3d |LSE);..t|heType =|
|00001010| 20 66 70 62 2e 69 6f 46 | 6c 46 6e 64 72 49 6e 66 | fpb.ioF|lFndrInf|
|00001020| 6f 2e 66 64 54 79 70 65 | 3b 0d 09 74 68 65 43 72 |o.fdType|;..theCr|
|00001030| 65 61 74 6f 72 20 3d 20 | 66 70 62 2e 69 6f 46 6c |eator = |fpb.ioFl|
|00001040| 46 6e 64 72 49 6e 66 6f | 2e 66 64 43 72 65 61 74 |FndrInfo|.fdCreat|
|00001050| 6f 72 3b 0d 09 0d 09 42 | 6c 6f 63 6b 4d 6f 76 65 |or;....B|lockMove|
|00001060| 28 6f 6c 64 4e 61 6d 65 | 50 2c 20 6f 6c 64 4e 61 |(oldName|P, oldNa|
|00001070| 6d 65 2c 20 6f 6c 64 4e | 6d 4c 65 6e 29 3b 0d 09 |me, oldN|mLen);..|
|00001080| 43 74 6f 50 73 74 72 28 | 6f 6c 64 4e 61 6d 65 29 |CtoPstr(|oldName)|
|00001090| 3b 0d 09 42 6c 6f 63 6b | 4d 6f 76 65 28 6e 65 77 |;..Block|Move(new|
|000010a0| 4e 61 6d 65 50 2c 20 6e | 65 77 4e 61 6d 65 2c 20 |NameP, n|ewName, |
|000010b0| 6e 65 77 4e 6d 4c 65 6e | 29 3b 0d 09 43 74 6f 50 |newNmLen|);..CtoP|
|000010c0| 73 74 72 28 6e 65 77 4e | 61 6d 65 29 3b 0d 09 0d |str(newN|ame);...|
|000010d0| 09 66 6f 72 20 28 69 20 | 3d 20 30 3b 20 69 20 3c |.for (i |= 0; i <|
|000010e0| 3d 20 31 3b 20 2b 2b 69 | 29 20 2f 2a 20 30 20 3d |= 1; ++i|) /* 0 =|
|000010f0| 3d 20 64 61 74 61 2c 20 | 31 20 3d 3d 20 72 65 73 |= data, |1 == res|
|00001100| 6f 75 72 63 65 20 66 6f | 72 6b 20 2a 2f 0d 09 09 |ource fo|rk */...|
|00001110| 7b 0d 09 09 6e 75 6d 4c | 65 66 74 20 3d 20 30 3b |{...numL|eft = 0;|
|00001120| 0d 09 09 68 44 61 74 61 | 20 3d 20 4e 55 4c 4c 3b |...hData| = NULL;|
|00001130| 0d 09 09 2f 2a 20 53 65 | 74 20 75 70 20 74 68 65 |.../* Se|t up the|
|00001140| 20 70 61 72 61 6d 20 62 | 6c 6f 63 6b 20 74 6f 20 | param b|lock to |
|00001150| 72 65 61 64 20 69 6e 20 | 74 68 65 20 6f 6c 64 20 |read in |the old |
|00001160| 66 6f 72 6b 2e 20 2a 2f | 0d 09 09 70 62 2e 69 6f |fork. */|...pb.io|
|00001170| 43 6f 6d 70 6c 65 74 69 | 6f 6e 20 3d 20 4e 55 4c |Completi|on = NUL|
|00001180| 4c 3b 0d 09 09 70 62 2e | 69 6f 4e 61 6d 65 50 74 |L;...pb.|ioNamePt|
|00001190| 72 20 3d 20 28 53 74 72 | 69 6e 67 50 74 72 29 6f |r = (Str|ingPtr)o|
|000011a0| 6c 64 4e 61 6d 65 3b 0d | 09 09 70 62 2e 69 6f 56 |ldName;.|..pb.ioV|
|000011b0| 52 65 66 4e 75 6d 20 3d | 20 30 3b 0d 09 09 70 62 |RefNum =| 0;...pb|
|000011c0| 2e 69 6f 56 65 72 73 4e | 75 6d 20 3d 20 30 3b 0d |.ioVersN|um = 0;.|
|000011d0| 09 09 70 62 2e 69 6f 50 | 65 72 6d 73 73 6e 20 3d |..pb.ioP|ermssn =|
|000011e0| 20 66 73 52 64 50 65 72 | 6d 3b 0d 09 09 70 62 2e | fsRdPer|m;...pb.|
|000011f0| 69 6f 4d 69 73 63 20 3d | 20 4e 55 4c 4c 3b 0d 09 |ioMisc =| NULL;..|
|00001200| 09 69 66 20 28 69 20 3d | 3d 20 30 29 0d 09 09 09 |.if (i =|= 0)....|
|00001210| 7b 0d 09 09 09 69 66 20 | 28 50 42 4f 70 65 6e 28 |{....if |(PBOpen(|
|00001220| 28 50 61 72 6d 42 6c 6b | 50 74 72 29 26 70 62 2c |(ParmBlk|Ptr)&pb,|
|00001230| 20 46 41 4c 53 45 29 29 | 0d 09 09 09 09 7b 20 46 | FALSE))|.....{ F|
|00001240| 69 6c 65 45 72 72 6f 72 | 28 70 62 2e 69 6f 52 65 |ileError|(pb.ioRe|
|00001250| 73 75 6c 74 29 3b 20 72 | 65 74 75 72 6e 28 46 41 |sult); r|eturn(FA|
|00001260| 4c 53 45 29 3b 20 7d 0d | 09 09 09 7d 0d 09 09 65 |LSE); }.|...}...e|
|00001270| 6c 73 65 0d 09 09 09 7b | 0d 09 09 09 69 66 20 28 |lse....{|....if (|
|00001280| 50 42 4f 70 65 6e 52 46 | 28 28 50 61 72 6d 42 6c |PBOpenRF|((ParmBl|
|00001290| 6b 50 74 72 29 26 70 62 | 2c 20 46 41 4c 53 45 29 |kPtr)&pb|, FALSE)|
|000012a0| 29 20 2f 2a 20 6d 69 73 | 73 69 6e 67 20 72 65 73 |) /* mis|sing res|
|000012b0| 6f 75 72 63 65 20 66 6f | 72 6b 20 69 73 20 6e 6f |ource fo|rk is no|
|000012c0| 74 20 61 6e 20 65 72 72 | 6f 72 20 2a 2f 0d 09 09 |t an err|or */...|
|000012d0| 09 09 72 65 74 75 72 6e | 28 54 52 55 45 29 3b 0d |..return|(TRUE);.|
|000012e0| 09 09 09 7d 0d 09 09 47 | 65 74 45 4f 46 28 70 62 |...}...G|etEOF(pb|
|000012f0| 2e 69 6f 52 65 66 4e 75 | 6d 2c 20 26 65 6f 66 29 |.ioRefNu|m, &eof)|
|00001300| 3b 0d 09 09 69 66 20 28 | 21 65 6f 66 20 26 26 20 |;...if (|!eof && |
|00001310| 69 29 20 2f 2a 20 65 6d | 70 74 79 20 72 65 73 6f |i) /* em|pty reso|
|00001320| 75 72 63 65 20 66 6f 72 | 6b 20 2d 20 4f 4b 20 2a |urce for|k - OK *|
|00001330| 2f 0d 09 09 09 7b 0d 09 | 09 09 50 42 43 6c 6f 73 |/....{..|..PBClos|
|00001340| 65 28 28 50 61 72 6d 42 | 6c 6b 50 74 72 29 26 70 |e((ParmB|lkPtr)&p|
|00001350| 62 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 09 72 65 |b, FALSE|);....re|
|00001360| 74 75 72 6e 28 54 52 55 | 45 29 3b 0d 09 09 09 7d |turn(TRU|E);....}|
|00001370| 0d 09 09 62 75 66 53 69 | 7a 65 20 3d 20 65 6f 66 |...bufSi|ze = eof|
|00001380| 3b 0d 09 09 6d 69 6e 42 | 75 66 20 3d 20 31 30 32 |;...minB|uf = 102|
|00001390| 34 4c 3b 0d 09 09 69 66 | 20 28 6d 69 6e 42 75 66 |4L;...if| (minBuf|
|000013a0| 20 3e 20 65 6f 66 29 0d | 09 09 09 6d 69 6e 42 75 | > eof).|...minBu|
|000013b0| 66 20 3d 20 31 32 38 4c | 3b 0d 09 09 68 44 61 74 |f = 128L|;...hDat|
|000013c0| 61 20 3d 20 4e 65 77 48 | 61 6e 64 6c 65 28 62 75 |a = NewH|andle(bu|
|000013d0| 66 53 69 7a 65 29 3b 0d | 09 09 77 68 69 6c 65 20 |fSize);.|..while |
|000013e0| 28 4d 65 6d 45 72 72 6f | 72 28 29 20 21 3d 20 6e |(MemErro|r() != n|
|000013f0| 6f 45 72 72 29 0d 09 09 | 09 7b 0d 09 09 09 62 75 |oErr)...|.{....bu|
|00001400| 66 53 69 7a 65 20 2f 3d | 20 32 4c 3b 0d 09 09 09 |fSize /=| 2L;....|
|00001410| 69 66 20 28 62 75 66 53 | 69 7a 65 20 3c 20 6d 69 |if (bufS|ize < mi|
|00001420| 6e 42 75 66 29 0d 09 09 | 09 09 7b 20 2f 2a 44 6f |nBuf)...|..{ /*Do|
|00001430| 4d 65 6d 6f 72 79 41 6c | 65 72 74 28 66 69 6c 65 |MemoryAl|ert(file|
|00001440| 45 72 72 4d 73 67 2c 20 | 6d 69 6e 42 75 66 29 3b |ErrMsg, |minBuf);|
|00001450| 2a 2f 20 67 6f 74 6f 20 | 41 62 6f 72 74 3b 20 7d |*/ goto |Abort; }|
|00001460| 0d 09 09 09 68 44 61 74 | 61 20 3d 20 4e 65 77 48 |....hDat|a = NewH|
|00001470| 61 6e 64 6c 65 28 62 75 | 66 53 69 7a 65 29 3b 0d |andle(bu|fSize);.|
|00001480| 09 09 09 7d 0d 09 09 2f | 2a 20 64 65 6c 65 74 65 |...}.../|* delete|
|00001490| 2c 20 63 72 65 61 74 65 | 20 61 6e 64 20 6f 70 65 |, create| and ope|
|000014a0| 6e 20 6e 65 77 20 66 69 | 6c 65 2c 20 61 6c 6c 6f |n new fi|le, allo|
|000014b0| 63 61 74 69 6e 67 20 73 | 70 61 63 65 20 6f 6e 20 |cating s|pace on |
|000014c0| 64 69 73 6b 20 2a 2f 0d | 09 09 69 66 20 28 69 20 |disk */.|..if (i |
|000014d0| 3d 3d 20 30 29 0d 09 09 | 09 7b 0d 09 09 09 46 53 |== 0)...|.{....FS|
|000014e0| 44 65 6c 65 74 65 28 28 | 53 74 72 69 6e 67 50 74 |Delete((|StringPt|
|000014f0| 72 29 6e 65 77 4e 61 6d | 65 2c 20 30 29 3b 20 2f |r)newNam|e, 0); /|
|00001500| 2f 20 69 67 6e 6f 72 65 | 20 61 6e 79 20 65 72 72 |/ ignore| any err|
|00001510| 6f 72 0d 09 09 09 69 66 | 20 28 49 4f 52 65 73 75 |or....if| (IOResu|
|00001520| 6c 74 20 3d 20 43 72 65 | 61 74 65 28 28 53 74 72 |lt = Cre|ate((Str|
|00001530| 69 6e 67 50 74 72 29 6e | 65 77 4e 61 6d 65 2c 20 |ingPtr)n|ewName, |
|00001540| 30 2c 20 74 68 65 43 72 | 65 61 74 6f 72 2c 20 74 |0, theCr|eator, t|
|00001550| 68 65 54 79 70 65 29 29 | 0d 09 09 09 09 7b 0d 09 |heType))|.....{..|
|00001560| 09 09 09 69 66 20 28 49 | 4f 52 65 73 75 6c 74 20 |...if (I|OResult |
|00001570| 3d 20 43 72 65 61 74 65 | 44 69 72 65 63 74 6f 72 |= Create|Director|
|00001580| 69 65 73 28 28 53 74 72 | 69 6e 67 50 74 72 29 6e |ies((Str|ingPtr)n|
|00001590| 65 77 4e 61 6d 65 29 29 | 20 2f 2f 20 63 61 6c 6c |ewName))| // call|
|000015a0| 73 20 44 69 72 43 72 65 | 61 74 65 20 72 65 70 65 |s DirCre|ate repe|
|000015b0| 61 74 65 64 6c 79 0d 09 | 09 09 09 09 7b 20 46 69 |atedly..|....{ Fi|
|000015c0| 6c 65 45 72 72 6f 72 28 | 49 4f 52 65 73 75 6c 74 |leError(|IOResult|
|000015d0| 29 3b 20 67 6f 74 6f 20 | 41 62 6f 72 74 3b 20 7d |); goto |Abort; }|
|000015e0| 0d 09 09 09 09 2f 2f 20 | 54 72 79 20 61 67 61 69 |.....// |Try agai|
|000015f0| 6e 20 77 69 74 68 20 66 | 6f 6c 64 65 72 73 20 6e |n with f|olders n|
|00001600| 65 77 6c 79 20 69 6e 20 | 70 6c 61 63 65 2e 0d 09 |ewly in |place...|
|00001610| 09 09 09 69 66 20 28 49 | 4f 52 65 73 75 6c 74 20 |...if (I|OResult |
|00001620| 3d 20 43 72 65 61 74 65 | 28 28 53 74 72 69 6e 67 |= Create|((String|
|00001630| 50 74 72 29 6e 65 77 4e | 61 6d 65 2c 20 30 2c 20 |Ptr)newN|ame, 0, |
|00001640| 74 68 65 43 72 65 61 74 | 6f 72 2c 20 74 68 65 54 |theCreat|or, theT|
|00001650| 79 70 65 29 29 0d 09 09 | 09 09 09 7b 20 46 69 6c |ype))...|...{ Fil|
|00001660| 65 45 72 72 6f 72 28 49 | 4f 52 65 73 75 6c 74 29 |eError(I|OResult)|
|00001670| 3b 20 67 6f 74 6f 20 41 | 62 6f 72 74 3b 20 7d 0d |; goto A|bort; }.|
|00001680| 09 09 09 09 7d 0d 09 09 | 09 7d 0d 09 09 2f 2a 20 |....}...|.}.../* |
|00001690| 73 65 74 20 75 70 20 70 | 62 4f 75 74 20 66 6f 72 |set up p|bOut for|
|000016a0| 20 74 68 65 20 66 69 6c | 65 20 77 69 74 68 20 77 | the fil|e with w|
|000016b0| 72 69 74 65 20 70 65 72 | 6d 69 73 73 69 6f 6e 20 |rite per|mission |
|000016c0| 61 6e 64 20 6f 70 65 6e | 20 74 68 65 20 66 69 6c |and open| the fil|
|000016d0| 65 20 2a 2f 0d 09 09 70 | 62 4f 75 74 2e 69 6f 43 |e */...p|bOut.ioC|
|000016e0| 6f 6d 70 6c 65 74 69 6f | 6e 20 3d 20 4e 55 4c 4c |ompletio|n = NULL|
|000016f0| 3b 0d 09 09 70 62 4f 75 | 74 2e 69 6f 4e 61 6d 65 |;...pbOu|t.ioName|
|00001700| 50 74 72 20 3d 20 28 53 | 74 72 69 6e 67 50 74 72 |Ptr = (S|tringPtr|
|00001710| 29 6e 65 77 4e 61 6d 65 | 3b 0d 09 09 70 62 4f 75 |)newName|;...pbOu|
|00001720| 74 2e 69 6f 56 52 65 66 | 4e 75 6d 20 3d 20 30 3b |t.ioVRef|Num = 0;|
|00001730| 0d 09 09 70 62 4f 75 74 | 2e 69 6f 56 65 72 73 4e |...pbOut|.ioVersN|
|00001740| 75 6d 20 3d 20 30 3b 0d | 09 09 70 62 4f 75 74 2e |um = 0;.|..pbOut.|
|00001750| 69 6f 50 65 72 6d 73 73 | 6e 20 3d 20 66 73 57 72 |ioPermss|n = fsWr|
|00001760| 50 65 72 6d 3b 0d 09 09 | 70 62 4f 75 74 2e 69 6f |Perm;...|pbOut.io|
|00001770| 4d 69 73 63 20 3d 20 4e | 55 4c 4c 3b 0d 09 09 69 |Misc = N|ULL;...i|
|00001780| 66 20 28 69 20 3d 3d 20 | 30 29 0d 09 09 09 7b 0d |f (i == |0)....{.|
|00001790| 09 09 09 69 66 20 28 50 | 42 4f 70 65 6e 28 28 50 |...if (P|BOpen((P|
|000017a0| 61 72 6d 42 6c 6b 50 74 | 72 29 26 70 62 4f 75 74 |armBlkPt|r)&pbOut|
|000017b0| 2c 20 46 41 4c 53 45 29 | 29 0d 09 09 09 09 7b 20 |, FALSE)|).....{ |
|000017c0| 46 69 6c 65 45 72 72 6f | 72 28 70 62 4f 75 74 2e |FileErro|r(pbOut.|
|000017d0| 69 6f 52 65 73 75 6c 74 | 29 3b 20 67 6f 74 6f 20 |ioResult|); goto |
|000017e0| 41 62 6f 72 74 3b 20 7d | 0d 09 09 09 7d 0d 09 09 |Abort; }|....}...|
|000017f0| 65 6c 73 65 0d 09 09 09 | 7b 0d 09 09 09 69 66 20 |else....|{....if |
|00001800| 28 50 42 4f 70 65 6e 52 | 46 28 28 50 61 72 6d 42 |(PBOpenR|F((ParmB|
|00001810| 6c 6b 50 74 72 29 26 70 | 62 4f 75 74 2c 20 46 41 |lkPtr)&p|bOut, FA|
|00001820| 4c 53 45 29 29 0d 09 09 | 09 09 7b 20 46 69 6c 65 |LSE))...|..{ File|
|00001830| 45 72 72 6f 72 28 70 62 | 4f 75 74 2e 69 6f 52 65 |Error(pb|Out.ioRe|
|00001840| 73 75 6c 74 29 3b 20 67 | 6f 74 6f 20 41 62 6f 72 |sult); g|oto Abor|
|00001850| 74 3b 20 7d 0d 09 09 09 | 7d 0d 09 09 70 62 4f 75 |t; }....|}...pbOu|
|00001860| 74 2e 69 6f 4d 69 73 63 | 20 3d 20 28 50 74 72 29 |t.ioMisc| = (Ptr)|
|00001870| 65 6f 66 3b 0d 09 09 69 | 66 20 28 50 42 53 65 74 |eof;...i|f (PBSet|
|00001880| 45 4f 46 28 28 50 61 72 | 6d 42 6c 6b 50 74 72 29 |EOF((Par|mBlkPtr)|
|00001890| 26 70 62 4f 75 74 2c 20 | 46 41 4c 53 45 29 29 0d |&pbOut, |FALSE)).|
|000018a0| 09 09 09 7b 20 46 69 6c | 65 45 72 72 6f 72 28 70 |...{ Fil|eError(p|
|000018b0| 62 4f 75 74 2e 69 6f 52 | 65 73 75 6c 74 29 3b 20 |bOut.ioR|esult); |
|000018c0| 67 6f 74 6f 20 41 62 6f | 72 74 3b 20 7d 0d 09 09 |goto Abo|rt; }...|
|000018d0| 2f 2a 20 73 65 74 20 66 | 69 6c 65 20 6d 61 72 6b |/* set f|ile mark|
|000018e0| 73 20 74 6f 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f |s to beg|inning o|
|000018f0| 66 20 66 69 6c 65 20 2a | 2f 0d 09 09 70 62 2e 69 |f file *|/...pb.i|
|00001900| 6f 4d 69 73 63 20 3d 20 | 4e 55 4c 4c 3b 0d 09 09 |oMisc = |NULL;...|
|00001910| 70 62 2e 69 6f 50 6f 73 | 4d 6f 64 65 20 3d 20 66 |pb.ioPos|Mode = f|
|00001920| 73 46 72 6f 6d 53 74 61 | 72 74 3b 0d 09 09 70 62 |sFromSta|rt;...pb|
|00001930| 2e 69 6f 50 6f 73 4f 66 | 66 73 65 74 20 3d 20 30 |.ioPosOf|fset = 0|
|00001940| 4c 3b 0d 09 09 69 66 20 | 28 50 42 53 65 74 46 50 |L;...if |(PBSetFP|
|00001950| 6f 73 28 28 50 61 72 6d | 42 6c 6b 50 74 72 29 26 |os((Parm|BlkPtr)&|
|00001960| 70 62 2c 20 46 41 4c 53 | 45 29 29 0d 09 09 09 7b |pb, FALS|E))....{|
|00001970| 20 46 69 6c 65 45 72 72 | 6f 72 28 70 62 2e 69 6f | FileErr|or(pb.io|
|00001980| 52 65 73 75 6c 74 29 3b | 20 67 6f 74 6f 20 41 62 |Result);| goto Ab|
|00001990| 6f 72 74 3b 20 7d 0d 09 | 09 70 62 4f 75 74 2e 69 |ort; }..|.pbOut.i|
|000019a0| 6f 4d 69 73 63 20 3d 20 | 4e 55 4c 4c 3b 0d 09 09 |oMisc = |NULL;...|
|000019b0| 70 62 4f 75 74 2e 69 6f | 50 6f 73 4d 6f 64 65 20 |pbOut.io|PosMode |
|000019c0| 3d 20 66 73 46 72 6f 6d | 53 74 61 72 74 3b 0d 09 |= fsFrom|Start;..|
|000019d0| 09 70 62 4f 75 74 2e 69 | 6f 50 6f 73 4f 66 66 73 |.pbOut.i|oPosOffs|
|000019e0| 65 74 20 3d 20 30 4c 3b | 0d 09 09 69 66 20 28 50 |et = 0L;|...if (P|
|000019f0| 42 53 65 74 46 50 6f 73 | 28 28 50 61 72 6d 42 6c |BSetFPos|((ParmBl|
|00001a00| 6b 50 74 72 29 26 70 62 | 4f 75 74 2c 20 46 41 4c |kPtr)&pb|Out, FAL|
|00001a10| 53 45 29 29 0d 09 09 09 | 7b 20 46 69 6c 65 45 72 |SE))....|{ FileEr|
|00001a20| 72 6f 72 28 70 62 4f 75 | 74 2e 69 6f 52 65 73 75 |ror(pbOu|t.ioResu|
|00001a30| 6c 74 29 3b 20 67 6f 74 | 6f 20 41 62 6f 72 74 3b |lt); got|o Abort;|
|00001a40| 20 7d 0d 09 09 2f 2a 20 | 72 2f 77 20 75 6e 74 69 | }.../* |r/w unti|
|00001a50| 6c 20 64 6f 6e 65 20 2a | 2f 0d 09 09 70 62 2e 69 |l done *|/...pb.i|
|00001a60| 6f 42 75 66 66 65 72 20 | 3d 20 70 62 4f 75 74 2e |oBuffer |= pbOut.|
|00001a70| 69 6f 42 75 66 66 65 72 | 20 3d 20 2a 68 44 61 74 |ioBuffer| = *hDat|
|00001a80| 61 3b 20 2f 2a 20 6e 6f | 74 65 20 6e 6f 20 6e 65 |a; /* no|te no ne|
|00001a90| 65 64 20 74 6f 20 6c 6f | 63 6b 20 69 74 20 2a 2f |ed to lo|ck it */|
|00001aa0| 0d 09 09 6e 75 6d 4c 65 | 66 74 20 3d 20 65 6f 66 |...numLe|ft = eof|
|00001ab0| 3b 0d 09 09 69 66 20 28 | 6e 75 6d 4c 65 66 74 20 |;...if (|numLeft |
|00001ac0| 3e 3d 20 62 75 66 53 69 | 7a 65 29 0d 09 09 09 70 |>= bufSi|ze)....p|
|00001ad0| 62 2e 69 6f 52 65 71 43 | 6f 75 6e 74 20 3d 20 70 |b.ioReqC|ount = p|
|00001ae0| 62 4f 75 74 2e 69 6f 52 | 65 71 43 6f 75 6e 74 20 |bOut.ioR|eqCount |
|00001af0| 3d 20 62 75 66 53 69 7a | 65 3b 0d 09 09 65 6c 73 |= bufSiz|e;...els|
|00001b00| 65 0d 09 09 09 70 62 2e | 69 6f 52 65 71 43 6f 75 |e....pb.|ioReqCou|
|00001b10| 6e 74 20 3d 20 70 62 4f | 75 74 2e 69 6f 52 65 71 |nt = pbO|ut.ioReq|
|00001b20| 43 6f 75 6e 74 20 3d 20 | 6e 75 6d 4c 65 66 74 3b |Count = |numLeft;|
|00001b30| 0d 09 09 77 68 69 6c 65 | 20 28 6e 75 6d 4c 65 66 |...while| (numLef|
|00001b40| 74 20 3e 20 30 29 0d 09 | 09 09 7b 0d 09 09 09 69 |t > 0)..|..{....i|
|00001b50| 66 20 28 6e 75 6d 4c 65 | 66 74 20 3c 20 62 75 66 |f (numLe|ft < buf|
|00001b60| 53 69 7a 65 29 0d 09 09 | 09 09 70 62 2e 69 6f 52 |Size)...|..pb.ioR|
|00001b70| 65 71 43 6f 75 6e 74 20 | 3d 20 70 62 4f 75 74 2e |eqCount |= pbOut.|
|00001b80| 69 6f 52 65 71 43 6f 75 | 6e 74 20 3d 20 6e 75 6d |ioReqCou|nt = num|
|00001b90| 4c 65 66 74 3b 0d 09 09 | 09 69 66 20 28 50 42 52 |Left;...|.if (PBR|
|00001ba0| 65 61 64 28 28 50 61 72 | 6d 42 6c 6b 50 74 72 29 |ead((Par|mBlkPtr)|
|00001bb0| 26 70 62 2c 20 46 41 4c | 53 45 29 29 0d 09 09 09 |&pb, FAL|SE))....|
|00001bc0| 09 7b 20 46 69 6c 65 45 | 72 72 6f 72 28 70 62 2e |.{ FileE|rror(pb.|
|00001bd0| 69 6f 52 65 73 75 6c 74 | 29 3b 20 67 6f 74 6f 20 |ioResult|); goto |
|00001be0| 41 62 6f 72 74 3b 20 7d | 0d 09 09 09 69 66 20 28 |Abort; }|....if (|
|00001bf0| 50 42 57 72 69 74 65 28 | 28 50 61 72 6d 42 6c 6b |PBWrite(|(ParmBlk|
|00001c00| 50 74 72 29 26 70 62 4f | 75 74 2c 20 46 41 4c 53 |Ptr)&pbO|ut, FALS|
|00001c10| 45 29 29 0d 09 09 09 09 | 7b 20 46 69 6c 65 45 72 |E)).....|{ FileEr|
|00001c20| 72 6f 72 28 70 62 4f 75 | 74 2e 69 6f 52 65 73 75 |ror(pbOu|t.ioResu|
|00001c30| 6c 74 29 3b 20 67 6f 74 | 6f 20 41 62 6f 72 74 3b |lt); got|o Abort;|
|00001c40| 20 7d 0d 09 09 09 69 66 | 20 28 70 62 2e 69 6f 41 | }....if| (pb.ioA|
|00001c50| 63 74 43 6f 75 6e 74 20 | 21 3d 20 70 62 4f 75 74 |ctCount |!= pbOut|
|00001c60| 2e 69 6f 41 63 74 43 6f | 75 6e 74 29 0d 09 09 09 |.ioActCo|unt)....|
|00001c70| 09 7b 0d 09 09 09 09 2f | 2a 20 69 66 20 6e 6f 74 |.{...../|* if not|
|00001c80| 20 66 6f 72 20 68 41 57 | 4b 2c 20 6e 6f 74 69 66 | for hAW|K, notif|
|00001c90| 79 20 75 73 65 72 2e 2e | 2e 20 2a 2f 0d 09 09 09 |y user..|. */....|
|00001ca0| 09 67 6f 74 6f 20 41 62 | 6f 72 74 3b 0d 09 09 09 |.goto Ab|ort;....|
|00001cb0| 09 7d 0d 09 09 09 6e 75 | 6d 4c 65 66 74 20 2d 3d |.}....nu|mLeft -=|
|00001cc0| 20 70 62 2e 69 6f 41 63 | 74 43 6f 75 6e 74 3b 0d | pb.ioAc|tCount;.|
|00001cd0| 09 09 09 7d 0d 0d 09 09 | 69 66 20 28 50 42 43 6c |...}....|if (PBCl|
|00001ce0| 6f 73 65 28 28 50 61 72 | 6d 42 6c 6b 50 74 72 29 |ose((Par|mBlkPtr)|
|00001cf0| 26 70 62 2c 20 46 41 4c | 53 45 29 29 0d 09 09 09 |&pb, FAL|SE))....|
|00001d00| 7b 20 46 69 6c 65 45 72 | 72 6f 72 28 70 62 2e 69 |{ FileEr|ror(pb.i|
|00001d10| 6f 52 65 73 75 6c 74 29 | 3b 20 67 6f 74 6f 20 41 |oResult)|; goto A|
|00001d20| 62 6f 72 74 3b 20 7d 0d | 09 09 69 66 20 28 50 42 |bort; }.|..if (PB|
|00001d30| 43 6c 6f 73 65 28 28 50 | 61 72 6d 42 6c 6b 50 74 |Close((P|armBlkPt|
|00001d40| 72 29 26 70 62 4f 75 74 | 2c 20 46 41 4c 53 45 29 |r)&pbOut|, FALSE)|
|00001d50| 29 0d 09 09 09 7b 20 46 | 69 6c 65 45 72 72 6f 72 |)....{ F|ileError|
|00001d60| 28 70 62 4f 75 74 2e 69 | 6f 52 65 73 75 6c 74 29 |(pbOut.i|oResult)|
|00001d70| 3b 20 67 6f 74 6f 20 41 | 62 6f 72 74 3b 20 7d 0d |; goto A|bort; }.|
|00001d80| 09 09 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 68 |..Dispos|Handle(h|
|00001d90| 44 61 74 61 29 3b 0d 09 | 09 7d 0d 09 72 65 74 75 |Data);..|.}..retu|
|00001da0| 72 6e 28 54 52 55 45 29 | 3b 0d 0d 41 62 6f 72 74 |rn(TRUE)|;..Abort|
|00001db0| 3a 0d 09 69 66 20 28 68 | 44 61 74 61 29 0d 09 09 |:..if (h|Data)...|
|00001dc0| 44 69 73 70 6f 73 48 61 | 6e 64 6c 65 28 68 44 61 |DisposHa|ndle(hDa|
|00001dd0| 74 61 29 3b 0d 09 46 53 | 43 6c 6f 73 65 20 28 70 |ta);..FS|Close (p|
|00001de0| 62 2e 69 6f 52 65 66 4e | 75 6d 29 3b 0d 09 46 53 |b.ioRefN|um);..FS|
|00001df0| 43 6c 6f 73 65 20 28 70 | 62 4f 75 74 2e 69 6f 52 |Close (p|bOut.ioR|
|00001e00| 65 66 4e 75 6d 29 3b 0d | 09 46 53 44 65 6c 65 74 |efNum);.|.FSDelet|
|00001e10| 65 28 28 53 74 72 69 6e | 67 50 74 72 29 6e 65 77 |e((Strin|gPtr)new|
|00001e20| 4e 61 6d 65 2c 20 30 29 | 3b 0d 09 72 65 74 75 72 |Name, 0)|;..retur|
|00001e30| 6e 28 46 41 4c 53 45 29 | 3b 0d 23 75 6e 64 65 66 |n(FALSE)|;.#undef|
|00001e40| 20 46 69 6c 65 45 72 72 | 6f 72 0d 09 7d 0d 0d 2f | FileErr|or..}../|
|00001e50| 2f 20 41 74 74 65 6d 70 | 74 20 74 6f 20 63 72 65 |/ Attemp|t to cre|
|00001e60| 61 74 65 20 64 69 72 65 | 63 74 6f 72 69 65 73 20 |ate dire|ctories |
|00001e70| 61 6c 6f 6e 67 20 74 68 | 65 20 6e 65 77 4e 61 6d |along th|e newNam|
|00001e80| 65 20 70 72 6f 70 6f 73 | 65 64 20 70 61 74 68 2e |e propos|ed path.|
|00001e90| 0d 2f 2f 20 57 65 20 73 | 74 61 72 74 20 61 74 20 |.// We s|tart at |
|00001ea0| 74 68 65 20 72 6f 6f 74 | 2c 20 66 6f 72 20 77 61 |the root|, for wa|
|00001eb0| 6e 74 20 6f 66 20 61 20 | 62 65 74 74 65 72 20 70 |nt of a |better p|
|00001ec0| 6c 61 63 65 2e 0d 2f 2f | 20 41 20 66 75 6c 6c 20 |lace..//| A full |
|00001ed0| 70 61 74 68 20 6e 61 6d | 65 20 69 73 20 6d 6f 72 |path nam|e is mor|
|00001ee0| 65 20 6f 72 20 6c 65 73 | 73 20 61 73 73 75 6d 65 |e or les|s assume|
|00001ef0| 64 2e 0d 4f 53 45 72 72 | 20 43 72 65 61 74 65 44 |d..OSErr| CreateD|
|00001f00| 69 72 65 63 74 6f 72 69 | 65 73 28 53 74 72 69 6e |irectori|es(Strin|
|00001f10| 67 50 74 72 20 6e 65 77 | 4e 61 6d 65 29 0d 09 7b |gPtr new|Name)..{|
|00001f20| 0d 09 4f 53 45 72 72 09 | 69 6f 3b 0d 09 6c 6f 6e |..OSErr.|io;..lon|
|00001f30| 67 09 70 61 72 65 6e 74 | 44 69 72 49 44 2c 20 63 |g.parent|DirID, c|
|00001f40| 72 65 61 74 65 64 44 69 | 72 49 44 3b 0d 09 73 68 |reatedDi|rID;..sh|
|00001f50| 6f 72 74 09 72 65 61 6c | 6c 79 54 72 75 65 4c 65 |ort.real|lyTrueLe|
|00001f60| 6e 2c 20 74 72 75 65 4c | 65 6e 2c 20 63 75 72 72 |n, trueL|en, curr|
|00001f70| 65 6e 74 4c 65 6e 3b 0d | 09 0d 09 69 66 20 28 6e |entLen;.|...if (n|
|00001f80| 65 77 4e 61 6d 65 5b 31 | 5d 20 3d 3d 20 27 3a 27 |ewName[1|] == ':'|
|00001f90| 29 20 09 2f 2f 20 6e 6f | 74 20 61 20 66 75 6c 6c |) .// no|t a full|
|00001fa0| 20 70 61 74 68 20 6e 61 | 6d 65 0d 09 09 72 65 74 | path na|me...ret|
|00001fb0| 75 72 6e 20 62 64 4e 61 | 6d 45 72 72 3b 0d 09 2f |urn bdNa|mErr;../|
|00001fc0| 2f 20 74 72 69 6d 20 66 | 69 6c 65 20 6e 61 6d 65 |/ trim f|ile name|
|00001fd0| 20 66 72 6f 6d 20 70 61 | 74 68 0d 09 72 65 61 6c | from pa|th..real|
|00001fe0| 6c 79 54 72 75 65 4c 65 | 6e 20 3d 20 74 72 75 65 |lyTrueLe|n = true|
|00001ff0| 4c 65 6e 20 3d 20 6e 65 | 77 4e 61 6d 65 5b 30 5d |Len = ne|wName[0]|
|00002000| 3b 0d 09 77 68 69 6c 65 | 20 28 6e 65 77 4e 61 6d |;..while| (newNam|
|00002010| 65 5b 74 72 75 65 4c 65 | 6e 5d 20 21 3d 20 27 3a |e[trueLe|n] != ':|
|00002020| 27 20 26 26 20 74 72 75 | 65 4c 65 6e 20 3e 20 30 |' && tru|eLen > 0|
|00002030| 29 0d 09 09 2d 2d 74 72 | 75 65 4c 65 6e 3b 0d 09 |)...--tr|ueLen;..|
|00002040| 69 66 20 28 74 72 75 65 | 4c 65 6e 20 3c 3d 20 34 |if (true|Len <= 4|
|00002050| 29 09 09 2f 2f 20 6d 69 | 6e 69 6d 75 6d 20 69 73 |)..// mi|nimum is|
|00002060| 20 61 3a 62 3a 63 0d 09 | 09 72 65 74 75 72 6e 20 | a:b:c..|.return |
|00002070| 62 64 4e 61 6d 45 72 72 | 3b 0d 09 63 75 72 72 65 |bdNamErr|;..curre|
|00002080| 6e 74 4c 65 6e 20 3d 20 | 32 3b 0d 09 2f 2f 20 73 |ntLen = |2;..// s|
|00002090| 6b 69 70 20 74 6f 20 61 | 20 63 6f 6c 6f 6e 0d 09 |kip to a| colon..|
|000020a0| 77 68 69 6c 65 20 28 6e | 65 77 4e 61 6d 65 5b 63 |while (n|ewName[c|
|000020b0| 75 72 72 65 6e 74 4c 65 | 6e 5d 20 21 3d 20 27 3a |urrentLe|n] != ':|
|000020c0| 27 20 26 26 20 63 75 72 | 72 65 6e 74 4c 65 6e 20 |' && cur|rentLen |
|000020d0| 3c 20 74 72 75 65 4c 65 | 6e 29 0d 09 09 2b 2b 63 |< trueLe|n)...++c|
|000020e0| 75 72 72 65 6e 74 4c 65 | 6e 3b 0d 09 69 66 20 28 |urrentLe|n;..if (|
|000020f0| 6e 65 77 4e 61 6d 65 5b | 63 75 72 72 65 6e 74 4c |newName[|currentL|
|00002100| 65 6e 5d 20 21 3d 20 27 | 3a 27 20 7c 7c 20 63 75 |en] != '|:' || cu|
|00002110| 72 72 65 6e 74 4c 65 6e | 20 3e 3d 20 74 72 75 65 |rrentLen| >= true|
|00002120| 4c 65 6e 29 0d 09 09 72 | 65 74 75 72 6e 20 62 64 |Len)...r|eturn bd|
|00002130| 4e 61 6d 45 72 72 3b 0d | 09 2f 2f 20 61 6e 64 20 |NamErr;.|.// and |
|00002140| 73 6b 69 70 20 74 6f 20 | 61 6e 6f 74 68 65 72 20 |skip to |another |
|00002150| 63 6f 6c 6f 6e 0d 09 2b | 2b 63 75 72 72 65 6e 74 |colon..+|+current|
|00002160| 4c 65 6e 3b 0d 09 77 68 | 69 6c 65 20 28 63 75 72 |Len;..wh|ile (cur|
|00002170| 72 65 6e 74 4c 65 6e 20 | 3c 3d 20 74 72 75 65 4c |rentLen |<= trueL|
|00002180| 65 6e 20 26 26 20 6e 65 | 77 4e 61 6d 65 5b 63 75 |en && ne|wName[cu|
|00002190| 72 72 65 6e 74 4c 65 6e | 5d 20 21 3d 20 27 3a 27 |rrentLen|] != ':'|
|000021a0| 29 0d 09 09 2b 2b 63 75 | 72 72 65 6e 74 4c 65 6e |)...++cu|rrentLen|
|000021b0| 3b 0d 09 69 66 20 28 63 | 75 72 72 65 6e 74 4c 65 |;..if (c|urrentLe|
|000021c0| 6e 20 3e 3d 20 74 72 75 | 65 4c 65 6e 29 0d 09 09 |n >= tru|eLen)...|
|000021d0| 72 65 74 75 72 6e 20 62 | 64 4e 61 6d 45 72 72 3b |return b|dNamErr;|
|000021e0| 0d 09 09 09 09 0d 09 6e | 65 77 4e 61 6d 65 5b 30 |.......n|ewName[0|
|000021f0| 5d 20 3d 20 63 75 72 72 | 65 6e 74 4c 65 6e 3b 20 |] = curr|entLen; |
|00002200| 2f 2f 20 77 65 20 73 74 | 61 72 74 20 77 69 74 68 |// we st|art with|
|00002210| 20 74 68 65 20 76 6f 6c | 75 6d 65 20 6e 61 6d 65 | the vol|ume name|
|00002220| 20 61 6e 64 20 66 69 72 | 73 74 20 64 69 72 2e 2e | and fir|st dir..|
|00002230| 2e 0d 09 70 61 72 65 6e | 74 44 69 72 49 44 20 3d |...paren|tDirID =|
|00002240| 20 32 3b 09 09 09 2f 2f | 20 2e 2e 2e 77 68 69 63 | 2;...//| ...whic|
|00002250| 68 20 73 68 6f 75 6c 64 | 20 62 65 20 61 74 20 74 |h should| be at t|
|00002260| 68 65 20 72 6f 6f 74 20 | 64 69 72 65 63 74 6f 72 |he root |director|
|00002270| 79 0d 09 64 6f 0d 09 09 | 7b 0d 09 09 69 6f 20 3d |y..do...|{...io =|
|00002280| 20 44 69 72 43 72 65 61 | 74 65 28 30 2c 20 70 61 | DirCrea|te(0, pa|
|00002290| 72 65 6e 74 44 69 72 49 | 44 2c 20 6e 65 77 4e 61 |rentDirI|D, newNa|
|000022a0| 6d 65 2c 20 26 63 72 65 | 61 74 65 64 44 69 72 49 |me, &cre|atedDirI|
|000022b0| 44 29 3b 0d 09 09 2f 2f | 20 43 6f 6e 74 69 6e 75 |D);...//| Continu|
|000022c0| 65 20 77 68 69 6c 65 20 | 64 69 72 65 63 74 6f 72 |e while |director|
|000022d0| 79 20 65 78 69 73 74 73 | 20 6f 72 20 63 61 6e 20 |y exists| or can |
|000022e0| 62 65 20 63 72 65 61 74 | 65 64 2e 0d 09 09 69 66 |be creat|ed....if|
|000022f0| 20 28 69 6f 20 3d 3d 20 | 6e 6f 45 72 72 20 7c 7c | (io == |noErr |||
|00002300| 20 69 6f 20 3d 3d 20 64 | 75 70 46 4e 45 72 72 29 | io == d|upFNErr)|
|00002310| 0d 09 09 09 7b 0d 09 09 | 09 2b 2b 63 75 72 72 65 |....{...|.++curre|
|00002320| 6e 74 4c 65 6e 3b 0d 09 | 09 09 77 68 69 6c 65 20 |ntLen;..|..while |
|00002330| 28 63 75 72 72 65 6e 74 | 4c 65 6e 20 3c 3d 20 74 |(current|Len <= t|
|00002340| 72 75 65 4c 65 6e 20 26 | 26 20 6e 65 77 4e 61 6d |rueLen &|& newNam|
|00002350| 65 5b 63 75 72 72 65 6e | 74 4c 65 6e 5d 20 21 3d |e[curren|tLen] !=|
|00002360| 20 27 3a 27 29 0d 09 09 | 09 09 2b 2b 63 75 72 72 | ':')...|..++curr|
|00002370| 65 6e 74 4c 65 6e 3b 0d | 09 09 09 69 66 20 28 63 |entLen;.|...if (c|
|00002380| 75 72 72 65 6e 74 4c 65 | 6e 20 3e 20 74 72 75 65 |urrentLe|n > true|
|00002390| 4c 65 6e 29 0d 09 09 09 | 09 62 72 65 61 6b 3b 0d |Len)....|.break;.|
|000023a0| 09 09 09 6e 65 77 4e 61 | 6d 65 5b 30 5d 20 3d 20 |...newNa|me[0] = |
|000023b0| 63 75 72 72 65 6e 74 4c | 65 6e 3b 0d 09 09 09 70 |currentL|en;....p|
|000023c0| 61 72 65 6e 74 44 69 72 | 49 44 20 3d 20 63 72 65 |arentDir|ID = cre|
|000023d0| 61 74 65 64 44 69 72 49 | 44 3b 0d 09 09 09 7d 0d |atedDirI|D;....}.|
|000023e0| 09 09 7d 20 77 68 69 6c | 65 20 28 69 6f 20 3d 3d |..} whil|e (io ==|
|000023f0| 20 6e 6f 45 72 72 20 7c | 7c 20 69 6f 20 3d 3d 20 | noErr ||| io == |
|00002400| 64 75 70 46 4e 45 72 72 | 29 3b 0d 09 6e 65 77 4e |dupFNErr|);..newN|
|00002410| 61 6d 65 5b 30 5d 20 3d | 20 72 65 61 6c 6c 79 54 |ame[0] =| reallyT|
|00002420| 72 75 65 4c 65 6e 3b 20 | 2f 2f 20 6f 72 20 65 6c |rueLen; |// or el|
|00002430| 73 65 21 0d 09 72 65 74 | 75 72 6e 20 69 6f 3b 20 |se!..ret|urn io; |
|00002440| 2f 2f 20 4e 6f 74 65 20 | 65 76 65 6e 20 64 75 70 |// Note |even dup|
|00002450| 46 4e 45 72 72 20 63 6f | 75 6e 74 73 20 61 73 20 |FNErr co|unts as |
|00002460| 61 6e 20 65 72 72 6f 72 | 20 61 74 20 74 68 65 20 |an error| at the |
|00002470| 65 6e 64 2e 0d 09 7d 0d | 0d 2f 2a 20 45 78 70 65 |end...}.|./* Expe|
|00002480| 63 74 20 66 69 6c 65 20 | 6f 72 20 64 69 72 20 6e |ct file |or dir n|
|00002490| 61 6d 65 2c 20 66 6f 6c | 6c 6f 77 65 64 20 62 79 |ame, fol|lowed by|
|000024a0| 20 61 72 72 61 79 20 74 | 6f 20 70 6c 61 63 65 20 | array t|o place |
|000024b0| 6c 69 73 74 2e 20 52 65 | 74 75 72 6e 0d 6e 75 6d |list. Re|turn.num|
|000024c0| 62 65 72 20 6f 66 20 66 | 69 6c 65 73 20 69 6e 20 |ber of f|iles in |
|000024d0| 64 69 72 65 63 74 6f 72 | 79 2e 20 2a 2f 0d 4e 4f |director|y. */.NO|
|000024e0| 44 45 20 2a 64 6f 5f 6c | 69 73 74 28 4e 4f 44 45 |DE *do_l|ist(NODE|
|000024f0| 20 2a 74 72 65 65 29 0d | 09 7b 0d 09 4e 4f 44 45 | *tree).|.{..NODE|
|00002500| 20 09 2a 74 31 2c 20 2a | 74 32 3b 0d 09 4e 4f 44 | .*t1, *|t2;..NOD|
|00002510| 45 20 09 2a 69 6e 64 3b | 0d 09 4e 4f 44 45 09 2a |E .*ind;|..NODE.*|
|00002520| 72 65 73 3b 0d 09 63 68 | 61 72 09 2a 6e 61 6d 65 |res;..ch|ar.*name|
|00002530| 3b 0d 09 73 68 6f 72 74 | 09 09 6e 75 6d 5f 61 72 |;..short|..num_ar|
|00002540| 67 73 3b 0d 09 0d 09 69 | 66 20 28 28 6e 75 6d 5f |gs;....i|f ((num_|
|00002550| 61 72 67 73 20 3d 20 62 | 5f 67 65 74 5f 74 77 6f |args = b|_get_two|
|00002560| 28 74 72 65 65 2c 20 26 | 74 31 2c 20 26 74 32 29 |(tree, &|t1, &t2)|
|00002570| 29 20 3c 20 32 29 0d 09 | 09 66 61 74 61 6c 28 22 |) < 2)..|.fatal("|
|00002580| 6c 69 73 74 20 72 65 71 | 75 69 72 65 73 20 61 74 |list req|uires at|
|00002590| 20 6c 65 61 73 74 20 74 | 77 6f 20 61 72 67 75 6d | least t|wo argum|
|000025a0| 65 6e 74 73 22 29 3b 0d | 09 6e 61 6d 65 20 3d 20 |ents");.|.name = |
|000025b0| 66 6f 72 63 65 5f 73 74 | 72 69 6e 67 28 74 31 29 |force_st|ring(t1)|
|000025c0| 2d 3e 73 74 70 74 72 3b | 0d 09 69 6e 64 20 3d 20 |->stptr;|..ind = |
|000025d0| 74 32 3b 0d 09 69 66 20 | 28 74 32 2d 3e 74 79 70 |t2;..if |(t2->typ|
|000025e0| 65 20 3d 3d 20 4e 6f 64 | 65 5f 70 61 72 61 6d 5f |e == Nod|e_param_|
|000025f0| 6c 69 73 74 29 0d 09 09 | 69 6e 64 20 3d 20 73 74 |list)...|ind = st|
|00002600| 61 63 6b 5f 70 74 72 5b | 74 32 2d 3e 70 61 72 61 |ack_ptr[|t2->para|
|00002610| 6d 5f 63 6e 74 5d 3b 0d | 09 69 66 20 28 69 6e 64 |m_cnt];.|.if (ind|
|00002620| 2d 3e 74 79 70 65 20 21 | 3d 20 4e 6f 64 65 5f 76 |->type !|= Node_v|
|00002630| 61 72 20 26 26 20 69 6e | 64 2d 3e 74 79 70 65 20 |ar && in|d->type |
|00002640| 21 3d 20 4e 6f 64 65 5f | 76 61 72 5f 61 72 72 61 |!= Node_|var_arra|
|00002650| 79 29 0d 09 09 66 61 74 | 61 6c 28 22 73 65 63 6f |y)...fat|al("seco|
|00002660| 6e 64 20 61 72 67 75 6d | 65 6e 74 20 6f 66 20 6c |nd argum|ent of l|
|00002670| 69 73 74 20 69 73 20 6e | 6f 74 20 61 20 76 61 72 |ist is n|ot a var|
|00002680| 69 61 62 6c 65 22 29 3b | 0d 09 61 73 73 6f 63 5f |iable");|..assoc_|
|00002690| 63 6c 65 61 72 28 69 6e | 64 29 3b 0d 09 72 65 73 |clear(in|d);..res|
|000026a0| 20 3d 20 74 6d 70 5f 6e | 75 6d 62 65 72 28 28 41 | = tmp_n|umber((A|
|000026b0| 57 4b 4e 55 4d 29 6c 69 | 73 74 5f 66 69 6c 65 73 |WKNUM)li|st_files|
|000026c0| 5f 6f 72 5f 64 69 72 73 | 28 6e 61 6d 65 2c 20 74 |_or_dirs|(name, t|
|000026d0| 31 2d 3e 73 74 6c 65 6e | 2b 31 2c 20 69 6e 64 2c |1->stlen|+1, ind,|
|000026e0| 20 46 41 4c 53 45 29 29 | 3b 0d 09 66 72 65 65 5f | FALSE))|;..free_|
|000026f0| 74 65 6d 70 28 74 31 29 | 3b 0d 09 72 65 74 75 72 |temp(t1)|;..retur|
|00002700| 6e 20 72 65 73 3b 0d 09 | 7d 0d 0d 4e 4f 44 45 20 |n res;..|}..NODE |
|00002710| 2a 64 6f 5f 6e 65 73 74 | 65 64 28 4e 4f 44 45 20 |*do_nest|ed(NODE |
|00002720| 2a 74 72 65 65 29 0d 09 | 7b 0d 09 4e 4f 44 45 20 |*tree)..|{..NODE |
|00002730| 09 2a 74 31 2c 20 2a 74 | 32 3b 0d 09 4e 4f 44 45 |.*t1, *t|2;..NODE|
|00002740| 20 09 2a 69 6e 64 3b 0d | 09 4e 4f 44 45 09 2a 72 | .*ind;.|.NODE.*r|
|00002750| 65 73 3b 0d 09 63 68 61 | 72 09 2a 6e 61 6d 65 3b |es;..cha|r.*name;|
|00002760| 0d 09 73 68 6f 72 74 09 | 09 6e 75 6d 5f 61 72 67 |..short.|.num_arg|
|00002770| 73 3b 0d 09 0d 09 69 66 | 20 28 28 6e 75 6d 5f 61 |s;....if| ((num_a|
|00002780| 72 67 73 20 3d 20 62 5f | 67 65 74 5f 74 77 6f 28 |rgs = b_|get_two(|
|00002790| 74 72 65 65 2c 20 26 74 | 31 2c 20 26 74 32 29 29 |tree, &t|1, &t2))|
|000027a0| 20 3c 20 32 29 0d 09 09 | 66 61 74 61 6c 28 22 6e | < 2)...|fatal("n|
|000027b0| 65 73 74 65 64 20 72 65 | 71 75 69 72 65 73 20 61 |ested re|quires a|
|000027c0| 74 20 6c 65 61 73 74 20 | 74 77 6f 20 61 72 67 75 |t least |two argu|
|000027d0| 6d 65 6e 74 73 22 29 3b | 0d 09 6e 61 6d 65 20 3d |ments");|..name =|
|000027e0| 20 66 6f 72 63 65 5f 73 | 74 72 69 6e 67 28 74 31 | force_s|tring(t1|
|000027f0| 29 2d 3e 73 74 70 74 72 | 3b 0d 09 69 6e 64 20 3d |)->stptr|;..ind =|
|00002800| 20 74 32 3b 0d 09 69 66 | 20 28 74 32 2d 3e 74 79 | t2;..if| (t2->ty|
|00002810| 70 65 20 3d 3d 20 4e 6f | 64 65 5f 70 61 72 61 6d |pe == No|de_param|
|00002820| 5f 6c 69 73 74 29 0d 09 | 09 69 6e 64 20 3d 20 73 |_list)..|.ind = s|
|00002830| 74 61 63 6b 5f 70 74 72 | 5b 74 32 2d 3e 70 61 72 |tack_ptr|[t2->par|
|00002840| 61 6d 5f 63 6e 74 5d 3b | 0d 09 69 66 20 28 69 6e |am_cnt];|..if (in|
|00002850| 64 2d 3e 74 79 70 65 20 | 21 3d 20 4e 6f 64 65 5f |d->type |!= Node_|
|00002860| 76 61 72 20 26 26 20 69 | 6e 64 2d 3e 74 79 70 65 |var && i|nd->type|
|00002870| 20 21 3d 20 4e 6f 64 65 | 5f 76 61 72 5f 61 72 72 | != Node|_var_arr|
|00002880| 61 79 29 0d 09 09 66 61 | 74 61 6c 28 22 73 65 63 |ay)...fa|tal("sec|
|00002890| 6f 6e 64 20 61 72 67 75 | 6d 65 6e 74 20 6f 66 20 |ond argu|ment of |
|000028a0| 6e 65 73 74 65 64 20 69 | 73 20 6e 6f 74 20 61 20 |nested i|s not a |
|000028b0| 76 61 72 69 61 62 6c 65 | 22 29 3b 0d 09 61 73 73 |variable|");..ass|
|000028c0| 6f 63 5f 63 6c 65 61 72 | 28 69 6e 64 29 3b 0d 09 |oc_clear|(ind);..|
|000028d0| 72 65 73 20 3d 20 74 6d | 70 5f 6e 75 6d 62 65 72 |res = tm|p_number|
|000028e0| 28 28 41 57 4b 4e 55 4d | 29 6c 69 73 74 5f 66 69 |((AWKNUM|)list_fi|
|000028f0| 6c 65 73 5f 6f 72 5f 64 | 69 72 73 28 6e 61 6d 65 |les_or_d|irs(name|
|00002900| 2c 20 74 31 2d 3e 73 74 | 6c 65 6e 2b 31 2c 20 69 |, t1->st|len+1, i|
|00002910| 6e 64 2c 20 54 52 55 45 | 29 29 3b 0d 09 66 72 65 |nd, TRUE|));..fre|
|00002920| 65 5f 74 65 6d 70 28 74 | 31 29 3b 0d 09 72 65 74 |e_temp(t|1);..ret|
|00002930| 75 72 6e 20 72 65 73 3b | 0d 09 7d 0d 0d 2f 2a 20 |urn res;|..}../* |
|00002940| 47 69 76 65 6e 20 66 75 | 6c 6c 20 70 61 74 68 20 |Given fu|ll path |
|00002950| 6e 61 6d 65 2c 20 69 6e | 64 65 78 20 74 68 72 75 |name, in|dex thru|
|00002960| 20 61 20 64 69 72 65 63 | 74 6f 72 79 20 76 69 61 | a direc|tory via|
|00002970| 20 50 42 47 65 74 43 61 | 74 49 6e 66 6f 2e 0d 52 | PBGetCa|tInfo..R|
|00002980| 65 74 75 72 6e 20 6e 75 | 6d 62 65 72 20 6f 66 20 |eturn nu|mber of |
|00002990| 66 69 6c 65 73 2f 64 69 | 72 73 2e 20 43 72 65 61 |files/di|rs. Crea|
|000029a0| 74 65 20 6c 69 73 74 20 | 6f 66 20 54 45 58 54 20 |te list |of TEXT |
|000029b0| 66 69 6c 65 20 6e 61 6d | 65 73 0d 6f 72 20 64 69 |file nam|es.or di|
|000029c0| 72 65 63 74 6f 72 79 20 | 6e 61 6d 65 73 20 69 6e |rectory |names in|
|000029d0| 20 61 72 72 61 79 20 22 | 69 6e 64 22 2c 20 69 6e | array "|ind", in|
|000029e0| 64 65 78 65 64 20 31 2e | 2e 6e 75 6d 46 69 6c 65 |dexed 1.|.numFile|
|000029f0| 73 2e 0d 2a 2f 0d 73 68 | 6f 72 74 20 6c 69 73 74 |s..*/.sh|ort list|
|00002a00| 5f 66 69 6c 65 73 5f 6f | 72 5f 64 69 72 73 28 63 |_files_o|r_dirs(c|
|00002a10| 68 61 72 20 2a 74 68 65 | 4e 61 6d 65 2c 20 73 68 |har *the|Name, sh|
|00002a20| 6f 72 74 20 6e 6d 6c 65 | 6e 2c 20 4e 4f 44 45 20 |ort nmle|n, NODE |
|00002a30| 2a 69 6e 64 2c 20 42 6f | 6f 6c 65 61 6e 20 64 69 |*ind, Bo|olean di|
|00002a40| 72 73 29 0d 09 7b 0d 09 | 48 56 6f 6c 75 6d 65 50 |rs)..{..|HVolumeP|
|00002a50| 61 72 61 6d 09 76 50 61 | 72 6d 73 3b 0d 09 43 49 |aram.vPa|rms;..CI|
|00002a60| 6e 66 6f 50 42 50 74 72 | 20 09 63 69 70 62 72 20 |nfoPBPtr| .cipbr |
|00002a70| 3d 20 28 43 49 6e 66 6f | 50 42 50 74 72 29 26 76 |= (CInfo|PBPtr)&v|
|00002a80| 50 61 72 6d 73 3b 0d 09 | 48 46 69 6c 65 49 6e 66 |Parms;..|HFileInf|
|00002a90| 6f 09 2a 66 70 62 20 3d | 20 28 48 46 69 6c 65 49 |o.*fpb =| (HFileI|
|00002aa0| 6e 66 6f 20 2a 29 26 76 | 50 61 72 6d 73 3b 0d 09 |nfo *)&v|Parms;..|
|00002ab0| 44 69 72 49 6e 66 6f 09 | 09 2a 64 70 62 20 3d 20 |DirInfo.|.*dpb = |
|00002ac0| 28 44 69 72 49 6e 66 6f | 20 2a 29 26 76 50 61 72 |(DirInfo| *)&vPar|
|00002ad0| 6d 73 3b 0d 09 57 44 50 | 42 52 65 63 09 09 74 68 |ms;..WDP|BRec..th|
|00002ae0| 65 50 61 72 6d 73 3b 0d | 09 63 68 61 72 09 09 66 |eParms;.|.char..f|
|00002af0| 4e 61 6d 65 5b 32 35 36 | 5d 2c 20 76 6f 6c 4e 61 |Name[256|], volNa|
|00002b00| 6d 65 5b 33 32 5d 2c 20 | 64 69 72 4e 61 6d 65 5b |me[32], |dirName[|
|00002b10| 32 35 36 5d 3b 20 2f 2a | 20 64 69 72 4e 61 6d 65 |256]; /*| dirName|
|00002b20| 20 62 65 63 6f 6d 65 73 | 20 66 75 6c 6c 20 6e 61 | becomes| full na|
|00002b30| 6d 65 20 2a 2f 0d 09 6c | 6f 6e 67 09 09 64 69 72 |me */..l|ong..dir|
|00002b40| 49 44 3b 0d 09 73 68 6f | 72 74 09 09 69 6e 64 65 |ID;..sho|rt..inde|
|00002b50| 78 20 3d 20 31 2c 20 6e | 75 6d 46 69 6c 65 73 20 |x = 1, n|umFiles |
|00002b60| 3d 20 30 2c 20 73 74 72 | 6c 6e 2c 20 64 69 72 4c |= 0, str|ln, dirL|
|00002b70| 65 6e 2c 20 69 2c 20 74 | 68 65 56 6f 6c 52 65 66 |en, i, t|heVolRef|
|00002b80| 3b 0d 09 4f 53 45 72 72 | 09 09 65 72 72 3b 0d 09 |;..OSErr|..err;..|
|00002b90| 0d 09 42 6c 6f 63 6b 4d | 6f 76 65 28 74 68 65 4e |..BlockM|ove(theN|
|00002ba0| 61 6d 65 2c 20 66 4e 61 | 6d 65 2c 20 6e 6d 6c 65 |ame, fNa|me, nmle|
|00002bb0| 6e 29 3b 0d 09 43 74 6f | 50 73 74 72 28 66 4e 61 |n);..Cto|Pstr(fNa|
|00002bc0| 6d 65 29 3b 0d 09 0d 09 | 66 70 62 2d 3e 69 6f 4e |me);....|fpb->ioN|
|00002bd0| 61 6d 65 50 74 72 20 3d | 20 28 53 74 72 69 6e 67 |amePtr =| (String|
|00002be0| 50 74 72 29 66 4e 61 6d | 65 3b 0d 09 66 70 62 2d |Ptr)fNam|e;..fpb-|
|00002bf0| 3e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 2d 33 32 |>ioVRefN|um = -32|
|00002c00| 37 36 38 3b 0d 09 66 70 | 62 2d 3e 69 6f 46 44 69 |768;..fp|b->ioFDi|
|00002c10| 72 49 6e 64 65 78 20 3d | 20 30 3b 0d 09 66 70 62 |rIndex =| 0;..fpb|
|00002c20| 2d 3e 69 6f 44 69 72 49 | 44 20 3d 20 30 3b 0d 09 |->ioDirI|D = 0;..|
|00002c30| 69 66 20 28 50 42 47 65 | 74 43 61 74 49 6e 66 6f |if (PBGe|tCatInfo|
|00002c40| 28 63 69 70 62 72 2c 20 | 46 41 4c 53 45 29 29 0d |(cipbr, |FALSE)).|
|00002c50| 09 09 72 65 74 75 72 6e | 28 30 29 3b 0d 09 69 66 |..return|(0);..if|
|00002c60| 20 28 28 28 66 70 62 2d | 3e 69 6f 46 6c 41 74 74 | (((fpb-|>ioFlAtt|
|00002c70| 72 69 62 3e 3e 34 29 20 | 26 20 30 78 30 31 29 20 |rib>>4) |& 0x01) |
|00002c80| 21 3d 20 31 29 20 2f 2a | 20 61 20 66 69 6c 65 20 |!= 1) /*| a file |
|00002c90| 2a 2f 0d 09 09 7b 0d 09 | 09 64 69 72 49 44 20 3d |*/...{..|.dirID =|
|00002ca0| 20 66 70 62 2d 3e 69 6f | 46 6c 50 61 72 49 44 3b | fpb->io|FlParID;|
|00002cb0| 0d 09 09 73 74 72 6c 6e | 20 3d 20 6e 6d 6c 65 6e |...strln| = nmlen|
|00002cc0| 2d 31 3b 0d 09 09 77 68 | 69 6c 65 20 28 73 74 72 |-1;...wh|ile (str|
|00002cd0| 6c 6e 20 3e 20 30 20 26 | 26 20 2a 28 74 68 65 4e |ln > 0 &|& *(theN|
|00002ce0| 61 6d 65 20 2b 20 73 74 | 72 6c 6e 2d 31 29 20 21 |ame + st|rln-1) !|
|00002cf0| 3d 20 27 3a 27 29 0d 09 | 09 09 2d 2d 73 74 72 6c |= ':')..|..--strl|
|00002d00| 6e 3b 0d 09 09 69 66 20 | 28 73 74 72 6c 6e 20 3c |n;...if |(strln <|
|00002d10| 3d 20 30 29 20 2f 2a 20 | 77 68 6f 6c 65 20 6e 61 |= 0) /* |whole na|
|00002d20| 6d 65 20 77 61 73 20 6a | 75 73 74 20 61 20 66 69 |me was j|ust a fi|
|00002d30| 6c 65 20 6e 61 6d 65 20 | 2a 2f 0d 09 09 09 7b 0d |le name |*/....{.|
|00002d40| 09 09 09 73 74 72 6c 6e | 20 3d 20 31 3b 0d 09 09 |...strln| = 1;...|
|00002d50| 09 64 69 72 4e 61 6d 65 | 5b 30 5d 20 3d 20 27 3a |.dirName|[0] = ':|
|00002d60| 27 3b 0d 09 09 09 64 69 | 72 4e 61 6d 65 5b 31 5d |';....di|rName[1]|
|00002d70| 20 3d 20 27 5c 30 27 3b | 0d 09 09 09 7d 0d 09 09 | = '\0';|....}...|
|00002d80| 65 6c 73 65 0d 09 09 09 | 7b 0d 09 09 09 42 6c 6f |else....|{....Blo|
|00002d90| 63 6b 4d 6f 76 65 28 74 | 68 65 4e 61 6d 65 2c 20 |ckMove(t|heName, |
|00002da0| 64 69 72 4e 61 6d 65 2c | 20 73 74 72 6c 6e 29 3b |dirName,| strln);|
|00002db0| 0d 09 09 09 64 69 72 4e | 61 6d 65 5b 73 74 72 6c |....dirN|ame[strl|
|00002dc0| 6e 5d 20 3d 20 27 5c 30 | 27 3b 0d 09 09 09 7d 0d |n] = '\0|';....}.|
|00002dd0| 09 09 7d 0d 09 65 6c 73 | 65 20 2f 2a 20 77 65 20 |..}..els|e /* we |
|00002de0| 77 65 72 65 20 67 69 76 | 65 6e 20 61 20 64 69 72 |were giv|en a dir|
|00002df0| 65 63 74 6f 72 79 20 2a | 2f 0d 09 09 7b 0d 09 09 |ectory *|/...{...|
|00002e00| 64 69 72 49 44 20 3d 20 | 64 70 62 2d 3e 69 6f 44 |dirID = |dpb->ioD|
|00002e10| 72 44 69 72 49 44 3b 0d | 09 09 73 74 72 6c 6e 20 |rDirID;.|..strln |
|00002e20| 3d 20 20 6e 6d 6c 65 6e | 2d 31 3b 0d 09 09 42 6c |= nmlen|-1;...Bl|
|00002e30| 6f 63 6b 4d 6f 76 65 28 | 74 68 65 4e 61 6d 65 2c |ockMove(|theName,|
|00002e40| 20 64 69 72 4e 61 6d 65 | 2c 20 73 74 72 6c 6e 29 | dirName|, strln)|
|00002e50| 3b 0d 09 09 69 66 20 28 | 2a 28 74 68 65 4e 61 6d |;...if (|*(theNam|
|00002e60| 65 20 2b 20 73 74 72 6c | 6e 2d 31 29 20 21 3d 20 |e + strl|n-1) != |
|00002e70| 27 3a 27 29 0d 09 09 09 | 64 69 72 4e 61 6d 65 5b |':')....|dirName[|
|00002e80| 73 74 72 6c 6e 2b 2b 5d | 20 3d 20 27 3a 27 3b 0d |strln++]| = ':';.|
|00002e90| 09 09 64 69 72 4e 61 6d | 65 5b 73 74 72 6c 6e 5d |..dirNam|e[strln]|
|00002ea0| 20 3d 20 27 5c 30 27 3b | 0d 09 09 7d 0d 09 64 69 | = '\0';|...}..di|
|00002eb0| 72 4c 65 6e 20 3d 20 73 | 74 72 6c 6e 3b 0d 09 0d |rLen = s|trln;...|
|00002ec0| 09 2f 2a 20 6f 70 65 6e | 20 77 6f 72 6b 69 6e 67 |./* open| working|
|00002ed0| 20 64 69 72 65 63 74 6f | 72 79 20 2a 2f 0d 09 69 | directo|ry */..i|
|00002ee0| 20 3d 20 30 3b 0d 09 64 | 6f 0d 09 09 7b 0d 09 09 | = 0;..d|o...{...|
|00002ef0| 76 6f 6c 4e 61 6d 65 5b | 69 2b 31 5d 20 3d 20 64 |volName[|i+1] = d|
|00002f00| 69 72 4e 61 6d 65 5b 69 | 5d 3b 0d 09 09 7d 20 77 |irName[i|];...} w|
|00002f10| 68 69 6c 65 20 28 69 20 | 3c 20 33 30 20 26 26 20 |hile (i |< 30 && |
|00002f20| 64 69 72 4e 61 6d 65 5b | 69 2b 2b 5d 20 21 3d 20 |dirName[|i++] != |
|00002f30| 27 3a 27 29 3b 0d 09 76 | 6f 6c 4e 61 6d 65 5b 30 |':');..v|olName[0|
|00002f40| 5d 20 3d 20 69 3b 0d 09 | 76 50 61 72 6d 73 2e 69 |] = i;..|vParms.i|
|00002f50| 6f 4e 61 6d 65 50 74 72 | 20 3d 20 28 53 74 72 69 |oNamePtr| = (Stri|
|00002f60| 6e 67 50 74 72 29 28 76 | 6f 6c 4e 61 6d 65 29 3b |ngPtr)(v|olName);|
|00002f70| 0d 09 76 50 61 72 6d 73 | 2e 69 6f 56 52 65 66 4e |..vParms|.ioVRefN|
|00002f80| 75 6d 20 3d 20 2d 33 32 | 37 36 38 3b 0d 09 76 50 |um = -32|768;..vP|
|00002f90| 61 72 6d 73 2e 69 6f 56 | 6f 6c 49 6e 64 65 78 20 |arms.ioV|olIndex |
|00002fa0| 3d 20 2d 31 3b 0d 09 69 | 66 20 28 50 42 48 47 65 |= -1;..i|f (PBHGe|
|00002fb0| 74 56 49 6e 66 6f 28 28 | 48 50 61 72 6d 42 6c 6b |tVInfo((|HParmBlk|
|00002fc0| 50 74 72 29 26 76 50 61 | 72 6d 73 2c 20 46 41 4c |Ptr)&vPa|rms, FAL|
|00002fd0| 53 45 29 29 0d 09 09 74 | 68 65 50 61 72 6d 73 2e |SE))...t|heParms.|
|00002fe0| 69 6f 56 52 65 66 4e 75 | 6d 20 3d 20 30 3b 0d 09 |ioVRefNu|m = 0;..|
|00002ff0| 65 6c 73 65 0d 09 09 74 | 68 65 50 61 72 6d 73 2e |else...t|heParms.|
|00003000| 69 6f 56 52 65 66 4e 75 | 6d 20 3d 20 76 50 61 72 |ioVRefNu|m = vPar|
|00003010| 6d 73 2e 69 6f 56 52 65 | 66 4e 75 6d 3b 0d 09 0d |ms.ioVRe|fNum;...|
|00003020| 09 74 68 65 50 61 72 6d | 73 2e 69 6f 4e 61 6d 65 |.theParm|s.ioName|
|00003030| 50 74 72 20 3d 20 4e 55 | 4c 4c 3b 0d 09 74 68 65 |Ptr = NU|LL;..the|
|00003040| 50 61 72 6d 73 2e 69 6f | 57 44 44 69 72 49 44 20 |Parms.io|WDDirID |
|00003050| 3d 20 64 69 72 49 44 3b | 0d 09 74 68 65 50 61 72 |= dirID;|..thePar|
|00003060| 6d 73 2e 69 6f 57 44 50 | 72 6f 63 49 44 20 3d 20 |ms.ioWDP|rocID = |
|00003070| 27 45 52 49 4b 27 3b 0d | 09 69 66 20 28 50 42 4f |'ERIK';.|.if (PBO|
|00003080| 70 65 6e 57 44 28 26 74 | 68 65 50 61 72 6d 73 2c |penWD(&t|heParms,|
|00003090| 20 46 41 4c 53 45 29 29 | 20 2f 2a 20 49 4d 20 49 | FALSE))| /* IM I|
|000030a0| 56 20 70 67 20 31 35 38 | 20 2a 2f 0d 09 09 74 68 |V pg 158| */...th|
|000030b0| 65 50 61 72 6d 73 2e 69 | 6f 56 52 65 66 4e 75 6d |eParms.i|oVRefNum|
|000030c0| 20 3d 20 30 3b 0d 09 74 | 68 65 50 61 72 6d 73 2e | = 0;..t|heParms.|
|000030d0| 69 6f 4e 61 6d 65 50 74 | 72 20 3d 20 4e 55 4c 4c |ioNamePt|r = NULL|
|000030e0| 3b 0d 09 74 68 65 50 61 | 72 6d 73 2e 69 6f 57 44 |;..thePa|rms.ioWD|
|000030f0| 49 6e 64 65 78 20 3d 20 | 30 3b 0d 09 74 68 65 50 |Index = |0;..theP|
|00003100| 61 72 6d 73 2e 69 6f 57 | 44 50 72 6f 63 49 44 20 |arms.ioW|DProcID |
|00003110| 3d 20 30 3b 0d 09 74 68 | 65 50 61 72 6d 73 2e 69 |= 0;..th|eParms.i|
|00003120| 6f 57 44 56 52 65 66 4e | 75 6d 20 3d 20 30 3b 0d |oWDVRefN|um = 0;.|
|00003130| 09 69 66 20 28 50 42 47 | 65 74 57 44 49 6e 66 6f |.if (PBG|etWDInfo|
|00003140| 28 26 74 68 65 50 61 72 | 6d 73 2c 66 61 6c 73 65 |(&thePar|ms,false|
|00003150| 29 29 0d 09 09 72 65 74 | 75 72 6e 28 30 29 3b 0d |))...ret|urn(0);.|
|00003160| 09 66 70 62 2d 3e 69 6f | 56 52 65 66 4e 75 6d 20 |.fpb->io|VRefNum |
|00003170| 3d 20 74 68 65 50 61 72 | 6d 73 2e 69 6f 57 44 56 |= thePar|ms.ioWDV|
|00003180| 52 65 66 4e 75 6d 3b 0d | 09 66 70 62 2d 3e 69 6f |RefNum;.|.fpb->io|
|00003190| 4e 61 6d 65 50 74 72 20 | 3d 20 28 53 74 72 69 6e |NamePtr |= (Strin|
|000031a0| 67 50 74 72 29 66 4e 61 | 6d 65 3b 0d 09 64 6f 0d |gPtr)fNa|me;..do.|
|000031b0| 09 09 7b 0d 09 09 66 70 | 62 2d 3e 69 6f 46 44 69 |..{...fp|b->ioFDi|
|000031c0| 72 49 6e 64 65 78 20 3d | 20 69 6e 64 65 78 3b 0d |rIndex =| index;.|
|000031d0| 09 09 66 70 62 2d 3e 69 | 6f 44 69 72 49 44 20 3d |..fpb->i|oDirID =|
|000031e0| 20 64 69 72 49 44 3b 0d | 09 09 69 66 20 28 28 65 | dirID;.|..if ((e|
|000031f0| 72 72 20 3d 20 50 42 47 | 65 74 43 61 74 49 6e 66 |rr = PBG|etCatInf|
|00003200| 6f 28 63 69 70 62 72 2c | 20 46 41 4c 53 45 29 29 |o(cipbr,| FALSE))|
|00003210| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 09 09 09 7b 0d | == noEr|r)....{.|
|00003220| 09 09 09 69 66 20 28 21 | 64 69 72 73 20 26 26 20 |...if (!|dirs && |
|00003230| 21 28 66 70 62 2d 3e 69 | 6f 46 6c 41 74 74 72 69 |!(fpb->i|oFlAttri|
|00003240| 62 20 26 20 31 36 29 29 | 20 2f 2a 20 61 20 66 69 |b & 16))| /* a fi|
|00003250| 6c 65 20 2a 2f 0d 09 09 | 09 09 7b 0d 09 09 09 09 |le */...|..{.....|
|00003260| 2f 2a 20 49 73 20 69 74 | 20 74 68 65 20 72 69 67 |/* Is it| the rig|
|00003270| 68 74 20 6b 69 6e 64 20 | 6f 66 20 66 69 6c 65 3f |ht kind |of file?|
|00003280| 20 2a 2f 0d 09 09 09 09 | 69 66 20 28 66 70 62 2d | */.....|if (fpb-|
|00003290| 3e 69 6f 46 6c 46 6e 64 | 72 49 6e 66 6f 2e 66 64 |>ioFlFnd|rInfo.fd|
|000032a0| 54 79 70 65 20 3d 3d 20 | 27 54 45 58 54 27 29 0d |Type == |'TEXT').|
|000032b0| 09 09 09 09 09 7b 0d 09 | 09 09 09 09 2b 2b 6e 75 |.....{..|....++nu|
|000032c0| 6d 46 69 6c 65 73 3b 0d | 09 09 09 09 09 73 74 72 |mFiles;.|.....str|
|000032d0| 6c 6e 20 3d 20 66 4e 61 | 6d 65 5b 30 5d 20 2b 20 |ln = fNa|me[0] + |
|000032e0| 64 69 72 4c 65 6e 3b 0d | 09 09 09 09 09 50 74 6f |dirLen;.|.....Pto|
|000032f0| 43 73 74 72 28 28 75 6e | 73 69 67 6e 65 64 20 63 |Cstr((un|signed c|
|00003300| 68 61 72 20 2a 29 66 4e | 61 6d 65 29 3b 0d 09 09 |har *)fN|ame);...|
|00003310| 09 09 09 64 69 72 4e 61 | 6d 65 5b 64 69 72 4c 65 |...dirNa|me[dirLe|
|00003320| 6e 5d 20 3d 20 27 5c 30 | 27 3b 0d 09 09 09 09 09 |n] = '\0|';......|
|00003330| 73 74 72 63 61 74 28 64 | 69 72 4e 61 6d 65 2c 20 |strcat(d|irName, |
|00003340| 66 4e 61 6d 65 29 3b 0d | 09 09 09 09 09 2a 61 73 |fName);.|.....*as|
|00003350| 73 6f 63 5f 6c 6f 6f 6b | 75 70 28 69 6e 64 2c 20 |soc_look|up(ind, |
|00003360| 74 6d 70 5f 6e 75 6d 62 | 65 72 28 28 41 57 4b 4e |tmp_numb|er((AWKN|
|00003370| 55 4d 29 20 28 6e 75 6d | 46 69 6c 65 73 29 29 29 |UM) (num|Files)))|
|00003380| 20 0d 09 09 09 09 09 09 | 3d 20 6d 61 6b 65 5f 73 | .......|= make_s|
|00003390| 74 72 69 6e 67 28 64 69 | 72 4e 61 6d 65 2c 20 73 |tring(di|rName, s|
|000033a0| 74 72 6c 6e 29 3b 0d 09 | 09 09 09 09 7d 0d 09 09 |trln);..|....}...|
|000033b0| 09 09 7d 0d 09 09 09 65 | 6c 73 65 20 69 66 20 28 |..}....e|lse if (|
|000033c0| 64 69 72 73 20 26 26 20 | 28 66 70 62 2d 3e 69 6f |dirs && |(fpb->io|
|000033d0| 46 6c 41 74 74 72 69 62 | 20 26 20 31 36 29 29 20 |FlAttrib| & 16)) |
|000033e0| 2f 2a 20 61 20 64 69 72 | 65 63 74 6f 72 79 20 2a |/* a dir|ectory *|
|000033f0| 2f 0d 09 09 09 09 7b 0d | 09 09 09 09 2b 2b 6e 75 |/.....{.|....++nu|
|00003400| 6d 46 69 6c 65 73 3b 0d | 09 09 09 09 73 74 72 6c |mFiles;.|....strl|
|00003410| 6e 20 3d 20 66 4e 61 6d | 65 5b 30 5d 20 2b 20 64 |n = fNam|e[0] + d|
|00003420| 69 72 4c 65 6e 3b 0d 09 | 09 09 09 50 74 6f 43 73 |irLen;..|...PtoCs|
|00003430| 74 72 28 28 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |tr((unsi|gned cha|
|00003440| 72 20 2a 29 66 4e 61 6d | 65 29 3b 0d 09 09 09 09 |r *)fNam|e);.....|
|00003450| 64 69 72 4e 61 6d 65 5b | 64 69 72 4c 65 6e 5d 20 |dirName[|dirLen] |
|00003460| 3d 20 27 5c 30 27 3b 0d | 09 09 09 09 73 74 72 63 |= '\0';.|....strc|
|00003470| 61 74 28 64 69 72 4e 61 | 6d 65 2c 20 66 4e 61 6d |at(dirNa|me, fNam|
|00003480| 65 29 3b 0d 09 09 09 09 | 2a 61 73 73 6f 63 5f 6c |e);.....|*assoc_l|
|00003490| 6f 6f 6b 75 70 28 69 6e | 64 2c 20 74 6d 70 5f 6e |ookup(in|d, tmp_n|
|000034a0| 75 6d 62 65 72 28 28 41 | 57 4b 4e 55 4d 29 20 28 |umber((A|WKNUM) (|
|000034b0| 6e 75 6d 46 69 6c 65 73 | 29 29 29 20 0d 09 09 09 |numFiles|))) ....|
|000034c0| 09 09 3d 20 6d 61 6b 65 | 5f 73 74 72 69 6e 67 28 |..= make|_string(|
|000034d0| 64 69 72 4e 61 6d 65 2c | 20 73 74 72 6c 6e 29 3b |dirName,| strln);|
|000034e0| 0d 09 09 09 09 7d 0d 09 | 09 09 7d 0d 09 09 2b 2b |.....}..|..}...++|
|000034f0| 69 6e 64 65 78 3b 0d 09 | 09 7d 20 77 68 69 6c 65 |index;..|.} while|
|00003500| 20 28 65 72 72 20 3d 3d | 20 6e 6f 45 72 72 29 3b | (err ==| noErr);|
|00003510| 0d 09 72 65 74 75 72 6e | 28 6e 75 6d 46 69 6c 65 |..return|(numFile|
|00003520| 73 29 3b 0d 09 7d 0d 0d | 4e 4f 44 45 20 2a 64 6f |s);..}..|NODE *do|
|00003530| 5f 72 65 6e 61 6d 65 28 | 4e 4f 44 45 20 2a 74 72 |_rename(|NODE *tr|
|00003540| 65 65 29 0d 09 7b 0d 09 | 4e 4f 44 45 20 09 2a 74 |ee)..{..|NODE .*t|
|00003550| 31 2c 20 2a 74 32 3b 09 | 2f 2a 20 73 74 72 69 6e |1, *t2;.|/* strin|
|00003560| 67 2c 20 73 74 72 69 6e | 67 20 2a 2f 0d 09 4e 4f |g, strin|g */..NO|
|00003570| 44 45 09 2a 72 65 73 3b | 0d 09 63 68 61 72 20 09 |DE.*res;|..char .|
|00003580| 2a 66 72 6f 6d 2c 20 2a | 74 6f 3b 0d 09 73 68 6f |*from, *|to;..sho|
|00003590| 72 74 09 09 6e 75 6d 5f | 61 72 67 73 3b 0d 09 0d |rt..num_|args;...|
|000035a0| 09 69 66 20 28 28 6e 75 | 6d 5f 61 72 67 73 20 3d |.if ((nu|m_args =|
|000035b0| 20 63 5f 67 65 74 5f 74 | 77 6f 28 74 72 65 65 2c | c_get_t|wo(tree,|
|000035c0| 20 26 74 31 2c 20 26 74 | 32 29 29 20 3c 20 32 29 | &t1, &t|2)) < 2)|
|000035d0| 0d 09 09 66 61 74 61 6c | 28 22 72 65 6e 61 6d 65 |...fatal|("rename|
|000035e0| 20 72 65 71 75 69 72 65 | 73 20 61 74 20 6c 65 61 | require|s at lea|
|000035f0| 73 74 20 74 77 6f 20 61 | 72 67 75 6d 65 6e 74 73 |st two a|rguments|
|00003600| 22 29 3b 0d 09 66 72 6f | 6d 20 3d 20 66 6f 72 63 |");..fro|m = forc|
|00003610| 65 5f 73 74 72 69 6e 67 | 28 74 31 29 2d 3e 73 74 |e_string|(t1)->st|
|00003620| 70 74 72 3b 0d 09 74 6f | 20 3d 20 66 6f 72 63 65 |ptr;..to| = force|
|00003630| 5f 73 74 72 69 6e 67 28 | 74 32 29 2d 3e 73 74 70 |_string(|t2)->stp|
|00003640| 74 72 3b 0d 09 72 65 73 | 20 3d 20 20 74 6d 70 5f |tr;..res| = tmp_|
|00003650| 6e 75 6d 62 65 72 28 28 | 41 57 4b 4e 55 4d 29 0d |number((|AWKNUM).|
|00003660| 09 09 5f 72 65 6e 61 6d | 65 28 66 72 6f 6d 2c 20 |.._renam|e(from, |
|00003670| 74 31 2d 3e 73 74 6c 65 | 6e 2b 31 2c 20 74 6f 2c |t1->stle|n+1, to,|
|00003680| 20 74 32 2d 3e 73 74 6c | 65 6e 2b 31 29 29 3b 0d | t2->stl|en+1));.|
|00003690| 09 66 72 65 65 5f 74 65 | 6d 70 28 74 31 29 3b 0d |.free_te|mp(t1);.|
|000036a0| 09 66 72 65 65 5f 74 65 | 6d 70 28 74 32 29 3b 0d |.free_te|mp(t2);.|
|000036b0| 09 72 65 74 75 72 6e 20 | 72 65 73 3b 0d 09 7d 0d |.return |res;..}.|
|000036c0| 0d 2f 2a 20 52 65 6e 61 | 6d 65 20 61 20 66 69 6c |./* Rena|me a fil|
|000036d0| 65 2e 20 52 65 6e 61 6d | 65 20 6f 66 20 76 6f 6c |e. Renam|e of vol|
|000036e0| 75 6d 65 73 20 69 73 20 | 6e 6f 74 20 61 6c 6c 6f |umes is |not allo|
|000036f0| 77 65 64 2e 20 4c 6f 63 | 61 74 69 6f 6e 20 63 61 |wed. Loc|ation ca|
|00003700| 6e 6e 6f 74 0d 62 65 20 | 63 68 61 6e 67 65 64 20 |nnot.be |changed |
|00003710| 77 69 74 68 20 74 68 69 | 73 20 66 75 6e 63 74 69 |with thi|s functi|
|00003720| 6f 6e 2e 20 49 66 20 6f | 6e 6c 79 20 61 20 6e 65 |on. If o|nly a ne|
|00003730| 77 20 66 69 6c 65 20 6e | 61 6d 65 20 69 73 20 73 |w file n|ame is s|
|00003740| 75 70 70 6c 69 65 64 2c | 0d 66 69 6c 6c 20 69 6e |upplied,|.fill in|
|00003750| 20 69 74 73 20 66 75 6c | 6c 20 70 61 74 68 20 66 | its ful|l path f|
|00003760| 72 6f 6d 20 74 68 65 20 | 6f 6c 64 20 66 75 6c 6c |rom the |old full|
|00003770| 20 70 61 74 68 6e 61 6d | 65 2e 20 2a 2f 0d 42 6f | pathnam|e. */.Bo|
|00003780| 6f 6c 65 61 6e 20 5f 72 | 65 6e 61 6d 65 28 50 74 |olean _r|ename(Pt|
|00003790| 72 20 6f 6c 64 4e 61 6d | 65 50 2c 20 73 68 6f 72 |r oldNam|eP, shor|
|000037a0| 74 20 6f 6c 64 4e 6d 4c | 65 6e 2c 20 50 74 72 20 |t oldNmL|en, Ptr |
|000037b0| 6e 65 77 4e 61 6d 65 50 | 2c 20 73 68 6f 72 74 20 |newNameP|, short |
|000037c0| 6e 65 77 4e 6d 4c 65 6e | 29 0d 09 7b 0d 09 63 68 |newNmLen|)..{..ch|
|000037d0| 61 72 09 6f 6c 64 4e 61 | 6d 65 5b 32 35 36 5d 2c |ar.oldNa|me[256],|
|000037e0| 20 6e 65 77 4e 61 6d 65 | 5b 32 35 36 5d 3b 0d 09 | newName|[256];..|
|000037f0| 50 74 72 09 09 74 50 74 | 72 2c 20 65 6e 64 50 74 |Ptr..tPt|r, endPt|
|00003800| 72 3b 0d 09 42 6f 6f 6c | 65 61 6e 09 68 61 73 43 |r;..Bool|ean.hasC|
|00003810| 6f 6c 6f 6e 73 20 3d 20 | 46 41 4c 53 45 3b 0d 09 |olons = |FALSE;..|
|00003820| 0d 09 69 66 20 28 6f 6c | 64 4e 6d 4c 65 6e 20 3c |..if (ol|dNmLen <|
|00003830| 3d 20 32 20 7c 7c 20 2a | 28 6f 6c 64 4e 61 6d 65 |= 2 || *|(oldName|
|00003840| 50 20 2b 20 6f 6c 64 4e | 6d 4c 65 6e 20 2d 20 32 |P + oldN|mLen - 2|
|00003850| 29 20 3d 3d 20 27 3a 27 | 29 0d 09 09 72 65 74 75 |) == ':'|)...retu|
|00003860| 72 6e 28 46 41 4c 53 45 | 29 3b 0d 09 2f 2a 20 69 |rn(FALSE|);../* i|
|00003870| 66 20 6e 65 77 20 6e 61 | 6d 65 20 69 73 20 6a 75 |f new na|me is ju|
|00003880| 73 74 20 61 20 66 69 6c | 65 20 6e 61 6d 65 2c 20 |st a fil|e name, |
|00003890| 66 69 6c 6c 20 69 6e 20 | 74 68 65 20 66 75 6c 6c |fill in |the full|
|000038a0| 20 70 61 74 68 20 66 72 | 6f 6d 0d 09 74 68 65 20 | path fr|om..the |
|000038b0| 6f 6c 64 20 6e 61 6d 65 | 20 2a 2f 0d 09 74 50 74 |old name| */..tPt|
|000038c0| 72 20 3d 20 6e 65 77 4e | 61 6d 65 50 3b 0d 09 65 |r = newN|ameP;..e|
|000038d0| 6e 64 50 74 72 20 3d 20 | 6e 65 77 4e 61 6d 65 50 |ndPtr = |newNameP|
|000038e0| 20 2b 20 6e 65 77 4e 6d | 4c 65 6e 20 2d 20 31 3b | + newNm|Len - 1;|
|000038f0| 0d 09 77 68 69 6c 65 20 | 28 74 50 74 72 20 3c 20 |..while |(tPtr < |
|00003900| 65 6e 64 50 74 72 29 0d | 09 09 7b 0d 09 09 69 66 |endPtr).|..{...if|
|00003910| 20 28 2a 74 50 74 72 2b | 2b 20 3d 3d 20 27 3a 27 | (*tPtr+|+ == ':'|
|00003920| 29 0d 09 09 09 7b 0d 09 | 09 09 68 61 73 43 6f 6c |)....{..|..hasCol|
|00003930| 6f 6e 73 20 3d 20 54 52 | 55 45 3b 0d 09 09 09 62 |ons = TR|UE;....b|
|00003940| 72 65 61 6b 3b 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |reak;...|.}...}..|
|00003950| 69 66 20 28 21 68 61 73 | 43 6f 6c 6f 6e 73 29 0d |if (!has|Colons).|
|00003960| 09 09 7b 0d 09 09 65 6e | 64 50 74 72 20 3d 20 6f |..{...en|dPtr = o|
|00003970| 6c 64 4e 61 6d 65 50 20 | 2b 20 6f 6c 64 4e 6d 4c |ldNameP |+ oldNmL|
|00003980| 65 6e 20 2d 20 32 3b 0d | 09 09 74 50 74 72 20 3d |en - 2;.|..tPtr =|
|00003990| 20 6f 6c 64 4e 61 6d 65 | 50 3b 0d 09 09 77 68 69 | oldName|P;...whi|
|000039a0| 6c 65 20 28 65 6e 64 50 | 74 72 20 3e 20 74 50 74 |le (endP|tr > tPt|
|000039b0| 72 20 26 26 20 2a 28 65 | 6e 64 50 74 72 2d 31 29 |r && *(e|ndPtr-1)|
|000039c0| 20 21 3d 20 27 3a 27 29 | 0d 09 09 09 2d 2d 65 6e | != ':')|....--en|
|000039d0| 64 50 74 72 3b 0d 09 09 | 69 66 20 28 65 6e 64 50 |dPtr;...|if (endP|
|000039e0| 74 72 20 3d 3d 20 6f 6c | 64 4e 61 6d 65 50 20 2b |tr == ol|dNameP +|
|000039f0| 20 6f 6c 64 4e 6d 4c 65 | 6e 20 2d 20 32 0d 09 09 | oldNmLe|n - 2...|
|00003a00| 09 7c 7c 20 65 6e 64 50 | 74 72 20 3c 20 74 50 74 |.|| endP|tr < tPt|
|00003a10| 72 20 2b 20 32 29 0d 09 | 09 09 72 65 74 75 72 6e |r + 2)..|..return|
|00003a20| 28 46 41 4c 53 45 29 3b | 0d 09 09 69 66 20 28 6e |(FALSE);|...if (n|
|00003a30| 65 77 4e 6d 4c 65 6e 20 | 2b 20 28 65 6e 64 50 74 |ewNmLen |+ (endPt|
|00003a40| 72 20 2d 20 74 50 74 72 | 29 20 3e 20 32 35 35 29 |r - tPtr|) > 255)|
|00003a50| 0d 09 09 09 72 65 74 75 | 72 6e 28 46 41 4c 53 45 |....retu|rn(FALSE|
|00003a60| 29 3b 0d 09 09 42 6c 6f | 63 6b 4d 6f 76 65 28 6e |);...Blo|ckMove(n|
|00003a70| 65 77 4e 61 6d 65 50 2c | 20 6e 65 77 4e 61 6d 65 |ewNameP,| newName|
|00003a80| 2b 28 65 6e 64 50 74 72 | 2d 74 50 74 72 29 2c 20 |+(endPtr|-tPtr), |
|00003a90| 6e 65 77 4e 6d 4c 65 6e | 29 3b 0d 09 09 42 6c 6f |newNmLen|);...Blo|
|00003aa0| 63 6b 4d 6f 76 65 28 74 | 50 74 72 2c 20 6e 65 77 |ckMove(t|Ptr, new|
|00003ab0| 4e 61 6d 65 2c 20 65 6e | 64 50 74 72 2d 74 50 74 |Name, en|dPtr-tPt|
|00003ac0| 72 29 3b 0d 09 09 7d 0d | 09 65 6c 73 65 0d 09 09 |r);...}.|.else...|
|00003ad0| 42 6c 6f 63 6b 4d 6f 76 | 65 28 6e 65 77 4e 61 6d |BlockMov|e(newNam|
|00003ae0| 65 50 2c 20 6e 65 77 4e | 61 6d 65 2c 20 6e 65 77 |eP, newN|ame, new|
|00003af0| 4e 6d 4c 65 6e 29 3b 0d | 09 42 6c 6f 63 6b 4d 6f |NmLen);.|.BlockMo|
|00003b00| 76 65 28 6f 6c 64 4e 61 | 6d 65 50 2c 20 6f 6c 64 |ve(oldNa|meP, old|
|00003b10| 4e 61 6d 65 2c 20 6f 6c | 64 4e 6d 4c 65 6e 29 3b |Name, ol|dNmLen);|
|00003b20| 0d 09 43 74 6f 50 73 74 | 72 28 6f 6c 64 4e 61 6d |..CtoPst|r(oldNam|
|00003b30| 65 29 3b 0d 09 43 74 6f | 50 73 74 72 28 6e 65 77 |e);..Cto|Pstr(new|
|00003b40| 4e 61 6d 65 29 3b 0d 09 | 72 65 74 75 72 6e 28 52 |Name);..|return(R|
|00003b50| 65 6e 61 6d 65 28 28 53 | 74 72 69 6e 67 50 74 72 |ename((S|tringPtr|
|00003b60| 29 6f 6c 64 4e 61 6d 65 | 2c 30 2c 28 53 74 72 69 |)oldName|,0,(Stri|
|00003b70| 6e 67 50 74 72 29 6e 65 | 77 4e 61 6d 65 29 20 3d |ngPtr)ne|wName) =|
|00003b80| 3d 20 6e 6f 45 72 72 29 | 3b 0d 09 7d 0d 0d 4e 4f |= noErr)|;..}..NO|
|00003b90| 44 45 20 2a 64 6f 5f 72 | 65 6d 6f 76 65 28 4e 4f |DE *do_r|emove(NO|
|00003ba0| 44 45 20 2a 74 72 65 65 | 29 0d 09 7b 0d 09 4e 4f |DE *tree|)..{..NO|
|00003bb0| 44 45 20 09 2a 74 31 2c | 20 2a 74 32 3b 0d 09 0d |DE .*t1,| *t2;...|
|00003bc0| 09 69 66 20 28 21 74 72 | 65 65 29 0d 09 09 72 65 |.if (!tr|ee)...re|
|00003bd0| 74 75 72 6e 20 74 6d 70 | 5f 6e 75 6d 62 65 72 28 |turn tmp|_number(|
|00003be0| 28 41 57 4b 4e 55 4d 29 | 30 29 3b 0d 09 74 31 20 |(AWKNUM)|0);..t1 |
|00003bf0| 3d 20 66 6f 72 63 65 5f | 73 74 72 69 6e 67 28 74 |= force_|string(t|
|00003c00| 72 65 65 5f 65 76 61 6c | 28 74 72 65 65 2d 3e 6c |ree_eval|(tree->l|
|00003c10| 6e 6f 64 65 29 29 3b 0d | 09 74 32 20 3d 20 20 74 |node));.|.t2 = t|
|00003c20| 6d 70 5f 6e 75 6d 62 65 | 72 28 28 41 57 4b 4e 55 |mp_numbe|r((AWKNU|
|00003c30| 4d 29 5f 72 65 6d 6f 76 | 65 28 74 31 2d 3e 73 74 |M)_remov|e(t1->st|
|00003c40| 70 74 72 2c 20 74 31 2d | 3e 73 74 6c 65 6e 2b 31 |ptr, t1-|>stlen+1|
|00003c50| 29 29 3b 0d 09 66 72 65 | 65 5f 74 65 6d 70 28 74 |));..fre|e_temp(t|
|00003c60| 31 29 3b 0d 09 72 65 74 | 75 72 6e 20 74 32 3b 0d |1);..ret|urn t2;.|
|00003c70| 09 7d 0d 0d 42 6f 6f 6c | 65 61 6e 20 5f 72 65 6d |.}..Bool|ean _rem|
|00003c80| 6f 76 65 28 63 68 61 72 | 20 2a 6e 61 6d 65 2c 20 |ove(char| *name, |
|00003c90| 73 68 6f 72 74 20 6e 6d | 4c 65 6e 29 0d 09 7b 0d |short nm|Len)..{.|
|00003ca0| 09 46 69 6c 65 50 61 72 | 61 6d 09 66 70 62 3b 0d |.FilePar|am.fpb;.|
|00003cb0| 09 63 68 61 72 09 09 66 | 4e 61 6d 65 5b 32 35 36 |.char..f|Name[256|
|00003cc0| 5d 3b 0d 09 0d 09 42 6c | 6f 63 6b 4d 6f 76 65 28 |];....Bl|ockMove(|
|00003cd0| 6e 61 6d 65 2c 20 66 4e | 61 6d 65 2c 20 6e 6d 4c |name, fN|ame, nmL|
|00003ce0| 65 6e 29 3b 0d 09 43 74 | 6f 50 73 74 72 28 66 4e |en);..Ct|oPstr(fN|
|00003cf0| 61 6d 65 29 3b 0d 09 66 | 70 62 2e 69 6f 4e 61 6d |ame);..f|pb.ioNam|
|00003d00| 65 50 74 72 20 3d 20 28 | 53 74 72 69 6e 67 50 74 |ePtr = (|StringPt|
|00003d10| 72 29 20 66 4e 61 6d 65 | 3b 0d 09 66 70 62 2e 69 |r) fName|;..fpb.i|
|00003d20| 6f 56 52 65 66 4e 75 6d | 20 3d 20 30 3b 0d 09 66 |oVRefNum| = 0;..f|
|00003d30| 70 62 2e 69 6f 46 56 65 | 72 73 4e 75 6d 20 3d 20 |pb.ioFVe|rsNum = |
|00003d40| 30 3b 0d 09 72 65 74 75 | 72 6e 28 50 42 44 65 6c |0;..retu|rn(PBDel|
|00003d50| 65 74 65 28 28 50 61 72 | 6d 42 6c 6b 50 74 72 29 |ete((Par|mBlkPtr)|
|00003d60| 26 66 70 62 2c 20 46 41 | 4c 53 45 29 20 3d 3d 20 |&fpb, FA|LSE) == |
|00003d70| 6e 6f 45 72 72 29 3b 0d | 09 7d 0d 0d 4e 4f 44 45 |noErr);.|.}..NODE|
|00003d80| 20 2a 64 6f 5f 65 78 69 | 73 74 73 28 4e 4f 44 45 | *do_exi|sts(NODE|
|00003d90| 20 2a 74 72 65 65 29 0d | 09 7b 0d 09 4e 4f 44 45 | *tree).|.{..NODE|
|00003da0| 20 2a 74 31 2c 20 2a 74 | 32 3b 0d 09 0d 09 69 66 | *t1, *t|2;....if|
|00003db0| 20 28 21 74 72 65 65 29 | 0d 09 09 72 65 74 75 72 | (!tree)|...retur|
|00003dc0| 6e 20 74 6d 70 5f 6e 75 | 6d 62 65 72 28 28 41 57 |n tmp_nu|mber((AW|
|00003dd0| 4b 4e 55 4d 29 30 29 3b | 0d 09 74 31 20 3d 20 66 |KNUM)0);|..t1 = f|
|00003de0| 6f 72 63 65 5f 73 74 72 | 69 6e 67 28 74 72 65 65 |orce_str|ing(tree|
|00003df0| 5f 65 76 61 6c 28 74 72 | 65 65 2d 3e 6c 6e 6f 64 |_eval(tr|ee->lnod|
|00003e00| 65 29 29 3b 0d 09 74 32 | 20 3d 20 20 74 6d 70 5f |e));..t2| = tmp_|
|00003e10| 6e 75 6d 62 65 72 28 28 | 41 57 4b 4e 55 4d 29 5f |number((|AWKNUM)_|
|00003e20| 65 78 69 73 74 73 28 74 | 31 2d 3e 73 74 70 74 72 |exists(t|1->stptr|
|00003e30| 2c 20 74 31 2d 3e 73 74 | 6c 65 6e 2b 31 29 29 3b |, t1->st|len+1));|
|00003e40| 0d 09 66 72 65 65 5f 74 | 65 6d 70 28 74 31 29 3b |..free_t|emp(t1);|
|00003e50| 0d 09 72 65 74 75 72 6e | 20 74 32 3b 0d 09 7d 0d |..return| t2;..}.|
|00003e60| 0d 42 6f 6f 6c 65 61 6e | 20 5f 65 78 69 73 74 73 |.Boolean| _exists|
|00003e70| 28 63 68 61 72 20 2a 6e | 61 6d 65 2c 20 73 68 6f |(char *n|ame, sho|
|00003e80| 72 74 20 6e 6d 4c 65 6e | 29 0d 09 7b 0d 09 46 69 |rt nmLen|)..{..Fi|
|00003e90| 6c 65 50 61 72 61 6d 20 | 09 70 62 3b 0d 09 63 68 |leParam |.pb;..ch|
|00003ea0| 61 72 09 09 66 4e 61 6d | 65 5b 32 35 36 5d 3b 0d |ar..fNam|e[256];.|
|00003eb0| 09 0d 09 42 6c 6f 63 6b | 4d 6f 76 65 28 6e 61 6d |...Block|Move(nam|
|00003ec0| 65 2c 20 66 4e 61 6d 65 | 2c 20 6e 6d 4c 65 6e 29 |e, fName|, nmLen)|
|00003ed0| 3b 0d 09 43 74 6f 50 73 | 74 72 28 66 4e 61 6d 65 |;..CtoPs|tr(fName|
|00003ee0| 29 3b 0d 09 70 62 2e 69 | 6f 4e 61 6d 65 50 74 72 |);..pb.i|oNamePtr|
|00003ef0| 20 3d 20 28 53 74 72 69 | 6e 67 50 74 72 29 20 66 | = (Stri|ngPtr) f|
|00003f00| 4e 61 6d 65 3b 0d 09 70 | 62 2e 69 6f 56 52 65 66 |Name;..p|b.ioVRef|
|00003f10| 4e 75 6d 20 3d 20 30 3b | 0d 09 70 62 2e 69 6f 46 |Num = 0;|..pb.ioF|
|00003f20| 56 65 72 73 4e 75 6d 20 | 3d 20 30 3b 0d 09 70 62 |VersNum |= 0;..pb|
|00003f30| 2e 69 6f 46 44 69 72 49 | 6e 64 65 78 20 3d 20 30 |.ioFDirI|ndex = 0|
|00003f40| 3b 0d 09 72 65 74 75 72 | 6e 28 50 42 47 65 74 46 |;..retur|n(PBGetF|
|00003f50| 49 6e 66 6f 53 79 6e 63 | 28 28 50 61 72 6d 42 6c |InfoSync|((ParmBl|
|00003f60| 6b 50 74 72 29 26 70 62 | 29 20 3d 3d 20 6e 6f 45 |kPtr)&pb|) == noE|
|00003f70| 72 72 29 3b 0d 09 7d 0d | 0d 4e 4f 44 45 20 2a 64 |rr);..}.|.NODE *d|
|00003f80| 6f 5f 66 64 61 74 65 28 | 4e 4f 44 45 20 2a 74 72 |o_fdate(|NODE *tr|
|00003f90| 65 65 29 0d 09 7b 0d 09 | 4e 4f 44 45 20 2a 74 31 |ee)..{..|NODE *t1|
|00003fa0| 2c 20 2a 72 3b 0d 09 0d | 09 69 66 20 28 21 74 72 |, *r;...|.if (!tr|
|00003fb0| 65 65 29 0d 09 09 72 65 | 74 75 72 6e 20 4e 6e 75 |ee)...re|turn Nnu|
|00003fc0| 6c 6c 5f 73 74 72 69 6e | 67 3b 0d 09 74 31 20 3d |ll_strin|g;..t1 =|
|00003fd0| 20 66 6f 72 63 65 5f 73 | 74 72 69 6e 67 28 74 72 | force_s|tring(tr|
|00003fe0| 65 65 5f 65 76 61 6c 28 | 74 72 65 65 2d 3e 6c 6e |ee_eval(|tree->ln|
|00003ff0| 6f 64 65 29 29 3b 0d 09 | 72 20 3d 20 5f 66 64 61 |ode));..|r = _fda|
|00004000| 74 65 28 74 31 2d 3e 73 | 74 70 74 72 2c 20 74 31 |te(t1->s|tptr, t1|
|00004010| 2d 3e 73 74 6c 65 6e 2b | 31 29 3b 0d 09 66 72 65 |->stlen+|1);..fre|
|00004020| 65 5f 74 65 6d 70 28 74 | 31 29 3b 0d 09 72 65 74 |e_temp(t|1);..ret|
|00004030| 75 72 6e 20 72 3b 0d 09 | 7d 0d 0d 4e 4f 44 45 20 |urn r;..|}..NODE |
|00004040| 2a 5f 66 64 61 74 65 28 | 63 68 61 72 20 2a 6e 61 |*_fdate(|char *na|
|00004050| 6d 65 2c 20 73 68 6f 72 | 74 20 6e 6d 4c 65 6e 29 |me, shor|t nmLen)|
|00004060| 0d 09 7b 0d 09 46 69 6c | 65 50 61 72 61 6d 20 09 |..{..Fil|eParam .|
|00004070| 70 62 3b 0d 09 44 61 74 | 65 54 69 6d 65 52 65 63 |pb;..Dat|eTimeRec|
|00004080| 09 64 74 72 3b 0d 09 63 | 68 61 72 09 09 66 4e 61 |.dtr;..c|har..fNa|
|00004090| 6d 65 5b 32 35 36 5d 2c | 20 77 68 65 6e 5b 33 32 |me[256],| when[32|
|000040a0| 5d 3b 0d 09 4e 4f 44 45 | 09 09 2a 72 3b 0d 09 0d |];..NODE|..*r;...|
|000040b0| 09 42 6c 6f 63 6b 4d 6f | 76 65 28 6e 61 6d 65 2c |.BlockMo|ve(name,|
|000040c0| 20 66 4e 61 6d 65 2c 20 | 6e 6d 4c 65 6e 29 3b 0d | fName, |nmLen);.|
|000040d0| 09 43 74 6f 50 73 74 72 | 28 66 4e 61 6d 65 29 3b |.CtoPstr|(fName);|
|000040e0| 0d 09 70 62 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |..pb.ioN|amePtr =|
|000040f0| 20 28 53 74 72 69 6e 67 | 50 74 72 29 20 66 4e 61 | (String|Ptr) fNa|
|00004100| 6d 65 3b 0d 09 70 62 2e | 69 6f 56 52 65 66 4e 75 |me;..pb.|ioVRefNu|
|00004110| 6d 20 3d 20 30 3b 0d 09 | 70 62 2e 69 6f 46 56 65 |m = 0;..|pb.ioFVe|
|00004120| 72 73 4e 75 6d 20 3d 20 | 30 3b 0d 09 70 62 2e 69 |rsNum = |0;..pb.i|
|00004130| 6f 46 44 69 72 49 6e 64 | 65 78 20 3d 20 30 3b 0d |oFDirInd|ex = 0;.|
|00004140| 09 69 66 20 28 50 42 47 | 65 74 46 49 6e 66 6f 53 |.if (PBG|etFInfoS|
|00004150| 79 6e 63 28 28 50 61 72 | 6d 42 6c 6b 50 74 72 29 |ync((Par|mBlkPtr)|
|00004160| 26 70 62 29 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |&pb) != |noErr)..|
|00004170| 09 72 65 74 75 72 6e 20 | 4e 6e 75 6c 6c 5f 73 74 |.return |Nnull_st|
|00004180| 72 69 6e 67 3b 0d 09 53 | 65 63 73 32 44 61 74 65 |ring;..S|ecs2Date|
|00004190| 28 70 62 2e 69 6f 46 6c | 4d 64 44 61 74 2c 20 26 |(pb.ioFl|MdDat, &|
|000041a0| 64 74 72 29 3b 0d 09 73 | 70 72 69 6e 74 66 28 77 |dtr);..s|printf(w|
|000041b0| 68 65 6e 2c 20 22 25 2e | 34 64 3a 25 2e 32 64 3a |hen, "%.|4d:%.2d:|
|000041c0| 25 2e 32 64 3a 25 2e 32 | 64 3a 25 2e 32 64 3a 25 |%.2d:%.2|d:%.2d:%|
|000041d0| 2e 32 64 22 2c 20 0d 09 | 09 09 64 74 72 2e 79 65 |.2d", ..|..dtr.ye|
|000041e0| 61 72 2c 20 64 74 72 2e | 6d 6f 6e 74 68 2c 20 64 |ar, dtr.|month, d|
|000041f0| 74 72 2e 64 61 79 2c 0d | 09 09 09 64 74 72 2e 68 |tr.day,.|...dtr.h|
|00004200| 6f 75 72 2c 20 64 74 72 | 2e 6d 69 6e 75 74 65 2c |our, dtr|.minute,|
|00004210| 20 64 74 72 2e 73 65 63 | 6f 6e 64 29 3b 0d 09 72 | dtr.sec|ond);..r|
|00004220| 20 3d 20 74 6d 70 5f 73 | 74 72 69 6e 67 28 77 68 | = tmp_s|tring(wh|
|00004230| 65 6e 2c 20 31 39 29 3b | 0d 09 72 65 74 75 72 6e |en, 19);|..return|
|00004240| 20 72 3b 0d 09 7d 0d 0d | 4e 4f 44 45 20 2a 64 6f | r;..}..|NODE *do|
|00004250| 5f 66 73 69 7a 65 28 4e | 4f 44 45 20 2a 74 72 65 |_fsize(N|ODE *tre|
|00004260| 65 29 0d 09 7b 0d 09 4e | 4f 44 45 20 09 2a 74 31 |e)..{..N|ODE .*t1|
|00004270| 2c 20 2a 74 32 3b 0d 09 | 0d 09 69 66 20 28 21 74 |, *t2;..|..if (!t|
|00004280| 72 65 65 29 0d 09 09 72 | 65 74 75 72 6e 20 74 6d |ree)...r|eturn tm|
|00004290| 70 5f 6e 75 6d 62 65 72 | 28 28 41 57 4b 4e 55 4d |p_number|((AWKNUM|
|000042a0| 29 30 29 3b 0d 09 74 31 | 20 3d 20 66 6f 72 63 65 |)0);..t1| = force|
|000042b0| 5f 73 74 72 69 6e 67 28 | 74 72 65 65 5f 65 76 61 |_string(|tree_eva|
|000042c0| 6c 28 74 72 65 65 2d 3e | 6c 6e 6f 64 65 29 29 3b |l(tree->|lnode));|
|000042d0| 0d 09 74 32 20 3d 20 20 | 74 6d 70 5f 6e 75 6d 62 |..t2 = |tmp_numb|
|000042e0| 65 72 28 28 41 57 4b 4e | 55 4d 29 5f 66 73 69 7a |er((AWKN|UM)_fsiz|
|000042f0| 65 28 74 31 2d 3e 73 74 | 70 74 72 2c 20 74 31 2d |e(t1->st|ptr, t1-|
|00004300| 3e 73 74 6c 65 6e 2b 31 | 29 29 3b 0d 09 66 72 65 |>stlen+1|));..fre|
|00004310| 65 5f 74 65 6d 70 28 74 | 31 29 3b 0d 09 72 65 74 |e_temp(t|1);..ret|
|00004320| 75 72 6e 20 74 32 3b 0d | 09 7d 0d 0d 6c 6f 6e 67 |urn t2;.|.}..long|
|00004330| 20 5f 66 73 69 7a 65 28 | 63 68 61 72 20 2a 6e 61 | _fsize(|char *na|
|00004340| 6d 65 2c 20 73 68 6f 72 | 74 20 6e 6d 4c 65 6e 29 |me, shor|t nmLen)|
|00004350| 0d 09 7b 0d 09 46 69 6c | 65 50 61 72 61 6d 20 09 |..{..Fil|eParam .|
|00004360| 70 62 3b 0d 09 63 68 61 | 72 09 09 66 4e 61 6d 65 |pb;..cha|r..fName|
|00004370| 5b 32 35 36 5d 3b 0d 09 | 0d 09 42 6c 6f 63 6b 4d |[256];..|..BlockM|
|00004380| 6f 76 65 28 6e 61 6d 65 | 2c 20 66 4e 61 6d 65 2c |ove(name|, fName,|
|00004390| 20 6e 6d 4c 65 6e 29 3b | 0d 09 43 74 6f 50 73 74 | nmLen);|..CtoPst|
|000043a0| 72 28 66 4e 61 6d 65 29 | 3b 0d 09 70 62 2e 69 6f |r(fName)|;..pb.io|
|000043b0| 4e 61 6d 65 50 74 72 20 | 3d 20 28 53 74 72 69 6e |NamePtr |= (Strin|
|000043c0| 67 50 74 72 29 20 66 4e | 61 6d 65 3b 0d 09 70 62 |gPtr) fN|ame;..pb|
|000043d0| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 30 3b 0d |.ioVRefN|um = 0;.|
|000043e0| 09 70 62 2e 69 6f 46 56 | 65 72 73 4e 75 6d 20 3d |.pb.ioFV|ersNum =|
|000043f0| 20 30 3b 0d 09 70 62 2e | 69 6f 46 44 69 72 49 6e | 0;..pb.|ioFDirIn|
|00004400| 64 65 78 20 3d 20 30 3b | 0d 09 69 66 20 28 50 42 |dex = 0;|..if (PB|
|00004410| 47 65 74 46 49 6e 66 6f | 53 79 6e 63 28 28 50 61 |GetFInfo|Sync((Pa|
|00004420| 72 6d 42 6c 6b 50 74 72 | 29 26 70 62 29 20 21 3d |rmBlkPtr|)&pb) !=|
|00004430| 20 6e 6f 45 72 72 29 0d | 09 09 72 65 74 75 72 6e | noErr).|..return|
|00004440| 28 30 4c 29 3b 0d 09 72 | 65 74 75 72 6e 28 70 62 |(0L);..r|eturn(pb|
|00004450| 2e 69 6f 46 6c 4c 67 4c | 65 6e 29 3b 0d 09 7d 0d |.ioFlLgL|en);..}.|
|00004460| 0d 4e 4f 44 45 20 2a 64 | 6f 5f 67 65 74 63 6c 69 |.NODE *d|o_getcli|
|00004470| 70 28 4e 4f 44 45 20 2a | 74 72 65 65 29 0d 09 7b |p(NODE *|tree)..{|
|00004480| 0d 09 4e 4f 44 45 20 2a | 74 31 3b 0d 09 6c 6f 6e |..NODE *|t1;..lon|
|00004490| 67 09 6d 61 78 42 79 74 | 65 73 3b 0d 09 0d 09 69 |g.maxByt|es;....i|
|000044a0| 66 20 28 21 74 72 65 65 | 29 0d 09 09 6d 61 78 42 |f (!tree|)...maxB|
|000044b0| 79 74 65 73 20 3d 20 30 | 3b 0d 09 65 6c 73 65 0d |ytes = 0|;..else.|
|000044c0| 09 09 7b 0d 09 09 74 31 | 20 3d 20 74 72 65 65 5f |..{...t1| = tree_|
|000044d0| 65 76 61 6c 28 74 72 65 | 65 2d 3e 6c 6e 6f 64 65 |eval(tre|e->lnode|
|000044e0| 29 3b 0d 09 09 6d 61 78 | 42 79 74 65 73 20 3d 20 |);...max|Bytes = |
|000044f0| 28 6c 6f 6e 67 29 20 66 | 6f 72 63 65 5f 6e 75 6d |(long) f|orce_num|
|00004500| 62 65 72 28 74 31 29 3b | 0d 09 09 66 72 65 65 5f |ber(t1);|...free_|
|00004510| 74 65 6d 70 28 74 31 29 | 3b 0d 09 09 7d 0d 09 72 |temp(t1)|;...}..r|
|00004520| 65 74 75 72 6e 20 5f 67 | 65 74 63 6c 69 70 28 6d |eturn _g|etclip(m|
|00004530| 61 78 42 79 74 65 73 29 | 3b 0d 09 7d 0d 0d 4e 4f |axBytes)|;..}..NO|
|00004540| 44 45 20 2a 5f 67 65 74 | 63 6c 69 70 28 6c 6f 6e |DE *_get|clip(lon|
|00004550| 67 20 6d 61 78 42 79 74 | 65 73 29 0d 09 7b 0d 09 |g maxByt|es)..{..|
|00004560| 4e 4f 44 45 20 09 09 2a | 74 31 3b 0d 09 48 61 6e |NODE ..*|t1;..Han|
|00004570| 64 6c 65 20 09 09 68 54 | 65 78 74 3b 0d 09 6c 6f |dle ..hT|ext;..lo|
|00004580| 6e 67 09 09 63 6c 69 70 | 53 69 7a 65 3b 0d 09 65 |ng..clip|Size;..e|
|00004590| 78 74 65 72 6e 20 48 61 | 6e 64 6c 65 20 47 65 74 |xtern Ha|ndle Get|
|000045a0| 54 68 65 43 6c 69 70 28 | 76 6f 69 64 29 3b 0d 09 |TheClip(|void);..|
|000045b0| 0d 09 68 54 65 78 74 20 | 3d 20 47 65 74 54 68 65 |..hText |= GetThe|
|000045c0| 43 6c 69 70 28 29 3b 0d | 09 69 66 20 28 21 68 54 |Clip();.|.if (!hT|
|000045d0| 65 78 74 29 0d 09 09 72 | 65 74 75 72 6e 20 4e 6e |ext)...r|eturn Nn|
|000045e0| 75 6c 6c 5f 73 74 72 69 | 6e 67 3b 0d 09 69 66 20 |ull_stri|ng;..if |
|000045f0| 28 6d 61 78 42 79 74 65 | 73 20 3c 20 30 29 0d 09 |(maxByte|s < 0)..|
|00004600| 09 6d 61 78 42 79 74 65 | 73 20 3d 20 30 3b 0d 09 |.maxByte|s = 0;..|
|00004610| 63 6c 69 70 53 69 7a 65 | 20 3d 20 47 65 74 48 61 |clipSize| = GetHa|
|00004620| 6e 64 6c 65 53 69 7a 65 | 28 68 54 65 78 74 29 3b |ndleSize|(hText);|
|00004630| 0d 09 69 66 20 28 21 63 | 6c 69 70 53 69 7a 65 29 |..if (!c|lipSize)|
|00004640| 0d 09 09 72 65 74 75 72 | 6e 20 4e 6e 75 6c 6c 5f |...retur|n Nnull_|
|00004650| 73 74 72 69 6e 67 3b 0d | 09 69 66 20 28 6d 61 78 |string;.|.if (max|
|00004660| 42 79 74 65 73 20 26 26 | 20 63 6c 69 70 53 69 7a |Bytes &&| clipSiz|
|00004670| 65 20 3e 20 6d 61 78 42 | 79 74 65 73 29 0d 09 09 |e > maxB|ytes)...|
|00004680| 63 6c 69 70 53 69 7a 65 | 20 3d 20 6d 61 78 42 79 |clipSize| = maxBy|
|00004690| 74 65 73 3b 0d 09 2f 2f | 20 52 65 76 69 73 69 6f |tes;..//| Revisio|
|000046a0| 6e 2c 20 6b 65 65 70 20 | 69 74 20 73 68 6f 72 74 |n, keep |it short|
|000046b0| 2e 0d 09 69 66 20 28 63 | 6c 69 70 53 69 7a 65 20 |...if (c|lipSize |
|000046c0| 3e 20 33 32 37 36 36 4c | 29 0d 09 09 63 6c 69 70 |> 32766L|)...clip|
|000046d0| 53 69 7a 65 20 3d 20 33 | 32 37 36 36 4c 3b 0d 09 |Size = 3|2766L;..|
|000046e0| 48 4c 6f 63 6b 28 68 54 | 65 78 74 29 3b 0d 09 74 |HLock(hT|ext);..t|
|000046f0| 31 20 3d 20 74 6d 70 5f | 73 74 72 69 6e 67 28 2a |1 = tmp_|string(*|
|00004700| 68 54 65 78 74 2c 20 63 | 6c 69 70 53 69 7a 65 29 |hText, c|lipSize)|
|00004710| 3b 0d 09 48 55 6e 6c 6f | 63 6b 28 68 54 65 78 74 |;..HUnlo|ck(hText|
|00004720| 29 3b 0d 09 72 65 74 75 | 72 6e 20 74 31 3b 09 0d |);..retu|rn t1;..|
|00004730| 09 7d 0d 0d 4e 4f 44 45 | 20 2a 64 6f 5f 70 75 74 |.}..NODE| *do_put|
|00004740| 63 6c 69 70 28 4e 4f 44 | 45 20 2a 74 72 65 65 29 |clip(NOD|E *tree)|
|00004750| 0d 09 7b 0d 09 4e 4f 44 | 45 20 2a 74 31 2c 20 2a |..{..NOD|E *t1, *|
|00004760| 74 32 3b 0d 09 0d 09 69 | 66 20 28 21 74 72 65 65 |t2;....i|f (!tree|
|00004770| 29 0d 09 09 7b 0d 09 09 | 63 68 61 72 20 63 20 3d |)...{...|char c =|
|00004780| 20 30 3b 0d 09 09 74 32 | 20 3d 20 20 74 6d 70 5f | 0;...t2| = tmp_|
|00004790| 6e 75 6d 62 65 72 28 28 | 41 57 4b 4e 55 4d 29 5f |number((|AWKNUM)_|
|000047a0| 70 75 74 63 6c 69 70 28 | 26 63 29 29 3b 0d 09 09 |putclip(|&c));...|
|000047b0| 7d 0d 09 65 6c 73 65 0d | 09 09 7b 0d 09 09 74 31 |}..else.|..{...t1|
|000047c0| 20 3d 20 66 6f 72 63 65 | 5f 73 74 72 69 6e 67 28 | = force|_string(|
|000047d0| 74 72 65 65 5f 65 76 61 | 6c 28 74 72 65 65 2d 3e |tree_eva|l(tree->|
|000047e0| 6c 6e 6f 64 65 29 29 3b | 0d 09 09 74 32 20 3d 20 |lnode));|...t2 = |
|000047f0| 20 74 6d 70 5f 6e 75 6d | 62 65 72 28 28 41 57 4b | tmp_num|ber((AWK|
|00004800| 4e 55 4d 29 5f 70 75 74 | 63 6c 69 70 28 74 31 2d |NUM)_put|clip(t1-|
|00004810| 3e 73 74 70 74 72 29 29 | 3b 0d 09 09 66 72 65 65 |>stptr))|;...free|
|00004820| 5f 74 65 6d 70 28 74 31 | 29 3b 0d 09 09 7d 0d 09 |_temp(t1|);...}..|
|00004830| 72 65 74 75 72 6e 20 74 | 32 3b 0d 09 7d 0d 0d 73 |return t|2;..}..s|
|00004840| 68 6f 72 74 20 5f 70 75 | 74 63 6c 69 70 28 63 68 |hort _pu|tclip(ch|
|00004850| 61 72 20 2a 73 74 72 29 | 0d 09 7b 0d 09 65 78 74 |ar *str)|..{..ext|
|00004860| 65 72 6e 20 73 68 6f 72 | 74 20 50 75 74 54 68 65 |ern shor|t PutThe|
|00004870| 43 6c 69 70 28 63 68 61 | 72 20 2a 6e 65 77 43 6c |Clip(cha|r *newCl|
|00004880| 69 70 53 74 72 29 3b 0d | 09 0d 09 72 65 74 75 72 |ipStr);.|...retur|
|00004890| 6e 20 50 75 74 54 68 65 | 43 6c 69 70 28 73 74 72 |n PutThe|Clip(str|
|000048a0| 29 3b 0d 09 7d 0d 0d 4e | 4f 44 45 20 2a 64 6f 5f |);..}..N|ODE *do_|
|000048b0| 62 65 65 70 28 4e 4f 44 | 45 20 2a 74 72 65 65 29 |beep(NOD|E *tree)|
|000048c0| 0d 09 7b 0d 09 4e 4f 44 | 45 20 2a 74 31 3b 0d 09 |..{..NOD|E *t1;..|
|000048d0| 73 68 6f 72 74 20 64 75 | 72 61 74 69 6f 6e 2c 20 |short du|ration, |
|000048e0| 73 68 6f 72 74 6c 65 76 | 65 6c 3b 0d 09 0d 09 69 |shortlev|el;....i|
|000048f0| 66 20 28 21 74 72 65 65 | 29 0d 09 09 64 75 72 61 |f (!tree|)...dura|
|00004900| 74 69 6f 6e 20 3d 20 32 | 3b 0d 09 65 6c 73 65 0d |tion = 2|;..else.|
|00004910| 09 09 7b 0d 09 09 74 31 | 20 3d 20 74 72 65 65 5f |..{...t1| = tree_|
|00004920| 65 76 61 6c 28 74 72 65 | 65 2d 3e 6c 6e 6f 64 65 |eval(tre|e->lnode|
|00004930| 29 3b 0d 09 09 64 75 72 | 61 74 69 6f 6e 20 3d 20 |);...dur|ation = |
|00004940| 28 73 68 6f 72 74 29 20 | 66 6f 72 63 65 5f 6e 75 |(short) |force_nu|
|00004950| 6d 62 65 72 28 74 31 29 | 3b 0d 09 09 66 72 65 65 |mber(t1)|;...free|
|00004960| 5f 74 65 6d 70 28 74 31 | 29 3b 0d 09 09 7d 0d 09 |_temp(t1|);...}..|
|00004970| 69 66 20 28 64 75 72 61 | 74 69 6f 6e 20 3c 20 30 |if (dura|tion < 0|
|00004980| 29 0d 09 09 64 75 72 61 | 74 69 6f 6e 20 3d 20 30 |)...dura|tion = 0|
|00004990| 3b 0d 09 69 66 20 28 21 | 64 75 72 61 74 69 6f 6e |;..if (!|duration|
|000049a0| 29 0d 09 09 7b 0d 09 09 | 6c 6f 6e 67 20 66 69 6e |)...{...|long fin|
|000049b0| 61 6c 54 69 63 6b 3b 0d | 09 09 46 6c 61 73 68 4d |alTick;.|..FlashM|
|000049c0| 65 6e 75 42 61 72 28 30 | 29 3b 0d 09 09 44 65 6c |enuBar(0|);...Del|
|000049d0| 61 79 28 32 2c 20 26 66 | 69 6e 61 6c 54 69 63 6b |ay(2, &f|inalTick|
|000049e0| 29 3b 0d 09 09 46 6c 61 | 73 68 4d 65 6e 75 42 61 |);...Fla|shMenuBa|
|000049f0| 72 28 30 29 3b 0d 09 09 | 7d 0d 09 65 6c 73 65 0d |r(0);...|}..else.|
|00004a00| 09 09 53 79 73 42 65 65 | 70 28 64 75 72 61 74 69 |..SysBee|p(durati|
|00004a10| 6f 6e 29 3b 0d 09 72 65 | 74 75 72 6e 20 4e 6e 75 |on);..re|turn Nnu|
|00004a20| 6c 6c 5f 73 74 72 69 6e | 67 3b 0d 09 7d 0d 00 00 |ll_strin|g;..}...|
|00004a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a80| 00 00 01 00 00 00 01 7e | 00 00 00 7e 00 00 00 96 |.......~|...~....|
|00004a90| 00 00 84 00 da 00 96 01 | 20 04 04 53 61 76 65 00 |........| ..Save.|
|00004aa0| 00 00 00 00 9e 00 da 00 | b0 01 20 04 06 43 61 6e |........|.. ..Can|
|00004ab0| 13 68 41 57 4b 5f 46 69 | 6c 65 73 61 6e 64 43 6c |.hAWK_Fi|lesandCl|
|00004ac0| 69 70 2e 63 02 00 00 00 | 54 45 58 54 4b 45 45 4e |ip.c....|TEXTKEEN|
|00004ad0| 00 00 54 45 58 54 4b 45 | 45 4e 01 00 ff ff ff ff |..TEXTKE|EN......|
|00004ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004af0| 00 00 a6 8e 09 64 00 00 | 49 ae 00 00 02 14 00 00 |.....d..|I.......|
|00004b00| 00 00 00 00 9d 00 11 00 | ad 00 c2 10 00 00 00 00 |........|........|
|00004b10| 00 00 1d 00 0e 00 7f 00 | c5 80 00 00 00 00 30 00 |........|......0.|
|00004b20| 01 00 00 00 00 00 32 00 | 70 00 44 00 ba 04 02 4f |......2.|p.D....O|
|00004b30| 4b 00 00 00 00 00 0e 00 | 10 00 2e 00 ba 88 0f 44 |K.......|.......D|
|00004b40| 69 73 6b 20 69 73 20 6c | 6f 63 6b 65 64 2e 00 00 |isk is l|ocked...|
|00004b50| 00 00 4a 00 02 00 00 00 | 00 00 32 00 70 00 44 00 |..J.....|..2.p.D.|
|00004b60| ba 04 02 4e 6f 00 00 00 | 00 00 32 00 10 00 44 00 |...No...|..2...D.|
|00004b70| 5a 04 03 59 65 73 00 00 | 00 00 00 00 0e 00 10 00 |Z..Yes..|........|
|00004b80| 00 00 00 04 00 06 00 04 | 00 00 00 0a 00 09 06 4d |........|.......M|
|00004b90| 6f 6e 61 63 6f 00 00 00 | 00 04 ad af 9c e0 00 00 |onaco...|........|
|00004ba0| 00 08 00 57 00 03 02 ce | 02 2d 00 00 00 48 00 09 |...W....|.-...H..|
|00004bb0| 4d 6f 6e 61 63 6f 00 00 | 00 00 00 00 00 00 00 00 |Monaco..|........|
|00004bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bd0| 00 03 00 04 00 58 00 03 | 02 ce 02 2d 00 58 00 03 |.....X..|...-.X..|
|00004be0| 02 ce 02 2d ad db b6 cd | 00 00 45 1d 00 00 45 27 |...-....|..E...E'|
|00004bf0| 00 00 43 89 00 00 00 00 | 00 04 00 01 00 01 00 00 |..C.....|........|
|00004c00| 01 00 00 00 01 7e 00 00 | 00 7e 00 00 00 96 01 2e |.....~..|.~......|
|00004c10| 1e 58 10 88 00 00 00 1c | 00 96 00 05 45 54 41 42 |.X......|....ETAB|
|00004c20| 00 00 00 32 45 46 4e 54 | 00 00 00 3e 4a 41 47 5a |...2EFNT|...>JAGZ|
|00004c30| 00 00 00 4a 57 53 49 5a | 00 00 00 56 4d 50 53 52 |...JWSIZ|...VMPSR|
|00004c40| 00 00 00 62 4d 57 42 42 | 00 00 00 6e 03 ec ff ff |...bMWBB|...n....|
|00004c50| 00 00 00 00 00 00 00 00 | 03 eb ff ff 00 00 00 08 |........|........|
|00004c60| 00 00 00 00 03 ed ff ff | 00 00 00 16 00 00 00 00 |........|........|
|00004c70| 03 ee ff ff 00 00 00 1e | 00 00 00 00 03 ed ff ff |........|........|
|00004c80| 00 00 00 2a 00 00 00 00 | 03 f0 ff ff 00 00 00 76 |...*....|.......v|
|00004c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+