home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-06-24 | 108.4 KB | [TEXT/KAHL] |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: pov.c
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 05 70 6f 76 2e 63 00 | 00 00 00 00 00 00 00 00 |..pov.c.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 01 9c ef 00 | 00 13 9c a6 6e 57 91 a6 |........|....nW..|
|00000060| 6e 57 91 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |nW......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6b e2 00 00 |........|....k...|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0d 2a 20 |********|*****.* |
|000000d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 50 | | P|
|000000e0| 4f 56 2e 63 0d 2a 0d 2a | 20 20 54 68 69 73 20 66 |OV.c.*.*| This f|
|000000f0| 69 6c 65 20 63 6f 6e 74 | 61 69 6e 73 20 4d 61 63 |ile cont|ains Mac|
|00000100| 69 6e 74 6f 73 68 2d 73 | 70 65 63 69 66 69 63 20 |intosh-s|pecific |
|00000110| 72 6f 75 74 69 6e 65 73 | 20 66 6f 72 20 50 65 72 |routines| for Per|
|00000120| 73 69 73 74 65 6e 63 65 | 20 4f 66 20 56 69 73 69 |sistence| Of Visi|
|00000130| 6f 6e 0d 2a 20 20 72 61 | 79 74 72 61 63 65 72 20 |on.* ra|ytracer |
|00000140| 28 50 4f 56 2d 52 61 79 | 2e 29 0d 2a 0d 2a 20 09 |(POV-Ray|.).*.* .|
|00000150| 54 68 69 73 20 4d 61 63 | 69 6e 74 6f 73 68 20 76 |This Mac|intosh v|
|00000160| 65 72 73 69 6f 6e 20 6f | 66 20 50 4f 56 2d 52 61 |ersion o|f POV-Ra|
|00000170| 79 20 77 61 73 20 63 72 | 65 61 74 65 64 20 61 6e |y was cr|eated an|
|00000180| 64 20 63 6f 6d 70 69 6c | 65 64 20 62 79 20 4a 69 |d compil|ed by Ji|
|00000190| 6d 20 4e 69 74 63 68 61 | 6c 73 0d 2a 20 20 20 28 |m Nitcha|ls.* (|
|000001a0| 54 68 69 6e 6b 20 35 2e | 30 29 20 61 6e 64 20 45 |Think 5.|0) and E|
|000001b0| 64 75 61 72 64 20 53 63 | 68 77 61 6e 20 28 4d 50 |duard Sc|hwan (MP|
|000001c0| 57 29 2c 20 62 61 73 65 | 64 20 76 65 72 79 20 6c |W), base|d very l|
|000001d0| 6f 6f 73 65 6c 79 20 6f | 6e 20 74 68 65 20 6f 72 |oosely o|n the or|
|000001e0| 69 67 69 6e 61 6c 0d 2a | 20 20 20 70 6f 72 74 73 |iginal.*| ports|
|000001f0| 20 62 79 20 54 68 6f 6d | 61 73 20 4f 6b 6b 65 6e | by Thom|as Okken|
|00000200| 20 61 6e 64 20 44 61 76 | 69 64 20 4c 69 63 68 74 | and Dav|id Licht|
|00000210| 6d 61 6e 20 77 69 74 68 | 20 73 6f 6d 65 20 68 65 |man with| some he|
|00000220| 6c 70 20 66 72 6f 6d 20 | 47 6c 65 6e 6e 20 53 75 |lp from |Glenn Su|
|00000230| 67 64 65 6e 2e 0d 2a 0d | 2a 09 46 6f 72 20 62 75 |gden..*.|*.For bu|
|00000240| 67 20 72 65 70 6f 72 74 | 73 20 72 65 67 61 72 64 |g report|s regard|
|00000250| 69 6e 67 20 74 68 65 20 | 4d 61 63 20 76 65 72 73 |ing the |Mac vers|
|00000260| 69 6f 6e 20 73 70 65 63 | 69 66 69 63 73 20 4f 4e |ion spec|ifics ON|
|00000270| 4c 59 2c 20 67 6f 20 61 | 68 65 61 64 20 61 6e 64 |LY, go a|head and|
|00000280| 0d 2a 09 63 6f 6e 74 61 | 63 74 20 4a 69 6d 20 4e |.*.conta|ct Jim N|
|00000290| 69 74 63 68 61 6c 73 20 | 61 74 20 43 6f 6d 70 75 |itchals |at Compu|
|000002a0| 73 65 72 76 65 3a 20 37 | 33 31 31 37 2c 33 30 32 |serve: 7|3117,302|
|000002b0| 30 20 6f 72 20 41 6d 65 | 72 69 63 61 20 4f 6e 6c |0 or Ame|rica Onl|
|000002c0| 69 6e 65 3a 20 4a 49 4d | 4e 38 2e 0d 2a 20 20 20 |ine: JIM|N8..* |
|000002d0| 4c 6f 6f 6b 20 66 6f 72 | 20 66 6f 72 75 6d 20 73 |Look for| forum s|
|000002e0| 75 70 70 6f 72 74 20 6f | 6e 20 41 6d 65 72 69 63 |upport o|n Americ|
|000002f0| 61 20 4f 6e 6c 69 6e 65 | 27 73 20 4d 61 63 20 47 |a Online|'s Mac G|
|00000300| 72 61 70 68 69 63 73 20 | 66 6f 72 75 6d 20 43 6f |raphics |forum Co|
|00000310| 6d 70 61 6e 79 0d 2a 20 | 20 20 53 75 70 70 6f 72 |mpany.* | Suppor|
|00000320| 74 20 61 72 65 61 2c 20 | 6f 72 20 43 6f 6d 70 75 |t area, |or Compu|
|00000330| 73 65 72 76 65 27 73 20 | 43 6f 6d 70 75 74 65 72 |serve's |Computer|
|00000340| 20 41 72 74 20 28 43 4f | 4d 41 52 54 29 20 66 6f | Art (CO|MART) fo|
|00000350| 72 75 6d 2e 0d 2a 09 0d | 2a 20 20 66 72 6f 6d 20 |rum..*..|* from |
|00000360| 50 65 72 73 69 73 74 65 | 6e 63 65 20 6f 66 20 56 |Persiste|nce of V|
|00000370| 69 73 69 6f 6e 20 52 61 | 79 74 72 61 63 65 72 20 |ision Ra|ytracer |
|00000380| 0d 2a 20 20 43 6f 70 79 | 72 69 67 68 74 20 31 39 |.* Copy|right 19|
|00000390| 39 31 2d 31 39 39 32 20 | 50 65 72 73 69 73 74 65 |91-1992 |Persiste|
|000003a0| 6e 63 65 20 6f 66 20 56 | 69 73 69 6f 6e 20 54 65 |nce of V|ision Te|
|000003b0| 61 6d 0d 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |am.*----|--------|
|000003c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00000400| 2a 20 20 43 6f 70 79 69 | 6e 67 2c 20 64 69 73 74 |* Copyi|ng, dist|
|00000410| 72 69 62 75 74 69 6f 6e | 20 61 6e 64 20 6c 65 67 |ribution| and leg|
|00000420| 61 6c 20 69 6e 66 6f 20 | 69 73 20 69 6e 20 74 68 |al info |is in th|
|00000430| 65 20 66 69 6c 65 20 70 | 6f 76 6c 65 67 61 6c 2e |e file p|ovlegal.|
|00000440| 64 6f 63 20 77 68 69 63 | 68 0d 2a 20 20 73 68 6f |doc whic|h.* sho|
|00000450| 75 6c 64 20 62 65 20 64 | 69 73 74 72 69 62 75 74 |uld be d|istribut|
|00000460| 65 64 20 77 69 74 68 20 | 74 68 69 73 20 66 69 6c |ed with |this fil|
|00000470| 65 2e 20 49 66 20 70 6f | 76 6c 65 67 61 6c 2e 64 |e. If po|vlegal.d|
|00000480| 6f 63 20 69 73 20 6e 6f | 74 20 61 76 61 69 6c 61 |oc is no|t availa|
|00000490| 62 6c 65 0d 2a 20 20 6f | 72 20 66 6f 72 20 6d 6f |ble.* o|r for mo|
|000004a0| 72 65 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 70 |re infor|mation p|
|000004b0| 6c 65 61 73 65 20 63 6f | 6e 74 61 63 74 3a 0d 2a |lease co|ntact:.*|
|000004c0| 0d 2a 20 20 20 20 20 20 | 20 44 72 65 77 20 57 65 |.* | Drew We|
|000004d0| 6c 6c 73 20 5b 50 4f 56 | 2d 54 65 61 6d 20 4c 65 |lls [POV|-Team Le|
|000004e0| 61 64 65 72 5d 20 0d 2a | 20 20 20 20 20 20 20 43 |ader] .*| C|
|000004f0| 49 53 3a 20 37 33 37 36 | 37 2c 31 32 34 34 20 20 |IS: 7376|7,1244 |
|00000500| 49 6e 74 65 72 6e 65 74 | 3a 20 37 33 37 36 37 2e |Internet|: 73767.|
|00000510| 31 32 34 34 40 63 6f 6d | 70 75 73 65 72 76 65 2e |1244@com|puserve.|
|00000520| 63 6f 6d 0d 2a 20 20 20 | 20 20 20 20 50 68 6f 6e |com.* | Phon|
|00000530| 65 3a 20 28 32 31 33 29 | 20 32 35 34 2d 34 30 34 |e: (213)| 254-404|
|00000540| 31 0d 2a 20 0d 2a 20 54 | 68 69 73 20 70 72 6f 67 |1.* .* T|his prog|
|00000550| 72 61 6d 20 69 73 20 62 | 61 73 65 64 20 6f 6e 20 |ram is b|ased on |
|00000560| 74 68 65 20 70 6f 70 75 | 6c 61 72 20 44 4b 42 20 |the popu|lar DKB |
|00000570| 72 61 79 74 72 61 63 65 | 72 20 76 65 72 73 69 6f |raytrace|r versio|
|00000580| 6e 20 32 2e 31 32 2e 0d | 2a 20 44 4b 42 54 72 61 |n 2.12..|* DKBTra|
|00000590| 63 65 20 77 61 73 20 6f | 72 69 67 69 6e 61 6c 6c |ce was o|riginall|
|000005a0| 79 20 77 72 69 74 74 65 | 6e 20 62 79 20 44 61 76 |y writte|n by Dav|
|000005b0| 69 64 20 4b 2e 20 42 75 | 63 6b 2e 0d 2a 20 44 4b |id K. Bu|ck..* DK|
|000005c0| 42 54 72 61 63 65 20 56 | 65 72 20 32 2e 30 2d 32 |BTrace V|er 2.0-2|
|000005d0| 2e 31 32 20 77 65 72 65 | 20 77 72 69 74 74 65 6e |.12 were| written|
|000005e0| 20 62 79 20 44 61 76 69 | 64 20 4b 2e 20 42 75 63 | by Davi|d K. Buc|
|000005f0| 6b 20 26 20 41 61 72 6f | 6e 20 41 2e 20 43 6f 6c |k & Aaro|n A. Col|
|00000600| 6c 69 6e 73 2e 0d 0d 2a | 2f 0d 0d 2f 2a 20 53 74 |lins...*|/../* St|
|00000610| 61 6e 64 61 72 64 20 43 | 20 68 65 61 64 65 72 73 |andard C| headers|
|00000620| 20 2a 2f 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 | */.#inc|lude <st|
|00000630| 64 6c 69 62 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |dlib.h>.|#include|
|00000640| 20 3c 73 65 74 6a 6d 70 | 2e 68 3e 0d 0d 23 69 6e | <setjmp|.h>..#in|
|00000650| 63 6c 75 64 65 20 22 66 | 72 61 6d 65 2e 68 22 0d |clude "f|rame.h".|
|00000660| 23 69 6e 63 6c 75 64 65 | 20 22 70 6f 76 70 72 6f |#include| "povpro|
|00000670| 74 6f 2e 68 22 0d 0d 0d | 2f 2a 20 4d 61 63 69 6e |to.h"...|/* Macin|
|00000680| 74 6f 73 68 2d 73 70 65 | 63 69 66 69 63 20 68 65 |tosh-spe|cific he|
|00000690| 61 64 65 72 73 20 2a 2f | 0d 23 69 6e 63 6c 75 64 |aders */|.#includ|
|000006a0| 65 20 3c 43 6f 6e 74 72 | 6f 6c 73 2e 68 3e 0d 23 |e <Contr|ols.h>.#|
|000006b0| 69 6e 63 6c 75 64 65 20 | 3c 44 65 73 6b 2e 68 3e |include |<Desk.h>|
|000006c0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 44 69 61 6c 6f |.#includ|e <Dialo|
|000006d0| 67 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |gs.h>.#i|nclude <|
|000006e0| 46 69 6c 65 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Files.h>|.#includ|
|000006f0| 65 20 3c 4d 65 6d 6f 72 | 79 2e 68 3e 0d 23 69 6e |e <Memor|y.h>.#in|
|00000700| 63 6c 75 64 65 20 3c 4d | 65 6e 75 73 2e 68 3e 0d |clude <M|enus.h>.|
|00000710| 23 69 6e 63 6c 75 64 65 | 20 3c 4f 53 45 76 65 6e |#include| <OSEven|
|00000720| 74 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ts.h>.#i|nclude <|
|00000730| 4f 53 55 74 69 6c 73 2e | 68 3e 0d 23 69 6e 63 6c |OSUtils.|h>.#incl|
|00000740| 75 64 65 20 3c 50 61 63 | 6b 61 67 65 73 2e 68 3e |ude <Pac|kages.h>|
|00000750| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 51 75 69 63 6b |.#includ|e <Quick|
|00000760| 44 72 61 77 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |Draw.h>.|#include|
|00000770| 20 3c 52 65 73 6f 75 72 | 63 65 73 2e 68 3e 0d 23 | <Resour|ces.h>.#|
|00000780| 69 6e 63 6c 75 64 65 20 | 3c 54 79 70 65 73 2e 68 |include |<Types.h|
|00000790| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 57 69 6e 64 |>.#inclu|de <Wind|
|000007a0| 6f 77 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ows.h>.#|include |
|000007b0| 3c 73 63 72 61 70 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<scrap.h|>.#inclu|
|000007c0| 64 65 20 3c 73 68 75 74 | 64 6f 77 6e 2e 68 3e 0d |de <shut|down.h>.|
|000007d0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 6f 75 6e 64 2e |#include| <sound.|
|000007e0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 41 70 70 |h>.#incl|ude <App|
|000007f0| 6c 65 45 76 65 6e 74 73 | 2e 68 3e 0d 23 69 6e 63 |leEvents|.h>.#inc|
|00000800| 6c 75 64 65 20 3c 47 65 | 73 74 61 6c 74 45 71 75 |lude <Ge|staltEqu|
|00000810| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 46 6f |.h>.#inc|lude <Fo|
|00000820| 6c 64 65 72 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |lders.h>|.#includ|
|00000830| 65 20 3c 65 72 72 6f 72 | 73 2e 68 3e 09 09 09 2f |e <error|s.h>.../|
|00000840| 2a 20 64 75 70 46 4e 45 | 72 72 2c 20 65 74 63 20 |* dupFNE|rr, etc |
|00000850| 2a 2f 0d 23 69 6e 63 6c | 75 64 65 20 3c 66 6f 6e |*/.#incl|ude <fon|
|00000860| 74 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ts.h>.#i|nclude <|
|00000870| 73 65 67 6c 6f 61 64 2e | 68 3e 09 09 2f 2a 55 6e |segload.|h>../*Un|
|00000880| 6c 6f 61 64 53 65 67 2a | 2f 0d 23 69 6e 63 6c 75 |loadSeg*|/.#inclu|
|00000890| 64 65 20 3c 65 70 70 63 | 2e 68 3e 09 09 09 2f 2a |de <eppc|.h>.../*|
|000008a0| 20 6b 48 69 67 68 4c 65 | 76 65 6c 45 76 65 6e 74 | kHighLe|velEvent|
|000008b0| 20 2a 2f 0d 23 69 6e 63 | 6c 75 64 65 20 3c 74 72 | */.#inc|lude <tr|
|000008c0| 61 70 73 2e 68 3e 09 09 | 09 2f 2a 20 5f 55 6e 69 |aps.h>..|./* _Uni|
|000008d0| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 2a 2f 0d 23 69 |mplement|ed */.#i|
|000008e0| 66 64 65 66 20 61 70 70 | 6c 65 63 0d 23 69 6e 63 |fdef app|lec.#inc|
|000008f0| 6c 75 64 65 20 3c 73 74 | 72 69 6e 67 73 2e 68 3e |lude <st|rings.h>|
|00000900| 09 09 2f 2a 70 32 63 73 | 74 72 2a 2f 0d 23 65 6e |../*p2cs|tr*/.#en|
|00000910| 64 69 66 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |dif.#inc|lude <st|
|00000920| 72 69 6e 67 2e 68 3e 09 | 09 09 2f 2a 73 74 72 63 |ring.h>.|../*strc|
|00000930| 70 79 2f 63 61 74 2a 2f | 0d 23 69 6e 63 6c 75 64 |py/cat*/|.#includ|
|00000940| 65 20 3c 74 6f 6f 6c 75 | 74 69 6c 73 2e 68 3e 09 |e <toolu|tils.h>.|
|00000950| 09 2f 2a 20 42 69 74 54 | 73 74 2c 20 65 74 63 20 |./* BitT|st, etc |
|00000960| 2a 2f 0d 0d 2f 2a 20 4d | 50 57 20 50 65 72 66 6f |*/../* M|PW Perfo|
|00000970| 72 6d 61 6e 63 65 20 74 | 6f 6f 6c 20 63 6f 64 65 |rmance t|ool code|
|00000980| 20 2a 2f 0d 23 69 66 64 | 65 66 20 61 70 70 6c 65 | */.#ifd|ef apple|
|00000990| 63 0d 23 69 66 64 65 66 | 20 4e 45 45 44 53 5f 50 |c.#ifdef| NEEDS_P|
|000009a0| 45 52 46 0d 23 69 6e 63 | 6c 75 64 65 20 3c 70 65 |ERF.#inc|lude <pe|
|000009b0| 72 66 2e 68 3e 0d 23 65 | 6e 64 69 66 20 4e 45 45 |rf.h>.#e|ndif NEE|
|000009c0| 44 53 5f 50 45 52 46 0d | 23 65 6e 64 69 66 20 61 |DS_PERF.|#endif a|
|000009d0| 70 70 6c 65 63 0d 0d 23 | 69 6e 63 6c 75 64 65 09 |pplec..#|include.|
|000009e0| 22 53 61 76 65 43 6d 70 | 50 69 63 74 2e 68 22 0d |"SaveCmp|Pict.h".|
|000009f0| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 22 50 4f 56 4d |..#inclu|de "POVM|
|00000a00| 61 63 2e 68 22 09 09 09 | 2f 2a 20 69 6e 63 6c 75 |ac.h"...|/* inclu|
|00000a10| 64 65 73 20 66 75 6e 63 | 74 69 6f 6e 20 70 72 6f |des func|tion pro|
|00000a20| 74 6f 74 79 70 65 73 20 | 2a 2f 0d 0d 2f 2a 20 70 |totypes |*/../* p|
|00000a30| 72 69 6e 74 66 20 63 61 | 70 74 75 72 65 20 77 69 |rintf ca|pture wi|
|00000a40| 6e 64 6f 77 20 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |ndow */.|#include|
|00000a50| 20 22 70 72 69 6e 74 66 | 32 77 69 6e 64 6f 77 2e | "printf|2window.|
|00000a60| 68 22 0d 0d 2f 2a 20 54 | 68 65 73 65 20 23 64 65 |h"../* T|hese #de|
|00000a70| 66 69 6e 65 73 20 6d 61 | 70 20 54 68 69 6e 6b 20 |fines ma|p Think |
|00000a80| 43 20 6e 61 6d 65 73 20 | 69 6e 74 6f 20 74 68 65 |C names |into the|
|00000a90| 69 72 20 4d 50 57 20 43 | 20 65 71 75 69 76 61 6c |ir MPW C| equival|
|00000aa0| 65 6e 74 20 2a 2f 0d 23 | 69 66 64 65 66 20 61 70 |ent */.#|ifdef ap|
|00000ab0| 70 6c 65 63 0d 23 64 65 | 66 69 6e 65 20 43 74 6f |plec.#de|fine Cto|
|00000ac0| 50 73 74 72 09 63 32 70 | 73 74 72 0d 23 64 65 66 |Pstr.c2p|str.#def|
|00000ad0| 69 6e 65 20 50 74 6f 43 | 73 74 72 09 70 32 63 73 |ine PtoC|str.p2cs|
|00000ae0| 74 72 0d 23 64 65 66 69 | 6e 65 20 4f 4b 09 09 6f |tr.#defi|ne OK..o|
|00000af0| 6b 0d 23 64 65 66 69 6e | 65 20 43 61 6e 63 65 6c |k.#defin|e Cancel|
|00000b00| 09 63 61 6e 63 65 6c 0d | 23 65 6e 64 69 66 20 61 |.cancel.|#endif a|
|00000b10| 70 70 6c 65 63 0d 0d 23 | 64 65 66 69 6e 65 20 72 |pplec..#|define r|
|00000b20| 65 73 65 72 76 65 4d 65 | 6d 53 69 7a 65 09 38 30 |eserveMe|mSize.80|
|00000b30| 30 30 30 4c 09 2f 2a 20 | 6f 75 74 2d 6f 66 2d 6d |000L./* |out-of-m|
|00000b40| 65 6d 20 72 65 73 65 72 | 76 65 20 73 70 61 63 65 |em reser|ve space|
|00000b50| 20 2a 2f 0d 0d 23 64 65 | 66 69 6e 65 20 5f 51 44 | */..#de|fine _QD|
|00000b60| 33 32 54 72 61 70 20 30 | 78 41 42 30 33 20 2f 2a |32Trap 0|xAB03 /*|
|00000b70| 20 33 32 20 62 69 74 20 | 51 75 69 63 6b 64 72 61 | 32 bit |Quickdra|
|00000b80| 77 20 74 72 61 70 20 2a | 2f 0d 0d 2f 2a 20 6b 65 |w trap *|/../* ke|
|00000b90| 79 62 6f 61 72 64 20 76 | 61 6c 75 65 73 20 75 73 |yboard v|alues us|
|00000ba0| 65 64 20 62 79 20 4d 6f | 64 61 6c 46 69 6c 74 65 |ed by Mo|dalFilte|
|00000bb0| 72 28 29 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |r() */.#|define k|
|00000bc0| 52 65 74 75 72 6e 4b 65 | 79 09 09 30 78 30 44 0d |ReturnKe|y..0x0D.|
|00000bd0| 23 64 65 66 69 6e 65 20 | 6b 45 6e 74 65 72 4b 65 |#define |kEnterKe|
|00000be0| 79 09 09 30 78 30 33 0d | 23 64 65 66 69 6e 65 20 |y..0x03.|#define |
|00000bf0| 6b 45 73 63 4b 65 79 09 | 09 09 30 78 31 42 0d 23 |kEscKey.|..0x1B.#|
|00000c00| 64 65 66 69 6e 65 20 6b | 54 61 62 4b 65 79 09 09 |define k|TabKey..|
|00000c10| 09 30 78 30 39 0d 0d 2f | 2a 20 41 6c 6c 20 64 69 |.0x09../|* All di|
|00000c20| 61 6c 6f 67 73 20 68 61 | 76 65 20 61 20 75 73 65 |alogs ha|ve a use|
|00000c30| 72 20 69 74 65 6d 20 23 | 33 20 66 6f 72 20 6f 75 |r item #|3 for ou|
|00000c40| 74 6c 69 6e 69 6e 67 20 | 62 75 74 74 6f 6e 73 20 |tlining |buttons |
|00000c50| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 44 65 66 61 |*/.#defi|ne kDefa|
|00000c60| 75 6c 74 49 74 65 6d 09 | 33 0d 0d 2f 2a 20 44 69 |ultItem.|3../* Di|
|00000c70| 61 6c 6f 67 20 72 65 73 | 6f 75 72 63 65 20 49 44 |alog res|ource ID|
|00000c80| 73 20 2a 2f 0d 23 64 65 | 66 69 6e 65 09 6b 64 6c |s */.#de|fine.kdl|
|00000c90| 6f 67 5f 50 32 57 5f 49 | 4e 49 54 5f 45 52 52 4f |og_P2W_I|NIT_ERRO|
|00000ca0| 52 09 39 36 30 31 0d 23 | 64 65 66 69 6e 65 09 6b |R.9601.#|define.k|
|00000cb0| 64 6c 6f 67 5f 54 4f 4f | 5f 4d 41 4e 59 5f 46 49 |dlog_TOO|_MANY_FI|
|00000cc0| 4c 45 53 09 31 35 31 0d | 0d 23 64 65 66 69 6e 65 |LES.151.|.#define|
|00000cd0| 09 6b 4d 69 6e 4d 75 6c | 74 69 46 72 69 65 6e 64 |.kMinMul|tiFriend|
|00000ce0| 6c 79 09 31 0d 23 64 65 | 66 69 6e 65 09 6b 44 65 |ly.1.#de|fine.kDe|
|00000cf0| 66 4d 75 6c 74 69 46 72 | 69 65 6e 64 6c 79 09 34 |fMultiFr|iendly.4|
|00000d00| 0d 23 64 65 66 69 6e 65 | 09 6b 4d 61 78 4d 75 6c |.#define|.kMaxMul|
|00000d10| 74 69 46 72 69 65 6e 64 | 6c 79 09 31 35 0d 0d 2f |tiFriend|ly.15../|
|00000d20| 2a 20 54 68 65 20 46 69 | 6e 64 65 72 20 45 76 65 |* The Fi|nder Eve|
|00000d30| 6e 74 73 20 53 75 69 74 | 65 20 2d 20 64 65 66 69 |nts Suit|e - defi|
|00000d40| 6e 65 64 20 69 6e 20 74 | 68 65 20 6e 6f 74 2d 79 |ned in t|he not-y|
|00000d50| 65 74 2d 65 78 69 73 74 | 69 6e 67 20 3c 41 45 52 |et-exist|ing <AER|
|00000d60| 65 67 69 73 74 72 79 2e | 68 3e 20 2a 2f 0d 23 64 |egistry.|h> */.#d|
|00000d70| 65 66 69 6e 65 20 6b 41 | 45 46 69 6e 64 65 72 45 |efine kA|EFinderE|
|00000d80| 76 65 6e 74 73 20 27 46 | 4e 44 52 27 0d 0d 0d 23 |vents 'F|NDR'...#|
|00000d90| 69 66 64 65 66 20 61 70 | 70 6c 65 63 0d 2f 2a 20 |ifdef ap|plec./* |
|00000da0| 65 6e 74 72 79 20 70 6f | 69 6e 74 20 74 6f 20 25 |entry po|int to %|
|00000db0| 61 35 69 6e 69 74 20 73 | 65 67 6d 65 6e 74 2c 20 |a5init s|egment, |
|00000dc0| 66 6f 72 20 64 69 73 70 | 6f 73 61 6c 20 61 66 74 |for disp|osal aft|
|00000dd0| 65 72 20 69 6e 69 74 20 | 2a 2f 0d 65 78 74 65 72 |er init |*/.exter|
|00000de0| 6e 20 76 6f 69 64 20 5f | 44 61 74 61 49 6e 69 74 |n void _|DataInit|
|00000df0| 28 29 3b 0d 0d 23 69 66 | 64 65 66 20 4e 45 45 44 |();..#if|def NEED|
|00000e00| 53 5f 50 45 52 46 0d 54 | 50 32 50 65 72 66 47 6c |S_PERF.T|P2PerfGl|
|00000e10| 6f 62 61 6c 73 09 54 68 | 65 50 47 6c 6f 62 61 6c |obals.Th|ePGlobal|
|00000e20| 73 3b 09 2f 2a 20 70 65 | 72 66 6f 72 6d 61 6e 63 |s;./* pe|rformanc|
|00000e30| 65 20 67 6c 6f 62 61 6c | 73 20 72 65 63 20 2a 2f |e global|s rec */|
|00000e40| 0d 23 65 6e 64 69 66 20 | 4e 45 45 44 53 5f 50 45 |.#endif |NEEDS_PE|
|00000e50| 52 46 0d 23 65 6e 64 69 | 66 20 61 70 70 6c 65 63 |RF.#endi|f applec|
|00000e60| 0d 0d 2f 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |../*-*-*|-*-*-*-*|
|00000e70| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000e80| 2d 2a 2d 2a 20 50 4f 56 | 2d 52 61 79 20 65 78 74 |-*-* POV|-Ray ext|
|00000e90| 65 72 6e 61 6c 73 20 2a | 2d 2a 2d 2a 2d 2a 2d 2a |ernals *|-*-*-*-*|
|00000ea0| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000eb0| 2d 2a 2d 2a 2f 0d 65 78 | 74 65 72 6e 20 76 6f 69 |-*-*/.ex|tern voi|
|00000ec0| 64 20 61 6c 74 5f 6d 61 | 69 6e 28 73 68 6f 72 74 |d alt_ma|in(short|
|00000ed0| 20 61 72 67 63 2c 20 63 | 68 61 72 20 2a 2a 61 72 | argc, c|har **ar|
|00000ee0| 67 76 29 3b 0d 76 6f 6c | 61 74 69 6c 65 20 65 78 |gv);.vol|atile ex|
|00000ef0| 74 65 72 6e 20 69 6e 74 | 20 53 74 6f 70 5f 46 6c |tern int| Stop_Fl|
|00000f00| 61 67 3b 0d 65 78 74 65 | 72 6e 20 69 6e 74 20 74 |ag;.exte|rn int t|
|00000f10| 6f 6b 65 6e 5f 63 6f 75 | 6e 74 2c 20 6c 69 6e 65 |oken_cou|nt, line|
|00000f20| 5f 63 6f 75 6e 74 3b 0d | 65 78 74 65 72 6e 20 44 |_count;.|extern D|
|00000f30| 42 4c 20 4d 61 78 5f 54 | 72 61 63 65 5f 4c 65 76 |BL Max_T|race_Lev|
|00000f40| 65 6c 3b 0d 65 78 74 65 | 72 6e 20 43 4f 4c 4f 55 |el;.exte|rn COLOU|
|00000f50| 52 5f 4d 41 50 5f 45 4e | 54 52 59 20 2a 43 6f 6e |R_MAP_EN|TRY *Con|
|00000f60| 73 74 72 75 63 74 69 6f | 6e 5f 4d 61 70 3b 0d 65 |structio|n_Map;.e|
|00000f70| 78 74 65 72 6e 20 69 6e | 74 20 54 61 72 67 61 5f |xtern in|t Targa_|
|00000f80| 4c 69 6e 65 5f 4e 75 6d | 62 65 72 3b 0d 0d 2f 2a |Line_Num|ber;../*|
|00000f90| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000fa0| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000fb0| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000fc0| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000fd0| 2d 2a 2d 2a 2d 2a 2d 2a | 2d 2a 2d 2a 2d 2a 2d 2a |-*-*-*-*|-*-*-*-*|
|00000fe0| 2f 0d 0d 0d 2f 2a 20 45 | 78 74 65 72 6e 61 6c 73 |/.../* E|xternals|
|00000ff0| 20 66 72 6f 6d 20 74 68 | 65 20 74 65 78 74 20 65 | from th|e text e|
|00001000| 64 69 74 6f 72 20 2a 2f | 0d 65 78 74 65 72 6e 20 |ditor */|.extern |
|00001010| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 53 63 72 6f |pascal v|oid Scro|
|00001020| 6c 6c 50 72 6f 63 20 28 | 43 6f 6e 74 72 6f 6c 48 |llProc (|ControlH|
|00001030| 61 6e 64 6c 65 20 74 68 | 65 43 6f 6e 74 72 6f 6c |andle th|eControl|
|00001040| 2c 20 73 68 6f 72 74 20 | 74 68 65 43 6f 64 65 29 |, short |theCode)|
|00001050| 3b 0d 2f 2f 20 65 78 74 | 65 72 6e 20 70 61 73 63 |;.// ext|ern pasc|
|00001060| 61 6c 20 76 6f 69 64 20 | 53 63 72 6f 6c 6c 50 72 |al void |ScrollPr|
|00001070| 6f 63 20 28 43 6f 6e 74 | 72 6f 6c 48 61 6e 64 6c |oc (Cont|rolHandl|
|00001080| 65 20 74 68 65 43 6f 6e | 74 72 6f 6c 2c 20 69 6e |e theCon|trol, in|
|00001090| 74 20 74 68 65 43 6f 64 | 65 29 3b 0d 65 78 74 65 |t theCod|e);.exte|
|000010a0| 72 6e 20 57 69 6e 64 6f | 77 52 65 63 6f 72 64 09 |rn Windo|wRecord.|
|000010b0| 09 77 52 65 63 6f 72 64 | 3b 0d 65 78 74 65 72 6e |.wRecord|;.extern|
|000010c0| 20 57 69 6e 64 6f 77 50 | 74 72 09 09 54 65 78 74 | WindowP|tr..Text|
|000010d0| 45 64 69 74 57 69 6e 64 | 6f 77 3b 0d 65 78 74 65 |EditWind|ow;.exte|
|000010e0| 72 6e 20 54 45 48 61 6e | 64 6c 65 09 09 09 54 45 |rn TEHan|dle...TE|
|000010f0| 48 3b 0d 65 78 74 65 72 | 6e 20 63 68 61 72 09 09 |H;.exter|n char..|
|00001100| 09 09 64 69 72 74 79 3b | 0d 65 78 74 65 72 6e 20 |..dirty;|.extern |
|00001110| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 20 09 76 |ControlH|andle .v|
|00001120| 53 63 72 6f 6c 6c 3b 0d | 65 78 74 65 72 6e 20 63 |Scroll;.|extern c|
|00001130| 68 61 72 09 09 09 09 77 | 69 6e 64 6f 77 5f 76 69 |har....w|indow_vi|
|00001140| 73 69 62 6c 65 3b 0d 65 | 78 74 65 72 6e 20 53 74 |sible;.e|xtern St|
|00001150| 72 32 35 35 20 09 09 09 | 74 68 65 46 69 6c 65 4e |r255 ...|theFileN|
|00001160| 61 6d 65 3b 0d 65 78 74 | 65 72 6e 20 73 68 6f 72 |ame;.ext|ern shor|
|00001170| 74 09 09 09 74 68 65 56 | 52 65 66 4e 75 6d 3b 0d |t...theV|RefNum;.|
|00001180| 65 78 74 65 72 6e 20 43 | 75 72 73 6f 72 09 09 09 |extern C|ursor...|
|00001190| 77 61 69 74 43 75 72 73 | 6f 72 3b 0d 0d 23 64 65 |waitCurs|or;..#de|
|000011a0| 66 69 6e 65 09 50 49 43 | 54 46 5f 48 45 41 44 45 |fine.PIC|TF_HEADE|
|000011b0| 52 5f 53 49 5a 45 09 35 | 31 32 09 09 2f 2f 20 6f |R_SIZE.5|12..// o|
|000011c0| 6c 64 20 4d 61 63 44 72 | 61 77 20 50 49 43 54 46 |ld MacDr|aw PICTF|
|000011d0| 20 68 65 61 64 65 72 0d | 0d 2f 2a 20 50 69 63 74 | header.|./* Pict|
|000011e0| 20 66 69 6c 65 20 68 65 | 61 64 65 72 20 73 74 72 | file he|ader str|
|000011f0| 75 63 74 75 72 65 20 28 | 61 66 74 65 72 20 74 68 |ucture (|after th|
|00001200| 65 20 35 31 32 20 62 79 | 74 65 20 68 65 61 64 65 |e 512 by|te heade|
|00001210| 72 29 20 2a 2f 0d 74 79 | 70 65 64 65 66 20 73 74 |r) */.ty|pedef st|
|00001220| 72 75 63 74 0d 7b 0d 09 | 73 68 6f 72 74 09 09 70 |ruct.{..|short..p|
|00001230| 69 63 53 69 7a 65 3b 09 | 09 2f 2f 20 6c 6f 77 20 |icSize;.|.// low |
|00001240| 77 6f 72 64 20 6f 66 20 | 73 69 7a 65 0d 09 52 65 |word of |size..Re|
|00001250| 63 74 09 09 70 69 63 46 | 72 61 6d 65 3b 09 09 2f |ct..picF|rame;../|
|00001260| 2f 20 70 69 63 74 75 72 | 65 20 62 6f 75 6e 64 73 |/ pictur|e bounds|
|00001270| 0d 7d 20 50 69 63 74 46 | 48 65 61 64 65 72 2c 20 |.} PictF|Header, |
|00001280| 2a 50 69 63 74 46 48 65 | 61 64 65 72 50 74 72 3b |*PictFHe|aderPtr;|
|00001290| 0d 0d 50 69 63 48 61 6e | 64 6c 65 09 6d 79 50 69 |..PicHan|dle.myPi|
|000012a0| 63 48 61 6e 64 6c 65 3b | 09 2f 2f 20 75 73 65 64 |cHandle;|.// used|
|000012b0| 20 62 79 20 50 61 69 6e | 74 5f 74 6f 5f 50 69 63 | by Pain|t_to_Pic|
|000012c0| 74 75 72 65 28 29 20 61 | 6e 64 20 4d 79 50 75 74 |ture() a|nd MyPut|
|000012d0| 50 69 63 50 72 6f 63 28 | 29 0d 6c 6f 6e 67 09 09 |PicProc(|).long..|
|000012e0| 6d 79 50 69 63 53 69 7a | 65 3b 09 09 2f 2f 20 75 |myPicSiz|e;..// u|
|000012f0| 73 65 64 20 62 79 20 50 | 61 69 6e 74 5f 74 6f 5f |sed by P|aint_to_|
|00001300| 50 69 63 74 75 72 65 28 | 29 20 61 6e 64 20 4d 79 |Picture(|) and My|
|00001310| 50 75 74 50 69 63 50 72 | 6f 63 28 29 0d 0d 6a 6d |PutPicPr|oc()..jm|
|00001320| 70 5f 62 75 66 09 09 65 | 6e 76 3b 0d 69 6e 74 09 |p_buf..e|nv;.int.|
|00001330| 09 09 50 4f 56 5f 72 75 | 6e 6e 69 6e 67 20 3d 20 |..POV_ru|nning = |
|00001340| 30 3b 09 2f 2a 20 55 73 | 65 64 20 74 6f 20 64 65 |0;./* Us|ed to de|
|00001350| 74 65 72 6d 69 6e 65 20 | 74 68 65 20 6d 65 6e 75 |termine |the menu|
|00001360| 20 73 74 61 74 65 73 2e | 20 2a 2f 0d 0d 69 6e 74 | states.| */..int|
|00001370| 09 09 09 41 52 47 43 3b | 0d 63 68 61 72 09 09 2a |...ARGC;|.char..*|
|00001380| 41 52 47 56 5b 33 32 5d | 2c 20 61 72 67 73 74 72 |ARGV[32]|, argstr|
|00001390| 5b 31 30 32 34 5d 2c 20 | 2a 61 72 67 70 74 72 3b |[1024], |*argptr;|
|000013a0| 0d 0d 73 68 6f 72 74 09 | 09 6f 75 72 52 65 66 4e |..short.|.ourRefN|
|000013b0| 75 6d 2c 20 70 72 65 66 | 73 52 65 66 4e 75 6d 2c |um, pref|sRefNum,|
|000013c0| 20 66 69 6c 65 52 65 73 | 52 65 66 4e 75 6d 3b 0d | fileRes|RefNum;.|
|000013d0| 63 68 61 72 09 09 74 61 | 72 67 61 4f 75 74 4e 61 |char..ta|rgaOutNa|
|000013e0| 6d 65 5b 32 35 36 5d 3b | 09 2f 2a 20 6e 61 6d 65 |me[256];|./* name|
|000013f0| 20 6f 66 20 54 61 72 67 | 61 20 6f 75 74 70 75 74 | of Targ|a output|
|00001400| 20 66 69 6c 65 20 2a 2f | 0d 50 69 78 4d 61 70 48 | file */|.PixMapH|
|00001410| 61 6e 64 6c 65 20 70 6d | 3b 0d 57 69 6e 64 6f 77 |andle pm|;.Window|
|00001420| 50 74 72 09 70 6c 6f 74 | 5f 77 69 6e 64 6f 77 20 |Ptr.plot|_window |
|00001430| 3d 20 4e 55 4c 4c 3b 0d | 50 74 72 09 09 09 70 6c |= NULL;.|Ptr...pl|
|00001440| 6f 74 5f 70 69 78 6d 61 | 70 20 3d 20 4e 55 4c 4c |ot_pixma|p = NULL|
|00001450| 3b 0d 50 74 72 09 09 09 | 75 6e 64 6f 5f 62 75 66 |;.Ptr...|undo_buf|
|00001460| 66 65 72 20 3d 20 4e 55 | 4c 4c 3b 0d 50 74 72 09 |fer = NU|LL;.Ptr.|
|00001470| 09 09 75 6e 64 6f 5f 62 | 75 66 66 65 72 32 20 3d |..undo_b|uffer2 =|
|00001480| 20 4e 55 4c 4c 3b 0d 50 | 74 72 09 09 09 72 65 76 | NULL;.P|tr...rev|
|00001490| 65 72 74 5f 62 75 66 66 | 65 72 20 3d 20 4e 55 4c |ert_buff|er = NUL|
|000014a0| 4c 3b 0d 0d 6c 6f 6e 67 | 09 09 67 6c 6f 62 61 6c |L;..long|..global|
|000014b0| 5f 62 75 66 73 69 7a 65 | 3b 0d 0d 73 68 6f 72 74 |_bufsize|;..short|
|000014c0| 09 09 75 6e 64 6f 61 62 | 6c 65 20 3d 20 30 3b 09 |..undoab|le = 0;.|
|000014d0| 09 2f 2a 20 63 61 6e 20 | 77 65 20 75 6e 64 6f 20 |./* can |we undo |
|000014e0| 74 68 69 73 20 6f 70 65 | 72 61 74 69 6f 6e 3f 20 |this ope|ration? |
|000014f0| 2a 2f 0d 0d 73 68 6f 72 | 74 09 09 62 61 63 6b 67 |*/..shor|t..backg|
|00001500| 72 6f 75 6e 64 69 6e 67 | 20 3d 20 30 3b 09 2f 2a |rounding| = 0;./*|
|00001510| 20 69 73 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 | is the |program |
|00001520| 63 75 72 72 65 6e 74 6c | 79 20 62 61 63 6b 67 72 |currentl|y backgr|
|00001530| 6f 75 6e 64 65 64 3f 20 | 2a 2f 0d 73 68 6f 72 74 |ounded? |*/.short|
|00001540| 09 09 64 6f 5f 6e 6f 74 | 69 66 79 20 3d 20 30 3b |..do_not|ify = 0;|
|00001550| 09 09 2f 2a 20 69 6e 66 | 6f 72 6d 20 75 73 65 72 |../* inf|orm user|
|00001560| 20 6f 66 20 63 6f 6d 70 | 6c 65 74 65 64 20 74 72 | of comp|leted tr|
|00001570| 61 63 65 20 2a 2f 0d 52 | 65 63 74 09 09 70 6c 6f |ace */.R|ect..plo|
|00001580| 74 5f 62 6f 75 6e 64 73 | 2c 20 64 69 73 70 5f 70 |t_bounds|, disp_p|
|00001590| 6c 6f 74 5f 62 6f 75 6e | 64 73 3b 0d 73 68 6f 72 |lot_boun|ds;.shor|
|000015a0| 74 09 09 67 6c 6f 62 61 | 6c 5f 77 69 64 74 68 2c |t..globa|l_width,|
|000015b0| 20 67 6c 6f 62 61 6c 5f | 68 65 69 67 68 74 2c 20 | global_|height, |
|000015c0| 67 6c 6f 62 61 6c 5f 79 | 3b 0d 0d 69 6e 74 09 09 |global_y|;..int..|
|000015d0| 09 69 6e 5f 70 61 72 73 | 65 20 3d 20 30 3b 09 09 |.in_pars|e = 0;..|
|000015e0| 2f 2a 20 74 72 61 63 6b | 20 6d 61 6c 6c 6f 63 28 |/* track| malloc(|
|000015f0| 29 20 61 6e 64 20 66 72 | 65 65 28 29 20 64 75 72 |) and fr|ee() dur|
|00001600| 69 6e 67 20 70 61 72 73 | 65 20 6f 6e 6c 79 21 20 |ing pars|e only! |
|00001610| 2a 2f 0d 6c 6f 6e 67 09 | 09 4d 79 54 69 63 6b 43 |*/.long.|.MyTickC|
|00001620| 6f 75 6e 74 20 3d 20 30 | 3b 09 2f 2a 20 54 69 6d |ount = 0|;./* Tim|
|00001630| 65 20 6f 66 20 6c 61 73 | 74 20 45 76 65 6e 74 20 |e of las|t Event |
|00001640| 6d 61 6e 61 67 65 72 20 | 63 61 6c 6c 20 2a 2f 0d |manager |call */.|
|00001650| 6c 6f 6e 67 09 09 4d 79 | 52 65 66 72 65 73 68 43 |long..My|RefreshC|
|00001660| 6f 75 6e 74 20 3d 20 30 | 3b 20 2f 2a 20 54 69 6d |ount = 0|; /* Tim|
|00001670| 65 20 6f 66 20 6c 61 73 | 74 20 51 75 69 63 6b 64 |e of las|t Quickd|
|00001680| 72 61 77 20 64 69 74 68 | 65 72 20 6f 66 20 67 72 |raw dith|er of gr|
|00001690| 61 70 68 69 63 20 70 6f | 72 74 20 2a 2f 0d 69 6e |aphic po|rt */.in|
|000016a0| 74 09 09 09 6c 61 73 74 | 44 72 61 77 6e 59 20 3d |t...last|DrawnY =|
|000016b0| 20 30 3b 09 09 2f 2a 20 | 6c 61 73 74 20 76 65 72 | 0;../* |last ver|
|000016c0| 74 69 63 61 6c 20 70 6f | 73 69 74 69 6f 6e 20 64 |tical po|sition d|
|000016d0| 75 72 69 6e 67 20 70 72 | 65 76 69 6f 75 73 20 72 |uring pr|evious r|
|000016e0| 65 66 72 65 73 68 20 2a | 2f 0d 69 6e 74 09 09 09 |efresh *|/.int...|
|000016f0| 57 4e 45 61 76 61 69 6c | 61 62 6c 65 20 3d 20 30 |WNEavail|able = 0|
|00001700| 3b 20 09 2f 2a 20 52 75 | 6e 6e 69 6e 67 20 75 6e |; ./* Ru|nning un|
|00001710| 64 65 72 20 4d 75 6c 74 | 69 46 69 6e 64 65 72 20 |der Mult|iFinder |
|00001720| 6f 72 20 53 79 73 74 65 | 6d 20 37 3f 20 2a 2f 0d |or Syste|m 7? */.|
|00001730| 69 6e 74 09 09 09 47 65 | 73 74 61 6c 74 5f 41 76 |int...Ge|stalt_Av|
|00001740| 61 69 6c 61 62 6c 65 20 | 3d 20 30 3b 09 2f 2a 20 |ailable |= 0;./* |
|00001750| 47 65 73 74 61 6c 74 20 | 61 76 61 69 6c 61 62 6c |Gestalt |availabl|
|00001760| 65 3f 20 2a 2f 0d 69 6e | 74 09 09 09 41 70 70 6c |e? */.in|t...Appl|
|00001770| 65 45 76 65 6e 74 73 5f | 41 76 61 69 6c 61 62 6c |eEvents_|Availabl|
|00001780| 65 20 3d 20 30 3b 20 2f | 2a 20 41 70 70 6c 65 20 |e = 0; /|* Apple |
|00001790| 45 76 65 6e 74 73 20 61 | 76 61 69 6c 61 62 6c 65 |Events a|vailable|
|000017a0| 20 66 6f 72 20 64 6f 69 | 6e 67 20 73 68 75 74 64 | for doi|ng shutd|
|000017b0| 6f 77 6e 3f 20 2a 2f 0d | 69 6e 74 09 09 09 71 64 |own? */.|int...qd|
|000017c0| 33 32 5f 41 76 61 69 6c | 61 62 6c 65 20 3d 20 30 |32_Avail|able = 0|
|000017d0| 3b 20 2f 2a 20 69 73 20 | 33 32 20 62 69 74 20 51 |; /* is |32 bit Q|
|000017e0| 75 69 63 6b 64 72 61 77 | 20 61 76 61 69 6c 61 62 |uickdraw| availab|
|000017f0| 6c 65 20 66 6f 72 20 64 | 65 70 74 68 20 26 20 64 |le for d|epth & d|
|00001800| 69 74 68 65 72 69 6e 67 | 20 2a 2f 0d 69 6e 74 09 |ithering| */.int.|
|00001810| 09 09 49 6d 61 67 65 43 | 6f 6d 70 72 65 73 73 69 |..ImageC|ompressi|
|00001820| 6f 6e 4d 67 72 41 76 61 | 69 6c 61 62 6c 65 3d 30 |onMgrAva|ilable=0|
|00001830| 3b 20 2f 2a 20 49 73 20 | 51 75 69 63 6b 54 69 6d |; /* Is |QuickTim|
|00001840| 65 20 61 76 61 69 6c 61 | 62 6c 65 3f 20 2a 2f 0d |e availa|ble? */.|
|00001850| 6c 6f 6e 67 09 09 4d 75 | 6c 74 69 46 72 69 65 6e |long..Mu|ltiFrien|
|00001860| 64 6c 79 20 3d 20 30 3b | 0d 6c 6f 6e 67 09 09 64 |dly = 0;|.long..d|
|00001870| 69 74 68 65 72 54 69 6d | 65 20 3d 20 33 36 30 3b |itherTim|e = 360;|
|00001880| 0d 6c 6f 6e 67 09 09 73 | 74 61 72 74 75 70 4d 65 |.long..s|tartupMe|
|00001890| 73 73 61 67 65 54 69 6d | 65 20 3d 20 30 3b 0d 73 |ssageTim|e = 0;.s|
|000018a0| 68 6f 72 74 09 09 64 69 | 73 70 6c 61 79 5f 6d 61 |hort..di|splay_ma|
|000018b0| 67 6e 69 46 61 63 74 6f | 72 20 3d 20 31 3b 0d 42 |gniFacto|r = 1;.B|
|000018c0| 6f 6f 6c 65 61 6e 09 09 | 64 6f 50 69 63 74 43 6f |oolean..|doPictCo|
|000018d0| 6d 70 72 65 73 73 69 6f | 6e 20 3d 20 66 61 6c 73 |mpressio|n = fals|
|000018e0| 65 3b 0d 0d 46 49 4c 45 | 09 09 2a 76 69 72 74 75 |e;..FILE|..*virtu|
|000018f0| 61 6c 5f 66 69 6c 65 20 | 3d 20 30 3b 0d 46 49 4c |al_file |= 0;.FIL|
|00001900| 45 09 09 2a 73 61 76 65 | 50 49 43 54 5f 66 69 6c |E..*save|PICT_fil|
|00001910| 65 20 3d 20 30 3b 0d 73 | 68 6f 72 74 09 09 76 69 |e = 0;.s|hort..vi|
|00001920| 72 74 75 61 6c 5f 70 69 | 78 48 65 69 67 68 74 20 |rtual_pi|xHeight |
|00001930| 3d 20 30 3b 0d 73 68 6f | 72 74 09 09 76 69 72 74 |= 0;.sho|rt..virt|
|00001940| 75 61 6c 5f 62 75 66 66 | 65 72 44 69 72 74 79 20 |ual_buff|erDirty |
|00001950| 3d 20 30 3b 0d 73 68 6f | 72 74 09 09 76 69 72 74 |= 0;.sho|rt..virt|
|00001960| 75 61 6c 5f 63 75 72 72 | 65 6e 74 53 65 67 6d 65 |ual_curr|entSegme|
|00001970| 6e 74 20 3d 20 30 3b 0d | 73 68 6f 72 74 09 09 76 |nt = 0;.|short..v|
|00001980| 69 72 74 75 61 6c 5f 6d | 69 6e 59 20 3d 20 30 3b |irtual_m|inY = 0;|
|00001990| 0d 73 68 6f 72 74 09 09 | 76 69 72 74 75 61 6c 5f |.short..|virtual_|
|000019a0| 6d 61 78 59 20 3d 20 30 | 3b 0d 6c 6f 6e 67 09 09 |maxY = 0|;.long..|
|000019b0| 76 69 72 74 75 61 6c 5f | 73 65 67 53 69 7a 65 20 |virtual_|segSize |
|000019c0| 3d 20 53 57 41 50 5f 53 | 49 5a 45 3b 0d 0d 4d 65 |= SWAP_S|IZE;..Me|
|000019d0| 6e 75 48 61 6e 64 6c 65 | 09 6d 79 4d 65 6e 75 73 |nuHandle|.myMenus|
|000019e0| 5b 68 69 67 68 65 73 74 | 5f 6d 65 6e 75 2b 31 5d |[highest|_menu+1]|
|000019f0| 3b 0d 4d 65 6e 75 48 61 | 6e 64 6c 65 09 6d 79 53 |;.MenuHa|ndle.myS|
|00001a00| 75 62 4d 65 6e 75 73 5b | 68 69 67 68 65 73 74 5f |ubMenus[|highest_|
|00001a10| 73 75 62 6d 65 6e 75 2b | 31 5d 3b 0d 52 67 6e 48 |submenu+|1];.RgnH|
|00001a20| 61 6e 64 6c 65 09 74 68 | 65 55 70 64 61 74 65 52 |andle.th|eUpdateR|
|00001a30| 67 6e 3b 0d 63 68 61 72 | 09 09 72 75 6e 5f 66 6c |gn;.char|..run_fl|
|00001a40| 61 67 20 3d 20 30 2c 20 | 71 75 69 74 5f 66 6c 61 |ag = 0, |quit_fla|
|00001a50| 67 20 3d 20 30 3b 0d 45 | 76 65 6e 74 52 65 63 6f |g = 0;.E|ventReco|
|00001a60| 72 64 09 6d 79 45 76 65 | 6e 74 3b 0d 6c 6f 6e 67 |rd.myEve|nt;.long|
|00001a70| 09 09 20 70 72 65 76 5f | 75 70 64 5f 70 6c 6f 74 |.. prev_|upd_plot|
|00001a80| 3b 0d 0d 70 72 65 66 73 | 5f 70 74 72 5f 74 09 67 |;..prefs|_ptr_t.g|
|00001a90| 6c 6f 62 61 6c 5f 73 65 | 74 74 69 6e 67 73 3b 0d |lobal_se|ttings;.|
|00001aa0| 70 72 65 66 73 5f 68 64 | 6c 5f 74 09 67 6c 6f 62 |prefs_hd|l_t.glob|
|00001ab0| 61 6c 5f 73 65 74 74 69 | 6e 67 73 5f 68 3b 0d 70 |al_setti|ngs_h;.p|
|00001ac0| 72 65 66 73 5f 70 74 72 | 5f 74 09 66 69 6c 65 5f |refs_ptr|_t.file_|
|00001ad0| 73 65 74 74 69 6e 67 73 | 3b 0d 70 72 65 66 73 5f |settings|;.prefs_|
|00001ae0| 68 64 6c 5f 74 09 66 69 | 6c 65 5f 73 65 74 74 69 |hdl_t.fi|le_setti|
|00001af0| 6e 67 73 5f 68 3b 0d 0d | 73 68 6f 72 74 09 09 70 |ngs_h;..|short..p|
|00001b00| 61 75 73 65 5f 66 6c 61 | 67 20 3d 20 30 3b 0d 73 |ause_fla|g = 0;.s|
|00001b10| 68 6f 72 74 09 09 69 74 | 65 6d 48 69 74 3b 0d 73 |hort..it|emHit;.s|
|00001b20| 68 6f 72 74 09 09 65 6e | 61 62 6c 65 5f 72 65 74 |hort..en|able_ret|
|00001b30| 75 72 6e 5f 6b 65 79 3b | 0d 44 69 61 6c 6f 67 50 |urn_key;|.DialogP|
|00001b40| 74 72 09 6d 79 44 69 61 | 6c 6f 67 20 3d 20 4e 55 |tr.myDia|log = NU|
|00001b50| 4c 4c 3b 0d 44 69 61 6c | 6f 67 50 74 72 09 73 74 |LL;.Dial|ogPtr.st|
|00001b60| 61 72 74 75 70 53 63 72 | 65 65 6e 20 3d 20 4e 55 |artupScr|een = NU|
|00001b70| 4c 4c 3b 0d 48 61 6e 64 | 6c 65 09 09 65 78 74 72 |LL;.Hand|le..extr|
|00001b80| 61 5f 64 69 61 6c 6f 67 | 5f 52 41 4d 3b 0d 0d 73 |a_dialog|_RAM;..s|
|00001b90| 68 6f 72 74 09 09 72 65 | 6e 64 65 72 65 64 5f 4f |hort..re|ndered_O|
|00001ba0| 4b 3b 0d 69 6e 74 09 09 | 09 66 69 72 73 74 5f 74 |K;.int..|.first_t|
|00001bb0| 69 6d 65 5f 74 68 72 75 | 20 3d 20 74 72 75 65 3b |ime_thru| = true;|
|00001bc0| 0d 63 68 61 72 09 09 63 | 5f 74 68 65 46 69 6c 65 |.char..c|_theFile|
|00001bd0| 4e 61 6d 65 5b 32 35 35 | 5d 3b 0d 6c 6f 6e 67 09 |Name[255|];.long.|
|00001be0| 09 54 61 72 67 65 74 54 | 69 63 6b 73 3b 0d 6c 6f |.TargetT|icks;.lo|
|00001bf0| 6e 67 09 09 6d 61 6c 6c | 6f 63 43 6f 75 6e 74 2c |ng..mall|ocCount,|
|00001c00| 20 6d 66 72 65 65 43 6f | 75 6e 74 2c 20 6d 61 78 | mfreeCo|unt, max|
|00001c10| 6d 61 6c 6c 6f 63 3b 0d | 6c 6f 6e 67 09 09 2a 47 |malloc;.|long..*G|
|00001c20| 61 72 62 61 67 65 50 69 | 6c 65 2c 20 2a 52 65 63 |arbagePi|le, *Rec|
|00001c30| 79 63 6c 65 64 50 69 6c | 65 3b 0d 70 32 77 5f 57 |ycledPil|e;.p2w_W|
|00001c40| 69 6e 64 6f 77 50 74 72 | 09 09 6d 79 70 32 77 69 |indowPtr|..myp2wi|
|00001c50| 6e 64 6f 77 20 3d 20 4e | 55 4c 4c 3b 0d 42 6f 6f |ndow = N|ULL;.Boo|
|00001c60| 6c 65 61 6e 09 09 6d 79 | 70 32 77 69 6e 64 6f 77 |lean..my|p2window|
|00001c70| 49 73 55 70 20 3d 20 66 | 61 6c 73 65 3b 0d 52 65 |IsUp = f|alse;.Re|
|00001c80| 63 74 09 09 64 72 61 67 | 42 6f 75 6e 64 73 3b 0d |ct..drag|Bounds;.|
|00001c90| 0d 2f 2a 20 51 75 69 63 | 6b 54 69 6d 65 20 73 74 |./* Quic|kTime st|
|00001ca0| 75 66 66 20 2a 2f 0d 43 | 6f 6d 70 6f 6e 65 6e 74 |uff */.C|omponent|
|00001cb0| 49 6e 73 74 61 6e 63 65 | 09 67 74 68 65 53 43 43 |Instance|.gtheSCC|
|00001cc0| 6f 6d 70 6f 6e 65 6e 74 | 20 3d 20 4e 55 4c 4c 3b |omponent| = NULL;|
|00001cd0| 09 0d 53 43 50 61 72 61 | 6d 73 09 09 09 67 53 43 |..SCPara|ms...gSC|
|00001ce0| 44 69 61 6c 6f 67 50 61 | 72 61 6d 73 3b 0d 0d 2f |DialogPa|rams;../|
|00001cf0| 2a 20 74 65 78 74 20 65 | 64 69 74 6f 72 20 75 6e |* text e|ditor un|
|00001d00| 64 6f 20 73 75 70 70 6f | 72 74 20 2a 2f 0d 0d 74 |do suppo|rt */..t|
|00001d10| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 0d 7b 0d |ypedef s|truct.{.|
|00001d20| 09 63 68 61 72 09 2a 62 | 75 66 66 65 72 3b 0d 09 |.char.*b|uffer;..|
|00001d30| 63 68 61 72 09 2a 2a 62 | 75 66 5f 68 61 6e 64 6c |char.**b|uf_handl|
|00001d40| 65 3b 0d 09 73 68 6f 72 | 74 09 64 69 72 74 79 3b |e;..shor|t.dirty;|
|00001d50| 0d 09 6c 6f 6e 67 09 62 | 79 74 65 43 6f 75 6e 74 |..long.b|yteCount|
|00001d60| 2c 20 73 65 6c 53 74 61 | 72 74 2c 20 73 65 6c 45 |, selSta|rt, selE|
|00001d70| 6e 64 3b 0d 09 63 68 61 | 72 09 72 65 61 73 6f 6e |nd;..cha|r.reason|
|00001d80| 5b 31 32 37 5d 3b 0d 7d | 20 75 6e 64 6f 53 74 72 |[127];.}| undoStr|
|00001d90| 75 63 74 3b 0d 0d 23 64 | 65 66 69 6e 65 09 09 6d |uct;..#d|efine..m|
|00001da0| 61 78 5f 75 6e 64 6f 20 | 31 36 0d 69 6e 74 09 09 |ax_undo |16.int..|
|00001db0| 09 75 6e 64 6f 43 6f 75 | 6e 74 3b 0d 63 68 61 72 |.undoCou|nt;.char|
|00001dc0| 09 09 75 6e 64 6f 5f 6d | 65 6e 75 5f 6e 61 6d 65 |..undo_m|enu_name|
|00001dd0| 5b 31 32 37 5d 2c 20 72 | 65 64 6f 5f 6d 65 6e 75 |[127], r|edo_menu|
|00001de0| 5f 6e 61 6d 65 5b 31 32 | 37 5d 3b 0d 69 6e 74 09 |_name[12|7];.int.|
|00001df0| 09 09 75 6e 64 6f 5f 6b | 65 79 5f 63 6f 70 69 65 |..undo_k|ey_copie|
|00001e00| 64 3b 0d 75 6e 64 6f 53 | 74 72 75 63 74 09 75 6e |d;.undoS|truct.un|
|00001e10| 64 6f 5f 72 65 63 6f 72 | 64 5b 6d 61 78 5f 75 6e |do_recor|d[max_un|
|00001e20| 64 6f 2b 31 5d 3b 0d 75 | 6e 64 6f 53 74 72 75 63 |do+1];.u|ndoStruc|
|00001e30| 74 09 72 65 64 6f 5f 72 | 65 63 6f 72 64 5b 6d 61 |t.redo_r|ecord[ma|
|00001e40| 78 5f 75 6e 64 6f 2b 31 | 5d 3b 0d 0d 2f 2a 20 55 |x_undo+1|];../* U|
|00001e50| 6e 64 65 66 69 6e 65 20 | 74 68 65 20 6d 61 6c 6c |ndefine |the mall|
|00001e60| 6f 63 20 61 6e 64 20 66 | 72 65 65 20 63 61 6c 6c |oc and f|ree call|
|00001e70| 73 20 6e 6f 77 20 2a 2f | 0d 23 75 6e 64 65 66 20 |s now */|.#undef |
|00001e80| 6d 61 6c 6c 6f 63 0d 23 | 75 6e 64 65 66 20 66 72 |malloc.#|undef fr|
|00001e90| 65 65 0d 23 75 6e 64 65 | 66 20 63 61 6c 6c 6f 63 |ee.#unde|f calloc|
|00001ea0| 0d 0d 2f 2a 20 4e 65 77 | 50 74 72 20 69 73 20 74 |../* New|Ptr is t|
|00001eb0| 6f 6f 20 73 6c 6f 77 2e | 20 20 54 68 69 6e 6b 27 |oo slow.| Think'|
|00001ec0| 73 20 6d 65 6d 6f 72 79 | 20 73 79 73 74 65 6d 20 |s memory| system |
|00001ed0| 69 73 20 6e 69 63 65 20 | 27 6e 20 66 61 73 74 2e |is nice |'n fast.|
|00001ee0| 20 20 20 20 20 20 20 2a | 2f 0d 2f 2a 20 43 6f 6e | *|/./* Con|
|00001ef0| 73 69 64 65 72 20 75 73 | 69 6e 67 20 68 61 6e 64 |sider us|ing hand|
|00001f00| 6c 65 73 20 61 6e 64 20 | 6c 6f 63 6b 69 6e 67 20 |les and |locking |
|00001f10| 74 68 65 6d 2d 2d 20 61 | 6c 73 6f 20 66 61 73 74 |them-- a|lso fast|
|00001f20| 65 72 20 74 68 61 6e 20 | 4e 65 77 50 74 72 20 2a |er than |NewPtr *|
|00001f30| 2f 0d 76 6f 69 64 20 2a | 50 4f 56 5f 6d 61 6c 6c |/.void *|POV_mall|
|00001f40| 6f 63 28 73 69 7a 65 5f | 74 20 73 69 7a 65 29 0d |oc(size_|t size).|
|00001f50| 7b 0d 09 76 6f 69 64 20 | 2a 6d 79 70 74 72 20 3d |{..void |*myptr =|
|00001f60| 20 4e 55 4c 4c 3b 0d 54 | 52 59 5f 54 4f 5f 41 4c | NULL;.T|RY_TO_AL|
|00001f70| 4c 4f 43 41 54 45 3a 0d | 09 69 66 20 28 65 78 74 |LOCATE:.|.if (ext|
|00001f80| 72 61 5f 64 69 61 6c 6f | 67 5f 52 41 4d 20 21 3d |ra_dialo|g_RAM !=|
|00001f90| 20 4e 55 4c 4c 29 0d 09 | 09 6d 79 70 74 72 20 3d | NULL)..|.myptr =|
|00001fa0| 20 6d 61 6c 6c 6f 63 28 | 73 69 7a 65 29 3b 0d 09 | malloc(|size);..|
|00001fb0| 69 66 20 28 6d 79 70 74 | 72 20 3d 3d 20 30 29 0d |if (mypt|r == 0).|
|00001fc0| 09 7b 0d 09 09 69 66 20 | 28 66 72 65 65 5f 75 6e |.{...if |(free_un|
|00001fd0| 64 6f 5f 6d 65 6d 6f 72 | 79 28 29 29 0d 09 09 09 |do_memor|y())....|
|00001fe0| 67 6f 74 6f 20 54 52 59 | 5f 54 4f 5f 41 4c 4c 4f |goto TRY|_TO_ALLO|
|00001ff0| 43 41 54 45 3b 0d 09 09 | 2f 2a 20 69 66 20 74 68 |CATE;...|/* if th|
|00002000| 65 72 65 27 73 20 61 6e | 79 20 6f 74 68 65 72 20 |ere's an|y other |
|00002010| 52 41 4d 20 77 65 20 63 | 61 6e 20 73 71 75 65 65 |RAM we c|an squee|
|00002020| 7a 65 2c 20 6e 6f 77 27 | 73 20 74 68 65 20 74 69 |ze, now'|s the ti|
|00002030| 6d 65 2e 20 2a 2f 0d 09 | 09 69 66 20 28 65 78 74 |me. */..|.if (ext|
|00002040| 72 61 5f 64 69 61 6c 6f | 67 5f 52 41 4d 29 09 09 |ra_dialo|g_RAM)..|
|00002050| 09 09 09 0d 09 09 7b 0d | 09 09 09 44 69 73 70 6f |......{.|...Dispo|
|00002060| 73 65 48 61 6e 64 6c 65 | 28 65 78 74 72 61 5f 64 |seHandle|(extra_d|
|00002070| 69 61 6c 6f 67 5f 52 41 | 4d 29 3b 0d 09 09 09 65 |ialog_RA|M);....e|
|00002080| 78 74 72 61 5f 64 69 61 | 6c 6f 67 5f 52 41 4d 20 |xtra_dia|log_RAM |
|00002090| 3d 20 4e 55 4c 4c 3b 0d | 09 09 7d 0d 09 7d 0d 09 |= NULL;.|..}..}..|
|000020a0| 65 6c 73 65 0d 09 09 69 | 66 20 28 69 6e 5f 70 61 |else...i|f (in_pa|
|000020b0| 72 73 65 29 0d 09 09 7b | 0d 09 09 09 47 61 72 62 |rse)...{|....Garb|
|000020c0| 61 67 65 50 69 6c 65 5b | 6d 61 6c 6c 6f 63 43 6f |agePile[|mallocCo|
|000020d0| 75 6e 74 5d 20 3d 20 28 | 6c 6f 6e 67 29 20 6d 79 |unt] = (|long) my|
|000020e0| 70 74 72 3b 0d 09 09 09 | 69 66 20 28 6d 61 6c 6c |ptr;....|if (mall|
|000020f0| 6f 63 43 6f 75 6e 74 20 | 3c 20 6d 61 78 6d 61 6c |ocCount |< maxmal|
|00002100| 6c 6f 63 29 0d 09 09 09 | 09 6d 61 6c 6c 6f 63 43 |loc)....|.mallocC|
|00002110| 6f 75 6e 74 2b 2b 3b 0d | 09 09 7d 0d 09 72 65 74 |ount++;.|..}..ret|
|00002120| 75 72 6e 20 6d 79 70 74 | 72 3b 0d 7d 0d 0d 76 6f |urn mypt|r;.}..vo|
|00002130| 69 64 20 2a 50 4f 56 5f | 63 61 6c 6c 6f 63 28 73 |id *POV_|calloc(s|
|00002140| 69 7a 65 5f 74 20 6e 6d | 65 6d 62 2c 20 73 69 7a |ize_t nm|emb, siz|
|00002150| 65 5f 74 20 73 69 7a 65 | 29 0d 7b 0d 09 76 6f 69 |e_t size|).{..voi|
|00002160| 64 20 2a 6d 79 70 74 72 | 20 3d 20 4e 55 4c 4c 3b |d *myptr| = NULL;|
|00002170| 0d 54 52 59 5f 54 4f 5f | 41 4c 4c 4f 43 41 54 45 |.TRY_TO_|ALLOCATE|
|00002180| 3a 0d 09 69 66 20 28 65 | 78 74 72 61 5f 64 69 61 |:..if (e|xtra_dia|
|00002190| 6c 6f 67 5f 52 41 4d 20 | 21 3d 20 4e 55 4c 4c 29 |log_RAM |!= NULL)|
|000021a0| 0d 09 09 6d 79 70 74 72 | 20 3d 20 63 61 6c 6c 6f |...myptr| = callo|
|000021b0| 63 28 6e 6d 65 6d 62 2c | 20 73 69 7a 65 29 3b 0d |c(nmemb,| size);.|
|000021c0| 09 69 66 20 28 6d 79 70 | 74 72 20 3d 3d 20 30 29 |.if (myp|tr == 0)|
|000021d0| 0d 09 7b 0d 09 09 69 66 | 20 28 66 72 65 65 5f 75 |..{...if| (free_u|
|000021e0| 6e 64 6f 5f 6d 65 6d 6f | 72 79 28 29 29 0d 09 09 |ndo_memo|ry())...|
|000021f0| 09 67 6f 74 6f 20 54 52 | 59 5f 54 4f 5f 41 4c 4c |.goto TR|Y_TO_ALL|
|00002200| 4f 43 41 54 45 3b 0d 09 | 09 2f 2a 20 69 66 20 74 |OCATE;..|./* if t|
|00002210| 68 65 72 65 27 73 20 61 | 6e 79 20 6f 74 68 65 72 |here's a|ny other|
|00002220| 20 52 41 4d 20 77 65 20 | 63 61 6e 20 73 71 75 65 | RAM we |can sque|
|00002230| 65 7a 65 2c 20 6e 6f 77 | 27 73 20 74 68 65 20 74 |eze, now|'s the t|
|00002240| 69 6d 65 2e 20 2a 2f 0d | 09 09 69 66 20 28 65 78 |ime. */.|..if (ex|
|00002250| 74 72 61 5f 64 69 61 6c | 6f 67 5f 52 41 4d 29 09 |tra_dial|og_RAM).|
|00002260| 09 09 09 09 0d 09 09 7b | 09 09 09 09 09 09 09 09 |.......{|........|
|00002270| 09 09 0d 09 09 09 44 69 | 73 70 6f 73 65 48 61 6e |......Di|sposeHan|
|00002280| 64 6c 65 28 65 78 74 72 | 61 5f 64 69 61 6c 6f 67 |dle(extr|a_dialog|
|00002290| 5f 52 41 4d 29 3b 09 0d | 09 09 09 65 78 74 72 61 |_RAM);..|...extra|
|000022a0| 5f 64 69 61 6c 6f 67 5f | 52 41 4d 20 3d 20 4e 55 |_dialog_|RAM = NU|
|000022b0| 4c 4c 3b 09 09 09 0d 09 | 09 7d 0d 09 7d 0d 09 65 |LL;.....|.}..}..e|
|000022c0| 6c 73 65 0d 09 09 69 66 | 20 28 69 6e 5f 70 61 72 |lse...if| (in_par|
|000022d0| 73 65 29 0d 09 09 7b 0d | 09 09 09 47 61 72 62 61 |se)...{.|...Garba|
|000022e0| 67 65 50 69 6c 65 5b 6d | 61 6c 6c 6f 63 43 6f 75 |gePile[m|allocCou|
|000022f0| 6e 74 5d 20 3d 20 28 6c | 6f 6e 67 29 20 6d 79 70 |nt] = (l|ong) myp|
|00002300| 74 72 3b 0d 09 09 09 69 | 66 20 28 6d 61 6c 6c 6f |tr;....i|f (mallo|
|00002310| 63 43 6f 75 6e 74 20 3c | 20 6d 61 78 6d 61 6c 6c |cCount <| maxmall|
|00002320| 6f 63 29 0d 09 09 09 09 | 6d 61 6c 6c 6f 63 43 6f |oc).....|mallocCo|
|00002330| 75 6e 74 2b 2b 3b 0d 09 | 09 7d 0d 09 72 65 74 75 |unt++;..|.}..retu|
|00002340| 72 6e 20 6d 79 70 74 72 | 3b 0d 7d 0d 0d 76 6f 69 |rn myptr|;.}..voi|
|00002350| 64 20 50 4f 56 5f 66 72 | 65 65 28 76 6f 69 64 20 |d POV_fr|ee(void |
|00002360| 2a 70 74 72 29 0d 7b 0d | 09 69 66 20 28 69 6e 5f |*ptr).{.|.if (in_|
|00002370| 70 61 72 73 65 20 3d 3d | 20 30 29 0d 09 7b 0d 09 |parse ==| 0)..{..|
|00002380| 09 66 72 65 65 28 70 74 | 72 29 3b 0d 09 09 72 65 |.free(pt|r);...re|
|00002390| 74 75 72 6e 3b 0d 09 7d | 0d 09 69 66 20 28 70 74 |turn;..}|..if (pt|
|000023a0| 72 29 0d 09 7b 0d 09 09 | 66 72 65 65 28 70 74 72 |r)..{...|free(ptr|
|000023b0| 29 3b 0d 09 09 52 65 63 | 79 63 6c 65 64 50 69 6c |);...Rec|ycledPil|
|000023c0| 65 5b 6d 66 72 65 65 43 | 6f 75 6e 74 5d 20 3d 20 |e[mfreeC|ount] = |
|000023d0| 28 6c 6f 6e 67 29 20 70 | 74 72 3b 0d 09 09 69 66 |(long) p|tr;...if|
|000023e0| 20 28 6d 66 72 65 65 43 | 6f 75 6e 74 20 3c 20 6d | (mfreeC|ount < m|
|000023f0| 61 78 6d 61 6c 6c 6f 63 | 29 0d 09 09 09 6d 66 72 |axmalloc|)....mfr|
|00002400| 65 65 43 6f 75 6e 74 2b | 2b 3b 0d 09 7d 0d 7d 0d |eeCount+|+;..}.}.|
|00002410| 0d 2f 2f 20 69 6e 63 6c | 75 64 65 64 20 69 6e 20 |.// incl|uded in |
|00002420| 63 61 73 65 20 6f 66 20 | 66 75 74 75 72 65 20 69 |case of |future i|
|00002430| 6e 63 6c 75 73 69 6f 6e | 20 62 79 20 50 4f 56 2d |nclusion| by POV-|
|00002440| 52 61 79 20 6d 61 69 6e | 0d 76 6f 69 64 20 67 65 |Ray main|.void ge|
|00002450| 74 63 68 28 76 6f 69 64 | 29 0d 7b 0d 2f 2f 20 70 |tch(void|).{.// p|
|00002460| 61 72 74 20 6f 66 20 22 | 75 73 61 67 65 22 20 6d |art of "|usage" m|
|00002470| 65 73 73 61 67 65 20 70 | 72 69 6e 74 69 6e 67 20 |essage p|rinting |
|00002480| 69 6e 20 50 4f 56 52 61 | 79 2e 43 0d 7d 0d 0d 76 |in POVRa|y.C.}..v|
|00002490| 6f 69 64 20 43 6f 6c 6c | 65 63 74 5f 47 61 72 62 |oid Coll|ect_Garb|
|000024a0| 61 67 65 28 76 6f 69 64 | 29 0d 7b 0d 09 6c 6f 6e |age(void|).{..lon|
|000024b0| 67 20 69 2c 20 6a 2c 20 | 6b 3b 0d 09 6c 6f 6e 67 |g i, j, |k;..long|
|000024c0| 20 74 68 65 5f 69 74 65 | 6d 3b 0d 09 6c 6f 6e 67 | the_ite|m;..long|
|000024d0| 20 2a 74 72 61 73 68 53 | 6f 72 74 65 72 3b 0d 0d | *trashS|orter;..|
|000024e0| 09 69 6e 5f 70 61 72 73 | 65 20 3d 20 31 3b 0d 09 |.in_pars|e = 1;..|
|000024f0| 69 66 20 28 6d 61 6c 6c | 6f 63 43 6f 75 6e 74 20 |if (mall|ocCount |
|00002500| 3d 3d 20 30 29 20 72 65 | 74 75 72 6e 3b 0d 09 44 |== 0) re|turn;..D|
|00002510| 69 73 61 62 6c 65 4d 65 | 6e 75 73 28 29 3b 0d 09 |isableMe|nus();..|
|00002520| 53 65 74 43 75 72 73 6f | 72 28 26 77 61 69 74 43 |SetCurso|r(&waitC|
|00002530| 75 72 73 6f 72 29 3b 0d | 09 6b 20 3d 20 6d 61 6c |ursor);.|.k = mal|
|00002540| 6c 6f 63 43 6f 75 6e 74 | 3b 0d 2f 2a 20 6d 61 6c |locCount|;./* mal|
|00002550| 6c 6f 63 20 61 6e 64 20 | 6d 66 72 65 65 27 73 20 |loc and |mfree's |
|00002560| 61 72 65 20 69 6e 20 63 | 68 72 6f 6e 6f 6c 6f 67 |are in c|hronolog|
|00002570| 69 63 61 6c 20 6f 72 64 | 65 72 2e 20 20 54 68 65 |ical ord|er. The|
|00002580| 20 66 69 72 73 74 20 6d | 61 74 63 68 69 6e 67 20 | first m|atching |
|00002590| 69 74 65 6d 20 0d 69 6e | 20 74 68 65 20 6d 61 6c |item .in| the mal|
|000025a0| 6c 6f 63 20 6c 69 73 74 | 20 69 73 20 61 6c 77 61 |loc list| is alwa|
|000025b0| 79 73 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 6f |ys the c|orrect o|
|000025c0| 6e 65 20 66 6f 72 20 74 | 68 65 20 66 69 72 73 74 |ne for t|he first|
|000025d0| 20 6f 63 63 75 72 72 65 | 6e 63 65 20 69 6e 20 74 | occurre|nce in t|
|000025e0| 68 65 20 6d 66 72 65 65 | 20 6c 69 73 74 2e 20 2a |he mfree| list. *|
|000025f0| 2f 20 0d 0d 09 69 66 20 | 28 6d 66 72 65 65 43 6f |/ ...if |(mfreeCo|
|00002600| 75 6e 74 29 0d 09 7b 0d | 09 09 66 6f 72 20 28 69 |unt)..{.|..for (i|
|00002610| 3d 30 3b 20 69 3c 6d 66 | 72 65 65 43 6f 75 6e 74 |=0; i<mf|reeCount|
|00002620| 3b 20 69 2b 2b 29 0d 09 | 09 7b 0d 09 09 09 74 68 |; i++)..|.{....th|
|00002630| 65 5f 69 74 65 6d 20 3d | 20 52 65 63 79 63 6c 65 |e_item =| Recycle|
|00002640| 64 50 69 6c 65 5b 69 5d | 3b 0d 09 09 09 74 72 61 |dPile[i]|;....tra|
|00002650| 73 68 53 6f 72 74 65 72 | 20 3d 20 47 61 72 62 61 |shSorter| = Garba|
|00002660| 67 65 50 69 6c 65 3b 0d | 09 09 09 66 6f 72 20 28 |gePile;.|...for (|
|00002670| 6a 20 3d 20 30 3b 20 6a | 3c 6b 3b 20 6a 2b 2b 29 |j = 0; j|<k; j++)|
|00002680| 0d 09 09 09 7b 0d 09 09 | 09 09 69 66 20 28 2a 74 |....{...|..if (*t|
|00002690| 72 61 73 68 53 6f 72 74 | 65 72 2b 2b 20 3d 3d 20 |rashSort|er++ == |
|000026a0| 74 68 65 5f 69 74 65 6d | 29 0d 09 09 09 09 7b 0d |the_item|).....{.|
|000026b0| 09 09 09 09 09 2d 2d 74 | 72 61 73 68 53 6f 72 74 |.....--t|rashSort|
|000026c0| 65 72 3b 0d 09 09 09 09 | 09 2a 74 72 61 73 68 53 |er;.....|.*trashS|
|000026d0| 6f 72 74 65 72 20 3d 20 | 30 3b 0d 09 09 09 09 09 |orter = |0;......|
|000026e0| 67 6f 74 6f 20 41 4c 52 | 45 41 44 59 5f 46 52 45 |goto ALR|EADY_FRE|
|000026f0| 45 3b 0d 09 09 09 09 7d | 0d 09 09 09 7d 0d 09 41 |E;.....}|....}..A|
|00002700| 4c 52 45 41 44 59 5f 46 | 52 45 45 3a 0d 09 09 09 |LREADY_F|REE:....|
|00002710| 43 6f 6f 70 65 72 61 74 | 65 28 29 3b 0d 09 09 7d |Cooperat|e();...}|
|00002720| 0d 09 7d 0d 0d 09 66 6f | 72 20 28 69 3d 30 3b 20 |..}...fo|r (i=0; |
|00002730| 69 3c 6d 61 6c 6c 6f 63 | 43 6f 75 6e 74 3b 20 69 |i<malloc|Count; i|
|00002740| 2b 2b 29 0d 09 7b 0d 09 | 09 69 66 20 28 47 61 72 |++)..{..|.if (Gar|
|00002750| 62 61 67 65 50 69 6c 65 | 5b 69 5d 29 0d 09 09 09 |bagePile|[i])....|
|00002760| 66 72 65 65 28 28 76 6f | 69 64 20 2a 29 20 47 61 |free((vo|id *) Ga|
|00002770| 72 62 61 67 65 50 69 6c | 65 5b 69 5d 29 3b 0d 09 |rbagePil|e[i]);..|
|00002780| 09 43 6f 6f 70 65 72 61 | 74 65 28 29 3b 0d 09 7d |.Coopera|te();..}|
|00002790| 0d 09 70 72 69 6e 74 66 | 28 22 44 6f 6e 65 20 72 |..printf|("Done r|
|000027a0| 65 6c 65 61 73 69 6e 67 | 20 6d 65 6d 6f 72 79 2e |eleasing| memory.|
|000027b0| 5c 6e 22 29 3b 0d 09 6d | 61 6c 6c 6f 63 43 6f 75 |\n");..m|allocCou|
|000027c0| 6e 74 20 3d 20 30 3b 0d | 09 6d 66 72 65 65 43 6f |nt = 0;.|.mfreeCo|
|000027d0| 75 6e 74 20 3d 20 30 3b | 0d 09 2a 47 61 72 62 61 |unt = 0;|..*Garba|
|000027e0| 67 65 50 69 6c 65 20 3d | 20 30 3b 0d 09 2a 52 65 |gePile =| 0;..*Re|
|000027f0| 63 79 63 6c 65 64 50 69 | 6c 65 20 3d 20 30 3b 0d |cycledPi|le = 0;.|
|00002800| 09 45 6e 61 62 6c 65 4d | 65 6e 75 73 28 29 3b 0d |.EnableM|enus();.|
|00002810| 09 53 65 74 43 75 72 73 | 6f 72 28 26 71 64 2e 61 |.SetCurs|or(&qd.a|
|00002820| 72 72 6f 77 29 3b 0d 7d | 0d 0d 76 6f 69 64 20 72 |rrow);.}|..void r|
|00002830| 65 73 74 6f 72 65 5f 73 | 74 61 74 65 28 76 6f 69 |estore_s|tate(voi|
|00002840| 64 29 0d 7b 0d 09 72 65 | 6e 64 65 72 65 64 5f 4f |d).{..re|ndered_O|
|00002850| 4b 20 3d 20 30 3b 0d 09 | 6c 6f 6e 67 6a 6d 70 28 |K = 0;..|longjmp(|
|00002860| 65 6e 76 2c 20 31 29 3b | 0d 7d 0d 0d 0d 69 6e 74 |env, 1);|.}...int|
|00002870| 09 66 69 72 73 74 5f 74 | 69 6d 65 5f 63 61 6c 6c |.first_t|ime_call|
|00002880| 65 64 28 76 6f 69 64 29 | 0d 7b 0d 09 69 6e 74 20 |ed(void)|.{..int |
|00002890| 61 3b 0d 09 61 20 3d 20 | 66 69 72 73 74 5f 74 69 |a;..a = |first_ti|
|000028a0| 6d 65 5f 74 68 72 75 3b | 0d 09 66 69 72 73 74 5f |me_thru;|..first_|
|000028b0| 74 69 6d 65 5f 74 68 72 | 75 20 3d 20 66 61 6c 73 |time_thr|u = fals|
|000028c0| 65 3b 0d 09 72 65 74 75 | 72 6e 20 28 61 29 3b 0d |e;..retu|rn (a);.|
|000028d0| 7d 0d 0d 23 69 66 64 65 | 66 20 4e 45 45 44 53 5f |}..#ifde|f NEEDS_|
|000028e0| 50 45 52 46 0d 0d 76 6f | 69 64 20 73 74 61 72 74 |PERF..vo|id start|
|000028f0| 50 65 72 66 28 76 6f 69 | 64 29 0d 7b 0d 09 2f 2a |Perf(voi|d).{../*|
|00002900| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 74 68 65 20 | Initial|ize the |
|00002910| 70 65 72 66 6f 72 6d 61 | 6e 63 65 20 67 6c 6f 62 |performa|nce glob|
|00002920| 61 6c 73 20 2a 2f 0d 09 | 54 68 65 50 47 6c 6f 62 |als */..|ThePGlob|
|00002930| 61 6c 73 20 3d 20 6e 69 | 6c 3b 0d 09 69 66 20 28 |als = ni|l;..if (|
|00002940| 21 49 6e 69 74 50 65 72 | 66 28 26 54 68 65 50 47 |!InitPer|f(&ThePG|
|00002950| 6c 6f 62 61 6c 73 2c 0d | 09 09 09 09 34 2c 09 09 |lobals,.|....4,..|
|00002960| 09 09 09 09 2f 2a 20 6d | 73 20 2a 2f 0d 09 09 09 |..../* m|s */....|
|00002970| 09 38 2c 09 09 09 09 09 | 09 2f 2a 20 62 79 74 65 |.8,.....|./* byte|
|00002980| 73 20 2a 2f 0d 09 09 09 | 09 74 72 75 65 2c 09 09 |s */....|.true,..|
|00002990| 09 09 09 2f 2a 20 6d 65 | 61 73 75 72 65 20 52 4f |.../* me|asure RO|
|000029a0| 4d 20 63 6f 64 65 20 2a | 2f 0d 09 09 09 09 74 72 |M code *|/.....tr|
|000029b0| 75 65 2c 09 09 09 09 09 | 2f 2a 20 6d 65 61 73 75 |ue,.....|/* measu|
|000029c0| 72 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 63 |re appli|cation c|
|000029d0| 6f 64 65 20 2a 2f 0d 09 | 09 09 09 28 53 74 72 69 |ode */..|...(Stri|
|000029e0| 6e 67 50 74 72 29 22 5c | 70 43 4f 44 45 22 2c 09 |ngPtr)"\|pCODE",.|
|000029f0| 2f 2a 20 73 65 67 6d 65 | 6e 74 73 20 74 6f 20 6d |/* segme|nts to m|
|00002a00| 65 61 73 75 72 65 20 2a | 2f 0d 09 09 09 09 30 2c |easure *|/.....0,|
|00002a10| 09 09 09 09 09 09 2f 2a | 20 4c 65 74 20 74 68 65 |....../*| Let the|
|00002a20| 20 70 65 72 66 6f 72 6d | 61 6e 63 65 20 74 6f 6f | perform|ance too|
|00002a30| 6c 73 20 63 61 6c 63 75 | 6c 61 74 65 20 74 68 65 |ls calcu|late the|
|00002a40| 20 52 4f 4d 20 69 64 20 | 2a 2f 0d 09 09 09 09 28 | ROM id |*/.....(|
|00002a50| 53 74 72 69 6e 67 50 74 | 72 29 22 5c 70 22 2c 09 |StringPt|r)"\p",.|
|00002a60| 09 2f 2a 20 4c 65 74 20 | 74 68 65 20 70 65 72 66 |./* Let |the perf|
|00002a70| 6f 72 6d 61 6e 63 65 20 | 74 6f 6f 6c 73 20 66 69 |ormance |tools fi|
|00002a80| 6e 64 20 74 68 65 20 52 | 4f 4d 20 6e 61 6d 65 20 |nd the R|OM name |
|00002a90| 2a 2f 0d 09 09 09 09 74 | 72 75 65 2c 09 09 09 09 |*/.....t|rue,....|
|00002aa0| 09 2f 2a 20 6d 65 61 73 | 75 72 65 20 52 41 4d 3f |./* meas|ure RAM?|
|00002ab0| 20 2a 2f 0d 09 09 09 09 | 30 2c 09 09 09 09 09 09 | */.....|0,......|
|00002ac0| 2f 2a 20 6c 6f 77 20 52 | 41 4d 20 61 64 64 72 65 |/* low R|AM addre|
|00002ad0| 73 73 20 2a 2f 0d 09 09 | 09 09 30 78 30 46 46 46 |ss */...|..0x0FFF|
|00002ae0| 46 46 2c 09 09 09 09 2f | 2a 20 68 69 67 68 20 52 |FF,..../|* high R|
|00002af0| 41 4d 20 61 64 64 72 65 | 73 73 20 2a 2f 0d 09 09 |AM addre|ss */...|
|00002b00| 09 09 31 36 09 09 09 09 | 09 09 2f 2a 20 52 41 4d |..16....|../* RAM|
|00002b10| 20 62 75 63 6b 65 74 20 | 73 69 7a 65 20 2a 2f 0d | bucket |size */.|
|00002b20| 09 09 09 09 29 29 0d 09 | 7b 0d 09 09 53 79 73 42 |....))..|{...SysB|
|00002b30| 65 65 70 28 34 29 3b 09 | 2f 2a 20 65 72 72 6f 72 |eep(4);.|/* error|
|00002b40| 20 2a 2f 0d 2f 2f 09 09 | 64 69 73 70 6c 61 79 44 | */.//..|displayD|
|00002b50| 69 61 6c 6f 67 28 72 45 | 72 72 6f 72 49 44 2c 22 |ialog(rE|rrorID,"|
|00002b60| 45 72 72 6f 72 73 20 73 | 74 61 72 74 69 6e 67 20 |Errors s|tarting |
|00002b70| 50 65 72 66 6f 72 6d 61 | 6e 63 65 20 44 75 6d 70 |Performa|nce Dump|
|00002b80| 21 22 29 3b 0d 2f 2f 09 | 09 65 78 69 74 28 31 29 |!");.//.|.exit(1)|
|00002b90| 3b 09 2f 2a 20 65 72 72 | 6f 72 20 2a 2f 0d 09 7d |;./* err|or */..}|
|00002ba0| 0d 7d 0d 0d 0d 76 6f 69 | 64 20 64 6f 50 65 72 66 |.}...voi|d doPerf|
|00002bb0| 28 73 68 6f 72 74 20 70 | 65 72 66 46 6c 61 67 29 |(short p|erfFlag)|
|00002bc0| 0d 7b 0d 09 50 65 72 66 | 43 6f 6e 74 72 6f 6c 28 |.{..Perf|Control(|
|00002bd0| 54 68 65 50 47 6c 6f 62 | 61 6c 73 2c 20 70 65 72 |ThePGlob|als, per|
|00002be0| 66 46 6c 61 67 29 3b 09 | 2f 2a 20 74 75 72 6e 20 |fFlag);.|/* turn |
|00002bf0| 6f 6e 2f 6f 66 66 20 6d | 65 61 73 75 72 65 6d 65 |on/off m|easureme|
|00002c00| 6e 74 73 20 2a 2f 0d 7d | 20 2f 2a 20 64 6f 50 65 |nts */.}| /* doPe|
|00002c10| 72 66 20 2a 2f 0d 0d 0d | 76 6f 69 64 20 73 74 6f |rf */...|void sto|
|00002c20| 70 50 65 72 66 28 76 6f | 69 64 29 0d 7b 0d 09 2f |pPerf(vo|id).{../|
|00002c30| 2a 20 57 72 69 74 65 20 | 74 68 65 20 70 65 72 66 |* Write |the perf|
|00002c40| 6f 72 6d 61 6e 63 65 20 | 72 61 77 20 64 61 74 61 |ormance |raw data|
|00002c50| 20 69 6e 74 6f 20 61 20 | 66 69 6c 65 20 2a 2f 0d | into a |file */.|
|00002c60| 2f 2a 20 4e 4f 54 45 3a | 20 49 4e 20 4d 50 57 20 |/* NOTE:| IN MPW |
|00002c70| 33 2e 32 2c 20 59 4f 55 | 20 57 49 4c 4c 20 43 52 |3.2, YOU| WILL CR|
|00002c80| 41 53 48 20 48 4f 52 52 | 49 42 4c 59 20 49 46 20 |ASH HORR|IBLY IF |
|00002c90| 59 4f 55 20 54 55 52 4e | 20 4f 4e 2f 4f 46 46 20 |YOU TURN| ON/OFF |
|00002ca0| 50 65 72 66 20 54 57 49 | 43 45 21 20 2a 2f 0d 2f |Perf TWI|CE! */./|
|00002cb0| 2a 09 64 6f 50 65 72 66 | 28 66 61 6c 73 65 29 3b |*.doPerf|(false);|
|00002cc0| 09 2f 2a 20 6d 61 6b 65 | 20 73 75 72 65 20 65 76 |./* make| sure ev|
|00002cd0| 65 72 79 74 68 69 6e 67 | 20 69 73 20 74 75 72 6e |erything| is turn|
|00002ce0| 65 64 20 6f 66 66 20 2a | 2f 0d 09 69 66 20 28 50 |ed off *|/..if (P|
|00002cf0| 65 72 66 44 75 6d 70 28 | 54 68 65 50 47 6c 6f 62 |erfDump(|ThePGlob|
|00002d00| 61 6c 73 2c 20 28 53 74 | 72 69 6e 67 50 74 72 29 |als, (St|ringPtr)|
|00002d10| 22 5c 70 50 4f 56 50 65 | 72 66 2e 6f 75 74 22 2c |"\pPOVPe|rf.out",|
|00002d20| 20 74 72 75 65 2c 20 38 | 30 29 20 29 0d 09 7b 0d | true, 8|0) )..{.|
|00002d30| 09 09 53 79 73 42 65 65 | 70 28 34 29 3b 09 2f 2a |..SysBee|p(4);./*|
|00002d40| 20 65 72 72 6f 72 20 2a | 2f 0d 2f 2f 09 09 64 69 | error *|/.//..di|
|00002d50| 73 70 6c 61 79 44 69 61 | 6c 6f 67 28 72 45 72 72 |splayDia|log(rErr|
|00002d60| 6f 72 49 44 2c 22 45 72 | 72 6f 72 73 20 77 68 69 |orID,"Er|rors whi|
|00002d70| 6c 65 20 73 61 76 69 6e | 67 20 50 65 72 66 6f 72 |le savin|g Perfor|
|00002d80| 6d 61 6e 63 65 20 44 75 | 6d 70 21 22 29 3b 0d 09 |mance Du|mp!");..|
|00002d90| 7d 0d 09 54 65 72 6d 50 | 65 72 66 28 54 68 65 50 |}..TermP|erf(TheP|
|00002da0| 47 6c 6f 62 61 6c 73 29 | 3b 09 2f 2a 20 63 6c 65 |Globals)|;./* cle|
|00002db0| 61 6e 20 75 70 20 2a 2f | 0d 7d 0d 0d 23 65 6e 64 |an up */|.}..#end|
|00002dc0| 69 66 20 4e 45 45 44 53 | 5f 50 45 52 46 0d 0d 0d |if NEEDS|_PERF...|
|00002dd0| 76 6f 69 64 20 67 65 74 | 5f 57 69 6e 64 6f 77 50 |void get|_WindowP|
|00002de0| 6f 73 28 57 69 6e 64 6f | 77 50 74 72 20 74 68 65 |os(Windo|wPtr the|
|00002df0| 57 69 6e 64 6f 77 2c 20 | 52 65 63 74 20 2a 74 68 |Window, |Rect *th|
|00002e00| 65 52 65 63 74 29 0d 7b | 0d 09 52 65 63 74 09 77 |eRect).{|..Rect.w|
|00002e10| 69 6e 64 52 65 63 74 3b | 0d 0d 09 77 69 6e 64 52 |indRect;|...windR|
|00002e20| 65 63 74 20 3d 20 74 68 | 65 57 69 6e 64 6f 77 2d |ect = th|eWindow-|
|00002e30| 3e 70 6f 72 74 52 65 63 | 74 3b 0d 0d 09 2f 2f 20 |>portRec|t;...// |
|00002e40| 79 61 68 2c 20 62 75 74 | 20 77 68 65 72 65 20 69 |yah, but| where i|
|00002e50| 73 20 69 74 20 72 65 61 | 6c 6c 79 3f 0d 09 53 65 |s it rea|lly?..Se|
|00002e60| 74 50 6f 72 74 28 74 68 | 65 57 69 6e 64 6f 77 29 |tPort(th|eWindow)|
|00002e70| 3b 0d 09 4c 6f 63 61 6c | 54 6f 47 6c 6f 62 61 6c |;..Local|ToGlobal|
|00002e80| 28 28 50 6f 69 6e 74 2a | 29 26 77 69 6e 64 52 65 |((Point*|)&windRe|
|00002e90| 63 74 2e 74 6f 70 29 3b | 0d 09 4c 6f 63 61 6c 54 |ct.top);|..LocalT|
|00002ea0| 6f 47 6c 6f 62 61 6c 28 | 28 50 6f 69 6e 74 2a 29 |oGlobal(|(Point*)|
|00002eb0| 26 77 69 6e 64 52 65 63 | 74 2e 62 6f 74 74 6f 6d |&windRec|t.bottom|
|00002ec0| 29 3b 0d 0d 09 2a 74 68 | 65 52 65 63 74 20 3d 20 |);...*th|eRect = |
|00002ed0| 77 69 6e 64 52 65 63 74 | 3b 0d 7d 0d 0d 76 6f 69 |windRect|;.}..voi|
|00002ee0| 64 20 66 6f 72 63 65 52 | 65 63 74 4f 6e 53 63 72 |d forceR|ectOnScr|
|00002ef0| 65 65 6e 28 52 65 63 74 | 20 2a 61 47 6c 6f 62 61 |een(Rect| *aGloba|
|00002f00| 6c 52 65 63 74 29 0d 7b | 0d 09 6c 6f 6e 67 09 09 |lRect).{|..long..|
|00002f10| 61 72 65 61 3b 0d 09 6c | 6f 6e 67 09 09 66 6f 75 |area;..l|ong..fou|
|00002f20| 6e 64 41 72 65 61 3b 0d | 09 47 44 48 61 6e 64 6c |ndArea;.|.GDHandl|
|00002f30| 65 09 61 44 65 76 69 63 | 65 3b 0d 09 47 44 48 61 |e.aDevic|e;..GDHa|
|00002f40| 6e 64 6c 65 09 66 6f 75 | 6e 64 44 65 76 69 63 65 |ndle.fou|ndDevice|
|00002f50| 3b 0d 09 52 65 63 74 09 | 09 61 44 65 76 69 63 65 |;..Rect.|.aDevice|
|00002f60| 52 65 63 74 3b 0d 09 52 | 65 63 74 09 09 69 6e 74 |Rect;..R|ect..int|
|00002f70| 65 72 73 65 63 74 52 65 | 63 74 3b 0d 0d 09 2f 2a |ersectRe|ct;.../*|
|00002f80| 20 55 73 65 20 6d 61 69 | 6e 20 64 65 76 69 63 65 | Use mai|n device|
|00002f90| 20 61 73 20 64 65 66 61 | 75 6c 74 20 63 68 6f 69 | as defa|ult choi|
|00002fa0| 63 65 2c 20 69 6e 20 63 | 61 73 65 20 6e 6f 20 6d |ce, in c|ase no m|
|00002fb0| 61 74 63 68 20 66 6f 75 | 6e 64 20 2a 2f 0d 09 66 |atch fou|nd */..f|
|00002fc0| 6f 75 6e 64 44 65 76 69 | 63 65 20 3d 20 47 65 74 |oundDevi|ce = Get|
|00002fd0| 4d 61 69 6e 44 65 76 69 | 63 65 28 29 3b 0d 09 61 |MainDevi|ce();..a|
|00002fe0| 44 65 76 69 63 65 52 65 | 63 74 20 3d 20 28 2a 2a |DeviceRe|ct = (**|
|00002ff0| 66 6f 75 6e 64 44 65 76 | 69 63 65 29 2e 67 64 52 |foundDev|ice).gdR|
|00003000| 65 63 74 3b 0d 09 53 65 | 63 74 52 65 63 74 28 61 |ect;..Se|ctRect(a|
|00003010| 47 6c 6f 62 61 6c 52 65 | 63 74 2c 20 26 61 44 65 |GlobalRe|ct, &aDe|
|00003020| 76 69 63 65 52 65 63 74 | 2c 20 26 69 6e 74 65 72 |viceRect|, &inter|
|00003030| 73 65 63 74 52 65 63 74 | 29 3b 0d 09 66 6f 75 6e |sectRect|);..foun|
|00003040| 64 41 72 65 61 20 3d 20 | 30 3b 0d 0d 09 66 6f 72 |dArea = |0;...for|
|00003050| 20 28 61 44 65 76 69 63 | 65 20 3d 20 47 65 74 44 | (aDevic|e = GetD|
|00003060| 65 76 69 63 65 4c 69 73 | 74 28 29 3b 20 61 44 65 |eviceLis|t(); aDe|
|00003070| 76 69 63 65 3b 20 61 44 | 65 76 69 63 65 20 3d 20 |vice; aD|evice = |
|00003080| 47 65 74 4e 65 78 74 44 | 65 76 69 63 65 28 61 44 |GetNextD|evice(aD|
|00003090| 65 76 69 63 65 29 29 0d | 09 7b 0d 09 09 2f 2a 20 |evice)).|.{.../* |
|000030a0| 49 66 20 77 65 20 66 6f | 75 6e 64 20 61 6e 20 61 |If we fo|und an a|
|000030b0| 63 74 69 76 65 20 73 63 | 72 65 65 6e 20 64 65 76 |ctive sc|reen dev|
|000030c0| 69 63 65 20 74 68 61 74 | 20 69 6e 74 65 72 73 65 |ice that| interse|
|000030d0| 63 74 73 20 73 6f 6d 65 | 20 6f 66 20 74 68 65 20 |cts some| of the |
|000030e0| 72 65 63 74 2e 2e 20 2a | 2f 0d 09 09 61 44 65 76 |rect.. *|/...aDev|
|000030f0| 69 63 65 52 65 63 74 20 | 3d 20 28 2a 2a 61 44 65 |iceRect |= (**aDe|
|00003100| 76 69 63 65 29 2e 67 64 | 52 65 63 74 3b 0d 09 09 |vice).gd|Rect;...|
|00003110| 69 66 20 28 54 65 73 74 | 44 65 76 69 63 65 41 74 |if (Test|DeviceAt|
|00003120| 74 72 69 62 75 74 65 28 | 61 44 65 76 69 63 65 2c |tribute(|aDevice,|
|00003130| 20 73 63 72 65 65 6e 44 | 65 76 69 63 65 29 0d 09 | screenD|evice)..|
|00003140| 09 09 26 26 20 54 65 73 | 74 44 65 76 69 63 65 41 |..&& Tes|tDeviceA|
|00003150| 74 74 72 69 62 75 74 65 | 28 61 44 65 76 69 63 65 |ttribute|(aDevice|
|00003160| 2c 20 73 63 72 65 65 6e | 41 63 74 69 76 65 29 0d |, screen|Active).|
|00003170| 09 09 09 26 26 20 53 65 | 63 74 52 65 63 74 28 61 |...&& Se|ctRect(a|
|00003180| 47 6c 6f 62 61 6c 52 65 | 63 74 2c 20 26 61 44 65 |GlobalRe|ct, &aDe|
|00003190| 76 69 63 65 52 65 63 74 | 2c 20 26 69 6e 74 65 72 |viceRect|, &inter|
|000031a0| 73 65 63 74 52 65 63 74 | 29 29 0d 09 09 7b 0d 09 |sectRect|))...{..|
|000031b0| 09 09 2f 2a 20 66 69 6e | 64 20 6f 75 74 20 68 6f |../* fin|d out ho|
|000031c0| 77 20 6d 75 63 68 20 69 | 74 20 69 6e 74 65 72 73 |w much i|t inters|
|000031d0| 65 63 74 73 20 2a 2f 0d | 09 09 09 61 72 65 61 20 |ects */.|...area |
|000031e0| 3d 20 28 69 6e 74 65 72 | 73 65 63 74 52 65 63 74 |= (inter|sectRect|
|000031f0| 2e 72 69 67 68 74 20 2d | 20 69 6e 74 65 72 73 65 |.right -| interse|
|00003200| 63 74 52 65 63 74 2e 6c | 65 66 74 29 20 2a 0d 09 |ctRect.l|eft) *..|
|00003210| 09 09 09 20 20 20 28 69 | 6e 74 65 72 73 65 63 74 |... (i|ntersect|
|00003220| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 2d 20 69 6e |Rect.bot|tom - in|
|00003230| 74 65 72 73 65 63 74 52 | 65 63 74 2e 74 6f 70 29 |tersectR|ect.top)|
|00003240| 3b 0d 09 09 09 2f 2a 20 | 69 66 20 69 6e 74 65 72 |;..../* |if inter|
|00003250| 73 65 63 74 73 20 6d 6f | 72 65 20 74 68 61 6e 20 |sects mo|re than |
|00003260| 74 68 65 20 6c 61 73 74 | 20 64 65 76 69 63 65 20 |the last| device |
|00003270| 6f 66 20 69 6e 74 65 72 | 73 65 63 74 69 6f 6e 2c |of inter|section,|
|00003280| 20 75 73 65 20 74 68 69 | 73 20 69 6e 73 74 65 61 | use thi|s instea|
|00003290| 64 20 2a 2f 0d 09 09 09 | 2f 2a 20 74 68 69 73 20 |d */....|/* this |
|000032a0| 74 68 65 72 65 66 6f 72 | 65 20 66 69 6e 64 73 20 |therefor|e finds |
|000032b0| 74 68 65 20 73 63 72 65 | 65 6e 20 6f 66 20 67 72 |the scre|en of gr|
|000032c0| 65 61 74 65 73 74 20 69 | 6e 74 65 72 73 65 63 74 |eatest i|ntersect|
|000032d0| 69 6f 6e 20 2a 2f 0d 09 | 09 09 69 66 20 28 61 72 |ion */..|..if (ar|
|000032e0| 65 61 20 3e 20 66 6f 75 | 6e 64 41 72 65 61 29 0d |ea > fou|ndArea).|
|000032f0| 09 09 09 7b 0d 09 09 09 | 09 66 6f 75 6e 64 44 65 |...{....|.foundDe|
|00003300| 76 69 63 65 20 3d 20 61 | 44 65 76 69 63 65 3b 0d |vice = a|Device;.|
|00003310| 09 09 09 09 66 6f 75 6e | 64 41 72 65 61 20 3d 20 |....foun|dArea = |
|00003320| 61 72 65 61 3b 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |area;...|.}...}..|
|00003330| 7d 0d 0d 09 2f 2a 20 4f | 4b 2c 20 77 65 20 68 61 |}.../* O|K, we ha|
|00003340| 76 65 20 6e 6f 77 20 74 | 72 61 76 65 6c 6c 65 64 |ve now t|ravelled|
|00003350| 20 74 68 72 6f 75 67 68 | 20 61 6c 6c 20 74 68 65 | through| all the|
|00003360| 20 64 65 76 69 63 65 73 | 2c 20 61 6e 64 20 27 66 | devices|, and 'f|
|00003370| 6f 75 6e 64 44 65 76 69 | 63 65 27 20 2a 2f 0d 09 |oundDevi|ce' */..|
|00003380| 2f 2a 20 77 69 6c 6c 20 | 68 61 76 65 20 74 68 65 |/* will |have the|
|00003390| 20 62 65 73 74 20 64 65 | 76 69 63 65 20 74 6f 20 | best de|vice to |
|000033a0| 75 73 65 2c 20 6f 72 20 | 74 68 65 20 6d 61 69 6e |use, or |the main|
|000033b0| 20 64 65 76 69 63 65 20 | 69 66 20 74 68 65 72 65 | device |if there|
|000033c0| 20 77 61 73 09 2a 2f 0d | 09 2f 2a 20 6e 6f 20 69 | was.*/.|./* no i|
|000033d0| 6e 74 65 72 73 65 63 74 | 69 6e 67 20 73 63 72 65 |ntersect|ing scre|
|000033e0| 65 6e 73 20 61 74 20 61 | 6c 6c 2e 2e 20 4d 61 6b |ens at a|ll.. Mak|
|000033f0| 65 20 73 75 72 65 20 69 | 74 20 66 69 74 73 20 6f |e sure i|t fits o|
|00003400| 6e 20 74 68 65 20 73 63 | 72 65 65 6e 09 09 2a 2f |n the sc|reen..*/|
|00003410| 0d 0d 09 2f 2a 20 49 66 | 20 74 68 65 72 65 20 69 |.../* If| there i|
|00003420| 73 20 6e 6f 74 20 65 6e | 6f 75 67 68 20 61 72 65 |s not en|ough are|
|00003430| 61 20 73 68 6f 77 69 6e | 67 2c 20 6f 72 20 74 6f |a showin|g, or to|
|00003440| 70 20 6f 66 20 72 65 63 | 74 20 69 73 20 6f 66 66 |p of rec|t is off|
|00003450| 20 73 63 72 65 65 6e 2e | 2e 09 2a 2f 0d 09 2f 2a | screen.|..*/../*|
|00003460| 20 74 68 65 6e 20 6d 6f | 76 65 20 74 68 65 20 77 | then mo|ve the w|
|00003470| 69 6e 64 6f 77 20 74 6f | 20 62 65 74 74 65 72 20 |indow to| better |
|00003480| 70 6f 73 69 74 69 6f 6e | 20 6f 6e 20 27 66 6f 75 |position| on 'fou|
|00003490| 6e 64 44 65 76 69 63 65 | 27 09 09 09 09 2a 2f 0d |ndDevice|'....*/.|
|000034a0| 09 69 66 20 28 20 28 66 | 6f 75 6e 64 41 72 65 61 |.if ( (f|oundArea|
|000034b0| 20 3c 20 32 30 30 29 20 | 7c 7c 20 28 61 47 6c 6f | < 200) ||| (aGlo|
|000034c0| 62 61 6c 52 65 63 74 2d | 3e 74 6f 70 20 3c 20 28 |balRect-|>top < (|
|000034d0| 2a 2a 66 6f 75 6e 64 44 | 65 76 69 63 65 29 2e 67 |**foundD|evice).g|
|000034e0| 64 52 65 63 74 2e 74 6f | 70 29 20 29 0d 09 7b 0d |dRect.to|p) )..{.|
|000034f0| 09 09 2f 2a 20 61 64 6a | 75 73 74 20 67 64 52 65 |../* adj|ust gdRe|
|00003500| 63 74 20 74 6f 20 73 69 | 7a 65 20 6f 66 20 61 47 |ct to si|ze of aG|
|00003510| 6c 6f 62 61 6c 52 65 63 | 74 2c 20 26 20 6f 66 66 |lobalRec|t, & off|
|00003520| 73 65 74 20 69 74 20 61 | 20 6c 69 74 74 6c 65 20 |set it a| little |
|00003530| 2a 2f 0d 09 09 61 44 65 | 76 69 63 65 52 65 63 74 |*/...aDe|viceRect|
|00003540| 20 3d 20 28 2a 2a 66 6f | 75 6e 64 44 65 76 69 63 | = (**fo|undDevic|
|00003550| 65 29 2e 67 64 52 65 63 | 74 3b 0d 09 09 4f 66 66 |e).gdRec|t;...Off|
|00003560| 73 65 74 52 65 63 74 28 | 26 61 44 65 76 69 63 65 |setRect(|&aDevice|
|00003570| 52 65 63 74 2c 20 31 30 | 2c 20 34 30 29 3b 0d 09 |Rect, 10|, 40);..|
|00003580| 09 61 44 65 76 69 63 65 | 52 65 63 74 2e 72 69 67 |.aDevice|Rect.rig|
|00003590| 68 74 20 3d 20 61 44 65 | 76 69 63 65 52 65 63 74 |ht = aDe|viceRect|
|000035a0| 2e 6c 65 66 74 20 2b 20 | 28 61 47 6c 6f 62 61 6c |.left + |(aGlobal|
|000035b0| 52 65 63 74 2d 3e 72 69 | 67 68 74 20 2d 20 61 47 |Rect->ri|ght - aG|
|000035c0| 6c 6f 62 61 6c 52 65 63 | 74 2d 3e 6c 65 66 74 29 |lobalRec|t->left)|
|000035d0| 3b 0d 09 09 61 44 65 76 | 69 63 65 52 65 63 74 2e |;...aDev|iceRect.|
|000035e0| 62 6f 74 74 6f 6d 20 3d | 20 61 44 65 76 69 63 65 |bottom =| aDevice|
|000035f0| 52 65 63 74 2e 74 6f 70 | 20 2b 20 28 61 47 6c 6f |Rect.top| + (aGlo|
|00003600| 62 61 6c 52 65 63 74 2d | 3e 62 6f 74 74 6f 6d 20 |balRect-|>bottom |
|00003610| 2d 20 61 47 6c 6f 62 61 | 6c 52 65 63 74 2d 3e 74 |- aGloba|lRect->t|
|00003620| 6f 70 29 3b 0d 09 09 2f | 2a 20 52 65 74 75 72 6e |op);.../|* Return|
|00003630| 20 74 68 69 73 20 72 65 | 63 74 20 61 73 20 74 68 | this re|ct as th|
|00003640| 65 20 6f 6e 65 20 74 6f | 20 75 73 65 20 2a 2f 0d |e one to| use */.|
|00003650| 09 09 2a 61 47 6c 6f 62 | 61 6c 52 65 63 74 20 3d |..*aGlob|alRect =|
|00003660| 20 61 44 65 76 69 63 65 | 52 65 63 74 3b 0d 09 7d | aDevice|Rect;..}|
|00003670| 0d 7d 20 2f 2f 20 66 6f | 72 63 65 52 65 63 74 4f |.} // fo|rceRectO|
|00003680| 6e 53 63 72 65 65 6e 0d | 0d 0d 0d 73 68 6f 72 74 |nScreen.|...short|
|00003690| 20 74 72 61 70 41 76 61 | 69 6c 61 62 6c 65 28 73 | trapAva|ilable(s|
|000036a0| 68 6f 72 74 20 74 4e 75 | 6d 62 65 72 2c 20 54 72 |hort tNu|mber, Tr|
|000036b0| 61 70 54 79 70 65 20 74 | 54 79 70 65 2c 20 53 79 |apType t|Type, Sy|
|000036c0| 73 45 6e 76 52 65 63 20 | 2a 73 65 52 65 63 29 0d |sEnvRec |*seRec).|
|000036d0| 7b 0d 09 69 66 09 28 0d | 09 09 09 28 74 54 79 70 |{..if.(.|...(tTyp|
|000036e0| 65 20 3d 3d 20 28 75 6e | 73 69 67 6e 65 64 20 63 |e == (un|signed c|
|000036f0| 68 61 72 29 20 54 6f 6f | 6c 54 72 61 70 29 20 26 |har) Too|lTrap) &|
|00003700| 26 0d 09 09 09 28 73 65 | 52 65 63 2d 3e 6d 61 63 |&....(se|Rec->mac|
|00003710| 68 69 6e 65 54 79 70 65 | 20 3e 20 65 6e 76 4d 61 |hineType| > envMa|
|00003720| 63 68 55 6e 6b 6e 6f 77 | 6e 29 20 26 26 0d 09 09 |chUnknow|n) &&...|
|00003730| 09 28 73 65 52 65 63 2d | 3e 6d 61 63 68 69 6e 65 |.(seRec-|>machine|
|00003740| 54 79 70 65 20 3c 20 65 | 6e 76 4d 61 63 49 49 29 |Type < e|nvMacII)|
|00003750| 0d 09 09 29 0d 09 09 7b | 09 2f 2a 20 69 74 27 73 |...)...{|./* it's|
|00003760| 20 61 20 35 31 32 4b 45 | 2c 20 50 6c 75 73 2c 20 | a 512KE|, Plus, |
|00003770| 6f 72 20 53 45 20 2a 2f | 0d 09 09 74 4e 75 6d 62 |or SE */|...tNumb|
|00003780| 65 72 20 3d 20 74 4e 75 | 6d 62 65 72 20 26 20 30 |er = tNu|mber & 0|
|00003790| 78 30 33 46 46 3b 0d 09 | 09 69 66 20 28 74 4e 75 |x03FF;..|.if (tNu|
|000037a0| 6d 62 65 72 20 3e 20 30 | 78 30 31 46 46 29 09 09 |mber > 0|x01FF)..|
|000037b0| 09 09 2f 2a 20 77 68 69 | 63 68 20 6d 65 61 6e 73 |../* whi|ch means|
|000037c0| 20 74 68 65 20 74 6f 6f | 6c 20 74 72 61 70 73 20 | the too|l traps |
|000037d0| 2a 2f 0d 09 09 09 74 4e | 75 6d 62 65 72 20 3d 20 |*/....tN|umber = |
|000037e0| 5f 55 6e 69 6d 70 6c 65 | 6d 65 6e 74 65 64 3b 09 |_Unimple|mented;.|
|000037f0| 09 2f 2a 20 6f 6e 6c 79 | 20 67 6f 20 74 6f 20 30 |./* only| go to 0|
|00003800| 78 30 31 46 46 20 2a 2f | 0d 09 09 7d 0d 09 72 65 |x01FF */|...}..re|
|00003810| 74 75 72 6e 20 28 4e 47 | 65 74 54 72 61 70 41 64 |turn (NG|etTrapAd|
|00003820| 64 72 65 73 73 28 74 4e | 75 6d 62 65 72 2c 20 74 |dress(tN|umber, t|
|00003830| 54 79 70 65 29 0d 09 09 | 09 21 3d 20 4e 47 65 74 |Type)...|.!= NGet|
|00003840| 54 72 61 70 41 64 64 72 | 65 73 73 28 5f 55 6e 69 |TrapAddr|ess(_Uni|
|00003850| 6d 70 6c 65 6d 65 6e 74 | 65 64 2c 20 54 6f 6f 6c |mplement|ed, Tool|
|00003860| 54 72 61 70 29 29 3b 0d | 7d 20 2f 2a 74 72 61 70 |Trap));.|} /*trap|
|00003870| 41 76 61 69 6c 61 62 6c | 65 28 29 2a 2f 0d 0d 0d |Availabl|e()*/...|
|00003880| 70 61 73 63 61 6c 20 76 | 6f 69 64 20 6f 75 74 6c |pascal v|oid outl|
|00003890| 69 6e 65 44 65 66 61 75 | 6c 74 42 75 74 74 6f 6e |ineDefau|ltButton|
|000038a0| 28 44 69 61 6c 6f 67 50 | 74 72 20 74 68 65 44 69 |(DialogP|tr theDi|
|000038b0| 61 6c 6f 67 2c 20 73 68 | 6f 72 74 20 74 68 65 49 |alog, sh|ort theI|
|000038c0| 74 65 6d 29 0d 7b 0d 09 | 50 65 6e 53 74 61 74 65 |tem).{..|PenState|
|000038d0| 09 53 61 76 65 50 65 6e | 3b 0d 09 73 68 6f 72 74 |.SavePen|;..short|
|000038e0| 09 09 69 74 65 6d 54 79 | 70 65 3b 0d 09 48 61 6e |..itemTy|pe;..Han|
|000038f0| 64 6c 65 09 09 69 74 65 | 6d 48 61 6e 64 6c 65 3b |dle..ite|mHandle;|
|00003900| 0d 09 52 65 63 74 09 09 | 64 69 73 70 52 65 63 74 |..Rect..|dispRect|
|00003910| 3b 0d 23 70 72 61 67 6d | 61 20 75 6e 75 73 65 64 |;.#pragm|a unused|
|00003920| 20 28 74 68 65 49 74 65 | 6d 29 0d 0d 09 47 65 74 | (theIte|m)...Get|
|00003930| 50 65 6e 53 74 61 74 65 | 28 26 53 61 76 65 50 65 |PenState|(&SavePe|
|00003940| 6e 29 3b 0d 09 2f 2a 20 | 75 73 65 20 27 6f 6b 27 |n);../* |use 'ok'|
|00003950| 20 28 23 31 29 20 69 74 | 65 6d 27 73 20 72 65 63 | (#1) it|em's rec|
|00003960| 74 61 6e 67 6c 65 20 2a | 2f 0d 09 47 65 74 44 49 |tangle *|/..GetDI|
|00003970| 74 65 6d 28 74 68 65 44 | 69 61 6c 6f 67 2c 20 4f |tem(theD|ialog, O|
|00003980| 4b 2c 20 26 69 74 65 6d | 54 79 70 65 2c 20 26 69 |K, &item|Type, &i|
|00003990| 74 65 6d 48 61 6e 64 6c | 65 2c 20 26 64 69 73 70 |temHandl|e, &disp|
|000039a0| 52 65 63 74 29 3b 0d 09 | 53 65 74 50 6f 72 74 28 |Rect);..|SetPort(|
|000039b0| 74 68 65 44 69 61 6c 6f | 67 29 3b 0d 09 50 65 6e |theDialo|g);..Pen|
|000039c0| 53 69 7a 65 28 33 2c 20 | 33 29 3b 0d 09 49 6e 73 |Size(3, |3);..Ins|
|000039d0| 65 74 52 65 63 74 28 26 | 64 69 73 70 52 65 63 74 |etRect(&|dispRect|
|000039e0| 2c 20 2d 34 2c 20 2d 34 | 29 3b 0d 09 46 72 61 6d |, -4, -4|);..Fram|
|000039f0| 65 52 6f 75 6e 64 52 65 | 63 74 28 26 64 69 73 70 |eRoundRe|ct(&disp|
|00003a00| 52 65 63 74 2c 20 31 36 | 2c 20 31 36 29 3b 0d 09 |Rect, 16|, 16);..|
|00003a10| 53 65 74 50 65 6e 53 74 | 61 74 65 28 26 53 61 76 |SetPenSt|ate(&Sav|
|00003a20| 65 50 65 6e 29 3b 0d 7d | 20 2f 2f 20 6f 75 74 6c |ePen);.}| // outl|
|00003a30| 69 6e 65 44 65 66 61 75 | 6c 74 42 75 74 74 6f 6e |ineDefau|ltButton|
|00003a40| 0d 0d 0d 2f 2a 20 47 72 | 61 62 73 20 74 68 65 20 |.../* Gr|abs the |
|00003a50| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 20 66 6f |ControlH|andle fo|
|00003a60| 72 20 74 68 65 20 69 74 | 65 6d 20 69 6e 20 74 68 |r the it|em in th|
|00003a70| 65 20 64 69 61 6c 6f 67 | 20 62 6f 78 20 2a 2f 0d |e dialog| box */.|
|00003a80| 43 6f 6e 74 72 6f 6c 48 | 61 6e 64 6c 65 20 47 72 |ControlH|andle Gr|
|00003a90| 61 62 44 49 74 65 6d 48 | 61 6e 64 6c 65 28 44 69 |abDItemH|andle(Di|
|00003aa0| 61 6c 6f 67 50 74 72 20 | 74 68 65 44 69 61 6c 6f |alogPtr |theDialo|
|00003ab0| 67 2c 20 73 68 6f 72 74 | 20 74 68 65 47 65 74 49 |g, short| theGetI|
|00003ac0| 74 65 6d 29 0d 7b 0d 20 | 20 20 20 73 68 6f 72 74 |tem).{. | short|
|00003ad0| 09 69 74 65 6d 74 79 70 | 65 3b 0d 20 20 20 20 52 |.itemtyp|e;. R|
|00003ae0| 65 63 74 09 69 74 65 6d | 72 65 63 74 3b 0d 20 20 |ect.item|rect;. |
|00003af0| 20 20 48 61 6e 64 6c 65 | 09 74 65 6d 70 48 61 6e | Handle|.tempHan|
|00003b00| 64 6c 65 3b 0d 20 20 20 | 20 0d 20 20 20 20 47 65 |dle;. | . Ge|
|00003b10| 74 44 49 74 65 6d 28 74 | 68 65 44 69 61 6c 6f 67 |tDItem(t|heDialog|
|00003b20| 2c 20 74 68 65 47 65 74 | 49 74 65 6d 2c 20 26 69 |, theGet|Item, &i|
|00003b30| 74 65 6d 74 79 70 65 2c | 20 26 74 65 6d 70 48 61 |temtype,| &tempHa|
|00003b40| 6e 64 6c 65 2c 20 26 69 | 74 65 6d 72 65 63 74 29 |ndle, &i|temrect)|
|00003b50| 3b 0d 20 20 20 20 72 65 | 74 75 72 6e 28 28 43 6f |;. re|turn((Co|
|00003b60| 6e 74 72 6f 6c 48 61 6e | 64 6c 65 29 74 65 6d 70 |ntrolHan|dle)temp|
|00003b70| 48 61 6e 64 6c 65 29 3b | 0d 7d 20 2f 2f 20 47 72 |Handle);|.} // Gr|
|00003b80| 61 62 44 49 74 65 6d 48 | 61 6e 64 6c 65 0d 0d 0d |abDItemH|andle...|
|00003b90| 2f 2a 20 53 65 74 73 20 | 64 69 61 6c 6f 67 27 73 |/* Sets |dialog's|
|00003ba0| 20 23 31 20 69 74 65 6d | 27 73 20 64 69 73 70 6c | #1 item|'s displ|
|00003bb0| 61 79 20 70 72 6f 63 20 | 74 6f 20 64 72 61 77 20 |ay proc |to draw |
|00003bc0| 6f 75 74 6c 69 6e 65 20 | 2a 2f 0d 76 6f 69 64 20 |outline |*/.void |
|00003bd0| 53 65 74 75 70 44 65 66 | 61 75 6c 74 42 75 74 74 |SetupDef|aultButt|
|00003be0| 6f 6e 28 44 69 61 6c 6f | 67 50 74 72 20 74 68 65 |on(Dialo|gPtr the|
|00003bf0| 44 69 61 6c 6f 67 29 0d | 7b 0d 20 20 20 20 73 68 |Dialog).|{. sh|
|00003c00| 6f 72 74 09 69 74 65 6d | 74 79 70 65 3b 0d 20 20 |ort.item|type;. |
|00003c10| 20 20 52 65 63 74 09 69 | 74 65 6d 72 65 63 74 3b | Rect.i|temrect;|
|00003c20| 0d 20 20 20 20 48 61 6e | 64 6c 65 09 74 65 6d 70 |. Han|dle.temp|
|00003c30| 48 61 6e 64 6c 65 3b 0d | 0d 09 2f 2a 20 53 65 74 |Handle;.|../* Set|
|00003c40| 20 75 70 20 55 73 65 72 | 20 69 74 65 6d 20 28 61 | up User| item (a|
|00003c50| 6c 77 61 79 73 20 23 33 | 29 20 74 6f 20 64 69 73 |lways #3|) to dis|
|00003c60| 70 6c 61 79 20 61 20 62 | 6f 72 64 65 72 20 61 72 |play a b|order ar|
|00003c70| 6f 75 6e 64 20 4f 4b 20 | 62 75 74 74 6f 6e 20 28 |ound OK |button (|
|00003c80| 23 31 29 20 2a 2f 0d 09 | 47 65 74 44 49 74 65 6d |#1) */..|GetDItem|
|00003c90| 28 74 68 65 44 69 61 6c | 6f 67 2c 20 6b 44 65 66 |(theDial|og, kDef|
|00003ca0| 61 75 6c 74 49 74 65 6d | 2c 20 26 69 74 65 6d 74 |aultItem|, &itemt|
|00003cb0| 79 70 65 2c 20 26 74 65 | 6d 70 48 61 6e 64 6c 65 |ype, &te|mpHandle|
|00003cc0| 2c 20 26 69 74 65 6d 72 | 65 63 74 29 3b 0d 20 20 |, &itemr|ect);. |
|00003cd0| 20 20 53 65 74 44 49 74 | 65 6d 28 74 68 65 44 69 | SetDIt|em(theDi|
|00003ce0| 61 6c 6f 67 2c 20 6b 44 | 65 66 61 75 6c 74 49 74 |alog, kD|efaultIt|
|00003cf0| 65 6d 2c 20 69 74 65 6d | 74 79 70 65 2c 20 28 48 |em, item|type, (H|
|00003d00| 61 6e 64 6c 65 29 26 6f | 75 74 6c 69 6e 65 44 65 |andle)&o|utlineDe|
|00003d10| 66 61 75 6c 74 42 75 74 | 74 6f 6e 2c 20 26 69 74 |faultBut|ton, &it|
|00003d20| 65 6d 72 65 63 74 29 3b | 0d 20 20 20 20 65 6e 61 |emrect);|. ena|
|00003d30| 62 6c 65 5f 72 65 74 75 | 72 6e 5f 6b 65 79 20 3d |ble_retu|rn_key =|
|00003d40| 20 31 3b 09 2f 2f 20 65 | 6e 61 62 6c 65 20 74 68 | 1;.// e|nable th|
|00003d50| 65 20 52 65 74 75 72 6e | 20 6b 65 79 20 66 6f 72 |e Return| key for|
|00003d60| 20 22 4f 4b 22 20 62 79 | 20 64 65 66 61 75 6c 74 | "OK" by| default|
|00003d70| 2e 0d 7d 20 2f 2f 20 53 | 65 74 75 70 44 65 66 61 |..} // S|etupDefa|
|00003d80| 75 6c 74 42 75 74 74 6f | 6e 0d 0d 0d 70 61 73 63 |ultButto|n...pasc|
|00003d90| 61 6c 20 42 6f 6f 6c 65 | 61 6e 20 4d 6f 64 61 6c |al Boole|an Modal|
|00003da0| 46 69 6c 74 65 72 28 44 | 69 61 6c 6f 67 50 74 72 |Filter(D|ialogPtr|
|00003db0| 20 74 68 65 44 69 61 6c | 6f 67 2c 20 45 76 65 6e | theDial|og, Even|
|00003dc0| 74 52 65 63 6f 72 64 20 | 2a 74 68 65 44 69 61 6c |tRecord |*theDial|
|00003dd0| 6f 67 45 76 65 6e 74 2c | 20 73 68 6f 72 74 20 2a |ogEvent,| short *|
|00003de0| 74 68 65 44 69 61 6c 6f | 67 49 74 65 6d 29 0d 7b |theDialo|gItem).{|
|00003df0| 0d 20 20 20 20 57 69 6e | 64 6f 77 50 74 72 20 74 |. Win|dowPtr t|
|00003e00| 65 6d 70 47 50 3b 0d 20 | 20 20 20 63 68 61 72 20 |empGP;. | char |
|00003e10| 74 68 65 4b 65 79 3b 0d | 20 20 20 20 6c 6f 6e 67 |theKey;.| long|
|00003e20| 20 74 69 6c 74 69 63 6b | 73 3b 0d 20 20 20 20 42 | tiltick|s;. B|
|00003e30| 6f 6f 6c 65 61 6e 20 72 | 65 74 75 72 6e 56 61 6c |oolean r|eturnVal|
|00003e40| 20 3d 20 66 61 6c 73 65 | 3b 20 2f 2f 20 6e 6f 74 | = false|; // not|
|00003e50| 20 79 65 74 20 68 61 6e | 64 6c 65 64 0d 0d 09 2f | yet han|dled.../|
|00003e60| 2a 20 72 65 6d 65 6d 62 | 65 72 20 77 68 65 72 65 |* rememb|er where|
|00003e70| 20 77 65 20 70 61 72 6b | 65 64 20 2a 2f 0d 20 20 | we park|ed */. |
|00003e80| 20 20 47 65 74 50 6f 72 | 74 28 26 74 65 6d 70 47 | GetPor|t(&tempG|
|00003e90| 50 29 3b 0d 20 20 20 20 | 53 65 74 50 6f 72 74 28 |P);. |SetPort(|
|00003ea0| 74 68 65 44 69 61 6c 6f | 67 29 3b 0d 0d 09 2f 2a |theDialo|g);.../*|
|00003eb0| 20 44 65 61 6c 20 77 69 | 74 68 20 4b 65 79 44 6f | Deal wi|th KeyDo|
|00003ec0| 77 6e 73 20 2a 2f 0d 20 | 20 20 20 69 66 20 28 28 |wns */. | if ((|
|00003ed0| 74 68 65 44 69 61 6c 6f | 67 45 76 65 6e 74 2d 3e |theDialo|gEvent->|
|00003ee0| 77 68 61 74 20 3d 3d 20 | 6b 65 79 44 6f 77 6e 29 |what == |keyDown)|
|00003ef0| 20 7c 7c 20 28 74 68 65 | 44 69 61 6c 6f 67 45 76 | || (the|DialogEv|
|00003f00| 65 6e 74 2d 3e 77 68 61 | 74 20 3d 3d 20 61 75 74 |ent->wha|t == aut|
|00003f10| 6f 4b 65 79 29 29 0d 09 | 7b 0d 20 20 20 20 20 20 |oKey))..|{. |
|00003f20| 20 20 74 68 65 4b 65 79 | 20 3d 20 74 68 65 44 69 | theKey| = theDi|
|00003f30| 61 6c 6f 67 45 76 65 6e | 74 2d 3e 6d 65 73 73 61 |alogEven|t->messa|
|00003f40| 67 65 20 26 20 63 68 61 | 72 43 6f 64 65 4d 61 73 |ge & cha|rCodeMas|
|00003f50| 6b 3b 0d 0d 09 20 20 20 | 20 2f 2a 20 44 6f 20 66 |k;... | /* Do f|
|00003f60| 69 6c 74 65 72 69 6e 67 | 20 66 6f 72 20 3c 45 53 |iltering| for <ES|
|00003f70| 43 3e 20 61 6e 64 20 3c | 43 52 3e 20 61 73 20 4f |C> and <|CR> as O|
|00003f80| 4b 20 61 6e 64 20 43 61 | 6e 63 65 6c 2c 20 70 65 |K and Ca|ncel, pe|
|00003f90| 72 20 48 75 6d 61 6e 20 | 49 6e 74 65 72 66 61 63 |r Human |Interfac|
|00003fa0| 65 20 67 75 69 64 65 6c | 69 6e 65 73 2e 20 2a 2f |e guidel|ines. */|
|00003fb0| 0d 20 20 20 20 20 20 20 | 20 73 77 69 74 63 68 20 |. | switch |
|00003fc0| 28 74 68 65 4b 65 79 29 | 0d 09 09 7b 0d 20 20 20 |(theKey)|...{. |
|00003fd0| 20 20 20 20 20 20 20 20 | 20 63 61 73 65 20 6b 45 | | case kE|
|00003fe0| 6e 74 65 72 4b 65 79 3a | 0d 09 09 09 09 2f 2a 20 |nterKey:|...../* |
|00003ff0| 4d 61 6b 65 20 74 68 65 | 20 45 6e 74 65 72 20 6b |Make the| Enter k|
|00004000| 65 79 20 69 64 65 6e 74 | 69 63 61 6c 20 74 6f 20 |ey ident|ical to |
|00004010| 74 68 65 20 52 65 74 75 | 72 6e 20 6b 65 79 21 20 |the Retu|rn key! |
|00004020| 2a 2f 0d 09 09 09 09 2f | 2a 20 4d 61 73 6b 20 6f |*/...../|* Mask o|
|00004030| 75 74 20 74 68 65 20 45 | 6e 74 65 72 20 6b 65 79 |ut the E|nter key|
|00004040| 2c 20 61 6e 64 20 4f 52 | 20 69 6e 20 74 68 65 20 |, and OR| in the |
|00004050| 52 65 74 75 72 6e 20 6b | 65 79 20 2a 2f 0d 09 09 |Return k|ey */...|
|00004060| 09 09 74 68 65 44 69 61 | 6c 6f 67 45 76 65 6e 74 |..theDia|logEvent|
|00004070| 2d 3e 6d 65 73 73 61 67 | 65 20 3d 20 28 74 68 65 |->messag|e = (the|
|00004080| 44 69 61 6c 6f 67 45 76 | 65 6e 74 2d 3e 6d 65 73 |DialogEv|ent->mes|
|00004090| 73 61 67 65 20 26 20 7e | 63 68 61 72 43 6f 64 65 |sage & ~|charCode|
|000040a0| 4d 61 73 6b 29 20 7c 20 | 6b 52 65 74 75 72 6e 4b |Mask) | |kReturnK|
|000040b0| 65 79 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ey;. | |
|000040c0| 63 61 73 65 20 6b 52 65 | 74 75 72 6e 4b 65 79 3a |case kRe|turnKey:|
|000040d0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 09 69 66 |. | .if|
|000040e0| 20 28 65 6e 61 62 6c 65 | 5f 72 65 74 75 72 6e 5f | (enable|_return_|
|000040f0| 6b 65 79 29 0d 20 20 20 | 20 20 20 20 20 20 20 20 |key). | |
|00004100| 20 09 7b 0d 09 20 20 20 | 20 20 20 20 20 20 20 20 | .{.. | |
|00004110| 20 20 20 20 20 2f 2a 20 | 54 68 69 73 20 66 69 6c | /* |This fil|
|00004120| 74 65 72 73 20 66 6f 72 | 20 52 65 74 75 72 6e 20 |ters for| Return |
|00004130| 6f 72 20 45 6e 74 65 72 | 20 61 73 20 69 74 65 6d |or Enter| as item|
|00004140| 20 31 2c 20 61 6e 64 20 | 45 73 63 20 61 73 20 69 | 1, and |Esc as i|
|00004150| 74 65 6d 20 32 20 2a 2f | 0d 09 20 20 20 20 20 20 |tem 2 */|.. |
|00004160| 20 20 20 20 20 20 20 20 | 20 20 2a 74 68 65 44 69 | | *theDi|
|00004170| 61 6c 6f 67 49 74 65 6d | 20 3d 20 4f 4b 3b 09 09 |alogItem| = OK;..|
|00004180| 09 2f 2a 20 63 68 61 6e | 67 65 20 77 68 61 74 65 |./* chan|ge whate|
|00004190| 76 65 72 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ver the |current |
|000041a0| 69 74 65 6d 20 69 73 20 | 74 6f 20 74 68 65 20 4f |item is |to the O|
|000041b0| 4b 20 69 74 65 6d 20 2a | 2f 0d 09 20 20 20 20 20 |K item *|/.. |
|000041c0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 6e 6f | | /* no|
|000041d0| 77 20 77 65 20 6e 65 65 | 64 20 74 6f 20 69 6e 76 |w we nee|d to inv|
|000041e0| 65 72 74 20 74 68 65 20 | 62 75 74 74 6f 6e 20 2a |ert the |button *|
|000041f0| 2f 0d 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |/.. | |
|00004200| 20 20 20 48 69 6c 69 74 | 65 43 6f 6e 74 72 6f 6c | Hilit|eControl|
|00004210| 28 47 72 61 62 44 49 74 | 65 6d 48 61 6e 64 6c 65 |(GrabDIt|emHandle|
|00004220| 28 74 68 65 44 69 61 6c | 6f 67 2c 20 4f 4b 29 2c |(theDial|og, OK),|
|00004230| 20 69 6e 42 75 74 74 6f | 6e 29 3b 0d 09 20 20 20 | inButto|n);.. |
|00004240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 44 65 6c | | Del|
|00004250| 61 79 28 38 2c 20 26 74 | 69 6c 74 69 63 6b 73 29 |ay(8, &t|ilticks)|
|00004260| 3b 09 09 09 2f 2a 20 77 | 61 69 74 20 61 62 6f 75 |;.../* w|ait abou|
|00004270| 74 20 38 20 74 69 63 6b | 73 20 73 6f 20 74 68 65 |t 8 tick|s so the|
|00004280| 79 20 63 61 6e 20 73 65 | 65 20 69 74 20 2a 2f 0d |y can se|e it */.|
|00004290| 09 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000042a0| 20 48 69 6c 69 74 65 43 | 6f 6e 74 72 6f 6c 28 47 | HiliteC|ontrol(G|
|000042b0| 72 61 62 44 49 74 65 6d | 48 61 6e 64 6c 65 28 74 |rabDItem|Handle(t|
|000042c0| 68 65 44 69 61 6c 6f 67 | 2c 20 6f 6b 29 2c 20 66 |heDialog|, ok), f|
|000042d0| 61 6c 73 65 29 3b 0d 09 | 20 20 20 20 20 20 20 20 |alse);..| |
|000042e0| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 56 61 | |returnVa|
|000042f0| 6c 20 3d 20 74 72 75 65 | 3b 0d 20 20 20 20 20 20 |l = true|;. |
|00004300| 20 20 20 20 20 20 20 20 | 20 20 7d 0d 20 20 20 20 | | }. |
|00004310| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 72 65 61 | | brea|
|00004320| 6b 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k;. | |
|00004330| 20 20 20 2f 2a 20 54 68 | 69 73 20 66 69 6c 74 65 | /* Th|is filte|
|00004340| 72 73 20 74 68 65 20 65 | 73 63 61 70 65 20 6b 65 |rs the e|scape ke|
|00004350| 79 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 69 74 |y the sa|me as it|
|00004360| 65 6d 20 32 20 28 74 68 | 65 20 63 61 6e 78 20 62 |em 2 (th|e canx b|
|00004370| 75 74 74 6f 6e 2c 20 75 | 73 75 61 6c 6c 79 20 29 |utton, u|sually )|
|00004380| 20 2a 2f 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | */. | |
|00004390| 63 61 73 65 20 6b 45 73 | 63 4b 65 79 3a 0d 20 20 |case kEs|cKey:. |
|000043a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 74 | | *t|
|000043b0| 68 65 44 69 61 6c 6f 67 | 49 74 65 6d 20 3d 20 43 |heDialog|Item = C|
|000043c0| 61 6e 63 65 6c 3b 09 09 | 2f 2a 20 70 72 65 74 65 |ancel;..|/* prete|
|000043d0| 6e 64 20 74 68 65 20 63 | 61 6e 63 65 6c 20 62 75 |nd the c|ancel bu|
|000043e0| 74 74 6f 6e 20 77 61 73 | 20 68 69 74 20 2a 2f 0d |tton was| hit */.|
|000043f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004400| 48 69 6c 69 74 65 43 6f | 6e 74 72 6f 6c 28 47 72 |HiliteCo|ntrol(Gr|
|00004410| 61 62 44 49 74 65 6d 48 | 61 6e 64 6c 65 28 74 68 |abDItemH|andle(th|
|00004420| 65 44 69 61 6c 6f 67 2c | 20 43 61 6e 63 65 6c 29 |eDialog,| Cancel)|
|00004430| 2c 20 69 6e 42 75 74 74 | 6f 6e 29 3b 0d 20 20 20 |, inButt|on);. |
|00004440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 44 65 6c | | Del|
|00004450| 61 79 28 38 2c 20 26 74 | 69 6c 74 69 63 6b 73 29 |ay(8, &t|ilticks)|
|00004460| 3b 09 09 09 2f 2a 20 77 | 61 69 74 20 61 62 6f 75 |;.../* w|ait abou|
|00004470| 74 20 38 20 74 69 63 6b | 73 20 73 6f 20 74 68 65 |t 8 tick|s so the|
|00004480| 79 20 63 61 6e 20 73 65 | 65 20 69 74 20 2a 2f 0d |y can se|e it */.|
|00004490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044a0| 48 69 6c 69 74 65 43 6f | 6e 74 72 6f 6c 28 47 72 |HiliteCo|ntrol(Gr|
|000044b0| 61 62 44 49 74 65 6d 48 | 61 6e 64 6c 65 28 74 68 |abDItemH|andle(th|
|000044c0| 65 44 69 61 6c 6f 67 2c | 20 43 61 6e 63 65 6c 29 |eDialog,| Cancel)|
|000044d0| 2c 20 66 61 6c 73 65 29 | 3b 0d 20 20 20 20 20 20 |, false)|;. |
|000044e0| 20 20 20 20 20 20 20 20 | 20 20 20 72 65 74 75 72 | | retur|
|000044f0| 6e 56 61 6c 20 3d 20 74 | 72 75 65 3b 0d 20 20 20 |nVal = t|rue;. |
|00004500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 62 72 65 | | bre|
|00004510| 61 6b 3b 0d 09 09 7d 20 | 2f 2f 20 73 77 69 74 63 |ak;...} |// switc|
|00004520| 68 0d 20 20 20 20 7d 20 | 2f 2f 20 69 66 20 6b 65 |h. } |// if ke|
|00004530| 79 64 6f 77 6e 0d 0d 09 | 53 65 74 50 6f 72 74 28 |ydown...|SetPort(|
|00004540| 74 65 6d 70 47 50 29 3b | 0d 0d 09 72 65 74 75 72 |tempGP);|...retur|
|00004550| 6e 28 72 65 74 75 72 6e | 56 61 6c 29 3b 0d 0d 7d |n(return|Val);..}|
|00004560| 20 2f 2f 20 4d 6f 64 61 | 6c 46 69 6c 74 65 72 0d | // Moda|lFilter.|
|00004570| 0d 0d 4f 53 45 72 72 20 | 47 6f 74 52 65 71 75 69 |..OSErr |GotRequi|
|00004580| 72 65 64 50 61 72 61 6d | 73 28 41 70 70 6c 65 45 |redParam|s(AppleE|
|00004590| 76 65 6e 74 09 2a 74 68 | 65 41 70 70 6c 65 45 76 |vent.*th|eAppleEv|
|000045a0| 65 6e 74 29 0d 7b 0d 09 | 44 65 73 63 54 79 70 65 |ent).{..|DescType|
|000045b0| 09 74 79 70 65 43 6f 64 | 65 3b 0d 09 53 69 7a 65 |.typeCod|e;..Size|
|000045c0| 09 09 61 63 74 75 61 6c | 53 69 7a 65 3b 0d 09 4f |..actual|Size;..O|
|000045d0| 53 45 72 72 09 09 65 72 | 72 3b 0d 0d 09 65 72 72 |SErr..er|r;...err|
|000045e0| 20 3d 20 41 45 47 65 74 | 41 74 74 72 69 62 75 74 | = AEGet|Attribut|
|000045f0| 65 50 74 72 28 74 68 65 | 41 70 70 6c 65 45 76 65 |ePtr(the|AppleEve|
|00004600| 6e 74 2c 20 6b 65 79 4d | 69 73 73 65 64 4b 65 79 |nt, keyM|issedKey|
|00004610| 77 6f 72 64 41 74 74 72 | 2c 20 74 79 70 65 57 69 |wordAttr|, typeWi|
|00004620| 6c 64 43 61 72 64 2c 0d | 09 09 09 09 09 09 09 26 |ldCard,.|.......&|
|00004630| 74 79 70 65 43 6f 64 65 | 2c 20 4e 55 4c 4c 2c 20 |typeCode|, NULL, |
|00004640| 30 2c 20 26 61 63 74 75 | 61 6c 53 69 7a 65 29 3b |0, &actu|alSize);|
|00004650| 09 2f 2a 20 4e 55 4c 4c | 20 6f 6b 20 68 65 72 65 |./* NULL| ok here|
|00004660| 3b 20 6e 65 65 64 20 6f | 6e 6c 79 20 66 75 6e 63 |; need o|nly func|
|00004670| 74 69 6f 6e 20 72 65 73 | 75 6c 74 20 2a 2f 0d 09 |tion res|ult */..|
|00004680| 69 66 20 28 65 72 72 20 | 3d 3d 20 65 72 72 41 45 |if (err |== errAE|
|00004690| 44 65 73 63 4e 6f 74 46 | 6f 75 6e 64 29 0d 09 09 |DescNotF|ound)...|
|000046a0| 2f 2f 20 77 65 20 67 6f | 74 20 61 6c 6c 20 74 68 |// we go|t all th|
|000046b0| 65 20 72 65 71 75 69 72 | 65 64 20 70 61 72 61 6d |e requir|ed param|
|000046c0| 73 3a 20 61 6c 6c 20 69 | 73 20 6f 6b 0d 09 09 72 |s: all i|s ok...r|
|000046d0| 65 74 75 72 6e 20 6e 6f | 45 72 72 3b 0d 09 65 6c |eturn no|Err;..el|
|000046e0| 73 65 20 69 66 20 28 65 | 72 72 20 3d 3d 20 6e 6f |se if (e|rr == no|
|000046f0| 45 72 72 29 0d 09 09 2f | 2f 20 66 6f 75 6e 64 20 |Err).../|/ found |
|00004700| 6f 6e 65 20 6c 65 66 74 | 20 62 65 68 69 6e 64 3a |one left| behind:|
|00004710| 20 65 72 72 6f 72 21 0d | 09 09 72 65 74 75 72 6e | error!.|..return|
|00004720| 20 65 72 72 41 45 45 76 | 65 6e 74 4e 6f 74 48 61 | errAEEv|entNotHa|
|00004730| 6e 64 6c 65 64 3b 0d 09 | 65 6c 73 65 0d 09 09 2f |ndled;..|else.../|
|00004740| 2f 20 73 6f 6d 65 20 6f | 74 68 65 72 20 6f 64 64 |/ some o|ther odd|
|00004750| 69 74 79 0d 09 09 72 65 | 74 75 72 6e 20 65 72 72 |ity...re|turn err|
|00004760| 3b 0d 7d 20 2f 2f 20 47 | 6f 74 52 65 71 75 69 72 |;.} // G|otRequir|
|00004770| 65 64 50 61 72 61 6d 73 | 0d 0d 0d 70 61 73 63 61 |edParams|...pasca|
|00004780| 6c 20 4f 53 45 72 72 20 | 48 61 6e 64 6c 65 4f 61 |l OSErr |HandleOa|
|00004790| 70 70 20 28 41 45 44 65 | 73 63 4c 69 73 74 20 2a |pp (AEDe|scList *|
|000047a0| 61 65 76 74 2c 20 41 45 | 44 65 73 63 4c 69 73 74 |aevt, AE|DescList|
|000047b0| 20 2a 72 65 70 6c 79 2c | 20 6c 6f 6e 67 20 72 65 | *reply,| long re|
|000047c0| 66 43 6f 6e 29 0d 7b 0d | 23 70 72 61 67 6d 61 20 |fCon).{.|#pragma |
|000047d0| 75 6e 75 73 65 64 20 28 | 72 65 70 6c 79 2c 72 65 |unused (|reply,re|
|000047e0| 66 43 6f 6e 29 0d 09 4f | 53 45 72 72 09 61 6e 45 |fCon)..O|SErr.anE|
|000047f0| 72 72 6f 72 3b 0d 0d 09 | 2f 2a 20 57 65 20 64 6f |rror;...|/* We do|
|00004800| 6e 27 74 20 6e 6f 72 6d | 61 6c 6c 79 20 65 78 70 |n't norm|ally exp|
|00004810| 65 63 74 20 61 6e 79 20 | 70 61 72 6d 73 2c 20 62 |ect any |parms, b|
|00004820| 75 74 20 63 68 65 63 6b | 20 69 6e 20 63 61 73 65 |ut check| in case|
|00004830| 20 74 68 65 20 63 6c 69 | 65 6e 74 20 72 65 71 75 | the cli|ent requ|
|00004840| 69 72 65 73 20 61 6e 79 | 20 2a 2f 0d 09 61 6e 45 |ires any| */..anE|
|00004850| 72 72 6f 72 20 3d 20 47 | 6f 74 52 65 71 75 69 72 |rror = G|otRequir|
|00004860| 65 64 50 61 72 61 6d 73 | 28 61 65 76 74 29 3b 0d |edParams|(aevt);.|
|00004870| 09 69 66 20 28 21 61 6e | 45 72 72 6f 72 29 0d 09 |.if (!an|Error)..|
|00004880| 09 44 6f 46 69 6c 65 5f | 4e 65 77 28 29 3b 0d 0d |.DoFile_|New();..|
|00004890| 09 2f 2a 20 69 66 20 73 | 70 6c 61 73 68 20 73 63 |./* if s|plash sc|
|000048a0| 72 65 65 6e 20 69 73 20 | 75 70 2c 20 70 75 6c 6c |reen is |up, pull|
|000048b0| 20 69 74 20 62 61 63 6b | 20 74 6f 20 74 68 65 20 | it back| to the |
|000048c0| 66 72 6f 6e 74 21 20 2a | 2f 0d 09 69 66 20 28 73 |front! *|/..if (s|
|000048d0| 74 61 72 74 75 70 53 63 | 72 65 65 6e 29 0d 09 7b |tartupSc|reen)..{|
|000048e0| 0d 09 09 53 65 6c 65 63 | 74 57 69 6e 64 6f 77 28 |...Selec|tWindow(|
|000048f0| 73 74 61 72 74 75 70 53 | 63 72 65 65 6e 29 3b 0d |startupS|creen);.|
|00004900| 09 09 44 72 61 77 44 69 | 61 6c 6f 67 28 73 74 61 |..DrawDi|alog(sta|
|00004910| 72 74 75 70 53 63 72 65 | 65 6e 29 3b 0d 09 7d 0d |rtupScre|en);..}.|
|00004920| 09 72 65 74 75 72 6e 20 | 61 6e 45 72 72 6f 72 3b |.return |anError;|
|00004930| 0d 7d 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |.}..pasc|al OSErr|
|00004940| 20 48 61 6e 64 6c 65 4f | 64 6f 63 20 28 41 45 44 | HandleO|doc (AED|
|00004950| 65 73 63 4c 69 73 74 20 | 2a 61 65 76 74 2c 20 41 |escList |*aevt, A|
|00004960| 45 44 65 73 63 4c 69 73 | 74 20 2a 72 65 70 6c 79 |EDescLis|t *reply|
|00004970| 2c 20 6c 6f 6e 67 20 72 | 65 66 43 6f 6e 29 0d 7b |, long r|efCon).{|
|00004980| 0d 23 70 72 61 67 6d 61 | 20 75 6e 75 73 65 64 20 |.#pragma| unused |
|00004990| 28 72 65 70 6c 79 2c 72 | 65 66 43 6f 6e 29 0d 09 |(reply,r|efCon)..|
|000049a0| 4f 53 45 72 72 09 09 61 | 6e 45 72 72 6f 72 3b 0d |OSErr..a|nError;.|
|000049b0| 09 41 45 44 65 73 63 09 | 09 66 69 6c 65 4c 69 73 |.AEDesc.|.fileLis|
|000049c0| 74 44 65 73 63 3b 0d 09 | 44 65 73 63 54 79 70 65 |tDesc;..|DescType|
|000049d0| 09 61 63 74 75 61 6c 54 | 79 70 65 3b 0d 09 6c 6f |.actualT|ype;..lo|
|000049e0| 6e 67 09 09 61 63 74 75 | 61 6c 53 69 7a 65 3b 0d |ng..actu|alSize;.|
|000049f0| 09 41 45 4b 65 79 77 6f | 72 64 09 61 63 74 75 61 |.AEKeywo|rd.actua|
|00004a00| 6c 4b 65 79 77 6f 72 64 | 3b 0d 09 46 53 53 70 65 |lKeyword|;..FSSpe|
|00004a10| 63 09 09 6f 6e 65 46 69 | 6c 65 3b 0d 09 6c 6f 6e |c..oneFi|le;..lon|
|00004a20| 67 09 09 6e 75 6d 46 69 | 6c 65 73 3b 0d 09 6c 6f |g..numFi|les;..lo|
|00004a30| 6e 67 09 09 69 6e 64 65 | 78 3b 0d 09 09 09 09 09 |ng..inde|x;......|
|00004a40| 09 0d 09 2f 2a 20 54 68 | 65 20 22 6f 64 6f 63 22 |.../* Th|e "odoc"|
|00004a50| 20 61 6e 64 20 22 70 64 | 6f 63 22 20 6d 65 73 73 | and "pd|oc" mess|
|00004a60| 61 67 65 73 20 63 6f 6e | 74 61 69 6e 20 61 20 6c |ages con|tain a l|
|00004a70| 69 73 74 20 6f 66 20 61 | 6c 69 61 73 65 73 20 61 |ist of a|liases a|
|00004a80| 73 20 74 68 65 20 64 69 | 72 65 63 74 20 70 61 72 |s the di|rect par|
|00004a90| 61 6d 61 74 65 72 2e 09 | 2a 2f 0d 09 2f 2a 20 54 |amater..|*/../* T|
|00004aa0| 68 69 73 20 6d 65 61 6e | 73 20 74 68 61 74 20 77 |his mean|s that w|
|00004ab0| 65 27 6c 6c 20 6e 65 65 | 64 20 74 6f 20 65 78 74 |e'll nee|d to ext|
|00004ac0| 72 61 63 74 20 74 68 65 | 20 6c 69 73 74 2c 20 63 |ract the| list, c|
|00004ad0| 6f 75 6e 74 20 74 68 65 | 20 6c 69 73 74 27 73 20 |ount the| list's |
|00004ae0| 65 6c 65 6d 65 6e 74 73 | 2c 20 61 6e 64 09 09 2a |elements|, and..*|
|00004af0| 2f 0d 09 2f 2a 20 74 68 | 65 6e 20 70 72 6f 63 65 |/../* th|en proce|
|00004b00| 73 73 20 65 61 63 68 20 | 66 69 6c 65 20 69 6e 20 |ss each |file in |
|00004b10| 74 75 72 6e 2e 09 52 65 | 74 75 72 6e 20 61 6e 79 |turn..Re|turn any|
|00004b20| 20 65 72 72 6f 72 73 20 | 74 6f 20 74 68 65 20 63 | errors |to the c|
|00004b30| 6c 69 65 6e 74 2e 09 09 | 09 09 09 2a 2f 0d 0d 09 |lient...|...*/...|
|00004b40| 2f 2a 20 45 78 74 72 61 | 63 74 20 74 68 65 20 6c |/* Extra|ct the l|
|00004b50| 69 73 74 20 6f 66 20 61 | 6c 69 61 73 65 73 20 69 |ist of a|liases i|
|00004b60| 6e 74 6f 20 66 69 6c 65 | 4c 69 73 74 44 65 73 63 |nto file|ListDesc|
|00004b70| 20 2a 2f 0d 09 61 6e 45 | 72 72 6f 72 20 3d 20 41 | */..anE|rror = A|
|00004b80| 45 47 65 74 50 61 72 61 | 6d 44 65 73 63 28 61 65 |EGetPara|mDesc(ae|
|00004b90| 76 74 2c 20 6b 65 79 44 | 69 72 65 63 74 4f 62 6a |vt, keyD|irectObj|
|00004ba0| 65 63 74 2c 20 74 79 70 | 65 41 45 4c 69 73 74 2c |ect, typ|eAEList,|
|00004bb0| 20 26 66 69 6c 65 4c 69 | 73 74 44 65 73 63 29 3b | &fileLi|stDesc);|
|00004bc0| 0d 0d 09 2f 2a 20 4d 61 | 6b 65 20 73 75 72 65 20 |.../* Ma|ke sure |
|00004bd0| 74 68 61 74 27 73 20 61 | 6c 6c 20 77 65 27 72 65 |that's a|ll we're|
|00004be0| 20 73 75 70 70 6f 73 65 | 64 20 74 6f 20 64 6f 20 | suppose|d to do |
|00004bf0| 2a 2f 0d 09 69 66 20 28 | 21 61 6e 45 72 72 6f 72 |*/..if (|!anError|
|00004c00| 29 0d 09 09 61 6e 45 72 | 72 6f 72 20 3d 20 47 6f |)...anEr|ror = Go|
|00004c10| 74 52 65 71 75 69 72 65 | 64 50 61 72 61 6d 73 28 |tRequire|dParams(|
|00004c20| 61 65 76 74 29 3b 0d 09 | 09 0d 09 2f 2a 20 43 6f |aevt);..|.../* Co|
|00004c30| 75 6e 74 20 74 68 65 20 | 6c 69 73 74 20 65 6c 65 |unt the |list ele|
|00004c40| 6d 65 6e 74 73 20 2a 2f | 0d 09 69 66 20 28 21 61 |ments */|..if (!a|
|00004c50| 6e 45 72 72 6f 72 29 0d | 09 09 61 6e 45 72 72 6f |nError).|..anErro|
|00004c60| 72 20 3d 20 41 45 43 6f | 75 6e 74 49 74 65 6d 73 |r = AECo|untItems|
|00004c70| 28 26 66 69 6c 65 4c 69 | 73 74 44 65 73 63 2c 20 |(&fileLi|stDesc, |
|00004c80| 26 6e 75 6d 46 69 6c 65 | 73 29 3b 0d 0d 09 2f 2a |&numFile|s);.../*|
|00004c90| 20 54 68 69 73 20 61 70 | 70 6c 69 63 61 74 69 6f | This ap|plicatio|
|00004ca0| 6e 20 69 73 20 72 61 74 | 68 65 72 20 6c 69 6d 69 |n is rat|her limi|
|00004cb0| 74 65 64 20 66 6f 72 20 | 6e 6f 77 2c 20 69 74 20 |ted for |now, it |
|00004cc0| 6a 75 73 74 20 2a 2f 0d | 09 2f 2a 20 77 61 6e 74 |just */.|./* want|
|00004cd0| 73 20 4f 4e 45 20 64 6f | 63 75 6d 65 6e 74 2e 20 |s ONE do|cument. |
|00004ce0| 20 45 72 72 20 69 66 20 | 6d 6f 72 65 21 20 2a 2f | Err if |more! */|
|00004cf0| 0d 09 69 66 20 28 21 61 | 6e 45 72 72 6f 72 20 26 |..if (!a|nError &|
|00004d00| 26 20 28 6e 75 6d 46 69 | 6c 65 73 20 3e 20 31 29 |& (numFi|les > 1)|
|00004d10| 29 0d 09 7b 0d 09 09 64 | 69 73 70 6c 61 79 44 69 |)..{...d|isplayDi|
|00004d20| 61 6c 6f 67 28 6b 64 6c | 6f 67 5f 54 4f 4f 5f 4d |alog(kdl|og_TOO_M|
|00004d30| 41 4e 59 5f 46 49 4c 45 | 53 2c 20 22 22 2c 20 6e |ANY_FILE|S, "", n|
|00004d40| 75 6d 46 69 6c 65 73 29 | 3b 0d 09 09 6e 75 6d 46 |umFiles)|;...numF|
|00004d50| 69 6c 65 73 20 3d 20 31 | 3b 20 2f 2a 20 66 6f 72 |iles = 1|; /* for|
|00004d60| 63 65 20 74 68 65 20 69 | 73 73 75 65 21 20 2a 2f |ce the i|ssue! */|
|00004d70| 0d 09 7d 0d 0d 09 2f 2a | 20 6e 6f 77 20 67 65 74 |..}.../*| now get|
|00004d80| 20 65 61 63 68 20 66 69 | 6c 65 20 66 72 6f 6d 20 | each fi|le from |
|00004d90| 74 68 65 20 6c 69 73 74 | 20 61 6e 64 20 70 72 6f |the list| and pro|
|00004da0| 63 65 73 73 20 69 74 2e | 20 2a 2f 0d 09 2f 2a 20 |cess it.| */../* |
|00004db0| 45 76 65 6e 20 74 68 6f | 75 67 68 20 74 68 65 20 |Even tho|ugh the |
|00004dc0| 65 76 65 6e 74 20 63 6f | 6e 74 61 69 6e 73 20 61 |event co|ntains a|
|00004dd0| 20 6c 69 73 74 20 6f 66 | 20 61 6c 69 61 73 65 73 | list of| aliases|
|00004de0| 2c 20 74 68 65 20 41 70 | 70 6c 65 20 45 76 65 6e |, the Ap|ple Even|
|00004df0| 74 20 4d 61 6e 61 67 65 | 72 20 2a 2f 0d 09 2f 2a |t Manage|r */../*|
|00004e00| 20 77 69 6c 6c 20 63 6f | 6e 76 65 72 74 20 65 61 | will co|nvert ea|
|00004e10| 63 68 20 61 6c 69 61 73 | 20 74 6f 20 61 6e 20 46 |ch alias| to an F|
|00004e20| 53 53 70 65 63 20 69 66 | 20 77 65 20 61 73 6b 20 |SSpec if| we ask |
|00004e30| 69 74 20 74 6f 2e 20 2a | 2f 0d 09 66 6f 72 20 28 |it to. *|/..for (|
|00004e40| 69 6e 64 65 78 20 3d 20 | 31 3b 20 28 69 6e 64 65 |index = |1; (inde|
|00004e50| 78 20 3c 3d 20 6e 75 6d | 46 69 6c 65 73 29 20 26 |x <= num|Files) &|
|00004e60| 26 20 21 61 6e 45 72 72 | 6f 72 3b 20 69 6e 64 65 |& !anErr|or; inde|
|00004e70| 78 2b 2b 29 0d 09 7b 0d | 09 09 2f 2a 20 50 75 6c |x++)..{.|../* Pul|
|00004e80| 6c 20 74 68 65 20 4e 74 | 68 20 66 69 6c 65 20 6f |l the Nt|h file o|
|00004e90| 75 74 20 6f 66 20 74 68 | 65 20 61 65 76 74 20 6c |ut of th|e aevt l|
|00004ea0| 69 73 74 20 2a 2f 0d 09 | 09 61 6e 45 72 72 6f 72 |ist */..|.anError|
|00004eb0| 20 3d 20 41 45 47 65 74 | 4e 74 68 50 74 72 28 20 | = AEGet|NthPtr( |
|00004ec0| 26 66 69 6c 65 4c 69 73 | 74 44 65 73 63 2c 20 69 |&fileLis|tDesc, i|
|00004ed0| 6e 64 65 78 2c 20 74 79 | 70 65 46 53 53 2c 20 26 |ndex, ty|peFSS, &|
|00004ee0| 61 63 74 75 61 6c 4b 65 | 79 77 6f 72 64 2c 0d 09 |actualKe|yword,..|
|00004ef0| 09 09 09 09 09 09 26 61 | 63 74 75 61 6c 54 79 70 |......&a|ctualTyp|
|00004f00| 65 2c 20 28 50 74 72 29 | 26 6f 6e 65 46 69 6c 65 |e, (Ptr)|&oneFile|
|00004f10| 2c 20 73 69 7a 65 6f 66 | 28 6f 6e 65 46 69 6c 65 |, sizeof|(oneFile|
|00004f20| 29 2c 20 26 61 63 74 75 | 61 6c 53 69 7a 65 29 3b |), &actu|alSize);|
|00004f30| 0d 0d 09 09 2f 2a 20 4f | 70 65 6e 20 74 68 65 20 |..../* O|pen the |
|00004f40| 46 69 6c 65 20 68 65 72 | 65 20 2a 2f 0d 09 09 69 |File her|e */...i|
|00004f50| 66 20 28 21 61 6e 45 72 | 72 6f 72 29 0d 09 09 7b |f (!anEr|ror)...{|
|00004f60| 0d 09 09 09 4f 70 65 6e | 54 65 78 74 46 69 6c 65 |....Open|TextFile|
|00004f70| 28 6f 6e 65 46 69 6c 65 | 2e 6e 61 6d 65 2c 20 6f |(oneFile|.name, o|
|00004f80| 6e 65 46 69 6c 65 2e 76 | 52 65 66 4e 75 6d 2c 20 |neFile.v|RefNum, |
|00004f90| 6f 6e 65 46 69 6c 65 2e | 70 61 72 49 44 2c 20 74 |oneFile.|parID, t|
|00004fa0| 72 75 65 2f 2a 55 73 65 | 44 69 72 49 44 2a 2f 29 |rue/*Use|DirID*/)|
|00004fb0| 3b 09 09 09 0d 09 09 7d | 0d 09 7d 0d 0d 09 2f 2a |;......}|..}.../*|
|00004fc0| 20 41 6c 6c 20 64 6f 6e | 65 20 77 69 74 68 20 74 | All don|e with t|
|00004fd0| 68 65 20 6c 69 73 74 2c | 20 74 68 72 6f 77 20 69 |he list,| throw i|
|00004fe0| 74 20 61 77 61 79 20 2a | 2f 0d 09 69 66 20 28 21 |t away *|/..if (!|
|00004ff0| 61 6e 45 72 72 6f 72 29 | 0d 09 09 61 6e 45 72 72 |anError)|...anErr|
|00005000| 6f 72 20 3d 20 41 45 44 | 69 73 70 6f 73 65 44 65 |or = AED|isposeDe|
|00005010| 73 63 28 26 66 69 6c 65 | 4c 69 73 74 44 65 73 63 |sc(&file|ListDesc|
|00005020| 29 3b 0d 0d 09 2f 2a 20 | 69 66 20 73 70 6c 61 73 |);.../* |if splas|
|00005030| 68 20 73 63 72 65 65 6e | 20 69 73 20 75 70 2c 20 |h screen| is up, |
|00005040| 70 75 6c 6c 20 69 74 20 | 62 61 63 6b 20 74 6f 20 |pull it |back to |
|00005050| 74 68 65 20 66 72 6f 6e | 74 21 20 2a 2f 0d 09 69 |the fron|t! */..i|
|00005060| 66 20 28 73 74 61 72 74 | 75 70 53 63 72 65 65 6e |f (start|upScreen|
|00005070| 29 0d 09 7b 0d 09 09 53 | 65 6c 65 63 74 57 69 6e |)..{...S|electWin|
|00005080| 64 6f 77 28 73 74 61 72 | 74 75 70 53 63 72 65 65 |dow(star|tupScree|
|00005090| 6e 29 3b 0d 09 09 44 72 | 61 77 44 69 61 6c 6f 67 |n);...Dr|awDialog|
|000050a0| 28 73 74 61 72 74 75 70 | 53 63 72 65 65 6e 29 3b |(startup|Screen);|
|000050b0| 0d 09 7d 0d 0d 09 72 65 | 74 75 72 6e 20 61 6e 45 |..}...re|turn anE|
|000050c0| 72 72 6f 72 3b 0d 7d 0d | 0d 0d 70 61 73 63 61 6c |rror;.}.|..pascal|
|000050d0| 20 4f 53 45 72 72 20 48 | 61 6e 64 6c 65 51 75 69 | OSErr H|andleQui|
|000050e0| 74 20 28 41 45 44 65 73 | 63 4c 69 73 74 20 2a 61 |t (AEDes|cList *a|
|000050f0| 65 76 74 2c 20 41 45 44 | 65 73 63 4c 69 73 74 20 |evt, AED|escList |
|00005100| 2a 72 65 70 6c 79 2c 20 | 6c 6f 6e 67 20 72 65 66 |*reply, |long ref|
|00005110| 43 6f 6e 29 0d 7b 0d 23 | 70 72 61 67 6d 61 20 75 |Con).{.#|pragma u|
|00005120| 6e 75 73 65 64 20 28 72 | 65 70 6c 79 2c 72 65 66 |nused (r|eply,ref|
|00005130| 43 6f 6e 29 0d 0d 09 4f | 53 45 72 72 09 61 6e 45 |Con)...O|SErr.anE|
|00005140| 72 72 6f 72 3b 0d 0d 09 | 2f 2a 20 57 65 20 64 6f |rror;...|/* We do|
|00005150| 6e 27 74 20 6e 6f 72 6d | 61 6c 6c 79 20 65 78 70 |n't norm|ally exp|
|00005160| 65 63 74 20 61 6e 79 20 | 70 61 72 6d 73 2c 20 62 |ect any |parms, b|
|00005170| 75 74 20 63 68 65 63 6b | 20 69 6e 20 63 61 73 65 |ut check| in case|
|00005180| 20 74 68 65 20 63 6c 69 | 65 6e 74 20 72 65 71 75 | the cli|ent requ|
|00005190| 69 72 65 73 20 61 6e 79 | 20 2a 2f 0d 09 61 6e 45 |ires any| */..anE|
|000051a0| 72 72 6f 72 20 3d 20 47 | 6f 74 52 65 71 75 69 72 |rror = G|otRequir|
|000051b0| 65 64 50 61 72 61 6d 73 | 28 61 65 76 74 29 3b 0d |edParams|(aevt);.|
|000051c0| 0d 09 53 74 6f 70 5f 46 | 6c 61 67 20 3d 20 71 75 |..Stop_F|lag = qu|
|000051d0| 69 74 5f 66 6c 61 67 20 | 3d 20 54 52 55 45 3b 0d |it_flag |= TRUE;.|
|000051e0| 09 72 65 74 75 72 6e 20 | 61 6e 45 72 72 6f 72 3b |.return |anError;|
|000051f0| 0d 7d 0d 0d 0d 76 6f 69 | 64 20 49 6e 73 74 61 6c |.}...voi|d Instal|
|00005200| 6c 5f 41 70 70 6c 65 45 | 76 65 6e 74 73 28 76 6f |l_AppleE|vents(vo|
|00005210| 69 64 29 0d 7b 0d 09 4f | 53 45 72 72 09 65 72 72 |id).{..O|SErr.err|
|00005220| 3b 0d 09 6c 6f 6e 67 09 | 72 65 73 75 6c 74 3b 0d |;..long.|result;.|
|00005230| 0d 09 69 66 20 28 47 65 | 73 74 61 6c 74 5f 41 76 |..if (Ge|stalt_Av|
|00005240| 61 69 6c 61 62 6c 65 29 | 0d 09 7b 0d 09 09 65 72 |ailable)|..{...er|
|00005250| 72 20 3d 20 47 65 73 74 | 61 6c 74 28 67 65 73 74 |r = Gest|alt(gest|
|00005260| 61 6c 74 41 70 70 6c 65 | 45 76 65 6e 74 73 41 74 |altApple|EventsAt|
|00005270| 74 72 2c 20 26 72 65 73 | 75 6c 74 29 3b 0d 09 09 |tr, &res|ult);...|
|00005280| 69 66 20 28 65 72 72 20 | 3d 3d 20 6e 6f 45 72 72 |if (err |== noErr|
|00005290| 29 20 7b 09 0d 09 09 09 | 41 70 70 6c 65 45 76 65 |) {.....|AppleEve|
|000052a0| 6e 74 73 5f 41 76 61 69 | 6c 61 62 6c 65 20 3d 20 |nts_Avai|lable = |
|000052b0| 54 52 55 45 3b 0d 09 09 | 09 28 76 6f 69 64 29 41 |TRUE;...|.(void)A|
|000052c0| 45 49 6e 73 74 61 6c 6c | 45 76 65 6e 74 48 61 6e |EInstall|EventHan|
|000052d0| 64 6c 65 72 28 6b 43 6f | 72 65 45 76 65 6e 74 43 |dler(kCo|reEventC|
|000052e0| 6c 61 73 73 2c 20 6b 41 | 45 4f 70 65 6e 41 70 70 |lass, kA|EOpenApp|
|000052f0| 6c 69 63 61 74 69 6f 6e | 2c 20 0d 09 09 09 09 09 |lication|, ......|
|00005300| 09 09 09 28 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |...(Even|tHandler|
|00005310| 50 72 6f 63 50 74 72 29 | 48 61 6e 64 6c 65 4f 61 |ProcPtr)|HandleOa|
|00005320| 70 70 2c 20 30 2c 20 66 | 61 6c 73 65 29 3b 0d 09 |pp, 0, f|alse);..|
|00005330| 09 09 28 76 6f 69 64 29 | 41 45 49 6e 73 74 61 6c |..(void)|AEInstal|
|00005340| 6c 45 76 65 6e 74 48 61 | 6e 64 6c 65 72 28 6b 43 |lEventHa|ndler(kC|
|00005350| 6f 72 65 45 76 65 6e 74 | 43 6c 61 73 73 2c 20 6b |oreEvent|Class, k|
|00005360| 41 45 4f 70 65 6e 44 6f | 63 75 6d 65 6e 74 73 2c |AEOpenDo|cuments,|
|00005370| 20 20 20 0d 09 09 09 09 | 09 09 09 09 28 45 76 65 | .....|....(Eve|
|00005380| 6e 74 48 61 6e 64 6c 65 | 72 50 72 6f 63 50 74 72 |ntHandle|rProcPtr|
|00005390| 29 48 61 6e 64 6c 65 4f | 64 6f 63 2c 20 30 2c 20 |)HandleO|doc, 0, |
|000053a0| 66 61 6c 73 65 29 3b 0d | 09 09 09 28 76 6f 69 64 |false);.|...(void|
|000053b0| 29 41 45 49 6e 73 74 61 | 6c 6c 45 76 65 6e 74 48 |)AEInsta|llEventH|
|000053c0| 61 6e 64 6c 65 72 28 6b | 43 6f 72 65 45 76 65 6e |andler(k|CoreEven|
|000053d0| 74 43 6c 61 73 73 2c 20 | 6b 41 45 50 72 69 6e 74 |tClass, |kAEPrint|
|000053e0| 44 6f 63 75 6d 65 6e 74 | 73 2c 20 20 0d 09 09 09 |Document|s, ....|
|000053f0| 09 09 09 09 09 28 45 76 | 65 6e 74 48 61 6e 64 6c |.....(Ev|entHandl|
|00005400| 65 72 50 72 6f 63 50 74 | 72 29 48 61 6e 64 6c 65 |erProcPt|r)Handle|
|00005410| 4f 64 6f 63 2c 20 30 2c | 20 66 61 6c 73 65 29 3b |Odoc, 0,| false);|
|00005420| 20 2f 2a 20 64 6f 20 22 | 50 72 69 6e 74 22 20 61 | /* do "|Print" a|
|00005430| 73 20 4f 70 65 6e 20 2a | 2f 0d 09 09 09 28 76 6f |s Open *|/....(vo|
|00005440| 69 64 29 41 45 49 6e 73 | 74 61 6c 6c 45 76 65 6e |id)AEIns|tallEven|
|00005450| 74 48 61 6e 64 6c 65 72 | 28 6b 43 6f 72 65 45 76 |tHandler|(kCoreEv|
|00005460| 65 6e 74 43 6c 61 73 73 | 2c 20 6b 41 45 51 75 69 |entClass|, kAEQui|
|00005470| 74 41 70 70 6c 69 63 61 | 74 69 6f 6e 2c 20 0d 09 |tApplica|tion, ..|
|00005480| 09 09 09 09 09 09 09 28 | 45 76 65 6e 74 48 61 6e |.......(|EventHan|
|00005490| 64 6c 65 72 50 72 6f 63 | 50 74 72 29 48 61 6e 64 |dlerProc|Ptr)Hand|
|000054a0| 6c 65 51 75 69 74 2c 20 | 30 2c 20 66 61 6c 73 65 |leQuit, |0, false|
|000054b0| 29 3b 0d 09 09 7d 0d 09 | 7d 0d 7d 0d 0d 76 6f 69 |);...}..|}.}..voi|
|000054c0| 64 20 53 65 6e 64 51 75 | 69 74 28 76 6f 69 64 29 |d SendQu|it(void)|
|000054d0| 0d 7b 0d 4f 53 45 72 72 | 09 09 6d 79 45 72 72 3b |.{.OSErr|..myErr;|
|000054e0| 0d 4f 53 54 79 70 65 09 | 09 74 68 65 53 69 67 6e |.OSType.|.theSign|
|000054f0| 61 74 75 72 65 3b 0d 41 | 70 70 6c 65 45 76 65 6e |ature;.A|ppleEven|
|00005500| 74 09 6d 79 41 45 76 74 | 2c 20 6d 79 52 65 74 75 |t.myAEvt|, myRetu|
|00005510| 72 6e 45 76 74 3b 0d 41 | 45 41 64 64 72 65 73 73 |rnEvt;.A|EAddress|
|00005520| 44 65 73 63 09 6d 79 53 | 65 72 76 65 72 41 64 64 |Desc.myS|erverAdd|
|00005530| 72 65 73 73 3b 0d 0d 09 | 2f 2a 20 53 74 69 6c 6c |ress;...|/* Still|
|00005540| 20 6e 6f 74 20 77 6f 72 | 6b 69 6e 67 2e 2e 21 20 | not wor|king..! |
|00005550| 2a 2f 0d 09 74 68 65 53 | 69 67 6e 61 74 75 72 65 |*/..theS|ignature|
|00005560| 20 3d 20 27 4d 41 43 53 | 27 3b 0d 09 6d 79 45 72 | = 'MACS|';..myEr|
|00005570| 72 20 3d 20 41 45 43 72 | 65 61 74 65 44 65 73 63 |r = AECr|eateDesc|
|00005580| 28 74 79 70 65 41 70 70 | 6c 53 69 67 6e 61 74 75 |(typeApp|lSignatu|
|00005590| 72 65 2c 20 28 50 74 72 | 29 26 74 68 65 53 69 67 |re, (Ptr|)&theSig|
|000055a0| 6e 61 74 75 72 65 2c 20 | 34 2c 20 26 6d 79 53 65 |nature, |4, &mySe|
|000055b0| 72 76 65 72 41 64 64 72 | 65 73 73 29 3b 0d 09 69 |rverAddr|ess);..i|
|000055c0| 66 20 28 21 6d 79 45 72 | 72 29 0d 09 09 6d 79 45 |f (!myEr|r)...myE|
|000055d0| 72 72 20 3d 20 41 45 43 | 72 65 61 74 65 41 70 70 |rr = AEC|reateApp|
|000055e0| 6c 65 45 76 65 6e 74 28 | 6b 41 45 46 69 6e 64 65 |leEvent(|kAEFinde|
|000055f0| 72 45 76 65 6e 74 73 2c | 09 09 09 2f 2f 20 45 76 |rEvents,|...// Ev|
|00005600| 65 6e 74 20 43 6c 61 73 | 73 0d 09 09 09 09 09 09 |ent Clas|s.......|
|00005610| 09 09 09 6b 41 45 53 68 | 75 74 44 6f 77 6e 2c 09 |...kAESh|utDown,.|
|00005620| 09 09 2f 2f 20 45 76 65 | 6e 74 20 49 44 0d 09 09 |..// Eve|nt ID...|
|00005630| 09 09 09 09 09 09 09 26 | 6d 79 53 65 72 76 65 72 |.......&|myServer|
|00005640| 41 64 64 72 65 73 73 2c | 09 09 2f 2f 20 54 61 72 |Address,|..// Tar|
|00005650| 67 65 74 20 41 64 72 0d | 09 09 09 09 09 09 09 09 |get Adr.|........|
|00005660| 09 6b 41 75 74 6f 47 65 | 6e 65 72 61 74 65 52 65 |.kAutoGe|nerateRe|
|00005670| 74 75 72 6e 49 44 2c 09 | 2f 2f 20 52 65 74 75 72 |turnID,.|// Retur|
|00005680| 6e 20 61 65 76 74 20 49 | 44 0d 09 09 09 09 09 09 |n aevt I|D.......|
|00005690| 09 09 09 6b 41 6e 79 54 | 72 61 6e 73 61 63 74 69 |...kAnyT|ransacti|
|000056a0| 6f 6e 49 44 2c 09 09 2f | 2f 20 54 72 61 6e 73 20 |onID,../|/ Trans |
|000056b0| 49 44 0d 09 09 09 09 09 | 09 09 09 09 26 6d 79 41 |ID......|....&myA|
|000056c0| 45 76 74 29 3b 09 09 09 | 09 2f 2f 20 66 69 6c 6c |Evt);...|.// fill|
|000056d0| 20 6d 65 20 69 6e 0d 09 | 69 66 20 28 21 6d 79 45 | me in..|if (!myE|
|000056e0| 72 72 29 0d 09 09 6d 79 | 45 72 72 20 3d 20 41 45 |rr)...my|Err = AE|
|000056f0| 53 65 6e 64 28 26 6d 79 | 41 45 76 74 2c 0d 09 09 |Send(&my|AEvt,...|
|00005700| 09 09 09 09 26 6d 79 52 | 65 74 75 72 6e 45 76 74 |....&myR|eturnEvt|
|00005710| 2c 0d 09 09 09 09 09 09 | 6b 41 45 4e 6f 52 65 70 |,.......|kAENoRep|
|00005720| 6c 79 2c 09 09 09 09 2f | 2f 20 73 65 6e 64 20 6d |ly,..../|/ send m|
|00005730| 6f 64 65 0d 09 09 09 09 | 09 09 6b 41 45 4e 6f 72 |ode.....|..kAENor|
|00005740| 6d 61 6c 50 72 69 6f 72 | 69 74 79 2c 09 09 2f 2f |malPrior|ity,..//|
|00005750| 20 73 65 6e 64 20 70 72 | 69 6f 72 69 74 79 0d 09 | send pr|iority..|
|00005760| 09 09 09 09 09 6b 4e 6f | 54 69 6d 65 4f 75 74 2c |.....kNo|TimeOut,|
|00005770| 09 09 09 09 2f 2f 20 4e | 20 74 69 6d 65 6f 75 74 |....// N| timeout|
|00005780| 20 74 69 63 6b 73 0d 09 | 09 09 09 09 09 4e 55 4c | ticks..|.....NUL|
|00005790| 4c 2c 09 09 09 09 09 2f | 2f 20 69 64 6c 65 50 72 |L,...../|/ idlePr|
|000057a0| 6f 63 50 74 72 0d 09 09 | 09 09 09 09 4e 55 4c 4c |ocPtr...|....NULL|
|000057b0| 29 3b 09 09 09 09 09 2f | 2f 20 45 76 65 6e 74 46 |);...../|/ EventF|
|000057c0| 69 6c 74 65 72 50 72 6f | 63 50 74 72 0d 09 2f 2a |ilterPro|cPtr../*|
|000057d0| 20 63 6c 65 61 6e 20 75 | 70 20 62 65 66 6f 72 65 | clean u|p before|
|000057e0| 20 77 65 20 64 69 65 20 | 3a 2d 29 20 2a 2f 0d 09 | we die |:-) */..|
|000057f0| 69 66 20 28 21 6d 79 45 | 72 72 29 0d 09 09 6d 79 |if (!myE|rr)...my|
|00005800| 45 72 72 20 3d 20 41 45 | 44 69 73 70 6f 73 65 44 |Err = AE|DisposeD|
|00005810| 65 73 63 28 26 6d 79 53 | 65 72 76 65 72 41 64 64 |esc(&myS|erverAdd|
|00005820| 72 65 73 73 29 3b 0d 7d | 0d 0d 0d 2f 2a 20 52 65 |ress);.}|.../* Re|
|00005830| 74 75 72 6e 73 20 74 68 | 65 20 63 6f 6d 70 69 6c |turns th|e compil|
|00005840| 65 72 20 6e 61 6d 65 20 | 74 68 69 73 20 63 6f 64 |er name |this cod|
|00005850| 65 20 77 61 73 20 63 6f | 6d 70 69 6c 65 64 20 77 |e was co|mpiled w|
|00005860| 69 74 68 20 2a 2f 0d 76 | 6f 69 64 20 47 65 74 43 |ith */.v|oid GetC|
|00005870| 6f 6d 70 69 6c 65 72 4e | 61 6d 65 50 53 74 72 69 |ompilerN|amePStri|
|00005880| 6e 67 28 53 74 72 33 31 | 20 76 65 72 73 69 6f 6e |ng(Str31| version|
|00005890| 53 74 72 69 6e 67 29 0d | 7b 0d 09 76 65 72 73 69 |String).|{..versi|
|000058a0| 6f 6e 53 74 72 69 6e 67 | 5b 30 5d 20 3d 20 27 5c |onString|[0] = '\|
|000058b0| 30 27 3b 0d 23 69 66 64 | 65 66 20 61 70 70 6c 65 |0';.#ifd|ef apple|
|000058c0| 63 0d 09 70 53 74 72 43 | 6f 70 79 28 22 5c 70 41 |c..pStrC|opy("\pA|
|000058d0| 70 70 6c 65 27 73 20 4d | 50 57 20 43 22 2c 20 76 |pple's M|PW C", v|
|000058e0| 65 72 73 69 6f 6e 53 74 | 72 69 6e 67 29 3b 09 0d |ersionSt|ring);..|
|000058f0| 23 65 6e 64 69 66 20 61 | 70 70 6c 65 63 0d 23 69 |#endif a|pplec.#i|
|00005900| 66 64 65 66 20 54 48 49 | 4e 4b 5f 43 0d 09 70 53 |fdef THI|NK_C..pS|
|00005910| 74 72 43 6f 70 79 28 22 | 5c 70 53 79 6d 61 6e 74 |trCopy("|\pSymant|
|00005920| 65 63 27 73 20 54 68 69 | 6e 6b 20 43 22 2c 20 76 |ec's Thi|nk C", v|
|00005930| 65 72 73 69 6f 6e 53 74 | 72 69 6e 67 29 3b 09 0d |ersionSt|ring);..|
|00005940| 23 65 6e 64 69 66 20 54 | 48 49 4e 4b 5f 43 0d 7d |#endif T|HINK_C.}|
|00005950| 0d 0d 0d 2f 2a 20 52 65 | 74 75 72 6e 73 20 74 68 |.../* Re|turns th|
|00005960| 65 20 76 65 72 73 69 6f | 6e 20 73 74 72 69 6e 67 |e versio|n string|
|00005970| 20 69 6e 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 | in the |applicat|
|00005980| 69 6f 6e 27 73 20 76 65 | 72 73 69 6f 6e 20 72 65 |ion's ve|rsion re|
|00005990| 73 6f 75 72 63 65 20 2a | 2f 0d 76 6f 69 64 20 47 |source *|/.void G|
|000059a0| 65 74 41 70 70 56 65 72 | 73 69 6f 6e 50 53 74 72 |etAppVer|sionPStr|
|000059b0| 69 6e 67 28 73 68 6f 72 | 74 20 76 65 72 73 49 44 |ing(shor|t versID|
|000059c0| 2c 20 53 74 72 33 31 20 | 76 65 72 73 69 6f 6e 53 |, Str31 |versionS|
|000059d0| 74 72 69 6e 67 29 0d 7b | 0d 20 20 20 20 56 65 72 |tring).{|. Ver|
|000059e0| 73 52 65 63 48 6e 64 6c | 09 76 65 72 73 48 61 6e |sRecHndl|.versHan|
|000059f0| 64 6c 65 3b 09 09 2f 2f | 20 56 65 72 73 52 65 63 |dle;..//| VersRec|
|00005a00| 48 6e 64 6c 20 64 65 63 | 6c 61 72 65 64 20 69 6e |Hndl dec|lared in|
|00005a10| 20 4d 50 57 27 73 20 3c | 66 69 6c 65 73 2e 68 3e | MPW's <|files.h>|
|00005a20| 0d 20 20 20 20 0d 09 2f | 2a 20 47 65 74 20 74 68 |. ../|* Get th|
|00005a30| 65 20 72 65 73 6f 75 72 | 63 65 20 73 74 72 69 6e |e resour|ce strin|
|00005a40| 67 20 66 72 6f 6d 20 61 | 70 70 2c 20 27 76 65 72 |g from a|pp, 'ver|
|00005a50| 73 27 20 76 65 72 73 49 | 44 20 28 31 20 6f 72 20 |s' versI|D (1 or |
|00005a60| 32 29 20 72 65 73 6f 75 | 72 63 65 21 20 2a 2f 0d |2) resou|rce! */.|
|00005a70| 09 76 65 72 73 69 6f 6e | 53 74 72 69 6e 67 5b 30 |.version|String[0|
|00005a80| 5d 20 3d 20 27 5c 30 27 | 3b 0d 09 76 65 72 73 48 |] = '\0'|;..versH|
|00005a90| 61 6e 64 6c 65 20 3d 20 | 28 56 65 72 73 52 65 63 |andle = |(VersRec|
|00005aa0| 48 6e 64 6c 29 47 65 74 | 52 65 73 6f 75 72 63 65 |Hndl)Get|Resource|
|00005ab0| 28 27 76 65 72 73 27 2c | 76 65 72 73 49 44 29 3b |('vers',|versID);|
|00005ac0| 0d 09 69 66 20 28 76 65 | 72 73 48 61 6e 64 6c 65 |..if (ve|rsHandle|
|00005ad0| 29 0d 09 09 70 53 74 72 | 43 6f 70 79 28 28 2a 2a |)...pStr|Copy((**|
|00005ae0| 76 65 72 73 48 61 6e 64 | 6c 65 29 2e 73 68 6f 72 |versHand|le).shor|
|00005af0| 74 56 65 72 73 69 6f 6e | 2c 20 76 65 72 73 69 6f |tVersion|, versio|
|00005b00| 6e 53 74 72 69 6e 67 29 | 3b 0d 7d 0d 0d 0d 76 6f |nString)|;.}...vo|
|00005b10| 69 64 20 64 69 73 70 6c | 61 79 44 69 61 6c 6f 67 |id displ|ayDialog|
|00005b20| 28 73 68 6f 72 74 20 64 | 6c 6f 67 49 44 2c 20 63 |(short d|logID, c|
|00005b30| 68 61 72 20 2a 20 73 2c | 20 73 68 6f 72 74 20 65 |har * s,| short e|
|00005b40| 72 72 29 0d 09 7b 0d 09 | 73 68 6f 72 74 09 09 69 |rr)..{..|short..i|
|00005b50| 74 65 6d 48 69 74 3b 0d | 09 44 69 61 6c 6f 67 50 |temHit;.|.DialogP|
|00005b60| 74 72 09 64 6c 6f 67 70 | 3b 0d 09 63 68 61 72 09 |tr.dlogp|;..char.|
|00005b70| 09 6e 75 6d 73 74 72 5b | 31 30 5d 3b 0d 0d 09 53 |.numstr[|10];...S|
|00005b80| 79 73 42 65 65 70 28 32 | 29 3b 0d 09 49 6e 69 74 |ysBeep(2|);..Init|
|00005b90| 43 75 72 73 6f 72 28 29 | 3b 0d 0d 09 2f 2a 20 63 |Cursor()|;.../* c|
|00005ba0| 6f 6e 76 65 72 74 20 65 | 72 72 6f 72 20 73 74 72 |onvert e|rror str|
|00005bb0| 69 6e 67 20 74 6f 20 50 | 2d 73 74 79 6c 65 20 2a |ing to P|-style *|
|00005bc0| 2f 0d 09 69 66 20 28 73 | 29 0d 09 09 63 32 70 73 |/..if (s|)...c2ps|
|00005bd0| 74 72 28 73 29 3b 0d 0d | 09 2f 2a 20 73 65 65 20 |tr(s);..|./* see |
|00005be0| 69 66 20 74 68 65 72 65 | 20 69 73 20 61 6e 20 65 |if there| is an e|
|00005bf0| 72 72 6f 72 20 6e 75 6d | 62 65 72 20 2a 2f 0d 09 |rror num|ber */..|
|00005c00| 6e 75 6d 73 74 72 5b 30 | 5d 20 3d 20 27 5c 30 27 |numstr[0|] = '\0'|
|00005c10| 3b 0d 09 69 66 20 28 65 | 72 72 29 0d 09 09 4e 75 |;..if (e|rr)...Nu|
|00005c20| 6d 54 6f 53 74 72 69 6e | 67 28 65 72 72 2c 6e 75 |mToStrin|g(err,nu|
|00005c30| 6d 73 74 72 29 3b 0d 0d | 09 50 61 72 61 6d 54 65 |mstr);..|.ParamTe|
|00005c40| 78 74 28 6e 75 6d 73 74 | 72 2c 20 73 2c 20 22 22 |xt(numst|r, s, ""|
|00005c50| 2c 20 22 22 29 3b 0d 09 | 64 6c 6f 67 70 20 3d 20 |, "");..|dlogp = |
|00005c60| 47 65 74 4e 65 77 44 69 | 61 6c 6f 67 28 64 6c 6f |GetNewDi|alog(dlo|
|00005c70| 67 49 44 2c 20 28 50 74 | 72 29 30 4c 2c 20 28 57 |gID, (Pt|r)0L, (W|
|00005c80| 69 6e 64 6f 77 50 74 72 | 29 2d 31 4c 29 3b 0d 09 |indowPtr|)-1L);..|
|00005c90| 2f 2a 20 22 64 65 66 61 | 75 6c 74 22 20 74 68 65 |/* "defa|ult" the|
|00005ca0| 20 4f 4b 20 62 75 74 74 | 6f 6e 20 2a 2f 0d 09 53 | OK butt|on */..S|
|00005cb0| 65 74 75 70 44 65 66 61 | 75 6c 74 42 75 74 74 6f |etupDefa|ultButto|
|00005cc0| 6e 28 64 6c 6f 67 70 29 | 3b 0d 09 69 66 20 28 64 |n(dlogp)|;..if (d|
|00005cd0| 6c 6f 67 70 29 0d 09 09 | 7b 0d 09 09 4d 6f 64 61 |logp)...|{...Moda|
|00005ce0| 6c 44 69 61 6c 6f 67 28 | 30 2c 20 26 69 74 65 6d |lDialog(|0, &item|
|00005cf0| 48 69 74 29 3b 0d 09 09 | 44 69 73 70 6f 73 44 69 |Hit);...|DisposDi|
|00005d00| 61 6c 6f 67 28 64 6c 6f | 67 70 29 3b 0d 09 09 7d |alog(dlo|gp);...}|
|00005d10| 0d 09 7d 20 2f 2a 64 69 | 73 70 6c 61 79 44 69 61 |..} /*di|splayDia|
|00005d20| 6c 6f 67 2a 2f 0d 0d 0d | 76 6f 69 64 20 65 72 72 |log*/...|void err|
|00005d30| 6f 72 5f 64 69 61 6c 6f | 67 28 69 6e 74 20 64 69 |or_dialo|g(int di|
|00005d40| 61 6c 6f 67 6e 75 6d 29 | 0d 7b 0d 09 44 69 61 6c |alognum)|.{..Dial|
|00005d50| 6f 67 50 74 72 20 64 6c | 67 48 6f 6c 64 3b 09 2f |ogPtr dl|gHold;./|
|00005d60| 2a 20 61 6c 6c 6f 77 20 | 61 20 73 69 6e 67 6c 65 |* allow |a single|
|00005d70| 20 6c 65 76 65 6c 20 6f | 66 20 64 69 61 6c 6f 67 | level o|f dialog|
|00005d80| 20 72 65 63 75 72 73 69 | 6f 6e 20 2a 2f 0d 0d 09 | recursi|on */...|
|00005d90| 2f 2a 20 74 68 69 73 20 | 63 68 65 61 70 20 68 61 |/* this |cheap ha|
|00005da0| 63 6b 20 67 75 61 72 61 | 6e 74 65 65 73 20 65 6e |ck guara|ntees en|
|00005db0| 6f 75 67 68 20 61 76 61 | 69 6c 61 62 6c 65 20 52 |ough ava|ilable R|
|00005dc0| 41 4d 20 74 6f 20 73 68 | 6f 77 20 74 68 65 20 65 |AM to sh|ow the e|
|00005dd0| 72 72 6f 72 20 61 6e 64 | 20 6e 6f 74 20 63 72 61 |rror and| not cra|
|00005de0| 73 68 2e 20 2a 2f 09 0d | 09 69 66 20 28 65 78 74 |sh. */..|.if (ext|
|00005df0| 72 61 5f 64 69 61 6c 6f | 67 5f 52 41 4d 29 0d 09 |ra_dialo|g_RAM)..|
|00005e00| 7b 0d 09 09 44 69 73 70 | 6f 73 65 48 61 6e 64 6c |{...Disp|oseHandl|
|00005e10| 65 28 65 78 74 72 61 5f | 64 69 61 6c 6f 67 5f 52 |e(extra_|dialog_R|
|00005e20| 41 4d 29 3b 0d 09 09 65 | 78 74 72 61 5f 64 69 61 |AM);...e|xtra_dia|
|00005e30| 6c 6f 67 5f 52 41 4d 20 | 3d 20 30 3b 0d 09 7d 0d |log_RAM |= 0;..}.|
|00005e40| 0d 09 55 73 65 52 65 73 | 46 69 6c 65 28 6f 75 72 |..UseRes|File(our|
|00005e50| 52 65 66 4e 75 6d 29 3b | 0d 09 64 6c 67 48 6f 6c |RefNum);|..dlgHol|
|00005e60| 64 20 3d 20 6d 79 44 69 | 61 6c 6f 67 3b 0d 09 53 |d = myDi|alog;..S|
|00005e70| 65 74 43 75 72 73 6f 72 | 28 26 71 64 2e 61 72 72 |etCursor|(&qd.arr|
|00005e80| 6f 77 29 3b 09 2f 2a 20 | 69 74 20 63 6f 75 6c 64 |ow);./* |it could|
|00005e90| 20 73 74 69 6c 6c 20 62 | 65 20 61 20 74 65 78 74 | still b|e a text|
|00005ea0| 20 63 75 72 73 6f 72 21 | 20 2a 2f 0d 09 6d 79 44 | cursor!| */..myD|
|00005eb0| 69 61 6c 6f 67 20 3d 20 | 47 65 74 4e 65 77 44 69 |ialog = |GetNewDi|
|00005ec0| 61 6c 6f 67 28 64 69 61 | 6c 6f 67 6e 75 6d 2c 20 |alog(dia|lognum, |
|00005ed0| 4e 55 4c 4c 2c 20 28 57 | 69 6e 64 6f 77 50 74 72 |NULL, (W|indowPtr|
|00005ee0| 29 20 2d 31 29 3b 0d 09 | 69 66 20 28 6d 79 44 69 |) -1);..|if (myDi|
|00005ef0| 61 6c 6f 67 29 0d 09 7b | 0d 09 09 2f 2a 20 22 64 |alog)..{|.../* "d|
|00005f00| 65 66 61 75 6c 74 22 20 | 74 68 65 20 4f 4b 20 62 |efault" |the OK b|
|00005f10| 75 74 74 6f 6e 20 2a 2f | 0d 09 09 53 65 74 75 70 |utton */|...Setup|
|00005f20| 44 65 66 61 75 6c 74 42 | 75 74 74 6f 6e 28 6d 79 |DefaultB|utton(my|
|00005f30| 44 69 61 6c 6f 67 29 3b | 0d 09 09 64 6f 20 7b 0d |Dialog);|...do {.|
|00005f40| 09 09 09 4d 6f 64 61 6c | 44 69 61 6c 6f 67 28 4e |...Modal|Dialog(N|
|00005f50| 55 4c 4c 2c 20 26 69 74 | 65 6d 48 69 74 29 3b 0d |ULL, &it|emHit);.|
|00005f60| 09 09 7d 20 77 68 69 6c | 65 20 28 69 74 65 6d 48 |..} whil|e (itemH|
|00005f70| 69 74 20 21 3d 20 31 29 | 3b 0d 09 09 44 69 73 70 |it != 1)|;...Disp|
|00005f80| 6f 73 44 69 61 6c 6f 67 | 28 6d 79 44 69 61 6c 6f |osDialog|(myDialo|
|00005f90| 67 29 3b 0d 09 09 69 74 | 65 6d 48 69 74 20 3d 20 |g);...it|emHit = |
|00005fa0| 2d 31 3b 09 09 2f 2a 20 | 64 6f 6e 27 74 20 73 65 |-1;../* |don't se|
|00005fb0| 6e 64 20 73 70 75 72 69 | 6f 75 73 20 69 74 65 6d |nd spuri|ous item|
|00005fc0| 20 23 20 74 6f 20 6f 74 | 68 65 72 20 64 69 61 6c | # to ot|her dial|
|00005fd0| 6f 67 73 21 20 2a 2f 0d | 09 7d 0d 09 6d 79 44 69 |ogs! */.|.}..myDi|
|00005fe0| 61 6c 6f 67 20 3d 20 64 | 6c 67 48 6f 6c 64 3b 0d |alog = d|lgHold;.|
|00005ff0| 09 69 66 20 28 46 72 65 | 65 4d 65 6d 28 29 20 3e |.if (Fre|eMem() >|
|00006000| 20 72 65 73 65 72 76 65 | 4d 65 6d 53 69 7a 65 29 | reserve|MemSize)|
|00006010| 0d 09 09 65 78 74 72 61 | 5f 64 69 61 6c 6f 67 5f |...extra|_dialog_|
|00006020| 52 41 4d 20 3d 20 4e 65 | 77 48 61 6e 64 6c 65 28 |RAM = Ne|wHandle(|
|00006030| 72 65 73 65 72 76 65 4d | 65 6d 53 69 7a 65 29 3b |reserveM|emSize);|
|00006040| 0d 7d 0d 0d 2f 2a 20 2d | 2d 2d 20 54 68 65 73 65 |.}../* -|-- These|
|00006050| 20 61 72 65 20 72 65 71 | 75 69 72 65 64 20 72 6f | are req|uired ro|
|00006060| 75 74 69 6e 65 73 20 66 | 72 6f 6d 20 6d 61 63 68 |utines f|rom mach|
|00006070| 69 6e 65 2e 68 20 2d 2d | 2d 20 2a 2f 0d 0d 76 6f |ine.h --|- */..vo|
|00006080| 69 64 20 64 69 73 70 6c | 61 79 5f 66 69 6e 69 73 |id displ|ay_finis|
|00006090| 68 65 64 28 76 6f 69 64 | 29 0d 7b 0d 7d 0d 0d 76 |hed(void|).{.}..v|
|000060a0| 6f 69 64 20 64 69 73 70 | 6c 61 79 5f 63 6c 6f 73 |oid disp|lay_clos|
|000060b0| 65 28 76 6f 69 64 29 0d | 7b 0d 7d 0d 0d 76 6f 69 |e(void).|{.}..voi|
|000060c0| 64 20 6f 70 65 6e 5f 76 | 69 72 74 75 61 6c 28 76 |d open_v|irtual(v|
|000060d0| 6f 69 64 29 0d 7b 0d 09 | 69 6e 74 20 65 72 72 3b |oid).{..|int err;|
|000060e0| 0d 09 69 66 20 28 76 69 | 72 74 75 61 6c 5f 66 69 |..if (vi|rtual_fi|
|000060f0| 6c 65 20 3d 3d 20 4e 55 | 4c 4c 29 0d 09 7b 0d 09 |le == NU|LL)..{..|
|00006100| 09 76 69 72 74 75 61 6c | 5f 66 69 6c 65 20 3d 20 |.virtual|_file = |
|00006110| 66 6f 70 65 6e 28 22 50 | 4f 56 2d 52 61 79 2e 69 |fopen("P|OV-Ray.i|
|00006120| 6d 61 67 65 54 65 6d 70 | 22 2c 22 77 62 2b 22 29 |mageTemp|","wb+")|
|00006130| 3b 0d 09 09 65 72 72 20 | 3d 20 66 65 72 72 6f 72 |;...err |= ferror|
|00006140| 28 76 69 72 74 75 61 6c | 5f 66 69 6c 65 29 3b 0d |(virtual|_file);.|
|00006150| 09 7d 0d 09 76 69 72 74 | 75 61 6c 5f 63 75 72 72 |.}..virt|ual_curr|
|00006160| 65 6e 74 53 65 67 6d 65 | 6e 74 20 3d 20 2d 31 3b |entSegme|nt = -1;|
|00006170| 0d 09 76 69 72 74 75 61 | 6c 5f 62 75 66 66 65 72 |..virtua|l_buffer|
|00006180| 44 69 72 74 79 20 3d 20 | 30 3b 0d 09 76 69 72 74 |Dirty = |0;..virt|
|00006190| 75 61 6c 5f 6d 69 6e 59 | 20 3d 20 33 32 37 36 37 |ual_minY| = 32767|
|000061a0| 3b 0d 09 76 69 72 74 75 | 61 6c 5f 6d 61 78 59 20 |;..virtu|al_maxY |
|000061b0| 3d 20 30 3b 0d 09 76 69 | 72 74 75 61 6c 5f 70 69 |= 0;..vi|rtual_pi|
|000061c0| 78 48 65 69 67 68 74 20 | 3d 20 76 69 72 74 75 61 |xHeight |= virtua|
|000061d0| 6c 5f 73 65 67 53 69 7a | 65 20 2f 20 28 67 6c 6f |l_segSiz|e / (glo|
|000061e0| 62 61 6c 5f 77 69 64 74 | 68 20 2a 20 34 29 3b 0d |bal_widt|h * 4);.|
|000061f0| 7d 0d 0d 0d 76 6f 69 64 | 20 64 65 6c 65 74 65 5f |}...void| delete_|
|00006200| 76 69 72 74 75 61 6c 28 | 76 6f 69 64 29 0d 7b 0d |virtual(|void).{.|
|00006210| 09 69 6e 74 20 69 3b 0d | 09 69 66 20 28 76 69 72 |.int i;.|.if (vir|
|00006220| 74 75 61 6c 5f 66 69 6c | 65 29 0d 09 7b 0d 09 09 |tual_fil|e)..{...|
|00006230| 66 63 6c 6f 73 65 20 28 | 76 69 72 74 75 61 6c 5f |fclose (|virtual_|
|00006240| 66 69 6c 65 29 3b 0d 09 | 09 76 69 72 74 75 61 6c |file);..|.virtual|
|00006250| 5f 66 69 6c 65 20 3d 20 | 4e 55 4c 4c 3b 0d 09 7d |_file = |NULL;..}|
|00006260| 0d 09 69 20 3d 20 72 65 | 6d 6f 76 65 28 22 50 4f |..i = re|move("PO|
|00006270| 56 2d 52 61 79 2e 69 6d | 61 67 65 54 65 6d 70 22 |V-Ray.im|ageTemp"|
|00006280| 29 3b 09 2f 2f 20 54 68 | 61 6e 6b 73 20 45 64 75 |);.// Th|anks Edu|
|00006290| 61 72 64 20 20 28 61 6e | 79 20 74 69 6d 65 2c 20 |ard (an|y time, |
|000062a0| 49 20 67 6f 74 20 74 68 | 65 20 73 70 61 63 65 20 |I got th|e space |
|000062b0| 3a 2d 29 29 0d 7d 0d 0d | 76 6f 69 64 20 64 69 73 |:-)).}..|void dis|
|000062c0| 70 6f 73 65 5f 76 69 72 | 74 75 61 6c 28 76 6f 69 |pose_vir|tual(voi|
|000062d0| 64 29 0d 7b 0d 09 48 61 | 6e 64 6c 65 20 68 3b 0d |d).{..Ha|ndle h;.|
|000062e0| 0d 09 69 66 20 28 70 6c | 6f 74 5f 70 69 78 6d 61 |..if (pl|ot_pixma|
|000062f0| 70 29 0d 09 7b 0d 09 09 | 68 20 3d 20 52 65 63 6f |p)..{...|h = Reco|
|00006300| 76 65 72 48 61 6e 64 6c | 65 28 70 6c 6f 74 5f 70 |verHandl|e(plot_p|
|00006310| 69 78 6d 61 70 29 3b 0d | 09 09 48 55 6e 6c 6f 63 |ixmap);.|..HUnloc|
|00006320| 6b 28 68 29 3b 0d 09 09 | 44 69 73 70 6f 73 48 61 |k(h);...|DisposHa|
|00006330| 6e 64 6c 65 28 68 29 3b | 0d 09 09 70 6c 6f 74 5f |ndle(h);|...plot_|
|00006340| 70 69 78 6d 61 70 20 3d | 20 4e 55 4c 4c 3b 0d 09 |pixmap =| NULL;..|
|00006350| 09 75 6e 64 6f 61 62 6c | 65 20 3d 20 30 3b 0d 09 |.undoabl|e = 0;..|
|00006360| 7d 0d 0d 09 69 66 20 28 | 75 6e 64 6f 5f 62 75 66 |}...if (|undo_buf|
|00006370| 66 65 72 29 0d 09 09 44 | 69 73 70 6f 73 65 50 74 |fer)...D|isposePt|
|00006380| 72 28 75 6e 64 6f 5f 62 | 75 66 66 65 72 29 3b 0d |r(undo_b|uffer);.|
|00006390| 09 69 66 20 28 75 6e 64 | 6f 5f 62 75 66 66 65 72 |.if (und|o_buffer|
|000063a0| 32 29 0d 09 09 44 69 73 | 70 6f 73 65 50 74 72 28 |2)...Dis|posePtr(|
|000063b0| 75 6e 64 6f 5f 62 75 66 | 66 65 72 32 29 3b 0d 09 |undo_buf|fer2);..|
|000063c0| 69 66 20 28 72 65 76 65 | 72 74 5f 62 75 66 66 65 |if (reve|rt_buffe|
|000063d0| 72 29 0d 09 09 44 69 73 | 70 6f 73 65 50 74 72 28 |r)...Dis|posePtr(|
|000063e0| 72 65 76 65 72 74 5f 62 | 75 66 66 65 72 29 3b 0d |revert_b|uffer);.|
|000063f0| 09 75 6e 64 6f 5f 62 75 | 66 66 65 72 20 3d 20 30 |.undo_bu|ffer = 0|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.