home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / povsrc.sit / MACHINE / MAC.SIT / textEditor.c < prev   
MacBinary  |  1992-05-05  |  17.1 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: textEditor.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue May 5 14:59:01 1992, modified Tue May 5 14:59:01 1992, creator Think C, type ASCII, 16446 bytes "textEditor.c" , at 0x40be 796 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 74 65 78 74 45 64 | 69 74 6f 72 2e 63 00 00 |..textEd|itor.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 40 3e 00 | 00 03 1c a6 2c 8b 75 a6 |.....@>.|....,.u.|
|00000060| 2c 8b 75 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |,.u.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 87 5f 00 00 |........|....._..|
|00000080| 2f 2f 20 4d 50 57 20 43 | 6f 6e 76 65 72 73 69 6f |// MPW C|onversio|
|00000090| 6e 20 33 2f 31 37 2f 39 | 32 20 20 45 64 75 61 72 |n 3/17/9|2 Eduar|
|000000a0| 64 20 5b 65 73 70 5d 20 | 53 63 68 77 61 6e 0d 2f |d [esp] |Schwan./|
|000000b0| 2f 20 41 64 64 65 64 20 | 4d 50 57 20 69 6e 63 6c |/ Added |MPW incl|
|000000c0| 75 64 65 20 68 65 61 64 | 65 72 73 2c 20 63 68 61 |ude head|ers, cha|
|000000d0| 6e 67 65 64 20 41 4c 4c | 20 74 68 65 20 6e 65 63 |nged ALL| the nec|
|000000e0| 65 73 73 61 72 79 20 27 | 69 6e 74 27 73 0d 2f 2f |essary '|int's.//|
|000000f0| 20 74 6f 20 27 73 68 6f | 72 74 27 73 20 28 66 72 | to 'sho|rt's (fr|
|00000100| 65 66 73 20 61 6e 64 20 | 76 72 65 66 73 29 2c 20 |efs and |vrefs), |
|00000110| 70 75 6c 6c 65 64 20 6f | 75 74 20 74 68 65 20 70 |pulled o|ut the p|
|00000120| 72 6f 74 6f 74 79 70 65 | 73 0d 2f 2f 20 69 6e 74 |rototype|s.// int|
|00000130| 6f 20 61 20 73 65 70 61 | 72 61 74 65 20 54 65 78 |o a sepa|rate Tex|
|00000140| 74 45 64 69 74 6f 72 2e | 68 20 66 69 6c 65 20 66 |tEditor.|h file f|
|00000150| 6f 72 20 50 4f 56 2e 43 | 20 74 6f 20 73 65 65 2c |or POV.C| to see,|
|00000160| 20 61 64 64 65 64 0d 2f | 2f 20 6e 65 65 64 65 64 | added./|/ needed|
|00000170| 20 74 79 70 65 20 63 61 | 73 74 73 2c 20 61 64 64 | type ca|sts, add|
|00000180| 65 64 20 22 71 64 2e 22 | 20 73 75 66 66 69 78 20 |ed "qd."| suffix |
|00000190| 6f 6e 20 71 64 20 67 6c | 6f 62 61 6c 73 2c 20 2e |on qd gl|obals, .|
|000001a0| 2e 0d 2f 2f 09 77 68 65 | 77 2e 2e 20 6c 6f 6f 6b |..//.whe|w.. look|
|000001b0| 73 20 6c 69 6b 65 20 74 | 68 69 73 20 75 73 65 64 |s like t|his used|
|000001c0| 20 74 6f 20 62 65 20 61 | 20 54 68 69 6e 6b 20 43 | to be a| Think C|
|000001d0| 20 34 2e 30 20 74 68 69 | 6e 67 69 65 0d 2f 2f 20 | 4.0 thi|ngie.// |
|000001e0| 20 28 49 74 20 77 61 73 | 2e 20 20 6a 6c 6e 29 0d | (It was|. jln).|
|000001f0| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000240| 0d 43 6f 70 79 72 69 67 | 68 74 20 31 39 39 32 20 |.Copyrig|ht 1992 |
|00000250| 50 4f 56 2d 54 65 61 6d | 2e 0d 09 54 68 69 73 20 |POV-Team|...This |
|00000260| 73 6f 75 72 63 65 20 63 | 6f 64 65 20 69 73 20 64 |source c|ode is d|
|00000270| 69 73 74 72 69 62 75 74 | 65 64 20 65 78 63 6c 75 |istribut|ed exclu|
|00000280| 73 69 76 65 6c 79 20 77 | 69 74 68 20 50 4f 56 2c |sively w|ith POV,|
|00000290| 20 61 6e 64 20 69 73 20 | 73 75 62 6a 65 63 74 20 | and is |subject |
|000002a0| 74 6f 0d 09 74 68 65 20 | 73 61 6d 65 20 64 69 73 |to..the |same dis|
|000002b0| 74 72 69 62 75 74 69 6f | 6e 20 72 65 73 74 72 69 |tributio|n restri|
|000002c0| 63 74 69 6f 6e 73 20 61 | 73 20 74 68 65 20 72 65 |ctions a|s the re|
|000002d0| 73 74 20 6f 66 20 74 68 | 65 20 73 6f 75 72 63 65 |st of th|e source|
|000002e0| 20 63 6f 64 65 2e 0d 0d | 2a 20 20 43 6f 70 79 69 | code...|* Copyi|
|000002f0| 6e 67 2c 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |ng, dist|ribution|
|00000300| 20 61 6e 64 20 6c 65 67 | 61 6c 20 69 6e 66 6f 20 | and leg|al info |
|00000310| 69 73 20 69 6e 20 74 68 | 65 20 66 69 6c 65 20 70 |is in th|e file p|
|00000320| 6f 76 6c 65 67 61 6c 2e | 64 6f 63 20 77 68 69 63 |ovlegal.|doc whic|
|00000330| 68 0d 2a 20 20 73 68 6f | 75 6c 64 20 62 65 20 64 |h.* sho|uld be d|
|00000340| 69 73 74 72 69 62 75 74 | 65 64 20 77 69 74 68 20 |istribut|ed with |
|00000350| 74 68 69 73 20 66 69 6c | 65 2e 20 49 66 20 70 6f |this fil|e. If po|
|00000360| 76 6c 65 67 61 6c 2e 64 | 6f 63 20 69 73 20 6e 6f |vlegal.d|oc is no|
|00000370| 74 20 61 76 61 69 6c 61 | 62 6c 65 0d 2a 20 20 6f |t availa|ble.* o|
|00000380| 72 20 66 6f 72 20 6d 6f | 72 65 20 69 6e 66 6f 72 |r for mo|re infor|
|00000390| 6d 61 74 69 6f 6e 20 70 | 6c 65 61 73 65 20 63 6f |mation p|lease co|
|000003a0| 6e 74 61 63 74 3a 0d 2a | 0d 2a 20 20 20 20 20 20 |ntact:.*|.* |
|000003b0| 20 44 72 65 77 20 57 65 | 6c 6c 73 20 5b 50 4f 56 | Drew We|lls [POV|
|000003c0| 2d 54 65 61 6d 20 4c 65 | 61 64 65 72 5d 20 0d 2a |-Team Le|ader] .*|
|000003d0| 20 20 20 20 20 20 20 43 | 49 53 3a 20 37 33 37 36 | C|IS: 7376|
|000003e0| 37 2c 31 32 34 34 20 20 | 49 6e 74 65 72 6e 65 74 |7,1244 |Internet|
|000003f0| 3a 20 37 33 37 36 37 2e | 31 32 34 34 40 63 6f 6d |: 73767.|1244@com|
|00000400| 70 75 73 65 72 76 65 2e | 63 6f 6d 0d 2a 20 20 20 |puserve.|com.* |
|00000410| 20 20 20 20 50 68 6f 6e | 65 3a 20 28 32 31 33 29 | Phon|e: (213)|
|00000420| 20 32 35 34 2d 34 30 34 | 31 0d 2a 20 2d 2d 2d 2d | 254-404|1.* ----|
|00000430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000470| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 23 69 6e 63 |--------|*/..#inc|
|00000480| 6c 75 64 65 20 3c 74 79 | 70 65 73 2e 68 3e 09 09 |lude <ty|pes.h>..|
|00000490| 2f 2f 20 62 61 73 69 63 | 20 74 79 70 65 73 0d 23 |// basic| types.#|
|000004a0| 69 6e 63 6c 75 64 65 20 | 3c 64 65 73 6b 2e 68 3e |include |<desk.h>|
|000004b0| 09 09 2f 2f 20 53 79 73 | 74 65 6d 45 64 69 74 2c |..// Sys|temEdit,|
|000004c0| 20 65 74 63 2e 0d 23 69 | 6e 63 6c 75 64 65 20 3c | etc..#i|nclude <|
|000004d0| 65 72 72 6f 72 73 2e 68 | 3e 09 09 2f 2f 20 6e 6f |errors.h|>..// no|
|000004e0| 45 72 72 2c 20 65 74 63 | 2e 0d 23 69 6e 63 6c 75 |Err, etc|..#inclu|
|000004f0| 64 65 20 3c 66 69 6c 65 | 73 2e 68 3e 09 09 2f 2f |de <file|s.h>..//|
|00000500| 20 46 53 4f 70 65 6e 2c | 20 65 74 63 2e 20 0d 23 | FSOpen,| etc. .#|
|00000510| 69 6e 63 6c 75 64 65 20 | 3c 66 6f 6e 74 73 2e 68 |include |<fonts.h|
|00000520| 3e 09 09 2f 2f 20 6d 6f | 6e 61 63 6f 2c 20 65 74 |>..// mo|naco, et|
|00000530| 63 2e 20 0d 23 69 6e 63 | 6c 75 64 65 20 3c 6d 65 |c. .#inc|lude <me|
|00000540| 6d 6f 72 79 2e 68 3e 09 | 09 2f 2f 20 4e 65 77 48 |mory.h>.|.// NewH|
|00000550| 61 6e 64 6c 65 2c 20 65 | 74 63 2e 20 0d 23 69 6e |andle, e|tc. .#in|
|00000560| 63 6c 75 64 65 20 3c 6d | 65 6e 75 73 2e 68 3e 09 |clude <m|enus.h>.|
|00000570| 09 2f 2f 20 4d 65 6e 75 | 48 61 6e 64 6c 65 2c 20 |.// Menu|Handle, |
|00000580| 65 74 63 2e 20 0d 23 69 | 6e 63 6c 75 64 65 20 3c |etc. .#i|nclude <|
|00000590| 70 61 63 6b 61 67 65 73 | 2e 68 3e 09 2f 2f 20 53 |packages|.h>.// S|
|000005a0| 46 47 65 74 46 69 6c 65 | 2c 20 65 74 63 2e 20 0d |FGetFile|, etc. .|
|000005b0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 63 72 61 70 2e |#include| <scrap.|
|000005c0| 68 3e 09 09 2f 2f 20 5a | 65 72 6f 53 63 72 61 70 |h>..// Z|eroScrap|
|000005d0| 2c 20 65 74 63 2e 20 0d | 23 69 6e 63 6c 75 64 65 |, etc. .|#include|
|000005e0| 20 3c 74 6f 6f 6c 75 74 | 69 6c 73 2e 68 3e 09 2f | <toolut|ils.h>./|
|000005f0| 2f 20 77 61 74 63 68 43 | 75 72 73 6f 72 2c 20 65 |/ watchC|ursor, e|
|00000600| 74 63 2e 20 0d 23 69 6e | 63 6c 75 64 65 20 3c 77 |tc. .#in|clude <w|
|00000610| 69 6e 64 6f 77 73 2e 68 | 3e 09 2f 2f 20 53 69 7a |indows.h|>.// Siz|
|00000620| 65 57 69 6e 64 6f 77 2c | 20 65 74 63 2e 20 0d 23 |eWindow,| etc. .#|
|00000630| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|00000640| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 50 72 69 6e |>.#inclu|de <Prin|
|00000650| 74 54 72 61 70 73 2e 68 | 3e 0d 0d 23 69 6e 63 6c |tTraps.h|>..#incl|
|00000660| 75 64 65 20 22 63 6f 6e | 66 69 67 2e 68 22 0d 23 |ude "con|fig.h".#|
|00000670| 69 6e 63 6c 75 64 65 20 | 22 50 4f 56 4d 61 63 2e |include |"POVMac.|
|00000680| 68 22 0d 0d 65 78 74 65 | 72 6e 20 70 72 65 66 73 |h"..exte|rn prefs|
|00000690| 5f 70 74 72 5f 74 09 66 | 69 6c 65 5f 73 65 74 74 |_ptr_t.f|ile_sett|
|000006a0| 69 6e 67 73 3b 09 2f 2f | 20 63 68 61 6e 67 65 64 |ings;.//| changed|
|000006b0| 20 5b 65 73 70 5d 0d 65 | 78 74 65 72 6e 20 69 6e | [esp].e|xtern in|
|000006c0| 74 09 50 4f 56 5f 72 75 | 6e 6e 69 6e 67 3b 09 2f |t.POV_ru|nning;./|
|000006d0| 2a 20 55 73 65 64 20 74 | 6f 20 64 65 74 65 72 6d |* Used t|o determ|
|000006e0| 69 6e 65 20 74 68 65 20 | 6d 65 6e 75 20 73 74 61 |ine the |menu sta|
|000006f0| 74 65 73 2e 20 2a 2f 0d | 0d 57 69 6e 64 6f 77 52 |tes. */.|.WindowR|
|00000700| 65 63 6f 72 64 09 77 52 | 65 63 6f 72 64 3b 0d 57 |ecord.wR|ecord;.W|
|00000710| 69 6e 64 6f 77 50 74 72 | 09 09 54 65 78 74 45 64 |indowPtr|..TextEd|
|00000720| 69 74 57 69 6e 64 6f 77 | 3b 0d 54 45 48 61 6e 64 |itWindow|;.TEHand|
|00000730| 6c 65 09 09 54 45 48 3b | 0d 69 6e 74 09 09 09 09 |le..TEH;|.int....|
|00000740| 6c 69 6e 65 73 49 6e 46 | 6f 6c 64 65 72 3b 0d 52 |linesInF|older;.R|
|00000750| 65 63 74 09 09 09 64 72 | 61 67 52 65 63 74 20 3d |ect...dr|agRect =|
|00000760| 20 7b 20 30 2c 20 30 2c | 20 31 30 32 34 2c 20 31 | { 0, 0,| 1024, 1|
|00000770| 30 32 34 20 7d 3b 0d 4d | 65 6e 75 48 61 6e 64 6c |024 };.M|enuHandl|
|00000780| 65 09 09 6d 79 45 64 69 | 74 4d 65 6e 75 73 5b 33 |e..myEdi|tMenus[3|
|00000790| 5d 3b 0d 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |];.Contr|olHandle|
|000007a0| 20 09 76 53 63 72 6f 6c | 6c 3b 0d 43 75 72 73 6f | .vScrol|l;.Curso|
|000007b0| 72 09 09 09 65 64 69 74 | 43 75 72 73 6f 72 3b 0d |r...edit|Cursor;.|
|000007c0| 43 75 72 73 6f 72 09 09 | 09 77 61 69 74 43 75 72 |Cursor..|.waitCur|
|000007d0| 73 6f 72 3b 0d 63 68 61 | 72 09 09 09 64 69 72 74 |sor;.cha|r...dirt|
|000007e0| 79 3b 0d 63 68 61 72 09 | 09 09 77 69 6e 64 6f 77 |y;.char.|..window|
|000007f0| 5f 76 69 73 69 62 6c 65 | 3b 0d 0d 0d 53 74 72 32 |_visible|;...Str2|
|00000800| 35 35 20 09 09 74 68 65 | 46 69 6c 65 4e 61 6d 65 |55 ..the|FileName|
|00000810| 3b 0d 73 68 6f 72 74 09 | 09 09 74 68 65 56 52 65 |;.short.|..theVRe|
|00000820| 66 4e 75 6d 3b 0d 0d 0d | 69 6e 74 20 53 65 74 55 |fNum;...|int SetU|
|00000830| 70 46 69 6c 65 73 28 76 | 6f 69 64 29 0d 7b 0d 09 |pFiles(v|oid).{..|
|00000840| 70 53 74 72 43 6f 70 79 | 28 22 5c 70 22 2c 20 74 |pStrCopy|("\p", t|
|00000850| 68 65 46 69 6c 65 4e 61 | 6d 65 29 3b 0d 09 74 68 |heFileNa|me);..th|
|00000860| 65 56 52 65 66 4e 75 6d | 20 3d 20 30 3b 0d 09 72 |eVRefNum| = 0;..r|
|00000870| 65 74 75 72 6e 20 30 3b | 20 2f 2f 20 73 68 6f 75 |eturn 0;| // shou|
|00000880| 6c 64 20 62 65 20 76 6f | 69 64 20 66 6e 21 3f 0d |ld be vo|id fn!?.|
|00000890| 7d 0d 0d 0d 69 6e 74 20 | 44 6f 46 69 6c 65 20 28 |}...int |DoFile (|
|000008a0| 69 6e 74 20 69 74 65 6d | 29 0d 0d 7b 0d 09 73 68 |int item|)..{..sh|
|000008b0| 6f 72 74 20 09 76 52 65 | 66 2c 20 72 65 66 4e 75 |ort .vRe|f, refNu|
|000008c0| 6d 3b 0d 09 53 74 72 32 | 35 35 09 66 6e 3b 0d 0d |m;..Str2|55.fn;..|
|000008d0| 09 73 77 69 74 63 68 20 | 28 69 74 65 6d 29 20 7b |.switch |(item) {|
|000008e0| 0d 0d 09 09 63 61 73 65 | 20 66 6d 6e 5f 6f 70 65 |....case| fmn_ope|
|000008f0| 6e 3a 0d 09 09 09 48 69 | 64 65 57 69 6e 64 6f 77 |n:....Hi|deWindow|
|00000900| 28 54 65 78 74 45 64 69 | 74 57 69 6e 64 6f 77 29 |(TextEdi|tWindow)|
|00000910| 3b 09 2f 2a 20 67 69 76 | 65 73 20 61 20 73 65 6e |;./* giv|es a sen|
|00000920| 73 65 20 6f 66 20 63 6c | 6f 73 69 6e 67 20 74 68 |se of cl|osing th|
|00000930| 65 20 6f 6c 64 20 66 69 | 6c 65 2e 20 2a 2f 0d 09 |e old fi|le. */..|
|00000940| 09 09 69 66 20 28 4f 6c | 64 46 69 6c 65 28 66 6e |..if (Ol|dFile(fn|
|00000950| 2c 20 26 76 52 65 66 20 | 29 29 0d 09 09 09 09 69 |, &vRef |)).....i|
|00000960| 66 20 28 46 53 4f 70 65 | 6e 28 66 6e 2c 20 76 52 |f (FSOpe|n(fn, vR|
|00000970| 65 66 2c 20 26 72 65 66 | 4e 75 6d 29 3d 3d 6e 6f |ef, &ref|Num)==no|
|00000980| 45 72 72 29 20 7b 0d 09 | 09 09 09 09 69 66 20 28 |Err) {..|....if (|
|00000990| 52 65 61 64 46 69 6c 65 | 28 72 65 66 4e 75 6d 2c |ReadFile|(refNum,|
|000009a0| 20 54 45 48 29 29 20 7b | 0d 09 09 09 09 09 09 70 | TEH)) {|.......p|
|000009b0| 53 74 72 43 6f 70 79 28 | 66 6e 2c 20 74 68 65 46 |StrCopy(|fn, theF|
|000009c0| 69 6c 65 4e 61 6d 65 29 | 3b 0d 09 09 09 09 09 09 |ileName)|;.......|
|000009d0| 74 68 65 56 52 65 66 4e | 75 6d 20 3d 20 76 52 65 |theVRefN|um = vRe|
|000009e0| 66 3b 0d 09 09 09 09 09 | 09 53 65 74 57 54 69 74 |f;......|.SetWTit|
|000009f0| 6c 65 28 54 65 78 74 45 | 64 69 74 57 69 6e 64 6f |le(TextE|ditWindo|
|00000a00| 77 2c 20 74 68 65 46 69 | 6c 65 4e 61 6d 65 29 3b |w, theFi|leName);|
|00000a10| 0d 09 09 09 09 09 09 64 | 69 72 74 79 20 3d 20 30 |.......d|irty = 0|
|00000a20| 3b 0d 09 09 09 09 09 7d | 0d 09 09 09 09 09 69 66 |;......}|......if|
|00000a30| 20 28 46 53 43 6c 6f 73 | 65 28 72 65 66 4e 75 6d | (FSClos|e(refNum|
|00000a40| 29 3d 3d 6e 6f 45 72 72 | 29 20 3b 0d 09 09 09 09 |)==noErr|) ;.....|
|00000a50| 09 53 68 6f 77 57 69 6e | 64 6f 77 28 54 65 78 74 |.ShowWin|dow(Text|
|00000a60| 45 64 69 74 57 69 6e 64 | 6f 77 29 3b 0d 09 09 09 |EditWind|ow);....|
|00000a70| 09 09 77 69 6e 64 6f 77 | 5f 76 69 73 69 62 6c 65 |..window|_visible|
|00000a80| 20 3d 20 54 52 55 45 3b | 0d 09 09 09 09 09 54 45 | = TRUE;|......TE|
|00000a90| 53 65 74 53 65 6c 65 63 | 74 28 30 2c 20 30 2c 20 |SetSelec|t(0, 0, |
|00000aa0| 54 45 48 29 3b 0d 09 09 | 09 09 09 53 68 6f 77 53 |TEH);...|...ShowS|
|00000ab0| 65 6c 65 63 74 28 29 3b | 0d 09 09 09 09 7d 0d 09 |elect();|.....}..|
|00000ac0| 09 09 09 65 6c 73 65 20 | 46 69 6c 65 45 72 72 6f |...else |FileErro|
|00000ad0| 72 28 22 5c 70 45 72 72 | 6f 72 20 6f 70 65 6e 69 |r("\pErr|or openi|
|00000ae0| 6e 67 20 22 2c 20 66 6e | 29 3b 0d 09 09 09 62 72 |ng ", fn|);....br|
|00000af0| 65 61 6b 3b 0d 0d 09 09 | 63 61 73 65 20 66 6d 6e |eak;....|case fmn|
|00000b00| 5f 63 6c 6f 73 65 3a 0d | 09 09 09 44 6f 46 69 6c |_close:.|...DoFil|
|00000b10| 65 28 66 6d 6e 5f 72 65 | 6e 64 65 72 29 3b 09 2f |e(fmn_re|nder);./|
|00000b20| 2f 20 72 65 63 75 72 73 | 65 2e 0d 09 09 09 43 6c |/ recurs|e.....Cl|
|00000b30| 6f 73 65 4d 79 57 69 6e | 64 6f 77 28 29 3b 0d 09 |oseMyWin|dow();..|
|00000b40| 09 09 62 72 65 61 6b 3b | 0d 0d 09 09 63 61 73 65 |..break;|....case|
|00000b50| 20 66 6d 6e 5f 72 65 6e | 64 65 72 3a 0d 09 09 09 | fmn_ren|der:....|
|00000b60| 69 66 20 28 64 69 72 74 | 79 29 20 7b 0d 09 09 09 |if (dirt|y) {....|
|00000b70| 09 50 61 72 61 6d 54 65 | 78 74 28 22 5c 70 53 61 |.ParamTe|xt("\pSa|
|00000b80| 76 65 20 63 68 61 6e 67 | 65 73 20 74 6f 20 d2 22 |ve chang|es to ."|
|00000b90| 2c 0d 09 09 09 09 09 09 | 28 74 68 65 46 69 6c 65 |,.......|(theFile|
|00000ba0| 4e 61 6d 65 5b 30 5d 3d | 3d 30 29 20 3f 20 22 5c |Name[0]=|=0) ? "\|
|00000bb0| 70 55 6e 74 69 74 6c 65 | 64 22 20 3a 20 74 68 65 |pUntitle|d" : the|
|00000bc0| 46 69 6c 65 4e 61 6d 65 | 2c 0d 09 09 09 09 09 09 |FileName|,.......|
|00000bd0| 22 5c 70 d3 3f 22 2c 20 | 22 5c 70 22 29 3b 0d 09 |"\p.?", |"\p");..|
|00000be0| 09 09 09 73 77 69 74 63 | 68 20 28 41 6c 65 72 74 |...switc|h (Alert|
|00000bf0| 28 41 64 76 69 73 65 41 | 6c 65 72 74 2c 20 30 4c |(AdviseA|lert, 0L|
|00000c00| 29 29 20 7b 0d 09 09 09 | 09 63 61 73 65 20 61 61 |)) {....|.case aa|
|00000c10| 53 61 76 65 3a 0d 09 09 | 09 09 09 69 66 20 28 74 |Save:...|...if (t|
|00000c20| 68 65 46 69 6c 65 4e 61 | 6d 65 5b 30 5d 3d 3d 30 |heFileNa|me[0]==0|
|00000c30| 29 20 7b 0d 09 09 09 09 | 09 09 66 6e 5b 30 5d 20 |) {.....|..fn[0] |
|00000c40| 3d 20 30 3b 0d 09 09 09 | 09 09 09 69 66 20 28 21 |= 0;....|...if (!|
|00000c50| 53 61 76 65 41 73 28 66 | 6e 2c 20 26 76 52 65 66 |SaveAs(f|n, &vRef|
|00000c60| 29 29 20 72 65 74 75 72 | 6e 28 30 29 3b 0d 09 09 |)) retur|n(0);...|
|00000c70| 09 09 09 7d 0d 09 09 20 | 09 09 09 65 6c 73 65 20 |...}... |...else |
|00000c80| 69 66 20 28 21 53 61 76 | 65 46 69 6c 65 28 74 68 |if (!Sav|eFile(th|
|00000c90| 65 46 69 6c 65 4e 61 6d | 65 2c 20 74 68 65 56 52 |eFileNam|e, theVR|
|00000ca0| 65 66 4e 75 6d 29 29 20 | 72 65 74 75 72 6e 28 30 |efNum)) |return(0|
|00000cb0| 29 3b 0d 09 09 20 09 09 | 09 62 72 65 61 6b 3b 0d |);... ..|.break;.|
|00000cc0| 09 09 20 09 09 63 61 73 | 65 20 61 61 43 61 6e 63 |.. ..cas|e aaCanc|
|00000cd0| 65 6c 3a 20 72 65 74 75 | 72 6e 28 30 29 3b 0d 09 |el: retu|rn(0);..|
|00000ce0| 09 20 09 09 63 61 73 65 | 20 61 61 44 69 73 63 61 |. ..case| aaDisca|
|00000cf0| 72 64 3a 20 64 69 72 74 | 79 20 3d 20 30 3b 0d 09 |rd: dirt|y = 0;..|
|00000d00| 09 20 09 09 7d 0d 09 09 | 20 09 7d 0d 09 09 09 62 |. ..}...| .}....b|
|00000d10| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 20 66 6d 6e |reak;...|case fmn|
|00000d20| 5f 73 61 76 65 74 65 78 | 74 3a 0d 09 09 09 69 66 |_savetex|t:....if|
|00000d30| 20 28 74 68 65 46 69 6c | 65 4e 61 6d 65 5b 30 5d | (theFil|eName[0]|
|00000d40| 3d 3d 30 29 20 67 6f 74 | 6f 20 73 61 76 65 61 73 |==0) got|o saveas|
|00000d50| 3b 0d 09 09 09 53 61 76 | 65 46 69 6c 65 28 74 68 |;....Sav|eFile(th|
|00000d60| 65 46 69 6c 65 4e 61 6d | 65 2c 20 74 68 65 56 52 |eFileNam|e, theVR|
|00000d70| 65 66 4e 75 6d 29 3b 0d | 09 09 09 62 72 65 61 6b |efNum);.|...break|
|00000d80| 3b 0d 09 09 63 61 73 65 | 20 66 6d 6e 5f 73 61 76 |;...case| fmn_sav|
|00000d90| 65 61 73 3a 0d 09 73 61 | 76 65 61 73 3a 0d 09 09 |eas:..sa|veas:...|
|00000da0| 09 66 6e 5b 30 5d 20 3d | 20 30 3b 0d 09 09 09 69 |.fn[0] =| 0;....i|
|00000db0| 66 20 28 53 61 76 65 41 | 73 28 66 6e 2c 20 26 76 |f (SaveA|s(fn, &v|
|00000dc0| 52 65 66 20 29 29 20 7b | 0d 09 09 09 09 70 53 74 |Ref )) {|.....pSt|
|00000dd0| 72 43 6f 70 79 28 66 6e | 2c 20 74 68 65 46 69 6c |rCopy(fn|, theFil|
|00000de0| 65 4e 61 6d 65 29 3b 0d | 09 09 09 09 74 68 65 56 |eName);.|....theV|
|00000df0| 52 65 66 4e 75 6d 20 3d | 20 76 52 65 66 3b 0d 09 |RefNum =| vRef;..|
|00000e00| 09 09 09 53 65 74 57 54 | 69 74 6c 65 28 54 65 78 |...SetWT|itle(Tex|
|00000e10| 74 45 64 69 74 57 69 6e | 64 6f 77 2c 20 74 68 65 |tEditWin|dow, the|
|00000e20| 46 69 6c 65 4e 61 6d 65 | 29 3b 0d 09 09 09 7d 0d |FileName|);....}.|
|00000e30| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 63 61 73 65 |...break|;...case|
|00000e40| 20 66 6d 52 65 76 65 72 | 74 3a 0d 09 09 09 50 61 | fmRever|t:....Pa|
|00000e50| 72 61 6d 54 65 78 74 28 | 22 5c 70 52 65 76 65 72 |ramText(|"\pRever|
|00000e60| 74 20 74 6f 20 6c 61 73 | 74 20 73 61 76 65 64 20 |t to las|t saved |
|00000e70| 76 65 72 73 69 6f 6e 20 | 6f 66 20 d2 22 2c 0d 09 |version |of .",..|
|00000e80| 09 09 09 09 74 68 65 46 | 69 6c 65 4e 61 6d 65 2c |....theF|ileName,|
|00000e90| 20 22 5c 70 d3 3f 22 2c | 20 22 5c 70 22 29 3b 0d | "\p.?",| "\p");.|
|00000ea0| 09 09 09 73 77 69 74 63 | 68 20 28 41 6c 65 72 74 |...switc|h (Alert|
|00000eb0| 28 41 64 76 69 73 65 41 | 6c 65 72 74 2c 20 30 4c |(AdviseA|lert, 0L|
|00000ec0| 29 29 20 7b 0d 09 09 09 | 63 61 73 65 20 61 61 53 |)) {....|case aaS|
|00000ed0| 61 76 65 3a 0d 09 09 09 | 09 48 69 64 65 50 65 6e |ave:....|.HidePen|
|00000ee0| 28 29 3b 0d 09 09 09 09 | 54 45 53 65 74 53 65 6c |();.....|TESetSel|
|00000ef0| 65 63 74 28 30 2c 20 28 | 2a 2a 54 45 48 29 2e 74 |ect(0, (|**TEH).t|
|00000f00| 65 4c 65 6e 67 74 68 2c | 20 54 45 48 29 3b 0d 09 |eLength,| TEH);..|
|00000f10| 09 09 09 53 68 6f 77 50 | 65 6e 28 29 3b 0d 09 09 |...ShowP|en();...|
|00000f20| 09 09 54 45 44 65 6c 65 | 74 65 28 54 45 48 29 3b |..TEDele|te(TEH);|
|00000f30| 0d 09 09 09 09 69 66 20 | 28 28 74 68 65 46 69 6c |.....if |((theFil|
|00000f40| 65 4e 61 6d 65 5b 30 5d | 21 3d 30 29 20 26 26 0d |eName[0]|!=0) &&.|
|00000f50| 09 09 09 09 09 28 46 53 | 4f 70 65 6e 28 74 68 65 |.....(FS|Open(the|
|00000f60| 46 69 6c 65 4e 61 6d 65 | 2c 20 74 68 65 56 52 65 |FileName|, theVRe|
|00000f70| 66 4e 75 6d 2c 20 26 72 | 65 66 4e 75 6d 29 3d 3d |fNum, &r|efNum)==|
|00000f80| 6e 6f 45 72 72 29 29 20 | 7b 0d 09 09 09 09 09 64 |noErr)) |{......d|
|00000f90| 69 72 74 79 20 3d 20 21 | 52 65 61 64 46 69 6c 65 |irty = !|ReadFile|
|00000fa0| 28 72 65 66 4e 75 6d 2c | 20 54 45 48 29 3b 20 0d |(refNum,| TEH); .|
|00000fb0| 09 09 09 09 09 69 66 20 | 28 46 53 43 6c 6f 73 65 |.....if |(FSClose|
|00000fc0| 28 72 65 66 4e 75 6d 29 | 3d 3d 6e 6f 45 72 72 29 |(refNum)|==noErr)|
|00000fd0| 20 3b 0d 09 09 09 09 7d | 0d 09 09 09 09 53 68 6f | ;.....}|.....Sho|
|00000fe0| 77 57 69 6e 64 6f 77 28 | 54 65 78 74 45 64 69 74 |wWindow(|TextEdit|
|00000ff0| 57 69 6e 64 6f 77 29 3b | 0d 09 09 09 09 77 69 6e |Window);|.....win|
|00001000| 64 6f 77 5f 76 69 73 69 | 62 6c 65 20 3d 20 54 52 |dow_visi|ble = TR|
|00001010| 55 45 3b 0d 09 09 09 09 | 55 70 64 61 74 65 57 69 |UE;.....|UpdateWi|
|00001020| 6e 64 6f 77 28 54 65 78 | 74 45 64 69 74 57 69 6e |ndow(Tex|tEditWin|
|00001030| 64 6f 77 29 3b 0d 09 20 | 09 09 63 61 73 65 20 61 |dow);.. |..case a|
|00001040| 61 43 61 6e 63 65 6c 3a | 0d 09 20 09 09 63 61 73 |aCancel:|.. ..cas|
|00001050| 65 20 61 61 44 69 73 63 | 61 72 64 3a 20 72 65 74 |e aaDisc|ard: ret|
|00001060| 75 72 6e 28 30 29 3b 3b | 0d 09 20 09 09 7d 0d 09 |urn(0);;|.. ..}..|
|00001070| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00001080| 65 20 66 6d 50 61 67 65 | 53 65 74 55 70 3a 0d 09 |e fmPage|SetUp:..|
|00001090| 09 09 44 6f 50 61 67 65 | 53 65 74 55 70 28 29 3b |..DoPage|SetUp();|
|000010a0| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|000010b0| 65 20 66 6d 50 72 69 6e | 74 3a 0d 09 09 09 50 72 |e fmPrin|t:....Pr|
|000010c0| 69 6e 74 54 65 78 74 28 | 20 28 2a 2a 54 45 48 29 |intText(| (**TEH)|
|000010d0| 2e 68 54 65 78 74 2c 20 | 28 6c 6f 6e 67 29 28 2a |.hText, |(long)(*|
|000010e0| 2a 54 45 48 29 2e 74 65 | 4c 65 6e 67 74 68 2c 20 |*TEH).te|Length, |
|000010f0| 28 47 72 61 66 50 74 72 | 29 54 65 78 74 45 64 69 |(GrafPtr|)TextEdi|
|00001100| 74 57 69 6e 64 6f 77 2c | 0d 09 09 09 09 09 09 09 |tWindow,|........|
|00001110| 53 74 72 69 6e 67 57 69 | 64 74 68 28 22 5c 70 6d |StringWi|dth("\pm|
|00001120| 6d 6d 6d 22 29 29 3b 0d | 09 09 09 62 72 65 61 6b |mmm"));.|...break|
|00001130| 3b 0d 09 09 63 61 73 65 | 20 66 6d 51 75 69 74 3a |;...case| fmQuit:|
|00001140| 20 0d 09 09 09 69 66 20 | 28 44 6f 46 69 6c 65 28 | ....if |(DoFile(|
|00001150| 66 6d 6e 5f 63 6c 6f 73 | 65 29 29 0d 09 09 09 09 |fmn_clos|e)).....|
|00001160| 45 78 69 74 54 6f 53 68 | 65 6c 6c 28 29 3b 0d 09 |ExitToSh|ell();..|
|00001170| 7d 0d 09 72 65 74 75 72 | 6e 28 31 29 3b 0d 7d 0d |}..retur|n(1);.}.|
|00001180| 0d 73 74 61 74 69 63 20 | 50 6f 69 6e 74 20 53 46 |.static |Point SF|
|00001190| 47 77 68 65 72 65 20 3d | 20 7b 20 39 30 2c 20 38 |Gwhere =| { 90, 8|
|000011a0| 32 20 7d 3b 0d 73 74 61 | 74 69 63 20 50 6f 69 6e |2 };.sta|tic Poin|
|000011b0| 74 20 53 46 50 77 68 65 | 72 65 20 3d 20 7b 20 31 |t SFPwhe|re = { 1|
|000011c0| 30 36 2c 20 31 30 34 20 | 7d 3b 0d 73 74 61 74 69 |06, 104 |};.stati|
|000011d0| 63 20 53 46 52 65 70 6c | 79 20 72 65 70 6c 79 3b |c SFRepl|y reply;|
|000011e0| 0d 0d 69 6e 74 20 53 61 | 76 65 41 73 20 28 53 74 |..int Sa|veAs (St|
|000011f0| 72 32 35 35 20 66 6e 2c | 20 73 68 6f 72 74 20 2a |r255 fn,| short *|
|00001200| 76 52 65 66 29 0d 0d 7b | 0d 09 73 68 6f 72 74 20 |vRef)..{|..short |
|00001210| 72 65 66 4e 75 6d 3b 0d | 09 0d 09 69 66 20 28 4e |refNum;.|...if (N|
|00001220| 65 77 46 69 6c 65 28 66 | 6e 2c 20 76 52 65 66 29 |ewFile(f|n, vRef)|
|00001230| 29 20 0d 09 09 69 66 20 | 28 21 43 72 65 61 74 65 |) ...if |(!Create|
|00001240| 46 69 6c 65 28 66 6e 2c | 20 76 52 65 66 2c 20 26 |File(fn,| vRef, &|
|00001250| 72 65 66 4e 75 6d 29 29 | 20 7b 0d 09 09 09 46 69 |refNum))| {....Fi|
|00001260| 6c 65 45 72 72 6f 72 28 | 22 5c 70 45 72 72 6f 72 |leError(|"\pError|
|00001270| 20 63 72 65 61 74 69 6e | 67 20 66 69 6c 65 20 22 | creatin|g file "|
|00001280| 2c 20 66 6e 29 3b 0d 09 | 09 09 72 65 74 75 72 6e |, fn);..|..return|
|00001290| 20 28 30 29 3b 0d 09 09 | 7d 20 65 6c 73 65 20 7b | (0);...|} else {|
|000012a0| 0d 09 09 09 48 4c 6f 63 | 6b 28 28 2a 2a 54 45 48 |....HLoc|k((**TEH|
|000012b0| 29 2e 68 54 65 78 74 29 | 3b 0d 09 09 09 69 66 20 |).hText)|;....if |
|000012c0| 28 57 72 69 74 65 46 69 | 6c 65 28 72 65 66 4e 75 |(WriteFi|le(refNu|
|000012d0| 6d 2c 20 28 2a 28 2a 2a | 54 45 48 29 2e 68 54 65 |m, (*(**|TEH).hTe|
|000012e0| 78 74 29 2c 20 28 6c 6f | 6e 67 29 28 2a 2a 54 45 |xt), (lo|ng)(**TE|
|000012f0| 48 29 2e 74 65 4c 65 6e | 67 74 68 29 29 0d 09 09 |H).teLen|gth))...|
|00001300| 09 09 46 69 6c 65 45 72 | 72 6f 72 28 22 5c 70 45 |..FileEr|ror("\pE|
|00001310| 72 72 6f 72 20 77 72 69 | 74 69 6e 67 20 66 69 6c |rror wri|ting fil|
|00001320| 65 20 22 2c 20 66 6e 29 | 3b 0d 09 09 09 48 55 6e |e ", fn)|;....HUn|
|00001330| 6c 6f 63 6b 28 28 2a 2a | 54 45 48 29 2e 68 54 65 |lock((**|TEH).hTe|
|00001340| 78 74 29 3b 0d 09 09 09 | 46 53 43 6c 6f 73 65 28 |xt);....|FSClose(|
|00001350| 72 65 66 4e 75 6d 29 3b | 0d 09 09 09 64 69 72 74 |refNum);|....dirt|
|00001360| 79 20 3d 20 30 3b 0d 09 | 09 09 72 65 74 75 72 6e |y = 0;..|..return|
|00001370| 28 31 29 3b 0d 09 09 7d | 0d 7d 0d 0d 69 6e 74 20 |(1);...}|.}..int |
|00001380| 53 61 76 65 46 69 6c 65 | 20 28 53 74 72 32 35 35 |SaveFile| (Str255|
|00001390| 20 66 6e 2c 20 73 68 6f | 72 74 20 76 72 6e 29 0d | fn, sho|rt vrn).|
|000013a0| 0d 7b 0d 09 73 68 6f 72 | 74 20 72 65 66 4e 75 6d |.{..shor|t refNum|
|000013b0| 3b 0d 09 69 66 20 28 46 | 53 4f 70 65 6e 28 66 6e |;..if (F|SOpen(fn|
|000013c0| 2c 20 76 72 6e 2c 20 26 | 72 65 66 4e 75 6d 29 20 |, vrn, &|refNum) |
|000013d0| 21 3d 20 6e 6f 45 72 72 | 29 20 7b 0d 09 09 46 69 |!= noErr|) {...Fi|
|000013e0| 6c 65 45 72 72 6f 72 28 | 22 5c 70 45 72 72 6f 72 |leError(|"\pError|
|000013f0| 20 6f 70 65 6e 69 6e 67 | 20 66 69 6c 65 20 22 2c | opening| file ",|
|00001400| 20 66 6e 29 3b 0d 09 09 | 72 65 74 75 72 6e 20 28 | fn);...|return (|
|00001410| 31 29 3b 0d 09 7d 20 65 | 6c 73 65 20 7b 0d 09 09 |1);..} e|lse {...|
|00001420| 48 4c 6f 63 6b 28 28 2a | 2a 54 45 48 29 2e 68 54 |HLock((*|*TEH).hT|
|00001430| 65 78 74 29 3b 0d 09 09 | 69 66 20 28 57 72 69 74 |ext);...|if (Writ|
|00001440| 65 46 69 6c 65 28 72 65 | 66 4e 75 6d 2c 20 28 2a |eFile(re|fNum, (*|
|00001450| 28 2a 2a 54 45 48 29 2e | 68 54 65 78 74 29 2c 20 |(**TEH).|hText), |
|00001460| 28 6c 6f 6e 67 29 28 2a | 2a 54 45 48 29 2e 74 65 |(long)(*|*TEH).te|
|00001470| 4c 65 6e 67 74 68 29 29 | 0d 09 09 09 46 69 6c 65 |Length))|....File|
|00001480| 45 72 72 6f 72 28 22 5c | 70 45 72 72 6f 72 20 77 |Error("\|pError w|
|00001490| 72 69 74 69 6e 67 20 66 | 69 6c 65 20 22 2c 20 66 |riting f|ile ", f|
|000014a0| 6e 29 3b 0d 09 09 48 55 | 6e 6c 6f 63 6b 28 28 2a |n);...HU|nlock((*|
|000014b0| 2a 54 45 48 29 2e 68 54 | 65 78 74 29 3b 0d 09 09 |*TEH).hT|ext);...|
|000014c0| 64 69 72 74 79 20 3d 20 | 30 3b 0d 09 09 46 53 43 |dirty = |0;...FSC|
|000014d0| 6c 6f 73 65 28 72 65 66 | 4e 75 6d 29 3b 0d 09 09 |lose(ref|Num);...|
|000014e0| 72 65 74 75 72 6e 28 31 | 29 3b 0d 09 7d 0d 7d 0d |return(1|);..}.}.|
|000014f0| 0d 69 6e 74 20 4e 65 77 | 46 69 6c 65 20 28 53 74 |.int New|File (St|
|00001500| 72 32 35 35 20 66 6e 2c | 20 73 68 6f 72 74 20 2a |r255 fn,| short *|
|00001510| 76 52 65 66 29 0d 0d 7b | 0d 09 53 46 50 75 74 46 |vRef)..{|..SFPutF|
|00001520| 69 6c 65 28 53 46 50 77 | 68 65 72 65 2c 20 22 5c |ile(SFPw|here, "\|
|00001530| 70 53 61 76 65 20 66 69 | 6c 65 20 61 73 22 2c 20 |pSave fi|le as", |
|00001540| 66 6e 2c 20 30 4c 2c 20 | 26 72 65 70 6c 79 29 3b |fn, 0L, |&reply);|
|00001550| 0d 09 69 66 20 28 21 72 | 65 70 6c 79 2e 67 6f 6f |..if (!r|eply.goo|
|00001560| 64 29 0d 09 09 72 65 74 | 75 72 6e 20 28 30 29 3b |d)...ret|urn (0);|
|00001570| 0d 09 65 6c 73 65 20 7b | 0d 09 09 70 53 74 72 43 |..else {|...pStrC|
|00001580| 6f 70 79 28 72 65 70 6c | 79 2e 66 4e 61 6d 65 2c |opy(repl|y.fName,|
|00001590| 20 66 6e 29 3b 0d 09 09 | 2a 76 52 65 66 20 3d 20 | fn);...|*vRef = |
|000015a0| 72 65 70 6c 79 2e 76 52 | 65 66 4e 75 6d 3b 0d 09 |reply.vR|efNum;..|
|000015b0| 09 72 65 74 75 72 6e 28 | 31 29 3b 0d 09 7d 0d 7d |.return(|1);..}.}|
|000015c0| 0d 0d 69 6e 74 20 4f 6c | 64 46 69 6c 65 20 28 53 |..int Ol|dFile (S|
|000015d0| 74 72 32 35 35 20 66 6e | 2c 20 73 68 6f 72 74 20 |tr255 fn|, short |
|000015e0| 2a 76 52 65 66 29 0d 0d | 7b 0d 09 53 46 54 79 70 |*vRef)..|{..SFTyp|
|000015f0| 65 4c 69 73 74 09 6d 79 | 54 79 70 65 73 3b 0d 09 |eList.my|Types;..|
|00001600| 0d 09 6d 79 54 79 70 65 | 73 5b 30 5d 3d 27 54 45 |..myType|s[0]='TE|
|00001610| 58 54 27 3b 0d 0d 09 53 | 46 47 65 74 46 69 6c 65 |XT';...S|FGetFile|
|00001620| 28 53 46 47 77 68 65 72 | 65 2c 20 22 5c 70 22 2c |(SFGwher|e, "\p",|
|00001630| 20 30 4c 2c 20 31 2c 20 | 6d 79 54 79 70 65 73 2c | 0L, 1, |myTypes,|
|00001640| 20 30 4c 2c 20 26 72 65 | 70 6c 79 20 29 3b 0d 0d | 0L, &re|ply );..|
|00001650| 09 69 66 20 28 21 72 65 | 70 6c 79 2e 67 6f 6f 64 |.if (!re|ply.good|
|00001660| 29 0d 09 09 72 65 74 75 | 72 6e 20 28 30 29 3b 0d |)...retu|rn (0);.|
|00001670| 09 65 6c 73 65 20 7b 0d | 09 09 70 53 74 72 43 6f |.else {.|..pStrCo|
|00001680| 70 79 28 72 65 70 6c 79 | 2e 66 4e 61 6d 65 2c 20 |py(reply|.fName, |
|00001690| 66 6e 29 3b 0d 09 09 2a | 76 52 65 66 20 3d 20 72 |fn);...*|vRef = r|
|000016a0| 65 70 6c 79 2e 76 52 65 | 66 4e 75 6d 3b 0d 09 09 |eply.vRe|fNum;...|
|000016b0| 72 65 74 75 72 6e 28 31 | 29 3b 0d 09 7d 0d 7d 0d |return(1|);..}.}.|
|000016c0| 0d 69 6e 74 20 43 72 65 | 61 74 65 46 69 6c 65 20 |.int Cre|ateFile |
|000016d0| 28 53 74 72 32 35 35 20 | 66 6e 2c 20 73 68 6f 72 |(Str255 |fn, shor|
|000016e0| 74 20 2a 76 52 65 66 2c | 20 73 68 6f 72 74 20 2a |t *vRef,| short *|
|000016f0| 74 68 65 52 65 66 29 0d | 0d 7b 0d 09 4f 53 45 72 |theRef).|.{..OSEr|
|00001700| 72 20 69 6f 3b 0d 09 0d | 09 69 6f 3d 43 72 65 61 |r io;...|.io=Crea|
|00001710| 74 65 28 66 6e 2c 20 2a | 76 52 65 66 2c 20 6b 41 |te(fn, *|vRef, kA|
|00001720| 70 70 53 69 67 6e 61 74 | 75 72 65 2c 20 27 54 45 |ppSignat|ure, 'TE|
|00001730| 58 54 27 29 3b 09 2f 2f | 20 63 68 61 6e 67 65 64 |XT');.//| changed|
|00001740| 20 5b 65 73 70 5d 0d 09 | 69 66 20 28 28 69 6f 20 | [esp]..|if ((io |
|00001750| 3d 3d 20 6e 6f 45 72 72 | 29 20 7c 7c 20 28 69 6f |== noErr|) || (io|
|00001760| 20 3d 3d 20 64 75 70 46 | 4e 45 72 72 29 29 0d 09 | == dupF|NErr))..|
|00001770| 09 69 6f 20 3d 20 46 53 | 4f 70 65 6e 28 66 6e 2c |.io = FS|Open(fn,|
|00001780| 20 2a 76 52 65 66 2c 20 | 74 68 65 52 65 66 20 29 | *vRef, |theRef )|
|00001790| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 28 28 69 6f 20 |;...retu|rn ((io |
|000017a0| 3d 3d 20 6e 6f 45 72 72 | 29 20 7c 7c 20 28 69 6f |== noErr|) || (io|
|000017b0| 20 3d 3d 20 64 75 70 46 | 4e 45 72 72 29 29 3b 0d | == dupF|NErr));.|
|000017c0| 7d 0d 0d 69 6e 74 20 57 | 72 69 74 65 46 69 6c 65 |}..int W|riteFile|
|000017d0| 20 28 73 68 6f 72 74 20 | 72 65 66 4e 75 6d 2c 20 | (short |refNum, |
|000017e0| 63 68 61 72 20 2a 70 2c | 20 6c 6f 6e 67 20 6e 75 |char *p,| long nu|
|000017f0| 6d 29 0d 0d 7b 0d 09 4f | 53 45 72 72 20 69 6f 3b |m)..{..O|SErr io;|
|00001800| 09 09 09 0d 09 2f 2a 20 | 09 77 65 20 73 68 6f 75 |...../* |.we shou|
|00001810| 6c 64 20 63 68 65 63 6b | 20 74 68 65 20 72 65 74 |ld check| the ret|
|00001820| 75 72 6e 20 63 6f 64 65 | 20 66 6f 72 20 65 72 72 |urn code| for err|
|00001830| 6f 72 73 20 2a 2f 0d 09 | 69 6f 3d 46 53 57 72 69 |ors */..|io=FSWri|
|00001840| 74 65 28 72 65 66 4e 75 | 6d 2c 20 26 6e 75 6d 2c |te(refNu|m, &num,|
|00001850| 20 70 29 3b 0d 09 69 66 | 20 28 69 6f 29 0d 09 09 | p);..if| (io)...|
|00001860| 72 65 74 75 72 6e 28 69 | 6f 29 3b 0d 09 69 6f 3d |return(i|o);..io=|
|00001870| 53 65 74 45 4f 46 28 72 | 65 66 4e 75 6d 2c 20 6e |SetEOF(r|efNum, n|
|00001880| 75 6d 29 3b 0d 09 72 65 | 74 75 72 6e 28 69 6f 29 |um);..re|turn(io)|
|00001890| 3b 0d 7d 0d 0d 69 6e 74 | 20 52 65 61 64 46 69 6c |;.}..int| ReadFil|
|000018a0| 65 20 28 73 68 6f 72 74 | 20 72 65 66 4e 75 6d 2c |e (short| refNum,|
|000018b0| 20 54 45 48 61 6e 64 6c | 65 20 74 65 78 74 48 29 | TEHandl|e textH)|
|000018c0| 0d 0d 7b 0d 09 63 68 61 | 72 09 62 75 66 66 65 72 |..{..cha|r.buffer|
|000018d0| 5b 32 35 36 5d 3b 0d 09 | 6c 6f 6e 67 09 63 6f 75 |[256];..|long.cou|
|000018e0| 6e 74 3b 0d 09 4f 53 45 | 72 72 09 09 69 6f 3b 0d |nt;..OSE|rr..io;.|
|000018f0| 09 0d 09 28 2a 2a 74 65 | 78 74 48 29 2e 73 65 6c |...(**te|xtH).sel|
|00001900| 53 74 61 72 74 20 3d 20 | 30 3b 0d 09 28 2a 2a 74 |Start = |0;..(**t|
|00001910| 65 78 74 48 29 2e 73 65 | 6c 45 6e 64 20 3d 20 28 |extH).se|lEnd = (|
|00001920| 2a 2a 74 65 78 74 48 29 | 2e 74 65 4c 65 6e 67 74 |**textH)|.teLengt|
|00001930| 68 3b 0d 09 54 45 44 65 | 6c 65 74 65 28 74 65 78 |h;..TEDe|lete(tex|
|00001940| 74 48 29 3b 0d 09 47 65 | 74 45 4f 46 28 72 65 66 |tH);..Ge|tEOF(ref|
|00001950| 4e 75 6d 2c 20 26 63 6f | 75 6e 74 29 3b 0d 09 69 |Num, &co|unt);..i|
|00001960| 66 20 28 63 6f 75 6e 74 | 20 3e 20 33 32 37 36 37 |f (count| > 32767|
|00001970| 4c 29 0d 09 09 72 65 74 | 75 72 6e 20 28 39 39 39 |L)...ret|urn (999|
|00001980| 29 3b 0d 09 64 6f 20 7b | 0d 09 09 63 6f 75 6e 74 |);..do {|...count|
|00001990| 20 3d 20 32 35 36 3b 0d | 09 09 69 6f 20 3d 20 46 | = 256;.|..io = F|
|000019a0| 53 52 65 61 64 28 72 65 | 66 4e 75 6d 2c 20 26 63 |SRead(re|fNum, &c|
|000019b0| 6f 75 6e 74 2c 20 26 62 | 75 66 66 65 72 29 3b 0d |ount, &b|uffer);.|
|000019c0| 09 09 54 45 49 6e 73 65 | 72 74 28 26 62 75 66 66 |..TEInse|rt(&buff|
|000019d0| 65 72 2c 20 63 6f 75 6e | 74 2c 20 74 65 78 74 48 |er, coun|t, textH|
|000019e0| 29 3b 0d 09 7d 20 77 68 | 69 6c 65 20 28 69 6f 3d |);..} wh|ile (io=|
|000019f0| 3d 6e 6f 45 72 72 29 3b | 0d 09 72 65 74 75 72 6e |=noErr);|..return|
|00001a00| 20 28 69 6f 20 3d 3d 20 | 65 6f 66 45 72 72 29 3b | (io == |eofErr);|
|00001a10| 0d 7d 0d 0d 69 6e 74 20 | 70 53 74 72 43 6f 70 79 |.}..int |pStrCopy|
|00001a20| 20 28 53 74 72 69 6e 67 | 50 74 72 20 70 31 2c 20 | (String|Ptr p1, |
|00001a30| 53 74 72 69 6e 67 50 74 | 72 20 70 32 29 0d 0d 2f |StringPt|r p2)../|
|00001a40| 2a 20 63 6f 70 69 65 73 | 20 61 20 70 61 73 63 61 |* copies| a pasca|
|00001a50| 6c 20 73 74 72 69 6e 67 | 20 66 72 6f 6d 20 70 31 |l string| from p1|
|00001a60| 20 74 6f 20 70 32 20 2a | 2f 0d 7b 0d 09 72 65 67 | to p2 *|/.{..reg|
|00001a70| 69 73 74 65 72 20 69 6e | 74 20 6c 65 6e 20 3d 20 |ister in|t len = |
|00001a80| 2a 70 31 3b 09 2f 2f 20 | 61 64 64 65 64 20 61 73 |*p1;.// |added as|
|00001a90| 69 67 6e 6d 65 6e 74 0d | 09 0d 09 2a 28 70 32 2b |ignment.|...*(p2+|
|00001aa0| 2b 29 20 3d 20 2a 28 70 | 31 2b 2b 29 3b 09 09 09 |+) = *(p|1++);...|
|00001ab0| 2f 2f 20 61 64 64 65 64 | 20 70 61 72 65 6e 73 0d |// added| parens.|
|00001ac0| 09 77 68 69 6c 65 20 28 | 2d 2d 6c 65 6e 3e 3d 30 |.while (|--len>=0|
|00001ad0| 29 20 2a 28 70 32 2b 2b | 29 3d 2a 28 70 31 2b 2b |) *(p2++|)=*(p1++|
|00001ae0| 29 3b 09 2f 2f 20 61 64 | 64 65 64 20 70 61 72 65 |);.// ad|ded pare|
|00001af0| 6e 73 0d 09 72 65 74 75 | 72 6e 20 30 3b 20 2f 2f |ns..retu|rn 0; //|
|00001b00| 20 73 68 6f 75 6c 64 20 | 62 65 20 76 6f 69 64 20 | should |be void |
|00001b10| 66 6e 21 3f 0d 7d 0d 0d | 0d 69 6e 74 20 46 69 6c |fn!?.}..|.int Fil|
|00001b20| 65 45 72 72 6f 72 28 53 | 74 72 32 35 35 20 73 2c |eError(S|tr255 s,|
|00001b30| 20 53 74 72 32 35 35 20 | 66 29 0d 0d 7b 0d 09 50 | Str255 |f)..{..P|
|00001b40| 61 72 61 6d 54 65 78 74 | 28 73 2c 20 66 2c 22 5c |aramText|(s, f,"\|
|00001b50| 70 22 2c 20 22 5c 70 22 | 29 3b 0d 09 41 6c 65 72 |p", "\p"|);..Aler|
|00001b60| 74 28 45 72 72 6f 72 41 | 6c 65 72 74 2c 20 30 4c |t(ErrorA|lert, 0L|
|00001b70| 29 3b 0d 09 72 65 74 75 | 72 6e 20 30 3b 20 2f 2f |);..retu|rn 0; //|
|00001b80| 20 73 68 6f 75 6c 64 20 | 62 65 20 76 6f 69 64 20 | should |be void |
|00001b90| 66 6e 21 3f 0d 7d 0d 0d | 0d 0d 70 61 73 63 61 6c |fn!?.}..|..pascal|
|00001ba0| 20 76 6f 69 64 20 53 63 | 72 6f 6c 6c 50 72 6f 63 | void Sc|rollProc|
|00001bb0| 20 28 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 20 | (Contro|lHandle |
|00001bc0| 74 68 65 43 6f 6e 74 72 | 6f 6c 2c 20 73 68 6f 72 |theContr|ol, shor|
|00001bd0| 74 20 74 68 65 43 6f 64 | 65 29 3b 0d 0d 0d 76 6f |t theCod|e);...vo|
|00001be0| 69 64 20 50 72 65 49 6e | 69 74 57 69 6e 64 6f 77 |id PreIn|itWindow|
|00001bf0| 73 28 76 6f 69 64 29 0d | 7b 0d 09 69 66 20 28 54 |s(void).|{..if (T|
|00001c00| 65 78 74 45 64 69 74 57 | 69 6e 64 6f 77 20 3d 3d |extEditW|indow ==|
|00001c10| 20 30 29 0d 09 7b 0d 09 | 09 53 65 74 55 70 57 69 | 0)..{..|.SetUpWi|
|00001c20| 6e 64 6f 77 73 28 29 3b | 0d 09 09 48 69 64 65 57 |ndows();|...HideW|
|00001c30| 69 6e 64 6f 77 28 54 65 | 78 74 45 64 69 74 57 69 |indow(Te|xtEditWi|
|00001c40| 6e 64 6f 77 29 3b 09 2f | 2a 20 6a 75 73 74 20 69 |ndow);./|* just i|
|00001c50| 6e 20 63 61 73 65 20 69 | 74 27 73 20 61 6c 72 65 |n case i|t's alre|
|00001c60| 61 64 79 20 76 69 73 69 | 62 6c 65 20 2a 2f 0d 09 |ady visi|ble */..|
|00001c70| 7d 0d 7d 0d 0d 69 6e 74 | 20 53 65 74 55 70 57 69 |}.}..int| SetUpWi|
|00001c80| 6e 64 6f 77 73 28 76 6f | 69 64 29 0d 7b 0d 09 52 |ndows(vo|id).{..R|
|00001c90| 65 63 74 09 76 69 65 77 | 52 65 63 74 3b 0d 09 52 |ect.view|Rect;..R|
|00001ca0| 65 63 74 09 76 53 63 72 | 6f 6c 6c 52 65 63 74 3b |ect.vScr|ollRect;|
|00001cb0| 0d 0d 09 53 65 74 50 6f | 72 74 28 28 54 65 78 74 |...SetPo|rt((Text|
|00001cc0| 45 64 69 74 57 69 6e 64 | 6f 77 20 3d 20 47 65 74 |EditWind|ow = Get|
|00001cd0| 4e 65 77 57 69 6e 64 6f | 77 28 77 69 6e 64 6f 77 |NewWindo|w(window|
|00001ce0| 49 44 2c 20 26 77 52 65 | 63 6f 72 64 2c 20 28 57 |ID, &wRe|cord, (W|
|00001cf0| 69 6e 64 6f 77 50 74 72 | 29 20 2d 31 4c 29 29 29 |indowPtr|) -1L)))|
|00001d00| 3b 0d 09 54 65 78 74 46 | 6f 6e 74 28 6d 6f 6e 61 |;..TextF|ont(mona|
|00001d10| 63 6f 29 3b 0d 09 54 65 | 78 74 53 69 7a 65 28 39 |co);..Te|xtSize(9|
|00001d20| 29 3b 0d 09 76 53 63 72 | 6f 6c 6c 52 65 63 74 20 |);..vScr|ollRect |
|00001d30| 3d 20 28 2a 54 65 78 74 | 45 64 69 74 57 69 6e 64 |= (*Text|EditWind|
|00001d40| 6f 77 29 2e 70 6f 72 74 | 52 65 63 74 3b 0d 09 76 |ow).port|Rect;..v|
|00001d50| 53 63 72 6f 6c 6c 52 65 | 63 74 2e 6c 65 66 74 20 |ScrollRe|ct.left |
|00001d60| 3d 20 76 53 63 72 6f 6c | 6c 52 65 63 74 2e 72 69 |= vScrol|lRect.ri|
|00001d70| 67 68 74 2d 31 35 3b 0d | 09 76 53 63 72 6f 6c 6c |ght-15;.|.vScroll|
|00001d80| 52 65 63 74 2e 72 69 67 | 68 74 20 2b 3d 20 31 3b |Rect.rig|ht += 1;|
|00001d90| 0d 09 76 53 63 72 6f 6c | 6c 52 65 63 74 2e 62 6f |..vScrol|lRect.bo|
|00001da0| 74 74 6f 6d 20 2d 3d 20 | 31 34 3b 0d 09 76 53 63 |ttom -= |14;..vSc|
|00001db0| 72 6f 6c 6c 52 65 63 74 | 2e 74 6f 70 20 2d 3d 20 |rollRect|.top -= |
|00001dc0| 31 3b 0d 09 76 53 63 72 | 6f 6c 6c 20 3d 20 4e 65 |1;..vScr|oll = Ne|
|00001dd0| 77 43 6f 6e 74 72 6f 6c | 28 20 54 65 78 74 45 64 |wControl|( TextEd|
|00001de0| 69 74 57 69 6e 64 6f 77 | 2c 20 26 76 53 63 72 6f |itWindow|, &vScro|
|00001df0| 6c 6c 52 65 63 74 2c 20 | 22 5c 70 22 2c 20 31 2c |llRect, |"\p", 1,|
|00001e00| 20 30 2c 20 30 2c 20 30 | 2c 0d 09 09 73 63 72 6f | 0, 0, 0|,...scro|
|00001e10| 6c 6c 42 61 72 50 72 6f | 63 2c 20 30 4c 29 3b 0d |llBarPro|c, 0L);.|
|00001e20| 0d 09 76 69 65 77 52 65 | 63 74 20 3d 20 71 64 2e |..viewRe|ct = qd.|
|00001e30| 74 68 65 50 6f 72 74 2d | 3e 70 6f 72 74 52 65 63 |thePort-|>portRec|
|00001e40| 74 3b 0d 09 76 69 65 77 | 52 65 63 74 2e 72 69 67 |t;..view|Rect.rig|
|00001e50| 68 74 20 2d 3d 20 53 42 | 61 72 57 69 64 74 68 3b |ht -= SB|arWidth;|
|00001e60| 0d 09 76 69 65 77 52 65 | 63 74 2e 62 6f 74 74 6f |..viewRe|ct.botto|
|00001e70| 6d 20 2d 3d 20 53 42 61 | 72 57 69 64 74 68 3b 0d |m -= SBa|rWidth;.|
|00001e80| 09 49 6e 73 65 74 52 65 | 63 74 28 26 76 69 65 77 |.InsetRe|ct(&view|
|00001e90| 52 65 63 74 2c 20 34 2c | 20 34 29 3b 0d 09 54 45 |Rect, 4,| 4);..TE|
|00001ea0| 48 20 3d 20 54 45 4e 65 | 77 28 26 76 69 65 77 52 |H = TENe|w(&viewR|
|00001eb0| 65 63 74 2c 20 26 76 69 | 65 77 52 65 63 74 29 3b |ect, &vi|ewRect);|
|00001ec0| 0d 09 53 65 74 56 69 65 | 77 28 28 57 69 6e 64 6f |..SetVie|w((Windo|
|00001ed0| 77 50 74 72 29 20 71 64 | 2e 74 68 65 50 6f 72 74 |wPtr) qd|.thePort|
|00001ee0| 29 3b 0d 09 64 69 72 74 | 79 20 3d 20 30 3b 0d 09 |);..dirt|y = 0;..|
|00001ef0| 72 65 74 75 72 6e 20 30 | 3b 20 2f 2f 20 73 68 6f |return 0|; // sho|
|00001f00| 75 6c 64 20 62 65 20 76 | 6f 69 64 20 66 6e 21 3f |uld be v|oid fn!?|
|00001f10| 0d 7d 0d 0d 0d 69 6e 74 | 20 41 64 6a 75 73 74 54 |.}...int| AdjustT|
|00001f20| 65 78 74 20 28 76 6f 69 | 64 29 0d 0d 7b 0d 09 69 |ext (voi|d)..{..i|
|00001f30| 6e 74 09 09 6f 6c 64 53 | 63 72 6f 6c 6c 2c 20 6e |nt..oldS|croll, n|
|00001f40| 65 77 53 63 72 6f 6c 6c | 2c 20 64 65 6c 74 61 3b |ewScroll|, delta;|
|00001f50| 0d 09 0d 09 6f 6c 64 53 | 63 72 6f 6c 6c 20 3d 20 |....oldS|croll = |
|00001f60| 28 2a 2a 54 45 48 29 2e | 76 69 65 77 52 65 63 74 |(**TEH).|viewRect|
|00001f70| 2e 74 6f 70 20 2d 20 28 | 2a 2a 54 45 48 29 2e 64 |.top - (|**TEH).d|
|00001f80| 65 73 74 52 65 63 74 2e | 74 6f 70 3b 0d 09 6e 65 |estRect.|top;..ne|
|00001f90| 77 53 63 72 6f 6c 6c 20 | 3d 20 47 65 74 43 74 6c |wScroll |= GetCtl|
|00001fa0| 56 61 6c 75 65 28 76 53 | 63 72 6f 6c 6c 29 20 2a |Value(vS|croll) *|
|00001fb0| 20 28 2a 2a 54 45 48 29 | 2e 6c 69 6e 65 48 65 69 | (**TEH)|.lineHei|
|00001fc0| 67 68 74 3b 0d 09 64 65 | 6c 74 61 20 3d 20 6f 6c |ght;..de|lta = ol|
|00001fd0| 64 53 63 72 6f 6c 6c 20 | 2d 20 6e 65 77 53 63 72 |dScroll |- newScr|
|00001fe0| 6f 6c 6c 3b 0d 09 69 66 | 20 28 64 65 6c 74 61 20 |oll;..if| (delta |
|00001ff0| 21 3d 20 30 29 0d 09 20 | 20 54 45 53 63 72 6f 6c |!= 0).. | TEScrol|
|00002000| 6c 28 30 2c 20 64 65 6c | 74 61 2c 20 54 45 48 29 |l(0, del|ta, TEH)|
|00002010| 3b 0d 09 53 65 74 56 53 | 63 72 6f 6c 6c 28 29 3b |;..SetVS|croll();|
|00002020| 0d 09 72 65 74 75 72 6e | 20 30 3b 20 2f 2f 20 73 |..return| 0; // s|
|00002030| 68 6f 75 6c 64 20 62 65 | 20 76 6f 69 64 20 66 6e |hould be| void fn|
|00002040| 21 3f 0d 7d 0d 0d 0d 69 | 6e 74 20 53 65 74 56 53 |!?.}...i|nt SetVS|
|00002050| 63 72 6f 6c 6c 28 76 6f | 69 64 29 0d 7b 0d 09 72 |croll(vo|id).{..r|
|00002060| 65 67 69 73 74 65 72 20 | 69 6e 74 09 6e 3b 0d 09 |egister |int.n;..|
|00002070| 0d 09 6e 20 3d 20 28 2a | 2a 54 45 48 29 2e 6e 4c |..n = (*|*TEH).nL|
|00002080| 69 6e 65 73 2d 6c 69 6e | 65 73 49 6e 46 6f 6c 64 |ines-lin|esInFold|
|00002090| 65 72 3b 0d 0d 09 69 66 | 20 28 28 2a 2a 54 45 48 |er;...if| ((**TEH|
|000020a0| 29 2e 74 65 4c 65 6e 67 | 74 68 20 3e 20 30 20 26 |).teLeng|th > 0 &|
|000020b0| 26 20 28 2a 28 28 2a 2a | 54 45 48 29 2e 68 54 65 |& (*((**|TEH).hTe|
|000020c0| 78 74 29 29 5b 28 2a 2a | 54 45 48 29 2e 74 65 4c |xt))[(**|TEH).teL|
|000020d0| 65 6e 67 74 68 2d 31 5d | 3d 3d 27 5c 72 27 29 0d |ength-1]|=='\r').|
|000020e0| 09 09 6e 2b 2b 3b 0d 0d | 09 53 65 74 43 74 6c 4d |..n++;..|.SetCtlM|
|000020f0| 61 78 28 76 53 63 72 6f | 6c 6c 2c 20 6e 20 3e 20 |ax(vScro|ll, n > |
|00002100| 30 20 3f 20 6e 20 3a 20 | 30 29 3b 0d 09 72 65 74 |0 ? n : |0);..ret|
|00002110| 75 72 6e 20 30 3b 20 2f | 2f 20 73 68 6f 75 6c 64 |urn 0; /|/ should|
|00002120| 20 62 65 20 76 6f 69 64 | 20 66 6e 21 3f 0d 7d 0d | be void| fn!?.}.|
|00002130| 0d 69 6e 74 20 53 68 6f | 77 53 65 6c 65 63 74 20 |.int Sho|wSelect |
|00002140| 28 76 6f 69 64 29 0d 0d | 7b 0d 09 72 65 67 69 73 |(void)..|{..regis|
|00002150| 74 65 72 09 69 6e 74 09 | 09 74 6f 70 4c 69 6e 65 |ter.int.|.topLine|
|00002160| 2c 20 62 6f 74 74 6f 6d | 4c 69 6e 65 2c 20 74 68 |, bottom|Line, th|
|00002170| 65 4c 69 6e 65 3b 0d 09 | 0d 09 53 65 74 56 53 63 |eLine;..|..SetVSc|
|00002180| 72 6f 6c 6c 28 29 3b 0d | 09 41 64 6a 75 73 74 54 |roll();.|.AdjustT|
|00002190| 65 78 74 28 29 3b 0d 09 | 0d 09 74 6f 70 4c 69 6e |ext();..|..topLin|
|000021a0| 65 20 3d 20 47 65 74 43 | 74 6c 56 61 6c 75 65 28 |e = GetC|tlValue(|
|000021b0| 76 53 63 72 6f 6c 6c 29 | 3b 0d 09 62 6f 74 74 6f |vScroll)|;..botto|
|000021c0| 6d 4c 69 6e 65 20 3d 20 | 74 6f 70 4c 69 6e 65 20 |mLine = |topLine |
|000021d0| 2b 20 6c 69 6e 65 73 49 | 6e 46 6f 6c 64 65 72 3b |+ linesI|nFolder;|
|000021e0| 0d 09 0d 09 69 66 20 28 | 28 2a 2a 54 45 48 29 2e |....if (|(**TEH).|
|000021f0| 73 65 6c 53 74 61 72 74 | 20 3c 20 28 2a 2a 54 45 |selStart| < (**TE|
|00002200| 48 29 2e 6c 69 6e 65 53 | 74 61 72 74 73 5b 74 6f |H).lineS|tarts[to|
|00002210| 70 4c 69 6e 65 5d 20 7c | 7c 0d 09 09 09 28 2a 2a |pLine] |||....(**|
|00002220| 54 45 48 29 2e 73 65 6c | 53 74 61 72 74 20 3e 3d |TEH).sel|Start >=|
|00002230| 20 28 2a 2a 54 45 48 29 | 2e 6c 69 6e 65 53 74 61 | (**TEH)|.lineSta|
|00002240| 72 74 73 5b 62 6f 74 74 | 6f 6d 4c 69 6e 65 5d 29 |rts[bott|omLine])|
|00002250| 20 7b 0d 09 09 66 6f 72 | 20 28 74 68 65 4c 69 6e | {...for| (theLin|
|00002260| 65 20 3d 20 30 3b 20 28 | 2a 2a 54 45 48 29 2e 73 |e = 0; (|**TEH).s|
|00002270| 65 6c 53 74 61 72 74 20 | 3e 3d 20 28 2a 2a 54 45 |elStart |>= (**TE|
|00002280| 48 29 2e 6c 69 6e 65 53 | 74 61 72 74 73 5b 74 68 |H).lineS|tarts[th|
|00002290| 65 4c 69 6e 65 5d 3b 20 | 74 68 65 4c 69 6e 65 2b |eLine]; |theLine+|
|000022a0| 2b 29 0d 09 09 09 3b 0d | 09 09 53 65 74 43 74 6c |+)....;.|..SetCtl|
|000022b0| 56 61 6c 75 65 28 76 53 | 63 72 6f 6c 6c 2c 20 74 |Value(vS|croll, t|
|000022c0| 68 65 4c 69 6e 65 20 2d | 20 6c 69 6e 65 73 49 6e |heLine -| linesIn|
|000022d0| 46 6f 6c 64 65 72 20 2f | 20 32 29 3b 0d 09 09 41 |Folder /| 2);...A|
|000022e0| 64 6a 75 73 74 54 65 78 | 74 28 29 3b 0d 09 7d 0d |djustTex|t();..}.|
|000022f0| 09 72 65 74 75 72 6e 20 | 30 3b 20 2f 2f 20 73 68 |.return |0; // sh|
|00002300| 6f 75 6c 64 20 62 65 20 | 76 6f 69 64 20 66 6e 21 |ould be |void fn!|
|00002310| 3f 0d 7d 0d 0d 69 6e 74 | 20 53 65 74 56 69 65 77 |?.}..int| SetView|
|00002320| 20 28 57 69 6e 64 6f 77 | 50 74 72 20 77 29 0d 0d | (Window|Ptr w)..|
|00002330| 7b 0d 09 28 2a 2a 54 45 | 48 29 2e 76 69 65 77 52 |{..(**TE|H).viewR|
|00002340| 65 63 74 20 3d 20 77 2d | 3e 70 6f 72 74 52 65 63 |ect = w-|>portRec|
|00002350| 74 3b 0d 09 28 2a 2a 54 | 45 48 29 2e 76 69 65 77 |t;..(**T|EH).view|
|00002360| 52 65 63 74 2e 72 69 67 | 68 74 20 2d 3d 20 53 42 |Rect.rig|ht -= SB|
|00002370| 61 72 57 69 64 74 68 3b | 0d 09 28 2a 2a 54 45 48 |arWidth;|..(**TEH|
|00002380| 29 2e 76 69 65 77 52 65 | 63 74 2e 62 6f 74 74 6f |).viewRe|ct.botto|
|00002390| 6d 20 2d 3d 20 53 42 61 | 72 57 69 64 74 68 3b 0d |m -= SBa|rWidth;.|
|000023a0| 09 49 6e 73 65 74 52 65 | 63 74 28 26 28 2a 2a 54 |.InsetRe|ct(&(**T|
|000023b0| 45 48 29 2e 76 69 65 77 | 52 65 63 74 2c 20 34 2c |EH).view|Rect, 4,|
|000023c0| 20 34 29 3b 0d 0d 09 6c | 69 6e 65 73 49 6e 46 6f | 4);...l|inesInFo|
|000023d0| 6c 64 65 72 20 3d 20 28 | 28 2a 2a 54 45 48 29 2e |lder = (|(**TEH).|
|000023e0| 76 69 65 77 52 65 63 74 | 2e 62 6f 74 74 6f 6d 2d |viewRect|.bottom-|
|000023f0| 28 2a 2a 54 45 48 29 2e | 76 69 65 77 52 65 63 74 |(**TEH).|viewRect|
|00002400| 2e 74 6f 70 29 2f 28 2a | 2a 54 45 48 29 2e 6c 69 |.top)/(*|*TEH).li|
|00002410| 6e 65 48 65 69 67 68 74 | 3b 0d 09 28 2a 2a 54 45 |neHeight|;..(**TE|
|00002420| 48 29 2e 76 69 65 77 52 | 65 63 74 2e 62 6f 74 74 |H).viewR|ect.bott|
|00002430| 6f 6d 20 3d 20 28 2a 2a | 54 45 48 29 2e 76 69 65 |om = (**|TEH).vie|
|00002440| 77 52 65 63 74 2e 74 6f | 70 20 2b 20 28 2a 2a 54 |wRect.to|p + (**T|
|00002450| 45 48 29 2e 6c 69 6e 65 | 48 65 69 67 68 74 2a 6c |EH).line|Height*l|
|00002460| 69 6e 65 73 49 6e 46 6f | 6c 64 65 72 3b 0d 09 28 |inesInFo|lder;..(|
|00002470| 2a 2a 54 45 48 29 2e 64 | 65 73 74 52 65 63 74 2e |**TEH).d|estRect.|
|00002480| 72 69 67 68 74 20 3d 20 | 28 2a 2a 54 45 48 29 2e |right = |(**TEH).|
|00002490| 76 69 65 77 52 65 63 74 | 2e 72 69 67 68 74 3b 0d |viewRect|.right;.|
|000024a0| 09 54 45 43 61 6c 54 65 | 78 74 28 54 45 48 29 3b |.TECalTe|xt(TEH);|
|000024b0| 0d 09 72 65 74 75 72 6e | 20 30 3b 20 2f 2f 20 73 |..return| 0; // s|
|000024c0| 68 6f 75 6c 64 20 62 65 | 20 76 6f 69 64 20 66 6e |hould be| void fn|
|000024d0| 21 3f 0d 7d 0d 0d 69 6e | 74 20 55 70 64 61 74 65 |!?.}..in|t Update|
|000024e0| 57 69 6e 64 6f 77 20 28 | 57 69 6e 64 6f 77 50 74 |Window (|WindowPt|
|000024f0| 72 20 74 68 65 57 69 6e | 64 6f 77 29 0d 0d 7b 0d |r theWin|dow)..{.|
|00002500| 09 47 72 61 66 50 74 72 | 09 73 61 76 65 50 6f 72 |.GrafPtr|.savePor|
|00002510| 74 3b 0d 09 0d 09 47 65 | 74 50 6f 72 74 28 26 73 |t;....Ge|tPort(&s|
|00002520| 61 76 65 50 6f 72 74 29 | 3b 0d 09 53 65 74 50 6f |avePort)|;..SetPo|
|00002530| 72 74 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 0d |rt(theWi|ndow);..|
|00002540| 09 42 65 67 69 6e 55 70 | 64 61 74 65 28 74 68 65 |.BeginUp|date(the|
|00002550| 57 69 6e 64 6f 77 29 3b | 0d 09 45 72 61 73 65 52 |Window);|..EraseR|
|00002560| 65 63 74 28 26 74 68 65 | 57 69 6e 64 6f 77 2d 3e |ect(&the|Window->|
|00002570| 70 6f 72 74 52 65 63 74 | 29 3b 0d 09 44 72 61 77 |portRect|);..Draw|
|00002580| 43 6f 6e 74 72 6f 6c 73 | 28 74 68 65 57 69 6e 64 |Controls|(theWind|
|00002590| 6f 77 29 3b 0d 09 44 72 | 61 77 47 72 6f 77 49 63 |ow);..Dr|awGrowIc|
|000025a0| 6f 6e 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |on(theWi|ndow);..|
|000025b0| 54 45 55 70 64 61 74 65 | 28 26 74 68 65 57 69 6e |TEUpdate|(&theWin|
|000025c0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 2c 20 54 |dow->por|tRect, T|
|000025d0| 45 48 29 3b 0d 09 45 6e | 64 55 70 64 61 74 65 28 |EH);..En|dUpdate(|
|000025e0| 74 68 65 57 69 6e 64 6f | 77 29 3b 0d 0d 09 53 65 |theWindo|w);...Se|
|000025f0| 74 50 6f 72 74 28 73 61 | 76 65 50 6f 72 74 29 3b |tPort(sa|vePort);|
|00002600| 0d 09 72 65 74 75 72 6e | 20 30 3b 20 2f 2f 20 73 |..return| 0; // s|
|00002610| 68 6f 75 6c 64 20 62 65 | 20 76 6f 69 64 20 66 6e |hould be| void fn|
|00002620| 21 3f 0d 7d 0d 0d 0d 0d | 0d 70 61 73 63 61 6c 20 |!?.}....|.pascal |
|00002630| 76 6f 69 64 20 53 63 72 | 6f 6c 6c 50 72 6f 63 20 |void Scr|ollProc |
|00002640| 28 43 6f 6e 74 72 6f 6c | 48 61 6e 64 6c 65 20 74 |(Control|Handle t|
|00002650| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 73 68 6f 72 74 |heContro|l, short|
|00002660| 20 74 68 65 43 6f 64 65 | 29 0d 7b 0d 09 69 6e 74 | theCode|).{..int|
|00002670| 09 70 61 67 65 53 69 7a | 65 3b 0d 09 69 6e 74 09 |.pageSiz|e;..int.|
|00002680| 73 63 72 6f 6c 6c 41 6d | 74 3b 0d 09 69 6e 74 20 |scrollAm|t;..int |
|00002690| 6f 6c 64 43 74 6c 3b 0d | 09 0d 09 69 66 20 28 74 |oldCtl;.|...if (t|
|000026a0| 68 65 43 6f 64 65 20 3d | 3d 20 30 29 0d 09 09 72 |heCode =|= 0)...r|
|000026b0| 65 74 75 72 6e 20 3b 0d | 09 0d 09 70 61 67 65 53 |eturn ;.|...pageS|
|000026c0| 69 7a 65 20 3d 20 28 28 | 2a 2a 54 45 48 29 2e 76 |ize = ((|**TEH).v|
|000026d0| 69 65 77 52 65 63 74 2e | 62 6f 74 74 6f 6d 2d 28 |iewRect.|bottom-(|
|000026e0| 2a 2a 54 45 48 29 2e 76 | 69 65 77 52 65 63 74 2e |**TEH).v|iewRect.|
|000026f0| 74 6f 70 29 20 2f 20 0d | 09 09 09 28 2a 2a 54 45 |top) / .|...(**TE|
|00002700| 48 29 2e 6c 69 6e 65 48 | 65 69 67 68 74 20 2d 20 |H).lineH|eight - |
|00002710| 31 3b 0d 09 09 09 0d 09 | 73 77 69 74 63 68 20 28 |1;......|switch (|
|00002720| 74 68 65 43 6f 64 65 29 | 20 7b 0d 09 09 63 61 73 |theCode)| {...cas|
|00002730| 65 20 69 6e 55 70 42 75 | 74 74 6f 6e 3a 20 0d 09 |e inUpBu|tton: ..|
|00002740| 09 09 73 63 72 6f 6c 6c | 41 6d 74 20 3d 20 2d 31 |..scroll|Amt = -1|
|00002750| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|00002760| 73 65 20 69 6e 44 6f 77 | 6e 42 75 74 74 6f 6e 3a |se inDow|nButton:|
|00002770| 20 0d 09 09 09 73 63 72 | 6f 6c 6c 41 6d 74 20 3d | ....scr|ollAmt =|
|00002780| 20 31 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 | 1;....b|reak;...|
|00002790| 63 61 73 65 20 69 6e 50 | 61 67 65 55 70 3a 20 0d |case inP|ageUp: .|
|000027a0| 09 09 09 73 63 72 6f 6c | 6c 41 6d 74 20 3d 20 2d |...scrol|lAmt = -|
|000027b0| 70 61 67 65 53 69 7a 65 | 3b 0d 09 09 09 62 72 65 |pageSize|;....bre|
|000027c0| 61 6b 3b 0d 09 09 63 61 | 73 65 20 69 6e 50 61 67 |ak;...ca|se inPag|
|000027d0| 65 44 6f 77 6e 3a 20 0d | 09 09 09 73 63 72 6f 6c |eDown: .|...scrol|
|000027e0| 6c 41 6d 74 20 3d 20 70 | 61 67 65 53 69 7a 65 3b |lAmt = p|ageSize;|
|000027f0| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 7d 0d 0d 09 |....brea|k;..}...|
|00002800| 6f 6c 64 43 74 6c 20 3d | 20 47 65 74 43 74 6c 56 |oldCtl =| GetCtlV|
|00002810| 61 6c 75 65 28 74 68 65 | 43 6f 6e 74 72 6f 6c 29 |alue(the|Control)|
|00002820| 3b 0d 09 53 65 74 43 74 | 6c 56 61 6c 75 65 28 74 |;..SetCt|lValue(t|
|00002830| 68 65 43 6f 6e 74 72 6f | 6c 2c 20 6f 6c 64 43 74 |heContro|l, oldCt|
|00002840| 6c 2b 73 63 72 6f 6c 6c | 41 6d 74 29 3b 0d 0d 09 |l+scroll|Amt);...|
|00002850| 41 64 6a 75 73 74 54 65 | 78 74 28 29 3b 0d 7d 0d |AdjustTe|xt();.}.|
|00002860| 0d 69 6e 74 20 44 6f 43 | 6f 6e 74 65 6e 74 28 57 |.int DoC|ontent(W|
|00002870| 69 6e 64 6f 77 50 74 72 | 20 74 68 65 57 69 6e 64 |indowPtr| theWind|
|00002880| 6f 77 2c 20 45 76 65 6e | 74 52 65 63 6f 72 64 20 |ow, Even|tRecord |
|00002890| 2a 74 68 65 45 76 65 6e | 74 29 0d 0d 7b 0d 09 73 |*theEven|t)..{..s|
|000028a0| 68 6f 72 74 09 09 09 63 | 6e 74 6c 43 6f 64 65 3b |hort...c|ntlCode;|
|000028b0| 0d 09 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 20 |..Contro|lHandle |
|000028c0| 09 74 68 65 43 6f 6e 74 | 72 6f 6c 3b 0d 09 47 72 |.theCont|rol;..Gr|
|000028d0| 61 66 50 74 72 09 09 09 | 73 61 76 65 50 6f 72 74 |afPtr...|savePort|
|000028e0| 3b 0d 09 0d 09 47 65 74 | 50 6f 72 74 28 26 73 61 |;....Get|Port(&sa|
|000028f0| 76 65 50 6f 72 74 29 3b | 0d 09 53 65 74 50 6f 72 |vePort);|..SetPor|
|00002900| 74 28 74 68 65 57 69 6e | 64 6f 77 29 3b 0d 0d 09 |t(theWin|dow);...|
|00002910| 47 6c 6f 62 61 6c 54 6f | 4c 6f 63 61 6c 28 26 74 |GlobalTo|Local(&t|
|00002920| 68 65 45 76 65 6e 74 2d | 3e 77 68 65 72 65 29 3b |heEvent-|>where);|
|00002930| 0d 09 69 66 20 28 28 63 | 6e 74 6c 43 6f 64 65 20 |..if ((c|ntlCode |
|00002940| 3d 20 46 69 6e 64 43 6f | 6e 74 72 6f 6c 28 74 68 |= FindCo|ntrol(th|
|00002950| 65 45 76 65 6e 74 2d 3e | 77 68 65 72 65 2c 20 74 |eEvent->|where, t|
|00002960| 68 65 57 69 6e 64 6f 77 | 2c 20 26 74 68 65 43 6f |heWindow|, &theCo|
|00002970| 6e 74 72 6f 6c 29 29 20 | 3d 3d 20 30 29 20 7b 0d |ntrol)) |== 0) {.|
|00002980| 09 09 69 66 20 28 50 74 | 49 6e 52 65 63 74 28 74 |..if (Pt|InRect(t|
|00002990| 68 65 45 76 65 6e 74 2d | 3e 77 68 65 72 65 2c 20 |heEvent-|>where, |
|000029a0| 26 28 2a 2a 54 45 48 29 | 2e 76 69 65 77 52 65 63 |&(**TEH)|.viewRec|
|000029b0| 74 29 29 0d 09 09 09 54 | 45 43 6c 69 63 6b 28 74 |t))....T|EClick(t|
|000029c0| 68 65 45 76 65 6e 74 2d | 3e 77 68 65 72 65 2c 20 |heEvent-|>where, |
|000029d0| 28 74 68 65 45 76 65 6e | 74 2d 3e 6d 6f 64 69 66 |(theEven|t->modif|
|000029e0| 69 65 72 73 20 26 20 73 | 68 69 66 74 4b 65 79 29 |iers & s|hiftKey)|
|000029f0| 21 3d 30 2c 20 54 45 48 | 29 3b 0d 09 7d 20 65 6c |!=0, TEH|);..} el|
|00002a00| 73 65 20 69 66 20 28 63 | 6e 74 6c 43 6f 64 65 20 |se if (c|ntlCode |
|00002a10| 3d 3d 20 69 6e 54 68 75 | 6d 62 29 20 7b 0d 09 09 |== inThu|mb) {...|
|00002a20| 54 72 61 63 6b 43 6f 6e | 74 72 6f 6c 28 74 68 65 |TrackCon|trol(the|
|00002a30| 43 6f 6e 74 72 6f 6c 2c | 20 74 68 65 45 76 65 6e |Control,| theEven|
|00002a40| 74 2d 3e 77 68 65 72 65 | 2c 20 30 4c 29 3b 0d 09 |t->where|, 0L);..|
|00002a50| 09 41 64 6a 75 73 74 54 | 65 78 74 28 29 3b 0d 09 |.AdjustT|ext();..|
|00002a60| 7d 20 65 6c 73 65 0d 09 | 09 54 72 61 63 6b 43 6f |} else..|.TrackCo|
|00002a70| 6e 74 72 6f 6c 28 74 68 | 65 43 6f 6e 74 72 6f 6c |ntrol(th|eControl|
|00002a80| 2c 20 74 68 65 45 76 65 | 6e 74 2d 3e 77 68 65 72 |, theEve|nt->wher|
|00002a90| 65 2c 20 28 50 72 6f 63 | 50 74 72 29 26 53 63 72 |e, (Proc|Ptr)&Scr|
|00002aa0| 6f 6c 6c 50 72 6f 63 29 | 3b 0d 0d 09 53 65 74 50 |ollProc)|;...SetP|
|00002ab0| 6f 72 74 28 73 61 76 65 | 50 6f 72 74 29 3b 0d 09 |ort(save|Port);..|
|00002ac0| 72 65 74 75 72 6e 20 30 | 3b 20 2f 2f 20 73 68 6f |return 0|; // sho|
|00002ad0| 75 6c 64 20 62 65 20 76 | 6f 69 64 20 66 6e 21 3f |uld be v|oid fn!?|
|00002ae0| 0d 7d 0d 0d 76 6f 69 64 | 20 4d 79 47 72 6f 77 57 |.}..void| MyGrowW|
|00002af0| 69 6e 64 6f 77 28 57 69 | 6e 64 6f 77 50 74 72 20 |indow(Wi|ndowPtr |
|00002b00| 77 2c 20 50 6f 69 6e 74 | 20 70 29 0d 0d 7b 0d 09 |w, Point| p)..{..|
|00002b10| 47 72 61 66 50 74 72 09 | 73 61 76 65 50 6f 72 74 |GrafPtr.|savePort|
|00002b20| 3b 0d 09 6c 6f 6e 67 09 | 74 68 65 52 65 73 75 6c |;..long.|theResul|
|00002b30| 74 3b 0d 09 52 65 63 74 | 09 6f 6c 64 48 6f 72 69 |t;..Rect|.oldHori|
|00002b40| 7a 42 61 72 3b 0d 09 52 | 65 63 74 20 09 72 3b 0d |zBar;..R|ect .r;.|
|00002b50| 09 0d 09 47 65 74 50 6f | 72 74 28 26 73 61 76 65 |...GetPo|rt(&save|
|00002b60| 50 6f 72 74 29 3b 0d 09 | 53 65 74 50 6f 72 74 28 |Port);..|SetPort(|
|00002b70| 77 29 3b 0d 09 0d 09 6f | 6c 64 48 6f 72 69 7a 42 |w);....o|ldHorizB|
|00002b80| 61 72 20 3d 20 77 2d 3e | 70 6f 72 74 52 65 63 74 |ar = w->|portRect|
|00002b90| 3b 0d 09 6f 6c 64 48 6f | 72 69 7a 42 61 72 2e 74 |;..oldHo|rizBar.t|
|00002ba0| 6f 70 20 3d 20 6f 6c 64 | 48 6f 72 69 7a 42 61 72 |op = old|HorizBar|
|00002bb0| 2e 62 6f 74 74 6f 6d 20 | 2d 20 28 53 42 61 72 57 |.bottom |- (SBarW|
|00002bc0| 69 64 74 68 2b 31 29 3b | 0d 0d 09 53 65 74 52 65 |idth+1);|...SetRe|
|00002bd0| 63 74 28 26 72 2c 20 38 | 30 2c 20 38 30 2c 20 71 |ct(&r, 8|0, 80, q|
|00002be0| 64 2e 73 63 72 65 65 6e | 42 69 74 73 2e 62 6f 75 |d.screen|Bits.bou|
|00002bf0| 6e 64 73 2e 72 69 67 68 | 74 2c 20 71 64 2e 73 63 |nds.righ|t, qd.sc|
|00002c00| 72 65 65 6e 42 69 74 73 | 2e 62 6f 75 6e 64 73 2e |reenBits|.bounds.|
|00002c10| 62 6f 74 74 6f 6d 29 3b | 0d 09 74 68 65 52 65 73 |bottom);|..theRes|
|00002c20| 75 6c 74 20 3d 20 47 72 | 6f 77 57 69 6e 64 6f 77 |ult = Gr|owWindow|
|00002c30| 28 77 2c 20 70 2c 20 26 | 72 29 3b 0d 09 69 66 20 |(w, p, &|r);..if |
|00002c40| 28 74 68 65 52 65 73 75 | 6c 74 20 3d 3d 20 30 29 |(theResu|lt == 0)|
|00002c50| 0d 09 20 20 72 65 74 75 | 72 6e 3b 0d 09 53 69 7a |.. retu|rn;..Siz|
|00002c60| 65 57 69 6e 64 6f 77 28 | 20 77 2c 20 4c 6f 57 6f |eWindow(| w, LoWo|
|00002c70| 72 64 28 74 68 65 52 65 | 73 75 6c 74 29 2c 20 48 |rd(theRe|sult), H|
|00002c80| 69 57 6f 72 64 28 74 68 | 65 52 65 73 75 6c 74 29 |iWord(th|eResult)|
|00002c90| 2c 20 66 61 6c 73 65 29 | 3b 0d 0d 09 67 65 74 5f |, false)|;...get_|
|00002ca0| 57 69 6e 64 6f 77 50 6f | 73 28 77 2c 20 26 66 69 |WindowPo|s(w, &fi|
|00002cb0| 6c 65 5f 73 65 74 74 69 | 6e 67 73 2d 3e 73 72 63 |le_setti|ngs->src|
|00002cc0| 57 69 6e 64 5f 70 6f 73 | 29 3b 09 09 09 09 2f 2f |Wind_pos|);....//|
|00002cd0| 20 61 64 64 65 64 20 5b | 65 73 70 5d 0d 2f 2f 09 | added [|esp].//.|
|00002ce0| 66 69 6c 65 5f 73 65 74 | 74 69 6e 67 73 2d 3e 73 |file_set|tings->s|
|00002cf0| 72 63 5f 77 69 64 74 68 | 20 3d 20 4c 6f 57 6f 72 |rc_width| = LoWor|
|00002d00| 64 28 74 68 65 52 65 73 | 75 6c 74 29 3b 09 2d 2d |d(theRes|ult);.--|
|00002d10| 20 72 65 6d 6f 76 65 64 | 20 5b 65 73 70 5d 0d 2f | removed| [esp]./|
|00002d20| 2f 09 66 69 6c 65 5f 73 | 65 74 74 69 6e 67 73 2d |/.file_s|ettings-|
|00002d30| 3e 73 72 63 5f 68 65 69 | 67 68 74 20 3d 20 48 69 |>src_hei|ght = Hi|
|00002d40| 57 6f 72 64 28 74 68 65 | 52 65 73 75 6c 74 29 3b |Word(the|Result);|
|00002d50| 09 2d 2d 20 72 65 6d 6f | 76 65 64 20 5b 65 73 70 |.-- remo|ved [esp|
|00002d60| 5d 0d 0d 2f 2f 09 57 72 | 69 74 65 46 69 6c 65 53 |]..//.Wr|iteFileS|
|00002d70| 65 74 74 69 6e 67 73 28 | 29 3b 09 09 2d 2d 20 6d |ettings(|);..-- m|
|00002d80| 6f 76 65 64 20 74 6f 20 | 4d 79 43 6c 6f 73 65 57 |oved to |MyCloseW|
|00002d90| 69 6e 64 6f 77 20 5b 65 | 73 70 5d 0d 09 49 6e 76 |indow [e|sp]..Inv|
|00002da0| 61 6c 52 65 63 74 28 26 | 77 2d 3e 70 6f 72 74 52 |alRect(&|w->portR|
|00002db0| 65 63 74 29 3b 0d 09 0d | 09 53 65 74 56 69 65 77 |ect);...|.SetView|
|00002dc0| 28 77 29 3b 0d 0d 09 45 | 72 61 73 65 52 65 63 74 |(w);...E|raseRect|
|00002dd0| 28 26 6f 6c 64 48 6f 72 | 69 7a 42 61 72 29 3b 0d |(&oldHor|izBar);.|
|00002de0| 09 0d 09 4d 6f 76 65 43 | 6f 6e 74 72 6f 6c 28 76 |...MoveC|ontrol(v|
|00002df0| 53 63 72 6f 6c 6c 2c 20 | 77 2d 3e 70 6f 72 74 52 |Scroll, |w->portR|
|00002e00| 65 63 74 2e 72 69 67 68 | 74 20 2d 20 53 42 61 72 |ect.righ|t - SBar|
|00002e10| 57 69 64 74 68 2c 20 77 | 2d 3e 70 6f 72 74 52 65 |Width, w|->portRe|
|00002e20| 63 74 2e 74 6f 70 2d 31 | 29 3b 0d 09 53 69 7a 65 |ct.top-1|);..Size|
|00002e30| 43 6f 6e 74 72 6f 6c 28 | 76 53 63 72 6f 6c 6c 2c |Control(|vScroll,|
|00002e40| 20 53 42 61 72 57 69 64 | 74 68 2b 31 2c 20 77 2d | SBarWid|th+1, w-|
|00002e50| 3e 70 6f 72 74 52 65 63 | 74 2e 62 6f 74 74 6f 6d |>portRec|t.bottom|
|00002e60| 20 2d 20 77 2d 3e 70 6f | 72 74 52 65 63 74 2e 74 | - w->po|rtRect.t|
|00002e70| 6f 70 2d 28 53 42 61 72 | 57 69 64 74 68 2d 32 29 |op-(SBar|Width-2)|
|00002e80| 29 3b 0d 09 72 20 3d 20 | 28 2a 2a 76 53 63 72 6f |);..r = |(**vScro|
|00002e90| 6c 6c 29 2e 63 6f 6e 74 | 72 6c 52 65 63 74 3b 0d |ll).cont|rlRect;.|
|00002ea0| 09 56 61 6c 69 64 52 65 | 63 74 28 26 72 29 3b 0d |.ValidRe|ct(&r);.|
|00002eb0| 0d 0d 09 53 65 74 56 53 | 63 72 6f 6c 6c 28 29 3b |...SetVS|croll();|
|00002ec0| 0d 09 41 64 6a 75 73 74 | 54 65 78 74 28 29 3b 0d |..Adjust|Text();.|
|00002ed0| 09 0d 09 53 65 74 50 6f | 72 74 28 73 61 76 65 50 |...SetPo|rt(saveP|
|00002ee0| 6f 72 74 29 3b 0d 7d 0d | 0d 0d 0d 69 6e 74 20 43 |ort);.}.|...int C|
|00002ef0| 6c 6f 73 65 4d 79 57 69 | 6e 64 6f 77 28 76 6f 69 |loseMyWi|ndow(voi|
|00002f00| 64 29 0d 7b 0d 09 77 69 | 6e 64 6f 77 5f 76 69 73 |d).{..wi|ndow_vis|
|00002f10| 69 62 6c 65 20 3d 20 46 | 41 4c 53 45 3b 0d 09 48 |ible = F|ALSE;..H|
|00002f20| 69 64 65 57 69 6e 64 6f | 77 28 54 65 78 74 45 64 |ideWindo|w(TextEd|
|00002f30| 69 74 57 69 6e 64 6f 77 | 29 3b 0d 09 54 45 53 65 |itWindow|);..TESe|
|00002f40| 74 53 65 6c 65 63 74 28 | 30 2c 20 28 2a 2a 54 45 |tSelect(|0, (**TE|
|00002f50| 48 29 2e 74 65 4c 65 6e | 67 74 68 2c 20 54 45 48 |H).teLen|gth, TEH|
|00002f60| 29 3b 0d 09 54 45 44 65 | 6c 65 74 65 28 54 45 48 |);..TEDe|lete(TEH|
|00002f70| 29 3b 0d 09 53 65 74 56 | 53 63 72 6f 6c 6c 28 29 |);..SetV|Scroll()|
|00002f80| 3b 0d 09 53 65 74 55 70 | 46 69 6c 65 73 28 29 3b |;..SetUp|Files();|
|00002f90| 0d 09 57 72 69 74 65 46 | 69 6c 65 53 65 74 74 69 |..WriteF|ileSetti|
|00002fa0| 6e 67 73 28 29 3b 09 2f | 2a 20 53 61 76 65 20 77 |ngs();./|* Save w|
|00002fb0| 69 6e 64 6f 77 20 70 6f | 73 69 74 69 6f 6e 20 2a |indow po|sition *|
|00002fc0| 2f 09 2f 2f 20 61 64 64 | 65 64 20 5b 65 73 70 5d |/.// add|ed [esp]|
|00002fd0| 0d 09 43 6c 6f 73 65 46 | 69 6c 65 53 65 74 74 69 |..CloseF|ileSetti|
|00002fe0| 6e 67 73 28 29 3b 09 09 | 09 09 09 09 09 09 2f 2f |ngs();..|......//|
|00002ff0| 20 61 64 64 65 64 20 5b | 65 73 70 5d 0d 09 72 65 | added [|esp]..re|
|00003000| 74 75 72 6e 20 30 3b 20 | 2f 2f 20 73 68 6f 75 6c |turn 0; |// shoul|
|00003010| 64 20 62 65 20 76 6f 69 | 64 20 66 6e 21 3f 0d 7d |d be voi|d fn!?.}|
|00003020| 0d 0d 0d 0d 23 64 65 66 | 69 6e 65 09 6f 75 72 73 |....#def|ine.ours|
|00003030| 28 77 29 09 09 28 28 54 | 65 78 74 45 64 69 74 57 |(w)..((T|extEditW|
|00003040| 69 6e 64 6f 77 20 21 3d | 20 4e 55 4c 4c 29 20 26 |indow !=| NULL) &|
|00003050| 26 20 28 77 20 3d 3d 20 | 54 65 78 74 45 64 69 74 |& (w == |TextEdit|
|00003060| 57 69 6e 64 6f 77 29 29 | 0d 0d 0d 0d 50 6c 65 61 |Window))|....Plea|
|00003070| 73 65 57 61 69 74 28 29 | 0d 7b 0d 09 53 65 74 43 |seWait()|.{..SetC|
|00003080| 75 72 73 6f 72 28 26 77 | 61 69 74 43 75 72 73 6f |ursor(&w|aitCurso|
|00003090| 72 29 3b 0d 7d 0d 0d 6d | 61 69 6e 5f 69 6e 69 74 |r);.}..m|ain_init|
|000030a0| 28 29 20 0d 7b 0d 09 54 | 65 78 74 45 64 69 74 57 |() .{..T|extEditW|
|000030b0| 69 6e 64 6f 77 20 3d 20 | 30 3b 0d 09 53 65 74 55 |indow = |0;..SetU|
|000030c0| 70 46 69 6c 65 73 28 29 | 3b 0d 09 53 65 74 55 70 |pFiles()|;..SetUp|
|000030d0| 43 75 72 73 6f 72 73 28 | 29 3b 0d 09 50 72 65 49 |Cursors(|);..PreI|
|000030e0| 6e 69 74 57 69 6e 64 6f | 77 73 28 29 3b 0d 7d 0d |nitWindo|ws();.}.|
|000030f0| 0d 0d 0d 69 6e 74 20 44 | 6f 45 64 69 74 4d 6f 75 |...int D|oEditMou|
|00003100| 73 65 44 6f 77 6e 20 28 | 69 6e 74 20 77 69 6e 64 |seDown (|int wind|
|00003110| 6f 77 50 61 72 74 2c 20 | 57 69 6e 64 6f 77 50 74 |owPart, |WindowPt|
|00003120| 72 20 77 68 69 63 68 57 | 69 6e 64 6f 77 2c 20 45 |r whichW|indow, E|
|00003130| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 6d 79 45 76 |ventReco|rd *myEv|
|00003140| 65 6e 74 29 0d 0d 7b 0d | 09 73 77 69 74 63 68 20 |ent)..{.|.switch |
|00003150| 28 77 69 6e 64 6f 77 50 | 61 72 74 29 20 7b 0d 09 |(windowP|art) {..|
|00003160| 09 63 61 73 65 20 69 6e | 47 6f 41 77 61 79 3a 0d |.case in|GoAway:.|
|00003170| 09 09 09 69 66 20 28 6f | 75 72 73 28 77 68 69 63 |...if (o|urs(whic|
|00003180| 68 57 69 6e 64 6f 77 29 | 20 26 26 20 28 50 4f 56 |hWindow)| && (POV|
|00003190| 5f 72 75 6e 6e 69 6e 67 | 20 3d 3d 20 30 29 29 0d |_running| == 0)).|
|000031a0| 09 09 09 09 69 66 20 28 | 54 72 61 63 6b 47 6f 41 |....if (|TrackGoA|
|000031b0| 77 61 79 28 54 65 78 74 | 45 64 69 74 57 69 6e 64 |way(Text|EditWind|
|000031c0| 6f 77 2c 20 6d 79 45 76 | 65 6e 74 2d 3e 77 68 65 |ow, myEv|ent->whe|
|000031d0| 72 65 29 29 0d 09 09 09 | 09 09 44 6f 46 69 6c 65 |re))....|..DoFile|
|000031e0| 28 66 6d 6e 5f 63 6c 6f | 73 65 29 3b 0d 09 09 09 |(fmn_clo|se);....|
|000031f0| 62 72 65 61 6b 3b 0d 0d | 09 09 63 61 73 65 20 69 |break;..|..case i|
|00003200| 6e 44 72 61 67 3a 0d 09 | 09 09 69 66 20 28 6f 75 |nDrag:..|..if (ou|
|00003210| 72 73 28 77 68 69 63 68 | 57 69 6e 64 6f 77 29 29 |rs(which|Window))|
|00003220| 0d 09 09 09 7b 09 2f 2f | 20 61 64 64 65 64 20 5b |....{.//| added [|
|00003230| 65 73 70 5d 0d 09 09 09 | 09 44 72 61 67 57 69 6e |esp]....|.DragWin|
|00003240| 64 6f 77 28 77 68 69 63 | 68 57 69 6e 64 6f 77 2c |dow(whic|hWindow,|
|00003250| 20 6d 79 45 76 65 6e 74 | 2d 3e 77 68 65 72 65 2c | myEvent|->where,|
|00003260| 20 26 64 72 61 67 52 65 | 63 74 29 3b 0d 09 09 09 | &dragRe|ct);....|
|00003270| 09 67 65 74 5f 57 69 6e | 64 6f 77 50 6f 73 28 77 |.get_Win|dowPos(w|
|00003280| 68 69 63 68 57 69 6e 64 | 6f 77 2c 20 26 66 69 6c |hichWind|ow, &fil|
|00003290| 65 5f 73 65 74 74 69 6e | 67 73 2d 3e 73 72 63 57 |e_settin|gs->srcW|
|000032a0| 69 6e 64 5f 70 6f 73 29 | 3b 09 2f 2f 20 61 64 64 |ind_pos)|;.// add|
|000032b0| 65 64 20 5b 65 73 70 5d | 0d 09 09 09 7d 09 2f 2f |ed [esp]|....}.//|
|000032c0| 20 61 64 64 65 64 20 5b | 65 73 70 5d 0d 09 09 09 | added [|esp]....|
|000032d0| 62 72 65 61 6b 3b 0d 0d | 09 09 63 61 73 65 20 69 |break;..|..case i|
|000032e0| 6e 47 72 6f 77 3a 0d 09 | 09 09 69 66 20 28 6f 75 |nGrow:..|..if (ou|
|000032f0| 72 73 28 77 68 69 63 68 | 57 69 6e 64 6f 77 29 29 |rs(which|Window))|
|00003300| 0d 09 09 09 09 4d 79 47 | 72 6f 77 57 69 6e 64 6f |.....MyG|rowWindo|
|00003310| 77 28 77 68 69 63 68 57 | 69 6e 64 6f 77 2c 20 6d |w(whichW|indow, m|
|00003320| 79 45 76 65 6e 74 2d 3e | 77 68 65 72 65 29 3b 0d |yEvent->|where);.|
|00003330| 09 09 09 62 72 65 61 6b | 3b 0d 0d 09 09 63 61 73 |...break|;....cas|
|00003340| 65 20 69 6e 43 6f 6e 74 | 65 6e 74 3a 0d 09 09 09 |e inCont|ent:....|
|00003350| 69 66 20 28 77 68 69 63 | 68 57 69 6e 64 6f 77 20 |if (whic|hWindow |
|00003360| 21 3d 20 46 72 6f 6e 74 | 57 69 6e 64 6f 77 28 29 |!= Front|Window()|
|00003370| 29 0d 09 09 09 09 53 65 | 6c 65 63 74 57 69 6e 64 |).....Se|lectWind|
|00003380| 6f 77 28 77 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |ow(which|Window);|
|00003390| 0d 09 09 09 65 6c 73 65 | 20 69 66 20 28 6f 75 72 |....else| if (our|
|000033a0| 73 28 77 68 69 63 68 57 | 69 6e 64 6f 77 29 29 0d |s(whichW|indow)).|
|000033b0| 09 09 09 09 44 6f 43 6f | 6e 74 65 6e 74 28 77 68 |....DoCo|ntent(wh|
|000033c0| 69 63 68 57 69 6e 64 6f | 77 2c 20 6d 79 45 76 65 |ichWindo|w, myEve|
|000033d0| 6e 74 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |nt);....|break;..|
|000033e0| 7d 0d 09 72 65 74 75 72 | 6e 20 30 3b 20 2f 2f 20 |}..retur|n 0; // |
|000033f0| 73 68 6f 75 6c 64 20 62 | 65 20 76 6f 69 64 20 66 |should b|e void f|
|00003400| 6e 21 3f 0d 7d 0d 0d 0d | 0d 0d 0d 69 6e 74 20 4d |n!?.}...|...int M|
|00003410| 61 69 6e 74 61 69 6e 43 | 75 72 73 6f 72 28 76 6f |aintainC|ursor(vo|
|00003420| 69 64 29 0d 7b 0d 09 50 | 6f 69 6e 74 09 09 70 74 |id).{..P|oint..pt|
|00003430| 3b 0d 09 57 69 6e 64 6f | 77 50 65 65 6b 09 77 50 |;..Windo|wPeek.wP|
|00003440| 74 72 3b 0d 09 47 72 61 | 66 50 74 72 09 09 73 61 |tr;..Gra|fPtr..sa|
|00003450| 76 65 50 6f 72 74 3b 0d | 09 0d 09 69 66 20 28 6f |vePort;.|...if (o|
|00003460| 75 72 73 28 28 57 69 6e | 64 6f 77 50 74 72 29 28 |urs((Win|dowPtr)(|
|00003470| 77 50 74 72 3d 28 57 69 | 6e 64 6f 77 50 65 65 6b |wPtr=(Wi|ndowPeek|
|00003480| 29 46 72 6f 6e 74 57 69 | 6e 64 6f 77 28 29 29 29 |)FrontWi|ndow()))|
|00003490| 29 20 7b 0d 09 09 47 65 | 74 50 6f 72 74 28 26 73 |) {...Ge|tPort(&s|
|000034a0| 61 76 65 50 6f 72 74 29 | 3b 0d 09 09 53 65 74 50 |avePort)|;...SetP|
|000034b0| 6f 72 74 28 28 47 72 61 | 66 50 74 72 29 77 50 74 |ort((Gra|fPtr)wPt|
|000034c0| 72 29 3b 0d 09 09 47 65 | 74 4d 6f 75 73 65 28 26 |r);...Ge|tMouse(&|
|000034d0| 70 74 29 3b 0d 09 09 69 | 66 20 28 50 74 49 6e 52 |pt);...i|f (PtInR|
|000034e0| 65 63 74 28 70 74 2c 20 | 26 28 2a 2a 54 45 48 29 |ect(pt, |&(**TEH)|
|000034f0| 2e 76 69 65 77 52 65 63 | 74 20 29 20 29 0d 09 09 |.viewRec|t ) )...|
|00003500| 09 53 65 74 43 75 72 73 | 6f 72 28 20 26 65 64 69 |.SetCurs|or( &edi|
|00003510| 74 43 75 72 73 6f 72 29 | 3b 0d 09 09 65 6c 73 65 |tCursor)|;...else|
|00003520| 20 53 65 74 43 75 72 73 | 6f 72 28 26 71 64 2e 61 | SetCurs|or(&qd.a|
|00003530| 72 72 6f 77 29 3b 0d 09 | 09 53 65 74 50 6f 72 74 |rrow);..|.SetPort|
|00003540| 28 73 61 76 65 50 6f 72 | 74 29 3b 0d 09 7d 0d 09 |(savePor|t);..}..|
|00003550| 72 65 74 75 72 6e 20 30 | 3b 20 2f 2f 20 73 68 6f |return 0|; // sho|
|00003560| 75 6c 64 20 62 65 20 76 | 6f 69 64 20 66 6e 21 3f |uld be v|oid fn!?|
|00003570| 0d 7d 0d 0d 0d 0d 69 6e | 74 20 53 65 74 55 70 43 |.}....in|t SetUpC|
|00003580| 75 72 73 6f 72 73 28 76 | 6f 69 64 29 0d 7b 0d 09 |ursors(v|oid).{..|
|00003590| 43 75 72 73 48 61 6e 64 | 6c 65 09 68 43 75 72 73 |CursHand|le.hCurs|
|000035a0| 3b 0d 09 0d 09 68 43 75 | 72 73 20 3d 20 47 65 74 |;....hCu|rs = Get|
|000035b0| 43 75 72 73 6f 72 28 31 | 29 3b 0d 09 65 64 69 74 |Cursor(1|);..edit|
|000035c0| 43 75 72 73 6f 72 20 3d | 20 2a 2a 68 43 75 72 73 |Cursor =| **hCurs|
|000035d0| 3b 0d 09 68 43 75 72 73 | 20 3d 20 47 65 74 43 75 |;..hCurs| = GetCu|
|000035e0| 72 73 6f 72 28 77 61 74 | 63 68 43 75 72 73 6f 72 |rsor(wat|chCursor|
|000035f0| 29 3b 0d 09 77 61 69 74 | 43 75 72 73 6f 72 20 3d |);..wait|Cursor =|
|00003600| 20 2a 2a 68 43 75 72 73 | 3b 0d 09 72 65 74 75 72 | **hCurs|;..retur|
|00003610| 6e 20 30 3b 20 2f 2f 20 | 73 68 6f 75 6c 64 20 62 |n 0; // |should b|
|00003620| 65 20 76 6f 69 64 20 66 | 6e 21 3f 0d 7d 0d 0d 23 |e void f|n!?.}..#|
|00003630| 64 65 66 69 6e 65 20 74 | 6f 70 4d 61 72 67 69 6e |define t|opMargin|
|00003640| 20 32 30 0d 23 64 65 66 | 69 6e 65 20 6c 65 66 74 | 20.#def|ine left|
|00003650| 4d 61 72 67 69 6e 20 32 | 30 0d 23 64 65 66 69 6e |Margin 2|0.#defin|
|00003660| 65 20 62 6f 74 74 6f 6d | 4d 61 72 67 69 6e 20 32 |e bottom|Margin 2|
|00003670| 30 0d 23 64 65 66 69 6e | 65 20 74 61 62 43 68 61 |0.#defin|e tabCha|
|00003680| 72 09 28 28 63 68 61 72 | 29 27 5c 74 27 29 0d 0d |r.((char|)'\t')..|
|00003690| 73 74 61 74 69 63 09 54 | 48 50 72 69 6e 74 09 68 |static.T|HPrint.h|
|000036a0| 50 72 69 6e 74 20 3d 20 | 4e 55 4c 4c 3b 0d 73 74 |Print = |NULL;.st|
|000036b0| 61 74 69 63 09 69 6e 74 | 09 09 74 61 62 57 69 64 |atic.int|..tabWid|
|000036c0| 74 68 3b 0d 0d 0d 0d 09 | 2f 2a 2a 0d 09 20 2a 2a |th;.....|/**.. **|
|000036d0| 09 09 50 72 6f 74 6f 74 | 79 70 65 73 20 66 6f 72 |..Protot|ypes for|
|000036e0| 20 70 72 69 76 61 74 65 | 20 66 75 6e 63 74 69 6f | private| functio|
|000036f0| 6e 73 2e 0d 09 20 2a 2a | 09 09 28 54 68 65 79 20 |ns... **|..(They |
|00003700| 72 65 61 6c 6c 79 20 73 | 68 6f 75 6c 64 20 62 65 |really s|hould be|
|00003710| 20 73 74 61 74 69 63 2e | 29 0d 09 20 2a 2a 0d 09 | static.|).. **..|
|00003720| 20 2a 2a 2f 0d 20 0d 69 | 6e 74 09 43 68 65 63 6b | **/. .i|nt.Check|
|00003730| 50 72 69 6e 74 48 61 6e | 64 6c 65 28 76 6f 69 64 |PrintHan|dle(void|
|00003740| 29 3b 0d 69 6e 74 20 4d | 79 44 72 61 77 54 65 78 |);.int M|yDrawTex|
|00003750| 74 28 63 68 61 72 20 2a | 70 2c 20 69 6e 74 20 63 |t(char *|p, int c|
|00003760| 6f 75 6e 74 29 3b 0d 69 | 6e 74 20 50 72 44 6f 63 |ount);.i|nt PrDoc|
|00003770| 28 63 68 61 72 20 2a 2a | 68 54 65 78 74 2c 20 6c |(char **|hText, l|
|00003780| 6f 6e 67 20 63 6f 75 6e | 74 2c 20 54 48 50 72 69 |ong coun|t, THPri|
|00003790| 6e 74 20 68 50 72 69 6e | 74 2c 20 69 6e 74 20 66 |nt hPrin|t, int f|
|000037a0| 6f 6e 74 2c 20 69 6e 74 | 20 73 69 7a 65 29 3b 0d |ont, int| size);.|
|000037b0| 69 6e 74 20 48 6f 77 4d | 61 6e 79 28 76 6f 69 64 |int HowM|any(void|
|000037c0| 29 3b 0d 0d 0d 43 68 65 | 63 6b 50 72 69 6e 74 48 |);...Che|ckPrintH|
|000037d0| 61 6e 64 6c 65 28 29 0d | 7b 0d 09 69 66 20 28 68 |andle().|{..if (h|
|000037e0| 50 72 69 6e 74 3d 3d 4e | 55 4c 4c 29 20 0d 09 09 |Print==N|ULL) ...|
|000037f0| 50 72 69 6e 74 44 65 66 | 61 75 6c 74 28 68 50 72 |PrintDef|ault(hPr|
|00003800| 69 6e 74 20 3d 20 28 54 | 50 72 69 6e 74 20 2a 2a |int = (T|Print **|
|00003810| 29 20 4e 65 77 48 61 6e | 64 6c 65 28 73 69 7a 65 |) NewHan|dle(size|
|00003820| 6f 66 28 20 54 50 72 69 | 6e 74 29 29 29 3b 0d 7d |of( TPri|nt)));.}|
|00003830| 0d 0d 44 6f 50 61 67 65 | 53 65 74 55 70 28 29 0d |..DoPage|SetUp().|
|00003840| 7b 0d 09 50 72 4f 70 65 | 6e 28 29 3b 0d 09 43 68 |{..PrOpe|n();..Ch|
|00003850| 65 63 6b 50 72 69 6e 74 | 48 61 6e 64 6c 65 28 29 |eckPrint|Handle()|
|00003860| 3b 0d 09 69 66 20 28 50 | 72 53 74 6c 44 69 61 6c |;..if (P|rStlDial|
|00003870| 6f 67 28 68 50 72 69 6e | 74 29 29 20 3b 0d 09 50 |og(hPrin|t)) ;..P|
|00003880| 72 43 6c 6f 73 65 28 29 | 3b 0d 7d 0d 0d 0d 4d 79 |rClose()|;.}...My|
|00003890| 44 72 61 77 54 65 78 74 | 28 63 68 61 72 09 2a 70 |DrawText|(char.*p|
|000038a0| 2c 20 69 6e 74 20 63 6f | 75 6e 74 29 0d 7b 0d 09 |, int co|unt).{..|
|000038b0| 72 65 67 69 73 74 65 72 | 20 63 68 61 72 09 2a 70 |register| char.*p|
|000038c0| 31 2c 20 2a 70 32 3b 0d | 09 69 6e 74 09 09 09 09 |1, *p2;.|.int....|
|000038d0| 6c 65 6e 3b 0d 09 50 6f | 69 6e 74 09 09 09 70 74 |len;..Po|int...pt|
|000038e0| 3b 0d 0d 09 70 31 20 3d | 20 70 3b 0d 09 70 32 20 |;...p1 =| p;..p2 |
|000038f0| 3d 20 70 2b 63 6f 75 6e | 74 3b 0d 09 77 68 69 6c |= p+coun|t;..whil|
|00003900| 65 20 28 70 3c 70 32 29 | 20 7b 0d 09 09 77 68 69 |e (p<p2)| {...whi|
|00003910| 6c 65 20 28 28 70 31 3c | 70 32 29 20 26 26 20 28 |le ((p1<|p2) && (|
|00003920| 2a 70 31 20 21 3d 74 61 | 62 43 68 61 72 29 29 20 |*p1 !=ta|bChar)) |
|00003930| 2a 70 31 2b 2b 3b 0d 09 | 09 69 66 20 28 28 6c 65 |*p1++;..|.if ((le|
|00003940| 6e 3d 70 31 2d 70 29 3e | 30 29 20 44 72 61 77 54 |n=p1-p)>|0) DrawT|
|00003950| 65 78 74 28 70 2c 20 30 | 2c 20 70 31 2d 70 29 3b |ext(p, 0|, p1-p);|
|00003960| 0d 09 09 69 66 20 28 2a | 70 31 3d 3d 74 61 62 43 |...if (*|p1==tabC|
|00003970| 68 61 72 29 20 7b 0d 09 | 09 09 47 65 74 50 65 6e |har) {..|..GetPen|
|00003980| 28 26 70 74 29 3b 0d 09 | 09 09 4d 6f 76 65 28 28 |(&pt);..|..Move((|
|00003990| 74 61 62 57 69 64 74 68 | 2d 28 70 74 2e 68 2d 6c |tabWidth|-(pt.h-l|
|000039a0| 65 66 74 4d 61 72 67 69 | 6e 29 25 74 61 62 57 69 |eftMargi|n)%tabWi|
|000039b0| 64 74 68 29 2c 20 30 29 | 3b 0d 09 09 09 2a 70 31 |dth), 0)|;....*p1|
|000039c0| 2b 2b 3b 0d 09 09 7d 0d | 09 09 70 20 3d 20 70 31 |++;...}.|..p = p1|
|000039d0| 3b 0d 09 7d 0d 7d 0d 0d | 50 72 44 6f 63 20 28 63 |;..}.}..|PrDoc (c|
|000039e0| 68 61 72 20 2a 2a 68 54 | 65 78 74 2c 20 6c 6f 6e |har **hT|ext, lon|
|000039f0| 67 20 63 6f 75 6e 74 2c | 20 54 48 50 72 69 6e 74 |g count,| THPrint|
|00003a00| 20 68 50 72 69 6e 74 2c | 20 69 6e 74 20 66 6f 6e | hPrint,| int fon|
|00003a10| 74 2c 20 69 6e 74 20 73 | 69 7a 65 29 0d 7b 0d 09 |t, int s|ize).{..|
|00003a20| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 09 6c 69 |register| int .li|
|00003a30| 6e 65 20 3d 20 30 3b 0d | 09 72 65 67 69 73 74 65 |ne = 0;.|.registe|
|00003a40| 72 20 69 6e 74 20 09 6c | 61 73 74 4c 69 6e 65 4f |r int .l|astLineO|
|00003a50| 6e 50 61 67 65 20 3d 20 | 30 3b 0d 09 69 6e 74 09 |nPage = |0;..int.|
|00003a60| 09 09 09 6c 65 6e 67 74 | 68 3b 0d 09 52 65 63 74 |...lengt|h;..Rect|
|00003a70| 20 09 09 09 70 72 69 6e | 74 52 65 63 74 3b 0d 09 | ...prin|tRect;..|
|00003a80| 69 6e 74 20 09 09 09 6c | 69 6e 65 73 50 65 72 50 |int ...l|inesPerP|
|00003a90| 61 67 65 3b 0d 09 69 6e | 74 20 09 09 09 6c 69 6e |age;..in|t ...lin|
|00003aa0| 65 42 61 73 65 3b 0d 09 | 69 6e 74 20 09 09 09 6c |eBase;..|int ...l|
|00003ab0| 69 6e 65 48 65 69 67 68 | 74 3b 0d 09 72 65 67 69 |ineHeigh|t;..regi|
|00003ac0| 73 74 65 72 20 63 68 61 | 72 20 09 2a 70 74 72 2c |ster cha|r .*ptr,|
|00003ad0| 20 2a 70 31 3b 0d 09 46 | 6f 6e 74 49 6e 66 6f 09 | *p1;..F|ontInfo.|
|00003ae0| 09 69 6e 66 6f 3b 0d 09 | 54 50 50 72 50 6f 72 74 |.info;..|TPPrPort|
|00003af0| 09 09 70 72 69 6e 74 50 | 6f 72 74 3b 0d 0d 09 70 |..printP|ort;...p|
|00003b00| 72 69 6e 74 50 6f 72 74 | 20 3d 20 50 72 4f 70 65 |rintPort| = PrOpe|
|00003b10| 6e 44 6f 63 28 68 50 72 | 69 6e 74 2c 20 30 4c 2c |nDoc(hPr|int, 0L,|
|00003b20| 20 30 4c 29 3b 0d 09 53 | 65 74 50 6f 72 74 28 28 | 0L);..S|etPort((|
|00003b30| 47 72 61 66 50 74 72 29 | 70 72 69 6e 74 50 6f 72 |GrafPtr)|printPor|
|00003b40| 74 29 3b 0d 09 54 65 78 | 74 46 6f 6e 74 28 66 6f |t);..Tex|tFont(fo|
|00003b50| 6e 74 29 3b 0d 09 54 65 | 78 74 53 69 7a 65 28 73 |nt);..Te|xtSize(s|
|00003b60| 69 7a 65 29 3b 0d 09 70 | 72 69 6e 74 52 65 63 74 |ize);..p|rintRect|
|00003b70| 20 3d 20 28 2a 2a 68 50 | 72 69 6e 74 29 2e 70 72 | = (**hP|rint).pr|
|00003b80| 49 6e 66 6f 2e 72 50 61 | 67 65 3b 0d 09 47 65 74 |Info.rPa|ge;..Get|
|00003b90| 46 6f 6e 74 49 6e 66 6f | 28 26 69 6e 66 6f 29 3b |FontInfo|(&info);|
|00003ba0| 0d 09 6c 69 6e 65 48 65 | 69 67 68 74 20 3d 20 69 |..lineHe|ight = i|
|00003bb0| 6e 66 6f 2e 6c 65 61 64 | 69 6e 67 2b 69 6e 66 6f |nfo.lead|ing+info|
|00003bc0| 2e 61 73 63 65 6e 74 2b | 69 6e 66 6f 2e 64 65 73 |.ascent+|info.des|
|00003bd0| 63 65 6e 74 3b 0d 09 6c | 69 6e 65 73 50 65 72 50 |cent;..l|inesPerP|
|00003be0| 61 67 65 20 3d 20 0d 09 | 09 28 70 72 69 6e 74 52 |age = ..|.(printR|
|00003bf0| 65 63 74 2e 62 6f 74 74 | 6f 6d 2d 70 72 69 6e 74 |ect.bott|om-print|
|00003c00| 52 65 63 74 2e 74 6f 70 | 2d 74 6f 70 4d 61 72 67 |Rect.top|-topMarg|
|00003c10| 69 6e 2d 62 6f 74 74 6f | 6d 4d 61 72 67 69 6e 29 |in-botto|mMargin)|
|00003c20| 2f 6c 69 6e 65 48 65 69 | 67 68 74 3b 0d 09 48 4c |/lineHei|ght;..HL|
|00003c30| 6f 63 6b 28 68 54 65 78 | 74 29 3b 0d 09 70 74 72 |ock(hTex|t);..ptr|
|00003c40| 20 3d 20 70 31 20 3d 20 | 28 2a 68 54 65 78 74 29 | = p1 = |(*hText)|
|00003c50| 3b 0d 09 64 6f 20 7b 0d | 09 09 50 72 4f 70 65 6e |;..do {.|..PrOpen|
|00003c60| 50 61 67 65 28 70 72 69 | 6e 74 50 6f 72 74 2c 20 |Page(pri|ntPort, |
|00003c70| 30 4c 29 3b 0d 09 09 6c | 61 73 74 4c 69 6e 65 4f |0L);...l|astLineO|
|00003c80| 6e 50 61 67 65 20 2b 3d | 20 6c 69 6e 65 73 50 65 |nPage +=| linesPe|
|00003c90| 72 50 61 67 65 3b 0d 09 | 09 4d 6f 76 65 54 6f 28 |rPage;..|.MoveTo(|
|00003ca0| 20 70 72 69 6e 74 52 65 | 63 74 2e 6c 65 66 74 2b | printRe|ct.left+|
|00003cb0| 6c 65 66 74 4d 61 72 67 | 69 6e 2c 20 0d 09 09 09 |leftMarg|in, ....|
|00003cc0| 28 6c 69 6e 65 42 61 73 | 65 20 3d 20 70 72 69 6e |(lineBas|e = prin|
|00003cd0| 74 52 65 63 74 2e 74 6f | 70 2b 6c 69 6e 65 48 65 |tRect.to|p+lineHe|
|00003ce0| 69 67 68 74 29 20 29 3b | 0d 09 09 64 6f 20 7b 0d |ight) );|...do {.|
|00003cf0| 09 09 09 2f 2a 20 50 72 | 69 6e 74 4c 69 6e 65 3a |.../* Pr|intLine:|
|00003d00| 20 2a 2f 0d 09 09 09 77 | 68 69 6c 65 20 28 28 70 | */....w|hile ((p|
|00003d10| 74 72 3c 3d 28 2a 68 54 | 65 78 74 29 2b 63 6f 75 |tr<=(*hT|ext)+cou|
|00003d20| 6e 74 29 20 26 26 20 28 | 2a 70 74 72 2b 2b 20 21 |nt) && (|*ptr++ !|
|00003d30| 3d 20 28 63 68 61 72 29 | 27 5c 72 27 29 29 20 3b |= (char)|'\r')) ;|
|00003d40| 0d 09 09 09 69 66 20 28 | 28 6c 65 6e 67 74 68 3d |....if (|(length=|
|00003d50| 28 69 6e 74 29 28 70 74 | 72 2d 70 31 29 2d 31 29 |(int)(pt|r-p1)-1)|
|00003d60| 3e 30 29 0d 09 09 09 09 | 4d 79 44 72 61 77 54 65 |>0).....|MyDrawTe|
|00003d70| 78 74 28 70 31 2c 20 6c | 65 6e 67 74 68 29 3b 0d |xt(p1, l|ength);.|
|00003d80| 09 09 09 4d 6f 76 65 54 | 6f 28 20 70 72 69 6e 74 |...MoveT|o( print|
|00003d90| 52 65 63 74 2e 6c 65 66 | 74 2b 6c 65 66 74 4d 61 |Rect.lef|t+leftMa|
|00003da0| 72 67 69 6e 2c 20 28 6c | 69 6e 65 42 61 73 65 20 |rgin, (l|ineBase |
|00003db0| 2b 3d 20 6c 69 6e 65 48 | 65 69 67 68 74 29 29 3b |+= lineH|eight));|
|00003dc0| 0d 09 09 09 70 31 20 3d | 20 70 74 72 3b 0d 09 09 |....p1 =| ptr;...|
|00003dd0| 7d 20 77 68 69 6c 65 20 | 28 28 2b 2b 6c 69 6e 65 |} while |((++line|
|00003de0| 20 21 3d 20 6c 61 73 74 | 4c 69 6e 65 4f 6e 50 61 | != last|LineOnPa|
|00003df0| 67 65 29 20 26 26 20 28 | 70 74 72 3c 28 2a 68 54 |ge) && (|ptr<(*hT|
|00003e00| 65 78 74 29 2b 63 6f 75 | 6e 74 29 29 3b 0d 09 09 |ext)+cou|nt));...|
|00003e10| 50 72 43 6c 6f 73 65 50 | 61 67 65 28 70 72 69 6e |PrCloseP|age(prin|
|00003e20| 74 50 6f 72 74 29 3b 0d | 09 7d 20 77 68 69 6c 65 |tPort);.|.} while|
|00003e30| 20 28 70 74 72 3c 28 2a | 68 54 65 78 74 29 2b 63 | (ptr<(*|hText)+c|
|00003e40| 6f 75 6e 74 29 3b 0d 09 | 48 55 6e 6c 6f 63 6b 28 |ount);..|HUnlock(|
|00003e50| 68 54 65 78 74 29 3b 0d | 09 50 72 43 6c 6f 73 65 |hText);.|.PrClose|
|00003e60| 44 6f 63 28 70 72 69 6e | 74 50 6f 72 74 29 3b 0d |Doc(prin|tPort);.|
|00003e70| 7d 0d 0d 50 72 69 6e 74 | 54 65 78 74 28 63 68 61 |}..Print|Text(cha|
|00003e80| 72 09 2a 2a 68 54 65 78 | 74 2c 20 6c 6f 6e 67 20 |r.**hTex|t, long |
|00003e90| 6c 65 6e 67 74 68 2c 20 | 47 72 61 66 50 74 72 20 |length, |GrafPtr |
|00003ea0| 67 70 2c 20 69 6e 74 20 | 74 61 62 50 69 78 65 6c |gp, int |tabPixel|
|00003eb0| 73 29 0d 0d 7b 0d 09 47 | 72 61 66 50 74 72 09 09 |s)..{..G|rafPtr..|
|00003ec0| 73 61 76 65 50 6f 72 74 | 3b 0d 09 54 50 72 53 74 |savePort|;..TPrSt|
|00003ed0| 61 74 75 73 09 70 72 53 | 74 61 74 75 73 3b 0d 09 |atus.prS|tatus;..|
|00003ee0| 69 6e 74 09 09 09 63 6f | 70 69 65 73 3b 0d 09 0d |int...co|pies;...|
|00003ef0| 20 20 20 20 50 72 4f 70 | 65 6e 28 29 3b 0d 09 43 | PrOp|en();..C|
|00003f00| 68 65 63 6b 50 72 69 6e | 74 48 61 6e 64 6c 65 28 |heckPrin|tHandle(|
|00003f10| 29 3b 0d 09 74 61 62 57 | 69 64 74 68 20 3d 20 74 |);..tabW|idth = t|
|00003f20| 61 62 50 69 78 65 6c 73 | 3b 0d 09 53 65 74 43 75 |abPixels|;..SetCu|
|00003f30| 72 73 6f 72 28 26 71 64 | 2e 61 72 72 6f 77 29 3b |rsor(&qd|.arrow);|
|00003f40| 0d 09 69 66 20 28 50 72 | 4a 6f 62 44 69 61 6c 6f |..if (Pr|JobDialo|
|00003f50| 67 28 68 50 72 69 6e 74 | 29 20 21 3d 20 30 29 20 |g(hPrint|) != 0) |
|00003f60| 7b 0d 09 09 50 6c 65 61 | 73 65 57 61 69 74 28 29 |{...Plea|seWait()|
|00003f70| 3b 0d 09 09 47 65 74 50 | 6f 72 74 28 26 73 61 76 |;...GetP|ort(&sav|
|00003f80| 65 50 6f 72 74 29 3b 0d | 09 09 66 6f 72 20 28 63 |ePort);.|..for (c|
|00003f90| 6f 70 69 65 73 3d 48 6f | 77 4d 61 6e 79 28 29 3b |opies=Ho|wMany();|
|00003fa0| 20 63 6f 70 69 65 73 3e | 30 3b 20 63 6f 70 69 65 | copies>|0; copie|
|00003fb0| 73 2d 2d 29 20 7b 0d 09 | 09 09 50 72 44 6f 63 20 |s--) {..|..PrDoc |
|00003fc0| 28 68 54 65 78 74 2c 20 | 6c 65 6e 67 74 68 2c 20 |(hText, |length, |
|00003fd0| 68 50 72 69 6e 74 2c 20 | 28 2a 67 70 29 2e 74 78 |hPrint, |(*gp).tx|
|00003fe0| 46 6f 6e 74 2c 20 28 2a | 67 70 29 2e 74 78 53 69 |Font, (*|gp).txSi|
|00003ff0| 7a 65 29 3b 0d 09 09 09 | 50 72 50 69 63 46 69 6c |ze);....|PrPicFil|
|00004000| 65 28 68 50 72 69 6e 74 | 2c 20 30 4c 2c 20 30 4c |e(hPrint|, 0L, 0L|
|00004010| 2c 20 30 4c 2c 20 26 70 | 72 53 74 61 74 75 73 29 |, 0L, &p|rStatus)|
|00004020| 3b 0d 09 09 7d 0d 09 09 | 53 65 74 50 6f 72 74 28 |;...}...|SetPort(|
|00004030| 73 61 76 65 50 6f 72 74 | 29 3b 0d 09 7d 0d 09 50 |savePort|);..}..P|
|00004040| 72 43 6c 6f 73 65 28 29 | 3b 0d 7d 0d 0d 69 6e 74 |rClose()|;.}..int|
|00004050| 20 48 6f 77 4d 61 6e 79 | 28 76 6f 69 64 29 0d 7b | HowMany|(void).{|
|00004060| 0d 09 72 65 74 75 72 6e | 28 20 28 28 2a 2a 68 50 |..return|( ((**hP|
|00004070| 72 69 6e 74 29 2e 70 72 | 4a 6f 62 2e 62 4a 44 6f |rint).pr|Job.bJDo|
|00004080| 63 4c 6f 6f 70 3d 3d 62 | 44 72 61 66 74 4c 6f 6f |cLoop==b|DraftLoo|
|00004090| 70 29 20 3f 20 0d 09 09 | 09 09 28 2a 2a 68 50 72 |p) ? ...|..(**hPr|
|000040a0| 69 6e 74 29 2e 70 72 4a | 6f 62 2e 69 43 6f 70 69 |int).prJ|ob.iCopi|
|000040b0| 65 73 20 3a 20 31 20 29 | 3b 0d 7d 0d 0d 0d 00 00 |es : 1 )|;.}.....|
|000040c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004100| 00 00 01 00 00 00 02 d2 | 00 00 01 d2 00 00 00 4a |........|.......J|
|00004110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004130| 0c 74 65 78 74 45 64 69 | 74 6f 72 2e 63 21 02 00 |.textEdi|tor.c!..|
|00004140| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|00004150| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|00004160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004170| 00 00 a6 5d 3e cb 00 00 | 00 00 00 00 03 1c 00 00 |...]>...|........|
|00004180| 00 00 00 00 00 00 00 00 | 00 00 00 02 00 00 00 00 |........|........|
|00004190| 00 00 00 30 00 03 00 00 | 00 00 00 00 00 00 00 00 |...0....|........|
|000041a0| 30 00 00 30 00 03 00 00 | 03 00 00 00 00 00 30 00 |0..0....|......0.|
|000041b0| 03 00 00 30 00 03 00 00 | 30 00 03 00 00 00 03 00 |...0....|0.......|
|000041c0| 00 30 00 00 00 00 00 03 | 00 00 30 00 00 00 00 30 |.0......|..0....0|
|000041d0| 00 00 00 00 00 00 00 00 | 00 03 00 00 00 00 00 03 |........|........|
|000041e0| 00 00 00 00 00 00 00 00 | 00 30 00 00 00 03 00 00 |........|.0......|
|000041f0| 00 00 0d aa aa aa ad 00 | 00 00 00 00 30 00 30 00 |........|....0.0.|
|00004200| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00004210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004220| 00 00 00 00 00 00 00 06 | 00 04 00 3f 00 10 01 8b |........|...?....|
|00004230| 02 01 00 3f 00 10 01 8b | 02 01 a6 1b 42 d9 00 00 |...?....|....B...|
|00004240| 2c 8e 00 00 2c 8e 00 00 | 2b 53 01 00 00 00 00 1e |,...,...|+S......|
|00004250| 00 3f 00 10 01 8b 02 01 | 00 3f 00 10 01 8b 02 01 |.?......|.?......|
|00004260| 00 00 2b 53 00 00 00 00 | 00 00 00 00 00 00 00 00 |..+S....|........|
|00004270| 01 60 00 11 00 00 37 45 | 00 00 37 55 11 43 68 65 |.`....7E|..7U.Che|
|00004280| 63 6b 50 72 69 6e 74 48 | 61 6e 64 6c 65 00 00 00 |ckPrintH|andle...|
|00004290| 2e 6f 00 00 2e 7c 0d 43 | 6c 6f 73 65 4d 79 57 69 |.o...|.C|loseMyWi|
|000042a0| 6e 64 6f 77 00 00 27 e5 | 00 00 27 ee 09 44 6f 43 |ndow..'.|..'..DoC|
|000042b0| 6f 6e 74 65 6e 74 00 00 | 37 b2 00 00 37 bd 0b 44 |ontent..|7...7..D|
|000042c0| 6f 50 61 67 65 53 65 74 | 55 70 00 00 1a 9d 00 00 |oPageSet|Up......|
|000042d0| 1a a6 09 46 69 6c 65 45 | 72 72 6f 72 00 00 3f d1 |...FileE|rror..?.|
|000042e0| 00 00 3f d8 07 48 6f 77 | 4d 61 6e 79 00 00 33 8f |..?..How|Many..3.|
|000042f0| 00 00 33 9d 0f 4d 61 69 | 6e 74 61 69 6e 43 75 72 |..3..Mai|ntainCur|
|00004300| 73 6f 72 00 00 00 30 17 | 00 00 30 20 09 6d 61 69 |sor...0.|..0 .mai|
|00004310| 6e 5f 69 6e 69 74 00 00 | 38 0e 00 00 38 18 0b 4d |n_init..|8...8..M|
|00004320| 79 44 72 61 77 54 65 78 | 74 00 00 00 2a 69 00 00 |yDrawTex|t...*i..|
|00004330| 2a 75 0d 4d 79 47 72 6f | 77 57 69 6e 64 6f 77 00 |*u.MyGro|wWindow.|
|00004340| 00 00 2f ec 00 00 2f f6 | 0b 50 6c 65 61 73 65 57 |../.../.|.PleaseW|
|00004350| 61 69 74 00 00 00 1b 63 | 00 00 1b 71 0f 50 72 65 |ait....c|...q.Pre|
|00004360| 49 6e 69 74 57 69 6e 64 | 6f 77 73 00 00 00 3d f3 |InitWind|ows...=.|
|00004370| 00 00 3d fc 09 50 72 69 | 6e 74 54 65 78 74 00 00 |..=..Pri|ntText..|
|00004380| 34 fa 00 00 35 06 0d 53 | 65 74 55 70 43 75 72 73 |4...5..S|etUpCurs|
|00004390| 6f 72 73 00 00 00 07 ac | 00 00 07 b6 0b 53 65 74 |ors.....|.....Set|
|000043a0| 55 70 46 69 6c 65 73 00 | 00 00 1b f9 00 00 1c 05 |UpFiles.|........|
|000043b0| 0d 53 65 74 55 70 57 69 | 6e 64 6f 77 73 00 00 00 |.SetUpWi|ndows...|
|000043c0| 1f cb 00 00 1f d5 0b 53 | 65 74 56 53 63 72 6f 6c |.......S|etVScrol|
|000043d0| 6c 00 00 00 01 00 00 00 | 02 d2 00 00 01 d2 00 00 |l.......|........|
|000043e0| 00 4a 00 5a 45 54 06 9e | 00 00 00 1c 00 4a 00 00 |.J.ZET..|.....J..|
|000043f0| 4d 50 53 52 00 02 00 0a | 03 ed ff ff 00 00 00 00 |MPSR....|........|
|00004400| 00 00 00 00 03 f0 ff ff | 00 00 00 4c 00 00 00 00 |........|...L....|
|00004410| 03 ef ff ff 00 00 00 6e | 00 00 00 00 00 00 00 00 |.......n|........|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+