home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-10-11 | 10.5 KB | [ TEXT/KAHL]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
You can browse this item here: main.c
Confidence Program Detection Match Type Support
66%
dexvert
Compact Compressed (Unix) (archive/compact)
ext
Supported
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
10%
dexvert
Jesper Olsen Module (music/jesperOlsen)
magic
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, Sun Oct 11 14:30:00 1992, modified Sun Oct 11 14:30:00 1992, creator Think C, type ASCII, 10225 bytes "main.c" , at 0x2871 340 bytes resource
default (weak)
99%
file
data
default
49%
TrID
Macintosh plain text (MacBinary)
default
33%
TrID
TTComp archive compressed (bin-4K)
default (weak)
16%
TrID
MacBinary 2
default (weak)
100%
siegfried
fmt/1762 MacBinary (II)
default
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ KAHL]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 06 6d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..main.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 00 00 00 00 00 00 00 |.TEXTKAH|L.......| |00000050| 00 00 00 00 00 27 f1 00 | 00 01 54 a6 fe 23 28 a6 |.....'..|..T..#(.| |00000060| fe 23 28 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.#(.....|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7c c3 00 00 |........|....|...| |00000080| 0d 2f 2a a9 20 43 6f 70 | 79 72 69 67 68 74 20 31 |./*. Cop|yright 1| |00000090| 39 38 39 2d 31 39 39 32 | 20 55 73 65 72 4c 61 6e |989-1992| UserLan| |000000a0| 64 20 53 6f 66 74 77 61 | 72 65 2c 20 49 6e 63 2e |d Softwa|re, Inc.| |000000b0| 20 20 41 6c 6c 20 52 69 | 67 68 74 73 20 52 65 73 | All Ri|ghts Res| |000000c0| 65 72 76 65 64 2e 2a 2f | 0d 0d 0d 2f 2a 0d 4c 61 |erved.*/|.../*.La| |000000d0| 73 74 20 55 70 64 61 74 | 65 3a 20 38 2f 31 39 2f |st Updat|e: 8/19/| |000000e0| 39 32 20 44 57 2e 0d 0d | 42 72 69 65 66 6c 79 20 |92 DW...|Briefly | |000000f0| 2d 2d 20 74 68 69 73 20 | 69 73 20 61 20 76 65 72 |-- this |is a ver| |00000100| 79 20 73 6d 61 6c 6c 20 | 70 72 6f 67 72 61 6d 20 |y small |program | |00000110| 74 68 61 74 20 64 65 6d | 6f 6e 73 74 72 61 74 65 |that dem|onstrate| |00000120| 73 20 74 68 65 20 75 73 | 65 20 6f 66 20 74 68 65 |s the us|e of the| |00000130| 20 4d 65 6e 75 20 53 68 | 61 72 69 6e 67 0d 54 6f | Menu Sh|aring.To| |00000140| 6f 6c 6b 69 74 2e 20 46 | 6f 72 20 64 65 74 61 69 |olkit. F|or detai| |00000150| 6c 65 64 20 69 6e 66 6f | 2c 20 73 65 65 20 74 68 |led info|, see th| |00000160| 65 20 65 6e 63 6c 6f 73 | 65 64 20 74 65 63 68 6e |e enclos|ed techn| |00000170| 6f 74 65 2e 0d 0d 59 6f | 75 20 63 61 6e 20 73 65 |ote...Yo|u can se| |00000180| 61 72 63 68 20 74 68 65 | 20 73 6f 75 72 63 65 20 |arch the| source | |00000190| 63 6f 64 65 20 66 6f 72 | 20 6d 65 6e 75 20 73 68 |code for| menu sh| |000001a0| 61 72 69 6e 67 20 68 69 | 67 68 6c 69 67 68 74 73 |aring hi|ghlights| |000001b0| 20 62 79 20 73 65 61 72 | 63 68 69 6e 67 20 66 6f | by sear|ching fo| |000001c0| 72 20 74 68 65 0d 66 6f | 6c 6c 6f 77 69 6e 67 20 |r the.fo|llowing | |000001d0| 73 74 72 69 6e 67 3a 20 | 22 53 65 65 20 53 74 65 |string: |"See Ste| |000001e0| 70 20 23 22 2e 20 54 68 | 65 20 73 74 65 70 20 6e |p #". Th|e step n| |000001f0| 75 6d 62 65 72 73 20 72 | 65 66 65 72 20 74 6f 20 |umbers r|efer to | |00000200| 73 74 65 70 73 20 69 6e | 20 74 68 65 20 22 43 6f |steps in| the "Co| |00000210| 6f 6b 62 6f 6f 6b 22 0d | 73 65 63 74 69 6f 6e 20 |okbook".|section | |00000220| 6f 66 20 74 68 65 20 65 | 6e 63 6c 6f 73 65 64 20 |of the e|nclosed | |00000230| 74 65 63 68 6e 6f 74 65 | 2e 0d 0d 57 65 20 68 6f |technote|...We ho| |00000240| 70 65 20 79 6f 75 20 6c | 69 6b 65 20 6d 65 6e 75 |pe you l|ike menu| |00000250| 20 73 68 61 72 69 6e 67 | 20 61 6e 64 20 61 64 64 | sharing| and add| |00000260| 20 69 74 20 74 6f 20 79 | 6f 75 72 20 4d 61 63 69 | it to y|our Maci| |00000270| 6e 74 6f 73 68 20 61 70 | 70 6c 69 63 61 74 69 6f |ntosh ap|plicatio| |00000280| 6e 2e 0d 0d 54 68 61 6e | 6b 73 21 0d 2a 2f 0d 0d |n...Than|ks!.*/..| |00000290| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 6d 65 6e 75 73 |.#includ|e <menus| |000002a0| 68 61 72 69 6e 67 2e 68 | 3e 20 2f 2a 53 65 65 20 |haring.h|> /*See | |000002b0| 53 74 65 70 20 23 36 2a | 2f 0d 0d 23 69 6e 63 6c |Step #6*|/..#incl| |000002c0| 75 64 65 20 3c 69 61 63 | 2e 68 3e 20 2f 2a 53 65 |ude <iac|.h> /*Se| |000002d0| 65 20 53 74 65 70 20 23 | 35 2a 2f 0d 0d 0d 23 64 |e Step #|5*/...#d| |000002e0| 65 66 69 6e 65 20 61 70 | 70 6c 65 6d 65 6e 75 20 |efine ap|plemenu | |000002f0| 31 32 38 20 2f 2a 74 68 | 65 20 72 65 73 6f 75 72 |128 /*th|e resour| |00000300| 63 65 20 69 64 20 6f 66 | 20 74 68 65 20 61 70 70 |ce id of| the app| |00000310| 6c 65 20 6d 65 6e 75 2a | 2f 0d 0d 23 64 65 66 69 |le menu*|/..#defi| |00000320| 6e 65 20 61 62 6f 75 74 | 69 74 65 6d 20 31 20 2f |ne about|item 1 /| |00000330| 2a 74 68 65 20 61 62 6f | 75 74 20 63 6f 6d 6d 61 |*the abo|ut comma| |00000340| 6e 64 2a 2f 0d 0d 23 64 | 65 66 69 6e 65 20 66 69 |nd*/..#d|efine fi| |00000350| 6c 65 6d 65 6e 75 20 31 | 32 39 20 2f 2a 72 65 73 |lemenu 1|29 /*res| |00000360| 6f 75 72 63 65 20 69 64 | 20 6f 66 20 66 69 6c 65 |ource id| of file| |00000370| 20 6d 65 6e 75 2c 20 73 | 68 61 72 65 64 20 6d 65 | menu, s|hared me| |00000380| 6e 75 73 20 61 70 70 65 | 61 72 20 74 6f 20 72 69 |nus appe|ar to ri| |00000390| 67 68 74 20 6f 66 20 74 | 68 69 73 2a 2f 0d 0d 23 |ght of t|his*/..#| |000003a0| 64 65 66 69 6e 65 20 66 | 69 72 73 74 73 68 61 72 |define f|irstshar| |000003b0| 65 64 6d 65 6e 75 20 66 | 69 6c 65 6d 65 6e 75 2b |edmenu f|ilemenu+| |000003c0| 31 20 2f 2a 72 65 73 6f | 75 72 63 65 20 69 64 20 |1 /*reso|urce id | |000003d0| 66 6f 72 20 66 69 72 73 | 74 20 73 68 61 72 65 64 |for firs|t shared| |000003e0| 20 6d 65 6e 75 2a 2f 0d | 0d 23 64 65 66 69 6e 65 | menu*/.|.#define| |000003f0| 20 71 75 69 74 69 74 65 | 6d 20 31 20 2f 2a 74 68 | quitite|m 1 /*th| |00000400| 65 20 73 69 6e 67 6c 65 | 20 69 74 65 6d 20 69 6e |e single| item in| |00000410| 20 74 68 65 20 66 69 6c | 65 20 6d 65 6e 75 20 2d | the fil|e menu -| |00000420| 2d 20 74 68 69 73 20 69 | 73 20 61 20 76 65 72 79 |- this i|s a very| |00000430| 20 73 69 6d 70 6c 65 20 | 70 72 6f 67 72 61 6d 21 | simple |program!| |00000440| 2a 2f 0d 0d 4d 65 6e 75 | 48 61 6e 64 6c 65 20 68 |*/..Menu|Handle h| |00000450| 61 70 70 6c 65 6d 65 6e | 75 2c 20 68 66 69 6c 65 |applemen|u, hfile| |00000460| 6d 65 6e 75 3b 20 2f 2a | 74 68 65 20 74 77 6f 20 |menu; /*|the two | |00000470| 66 69 78 65 64 2c 20 6e | 6f 6e 2d 73 68 61 72 65 |fixed, n|on-share| |00000480| 64 20 6d 65 6e 75 73 20 | 69 6e 20 74 68 69 73 20 |d menus |in this | |00000490| 70 72 6f 67 72 61 6d 2a | 2f 0d 0d 57 69 6e 64 6f |program*|/..Windo| |000004a0| 77 50 74 72 20 6d 61 69 | 6e 77 69 6e 64 6f 77 20 |wPtr mai|nwindow | |000004b0| 3d 20 6e 69 6c 3b 20 2f | 2a 74 68 65 20 6d 65 6e |= nil; /|*the men| |000004c0| 75 20 73 68 61 72 69 6e | 67 20 74 65 73 74 20 77 |u sharin|g test w| |000004d0| 69 6e 64 6f 77 2a 2f 0d | 0d 53 74 72 32 35 35 20 |indow*/.|.Str255 | |000004e0| 77 69 6e 64 6f 77 6d 65 | 73 73 61 67 65 3b 20 2f |windowme|ssage; /| |000004f0| 2a 74 68 65 20 6d 65 73 | 73 61 67 65 20 74 68 61 |*the mes|sage tha| |00000500| 74 27 73 20 64 69 73 70 | 6c 61 79 65 64 20 69 6e |t's disp|layed in| |00000510| 20 74 68 65 20 6d 61 69 | 6e 20 77 69 6e 64 6f 77 | the mai|n window| |00000520| 2a 2f 0d 0d 42 6f 6f 6c | 65 61 6e 20 66 6c 65 78 |*/..Bool|ean flex| |00000530| 69 74 6d 61 69 6e 6c 6f | 6f 70 20 3d 20 66 61 6c |itmainlo|op = fal| |00000540| 73 65 3b 20 2f 2a 77 68 | 65 6e 20 74 72 75 65 20 |se; /*wh|en true | |00000550| 77 65 20 66 61 6c 6c 20 | 74 68 72 75 20 74 68 65 |we fall |thru the| |00000560| 20 6d 61 69 6e 20 65 76 | 65 6e 74 20 6c 6f 6f 70 | main ev|ent loop| |00000570| 2a 2f 0d 0d 42 6f 6f 6c | 65 61 6e 20 66 6c 63 75 |*/..Bool|ean flcu| |00000580| 72 72 65 6e 74 6c 79 61 | 63 74 69 76 65 20 3d 20 |rrentlya|ctive = | |00000590| 74 72 75 65 3b 0d 0d 0d | 0d 0d 73 74 61 74 69 63 |true;...|..static| |000005a0| 20 76 6f 69 64 20 63 6f | 70 79 73 74 72 69 6e 67 | void co|pystring| |000005b0| 20 28 53 74 72 32 35 35 | 20 73 6f 75 72 63 65 2c | (Str255| source,| |000005c0| 20 53 74 72 32 35 35 20 | 64 65 73 74 29 20 7b 0d | Str255 |dest) {.| |000005d0| 0d 09 2f 2a 0d 09 63 72 | 65 61 74 65 20 61 20 63 |../*..cr|eate a c| |000005e0| 6f 70 79 20 6f 66 20 73 | 6f 75 72 63 65 20 69 6e |opy of s|ource in| |000005f0| 20 64 65 73 74 2e 20 20 | 63 6f 70 79 20 74 68 65 | dest. |copy the| |00000600| 20 6c 65 6e 67 74 68 20 | 62 79 74 65 20 61 6e 64 | length |byte and| |00000610| 0d 09 61 6c 6c 20 74 68 | 65 20 63 68 61 72 61 63 |..all th|e charac| |00000620| 74 65 72 73 20 69 6e 20 | 74 68 65 20 73 6f 75 72 |ters in |the sour| |00000630| 63 65 20 73 74 72 69 6e | 67 2e 0d 0d 09 61 73 73 |ce strin|g....ass| |00000640| 75 6d 65 20 74 68 65 20 | 73 74 72 69 6e 67 73 20 |ume the |strings | |00000650| 61 72 65 20 70 61 73 63 | 61 6c 20 73 74 72 69 6e |are pasc|al strin| |00000660| 67 73 2c 20 77 69 74 68 | 20 74 68 65 20 6c 65 6e |gs, with| the len| |00000670| 67 74 68 20 62 79 74 65 | 20 69 6e 0d 09 74 68 65 |gth byte| in..the| |00000680| 20 66 69 72 73 74 20 63 | 68 61 72 61 63 74 65 72 | first c|haracter| |00000690| 20 6f 66 20 74 68 65 20 | 73 74 72 69 6e 67 2e 0d | of the |string..| |000006a0| 09 2a 2f 0d 0d 09 72 65 | 67 69 73 74 65 72 20 73 |.*/...re|gister s| |000006b0| 68 6f 72 74 20 69 2c 20 | 6c 65 6e 3b 0d 09 0d 09 |hort i, |len;....| |000006c0| 6c 65 6e 20 3d 20 28 73 | 68 6f 72 74 29 20 73 6f |len = (s|hort) so| |000006d0| 75 72 63 65 20 5b 30 5d | 3b 0d 09 0d 09 66 6f 72 |urce [0]|;....for| |000006e0| 20 28 69 20 3d 20 30 3b | 20 69 20 3c 3d 20 6c 65 | (i = 0;| i <= le| |000006f0| 6e 3b 20 69 2b 2b 29 20 | 0d 09 09 64 65 73 74 20 |n; i++) |...dest | |00000700| 5b 69 5d 20 3d 20 73 6f | 75 72 63 65 20 5b 69 5d |[i] = so|urce [i]| |00000710| 3b 0d 09 7d 20 2f 2a 63 | 6f 70 79 73 74 72 69 6e |;..} /*c|opystrin| |00000720| 67 2a 2f 0d 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |g*/...st|atic voi| |00000730| 64 20 65 6c 6c 69 70 73 | 69 7a 65 20 28 53 74 72 |d ellips|ize (Str| |00000740| 32 35 35 20 73 2c 20 73 | 68 6f 72 74 20 77 69 64 |255 s, s|hort wid| |00000750| 74 68 29 20 7b 0d 0d 09 | 2f 2a 0d 09 69 66 20 74 |th) {...|/*..if t| |00000760| 68 65 20 73 74 72 69 6e | 67 20 66 69 74 73 20 69 |he strin|g fits i| |00000770| 6e 73 69 64 65 20 74 68 | 65 20 67 69 76 65 6e 20 |nside th|e given | |00000780| 6e 75 6d 62 65 72 20 6f | 66 20 70 69 78 65 6c 73 |number o|f pixels| |00000790| 2c 20 66 69 6e 65 20 2d | 2d 20 64 6f 20 6e 6f 74 |, fine -|- do not| |000007a0| 68 69 6e 67 0d 09 61 6e | 64 20 72 65 74 75 72 6e |hing..an|d return| |000007b0| 2e 0d 09 0d 09 69 66 20 | 6e 6f 74 2c 20 72 65 74 |.....if |not, ret| |000007c0| 75 72 6e 20 61 20 73 74 | 72 69 6e 67 20 74 68 61 |urn a st|ring tha| |000007d0| 74 20 64 6f 65 73 20 66 | 69 74 2c 20 77 69 74 68 |t does f|it, with| |000007e0| 20 65 6c 6c 69 70 73 65 | 73 20 72 65 70 72 65 73 | ellipse|s repres| |000007f0| 65 6e 74 69 6e 67 20 74 | 68 65 20 0d 09 64 65 6c |enting t|he ..del| |00000800| 65 74 65 64 20 63 68 61 | 72 61 63 74 65 72 73 2e |eted cha|racters.| |00000810| 20 20 65 6c 6c 69 70 73 | 65 73 20 61 72 65 20 67 | ellips|es are g| |00000820| 65 6e 65 72 61 74 65 64 | 20 62 79 20 70 72 65 73 |enerated| by pres| |00000830| 73 69 6e 67 20 6f 70 74 | 69 6f 6e 2d 73 65 6d 69 |sing opt|ion-semi| |00000840| 63 6f 6c 6f 6e 2e 0d 09 | 2a 2f 0d 09 0d 09 72 65 |colon...|*/....re| |00000850| 67 69 73 74 65 72 20 63 | 68 61 72 20 6c 65 6e 3b |gister c|har len;| |00000860| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short| |00000870| 20 6e 65 77 77 69 64 74 | 68 3b 0d 09 0d 09 69 66 | newwidt|h;....if| |00000880| 20 28 28 6e 65 77 77 69 | 64 74 68 20 3d 20 53 74 | ((newwi|dth = St| |00000890| 72 69 6e 67 57 69 64 74 | 68 20 28 73 29 29 20 3c |ringWidt|h (s)) <| |000008a0| 3d 20 77 69 64 74 68 29 | 20 2f 2a 6e 6f 74 68 69 |= width)| /*nothi| |000008b0| 6e 67 20 74 6f 20 64 6f | 2c 20 74 68 65 20 73 74 |ng to do|, the st| |000008c0| 72 69 6e 67 20 66 69 74 | 73 2a 2f 0d 09 09 72 65 |ring fit|s*/...re| |000008d0| 74 75 72 6e 3b 0d 09 0d | 09 6c 65 6e 20 3d 20 73 |turn;...|.len = s| |000008e0| 20 5b 30 5d 3b 20 2f 2a | 20 63 75 72 72 65 6e 74 | [0]; /*| current| |000008f0| 20 6c 65 6e 67 74 68 20 | 69 6e 20 63 68 61 72 61 | length |in chara| |00000900| 63 74 65 72 73 2a 2f 0d | 09 0d 09 77 69 64 74 68 |cters*/.|...width| |00000910| 20 2d 3d 20 43 68 61 72 | 57 69 64 74 68 20 28 27 | -= Char|Width ('| |00000920| c9 27 29 3b 20 2f 2a 20 | 73 75 62 74 72 61 63 74 |.'); /* |subtract| |00000930| 20 77 69 64 74 68 20 6f | 66 20 65 6c 6c 69 70 73 | width o|f ellips| |00000940| 65 73 2a 2f 0d 09 09 0d | 09 64 6f 20 7b 20 2f 2a |es*/....|.do { /*| |00000950| 75 6e 74 69 6c 20 69 74 | 20 66 69 74 73 20 28 6f |until it| fits (o| |00000960| 72 20 77 65 20 72 75 6e | 20 6f 75 74 20 6f 66 20 |r we run| out of | |00000970| 63 68 61 72 61 63 74 65 | 72 73 29 2a 2f 0d 09 0d |characte|rs)*/...| |00000980| 09 09 6e 65 77 77 69 64 | 74 68 20 2d 3d 20 43 68 |..newwid|th -= Ch| |00000990| 61 72 57 69 64 74 68 20 | 28 73 20 5b 6c 65 6e 5d |arWidth |(s [len]| |000009a0| 29 3b 0d 09 09 0d 09 09 | 2d 2d 6c 65 6e 3b 0d 09 |);......|--len;..| |000009b0| 7d 20 77 68 69 6c 65 20 | 28 28 6e 65 77 77 69 64 |} while |((newwid| |000009c0| 74 68 20 3e 20 77 69 64 | 74 68 29 20 26 26 20 28 |th > wid|th) && (| |000009d0| 6c 65 6e 20 21 3d 20 30 | 29 29 3b 0d 09 0d 09 2b |len != 0|));....+| |000009e0| 2b 6c 65 6e 3b 20 2f 2a | 6d 61 6b 65 20 72 6f 6f |+len; /*|make roo| |000009f0| 6d 20 66 6f 72 20 74 68 | 65 20 65 6c 6c 69 70 73 |m for th|e ellips| |00000a00| 65 73 2a 2f 0d 09 0d 09 | 73 20 5b 6c 65 6e 5d 20 |es*/....|s [len] | |00000a10| 3d 20 27 c9 27 3b 20 0d | 09 0d 09 73 20 5b 30 5d |= '.'; .|...s [0]| |00000a20| 20 3d 20 28 63 68 61 72 | 29 20 6c 65 6e 3b 0d 09 | = (char|) len;..| |00000a30| 7d 20 2f 2a 65 6c 6c 69 | 70 73 69 7a 65 2a 2f 0d |} /*elli|psize*/.| |00000a40| 0d 0d 73 74 61 74 69 63 | 20 76 6f 69 64 20 63 65 |..static| void ce| |00000a50| 6e 74 65 72 73 74 72 69 | 6e 67 20 28 52 65 63 74 |nterstri|ng (Rect| |00000a60| 20 72 2c 20 53 74 72 32 | 35 35 20 73 29 20 7b 0d | r, Str2|55 s) {.| |00000a70| 09 0d 09 2f 2a 0d 09 64 | 72 61 77 20 74 68 65 20 |.../*..d|raw the | |00000a80| 73 74 72 69 6e 67 20 69 | 6e 20 74 68 65 20 63 75 |string i|n the cu| |00000a90| 72 72 65 6e 74 20 66 6f | 6e 74 2c 20 73 69 7a 65 |rrent fo|nt, size| |00000aa0| 20 61 6e 64 20 73 74 79 | 6c 65 2c 20 63 65 6e 74 | and sty|le, cent| |00000ab0| 65 72 65 64 20 69 6e 73 | 69 64 65 0d 09 74 68 65 |ered ins|ide..the| |00000ac0| 20 69 6e 64 69 63 61 74 | 65 64 20 72 65 63 74 61 | indicat|ed recta| |00000ad0| 6e 67 6c 65 2e 0d 09 2a | 2f 0d 09 0d 09 72 65 67 |ngle...*|/....reg| |00000ae0| 69 73 74 65 72 20 73 68 | 6f 72 74 20 72 68 20 3d |ister sh|ort rh =| |00000af0| 20 72 2e 62 6f 74 74 6f | 6d 20 2d 20 72 2e 74 6f | r.botto|m - r.to| |00000b00| 70 3b 0d 09 72 65 67 69 | 73 74 65 72 20 73 68 6f |p;..regi|ster sho| |00000b10| 72 74 20 72 77 20 3d 20 | 72 2e 72 69 67 68 74 20 |rt rw = |r.right | |00000b20| 2d 20 72 2e 6c 65 66 74 | 3b 0d 09 72 65 67 69 73 |- r.left|;..regis| |00000b30| 74 65 72 20 73 68 6f 72 | 74 20 68 2c 20 76 3b 0d |ter shor|t h, v;.| |00000b40| 09 46 6f 6e 74 49 6e 66 | 6f 20 66 69 3b 0d 09 0d |.FontInf|o fi;...| |00000b50| 09 47 65 74 46 6f 6e 74 | 49 6e 66 6f 20 28 26 66 |.GetFont|Info (&f| |00000b60| 69 29 3b 0d 09 0d 09 65 | 6c 6c 69 70 73 69 7a 65 |i);....e|llipsize| |00000b70| 20 28 73 2c 20 72 77 29 | 3b 20 2f 2a 6d 61 6b 65 | (s, rw)|; /*make| |00000b80| 20 73 75 72 65 20 69 74 | 20 66 69 74 73 20 69 6e | sure it| fits in| |00000b90| 73 69 64 65 20 74 68 65 | 20 72 65 63 74 61 6e 67 |side the| rectang| |00000ba0| 6c 65 2c 20 77 69 64 74 | 68 2d 77 69 73 65 2a 2f |le, widt|h-wise*/| |00000bb0| 0d 09 0d 09 68 20 3d 20 | 72 2e 6c 65 66 74 20 2b |....h = |r.left +| |00000bc0| 20 28 28 72 77 20 2d 20 | 53 74 72 69 6e 67 57 69 | ((rw - |StringWi| |00000bd0| 64 74 68 20 28 73 29 29 | 20 2f 20 32 29 3b 0d 09 |dth (s))| / 2);..| |00000be0| 0d 09 76 20 3d 20 72 2e | 74 6f 70 20 2b 20 28 28 |..v = r.|top + ((| |00000bf0| 72 68 20 2d 20 28 66 69 | 2e 61 73 63 65 6e 74 20 |rh - (fi|.ascent | |00000c00| 2b 20 66 69 2e 64 65 73 | 63 65 6e 74 29 29 20 2f |+ fi.des|cent)) /| |00000c10| 20 32 29 20 2b 20 66 69 | 2e 61 73 63 65 6e 74 3b | 2) + fi|.ascent;| |00000c20| 0d 09 0d 09 4d 6f 76 65 | 54 6f 20 28 68 2c 20 76 |....Move|To (h, v| |00000c30| 29 3b 0d 09 0d 09 43 6c | 69 70 52 65 63 74 20 28 |);....Cl|ipRect (| |00000c40| 26 72 29 3b 0d 09 0d 09 | 44 72 61 77 53 74 72 69 |&r);....|DrawStri| |00000c50| 6e 67 20 28 73 29 3b 0d | 09 7d 20 2f 2a 63 65 6e |ng (s);.|.} /*cen| |00000c60| 74 65 72 73 74 72 69 6e | 67 2a 2f 0d 0d 0d 73 74 |terstrin|g*/...st| |00000c70| 61 74 69 63 20 76 6f 69 | 64 20 73 65 74 66 6f 6e |atic voi|d setfon| |00000c80| 74 73 69 7a 65 73 74 79 | 6c 65 20 28 73 68 6f 72 |tsizesty|le (shor| |00000c90| 74 20 66 6f 6e 74 6e 75 | 6d 2c 20 73 68 6f 72 74 |t fontnu|m, short| |00000ca0| 20 66 6f 6e 74 73 69 7a | 65 2c 20 73 68 6f 72 74 | fontsiz|e, short| |00000cb0| 20 66 6f 6e 74 73 74 79 | 6c 65 29 20 7b 0d 0d 09 | fontsty|le) {...| |00000cc0| 54 65 78 74 46 6f 6e 74 | 20 28 66 6f 6e 74 6e 75 |TextFont| (fontnu| |00000cd0| 6d 29 3b 0d 09 0d 09 54 | 65 78 74 53 69 7a 65 20 |m);....T|extSize | |00000ce0| 28 66 6f 6e 74 73 69 7a | 65 29 3b 0d 09 0d 09 54 |(fontsiz|e);....T| |00000cf0| 65 78 74 46 61 63 65 20 | 28 66 6f 6e 74 73 74 79 |extFace |(fontsty| |00000d00| 6c 65 29 3b 0d 09 7d 20 | 2f 2a 73 65 74 66 6f 6e |le);..} |/*setfon| |00000d10| 74 73 69 7a 65 73 74 79 | 6c 65 2a 2f 0d 09 0d 09 |tsizesty|le*/....| |00000d20| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 75 70 64 |.static |void upd| |00000d30| 61 74 65 6d 61 69 6e 77 | 69 6e 64 6f 77 20 28 76 |atemainw|indow (v| |00000d40| 6f 69 64 29 20 7b 0d 09 | 0d 09 52 65 63 74 20 72 |oid) {..|..Rect r| |00000d50| 3b 0d 09 53 74 72 32 35 | 35 20 73 3b 0d 09 0d 09 |;..Str25|5 s;....| |00000d60| 72 20 3d 20 28 2a 6d 61 | 69 6e 77 69 6e 64 6f 77 |r = (*ma|inwindow| |00000d70| 29 2e 70 6f 72 74 52 65 | 63 74 3b 0d 09 0d 09 45 |).portRe|ct;....E| |00000d80| 72 61 73 65 52 65 63 74 | 20 28 26 72 29 3b 0d 09 |raseRect| (&r);..| |00000d90| 0d 09 73 65 74 66 6f 6e | 74 73 69 7a 65 73 74 79 |..setfon|tsizesty| |00000da0| 6c 65 20 28 68 65 6c 76 | 65 74 69 63 61 2c 20 31 |le (helv|etica, 1| |00000db0| 32 2c 20 30 29 3b 0d 09 | 0d 09 63 65 6e 74 65 72 |2, 0);..|..center| |00000dc0| 73 74 72 69 6e 67 20 28 | 72 2c 20 77 69 6e 64 6f |string (|r, windo| |00000dd0| 77 6d 65 73 73 61 67 65 | 29 3b 0d 09 0d 09 4e 75 |wmessage|);....Nu| |00000de0| 6d 54 6f 53 74 72 69 6e | 67 20 28 46 72 65 65 4d |mToStrin|g (FreeM| |00000df0| 65 6d 20 28 29 20 2f 20 | 31 30 32 34 2c 20 73 29 |em () / |1024, s)| |00000e00| 3b 0d 09 0d 09 4d 6f 76 | 65 54 6f 20 28 72 2e 6c |;....Mov|eTo (r.l| |00000e10| 65 66 74 20 2b 20 33 2c | 20 72 2e 62 6f 74 74 6f |eft + 3,| r.botto| |00000e20| 6d 20 2d 20 33 29 3b 0d | 09 0d 09 73 65 74 66 6f |m - 3);.|...setfo| |00000e30| 6e 74 73 69 7a 65 73 74 | 79 6c 65 20 28 67 65 6e |ntsizest|yle (gen| |00000e40| 65 76 61 2c 20 39 2c 20 | 30 29 3b 0d 09 0d 09 44 |eva, 9, |0);....D| |00000e50| 72 61 77 53 74 72 69 6e | 67 20 28 73 29 3b 0d 09 |rawStrin|g (s);..| |00000e60| 0d 09 44 72 61 77 53 74 | 72 69 6e 67 20 28 22 5c |..DrawSt|ring ("\| |00000e70| 70 4b 22 29 3b 0d 09 7d | 20 2f 2a 75 70 64 61 74 |pK");..}| /*updat| |00000e80| 65 6d 61 69 6e 77 69 6e | 64 6f 77 2a 2f 0d 09 0d |emainwin|dow*/...| |00000e90| 09 0d 73 74 61 74 69 63 | 20 42 6f 6f 6c 65 61 6e |..static| Boolean| |00000ea0| 20 73 65 74 77 69 6e 64 | 6f 77 6d 65 73 73 61 67 | setwind|owmessag| |00000eb0| 65 20 28 53 74 72 32 35 | 35 20 73 29 20 7b 0d 09 |e (Str25|5 s) {..| |00000ec0| 0d 09 63 6f 70 79 73 74 | 72 69 6e 67 20 28 73 2c |..copyst|ring (s,| |00000ed0| 20 77 69 6e 64 6f 77 6d | 65 73 73 61 67 65 29 3b | windowm|essage);| |00000ee0| 0d 09 0d 09 53 65 74 50 | 6f 72 74 20 28 6d 61 69 |....SetP|ort (mai| |00000ef0| 6e 77 69 6e 64 6f 77 29 | 3b 0d 09 0d 09 75 70 64 |nwindow)|;....upd| |00000f00| 61 74 65 6d 61 69 6e 77 | 69 6e 64 6f 77 20 28 29 |atemainw|indow ()| |00000f10| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru| |00000f20| 65 29 3b 0d 09 7d 20 2f | 2a 73 65 74 77 69 6e 64 |e);..} /|*setwind| |00000f30| 6f 77 6d 65 73 73 61 67 | 65 2a 2f 0d 0d 0d 73 74 |owmessag|e*/...st| |00000f40| 61 74 69 63 20 42 6f 6f | 6c 65 61 6e 20 69 6e 69 |atic Boo|lean ini| |00000f50| 74 6d 61 69 6e 77 69 6e | 64 6f 77 20 28 76 6f 69 |tmainwin|dow (voi| |00000f60| 64 29 20 7b 0d 09 0d 09 | 72 65 67 69 73 74 65 72 |d) {....|register| |00000f70| 20 57 69 6e 64 6f 77 50 | 74 72 20 77 3b 0d 09 0d | WindowP|tr w;...| |00000f80| 09 77 20 3d 20 6d 61 69 | 6e 77 69 6e 64 6f 77 20 |.w = mai|nwindow | |00000f90| 3d 20 47 65 74 4e 65 77 | 57 69 6e 64 6f 77 20 28 |= GetNew|Window (| |00000fa0| 31 32 38 2c 20 6e 69 6c | 2c 20 28 57 69 6e 64 6f |128, nil|, (Windo| |00000fb0| 77 50 74 72 29 20 2d 31 | 29 3b 0d 09 0d 09 69 66 |wPtr) -1|);....if| |00000fc0| 20 28 77 20 3d 3d 20 6e | 69 6c 29 0d 09 09 72 65 | (w == n|il)...re| |00000fd0| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 0d |turn (fa|lse);...| |00000fe0| 09 53 68 6f 77 57 69 6e | 64 6f 77 20 28 77 29 3b |.ShowWin|dow (w);| |00000ff0| 0d 09 0d 09 72 65 74 75 | 72 6e 20 28 74 72 75 65 |....retu|rn (true| |00001000| 29 3b 0d 09 7d 20 2f 2a | 69 6e 69 74 6d 61 69 6e |);..} /*|initmain| |00001010| 77 69 6e 64 6f 77 2a 2f | 0d 0d 0d 73 74 61 74 69 |window*/|...stati| |00001020| 63 20 76 6f 69 64 20 68 | 61 6e 64 6c 65 75 70 64 |c void h|andleupd| |00001030| 61 74 65 20 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |ate (Eve|ntRecord| |00001040| 20 2a 65 76 29 20 7b 0d | 09 0d 09 72 65 67 69 73 | *ev) {.|...regis| |00001050| 74 65 72 20 57 69 6e 64 | 6f 77 50 74 72 20 77 3b |ter Wind|owPtr w;| |00001060| 0d 09 0d 09 77 20 3d 20 | 28 57 69 6e 64 6f 77 50 |....w = |(WindowP| |00001070| 74 72 29 20 28 2a 65 76 | 29 2e 6d 65 73 73 61 67 |tr) (*ev|).messag| |00001080| 65 3b 0d 09 0d 09 42 65 | 67 69 6e 55 70 64 61 74 |e;....Be|ginUpdat| |00001090| 65 20 28 77 29 3b 0d 09 | 0d 09 53 65 74 50 6f 72 |e (w);..|..SetPor| |000010a0| 74 20 28 77 29 3b 0d 09 | 0d 09 75 70 64 61 74 65 |t (w);..|..update| |000010b0| 6d 61 69 6e 77 69 6e 64 | 6f 77 20 28 29 3b 0d 09 |mainwind|ow ();..| |000010c0| 0d 09 45 6e 64 55 70 64 | 61 74 65 20 28 77 29 3b |..EndUpd|ate (w);| |000010d0| 0d 09 7d 20 2f 2a 68 61 | 6e 64 6c 65 75 70 64 61 |..} /*ha|ndleupda| |000010e0| 74 65 2a 2f 0d 0d 0d 73 | 74 61 74 69 63 20 76 6f |te*/...s|tatic vo| |000010f0| 69 64 20 68 61 6e 64 6c | 65 64 72 61 67 20 28 45 |id handl|edrag (E| |00001100| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 65 76 2c 20 |ventReco|rd *ev, | |00001110| 57 69 6e 64 6f 77 50 74 | 72 20 77 29 20 7b 0d 09 |WindowPt|r w) {..| |00001120| 0d 09 52 65 63 74 20 72 | 3b 0d 0d 09 72 20 3d 20 |..Rect r|;...r = | |00001130| 71 64 2e 73 63 72 65 65 | 6e 42 69 74 73 2e 62 6f |qd.scree|nBits.bo| |00001140| 75 6e 64 73 3b 20 0d 09 | 0d 09 72 2e 74 6f 70 20 |unds; ..|..r.top | |00001150| 3d 20 72 2e 74 6f 70 20 | 2b 20 47 65 74 4d 42 61 |= r.top |+ GetMBa| |00001160| 72 48 65 69 67 68 74 20 | 28 29 3b 20 0d 09 0d 09 |rHeight |(); ....| |00001170| 49 6e 73 65 74 52 65 63 | 74 20 28 26 72 2c 20 34 |InsetRec|t (&r, 4| |00001180| 2c 20 34 29 3b 0d 09 0d | 09 44 72 61 67 57 69 6e |, 4);...|.DragWin| |00001190| 64 6f 77 20 28 77 2c 20 | 28 2a 65 76 29 2e 77 68 |dow (w, |(*ev).wh| |000011a0| 65 72 65 2c 20 26 72 29 | 3b 0d 09 7d 20 2f 2a 68 |ere, &r)|;..} /*h| |000011b0| 61 6e 64 6c 65 64 72 61 | 67 2a 2f 0d 0d 0d 73 74 |andledra|g*/...st| |000011c0| 61 74 69 63 20 76 6f 69 | 64 20 68 61 6e 64 6c 65 |atic voi|d handle| |000011d0| 6d 65 6e 75 20 28 6c 6f | 6e 67 20 63 6f 64 65 77 |menu (lo|ng codew| |000011e0| 6f 72 64 29 20 7b 0d 09 | 0d 09 72 65 67 69 73 74 |ord) {..|..regist| |000011f0| 65 72 20 73 68 6f 72 74 | 20 69 64 6d 65 6e 75 2c |er short| idmenu,| |00001200| 20 69 64 69 74 65 6d 3b | 0d 09 0d 09 69 64 69 74 | iditem;|....idit| |00001210| 65 6d 20 3d 20 4c 6f 57 | 6f 72 64 20 28 63 6f 64 |em = LoW|ord (cod| |00001220| 65 77 6f 72 64 29 3b 0d | 09 0d 09 69 64 6d 65 6e |eword);.|...idmen| |00001230| 75 20 3d 20 48 69 57 6f | 72 64 20 28 63 6f 64 65 |u = HiWo|rd (code| |00001240| 77 6f 72 64 29 3b 0d 09 | 0d 09 69 66 20 28 53 68 |word);..|..if (Sh| |00001250| 61 72 65 64 4d 65 6e 75 | 48 69 74 20 28 69 64 6d |aredMenu|Hit (idm| |00001260| 65 6e 75 2c 20 69 64 69 | 74 65 6d 29 29 20 2f 2a |enu, idi|tem)) /*| |00001270| 53 65 65 20 53 74 65 70 | 20 23 33 2a 2f 09 0d 09 |See Step| #3*/...| |00001280| 09 67 6f 74 6f 20 65 78 | 69 74 3b 0d 09 0d 09 73 |.goto ex|it;....s| |00001290| 77 69 74 63 68 20 28 69 | 64 6d 65 6e 75 29 20 7b |witch (i|dmenu) {| |000012a0| 0d 09 0d 09 09 63 61 73 | 65 20 61 70 70 6c 65 6d |.....cas|e applem| |000012b0| 65 6e 75 3a 20 0d 09 09 | 09 73 77 69 74 63 68 20 |enu: ...|.switch | |000012c0| 28 69 64 69 74 65 6d 29 | 20 7b 0d 09 09 09 09 0d |(iditem)| {......| |000012d0| 09 09 09 09 63 61 73 65 | 20 61 62 6f 75 74 69 74 |....case| aboutit| |000012e0| 65 6d 3a 0d 09 09 09 09 | 09 41 6c 65 72 74 20 28 |em:.....|.Alert (| |000012f0| 32 36 32 2c 20 6e 69 6c | 29 3b 0d 09 09 09 09 09 |262, nil|);......| |00001300| 0d 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....| |00001310| 0d 09 09 09 09 64 65 66 | 61 75 6c 74 3a 20 7b 0d |.....def|ault: {.| |00001320| 09 09 09 09 0d 09 09 09 | 09 09 53 74 72 32 35 35 |........|..Str255| |00001330| 20 73 3b 0d 09 09 09 09 | 09 0d 09 09 09 09 09 47 | s;.....|.......G| |00001340| 65 74 49 74 65 6d 20 28 | 68 61 70 70 6c 65 6d 65 |etItem (|happleme| |00001350| 6e 75 2c 20 69 64 69 74 | 65 6d 2c 20 73 29 3b 0d |nu, idit|em, s);.| |00001360| 09 09 09 09 09 0d 09 09 | 09 09 09 4f 70 65 6e 44 |........|...OpenD| |00001370| 65 73 6b 41 63 63 20 28 | 73 29 3b 0d 09 09 09 09 |eskAcc (|s);.....| |00001380| 09 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...| |00001390| 09 09 09 7d 0d 09 09 09 | 09 7d 20 2f 2a 73 77 69 |...}....|.} /*swi| |000013a0| 74 63 68 2a 2f 0d 09 09 | 09 0d 09 09 09 62 72 65 |tch*/...|.....bre| |000013b0| 61 6b 3b 20 2f 2a 61 70 | 70 6c 65 20 6d 65 6e 75 |ak; /*ap|ple menu| |000013c0| 2a 2f 0d 0d 09 09 63 61 | 73 65 20 66 69 6c 65 6d |*/....ca|se filem| |000013d0| 65 6e 75 3a 20 0d 09 09 | 09 73 77 69 74 63 68 20 |enu: ...|.switch | |000013e0| 28 69 64 69 74 65 6d 29 | 20 7b 0d 09 09 09 09 0d |(iditem)| {......| |000013f0| 09 09 09 09 63 61 73 65 | 20 71 75 69 74 69 74 65 |....case| quitite| |00001400| 6d 3a 0d 09 09 09 09 0d | 09 09 09 09 09 66 6c 65 |m:......|.....fle| |00001410| 78 69 74 6d 61 69 6e 6c | 6f 6f 70 20 3d 20 74 72 |xitmainl|oop = tr| |00001420| 75 65 3b 0d 09 09 09 09 | 09 0d 09 09 09 09 09 62 |ue;.....|.......b| |00001430| 72 65 61 6b 3b 0d 09 09 | 09 09 7d 20 2f 2a 73 77 |reak;...|..} /*sw| |00001440| 69 74 63 68 2a 2f 0d 09 | 09 09 0d 09 09 09 62 72 |itch*/..|......br| |00001450| 65 61 6b 3b 20 2f 2a 66 | 69 6c 65 20 6d 65 6e 75 |eak; /*f|ile menu| |00001460| 2a 2f 0d 09 09 09 0d 09 | 09 7d 20 2f 2a 73 77 69 |*/......|.} /*swi| |00001470| 74 63 68 69 6e 67 20 6f | 6e 20 77 68 69 63 68 20 |tching o|n which | |00001480| 6d 65 6e 75 20 77 61 73 | 20 69 6e 76 6f 6b 65 64 |menu was| invoked| |00001490| 2a 2f 0d 09 09 0d 09 65 | 78 69 74 3a 0d 09 0d 09 |*/.....e|xit:....| |000014a0| 48 69 6c 69 74 65 4d 65 | 6e 75 20 28 30 29 3b 0d |HiliteMe|nu (0);.| |000014b0| 09 7d 20 2f 2a 68 61 6e | 64 6c 65 6d 65 6e 75 2a |.} /*han|dlemenu*| |000014c0| 2f 0d 0d 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 |/...stat|ic void | |000014d0| 68 61 6e 64 6c 65 6d 6f | 75 73 65 20 28 45 76 65 |handlemo|use (Eve| |000014e0| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 29 20 7b 0d |ntRecord| *ev) {.| |000014f0| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short| |00001500| 20 70 61 72 74 3b 0d 09 | 57 69 6e 64 6f 77 50 74 | part;..|WindowPt| |00001510| 72 20 77 3b 0d 09 0d 09 | 70 61 72 74 20 3d 20 46 |r w;....|part = F| |00001520| 69 6e 64 57 69 6e 64 6f | 77 20 28 28 2a 65 76 29 |indWindo|w ((*ev)| |00001530| 2e 77 68 65 72 65 2c 20 | 26 77 29 3b 0d 09 0d 09 |.where, |&w);....| |00001540| 69 66 20 28 77 20 21 3d | 20 6e 69 6c 29 20 0d 09 |if (w !=| nil) ..| |00001550| 0d 09 09 69 66 20 28 77 | 20 21 3d 20 46 72 6f 6e |...if (w| != Fron| |00001560| 74 57 69 6e 64 6f 77 20 | 28 29 29 20 7b 20 2f 2a |tWindow |()) { /*| |00001570| 6a 75 73 74 20 6c 69 6b | 65 20 61 6c 6c 20 6f 74 |just lik|e all ot| |00001580| 68 65 72 20 4d 61 63 20 | 70 72 6f 67 72 61 6d 73 |her Mac |programs| |00001590| 2a 2f 0d 09 09 09 0d 09 | 09 09 53 65 6c 65 63 74 |*/......|..Select| |000015a0| 57 69 6e 64 6f 77 20 28 | 77 29 3b 0d 09 09 09 09 |Window (|w);.....| |000015b0| 09 09 09 0d 09 09 09 72 | 65 74 75 72 6e 3b 20 2f |.......r|eturn; /| |000015c0| 2a 74 68 65 20 6d 6f 75 | 73 65 20 63 6c 69 63 6b |*the mou|se click| |000015d0| 20 69 73 20 63 6f 6e 73 | 75 6d 65 64 20 62 79 20 | is cons|umed by | |000015e0| 74 68 65 20 62 72 69 6e | 67 74 6f 66 72 6f 6e 74 |the brin|gtofront| |000015f0| 20 6f 70 65 72 61 74 69 | 6f 6e 2a 2f 0d 09 09 09 | operati|on*/....| |00001600| 7d 0d 09 0d 09 73 77 69 | 74 63 68 20 28 70 61 72 |}....swi|tch (par| |00001610| 74 29 20 7b 0d 09 0d 09 | 09 63 61 73 65 20 69 6e |t) {....|.case in| |00001620| 4d 65 6e 75 42 61 72 3a | 20 0d 09 09 09 68 61 6e |MenuBar:| ....han| |00001630| 64 6c 65 6d 65 6e 75 20 | 28 4d 65 6e 75 53 65 6c |dlemenu |(MenuSel| |00001640| 65 63 74 20 28 28 2a 65 | 76 29 2e 77 68 65 72 65 |ect ((*e|v).where| |00001650| 29 29 3b 20 0d 09 09 09 | 0d 09 09 09 62 72 65 61 |)); ....|....brea| |00001660| 6b 3b 0d 09 09 0d 09 09 | 63 61 73 65 20 69 6e 53 |k;......|case inS| |00001670| 79 73 57 69 6e 64 6f 77 | 3a 0d 09 09 09 53 79 73 |ysWindow|:....Sys| |00001680| 74 65 6d 43 6c 69 63 6b | 20 28 65 76 2c 20 77 29 |temClick| (ev, w)| |00001690| 3b 20 0d 09 09 09 0d 09 | 09 09 62 72 65 61 6b 3b |; ......|..break;| |000016a0| 0d 09 09 0d 09 09 63 61 | 73 65 20 69 6e 44 72 61 |......ca|se inDra| |000016b0| 67 3a 0d 09 09 09 68 61 | 6e 64 6c 65 64 72 61 67 |g:....ha|ndledrag| |000016c0| 20 28 65 76 2c 20 77 29 | 3b 0d 09 09 09 0d 09 09 | (ev, w)|;.......| |000016d0| 09 62 72 65 61 6b 3b 0d | 09 09 09 0d 09 09 7d 20 |.break;.|......} | |000016e0| 2f 2a 73 77 69 74 63 68 | 2a 2f 0d 09 7d 20 2f 2a |/*switch|*/..} /*| |000016f0| 68 61 6e 64 6c 65 6d 6f | 75 73 65 2a 2f 0d 0d 0d |handlemo|use*/...| |00001700| 73 74 61 74 69 63 20 76 | 6f 69 64 20 68 61 6e 64 |static v|oid hand| |00001710| 6c 65 6b 65 79 73 74 72 | 6f 6b 65 20 28 45 76 65 |lekeystr|oke (Eve| |00001720| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 29 20 7b 20 |ntRecord| *ev) { | |00001730| 2f 2a 53 65 65 20 53 74 | 65 70 20 23 34 2a 2f 0d |/*See St|ep #4*/.| |00001740| 0d 09 72 65 67 69 73 74 | 65 72 20 63 68 61 72 20 |..regist|er char | |00001750| 63 68 20 3d 20 28 2a 65 | 76 29 2e 6d 65 73 73 61 |ch = (*e|v).messa| |00001760| 67 65 20 26 20 63 68 61 | 72 43 6f 64 65 4d 61 73 |ge & cha|rCodeMas| |00001770| 6b 3b 0d 09 0d 09 69 66 | 20 28 53 68 61 72 65 64 |k;....if| (Shared| |00001780| 53 63 72 69 70 74 52 75 | 6e 6e 69 6e 67 20 28 29 |ScriptRu|nning ()| |00001790| 29 20 7b 20 2f 2a 63 6d | 64 2d 70 65 72 69 6f 64 |) { /*cm|d-period| |000017a0| 20 74 65 72 6d 69 6e 61 | 74 65 73 20 74 68 65 20 | termina|tes the | |000017b0| 73 63 72 69 70 74 2a 2f | 0d 09 0d 09 09 69 66 20 |script*/|.....if | |000017c0| 28 28 28 2a 65 76 29 2e | 6d 6f 64 69 66 69 65 72 |(((*ev).|modifier| |000017d0| 73 20 26 20 63 6d 64 4b | 65 79 29 20 26 26 20 28 |s & cmdK|ey) && (| |000017e0| 63 68 20 3d 3d 20 27 2e | 27 29 29 20 7b 20 0d 09 |ch == '.|')) { ..| |000017f0| 09 09 0d 09 09 09 43 61 | 6e 63 65 6c 53 68 61 72 |......Ca|ncelShar| |00001800| 65 64 53 63 72 69 70 74 | 20 28 29 3b 20 2f 2a 63 |edScript| (); /*c| |00001810| 61 6e 63 65 6c 20 74 68 | 65 20 73 68 61 72 65 64 |ancel th|e shared| |00001820| 20 6d 65 6e 75 20 73 63 | 72 69 70 74 2c 20 69 66 | menu sc|ript, if| |00001830| 20 6f 6e 65 20 69 73 20 | 72 75 6e 6e 69 6e 67 2a | one is |running*| |00001840| 2f 0d 09 09 0d 09 09 09 | 72 65 74 75 72 6e 3b 0d |/.......|return;.| |00001850| 09 09 09 7d 0d 09 09 7d | 0d 09 0d 09 68 61 6e 64 |...}...}|....hand| |00001860| 6c 65 6d 65 6e 75 20 28 | 4d 65 6e 75 4b 65 79 20 |lemenu (|MenuKey | |00001870| 28 63 68 29 29 3b 20 2f | 2a 6e 6f 74 20 63 6d 64 |(ch)); /|*not cmd| |00001880| 2d 70 65 72 69 6f 64 2c | 20 70 72 6f 63 65 73 73 |-period,| process| |00001890| 20 74 68 65 20 6e 6f 72 | 6d 61 6c 20 77 61 79 2a | the nor|mal way*| |000018a0| 2f 0d 09 7d 20 2f 2a 68 | 61 6e 64 6c 65 6b 65 79 |/..} /*h|andlekey| |000018b0| 73 74 72 6f 6b 65 2a 2f | 0d 0d 0d 73 74 61 74 69 |stroke*/|...stati| |000018c0| 63 20 76 6f 69 64 20 68 | 61 6e 64 6c 65 6a 75 67 |c void h|andlejug| |000018d0| 67 6c 65 20 28 45 76 65 | 6e 74 52 65 63 6f 72 64 |gle (Eve|ntRecord| |000018e0| 20 2a 65 76 29 20 7b 0d | 09 0d 09 66 6c 63 75 72 | *ev) {.|...flcur| |000018f0| 72 65 6e 74 6c 79 61 63 | 74 69 76 65 20 3d 20 28 |rentlyac|tive = (| |00001900| 28 2a 65 76 29 2e 6d 65 | 73 73 61 67 65 20 26 20 |(*ev).me|ssage & | |00001910| 72 65 73 75 6d 65 46 6c | 61 67 29 20 21 3d 20 30 |resumeFl|ag) != 0| |00001920| 3b 0d 09 7d 20 2f 2a 68 | 61 6e 64 6c 65 6a 75 67 |;..} /*h|andlejug| |00001930| 67 6c 65 2a 2f 0d 0d 0d | 73 74 61 74 69 63 20 76 |gle*/...|static v| |00001940| 6f 69 64 20 68 61 6e 64 | 6c 65 65 76 65 6e 74 20 |oid hand|leevent | |00001950| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 65 76 |(EventRe|cord *ev| |00001960| 29 20 7b 0d 09 0d 09 73 | 77 69 74 63 68 20 28 28 |) {....s|witch ((| |00001970| 2a 65 76 29 2e 77 68 61 | 74 29 20 7b 0d 09 0d 09 |*ev).wha|t) {....| |00001980| 09 63 61 73 65 20 6b 65 | 79 44 6f 77 6e 3a 20 63 |.case ke|yDown: c| |00001990| 61 73 65 20 61 75 74 6f | 4b 65 79 3a 20 0d 09 09 |ase auto|Key: ...| |000019a0| 09 68 61 6e 64 6c 65 6b | 65 79 73 74 72 6f 6b 65 |.handlek|eystroke| |000019b0| 20 28 65 76 29 3b 0d 09 | 09 09 0d 09 09 09 62 72 | (ev);..|......br| |000019c0| 65 61 6b 3b 0d 09 09 09 | 0d 09 09 63 61 73 65 20 |eak;....|...case | |000019d0| 6d 6f 75 73 65 44 6f 77 | 6e 3a 0d 09 09 09 68 61 |mouseDow|n:....ha| |000019e0| 6e 64 6c 65 6d 6f 75 73 | 65 20 28 65 76 29 3b 0d |ndlemous|e (ev);.| |000019f0| 09 09 09 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...| |00001a00| 0d 09 09 63 61 73 65 20 | 75 70 64 61 74 65 45 76 |...case |updateEv| |00001a10| 74 3a 0d 09 09 09 68 61 | 6e 64 6c 65 75 70 64 61 |t:....ha|ndleupda| |00001a20| 74 65 20 28 65 76 29 3b | 0d 09 09 09 0d 09 09 09 |te (ev);|........| |00001a30| 62 72 65 61 6b 3b 0d 09 | 09 0d 09 09 63 61 73 65 |break;..|....case| |00001a40| 20 6f 73 45 76 74 3a 0d | 09 09 09 68 61 6e 64 6c | osEvt:.|...handl| |00001a50| 65 6a 75 67 67 6c 65 20 | 28 65 76 29 3b 0d 09 09 |ejuggle |(ev);...| |00001a60| 09 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 0d 09 |.....bre|ak;.....| |00001a70| 09 63 61 73 65 20 6b 48 | 69 67 68 4c 65 76 65 6c |.case kH|ighLevel| |00001a80| 45 76 65 6e 74 3a 0d 09 | 09 09 41 45 50 72 6f 63 |Event:..|..AEProc| |00001a90| 65 73 73 41 70 70 6c 65 | 45 76 65 6e 74 20 28 65 |essApple|Event (e| |00001aa0| 76 29 3b 0d 09 09 09 0d | 09 09 09 62 72 65 61 6b |v);.....|...break| |00001ab0| 3b 0d 09 09 0d 09 09 63 | 61 73 65 20 6e 75 6c 6c |;......c|ase null| |00001ac0| 45 76 65 6e 74 3a 20 2f | 2a 53 65 65 20 53 74 65 |Event: /|*See Ste| |00001ad0| 70 20 23 32 2a 2f 0d 09 | 09 09 69 66 20 28 66 6c |p #2*/..|..if (fl| |00001ae0| 63 75 72 72 65 6e 74 6c | 79 61 63 74 69 76 65 29 |currentl|yactive)| |00001af0| 0d 09 09 09 09 43 68 65 | 63 6b 53 68 61 72 65 64 |.....Che|ckShared| |00001b00| 4d 65 6e 75 73 20 28 66 | 69 72 73 74 73 68 61 72 |Menus (f|irstshar| |00001b10| 65 64 6d 65 6e 75 29 3b | 0d 09 09 09 0d 09 09 09 |edmenu);|........| |00001b20| 62 72 65 61 6b 3b 0d 09 | 09 7d 20 2f 2a 73 77 69 |break;..|.} /*swi| |00001b30| 74 63 68 2a 2f 0d 09 7d | 20 2f 2a 68 61 6e 64 6c |tch*/..}| /*handl| |00001b40| 65 65 76 65 6e 74 2a 2f | 0d 0d 0d 73 74 61 74 69 |eevent*/|...stati| |00001b50| 63 20 76 6f 69 64 20 6d | 61 69 6e 65 76 65 6e 74 |c void m|ainevent| |00001b60| 6c 6f 6f 70 20 28 76 6f | 69 64 29 20 7b 0d 09 0d |loop (vo|id) {...| |00001b70| 09 45 76 65 6e 74 52 65 | 63 6f 72 64 20 65 76 3b |.EventRe|cord ev;| |00001b80| 0d 09 0d 09 77 68 69 6c | 65 20 28 21 66 6c 65 78 |....whil|e (!flex| |00001b90| 69 74 6d 61 69 6e 6c 6f | 6f 70 29 20 7b 0d 09 09 |itmainlo|op) {...| |00001ba0| 0d 09 09 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |...WaitN|extEvent| |00001bb0| 20 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 26 65 | (everyE|vent, &e| |00001bc0| 76 2c 20 31 2c 20 6e 69 | 6c 29 3b 0d 09 09 0d 09 |v, 1, ni|l);.....| |00001bd0| 09 68 61 6e 64 6c 65 65 | 76 65 6e 74 20 28 26 65 |.handlee|vent (&e| |00001be0| 76 29 3b 0d 09 09 7d 20 | 2f 2a 77 68 69 6c 65 2a |v);...} |/*while*| |00001bf0| 2f 0d 09 7d 20 2f 2a 6d | 61 69 6e 65 76 65 6e 74 |/..} /*m|ainevent| |00001c00| 6c 6f 6f 70 2a 2f 0d 0d | 0d 73 74 61 74 69 63 20 |loop*/..|.static | |00001c10| 76 6f 69 64 20 69 6e 69 | 74 6d 65 6e 75 73 20 28 |void ini|tmenus (| |00001c20| 76 6f 69 64 29 20 7b 0d | 09 0d 09 2f 2a 0d 09 73 |void) {.|.../*..s| |00001c30| 65 74 20 75 70 20 6f 75 | 72 20 61 70 70 6c 65 20 |et up ou|r apple | |00001c40| 61 6e 64 20 66 69 6c 65 | 20 6d 65 6e 75 73 2e 20 |and file| menus. | |00001c50| 20 6e 6f 74 68 69 6e 67 | 20 66 61 6e 63 79 2e 0d | nothing| fancy..| |00001c60| 09 2a 2f 0d 09 0d 09 68 | 61 70 70 6c 65 6d 65 6e |.*/....h|applemen| |00001c70| 75 20 3d 20 47 65 74 4d | 65 6e 75 20 28 61 70 70 |u = GetM|enu (app| |00001c80| 6c 65 6d 65 6e 75 29 3b | 20 0d 09 0d 09 41 64 64 |lemenu);| ....Add| |00001c90| 52 65 73 4d 65 6e 75 20 | 28 68 61 70 70 6c 65 6d |ResMenu |(happlem| |00001ca0| 65 6e 75 2c 20 27 44 52 | 56 52 27 29 3b 20 0d 09 |enu, 'DR|VR'); ..| |00001cb0| 0d 09 49 6e 73 65 72 74 | 4d 65 6e 75 20 28 68 61 |..Insert|Menu (ha| |00001cc0| 70 70 6c 65 6d 65 6e 75 | 2c 20 30 29 3b 20 0d 09 |pplemenu|, 0); ..| |00001cd0| 0d 09 68 66 69 6c 65 6d | 65 6e 75 20 3d 20 47 65 |..hfilem|enu = Ge| |00001ce0| 74 4d 65 6e 75 20 28 66 | 69 6c 65 6d 65 6e 75 29 |tMenu (f|ilemenu)| |00001cf0| 3b 20 0d 09 0d 09 49 6e | 73 65 72 74 4d 65 6e 75 |; ....In|sertMenu| |00001d00| 20 28 68 66 69 6c 65 6d | 65 6e 75 2c 20 30 29 3b | (hfilem|enu, 0);| |00001d10| 0d 09 0d 09 44 72 61 77 | 4d 65 6e 75 42 61 72 20 |....Draw|MenuBar | |00001d20| 28 29 3b 0d 09 7d 20 2f | 2a 69 6e 69 74 6d 65 6e |();..} /|*initmen| |00001d30| 75 73 2a 2f 0d 0d 0d 73 | 74 61 74 69 63 20 76 6f |us*/...s|tatic vo| |00001d40| 69 64 20 69 6e 69 74 6d | 61 63 69 6e 74 6f 73 68 |id initm|acintosh| |00001d50| 20 28 76 6f 69 64 29 20 | 7b 0d 0d 09 2f 2a 0d 09 | (void) |{.../*..| |00001d60| 74 68 65 20 6d 61 67 69 | 63 20 73 74 75 66 66 20 |the magi|c stuff | |00001d70| 74 68 61 74 20 65 76 65 | 72 79 20 4d 61 63 69 6e |that eve|ry Macin| |00001d80| 74 6f 73 68 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |tosh app|lication| |00001d90| 20 6e 65 65 64 73 20 74 | 6f 20 64 6f 20 0d 09 62 | needs t|o do ..b| |00001da0| 65 66 6f 72 65 20 64 6f | 69 6e 67 20 61 6e 79 74 |efore do|ing anyt| |00001db0| 68 69 6e 67 20 65 6c 73 | 65 2e 0d 09 2a 2f 0d 0d |hing els|e...*/..| |00001dc0| 09 72 65 67 69 73 74 65 | 72 20 73 68 6f 72 74 20 |.registe|r short | |00001dd0| 69 3b 0d 09 09 0d 09 4d | 61 78 41 70 70 6c 5a 6f |i;.....M|axApplZo| |00001de0| 6e 65 20 28 29 3b 0d 09 | 0d 09 66 6f 72 20 28 69 |ne ();..|..for (i| |00001df0| 20 3d 20 30 3b 20 69 20 | 3c 20 31 30 3b 20 69 2b | = 0; i |< 10; i+| |00001e00| 2b 29 20 0d 09 09 4d 6f | 72 65 4d 61 73 74 65 72 |+) ...Mo|reMaster| |00001e10| 73 20 28 29 3b 0d 09 0d | 09 49 6e 69 74 47 72 61 |s ();...|.InitGra| |00001e20| 66 20 28 26 71 64 2e 74 | 68 65 50 6f 72 74 29 3b |f (&qd.t|hePort);| |00001e30| 0d 09 0d 09 49 6e 69 74 | 46 6f 6e 74 73 20 28 29 |....Init|Fonts ()| |00001e40| 3b 0d 09 0d 09 46 6c 75 | 73 68 45 76 65 6e 74 73 |;....Flu|shEvents| |00001e50| 20 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 30 29 | (everyE|vent, 0)| |00001e60| 3b 0d 09 0d 09 49 6e 69 | 74 57 69 6e 64 6f 77 73 |;....Ini|tWindows| |00001e70| 20 28 29 3b 0d 09 0d 09 | 49 6e 69 74 4d 65 6e 75 | ();....|InitMenu| |00001e80| 73 20 28 29 3b 0d 09 0d | 09 54 45 49 6e 69 74 20 |s ();...|.TEInit | |00001e90| 28 29 3b 0d 09 0d 09 49 | 6e 69 74 44 69 61 6c 6f |();....I|nitDialo| |00001ea0| 67 73 20 28 6e 69 6c 29 | 3b 0d 09 0d 09 49 6e 69 |gs (nil)|;....Ini| |00001eb0| 74 43 75 72 73 6f 72 20 | 28 29 3b 0d 09 0d 09 66 |tCursor |();....f| |00001ec0| 6f 72 20 28 69 20 3d 20 | 30 3b 20 69 20 3c 20 35 |or (i = |0; i < 5| |00001ed0| 3b 20 69 2b 2b 29 20 7b | 20 2f 2a 72 65 67 69 73 |; i++) {| /*regis| |00001ee0| 74 65 72 20 77 69 74 68 | 20 4d 75 6c 74 69 66 69 |ter with| Multifi| |00001ef0| 6e 64 65 72 2a 2f 0d 09 | 09 0d 09 09 45 76 65 6e |nder*/..|....Even| |00001f00| 74 52 65 63 6f 72 64 20 | 65 76 3b 0d 09 09 0d 09 |tRecord |ev;.....| |00001f10| 09 45 76 65 6e 74 41 76 | 61 69 6c 20 28 65 76 65 |.EventAv|ail (eve| |00001f20| 72 79 45 76 65 6e 74 2c | 20 26 65 76 29 3b 20 2f |ryEvent,| &ev); /| |00001f30| 2a 73 65 65 20 54 4e 31 | 38 30 20 2d 2d 20 73 70 |*see TN1|80 -- sp| |00001f40| 6c 61 73 68 20 73 63 72 | 65 65 6e 2a 2f 0d 09 09 |lash scr|een*/...| |00001f50| 7d 20 2f 2a 66 6f 72 2a | 2f 0d 09 7d 20 2f 2a 69 |} /*for*|/..} /*i| |00001f60| 6e 69 74 6d 61 63 69 6e | 74 6f 73 68 2a 2f 0d 0d |nitmacin|tosh*/..| |00001f70| 0d 73 74 61 74 69 63 20 | 70 61 73 63 61 6c 20 4f |.static |pascal O| |00001f80| 53 45 72 72 20 68 61 6e | 64 6c 65 71 75 69 74 20 |SErr han|dlequit | |00001f90| 28 65 76 65 6e 74 2c 20 | 72 65 70 6c 79 2c 20 72 |(event, |reply, r| |00001fa0| 65 66 63 6f 6e 29 20 41 | 45 44 65 73 63 4c 69 73 |efcon) A|EDescLis| |00001fb0| 74 20 2a 65 76 65 6e 74 | 2c 20 2a 72 65 70 6c 79 |t *event|, *reply| |00001fc0| 3b 20 6c 6f 6e 67 20 72 | 65 66 63 6f 6e 3b 20 7b |; long r|efcon; {| |00001fd0| 0d 09 0d 09 2f 2a 44 65 | 62 75 67 53 74 72 20 28 |..../*De|bugStr (| |00001fe0| 22 5c 70 71 75 69 74 61 | 70 70 22 29 3b 2a 2f 0d |"\pquita|pp");*/.| |00001ff0| 09 0d 09 66 6c 65 78 69 | 74 6d 61 69 6e 6c 6f 6f |...flexi|tmainloo| |00002000| 70 20 3d 20 74 72 75 65 | 3b 0d 09 0d 09 72 65 74 |p = true|;....ret| |00002010| 75 72 6e 20 28 6e 6f 45 | 72 72 29 3b 0d 09 7d 20 |urn (noE|rr);..} | |00002020| 2f 2a 68 61 6e 64 6c 65 | 71 75 69 74 2a 2f 0d 09 |/*handle|quit*/..| |00002030| 0d 09 0d 73 74 61 74 69 | 63 20 70 61 73 63 61 6c |...stati|c pascal| |00002040| 20 4f 53 45 72 72 20 68 | 61 6e 64 6c 65 6f 70 65 | OSErr h|andleope| |00002050| 6e 61 70 70 20 28 65 76 | 65 6e 74 2c 20 72 65 70 |napp (ev|ent, rep| |00002060| 6c 79 2c 20 72 65 66 63 | 6f 6e 29 20 41 45 44 65 |ly, refc|on) AEDe| |00002070| 73 63 4c 69 73 74 20 2a | 65 76 65 6e 74 2c 20 2a |scList *|event, *| |00002080| 72 65 70 6c 79 3b 20 6c | 6f 6e 67 20 72 65 66 63 |reply; l|ong refc| |00002090| 6f 6e 3b 20 7b 0d 09 0d | 09 2f 2a 44 65 62 75 67 |on; {...|./*Debug| |000020a0| 53 74 72 20 28 22 5c 70 | 6f 70 65 6e 61 70 70 22 |Str ("\p|openapp"| |000020b0| 29 3b 2a 2f 0d 09 0d 09 | 72 65 74 75 72 6e 20 28 |);*/....|return (| |000020c0| 6e 6f 45 72 72 29 3b 0d | 09 7d 20 2f 2a 68 61 6e |noErr);.|.} /*han| |000020d0| 64 6c 65 6f 70 65 6e 61 | 70 70 2a 2f 0d 0d 0d 73 |dleopena|pp*/...s| |000020e0| 74 61 74 69 63 20 70 61 | 73 63 61 6c 20 42 6f 6f |tatic pa|scal Boo| |000020f0| 6c 65 61 6e 20 6f 70 65 | 6e 66 69 6c 65 73 70 65 |lean ope|nfilespe| |00002100| 63 20 28 66 73 29 20 46 | 53 53 70 65 63 20 2a 66 |c (fs) F|SSpec *f| |00002110| 73 3b 20 7b 0d 0d 09 2f | 2a 44 65 62 75 67 53 74 |s; {.../|*DebugSt| |00002120| 72 20 28 28 2a 66 73 29 | 2e 6e 61 6d 65 29 3b 2a |r ((*fs)|.name);*| |00002130| 2f 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |/....ret|urn (tru| |00002140| 65 29 3b 0d 09 7d 20 2f | 2a 6f 70 65 6e 66 69 6c |e);..} /|*openfil| |00002150| 65 73 70 65 63 2a 2f 0d | 09 0d 0d 73 74 61 74 69 |espec*/.|...stati| |00002160| 63 20 70 61 73 63 61 6c | 20 42 6f 6f 6c 65 61 6e |c pascal| Boolean| |00002170| 20 70 72 69 6e 74 66 69 | 6c 65 73 70 65 63 20 28 | printfi|lespec (| |00002180| 66 73 29 20 46 53 53 70 | 65 63 20 2a 66 73 3b 20 |fs) FSSp|ec *fs; | |00002190| 7b 0d 0d 09 2f 2a 44 65 | 62 75 67 53 74 72 20 28 |{.../*De|bugStr (| |000021a0| 28 2a 66 73 29 2e 6e 61 | 6d 65 29 3b 2a 2f 0d 09 |(*fs).na|me);*/..| |000021b0| 0d 09 72 65 74 75 72 6e | 20 28 74 72 75 65 29 3b |..return| (true);| |000021c0| 0d 09 7d 20 2f 2a 70 72 | 69 6e 74 66 69 6c 65 73 |..} /*pr|intfiles| |000021d0| 70 65 63 2a 2f 0d 09 0d | 0d 73 74 61 74 69 63 20 |pec*/...|.static | |000021e0| 70 61 73 63 61 6c 20 4f | 53 45 72 72 20 68 61 6e |pascal O|SErr han| |000021f0| 64 6c 65 6f 70 65 6e 20 | 28 41 70 70 6c 65 45 76 |dleopen |(AppleEv| |00002200| 65 6e 74 20 2a 65 76 65 | 6e 74 2c 20 41 70 70 6c |ent *eve|nt, Appl| |00002210| 65 45 76 65 6e 74 20 2a | 72 65 70 6c 79 2c 20 6c |eEvent *|reply, l| |00002220| 6f 6e 67 20 72 65 66 63 | 6f 6e 29 20 7b 0d 09 0d |ong refc|on) {...| |00002230| 09 49 41 43 67 6c 6f 62 | 61 6c 73 2e 65 76 65 6e |.IACglob|als.even| |00002240| 74 20 3d 20 65 76 65 6e | 74 3b 0d 09 0d 09 49 41 |t = even|t;....IA| |00002250| 43 67 6c 6f 62 61 6c 73 | 2e 72 65 70 6c 79 20 3d |Cglobals|.reply =| |00002260| 20 72 65 70 6c 79 3b 0d | 09 0d 09 49 41 43 67 6c | reply;.|...IACgl| |00002270| 6f 62 61 6c 73 2e 72 65 | 66 63 6f 6e 20 3d 20 72 |obals.re|fcon = r| |00002280| 65 66 63 6f 6e 3b 0d 09 | 0d 09 72 65 74 75 72 6e |efcon;..|..return| |00002290| 20 28 49 41 43 64 72 69 | 76 65 66 69 6c 65 6c 69 | (IACdri|vefileli| |000022a0| 73 74 20 28 26 6f 70 65 | 6e 66 69 6c 65 73 70 65 |st (&ope|nfilespe| |000022b0| 63 29 29 3b 0d 09 7d 20 | 2f 2a 68 61 6e 64 6c 65 |c));..} |/*handle| |000022c0| 6f 70 65 6e 2a 2f 0d 09 | 0d 09 09 0d 73 74 61 74 |open*/..|....stat| |000022d0| 69 63 20 70 61 73 63 61 | 6c 20 4f 53 45 72 72 20 |ic pasca|l OSErr | |000022e0| 68 61 6e 64 6c 65 70 72 | 69 6e 74 20 28 65 76 65 |handlepr|int (eve| |000022f0| 6e 74 2c 20 72 65 70 6c | 79 2c 20 72 65 66 63 6f |nt, repl|y, refco| |00002300| 6e 29 20 41 45 44 65 73 | 63 4c 69 73 74 20 2a 65 |n) AEDes|cList *e| |00002310| 76 65 6e 74 2c 20 2a 72 | 65 70 6c 79 3b 20 6c 6f |vent, *r|eply; lo| |00002320| 6e 67 20 72 65 66 63 6f | 6e 3b 20 7b 0d 09 0d 09 |ng refco|n; {....| |00002330| 49 41 43 67 6c 6f 62 61 | 6c 73 2e 65 76 65 6e 74 |IACgloba|ls.event| |00002340| 20 3d 20 65 76 65 6e 74 | 3b 0d 09 0d 09 49 41 43 | = event|;....IAC| |00002350| 67 6c 6f 62 61 6c 73 2e | 72 65 70 6c 79 20 3d 20 |globals.|reply = | |00002360| 72 65 70 6c 79 3b 0d 09 | 0d 09 49 41 43 67 6c 6f |reply;..|..IACglo| |00002370| 62 61 6c 73 2e 72 65 66 | 63 6f 6e 20 3d 20 72 65 |bals.ref|con = re| |00002380| 66 63 6f 6e 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |fcon;...|.return | |00002390| 28 49 41 43 64 72 69 76 | 65 66 69 6c 65 6c 69 73 |(IACdriv|efilelis| |000023a0| 74 20 28 26 70 72 69 6e | 74 66 69 6c 65 73 70 65 |t (&prin|tfilespe| |000023b0| 63 29 29 3b 0d 09 7d 20 | 2f 2a 68 61 6e 64 6c 65 |c));..} |/*handle| |000023c0| 70 72 69 6e 74 2a 2f 0d | 09 0d 09 09 0d 73 74 61 |print*/.|.....sta| |000023d0| 74 69 63 20 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |tic pasc|al OSErr| |000023e0| 20 73 65 74 6d 65 73 73 | 61 67 65 76 65 72 62 20 | setmess|ageverb | |000023f0| 28 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 65 76 65 |(AppleEv|ent *eve| |00002400| 6e 74 2c 20 41 70 70 6c | 65 45 76 65 6e 74 20 2a |nt, Appl|eEvent *| |00002410| 72 65 70 6c 79 2c 20 6c | 6f 6e 67 20 72 65 66 63 |reply, l|ong refc| |00002420| 6f 6e 29 20 7b 0d 0d 09 | 53 74 72 32 35 35 20 73 |on) {...|Str255 s| |00002430| 3b 0d 09 0d 09 69 66 20 | 28 53 68 61 72 65 64 53 |;....if |(SharedS| |00002440| 63 72 69 70 74 43 61 6e | 63 65 6c 6c 65 64 20 28 |criptCan|celled (| |00002450| 65 76 65 6e 74 2c 20 72 | 65 70 6c 79 29 29 20 2f |event, r|eply)) /| |00002460| 2a 53 65 65 20 53 74 65 | 70 20 23 35 2a 2f 0d 09 |*See Ste|p #5*/..| |00002470| 09 72 65 74 75 72 6e 20 | 28 6e 6f 45 72 72 29 3b |.return |(noErr);| |00002480| 0d 09 09 0d 09 49 41 43 | 67 6c 6f 62 61 6c 73 2e |.....IAC|globals.| |00002490| 65 76 65 6e 74 20 3d 20 | 65 76 65 6e 74 3b 0d 09 |event = |event;..| |000024a0| 0d 09 49 41 43 67 6c 6f | 62 61 6c 73 2e 72 65 70 |..IACglo|bals.rep| |000024b0| 6c 79 20 3d 20 72 65 70 | 6c 79 3b 0d 09 0d 09 69 |ly = rep|ly;....i| |000024c0| 66 20 28 21 49 41 43 67 | 65 74 73 74 72 69 6e 67 |f (!IACg|etstring| |000024d0| 70 61 72 61 6d 20 28 28 | 4f 53 54 79 70 65 29 20 |param ((|OSType) | |000024e0| 6b 65 79 44 69 72 65 63 | 74 4f 62 6a 65 63 74 2c |keyDirec|tObject,| |000024f0| 20 73 29 29 0d 09 09 72 | 65 74 75 72 6e 20 28 66 | s))...r|eturn (f| |00002500| 61 6c 73 65 29 3b 0d 09 | 0d 09 49 41 43 72 65 74 |alse);..|..IACret| |00002510| 75 72 6e 62 6f 6f 6c 65 | 61 6e 20 28 73 65 74 77 |urnboole|an (setw| |00002520| 69 6e 64 6f 77 6d 65 73 | 73 61 67 65 20 28 73 29 |indowmes|sage (s)| |00002530| 29 3b 0d 09 0d 09 72 65 | 74 75 72 6e 20 28 6e 6f |);....re|turn (no| |00002540| 45 72 72 29 3b 0d 09 7d | 20 2f 2a 73 65 74 6d 65 |Err);..}| /*setme| |00002550| 73 73 61 67 65 76 65 72 | 62 2a 2f 0d 09 0d 0d 76 |ssagever|b*/....v| |00002560| 6f 69 64 20 6d 61 69 6e | 20 28 76 6f 69 64 29 20 |oid main| (void) | |00002570| 7b 0d 09 0d 09 69 6e 69 | 74 6d 61 63 69 6e 74 6f |{....ini|tmacinto| |00002580| 73 68 20 28 29 3b 0d 09 | 0d 09 69 66 20 28 21 49 |sh ();..|..if (!I| |00002590| 6e 69 74 53 68 61 72 65 | 64 4d 65 6e 75 73 20 28 |nitShare|dMenus (| |000025a0| 29 29 20 2f 2a 53 65 65 | 20 53 74 65 70 20 23 31 |)) /*See| Step #1| |000025b0| 2a 2f 0d 09 09 67 6f 74 | 6f 20 65 72 72 6f 72 3b |*/...got|o error;| |000025c0| 0d 09 0d 09 69 66 20 28 | 21 49 41 43 69 6e 73 74 |....if (|!IACinst| |000025d0| 61 6c 6c 68 61 6e 64 6c | 65 72 20 28 27 54 45 53 |allhandl|er ('TES| |000025e0| 54 27 2c 20 27 73 6d 73 | 67 27 2c 20 28 50 72 6f |T', 'sms|g', (Pro| |000025f0| 63 50 74 72 29 20 73 65 | 74 6d 65 73 73 61 67 65 |cPtr) se|tmessage| |00002600| 76 65 72 62 29 29 0d 09 | 09 67 6f 74 6f 20 65 72 |verb))..|.goto er| |00002610| 72 6f 72 3b 0d 09 0d 09 | 69 66 20 28 21 49 41 43 |ror;....|if (!IAC| |00002620| 69 6e 73 74 61 6c 6c 68 | 61 6e 64 6c 65 72 20 28 |installh|andler (| |00002630| 6b 43 6f 72 65 45 76 65 | 6e 74 43 6c 61 73 73 2c |kCoreEve|ntClass,| |00002640| 20 6b 41 45 4f 70 65 6e | 41 70 70 6c 69 63 61 74 | kAEOpen|Applicat| |00002650| 69 6f 6e 2c 20 28 50 72 | 6f 63 50 74 72 29 20 26 |ion, (Pr|ocPtr) &| |00002660| 68 61 6e 64 6c 65 6f 70 | 65 6e 61 70 70 29 29 0d |handleop|enapp)).| |00002670| 09 09 67 6f 74 6f 20 65 | 72 72 6f 72 3b 0d 09 0d |..goto e|rror;...| |00002680| 09 69 66 20 28 21 49 41 | 43 69 6e 73 74 61 6c 6c |.if (!IA|Cinstall| |00002690| 68 61 6e 64 6c 65 72 20 | 28 6b 43 6f 72 65 45 76 |handler |(kCoreEv| |000026a0| 65 6e 74 43 6c 61 73 73 | 2c 20 6b 41 45 4f 70 65 |entClass|, kAEOpe| |000026b0| 6e 44 6f 63 75 6d 65 6e | 74 73 2c 20 28 50 72 6f |nDocumen|ts, (Pro| |000026c0| 63 50 74 72 29 20 26 68 | 61 6e 64 6c 65 6f 70 65 |cPtr) &h|andleope| |000026d0| 6e 29 29 0d 09 09 67 6f | 74 6f 20 65 72 72 6f 72 |n))...go|to error| |000026e0| 3b 0d 09 0d 09 69 66 20 | 28 21 49 41 43 69 6e 73 |;....if |(!IACins| |000026f0| 74 61 6c 6c 68 61 6e 64 | 6c 65 72 20 28 6b 43 6f |tallhand|ler (kCo| |00002700| 72 65 45 76 65 6e 74 43 | 6c 61 73 73 2c 20 6b 41 |reEventC|lass, kA| |00002710| 45 50 72 69 6e 74 44 6f | 63 75 6d 65 6e 74 73 2c |EPrintDo|cuments,| |00002720| 20 28 50 72 6f 63 50 74 | 72 29 20 26 68 61 6e 64 | (ProcPt|r) &hand| |00002730| 6c 65 70 72 69 6e 74 29 | 29 0d 09 09 67 6f 74 6f |leprint)|)...goto| |00002740| 20 65 72 72 6f 72 3b 0d | 09 0d 09 69 66 20 28 21 | error;.|...if (!| |00002750| 49 41 43 69 6e 73 74 61 | 6c 6c 68 61 6e 64 6c 65 |IACinsta|llhandle| |00002760| 72 20 28 6b 43 6f 72 65 | 45 76 65 6e 74 43 6c 61 |r (kCore|EventCla| |00002770| 73 73 2c 20 6b 41 45 51 | 75 69 74 41 70 70 6c 69 |ss, kAEQ|uitAppli| |00002780| 63 61 74 69 6f 6e 2c 20 | 28 50 72 6f 63 50 74 72 |cation, |(ProcPtr| |00002790| 29 20 26 68 61 6e 64 6c | 65 71 75 69 74 29 29 0d |) &handl|equit)).| |000027a0| 09 09 67 6f 74 6f 20 65 | 72 72 6f 72 3b 0d 0d 09 |..goto e|rror;...| |000027b0| 69 6e 69 74 6d 65 6e 75 | 73 20 28 29 3b 0d 09 0d |initmenu|s ();...| |000027c0| 09 69 6e 69 74 6d 61 69 | 6e 77 69 6e 64 6f 77 20 |.initmai|nwindow | |000027d0| 28 29 3b 0d 09 0d 09 6d | 61 69 6e 65 76 65 6e 74 |();....m|ainevent| |000027e0| 6c 6f 6f 70 20 28 29 3b | 0d 09 09 0d 09 45 78 69 |loop ();|.....Exi| |000027f0| 74 54 6f 53 68 65 6c 6c | 20 28 29 3b 0d 09 0d 09 |tToShell| ();....| |00002800| 65 72 72 6f 72 3a 0d 09 | 0d 09 41 6c 65 72 74 20 |error:..|..Alert | |00002810| 28 32 36 31 2c 20 6e 69 | 6c 29 3b 20 2f 2a 74 68 |(261, ni|l); /*th| |00002820| 69 73 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 72 |is appli|cation r| |00002830| 65 71 75 69 72 65 73 20 | 73 79 73 74 65 6d 20 37 |equires |system 7| |00002840| 2e 30 20 6f 72 20 68 69 | 67 68 65 72 2a 2f 0d 09 |.0 or hi|gher*/..| |00002850| 09 0d 09 45 78 69 74 54 | 6f 53 68 65 6c 6c 20 28 |...ExitT|oShell (| |00002860| 29 3b 0d 09 7d 20 2f 2a | 6d 61 69 6e 2a 2f 0d 0d |);..} /*|main*/..| |00002870| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002880| 00 00 01 00 00 00 01 36 | 00 00 00 36 00 00 00 1e |.......6|...6....| |00002890| 48 20 07 72 20 08 20 0c | 72 c0 72 58 44 49 70 72 |H .r . .|r.rXDIpr| |000028a0| 33 20 0b 01 04 0c 68 4f | 6b 01 01 1a 55 7a 5f 20 |3 ....hO|k...Uz_ | |000028b0| 06 6d 61 69 6e 2e 63 b4 | 02 00 00 00 50 61 72 74 |.main.c.|....Part| |000028c0| 53 49 54 78 00 00 00 00 | 00 00 00 00 00 01 81 b9 |SITx....|........| |000028d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......| |000028e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000028f0| 00 00 a9 81 44 bd 00 00 | 00 00 00 00 01 54 0c 5b |....D...|.....T.[| |00002900| c0 5b 58 44 01 fc 78 20 | 0d 5b 33 60 52 50 01 2a |.[XD..x |.[3`RP.*| |00002910| 2a 68 4f 01 60 36 32 01 | fa 8e 20 04 01 01 92 3d |*hO.`62.|.. ....=| |00002920| 01 60 1a 32 01 fa d4 20 | 04 01 04 64 3d 96 73 84 |.`.2... |...d=.s.| |00002930| 01 ff d4 3c 1c 00 00 48 | e7 00 18 26 6e 00 10 28 |...<...H|...&n..(| |00002940| 6e 00 08 2f 0b 2f 2e 00 | 0c 2f 0c 4e ba 01 f6 9e |n.././..|./.N....| |00002950| 14 20 53 54 93 22 54 33 | 50 a2 7f 39 a8 29 5b 24 |. ST."T3|P..9.)[$| |00002960| 35 15 2f 0b 2f 2e 00 0c | 2f 0c 4e ba 02 f6 66 20 |5././...|/.N...f | |00002970| 13 7a 5b 01 58 ae 5b f4 | 12 22 54 23 50 a2 59 5b |.z[.X.[.|."T#P.Y[| |00002980| 00 00 00 2f 02 00 80 00 | 00 00 06 32 2e 30 72 63 |.../....|...2.0rc| |00002990| 31 21 32 2e 30 72 63 31 | 3b 20 a9 20 31 39 39 32 |1!2.0rc1|; . 1992| |000029a0| 2c 20 55 73 65 72 4c 61 | 6e 64 20 53 6f 66 74 77 |, UserLa|nd Softw| |000029b0| 61 72 65 65 72 65 00 00 | 01 00 00 00 01 36 00 00 |areere..|.....6..| |000029c0| 00 36 00 00 00 1e 00 ed | cb 18 0d 98 00 00 00 1c |.6......|........| |000029d0| 00 1e ff ff 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000029f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+