home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1989-09-14 | 25.3 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| AMOS Picture Packer (image/amosPicturePacker)
| ext
| Supported |
1%
| dexvert
| Debian floppy split (archive/debianFloppySplit)
| ext
| Unsupported |
1%
| dexvert
| Sound Images sound sample (audio/soundImagesSoundSample)
| ext
| Unsupported |
1%
| dexvert
| DESI-III drawing (image/desiIIIDrawing)
| ext
| Unsupported |
1%
| dexvert
| MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable)
| ext
| Unsupported |
1%
| dexvert
| Alien Trilogytextures (other/alienTrilogyTextures)
| ext
| Unsupported |
1%
| dexvert
| APT cache data (other/aptCacheData)
| ext
| Unsupported |
1%
| dexvert
| CorelTRACE configuration (other/corelTRACEConfiguration)
| ext
| Unsupported |
1%
| dexvert
| Dreamcast Disc (other/dreamcastDisc)
| ext
| Unsupported |
1%
| dexvert
| EST flat binary (other/estFlatBinary)
| ext
| Unsupported |
1%
| dexvert
| Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat)
| ext
| Unsupported |
1%
| dexvert
| Sega Genesis/Megadrive/32x ROM (other/genesisROM)
| ext
| Unsupported |
1%
| dexvert
| Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive)
| ext
| Unsupported |
1%
| dexvert
| Sound Images Sound Driver (other/soundImagesSoundDriver)
| ext
| Unsupported |
1%
| dexvert
| Symantec/Norton Config (other/symantecNortonConfig)
| ext
| Unsupported |
1%
| dexvert
| Vectrex ROM (other/vectrexROM)
| ext
| Unsupported |
1%
| dexvert
| BIS raP encoded format (other/bisraPEncoded)
| ext
| Unsupported |
1%
| dexvert
| Pascal Script binary (other/pascalScriptBinary)
| ext
| Unsupported |
1%
| dexvert
| 7th Level game data archive (other/seventhLevelGameDataArchive)
| ext
| Unsupported |
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Binary Text (image/binaryText)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary, Sat Feb 18 13:29:33 1989, modified Sat Feb 18 14:59:51 1989, creator Think C, type ASCII, 25619 bytes "TransDisplay.c"
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| lsar
| MacBinary
| default
| |
100%
| gt2
| MAC Bilddatei
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 54 72 61 6e 73 44 | 69 73 70 6c 61 79 2e 63 |..TransD|isplay.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 64 13 00 | 00 00 00 a0 23 66 8d a0 |.....d..|....#f..|
|00000060| 23 7b b7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |#{......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 0d 09 54 72 61 6e | 73 44 69 73 70 6c 61 79 |/*..Tran|sDisplay|
|00000090| 20 76 65 72 73 69 6f 6e | 20 32 2e 30 20 2d 20 54 | version| 2.0 - T|
|000000a0| 72 61 6e 73 53 6b 65 6c | 20 70 6c 75 67 2d 69 6e |ransSkel| plug-in|
|000000b0| 20 6d 6f 64 75 6c 65 20 | 73 75 70 70 6f 72 74 69 | module |supporti|
|000000c0| 6e 67 0d 09 61 6e 20 61 | 72 62 69 74 72 61 72 79 |ng..an a|rbitrary|
|000000d0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 67 65 6e 65 72 | number |of gener|
|000000e0| 69 63 20 64 69 73 70 6c | 61 79 20 77 69 6e 64 6f |ic displ|ay windo|
|000000f0| 77 73 20 77 69 74 68 20 | 6d 65 6d 6f 72 79 2e 0d |ws with |memory..|
|00000100| 0d 09 54 72 61 6e 73 53 | 6b 65 6c 20 61 6e 64 20 |..TransS|kel and |
|00000110| 54 72 61 6e 73 44 69 73 | 70 6c 61 79 20 61 72 65 |TransDis|play are|
|00000120| 20 70 75 62 6c 69 63 20 | 64 6f 6d 61 69 6e 2c 20 | public |domain, |
|00000130| 61 6e 64 20 61 72 65 20 | 77 72 69 74 74 65 6e 20 |and are |written |
|00000140| 62 79 3a 0d 0d 09 09 09 | 50 61 75 6c 20 44 75 42 |by:.....|Paul DuB|
|00000150| 6f 69 73 0d 09 09 09 57 | 69 73 63 6f 6e 73 69 6e |ois....W|isconsin|
|00000160| 20 52 65 67 69 6f 6e 61 | 6c 20 50 72 69 6d 61 74 | Regiona|l Primat|
|00000170| 65 20 52 65 73 65 61 72 | 63 68 20 43 65 6e 74 65 |e Resear|ch Cente|
|00000180| 72 0d 09 09 09 31 32 32 | 30 20 43 61 70 69 74 6f |r....122|0 Capito|
|00000190| 6c 20 43 6f 75 72 74 0d | 09 09 09 4d 61 64 69 73 |l Court.|...Madis|
|000001a0| 6f 6e 2c 20 57 49 20 20 | 35 33 37 31 35 2d 31 32 |on, WI |53715-12|
|000001b0| 39 39 20 20 55 53 41 0d | 0d 09 55 55 43 50 3a 09 |99 USA.|..UUCP:.|
|000001c0| 7b 68 61 72 76 61 72 64 | 2c 72 75 74 67 65 72 73 |{harvard|,rutgers|
|000001d0| 2c 75 63 62 76 61 78 7d | 21 75 77 76 61 78 21 72 |,ucbvax}|!uwvax!r|
|000001e0| 68 65 73 75 73 21 64 75 | 62 6f 69 73 0d 09 41 52 |hesus!du|bois..AR|
|000001f0| 50 41 3a 09 64 75 62 6f | 69 73 40 70 72 69 6d 61 |PA:.dubo|is@prima|
|00000200| 74 65 2e 77 69 73 63 2e | 65 64 75 0d 0d 09 54 68 |te.wisc.|edu...Th|
|00000210| 69 73 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 54 72 |is versi|on of Tr|
|00000220| 61 6e 73 44 69 73 70 6c | 61 79 20 77 72 69 74 74 |ansDispl|ay writt|
|00000230| 65 6e 20 66 6f 72 20 4c | 69 67 68 74 73 70 65 65 |en for L|ightspee|
|00000240| 64 43 2e 20 20 4c 69 67 | 68 74 73 70 65 65 64 43 |dC. Lig|htspeedC|
|00000250| 0d 09 69 73 20 61 20 74 | 72 61 64 65 6d 61 72 6b |..is a t|rademark|
|00000260| 20 6f 66 3a 0d 09 09 09 | 54 48 49 4e 4b 20 54 65 | of:....|THINK Te|
|00000270| 63 68 6e 6f 6c 6f 67 69 | 65 73 2c 20 49 6e 63 0d |chnologi|es, Inc.|
|00000280| 09 09 09 34 32 30 20 42 | 65 64 66 6f 72 64 20 53 |...420 B|edford S|
|00000290| 74 72 65 65 74 20 20 53 | 75 69 74 65 20 33 35 30 |treet S|uite 350|
|000002a0| 0d 09 09 09 4c 65 78 69 | 6e 67 74 6f 6e 2c 20 4d |....Lexi|ngton, M|
|000002b0| 41 20 20 30 32 31 37 33 | 20 20 55 53 41 0d 0d 20 |A 02173| USA.. |
|000002c0| 20 48 69 73 74 6f 72 79 | 0d 20 20 30 38 2f 32 35 | History|. 08/25|
|000002d0| 2f 38 36 09 47 65 6e 65 | 73 69 73 2e 20 20 42 65 |/86.Gene|sis. Be|
|000002e0| 74 61 20 76 65 72 73 69 | 6f 6e 2e 0d 20 20 30 39 |ta versi|on.. 09|
|000002f0| 2f 31 35 2f 38 36 09 43 | 68 61 6e 67 65 64 20 74 |/15/86.C|hanged t|
|00000300| 6f 20 61 6c 6c 6f 77 20 | 61 72 62 69 74 72 61 72 |o allow |arbitrar|
|00000310| 79 20 6e 75 6d 62 65 72 | 20 6f 66 20 77 69 6e 64 |y number| of wind|
|00000320| 6f 77 73 2e 20 20 43 68 | 61 6e 67 65 64 0d 09 09 |ows. Ch|anged...|
|00000330| 09 76 65 72 73 69 6f 6e | 20 6e 75 6d 62 65 72 20 |.version| number |
|00000340| 74 6f 20 31 2e 30 2e 0d | 20 20 30 31 2f 31 37 2f |to 1.0..| 01/17/|
|00000350| 38 37 09 43 68 61 6e 67 | 65 64 20 76 65 72 73 69 |87.Chang|ed versi|
|00000360| 6f 6e 20 6e 75 6d 62 65 | 72 20 74 6f 20 31 2e 30 |on numbe|r to 1.0|
|00000370| 31 2e 20 20 54 68 65 20 | 77 69 6e 64 6f 77 20 74 |1. The |window t|
|00000380| 79 70 65 20 77 68 65 6e | 20 61 20 6e 65 77 0d 09 |ype when| a new..|
|00000390| 09 09 77 69 6e 64 6f 77 | 20 69 73 20 63 72 65 61 |..window| is crea|
|000003a0| 74 65 64 20 77 69 74 68 | 20 4e 65 77 44 57 69 6e |ted with| NewDWin|
|000003b0| 64 6f 77 20 69 73 20 64 | 6f 63 75 6d 65 6e 74 50 |dow is d|ocumentP|
|000003c0| 72 6f 63 2b 38 20 6e 6f | 77 2c 20 73 6f 0d 09 09 |roc+8 no|w, so...|
|000003d0| 09 74 68 61 74 20 74 68 | 65 20 77 69 6e 64 6f 77 |.that th|e window|
|000003e0| 20 77 69 6c 6c 20 68 61 | 76 65 20 61 20 7a 6f 6f | will ha|ve a zoo|
|000003f0| 6d 20 62 6f 78 20 6f 6e | 20 61 20 6d 61 63 68 69 |m box on| a machi|
|00000400| 6e 65 20 77 69 74 68 20 | 31 32 38 4b 0d 09 09 09 |ne with |128K....|
|00000410| 52 4f 4d 53 2e 0d 20 20 | 30 31 2f 32 39 2f 38 39 |ROMS.. |01/29/89|
|00000420| 09 56 65 72 73 69 6f 6e | 20 32 2e 30 2e 20 20 43 |.Version| 2.0. C|
|00000430| 6f 6e 76 65 72 74 65 64 | 20 74 6f 20 77 6f 72 6b |onverted| to work|
|00000440| 20 77 69 74 68 20 54 72 | 61 6e 73 53 6b 65 6c 20 | with Tr|ansSkel |
|00000450| 32 2e 30 2e 20 20 44 69 | 73 70 6c 61 79 0d 09 09 |2.0. Di|splay...|
|00000460| 09 77 69 6e 64 6f 77 20 | 63 72 65 61 74 69 6f 6e |.window |creation|
|00000470| 20 72 6f 75 74 69 6e 65 | 73 20 6e 6f 77 20 63 68 | routine|s now ch|
|00000480| 65 63 6b 20 77 68 65 74 | 68 65 72 20 77 69 6e 64 |eck whet|her wind|
|00000490| 6f 77 20 61 6e 64 20 77 | 69 6e 64 6f 77 0d 09 09 |ow and w|indow...|
|000004a0| 09 68 61 6e 64 6c 65 72 | 20 63 72 65 61 74 69 6f |.handler| creatio|
|000004b0| 6e 20 73 75 63 63 65 65 | 64 65 64 20 61 6e 64 20 |n succee|ded and |
|000004c0| 72 65 74 75 72 6e 20 6e | 69 6c 20 69 66 20 6e 6f |return n|il if no|
|000004d0| 74 2e 20 20 32 2d 62 79 | 74 65 20 61 6e 64 0d 09 |t. 2-by|te and..|
|000004e0| 09 09 34 2d 62 79 74 65 | 20 69 6e 74 65 67 65 72 |..4-byte| integer|
|000004f0| 20 74 79 70 65 73 20 61 | 72 65 20 74 79 70 65 64 | types a|re typed|
|00000500| 65 66 27 65 64 20 74 6f | 20 49 6e 74 65 67 65 72 |ef'ed to| Integer|
|00000510| 20 61 6e 64 20 4c 6f 6e | 67 69 6e 74 20 74 6f 0d | and Lon|gint to.|
|00000520| 09 09 09 65 61 73 65 20 | 70 6f 72 74 69 6e 67 2e |...ease |porting.|
|00000530| 0d 2a 2f 0d 0d 0d 2f 2a | 0d 09 54 68 65 20 66 6f |.*/.../*|..The fo|
|00000540| 6c 6c 6f 77 69 6e 67 20 | 73 79 6d 62 6f 6c 20 63 |llowing |symbol c|
|00000550| 6f 6e 74 72 6f 6c 73 20 | 74 68 65 20 63 6f 6d 70 |ontrols |the comp|
|00000560| 69 6c 65 20 6d 6f 64 65 | 2e 20 20 49 66 20 69 74 |ile mode|. If it|
|00000570| 20 69 73 20 23 64 65 66 | 69 6e 65 27 64 2c 0d 09 | is #def|ine'd,..|
|00000580| 54 72 61 6e 73 44 69 73 | 70 6c 61 79 20 61 6c 6c |TransDis|play all|
|00000590| 6f 77 73 20 6f 6e 6c 79 | 20 61 20 73 69 6e 67 6c |ows only| a singl|
|000005a0| 65 20 64 69 73 70 6c 61 | 79 20 77 69 6e 64 6f 77 |e displa|y window|
|000005b0| 2c 20 61 6e 64 20 67 65 | 6e 65 72 61 74 65 73 0d |, and ge|nerates.|
|000005c0| 09 6c 65 73 73 20 63 6f | 64 65 2e 20 20 49 66 20 |.less co|de. If |
|000005d0| 69 74 20 69 73 20 23 75 | 6e 64 65 66 27 65 64 2c |it is #u|ndef'ed,|
|000005e0| 20 54 72 61 6e 73 44 69 | 73 70 6c 61 79 20 61 6c | TransDi|splay al|
|000005f0| 6c 6f 77 73 20 61 6e 20 | 61 72 62 69 74 72 61 72 |lows an |arbitrar|
|00000600| 79 0d 09 6e 75 6d 62 65 | 72 20 6f 66 20 64 69 73 |y..numbe|r of dis|
|00000610| 70 6c 61 79 20 77 69 6e | 64 6f 77 73 2c 20 62 75 |play win|dows, bu|
|00000620| 74 20 67 65 6e 65 72 61 | 74 65 73 20 6d 6f 72 65 |t genera|tes more|
|00000630| 20 63 6f 64 65 2e 0d 2a | 2f 0d 0d 23 20 75 6e 64 | code..*|/..# und|
|00000640| 65 66 09 73 69 6e 67 6c | 65 44 69 73 70 6c 61 79 |ef.singl|eDisplay|
|00000650| 0d 0d 23 20 69 6e 63 6c | 75 64 65 09 3c 43 6f 6e |..# incl|ude.<Con|
|00000660| 74 72 6f 6c 4d 67 72 2e | 68 3e 09 2f 2a 20 69 6e |trolMgr.|h>./* in|
|00000670| 63 6c 75 64 65 73 20 57 | 69 6e 64 6f 77 4d 67 72 |cludes W|indowMgr|
|00000680| 2e 68 2c 20 51 75 69 63 | 6b 44 72 61 77 2e 68 2c |.h, Quic|kDraw.h,|
|00000690| 20 4d 61 63 54 79 70 65 | 73 2e 68 20 2a 2f 0d 23 | MacType|s.h */.#|
|000006a0| 20 69 6e 63 6c 75 64 65 | 09 3c 54 65 78 74 45 64 | include|.<TextEd|
|000006b0| 69 74 2e 68 3e 0d 23 20 | 69 6e 63 6c 75 64 65 09 |it.h>.# |include.|
|000006c0| 22 54 72 61 6e 73 44 69 | 73 70 6c 61 79 2e 68 22 |"TransDi|splay.h"|
|000006d0| 0d 0d 0d 74 79 70 65 64 | 65 66 09 69 6e 74 09 09 |...typed|ef.int..|
|000006e0| 49 6e 74 65 67 65 72 3b | 09 2f 2a 20 63 6f 6d 70 |Integer;|./* comp|
|000006f0| 69 6c 65 72 20 32 2d 62 | 79 74 65 20 69 6e 74 65 |iler 2-b|yte inte|
|00000700| 67 65 72 20 74 79 70 65 | 20 2a 2f 0d 74 79 70 65 |ger type| */.type|
|00000710| 64 65 66 09 6c 6f 6e 67 | 09 4c 6f 6e 67 69 6e 74 |def.long|.Longint|
|00000720| 3b 09 2f 2a 20 63 6f 6d | 70 69 6c 65 72 20 34 2d |;./* com|piler 4-|
|00000730| 62 79 74 65 20 69 6e 74 | 65 67 65 72 20 74 79 70 |byte int|eger typ|
|00000740| 65 20 2a 2f 0d 0d 0d 2f | 2a 0d 09 44 69 73 70 6c |e */.../|*..Displ|
|00000750| 61 79 20 77 69 6e 64 6f | 77 20 74 79 70 65 73 2c |ay windo|w types,|
|00000760| 20 63 6f 6e 73 74 61 6e | 74 73 2c 20 76 61 72 69 | constan|ts, vari|
|00000770| 61 62 6c 65 73 2e 0d 2a | 2f 0d 0d 0d 23 20 64 65 |ables..*|/...# de|
|00000780| 66 69 6e 65 09 6d 6f 6e | 61 63 6f 09 09 34 0d 0d |fine.mon|aco..4..|
|00000790| 0d 2f 2a 0d 09 44 65 66 | 61 75 6c 74 20 76 61 6c |./*..Def|ault val|
|000007a0| 75 65 73 20 66 6f 72 20 | 64 69 73 70 6c 61 79 20 |ues for |display |
|000007b0| 77 69 6e 64 6f 77 20 63 | 68 61 72 61 63 74 65 72 |window c|haracter|
|000007c0| 69 73 74 69 63 73 0d 2a | 2f 0d 0d 73 74 61 74 69 |istics.*|/..stati|
|000007d0| 63 20 49 6e 74 65 67 65 | 72 09 64 5f 66 6f 6e 74 |c Intege|r.d_font|
|000007e0| 20 3d 20 6d 6f 6e 61 63 | 6f 3b 09 09 2f 2a 20 64 | = monac|o;../* d|
|000007f0| 65 66 61 75 6c 74 20 66 | 6f 6e 74 20 20 20 20 20 |efault f|ont |
|00000800| 20 20 20 20 20 20 20 20 | 20 2a 2f 0d 73 74 61 74 | | */.stat|
|00000810| 69 63 20 49 6e 74 65 67 | 65 72 09 64 5f 73 69 7a |ic Integ|er.d_siz|
|00000820| 65 20 3d 20 39 3b 09 09 | 09 09 2f 2a 20 64 65 66 |e = 9;..|../* def|
|00000830| 61 75 6c 74 20 70 6f 69 | 6e 74 73 69 7a 65 20 20 |ault poi|ntsize |
|00000840| 20 20 20 20 20 20 20 2a | 2f 0d 73 74 61 74 69 63 | *|/.static|
|00000850| 20 49 6e 74 65 67 65 72 | 09 64 5f 77 72 61 70 20 | Integer|.d_wrap |
|00000860| 3d 20 30 3b 09 09 09 09 | 2f 2a 20 64 65 66 61 75 |= 0;....|/* defau|
|00000870| 6c 74 20 77 6f 72 64 20 | 77 72 61 70 20 28 6f 6e |lt word |wrap (on|
|00000880| 29 20 20 20 20 2a 2f 0d | 73 74 61 74 69 63 20 49 |) */.|static I|
|00000890| 6e 74 65 67 65 72 09 64 | 5f 6a 75 73 74 20 3d 20 |nteger.d|_just = |
|000008a0| 74 65 4a 75 73 74 4c 65 | 66 74 3b 09 2f 2a 20 64 |teJustLe|ft;./* d|
|000008b0| 65 66 61 75 6c 74 20 6a | 75 73 74 69 66 69 63 61 |efault j|ustifica|
|000008c0| 74 69 6f 6e 20 20 20 20 | 20 2a 2f 0d 73 74 61 74 |tion | */.stat|
|000008d0| 69 63 20 4c 6f 6e 67 69 | 6e 74 09 64 5f 6d 61 78 |ic Longi|nt.d_max|
|000008e0| 54 65 78 74 20 3d 20 33 | 30 30 30 30 4c 3b 09 09 |Text = 3|0000L;..|
|000008f0| 2f 2a 20 64 65 66 61 75 | 6c 74 20 6d 61 78 20 74 |/* defau|lt max t|
|00000900| 65 78 74 20 61 6c 6c 6f | 77 65 64 20 20 2a 2f 0d |ext allo|wed */.|
|00000910| 73 74 61 74 69 63 20 4c | 6f 6e 67 69 6e 74 09 64 |static L|ongint.d|
|00000920| 5f 66 6c 75 73 68 41 6d | 74 20 3d 20 32 35 30 30 |_flushAm|t = 2500|
|00000930| 30 4c 3b 09 2f 2a 20 64 | 65 66 61 75 6c 74 20 61 |0L;./* d|efault a|
|00000940| 75 74 6f 66 6c 75 73 68 | 20 61 6d 6f 75 6e 74 20 |utoflush| amount |
|00000950| 20 2a 2f 0d 73 74 61 74 | 69 63 20 50 72 6f 63 50 | */.stat|ic ProcP|
|00000960| 74 72 09 64 5f 61 63 74 | 69 76 61 74 65 20 3d 20 |tr.d_act|ivate = |
|00000970| 6e 69 6c 3b 09 09 2f 2a | 20 64 65 66 61 75 6c 74 |nil;../*| default|
|00000980| 20 6e 6f 74 69 66 69 63 | 61 74 69 6f 6e 20 70 72 | notific|ation pr|
|00000990| 6f 63 20 2a 2f 0d 0d 0d | 2f 2a 0d 09 4c 6f 77 65 |oc */...|/*..Lowe|
|000009a0| 73 74 20 61 6c 6c 6f 77 | 61 62 6c 65 20 76 61 6c |st allow|able val|
|000009b0| 75 65 73 20 66 6f 72 20 | 61 75 74 6f 66 6c 75 73 |ues for |autoflus|
|000009c0| 68 20 63 68 61 72 61 63 | 74 65 72 69 73 74 69 63 |h charac|teristic|
|000009d0| 73 0d 2a 2f 0d 0d 23 20 | 64 65 66 69 6e 65 09 64 |s.*/..# |define.d|
|000009e0| 5f 6c 6f 4d 61 78 54 65 | 78 74 09 09 28 31 30 30 |_loMaxTe|xt..(100|
|000009f0| 4c 29 0d 23 20 64 65 66 | 69 6e 65 09 64 5f 6c 6f |L).# def|ine.d_lo|
|00000a00| 46 6c 75 73 68 41 6d 74 | 09 28 31 30 30 4c 29 0d |FlushAmt|.(100L).|
|00000a10| 0d 0d 23 20 69 66 6e 64 | 65 66 09 73 69 6e 67 6c |..# ifnd|ef.singl|
|00000a20| 65 44 69 73 70 6c 61 79 | 0d 0d 2f 2a 0d 09 4e 65 |eDisplay|../*..Ne|
|00000a30| 77 28 54 79 70 65 4e 61 | 6d 65 29 20 72 65 74 75 |w(TypeNa|me) retu|
|00000a40| 72 6e 73 20 68 61 6e 64 | 6c 65 20 74 6f 20 6e 65 |rns hand|le to ne|
|00000a50| 77 20 6f 62 6a 65 63 74 | 2c 20 66 6f 72 20 61 6e |w object|, for an|
|00000a60| 79 20 54 79 70 65 4e 61 | 6d 65 2e 0d 09 49 66 20 |y TypeNa|me...If |
|00000a70| 74 68 65 72 65 20 69 73 | 20 69 6e 73 75 66 66 69 |there is| insuffi|
|00000a80| 63 69 65 6e 74 20 6d 65 | 6d 6f 72 79 2c 20 74 68 |cient me|mory, th|
|00000a90| 65 20 72 65 73 75 6c 74 | 20 69 73 20 6e 69 6c 2e |e result| is nil.|
|00000aa0| 0d 2a 2f 0d 0d 23 20 64 | 65 66 69 6e 65 09 4e 65 |.*/..# d|efine.Ne|
|00000ab0| 77 28 78 29 09 28 78 20 | 2a 2a 29 20 4e 65 77 48 |w(x).(x |**) NewH|
|00000ac0| 61 6e 64 6c 65 20 28 28 | 53 69 7a 65 29 20 73 69 |andle ((|Size) si|
|00000ad0| 7a 65 6f 66 20 28 78 29 | 29 0d 0d 0d 2f 2a 0d 09 |zeof (x)|).../*..|
|00000ae0| 64 77 4c 69 73 74 20 70 | 6f 69 6e 74 73 20 74 6f |dwList p|oints to|
|00000af0| 20 61 20 6c 69 73 74 20 | 6f 66 20 73 74 72 75 63 | a list |of struc|
|00000b00| 74 75 72 65 73 20 64 65 | 73 63 72 69 62 69 6e 67 |tures de|scribing|
|00000b10| 20 74 68 65 20 6b 6e 6f | 77 6e 20 64 69 73 70 6c | the kno|wn displ|
|00000b20| 61 79 0d 09 77 69 6e 64 | 6f 77 73 2e 0d 0d 09 63 |ay..wind|ows....c|
|00000b30| 75 72 44 69 73 70 57 69 | 6e 64 20 69 73 20 74 68 |urDispWi|nd is th|
|00000b40| 65 20 63 75 72 72 65 6e | 74 20 6f 75 74 70 75 74 |e curren|t output|
|00000b50| 20 77 69 6e 64 6f 77 2e | 0d 09 49 66 20 63 75 72 | window.|..If cur|
|00000b60| 44 69 73 70 57 69 6e 64 | 20 3d 20 6e 69 6c 2c 20 |DispWind| = nil, |
|00000b70| 6f 75 74 70 75 74 20 69 | 73 20 63 75 72 72 65 6e |output i|s curren|
|00000b80| 74 6c 79 20 74 75 72 6e | 65 64 20 6f 66 66 2e 0d |tly turn|ed off..|
|00000b90| 2a 2f 0d 0d 0d 74 79 70 | 65 64 65 66 20 73 74 72 |*/...typ|edef str|
|00000ba0| 75 63 74 20 44 69 73 70 | 6c 61 79 49 6e 66 6f 0d |uct Disp|layInfo.|
|00000bb0| 7b 0d 09 57 69 6e 64 6f | 77 50 74 72 09 09 09 64 |{..Windo|wPtr...d|
|00000bc0| 57 69 6e 64 3b 09 09 09 | 2f 2a 20 64 69 73 70 6c |Wind;...|/* displ|
|00000bd0| 61 79 20 77 69 6e 64 6f | 77 20 20 20 20 20 20 20 |ay windo|w |
|00000be0| 20 20 2a 2f 0d 09 54 45 | 48 61 6e 64 6c 65 09 09 | */..TE|Handle..|
|00000bf0| 09 64 54 45 3b 09 09 09 | 2f 2a 20 77 69 6e 64 6f |.dTE;...|/* windo|
|00000c00| 77 20 74 65 78 74 20 20 | 20 20 20 20 20 20 20 20 |w text | |
|00000c10| 20 20 2a 2f 0d 09 43 6f | 6e 74 72 6f 6c 48 61 6e | */..Co|ntrolHan|
|00000c20| 64 6c 65 09 09 64 53 63 | 72 6f 6c 6c 3b 09 09 2f |dle..dSc|roll;../|
|00000c30| 2a 20 77 69 6e 64 6f 77 | 20 73 63 72 6f 6c 6c 20 |* window| scroll |
|00000c40| 62 61 72 20 20 20 20 20 | 20 2a 2f 0d 09 50 72 6f |bar | */..Pro|
|00000c50| 63 50 74 72 09 09 09 09 | 64 41 63 74 69 76 61 74 |cPtr....|dActivat|
|00000c60| 65 3b 09 09 2f 2a 20 6e | 6f 74 69 66 69 63 61 74 |e;../* n|otificat|
|00000c70| 69 6f 6e 20 70 72 6f 63 | 65 64 75 72 65 20 2a 2f |ion proc|edure */|
|00000c80| 0d 09 4c 6f 6e 67 69 6e | 74 09 09 09 09 64 4d 61 |..Longin|t....dMa|
|00000c90| 78 54 65 78 74 3b 09 09 | 2f 2a 20 6d 61 78 20 74 |xText;..|/* max t|
|00000ca0| 65 78 74 20 6c 65 6e 67 | 74 68 20 20 20 20 20 20 |ext leng|th |
|00000cb0| 20 20 2a 2f 0d 09 4c 6f | 6e 67 69 6e 74 09 09 09 | */..Lo|ngint...|
|00000cc0| 09 64 46 6c 75 73 68 41 | 6d 74 3b 09 09 2f 2a 20 |.dFlushA|mt;../* |
|00000cd0| 61 6d 6f 75 6e 74 20 74 | 6f 20 61 75 74 6f 66 6c |amount t|o autofl|
|00000ce0| 75 73 68 20 20 20 20 2a | 2f 0d 09 73 74 72 75 63 |ush *|/..struc|
|00000cf0| 74 20 44 69 73 70 6c 61 | 79 49 6e 66 6f 09 2a 2a |t Displa|yInfo.**|
|00000d00| 64 4e 65 78 74 3b 09 09 | 2f 2a 20 6e 65 78 74 20 |dNext;..|/* next |
|00000d10| 77 69 6e 64 6f 77 20 73 | 74 72 75 63 74 75 72 65 |window s|tructure|
|00000d20| 20 20 2a 2f 0d 7d 20 44 | 69 73 70 6c 61 79 49 6e | */.} D|isplayIn|
|00000d30| 66 6f 2c 20 2a 44 49 50 | 74 72 2c 20 2a 2a 44 49 |fo, *DIP|tr, **DI|
|00000d40| 48 61 6e 64 6c 65 3b 0d | 0d 0d 73 74 61 74 69 63 |Handle;.|..static|
|00000d50| 20 44 49 48 61 6e 64 6c | 65 09 09 64 77 4c 69 73 | DIHandl|e..dwLis|
|00000d60| 74 20 3d 20 6e 69 6c 3b | 0d 0d 23 20 65 6e 64 69 |t = nil;|..# endi|
|00000d70| 66 0d 0d 2f 2a 0d 09 56 | 61 72 69 61 62 6c 65 73 |f../*..V|ariables|
|00000d80| 20 70 65 72 74 61 69 6e | 69 6e 67 20 74 6f 20 74 | pertain|ing to t|
|00000d90| 68 65 20 64 69 73 70 6c | 61 79 20 77 69 6e 64 6f |he displ|ay windo|
|00000da0| 77 20 62 65 69 6e 67 20 | 6f 70 65 72 61 74 65 64 |w being |operated|
|00000db0| 20 6f 6e 0d 09 28 75 70 | 64 61 74 65 64 2c 20 72 | on..(up|dated, r|
|00000dc0| 65 73 69 7a 65 64 2c 20 | 65 74 63 2e 29 2e 20 20 |esized, |etc.). |
|00000dd0| 54 68 69 73 20 77 69 6e | 64 6f 77 20 69 73 20 6e |This win|dow is n|
|00000de0| 6f 74 20 6e 65 63 65 73 | 73 61 72 69 6c 79 20 74 |ot neces|sarily t|
|00000df0| 68 65 0d 09 73 61 6d 65 | 20 61 73 20 63 75 72 44 |he..same| as curD|
|00000e00| 69 73 70 57 69 6e 64 21 | 20 20 54 68 65 73 65 20 |ispWind!| These |
|00000e10| 76 61 72 69 61 62 6c 65 | 73 20 61 72 65 20 73 79 |variable|s are sy|
|00000e20| 6e 63 65 64 20 74 6f 20 | 74 68 65 20 77 69 6e 64 |nced to |the wind|
|00000e30| 6f 77 0d 09 77 69 74 68 | 20 53 79 6e 63 47 6c 6f |ow..with| SyncGlo|
|00000e40| 62 61 6c 73 2e 0d 2a 2f | 0d 0d 23 20 69 66 6e 64 |bals..*/|..# ifnd|
|00000e50| 65 66 09 73 69 6e 67 6c | 65 44 69 73 70 6c 61 79 |ef.singl|eDisplay|
|00000e60| 0d 73 74 61 74 69 63 20 | 44 49 48 61 6e 64 6c 65 |.static |DIHandle|
|00000e70| 09 09 09 64 69 73 70 49 | 6e 66 6f 3b 09 09 2f 2a |...dispI|nfo;../*|
|00000e80| 20 69 6e 66 6f 20 73 74 | 72 75 63 74 75 72 65 20 | info st|ructure |
|00000e90| 20 20 20 20 20 20 20 20 | 2a 2f 0d 23 20 65 6e 64 | |*/.# end|
|00000ea0| 69 66 0d 0d 73 74 61 74 | 69 63 20 57 69 6e 64 6f |if..stat|ic Windo|
|00000eb0| 77 50 74 72 09 09 64 69 | 73 70 57 69 6e 64 20 3d |wPtr..di|spWind =|
|00000ec0| 20 6e 69 6c 3b 09 2f 2a | 20 74 68 65 20 77 69 6e | nil;./*| the win|
|00000ed0| 64 6f 77 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dow | |
|00000ee0| 2a 2f 0d 73 74 61 74 69 | 63 20 54 45 48 61 6e 64 |*/.stati|c TEHand|
|00000ef0| 6c 65 09 09 09 64 69 73 | 70 54 45 3b 09 09 09 2f |le...dis|pTE;.../|
|00000f00| 2a 20 77 69 6e 64 6f 77 | 20 74 65 78 74 20 20 20 |* window| text |
|00000f10| 20 20 20 20 20 20 20 20 | 20 2a 2f 0d 73 74 61 74 | | */.stat|
|00000f20| 69 63 20 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |ic Contr|olHandle|
|00000f30| 09 64 69 73 70 53 63 72 | 6f 6c 6c 3b 09 09 2f 2a |.dispScr|oll;../*|
|00000f40| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 | the scr|oll bar |
|00000f50| 20 20 20 20 20 20 20 20 | 2a 2f 0d 73 74 61 74 69 | |*/.stati|
|00000f60| 63 20 50 72 6f 63 50 74 | 72 09 09 09 64 41 63 74 |c ProcPt|r...dAct|
|00000f70| 69 76 61 74 65 3b 09 09 | 2f 2a 20 6e 6f 74 69 66 |ivate;..|/* notif|
|00000f80| 69 63 61 74 69 6f 6e 20 | 70 72 6f 63 65 64 75 72 |ication |procedur|
|00000f90| 65 20 2a 2f 0d 73 74 61 | 74 69 63 20 4c 6f 6e 67 |e */.sta|tic Long|
|00000fa0| 69 6e 74 09 09 09 64 4d | 61 78 54 65 78 74 3b 09 |int...dM|axText;.|
|00000fb0| 09 2f 2a 20 6d 61 78 20 | 74 65 78 74 20 61 6c 6c |./* max |text all|
|00000fc0| 6f 77 65 64 20 20 20 20 | 20 20 20 2a 2f 0d 73 74 |owed | */.st|
|00000fd0| 61 74 69 63 20 4c 6f 6e | 67 69 6e 74 09 09 09 64 |atic Lon|gint...d|
|00000fe0| 46 6c 75 73 68 41 6d 74 | 3b 09 09 2f 2a 20 61 6d |FlushAmt|;../* am|
|00000ff0| 6f 75 6e 74 20 74 6f 20 | 66 6c 75 73 68 20 20 20 |ount to |flush |
|00001000| 20 20 20 20 20 2a 2f 0d | 0d 0d 2f 2a 0d 09 63 75 | */.|../*..cu|
|00001010| 72 44 69 73 70 57 69 6e | 64 20 69 73 20 74 68 65 |rDispWin|d is the|
|00001020| 20 63 75 72 72 65 6e 74 | 20 6f 75 74 70 75 74 20 | current| output |
|00001030| 77 69 6e 64 6f 77 2e 0d | 09 49 66 20 63 75 72 44 |window..|.If curD|
|00001040| 69 73 70 57 69 6e 64 20 | 3d 20 6e 69 6c 2c 20 6f |ispWind |= nil, o|
|00001050| 75 74 70 75 74 20 69 73 | 20 74 75 72 6e 65 64 20 |utput is| turned |
|00001060| 6f 66 66 2e 0d 2a 2f 0d | 0d 73 74 61 74 69 63 20 |off..*/.|.static |
|00001070| 57 69 6e 64 6f 77 50 74 | 72 09 63 75 72 44 69 73 |WindowPt|r.curDis|
|00001080| 70 57 69 6e 64 20 3d 20 | 6e 69 6c 3b 0d 0d 0d 2f |pWind = |nil;.../|
|00001090| 2a 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |* ------|--------|
|000010a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010d0| 2d 2d 2d 2d 2d 2d 20 2a | 2f 0d 2f 2a 09 09 09 09 |------ *|/./*....|
|000010e0| 4d 69 73 63 65 6c 6c 61 | 6e 65 6f 75 73 20 49 6e |Miscella|neous In|
|000010f0| 74 65 72 6e 61 6c 20 28 | 70 72 69 76 61 74 65 29 |ternal (|private)|
|00001100| 20 52 6f 75 74 69 6e 65 | 73 09 09 09 09 2a 2f 0d | Routine|s....*/.|
|00001110| 2f 2a 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/* -----|--------|
|00001120| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001150| 2d 2d 2d 2d 2d 2d 2d 20 | 2a 2f 0d 0d 0d 2f 2a 0d |------- |*/.../*.|
|00001160| 09 44 72 61 77 20 67 72 | 6f 77 20 62 6f 78 20 6f |.Draw gr|ow box o|
|00001170| 66 20 64 69 73 70 57 69 | 6e 64 20 69 6e 20 6c 6f |f dispWi|nd in lo|
|00001180| 77 65 72 20 72 69 67 68 | 74 20 68 61 6e 64 20 63 |wer righ|t hand c|
|00001190| 6f 72 6e 65 72 0d 2a 2f | 0d 0d 0d 73 74 61 74 69 |orner.*/|...stati|
|000011a0| 63 20 44 72 61 77 47 72 | 6f 77 42 6f 78 20 28 29 |c DrawGr|owBox ()|
|000011b0| 0d 7b 0d 72 65 67 69 73 | 74 65 72 20 52 67 6e 48 |.{.regis|ter RgnH|
|000011c0| 61 6e 64 6c 65 09 6f 6c | 64 43 6c 69 70 3b 0d 52 |andle.ol|dClip;.R|
|000011d0| 65 63 74 09 09 09 09 72 | 3b 0d 0d 09 72 20 3d 20 |ect....r|;...r = |
|000011e0| 64 69 73 70 57 69 6e 64 | 2d 3e 70 6f 72 74 52 65 |dispWind|->portRe|
|000011f0| 63 74 3b 0d 09 72 2e 6c | 65 66 74 20 3d 20 72 2e |ct;..r.l|eft = r.|
|00001200| 72 69 67 68 74 20 2d 20 | 31 35 3b 09 09 2f 2a 20 |right - |15;../* |
|00001210| 64 72 61 77 20 6f 6e 6c | 79 20 69 6e 20 63 6f 72 |draw onl|y in cor|
|00001220| 6e 65 72 20 2a 2f 0d 09 | 72 2e 74 6f 70 20 3d 20 |ner */..|r.top = |
|00001230| 72 2e 62 6f 74 74 6f 6d | 20 2d 20 31 35 3b 0d 09 |r.bottom| - 15;..|
|00001240| 6f 6c 64 43 6c 69 70 20 | 3d 20 4e 65 77 52 67 6e |oldClip |= NewRgn|
|00001250| 20 28 29 3b 0d 09 47 65 | 74 43 6c 69 70 20 28 6f | ();..Ge|tClip (o|
|00001260| 6c 64 43 6c 69 70 29 3b | 0d 09 43 6c 69 70 52 65 |ldClip);|..ClipRe|
|00001270| 63 74 20 28 26 72 29 3b | 0d 09 44 72 61 77 47 72 |ct (&r);|..DrawGr|
|00001280| 6f 77 49 63 6f 6e 20 28 | 64 69 73 70 57 69 6e 64 |owIcon (|dispWind|
|00001290| 29 3b 0d 09 53 65 74 43 | 6c 69 70 20 28 6f 6c 64 |);..SetC|lip (old|
|000012a0| 43 6c 69 70 29 3b 0d 09 | 44 69 73 70 6f 73 65 52 |Clip);..|DisposeR|
|000012b0| 67 6e 20 28 6f 6c 64 43 | 6c 69 70 29 3b 0d 7d 0d |gn (oldC|lip);.}.|
|000012c0| 0d 0d 0d 2f 2a 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.../* --|--------|
|000012d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 20 2a 2f 0d 2f 2a |--------|-- */./*|
|00001310| 09 09 09 4c 6f 77 65 73 | 74 2d 6c 65 76 65 6c 20 |...Lowes|t-level |
|00001320| 49 6e 74 65 72 6e 61 6c | 20 28 50 72 69 76 61 74 |Internal| (Privat|
|00001330| 65 29 20 44 69 73 70 6c | 61 79 20 57 69 6e 64 6f |e) Displ|ay Windo|
|00001340| 77 20 52 6f 75 74 69 6e | 65 73 09 09 2a 2f 0d 2f |w Routin|es..*/./|
|00001350| 2a 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |* ------|--------|
|00001360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001390| 2d 2d 2d 2d 2d 2d 20 2a | 2f 0d 0d 0d 23 20 69 66 |------ *|/...# if|
|000013a0| 6e 64 65 66 09 73 69 6e | 67 6c 65 44 69 73 70 6c |ndef.sin|gleDispl|
|000013b0| 61 79 0d 0d 2f 2a 0d 09 | 47 65 74 20 64 69 73 70 |ay../*..|Get disp|
|000013c0| 6c 61 79 20 77 69 6e 64 | 6f 77 20 69 6e 66 6f 20 |lay wind|ow info |
|000013d0| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|000013e0| 77 69 6e 64 6f 77 2e 0d | 09 52 65 74 75 72 6e 20 |window..|.Return |
|000013f0| 6e 69 6c 20 69 66 20 77 | 69 6e 64 6f 77 20 69 73 |nil if w|indow is|
|00001400| 6e 27 74 20 61 20 6b 6e | 6f 77 6e 20 64 69 73 70 |n't a kn|own disp|
|00001410| 6c 61 79 20 77 69 6e 64 | 6f 77 2e 0d 2a 2f 0d 0d |lay wind|ow..*/..|
|00001420| 73 74 61 74 69 63 20 44 | 49 48 61 6e 64 6c 65 20 |static D|IHandle |
|00001430| 47 65 74 44 49 6e 66 6f | 20 28 74 68 65 57 69 6e |GetDInfo| (theWin|
|00001440| 64 29 0d 57 69 6e 64 6f | 77 50 74 72 09 74 68 65 |d).Windo|wPtr.the|
|00001450| 57 69 6e 64 3b 0d 7b 0d | 72 65 67 69 73 74 65 72 |Wind;.{.|register|
|00001460| 20 44 49 48 61 6e 64 6c | 65 09 68 3b 0d 0d 09 66 | DIHandl|e.h;...f|
|00001470| 6f 72 20 28 68 20 3d 20 | 64 77 4c 69 73 74 3b 20 |or (h = |dwList; |
|00001480| 68 20 21 3d 20 6e 69 6c | 3b 20 68 20 3d 20 28 2a |h != nil|; h = (*|
|00001490| 2a 68 29 2e 64 4e 65 78 | 74 29 0d 09 7b 0d 09 09 |*h).dNex|t)..{...|
|000014a0| 69 66 20 28 28 2a 2a 68 | 29 2e 64 57 69 6e 64 20 |if ((**h|).dWind |
|000014b0| 3d 3d 20 74 68 65 57 69 | 6e 64 29 0d 09 09 09 72 |== theWi|nd)....r|
|000014c0| 65 74 75 72 6e 20 28 68 | 29 3b 0d 09 7d 0d 09 72 |eturn (h|);..}..r|
|000014d0| 65 74 75 72 6e 20 28 6e | 69 6c 29 3b 0d 7d 0d 0d |eturn (n|il);.}..|
|000014e0| 23 20 65 6e 64 69 66 0d | 0d 23 20 69 66 64 65 66 |# endif.|.# ifdef|
|000014f0| 09 73 69 6e 67 6c 65 44 | 69 73 70 6c 61 79 0d 23 |.singleD|isplay.#|
|00001500| 20 64 65 66 69 6e 65 09 | 53 79 6e 63 47 6c 6f 62 | define.|SyncGlob|
|00001510| 61 6c 73 28 78 29 09 3b | 09 2f 2a 20 6d 61 6b 65 |als(x).;|./* make|
|00001520| 20 69 74 20 61 20 6e 6f | 70 20 2a 2f 0d 23 20 65 | it a no|p */.# e|
|00001530| 6c 73 65 0d 0d 2f 2a 0d | 09 53 79 6e 63 68 72 6f |lse../*.|.Synchro|
|00001540| 6e 69 7a 65 20 67 6c 6f | 62 61 6c 73 20 74 6f 20 |nize glo|bals to |
|00001550| 61 20 64 69 73 70 6c 61 | 79 20 77 69 6e 64 6f 77 |a displa|y window|
|00001560| 2e 20 20 74 68 65 57 69 | 6e 64 20 6d 75 73 74 20 |. theWi|nd must |
|00001570| 62 65 20 61 20 6c 65 67 | 61 6c 0d 09 64 69 73 70 |be a leg|al..disp|
|00001580| 6c 61 79 20 77 69 6e 64 | 6f 77 2c 20 77 69 74 68 |lay wind|ow, with|
|00001590| 20 6f 6e 65 20 65 78 63 | 65 70 74 69 6f 6e 3a 20 | one exc|eption: |
|000015a0| 20 69 66 20 74 68 65 57 | 69 6e 64 20 69 73 20 6e | if theW|ind is n|
|000015b0| 69 6c 2c 20 74 68 65 0d | 09 76 61 72 69 61 62 6c |il, the.|.variabl|
|000015c0| 65 73 20 61 72 65 20 73 | 79 6e 63 65 64 20 74 6f |es are s|ynced to|
|000015d0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 70 6f 72 | the cur|rent por|
|000015e0| 74 2e 20 20 54 68 61 74 | 20 69 73 20 73 61 66 65 |t. That| is safe|
|000015f0| 20 28 61 6e 64 0d 09 63 | 6f 72 72 65 63 74 29 20 | (and..c|orrect) |
|00001600| 62 65 63 61 75 73 65 3a | 0d 09 28 69 29 09 20 6e |because:|..(i). n|
|00001610| 69 6c 20 69 73 20 6f 6e | 6c 79 20 70 61 73 73 65 |il is on|ly passe|
|00001620| 64 20 62 79 20 64 69 73 | 70 6c 61 79 20 77 69 6e |d by dis|play win|
|00001630| 64 6f 77 20 68 61 6e 64 | 6c 65 72 20 70 72 6f 63 |dow hand|ler proc|
|00001640| 65 64 75 72 65 73 2c 0d | 09 09 20 77 68 69 63 68 |edures,.|.. which|
|00001650| 20 61 72 65 20 6f 6e 6c | 79 20 63 61 6c 6c 65 64 | are onl|y called|
|00001660| 20 62 79 20 54 72 61 6e | 73 53 6b 65 6c 20 66 6f | by Tran|sSkel fo|
|00001670| 72 20 64 69 73 70 6c 61 | 79 20 77 69 6e 64 6f 77 |r displa|y window|
|00001680| 0d 09 09 20 65 76 65 6e | 74 73 2e 0d 09 28 69 69 |... even|ts...(ii|
|00001690| 29 20 46 6f 72 20 74 68 | 6f 73 65 20 68 61 6e 64 |) For th|ose hand|
|000016a0| 6c 65 72 20 70 72 6f 63 | 73 20 74 68 61 74 20 70 |ler proc|s that p|
|000016b0| 61 73 73 20 6e 69 6c 2c | 20 54 72 61 6e 73 53 6b |ass nil,| TransSk|
|000016c0| 65 6c 20 65 69 74 68 65 | 72 20 73 65 74 73 0d 09 |el eithe|r sets..|
|000016d0| 09 20 74 68 65 20 70 6f | 72 74 20 74 6f 20 74 68 |. the po|rt to th|
|000016e0| 65 20 77 69 6e 64 6f 77 | 20 62 65 66 6f 72 65 20 |e window| before |
|000016f0| 63 61 6c 6c 69 6e 67 20 | 74 68 65 20 70 72 6f 63 |calling |the proc|
|00001700| 20 28 75 70 64 61 74 65 | 2c 20 63 6c 6f 62 62 65 | (update|, clobbe|
|00001710| 72 2c 0d 09 09 20 69 64 | 6c 65 20 70 72 6f 63 73 |r,... id|le procs|
|00001720| 29 2c 20 6f 72 20 74 68 | 65 20 77 69 6e 64 6f 77 |), or th|e window|
|00001730| 20 69 73 20 66 72 6f 6e | 74 6d 6f 73 74 2c 20 61 | is fron|tmost, a|
|00001740| 6e 64 20 73 6f 20 77 69 | 6c 6c 20 62 65 20 74 68 |nd so wi|ll be th|
|00001750| 65 0d 09 09 20 63 75 72 | 72 65 6e 74 20 70 6f 72 |e... cur|rent por|
|00001760| 74 20 61 6e 79 77 61 79 | 20 28 6d 6f 75 73 65 20 |t anyway| (mouse |
|00001770| 70 72 6f 63 29 2e 0d 09 | 48 65 6e 63 65 2c 20 75 |proc)...|Hence, u|
|00001780| 73 65 20 6f 66 20 74 68 | 65 20 63 75 72 72 65 6e |se of th|e curren|
|00001790| 74 20 70 6f 72 74 20 75 | 6e 64 65 72 20 74 68 65 |t port u|nder the|
|000017a0| 73 65 20 63 69 72 63 75 | 6d 73 74 61 6e 63 65 73 |se circu|mstances|
|000017b0| 0d 09 61 6c 77 61 79 73 | 20 70 72 6f 64 75 63 65 |..always| produce|
|000017c0| 73 20 61 20 6c 65 67 61 | 6c 20 64 69 73 70 6c 61 |s a lega|l displa|
|000017d0| 79 20 77 69 6e 64 6f 77 | 2e 0d 09 0d 09 53 79 6e |y window|.....Syn|
|000017e0| 63 47 6c 6f 62 61 6c 73 | 20 69 73 20 6e 6f 74 20 |cGlobals| is not |
|000017f0| 75 73 65 64 20 69 6e 20 | 73 69 6e 67 6c 65 20 64 |used in |single d|
|00001800| 69 73 70 6c 61 79 20 6d | 6f 64 65 2c 20 62 65 63 |isplay m|ode, bec|
|00001810| 61 75 73 65 20 74 68 65 | 0d 09 67 6c 6f 62 61 6c |ause the|..global|
|00001820| 73 20 61 72 65 20 61 6c | 6c 20 73 65 74 20 62 79 |s are al|l set by|
|00001830| 20 53 65 74 75 70 44 57 | 69 6e 64 6f 77 20 61 6e | SetupDW|indow an|
|00001840| 64 20 64 6f 20 6e 6f 74 | 20 63 68 61 6e 67 65 20 |d do not| change |
|00001850| 74 68 65 72 65 61 66 74 | 65 72 2e 0d 2a 2f 0d 0d |thereaft|er..*/..|
|00001860| 73 74 61 74 69 63 20 53 | 79 6e 63 47 6c 6f 62 61 |static S|yncGloba|
|00001870| 6c 73 20 28 74 68 65 57 | 69 6e 64 29 0d 57 69 6e |ls (theW|ind).Win|
|00001880| 64 6f 77 50 74 72 09 74 | 68 65 57 69 6e 64 3b 0d |dowPtr.t|heWind;.|
|00001890| 7b 0d 72 65 67 69 73 74 | 65 72 20 44 49 50 74 72 |{.regist|er DIPtr|
|000018a0| 09 64 70 3b 0d 0d 09 69 | 66 20 28 74 68 65 57 69 |.dp;...i|f (theWi|
|000018b0| 6e 64 20 3d 3d 20 6e 69 | 6c 29 09 09 09 09 09 2f |nd == ni|l)...../|
|000018c0| 2a 20 75 73 65 20 63 75 | 72 72 65 6e 74 20 77 69 |* use cu|rrent wi|
|000018d0| 6e 64 6f 77 20 2a 2f 0d | 09 09 47 65 74 50 6f 72 |ndow */.|..GetPor|
|000018e0| 74 20 28 26 74 68 65 57 | 69 6e 64 29 3b 0d 0d 09 |t (&theW|ind);...|
|000018f0| 64 69 73 70 57 69 6e 64 | 20 3d 20 74 68 65 57 69 |dispWind| = theWi|
|00001900| 6e 64 3b 0d 09 64 69 73 | 70 49 6e 66 6f 20 3d 20 |nd;..dis|pInfo = |
|00001910| 47 65 74 44 49 6e 66 6f | 20 28 64 69 73 70 57 69 |GetDInfo| (dispWi|
|00001920| 6e 64 29 3b 0d 09 64 70 | 20 3d 20 2a 64 69 73 70 |nd);..dp| = *disp|
|00001930| 49 6e 66 6f 3b 0d 09 64 | 69 73 70 53 63 72 6f 6c |Info;..d|ispScrol|
|00001940| 6c 20 3d 20 28 2a 64 70 | 29 2e 64 53 63 72 6f 6c |l = (*dp|).dScrol|
|00001950| 6c 3b 0d 09 64 69 73 70 | 54 45 20 3d 20 28 2a 64 |l;..disp|TE = (*d|
|00001960| 70 29 2e 64 54 45 3b 0d | 09 64 41 63 74 69 76 61 |p).dTE;.|.dActiva|
|00001970| 74 65 20 3d 20 28 2a 64 | 70 29 2e 64 41 63 74 69 |te = (*d|p).dActi|
|00001980| 76 61 74 65 3b 0d 09 64 | 4d 61 78 54 65 78 74 20 |vate;..d|MaxText |
|00001990| 3d 20 28 2a 64 70 29 2e | 64 4d 61 78 54 65 78 74 |= (*dp).|dMaxText|
|000019a0| 3b 0d 09 64 46 6c 75 73 | 68 41 6d 74 20 3d 20 28 |;..dFlus|hAmt = (|
|000019b0| 2a 64 70 29 2e 64 46 6c | 75 73 68 41 6d 74 3b 0d |*dp).dFl|ushAmt;.|
|000019c0| 7d 0d 0d 23 20 65 6e 64 | 69 66 0d 0d 0d 2f 2a 0d |}..# end|if.../*.|
|000019d0| 09 43 61 6c 63 75 6c 61 | 74 65 20 74 68 65 20 64 |.Calcula|te the d|
|000019e0| 69 6d 65 6e 73 69 6f 6e | 73 20 6f 66 20 74 68 65 |imension|s of the|
|000019f0| 20 65 64 69 74 69 6e 67 | 20 72 65 63 74 61 6e 67 | editing| rectang|
|00001a00| 6c 65 20 66 6f 72 0d 09 | 64 69 73 70 57 69 6e 64 |le for..|dispWind|
|00001a10| 20 28 77 68 69 63 68 20 | 6d 75 73 74 20 62 65 20 | (which |must be |
|00001a20| 73 65 74 20 70 72 6f 70 | 65 72 6c 79 20 61 6e 64 |set prop|erly and|
|00001a30| 20 69 73 20 61 73 73 75 | 6d 65 64 20 74 6f 20 62 | is assu|med to b|
|00001a40| 65 0d 09 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |e..the c|urrent p|
|00001a50| 6f 72 74 29 2e 20 20 28 | 54 68 65 20 76 69 65 77 |ort). (|The view|
|00001a60| 52 65 63 74 20 61 6e 64 | 20 64 65 73 74 52 65 63 |Rect and| destRec|
|00001a70| 74 20 61 72 65 20 74 68 | 65 0d 09 73 61 6d 65 20 |t are th|e..same |
|00001a80| 73 69 7a 65 2e 29 20 20 | 41 73 73 75 6d 65 73 20 |size.) |Assumes |
|00001a90| 74 68 65 20 70 6f 72 74 | 2c 20 74 65 78 74 20 66 |the port|, text f|
|00001aa0| 6f 6e 74 20 61 6e 64 20 | 74 65 78 74 20 73 69 7a |ont and |text siz|
|00001ab0| 65 20 61 72 65 20 61 6c | 6c 0d 09 73 65 74 20 70 |e are al|l..set p|
|00001ac0| 72 6f 70 65 72 6c 79 2e | 20 20 54 68 65 20 76 69 |roperly.| The vi|
|00001ad0| 65 77 52 65 63 74 20 69 | 73 20 73 69 7a 65 64 20 |ewRect i|s sized |
|00001ae0| 73 6f 20 74 68 61 74 20 | 61 6e 20 69 6e 74 65 67 |so that |an integ|
|00001af0| 72 61 6c 0d 09 6e 75 6d | 62 65 72 20 6f 66 20 6c |ral..num|ber of l|
|00001b00| 69 6e 65 73 20 63 61 6e | 20 62 65 20 64 69 73 70 |ines can| be disp|
|00001b10| 6c 61 79 65 64 20 69 6e | 20 69 74 2c 20 69 2e 65 |layed in| it, i.e|
|00001b20| 2e 2c 20 73 6f 20 74 68 | 61 74 20 61 0d 09 70 61 |., so th|at a..pa|
|00001b30| 72 74 69 61 6c 20 6c 69 | 6e 65 20 6e 65 76 65 72 |rtial li|ne never|
|00001b40| 20 73 68 6f 77 73 20 61 | 74 20 74 68 65 20 62 6f | shows a|t the bo|
|00001b50| 74 74 6f 6d 2e 0d 2a 2f | 0d 0d 73 74 61 74 69 63 |ttom..*/|..static|
|00001b60| 20 43 61 6c 63 45 64 69 | 74 52 65 63 74 20 28 72 | CalcEdi|tRect (r|
|00001b70| 29 0d 52 65 63 74 09 09 | 2a 72 3b 0d 7b 0d 46 6f |).Rect..|*r;.{.Fo|
|00001b80| 6e 74 49 6e 66 6f 09 09 | 09 66 3b 0d 72 65 67 69 |ntInfo..|.f;.regi|
|00001b90| 73 74 65 72 20 49 6e 74 | 65 67 65 72 09 6c 69 6e |ster Int|eger.lin|
|00001ba0| 65 48 65 69 67 68 74 3b | 0d 0d 09 47 65 74 46 6f |eHeight;|...GetFo|
|00001bb0| 6e 74 49 6e 66 6f 20 28 | 26 66 29 3b 0d 09 6c 69 |ntInfo (|&f);..li|
|00001bc0| 6e 65 48 65 69 67 68 74 | 20 3d 20 66 2e 61 73 63 |neHeight| = f.asc|
|00001bd0| 65 6e 74 20 2b 20 66 2e | 64 65 73 63 65 6e 74 20 |ent + f.|descent |
|00001be0| 2b 20 66 2e 6c 65 61 64 | 69 6e 67 3b 0d 09 2a 72 |+ f.lead|ing;..*r|
|00001bf0| 20 3d 20 64 69 73 70 57 | 69 6e 64 2d 3e 70 6f 72 | = dispW|ind->por|
|00001c00| 74 52 65 63 74 3b 0d 09 | 72 2d 3e 6c 65 66 74 20 |tRect;..|r->left |
|00001c10| 2b 3d 20 34 3b 0d 09 72 | 2d 3e 72 69 67 68 74 20 |+= 4;..r|->right |
|00001c20| 2d 3d 20 31 37 3b 09 09 | 09 2f 2a 20 6c 65 61 76 |-= 17;..|./* leav|
|00001c30| 65 20 72 6f 6f 6d 20 66 | 6f 72 20 73 63 72 6f 6c |e room f|or scrol|
|00001c40| 6c 20 62 61 72 20 2b 20 | 32 20 2a 2f 0d 09 72 2d |l bar + |2 */..r-|
|00001c50| 3e 74 6f 70 20 2b 3d 20 | 32 3b 0d 09 72 2d 3e 62 |>top += |2;..r->b|
|00001c60| 6f 74 74 6f 6d 20 3d 20 | 72 2d 3e 74 6f 70 20 2b |ottom = |r->top +|
|00001c70| 20 28 28 72 2d 3e 62 6f | 74 74 6f 6d 20 2d 20 72 | ((r->bo|ttom - r|
|00001c80| 2d 3e 74 6f 70 20 2d 20 | 32 29 20 2f 20 6c 69 6e |->top - |2) / lin|
|00001c90| 65 48 65 69 67 68 74 29 | 20 2a 20 6c 69 6e 65 48 |eHeight)| * lineH|
|00001ca0| 65 69 67 68 74 3b 0d 7d | 0d 0d 0d 2f 2a 0d 09 43 |eight;.}|.../*..C|
|00001cb0| 61 6c 63 75 6c 61 74 65 | 20 74 68 65 20 64 69 6d |alculate| the dim|
|00001cc0| 65 6e 73 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 73 |ensions |of the s|
|00001cd0| 63 72 6f 6c 6c 20 62 61 | 72 20 72 65 63 74 61 6e |croll ba|r rectan|
|00001ce0| 67 6c 65 20 66 6f 72 20 | 74 68 65 0d 09 77 69 6e |gle for |the..win|
|00001cf0| 64 6f 77 2e 20 20 4d 61 | 6b 65 20 73 75 72 65 20 |dow. Ma|ke sure |
|00001d00| 74 68 61 74 20 74 68 65 | 20 65 64 67 65 73 20 6f |that the| edges o|
|00001d10| 76 65 72 6c 61 70 20 74 | 68 65 20 77 69 6e 64 6f |verlap t|he windo|
|00001d20| 77 20 66 72 61 6d 65 20 | 61 6e 64 0d 09 74 68 65 |w frame |and..the|
|00001d30| 20 67 72 6f 77 20 62 6f | 78 2e 0d 2a 2f 0d 0d 73 | grow bo|x..*/..s|
|00001d40| 74 61 74 69 63 20 43 61 | 6c 63 53 63 72 6f 6c 6c |tatic Ca|lcScroll|
|00001d50| 52 65 63 74 20 28 72 29 | 0d 52 65 63 74 09 09 2a |Rect (r)|.Rect..*|
|00001d60| 72 3b 0d 7b 0d 09 2a 72 | 20 3d 20 64 69 73 70 57 |r;.{..*r| = dispW|
|00001d70| 69 6e 64 2d 3e 70 6f 72 | 74 52 65 63 74 3b 0d 09 |ind->por|tRect;..|
|00001d80| 2b 2b 72 2d 3e 72 69 67 | 68 74 3b 0d 09 2d 2d 72 |++r->rig|ht;..--r|
|00001d90| 2d 3e 74 6f 70 3b 0d 09 | 72 2d 3e 6c 65 66 74 20 |->top;..|r->left |
|00001da0| 3d 20 72 2d 3e 72 69 67 | 68 74 20 2d 20 31 36 3b |= r->rig|ht - 16;|
|00001db0| 0d 09 72 2d 3e 62 6f 74 | 74 6f 6d 20 2d 3d 20 31 |..r->bot|tom -= 1|
|00001dc0| 34 3b 0d 7d 0d 0d 0d 2f | 2a 0d 09 43 61 6c 63 75 |4;.}.../|*..Calcu|
|00001dd0| 6c 61 74 65 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |late the| number |
|00001de0| 6f 66 20 6c 69 6e 65 73 | 20 63 75 72 72 65 6e 74 |of lines| current|
|00001df0| 6c 79 20 73 63 72 6f 6c | 6c 65 64 20 6f 66 66 0d |ly scrol|led off.|
|00001e00| 09 74 68 65 20 74 6f 70 | 2e 0d 2a 2f 0d 0d 73 74 |.the top|..*/..st|
|00001e10| 61 74 69 63 20 4c 69 6e | 65 73 4f 66 66 54 6f 70 |atic Lin|esOffTop|
|00001e20| 20 28 29 0d 7b 0d 72 65 | 67 69 73 74 65 72 20 54 | ().{.re|gister T|
|00001e30| 45 50 74 72 09 65 50 74 | 72 3b 0d 0d 09 65 50 74 |EPtr.ePt|r;...ePt|
|00001e40| 72 20 3d 20 2a 64 69 73 | 70 54 45 3b 0d 09 72 65 |r = *dis|pTE;..re|
|00001e50| 74 75 72 6e 20 28 28 28 | 2a 65 50 74 72 29 2e 76 |turn (((|*ePtr).v|
|00001e60| 69 65 77 52 65 63 74 2e | 74 6f 70 20 2d 20 28 2a |iewRect.|top - (*|
|00001e70| 65 50 74 72 29 2e 64 65 | 73 74 52 65 63 74 2e 74 |ePtr).de|stRect.t|
|00001e80| 6f 70 29 0d 09 09 09 09 | 2f 20 28 2a 65 50 74 72 |op).....|/ (*ePtr|
|00001e90| 29 2e 6c 69 6e 65 48 65 | 69 67 68 74 29 3b 0d 7d |).lineHe|ight);.}|
|00001ea0| 0d 0d 0d 2f 2a 0d 09 48 | 69 67 68 6c 69 67 68 74 |.../*..H|ighlight|
|00001eb0| 20 74 68 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 | the scr|oll bar |
|00001ec0| 70 72 6f 70 65 72 6c 79 | 2e 20 20 54 68 69 73 20 |properly|. This |
|00001ed0| 6d 65 61 6e 73 20 74 68 | 61 74 20 69 74 27 73 20 |means th|at it's |
|00001ee0| 6e 6f 74 0d 09 6d 61 64 | 65 20 61 63 74 69 76 65 |not..mad|e active|
|00001ef0| 20 69 66 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 | if the |window i|
|00001f00| 74 73 65 6c 66 20 69 73 | 6e 27 74 20 61 63 74 69 |tself is|n't acti|
|00001f10| 76 65 2c 20 65 76 65 6e | 20 69 66 0d 09 74 68 65 |ve, even| if..the|
|00001f20| 72 65 27 73 20 65 6e 6f | 75 67 68 20 74 65 78 74 |re's eno|ugh text|
|00001f30| 20 74 6f 20 66 69 6c 6c | 20 74 68 65 20 77 69 6e | to fill| the win|
|00001f40| 64 6f 77 2e 0d 2a 2f 0d | 0d 73 74 61 74 69 63 20 |dow..*/.|.static |
|00001f50| 48 69 6c 69 74 65 53 63 | 72 6f 6c 6c 20 28 29 0d |HiliteSc|roll ().|
|00001f60| 7b 0d 09 48 69 6c 69 74 | 65 43 6f 6e 74 72 6f 6c |{..Hilit|eControl|
|00001f70| 20 28 64 69 73 70 53 63 | 72 6f 6c 6c 2c 20 64 69 | (dispSc|roll, di|
|00001f80| 73 70 57 69 6e 64 20 3d | 3d 20 46 72 6f 6e 74 57 |spWind =|= FrontW|
|00001f90| 69 6e 64 6f 77 20 28 29 | 20 26 26 0d 09 09 09 09 |indow ()| &&.....|
|00001fa0| 09 09 09 09 47 65 74 43 | 74 6c 4d 61 78 20 28 64 |....GetC|tlMax (d|
|00001fb0| 69 73 70 53 63 72 6f 6c | 6c 29 20 3e 20 30 20 3f |ispScrol|l) > 0 ?|
|00001fc0| 20 30 20 3a 20 32 35 35 | 29 3b 0d 7d 0d 0d 0d 2f | 0 : 255|);.}.../|
|00001fd0| 2a 0d 20 20 20 20 53 63 | 72 6f 6c 6c 20 74 6f 20 |*. Sc|roll to |
|00001fe0| 74 68 65 20 63 6f 72 72 | 65 63 74 20 70 6f 73 69 |the corr|ect posi|
|00001ff0| 74 69 6f 6e 2e 20 20 6c | 44 65 6c 74 61 20 69 73 |tion. l|Delta is|
|00002000| 20 74 68 65 0d 20 20 20 | 20 61 6d 6f 75 6e 74 20 | the. | amount |
|00002010| 74 6f 20 43 48 41 4e 47 | 45 20 74 68 65 20 63 75 |to CHANG|E the cu|
|00002020| 72 72 65 6e 74 20 73 63 | 72 6f 6c 6c 20 73 65 74 |rrent sc|roll set|
|00002030| 74 69 6e 67 20 62 79 2e | 0d 20 20 20 20 50 6f 73 |ting by.|. Pos|
|00002040| 69 74 69 76 65 20 73 63 | 72 6f 6c 6c 73 20 74 68 |itive sc|rolls th|
|00002050| 65 20 74 65 78 74 20 75 | 70 2c 20 6e 65 67 61 74 |e text u|p, negat|
|00002060| 69 76 65 20 64 6f 77 6e | 2e 0d 2a 2f 0d 0d 73 74 |ive down|..*/..st|
|00002070| 61 74 69 63 20 53 63 72 | 6f 6c 6c 54 65 78 74 20 |atic Scr|ollText |
|00002080| 28 6c 44 65 6c 74 61 29 | 0d 49 6e 74 65 67 65 72 |(lDelta)|.Integer|
|00002090| 09 6c 44 65 6c 74 61 3b | 0d 7b 0d 72 65 67 69 73 |.lDelta;|.{.regis|
|000020a0| 74 65 72 20 49 6e 74 65 | 67 65 72 09 6c 48 65 69 |ter Inte|ger.lHei|
|000020b0| 67 68 74 3b 0d 72 65 67 | 69 73 74 65 72 20 49 6e |ght;.reg|ister In|
|000020c0| 74 65 67 65 72 09 6e 65 | 77 4c 69 6e 65 3b 0d 72 |teger.ne|wLine;.r|
|000020d0| 65 67 69 73 74 65 72 20 | 49 6e 74 65 67 65 72 09 |egister |Integer.|
|000020e0| 74 6f 70 4c 69 6e 65 3b | 0d 0d 09 6c 48 65 69 67 |topLine;|...lHeig|
|000020f0| 68 74 20 3d 20 28 2a 2a | 64 69 73 70 54 45 29 2e |ht = (**|dispTE).|
|00002100| 6c 69 6e 65 48 65 69 67 | 68 74 3b 0d 09 74 6f 70 |lineHeig|ht;..top|
|00002110| 4c 69 6e 65 20 3d 20 4c | 69 6e 65 73 4f 66 66 54 |Line = L|inesOffT|
|00002120| 6f 70 20 28 29 3b 0d 20 | 20 20 20 6e 65 77 4c 69 |op ();. | newLi|
|00002130| 6e 65 20 3d 20 74 6f 70 | 4c 69 6e 65 20 2b 20 6c |ne = top|Line + l|
|00002140| 44 65 6c 74 61 3b 0d 20 | 20 20 20 69 66 20 28 6e |Delta;. | if (n|
|00002150| 65 77 4c 69 6e 65 20 3c | 20 30 29 0d 20 20 20 20 |ewLine <| 0). |
|00002160| 09 6e 65 77 4c 69 6e 65 | 20 3d 20 30 3b 0d 20 20 |.newLine| = 0;. |
|00002170| 20 20 69 66 20 28 6e 65 | 77 4c 69 6e 65 20 3e 20 | if (ne|wLine > |
|00002180| 47 65 74 43 74 6c 4d 61 | 78 20 28 64 69 73 70 53 |GetCtlMa|x (dispS|
|00002190| 63 72 6f 6c 6c 29 29 0d | 09 09 6e 65 77 4c 69 6e |croll)).|..newLin|
|000021a0| 65 20 3d 20 47 65 74 43 | 74 6c 4d 61 78 20 28 64 |e = GetC|tlMax (d|
|000021b0| 69 73 70 53 63 72 6f 6c | 6c 29 3b 0d 20 20 20 20 |ispScrol|l);. |
|000021c0| 53 65 74 43 74 6c 56 61 | 6c 75 65 20 28 64 69 73 |SetCtlVa|lue (dis|
|000021d0| 70 53 63 72 6f 6c 6c 2c | 20 6e 65 77 4c 69 6e 65 |pScroll,| newLine|
|000021e0| 29 3b 0d 20 20 20 20 54 | 45 53 63 72 6f 6c 6c 20 |);. T|EScroll |
|000021f0| 28 30 2c 20 28 74 6f 70 | 4c 69 6e 65 20 2d 20 6e |(0, (top|Line - n|
|00002200| 65 77 4c 69 6e 65 20 29 | 20 2a 20 6c 48 65 69 67 |ewLine )| * lHeig|
|00002210| 68 74 2c 20 64 69 73 70 | 54 45 29 3b 0d 7d 0d 0d |ht, disp|TE);.}..|
|00002220| 0d 2f 2a 0d 09 46 69 6c | 74 65 72 20 70 72 6f 63 |./*..Fil|ter proc|
|00002230| 20 66 6f 72 20 74 72 61 | 63 6b 69 6e 67 20 6d 6f | for tra|cking mo|
|00002240| 75 73 65 64 6f 77 6e 20 | 69 6e 20 73 63 72 6f 6c |usedown |in scrol|
|00002250| 6c 20 62 61 72 2e 20 20 | 54 68 65 20 63 6f 64 65 |l bar. |The code|
|00002260| 20 66 6f 72 0d 09 74 68 | 65 20 70 61 72 74 20 6f | for..th|e part o|
|00002270| 72 69 67 69 6e 61 6c 6c | 79 20 68 69 74 20 69 73 |riginall|y hit is|
|00002280| 20 73 74 6f 72 65 64 20 | 69 6e 20 74 68 65 20 63 | stored |in the c|
|00002290| 6f 6e 74 72 6f 6c 27 73 | 20 72 65 66 65 72 65 6e |ontrol's| referen|
|000022a0| 63 65 0d 09 76 61 6c 75 | 65 20 62 79 20 4d 6f 75 |ce..valu|e by Mou|
|000022b0| 73 65 20 28 29 20 62 65 | 66 6f 72 65 20 63 61 6c |se () be|fore cal|
|000022c0| 6c 69 6e 67 20 74 68 69 | 73 2e 0d 0d 09 53 63 72 |ling thi|s....Scr|
|000022d0| 6f 6c 6c 20 62 79 20 6f | 6e 65 20 6c 69 6e 65 20 |oll by o|ne line |
|000022e0| 69 66 20 74 68 65 20 6d | 6f 75 73 65 20 69 73 20 |if the m|ouse is |
|000022f0| 69 6e 20 61 6e 20 61 72 | 72 6f 77 2e 20 20 53 63 |in an ar|row. Sc|
|00002300| 72 6f 6c 6c 20 62 79 20 | 61 20 68 61 6c 66 0d 09 |roll by |a half..|
|00002310| 77 69 6e 64 6f 77 27 73 | 20 77 6f 72 74 68 20 6f |window's| worth o|
|00002320| 66 20 6c 69 6e 65 73 20 | 69 66 20 74 68 65 20 6d |f lines |if the m|
|00002330| 6f 75 73 65 20 69 73 20 | 69 6e 20 61 20 70 61 67 |ouse is |in a pag|
|00002340| 65 20 72 65 67 69 6f 6e | 2e 0d 2a 2f 0d 0d 73 74 |e region|..*/..st|
|00002350| 61 74 69 63 20 70 61 73 | 63 61 6c 20 76 6f 69 64 |atic pas|cal void|
|00002360| 20 54 72 61 63 6b 53 63 | 72 6f 6c 6c 20 28 74 68 | TrackSc|roll (th|
|00002370| 65 53 63 72 6f 6c 6c 2c | 20 70 61 72 74 43 6f 64 |eScroll,| partCod|
|00002380| 65 29 0d 43 6f 6e 74 72 | 6f 6c 48 61 6e 64 6c 65 |e).Contr|olHandle|
|00002390| 09 74 68 65 53 63 72 6f | 6c 6c 3b 0d 49 6e 74 65 |.theScro|ll;.Inte|
|000023a0| 67 65 72 09 09 09 70 61 | 72 74 43 6f 64 65 3b 0d |ger...pa|rtCode;.|
|000023b0| 7b 0d 72 65 67 69 73 74 | 65 72 20 49 6e 74 65 67 |{.regist|er Integ|
|000023c0| 65 72 09 6c 44 65 6c 74 | 61 3b 0d 72 65 67 69 73 |er.lDelt|a;.regis|
|000023d0| 74 65 72 20 49 6e 74 65 | 67 65 72 09 68 61 6c 66 |ter Inte|ger.half|
|000023e0| 50 61 67 65 3b 0d 0d 20 | 20 20 20 69 66 20 28 70 |Page;.. | if (p|
|000023f0| 61 72 74 43 6f 64 65 20 | 3d 3d 20 47 65 74 43 52 |artCode |== GetCR|
|00002400| 65 66 43 6f 6e 20 28 74 | 68 65 53 63 72 6f 6c 6c |efCon (t|heScroll|
|00002410| 29 29 09 2f 2a 20 73 74 | 69 6c 6c 20 69 6e 20 73 |))./* st|ill in s|
|00002420| 61 6d 65 20 70 61 72 74 | 3f 20 2a 2f 0d 20 20 20 |ame part|? */. |
|00002430| 20 7b 0d 09 09 68 61 6c | 66 50 61 67 65 20 3d 20 | {...hal|fPage = |
|00002440| 28 28 28 2a 2a 64 69 73 | 70 54 45 29 2e 76 69 65 |(((**dis|pTE).vie|
|00002450| 77 52 65 63 74 2e 62 6f | 74 74 6f 6d 20 2d 20 28 |wRect.bo|ttom - (|
|00002460| 2a 2a 64 69 73 70 54 45 | 29 2e 76 69 65 77 52 65 |**dispTE|).viewRe|
|00002470| 63 74 2e 74 6f 70 29 0d | 09 09 09 09 09 09 2f 20 |ct.top).|....../ |
|00002480| 28 2a 2a 64 69 73 70 54 | 45 29 2e 6c 69 6e 65 48 |(**dispT|E).lineH|
|00002490| 65 69 67 68 74 29 20 2f | 20 32 3b 0d 09 09 69 66 |eight) /| 2;...if|
|000024a0| 20 28 68 61 6c 66 50 61 | 67 65 20 3d 3d 20 30 29 | (halfPa|ge == 0)|
|000024b0| 0d 09 09 09 2b 2b 68 61 | 6c 66 50 61 67 65 3b 0d |....++ha|lfPage;.|
|000024c0| 20 20 20 20 20 20 20 20 | 73 77 69 74 63 68 20 28 | |switch (|
|000024d0| 70 61 72 74 43 6f 64 65 | 29 0d 20 20 20 20 20 20 |partCode|). |
|000024e0| 20 20 7b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|000024f0| 63 61 73 65 20 69 6e 55 | 70 42 75 74 74 6f 6e 3a |case inU|pButton:|
|00002500| 20 6c 44 65 6c 74 61 20 | 3d 20 2d 31 3b 20 62 72 | lDelta |= -1; br|
|00002510| 65 61 6b 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |eak;. | |
|00002520| 20 63 61 73 65 20 69 6e | 44 6f 77 6e 42 75 74 74 | case in|DownButt|
|00002530| 6f 6e 3a 20 6c 44 65 6c | 74 61 20 3d 20 31 3b 20 |on: lDel|ta = 1; |
|00002540| 62 72 65 61 6b 3b 0d 20 | 20 20 20 20 20 20 20 20 |break;. | |
|00002550| 20 20 20 63 61 73 65 20 | 69 6e 50 61 67 65 55 70 | case |inPageUp|
|00002560| 3a 20 6c 44 65 6c 74 61 | 20 3d 20 2d 68 61 6c 66 |: lDelta| = -half|
|00002570| 50 61 67 65 3b 20 62 72 | 65 61 6b 3b 0d 20 20 20 |Page; br|eak;. |
|00002580| 20 20 20 20 20 20 20 20 | 20 63 61 73 65 20 69 6e | | case in|
|00002590| 50 61 67 65 44 6f 77 6e | 3a 20 6c 44 65 6c 74 61 |PageDown|: lDelta|
|000025a0| 20 3d 20 68 61 6c 66 50 | 61 67 65 3b 20 62 72 65 | = halfP|age; bre|
|000025b0| 61 6b 3b 0d 20 20 20 20 | 20 20 20 20 7d 0d 20 20 |ak;. | }. |
|000025c0| 20 20 20 20 20 20 53 63 | 72 6f 6c 6c 54 65 78 74 | Sc|rollText|
|000025d0| 20 28 6c 44 65 6c 74 61 | 29 3b 0d 20 20 20 20 7d | (lDelta|);. }|
|000025e0| 0d 7d 0d 0d 0d 2f 2a 0d | 09 41 64 6a 75 73 74 20 |.}.../*.|.Adjust |
|000025f0| 74 68 65 20 74 65 78 74 | 20 69 6e 20 74 68 65 20 |the text| in the |
|00002600| 74 65 78 74 20 72 65 63 | 6f 72 64 20 61 6e 64 20 |text rec|ord and |
|00002610| 74 68 65 20 73 63 72 6f | 6c 6c 20 62 61 72 2e 20 |the scro|ll bar. |
|00002620| 20 54 68 69 73 20 69 73 | 0d 09 63 61 6c 6c 65 64 | This is|..called|
|00002630| 20 66 6f 72 20 6d 61 6a | 6f 72 20 63 61 74 61 73 | for maj|or catas|
|00002640| 74 72 6f 70 68 65 73 2c | 20 73 75 63 68 20 61 73 |trophes,| such as|
|00002650| 20 72 65 73 69 7a 69 6e | 67 20 74 68 65 20 77 69 | resizin|g the wi|
|00002660| 6e 64 6f 77 2c 20 6f 72 | 0d 09 63 68 61 6e 67 69 |ndow, or|..changi|
|00002670| 6e 67 20 74 68 65 20 77 | 6f 72 64 20 77 72 61 70 |ng the w|ord wrap|
|00002680| 20 73 74 79 6c 65 2e 20 | 20 49 74 20 6d 61 6b 65 | style. | It make|
|00002690| 73 20 73 75 72 65 20 74 | 68 65 20 76 69 65 77 20 |s sure t|he view |
|000026a0| 61 6e 64 0d 09 64 65 73 | 74 69 6e 61 74 69 6f 6e |and..des|tination|
|000026b0| 20 72 65 63 74 61 6e 67 | 6c 65 73 20 61 72 65 20 | rectang|les are |
|000026c0| 73 69 7a 65 64 20 70 72 | 6f 70 65 72 6c 79 2c 20 |sized pr|operly, |
|000026d0| 61 6e 64 20 74 68 61 74 | 20 74 68 65 20 62 6f 74 |and that| the bot|
|000026e0| 74 6f 6d 0d 09 6c 69 6e | 65 20 6f 66 20 74 65 78 |tom..lin|e of tex|
|000026f0| 74 20 6e 65 76 65 72 20 | 73 63 72 6f 6c 6c 73 20 |t never |scrolls |
|00002700| 75 70 20 70 61 73 74 20 | 74 68 65 20 62 6f 74 74 |up past |the bott|
|00002710| 6f 6d 20 6c 69 6e 65 20 | 6f 66 20 74 68 65 0d 09 |om line |of the..|
|00002720| 77 69 6e 64 6f 77 2c 20 | 69 66 20 74 68 65 72 65 |window, |if there|
|00002730| 27 73 20 65 6e 6f 75 67 | 68 20 74 6f 20 66 69 6c |'s enoug|h to fil|
|00002740| 6c 20 74 68 65 20 77 69 | 6e 64 6f 77 2c 20 61 6e |l the wi|ndow, an|
|00002750| 64 20 74 68 61 74 20 74 | 68 65 0d 09 73 63 72 6f |d that t|he..scro|
|00002760| 6c 6c 20 62 61 72 20 6d | 61 78 20 61 6e 64 20 63 |ll bar m|ax and c|
|00002770| 75 72 72 65 6e 74 20 76 | 61 6c 75 65 73 20 61 72 |urrent v|alues ar|
|00002780| 65 20 73 65 74 20 70 72 | 6f 70 65 72 6c 79 2e 0d |e set pr|operly..|
|00002790| 0d 09 52 65 73 69 7a 69 | 6e 67 20 74 68 65 20 64 |..Resizi|ng the d|
|000027a0| 65 73 74 20 72 65 63 74 | 20 6a 75 73 74 20 6d 65 |est rect| just me|
|000027b0| 61 6e 73 20 72 65 73 65 | 74 74 69 6e 67 20 74 68 |ans rese|tting th|
|000027c0| 65 20 72 69 67 68 74 20 | 65 64 67 65 0d 09 28 74 |e right |edge..(t|
|000027d0| 68 65 20 74 6f 70 20 69 | 73 20 4e 4f 54 20 72 65 |he top i|s NOT re|
|000027e0| 73 65 74 29 2c 20 73 69 | 6e 63 65 20 74 65 78 74 |set), si|nce text|
|000027f0| 20 6d 69 67 68 74 20 62 | 65 20 73 63 72 6f 6c 6c | might b|e scroll|
|00002800| 65 64 20 6f 66 66 20 74 | 68 65 0d 09 74 6f 70 20 |ed off t|he..top |
|00002810| 28 69 2e 65 2e 2c 20 64 | 65 73 74 52 65 63 74 2e |(i.e., d|estRect.|
|00002820| 74 6f 70 20 21 3d 20 30 | 29 2e 0d 2a 2f 0d 0d 73 |top != 0|)..*/..s|
|00002830| 74 61 74 69 63 20 4f 76 | 65 72 68 61 75 6c 44 69 |tatic Ov|erhaulDi|
|00002840| 73 70 6c 61 79 20 28 29 | 0d 7b 0d 52 65 63 74 09 |splay ()|.{.Rect.|
|00002850| 09 09 09 72 3b 0d 72 65 | 67 69 73 74 65 72 20 49 |...r;.re|gister I|
|00002860| 6e 74 65 67 65 72 09 6e | 4c 69 6e 65 73 3b 09 09 |nteger.n|Lines;..|
|00002870| 09 2f 2a 20 23 20 6f 66 | 20 6c 69 6e 65 73 20 69 |./* # of| lines i|
|00002880| 6e 20 54 45 52 65 63 20 | 2a 2f 0d 72 65 67 69 73 |n TERec |*/.regis|
|00002890| 74 65 72 20 49 6e 74 65 | 67 65 72 09 76 69 73 4c |ter Inte|ger.visL|
|000028a0| 69 6e 65 73 3b 09 09 2f | 2a 20 23 20 6f 66 20 6c |ines;../|* # of l|
|000028b0| 69 6e 65 73 20 64 69 73 | 70 6c 61 79 61 62 6c 65 |ines dis|playable|
|000028c0| 20 69 6e 20 77 69 6e 64 | 6f 77 20 2a 2f 0d 72 65 | in wind|ow */.re|
|000028d0| 67 69 73 74 65 72 20 49 | 6e 74 65 67 65 72 09 74 |gister I|nteger.t|
|000028e0| 6f 70 4c 69 6e 65 73 3b | 09 09 2f 2a 20 23 20 6f |opLines;|../* # o|
|000028f0| 66 20 6c 69 6e 65 73 20 | 63 75 72 72 65 6e 74 6c |f lines |currentl|
|00002900| 79 20 73 63 72 6f 6c 6c | 65 64 20 6f 66 66 20 74 |y scroll|ed off t|
|00002910| 6f 70 20 2a 2f 0d 72 65 | 67 69 73 74 65 72 20 49 |op */.re|gister I|
|00002920| 6e 74 65 67 65 72 09 73 | 63 72 6f 6c 6c 4c 69 6e |nteger.s|crollLin|
|00002930| 65 73 3b 09 2f 2a 20 23 | 20 6f 66 20 6c 69 6e 65 |es;./* #| of line|
|00002940| 73 20 74 6f 20 73 63 72 | 6f 6c 6c 20 64 6f 77 6e |s to scr|oll down|
|00002950| 20 2a 2f 0d 72 65 67 69 | 73 74 65 72 20 49 6e 74 | */.regi|ster Int|
|00002960| 65 67 65 72 09 6c 48 65 | 69 67 68 74 3b 0d 0d 09 |eger.lHe|ight;...|
|00002970| 43 61 6c 63 45 64 69 74 | 52 65 63 74 20 28 26 72 |CalcEdit|Rect (&r|
|00002980| 29 3b 0d 09 28 2a 2a 64 | 69 73 70 54 45 29 2e 64 |);..(**d|ispTE).d|
|00002990| 65 73 74 52 65 63 74 2e | 72 69 67 68 74 20 3d 20 |estRect.|right = |
|000029a0| 72 2e 72 69 67 68 74 3b | 0d 09 28 2a 2a 64 69 73 |r.right;|..(**dis|
|000029b0| 70 54 45 29 2e 76 69 65 | 77 52 65 63 74 20 3d 20 |pTE).vie|wRect = |
|000029c0| 72 3b 0d 09 54 45 43 61 | 6c 54 65 78 74 20 28 64 |r;..TECa|lText (d|
|000029d0| 69 73 70 54 45 29 3b 09 | 09 2f 2a 20 72 65 63 61 |ispTE);.|./* reca|
|000029e0| 6c 63 20 6c 69 6e 65 20 | 73 74 61 72 74 73 20 2a |lc line |starts *|
|000029f0| 2f 0d 09 2f 2a 72 20 3d | 20 28 2a 2a 64 69 73 70 |/../*r =| (**disp|
|00002a00| 54 45 29 2e 76 69 65 77 | 52 65 63 74 3b 2a 2f 09 |TE).view|Rect;*/.|
|00002a10| 2f 2a 20 3f 3f 20 2a 2f | 0d 09 6c 48 65 69 67 68 |/* ?? */|..lHeigh|
|00002a20| 74 20 3d 20 28 2a 2a 64 | 69 73 70 54 45 29 2e 6c |t = (**d|ispTE).l|
|00002a30| 69 6e 65 48 65 69 67 68 | 74 3b 0d 09 6e 4c 69 6e |ineHeigh|t;..nLin|
|00002a40| 65 73 20 3d 20 28 2a 2a | 64 69 73 70 54 45 29 2e |es = (**|dispTE).|
|00002a50| 6e 4c 69 6e 65 73 3b 0d | 09 76 69 73 4c 69 6e 65 |nLines;.|.visLine|
|00002a60| 73 20 3d 20 28 72 2e 62 | 6f 74 74 6f 6d 20 2d 20 |s = (r.b|ottom - |
|00002a70| 72 2e 74 6f 70 29 20 2f | 20 6c 48 65 69 67 68 74 |r.top) /| lHeight|
|00002a80| 3b 0d 09 74 6f 70 4c 69 | 6e 65 73 20 3d 20 4c 69 |;..topLi|nes = Li|
|00002a90| 6e 65 73 4f 66 66 54 6f | 70 20 28 29 3b 0d 0d 2f |nesOffTo|p ();../|
|00002aa0| 2a 0d 09 49 66 20 74 68 | 65 20 74 65 78 74 20 64 |*..If th|e text d|
|00002ab0| 6f 65 73 6e 27 74 20 66 | 69 6c 6c 20 74 68 65 20 |oesn't f|ill the |
|00002ac0| 77 69 6e 64 6f 77 20 28 | 76 69 73 4c 69 6e 65 73 |window (|visLines|
|00002ad0| 20 3e 20 6e 4c 69 6e 65 | 73 20 2d 20 74 6f 70 4c | > nLine|s - topL|
|00002ae0| 69 6e 65 73 29 2c 0d 09 | 70 75 6c 6c 20 74 68 65 |ines),..|pull the|
|00002af0| 20 74 65 78 74 20 64 6f | 77 6e 20 69 66 20 70 6f | text do|wn if po|
|00002b00| 73 73 69 62 6c 65 20 28 | 69 66 20 74 6f 70 4c 69 |ssible (|if topLi|
|00002b10| 6e 65 73 20 3e 20 30 29 | 2e 20 20 4d 61 6b 65 20 |nes > 0)|. Make |
|00002b20| 73 75 72 65 20 6e 6f 74 | 0d 09 74 6f 20 74 72 79 |sure not|..to try|
|00002b30| 20 74 6f 20 73 63 72 6f | 6c 6c 20 64 6f 77 6e 20 | to scro|ll down |
|00002b40| 62 79 20 6d 6f 72 65 20 | 6c 69 6e 65 73 20 74 68 |by more |lines th|
|00002b50| 61 6e 20 61 72 65 20 68 | 69 64 64 65 6e 20 6f 66 |an are h|idden of|
|00002b60| 66 20 74 68 65 20 74 6f | 70 2e 0d 2a 2f 0d 09 73 |f the to|p..*/..s|
|00002b70| 63 72 6f 6c 6c 4c 69 6e | 65 73 20 3d 20 76 69 73 |crollLin|es = vis|
|00002b80| 4c 69 6e 65 73 20 2d 20 | 28 6e 4c 69 6e 65 73 20 |Lines - |(nLines |
|00002b90| 2d 20 74 6f 70 4c 69 6e | 65 73 29 3b 0d 09 69 66 |- topLin|es);..if|
|00002ba0| 20 28 73 63 72 6f 6c 6c | 4c 69 6e 65 73 20 3e 20 | (scroll|Lines > |
|00002bb0| 30 20 26 26 20 74 6f 70 | 4c 69 6e 65 73 20 3e 20 |0 && top|Lines > |
|00002bc0| 30 29 0d 09 7b 0d 09 09 | 69 66 20 28 73 63 72 6f |0)..{...|if (scro|
|00002bd0| 6c 6c 4c 69 6e 65 73 20 | 3e 20 74 6f 70 4c 69 6e |llLines |> topLin|
|00002be0| 65 73 29 0d 09 09 09 73 | 63 72 6f 6c 6c 4c 69 6e |es)....s|crollLin|
|00002bf0| 65 73 20 3d 20 74 6f 70 | 4c 69 6e 65 73 3b 0d 09 |es = top|Lines;..|
|00002c00| 09 54 45 53 63 72 6f 6c | 6c 20 28 30 2c 20 73 63 |.TEScrol|l (0, sc|
|00002c10| 72 6f 6c 6c 4c 69 6e 65 | 73 20 2a 20 6c 48 65 69 |rollLine|s * lHei|
|00002c20| 67 68 74 2c 20 64 69 73 | 70 54 45 29 3b 0d 09 09 |ght, dis|pTE);...|
|00002c30| 74 6f 70 4c 69 6e 65 73 | 20 2d 3d 20 73 63 72 6f |topLines| -= scro|
|00002c40| 6c 6c 4c 69 6e 65 73 3b | 0d 09 7d 0d 09 54 45 55 |llLines;|..}..TEU|
|00002c50| 70 64 61 74 65 20 28 26 | 72 2c 20 64 69 73 70 54 |pdate (&|r, dispT|
|00002c60| 45 29 3b 0d 0d 09 53 65 | 74 43 74 6c 4d 61 78 20 |E);...Se|tCtlMax |
|00002c70| 28 64 69 73 70 53 63 72 | 6f 6c 6c 2c 20 6e 4c 69 |(dispScr|oll, nLi|
|00002c80| 6e 65 73 20 2d 20 76 69 | 73 4c 69 6e 65 73 20 3c |nes - vi|sLines <|
|00002c90| 20 30 20 3f 20 30 20 3a | 20 6e 4c 69 6e 65 73 20 | 0 ? 0 :| nLines |
|00002ca0| 2d 20 76 69 73 4c 69 6e | 65 73 29 3b 0d 09 53 65 |- visLin|es);..Se|
|00002cb0| 74 43 74 6c 56 61 6c 75 | 65 20 28 64 69 73 70 53 |tCtlValu|e (dispS|
|00002cc0| 63 72 6f 6c 6c 2c 20 74 | 6f 70 4c 69 6e 65 73 29 |croll, t|opLines)|
|00002cd0| 3b 0d 09 48 69 6c 69 74 | 65 53 63 72 6f 6c 6c 20 |;..Hilit|eScroll |
|00002ce0| 28 29 3b 0d 7d 0d 0d 0d | 2f 2a 20 2d 2d 2d 2d 2d |();.}...|/* -----|
|00002cf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 20 2a 2f 0d 2f |--------|--- */./|
|00002d30| 2a 09 09 09 09 09 09 57 | 69 6e 64 6f 77 20 48 61 |*......W|indow Ha|
|00002d40| 6e 64 6c 65 72 20 52 6f | 75 74 69 6e 65 73 09 09 |ndler Ro|utines..|
|00002d50| 09 09 09 09 2a 2f 0d 2f | 2a 20 2d 2d 2d 2d 2d 2d |....*/./|* ------|
|00002d60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 20 2a 2f 0d 0d 0d |--------|-- */...|
|00002da0| 2f 2a 0d 09 57 68 65 6e | 20 74 68 65 20 77 69 6e |/*..When| the win|
|00002db0| 64 6f 77 20 63 6f 6d 65 | 73 20 61 63 74 69 76 65 |dow come|s active|
|00002dc0| 2c 20 68 69 67 68 6c 69 | 67 68 74 20 74 68 65 20 |, highli|ght the |
|00002dd0| 73 63 72 6f 6c 6c 20 62 | 61 72 20 61 70 70 72 6f |scroll b|ar appro|
|00002de0| 70 72 69 61 74 65 6c 79 | 2e 0d 09 57 68 65 6e 20 |priately|...When |
|00002df0| 74 68 65 20 77 69 6e 64 | 6f 77 20 69 73 20 64 65 |the wind|ow is de|
|00002e00| 61 63 74 69 76 61 74 65 | 64 2c 20 75 6e 2d 68 69 |activate|d, un-hi|
|00002e10| 67 68 6c 69 67 68 74 20 | 74 68 65 20 73 63 72 6f |ghlight |the scro|
|00002e20| 6c 6c 20 62 61 72 2e 0d | 09 52 65 64 72 61 77 20 |ll bar..|.Redraw |
|00002e30| 74 68 65 20 67 72 6f 77 | 20 62 6f 78 2e 0d 0d 09 |the grow| box....|
|00002e40| 4e 6f 74 69 66 79 20 74 | 68 65 20 68 6f 73 74 20 |Notify t|he host |
|00002e50| 61 73 20 61 70 70 72 6f | 70 72 69 61 74 65 2e 0d |as appro|priate..|
|00002e60| 0d 09 4e 6f 74 65 20 74 | 68 61 74 20 63 6c 69 63 |..Note t|hat clic|
|00002e70| 6b 69 6e 67 20 63 6c 6f | 73 65 20 62 6f 78 20 68 |king clo|se box h|
|00002e80| 69 64 65 73 20 74 68 65 | 20 77 69 6e 64 6f 77 2c |ides the| window,|
|00002e90| 20 77 68 69 63 68 20 67 | 65 6e 65 72 61 74 65 73 | which g|enerates|
|00002ea0| 20 61 0d 09 64 65 61 63 | 74 69 76 61 74 65 20 65 | a..deac|tivate e|
|00002eb0| 76 65 6e 74 2c 20 73 6f | 20 74 68 65 72 65 20 69 |vent, so| there i|
|00002ec0| 73 20 6e 6f 20 6e 65 65 | 64 20 66 6f 72 20 61 20 |s no nee|d for a |
|00002ed0| 63 6c 6f 73 65 20 6e 6f | 74 69 66 69 65 72 2e 0d |close no|tifier..|
|00002ee0| 2a 2f 0d 0d 73 74 61 74 | 69 63 20 41 63 74 69 76 |*/..stat|ic Activ|
|00002ef0| 61 74 65 20 28 69 73 41 | 63 74 69 76 65 29 0d 42 |ate (isA|ctive).B|
|00002f00| 6f 6f 6c 65 61 6e 09 69 | 73 41 63 74 69 76 65 3b |oolean.i|sActive;|
|00002f10| 0d 7b 0d 09 53 79 6e 63 | 47 6c 6f 62 61 6c 73 20 |.{..Sync|Globals |
|00002f20| 28 6e 69 6c 29 3b 09 09 | 09 09 2f 2a 20 73 79 6e |(nil);..|../* syn|
|00002f30| 63 20 74 6f 20 63 75 72 | 72 65 6e 74 20 70 6f 72 |c to cur|rent por|
|00002f40| 74 20 2a 2f 0d 09 44 72 | 61 77 47 72 6f 77 42 6f |t */..Dr|awGrowBo|
|00002f50| 78 20 28 29 3b 0d 09 48 | 69 6c 69 74 65 53 63 72 |x ();..H|iliteScr|
|00002f60| 6f 6c 6c 20 28 29 3b 0d | 0d 09 69 66 20 28 64 41 |oll ();.|..if (dA|
|00002f70| 63 74 69 76 61 74 65 20 | 21 3d 20 6e 69 6c 29 0d |ctivate |!= nil).|
|00002f80| 09 09 28 2a 64 41 63 74 | 69 76 61 74 65 29 20 28 |..(*dAct|ivate) (|
|00002f90| 69 73 41 63 74 69 76 65 | 29 3b 0d 7d 0d 0d 0d 2f |isActive|);.}.../|
|00002fa0| 2a 0d 09 55 70 64 61 74 | 65 20 77 69 6e 64 6f 77 |*..Updat|e window|
|00002fb0| 2e 20 20 54 68 65 20 75 | 70 64 61 74 65 20 65 76 |. The u|pdate ev|
|00002fc0| 65 6e 74 20 6d 69 67 68 | 74 20 62 65 20 69 6e 20 |ent migh|t be in |
|00002fd0| 72 65 73 70 6f 6e 73 65 | 20 74 6f 20 61 0d 09 77 |response| to a..w|
|00002fe0| 69 6e 64 6f 77 20 72 65 | 73 69 7a 69 6e 67 2e 20 |indow re|sizing. |
|00002ff0| 20 49 66 20 73 6f 2c 20 | 6d 6f 76 65 20 61 6e 64 | If so, |move and|
|00003000| 20 72 65 73 69 7a 65 20 | 74 68 65 20 73 63 72 6f | resize |the scro|
|00003010| 6c 6c 20 62 61 72 2c 0d | 09 61 6e 64 20 72 65 63 |ll bar,.|.and rec|
|00003020| 61 6c 63 75 6c 61 74 65 | 20 74 68 65 20 74 65 78 |alculate| the tex|
|00003030| 74 20 64 69 73 70 6c 61 | 79 2e 0d 0d 09 54 68 65 |t displa|y....The|
|00003040| 20 56 61 6c 69 64 52 65 | 63 74 20 63 61 6c 6c 20 | ValidRe|ct call |
|00003050| 69 73 20 64 6f 6e 65 20 | 62 65 63 61 75 73 65 20 |is done |because |
|00003060| 74 68 65 20 48 69 64 65 | 43 6f 6e 74 72 6f 6c 20 |the Hide|Control |
|00003070| 61 64 64 73 20 74 68 65 | 0d 09 63 6f 6e 74 72 6f |adds the|..contro|
|00003080| 6c 20 62 6f 75 6e 64 73 | 20 62 6f 78 20 74 6f 20 |l bounds| box to |
|00003090| 74 68 65 20 75 70 64 61 | 74 65 20 72 65 67 69 6f |the upda|te regio|
|000030a0| 6e 20 2d 20 77 68 69 63 | 68 20 77 6f 75 6c 64 20 |n - whic|h would |
|000030b0| 67 65 6e 65 72 61 74 65 | 0d 09 61 6e 6f 74 68 65 |generate|..anothe|
|000030c0| 72 20 75 70 64 61 74 65 | 20 65 76 65 6e 74 21 20 |r update| event! |
|000030d0| 20 53 69 6e 63 65 20 65 | 76 65 72 79 74 68 69 6e | Since e|verythin|
|000030e0| 67 20 69 73 20 72 65 64 | 72 61 77 6e 20 62 65 6c |g is red|rawn bel|
|000030f0| 6f 77 20 61 6e 79 77 61 | 79 2c 0d 09 74 68 65 20 |ow anywa|y,..the |
|00003100| 56 61 6c 69 64 52 65 63 | 74 20 69 73 20 75 73 65 |ValidRec|t is use|
|00003110| 64 20 74 6f 20 63 61 6e | 63 65 6c 20 74 68 65 20 |d to can|cel the |
|00003120| 75 70 64 61 74 65 2e 0d | 2a 2f 0d 0d 73 74 61 74 |update..|*/..stat|
|00003130| 69 63 20 55 70 64 61 74 | 65 20 28 72 65 73 69 7a |ic Updat|e (resiz|
|00003140| 65 64 29 0d 42 6f 6f 6c | 65 61 6e 09 72 65 73 69 |ed).Bool|ean.resi|
|00003150| 7a 65 64 3b 0d 7b 0d 52 | 65 63 74 09 72 3b 0d 0d |zed;.{.R|ect.r;..|
|00003160| 09 53 79 6e 63 47 6c 6f | 62 61 6c 73 20 28 6e 69 |.SyncGlo|bals (ni|
|00003170| 6c 29 3b 09 09 09 09 09 | 2f 2a 20 73 79 6e 63 20 |l);.....|/* sync |
|00003180| 74 6f 20 63 75 72 72 65 | 6e 74 20 70 6f 72 74 20 |to curre|nt port |
|00003190| 2a 2f 0d 09 72 20 3d 20 | 64 69 73 70 57 69 6e 64 |*/..r = |dispWind|
|000031a0| 2d 3e 70 6f 72 74 52 65 | 63 74 3b 0d 09 45 72 61 |->portRe|ct;..Era|
|000031b0| 73 65 52 65 63 74 20 28 | 26 72 29 3b 0d 09 69 66 |seRect (|&r);..if|
|000031c0| 20 28 72 65 73 69 7a 65 | 64 29 0d 09 7b 0d 09 09 | (resize|d)..{...|
|000031d0| 48 69 64 65 43 6f 6e 74 | 72 6f 6c 20 28 64 69 73 |HideCont|rol (dis|
|000031e0| 70 53 63 72 6f 6c 6c 29 | 3b 0d 09 09 72 20 3d 20 |pScroll)|;...r = |
|000031f0| 28 2a 2a 64 69 73 70 53 | 63 72 6f 6c 6c 29 2e 63 |(**dispS|croll).c|
|00003200| 6f 6e 74 72 6c 52 65 63 | 74 3b 0d 09 09 56 61 6c |ontrlRec|t;...Val|
|00003210| 69 64 52 65 63 74 20 28 | 26 72 29 3b 0d 09 09 43 |idRect (|&r);...C|
|00003220| 61 6c 63 53 63 72 6f 6c | 6c 52 65 63 74 20 28 26 |alcScrol|lRect (&|
|00003230| 72 29 3b 0d 09 09 53 69 | 7a 65 43 6f 6e 74 72 6f |r);...Si|zeContro|
|00003240| 6c 20 28 64 69 73 70 53 | 63 72 6f 6c 6c 2c 20 31 |l (dispS|croll, 1|
|00003250| 36 2c 20 72 2e 62 6f 74 | 74 6f 6d 20 2d 20 72 2e |6, r.bot|tom - r.|
|00003260| 74 6f 70 29 3b 0d 09 09 | 4d 6f 76 65 43 6f 6e 74 |top);...|MoveCont|
|00003270| 72 6f 6c 20 28 64 69 73 | 70 53 63 72 6f 6c 6c 2c |rol (dis|pScroll,|
|00003280| 20 72 2e 6c 65 66 74 2c | 20 72 2e 74 6f 70 29 3b | r.left,| r.top);|
|00003290| 0d 09 09 4f 76 65 72 68 | 61 75 6c 44 69 73 70 6c |...Overh|aulDispl|
|000032a0| 61 79 20 28 29 3b 0d 09 | 09 53 68 6f 77 43 6f 6e |ay ();..|.ShowCon|
|000032b0| 74 72 6f 6c 20 28 64 69 | 73 70 53 63 72 6f 6c 6c |trol (di|spScroll|
|000032c0| 29 3b 0d 09 7d 0d 09 65 | 6c 73 65 0d 09 7b 0d 09 |);..}..e|lse..{..|
|000032d0| 09 72 20 3d 20 28 2a 2a | 64 69 73 70 54 45 29 2e |.r = (**|dispTE).|
|000032e0| 76 69 65 77 52 65 63 74 | 3b 0d 09 09 54 45 55 70 |viewRect|;...TEUp|
|000032f0| 64 61 74 65 20 28 26 72 | 2c 20 64 69 73 70 54 45 |date (&r|, dispTE|
|00003300| 29 3b 09 09 2f 2a 20 72 | 65 64 72 61 77 20 74 65 |);../* r|edraw te|
|00003310| 78 74 20 64 69 73 70 6c | 61 79 20 2a 2f 0d 09 7d |xt displ|ay */..}|
|00003320| 0d 0d 09 44 72 61 77 47 | 72 6f 77 42 6f 78 20 28 |...DrawG|rowBox (|
|00003330| 29 3b 0d 09 44 72 61 77 | 43 6f 6e 74 72 6f 6c 73 |);..Draw|Controls|
|00003340| 20 28 64 69 73 70 57 69 | 6e 64 29 3b 09 2f 2a 20 | (dispWi|nd);./* |
|00003350| 72 65 64 72 61 77 20 73 | 63 72 6f 6c 6c 20 62 61 |redraw s|croll ba|
|00003360| 72 20 2a 2f 0d 7d 0d 0d | 0d 2f 2a 0d 20 20 20 20 |r */.}..|./*. |
|00003370| 48 61 6e 64 6c 65 20 6d | 6f 75 73 65 20 63 6c 69 |Handle m|ouse cli|
|00003380| 63 6b 73 20 69 6e 20 77 | 69 6e 64 6f 77 0d 2a 2f |cks in w|indow.*/|
|00003390| 0d 0d 73 74 61 74 69 63 | 20 4d 6f 75 73 65 20 28 |..static| Mouse (|
|000033a0| 74 68 65 50 74 2c 20 74 | 2c 20 6d 6f 64 73 29 0d |thePt, t|, mods).|
|000033b0| 50 6f 69 6e 74 09 74 68 | 65 50 74 3b 0d 4c 6f 6e |Point.th|ePt;.Lon|
|000033c0| 67 69 6e 74 09 74 3b 0d | 49 6e 74 65 67 65 72 09 |gint.t;.|Integer.|
|000033d0| 6d 6f 64 73 3b 0d 7b 0d | 72 65 67 69 73 74 65 72 |mods;.{.|register|
|000033e0| 20 49 6e 74 65 67 65 72 | 09 74 68 65 50 61 72 74 | Integer|.thePart|
|000033f0| 3b 0d 72 65 67 69 73 74 | 65 72 20 49 6e 74 65 67 |;.regist|er Integ|
|00003400| 65 72 09 6f 6c 64 43 74 | 6c 56 61 6c 75 65 3b 0d |er.oldCt|lValue;.|
|00003410| 0d 09 53 79 6e 63 47 6c | 6f 62 61 6c 73 20 28 6e |..SyncGl|obals (n|
|00003420| 69 6c 29 3b 09 09 09 09 | 2f 2a 20 73 79 6e 63 20 |il);....|/* sync |
|00003430| 74 6f 20 63 75 72 72 65 | 6e 74 20 70 6f 72 74 20 |to curre|nt port |
|00003440| 2a 2f 0d 0d 09 69 66 20 | 28 28 74 68 65 50 61 72 |*/...if |((thePar|
|00003450| 74 20 3d 20 54 65 73 74 | 43 6f 6e 74 72 6f 6c 20 |t = Test|Control |
|00003460| 28 64 69 73 70 53 63 72 | 6f 6c 6c 2c 20 74 68 65 |(dispScr|oll, the|
|00003470| 50 74 29 29 20 3d 3d 20 | 69 6e 54 68 75 6d 62 29 |Pt)) == |inThumb)|
|00003480| 0d 09 7b 0d 09 09 6f 6c | 64 43 74 6c 56 61 6c 75 |..{...ol|dCtlValu|
|00003490| 65 20 3d 20 47 65 74 43 | 74 6c 56 61 6c 75 65 20 |e = GetC|tlValue |
|000034a0| 28 64 69 73 70 53 63 72 | 6f 6c 6c 29 3b 0d 09 09 |(dispScr|oll);...|
|000034b0| 69 66 20 28 54 72 61 63 | 6b 43 6f 6e 74 72 6f 6c |if (Trac|kControl|
|000034c0| 20 28 64 69 73 70 53 63 | 72 6f 6c 6c 2c 20 74 68 | (dispSc|roll, th|
|000034d0| 65 50 74 2c 20 6e 69 6c | 29 20 3d 3d 20 69 6e 54 |ePt, nil|) == inT|
|000034e0| 68 75 6d 62 29 0d 09 09 | 09 53 63 72 6f 6c 6c 54 |humb)...|.ScrollT|
|000034f0| 65 78 74 20 28 47 65 74 | 43 74 6c 56 61 6c 75 65 |ext (Get|CtlValue|
|00003500| 20 28 64 69 73 70 53 63 | 72 6f 6c 6c 29 20 2d 20 | (dispSc|roll) - |
|00003510| 6f 6c 64 43 74 6c 56 61 | 6c 75 65 29 3b 0d 09 7d |oldCtlVa|lue);..}|
|00003520| 0d 09 65 6c 73 65 20 69 | 66 20 28 74 68 65 50 61 |..else i|f (thePa|
|00003530| 72 74 20 21 3d 20 30 29 | 0d 09 7b 0d 09 09 53 65 |rt != 0)|..{...Se|
|00003540| 74 43 52 65 66 43 6f 6e | 20 28 64 69 73 70 53 63 |tCRefCon| (dispSc|
|00003550| 72 6f 6c 6c 2c 20 28 4c | 6f 6e 67 69 6e 74 29 20 |roll, (L|ongint) |
|00003560| 74 68 65 50 61 72 74 29 | 3b 0d 09 09 28 76 6f 69 |thePart)|;...(voi|
|00003570| 64 29 20 54 72 61 63 6b | 43 6f 6e 74 72 6f 6c 20 |d) Track|Control |
|00003580| 28 64 69 73 70 53 63 72 | 6f 6c 6c 2c 20 74 68 65 |(dispScr|oll, the|
|00003590| 50 74 2c 20 26 54 72 61 | 63 6b 53 63 72 6f 6c 6c |Pt, &Tra|ckScroll|
|000035a0| 29 3b 0d 09 7d 0d 7d 0d | 0d 0d 0d 2f 2a 0d 09 52 |);..}.}.|.../*..R|
|000035b0| 65 6d 6f 76 65 20 74 68 | 65 20 64 69 73 70 6c 61 |emove th|e displa|
|000035c0| 79 20 77 69 6e 64 6f 77 | 20 66 72 6f 6d 20 74 68 |y window| from th|
|000035d0| 65 20 6c 69 73 74 2c 20 | 61 6e 64 20 64 69 73 70 |e list, |and disp|
|000035e0| 6f 73 65 20 6f 66 20 69 | 74 2e 0d 09 53 69 6e 63 |ose of i|t...Sinc|
|000035f0| 65 20 74 68 65 20 63 6c | 6f 62 62 65 72 20 70 72 |e the cl|obber pr|
|00003600| 6f 63 65 64 75 72 65 20 | 69 73 20 6e 65 76 65 72 |ocedure |is never|
|00003610| 20 63 61 6c 6c 65 64 20 | 65 78 63 65 70 74 20 66 | called |except f|
|00003620| 6f 72 20 72 65 61 6c 20 | 64 69 73 70 6c 61 79 0d |or real |display.|
|00003630| 09 77 69 6e 64 6f 77 73 | 2c 20 61 6e 64 20 73 69 |.windows|, and si|
|00003640| 6e 63 65 20 74 68 65 20 | 6c 69 73 74 20 6d 75 73 |nce the |list mus|
|00003650| 74 20 74 68 65 72 65 66 | 6f 72 65 20 62 65 20 6e |t theref|ore be n|
|00003660| 6f 6e 2d 65 6d 70 74 79 | 2c 20 69 74 20 69 73 0d |on-empty|, it is.|
|00003670| 09 6e 6f 74 20 6e 65 63 | 65 73 73 61 72 79 20 74 |.not nec|essary t|
|00003680| 6f 20 63 68 65 63 6b 20 | 74 68 65 20 6c 65 67 61 |o check |the lega|
|00003690| 6c 69 74 79 20 6f 66 20 | 74 68 65 20 77 69 6e 64 |lity of |the wind|
|000036a0| 6f 77 20 6f 72 20 74 68 | 61 74 20 74 68 65 0d 09 |ow or th|at the..|
|000036b0| 77 69 6e 64 6f 77 27 73 | 20 69 6e 20 74 68 65 20 |window's| in the |
|000036c0| 6c 69 73 74 2e 0d 0d 09 | 4d 75 73 74 20 64 6f 20 |list....|Must do |
|000036d0| 53 65 74 44 57 69 6e 64 | 6f 77 20 28 6e 69 6c 29 |SetDWind|ow (nil)|
|000036e0| 20 74 6f 20 74 75 72 6e | 20 6f 75 74 70 75 74 20 | to turn| output |
|000036f0| 6f 66 66 2c 20 69 66 20 | 74 68 65 20 77 69 6e 64 |off, if |the wind|
|00003700| 6f 77 20 62 65 69 6e 67 | 0d 09 63 6c 6f 62 62 65 |ow being|..clobbe|
|00003710| 72 65 64 20 69 73 20 74 | 68 65 20 63 75 72 72 65 |red is t|he curre|
|00003720| 6e 74 20 6f 75 74 70 75 | 74 20 77 69 6e 64 6f 77 |nt outpu|t window|
|00003730| 2e 0d 2a 2f 0d 0d 73 74 | 61 74 69 63 20 43 6c 6f |..*/..st|atic Clo|
|00003740| 62 62 65 72 20 28 29 0d | 7b 0d 23 20 69 66 6e 64 |bber ().|{.# ifnd|
|00003750| 65 66 09 73 69 6e 67 6c | 65 44 69 73 70 6c 61 79 |ef.singl|eDisplay|
|00003760| 0d 72 65 67 69 73 74 65 | 72 20 44 49 48 61 6e 64 |.registe|r DIHand|
|00003770| 6c 65 09 68 2c 20 68 32 | 3b 0d 23 20 65 6e 64 69 |le.h, h2|;.# endi|
|00003780| 66 0d 0d 09 53 79 6e 63 | 47 6c 6f 62 61 6c 73 20 |f...Sync|Globals |
|00003790| 28 6e 69 6c 29 3b 09 09 | 09 09 09 2f 2a 20 73 79 |(nil);..|.../* sy|
|000037a0| 6e 63 20 74 6f 20 63 75 | 72 72 65 6e 74 20 70 6f |nc to cu|rrent po|
|000037b0| 72 74 20 2a 2f 0d 0d 09 | 69 66 20 28 64 69 73 70 |rt */...|if (disp|
|000037c0| 57 69 6e 64 20 3d 3d 20 | 63 75 72 44 69 73 70 57 |Wind == |curDispW|
|000037d0| 69 6e 64 29 0d 09 09 53 | 65 74 44 57 69 6e 64 6f |ind)...S|etDWindo|
|000037e0| 77 20 28 6e 69 6c 29 3b | 0d 0d 23 20 69 66 6e 64 |w (nil);|..# ifnd|
|000037f0| 65 66 09 73 69 6e 67 6c | 65 44 69 73 70 6c 61 79 |ef.singl|eDisplay|
|00003800| 0d 0d 09 69 66 20 28 28 | 2a 2a 64 77 4c 69 73 74 |...if ((|**dwList|
|00003810| 29 2e 64 57 69 6e 64 20 | 3d 3d 20 64 69 73 70 57 |).dWind |== dispW|
|00003820| 69 6e 64 29 09 2f 2a 20 | 69 73 20 69 74 20 74 68 |ind)./* |is it th|
|00003830| 65 20 66 69 72 73 74 20 | 77 69 6e 64 6f 77 20 69 |e first |window i|
|00003840| 6e 20 6c 69 73 74 3f 20 | 2a 2f 0d 09 7b 0d 09 09 |n list? |*/..{...|
|00003850| 68 32 20 3d 20 64 77 4c | 69 73 74 3b 0d 09 09 64 |h2 = dwL|ist;...d|
|00003860| 77 4c 69 73 74 20 3d 20 | 28 2a 2a 64 77 4c 69 73 |wList = |(**dwLis|
|00003870| 74 29 2e 64 4e 65 78 74 | 3b 0d 09 7d 0d 09 65 6c |t).dNext|;..}..el|
|00003880| 73 65 0d 09 7b 0d 09 09 | 66 6f 72 20 28 68 20 3d |se..{...|for (h =|
|00003890| 20 64 77 4c 69 73 74 3b | 20 68 20 21 3d 20 6e 69 | dwList;| h != ni|
|000038a0| 6c 3b 20 68 20 3d 20 68 | 32 29 0d 09 09 7b 0d 09 |l; h = h|2)...{..|
|000038b0| 09 09 68 32 20 3d 20 28 | 2a 2a 68 29 2e 64 4e 65 |..h2 = (|**h).dNe|
|000038c0| 78 74 3b 0d 09 09 09 69 | 66 20 28 28 2a 2a 68 32 |xt;....i|f ((**h2|
|000038d0| 29 2e 64 57 69 6e 64 20 | 3d 3d 20 64 69 73 70 57 |).dWind |== dispW|
|000038e0| 69 6e 64 29 09 2f 2a 20 | 66 6f 75 6e 64 20 69 74 |ind)./* |found it|
|000038f0| 20 2a 2f 0d 09 09 09 7b | 0d 09 09 09 09 28 2a 2a | */....{|.....(**|
|00003900| 68 29 2e 64 4e 65 78 74 | 20 3d 20 28 2a 2a 68 32 |h).dNext| = (**h2|
|00003910| 29 2e 64 4e 65 78 74 3b | 0d 09 09 09 09 62 72 65 |).dNext;|.....bre|
|00003920| 61 6b 3b 0d 09 09 09 7d | 0d 09 09 7d 0d 09 7d 0d |ak;....}|...}..}.|
|00003930| 09 44 69 73 70 6f 73 48 | 61 6e 64 6c 65 20 28 68 |.DisposH|andle (h|
|00003940| 32 29 3b 09 09 2f 2a 20 | 67 65 74 20 72 69 64 20 |2);../* |get rid |
|00003950| 6f 66 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 73 |of infor|mation s|
|00003960| 74 72 75 63 74 75 72 65 | 20 2a 2f 0d 0d 23 20 65 |tructure| */..# e|
|00003970| 6e 64 69 66 0d 0d 09 54 | 45 44 69 73 70 6f 73 65 |ndif...T|EDispose|
|00003980| 20 28 64 69 73 70 54 45 | 29 3b 09 09 09 2f 2a 20 | (dispTE|);.../* |
|00003990| 74 6f 73 73 20 74 65 78 | 74 20 72 65 63 6f 72 64 |toss tex|t record|
|000039a0| 20 2a 2f 0d 09 44 69 73 | 70 6f 73 65 57 69 6e 64 | */..Dis|poseWind|
|000039b0| 6f 77 20 28 64 69 73 70 | 57 69 6e 64 29 3b 09 2f |ow (disp|Wind);./|
|000039c0| 2a 20 74 6f 73 73 20 77 | 69 6e 64 6f 77 20 61 6e |* toss w|indow an|
|000039d0| 64 20 73 63 72 6f 6c 6c | 20 62 61 72 20 2a 2f 0d |d scroll| bar */.|
|000039e0| 09 64 69 73 70 57 69 6e | 64 20 3d 20 6e 69 6c 3b |.dispWin|d = nil;|
|000039f0| 0d 7d 0d 0d 0d 2f 2a 20 | 2d 2d 2d 2d 2d 2d 2d 2d |.}.../* |--------|
|00003a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a30| 2d 2d 2d 2d 2d 2d 2d 2d | 20 2a 2f 0d 2f 2a 09 09 |--------| */./*..|
|00003a40| 09 09 09 09 09 43 6f 6e | 74 72 6f 6c 20 52 6f 75 |.....Con|trol Rou|
|00003a50| 74 69 6e 65 73 09 09 09 | 09 09 09 2a 2f 0d 2f 2a |tines...|...*/./*|
|00003a60| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00003a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003aa0| 2d 20 2a 2f 0d 0d 0d 2f | 2a 0d 09 54 65 73 74 20 |- */.../|*..Test |
|00003ab0| 77 68 65 74 68 65 72 20 | 61 20 77 69 6e 64 6f 77 |whether |a window|
|00003ac0| 20 69 73 20 61 20 6c 65 | 67 61 6c 20 64 69 73 70 | is a le|gal disp|
|00003ad0| 6c 61 79 20 77 69 6e 64 | 6f 77 20 6f 72 20 6e 6f |lay wind|ow or no|
|00003ae0| 74 0d 2a 2f 0d 0d 42 6f | 6f 6c 65 61 6e 20 49 73 |t.*/..Bo|olean Is|
|00003af0| 44 57 69 6e 64 6f 77 20 | 28 74 68 65 57 69 6e 64 |DWindow |(theWind|
|00003b00| 29 0d 57 69 6e 64 6f 77 | 50 74 72 09 74 68 65 57 |).Window|Ptr.theW|
|00003b10| 69 6e 64 3b 0d 7b 0d 0d | 23 20 69 66 64 65 66 09 |ind;.{..|# ifdef.|
|00003b20| 73 69 6e 67 6c 65 44 69 | 73 70 6c 61 79 0d 09 72 |singleDi|splay..r|
|00003b30| 65 74 75 72 6e 20 28 74 | 68 65 57 69 6e 64 20 3d |eturn (t|heWind =|
|00003b40| 3d 20 64 69 73 70 57 69 | 6e 64 20 26 26 20 64 69 |= dispWi|nd && di|
|00003b50| 73 70 57 69 6e 64 20 21 | 3d 20 6e 69 6c 29 3b 0d |spWind !|= nil);.|
|00003b60| 23 20 65 6c 73 65 0d 09 | 72 65 74 75 72 6e 20 28 |# else..|return (|
|00003b70| 47 65 74 44 49 6e 66 6f | 20 28 74 68 65 57 69 6e |GetDInfo| (theWin|
|00003b80| 64 29 20 21 3d 20 6e 69 | 6c 29 3b 0d 23 20 65 6e |d) != ni|l);.# en|
|00003b90| 64 69 66 0d 7d 0d 0d 0d | 2f 2a 0d 09 52 65 74 75 |dif.}...|/*..Retu|
|00003ba0| 72 6e 20 68 61 6e 64 6c | 65 20 74 6f 20 64 69 73 |rn handl|e to dis|
|00003bb0| 70 6c 61 79 20 77 69 6e | 64 6f 77 27 73 20 74 65 |play win|dow's te|
|00003bc0| 78 74 20 72 65 63 6f 72 | 64 0d 2a 2f 0d 0d 54 45 |xt recor|d.*/..TE|
|00003bd0| 48 61 6e 64 6c 65 20 47 | 65 74 44 57 69 6e 64 6f |Handle G|etDWindo|
|00003be0| 77 54 45 20 28 74 68 65 | 57 69 6e 64 29 0d 57 69 |wTE (the|Wind).Wi|
|00003bf0| 6e 64 6f 77 50 74 72 09 | 74 68 65 57 69 6e 64 3b |ndowPtr.|theWind;|
|00003c00| 0d 7b 0d 0d 23 20 69 66 | 6e 64 65 66 09 73 69 6e |.{..# if|ndef.sin|
|00003c10| 67 6c 65 44 69 73 70 6c | 61 79 0d 72 65 67 69 73 |gleDispl|ay.regis|
|00003c20| 74 65 72 20 44 49 48 61 | 6e 64 6c 65 09 64 49 6e |ter DIHa|ndle.dIn|
|00003c30| 66 6f 3b 0d 09 72 65 74 | 75 72 6e 20 28 47 65 74 |fo;..ret|urn (Get|
|00003c40| 44 49 6e 66 6f 20 28 74 | 68 65 57 69 6e 64 29 20 |DInfo (t|heWind) |
|00003c50| 3d 3d 20 6e 69 6c 20 3f | 20 6e 69 6c 20 3a 20 28 |== nil ?| nil : (|
|00003c60| 2a 2a 64 49 6e 66 6f 29 | 2e 64 54 45 29 3b 0d 23 |**dInfo)|.dTE);.#|
|00003c70| 20 65 6c 73 65 0d 09 72 | 65 74 75 72 6e 20 28 49 | else..r|eturn (I|
|00003c80| 73 44 57 69 6e 64 6f 77 | 20 28 74 68 65 57 69 6e |sDWindow| (theWin|
|00003c90| 64 29 20 3f 20 64 69 73 | 70 54 45 20 3a 20 6e 69 |d) ? dis|pTE : ni|
|00003ca0| 6c 29 3b 0d 23 20 65 6e | 64 69 66 0d 7d 0d 0d 0d |l);.# en|dif.}...|
|00003cb0| 2f 2a 0d 09 43 68 61 6e | 67 65 20 74 68 65 20 74 |/*..Chan|ge the t|
|00003cc0| 65 78 74 20 64 69 73 70 | 6c 61 79 20 63 68 61 72 |ext disp|lay char|
|00003cd0| 61 63 74 65 72 69 73 74 | 69 63 73 20 6f 66 20 61 |acterist|ics of a|
|00003ce0| 20 64 69 73 70 6c 61 79 | 20 77 69 6e 64 6f 77 0d | display| window.|
|00003cf0| 09 61 6e 64 20 72 65 64 | 69 73 70 6c 61 79 20 69 |.and red|isplay i|
|00003d00| 74 2e 20 20 41 73 20 61 | 20 73 69 64 65 20 65 66 |t. As a| side ef|
|00003d10| 66 65 63 74 2c 20 74 68 | 69 73 20 61 6c 77 61 79 |fect, th|is alway|
|00003d20| 73 20 73 63 72 6f 6c 6c | 73 20 74 6f 20 74 68 65 |s scroll|s to the|
|00003d30| 0d 09 68 6f 6d 65 20 70 | 6f 73 69 74 69 6f 6e 2e |..home p|osition.|
|00003d40| 0d 2a 2f 0d 0d 53 65 74 | 44 57 69 6e 64 6f 77 53 |.*/..Set|DWindowS|
|00003d50| 74 79 6c 65 20 28 74 68 | 65 57 69 6e 64 2c 20 66 |tyle (th|eWind, f|
|00003d60| 6f 6e 74 2c 20 73 69 7a | 65 2c 20 77 72 61 70 2c |ont, siz|e, wrap,|
|00003d70| 20 6a 75 73 74 29 0d 57 | 69 6e 64 6f 77 50 74 72 | just).W|indowPtr|
|00003d80| 09 74 68 65 57 69 6e 64 | 3b 0d 49 6e 74 65 67 65 |.theWind|;.Intege|
|00003d90| 72 09 09 66 6f 6e 74 3b | 0d 49 6e 74 65 67 65 72 |r..font;|.Integer|
|00003da0| 09 09 73 69 7a 65 3b 0d | 49 6e 74 65 67 65 72 09 |..size;.|Integer.|
|00003db0| 09 77 72 61 70 3b 0d 49 | 6e 74 65 67 65 72 09 09 |.wrap;.I|nteger..|
|00003dc0| 6a 75 73 74 3b 0d 7b 0d | 47 72 61 66 50 74 72 09 |just;.{.|GrafPtr.|
|00003dd0| 09 09 09 73 61 76 65 50 | 6f 72 74 3b 0d 46 6f 6e |...saveP|ort;.Fon|
|00003de0| 74 49 6e 66 6f 09 09 09 | 66 3b 0d 72 65 67 69 73 |tInfo...|f;.regis|
|00003df0| 74 65 72 20 54 45 48 61 | 6e 64 6c 65 09 74 65 3b |ter TEHa|ndle.te;|
|00003e00| 0d 52 65 63 74 09 09 09 | 09 72 3b 0d 0d 09 69 66 |.Rect...|.r;...if|
|00003e10| 20 28 74 68 65 57 69 6e | 64 20 3d 3d 20 6e 69 6c | (theWin|d == nil|
|00003e20| 29 09 09 09 2f 2a 20 72 | 65 73 65 74 20 77 69 6e |).../* r|eset win|
|00003e30| 64 6f 77 20 63 72 65 61 | 74 69 6f 6e 20 64 65 66 |dow crea|tion def|
|00003e40| 61 75 6c 74 73 20 2a 2f | 0d 09 7b 0d 09 09 64 5f |aults */|..{...d_|
|00003e50| 66 6f 6e 74 20 3d 20 66 | 6f 6e 74 3b 0d 09 09 64 |font = f|ont;...d|
|00003e60| 5f 73 69 7a 65 20 3d 20 | 73 69 7a 65 3b 0d 09 09 |_size = |size;...|
|00003e70| 64 5f 77 72 61 70 20 3d | 20 77 72 61 70 3b 0d 09 |d_wrap =| wrap;..|
|00003e80| 09 64 5f 6a 75 73 74 20 | 3d 20 6a 75 73 74 3b 0d |.d_just |= just;.|
|00003e90| 09 09 72 65 74 75 72 6e | 3b 0d 09 7d 0d 0d 09 69 |..return|;..}...i|
|00003ea0| 66 20 28 49 73 44 57 69 | 6e 64 6f 77 20 28 74 68 |f (IsDWi|ndow (th|
|00003eb0| 65 57 69 6e 64 29 29 0d | 09 7b 0d 09 09 47 65 74 |eWind)).|.{...Get|
|00003ec0| 50 6f 72 74 20 28 26 73 | 61 76 65 50 6f 72 74 29 |Port (&s|avePort)|
|00003ed0| 3b 0d 09 09 53 79 6e 63 | 47 6c 6f 62 61 6c 73 20 |;...Sync|Globals |
|00003ee0| 28 74 68 65 57 69 6e 64 | 29 3b 0d 09 09 53 65 74 |(theWind|);...Set|
|00003ef0| 50 6f 72 74 20 28 64 69 | 73 70 57 69 6e 64 29 3b |Port (di|spWind);|
|00003f00| 0d 09 09 74 65 20 3d 20 | 64 69 73 70 54 45 3b 0d |...te = |dispTE;.|
|00003f10| 09 09 72 20 3d 20 28 2a | 2a 74 65 29 2e 76 69 65 |..r = (*|*te).vie|
|00003f20| 77 52 65 63 74 3b 0d 09 | 09 45 72 61 73 65 52 65 |wRect;..|.EraseRe|
|00003f30| 63 74 20 28 26 72 29 3b | 0d 09 09 72 20 3d 20 28 |ct (&r);|...r = (|
|00003f40| 2a 2a 74 65 29 2e 64 65 | 73 74 52 65 63 74 3b 09 |**te).de|stRect;.|
|00003f50| 2f 2a 20 73 63 72 6f 6c | 6c 20 68 6f 6d 65 20 77 |/* scrol|l home w|
|00003f60| 69 74 68 6f 75 74 20 72 | 65 64 72 61 77 69 6e 67 |ithout r|edrawing|
|00003f70| 20 2a 2f 0d 09 09 4f 66 | 66 73 65 74 52 65 63 74 | */...Of|fsetRect|
|00003f80| 20 28 26 72 2c 20 30 2c | 20 32 20 2d 20 72 2e 74 | (&r, 0,| 2 - r.t|
|00003f90| 6f 70 29 3b 0d 09 09 28 | 2a 2a 74 65 29 2e 64 65 |op);...(|**te).de|
|00003fa0| 73 74 52 65 63 74 20 3d | 20 72 3b 0d 0d 09 09 28 |stRect =| r;....(|
|00003fb0| 2a 2a 74 65 29 2e 63 72 | 4f 6e 6c 79 20 3d 20 77 |**te).cr|Only = w|
|00003fc0| 72 61 70 3b 09 2f 2a 20 | 73 65 74 20 77 6f 72 64 |rap;./* |set word|
|00003fd0| 20 77 72 61 70 20 2a 2f | 0d 09 09 54 45 53 65 74 | wrap */|...TESet|
|00003fe0| 4a 75 73 74 20 28 6a 75 | 73 74 2c 20 74 65 29 3b |Just (ju|st, te);|
|00003ff0| 09 2f 2a 20 73 65 74 20 | 6a 75 73 74 69 66 69 63 |./* set |justific|
|00004000| 61 74 69 6f 6e 20 2a 2f | 0d 0d 09 09 54 65 78 74 |ation */|....Text|
|00004010| 46 6f 6e 74 20 28 66 6f | 6e 74 29 3b 09 20 09 2f |Font (fo|nt);. ./|
|00004020| 2a 20 73 65 74 20 74 68 | 65 20 66 6f 6e 74 20 61 |* set th|e font a|
|00004030| 6e 64 20 70 6f 69 6e 74 | 20 73 69 7a 65 20 2a 2f |nd point| size */|
|00004040| 0d 09 09 54 65 78 74 53 | 69 7a 65 20 28 73 69 7a |...TextS|ize (siz|
|00004050| 65 29 3b 09 09 2f 2a 20 | 6f 66 20 74 65 78 74 20 |e);../* |of text |
|00004060| 72 65 63 6f 72 64 20 28 | 74 68 69 73 20 69 73 20 |record (|this is |
|00004070| 74 68 65 20 2a 2f 0d 09 | 09 47 65 74 46 6f 6e 74 |the */..|.GetFont|
|00004080| 49 6e 66 6f 20 28 26 66 | 29 3b 09 09 2f 2a 20 68 |Info (&f|);../* h|
|00004090| 61 72 64 20 70 61 72 74 | 29 20 2a 2f 0d 09 09 28 |ard part|) */...(|
|000040a0| 2a 2a 74 65 29 2e 6c 69 | 6e 65 48 65 69 67 68 74 |**te).li|neHeight|
|000040b0| 20 3d 20 66 2e 61 73 63 | 65 6e 74 20 2b 20 66 2e | = f.asc|ent + f.|
|000040c0| 64 65 73 63 65 6e 74 20 | 2b 20 66 2e 6c 65 61 64 |descent |+ f.lead|
|000040d0| 69 6e 67 3b 0d 09 09 28 | 2a 2a 74 65 29 2e 66 6f |ing;...(|**te).fo|
|000040e0| 6e 74 41 73 63 65 6e 74 | 20 3d 20 66 2e 61 73 63 |ntAscent| = f.asc|
|000040f0| 65 6e 74 3b 0d 09 09 28 | 2a 2a 74 65 29 2e 74 78 |ent;...(|**te).tx|
|00004100| 46 6f 6e 74 20 3d 20 66 | 6f 6e 74 3b 0d 09 09 28 |Font = f|ont;...(|
|00004110| 2a 2a 74 65 29 2e 74 78 | 53 69 7a 65 20 3d 20 73 |**te).tx|Size = s|
|00004120| 69 7a 65 3b 0d 0d 09 09 | 4f 76 65 72 68 61 75 6c |ize;....|Overhaul|
|00004130| 44 69 73 70 6c 61 79 20 | 28 29 3b 0d 09 09 53 65 |Display |();...Se|
|00004140| 74 50 6f 72 74 20 28 73 | 61 76 65 50 6f 72 74 29 |tPort (s|avePort)|
|00004150| 3b 0d 09 7d 0d 7d 0d 0d | 0d 2f 2a 0d 09 53 63 72 |;..}.}..|./*..Scr|
|00004160| 6f 6c 6c 20 74 68 65 20 | 74 65 78 74 20 69 6e 20 |oll the |text in |
|00004170| 74 68 65 20 77 69 6e 64 | 6f 77 20 73 6f 20 74 68 |the wind|ow so th|
|00004180| 61 74 20 6c 69 6e 65 20 | 6c 69 6e 65 4e 75 6d 20 |at line |lineNum |
|00004190| 69 73 20 61 74 20 74 68 | 65 20 74 6f 70 2e 0d 09 |is at th|e top...|
|000041a0| 46 69 72 73 74 20 6c 69 | 6e 65 20 69 73 20 6c 69 |First li|ne is li|
|000041b0| 6e 65 20 7a 65 72 6f 2e | 0d 2a 2f 0d 0d 53 65 74 |ne zero.|.*/..Set|
|000041c0| 44 57 69 6e 64 6f 77 50 | 6f 73 20 28 74 68 65 57 |DWindowP|os (theW|
|000041d0| 69 6e 64 2c 20 6c 69 6e | 65 4e 75 6d 29 0d 57 69 |ind, lin|eNum).Wi|
|000041e0| 6e 64 6f 77 50 74 72 09 | 74 68 65 57 69 6e 64 3b |ndowPtr.|theWind;|
|000041f0| 0d 49 6e 74 65 67 65 72 | 09 09 6c 69 6e 65 4e 75 |.Integer|..lineNu|
|00004200| 6d 3b 0d 7b 0d 47 72 61 | 66 50 74 72 09 09 73 61 |m;.{.Gra|fPtr..sa|
|00004210| 76 65 50 6f 72 74 3b 0d | 0d 09 69 66 20 28 49 73 |vePort;.|..if (Is|
|00004220| 44 57 69 6e 64 6f 77 20 | 28 74 68 65 57 69 6e 64 |DWindow |(theWind|
|00004230| 29 29 0d 09 7b 0d 09 09 | 47 65 74 50 6f 72 74 20 |))..{...|GetPort |
|00004240| 28 26 73 61 76 65 50 6f | 72 74 29 3b 0d 09 09 53 |(&savePo|rt);...S|
|00004250| 79 6e 63 47 6c 6f 62 61 | 6c 73 20 28 74 68 65 57 |yncGloba|ls (theW|
|00004260| 69 6e 64 29 3b 0d 09 09 | 53 65 74 50 6f 72 74 20 |ind);...|SetPort |
|00004270| 28 64 69 73 70 57 69 6e | 64 29 3b 0d 09 09 53 63 |(dispWin|d);...Sc|
|00004280| 72 6f 6c 6c 54 65 78 74 | 20 28 6c 69 6e 65 4e 75 |rollText| (lineNu|
|00004290| 6d 20 2d 20 47 65 74 43 | 74 6c 56 61 6c 75 65 20 |m - GetC|tlValue |
|000042a0| 28 64 69 73 70 53 63 72 | 6f 6c 6c 29 29 3b 0d 09 |(dispScr|oll));..|
|000042b0| 09 53 65 74 50 6f 72 74 | 20 28 73 61 76 65 50 6f |.SetPort| (savePo|
|000042c0| 72 74 29 3b 0d 09 7d 0d | 7d 0d 0d 0d 2f 2a 0d 09 |rt);..}.|}.../*..|
|000042d0| 53 65 74 20 64 69 73 70 | 6c 61 79 20 77 69 6e 64 |Set disp|lay wind|
|000042e0| 6f 77 20 61 63 74 69 76 | 61 74 65 20 6e 6f 74 69 |ow activ|ate noti|
|000042f0| 66 69 63 61 74 69 6f 6e | 20 70 72 6f 63 65 64 75 |fication| procedu|
|00004300| 72 65 2e 0d 09 50 61 73 | 73 20 6e 69 6c 20 74 6f |re...Pas|s nil to|
|00004310| 20 64 69 73 61 62 6c 65 | 20 69 74 2e 0d 2a 2f 0d | disable| it..*/.|
|00004320| 0d 53 65 74 44 57 69 6e | 64 6f 77 4e 6f 74 69 66 |.SetDWin|dowNotif|
|00004330| 79 20 28 74 68 65 57 69 | 6e 64 2c 20 70 29 0d 57 |y (theWi|nd, p).W|
|00004340| 69 6e 64 6f 77 50 74 72 | 09 74 68 65 57 69 6e 64 |indowPtr|.theWind|
|00004350| 3b 0d 50 72 6f 63 50 74 | 72 09 09 70 3b 0d 7b 0d |;.ProcPt|r..p;.{.|
|00004360| 23 20 69 66 6e 64 65 66 | 09 73 69 6e 67 6c 65 44 |# ifndef|.singleD|
|00004370| 69 73 70 6c 61 79 0d 72 | 65 67 69 73 74 65 72 20 |isplay.r|egister |
|00004380| 44 49 48 61 6e 64 6c 65 | 09 64 49 6e 66 6f 3b 0d |DIHandle|.dInfo;.|
|00004390| 23 20 65 6e 64 69 66 0d | 0d 09 69 66 20 28 74 68 |# endif.|..if (th|
|000043a0| 65 57 69 6e 64 20 3d 3d | 20 6e 69 6c 29 09 09 09 |eWind ==| nil)...|
|000043b0| 2f 2a 20 72 65 73 65 74 | 20 77 69 6e 64 6f 77 20 |/* reset| window |
|000043c0| 63 72 65 61 74 69 6f 6e | 20 64 65 66 61 75 6c 74 |creation| default|
|000043d0| 20 2a 2f 0d 09 7b 0d 09 | 09 64 5f 61 63 74 69 76 | */..{..|.d_activ|
|000043e0| 61 74 65 20 3d 20 70 3b | 0d 09 09 72 65 74 75 72 |ate = p;|...retur|
|000043f0| 6e 3b 0d 09 7d 0d 0d 23 | 20 69 66 64 65 66 09 73 |n;..}..#| ifdef.s|
|00004400| 69 6e 67 6c 65 44 69 73 | 70 6c 61 79 0d 0d 09 69 |ingleDis|play...i|
|00004410| 66 20 28 49 73 44 57 69 | 6e 64 6f 77 20 28 74 68 |f (IsDWi|ndow (th|
|00004420| 65 57 69 6e 64 29 29 0d | 09 09 64 41 63 74 69 76 |eWind)).|..dActiv|
|00004430| 61 74 65 20 3d 20 70 3b | 0d 0d 23 20 65 6c 73 65 |ate = p;|..# else|
|00004440| 0d 0d 09 69 66 20 28 28 | 64 49 6e 66 6f 20 3d 20 |...if ((|dInfo = |
|00004450| 47 65 74 44 49 6e 66 6f | 20 28 74 68 65 57 69 6e |GetDInfo| (theWin|
|00004460| 64 29 29 20 21 3d 20 6e | 69 6c 29 0d 09 7b 0d 09 |d)) != n|il)..{..|
|00004470| 09 28 2a 2a 64 49 6e 66 | 6f 29 2e 64 41 63 74 69 |.(**dInf|o).dActi|
|00004480| 76 61 74 65 20 3d 20 70 | 3b 0d 09 7d 0d 0d 23 20 |vate = p|;..}..# |
|00004490| 65 6e 64 69 66 0d 7d 0d | 0d 0d 2f 2a 0d 09 53 65 |endif.}.|../*..Se|
|000044a0| 74 20 64 69 73 70 6c 61 | 79 20 77 69 6e 64 6f 77 |t displa|y window|
|000044b0| 20 61 75 74 6f 66 6c 75 | 73 68 20 63 68 61 72 61 | autoflu|sh chara|
|000044c0| 63 74 65 72 69 73 74 69 | 63 73 0d 2a 2f 0d 0d 53 |cteristi|cs.*/..S|
|000044d0| 65 74 44 57 69 6e 64 6f | 77 46 6c 75 73 68 20 28 |etDWindo|wFlush (|
|000044e0| 74 68 65 57 69 6e 64 2c | 20 6d 61 78 54 65 78 74 |theWind,| maxText|
|000044f0| 2c 20 66 6c 75 73 68 41 | 6d 74 29 0d 57 69 6e 64 |, flushA|mt).Wind|
|00004500| 6f 77 50 74 72 09 74 68 | 65 57 69 6e 64 3b 0d 4c |owPtr.th|eWind;.L|
|00004510| 6f 6e 67 69 6e 74 09 09 | 6d 61 78 54 65 78 74 3b |ongint..|maxText;|
|00004520| 0d 4c 6f 6e 67 69 6e 74 | 09 09 66 6c 75 73 68 41 |.Longint|..flushA|
|00004530| 6d 74 3b 0d 7b 0d 23 20 | 69 66 6e 64 65 66 09 73 |mt;.{.# |ifndef.s|
|00004540| 69 6e 67 6c 65 44 69 73 | 70 6c 61 79 0d 72 65 67 |ingleDis|play.reg|
|00004550| 69 73 74 65 72 20 44 49 | 48 61 6e 64 6c 65 09 64 |ister DI|Handle.d|
|00004560| 49 6e 66 6f 3b 0d 23 20 | 65 6e 64 69 66 0d 0d 09 |Info;.# |endif...|
|00004570| 69 66 20 28 6d 61 78 54 | 65 78 74 20 3e 20 33 32 |if (maxT|ext > 32|
|00004580| 37 36 37 4c 29 0d 09 09 | 6d 61 78 54 65 78 74 20 |767L)...|maxText |
|00004590| 3d 20 33 32 37 36 37 4c | 3b 0d 09 69 66 20 28 6d |= 32767L|;..if (m|
|000045a0| 61 78 54 65 78 74 20 3c | 20 64 5f 6c 6f 4d 61 78 |axText <| d_loMax|
|000045b0| 54 65 78 74 29 0d 09 09 | 6d 61 78 54 65 78 74 20 |Text)...|maxText |
|000045c0| 3d 20 64 5f 6c 6f 4d 61 | 78 54 65 78 74 3b 0d 09 |= d_loMa|xText;..|
|000045d0| 69 66 20 28 66 6c 75 73 | 68 41 6d 74 20 3c 20 64 |if (flus|hAmt < d|
|000045e0| 5f 6c 6f 46 6c 75 73 68 | 41 6d 74 29 0d 09 09 66 |_loFlush|Amt)...f|
|000045f0| 6c 75 73 68 41 6d 74 20 | 3d 20 64 5f 6c 6f 46 6c |lushAmt |= d_loFl|
|00004600| 75 73 68 41 6d 74 3b 0d | 0d 09 69 66 20 28 74 68 |ushAmt;.|..if (th|
|00004610| 65 57 69 6e 64 20 3d 3d | 20 6e 69 6c 29 09 09 09 |eWind ==| nil)...|
|00004620| 2f 2a 20 72 65 73 65 74 | 20 77 69 6e 64 6f 77 20 |/* reset| window |
|00004630| 63 72 65 61 74 69 6f 6e | 20 64 65 66 61 75 6c 74 |creation| default|
|00004640| 73 20 2a 2f 0d 09 7b 0d | 09 09 64 5f 6d 61 78 54 |s */..{.|..d_maxT|
|00004650| 65 78 74 20 3d 20 6d 61 | 78 54 65 78 74 3b 0d 09 |ext = ma|xText;..|
|00004660| 09 64 5f 66 6c 75 73 68 | 41 6d 74 20 3d 20 66 6c |.d_flush|Amt = fl|
|00004670| 75 73 68 41 6d 74 3b 0d | 09 09 72 65 74 75 72 6e |ushAmt;.|..return|
|00004680| 3b 0d 09 7d 0d 0d 23 20 | 69 66 64 65 66 09 73 69 |;..}..# |ifdef.si|
|00004690| 6e 67 6c 65 44 69 73 70 | 6c 61 79 0d 0d 09 69 66 |ngleDisp|lay...if|
|000046a0| 20 28 49 73 44 57 69 6e | 64 6f 77 20 28 74 68 65 | (IsDWin|dow (the|
|000046b0| 57 69 6e 64 29 29 0d 09 | 7b 0d 0d 09 09 64 4d 61 |Wind))..|{....dMa|
|000046c0| 78 54 65 78 74 20 3d 20 | 6d 61 78 54 65 78 74 3b |xText = |maxText;|
|000046d0| 0d 09 09 64 46 6c 75 73 | 68 41 6d 74 20 3d 20 66 |...dFlus|hAmt = f|
|000046e0| 6c 75 73 68 41 6d 74 3b | 0d 09 7d 0d 0d 23 20 65 |lushAmt;|..}..# e|
|000046f0| 6c 73 65 0d 0d 09 69 66 | 20 28 28 64 49 6e 66 6f |lse...if| ((dInfo|
|00004700| 20 3d 20 47 65 74 44 49 | 6e 66 6f 20 28 74 68 65 | = GetDI|nfo (the|
|00004710| 57 69 6e 64 29 29 20 21 | 3d 20 6e 69 6c 29 0d 09 |Wind)) !|= nil)..|
|00004720| 7b 0d 09 09 28 2a 2a 64 | 49 6e 66 6f 29 2e 64 4d |{...(**d|Info).dM|
|00004730| 61 78 54 65 78 74 20 3d | 20 6d 61 78 54 65 78 74 |axText =| maxText|
|00004740| 3b 0d 09 09 28 2a 2a 64 | 49 6e 66 6f 29 2e 64 46 |;...(**d|Info).dF|
|00004750| 6c 75 73 68 41 6d 74 20 | 3d 20 66 6c 75 73 68 41 |lushAmt |= flushA|
|00004760| 6d 74 3b 0d 09 7d 0d 0d | 23 20 65 6e 64 69 66 0d |mt;..}..|# endif.|
|00004770| 7d 0d 0d 0d 2f 2a 0d 09 | 53 65 74 20 77 68 69 63 |}.../*..|Set whic|
|00004780| 68 20 64 69 73 70 6c 61 | 79 20 77 69 6e 64 6f 77 |h displa|y window|
|00004790| 20 69 73 20 74 6f 20 62 | 65 20 75 73 65 64 20 66 | is to b|e used f|
|000047a0| 6f 72 20 6f 75 74 70 75 | 74 2e 20 20 49 66 20 74 |or outpu|t. If t|
|000047b0| 68 65 57 69 6e 64 0d 09 | 69 73 20 6e 69 6c 2c 20 |heWind..|is nil, |
|000047c0| 6f 75 74 70 75 74 20 69 | 73 20 74 75 72 6e 65 64 |output i|s turned|
|000047d0| 20 6f 66 66 2e 20 20 49 | 66 20 74 68 65 57 69 6e | off. I|f theWin|
|000047e0| 64 20 69 73 20 6e 6f 74 | 20 61 20 6c 65 67 61 6c |d is not| a legal|
|000047f0| 20 64 69 73 70 6c 61 79 | 0d 09 77 69 6e 64 6f 77 | display|..window|
|00004800| 2c 20 6e 6f 74 68 69 6e | 67 20 69 73 20 64 6f 6e |, nothin|g is don|
|00004810| 65 2e 0d 2a 2f 0d 0d 53 | 65 74 44 57 69 6e 64 6f |e..*/..S|etDWindo|
|00004820| 77 20 28 74 68 65 57 69 | 6e 64 29 0d 57 69 6e 64 |w (theWi|nd).Wind|
|00004830| 6f 77 50 74 72 09 74 68 | 65 57 69 6e 64 3b 0d 7b |owPtr.th|eWind;.{|
|00004840| 0d 09 69 66 20 28 74 68 | 65 57 69 6e 64 20 3d 3d |..if (th|eWind ==|
|00004850| 20 6e 69 6c 20 7c 7c 20 | 49 73 44 57 69 6e 64 6f | nil || |IsDWindo|
|00004860| 77 20 28 74 68 65 57 69 | 6e 64 29 29 0d 09 7b 0d |w (theWi|nd))..{.|
|00004870| 09 09 63 75 72 44 69 73 | 70 57 69 6e 64 20 3d 20 |..curDis|pWind = |
|00004880| 74 68 65 57 69 6e 64 3b | 0d 09 7d 0d 7d 0d 0d 0d |theWind;|..}.}...|
|00004890| 2f 2a 0d 09 47 65 74 20 | 74 68 65 20 57 69 6e 64 |/*..Get |the Wind|
|000048a0| 6f 77 50 74 72 20 6f 66 | 20 74 68 65 20 63 75 72 |owPtr of| the cur|
|000048b0| 72 65 6e 74 20 6f 75 74 | 70 75 74 20 64 69 73 70 |rent out|put disp|
|000048c0| 6c 61 79 20 77 69 6e 64 | 6f 77 2e 20 20 49 66 0d |lay wind|ow. If.|
|000048d0| 09 6f 75 74 70 75 74 20 | 69 73 20 74 75 72 6e 65 |.output |is turne|
|000048e0| 64 20 6f 66 66 2c 20 74 | 68 69 73 20 77 69 6c 6c |d off, t|his will|
|000048f0| 20 62 65 20 6e 69 6c 2e | 0d 2a 2f 0d 0d 47 65 74 | be nil.|.*/..Get|
|00004900| 44 57 69 6e 64 6f 77 20 | 28 74 68 65 57 69 6e 64 |DWindow |(theWind|
|00004910| 29 0d 57 69 6e 64 6f 77 | 50 74 72 09 2a 74 68 65 |).Window|Ptr.*the|
|00004920| 57 69 6e 64 3b 0d 7b 0d | 09 2a 74 68 65 57 69 6e |Wind;.{.|.*theWin|
|00004930| 64 20 3d 20 63 75 72 44 | 69 73 70 57 69 6e 64 3b |d = curD|ispWind;|
|00004940| 0d 7d 0d 0d 0d 2f 2a 0d | 09 46 6c 75 73 68 20 74 |.}.../*.|.Flush t|
|00004950| 65 78 74 20 66 72 6f 6d | 20 74 68 65 20 77 69 6e |ext from| the win|
|00004960| 64 6f 77 20 61 6e 64 20 | 72 65 61 64 6a 75 73 74 |dow and |readjust|
|00004970| 20 74 68 65 20 64 69 73 | 70 6c 61 79 2e 0d 2a 2f | the dis|play..*/|
|00004980| 0d 0d 46 6c 75 73 68 44 | 57 69 6e 64 6f 77 20 28 |..FlushD|Window (|
|00004990| 74 68 65 57 69 6e 64 2c | 20 62 79 74 65 43 6f 75 |theWind,| byteCou|
|000049a0| 6e 74 29 0d 57 69 6e 64 | 6f 77 50 74 72 09 74 68 |nt).Wind|owPtr.th|
|000049b0| 65 57 69 6e 64 3b 0d 4c | 6f 6e 67 69 6e 74 09 09 |eWind;.L|ongint..|
|000049c0| 62 79 74 65 43 6f 75 6e | 74 3b 0d 7b 0d 09 69 66 |byteCoun|t;.{..if|
|000049d0| 20 28 49 73 44 57 69 6e | 64 6f 77 20 28 74 68 65 | (IsDWin|dow (the|
|000049e0| 57 69 6e 64 29 29 0d 09 | 7b 0d 09 09 53 79 6e 63 |Wind))..|{...Sync|
|000049f0| 47 6c 6f 62 61 6c 73 20 | 28 74 68 65 57 69 6e 64 |Globals |(theWind|
|00004a00| 29 3b 0d 09 09 54 45 53 | 65 74 53 65 6c 65 63 74 |);...TES|etSelect|
|00004a10| 20 28 30 4c 2c 20 62 79 | 74 65 43 6f 75 6e 74 2c | (0L, by|teCount,|
|00004a20| 20 64 69 73 70 54 45 29 | 3b 09 2f 2a 20 73 65 6c | dispTE)|;./* sel|
|00004a30| 65 63 74 20 74 65 78 74 | 20 2a 2f 0d 09 09 54 45 |ect text| */...TE|
|00004a40| 44 65 6c 65 74 65 20 28 | 64 69 73 70 54 45 29 3b |Delete (|dispTE);|
|00004a50| 09 09 09 09 09 09 2f 2a | 20 63 6c 6f 62 62 65 72 |....../*| clobber|
|00004a60| 20 69 74 20 2a 2f 0d 09 | 09 4f 76 65 72 68 61 75 | it */..|.Overhau|
|00004a70| 6c 44 69 73 70 6c 61 79 | 20 28 29 3b 0d 09 7d 0d |lDisplay| ();..}.|
|00004a80| 7d 0d 0d 0d 2f 2a 0d 09 | 43 72 65 61 74 65 20 61 |}.../*..|Create a|
|00004a90| 6e 64 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 61 20 |nd initi|alize a |
|00004aa0| 64 69 73 70 6c 61 79 20 | 77 69 6e 64 6f 77 20 61 |display |window a|
|00004ab0| 6e 64 20 74 68 65 20 61 | 73 73 6f 63 69 61 74 65 |nd the a|ssociate|
|00004ac0| 64 20 64 61 74 61 0d 09 | 73 74 72 75 63 74 75 72 |d data..|structur|
|00004ad0| 65 73 2c 20 61 6e 64 20 | 72 65 74 75 72 6e 20 74 |es, and |return t|
|00004ae0| 68 65 20 77 69 6e 64 6f | 77 20 70 6f 69 6e 74 65 |he windo|w pointe|
|00004af0| 72 2e 20 20 49 6e 73 74 | 61 6c 6c 20 77 69 6e 64 |r. Inst|all wind|
|00004b00| 6f 77 20 69 6e 0d 09 6c | 69 73 74 20 6f 66 20 64 |ow in..l|ist of d|
|00004b10| 69 73 70 6c 61 79 20 77 | 69 6e 64 6f 77 73 2e 0d |isplay w|indows..|
|00004b20| 2a 2f 0d 20 0d 73 74 61 | 74 69 63 20 53 65 74 75 |*/. .sta|tic Setu|
|00004b30| 70 44 57 69 6e 64 6f 77 | 20 28 29 0d 7b 0d 52 65 |pDWindow| ().{.Re|
|00004b40| 63 74 09 72 3b 0d 47 72 | 61 66 50 74 72 09 73 61 |ct.r;.Gr|afPtr.sa|
|00004b50| 76 65 50 6f 72 74 3b 0d | 0d 23 20 69 66 6e 64 65 |vePort;.|.# ifnde|
|00004b60| 66 09 73 69 6e 67 6c 65 | 44 69 73 70 6c 61 79 0d |f.single|Display.|
|00004b70| 72 65 67 69 73 74 65 72 | 20 44 49 48 61 6e 64 6c |register| DIHandl|
|00004b80| 65 09 64 49 6e 66 6f 3b | 0d 23 20 65 6e 64 69 66 |e.dInfo;|.# endif|
|00004b90| 0d 0d 0d 09 47 65 74 50 | 6f 72 74 20 28 26 73 61 |....GetP|ort (&sa|
|00004ba0| 76 65 50 6f 72 74 29 3b | 0d 09 69 66 20 28 53 6b |vePort);|..if (Sk|
|00004bb0| 65 6c 57 69 6e 64 6f 77 | 20 28 64 69 73 70 57 69 |elWindow| (dispWi|
|00004bc0| 6e 64 2c 09 2f 2a 20 74 | 68 65 20 77 69 6e 64 6f |nd,./* t|he windo|
|00004bd0| 77 20 2a 2f 0d 09 09 09 | 09 4d 6f 75 73 65 2c 09 |w */....|.Mouse,.|
|00004be0| 09 2f 2a 20 6d 6f 75 73 | 65 20 63 6c 69 63 6b 20 |./* mous|e click |
|00004bf0| 68 61 6e 64 6c 65 72 20 | 2a 2f 0d 09 09 09 09 6e |handler |*/.....n|
|00004c00| 69 6c 2c 09 09 2f 2a 20 | 6b 65 79 20 63 6c 69 63 |il,../* |key clic|
|00004c10| 6b 73 20 61 72 65 20 69 | 67 6e 6f 72 65 64 20 2a |ks are i|gnored *|
|00004c20| 2f 0d 09 09 09 09 55 70 | 64 61 74 65 2c 09 09 2f |/.....Up|date,../|
|00004c30| 2a 20 77 69 6e 64 6f 77 | 20 75 70 64 61 74 69 6e |* window| updatin|
|00004c40| 67 20 70 72 6f 63 65 64 | 75 72 65 20 2a 2f 0d 09 |g proced|ure */..|
|00004c50| 09 09 09 41 63 74 69 76 | 61 74 65 2c 09 2f 2a 20 |...Activ|ate,./* |
|00004c60| 77 69 6e 64 6f 77 20 61 | 63 74 69 76 61 74 65 2f |window a|ctivate/|
|00004c70| 64 65 61 63 74 69 76 61 | 74 65 20 70 72 6f 63 65 |deactiva|te proce|
|00004c80| 64 75 72 65 20 2a 2f 0d | 09 09 09 09 6e 69 6c 2c |dure */.|....nil,|
|00004c90| 09 09 2f 2a 20 54 72 61 | 6e 73 53 6b 65 6c 20 68 |../* Tra|nsSkel h|
|00004ca0| 69 64 65 73 20 77 69 6e | 64 6f 77 20 69 66 20 6e |ides win|dow if n|
|00004cb0| 6f 20 63 6c 6f 73 65 20 | 70 72 6f 63 20 2a 2f 0d |o close |proc */.|
|00004cc0| 09 09 09 09 09 09 09 2f | 2a 20 28 67 65 6e 65 72 |......./|* (gener|
|00004cd0| 61 74 65 73 20 64 65 61 | 63 74 69 76 61 74 65 20 |ates dea|ctivate |
|00004ce0| 65 76 65 6e 74 29 20 2a | 2f 0d 09 09 09 09 43 6c |event) *|/.....Cl|
|00004cf0| 6f 62 62 65 72 2c 09 2f | 2a 20 77 69 6e 64 6f 77 |obber,./|* window|
|00004d00| 20 64 69 73 70 6f 73 61 | 6c 20 70 72 6f 63 65 64 | disposa|l proced|
|00004d10| 75 72 65 20 2a 2f 0d 09 | 09 09 09 6e 69 6c 2c 09 |ure */..|...nil,.|
|00004d20| 09 2f 2a 20 6e 6f 20 69 | 64 6c 65 20 70 72 6f 63 |./* no i|dle proc|
|00004d30| 20 2a 2f 0d 09 09 09 09 | 66 61 6c 73 65 29 20 3d | */.....|false) =|
|00004d40| 3d 20 30 29 09 2f 2a 20 | 69 72 72 65 6c 65 76 61 |= 0)./* |irreleva|
|00004d50| 6e 74 20 73 69 6e 63 65 | 20 6e 6f 20 69 64 6c 65 |nt since| no idle|
|00004d60| 20 70 72 6f 63 20 2a 2f | 0d 09 7b 0d 09 09 53 65 | proc */|..{...Se|
|00004d70| 74 50 6f 72 74 20 28 73 | 61 76 65 50 6f 72 74 29 |tPort (s|avePort)|
|00004d80| 3b 0d 09 09 72 65 74 75 | 72 6e 20 28 30 29 3b 0d |;...retu|rn (0);.|
|00004d90| 09 7d 0d 0d 2f 2a 0d 09 | 42 75 69 6c 64 20 74 68 |.}../*..|Build th|
|00004da0| 65 20 73 63 72 6f 6c 6c | 20 62 61 72 2e 20 20 4d |e scroll| bar. M|
|00004db0| 61 6b 65 20 73 75 72 65 | 20 74 68 65 20 62 6f 72 |ake sure| the bor|
|00004dc0| 64 65 72 73 20 6f 76 65 | 72 6c 61 70 20 74 68 65 |ders ove|rlap the|
|00004dd0| 0d 09 77 69 6e 64 6f 77 | 20 66 72 61 6d 65 20 61 |..window| frame a|
|00004de0| 6e 64 20 74 68 65 20 66 | 72 61 6d 65 20 6f 66 20 |nd the f|rame of |
|00004df0| 74 68 65 20 67 72 6f 77 | 20 62 6f 78 2e 0d 2a 2f |the grow| box..*/|
|00004e00| 0d 0d 09 43 61 6c 63 53 | 63 72 6f 6c 6c 52 65 63 |...CalcS|crollRec|
|00004e10| 74 20 28 26 72 29 3b 0d | 09 64 69 73 70 53 63 72 |t (&r);.|.dispScr|
|00004e20| 6f 6c 6c 20 3d 20 4e 65 | 77 43 6f 6e 74 72 6f 6c |oll = Ne|wControl|
|00004e30| 20 28 64 69 73 70 57 69 | 6e 64 2c 20 26 72 2c 20 | (dispWi|nd, &r, |
|00004e40| 22 5c 70 22 2c 20 74 72 | 75 65 2c 20 30 2c 20 30 |"\p", tr|ue, 0, 0|
|00004e50| 2c 20 30 2c 0d 09 09 09 | 09 09 09 09 09 73 63 72 |, 0,....|.....scr|
|00004e60| 6f 6c 6c 42 61 72 50 72 | 6f 63 2c 20 30 4c 29 3b |ollBarPr|oc, 0L);|
|00004e70| 0d 0d 2f 2a 0d 09 43 72 | 65 61 74 65 20 74 68 65 |../*..Cr|eate the|
|00004e80| 20 54 45 20 72 65 63 6f | 72 64 20 75 73 65 64 20 | TE reco|rd used |
|00004e90| 66 6f 72 20 74 65 78 74 | 20 64 69 73 70 6c 61 79 |for text| display|
|00004ea0| 2e 20 20 55 73 65 20 64 | 65 66 61 75 6c 74 73 20 |. Use d|efaults |
|00004eb0| 66 6f 72 0d 09 64 69 73 | 70 6c 61 79 20 63 68 61 |for..dis|play cha|
|00004ec0| 72 61 63 74 65 72 69 73 | 74 69 63 73 2e 20 20 53 |racteris|tics. S|
|00004ed0| 65 74 74 69 6e 67 20 77 | 69 6e 64 6f 77 20 73 74 |etting w|indow st|
|00004ee0| 79 6c 65 20 6f 76 65 72 | 68 61 75 6c 73 0d 09 64 |yle over|hauls..d|
|00004ef0| 69 73 70 6c 61 79 2c 20 | 73 6f 20 63 61 6e 20 63 |isplay, |so can c|
|00004f00| 61 6e 63 65 6c 20 61 6e | 64 20 75 70 64 61 74 65 |ancel an|d update|
|00004f10| 20 65 76 65 6e 74 20 70 | 65 6e 64 69 6e 67 20 66 | event p|ending f|
|00004f20| 6f 72 20 74 68 65 20 77 | 69 6e 64 6f 77 2e 0d 2a |or the w|indow..*|
|00004f30| 2f 0d 0d 09 43 61 6c 63 | 45 64 69 74 52 65 63 74 |/...Calc|EditRect|
|00004f40| 20 28 26 72 29 3b 0d 09 | 64 69 73 70 54 45 20 3d | (&r);..|dispTE =|
|00004f50| 20 54 45 4e 65 77 20 28 | 26 72 2c 20 26 72 29 3b | TENew (|&r, &r);|
|00004f60| 0d 0d 23 20 69 66 6e 64 | 65 66 09 73 69 6e 67 6c |..# ifnd|ef.singl|
|00004f70| 65 44 69 73 70 6c 61 79 | 0d 0d 2f 2a 0d 09 47 65 |eDisplay|../*..Ge|
|00004f80| 74 20 6e 65 77 20 69 6e | 66 6f 72 6d 61 74 69 6f |t new in|formatio|
|00004f90| 6e 20 73 74 72 75 63 74 | 75 72 65 2c 20 61 74 74 |n struct|ure, att|
|00004fa0| 61 63 68 20 74 6f 20 6c | 69 73 74 20 6f 66 20 6b |ach to l|ist of k|
|00004fb0| 6e 6f 77 6e 20 64 69 73 | 70 6c 61 79 0d 09 77 69 |nown dis|play..wi|
|00004fc0| 6e 64 6f 77 73 2e 0d 2a | 2f 0d 09 64 49 6e 66 6f |ndows..*|/..dInfo|
|00004fd0| 20 3d 20 4e 65 77 20 28 | 44 69 73 70 6c 61 79 49 | = New (|DisplayI|
|00004fe0| 6e 66 6f 29 3b 0d 09 28 | 2a 2a 64 49 6e 66 6f 29 |nfo);..(|**dInfo)|
|00004ff0| 2e 64 4e 65 78 74 20 3d | 20 64 77 4c 69 73 74 3b |.dNext =| dwList;|
|00005000| 0d 09 64 77 4c 69 73 74 | 20 3d 20 64 49 6e 66 6f |..dwList| = dInfo|
|00005010| 3b 0d 09 28 2a 2a 64 49 | 6e 66 6f 29 2e 64 57 69 |;..(**dI|nfo).dWi|
|00005020| 6e 64 20 3d 20 64 69 73 | 70 57 69 6e 64 3b 0d 09 |nd = dis|pWind;..|
|00005030| 28 2a 2a 64 49 6e 66 6f | 29 2e 64 53 63 72 6f 6c |(**dInfo|).dScrol|
|00005040| 6c 20 3d 20 64 69 73 70 | 53 63 72 6f 6c 6c 3b 0d |l = disp|Scroll;.|
|00005050| 09 28 2a 2a 64 49 6e 66 | 6f 29 2e 64 54 45 20 3d |.(**dInf|o).dTE =|
|00005060| 20 64 69 73 70 54 45 3b | 0d 09 0d 23 20 65 6e 64 | dispTE;|...# end|
|00005070| 69 66 0d 0d 09 53 65 74 | 44 57 69 6e 64 6f 77 4e |if...Set|DWindowN|
|00005080| 6f 74 69 66 79 20 28 64 | 69 73 70 57 69 6e 64 2c |otify (d|ispWind,|
|00005090| 20 64 5f 61 63 74 69 76 | 61 74 65 29 3b 0d 09 53 | d_activ|ate);..S|
|000050a0| 65 74 44 57 69 6e 64 6f | 77 46 6c 75 73 68 20 28 |etDWindo|wFlush (|
|000050b0| 64 69 73 70 57 69 6e 64 | 2c 20 64 5f 6d 61 78 54 |dispWind|, d_maxT|
|000050c0| 65 78 74 2c 20 64 5f 66 | 6c 75 73 68 41 6d 74 29 |ext, d_f|lushAmt)|
|000050d0| 3b 0d 09 53 65 74 44 57 | 69 6e 64 6f 77 53 74 79 |;..SetDW|indowSty|
|000050e0| 6c 65 20 28 64 69 73 70 | 57 69 6e 64 2c 20 64 5f |le (disp|Wind, d_|
|000050f0| 66 6f 6e 74 2c 20 64 5f | 73 69 7a 65 2c 20 64 5f |font, d_|size, d_|
|00005100| 77 72 61 70 2c 20 64 5f | 6a 75 73 74 29 3b 0d 0d |wrap, d_|just);..|
|00005110| 2f 2a 0d 09 4d 61 6b 65 | 20 77 69 6e 64 6f 77 20 |/*..Make| window |
|00005120| 63 75 72 72 65 6e 74 20 | 64 69 73 70 6c 61 79 20 |current |display |
|00005130| 6f 75 74 70 75 74 20 77 | 69 6e 64 6f 77 0d 2a 2f |output w|indow.*/|
|00005140| 0d 0d 09 53 65 74 44 57 | 69 6e 64 6f 77 20 28 64 |...SetDW|indow (d|
|00005150| 69 73 70 57 69 6e 64 29 | 3b 0d 09 53 65 74 50 6f |ispWind)|;..SetPo|
|00005160| 72 74 20 28 73 61 76 65 | 50 6f 72 74 29 3b 0d 09 |rt (save|Port);..|
|00005170| 72 65 74 75 72 6e 20 28 | 31 29 3b 0d 7d 0d 0d 0d |return (|1);.}...|
|00005180| 2f 2a 0d 09 43 72 65 61 | 74 65 20 61 6e 64 20 69 |/*..Crea|te and i|
|00005190| 6e 69 74 69 61 6c 69 7a | 65 20 61 20 64 69 73 70 |nitializ|e a disp|
|000051a0| 6c 61 79 20 77 69 6e 64 | 6f 77 20 61 6e 64 20 74 |lay wind|ow and t|
|000051b0| 68 65 20 61 73 73 6f 63 | 69 61 74 65 64 20 64 61 |he assoc|iated da|
|000051c0| 74 61 0d 09 73 74 72 75 | 63 74 75 72 65 73 2c 20 |ta..stru|ctures, |
|000051d0| 61 6e 64 20 72 65 74 75 | 72 6e 20 74 68 65 20 77 |and retu|rn the w|
|000051e0| 69 6e 64 6f 77 20 70 6f | 69 6e 74 65 72 2e 20 20 |indow po|inter. |
|000051f0| 49 6e 73 74 61 6c 6c 20 | 77 69 6e 64 6f 77 20 69 |Install |window i|
|00005200| 6e 0d 09 6c 69 73 74 20 | 6f 66 20 64 69 73 70 6c |n..list |of displ|
|00005210| 61 79 20 77 69 6e 64 6f | 77 73 2e 20 20 49 6e 20 |ay windo|ws. In |
|00005220| 73 69 6e 67 6c 65 2d 77 | 69 6e 64 6f 77 20 6d 6f |single-w|indow mo|
|00005230| 64 65 2c 20 64 69 73 61 | 6c 6c 6f 77 0d 09 63 72 |de, disa|llow..cr|
|00005240| 65 61 74 69 6f 6e 20 6f | 66 20 61 20 6e 65 77 20 |eation o|f a new |
|00005250| 77 69 6e 64 6f 77 20 69 | 66 20 6f 6e 65 20 61 6c |window i|f one al|
|00005260| 72 65 61 64 79 20 65 78 | 69 73 74 73 2e 0d 0d 09 |ready ex|ists....|
|00005270| 54 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 61 |The para|meters a|
|00005280| 72 65 20 73 69 6d 69 6c | 61 72 20 74 6f 20 74 68 |re simil|ar to th|
|00005290| 6f 73 65 20 66 6f 72 20 | 4e 65 77 57 69 6e 64 6f |ose for |NewWindo|
|000052a0| 77 2e 20 20 53 65 65 20 | 49 6e 73 69 64 65 0d 09 |w. See |Inside..|
|000052b0| 4d 61 63 69 6e 74 6f 73 | 68 2e 0d 2a 2f 0d 20 0d |Macintos|h..*/. .|
|000052c0| 57 69 6e 64 6f 77 50 74 | 72 20 4e 65 77 44 57 69 |WindowPt|r NewDWi|
|000052d0| 6e 64 6f 77 20 28 62 6f | 75 6e 64 73 2c 20 74 69 |ndow (bo|unds, ti|
|000052e0| 74 6c 65 2c 20 76 69 73 | 69 62 6c 65 2c 20 62 65 |tle, vis|ible, be|
|000052f0| 68 69 6e 64 2c 20 67 6f | 41 77 61 79 2c 20 72 65 |hind, go|Away, re|
|00005300| 66 43 6f 6e 29 0d 52 65 | 63 74 09 09 2a 62 6f 75 |fCon).Re|ct..*bou|
|00005310| 6e 64 73 3b 0d 53 74 72 | 69 6e 67 50 74 72 09 74 |nds;.Str|ingPtr.t|
|00005320| 69 74 6c 65 3b 0d 42 6f | 6f 6c 65 61 6e 09 09 76 |itle;.Bo|olean..v|
|00005330| 69 73 69 62 6c 65 3b 0d | 57 69 6e 64 6f 77 50 74 |isible;.|WindowPt|
|00005340| 72 09 62 65 68 69 6e 64 | 3b 0d 42 6f 6f 6c 65 61 |r.behind|;.Boolea|
|00005350| 6e 09 09 67 6f 41 77 61 | 79 3b 0d 4c 6f 6e 67 69 |n..goAwa|y;.Longi|
|00005360| 6e 74 09 09 72 65 66 43 | 6f 6e 3b 0d 7b 0d 0d 23 |nt..refC|on;.{..#|
|00005370| 20 69 66 64 65 66 09 73 | 69 6e 67 6c 65 44 69 73 | ifdef.s|ingleDis|
|00005380| 70 6c 61 79 0d 0d 09 69 | 66 20 28 64 69 73 70 57 |play...i|f (dispW|
|00005390| 69 6e 64 20 21 3d 20 6e | 69 6c 29 0d 09 09 72 65 |ind != n|il)...re|
|000053a0| 74 75 72 6e 20 28 6e 69 | 6c 29 3b 0d 0d 23 20 65 |turn (ni|l);..# e|
|000053b0| 6e 64 69 66 0d 0d 09 69 | 66 20 28 28 64 69 73 70 |ndif...i|f ((disp|
|000053c0| 57 69 6e 64 20 3d 20 4e | 65 77 57 69 6e 64 6f 77 |Wind = N|ewWindow|
|000053d0| 20 28 6e 69 6c 2c 0d 09 | 09 09 09 09 09 09 20 20 | (nil,..|...... |
|000053e0| 20 62 6f 75 6e 64 73 2c | 0d 09 09 09 09 09 09 09 | bounds,|........|
|000053f0| 20 20 20 74 69 74 6c 65 | 2c 0d 09 09 09 09 09 09 | title|,.......|
|00005400| 09 20 20 20 76 69 73 69 | 62 6c 65 2c 0d 09 09 09 |. visi|ble,....|
|00005410| 09 09 09 09 20 20 20 64 | 6f 63 75 6d 65 6e 74 50 |.... d|ocumentP|
|00005420| 72 6f 63 20 2b 20 38 2c | 0d 09 09 09 09 09 09 09 |roc + 8,|........|
|00005430| 20 20 20 62 65 68 69 6e | 64 2c 0d 09 09 09 09 09 | behin|d,......|
|00005440| 09 09 20 20 20 67 6f 41 | 77 61 79 2c 0d 09 09 09 |.. goA|way,....|
|00005450| 09 09 09 09 20 20 20 72 | 65 66 43 6f 6e 29 29 20 |.... r|efCon)) |
|00005460| 21 3d 20 6e 69 6c 29 0d | 09 7b 0d 09 09 69 66 20 |!= nil).|.{...if |
|00005470| 28 53 65 74 75 70 44 57 | 69 6e 64 6f 77 20 28 29 |(SetupDW|indow ()|
|00005480| 29 0d 09 09 09 72 65 74 | 75 72 6e 20 28 64 69 73 |)....ret|urn (dis|
|00005490| 70 57 69 6e 64 29 3b 0d | 09 09 44 69 73 70 6f 73 |pWind);.|..Dispos|
|000054a0| 65 57 69 6e 64 6f 77 20 | 28 64 69 73 70 57 69 6e |eWindow |(dispWin|
|000054b0| 64 29 3b 0d 09 7d 0d 09 | 72 65 74 75 72 6e 20 28 |d);..}..|return (|
|000054c0| 6e 69 6c 29 3b 0d 7d 0d | 0d 0d 2f 2a 0d 09 43 72 |nil);.}.|../*..Cr|
|000054d0| 65 61 74 65 20 61 6e 64 | 20 69 6e 69 74 69 61 6c |eate and| initial|
|000054e0| 69 7a 65 20 61 20 64 69 | 73 70 6c 61 79 20 77 69 |ize a di|splay wi|
|000054f0| 6e 64 6f 77 20 28 75 73 | 69 6e 67 20 61 20 72 65 |ndow (us|ing a re|
|00005500| 73 6f 75 72 63 65 29 20 | 61 6e 64 0d 09 74 68 65 |source) |and..the|
|00005510| 20 61 73 73 6f 63 69 61 | 74 65 64 20 64 61 74 61 | associa|ted data|
|00005520| 20 73 74 72 75 63 74 75 | 72 65 73 2c 20 61 6e 64 | structu|res, and|
|00005530| 20 72 65 74 75 72 6e 20 | 74 68 65 20 77 69 6e 64 | return |the wind|
|00005540| 6f 77 20 70 6f 69 6e 74 | 65 72 2e 0d 09 49 6e 73 |ow point|er...Ins|
|00005550| 74 61 6c 6c 20 77 69 6e | 64 6f 77 20 69 6e 20 6c |tall win|dow in l|
|00005560| 69 73 74 20 6f 66 20 64 | 69 73 70 6c 61 79 20 77 |ist of d|isplay w|
|00005570| 69 6e 64 6f 77 73 2e 20 | 20 49 6e 20 73 69 6e 67 |indows. | In sing|
|00005580| 6c 65 2d 77 69 6e 64 6f | 77 0d 09 6d 6f 64 65 2c |le-windo|w..mode,|
|00005590| 20 64 69 73 61 6c 6c 6f | 77 20 63 72 65 61 74 69 | disallo|w creati|
|000055a0| 6f 6e 20 6f 66 20 61 20 | 6e 65 77 20 77 69 6e 64 |on of a |new wind|
|000055b0| 6f 77 20 69 66 20 6f 6e | 65 20 61 6c 72 65 61 64 |ow if on|e alread|
|000055c0| 79 20 65 78 69 73 74 73 | 2e 0d 0d 09 54 68 65 20 |y exists|....The |
|000055d0| 70 61 72 61 6d 65 74 65 | 72 73 20 61 72 65 20 73 |paramete|rs are s|
|000055e0| 69 6d 69 6c 61 72 20 74 | 6f 20 74 68 6f 73 65 20 |imilar t|o those |
|000055f0| 66 6f 72 20 47 65 74 4e | 65 77 57 69 6e 64 6f 77 |for GetN|ewWindow|
|00005600| 2e 20 20 53 65 65 20 49 | 6e 73 69 64 65 0d 09 4d |. See I|nside..M|
|00005610| 61 63 69 6e 74 6f 73 68 | 2e 0d 2a 2f 0d 20 0d 57 |acintosh|..*/. .W|
|00005620| 69 6e 64 6f 77 50 74 72 | 20 47 65 74 4e 65 77 44 |indowPtr| GetNewD|
|00005630| 57 69 6e 64 6f 77 20 28 | 72 65 73 6f 75 72 63 65 |Window (|resource|
|00005640| 4e 75 6d 2c 20 62 65 68 | 69 6e 64 29 0d 49 6e 74 |Num, beh|ind).Int|
|00005650| 65 67 65 72 09 09 72 65 | 73 6f 75 72 63 65 4e 75 |eger..re|sourceNu|
|00005660| 6d 3b 0d 57 69 6e 64 6f | 77 50 74 72 09 62 65 68 |m;.Windo|wPtr.beh|
|00005670| 69 6e 64 3b 0d 7b 0d 0d | 23 20 69 66 64 65 66 09 |ind;.{..|# ifdef.|
|00005680| 73 69 6e 67 6c 65 44 69 | 73 70 6c 61 79 0d 0d 09 |singleDi|splay...|
|00005690| 69 66 20 28 64 69 73 70 | 57 69 6e 64 20 21 3d 20 |if (disp|Wind != |
|000056a0| 6e 69 6c 29 0d 09 09 72 | 65 74 75 72 6e 20 28 6e |nil)...r|eturn (n|
|000056b0| 69 6c 29 3b 0d 0d 23 20 | 65 6e 64 69 66 0d 0d 09 |il);..# |endif...|
|000056c0| 69 66 20 28 28 64 69 73 | 70 57 69 6e 64 20 3d 20 |if ((dis|pWind = |
|000056d0| 47 65 74 4e 65 77 57 69 | 6e 64 6f 77 20 28 72 65 |GetNewWi|ndow (re|
|000056e0| 73 6f 75 72 63 65 4e 75 | 6d 2c 20 6e 69 6c 2c 20 |sourceNu|m, nil, |
|000056f0| 62 65 68 69 6e 64 29 29 | 20 21 3d 20 6e 69 6c 29 |behind))| != nil)|
|00005700| 0d 09 7b 0d 09 09 69 66 | 20 28 53 65 74 75 70 44 |..{...if| (SetupD|
|00005710| 57 69 6e 64 6f 77 20 28 | 29 29 0d 09 09 09 72 65 |Window (|))....re|
|00005720| 74 75 72 6e 20 28 64 69 | 73 70 57 69 6e 64 29 3b |turn (di|spWind);|
|00005730| 0d 09 09 44 69 73 70 6f | 73 65 57 69 6e 64 6f 77 |...Dispo|seWindow|
|00005740| 20 28 64 69 73 70 57 69 | 6e 64 29 3b 0d 09 7d 0d | (dispWi|nd);..}.|
|00005750| 09 72 65 74 75 72 6e 20 | 28 6e 69 6c 29 3b 0d 7d |.return |(nil);.}|
|00005760| 0d 0d 0d 0d 0d 2f 2a 20 | 2d 2d 2d 2d 2d 2d 2d 2d |...../* |--------|
|00005770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005780| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057a0| 2d 2d 2d 2d 20 2a 2f 0d | 2f 2a 09 09 09 09 09 09 |---- */.|/*......|
|000057b0| 4f 75 74 70 75 74 20 52 | 6f 75 74 69 6e 65 73 09 |Output R|outines.|
|000057c0| 09 09 09 09 09 09 2a 2f | 0d 2f 2a 20 2d 2d 2d 2d |......*/|./* ----|
|000057d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005800| 2d 2d 2d 2d 2d 2d 2d 2d | 20 2a 2f 0d 0d 0d 2f 2a |--------| */.../*|
|00005810| 0d 09 57 72 69 74 65 20 | 74 65 78 74 20 74 6f 20 |..Write |text to |
|00005820| 64 69 73 70 6c 61 79 20 | 61 72 65 61 20 69 66 20 |display |area if |
|00005830| 6f 75 74 70 75 74 20 69 | 73 20 6f 6e 20 28 63 75 |output i|s on (cu|
|00005840| 72 44 69 73 70 57 69 6e | 64 20 21 3d 20 6e 69 6c |rDispWin|d != nil|
|00005850| 29 2e 0d 09 44 69 73 70 | 6c 61 79 54 65 78 74 20 |)...Disp|layText |
|00005860| 69 73 20 74 68 65 20 66 | 75 6e 64 61 6d 65 6e 74 |is the f|undament|
|00005870| 61 6c 20 6f 75 74 70 75 | 74 20 72 6f 75 74 69 6e |al outpu|t routin|
|00005880| 65 2e 20 20 41 6c 6c 20 | 6f 74 68 65 72 0d 09 6f |e. All |other..o|
|00005890| 75 74 70 75 74 20 63 61 | 6c 6c 73 20 6d 61 70 20 |utput ca|lls map |
|000058a0| 28 65 76 65 6e 74 75 61 | 6c 6c 79 29 20 74 6f 20 |(eventua|lly) to |
|000058b0| 69 74 2e 0d 0d 09 46 69 | 72 73 74 20 63 68 65 63 |it....Fi|rst chec|
|000058c0| 6b 20 77 68 65 74 68 65 | 72 20 74 68 65 20 69 6e |k whethe|r the in|
|000058d0| 73 65 72 74 69 6f 6e 20 | 77 69 6c 6c 20 63 61 75 |sertion |will cau|
|000058e0| 73 65 20 6f 76 65 72 66 | 6c 6f 77 20 61 6e 64 20 |se overf|low and |
|000058f0| 66 6c 75 73 68 0d 09 6f | 75 74 20 73 6f 6d 65 20 |flush..o|ut some |
|00005900| 73 74 75 66 66 20 69 66 | 20 73 6f 2e 20 20 49 6e |stuff if| so. In|
|00005910| 73 65 72 74 20 6e 65 77 | 20 74 65 78 74 20 61 74 |sert new| text at|
|00005920| 20 74 68 65 20 65 6e 64 | 2c 20 74 68 65 6e 20 74 | the end|, then t|
|00005930| 65 73 74 0d 09 77 68 65 | 74 68 65 72 20 6c 69 6e |est..whe|ther lin|
|00005940| 65 73 20 6d 75 73 74 20 | 62 65 20 73 63 72 6f 6c |es must |be scrol|
|00005950| 6c 65 64 20 74 6f 20 67 | 65 74 20 74 68 65 20 6e |led to g|et the n|
|00005960| 65 77 20 73 74 75 66 66 | 20 74 6f 20 73 68 6f 77 |ew stuff| to show|
|00005970| 20 75 70 2e 0d 09 49 66 | 20 79 65 73 2c 20 74 68 | up...If| yes, th|
|00005980| 65 6e 20 64 6f 20 74 68 | 65 20 73 63 72 6f 6c 6c |en do th|e scroll|
|00005990| 2e 20 20 53 65 74 20 76 | 61 6c 75 65 73 20 6f 66 |. Set v|alues of|
|000059a0| 20 73 63 72 6f 6c 6c 20 | 62 61 72 20 70 72 6f 70 | scroll |bar prop|
|000059b0| 65 72 6c 79 0d 09 61 6e | 64 20 68 69 67 68 6c 69 |erly..an|d highli|
|000059c0| 67 68 74 20 61 73 20 61 | 70 70 72 6f 70 72 69 61 |ght as a|ppropria|
|000059d0| 74 65 2e 0d 0d 09 54 68 | 65 20 63 75 72 72 65 6e |te....Th|e curren|
|000059e0| 74 20 70 6f 72 74 20 69 | 73 20 70 72 65 73 65 72 |t port i|s preser|
|000059f0| 76 65 64 2e 20 20 53 69 | 6e 63 65 20 61 6c 6c 20 |ved. Si|nce all |
|00005a00| 6f 75 74 70 75 74 20 63 | 61 6c 6c 73 20 65 6e 64 |output c|alls end|
|00005a10| 20 75 70 0d 09 68 65 72 | 65 2c 20 69 74 27 73 20 | up..her|e, it's |
|00005a20| 74 68 65 20 6f 6e 6c 79 | 20 6f 75 74 70 75 74 20 |the only| output |
|00005a30| 72 6f 75 74 69 6e 65 20 | 74 68 61 74 20 68 61 73 |routine |that has|
|00005a40| 20 74 6f 20 73 61 76 65 | 20 74 68 65 20 70 6f 72 | to save| the por|
|00005a50| 74 0d 09 61 6e 64 20 63 | 68 65 63 6b 20 77 68 65 |t..and c|heck whe|
|00005a60| 74 68 65 72 20 6f 75 74 | 70 75 74 20 69 73 20 6f |ther out|put is o|
|00005a70| 6e 2e 0d 2a 2f 0d 0d 44 | 69 73 70 6c 61 79 54 65 |n..*/..D|isplayTe|
|00005a80| 78 74 20 28 74 68 65 54 | 65 78 74 2c 20 6c 65 6e |xt (theT|ext, len|
|00005a90| 29 0d 50 74 72 09 09 74 | 68 65 54 65 78 74 3b 0d |).Ptr..t|heText;.|
|00005aa0| 4c 6f 6e 67 69 6e 74 09 | 6c 65 6e 3b 0d 7b 0d 72 |Longint.|len;.{.r|
|00005ab0| 65 67 69 73 74 65 72 20 | 49 6e 74 65 67 65 72 09 |egister |Integer.|
|00005ac0| 6e 4c 69 6e 65 73 3b 09 | 09 09 2f 2a 20 23 20 6f |nLines;.|../* # o|
|00005ad0| 66 20 6c 69 6e 65 73 20 | 69 6e 20 54 45 52 65 63 |f lines |in TERec|
|00005ae0| 20 2a 2f 0d 72 65 67 69 | 73 74 65 72 20 49 6e 74 | */.regi|ster Int|
|00005af0| 65 67 65 72 09 64 69 73 | 70 4c 69 6e 65 73 3b 09 |eger.dis|pLines;.|
|00005b00| 09 2f 2a 20 23 20 6f 66 | 20 6c 69 6e 65 73 20 64 |./* # of| lines d|
|00005b10| 69 73 70 6c 61 79 61 62 | 6c 65 20 69 6e 20 77 69 |isplayab|le in wi|
|00005b20| 6e 64 6f 77 20 2a 2f 0d | 72 65 67 69 73 74 65 72 |ndow */.|register|
|00005b30| 20 49 6e 74 65 67 65 72 | 09 74 6f 70 4c 69 6e 65 | Integer|.topLine|
|00005b40| 73 3b 09 09 2f 2a 20 23 | 20 6f 66 20 6c 69 6e 65 |s;../* #| of line|
|00005b50| 73 20 63 75 72 72 65 6e | 74 6c 79 20 73 63 72 6f |s curren|tly scro|
|00005b60| 6c 6c 65 64 20 6f 66 66 | 20 74 6f 70 20 2a 2f 0d |lled off| top */.|
|00005b70| 72 65 67 69 73 74 65 72 | 20 49 6e 74 65 67 65 72 |register| Integer|
|00005b80| 09 73 63 72 6f 6c 6c 4c | 69 6e 65 73 3b 09 2f 2a |.scrollL|ines;./*|
|00005b90| 20 23 20 6f 66 20 6c 69 | 6e 65 73 20 74 6f 20 73 | # of li|nes to s|
|00005ba0| 63 72 6f 6c 6c 20 75 70 | 20 2a 2f 0d 72 65 67 69 |croll up| */.regi|
|00005bb0| 73 74 65 72 20 49 6e 74 | 65 67 65 72 09 6c 48 65 |ster Int|eger.lHe|
|00005bc0| 69 67 68 74 3b 0d 52 65 | 63 74 09 09 09 09 72 3b |ight;.Re|ct....r;|
|00005bd0| 0d 47 72 61 66 50 74 72 | 09 09 09 09 73 61 76 65 |.GrafPtr|....save|
|00005be0| 50 6f 72 74 3b 0d 72 65 | 67 69 73 74 65 72 20 54 |Port;.re|gister T|
|00005bf0| 45 48 61 6e 64 6c 65 09 | 64 54 45 3b 0d 0d 09 69 |EHandle.|dTE;...i|
|00005c00| 66 20 28 63 75 72 44 69 | 73 70 57 69 6e 64 20 3d |f (curDi|spWind =|
|00005c10| 3d 20 6e 69 6c 29 0d 09 | 09 72 65 74 75 72 6e 3b |= nil)..|.return;|
|00005c20| 0d 0d 09 47 65 74 50 6f | 72 74 20 28 26 73 61 76 |...GetPo|rt (&sav|
|00005c30| 65 50 6f 72 74 29 3b 0d | 09 53 65 74 50 6f 72 74 |ePort);.|.SetPort|
|00005c40| 20 28 63 75 72 44 69 73 | 70 57 69 6e 64 29 3b 0d | (curDis|pWind);.|
|00005c50| 09 53 79 6e 63 47 6c 6f | 62 61 6c 73 20 28 63 75 |.SyncGlo|bals (cu|
|00005c60| 72 44 69 73 70 57 69 6e | 64 29 3b 0d 09 64 54 45 |rDispWin|d);..dTE|
|00005c70| 20 3d 20 64 69 73 70 54 | 45 3b 0d 0d 09 69 66 20 | = dispT|E;...if |
|00005c80| 28 28 2a 2a 64 54 45 29 | 2e 74 65 4c 65 6e 67 74 |((**dTE)|.teLengt|
|00005c90| 68 20 2b 20 6c 65 6e 20 | 3e 20 64 4d 61 78 54 65 |h + len |> dMaxTe|
|00005ca0| 78 74 29 09 2f 2a 20 63 | 68 65 63 6b 20 6f 76 65 |xt)./* c|heck ove|
|00005cb0| 72 66 6c 6f 77 20 2a 2f | 0d 09 7b 0d 09 09 46 6c |rflow */|..{...Fl|
|00005cc0| 75 73 68 44 57 69 6e 64 | 6f 77 20 28 64 69 73 70 |ushDWind|ow (disp|
|00005cd0| 57 69 6e 64 2c 20 64 46 | 6c 75 73 68 41 6d 74 29 |Wind, dF|lushAmt)|
|00005ce0| 3b 0d 09 09 44 69 73 70 | 6c 61 79 53 74 72 69 6e |;...Disp|layStrin|
|00005cf0| 67 20 28 22 5c 70 5c 72 | 28 61 75 74 6f 66 6c 75 |g ("\p\r|(autoflu|
|00005d00| 73 68 20 6f 63 63 75 72 | 72 65 64 29 5c 72 22 29 |sh occur|red)\r")|
|00005d10| 3b 0d 09 7d 0d 0d 09 6c | 48 65 69 67 68 74 20 3d |;..}...l|Height =|
|00005d20| 20 28 2a 2a 64 54 45 29 | 2e 6c 69 6e 65 48 65 69 | (**dTE)|.lineHei|
|00005d30| 67 68 74 3b 0d 09 54 45 | 53 65 74 53 65 6c 65 63 |ght;..TE|SetSelec|
|00005d40| 74 20 28 33 32 37 36 37 | 4c 2c 20 33 32 37 36 37 |t (32767|L, 32767|
|00005d50| 4c 2c 20 64 54 45 29 3b | 09 2f 2a 20 73 65 74 20 |L, dTE);|./* set |
|00005d60| 74 6f 20 69 6e 73 65 72 | 74 20 61 74 20 65 6e 64 |to inser|t at end|
|00005d70| 20 2a 2f 0d 09 54 45 49 | 6e 73 65 72 74 20 28 74 | */..TEI|nsert (t|
|00005d80| 68 65 54 65 78 74 2c 20 | 6c 65 6e 2c 20 64 54 45 |heText, |len, dTE|
|00005d90| 29 3b 0d 09 72 20 3d 20 | 28 2a 2a 64 54 45 29 2e |);..r = |(**dTE).|
|00005da0| 76 69 65 77 52 65 63 74 | 3b 0d 09 6e 4c 69 6e 65 |viewRect|;..nLine|
|00005db0| 73 20 3d 20 28 2a 2a 64 | 54 45 29 2e 6e 4c 69 6e |s = (**d|TE).nLin|
|00005dc0| 65 73 3b 0d 09 64 69 73 | 70 4c 69 6e 65 73 20 3d |es;..dis|pLines =|
|00005dd0| 20 28 72 2e 62 6f 74 74 | 6f 6d 20 2d 20 72 2e 74 | (r.bott|om - r.t|
|00005de0| 6f 70 29 20 2f 20 6c 48 | 65 69 67 68 74 3b 0d 09 |op) / lH|eight;..|
|00005df0| 74 6f 70 4c 69 6e 65 73 | 20 3d 20 4c 69 6e 65 73 |topLines| = Lines|
|00005e00| 4f 66 66 54 6f 70 20 28 | 29 3b 0d 09 73 63 72 6f |OffTop (|);..scro|
|00005e10| 6c 6c 4c 69 6e 65 73 20 | 3d 20 6e 4c 69 6e 65 73 |llLines |= nLines|
|00005e20| 20 2d 20 28 74 6f 70 4c | 69 6e 65 73 20 2b 20 64 | - (topL|ines + d|
|00005e30| 69 73 70 4c 69 6e 65 73 | 29 3b 0d 09 69 66 20 28 |ispLines|);..if (|
|00005e40| 73 63 72 6f 6c 6c 4c 69 | 6e 65 73 20 3e 20 30 29 |scrollLi|nes > 0)|
|00005e50| 20 2f 2a 20 6d 75 73 74 | 20 73 63 72 6f 6c 6c 20 | /* must| scroll |
|00005e60| 75 70 20 2a 2f 0d 09 09 | 54 45 53 63 72 6f 6c 6c |up */...|TEScroll|
|00005e70| 20 28 30 2c 20 2d 6c 48 | 65 69 67 68 74 20 2a 20 | (0, -lH|eight * |
|00005e80| 73 63 72 6f 6c 6c 4c 69 | 6e 65 73 2c 20 64 54 45 |scrollLi|nes, dTE|
|00005e90| 29 3b 20 2f 2a 20 73 63 | 72 6f 6c 6c 20 75 70 20 |); /* sc|roll up |
|00005ea0| 2a 2f 0d 09 74 6f 70 4c | 69 6e 65 73 20 3d 20 6e |*/..topL|ines = n|
|00005eb0| 4c 69 6e 65 73 20 2d 20 | 64 69 73 70 4c 69 6e 65 |Lines - |dispLine|
|00005ec0| 73 3b 0d 09 69 66 20 28 | 74 6f 70 4c 69 6e 65 73 |s;..if (|topLines|
|00005ed0| 20 3e 3d 20 30 20 26 26 | 20 47 65 74 43 74 6c 4d | >= 0 &&| GetCtlM|
|00005ee0| 61 78 20 28 64 69 73 70 | 53 63 72 6f 6c 6c 29 20 |ax (disp|Scroll) |
|00005ef0| 21 3d 20 74 6f 70 4c 69 | 6e 65 73 29 0d 09 7b 0d |!= topLi|nes)..{.|
|00005f00| 09 09 53 65 74 43 74 6c | 4d 61 78 20 28 64 69 73 |..SetCtl|Max (dis|
|00005f10| 70 53 63 72 6f 6c 6c 2c | 20 74 6f 70 4c 69 6e 65 |pScroll,| topLine|
|00005f20| 73 29 3b 0d 09 09 53 65 | 74 43 74 6c 56 61 6c 75 |s);...Se|tCtlValu|
|00005f30| 65 20 28 64 69 73 70 53 | 63 72 6f 6c 6c 2c 20 74 |e (dispS|croll, t|
|00005f40| 6f 70 4c 69 6e 65 73 29 | 3b 0d 09 7d 0d 09 48 69 |opLines)|;..}..Hi|
|00005f50| 6c 69 74 65 53 63 72 6f | 6c 6c 20 28 29 3b 0d 09 |liteScro|ll ();..|
|00005f60| 53 65 74 50 6f 72 74 20 | 28 73 61 76 65 50 6f 72 |SetPort |(savePor|
|00005f70| 74 29 3b 0d 7d 0d 0d 0d | 2f 2a 0d 09 44 65 72 69 |t);.}...|/*..Deri|
|00005f80| 76 65 64 20 6f 75 74 70 | 75 74 20 72 6f 75 74 69 |ved outp|ut routi|
|00005f90| 6e 65 73 3a 0d 0d 09 44 | 69 73 70 6c 61 79 53 74 |nes:...D|isplaySt|
|00005fa0| 72 69 6e 67 09 57 72 69 | 74 65 20 28 50 61 73 63 |ring.Wri|te (Pasc|
|00005fb0| 61 6c 29 20 73 74 72 69 | 6e 67 0d 0d 09 44 69 73 |al) stri|ng...Dis|
|00005fc0| 70 6c 61 79 4c 6f 6e 67 | 09 09 57 72 69 74 65 20 |playLong|..Write |
|00005fd0| 76 61 6c 75 65 20 6f 66 | 20 6c 6f 6e 67 20 69 6e |value of| long in|
|00005fe0| 74 65 67 65 72 0d 09 44 | 69 73 70 6c 61 79 49 6e |teger..D|isplayIn|
|00005ff0| 74 09 09 57 72 69 74 65 | 20 76 61 6c 75 65 20 6f |t..Write| value o|
|00006000| 66 20 69 6e 74 65 67 65 | 72 0d 09 44 69 73 70 6c |f intege|r..Displ|
|00006010| 61 79 43 68 61 72 09 09 | 57 72 69 74 65 20 63 68 |ayChar..|Write ch|
|00006020| 61 72 61 63 74 65 72 0d | 0d 09 44 69 73 70 6c 61 |aracter.|..Displa|
|00006030| 79 48 65 78 4c 6f 6e 67 | 09 57 72 69 74 65 20 76 |yHexLong|.Write v|
|00006040| 61 6c 75 65 20 6f 66 20 | 6c 6f 6e 67 20 69 6e 74 |alue of |long int|
|00006050| 65 67 65 72 20 69 6e 20 | 68 65 78 20 28 38 20 64 |eger in |hex (8 d|
|00006060| 69 67 69 74 73 29 0d 09 | 44 69 73 70 6c 61 79 48 |igits)..|DisplayH|
|00006070| 65 78 49 6e 74 09 57 72 | 69 74 65 20 76 61 6c 75 |exInt.Wr|ite valu|
|00006080| 65 20 6f 66 20 69 6e 74 | 65 67 65 72 20 69 6e 20 |e of int|eger in |
|00006090| 68 65 78 20 28 34 20 64 | 69 67 69 74 73 29 0d 09 |hex (4 d|igits)..|
|000060a0| 44 69 73 70 6c 61 79 48 | 65 78 43 68 61 72 09 57 |DisplayH|exChar.W|
|000060b0| 72 69 74 65 20 76 61 6c | 75 65 20 6f 66 20 63 68 |rite val|ue of ch|
|000060c0| 61 72 61 63 74 65 72 20 | 69 6e 20 68 65 78 20 28 |aracter |in hex (|
|000060d0| 32 20 64 69 67 69 74 29 | 0d 0d 09 44 69 73 70 6c |2 digit)|...Displ|
|000060e0| 61 79 42 6f 6f 6c 65 61 | 6e 09 57 72 69 74 65 20 |ayBoolea|n.Write |
|000060f0| 62 6f 6f 6c 65 61 6e 20 | 76 61 6c 75 65 0d 09 44 |boolean |value..D|
|00006100| 69 73 70 6c 61 79 4c 6e | 09 09 57 72 69 74 65 20 |isplayLn|..Write |
|00006110| 63 61 72 72 69 61 67 65 | 20 72 65 74 75 72 6e 0d |carriage| return.|
|00006120| 2a 2f 0d 0d 44 69 73 70 | 6c 61 79 53 74 72 69 6e |*/..Disp|layStrin|
|00006130| 67 20 28 74 68 65 53 74 | 72 29 0d 53 74 72 69 6e |g (theSt|r).Strin|
|00006140| 67 50 74 72 09 74 68 65 | 53 74 72 3b 0d 7b 0d 09 |gPtr.the|Str;.{..|
|00006150| 44 69 73 70 6c 61 79 54 | 65 78 74 20 28 74 68 65 |DisplayT|ext (the|
|00006160| 53 74 72 2b 31 2c 20 28 | 4c 6f 6e 67 69 6e 74 29 |Str+1, (|Longint)|
|00006170| 20 74 68 65 53 74 72 5b | 30 5d 29 3b 0d 7d 0d 0d | theStr[|0]);.}..|
|00006180| 0d 44 69 73 70 6c 61 79 | 4c 6f 6e 67 20 28 6c 29 |.Display|Long (l)|
|00006190| 0d 4c 6f 6e 67 69 6e 74 | 09 09 6c 3b 0d 7b 0d 53 |.Longint|..l;.{.S|
|000061a0| 74 72 32 35 35 09 09 73 | 3b 0d 0d 09 4e 75 6d 54 |tr255..s|;...NumT|
|000061b0| 6f 53 74 72 69 6e 67 20 | 28 6c 2c 20 73 29 3b 0d |oString |(l, s);.|
|000061c0| 09 44 69 73 70 6c 61 79 | 53 74 72 69 6e 67 20 28 |.Display|String (|
|000061d0| 73 29 3b 0d 7d 0d 0d 0d | 44 69 73 70 6c 61 79 49 |s);.}...|DisplayI|
|000061e0| 6e 74 20 28 69 29 0d 49 | 6e 74 65 67 65 72 09 69 |nt (i).I|nteger.i|
|000061f0| 3b 0d 7b 0d 09 44 69 73 | 70 6c 61 79 4c 6f 6e 67 |;.{..Dis|playLong|
|00006200| 20 28 28 4c 6f 6e 67 69 | 6e 74 29 20 69 29 3b 0d | ((Longi|nt) i);.|
|00006210| 7d 0d 0d 0d 44 69 73 70 | 6c 61 79 43 68 61 72 20 |}...Disp|layChar |
|00006220| 28 63 29 0d 63 68 61 72 | 09 63 3b 0d 7b 0d 09 44 |(c).char|.c;.{..D|
|00006230| 69 73 70 6c 61 79 54 65 | 78 74 20 28 26 63 2c 20 |isplayTe|xt (&c, |
|00006240| 31 4c 29 3b 0d 7d 0d 0d | 0d 44 69 73 70 6c 61 79 |1L);.}..|.Display|
|00006250| 4c 6e 20 28 29 0d 7b 0d | 09 44 69 73 70 6c 61 79 |Ln ().{.|.Display|
|00006260| 43 68 61 72 20 28 27 5c | 72 27 29 3b 0d 7d 0d 0d |Char ('\|r');.}..|
|00006270| 0d 44 69 73 70 6c 61 79 | 42 6f 6f 6c 65 61 6e 20 |.Display|Boolean |
|00006280| 28 62 29 0d 42 6f 6f 6c | 65 61 6e 09 62 3b 0d 7b |(b).Bool|ean.b;.{|
|00006290| 0d 09 44 69 73 70 6c 61 | 79 53 74 72 69 6e 67 20 |..Displa|yString |
|000062a0| 28 62 20 3f 20 22 5c 70 | 74 72 75 65 22 20 3a 20 |(b ? "\p|true" : |
|000062b0| 22 5c 70 66 61 6c 73 65 | 22 29 3b 0d 7d 0d 0d 0d |"\pfalse|");.}...|
|000062c0| 73 74 61 74 69 63 20 48 | 65 78 42 79 74 65 20 28 |static H|exByte (|
|000062d0| 76 61 6c 75 65 29 09 2f | 2a 20 73 68 6f 75 6c 64 |value)./|* should|
|000062e0| 20 62 65 20 30 2e 2e 31 | 35 20 2a 2f 0d 49 6e 74 | be 0..1|5 */.Int|
|000062f0| 65 67 65 72 09 76 61 6c | 75 65 3b 0d 7b 0d 09 44 |eger.val|ue;.{..D|
|00006300| 69 73 70 6c 61 79 43 68 | 61 72 20 28 28 63 68 61 |isplayCh|ar ((cha|
|00006310| 72 29 20 28 76 61 6c 75 | 65 20 2b 20 28 76 61 6c |r) (valu|e + (val|
|00006320| 75 65 20 3c 20 31 30 20 | 3f 20 27 30 27 20 3a 20 |ue < 10 |? '0' : |
|00006330| 27 61 27 20 2d 20 31 30 | 29 29 29 3b 0d 7d 0d 0d |'a' - 10|)));.}..|
|00006340| 0d 44 69 73 70 6c 61 79 | 48 65 78 43 68 61 72 20 |.Display|HexChar |
|00006350| 28 63 29 0d 63 68 61 72 | 09 63 3b 0d 7b 0d 09 48 |(c).char|.c;.{..H|
|00006360| 65 78 42 79 74 65 20 28 | 28 49 6e 74 65 67 65 72 |exByte (|(Integer|
|00006370| 29 20 28 63 20 3e 3e 20 | 34 29 20 26 20 30 78 30 |) (c >> |4) & 0x0|
|00006380| 66 29 3b 0d 09 48 65 78 | 42 79 74 65 20 28 28 49 |f);..Hex|Byte ((I|
|00006390| 6e 74 65 67 65 72 29 20 | 63 20 26 20 30 78 30 66 |nteger) |c & 0x0f|
|000063a0| 29 3b 0d 7d 0d 0d 0d 44 | 69 73 70 6c 61 79 48 65 |);.}...D|isplayHe|
|000063b0| 78 49 6e 74 20 28 69 29 | 0d 49 6e 74 65 67 65 72 |xInt (i)|.Integer|
|000063c0| 09 69 3b 0d 7b 0d 09 44 | 69 73 70 6c 61 79 48 65 |.i;.{..D|isplayHe|
|000063d0| 78 43 68 61 72 20 28 28 | 63 68 61 72 29 20 28 28 |xChar ((|char) ((|
|000063e0| 69 20 3e 3e 20 38 29 20 | 26 20 30 78 66 66 29 29 |i >> 8) |& 0xff))|
|000063f0| 3b 0d 09 44 69 73 70 6c | 61 79 48 65 78 43 68 61 |;..Displ|ayHexCha|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.