home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 20 / develop issue 20 code / scripting the finder.sea / Scripting the Finder / Zawphing / Exceptions.h < prev    next >
MacBinary  |  1994-10-11  |  4.5 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Oct 11 13:15:32 1994, modified Tue Oct 11 13:15:32 1994, creator 'MMCC', type ASCII, 3947 bytes "Exceptions.h" , at 0xfeb 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 45 78 63 65 70 74 | 69 6f 6e 73 2e 68 00 00 |..Except|ions.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 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 0f 6b 00 | 00 01 ac aa c0 78 b4 aa |......k.|.....x..|
|00000060| c0 78 b4 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.x......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 52 6d 00 00 |........|....Rm..|
|00000080| 2f 2a 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |/*======|========|
|00000090| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0d 09 |========|======..|
|000000c0| 45 78 63 65 70 74 69 6f | 6e 73 2e 68 0d 09 0d 09 |Exceptio|ns.h....|
|000000d0| 67 72 65 67 67 6f 72 40 | 61 70 70 6c 65 2e 63 6f |greggor@|apple.co|
|000000e0| 6d 0d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |m.======|========|
|000000f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000110| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 2a 2f |========|======*/|
|00000120| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 45 58 43 45 50 |.#ifndef| __EXCEP|
|00000130| 54 49 4f 4e 53 5f 5f 0d | 23 64 65 66 69 6e 65 20 |TIONS__.|#define |
|00000140| 5f 5f 45 58 43 45 50 54 | 49 4f 4e 53 5f 5f 0d 23 |__EXCEPT|IONS__.#|
|00000150| 64 65 66 69 6e 65 20 45 | 78 63 65 70 74 69 6f 6e |define E|xception|
|00000160| 73 5f 68 0d 0d 23 69 66 | 6e 64 65 66 20 5f 5f 52 |s_h..#if|ndef __R|
|00000170| 45 53 4f 55 52 43 45 53 | 5f 5f 0d 23 69 6e 63 6c |ESOURCES|__.#incl|
|00000180| 75 64 65 20 3c 52 65 73 | 6f 75 72 63 65 73 2e 68 |ude <Res|ources.h|
|00000190| 3e 0d 23 65 6e 64 69 66 | 0d 0d 23 69 66 6e 64 65 |>.#endif|..#ifnde|
|000001a0| 66 20 5f 5f 4d 45 4d 4f | 52 59 5f 5f 0d 23 69 6e |f __MEMO|RY__.#in|
|000001b0| 63 6c 75 64 65 20 3c 4d | 65 6d 6f 72 79 2e 68 3e |clude <M|emory.h>|
|000001c0| 0d 23 65 6e 64 69 66 0d | 0d 23 69 6e 63 6c 75 64 |.#endif.|.#includ|
|000001d0| 65 20 3c 73 65 74 6a 6d | 70 2e 68 3e 0d 0d 2f 2f |e <setjm|p.h>..//|
|000001e0| 0d 2f 2f 20 4f 75 72 20 | 65 72 72 6f 72 20 63 6f |.// Our |error co|
|000001f0| 64 65 73 0d 2f 2f 0d 63 | 6f 6e 73 74 20 4f 53 45 |des.//.c|onst OSE|
|00000200| 72 72 20 65 50 6f 69 6e | 74 65 72 4e 69 6c 09 09 |rr ePoin|terNil..|
|00000210| 09 09 3d 20 2d 31 31 30 | 3b 0d 63 6f 6e 73 74 20 |..= -110|;.const |
|00000220| 4f 53 45 72 72 20 65 47 | 65 6e 65 72 61 6c 45 72 |OSErr eG|eneralEr|
|00000230| 72 09 09 09 09 3d 20 2d | 31 3b 0d 63 6f 6e 73 74 |r....= -|1;.const|
|00000240| 20 4f 53 45 72 72 20 65 | 41 73 73 65 72 74 69 6f | OSErr e|Assertio|
|00000250| 6e 46 61 69 6c 75 72 65 | 09 09 3d 20 2d 33 30 30 |nFailure|..= -300|
|00000260| 30 30 3b 0d 63 6f 6e 73 | 74 20 4f 53 45 72 72 20 |00;.cons|t OSErr |
|00000270| 65 52 65 71 75 69 72 65 | 6d 65 6e 74 4e 6f 74 4d |eRequire|mentNotM|
|00000280| 65 74 09 09 3d 20 2d 33 | 30 30 30 31 3b 0d 63 6f |et..= -3|0001;.co|
|00000290| 6e 73 74 20 4f 53 45 72 | 72 20 65 56 61 6c 75 65 |nst OSEr|r eValue|
|000002a0| 4f 75 74 4f 66 52 61 6e | 67 65 09 09 3d 20 2d 33 |OutOfRan|ge..= -3|
|000002b0| 30 30 30 32 3b 0d 63 6f | 6e 73 74 20 4f 53 45 72 |0002;.co|nst OSEr|
|000002c0| 72 20 65 49 6e 64 65 78 | 4f 75 74 4f 66 52 61 6e |r eIndex|OutOfRan|
|000002d0| 67 65 09 09 3d 20 2d 33 | 30 30 30 33 3b 0d 63 6f |ge..= -3|0003;.co|
|000002e0| 6e 73 74 20 4f 53 45 72 | 72 20 65 4c 69 6e 6b 73 |nst OSEr|r eLinks|
|000002f0| 43 6f 72 72 75 70 74 09 | 09 09 3d 20 2d 33 30 30 |Corrupt.|..= -300|
|00000300| 30 34 3b 0d 63 6f 6e 73 | 74 20 4f 53 45 72 72 20 |04;.cons|t OSErr |
|00000310| 65 44 61 74 61 43 6f 72 | 72 75 70 74 09 09 09 3d |eDataCor|rupt...=|
|00000320| 20 2d 33 30 30 30 35 3b | 0d 63 6f 6e 73 74 20 4f | -30005;|.const O|
|00000330| 53 45 72 72 20 65 57 72 | 6f 6e 67 44 61 74 61 54 |SErr eWr|ongDataT|
|00000340| 79 70 65 09 09 09 3d 20 | 2d 33 30 30 30 36 3b 0d |ype...= |-30006;.|
|00000350| 0d 2f 2f 0d 2f 2f 20 43 | 6f 6e 73 74 61 6e 74 73 |.//.// C|onstants|
|00000360| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 66 61 69 | used by| the fai|
|00000370| 6c 75 72 65 20 63 6c 61 | 73 73 0d 2f 2f 0d 63 6f |lure cla|ss.//.co|
|00000380| 6e 73 74 20 6c 6f 6e 67 | 20 6b 4d 61 67 69 63 46 |nst long| kMagicF|
|00000390| 61 69 6c 49 44 09 09 09 | 09 3d 20 27 66 61 69 6c |ailID...|.= 'fail|
|000003a0| 27 3b 0d 0d 63 6f 6e 73 | 74 20 6c 6f 6e 67 20 6b |';..cons|t long k|
|000003b0| 54 72 79 46 72 61 6d 65 | 4f 6e 46 61 69 6c 75 72 |TryFrame|OnFailur|
|000003c0| 65 53 74 61 63 6b 09 3d | 20 30 78 30 30 30 31 3b |eStack.=| 0x0001;|
|000003d0| 0d 63 6f 6e 73 74 20 6c | 6f 6e 67 20 6b 45 78 63 |.const l|ong kExc|
|000003e0| 65 70 74 69 6f 6e 54 68 | 72 6f 77 6e 09 09 09 3d |eptionTh|rown...=|
|000003f0| 20 30 78 30 30 30 32 3b | 0d 63 6f 6e 73 74 20 6c | 0x0002;|.const l|
|00000400| 6f 6e 67 20 6b 54 72 79 | 49 6e 50 72 6f 67 72 65 |ong kTry|InProgre|
|00000410| 73 73 09 09 09 3d 20 30 | 78 30 30 30 34 3b 0d 63 |ss...= 0|x0004;.c|
|00000420| 6f 6e 73 74 20 6c 6f 6e | 67 20 6b 54 72 79 53 75 |onst lon|g kTrySu|
|00000430| 63 63 65 65 64 65 64 09 | 09 09 3d 20 30 78 30 30 |cceeded.|..= 0x00|
|00000440| 30 38 3b 0d 63 6f 6e 73 | 74 20 6c 6f 6e 67 20 6b |08;.cons|t long k|
|00000450| 52 65 73 69 67 6e 61 6c | 69 6e 67 46 61 69 6c 75 |Resignal|ingFailu|
|00000460| 72 65 09 09 3d 20 30 78 | 30 30 31 30 3b 0d 63 6f |re..= 0x|0010;.co|
|00000470| 6e 73 74 20 6c 6f 6e 67 | 20 6b 54 72 79 42 6c 6f |nst long| kTryBlo|
|00000480| 63 6b 48 61 73 42 65 65 | 6e 53 65 74 75 70 09 3d |ckHasBee|nSetup.=|
|00000490| 20 30 78 30 31 30 30 3b | 0d 0d 2f 2f 0d 2f 2f 20 | 0x0100;|..//.// |
|000004a0| 46 61 69 6c 75 72 65 20 | 63 6c 61 73 73 0d 2f 2f |Failure |class.//|
|000004b0| 0d 63 6c 61 73 73 20 54 | 45 78 63 65 70 74 69 6f |.class T|Exceptio|
|000004c0| 6e 0d 7b 0d 70 75 62 6c | 69 63 3a 0d 09 54 45 78 |n.{.publ|ic:..TEx|
|000004d0| 63 65 70 74 69 6f 6e 2a | 09 09 09 09 66 4e 65 78 |ception*|....fNex|
|000004e0| 74 3b 0d 09 4f 53 45 72 | 72 09 09 09 09 09 66 45 |t;..OSEr|r.....fE|
|000004f0| 72 72 6f 72 3b 0d 09 6c | 6f 6e 67 09 09 09 09 09 |rror;..l|ong.....|
|00000500| 66 46 6c 61 67 73 3b 0d | 09 6a 6d 70 5f 62 75 66 |fFlags;.|.jmp_buf|
|00000510| 09 09 09 09 09 66 45 6e | 76 3b 0d 09 6c 6f 6e 67 |.....fEn|v;..long|
|00000520| 09 09 09 09 09 66 4d 61 | 67 69 63 46 61 69 6c 49 |.....fMa|gicFailI|
|00000530| 44 3b 0d 0d 09 09 09 09 | 09 09 09 54 45 78 63 65 |D;......|...TExce|
|00000540| 70 74 69 6f 6e 28 29 20 | 3a 20 66 4e 65 78 74 28 |ption() |: fNext(|
|00000550| 6e 69 6c 29 2c 20 66 45 | 72 72 6f 72 28 6e 6f 45 |nil), fE|rror(noE|
|00000560| 72 72 29 2c 20 66 46 6c | 61 67 73 28 30 29 2c 20 |rr), fFl|ags(0), |
|00000570| 66 4d 61 67 69 63 46 61 | 69 6c 49 44 28 6b 4d 61 |fMagicFa|ilID(kMa|
|00000580| 67 69 63 46 61 69 6c 49 | 44 29 20 7b 7d 3b 0d 09 |gicFailI|D) {};..|
|00000590| 42 6f 6f 6c 65 61 6e 09 | 09 09 09 09 53 65 74 75 |Boolean.|....Setu|
|000005a0| 70 28 29 3b 0d 09 76 6f | 69 64 09 09 09 09 09 54 |p();..vo|id.....T|
|000005b0| 65 61 72 44 6f 77 6e 28 | 29 3b 0d 09 42 6f 6f 6c |earDown(|);..Bool|
|000005c0| 65 61 6e 09 09 09 09 09 | 42 65 67 69 6e 54 72 79 |ean.....|BeginTry|
|000005d0| 28 29 3b 0d 09 4f 53 45 | 72 72 09 09 09 09 09 45 |();..OSE|rr.....E|
|000005e0| 78 63 65 70 74 69 6f 6e | 45 72 72 6f 72 28 29 09 |xception|Error().|
|000005f0| 09 7b 20 72 65 74 75 72 | 6e 20 66 45 72 72 6f 72 |.{ retur|n fError|
|00000600| 3b 20 7d 3b 0d 7d 3b 0d | 0d 2f 2f 0d 2f 2f 20 20 |; };.};.|.//.// |
|00000610| 74 72 79 20 2f 20 63 61 | 74 63 68 20 6d 61 63 72 |try / ca|tch macr|
|00000620| 6f 73 0d 2f 2f 0d 2f 2f | 09 46 6f 72 6d 65 72 6c |os.//.//|.Formerl|
|00000630| 79 2c 20 49 20 75 73 65 | 64 20 74 68 65 20 72 65 |y, I use|d the re|
|00000640| 73 75 6c 74 20 6f 66 20 | 73 65 74 6a 6d 70 20 74 |sult of |setjmp t|
|00000650| 6f 20 73 65 74 20 73 74 | 61 74 75 73 20 62 69 74 |o set st|atus bit|
|00000660| 73 3b 0d 2f 2f 09 68 6f | 77 65 76 65 72 2c 20 74 |s;.//.ho|wever, t|
|00000670| 68 61 74 27 73 20 6e 6f | 74 20 77 6f 72 6b 69 6e |hat's no|t workin|
|00000680| 67 20 69 6e 20 4d 65 74 | 72 6f 57 65 72 6b 73 2e |g in Met|roWerks.|
|00000690| 20 20 4d 79 20 67 75 65 | 73 73 20 69 73 20 74 68 | My gue|ss is th|
|000006a0| 61 74 0d 2f 2f 09 74 68 | 65 72 65 20 69 73 20 73 |at.//.th|ere is s|
|000006b0| 6f 6d 65 20 63 6f 6e 66 | 75 73 69 6f 6e 20 6f 76 |ome conf|usion ov|
|000006c0| 65 72 20 73 69 7a 65 6f | 66 28 69 6e 74 29 2c 20 |er sizeo|f(int), |
|000006d0| 62 75 74 20 49 27 6d 20 | 6e 6f 74 20 73 75 72 65 |but I'm |not sure|
|000006e0| 2e 0d 2f 2f 09 54 68 65 | 72 65 66 6f 72 65 2c 20 |..//.The|refore, |
|000006f0| 49 27 6d 20 6a 75 73 74 | 20 67 6f 69 6e 67 20 74 |I'm just| going t|
|00000700| 6f 20 61 73 73 75 6d 65 | 20 74 68 61 74 20 74 68 |o assume| that th|
|00000710| 65 20 73 65 63 6f 6e 64 | 20 74 69 6d 65 0d 2f 2f |e second| time.//|
|00000720| 09 66 69 2e 53 65 74 75 | 70 20 65 78 65 63 75 74 |.fi.Setu|p execut|
|00000730| 65 73 2c 20 77 65 27 72 | 65 20 66 61 69 6c 69 6e |es, we'r|e failin|
|00000740| 67 2e 0d 2f 2f 0d 23 64 | 65 66 69 6e 65 20 54 72 |g..//.#d|efine Tr|
|00000750| 79 09 09 09 54 45 78 63 | 65 70 74 69 6f 6e 20 66 |y...TExc|eption f|
|00000760| 69 3b 20 73 65 74 6a 6d | 70 28 66 69 2e 66 45 6e |i; setjm|p(fi.fEn|
|00000770| 76 29 3b 20 69 66 28 66 | 69 2e 53 65 74 75 70 28 |v); if(f|i.Setup(|
|00000780| 29 29 20 77 68 69 6c 65 | 28 66 69 2e 42 65 67 69 |)) while|(fi.Begi|
|00000790| 6e 54 72 79 28 29 29 0d | 23 64 65 66 69 6e 65 20 |nTry()).|#define |
|000007a0| 43 61 74 63 68 28 65 72 | 72 29 09 65 6c 73 65 20 |Catch(er|r).else |
|000007b0| 69 66 28 28 65 72 72 20 | 3d 20 66 69 2e 45 78 63 |if((err |= fi.Exc|
|000007c0| 65 70 74 69 6f 6e 45 72 | 72 6f 72 28 29 29 20 21 |eptionEr|ror()) !|
|000007d0| 3d 20 6e 6f 45 72 72 29 | 0d 0d 74 79 70 65 64 65 |= noErr)|..typede|
|000007e0| 66 20 76 6f 69 64 20 28 | 2a 4e 6f 74 69 66 79 46 |f void (|*NotifyF|
|000007f0| 61 69 6c 75 72 65 50 72 | 6f 63 29 28 4f 53 45 72 |ailurePr|oc)(OSEr|
|00000800| 72 20 65 72 72 29 3b 0d | 0d 2f 2f 0d 2f 2f 20 47 |r err);.|.//.// G|
|00000810| 6c 6f 62 61 6c 73 3a 0d | 2f 2f 0d 65 78 74 65 72 |lobals:.|//.exter|
|00000820| 6e 20 54 45 78 63 65 70 | 74 69 6f 6e 2a 09 09 09 |n TExcep|tion*...|
|00000830| 67 45 78 63 65 70 74 69 | 6f 6e 53 74 61 63 6b 3b |gExcepti|onStack;|
|00000840| 0d 0d 2f 2f 0d 2f 2f 20 | 50 72 6f 74 6f 74 79 70 |..//.// |Prototyp|
|00000850| 65 73 0d 2f 2f 0d 76 6f | 69 64 09 09 09 09 09 09 |es.//.vo|id......|
|00000860| 54 68 72 6f 77 28 4f 53 | 45 72 72 20 74 68 65 45 |Throw(OS|Err theE|
|00000870| 72 72 29 3b 0d 0d 76 6f | 69 64 09 09 09 09 09 09 |rr);..vo|id......|
|00000880| 53 65 74 45 78 63 65 70 | 74 69 6f 6e 4e 6f 74 69 |SetExcep|tionNoti|
|00000890| 66 79 50 72 6f 63 28 4e | 6f 74 69 66 79 46 61 69 |fyProc(N|otifyFai|
|000008a0| 6c 75 72 65 50 72 6f 63 | 20 6e 6f 74 69 66 79 50 |lureProc| notifyP|
|000008b0| 72 6f 63 29 3b 0d 42 6f | 6f 6c 65 61 6e 09 09 09 |roc);.Bo|olean...|
|000008c0| 09 09 09 45 78 63 65 70 | 74 69 6f 6e 4e 6f 74 69 |...Excep|tionNoti|
|000008d0| 66 79 50 72 6f 63 49 6e | 73 74 61 6c 6c 65 64 28 |fyProcIn|stalled(|
|000008e0| 76 6f 69 64 29 3b 0d 76 | 6f 69 64 09 09 09 09 09 |void);.v|oid.....|
|000008f0| 09 4e 6f 74 69 66 79 46 | 61 69 6c 75 72 65 28 4f |.NotifyF|ailure(O|
|00000900| 53 45 72 72 20 65 72 72 | 29 3b 0d 0d 76 6f 69 64 |SErr err|);..void|
|00000910| 09 09 09 09 09 09 4d 61 | 6b 65 56 61 72 69 61 62 |......Ma|keVariab|
|00000920| 6c 65 4e 6f 52 65 67 69 | 73 74 65 72 28 20 76 6f |leNoRegi|ster( vo|
|00000930| 69 64 2a 20 66 6f 6f 20 | 29 3b 0d 0d 2f 2f 0d 2f |id* foo |);..//./|
|00000940| 2f 20 59 6f 75 20 72 65 | 61 6c 6c 79 20 73 68 6f |/ You re|ally sho|
|00000950| 75 6c 64 6e 27 74 20 75 | 73 65 20 74 68 69 73 2e |uldn't u|se this.|
|00000960| 2e 2e 20 20 66 61 72 20 | 62 65 74 74 65 72 20 74 |.. far |better t|
|00000970| 6f 20 73 61 79 3a 0d 2f | 2f 0d 2f 2f 09 09 43 61 |o say:./|/.//..Ca|
|00000980| 74 63 68 28 65 72 72 29 | 0d 2f 2f 09 09 7b 0d 2f |tch(err)|.//..{./|
|00000990| 2f 09 09 09 54 68 72 6f | 77 28 65 72 72 29 3b 0d |/...Thro|w(err);.|
|000009a0| 2f 2f 09 09 7d 0d 2f 2f | 0d 23 64 65 66 69 6e 65 |//..}.//|.#define|
|000009b0| 20 52 65 73 69 67 6e 61 | 6c 46 61 69 6c 75 72 65 | Resigna|lFailure|
|000009c0| 28 29 09 09 09 54 68 72 | 6f 77 28 66 69 2e 45 78 |()...Thr|ow(fi.Ex|
|000009d0| 63 65 70 74 69 6f 6e 45 | 72 72 6f 72 28 29 29 3b |ceptionE|rror());|
|000009e0| 0d 0d 2f 2f 0d 2f 2f 20 | 54 68 69 73 20 6d 61 63 |..//.// |This mac|
|000009f0| 72 6f 20 72 65 66 65 72 | 65 6e 63 65 73 20 74 68 |ro refer|ences th|
|00000a00| 65 20 61 64 64 72 65 73 | 73 20 6f 66 20 74 68 65 |e addres|s of the|
|00000a10| 20 73 70 65 63 69 66 69 | 65 64 20 6c 6f 63 61 6c | specifi|ed local|
|00000a20| 0d 2f 2f 20 76 61 72 69 | 61 62 6c 65 3b 20 74 68 |.// vari|able; th|
|00000a30| 69 73 20 77 69 6c 6c 20 | 70 72 65 76 65 6e 74 20 |is will |prevent |
|00000a40| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 20 66 72 6f |the comp|iler fro|
|00000a50| 6d 20 75 73 69 6e 67 20 | 74 68 65 0d 2f 2f 20 76 |m using |the.// v|
|00000a60| 61 72 69 61 62 6c 65 20 | 61 73 20 61 20 72 65 67 |ariable |as a reg|
|00000a70| 69 73 74 65 72 20 76 61 | 72 69 61 62 6c 65 2e 0d |ister va|riable..|
|00000a80| 2f 2f 0d 23 64 65 66 69 | 6e 65 20 4e 4f 52 45 47 |//.#defi|ne NOREG|
|00000a90| 49 53 54 45 52 28 78 29 | 09 09 28 20 4d 61 6b 65 |ISTER(x)|..( Make|
|00000aa0| 56 61 72 69 61 62 6c 65 | 4e 6f 52 65 67 69 73 74 |Variable|NoRegist|
|00000ab0| 65 72 28 20 28 76 6f 69 | 64 2a 29 28 26 28 78 29 |er( (voi|d*)(&(x)|
|00000ac0| 29 20 29 20 29 0d 0d 2f | 2f 0d 2f 2f 09 43 6f 6e |) ) )../|/.//.Con|
|00000ad0| 76 65 6e 69 65 6e 63 65 | 20 66 75 6e 63 74 69 6f |venience| functio|
|00000ae0| 6e 73 0d 2f 2f 0d 69 6e | 6c 69 6e 65 20 76 6f 69 |ns.//.in|line voi|
|00000af0| 64 20 46 61 69 6c 28 29 | 09 09 09 09 09 09 09 7b |d Fail()|.......{|
|00000b00| 20 54 68 72 6f 77 28 65 | 47 65 6e 65 72 61 6c 45 | Throw(e|GeneralE|
|00000b10| 72 72 29 3b 20 7d 0d 69 | 6e 6c 69 6e 65 20 76 6f |rr); }.i|nline vo|
|00000b20| 69 64 20 46 61 69 6c 45 | 72 72 28 4f 53 45 72 72 |id FailE|rr(OSErr|
|00000b30| 20 74 68 65 45 72 72 29 | 09 09 09 7b 20 69 66 28 | theErr)|...{ if(|
|00000b40| 74 68 65 45 72 72 20 21 | 3d 20 6e 6f 45 72 72 29 |theErr !|= noErr)|
|00000b50| 20 54 68 72 6f 77 28 74 | 68 65 45 72 72 29 3b 20 | Throw(t|heErr); |
|00000b60| 7d 0d 69 6e 6c 69 6e 65 | 20 76 6f 69 64 20 46 61 |}.inline| void Fa|
|00000b70| 69 6c 52 65 73 45 72 72 | 6f 72 28 29 09 09 09 09 |ilResErr|or()....|
|00000b80| 09 7b 20 46 61 69 6c 45 | 72 72 28 52 65 73 45 72 |.{ FailE|rr(ResEr|
|00000b90| 72 6f 72 28 29 29 3b 20 | 7d 0d 69 6e 6c 69 6e 65 |ror()); |}.inline|
|00000ba0| 20 76 6f 69 64 20 46 61 | 69 6c 4d 65 6d 45 72 72 | void Fa|ilMemErr|
|00000bb0| 6f 72 28 29 09 09 09 09 | 09 7b 20 46 61 69 6c 45 |or()....|.{ FailE|
|00000bc0| 72 72 28 4d 65 6d 45 72 | 72 6f 72 28 29 29 3b 20 |rr(MemEr|ror()); |
|00000bd0| 7d 0d 69 6e 6c 69 6e 65 | 20 76 6f 69 64 20 46 61 |}.inline| void Fa|
|00000be0| 69 6c 4e 69 6c 28 76 6f | 69 64 2a 20 70 74 72 29 |ilNil(vo|id* ptr)|
|00000bf0| 09 09 09 09 7b 20 69 66 | 28 70 74 72 20 3d 3d 20 |....{ if|(ptr == |
|00000c00| 6e 69 6c 29 20 54 68 72 | 6f 77 28 65 50 6f 69 6e |nil) Thr|ow(ePoin|
|00000c10| 74 65 72 4e 69 6c 29 3b | 20 7d 0d 69 6e 6c 69 6e |terNil);| }.inlin|
|00000c20| 65 20 76 6f 69 64 20 46 | 61 69 6c 52 65 73 45 72 |e void F|ailResEr|
|00000c30| 72 6f 72 4f 72 4e 69 6c | 28 76 6f 69 64 2a 20 70 |rorOrNil|(void* p|
|00000c40| 74 72 29 09 7b 20 46 61 | 69 6c 52 65 73 45 72 72 |tr).{ Fa|ilResErr|
|00000c50| 6f 72 28 29 3b 20 46 61 | 69 6c 4e 69 6c 28 70 74 |or(); Fa|ilNil(pt|
|00000c60| 72 29 3b 20 7d 0d 69 6e | 6c 69 6e 65 20 76 6f 69 |r); }.in|line voi|
|00000c70| 64 20 46 61 69 6c 4d 65 | 6d 45 72 72 6f 72 4f 72 |d FailMe|mErrorOr|
|00000c80| 4e 69 6c 28 76 6f 69 64 | 2a 20 70 74 72 29 09 7b |Nil(void|* ptr).{|
|00000c90| 20 46 61 69 6c 4d 65 6d | 45 72 72 6f 72 28 29 3b | FailMem|Error();|
|00000ca0| 20 46 61 69 6c 4e 69 6c | 28 70 74 72 29 3b 20 7d | FailNil|(ptr); }|
|00000cb0| 0d 0d 2f 2f 0d 2f 2f 20 | 52 65 71 75 69 72 65 6d |..//.// |Requirem|
|00000cc0| 65 6e 74 73 0d 2f 2f 0d | 69 6e 6c 69 6e 65 20 76 |ents.//.|inline v|
|00000cd0| 6f 69 64 20 52 65 71 75 | 69 72 65 28 42 6f 6f 6c |oid Requ|ire(Bool|
|00000ce0| 65 61 6e 20 74 72 75 74 | 68 29 09 09 09 7b 20 69 |ean trut|h)...{ i|
|00000cf0| 66 28 20 21 28 74 72 75 | 74 68 29 20 29 20 54 68 |f( !(tru|th) ) Th|
|00000d00| 72 6f 77 28 65 52 65 71 | 75 69 72 65 6d 65 6e 74 |row(eReq|uirement|
|00000d10| 4e 6f 74 4d 65 74 29 3b | 20 7d 0d 69 6e 6c 69 6e |NotMet);| }.inlin|
|00000d20| 65 20 76 6f 69 64 20 52 | 65 71 75 69 72 65 50 74 |e void R|equirePt|
|00000d30| 72 56 61 6c 69 64 28 76 | 6f 69 64 2a 20 70 29 09 |rValid(v|oid* p).|
|00000d40| 09 7b 20 69 66 28 20 28 | 70 20 3d 3d 20 6e 69 6c |.{ if( (|p == nil|
|00000d50| 29 20 7c 7c 20 28 28 28 | 6c 6f 6e 67 29 28 70 29 |) || (((|long)(p)|
|00000d60| 20 26 20 31 29 20 21 3d | 20 30 29 20 29 20 54 68 | & 1) !=| 0) ) Th|
|00000d70| 72 6f 77 28 65 52 65 71 | 75 69 72 65 6d 65 6e 74 |row(eReq|uirement|
|00000d80| 4e 6f 74 4d 65 74 29 3b | 20 7d 0d 69 6e 6c 69 6e |NotMet);| }.inlin|
|00000d90| 65 20 76 6f 69 64 20 52 | 65 71 75 69 72 65 48 61 |e void R|equireHa|
|00000da0| 6e 64 6c 65 56 61 6c 69 | 64 28 48 61 6e 64 6c 65 |ndleVali|d(Handle|
|00000db0| 20 68 29 09 7b 20 52 65 | 71 75 69 72 65 50 74 72 | h).{ Re|quirePtr|
|00000dc0| 56 61 6c 69 64 28 28 76 | 6f 69 64 2a 29 28 68 29 |Valid((v|oid*)(h)|
|00000dd0| 29 3b 20 52 65 71 75 69 | 72 65 50 74 72 56 61 6c |); Requi|rePtrVal|
|00000de0| 69 64 28 28 76 6f 69 64 | 2a 29 28 2a 68 29 29 3b |id((void|*)(*h));|
|00000df0| 20 7d 0d 0d 2f 2f 0d 2f | 2f 20 52 65 71 75 69 72 | }..//./|/ Requir|
|00000e00| 65 6d 65 6e 74 73 20 6d | 75 73 74 20 61 6c 77 61 |ements m|ust alwa|
|00000e10| 79 73 20 62 65 20 6d 65 | 74 2c 20 62 75 74 20 41 |ys be me|t, but A|
|00000e20| 73 73 65 72 74 69 6f 6e | 73 20 63 61 6e 20 62 65 |ssertion|s can be|
|00000e30| 20 72 65 6d 6f 76 65 64 | 20 69 6e 20 6e 6f 6e 2d | removed| in non-|
|00000e40| 64 65 62 75 67 20 62 75 | 69 6c 64 73 0d 2f 2f 20 |debug bu|ilds.// |
|00000e50| 61 73 20 74 68 65 79 20 | 61 72 65 20 73 74 61 74 |as they |are stat|
|00000e60| 65 6d 65 6e 74 73 20 74 | 68 61 74 20 61 72 65 20 |ements t|hat are |
|00000e70| 41 53 53 55 4d 45 44 20 | 74 6f 20 61 6c 77 61 79 |ASSUMED |to alway|
|00000e80| 73 20 62 65 20 74 72 75 | 65 0d 2f 2f 0d 69 6e 6c |s be tru|e.//.inl|
|00000e90| 69 6e 65 20 76 6f 69 64 | 20 41 73 73 65 72 74 28 |ine void| Assert(|
|00000ea0| 42 6f 6f 6c 65 61 6e 20 | 74 72 75 74 68 29 09 09 |Boolean |truth)..|
|00000eb0| 09 7b 20 69 66 28 20 21 | 28 74 72 75 74 68 29 20 |.{ if( !|(truth) |
|00000ec0| 29 20 54 68 72 6f 77 28 | 65 41 73 73 65 72 74 69 |) Throw(|eAsserti|
|00000ed0| 6f 6e 46 61 69 6c 75 72 | 65 29 3b 20 7d 0d 69 6e |onFailur|e); }.in|
|00000ee0| 6c 69 6e 65 20 76 6f 69 | 64 20 41 73 73 65 72 74 |line voi|d Assert|
|00000ef0| 50 74 72 56 61 6c 69 64 | 28 76 6f 69 64 2a 20 70 |PtrValid|(void* p|
|00000f00| 29 09 09 09 7b 20 69 66 | 28 20 28 70 20 3d 3d 20 |)...{ if|( (p == |
|00000f10| 6e 69 6c 29 20 7c 7c 20 | 28 28 28 6c 6f 6e 67 29 |nil) || |(((long)|
|00000f20| 28 70 29 20 26 20 31 29 | 20 21 3d 20 30 29 20 29 |(p) & 1)| != 0) )|
|00000f30| 20 54 68 72 6f 77 28 65 | 41 73 73 65 72 74 69 6f | Throw(e|Assertio|
|00000f40| 6e 46 61 69 6c 75 72 65 | 29 3b 20 7d 0d 69 6e 6c |nFailure|); }.inl|
|00000f50| 69 6e 65 20 76 6f 69 64 | 20 41 73 73 65 72 74 48 |ine void| AssertH|
|00000f60| 61 6e 64 6c 65 56 61 6c | 69 64 28 76 6f 69 64 2a |andleVal|id(void*|
|00000f70| 2a 20 68 29 09 09 7b 20 | 41 73 73 65 72 74 50 74 |* h)..{ |AssertPt|
|00000f80| 72 56 61 6c 69 64 28 28 | 76 6f 69 64 2a 29 68 29 |rValid((|void*)h)|
|00000f90| 3b 20 41 73 73 65 72 74 | 50 74 72 56 61 6c 69 64 |; Assert|PtrValid|
|00000fa0| 28 2a 68 29 3b 20 7d 0d | 0d 23 64 65 66 69 6e 65 |(*h); }.|.#define|
|00000fb0| 20 41 53 53 45 52 54 28 | 78 29 20 41 73 73 65 72 | ASSERT(|x) Asser|
|00000fc0| 74 28 78 29 0d 23 64 65 | 66 69 6e 65 20 52 45 51 |t(x).#de|fine REQ|
|00000fd0| 55 49 52 45 28 78 29 20 | 52 65 71 75 69 72 65 28 |UIRE(x) |Require(|
|00000fe0| 78 29 0d 0d 23 65 6e 64 | 69 66 0d 00 00 00 00 00 |x)..#end|if......|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001010| 20 64 65 6c 65 74 65 20 | 74 68 65 20 73 65 6c 65 | delete |the sele|
|00001020| 63 74 65 64 20 69 74 65 | 6d 28 73 29 3f 00 00 00 |cted ite|m(s)?...|
|00001030| 0c 45 78 63 65 70 74 69 | 6f 6e 73 2e 68 ac 02 00 |.Excepti|ons.h...|
|00001040| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 d0 01 80 |..TEXTMM|CC......|
|00001050| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 d0 01 80 |..TEXTMM|CC......|
|00001060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001070| 00 00 a7 ba eb 62 00 00 | 0f 6b 00 00 01 ac 00 02 |.....b..|.k......|
|00001080| 01 00 01 e5 80 00 00 00 | 00 00 01 08 00 19 01 1c |........|........|
|00001090| 00 55 04 05 43 6c 65 61 | 72 00 00 00 00 64 00 04 |.U..Clea|r....d..|
|000010a0| 00 00 00 00 00 ed 00 0a | 01 01 00 46 04 02 4f 4b |........|...F..OK|
|000010b0| 00 00 00 00 00 ec 00 82 | 01 00 00 be 04 06 43 61 |........|......Ca|
|000010c0| 6e 63 65 6c 00 00 00 00 | 00 20 00 0a 00 e0 00 be |ncel....|. ......|
|000010d0| 00 00 00 00 00 00 00 04 | 00 0a 00 14 00 be 88 13 |........|........|
|000010e0| 53 65 6c 65 63 74 20 66 | 6f 72 6d 20 74 6f 20 75 |Select f|orm to u|
|000010f0| 73 65 3a 00 00 00 00 00 | 00 ed 00 0a 01 01 00 46 |se:.....|.......F|
|00001100| 00 00 00 1e 00 2b 00 04 | 01 8a 02 6e 00 2b 00 04 |.....+..|...n.+..|
|00001110| 01 8a 02 6e 00 00 04 a2 | 00 00 00 00 00 00 00 00 |...n....|........|
|00001120| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 6b 00 09 |........|.....k..|
|00001150| 01 dc 02 7c 00 6b 00 09 | 01 dc 02 7c aa ab 78 84 |...|.k..|...|..x.|
|00001160| 00 00 01 98 00 00 01 98 | 00 00 00 4f 01 00 00 00 |........|...O....|
|00001170| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 f9 |.....n..|.n...>..|
|00001180| c5 e8 10 88 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |........|.>..MPSR|
|00001190| 00 01 00 0a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 00 00 00 00 |......."|........|
|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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+