home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-08-05 | 6.4 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: AtExitToShell.c
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, Mon Aug 5 02:16:00 1996, modified Mon Aug 5 02:16:00 1996, creator 'CWIE', type ASCII, 5809 bytes "AtExitToShell.c" , at 0x1731 456 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 41 74 45 78 69 74 | 54 6f 53 68 65 6c 6c 2e |..AtExit|ToShell.|
|00000010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |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 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 16 b1 00 | 00 01 c8 ae 2b 42 20 ae |........|....+B .|
|00000060| 2b 42 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |+B .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 69 91 00 00 |........|....i...|
|00000080| 2f 2a 0d 41 74 45 78 69 | 74 54 6f 53 68 65 6c 6c |/*.AtExi|tToShell|
|00000090| 2e 63 0d 0d 09 76 6f 69 | 64 20 59 6f 75 72 46 75 |.c...voi|d YourFu|
|000000a0| 6e 63 74 69 6f 6e 28 76 | 6f 69 64 29 3b 0d 0d 09 |nction(v|oid);...|
|000000b0| 65 72 72 6f 72 3d 41 74 | 45 78 69 74 54 6f 53 68 |error=At|ExitToSh|
|000000c0| 65 6c 6c 28 59 6f 75 72 | 46 75 6e 63 74 69 6f 6e |ell(Your|Function|
|000000d0| 29 3b 0d 0d 41 74 45 78 | 69 74 54 6f 53 68 65 6c |);..AtEx|itToShel|
|000000e0| 6c 28 59 6f 75 72 46 75 | 6e 63 74 69 6f 6e 29 20 |l(YourFu|nction) |
|000000f0| 72 65 71 75 65 73 74 73 | 20 74 68 61 74 20 79 6f |requests| that yo|
|00000100| 75 72 20 66 75 6e 63 74 | 69 6f 6e 20 62 65 20 63 |ur funct|ion be c|
|00000110| 61 6c 6c 65 64 20 77 68 | 65 6e 20 74 68 65 0d 61 |alled wh|en the.a|
|00000120| 70 70 6c 69 63 61 74 69 | 6f 6e 20 71 75 69 74 73 |pplicati|on quits|
|00000130| 2c 20 69 2e 65 2e 20 63 | 61 6c 6c 73 20 74 68 65 |, i.e. c|alls the|
|00000140| 20 45 78 69 74 54 6f 53 | 68 65 6c 6c 20 74 72 61 | ExitToS|hell tra|
|00000150| 70 2c 20 77 68 69 63 68 | 20 74 65 6c 6c 73 20 74 |p, which| tells t|
|00000160| 68 65 20 4d 61 63 4f 53 | 20 74 68 61 74 0d 69 74 |he MacOS| that.it|
|00000170| 27 73 20 64 6f 6e 65 2e | 20 59 6f 75 72 20 66 75 |'s done.| Your fu|
|00000180| 6e 63 74 69 6f 6e 20 6d | 75 73 74 20 68 61 76 65 |nction m|ust have|
|00000190| 20 6e 6f 20 61 72 67 75 | 6d 65 6e 74 73 20 61 6e | no argu|ments an|
|000001a0| 64 20 6e 6f 20 72 65 74 | 75 72 6e 20 76 61 6c 75 |d no ret|urn valu|
|000001b0| 65 2e 0d 0d 28 4d 41 54 | 4c 41 42 3a 20 49 66 20 |e...(MAT|LAB: If |
|000001c0| 79 6f 75 20 63 6f 6d 70 | 69 6c 65 20 74 68 69 73 |you comp|ile this|
|000001d0| 20 66 69 6c 65 20 61 73 | 20 61 20 4d 45 58 20 72 | file as| a MEX r|
|000001e0| 65 73 6f 75 72 63 65 2c | 20 74 6f 20 62 65 20 63 |esource,| to be c|
|000001f0| 61 6c 6c 65 64 20 66 72 | 6f 6d 20 4d 41 54 4c 41 |alled fr|om MATLA|
|00000200| 42 2c 20 0d 74 68 65 6e | 20 79 6f 75 72 20 63 61 |B, .then| your ca|
|00000210| 6c 6c 20 74 6f 20 41 74 | 45 78 69 74 54 6f 53 68 |ll to At|ExitToSh|
|00000220| 65 6c 6c 20 69 73 20 61 | 20 72 65 71 75 65 73 74 |ell is a| request|
|00000230| 20 74 68 61 74 20 79 6f | 75 72 20 66 75 6e 63 74 | that yo|ur funct|
|00000240| 69 6f 6e 20 62 65 20 63 | 61 6c 6c 65 64 20 77 68 |ion be c|alled wh|
|00000250| 65 6e 20 0d 74 68 65 20 | 4d 45 58 20 72 65 73 6f |en .the |MEX reso|
|00000260| 75 72 63 65 20 69 73 20 | 66 6c 75 73 68 65 64 20 |urce is |flushed |
|00000270| 66 72 6f 6d 20 6d 65 6d | 6f 72 79 2e 29 0d 0d 4d |from mem|ory.)..M|
|00000280| 61 6e 79 20 56 69 64 65 | 6f 54 6f 6f 6c 62 6f 78 |any Vide|oToolbox|
|00000290| 20 72 6f 75 74 69 6e 65 | 73 20 73 65 74 20 75 70 | routine|s set up|
|000002a0| 20 69 6e 74 65 72 72 75 | 70 74 20 73 65 72 76 69 | interru|pt servi|
|000002b0| 63 65 20 72 6f 75 74 69 | 6e 65 73 20 74 68 61 74 |ce routi|nes that|
|000002c0| 20 6d 75 73 74 20 62 65 | 20 6b 69 6c 6c 65 64 0d | must be| killed.|
|000002d0| 62 65 66 6f 72 65 20 74 | 68 65 20 70 72 6f 67 72 |before t|he progr|
|000002e0| 61 6d 20 67 6f 65 73 20 | 61 77 61 79 2e 20 57 65 |am goes |away. We|
|000002f0| 20 77 61 6e 74 20 74 6f | 20 6b 69 6c 6c 20 74 68 | want to| kill th|
|00000300| 65 73 65 20 77 68 65 74 | 68 65 72 20 77 65 20 71 |ese whet|her we q|
|00000310| 75 69 74 20 76 69 61 20 | 65 78 69 74 28 29 2c 0d |uit via |exit(),.|
|00000320| 61 62 6f 72 74 28 29 2c | 20 6f 72 20 74 68 65 20 |abort(),| or the |
|00000330| 45 78 69 74 54 6f 53 68 | 65 6c 6c 20 74 72 61 70 |ExitToSh|ell trap|
|00000340| 20 69 73 20 69 6e 76 6f | 6b 65 64 20 64 69 72 65 | is invo|ked dire|
|00000350| 63 74 6c 79 2c 20 65 2e | 67 2e 20 69 66 20 75 73 |ctly, e.|g. if us|
|00000360| 65 72 20 74 79 70 65 73 | 20 22 45 53 22 0d 69 6e |er types| "ES".in|
|00000370| 20 4d 61 63 73 42 75 67 | 2e 20 54 68 65 20 6f 6e | MacsBug|. The on|
|00000380| 6c 79 20 77 61 79 20 74 | 6f 20 62 65 20 73 75 72 |ly way t|o be sur|
|00000390| 65 20 6f 66 20 6b 69 6c | 6c 69 6e 67 20 73 6f 6d |e of kil|ling som|
|000003a0| 65 74 68 69 6e 67 20 62 | 65 66 6f 72 65 20 74 68 |ething b|efore th|
|000003b0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0d 67 6f |e applic|ation.go|
|000003c0| 65 73 20 61 77 61 79 20 | 69 73 20 74 6f 20 61 74 |es away |is to at|
|000003d0| 74 61 63 68 20 69 74 73 | 20 6b 69 6c 6c 65 72 2c |tach its| killer,|
|000003e0| 20 62 79 20 70 61 74 63 | 68 69 6e 67 2c 20 74 6f | by patc|hing, to|
|000003f0| 20 74 68 65 20 45 78 69 | 74 54 6f 53 68 65 6c 6c | the Exi|tToShell|
|00000400| 20 74 72 61 70 2e 20 54 | 68 61 74 27 73 0d 77 68 | trap. T|hat's.wh|
|00000410| 61 74 27 73 20 64 6f 6e | 65 20 68 65 72 65 2e 0d |at's don|e here..|
|00000420| 0d 41 74 45 78 69 74 54 | 6f 53 68 65 6c 6c 28 29 |.AtExitT|oShell()|
|00000430| 20 69 73 20 63 6c 6f 73 | 65 6c 79 20 6d 6f 64 65 | is clos|ely mode|
|00000440| 6c 65 64 20 6f 6e 20 74 | 68 65 20 41 4e 53 49 20 |led on t|he ANSI |
|00000450| 66 75 6e 63 74 69 6f 6e | 20 61 74 65 78 69 74 28 |function| atexit(|
|00000460| 29 2e 20 49 20 77 72 6f | 74 65 20 69 74 20 74 6f |). I wro|te it to|
|00000470| 0d 6f 76 65 72 63 6f 6d | 65 20 74 68 65 20 72 65 |.overcom|e the re|
|00000480| 73 74 72 69 63 74 69 76 | 65 20 69 6d 70 6c 65 6d |strictiv|e implem|
|00000490| 65 6e 74 61 74 69 6f 6e | 20 6f 66 20 61 74 65 78 |entation| of atex|
|000004a0| 69 74 28 29 20 61 6e 64 | 20 5f 61 74 65 78 69 74 |it() and| _atexit|
|000004b0| 28 29 20 69 6e 20 43 6f | 64 65 57 61 72 72 69 6f |() in Co|deWarrio|
|000004c0| 72 3a 0d 74 68 65 79 20 | 6f 6e 6c 79 20 69 6e 76 |r:.they |only inv|
|000004d0| 6f 6b 65 20 79 6f 75 72 | 20 66 75 6e 63 74 69 6f |oke your| functio|
|000004e0| 6e 73 20 69 66 20 74 68 | 65 20 41 4e 53 49 20 66 |ns if th|e ANSI f|
|000004f0| 75 6e 63 74 69 6f 6e 20 | 65 78 69 74 28 29 20 69 |unction |exit() i|
|00000500| 73 20 63 61 6c 6c 65 64 | 2c 20 4e 4f 54 20 69 66 |s called|, NOT if|
|00000510| 0d 79 6f 75 20 63 61 6c | 6c 20 61 62 6f 72 74 28 |.you cal|l abort(|
|00000520| 29 2c 20 6f 72 20 74 68 | 65 20 75 73 65 72 20 74 |), or th|e user t|
|00000530| 79 70 65 73 20 22 45 53 | 22 20 69 6e 20 4d 61 63 |ypes "ES|" in Mac|
|00000540| 73 42 75 67 2e 20 49 20 | 74 68 69 6e 6b 20 74 68 |sBug. I |think th|
|00000550| 61 74 20 41 74 45 78 69 | 74 54 6f 53 68 65 6c 6c |at AtExi|tToShell|
|00000560| 0d 69 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 |.is equi|valent t|
|00000570| 6f 20 74 68 65 20 6e 6f | 6e 2d 41 4e 53 49 20 5f |o the no|n-ANSI _|
|00000580| 61 74 65 78 69 74 28 29 | 20 72 6f 75 74 69 6e 65 |atexit()| routine|
|00000590| 20 70 72 6f 76 69 64 65 | 64 20 62 79 20 74 68 65 | provide|d by the|
|000005a0| 20 53 79 6d 61 6e 74 65 | 63 20 54 48 49 4e 4b 20 | Symante|c THINK |
|000005b0| 43 0d 65 6e 76 69 72 6f | 6e 6d 65 6e 74 2e 0d 0d |C.enviro|nment...|
|000005c0| 54 68 65 20 72 65 67 69 | 73 74 72 61 74 69 6f 6e |The regi|stration|
|000005d0| 20 6c 69 73 74 20 28 6f | 66 20 75 73 65 72 20 66 | list (o|f user f|
|000005e0| 75 6e 63 74 69 6f 6e 73 | 29 20 69 73 20 6c 61 73 |unctions|) is las|
|000005f0| 74 2d 69 6e 2c 20 66 69 | 72 73 74 2d 6f 75 74 2e |t-in, fi|rst-out.|
|00000600| 20 57 68 65 6e 20 79 6f | 75 0d 65 76 65 6e 74 75 | When yo|u.eventu|
|00000610| 61 6c 6c 79 20 71 75 69 | 74 2c 20 79 6f 75 72 20 |ally qui|t, your |
|00000620| 66 75 6e 63 74 69 6f 6e | 73 20 77 69 6c 6c 20 62 |function|s will b|
|00000630| 65 20 63 61 6c 6c 65 64 | 20 69 6e 20 72 65 76 65 |e called| in reve|
|00000640| 72 73 65 20 6f 66 20 74 | 68 65 20 6f 72 64 65 72 |rse of t|he order|
|00000650| 20 69 6e 20 77 68 69 63 | 68 0d 79 6f 75 20 72 65 | in whic|h.you re|
|00000660| 67 69 73 74 65 72 65 64 | 20 74 68 65 6d 2e 20 4e |gistered| them. N|
|00000670| 6f 20 63 68 65 63 6b 69 | 6e 67 20 69 73 20 6d 61 |o checki|ng is ma|
|00000680| 64 65 20 66 6f 72 20 64 | 75 70 6c 69 63 61 74 69 |de for d|uplicati|
|00000690| 6f 6e 3a 20 74 68 65 20 | 73 61 6d 65 20 66 75 6e |on: the |same fun|
|000006a0| 63 74 69 6f 6e 20 6d 61 | 79 0d 62 65 20 72 65 67 |ction ma|y.be reg|
|000006b0| 69 73 74 65 64 20 6d 75 | 6c 74 69 70 6c 65 20 74 |isted mu|ltiple t|
|000006c0| 69 6d 65 73 2c 20 61 6e | 64 20 77 69 6c 6c 20 62 |imes, an|d will b|
|000006d0| 65 20 63 61 6c 6c 65 64 | 20 6d 75 6c 74 69 70 6c |e called| multipl|
|000006e0| 65 20 74 69 6d 65 73 2e | 0d 0d 43 41 55 54 49 4f |e times.|..CAUTIO|
|000006f0| 4e 3a 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |N: your |applicat|
|00000700| 69 6f 6e 27 73 20 72 75 | 6e 74 69 6d 65 20 65 6e |ion's ru|ntime en|
|00000710| 76 69 72 6f 6e 6d 65 6e | 74 20 28 65 2e 67 2e 20 |vironmen|t (e.g. |
|00000720| 73 74 64 69 6f 29 20 77 | 69 6c 6c 20 6e 6f 72 6d |stdio) w|ill norm|
|00000730| 61 6c 6c 79 20 68 61 76 | 65 0d 73 68 75 74 20 69 |ally hav|e.shut i|
|00000740| 74 73 65 6c 66 20 64 6f | 77 6e 20 62 79 20 74 68 |tself do|wn by th|
|00000750| 65 20 74 69 6d 65 20 69 | 74 20 63 61 6c 6c 73 20 |e time i|t calls |
|00000760| 45 78 69 74 54 6f 53 68 | 65 6c 6c 28 29 2c 20 73 |ExitToSh|ell(), s|
|00000770| 6f 20 61 20 66 75 6e 63 | 74 69 6f 6e 20 73 63 68 |o a func|tion sch|
|00000780| 65 64 75 6c 65 64 20 66 | 6f 72 20 0d 74 68 61 74 |eduled f|or .that|
|00000790| 20 74 69 6d 65 20 73 68 | 6f 75 6c 64 20 6e 6f 74 | time sh|ould not|
|000007a0| 20 61 73 73 75 6d 65 20 | 74 68 65 20 61 76 61 69 | assume |the avai|
|000007b0| 6c 61 62 69 6c 69 74 79 | 20 6f 66 20 73 75 63 68 |lability| of such|
|000007c0| 20 73 65 72 76 69 63 65 | 73 20 28 65 2e 67 2e 20 | service|s (e.g. |
|000007d0| 70 72 69 6e 74 66 29 2e | 20 0d 54 68 65 72 65 27 |printf).| .There'|
|000007e0| 73 20 6e 6f 20 72 65 73 | 74 72 69 63 74 69 6f 6e |s no res|triction|
|000007f0| 20 6f 6e 20 74 68 65 20 | 75 73 65 20 6f 66 20 4d | on the |use of M|
|00000800| 61 63 4f 53 20 73 65 72 | 76 69 63 65 73 2e 0d 0d |acOS ser|vices...|
|00000810| 4d 41 54 4c 41 42 3a 20 | 74 68 65 20 53 74 61 6e |MATLAB: |the Stan|
|00000820| 64 61 72 64 20 43 20 61 | 74 65 78 69 74 28 29 20 |dard C a|texit() |
|00000830| 61 6e 64 20 54 48 49 4e | 4b 20 43 20 5f 61 74 65 |and THIN|K C _ate|
|00000840| 78 69 74 28 29 20 72 6f | 75 74 69 6e 65 73 20 73 |xit() ro|utines s|
|00000850| 68 6f 75 6c 64 20 6e 6f | 74 20 62 65 20 0d 75 73 |hould no|t be .us|
|00000860| 65 64 20 69 6e 20 4d 41 | 54 4c 41 42 20 63 6f 64 |ed in MA|TLAB cod|
|00000870| 65 20 72 65 73 6f 75 72 | 63 65 73 2c 20 62 65 63 |e resour|ces, bec|
|00000880| 61 75 73 65 20 74 68 65 | 79 20 61 72 65 6e 27 74 |ause the|y aren't|
|00000890| 20 64 65 73 69 67 6e 65 | 64 20 74 6f 20 68 61 6e | designe|d to han|
|000008a0| 64 6c 65 20 74 68 65 0d | 73 69 74 75 61 74 69 6f |dle the.|situatio|
|000008b0| 6e 20 6f 66 20 63 6f 64 | 65 20 74 68 61 74 20 6d |n of cod|e that m|
|000008c0| 61 79 20 62 65 20 66 6c | 75 73 68 65 64 20 61 6e |ay be fl|ushed an|
|000008d0| 79 20 74 69 6d 65 20 4d | 41 54 4c 41 42 20 65 78 |y time M|ATLAB ex|
|000008e0| 65 63 75 74 65 73 20 22 | 63 6c 65 61 72 20 6d 65 |ecutes "|clear me|
|000008f0| 78 22 20 6f 72 0d 22 63 | 6c 65 61 72 20 61 6c 6c |x" or."c|lear all|
|00000900| 22 2c 20 61 74 20 61 20 | 74 69 6d 65 20 75 6e 72 |", at a |time unr|
|00000910| 65 6c 61 74 65 64 20 74 | 6f 20 65 78 69 74 69 6e |elated t|o exitin|
|00000920| 67 20 6f 66 20 74 68 65 | 20 4d 41 54 4c 41 42 20 |g of the| MATLAB |
|00000930| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 74 73 65 |applicat|ion itse|
|00000940| 6c 66 2e 20 0d 49 6e 73 | 74 65 61 64 2c 20 4d 41 |lf. .Ins|tead, MA|
|00000950| 54 4c 41 42 20 70 72 6f | 76 69 64 65 73 20 6d 65 |TLAB pro|vides me|
|00000960| 78 41 74 45 78 69 74 28 | 29 2c 20 77 68 69 63 68 |xAtExit(|), which|
|00000970| 20 61 6c 6c 6f 77 73 20 | 79 6f 75 20 74 6f 20 72 | allows |you to r|
|00000980| 65 67 69 73 74 65 72 20 | 6f 6e 65 20 63 61 6c 6c |egister |one call|
|00000990| 62 61 63 6b 20 0d 70 65 | 72 20 4d 45 58 20 66 69 |back .pe|r MEX fi|
|000009a0| 6c 65 2c 20 77 68 69 63 | 68 20 69 73 20 63 61 6c |le, whic|h is cal|
|000009b0| 6c 65 64 20 77 68 65 6e | 20 74 68 65 20 4d 45 58 |led when| the MEX|
|000009c0| 20 66 69 6c 65 20 69 73 | 20 66 6c 75 73 68 65 64 | file is| flushed|
|000009d0| 2e 20 28 54 68 65 20 70 | 72 6f 62 6c 65 6d 20 77 |. (The p|roblem w|
|000009e0| 69 74 68 20 75 73 69 6e | 67 0d 6d 65 78 41 74 45 |ith usin|g.mexAtE|
|000009f0| 78 69 74 2c 20 69 73 20 | 74 68 61 74 20 69 74 27 |xit, is |that it'|
|00000a00| 73 20 68 61 72 64 20 66 | 6f 72 20 61 6e 79 20 70 |s hard f|or any p|
|00000a10| 61 72 74 69 63 75 6c 61 | 72 20 73 75 62 72 6f 75 |articula|r subrou|
|00000a20| 74 69 6e 65 20 74 6f 20 | 6b 6e 6f 77 20 77 68 65 |tine to |know whe|
|00000a30| 74 68 65 72 20 73 6f 6d | 65 62 6f 64 79 0d 65 6c |ther som|ebody.el|
|00000a40| 73 65 20 68 61 73 20 61 | 6c 72 65 61 64 79 20 75 |se has a|lready u|
|00000a50| 73 65 64 20 75 70 20 74 | 68 65 20 73 69 6e 67 6c |sed up t|he singl|
|00000a60| 65 20 61 76 61 69 6c 61 | 62 6c 65 20 73 6c 6f 74 |e availa|ble slot|
|00000a70| 20 69 6e 20 74 68 65 20 | 63 61 6c 6c 2d 62 61 63 | in the |call-bac|
|00000a80| 6b 20 74 61 62 6c 65 2e | 29 0d 49 6e 20 6f 72 64 |k table.|).In ord|
|00000a90| 65 72 20 74 6f 20 6d 61 | 6b 65 20 79 6f 75 72 20 |er to ma|ke your |
|00000aa0| 43 20 73 75 62 72 6f 75 | 74 69 6e 65 73 20 61 73 |C subrou|tines as|
|00000ab0| 20 70 6f 72 74 61 62 6c | 65 20 61 6e 64 20 61 75 | portabl|e and au|
|00000ac0| 74 6f 6e 6f 6d 6f 75 73 | 20 61 73 20 70 6f 73 73 |tonomous| as poss|
|00000ad0| 69 62 6c 65 2c 20 79 6f | 75 20 6d 61 79 0d 70 72 |ible, yo|u may.pr|
|00000ae0| 65 66 65 72 20 74 6f 20 | 75 73 65 20 74 68 69 73 |efer to |use this|
|00000af0| 20 41 74 45 78 69 74 54 | 6f 53 68 65 6c 6c 28 29 | AtExitT|oShell()|
|00000b00| 20 77 68 69 63 68 20 61 | 6c 6c 6f 77 73 20 79 6f | which a|llows yo|
|00000b10| 75 20 74 6f 20 72 65 67 | 69 73 74 65 72 20 6c 6f |u to reg|ister lo|
|00000b20| 74 73 20 6f 66 20 63 61 | 6c 6c 62 61 63 6b 20 0d |ts of ca|llback .|
|00000b30| 72 6f 75 74 69 6e 65 73 | 2c 20 61 6e 64 20 72 65 |routines|, and re|
|00000b40| 67 69 73 74 65 72 73 20 | 69 74 73 65 6c 66 2c 20 |gisters |itself, |
|00000b50| 6f 6e 63 65 2c 20 77 69 | 74 68 20 6d 65 78 41 74 |once, wi|th mexAt|
|00000b60| 45 78 69 74 2e 20 0d 0d | 43 41 55 54 49 4f 4e 3a |Exit. ..|CAUTION:|
|00000b70| 20 53 69 6e 63 65 20 4d | 41 54 4c 41 42 20 72 65 | Since M|ATLAB re|
|00000b80| 67 69 73 74 65 72 73 20 | 6f 6e 6c 79 20 6f 6e 65 |gisters |only one|
|00000b90| 20 66 75 6e 63 74 69 6f | 6e 20 70 65 72 20 4d 45 | functio|n per ME|
|00000ba0| 58 20 69 74 20 69 73 20 | 69 6d 70 6f 72 74 61 6e |X it is |importan|
|00000bb0| 74 20 74 68 61 74 20 0d | 79 6f 75 20 63 6f 6e 73 |t that .|you cons|
|00000bc0| 69 73 74 65 6e 74 6c 79 | 20 61 64 6f 70 74 20 6f |istently| adopt o|
|00000bd0| 6e 65 20 73 74 72 61 74 | 65 67 79 2e 20 45 69 74 |ne strat|egy. Eit|
|00000be0| 68 65 72 20 6d 61 6b 65 | 20 6c 6f 74 73 20 6f 66 |her make| lots of|
|00000bf0| 20 63 61 6c 6c 73 20 74 | 6f 20 41 74 45 78 69 74 | calls t|o AtExit|
|00000c00| 54 6f 53 68 65 6c 6c 0d | 28 61 6e 64 20 4e 4f 4e |ToShell.|(and NON|
|00000c10| 45 20 74 6f 20 6d 65 78 | 41 74 45 78 69 74 29 2c |E to mex|AtExit),|
|00000c20| 20 6f 72 20 6a 75 73 74 | 20 6f 6e 65 20 63 61 6c | or just| one cal|
|00000c30| 6c 20 74 6f 20 6d 65 78 | 41 74 45 78 69 74 2e 20 |l to mex|AtExit. |
|00000c40| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 62 6f 74 68 |If you c|all both|
|00000c50| 20 41 74 45 78 69 74 54 | 6f 53 68 65 6c 6c 0d 61 | AtExitT|oShell.a|
|00000c60| 6e 64 20 6d 65 78 41 74 | 45 78 69 74 20 74 68 65 |nd mexAt|Exit the|
|00000c70| 6e 20 6f 6e 65 20 77 69 | 6c 6c 20 64 69 73 70 6c |n one wi|ll displ|
|00000c80| 61 63 65 20 74 68 65 20 | 6f 74 68 65 72 20 69 6e |ace the |other in|
|00000c90| 20 4d 41 54 4c 41 42 27 | 73 20 6f 6e 65 2d 65 6e | MATLAB'|s one-en|
|00000ca0| 74 72 79 20 74 61 62 6c | 65 2e 0d 0d 54 68 65 20 |try tabl|e...The |
|00000cb0| 63 6f 64 65 20 74 6f 20 | 70 61 74 63 68 20 45 78 |code to |patch Ex|
|00000cc0| 69 74 54 6f 53 68 65 6c | 6c 20 69 73 20 62 61 73 |itToShel|l is bas|
|00000cd0| 65 64 20 6f 6e 20 65 78 | 61 6d 70 6c 65 73 20 74 |ed on ex|amples t|
|00000ce0| 68 61 74 20 61 70 70 65 | 61 72 65 64 20 69 6e 20 |hat appe|ared in |
|00000cf0| 55 73 65 4e 65 74 0d 63 | 73 6d 70 2d 64 69 67 65 |UseNet.c|smp-dige|
|00000d00| 73 74 2d 76 33 2d 30 34 | 36 20 62 79 20 4b 65 76 |st-v3-04|6 by Kev|
|00000d10| 69 6e 20 42 65 6c 6c 20 | 28 6b 62 65 6c 6c 40 63 |in Bell |(kbell@c|
|00000d20| 73 2e 75 74 65 78 61 73 | 2e 65 64 75 29 20 61 6e |s.utexas|.edu) an|
|00000d30| 64 20 42 69 6c 6c 20 48 | 6f 66 6d 61 6e 6e 0d 28 |d Bill H|ofmann.(|
|00000d40| 77 64 68 40 6e 65 74 63 | 6f 6d 2e 63 6f 6d 29 20 |wdh@netc|om.com) |
|00000d50| 69 6e 20 72 65 73 70 6f | 6e 73 65 20 74 6f 20 61 |in respo|nse to a|
|00000d60| 20 71 75 65 72 79 20 62 | 79 20 53 74 65 76 65 20 | query b|y Steve |
|00000d70| 43 6f 79 20 28 73 74 65 | 76 65 63 40 6a 6f 6c 74 |Coy (ste|vec@jolt|
|00000d80| 2e 6d 70 78 2e 63 6f 6d | 2e 61 75 29 0d 0d 48 49 |.mpx.com|.au)..HI|
|00000d90| 53 54 4f 52 59 3a 0d 31 | 30 2f 32 37 2f 39 34 20 |STORY:.1|0/27/94 |
|00000da0| 64 67 70 20 77 72 6f 74 | 65 20 74 68 65 20 45 78 |dgp wrot|e the Ex|
|00000db0| 69 74 54 6f 53 68 65 6c | 6c 20 70 61 74 63 68 2c |itToShel|l patch,|
|00000dc0| 20 62 61 73 65 64 20 6f | 6e 20 63 6f 64 65 20 66 | based o|n code f|
|00000dd0| 72 6f 6d 20 55 73 65 4e | 65 74 20 63 73 6d 70 2d |rom UseN|et csmp-|
|00000de0| 64 69 67 65 73 74 2e 0d | 36 2f 31 37 2f 39 35 20 |digest..|6/17/95 |
|00000df0| 64 67 70 20 77 72 6f 74 | 65 20 41 74 45 78 69 74 |dgp wrot|e AtExit|
|00000e00| 54 6f 53 68 65 6c 6c 2e | 63 0d 37 2f 31 2f 39 35 |ToShell.|c.7/1/95|
|00000e10| 20 64 67 70 20 6d 61 64 | 65 20 63 6f 6d 70 61 74 | dgp mad|e compat|
|00000e20| 69 62 6c 65 20 77 69 74 | 68 20 70 72 65 2d 75 6e |ible wit|h pre-un|
|00000e30| 69 76 65 72 73 61 6c 20 | 61 70 70 6c 65 20 68 65 |iversal |apple he|
|00000e40| 61 64 65 72 73 2e 20 0d | 09 44 69 73 61 62 6c 65 |aders. .|.Disable|
|00000e50| 20 69 66 20 4d 41 54 4c | 41 42 20 69 73 20 74 72 | if MATL|AB is tr|
|00000e60| 75 65 2e 20 41 64 64 65 | 64 20 63 6f 6d 6d 65 6e |ue. Adde|d commen|
|00000e70| 74 73 20 61 62 6f 75 74 | 20 4d 41 54 4c 41 42 2e |ts about| MATLAB.|
|00000e80| 20 0d 37 2f 31 37 2f 39 | 35 20 64 67 70 20 6d 61 | .7/17/9|5 dgp ma|
|00000e90| 64 65 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 77 69 |de compa|tible wi|
|00000ea0| 74 68 20 70 72 65 2d 75 | 6e 69 76 65 72 73 61 6c |th pre-u|niversal|
|00000eb0| 20 68 65 61 64 65 72 73 | 0d 34 2f 31 39 2f 39 36 | headers|.4/19/96|
|00000ec0| 20 64 67 70 20 63 61 6c | 6c 20 6d 65 78 41 74 45 | dgp cal|l mexAtE|
|00000ed0| 78 69 74 28 29 2e 20 49 | 20 6b 6e 6f 77 20 74 68 |xit(). I| know th|
|00000ee0| 69 73 20 69 73 20 6f 6b | 20 66 6f 72 20 50 50 43 |is is ok| for PPC|
|00000ef0| 2c 20 62 75 74 20 6d 61 | 79 20 6e 6f 74 20 77 6f |, but ma|y not wo|
|00000f00| 72 6b 20 66 6f 72 20 36 | 38 6b 2e 0d 36 2f 31 30 |rk for 6|8k..6/10|
|00000f10| 2f 39 36 20 64 67 70 20 | 66 69 78 65 64 20 69 6e |/96 dgp |fixed in|
|00000f20| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 20 65 72 72 |itializa|tion err|
|00000f30| 6f 72 20 77 68 65 6e 20 | 4d 41 54 4c 41 42 20 69 |or when |MATLAB i|
|00000f40| 73 20 74 72 75 65 2e 0d | 36 2f 31 30 2f 39 36 20 |s true..|6/10/96 |
|00000f50| 64 67 70 20 61 64 64 65 | 64 20 61 20 63 6f 75 70 |dgp adde|d a coup|
|00000f60| 6c 65 20 70 61 72 61 67 | 72 61 70 68 73 20 65 78 |le parag|raphs ex|
|00000f70| 70 6c 61 69 6e 69 6e 67 | 20 69 74 73 20 75 73 65 |plaining| its use|
|00000f80| 20 69 6e 20 4d 41 54 4c | 41 42 20 4d 45 58 20 66 | in MATL|AB MEX f|
|00000f90| 69 6c 65 73 2e 0d 36 2f | 31 31 2f 39 36 20 64 67 |iles..6/|11/96 dg|
|00000fa0| 70 20 49 6e 20 72 65 73 | 70 6f 6e 73 65 20 74 6f |p In res|ponse to|
|00000fb0| 20 63 6f 6e 63 65 72 6e | 73 20 72 61 69 73 65 64 | concern|s raised|
|00000fc0| 20 62 79 20 44 61 76 69 | 64 20 42 72 61 69 6e 61 | by Davi|d Braina|
|00000fd0| 72 64 2c 20 49 20 61 64 | 64 65 64 20 74 65 78 74 |rd, I ad|ded text|
|00000fe0| 20 61 62 6f 76 65 0d 09 | 09 77 61 72 6e 69 6e 67 | above..|.warning|
|00000ff0| 20 61 62 6f 75 74 20 74 | 68 65 20 64 61 6e 67 65 | about t|he dange|
|00001000| 72 20 6f 66 20 63 61 6c | 6c 69 6e 67 20 42 4f 54 |r of cal|ling BOT|
|00001010| 48 20 41 74 45 78 69 74 | 54 6f 53 68 65 6c 6c 20 |H AtExit|ToShell |
|00001020| 61 6e 64 20 6d 65 78 41 | 74 45 78 69 74 2c 20 61 |and mexA|tExit, a|
|00001030| 6e 64 0d 09 09 49 20 6d | 61 64 65 20 74 68 65 20 |nd...I m|ade the |
|00001040| 41 35 20 73 74 75 66 66 | 20 63 6f 6e 64 69 74 69 |A5 stuff| conditi|
|00001050| 6f 6e 61 6c 20 6f 6e 20 | 21 4d 41 54 4c 41 42 2e |onal on |!MATLAB.|
|00001060| 0d 38 2f 35 2f 39 36 09 | 64 67 70 20 23 75 6e 64 |.8/5/96.|dgp #und|
|00001070| 65 66 20 6d 65 78 41 74 | 45 78 69 74 20 74 6f 20 |ef mexAt|Exit to |
|00001080| 6d 61 6b 65 20 73 75 72 | 65 20 77 65 20 63 61 6c |make sur|e we cal|
|00001090| 6c 20 74 68 65 20 72 65 | 61 6c 20 4d 63 43 6f 79 |l the re|al McCoy|
|000010a0| 2e 0d 2a 2f 0d 23 69 6e | 63 6c 75 64 65 20 22 56 |..*/.#in|clude "V|
|000010b0| 69 64 65 6f 54 6f 6f 6c | 62 6f 78 2e 68 22 0d 23 |ideoTool|box.h".#|
|000010c0| 69 66 6e 64 65 66 20 5f | 5f 54 52 41 50 53 5f 5f |ifndef _|_TRAPS__|
|000010d0| 0d 09 23 69 6e 63 6c 75 | 64 65 20 3c 54 72 61 70 |..#inclu|de <Trap|
|000010e0| 73 2e 68 3e 09 2f 2f 20 | 5f 45 78 69 74 54 6f 53 |s.h>.// |_ExitToS|
|000010f0| 68 65 6c 6c 0d 23 65 6e | 64 69 66 0d 23 69 6e 63 |hell.#en|dif.#inc|
|00001100| 6c 75 64 65 20 3c 53 65 | 67 4c 6f 61 64 2e 68 3e |lude <Se|gLoad.h>|
|00001110| 09 2f 2f 20 45 78 69 74 | 54 6f 53 68 65 6c 6c 28 |.// Exit|ToShell(|
|00001120| 29 0d 23 69 66 20 55 4e | 49 56 45 52 53 41 4c 5f |).#if UN|IVERSAL_|
|00001130| 48 45 41 44 45 52 53 0d | 09 74 79 70 65 64 65 66 |HEADERS.|.typedef|
|00001140| 20 55 6e 69 76 65 72 73 | 61 6c 50 72 6f 63 50 74 | Univers|alProcPt|
|00001150| 72 20 54 72 61 70 41 64 | 64 72 65 73 73 54 79 70 |r TrapAd|dressTyp|
|00001160| 65 3b 0d 23 65 6c 73 65 | 0d 09 23 64 65 66 69 6e |e;.#else|..#defin|
|00001170| 65 20 55 6e 69 76 65 72 | 73 61 6c 50 72 6f 63 50 |e Univer|salProcP|
|00001180| 74 72 20 50 72 6f 63 50 | 74 72 0d 09 23 64 65 66 |tr ProcP|tr..#def|
|00001190| 69 6e 65 20 4e 65 77 52 | 6f 75 74 69 6e 65 44 65 |ine NewR|outineDe|
|000011a0| 73 63 72 69 70 74 6f 72 | 28 61 2c 62 2c 63 29 20 |scriptor|(a,b,c) |
|000011b0| 61 0d 09 74 79 70 65 64 | 65 66 20 6c 6f 6e 67 20 |a..typed|ef long |
|000011c0| 54 72 61 70 41 64 64 72 | 65 73 73 54 79 70 65 3b |TrapAddr|essType;|
|000011d0| 0d 23 65 6e 64 69 66 0d | 73 74 61 74 69 63 20 70 |.#endif.|static p|
|000011e0| 61 73 63 61 6c 20 76 6f | 69 64 20 4d 79 45 78 69 |ascal vo|id MyExi|
|000011f0| 74 54 6f 53 68 65 6c 6c | 28 76 6f 69 64 29 3b 0d |tToShell|(void);.|
|00001200| 23 64 65 66 69 6e 65 20 | 46 55 4e 43 54 49 4f 4e |#define |FUNCTION|
|00001210| 53 20 33 35 0d 73 74 61 | 74 69 63 20 55 6e 69 76 |S 35.sta|tic Univ|
|00001220| 65 72 73 61 6c 50 72 6f | 63 50 74 72 20 6f 6c 64 |ersalPro|cPtr old|
|00001230| 45 78 69 74 54 6f 53 68 | 65 6c 6c 54 72 61 70 41 |ExitToSh|ellTrapA|
|00001240| 64 64 72 65 73 73 3d 4e | 55 4c 4c 3b 09 2f 2f 20 |ddress=N|ULL;.// |
|00001250| 73 61 76 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 |save add|ress of |
|00001260| 72 65 61 6c 20 45 78 69 | 74 54 6f 53 68 65 6c 6c |real Exi|tToShell|
|00001270| 20 74 72 61 70 2e 0d 73 | 74 61 74 69 63 20 76 6f | trap..s|tatic vo|
|00001280| 69 64 20 28 2a 75 73 65 | 72 46 75 6e 63 74 69 6f |id (*use|rFunctio|
|00001290| 6e 5b 46 55 4e 43 54 49 | 4f 4e 53 5d 29 28 76 6f |n[FUNCTI|ONS])(vo|
|000012a0| 69 64 29 3b 09 2f 2f 20 | 74 61 62 6c 65 20 6f 66 |id);.// |table of|
|000012b0| 20 75 73 65 72 20 66 75 | 6e 63 74 69 6f 6e 73 20 | user fu|nctions |
|000012c0| 74 6f 20 62 65 20 63 61 | 6c 6c 65 64 20 61 74 20 |to be ca|lled at |
|000012d0| 65 78 69 74 2e 0d 0d 69 | 6e 74 20 41 74 45 78 69 |exit...i|nt AtExi|
|000012e0| 74 54 6f 53 68 65 6c 6c | 28 76 6f 69 64 20 28 2a |tToShell|(void (*|
|000012f0| 75 73 65 72 46 75 6e 63 | 74 69 6f 6e 50 74 72 29 |userFunc|tionPtr)|
|00001300| 28 76 6f 69 64 29 29 0d | 7b 0d 09 23 69 66 20 21 |(void)).|{..#if !|
|00001310| 4d 41 54 4c 41 42 0d 09 | 09 55 6e 69 76 65 72 73 |MATLAB..|.Univers|
|00001320| 61 6c 50 72 6f 63 50 74 | 72 20 6d 79 45 78 69 74 |alProcPt|r myExit|
|00001330| 54 6f 53 68 65 6c 6c 55 | 50 50 3b 0d 09 23 65 6e |ToShellU|PP;..#en|
|00001340| 64 69 66 0d 09 69 6e 74 | 20 69 3b 0d 09 73 74 61 |dif..int| i;..sta|
|00001350| 74 69 63 20 42 6f 6f 6c | 65 61 6e 20 66 69 72 73 |tic Bool|ean firs|
|00001360| 74 54 69 6d 65 3d 31 3b | 0d 0d 09 69 66 28 66 69 |tTime=1;|...if(fi|
|00001370| 72 73 74 54 69 6d 65 29 | 7b 0d 09 09 23 69 66 20 |rstTime)|{...#if |
|00001380| 21 4d 41 54 4c 41 42 0d | 09 09 09 6d 79 45 78 69 |!MATLAB.|...myExi|
|00001390| 74 54 6f 53 68 65 6c 6c | 55 50 50 3d 4e 65 77 52 |tToShell|UPP=NewR|
|000013a0| 6f 75 74 69 6e 65 44 65 | 73 63 72 69 70 74 6f 72 |outineDe|scriptor|
|000013b0| 28 28 50 72 6f 63 50 74 | 72 29 4d 79 45 78 69 74 |((ProcPt|r)MyExit|
|000013c0| 54 6f 53 68 65 6c 6c 0d | 09 09 09 09 2c 6b 50 61 |ToShell.|....,kPa|
|000013d0| 73 63 61 6c 53 74 61 63 | 6b 42 61 73 65 64 2c 47 |scalStac|kBased,G|
|000013e0| 65 74 43 75 72 72 65 6e | 74 49 53 41 28 29 29 3b |etCurren|tISA());|
|000013f0| 0d 09 09 09 6f 6c 64 45 | 78 69 74 54 6f 53 68 65 |....oldE|xitToShe|
|00001400| 6c 6c 54 72 61 70 41 64 | 64 72 65 73 73 3d 28 55 |llTrapAd|dress=(U|
|00001410| 6e 69 76 65 72 73 61 6c | 50 72 6f 63 50 74 72 29 |niversal|ProcPtr)|
|00001420| 47 65 74 54 6f 6f 6c 54 | 72 61 70 41 64 64 72 65 |GetToolT|rapAddre|
|00001430| 73 73 28 5f 45 78 69 74 | 54 6f 53 68 65 6c 6c 29 |ss(_Exit|ToShell)|
|00001440| 3b 0d 09 09 09 53 65 74 | 54 6f 6f 6c 54 72 61 70 |;....Set|ToolTrap|
|00001450| 41 64 64 72 65 73 73 28 | 28 54 72 61 70 41 64 64 |Address(|(TrapAdd|
|00001460| 72 65 73 73 54 79 70 65 | 29 6d 79 45 78 69 74 54 |ressType|)myExitT|
|00001470| 6f 53 68 65 6c 6c 55 50 | 50 2c 5f 45 78 69 74 54 |oShellUP|P,_ExitT|
|00001480| 6f 53 68 65 6c 6c 29 3b | 0d 09 09 23 65 6c 73 65 |oShell);|...#else|
|00001490| 0d 09 09 09 2f 2f 20 41 | 73 6b 20 4d 41 54 4c 41 |....// A|sk MATLA|
|000014a0| 42 20 74 6f 20 63 61 6c | 6c 20 4d 79 45 78 69 74 |B to cal|l MyExit|
|000014b0| 54 6f 53 68 65 6c 6c 20 | 6a 75 73 74 20 62 65 66 |ToShell |just bef|
|000014c0| 6f 72 65 20 64 69 73 70 | 6f 73 69 6e 67 20 6f 66 |ore disp|osing of|
|000014d0| 20 6f 75 72 20 4d 45 58 | 20 72 65 73 6f 75 72 63 | our MEX| resourc|
|000014e0| 65 2e 0d 09 09 09 23 75 | 6e 64 65 66 20 6d 65 78 |e.....#u|ndef mex|
|000014f0| 41 74 45 78 69 74 0d 09 | 09 09 6d 65 78 41 74 45 |AtExit..|..mexAtE|
|00001500| 78 69 74 28 28 76 6f 69 | 64 20 2a 29 4d 79 45 78 |xit((voi|d *)MyEx|
|00001510| 69 74 54 6f 53 68 65 6c | 6c 29 3b 0d 09 09 23 65 |itToShel|l);...#e|
|00001520| 6e 64 69 66 0d 09 09 66 | 6f 72 28 69 3d 30 3b 69 |ndif...f|or(i=0;i|
|00001530| 3c 46 55 4e 43 54 49 4f | 4e 53 3b 69 2b 2b 29 75 |<FUNCTIO|NS;i++)u|
|00001540| 73 65 72 46 75 6e 63 74 | 69 6f 6e 5b 69 5d 3d 4e |serFunct|ion[i]=N|
|00001550| 55 4c 4c 3b 0d 09 09 66 | 69 72 73 74 54 69 6d 65 |ULL;...f|irstTime|
|00001560| 3d 30 3b 0d 09 7d 0d 09 | 66 6f 72 28 69 3d 30 3b |=0;..}..|for(i=0;|
|00001570| 69 3c 46 55 4e 43 54 49 | 4f 4e 53 3b 69 2b 2b 29 |i<FUNCTI|ONS;i++)|
|00001580| 69 66 28 75 73 65 72 46 | 75 6e 63 74 69 6f 6e 5b |if(userF|unction[|
|00001590| 69 5d 3d 3d 4e 55 4c 4c | 29 7b 0d 09 09 75 73 65 |i]==NULL|){...use|
|000015a0| 72 46 75 6e 63 74 69 6f | 6e 5b 69 5d 3d 75 73 65 |rFunctio|n[i]=use|
|000015b0| 72 46 75 6e 63 74 69 6f | 6e 50 74 72 3b 0d 09 09 |rFunctio|nPtr;...|
|000015c0| 72 65 74 75 72 6e 20 30 | 3b 09 2f 2f 20 73 75 63 |return 0|;.// suc|
|000015d0| 63 65 73 73 0d 09 7d 0d | 09 72 65 74 75 72 6e 20 |cess..}.|.return |
|000015e0| 31 3b 09 09 2f 2f 20 66 | 61 69 6c 75 72 65 3a 20 |1;..// f|ailure: |
|000015f0| 74 68 65 20 74 61 62 6c | 65 27 73 20 61 6c 72 65 |the tabl|e's alre|
|00001600| 61 64 79 20 66 75 6c 6c | 0d 7d 0d 0d 73 74 61 74 |ady full|.}..stat|
|00001610| 69 63 20 70 61 73 63 61 | 6c 20 76 6f 69 64 20 4d |ic pasca|l void M|
|00001620| 79 45 78 69 74 54 6f 53 | 68 65 6c 6c 28 76 6f 69 |yExitToS|hell(voi|
|00001630| 64 29 0d 7b 0d 09 69 6e | 74 20 69 3b 0d 09 0d 09 |d).{..in|t i;....|
|00001640| 23 69 66 20 21 4d 41 54 | 4c 41 42 0d 09 09 53 65 |#if !MAT|LAB...Se|
|00001650| 74 43 75 72 72 65 6e 74 | 41 35 28 29 3b 0d 09 09 |tCurrent|A5();...|
|00001660| 53 65 74 54 6f 6f 6c 54 | 72 61 70 41 64 64 72 65 |SetToolT|rapAddre|
|00001670| 73 73 28 28 54 72 61 70 | 41 64 64 72 65 73 73 54 |ss((Trap|AddressT|
|00001680| 79 70 65 29 6f 6c 64 45 | 78 69 74 54 6f 53 68 65 |ype)oldE|xitToShe|
|00001690| 6c 6c 54 72 61 70 41 64 | 64 72 65 73 73 2c 5f 45 |llTrapAd|dress,_E|
|000016a0| 78 69 74 54 6f 53 68 65 | 6c 6c 29 3b 0d 09 23 65 |xitToShe|ll);..#e|
|000016b0| 6e 64 69 66 0d 0d 09 66 | 6f 72 28 69 3d 46 55 4e |ndif...f|or(i=FUN|
|000016c0| 43 54 49 4f 4e 53 2d 31 | 3b 69 3e 3d 30 3b 69 2d |CTIONS-1|;i>=0;i-|
|000016d0| 2d 29 69 66 28 75 73 65 | 72 46 75 6e 63 74 69 6f |-)if(use|rFunctio|
|000016e0| 6e 5b 69 5d 21 3d 4e 55 | 4c 4c 29 7b 0d 09 09 28 |n[i]!=NU|LL){...(|
|000016f0| 2a 75 73 65 72 46 75 6e | 63 74 69 6f 6e 5b 69 5d |*userFun|ction[i]|
|00001700| 29 28 29 3b 0d 09 7d 0d | 0d 09 23 69 66 20 21 4d |)();..}.|..#if !M|
|00001710| 41 54 4c 41 42 0d 09 09 | 45 78 69 74 54 6f 53 68 |ATLAB...|ExitToSh|
|00001720| 65 6c 6c 28 29 3b 0d 09 | 23 65 6e 64 69 66 0d 7d |ell();..|#endif.}|
|00001730| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001780| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00001790| 5f 57 52 62 61 63 6b 00 | 06 a2 5f 57 42 61 63 6b |_WRback.|.._WBack|
|000017a0| 00 06 a6 5f 52 73 61 76 | 65 00 06 14 5f 57 52 65 |..._Rsav|e..._WRe|
|000017b0| 0f 41 74 45 78 69 74 54 | 6f 53 68 65 6c 6c 2e 63 |.AtExitT|oShell.c|
|000017c0| 02 00 02 00 54 45 58 54 | 43 57 49 45 01 00 00 50 |....TEXT|CWIE...P|
|000017d0| 02 00 54 45 58 54 43 57 | 49 45 01 00 00 50 00 00 |..TEXTCW|IE...P..|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 ad e3 1a f0 00 00 | 16 b1 00 00 01 c8 01 6b |........|.......k|
|00001800| 74 72 69 61 6c 46 69 6c | 65 00 06 75 69 6e 46 69 |trialFil|e..uinFi|
|00001810| 6c 65 00 07 c3 6f 75 74 | 46 69 6c 65 00 00 40 6f |le...out|File..@o|
|00001820| 62 73 65 72 76 65 72 00 | 05 66 74 72 69 61 6c 46 |bserver.|.ftrialF|
|00001830| 69 6c 65 6e 61 6d 65 00 | 02 86 69 6e 46 69 6c 65 |ilename.|..inFile|
|00001840| 6e 61 6d 65 00 03 e7 6f | 75 74 46 69 6c 65 6e 61 |name...o|utFilena|
|00001850| 6d 65 00 05 5f 69 6e 44 | 65 73 63 72 69 70 74 69 |me.._inD|escripti|
|00001860| 6f 6e 00 03 db 44 65 73 | 63 72 69 70 74 69 6f 6e |on...Des|cription|
|00001870| 00 04 6f 74 79 70 65 00 | 01 60 73 69 7a 65 64 4f |..otype.|.`sizedO|
|00001880| 00 00 00 04 00 01 00 01 | 00 00 00 48 00 09 4d 6f |........|...H..Mo|
|00001890| 6e 61 63 6f 00 00 00 00 | 01 9a ba d0 00 00 00 00 |naco....|........|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 06 |........|........|
|000018b0| 00 04 00 3e 00 24 02 6d | 02 fd 00 3e 00 24 02 6d |...>.$.m|...>.$.m|
|000018c0| 02 fd ae 2b 09 e0 00 00 | 00 00 00 00 00 00 00 00 |...+....|........|
|000018d0| 00 00 00 00 00 00 00 1e | 00 3e 00 24 02 6d 02 fd |........|.>.$.m..|
|000018e0| 00 3e 00 24 02 6d 02 fd | 00 00 00 00 00 00 00 00 |.>.$.m..|........|
|000018f0| 00 00 00 00 00 00 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00001900| 00 76 00 00 00 52 01 8e | e8 c8 3e cc 00 00 00 1c |.v...R..|..>.....|
|00001910| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|00001920| 00 00 00 2a 03 ed ff ff | 00 00 00 08 00 00 00 00 |...*....|........|
|00001930| 03 f0 ff ff 00 00 00 54 | 01 91 45 50 03 f0 ff ff |.......T|..EP....|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+