home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1997-10-07 | 4.5 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 7 03:02:28 1997, modified Tue Oct 7 03:02:28 1997, creator 'MPS ', type ASCII, 3968 bytes "StdFile.h" , at 0x1000 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| dearkID
| deark: macbinary
| default
| |
100%
| lsar
| MacBinary
| default
| |
100%
| librempegprobeID
| NGC (Nintendo DSP Standard) (ngcdspstd)
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 53 74 64 46 69 6c | 65 2e 68 00 00 00 00 00 |..StdFil|e.h.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 0f 80 00 | 00 01 ac b0 5f 8f 04 b0 |........|...._...|
|00000060| 5f 8f 04 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |_.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 e7 b3 00 00 |........|........|
|00000080| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 53 54 44 46 49 |.#ifndef| __STDFI|
|00000090| 4c 45 5f 5f 0d 23 64 65 | 66 69 6e 65 20 5f 5f 53 |LE__.#de|fine __S|
|000000a0| 54 44 46 49 4c 45 5f 5f | 0d 0d 2f 2a 20 66 69 6c |TDFILE__|../* fil|
|000000b0| 65 20 53 74 64 46 69 6c | 65 2e 68 0d 09 47 65 6e |e StdFil|e.h..Gen|
|000000c0| 65 72 61 6c 20 66 69 6c | 65 20 68 61 6e 64 6c 69 |eral fil|e handli|
|000000d0| 6e 67 20 75 74 69 6c 69 | 74 69 65 73 20 66 6f 72 |ng utili|ties for|
|000000e0| 20 74 68 65 20 4d 61 63 | 20 4f 53 0d 09 73 79 73 | the Mac| OS..sys|
|000000f0| 74 65 6d 20 36 20 6f 6e | 20 75 70 0d 09 43 6f 70 |tem 6 on| up..Cop|
|00000100| 79 72 69 67 68 74 20 28 | 63 29 20 31 39 39 37 20 |yright (|c) 1997 |
|00000110| 62 79 20 4a 6f 68 6e 20 | 4d 6f 6e 74 62 72 69 61 |by John |Montbria|
|00000120| 6e 64 2e 20 20 41 6c 6c | 20 52 69 67 68 74 73 20 |nd. All| Rights |
|00000130| 52 65 73 65 72 76 65 64 | 2e 0d 09 50 65 72 6d 69 |Reserved|...Permi|
|00000140| 73 73 69 6f 6e 20 67 72 | 61 6e 74 65 64 20 66 6f |ssion gr|anted fo|
|00000150| 72 20 70 75 62 6c 69 63 | 20 75 73 65 2e 0d 09 44 |r public| use...D|
|00000160| 69 73 74 72 69 62 75 74 | 65 20 66 72 65 65 6c 79 |istribut|e freely|
|00000170| 20 69 6e 20 61 72 65 61 | 73 20 77 68 65 72 65 20 | in area|s where |
|00000180| 74 68 65 20 6c 61 77 73 | 20 6f 66 20 63 6f 70 79 |the laws| of copy|
|00000190| 72 69 67 68 74 20 61 70 | 70 6c 79 2e 0d 09 55 53 |right ap|ply...US|
|000001a0| 45 20 41 54 20 59 4f 55 | 52 20 4f 57 4e 20 52 49 |E AT YOU|R OWN RI|
|000001b0| 53 4b 2e 0d 09 44 4f 20 | 4e 4f 54 20 44 49 53 54 |SK...DO |NOT DIST|
|000001c0| 52 49 42 55 54 45 20 4d | 4f 44 49 46 49 45 44 20 |RIBUTE M|ODIFIED |
|000001d0| 43 4f 50 49 45 53 2e 0d | 09 43 6f 6d 6d 65 6e 74 |COPIES..|.Comment|
|000001e0| 73 2f 71 75 65 73 74 69 | 6f 6e 73 2f 70 6f 73 74 |s/questi|ons/post|
|000001f0| 63 61 72 64 73 20 74 6f | 20 74 68 65 20 61 75 74 |cards to| the aut|
|00000200| 68 6f 72 20 61 74 20 74 | 68 65 20 61 64 64 72 65 |hor at t|he addre|
|00000210| 73 73 3a 0d 09 09 4a 6f | 68 6e 20 4d 6f 6e 74 62 |ss:...Jo|hn Montb|
|00000220| 72 69 61 6e 64 0d 09 09 | 50 2e 4f 2e 20 42 6f 78 |riand...|P.O. Box|
|00000230| 2e 20 31 31 33 33 0d 09 | 09 53 61 73 6b 61 74 6f |. 1133..|.Saskato|
|00000240| 6f 6e 20 53 61 73 6b 61 | 74 63 68 65 77 61 6e 20 |on Saska|tchewan |
|00000250| 43 61 6e 61 64 61 0d 09 | 09 53 37 4b 20 33 4e 32 |Canada..|.S7K 3N2|
|00000260| 0d 09 6f 72 20 62 79 20 | 65 6d 61 69 6c 20 61 74 |..or by |email at|
|00000270| 3a 0d 09 09 74 69 6e 79 | 6a 6f 68 6e 40 73 6b 2e |:...tiny|john@sk.|
|00000280| 73 79 6d 70 61 74 69 63 | 6f 2e 63 61 0d 09 49 66 |sympatic|o.ca..If|
|00000290| 20 79 6f 75 20 77 6f 75 | 6c 64 20 6c 69 6b 65 20 | you wou|ld like |
|000002a0| 74 6f 20 68 61 76 65 3a | 0d 09 09 74 65 63 68 6e |to have:|...techn|
|000002b0| 69 63 61 6c 20 73 75 70 | 70 6f 72 74 20 72 65 67 |ical sup|port reg|
|000002c0| 61 72 64 69 6e 67 20 74 | 68 69 73 20 66 69 6c 65 |arding t|his file|
|000002d0| 2c 20 73 65 6e 64 20 61 | 20 70 6f 73 74 63 61 72 |, send a| postcar|
|000002e0| 64 2e 0d 09 73 65 65 20 | 61 6c 73 6f 3a 0d 09 09 |d...see |also:...|
|000002f0| 68 74 74 70 3a 2f 2f 77 | 77 77 33 2e 73 6b 2e 73 |http://w|ww3.sk.s|
|00000300| 79 6d 70 61 74 69 63 6f | 2e 63 61 2f 74 69 6e 79 |ympatico|.ca/tiny|
|00000310| 6a 6f 68 6e 0d 2a 2f 0d | 0d 23 69 6e 63 6c 75 64 |john.*/.|.#includ|
|00000320| 65 20 3c 54 79 70 65 73 | 2e 68 3e 0d 23 69 6e 63 |e <Types|.h>.#inc|
|00000330| 6c 75 64 65 20 3c 51 75 | 69 63 6b 44 72 61 77 2e |lude <Qu|ickDraw.|
|00000340| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 46 69 6c |h>.#incl|ude <Fil|
|00000350| 65 73 2e 68 3e 0d 0d 0d | 2f 2a 20 4e 6f 72 6d 61 |es.h>...|/* Norma|
|00000360| 6c 69 7a 65 56 52 65 66 | 4e 75 6d 20 63 6f 6e 76 |lizeVRef|Num conv|
|00000370| 65 72 74 73 20 74 68 65 | 20 76 6f 6c 75 6d 65 20 |erts the| volume |
|00000380| 72 65 66 65 72 65 6e 63 | 65 20 6e 75 6d 62 65 72 |referenc|e number|
|00000390| 20 2a 76 52 65 66 4e 75 | 6d 0d 09 77 68 69 63 68 | *vRefNu|m..which|
|000003a0| 20 6d 61 79 20 62 65 20 | 65 69 74 68 65 72 20 7a | may be |either z|
|000003b0| 65 72 6f 2c 20 61 20 77 | 6f 72 6b 69 6e 67 20 64 |ero, a w|orking d|
|000003c0| 69 72 65 63 74 6f 72 79 | 20 72 65 66 65 72 65 6e |irectory| referen|
|000003d0| 63 65 20 6e 75 6d 62 65 | 72 2c 20 6f 72 0d 09 61 |ce numbe|r, or..a|
|000003e0| 20 76 6f 6c 75 6d 65 20 | 72 65 66 65 72 65 6e 63 | volume |referenc|
|000003f0| 65 20 6e 75 6d 62 65 72 | 20 69 6e 74 6f 20 61 20 |e number| into a |
|00000400| 76 6f 6c 75 6d 65 20 72 | 65 66 65 72 65 6e 63 65 |volume r|eference|
|00000410| 20 6e 75 6d 62 65 72 20 | 2a 2f 0d 4f 53 45 72 72 | number |*/.OSErr|
|00000420| 20 4e 6f 72 6d 61 6c 69 | 7a 65 56 52 65 66 4e 75 | Normali|zeVRefNu|
|00000430| 6d 28 73 68 6f 72 74 20 | 2a 76 52 65 66 4e 75 6d |m(short |*vRefNum|
|00000440| 29 3b 0d 0d 0d 2f 2a 20 | 52 65 66 4e 75 6d 54 6f |);.../* |RefNumTo|
|00000450| 46 69 6c 65 20 72 65 74 | 75 72 6e 73 20 74 68 65 |File ret|urns the|
|00000460| 20 76 6f 6c 75 6d 65 2c | 20 64 69 72 65 63 74 6f | volume,| directo|
|00000470| 72 79 2c 20 61 6e 64 20 | 6e 61 6d 65 20 6f 66 20 |ry, and |name of |
|00000480| 74 68 65 20 66 69 6c 65 | 20 63 6f 6e 6e 65 63 74 |the file| connect|
|00000490| 65 64 0d 09 74 6f 20 74 | 68 65 20 69 6e 64 69 63 |ed..to t|he indic|
|000004a0| 61 74 65 64 20 66 69 6c | 65 20 72 65 66 65 72 65 |ated fil|e refere|
|000004b0| 6e 63 65 20 6e 75 6d 62 | 65 72 2e 20 20 2a 2f 0d |nce numb|er. */.|
|000004c0| 4f 53 45 72 72 20 52 65 | 66 4e 75 6d 54 6f 46 69 |OSErr Re|fNumToFi|
|000004d0| 6c 65 28 63 6f 6e 73 74 | 20 73 68 6f 72 74 20 72 |le(const| short r|
|000004e0| 65 66 6e 75 6d 2c 20 73 | 68 6f 72 74 20 2a 76 52 |efnum, s|hort *vR|
|000004f0| 65 66 4e 75 6d 2c 20 6c | 6f 6e 67 20 2a 70 61 72 |efNum, l|ong *par|
|00000500| 49 44 2c 20 53 74 72 69 | 6e 67 50 74 72 20 6e 61 |ID, Stri|ngPtr na|
|00000510| 6d 65 29 3b 0d 0d 0d 2f | 2a 20 52 65 66 4e 75 6d |me);.../|* RefNum|
|00000520| 54 6f 46 53 53 70 65 63 | 20 69 73 20 74 68 65 20 |ToFSSpec| is the |
|00000530| 73 61 6d 65 20 61 73 20 | 52 65 66 6e 75 6d 54 6f |same as |RefnumTo|
|00000540| 46 69 6c 65 20 65 78 63 | 65 70 74 20 69 74 20 72 |File exc|ept it r|
|00000550| 65 74 75 72 6e 73 0d 09 | 69 6e 66 6f 72 6d 61 74 |eturns..|informat|
|00000560| 69 6f 6e 20 69 6e 20 61 | 20 46 53 53 70 65 63 20 |ion in a| FSSpec |
|00000570| 72 65 63 6f 72 64 2e 20 | 2a 2f 0d 4f 53 45 72 72 |record. |*/.OSErr|
|00000580| 20 52 65 66 4e 75 6d 54 | 6f 46 53 53 70 65 63 28 | RefNumT|oFSSpec(|
|00000590| 63 6f 6e 73 74 20 73 68 | 6f 72 74 20 72 65 66 6e |const sh|ort refn|
|000005a0| 75 6d 2c 20 46 53 53 70 | 65 63 20 2a 74 68 65 5f |um, FSSp|ec *the_|
|000005b0| 66 69 6c 65 29 3b 0d 0d | 0d 2f 2a 20 45 71 75 61 |file);..|./* Equa|
|000005c0| 6c 46 53 50 20 72 65 74 | 75 72 6e 73 20 74 72 75 |lFSP ret|urns tru|
|000005d0| 65 20 69 66 20 74 68 65 | 20 74 77 6f 20 46 53 53 |e if the| two FSS|
|000005e0| 70 65 63 20 72 65 63 6f | 72 64 73 20 72 65 66 65 |pec reco|rds refe|
|000005f0| 72 20 74 6f 20 74 68 65 | 20 73 61 6d 65 20 66 69 |r to the| same fi|
|00000600| 6c 65 20 2a 2f 0d 42 6f | 6f 6c 65 61 6e 20 45 71 |le */.Bo|olean Eq|
|00000610| 75 61 6c 46 53 50 28 46 | 53 53 70 65 63 20 2a 61 |ualFSP(F|SSpec *a|
|00000620| 2c 20 46 53 53 70 65 63 | 20 2a 62 29 3b 0d 0d 0d |, FSSpec| *b);...|
|00000630| 2f 2a 20 4f 70 65 6e 54 | 65 6d 70 46 69 6c 65 20 |/* OpenT|empFile |
|00000640| 6f 70 65 6e 73 20 61 20 | 74 65 6d 70 6f 72 61 72 |opens a |temporar|
|00000650| 79 20 66 69 6c 65 20 6f | 6e 20 74 68 65 20 69 6e |y file o|n the in|
|00000660| 64 69 63 61 74 65 64 20 | 76 6f 6c 75 6d 65 20 69 |dicated |volume i|
|00000670| 6e 20 74 68 65 20 69 6e | 64 69 63 61 74 65 64 0d |n the in|dicated.|
|00000680| 09 64 69 72 65 63 74 6f | 72 79 20 72 65 74 75 72 |.directo|ry retur|
|00000690| 6e 69 6e 67 20 69 74 27 | 73 20 61 63 63 65 73 73 |ning it'|s access|
|000006a0| 20 70 61 74 68 20 6e 75 | 6d 62 65 72 20 69 6e 20 | path nu|mber in |
|000006b0| 2a 72 65 66 6e 75 6d 2e | 20 2a 2f 0d 4f 53 45 72 |*refnum.| */.OSEr|
|000006c0| 72 20 4f 70 65 6e 54 65 | 6d 70 46 69 6c 65 28 73 |r OpenTe|mpFile(s|
|000006d0| 68 6f 72 74 20 76 52 65 | 66 4e 75 6d 2c 20 6c 6f |hort vRe|fNum, lo|
|000006e0| 6e 67 20 70 61 72 49 44 | 2c 20 73 68 6f 72 74 20 |ng parID|, short |
|000006f0| 2a 72 65 66 6e 75 6d 29 | 3b 0d 0d 0d 2f 2a 20 4f |*refnum)|;.../* O|
|00000700| 70 65 6e 54 65 6d 70 6f | 72 61 72 79 46 69 6c 65 |penTempo|raryFile|
|00000710| 20 61 74 74 65 6d 70 74 | 73 20 74 6f 20 6f 70 65 | attempt|s to ope|
|00000720| 6e 20 74 68 65 20 74 65 | 6d 70 6f 72 61 72 79 20 |n the te|mporary |
|00000730| 66 69 6c 65 20 69 6e 20 | 74 68 65 20 74 65 6d 70 |file in |the temp|
|00000740| 6f 72 61 72 79 0d 09 66 | 69 6c 65 20 64 69 72 65 |orary..f|ile dire|
|00000750| 63 74 6f 72 79 20 6f 6e | 20 74 68 65 20 69 6e 64 |ctory on| the ind|
|00000760| 69 63 61 74 65 64 20 76 | 6f 6c 75 6d 65 2e 20 20 |icated v|olume. |
|00000770| 49 66 20 46 69 6e 64 46 | 6f 6c 64 65 72 20 69 73 |If FindF|older is|
|00000780| 20 70 72 65 73 65 6e 74 | 2c 20 69 74 20 75 73 65 | present|, it use|
|00000790| 73 0d 09 69 74 20 74 6f | 20 66 69 6e 64 20 74 68 |s..it to| find th|
|000007a0| 65 20 66 6f 6c 64 65 72 | 2c 20 6f 74 68 65 72 77 |e folder|, otherw|
|000007b0| 69 73 65 20 69 74 20 63 | 72 65 61 74 65 73 20 61 |ise it c|reates a|
|000007c0| 20 66 6f 6c 64 65 72 20 | 63 61 6c 6c 65 64 20 22 | folder |called "|
|000007d0| 54 65 6d 70 6f 72 61 72 | 79 20 46 69 6c 65 73 22 |Temporar|y Files"|
|000007e0| 0d 09 69 6e 20 74 68 65 | 20 69 6e 64 69 63 61 74 |..in the| indicat|
|000007f0| 65 64 20 76 6f 6c 75 6d | 65 27 73 20 72 6f 6f 74 |ed volum|e's root|
|00000800| 20 64 69 72 65 63 74 6f | 72 79 2e 20 20 20 41 73 | directo|ry. As|
|00000810| 20 77 69 74 68 20 46 69 | 6e 64 46 6f 6c 64 65 72 | with Fi|ndFolder|
|00000820| 2c 20 76 52 65 66 4e 75 | 6d 0d 09 63 61 6e 20 62 |, vRefNu|m..can b|
|00000830| 65 20 73 65 74 20 74 6f | 20 6b 4f 6e 53 79 73 74 |e set to| kOnSyst|
|00000840| 65 6d 44 69 73 6b 2e 2a | 2f 0d 4f 53 45 72 72 20 |emDisk.*|/.OSErr |
|00000850| 4f 70 65 6e 54 65 6d 70 | 6f 72 61 72 79 46 69 6c |OpenTemp|oraryFil|
|00000860| 65 28 73 68 6f 72 74 20 | 76 52 65 66 4e 75 6d 2c |e(short |vRefNum,|
|00000870| 20 73 68 6f 72 74 20 2a | 72 65 66 6e 75 6d 29 3b | short *|refnum);|
|00000880| 0d 0d 0d 2f 2a 20 43 6c | 6f 73 65 54 65 6d 70 6f |.../* Cl|oseTempo|
|00000890| 72 61 72 79 46 69 6c 65 | 20 63 6c 6f 73 65 73 20 |raryFile| closes |
|000008a0| 74 68 65 20 74 65 6d 70 | 6f 72 61 72 79 20 66 69 |the temp|orary fi|
|000008b0| 6c 65 20 61 6e 64 20 64 | 65 6c 65 74 65 73 20 69 |le and d|eletes i|
|000008c0| 74 2e 20 2a 2f 0d 4f 53 | 45 72 72 20 43 6c 6f 73 |t. */.OS|Err Clos|
|000008d0| 65 54 65 6d 70 6f 72 61 | 72 79 46 69 6c 65 28 73 |eTempora|ryFile(s|
|000008e0| 68 6f 72 74 20 72 65 66 | 6e 75 6d 29 3b 0d 0d 2f |hort ref|num);../|
|000008f0| 2a 20 46 49 4c 45 20 53 | 4f 52 54 49 4e 47 20 2a |* FILE S|ORTING *|
|00000900| 2f 0d 0d 2f 2a 20 53 6f | 72 74 46 69 6c 65 20 73 |/../* So|rtFile s|
|00000910| 6f 72 74 73 20 6e 6d 65 | 6d 62 20 72 65 63 6f 72 |orts nme|mb recor|
|00000920| 64 73 20 6f 66 20 73 69 | 7a 65 20 62 79 74 65 73 |ds of si|ze bytes|
|00000930| 20 69 6e 20 74 68 65 20 | 66 69 6c 65 20 72 65 66 | in the |file ref|
|00000940| 65 72 65 64 20 74 6f 20 | 62 79 20 74 68 65 0d 09 |ered to |by the..|
|00000950| 6f 70 65 6e 20 61 63 63 | 65 73 73 20 70 61 74 68 |open acc|ess path|
|00000960| 20 72 65 66 6e 75 6d 20 | 75 73 69 6e 67 20 74 68 | refnum |using th|
|00000970| 65 20 6f 72 64 65 72 69 | 6e 67 20 70 72 6f 63 65 |e orderi|ng proce|
|00000980| 64 75 72 65 20 63 6f 6d | 70 61 72 0d 09 72 65 74 |dure com|par..ret|
|00000990| 75 72 6e 69 6e 67 20 61 | 20 6e 65 77 20 73 6f 72 |urning a| new sor|
|000009a0| 74 65 64 20 74 65 6d 70 | 6f 72 61 72 79 20 66 69 |ted temp|orary fi|
|000009b0| 6c 65 20 2a 64 73 74 2e | 0d 09 53 6f 72 74 46 69 |le *dst.|..SortFi|
|000009c0| 6c 65 20 6d 65 72 67 65 | 73 20 73 65 67 6d 65 6e |le merge|s segmen|
|000009d0| 74 73 20 6f 66 20 74 68 | 65 20 66 69 6c 65 20 73 |ts of th|e file s|
|000009e0| 6f 72 74 65 64 20 75 73 | 69 6e 67 20 74 68 65 20 |orted us|ing the |
|000009f0| 71 75 69 63 6b 65 72 73 | 6f 72 74 0d 09 61 6c 67 |quickers|ort..alg|
|00000a00| 6f 72 69 74 68 6d 20 4f | 28 6e 6c 6f 67 6e 29 2e |orithm O|(nlogn).|
|00000a10| 20 20 2a 2f 0d 74 79 70 | 65 64 65 66 20 69 6e 74 | */.typ|edef int|
|00000a20| 20 28 2a 43 6f 6d 70 61 | 72 69 73 6f 6e 50 72 6f | (*Compa|risonPro|
|00000a30| 63 29 20 28 63 6f 6e 73 | 74 20 76 6f 69 64 20 2a |c) (cons|t void *|
|00000a40| 2c 20 63 6f 6e 73 74 20 | 76 6f 69 64 20 2a 29 3b |, const |void *);|
|00000a50| 0d 4f 53 45 72 72 20 53 | 6f 72 74 46 69 6c 65 28 |.OSErr S|ortFile(|
|00000a60| 73 68 6f 72 74 20 73 72 | 63 2c 20 73 68 6f 72 74 |short sr|c, short|
|00000a70| 20 2a 64 73 74 2c 20 6c | 6f 6e 67 20 6e 6d 65 6d | *dst, l|ong nmem|
|00000a80| 62 2c 20 6c 6f 6e 67 20 | 73 69 7a 65 2c 20 43 6f |b, long |size, Co|
|00000a90| 6d 70 61 72 69 73 6f 6e | 50 72 6f 63 20 63 6f 6d |mparison|Proc com|
|00000aa0| 70 61 72 29 3b 0d 0d 0d | 2f 2a 20 46 49 4c 45 20 |par);...|/* FILE |
|00000ab0| 4d 45 52 47 49 4e 47 20 | 28 43 2e 46 2e 20 53 45 |MERGING |(C.F. SE|
|00000ac0| 54 53 20 4f 46 20 45 4c | 45 4d 45 4e 54 53 29 20 |TS OF EL|EMENTS) |
|00000ad0| 2a 2f 0d 0d 2f 2a 20 69 | 66 20 79 6f 75 20 73 70 |*/../* i|f you sp|
|00000ae0| 65 63 69 66 79 20 61 20 | 6d 65 72 67 65 20 66 69 |ecify a |merge fi|
|00000af0| 6c 74 65 72 20 66 75 6e | 63 74 69 6f 6e 20 66 6f |lter fun|ction fo|
|00000b00| 72 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |r the fo|llowing |
|00000b10| 72 6f 75 74 69 6e 65 73 | 2c 20 74 68 65 6e 20 6f |routines|, then o|
|00000b20| 6e 6c 79 0d 09 72 65 63 | 6f 72 64 73 20 74 68 61 |nly..rec|ords tha|
|00000b30| 74 20 74 68 65 20 66 69 | 6c 74 65 72 20 72 65 74 |t the fi|lter ret|
|00000b40| 75 72 6e 73 20 27 66 61 | 6c 73 65 27 20 66 6f 72 |urns 'fa|lse' for|
|00000b50| 20 61 72 65 20 61 64 64 | 65 64 20 74 6f 20 74 68 | are add|ed to th|
|00000b60| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 66 69 6c 65 |e result|ing file|
|00000b70| 2e 0d 09 4f 74 68 65 72 | 77 69 73 65 2c 20 61 6c |...Other|wise, al|
|00000b80| 6c 20 6f 66 20 74 68 65 | 20 72 65 63 6f 72 64 73 |l of the| records|
|00000b90| 20 6d 61 74 63 68 69 6e | 67 20 74 68 65 20 63 72 | matchin|g the cr|
|00000ba0| 69 74 65 72 69 61 20 61 | 72 65 20 61 64 64 65 64 |iteria a|re added|
|00000bb0| 20 74 6f 20 74 68 65 20 | 66 69 6c 65 2e 2a 2f 0d | to the |file.*/.|
|00000bc0| 74 79 70 65 64 65 66 20 | 42 6f 6f 6c 65 61 6e 20 |typedef |Boolean |
|00000bd0| 28 2a 4d 65 72 67 65 46 | 69 6c 74 65 72 29 28 76 |(*MergeF|ilter)(v|
|00000be0| 6f 69 64 2a 20 72 65 63 | 6f 72 64 29 3b 0d 0d 2f |oid* rec|ord);../|
|00000bf0| 2a 20 46 69 6c 65 55 6e | 69 6f 6e 20 63 72 65 61 |* FileUn|ion crea|
|00000c00| 74 65 73 20 61 20 74 68 | 69 72 64 20 66 69 6c 65 |tes a th|ird file|
|00000c10| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 74 68 65 20 | contain|ing the |
|00000c20| 75 6e 69 6f 6e 20 6f 66 | 20 74 68 65 20 65 6c 65 |union of| the ele|
|00000c30| 6d 65 6e 74 73 20 63 6f | 6e 74 61 69 6e 65 64 0d |ments co|ntained.|
|00000c40| 09 69 6e 20 66 69 6c 65 | 61 20 61 6e 64 20 66 69 |.in file|a and fi|
|00000c50| 6c 65 62 2e 20 20 66 69 | 6c 65 61 20 61 6e 64 20 |leb. fi|lea and |
|00000c60| 66 69 6c 65 62 20 61 72 | 65 20 73 6f 72 74 65 64 |fileb ar|e sorted|
|00000c70| 20 66 69 6c 65 73 20 6f | 66 20 65 6c 65 6d 65 6e | files o|f elemen|
|00000c80| 74 73 20 6f 66 20 74 68 | 65 20 69 6e 64 69 63 61 |ts of th|e indica|
|00000c90| 74 65 64 0d 09 73 69 7a | 65 20 63 6f 6e 74 61 69 |ted..siz|e contai|
|00000ca0| 6e 69 6e 67 20 6e 6f 20 | 64 75 70 6c 69 63 61 74 |ning no |duplicat|
|00000cb0| 65 20 65 6c 65 6d 65 6e | 74 73 2e 20 20 74 68 65 |e elemen|ts. the|
|00000cc0| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 20 70 72 6f 63 | compari|son proc|
|00000cd0| 65 64 75 72 65 20 63 6f | 6d 70 61 72 20 69 73 0d |edure co|mpar is.|
|00000ce0| 09 75 73 65 64 20 66 6f | 72 20 63 6f 6d 70 61 72 |.used fo|r compar|
|00000cf0| 69 6e 67 20 65 6c 65 6d | 65 6e 74 73 2e 20 20 74 |ing elem|ents. t|
|00000d00| 68 65 20 72 65 73 75 6c | 74 69 6e 67 20 66 69 6c |he resul|ting fil|
|00000d10| 65 20 69 73 20 61 20 74 | 65 6d 70 6f 72 61 72 79 |e is a t|emporary|
|00000d20| 20 66 69 6c 65 20 61 6e | 64 0d 09 63 6f 6e 74 61 | file an|d..conta|
|00000d30| 69 6e 69 6e 67 20 61 20 | 73 6f 72 74 65 64 20 6c |ining a |sorted l|
|00000d40| 69 73 74 20 6f 66 20 61 | 6c 6c 20 65 6c 65 6d 65 |ist of a|ll eleme|
|00000d50| 6e 74 73 20 63 6f 6e 74 | 61 69 6e 65 64 20 69 6e |nts cont|ained in|
|00000d60| 20 66 69 6c 65 61 20 61 | 6e 64 20 66 69 6c 65 62 | filea a|nd fileb|
|00000d70| 2e 20 20 2a 2f 0d 4f 53 | 45 72 72 20 46 69 6c 65 |. */.OS|Err File|
|00000d80| 55 6e 69 6f 6e 28 73 68 | 6f 72 74 20 66 69 6c 65 |Union(sh|ort file|
|00000d90| 61 2c 20 73 68 6f 72 74 | 20 66 69 6c 65 62 2c 20 |a, short| fileb, |
|00000da0| 6c 6f 6e 67 20 73 69 7a | 65 2c 20 43 6f 6d 70 61 |long siz|e, Compa|
|00000db0| 72 69 73 6f 6e 50 72 6f | 63 20 63 6f 6d 70 61 72 |risonPro|c compar|
|00000dc0| 2c 20 4d 65 72 67 65 46 | 69 6c 74 65 72 20 66 69 |, MergeF|ilter fi|
|00000dd0| 6c 74 65 72 2c 20 73 68 | 6f 72 74 20 2a 6e 65 77 |lter, sh|ort *new|
|00000de0| 66 69 6c 65 29 3b 0d 0d | 2f 2a 20 46 69 6c 65 49 |file);..|/* FileI|
|00000df0| 6e 74 65 72 73 65 63 74 | 69 6f 6e 20 63 72 65 61 |ntersect|ion crea|
|00000e00| 74 65 73 20 61 20 74 68 | 69 72 64 20 66 69 6c 65 |tes a th|ird file|
|00000e10| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 74 68 65 20 | contain|ing the |
|00000e20| 69 6e 74 65 72 73 65 63 | 74 69 6f 6e 20 6f 66 20 |intersec|tion of |
|00000e30| 74 68 65 20 65 6c 65 6d | 65 6e 74 73 20 63 6f 6e |the elem|ents con|
|00000e40| 74 61 69 6e 65 64 0d 09 | 62 6f 74 68 20 69 6e 20 |tained..|both in |
|00000e50| 66 69 6c 65 61 20 61 6e | 64 20 66 69 6c 65 62 2e |filea an|d fileb.|
|00000e60| 20 20 66 69 6c 65 61 20 | 61 6e 64 20 66 69 6c 65 | filea |and file|
|00000e70| 62 20 61 72 65 20 73 6f | 72 74 65 64 20 66 69 6c |b are so|rted fil|
|00000e80| 65 73 20 6f 66 20 65 6c | 65 6d 65 6e 74 73 20 6f |es of el|ements o|
|00000e90| 66 20 74 68 65 20 69 6e | 64 69 63 61 74 65 64 0d |f the in|dicated.|
|00000ea0| 09 73 69 7a 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 |.size co|ntaining|
|00000eb0| 20 6e 6f 20 64 75 70 6c | 69 63 61 74 65 20 65 6c | no dupl|icate el|
|00000ec0| 65 6d 65 6e 74 73 2e 20 | 20 74 68 65 20 63 6f 6d |ements. | the com|
|00000ed0| 70 61 72 69 73 6f 6e 20 | 70 72 6f 63 65 64 75 72 |parison |procedur|
|00000ee0| 65 20 63 6f 6d 70 61 72 | 20 69 73 0d 09 75 73 65 |e compar| is..use|
|00000ef0| 64 20 66 6f 72 20 63 6f | 6d 70 61 72 69 6e 67 20 |d for co|mparing |
|00000f00| 65 6c 65 6d 65 6e 74 73 | 2e 20 20 74 68 65 20 72 |elements|. the r|
|00000f10| 65 73 75 6c 74 69 6e 67 | 20 66 69 6c 65 20 69 73 |esulting| file is|
|00000f20| 20 61 20 74 65 6d 70 6f | 72 61 72 79 20 66 69 6c | a tempo|rary fil|
|00000f30| 65 20 61 6e 64 0d 09 63 | 6f 6e 74 61 69 6e 69 6e |e and..c|ontainin|
|00000f40| 67 20 61 20 73 6f 72 74 | 65 64 20 6c 69 73 74 20 |g a sort|ed list |
|00000f50| 6f 66 20 65 6c 65 6d 65 | 6e 74 73 20 63 6f 6d 6d |of eleme|nts comm|
|00000f60| 6f 6e 20 74 6f 20 62 6f | 74 68 20 66 69 6c 65 61 |on to bo|th filea|
|00000f70| 20 61 6e 64 20 66 69 6c | 65 62 2e 20 20 2a 2f 0d | and fil|eb. */.|
|00000f80| 4f 53 45 72 72 20 46 69 | 6c 65 49 6e 74 65 72 73 |OSErr Fi|leInters|
|00000f90| 65 63 74 69 6f 6e 28 73 | 68 6f 72 74 20 66 69 6c |ection(s|hort fil|
|00000fa0| 65 61 2c 20 73 68 6f 72 | 74 20 66 69 6c 65 62 2c |ea, shor|t fileb,|
|00000fb0| 20 6c 6f 6e 67 20 73 69 | 7a 65 2c 20 43 6f 6d 70 | long si|ze, Comp|
|00000fc0| 61 72 69 73 6f 6e 50 72 | 6f 63 20 63 6f 6d 70 61 |arisonPr|oc compa|
|00000fd0| 72 2c 20 4d 65 72 67 65 | 46 69 6c 74 65 72 20 66 |r, Merge|Filter f|
|00000fe0| 69 6c 74 65 72 2c 20 73 | 68 6f 72 74 20 2a 6e 65 |ilter, s|hort *ne|
|00000ff0| 77 66 69 6c 65 29 3b 0d | 0d 23 65 6e 64 69 66 0d |wfile);.|.#endif.|
|00001000| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001010| 20 69 74 65 6d 4e 6f 29 | 3b 0d 0d 2f 2a 20 48 69 | itemNo)|;../* Hi|
|00001020| 6c 69 74 65 44 4c 42 75 | 74 74 6f 6e 20 68 69 6c |liteDLBu|tton hil|
|00001030| 09 53 74 64 46 69 6c 65 | 2e 68 02 00 00 00 54 45 |.StdFile|.h....TE|
|00001040| 58 54 4d 50 53 20 01 00 | ff ff ff ff 00 00 00 00 |XTMPS ..|........|
|00001050| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 1a ce ae e6 81 e8 00 00 | 0f 80 00 00 01 ac 6f 6e |........|......on|
|00001080| 28 44 69 61 6c 6f 67 50 | 74 72 20 64 69 61 6c 6f |(DialogP|tr dialo|
|00001090| 67 2c 20 73 68 6f 72 74 | 20 69 74 65 6d 4e 6f 29 |g, short| itemNo)|
|000010a0| 3b 0d 0d 2f 2a 20 55 6e | 68 69 6c 69 74 65 44 4c |;../* Un|hiliteDL|
|000010b0| 42 75 74 74 6f 6e 20 72 | 65 73 65 74 73 20 74 68 |Button r|esets th|
|000010c0| 65 20 64 69 61 6c 6f 67 | 20 62 75 74 74 6f 6e 20 |e dialog| button |
|000010d0| 69 74 65 6d 73 20 68 69 | 6c 69 74 65 20 73 74 61 |items hi|lite sta|
|000010e0| 74 65 20 74 6f 20 7a 65 | 72 6f 20 2a 2f 0d 76 6f |te to ze|ro */.vo|
|000010f0| 69 64 20 55 6e 68 69 6c | 69 74 65 44 4c 42 75 74 |id Unhil|iteDLBut|
|00001100| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 55 54 49 |...H..Ge|neva.UTI|
|00001110| 03 df ba 50 45 53 5f 5f | 0d 0d 23 69 6e 63 6c 75 |...PES__|..#inclu|
|00001120| 64 65 20 3c 54 79 00 03 | 00 08 00 4c 00 06 02 62 |de <Ty..|...L...b|
|00001130| 02 1c 00 4c 00 06 02 62 | 02 1c b0 5f 56 c4 00 00 |...L...b|..._V...|
|00001140| 02 95 00 00 02 95 00 00 | 00 2a 01 00 00 00 00 1e |........|.*......|
|00001150| 00 4c 00 06 02 62 02 1c | 00 4c 00 06 02 62 02 1c |.L...b..|.L...b..|
|00001160| 00 00 00 2a 00 00 00 00 | 00 00 00 00 00 00 00 00 |...*....|........|
|00001170| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 03 d6 |.....n..|.n...>..|
|00001180| 71 38 26 90 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |q8&.....|.>..MPSR|
|00001190| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 03 f0 ff ff 00 00 00 4c | 03 d7 ca d0 00 00 00 00 |.......L|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+