home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / xlisp_21 / xlisp.mac < prev    next >
Mailbox/MIME Entity  |  1993-10-23  |  26.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Installer VISE Package (archive/installerVISE) ext Unsupported
1% dexvert Scooter Macro (other/scooterMacro) ext Unsupported
1% dexvert Platinen Layout Programm Macro (other/platinenLayoutProgrammMacro) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file Mailbox text, 1st line "From sce!mitel!uunet!datapg!com50!pai!erc Tue Nov 14 08:51:33 EST 1989" default
99% file C source text default
98% file C source, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime application/mbox default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 73 63 65 | 21 6d 69 74 65 6c 21 75 |From sce|!mitel!u|
|00000010| 75 6e 65 74 21 64 61 74 | 61 70 67 21 63 6f 6d 35 |unet!dat|apg!com5|
|00000020| 30 21 70 61 69 21 65 72 | 63 20 54 75 65 20 4e 6f |0!pai!er|c Tue No|
|00000030| 76 20 31 34 20 30 38 3a | 35 31 3a 33 33 20 45 53 |v 14 08:|51:33 ES|
|00000040| 54 20 31 39 38 39 0a 41 | 72 74 69 63 6c 65 3a 20 |T 1989.A|rticle: |
|00000050| 37 35 33 20 6f 66 20 63 | 6f 6d 70 2e 6c 61 6e 67 |753 of c|omp.lang|
|00000060| 2e 73 63 68 65 6d 65 0a | 50 61 74 68 3a 20 63 6f |.scheme.|Path: co|
|00000070| 67 6e 6f 73 21 73 63 65 | 21 6d 69 74 65 6c 21 75 |gnos!sce|!mitel!u|
|00000080| 75 6e 65 74 21 64 61 74 | 61 70 67 21 63 6f 6d 35 |unet!dat|apg!com5|
|00000090| 30 21 70 61 69 21 65 72 | 63 0a 46 72 6f 6d 3a 20 |0!pai!er|c.From: |
|000000a0| 65 72 63 40 70 61 69 2e | 55 55 43 50 20 28 45 72 |erc@pai.|UUCP (Er|
|000000b0| 69 63 20 4a 6f 68 6e 73 | 6f 6e 29 0a 4e 65 77 73 |ic Johns|on).News|
|000000c0| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 6c 61 6e |groups: |comp.lan|
|000000d0| 67 2e 73 63 68 65 6d 65 | 2c 63 6f 6d 70 2e 73 79 |g.scheme|,comp.sy|
|000000e0| 73 2e 6d 61 63 0a 53 75 | 62 6a 65 63 74 3a 20 52 |s.mac.Su|bject: R|
|000000f0| 65 3a 20 48 6f 77 20 74 | 6f 20 62 75 69 6c 64 20 |e: How t|o build |
|00000100| 78 73 63 68 65 6d 65 20 | 66 6f 72 20 74 68 65 20 |xscheme |for the |
|00000110| 6d 61 63 0a 53 75 6d 6d | 61 72 79 3a 20 48 6f 70 |mac.Summ|ary: Hop|
|00000120| 65 20 74 68 69 73 20 68 | 65 6c 70 73 2e 2e 2e 0a |e this h|elps....|
|00000130| 4b 65 79 77 6f 72 64 73 | 3a 20 78 73 63 68 65 6d |Keywords|: xschem|
|00000140| 65 2c 20 6d 61 63 0a 4d | 65 73 73 61 67 65 2d 49 |e, mac.M|essage-I|
|00000150| 44 3a 20 3c 37 34 32 40 | 70 61 69 2e 55 55 43 50 |D: <742@|pai.UUCP|
|00000160| 3e 0a 44 61 74 65 3a 20 | 31 31 20 4e 6f 76 20 38 |>.Date: |11 Nov 8|
|00000170| 39 20 31 38 3a 35 35 3a | 30 35 20 47 4d 54 0a 52 |9 18:55:|05 GMT.R|
|00000180| 65 66 65 72 65 6e 63 65 | 73 3a 20 3c 32 30 39 31 |eference|s: <2091|
|00000190| 40 63 75 6e 69 78 63 2e | 63 63 2e 63 6f 6c 75 6d |@cunixc.|cc.colum|
|000001a0| 62 69 61 2e 65 64 75 3e | 0a 4f 72 67 61 6e 69 7a |bia.edu>|.Organiz|
|000001b0| 61 74 69 6f 6e 3a 20 50 | 72 69 6d 65 20 41 75 74 |ation: P|rime Aut|
|000001c0| 6f 6d 61 74 69 6f 6e 2c | 20 49 6e 63 2e 2c 20 42 |omation,| Inc., B|
|000001d0| 75 72 6e 73 76 69 6c 6c | 65 2c 20 4d 4e 0a 4c 69 |urnsvill|e, MN.Li|
|000001e0| 6e 65 73 3a 20 31 33 37 | 34 0a 58 72 65 66 3a 20 |nes: 137|4.Xref: |
|000001f0| 63 6f 67 6e 6f 73 20 63 | 6f 6d 70 2e 6c 61 6e 67 |cognos c|omp.lang|
|00000200| 2e 73 63 68 65 6d 65 3a | 37 35 33 20 63 6f 6d 70 |.scheme:|753 comp|
|00000210| 2e 73 79 73 2e 6d 61 63 | 3a 33 33 34 35 39 0a 0a |.sys.mac|:33459..|
|00000220| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 32 30 39 31 |In artic|le <2091|
|00000230| 40 63 75 6e 69 78 63 2e | 63 63 2e 63 6f 6c 75 6d |@cunixc.|cc.colum|
|00000240| 62 69 61 2e 65 64 75 3e | 2c 20 70 75 67 6c 69 61 |bia.edu>|, puglia|
|00000250| 40 63 75 6e 69 78 63 2e | 63 63 2e 63 6f 6c 75 6d |@cunixc.|cc.colum|
|00000260| 62 69 61 2e 65 64 75 20 | 28 50 61 75 6c 20 50 75 |bia.edu |(Paul Pu|
|00000270| 67 6c 69 61 29 20 77 72 | 69 74 65 73 3a 0a 3e 20 |glia) wr|ites:.> |
|00000280| 48 6f 77 20 64 6f 65 73 | 20 79 6f 75 20 62 75 69 |How does| you bui|
|00000290| 6c 64 20 78 73 63 68 65 | 6d 65 20 6f 6e 20 61 20 |ld xsche|me on a |
|000002a0| 6d 61 63 69 6e 74 6f 73 | 68 20 3f 20 49 20 68 61 |macintos|h ? I ha|
|000002b0| 76 65 20 61 20 63 6f 70 | 79 20 6f 66 20 0a 3e 20 |ve a cop|y of .> |
|000002c0| 74 68 65 20 78 73 63 68 | 65 6d 65 20 73 6f 75 72 |the xsch|eme sour|
|000002d0| 63 65 73 20 63 6f 6d 70 | 69 6c 65 73 20 66 69 6e |ces comp|iles fin|
|000002e0| 65 20 6f 6e 20 61 20 75 | 6e 69 78 20 6d 61 63 68 |e on a u|nix mach|
|000002f0| 69 6e 65 2c 20 61 6e 64 | 20 77 6f 72 6b 73 0a 3e |ine, and| works.>|
|00000300| 20 67 72 65 61 74 20 6f | 6e 20 61 20 70 63 20 77 | great o|n a pc w|
|00000310| 69 74 68 20 74 75 72 62 | 6f 20 63 2e 20 20 57 68 |ith turb|o c. Wh|
|00000320| 65 6e 20 49 20 74 72 69 | 65 64 20 74 6f 20 63 6f |en I tri|ed to co|
|00000330| 6d 70 69 6c 65 20 69 74 | 20 6f 6e 20 61 20 0a 3e |mpile it| on a .>|
|00000340| 20 66 72 69 65 6e 64 73 | 20 6d 61 63 20 49 49 20 | friends| mac II |
|00000350| 75 73 69 6e 67 20 68 69 | 73 20 63 6f 70 79 20 6f |using hi|s copy o|
|00000360| 66 20 6c 69 67 68 74 73 | 70 65 65 64 20 63 2e 20 |f lights|peed c. |
|00000370| 49 20 68 61 76 65 20 6e | 6f 20 6c 75 63 6b 2e 20 |I have n|o luck. |
|00000380| 0a 3e 20 43 6f 75 6c 64 | 20 73 6f 6d 65 6f 6e 65 |.> Could| someone|
|00000390| 20 70 6c 65 61 73 65 20 | 64 65 73 63 72 69 62 65 | please |describe|
|000003a0| 20 74 68 65 20 70 72 6f | 63 65 64 75 72 65 20 74 | the pro|cedure t|
|000003b0| 6f 20 63 6f 6d 70 69 6c | 65 20 74 68 69 73 20 70 |o compil|e this p|
|000003c0| 72 6f 67 72 61 6d 2c 20 | 61 6e 64 0a 3e 20 63 6f |rogram, |and.> co|
|000003d0| 6d 6d 65 6e 74 20 6f 6e | 20 69 66 20 61 6e 79 74 |mment on| if anyt|
|000003e0| 68 69 6e 67 20 65 6c 73 | 65 20 69 73 20 6e 65 65 |hing els|e is nee|
|000003f0| 64 20 74 6f 20 63 6f 6d | 70 69 6c 65 20 78 73 63 |d to com|pile xsc|
|00000400| 68 65 6d 65 2e 20 49 20 | 6b 6e 6f 77 20 74 68 61 |heme. I |know tha|
|00000410| 74 20 79 6f 75 20 0a 3e | 20 6e 65 65 64 20 73 6f |t you .>| need so|
|00000420| 6d 65 20 72 65 73 6f 75 | 72 63 65 20 74 6f 20 63 |me resou|rce to c|
|00000430| 6f 6d 70 69 6c 65 20 78 | 6c 69 73 70 20 6f 6e 20 |ompile x|lisp on |
|00000440| 61 20 6d 61 63 2e 20 44 | 6f 20 79 6f 75 20 6e 65 |a mac. D|o you ne|
|00000450| 65 64 20 74 68 65 20 73 | 61 6d 65 20 73 6f 72 74 |ed the s|ame sort|
|00000460| 20 6f 66 20 0a 3e 20 73 | 74 75 66 66 20 66 6f 72 | of .> s|tuff for|
|00000470| 20 78 73 63 68 65 6d 65 | 0a 3e 20 54 68 61 6e 6b | xscheme|.> Thank|
|00000480| 73 20 69 6e 20 61 64 76 | 61 6e 63 65 0a 3e 20 50 |s in adv|ance.> P|
|00000490| 61 75 6c 20 50 75 67 6c | 69 61 0a 3e 20 44 65 70 |aul Pugl|ia.> Dep|
|000004a0| 74 20 6f 66 20 43 69 76 | 69 6c 20 45 6e 67 69 6e |t of Civ|il Engin|
|000004b0| 65 65 72 69 6e 67 20 0a | 3e 20 43 6f 6c 75 6d 62 |eering .|> Columb|
|000004c0| 69 61 20 55 6e 69 76 65 | 72 73 69 74 79 0a 0a 0a |ia Unive|rsity...|
|000004d0| 0a 50 6f 72 74 69 6e 67 | 20 58 6c 69 73 70 2f 58 |.Porting| Xlisp/X|
|000004e0| 53 63 68 65 6d 65 3a 0a | 0a 41 77 68 69 6c 65 20 |Scheme:.|.Awhile |
|000004f0| 62 61 63 6b 2c 20 77 68 | 69 6c 65 20 49 20 77 61 |back, wh|ile I wa|
|00000500| 73 20 74 61 6b 69 6e 67 | 20 61 6e 20 41 49 20 63 |s taking| an AI c|
|00000510| 6f 75 72 73 65 2c 20 49 | 20 77 61 73 20 73 70 65 |ourse, I| was spe|
|00000520| 6e 64 69 6e 67 20 61 20 | 6c 6f 74 20 6f 66 20 74 |nding a |lot of t|
|00000530| 69 6d 65 0a 74 72 65 6b | 6b 69 6e 67 20 74 6f 20 |ime.trek|king to |
|00000540| 63 61 6d 70 75 73 20 61 | 6e 64 20 75 73 69 6e 67 |campus a|nd using|
|00000550| 20 74 68 65 69 72 20 4c | 49 53 50 20 73 79 73 74 | their L|ISP syst|
|00000560| 65 6d 2e 20 20 54 6f 20 | 61 76 6f 69 64 20 74 72 |em. To |avoid tr|
|00000570| 61 76 65 6c 20 74 69 6d | 65 20 28 61 6e 64 0a 74 |avel tim|e (and.t|
|00000580| 6f 20 77 6f 72 6b 20 6f | 6e 20 4c 49 53 50 20 61 |o work o|n LISP a|
|00000590| 74 20 61 6e 79 20 68 6f | 75 72 20 49 20 77 61 6e |t any ho|ur I wan|
|000005a0| 74 65 64 29 2c 20 49 20 | 67 6f 74 20 69 6e 74 6f |ted), I |got into|
|000005b0| 20 70 6f 72 74 69 6e 67 | 20 58 4c 69 73 70 2e 20 | porting| XLisp. |
|000005c0| 49 6e 20 6c 6f 6f 6b 69 | 6e 67 20 61 74 20 0a 74 |In looki|ng at .t|
|000005d0| 68 65 20 63 6f 64 65 2c | 20 49 27 64 20 73 61 79 |he code,| I'd say|
|000005e0| 20 58 4c 69 73 70 20 61 | 6e 64 20 58 53 63 68 65 | XLisp a|nd XSche|
|000005f0| 6d 65 20 61 72 65 20 74 | 77 6f 20 6f 66 20 74 68 |me are t|wo of th|
|00000600| 65 20 6d 6f 73 74 20 70 | 6f 72 74 61 62 6c 65 20 |e most p|ortable |
|00000610| 43 20 70 72 6f 67 72 61 | 6d 73 0a 49 20 68 61 76 |C progra|ms.I hav|
|00000620| 65 20 65 76 65 72 20 73 | 65 65 6e 2e 20 20 4e 6f |e ever s|een. No|
|00000630| 77 2c 20 49 27 76 65 20 | 73 70 65 6e 74 20 6d 6f |w, I've |spent mo|
|00000640| 73 74 20 6f 66 20 6d 79 | 20 74 69 6d 65 20 6f 6e |st of my| time on|
|00000650| 20 58 4c 69 73 70 2c 20 | 73 6f 20 79 6f 75 72 0a | XLisp, |so your.|
|00000660| 6d 69 6c 65 61 67 65 20 | 6d 61 79 20 76 61 72 79 |mileage |may vary|
|00000670| 2c 20 62 75 74 2e 2e 2e | 0a 0a 58 4c 69 73 70 20 |, but...|..XLisp |
|00000680| 73 65 65 6d 73 20 74 6f | 20 70 6c 61 63 65 20 6d |seems to| place m|
|00000690| 6f 73 74 20 4f 70 65 72 | 61 74 69 6e 67 20 53 79 |ost Oper|ating Sy|
|000006a0| 73 74 65 6d 20 28 4f 53 | 29 2d 64 65 70 65 6e 64 |stem (OS|)-depend|
|000006b0| 65 6e 74 20 66 65 61 74 | 75 72 65 73 20 69 6e 20 |ent feat|ures in |
|000006c0| 0a 73 65 70 61 72 61 74 | 65 20 66 69 6c 65 73 2c |.separat|e files,|
|000006d0| 20 6e 61 6d 65 64 20 64 | 6f 73 73 74 75 66 66 2e | named d|osstuff.|
|000006e0| 63 2c 20 6f 73 70 74 72 | 73 2e 68 2c 20 6f 73 64 |c, osptr|s.h, osd|
|000006f0| 65 66 73 2e 68 2e 20 20 | 4f 6e 20 55 4e 49 58 2c |efs.h. |On UNIX,|
|00000700| 20 74 68 65 20 22 73 74 | 75 66 66 3a 0a 66 69 6c | the "st|uff:.fil|
|00000710| 65 20 69 73 20 63 61 6c | 6c 65 64 20 75 6e 69 78 |e is cal|led unix|
|00000720| 73 74 75 66 2e 63 20 61 | 6e 64 20 6f 6e 20 74 68 |stuf.c a|nd on th|
|00000730| 65 20 4d 61 63 20 69 74 | 73 20 63 61 6c 6c 65 64 |e Mac it|s called|
|00000740| 20 6d 61 63 73 74 75 66 | 66 2e 63 20 28 61 6c 6c | macstuf|f.c (all|
|00000750| 20 66 69 6c 65 0a 6e 61 | 6d 65 73 20 61 72 65 20 | file.na|mes are |
|00000760| 3c 3d 20 38 20 63 68 61 | 72 73 20 66 6f 72 20 4d |<= 8 cha|rs for M|
|00000770| 53 2d 44 4f 53 29 2e 20 | 20 54 68 65 20 6d 61 63 |S-DOS). | The mac|
|00000780| 20 76 65 72 73 69 6f 6e | 20 61 6c 73 6f 20 68 61 | version| also ha|
|00000790| 73 20 61 20 72 65 73 6f | 75 72 63 65 0a 63 6f 6d |s a reso|urce.com|
|000007a0| 70 69 6c 65 72 20 66 69 | 6c 65 20 28 74 68 61 74 |piler fi|le (that|
|000007b0| 20 69 73 2c 20 61 20 66 | 69 6c 65 20 79 6f 75 20 | is, a f|ile you |
|000007c0| 72 75 6e 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |run thro|ugh the |
|000007d0| 72 65 73 6f 75 72 63 65 | 20 63 6f 6d 70 69 6c 65 |resource| compile|
|000007e0| 72 20 74 6f 0a 67 65 6e | 65 72 61 74 65 20 61 20 |r to.gen|erate a |
|000007f0| 72 65 73 6f 75 72 63 65 | 20 66 69 6c 65 29 2e 0a |resource| file)..|
|00000800| 0a 49 20 61 73 73 75 6d | 65 20 28 68 6f 70 65 29 |.I assum|e (hope)|
|00000810| 20 58 53 63 68 65 6d 65 | 20 69 73 20 73 69 6d 69 | XScheme| is simi|
|00000820| 6c 69 61 72 2e 20 20 42 | 65 6c 6f 77 2c 20 49 20 |liar. B|elow, I |
|00000830| 70 6c 61 63 65 64 20 61 | 6c 6c 20 6d 79 20 4d 61 |placed a|ll my Ma|
|00000840| 63 2d 72 65 6c 61 74 65 | 64 0a 66 69 6c 65 73 20 |c-relate|d.files |
|00000850| 66 72 6f 6d 20 58 4c 69 | 73 70 20 28 32 2e 30 2c |from XLi|sp (2.0,|
|00000860| 20 49 20 74 68 69 6e 6b | 29 2e 20 20 54 68 65 20 | I think|). The |
|00000870| 58 53 63 68 65 6d 65 20 | 73 74 75 66 66 20 73 68 |XScheme |stuff sh|
|00000880| 6f 75 6c 64 20 62 65 20 | 73 69 6d 69 6c 69 61 72 |ould be |similiar|
|00000890| 2e 0a 49 20 68 6f 70 65 | 20 74 68 65 73 65 20 68 |..I hope| these h|
|000008a0| 65 6c 70 2e 20 20 28 4e | 6f 74 65 3a 20 49 20 64 |elp. (N|ote: I d|
|000008b0| 6f 6e 27 74 20 68 61 76 | 65 20 74 68 65 20 66 75 |on't hav|e the fu|
|000008c0| 6c 6c 20 73 6f 75 72 63 | 65 73 20 61 72 6f 75 6e |ll sourc|es aroun|
|000008d0| 64 20 6e 6f 77 2c 20 6a | 75 73 74 0a 74 68 65 20 |d now, j|ust.the |
|000008e0| 4d 61 63 20 61 6e 64 20 | 55 4e 49 58 2d 73 70 65 |Mac and |UNIX-spe|
|000008f0| 63 69 66 69 63 20 66 69 | 6c 65 73 2e 29 20 20 28 |cific fi|les.) (|
|00000900| 4e 6f 74 65 32 3a 20 54 | 77 6f 20 65 78 74 72 61 |Note2: T|wo extra|
|00000910| 20 66 69 6c 65 73 2c 20 | 6d 61 63 66 75 6e 2e 63 | files, |macfun.c|
|00000920| 20 61 6e 64 0a 6d 61 63 | 69 6e 69 74 2e 63 20 61 | and.mac|init.c a|
|00000930| 72 65 20 62 65 6c 6f 77 | 2c 20 69 74 73 20 62 65 |re below|, its be|
|00000940| 65 6e 20 73 6f 20 6c 6f | 6e 67 20 74 68 61 74 20 |en so lo|ng that |
|00000950| 49 27 6d 20 6e 6f 74 20 | 73 75 72 65 20 69 66 20 |I'm not |sure if |
|00000960| 74 68 65 73 65 20 61 72 | 65 20 65 78 74 72 61 73 |these ar|e extras|
|00000970| 0a 6f 72 20 6e 65 63 65 | 73 73 61 72 79 2d 2d 53 |.or nece|ssary--S|
|00000980| 6f 72 72 79 2e 29 0a 0a | 49 27 6d 20 70 6c 61 63 |orry.)..|I'm plac|
|00000990| 69 6e 67 20 74 68 65 73 | 65 20 66 69 6c 65 73 20 |ing thes|e files |
|000009a0| 68 65 72 65 20 69 6e 20 | 68 6f 70 65 73 20 74 68 |here in |hopes th|
|000009b0| 65 79 20 63 61 6e 20 68 | 65 6c 70 20 79 6f 75 20 |ey can h|elp you |
|000009c0| 77 69 74 68 20 79 6f 75 | 72 20 70 6f 72 74 69 6e |with you|r portin|
|000009d0| 67 2e 20 20 49 0a 64 6f | 20 6b 6e 6f 77 20 74 68 |g. I.do| know th|
|000009e0| 61 74 20 62 69 6e 61 72 | 79 20 65 78 65 63 75 74 |at binar|y execut|
|000009f0| 61 62 6c 65 20 76 65 72 | 73 69 6f 6e 73 20 6f 66 |able ver|sions of|
|00000a00| 20 58 53 63 68 65 6d 65 | 20 61 72 65 20 61 76 61 | XScheme| are ava|
|00000a10| 69 6c 61 62 6c 65 20 6f | 6e 20 74 68 65 0a 42 49 |ilable o|n the.BI|
|00000a20| 58 20 62 75 6c 6c 65 74 | 69 6e 20 62 6f 61 72 64 |X bullet|in board|
|00000a30| 20 28 42 79 74 65 20 6d | 61 67 61 7a 69 6e 65 20 | (Byte m|agazine |
|00000a40| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 65 58 63 68 |Informat|ion eXch|
|00000a50| 61 6e 67 65 29 2d 2d 73 | 65 65 20 42 79 74 65 20 |ange)--s|ee Byte |
|00000a60| 6d 61 67 0a 66 6f 72 20 | 64 65 74 61 69 6c 73 2e |mag.for |details.|
|00000a70| 20 20 47 65 74 74 69 6e | 67 20 74 68 65 20 62 69 | Gettin|g the bi|
|00000a80| 6e 61 72 69 65 73 20 77 | 6f 75 6c 64 20 73 6f 6c |naries w|ould sol|
|00000a90| 76 65 20 61 6c 6c 20 74 | 68 65 20 4d 61 63 20 70 |ve all t|he Mac p|
|00000aa0| 6f 72 74 69 6e 67 0a 70 | 72 6f 62 6c 65 6d 73 20 |orting.p|roblems |
|00000ab0| 69 6e 20 6f 6e 65 20 66 | 65 6c 6c 20 73 77 6f 6f |in one f|ell swoo|
|00000ac0| 70 2e 0a 0a 41 6e 79 77 | 61 79 2c 20 68 6f 70 65 |p...Anyw|ay, hope|
|00000ad0| 20 74 68 69 73 20 68 65 | 6c 70 73 2c 0a 2d 45 72 | this he|lps,.-Er|
|00000ae0| 69 63 0a 0a 0a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ic...===|========|
|00000af0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 20 6d 61 |========|===== ma|
|00000b00| 63 66 75 6e 2e 63 20 3d | 3d 3d 3d 3d 3d 3d 3d 3d |cfun.c =|========|
|00000b10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000b20| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000b30| 3d 3d 3d 3d 0a 0a 2f 2a | 20 6d 61 63 66 75 6e 2e |====../*| macfun.|
|00000b40| 63 20 2d 20 6d 61 63 69 | 6e 74 6f 73 68 20 75 73 |c - maci|ntosh us|
|00000b50| 65 72 20 69 6e 74 65 72 | 66 61 63 65 20 66 75 6e |er inter|face fun|
|00000b60| 63 74 69 6f 6e 73 20 66 | 6f 72 20 78 6c 69 73 70 |ctions f|or xlisp|
|00000b70| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 3c 51 | */..#in|clude <Q|
|00000b80| 75 69 63 6b 64 72 61 77 | 2e 68 3e 0a 23 69 6e 63 |uickdraw|.h>.#inc|
|00000b90| 6c 75 64 65 20 3c 57 69 | 6e 64 6f 77 4d 67 72 2e |lude <Wi|ndowMgr.|
|00000ba0| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 4d 65 6d |h>.#incl|ude <Mem|
|00000bb0| 6f 72 79 4d 67 72 2e 68 | 3e 0a 23 69 6e 63 6c 75 |oryMgr.h|>.#inclu|
|00000bc0| 64 65 20 22 78 6c 69 73 | 70 2e 68 22 0a 0a 2f 2a |de "xlis|p.h"../*|
|00000bd0| 20 65 78 74 65 72 6e 61 | 6c 20 76 61 72 69 61 62 | externa|l variab|
|00000be0| 6c 65 73 20 2a 2f 0a 65 | 78 74 65 72 6e 20 47 72 |les */.e|xtern Gr|
|00000bf0| 61 66 50 74 72 20 63 77 | 69 6e 64 6f 77 2c 67 77 |afPtr cw|indow,gw|
|00000c00| 69 6e 64 6f 77 3b 0a 0a | 2f 2a 20 66 6f 72 77 61 |indow;..|/* forwa|
|00000c10| 72 64 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 20 |rd decla|rations |
|00000c20| 2a 2f 0a 46 4f 52 57 41 | 52 44 20 4c 56 41 4c 20 |*/.FORWA|RD LVAL |
|00000c30| 64 6f 5f 30 28 29 3b 0a | 46 4f 52 57 41 52 44 20 |do_0();.|FORWARD |
|00000c40| 4c 56 41 4c 20 64 6f 5f | 31 28 29 3b 0a 46 4f 52 |LVAL do_|1();.FOR|
|00000c50| 57 41 52 44 20 4c 56 41 | 4c 20 64 6f 5f 32 28 29 |WARD LVA|L do_2()|
|00000c60| 3b 0a 0a 2f 2a 20 78 70 | 74 73 69 7a 65 20 2d 20 |;../* xp|tsize - |
|00000c70| 73 65 74 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |set the |command |
|00000c80| 77 69 6e 64 6f 77 20 70 | 6f 69 6e 74 20 73 69 7a |window p|oint siz|
|00000c90| 65 20 2a 2f 0a 4c 56 41 | 4c 20 78 70 74 73 69 7a |e */.LVA|L xptsiz|
|00000ca0| 65 28 29 0a 7b 0a 20 20 | 20 20 4c 56 41 4c 20 76 |e().{. | LVAL v|
|00000cb0| 61 6c 3b 0a 20 20 20 20 | 76 61 6c 20 3d 20 78 6c |al;. |val = xl|
|00000cc0| 67 61 66 69 78 6e 75 6d | 28 29 3b 0a 20 20 20 20 |gafixnum|();. |
|00000cd0| 78 6c 6c 61 73 74 61 72 | 67 28 29 3b 0a 20 20 20 |xllastar|g();. |
|00000ce0| 20 54 65 78 74 53 69 7a | 65 28 28 69 6e 74 29 67 | TextSiz|e((int)g|
|00000cf0| 65 74 66 69 78 6e 75 6d | 28 76 61 6c 29 29 3b 0a |etfixnum|(val));.|
|00000d00| 20 20 20 20 49 6e 76 61 | 6c 52 65 63 74 28 26 63 | Inva|lRect(&c|
|00000d10| 77 69 6e 64 6f 77 2d 3e | 70 6f 72 74 52 65 63 74 |window->|portRect|
|00000d20| 29 3b 0a 20 20 20 20 53 | 65 74 75 70 53 63 72 65 |);. S|etupScre|
|00000d30| 65 6e 28 29 3b 0a 20 20 | 20 20 72 65 74 75 72 6e |en();. | return|
|00000d40| 20 28 4e 49 4c 29 3b 0a | 7d 0a 0a 2f 2a 20 78 68 | (NIL);.|}../* xh|
|00000d50| 69 64 65 70 65 6e 20 2d | 20 68 69 64 65 20 74 68 |idepen -| hide th|
|00000d60| 65 20 70 65 6e 20 2a 2f | 0a 4c 56 41 4c 20 78 68 |e pen */|.LVAL xh|
|00000d70| 69 64 65 70 65 6e 28 29 | 0a 7b 0a 20 20 20 20 72 |idepen()|.{. r|
|00000d80| 65 74 75 72 6e 20 28 64 | 6f 5f 30 28 27 48 27 29 |eturn (d|o_0('H')|
|00000d90| 29 3b 0a 7d 0a 0a 2f 2a | 20 78 73 68 6f 77 70 65 |);.}../*| xshowpe|
|00000da0| 6e 20 2d 20 73 68 6f 77 | 20 74 68 65 20 70 65 6e |n - show| the pen|
|00000db0| 20 2a 2f 0a 4c 56 41 4c | 20 78 73 68 6f 77 70 65 | */.LVAL| xshowpe|
|00000dc0| 6e 28 29 0a 7b 0a 20 20 | 20 20 72 65 74 75 72 6e |n().{. | return|
|00000dd0| 20 28 64 6f 5f 30 28 27 | 53 27 29 29 3b 0a 7d 0a | (do_0('|S'));.}.|
|00000de0| 0a 2f 2a 20 78 67 65 74 | 70 65 6e 20 2d 20 67 65 |./* xget|pen - ge|
|00000df0| 74 20 74 68 65 20 70 65 | 6e 20 70 6f 73 69 74 69 |t the pe|n positi|
|00000e00| 6f 6e 20 2a 2f 0a 4c 56 | 41 4c 20 78 67 65 74 70 |on */.LV|AL xgetp|
|00000e10| 65 6e 28 29 0a 7b 0a 20 | 20 20 20 4c 56 41 4c 20 |en().{. | LVAL |
|00000e20| 76 61 6c 3b 0a 20 20 20 | 20 50 6f 69 6e 74 20 70 |val;. | Point p|
|00000e30| 3b 0a 20 20 20 20 78 6c | 6c 61 73 74 61 72 67 28 |;. xl|lastarg(|
|00000e40| 29 3b 0a 20 20 20 20 53 | 65 74 50 6f 72 74 28 67 |);. S|etPort(g|
|00000e50| 77 69 6e 64 6f 77 29 3b | 0a 20 20 20 20 47 65 74 |window);|. Get|
|00000e60| 50 65 6e 28 26 70 29 3b | 0a 20 20 20 20 53 65 74 |Pen(&p);|. Set|
|00000e70| 50 6f 72 74 28 63 77 69 | 6e 64 6f 77 29 3b 0a 20 |Port(cwi|ndow);. |
|00000e80| 20 20 20 78 6c 73 61 76 | 65 31 28 76 61 6c 29 3b | xlsav|e1(val);|
|00000e90| 0a 20 20 20 20 76 61 6c | 20 3d 20 63 6f 6e 73 61 |. val| = consa|
|00000ea0| 28 4e 49 4c 29 3b 0a 20 | 20 20 20 72 70 6c 61 63 |(NIL);. | rplac|
|00000eb0| 61 28 76 61 6c 2c 63 76 | 66 69 78 6e 75 6d 28 28 |a(val,cv|fixnum((|
|00000ec0| 46 49 58 54 59 50 45 29 | 70 2e 68 29 29 3b 0a 20 |FIXTYPE)|p.h));. |
|00000ed0| 20 20 20 72 70 6c 61 63 | 64 28 76 61 6c 2c 63 76 | rplac|d(val,cv|
|00000ee0| 66 69 78 6e 75 6d 28 28 | 46 49 58 54 59 50 45 29 |fixnum((|FIXTYPE)|
|00000ef0| 70 2e 76 29 29 3b 0a 20 | 20 20 20 78 6c 70 6f 70 |p.v));. | xlpop|
|00000f00| 28 29 3b 0a 20 20 20 20 | 72 65 74 75 72 6e 20 28 |();. |return (|
|00000f10| 76 61 6c 29 3b 0a 7d 0a | 0a 2f 2a 20 78 70 65 6e |val);.}.|./* xpen|
|00000f20| 6d 6f 64 65 20 2d 20 73 | 65 74 20 74 68 65 20 70 |mode - s|et the p|
|00000f30| 65 6e 20 6d 6f 64 65 20 | 2a 2f 0a 4c 56 41 4c 20 |en mode |*/.LVAL |
|00000f40| 78 70 65 6e 6d 6f 64 65 | 28 29 0a 7b 0a 20 20 20 |xpenmode|().{. |
|00000f50| 20 72 65 74 75 72 6e 20 | 28 64 6f 5f 31 28 27 4d | return |(do_1('M|
|00000f60| 27 29 29 3b 0a 7d 0a 0a | 2f 2a 20 78 70 65 6e 73 |'));.}..|/* xpens|
|00000f70| 69 7a 65 20 2d 20 73 65 | 74 20 74 68 65 20 70 65 |ize - se|t the pe|
|00000f80| 6e 20 73 69 7a 65 20 2a | 2f 0a 4c 56 41 4c 20 78 |n size *|/.LVAL x|
|00000f90| 70 65 6e 73 69 7a 65 28 | 29 0a 7b 0a 20 20 20 20 |pensize(|).{. |
|00000fa0| 72 65 74 75 72 6e 20 28 | 64 6f 5f 32 28 27 53 27 |return (|do_2('S'|
|00000fb0| 29 29 3b 0a 7d 0a 0a 2f | 2a 20 78 70 65 6e 70 61 |));.}../|* xpenpa|
|00000fc0| 74 20 2d 20 73 65 74 20 | 74 68 65 20 70 65 6e 20 |t - set |the pen |
|00000fd0| 70 61 74 74 65 72 6e 20 | 2a 2f 0a 4c 56 41 4c 20 |pattern |*/.LVAL |
|00000fe0| 78 70 65 6e 70 61 74 28 | 29 0a 7b 0a 20 20 20 20 |xpenpat(|).{. |
|00000ff0| 4c 56 41 4c 20 70 6c 69 | 73 74 3b 0a 20 20 20 20 |LVAL pli|st;. |
|00001000| 63 68 61 72 20 70 61 74 | 5b 38 5d 2c 69 3b 0a 20 |char pat|[8],i;. |
|00001010| 20 20 20 70 6c 69 73 74 | 20 3d 20 78 6c 67 61 6c | plist| = xlgal|
|00001020| 69 73 74 28 29 3b 0a 20 | 20 20 20 78 6c 6c 61 73 |ist();. | xllas|
|00001030| 74 61 72 67 28 29 3b 0a | 20 20 20 20 66 6f 72 20 |targ();.| for |
|00001040| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 38 20 26 26 |(i = 0; |i < 8 &&|
|00001050| 20 63 6f 6e 73 70 28 70 | 6c 69 73 74 29 3b 20 2b | consp(p|list); +|
|00001060| 2b 69 2c 20 70 6c 69 73 | 74 20 3d 20 63 64 72 28 |+i, plis|t = cdr(|
|00001070| 70 6c 69 73 74 29 29 0a | 09 69 66 20 28 66 69 78 |plist)).|.if (fix|
|00001080| 70 28 63 61 72 28 70 6c | 69 73 74 29 29 29 0a 09 |p(car(pl|ist)))..|
|00001090| 20 20 20 20 70 61 74 5b | 69 5d 20 3d 20 67 65 74 | pat[|i] = get|
|000010a0| 66 69 78 6e 75 6d 28 63 | 61 72 28 70 6c 69 73 74 |fixnum(c|ar(plist|
|000010b0| 29 29 3b 0a 20 20 20 20 | 53 65 74 50 6f 72 74 28 |));. |SetPort(|
|000010c0| 67 77 69 6e 64 6f 77 29 | 3b 0a 20 20 20 20 50 65 |gwindow)|;. Pe|
|000010d0| 6e 50 61 74 28 70 61 74 | 29 3b 0a 20 20 20 20 53 |nPat(pat|);. S|
|000010e0| 65 74 50 6f 72 74 28 63 | 77 69 6e 64 6f 77 29 3b |etPort(c|window);|
|000010f0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 4e 49 4c |. ret|urn (NIL|
|00001100| 29 3b 0a 7d 0a 0a 2f 2a | 20 78 70 65 6e 6e 6f 72 |);.}../*| xpennor|
|00001110| 6d 61 6c 20 2d 20 73 65 | 74 20 74 68 65 20 70 65 |mal - se|t the pe|
|00001120| 6e 20 74 6f 20 6e 6f 72 | 6d 61 6c 20 2a 2f 0a 4c |n to nor|mal */.L|
|00001130| 56 41 4c 20 78 70 65 6e | 6e 6f 72 6d 61 6c 28 29 |VAL xpen|normal()|
|00001140| 0a 7b 0a 20 20 20 20 78 | 6c 6c 61 73 74 61 72 67 |.{. x|llastarg|
|00001150| 28 29 3b 0a 20 20 20 20 | 53 65 74 50 6f 72 74 28 |();. |SetPort(|
|00001160| 67 77 69 6e 64 6f 77 29 | 3b 0a 20 20 20 20 50 65 |gwindow)|;. Pe|
|00001170| 6e 4e 6f 72 6d 61 6c 28 | 29 3b 0a 20 20 20 20 53 |nNormal(|);. S|
|00001180| 65 74 50 6f 72 74 28 63 | 77 69 6e 64 6f 77 29 3b |etPort(c|window);|
|00001190| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 4e 49 4c |. ret|urn (NIL|
|000011a0| 29 3b 0a 7d 0a 0a 2f 2a | 20 78 6d 6f 76 65 74 6f |);.}../*| xmoveto|
|000011b0| 20 2d 20 4d 6f 76 65 20 | 74 6f 20 61 20 73 63 72 | - Move |to a scr|
|000011c0| 65 65 6e 20 6c 6f 63 61 | 74 69 6f 6e 20 2a 2f 0a |een loca|tion */.|
|000011d0| 4c 56 41 4c 20 78 6d 6f | 76 65 74 6f 28 29 0a 7b |LVAL xmo|veto().{|
|000011e0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 64 6f 5f |. ret|urn (do_|
|000011f0| 32 28 27 6d 27 29 29 3b | 0a 7d 0a 0a 2f 2a 20 78 |2('m'));|.}../* x|
|00001200| 6d 6f 76 65 20 2d 20 4d | 6f 76 65 20 69 6e 20 61 |move - M|ove in a|
|00001210| 20 73 70 65 63 69 66 69 | 65 64 20 64 69 72 65 63 | specifi|ed direc|
|00001220| 74 69 6f 6e 20 2a 2f 0a | 4c 56 41 4c 20 78 6d 6f |tion */.|LVAL xmo|
|00001230| 76 65 28 29 0a 7b 0a 20 | 20 20 20 72 65 74 75 72 |ve().{. | retur|
|00001240| 6e 20 28 64 6f 5f 32 28 | 27 4d 27 29 29 3b 0a 7d |n (do_2(|'M'));.}|
|00001250| 0a 0a 2f 2a 20 78 6c 69 | 6e 65 74 6f 20 2d 20 64 |../* xli|neto - d|
|00001260| 72 61 77 20 61 20 4c 69 | 6e 65 20 74 6f 20 61 20 |raw a Li|ne to a |
|00001270| 73 63 72 65 65 6e 20 6c | 6f 63 61 74 69 6f 6e 20 |screen l|ocation |
|00001280| 2a 2f 0a 4c 56 41 4c 20 | 78 6c 69 6e 65 74 6f 28 |*/.LVAL |xlineto(|
|00001290| 29 0a 7b 0a 20 20 20 20 | 72 65 74 75 72 6e 20 28 |).{. |return (|
|000012a0| 64 6f 5f 32 28 27 6c 27 | 29 29 3b 0a 7d 0a 0a 2f |do_2('l'|));.}../|
|000012b0| 2a 20 78 6c 69 6e 65 20 | 2d 20 64 72 61 77 20 61 |* xline |- draw a|
|000012c0| 20 4c 69 6e 65 20 69 6e | 20 61 20 73 70 65 63 69 | Line in| a speci|
|000012d0| 66 69 65 64 20 64 69 72 | 65 63 74 69 6f 6e 20 2a |fied dir|ection *|
|000012e0| 2f 0a 4c 56 41 4c 20 78 | 6c 69 6e 65 28 29 0a 7b |/.LVAL x|line().{|
|000012f0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 64 6f 5f |. ret|urn (do_|
|00001300| 32 28 27 4c 27 29 29 3b | 0a 7d 0a 0a 2f 2a 20 78 |2('L'));|.}../* x|
|00001310| 73 68 6f 77 67 72 61 70 | 68 69 63 73 20 2d 20 73 |showgrap|hics - s|
|00001320| 68 6f 77 20 74 68 65 20 | 67 72 61 70 68 69 63 73 |how the |graphics|
|00001330| 20 77 69 6e 64 6f 77 20 | 2a 2f 0a 4c 56 41 4c 20 | window |*/.LVAL |
|00001340| 78 73 68 6f 77 67 72 61 | 70 68 69 63 73 28 29 0a |xshowgra|phics().|
|00001350| 7b 0a 20 20 20 20 78 6c | 6c 61 73 74 61 72 67 28 |{. xl|lastarg(|
|00001360| 29 3b 0a 20 20 20 20 73 | 63 72 73 70 6c 69 74 28 |);. s|crsplit(|
|00001370| 31 29 3b 0a 20 20 20 20 | 72 65 74 75 72 6e 20 28 |1);. |return (|
|00001380| 4e 49 4c 29 3b 0a 7d 0a | 0a 2f 2a 20 78 68 69 64 |NIL);.}.|./* xhid|
|00001390| 65 67 72 61 70 68 69 63 | 73 20 2d 20 68 69 64 65 |egraphic|s - hide|
|000013a0| 20 74 68 65 20 67 72 61 | 70 68 69 63 73 20 77 69 | the gra|phics wi|
|000013b0| 6e 64 6f 77 20 2a 2f 0a | 4c 56 41 4c 20 78 68 69 |ndow */.|LVAL xhi|
|000013c0| 64 65 67 72 61 70 68 69 | 63 73 28 29 0a 7b 0a 20 |degraphi|cs().{. |
|000013d0| 20 20 20 78 6c 6c 61 73 | 74 61 72 67 28 29 3b 0a | xllas|targ();.|
|000013e0| 20 20 20 20 73 63 72 73 | 70 6c 69 74 28 30 29 3b | scrs|plit(0);|
|000013f0| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 4e 49 4c |. ret|urn (NIL|
|00001400| 29 3b 0a 7d 0a 0a 2f 2a | 20 78 63 6c 65 61 72 67 |);.}../*| xclearg|
|00001410| 72 61 70 68 69 63 73 20 | 2d 20 63 6c 65 61 72 20 |raphics |- clear |
|00001420| 74 68 65 20 67 72 61 70 | 68 69 63 73 20 77 69 6e |the grap|hics win|
|00001430| 64 6f 77 20 2a 2f 0a 4c | 56 41 4c 20 78 63 6c 65 |dow */.L|VAL xcle|
|00001440| 61 72 67 72 61 70 68 69 | 63 73 28 29 0a 7b 0a 20 |argraphi|cs().{. |
|00001450| 20 20 20 78 6c 6c 61 73 | 74 61 72 67 28 29 3b 0a | xllas|targ();.|
|00001460| 20 20 20 20 53 65 74 50 | 6f 72 74 28 67 77 69 6e | SetP|ort(gwin|
|00001470| 64 6f 77 29 3b 0a 20 20 | 20 20 45 72 61 73 65 52 |dow);. | EraseR|
|00001480| 65 63 74 28 26 67 77 69 | 6e 64 6f 77 2d 3e 70 6f |ect(&gwi|ndow->po|
|00001490| 72 74 52 65 63 74 29 3b | 0a 20 20 20 20 53 65 74 |rtRect);|. Set|
|000014a0| 50 6f 72 74 28 63 77 69 | 6e 64 6f 77 29 3b 0a 20 |Port(cwi|ndow);. |
|000014b0| 20 20 20 72 65 74 75 72 | 6e 20 28 4e 49 4c 29 3b | retur|n (NIL);|
|000014c0| 0a 7d 0a 0a 2f 2a 20 64 | 6f 5f 30 20 2d 20 48 61 |.}../* d|o_0 - Ha|
|000014d0| 6e 64 6c 65 20 63 6f 6d | 6d 61 6e 64 73 20 74 68 |ndle com|mands th|
|000014e0| 61 74 20 72 65 71 75 69 | 72 65 20 6e 6f 20 61 72 |at requi|re no ar|
|000014f0| 67 75 6d 65 6e 74 73 20 | 2a 2f 0a 4c 4f 43 41 4c |guments |*/.LOCAL|
|00001500| 20 4c 56 41 4c 20 64 6f | 5f 30 28 66 63 6e 29 0a | LVAL do|_0(fcn).|
|00001510| 20 20 69 6e 74 20 66 63 | 6e 3b 0a 7b 0a 20 20 20 | int fc|n;.{. |
|00001520| 20 78 6c 6c 61 73 74 61 | 72 67 28 29 3b 0a 20 20 | xllasta|rg();. |
|00001530| 20 20 53 65 74 50 6f 72 | 74 28 67 77 69 6e 64 6f | SetPor|t(gwindo|
|00001540| 77 29 3b 0a 20 20 20 20 | 73 77 69 74 63 68 20 28 |w);. |switch (|
|00001550| 66 63 6e 29 20 7b 0a 20 | 20 20 20 63 61 73 65 20 |fcn) {. | case |
|00001560| 27 48 27 3a 09 48 69 64 | 65 50 65 6e 28 29 3b 20 |'H':.Hid|ePen(); |
|00001570| 62 72 65 61 6b 3b 0a 20 | 20 20 20 63 61 73 65 20 |break;. | case |
|00001580| 27 53 27 3a 09 53 68 6f | 77 50 65 6e 28 29 3b 20 |'S':.Sho|wPen(); |
|00001590| 62 72 65 61 6b 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |break;. | }. |
|000015a0| 20 53 65 74 50 6f 72 74 | 28 63 77 69 6e 64 6f 77 | SetPort|(cwindow|
|000015b0| 29 3b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 28 4e |);. r|eturn (N|
|000015c0| 49 4c 29 3b 0a 7d 0a 0a | 2f 2a 20 64 6f 5f 31 20 |IL);.}..|/* do_1 |
|000015d0| 2d 20 48 61 6e 64 6c 65 | 20 63 6f 6d 6d 61 6e 64 |- Handle| command|
|000015e0| 73 20 74 68 61 74 20 72 | 65 71 75 69 72 65 20 6f |s that r|equire o|
|000015f0| 6e 65 20 69 6e 74 65 67 | 65 72 20 61 72 67 75 6d |ne integ|er argum|
|00001600| 65 6e 74 20 2a 2f 0a 4c | 4f 43 41 4c 20 4c 56 41 |ent */.L|OCAL LVA|
|00001610| 4c 20 64 6f 5f 31 28 66 | 63 6e 29 0a 20 20 69 6e |L do_1(f|cn). in|
|00001620| 74 20 66 63 6e 3b 0a 7b | 0a 20 20 20 20 69 6e 74 |t fcn;.{|. int|
|00001630| 20 78 3b 0a 20 20 20 20 | 78 20 3d 20 67 65 74 6e | x;. |x = getn|
|00001640| 75 6d 62 65 72 28 29 3b | 0a 20 20 20 20 78 6c 6c |umber();|. xll|
|00001650| 61 73 74 61 72 67 28 29 | 3b 0a 20 20 20 20 53 65 |astarg()|;. Se|
|00001660| 74 50 6f 72 74 28 67 77 | 69 6e 64 6f 77 29 3b 0a |tPort(gw|indow);.|
|00001670| 20 20 20 20 73 77 69 74 | 63 68 20 28 66 63 6e 29 | swit|ch (fcn)|
|00001680| 20 7b 0a 20 20 20 20 63 | 61 73 65 20 27 4d 27 3a | {. c|ase 'M':|
|00001690| 09 50 65 6e 4d 6f 64 65 | 28 78 29 3b 20 62 72 65 |.PenMode|(x); bre|
|000016a0| 61 6b 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 53 65 |ak;. |}. Se|
|000016b0| 74 50 6f 72 74 28 63 77 | 69 6e 64 6f 77 29 3b 0a |tPort(cw|indow);.|
|000016c0| 20 20 20 20 72 65 74 75 | 72 6e 20 28 4e 49 4c 29 | retu|rn (NIL)|
|000016d0| 3b 0a 7d 0a 0a 2f 2a 20 | 64 6f 5f 32 20 2d 20 48 |;.}../* |do_2 - H|
|000016e0| 61 6e 64 6c 65 20 63 6f | 6d 6d 61 6e 64 73 20 74 |andle co|mmands t|
|000016f0| 68 61 74 20 72 65 71 75 | 69 72 65 20 74 77 6f 20 |hat requ|ire two |
|00001700| 69 6e 74 65 67 65 72 20 | 61 72 67 75 6d 65 6e 74 |integer |argument|
|00001710| 73 20 2a 2f 0a 4c 4f 43 | 41 4c 20 4c 56 41 4c 20 |s */.LOC|AL LVAL |
|00001720| 64 6f 5f 32 28 66 63 6e | 29 0a 20 20 69 6e 74 20 |do_2(fcn|). int |
|00001730| 66 63 6e 3b 0a 7b 0a 20 | 20 20 20 69 6e 74 20 68 |fcn;.{. | int h|
|00001740| 2c 76 3b 0a 20 20 20 20 | 68 20 3d 20 67 65 74 6e |,v;. |h = getn|
|00001750| 75 6d 62 65 72 28 29 3b | 0a 20 20 20 20 76 20 3d |umber();|. v =|
|00001760| 20 67 65 74 6e 75 6d 62 | 65 72 28 29 3b 0a 20 20 | getnumb|er();. |
|00001770| 20 20 78 6c 6c 61 73 74 | 61 72 67 28 29 3b 0a 20 | xllast|arg();. |
|00001780| 20 20 20 53 65 74 50 6f | 72 74 28 67 77 69 6e 64 | SetPo|rt(gwind|
|00001790| 6f 77 29 3b 0a 20 20 20 | 20 73 77 69 74 63 68 20 |ow);. | switch |
|000017a0| 28 66 63 6e 29 20 7b 0a | 20 20 20 20 63 61 73 65 |(fcn) {.| case|
|000017b0| 20 27 6c 27 3a 09 4c 69 | 6e 65 54 6f 28 68 2c 76 | 'l':.Li|neTo(h,v|
|000017c0| 29 3b 20 62 72 65 61 6b | 3b 0a 20 20 20 20 63 61 |); break|;. ca|
|000017d0| 73 65 20 27 4c 27 3a 09 | 4c 69 6e 65 28 68 2c 76 |se 'L':.|Line(h,v|
|000017e0| 29 3b 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 |); bre|ak;. |
|000017f0| 63 61 73 65 20 27 6d 27 | 3a 20 20 20 4d 6f 76 65 |case 'm'|: Move|
|00001800| 54 6f 28 68 2c 76 29 3b | 20 62 72 65 61 6b 3b 0a |To(h,v);| break;.|
|00001810| 20 20 20 20 63 61 73 65 | 20 27 4d 27 3a 09 4d 6f | case| 'M':.Mo|
|00001820| 76 65 28 68 2c 76 29 3b | 20 20 20 62 72 65 61 6b |ve(h,v);| break|
|00001830| 3b 0a 20 20 20 20 63 61 | 73 65 20 27 53 27 3a 09 |;. ca|se 'S':.|
|00001840| 50 65 6e 53 69 7a 65 28 | 68 2c 76 29 3b 62 72 65 |PenSize(|h,v);bre|
|00001850| 61 6b 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 53 65 |ak;. |}. Se|
|00001860| 74 50 6f 72 74 28 63 77 | 69 6e 64 6f 77 29 3b 0a |tPort(cw|indow);.|
|00001870| 20 20 20 20 72 65 74 75 | 72 6e 20 28 4e 49 4c 29 | retu|rn (NIL)|
|00001880| 3b 0a 7d 0a 0a 2f 2a 20 | 67 65 74 6e 75 6d 62 65 |;.}../* |getnumbe|
|00001890| 72 20 2d 20 67 65 74 20 | 61 6e 20 69 6e 74 65 67 |r - get |an integ|
|000018a0| 65 72 20 70 61 72 61 6d | 65 74 65 72 20 2a 2f 0a |er param|eter */.|
|000018b0| 4c 4f 43 41 4c 20 69 6e | 74 20 67 65 74 6e 75 6d |LOCAL in|t getnum|
|000018c0| 62 65 72 28 29 0a 7b 0a | 20 20 20 20 4c 56 41 4c |ber().{.| LVAL|
|000018d0| 20 6e 75 6d 3b 0a 20 20 | 20 20 6e 75 6d 20 3d 20 | num;. | num = |
|000018e0| 78 6c 67 61 66 69 78 6e | 75 6d 28 29 3b 0a 20 20 |xlgafixn|um();. |
|000018f0| 20 20 72 65 74 75 72 6e | 20 28 28 69 6e 74 29 67 | return| ((int)g|
|00001900| 65 74 66 69 78 6e 75 6d | 28 6e 75 6d 29 29 3b 0a |etfixnum|(num));.|
|00001910| 7d 0a 0a 2f 2a 20 78 74 | 6f 6f 6c 20 2d 20 63 61 |}../* xt|ool - ca|
|00001920| 6c 6c 20 74 68 65 20 74 | 6f 6f 6c 62 6f 78 20 2a |ll the t|oolbox *|
|00001930| 2f 0a 4c 56 41 4c 20 78 | 74 6f 6f 6c 28 29 0a 7b |/.LVAL x|tool().{|
|00001940| 0a 20 20 20 20 4c 56 41 | 4c 20 76 61 6c 3b 0a 20 |. LVA|L val;. |
|00001950| 20 20 20 69 6e 74 20 74 | 72 61 70 3b 0a 0a 20 20 | int t|rap;.. |
|00001960| 20 20 74 72 61 70 20 3d | 20 67 65 74 6e 75 6d 62 | trap =| getnumb|
|00001970| 65 72 28 29 3b 0a 2f 2a | 0a 0a 20 20 20 20 61 73 |er();./*|.. as|
|00001980| 6d 20 7b 0a 09 6d 6f 76 | 65 2e 6c 09 61 72 67 73 |m {..mov|e.l.args|
|00001990| 28 41 36 29 2c 44 30 0a | 09 62 65 71 09 4c 32 0a |(A6),D0.|.beq.L2.|
|000019a0| 4c 31 3a 09 6d 6f 76 65 | 2e 6c 09 44 30 2c 41 30 |L1:.move|.l.D0,A0|
|000019b0| 0a 09 6d 6f 76 65 2e 6c | 09 32 28 41 30 29 2c 41 |..move.l|.2(A0),A|
|000019c0| 31 0a 09 6d 6f 76 65 2e | 77 09 34 28 41 31 29 2c |1..move.|w.4(A1),|
|000019d0| 2d 28 41 37 29 0a 09 6d | 6f 76 65 2e 6c 09 36 28 |-(A7)..m|ove.l.6(|
|000019e0| 41 30 29 2c 44 30 0a 09 | 62 6e 65 09 4c 31 0a 4c |A0),D0..|bne.L1.L|
|000019f0| 32 3a 09 6c 65 61 09 4c | 33 2c 41 30 0a 09 6d 6f |2:.lea.L|3,A0..mo|
|00001a00| 76 65 2e 77 09 74 72 61 | 70 28 41 36 29 2c 28 41 |ve.w.tra|p(A6),(A|
|00001a10| 30 29 0a 4c 33 3a 09 64 | 63 2e 77 09 30 78 41 30 |0).L3:.d|c.w.0xA0|
|00001a20| 30 30 0a 09 63 6c 72 2e | 6c 09 76 61 6c 28 41 36 |00..clr.|l.val(A6|
|00001a30| 29 0a 20 20 20 20 7d 0a | 2a 2f 0a 0a 20 20 20 20 |). }.|*/.. |
|00001a40| 72 65 74 75 72 6e 20 28 | 76 61 6c 29 3b 0a 7d 0a |return (|val);.}.|
|00001a50| 0a 2f 2a 20 78 74 6f 6f | 6c 31 36 20 2d 20 63 61 |./* xtoo|l16 - ca|
|00001a60| 6c 6c 20 74 68 65 20 74 | 6f 6f 6c 62 6f 78 20 77 |ll the t|oolbox w|
|00001a70| 69 74 68 20 61 20 31 36 | 20 62 69 74 20 72 65 73 |ith a 16| bit res|
|00001a80| 75 6c 74 20 2a 2f 0a 4c | 56 41 4c 20 78 74 6f 6f |ult */.L|VAL xtoo|
|00001a90| 6c 31 36 28 29 0a 7b 0a | 20 20 20 20 69 6e 74 20 |l16().{.| int |
|00001aa0| 74 72 61 70 2c 76 61 6c | 3b 0a 0a 20 20 20 20 74 |trap,val|;.. t|
|00001ab0| 72 61 70 20 3d 20 67 65 | 74 6e 75 6d 62 65 72 28 |rap = ge|tnumber(|
|00001ac0| 29 3b 0a 2f 2a 0a 0a 20 | 20 20 20 61 73 6d 20 7b |);./*.. | asm {|
|00001ad0| 0a 09 63 6c 72 2e 77 09 | 2d 28 41 37 29 0a 09 6d |..clr.w.|-(A7)..m|
|00001ae0| 6f 76 65 2e 6c 09 61 72 | 67 73 28 41 36 29 2c 44 |ove.l.ar|gs(A6),D|
|00001af0| 30 0a 09 62 65 71 09 4c | 32 0a 4c 31 3a 09 6d 6f |0..beq.L|2.L1:.mo|
|00001b00| 76 65 2e 6c 09 44 30 2c | 41 30 0a 09 6d 6f 76 65 |ve.l.D0,|A0..move|
|00001b10| 2e 6c 09 32 28 41 30 29 | 2c 41 31 0a 09 6d 6f 76 |.l.2(A0)|,A1..mov|
|00001b20| 65 2e 77 09 34 28 41 31 | 29 2c 2d 28 41 37 29 0a |e.w.4(A1|),-(A7).|
|00001b30| 09 6d 6f 76 65 2e 6c 09 | 36 28 41 30 29 2c 44 30 |.move.l.|6(A0),D0|
|00001b40| 0a 09 62 6e 65 09 4c 31 | 0a 4c 32 3a 09 6c 65 61 |..bne.L1|.L2:.lea|
|00001b50| 09 4c 33 2c 41 30 0a 09 | 6d 6f 76 65 2e 77 09 74 |.L3,A0..|move.w.t|
|00001b60| 72 61 70 28 41 36 29 2c | 28 41 30 29 0a 4c 33 3a |rap(A6),|(A0).L3:|
|00001b70| 09 64 63 2e 77 09 30 78 | 41 30 30 30 0a 09 6d 6f |.dc.w.0x|A000..mo|
|00001b80| 76 65 2e 77 09 28 41 37 | 29 2b 2c 76 61 6c 28 41 |ve.w.(A7|)+,val(A|
|00001b90| 36 29 0a 20 20 20 20 7d | 0a 2a 2f 0a 0a 20 20 20 |6). }|.*/.. |
|00001ba0| 20 72 65 74 75 72 6e 20 | 28 63 76 66 69 78 6e 75 | return |(cvfixnu|
|00001bb0| 6d 28 28 46 49 58 54 59 | 50 45 29 76 61 6c 29 29 |m((FIXTY|PE)val))|
|00001bc0| 3b 0a 7d 0a 0a 2f 2a 20 | 78 74 6f 6f 6c 33 32 20 |;.}../* |xtool32 |
|00001bd0| 2d 20 63 61 6c 6c 20 74 | 68 65 20 74 6f 6f 6c 62 |- call t|he toolb|
|00001be0| 6f 78 20 77 69 74 68 20 | 61 20 33 32 20 62 69 74 |ox with |a 32 bit|
|00001bf0| 20 72 65 73 75 6c 74 20 | 2a 2f 0a 4c 56 41 4c 20 | result |*/.LVAL |
|00001c00| 78 74 6f 6f 6c 33 32 28 | 29 0a 7b 0a 20 20 20 20 |xtool32(|).{. |
|00001c10| 69 6e 74 20 74 72 61 70 | 3b 0a 20 20 20 20 6c 6f |int trap|;. lo|
|00001c20| 6e 67 20 76 61 6c 3b 0a | 0a 20 20 20 20 74 72 61 |ng val;.|. tra|
|00001c30| 70 20 3d 20 67 65 74 6e | 75 6d 62 65 72 28 29 3b |p = getn|umber();|
|00001c40| 0a 2f 2a 0a 0a 20 20 20 | 20 61 73 6d 20 7b 0a 09 |./*.. | asm {..|
|00001c50| 63 6c 72 2e 6c 09 2d 28 | 41 37 29 0a 09 6d 6f 76 |clr.l.-(|A7)..mov|
|00001c60| 65 2e 6c 09 61 72 67 73 | 28 41 36 29 2c 44 30 0a |e.l.args|(A6),D0.|
|00001c70| 09 62 65 71 09 4c 32 0a | 4c 31 3a 09 6d 6f 76 65 |.beq.L2.|L1:.move|
|00001c80| 2e 6c 09 44 30 2c 41 30 | 0a 09 6d 6f 76 65 2e 6c |.l.D0,A0|..move.l|
|00001c90| 09 32 28 41 30 29 2c 41 | 31 0a 09 6d 6f 76 65 2e |.2(A0),A|1..move.|
|00001ca0| 77 09 34 28 41 31 29 2c | 2d 28 41 37 29 0a 09 6d |w.4(A1),|-(A7)..m|
|00001cb0| 6f 76 65 2e 6c 09 36 28 | 41 30 29 2c 44 30 0a 09 |ove.l.6(|A0),D0..|
|00001cc0| 62 6e 65 09 4c 31 0a 4c | 32 3a 09 6c 65 61 09 4c |bne.L1.L|2:.lea.L|
|00001cd0| 33 2c 41 30 0a 09 6d 6f | 76 65 2e 77 09 74 72 61 |3,A0..mo|ve.w.tra|
|00001ce0| 70 28 41 36 29 2c 28 41 | 30 29 0a 4c 33 3a 09 64 |p(A6),(A|0).L3:.d|
|00001cf0| 63 2e 77 09 30 78 41 30 | 30 30 0a 09 6d 6f 76 65 |c.w.0xA0|00..move|
|00001d00| 2e 6c 09 28 41 37 29 2b | 2c 76 61 6c 28 41 36 29 |.l.(A7)+|,val(A6)|
|00001d10| 0a 20 20 20 20 7d 0a 2a | 2f 0a 0a 20 20 20 20 72 |. }.*|/.. r|
|00001d20| 65 74 75 72 6e 20 28 63 | 76 66 69 78 6e 75 6d 28 |eturn (c|vfixnum(|
|00001d30| 28 46 49 58 54 59 50 45 | 29 76 61 6c 29 29 3b 0a |(FIXTYPE|)val));.|
|00001d40| 7d 0a 0a 2f 2a 20 78 6e | 65 77 68 61 6e 64 6c 65 |}../* xn|ewhandle|
|00001d50| 20 2d 20 61 6c 6c 6f 63 | 61 74 65 20 61 20 6e 65 | - alloc|ate a ne|
|00001d60| 77 20 68 61 6e 64 6c 65 | 20 2a 2f 0a 4c 56 41 4c |w handle| */.LVAL|
|00001d70| 20 78 6e 65 77 68 61 6e | 64 6c 65 28 29 0a 7b 0a | xnewhan|dle().{.|
|00001d80| 20 20 20 20 4c 56 41 4c | 20 6e 75 6d 3b 0a 20 20 | LVAL| num;. |
|00001d90| 20 20 6c 6f 6e 67 20 73 | 69 7a 65 3b 0a 20 20 20 | long s|ize;. |
|00001da0| 20 6e 75 6d 20 3d 20 78 | 6c 67 61 66 69 78 6e 75 | num = x|lgafixnu|
|00001db0| 6d 28 29 3b 20 73 69 7a | 65 20 3d 20 67 65 74 66 |m(); siz|e = getf|
|00001dc0| 69 78 6e 75 6d 28 6e 75 | 6d 29 3b 0a 20 20 20 20 |ixnum(nu|m);. |
|00001dd0| 78 6c 6c 61 73 74 61 72 | 67 28 29 3b 0a 20 20 20 |xllastar|g();. |
|00001de0| 20 72 65 74 75 72 6e 20 | 28 63 76 66 69 78 6e 75 | return |(cvfixnu|
|00001df0| 6d 28 28 46 49 58 54 59 | 50 45 29 4e 65 77 48 61 |m((FIXTY|PE)NewHa|
|00001e00| 6e 64 6c 65 28 73 69 7a | 65 29 29 29 3b 0a 7d 0a |ndle(siz|e)));.}.|
|00001e10| 0a 2f 2a 20 78 6e 65 77 | 70 74 72 20 2d 20 61 6c |./* xnew|ptr - al|
|00001e20| 6c 6f 63 61 74 65 20 6d | 65 6d 6f 72 79 20 2a 2f |locate m|emory */|
|00001e30| 0a 4c 56 41 4c 20 78 6e | 65 77 70 74 72 28 29 0a |.LVAL xn|ewptr().|
|00001e40| 7b 0a 20 20 20 20 4c 56 | 41 4c 20 6e 75 6d 3b 0a |{. LV|AL num;.|
|00001e50| 20 20 20 20 6c 6f 6e 67 | 20 73 69 7a 65 3b 0a 20 | long| size;. |
|00001e60| 20 20 20 6e 75 6d 20 3d | 20 78 6c 67 61 66 69 78 | num =| xlgafix|
|00001e70| 6e 75 6d 28 29 3b 20 73 | 69 7a 65 20 3d 20 67 65 |num(); s|ize = ge|
|00001e80| 74 66 69 78 6e 75 6d 28 | 6e 75 6d 29 3b 0a 20 20 |tfixnum(|num);. |
|00001e90| 20 20 78 6c 6c 61 73 74 | 61 72 67 28 29 3b 0a 20 | xllast|arg();. |
|00001ea0| 20 20 20 72 65 74 75 72 | 6e 20 28 63 76 66 69 78 | retur|n (cvfix|
|00001eb0| 6e 75 6d 28 28 46 49 58 | 54 59 50 45 29 4e 65 77 |num((FIX|TYPE)New|
|00001ec0| 50 74 72 28 73 69 7a 65 | 29 29 29 3b 0a 7d 0a 20 |Ptr(size|)));.}. |
|00001ed0| 20 20 20 0a 2f 2a 20 78 | 68 69 77 6f 72 64 20 2d | ./* x|hiword -|
|00001ee0| 20 72 65 74 75 72 6e 20 | 74 68 65 20 68 69 67 68 | return |the high|
|00001ef0| 20 6f 72 64 65 72 20 31 | 36 20 62 69 74 73 20 6f | order 1|6 bits o|
|00001f00| 66 20 61 6e 20 69 6e 74 | 65 67 65 72 20 2a 2f 0a |f an int|eger */.|
|00001f10| 4c 56 41 4c 20 78 68 69 | 77 6f 72 64 28 29 0a 7b |LVAL xhi|word().{|
|00001f20| 0a 20 20 20 20 75 6e 73 | 69 67 6e 65 64 20 69 6e |. uns|igned in|
|00001f30| 74 20 76 61 6c 3b 0a 20 | 20 20 20 76 61 6c 20 3d |t val;. | val =|
|00001f40| 20 28 75 6e 73 69 67 6e | 65 64 20 69 6e 74 29 28 | (unsign|ed int)(|
|00001f50| 67 65 74 6e 75 6d 62 65 | 72 28 29 20 3e 3e 20 31 |getnumbe|r() >> 1|
|00001f60| 36 29 3b 0a 20 20 20 20 | 78 6c 6c 61 73 74 61 72 |6);. |xllastar|
|00001f70| 67 28 29 3b 0a 20 20 20 | 20 72 65 74 75 72 6e 20 |g();. | return |
|00001f80| 28 63 76 66 69 78 6e 75 | 6d 28 28 46 49 58 54 59 |(cvfixnu|m((FIXTY|
|00001f90| 50 45 29 76 61 6c 29 29 | 3b 0a 7d 0a 0a 2f 2a 20 |PE)val))|;.}../* |
|00001fa0| 78 6c 6f 77 6f 72 64 20 | 2d 20 72 65 74 75 72 6e |xloword |- return|
|00001fb0| 20 74 68 65 20 6c 6f 77 | 20 6f 72 64 65 72 20 31 | the low| order 1|
|00001fc0| 36 20 62 69 74 73 20 6f | 66 20 61 6e 20 69 6e 74 |6 bits o|f an int|
|00001fd0| 65 67 65 72 20 2a 2f 0a | 4c 56 41 4c 20 78 6c 6f |eger */.|LVAL xlo|
|00001fe0| 77 6f 72 64 28 29 0a 7b | 0a 20 20 20 20 75 6e 73 |word().{|. uns|
|00001ff0| 69 67 6e 65 64 20 69 6e | 74 20 76 61 6c 3b 0a 20 |igned in|t val;. |
|00002000| 20 20 20 76 61 6c 20 3d | 20 28 75 6e 73 69 67 6e | val =| (unsign|
|00002010| 65 64 20 69 6e 74 29 67 | 65 74 6e 75 6d 62 65 72 |ed int)g|etnumber|
|00002020| 28 29 3b 0a 20 20 20 20 | 78 6c 6c 61 73 74 61 72 |();. |xllastar|
|00002030| 67 28 29 3b 0a 20 20 20 | 20 72 65 74 75 72 6e 20 |g();. | return |
|00002040| 28 63 76 66 69 78 6e 75 | 6d 28 28 46 49 58 54 59 |(cvfixnu|m((FIXTY|
|00002050| 50 45 29 76 61 6c 29 29 | 3b 0a 7d 0a 0a 2f 2a 20 |PE)val))|;.}../* |
|00002060| 78 72 64 6e 6f 68 61 6e | 67 20 2d 20 67 65 74 20 |xrdnohan|g - get |
|00002070| 74 68 65 20 6e 65 78 74 | 20 63 68 61 72 61 63 74 |the next| charact|
|00002080| 65 72 20 69 6e 20 74 68 | 65 20 6c 6f 6f 6b 2d 61 |er in th|e look-a|
|00002090| 68 65 61 64 20 62 75 66 | 66 65 72 20 2a 2f 0a 4c |head buf|fer */.L|
|000020a0| 56 41 4c 20 78 72 64 6e | 6f 68 61 6e 67 28 29 0a |VAL xrdn|ohang().|
|000020b0| 7b 0a 20 20 20 20 69 6e | 74 20 63 68 3b 0a 20 20 |{. in|t ch;. |
|000020c0| 20 20 78 6c 6c 61 73 74 | 61 72 67 28 29 3b 0a 20 | xllast|arg();. |
|000020d0| 20 20 20 69 66 20 28 28 | 63 68 20 3d 20 73 63 72 | if ((|ch = scr|
|000020e0| 6e 65 78 74 63 28 29 29 | 20 3d 3d 20 45 4f 46 29 |nextc())| == EOF)|
|000020f0| 0a 09 72 65 74 75 72 6e | 20 28 4e 49 4c 29 3b 0a |..return| (NIL);.|
|00002100| 20 20 20 20 72 65 74 75 | 72 6e 20 28 63 76 66 69 | retu|rn (cvfi|
|00002110| 78 6e 75 6d 28 28 46 49 | 58 54 59 50 45 29 63 68 |xnum((FI|XTYPE)ch|
|00002120| 29 29 3b 0a 7d 0a 0a 2f | 2a 20 6f 73 73 79 6d 62 |));.}../|* ossymb|
|00002130| 6f 6c 73 20 2d 20 65 6e | 74 65 72 20 69 6d 70 6f |ols - en|ter impo|
|00002140| 72 74 61 6e 74 20 73 79 | 6d 62 6f 6c 73 20 2a 2f |rtant sy|mbols */|
|00002150| 0a 6f 73 73 79 6d 62 6f | 6c 73 28 29 0a 7b 0a 20 |.ossymbo|ls().{. |
|00002160| 20 20 20 4c 56 41 4c 20 | 73 79 6d 3b 0a 0a 20 20 | LVAL |sym;.. |
|00002170| 20 20 2f 2a 20 73 65 74 | 75 70 20 67 6c 6f 62 61 | /* set|up globa|
|00002180| 6c 73 20 66 6f 72 20 74 | 68 65 20 77 69 6e 64 6f |ls for t|he windo|
|00002190| 77 20 68 61 6e 64 6c 65 | 73 20 2a 2f 0a 20 20 20 |w handle|s */. |
|000021a0| 20 73 79 6d 20 3d 20 78 | 6c 65 6e 74 65 72 28 22 | sym = x|lenter("|
|000021b0| 2a 43 4f 4d 4d 41 4e 44 | 2d 57 49 4e 44 4f 57 2a |*COMMAND|-WINDOW*|
|000021c0| 22 29 3b 0a 20 20 20 20 | 73 65 74 76 61 6c 75 65 |");. |setvalue|
|000021d0| 28 73 79 6d 2c 63 76 66 | 69 78 6e 75 6d 28 28 46 |(sym,cvf|ixnum((F|
|000021e0| 49 58 54 59 50 45 29 63 | 77 69 6e 64 6f 77 29 29 |IXTYPE)c|window))|
|000021f0| 3b 0a 20 20 20 20 73 79 | 6d 20 3d 20 78 6c 65 6e |;. sy|m = xlen|
|00002200| 74 65 72 28 22 2a 47 52 | 41 50 48 49 43 53 2d 57 |ter("*GR|APHICS-W|
|00002210| 49 4e 44 4f 57 2a 22 29 | 3b 0a 20 20 20 20 73 65 |INDOW*")|;. se|
|00002220| 74 76 61 6c 75 65 28 73 | 79 6d 2c 63 76 66 69 78 |tvalue(s|ym,cvfix|
|00002230| 6e 75 6d 28 28 46 49 58 | 54 59 50 45 29 67 77 69 |num((FIX|TYPE)gwi|
|00002240| 6e 64 6f 77 29 29 3b 0a | 7d 0a 0a 0a 3d 3d 3d 3d |ndow));.|}...====|
|00002250| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002260| 3d 3d 3d 3d 20 6d 61 63 | 69 6e 74 2e 63 20 3d 3d |==== mac|int.c ==|
|00002270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002280| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002290| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 0a 2f 2a 20 |========|===../* |
|000022a0| 6d 61 63 69 6e 74 2e 63 | 20 2d 20 6d 61 63 69 6e |macint.c| - macin|
|000022b0| 74 6f 73 68 20 69 6e 74 | 65 72 66 61 63 65 20 72 |tosh int|erface r|
|000022c0| 6f 75 74 69 6e 65 73 20 | 66 6f 72 20 78 6c 69 73 |outines |for xlis|
|000022d0| 70 20 2a 2f 0a 0a 23 69 | 6e 63 6c 75 64 65 20 3c |p */..#i|nclude <|
|000022e0| 4d 61 63 54 79 70 65 73 | 2e 68 3e 0a 23 69 6e 63 |MacTypes|.h>.#inc|
|000022f0| 6c 75 64 65 20 3c 51 75 | 69 63 6b 64 72 61 77 2e |lude <Qu|ickdraw.|
|00002300| 68 3e 20 20 0a 23 69 6e | 63 6c 75 64 65 20 3c 57 |h> .#in|clude <W|
|00002310| 69 6e 64 6f 77 4d 67 72 | 2e 68 3e 0a 23 69 6e 63 |indowMgr|.h>.#inc|
|00002320| 6c 75 64 65 20 3c 45 76 | 65 6e 74 4d 67 72 2e 68 |lude <Ev|entMgr.h|
|00002330| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 44 69 61 6c |>.#inclu|de <Dial|
|00002340| 6f 67 4d 67 72 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |ogMgr.h>|.#includ|
|00002350| 65 20 3c 4d 65 6e 75 4d | 67 72 2e 68 3e 0a 23 69 |e <MenuM|gr.h>.#i|
|00002360| 6e 63 6c 75 64 65 20 3c | 50 61 63 6b 61 67 65 4d |nclude <|PackageM|
|00002370| 67 72 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |gr.h>.#i|nclude <|
|00002380| 53 74 64 46 69 6c 65 50 | 6b 67 2e 68 3e 0a 23 69 |StdFileP|kg.h>.#i|
|00002390| 6e 63 6c 75 64 65 20 3c | 4d 65 6d 6f 72 79 4d 67 |nclude <|MemoryMg|
|000023a0| 72 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 44 |r.h>.#in|clude <D|
|000023b0| 65 73 6b 4d 67 72 2e 68 | 3e 0a 23 69 6e 63 6c 75 |eskMgr.h|>.#inclu|
|000023c0| 64 65 20 3c 46 6f 6e 74 | 4d 67 72 2e 68 3e 0a 23 |de <Font|Mgr.h>.#|
|000023d0| 69 6e 63 6c 75 64 65 20 | 3c 43 6f 6e 74 72 6f 6c |include |<Control|
|000023e0| 4d 67 72 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |Mgr.h>.#|include |
|000023f0| 3c 53 65 67 6d 65 6e 74 | 4c 64 72 2e 68 3e 0a 23 |<Segment|Ldr.h>.#|
|00002400| 69 6e 63 6c 75 64 65 20 | 3c 46 69 6c 65 4d 67 72 |include |<FileMgr|
|00002410| 2e 68 3e 0a 0a 2f 2a 20 | 70 72 6f 67 72 61 6d 20 |.h>../* |program |
|00002420| 6c 69 6d 69 74 73 20 2a | 2f 0a 23 64 65 66 69 6e |limits *|/.#defin|
|00002430| 65 20 53 43 52 48 09 09 | 34 30 09 2f 2a 20 6d 61 |e SCRH..|40./* ma|
|00002440| 78 69 6d 75 6d 20 73 63 | 72 65 65 6e 20 68 65 69 |ximum sc|reen hei|
|00002450| 67 68 74 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 53 |ght */.#|define S|
|00002460| 43 52 57 09 09 31 30 30 | 09 2f 2a 20 6d 61 78 69 |CRW..100|./* maxi|
|00002470| 6d 75 6d 20 73 63 72 65 | 65 6e 20 77 69 64 74 68 |mum scre|en width|
|00002480| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 43 48 41 52 | */.#def|ine CHAR|
|00002490| 4d 41 58 20 09 31 30 30 | 09 2f 2a 20 6d 61 78 69 |MAX .100|./* maxi|
|000024a0| 6d 75 6d 20 6e 75 6d 62 | 65 72 20 6f 66 20 62 75 |mum numb|er of bu|
|000024b0| 66 66 65 72 65 64 20 63 | 68 61 72 61 63 74 65 72 |ffered c|haracter|
|000024c0| 73 20 2a 2f 0a 23 64 65 | 66 69 6e 65 20 54 49 4d |s */.#de|fine TIM|
|000024d0| 45 4f 4e 09 09 34 30 09 | 2f 2a 20 63 75 72 73 6f |EON..40.|/* curso|
|000024e0| 72 20 6f 6e 20 74 69 6d | 65 20 2a 2f 0a 23 64 65 |r on tim|e */.#de|
|000024f0| 66 69 6e 65 20 54 49 4d | 45 4f 46 46 09 09 32 30 |fine TIM|EOFF..20|
|00002500| 09 2f 2a 20 63 75 72 73 | 6f 72 20 6f 66 66 20 74 |./* curs|or off t|
|00002510| 69 6d 65 20 2a 2f 0a 0a | 2f 2a 20 75 73 65 66 75 |ime */..|/* usefu|
|00002520| 6c 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 2a 2f |l defini|tions */|
|00002530| 0a 23 64 65 66 69 6e 65 | 20 4d 65 6e 75 42 61 72 |.#define| MenuBar|
|00002540| 48 65 69 67 68 74 09 32 | 30 0a 23 64 65 66 69 6e |Height.2|0.#defin|
|00002550| 65 20 54 69 74 6c 65 42 | 61 72 48 65 69 67 68 74 |e TitleB|arHeight|
|00002560| 09 32 30 0a 23 64 65 66 | 69 6e 65 20 53 42 61 72 |.20.#def|ine SBar|
|00002570| 57 69 64 74 68 09 31 36 | 0a 23 64 65 66 69 6e 65 |Width.16|.#define|
|00002580| 20 4d 69 6e 57 69 64 74 | 68 09 38 30 0a 23 64 65 | MinWidt|h.80.#de|
|00002590| 66 69 6e 65 20 4d 69 6e | 48 65 69 67 68 74 09 34 |fine Min|Height.4|
|000025a0| 30 0a 23 64 65 66 69 6e | 65 20 53 63 72 65 65 6e |0.#defin|e Screen|
|000025b0| 4d 61 72 67 69 6e 09 32 | 0a 23 64 65 66 69 6e 65 |Margin.2|.#define|
|000025c0| 20 54 65 78 74 4d 61 72 | 67 69 6e 09 34 0a 23 64 | TextMar|gin.4.#d|
|000025d0| 65 66 69 6e 65 20 47 48 | 65 69 67 68 74 09 09 32 |efine GH|eight..2|
|000025e0| 33 32 0a 0a 2f 2a 20 6d | 65 6e 75 20 69 64 27 73 |32../* m|enu id's|
|000025f0| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 61 70 70 6c | */.#def|ine appl|
|00002600| 65 49 44 09 09 31 0a 23 | 64 65 66 69 6e 65 20 66 |eID..1.#|define f|
|00002610| 69 6c 65 49 44 09 09 32 | 35 36 0a 23 64 65 66 69 |ileID..2|56.#defi|
|00002620| 6e 65 20 65 64 69 74 49 | 44 09 09 32 35 37 0a 23 |ne editI|D..257.#|
|00002630| 64 65 66 69 6e 65 20 63 | 6f 6e 74 72 6f 6c 49 44 |define c|ontrolID|
|00002640| 09 32 35 38 0a 0a 2f 2a | 20 65 78 74 65 72 6e 61 |.258../*| externa|
|00002650| 6c 73 20 2a 2f 0a 65 78 | 74 65 72 6e 20 63 68 61 |ls */.ex|tern cha|
|00002660| 72 20 2a 73 5f 75 6e 62 | 6f 75 6e 64 3b 0a 65 78 |r *s_unb|ound;.ex|
|00002670| 74 65 72 6e 20 63 68 61 | 72 20 2a 50 74 6f 43 73 |tern cha|r *PtoCs|
|00002680| 74 72 28 29 3b 0a 0a 2f | 2a 20 73 63 72 65 65 6e |tr();../|* screen|
|00002690| 20 64 69 6d 65 6e 73 69 | 6f 6e 73 20 2a 2f 0a 69 | dimensi|ons */.i|
|000026a0| 6e 74 20 73 63 72 65 65 | 6e 57 69 64 74 68 3b 0a |nt scree|nWidth;.|
|000026b0| 69 6e 74 20 73 63 72 65 | 65 6e 48 65 69 67 68 74 |int scre|enHeight|
|000026c0| 3b 0a 0a 2f 2a 20 63 6f | 6d 6d 61 6e 64 20 77 69 |;../* co|mmand wi|
|000026d0| 6e 64 6f 77 20 28 6e 6f | 72 6d 61 6c 20 73 63 72 |ndow (no|rmal scr|
|000026e0| 65 65 6e 29 20 2a 2f 0a | 69 6e 74 20 6e 48 6f 72 |een) */.|int nHor|
|000026f0| 69 7a 6f 6e 74 61 6c 2c | 6e 56 65 72 74 69 63 61 |izontal,|nVertica|
|00002700| 6c 2c 6e 57 69 64 74 68 | 2c 6e 48 65 69 67 68 74 |l,nWidth|,nHeight|
|00002710| 3b 0a 0a 2f 2a 20 63 6f | 6d 6d 61 6e 64 20 77 69 |;../* co|mmand wi|
|00002720| 6e 64 6f 77 20 28 73 70 | 6c 69 74 20 73 63 72 65 |ndow (sp|lit scre|
|00002730| 65 6e 29 20 2a 2f 0a 69 | 6e 74 20 73 48 6f 72 69 |en) */.i|nt sHori|
|00002740| 7a 6f 6e 74 61 6c 2c 73 | 56 65 72 74 69 63 61 6c |zontal,s|Vertical|
|00002750| 2c 73 57 69 64 74 68 2c | 73 48 65 69 67 68 74 3b |,sWidth,|sHeight;|
|00002760| 0a 0a 2f 2a 20 67 72 61 | 70 68 69 63 73 20 77 69 |../* gra|phics wi|
|00002770| 6e 64 6f 77 20 2a 2f 0a | 69 6e 74 20 67 48 6f 72 |ndow */.|int gHor|
|00002780| 69 7a 6f 6e 74 61 6c 2c | 67 56 65 72 74 69 63 61 |izontal,|gVertica|
|00002790| 6c 2c 67 57 69 64 74 68 | 2c 67 48 65 69 67 68 74 |l,gWidth|,gHeight|
|000027a0| 3b 0a 0a 2f 2a 20 6d 65 | 6e 75 20 68 61 6e 64 6c |;../* me|nu handl|
|000027b0| 65 73 20 2a 2f 0a 4d 65 | 6e 75 48 61 6e 64 6c 65 |es */.Me|nuHandle|
|000027c0| 20 61 70 70 6c 65 4d 65 | 6e 75 3b 0a 4d 65 6e 75 | appleMe|nu;.Menu|
|000027d0| 48 61 6e 64 6c 65 20 66 | 69 6c 65 4d 65 6e 75 3b |Handle f|ileMenu;|
|000027e0| 0a 4d 65 6e 75 48 61 6e | 64 6c 65 20 65 64 69 74 |.MenuHan|dle edit|
|000027f0| 4d 65 6e 75 3b 0a 4d 65 | 6e 75 48 61 6e 64 6c 65 |Menu;.Me|nuHandle|
|00002800| 20 63 6f 6e 74 72 6f 6c | 4d 65 6e 75 3b 0a 0a 2f | control|Menu;../|
|00002810| 2a 20 6d 69 73 63 20 76 | 61 72 69 61 62 6c 65 73 |* misc v|ariables|
|00002820| 20 2a 2f 0a 4f 53 54 79 | 70 65 20 66 69 6c 65 74 | */.OSTy|pe filet|
|00002830| 79 70 65 73 5b 5d 20 3d | 20 7b 20 27 54 45 58 54 |ypes[] =| { 'TEXT|
|00002840| 27 20 7d 3b 0a 0a 2f 2a | 20 66 6f 6e 74 20 69 6e |' };../*| font in|
|00002850| 66 6f 72 6d 61 74 69 6f | 6e 20 2a 2f 0a 69 6e 74 |formatio|n */.int|
|00002860| 20 74 6d 61 72 67 69 6e | 2c 6c 6d 61 72 67 69 6e | tmargin|,lmargin|
|00002870| 3b 0a 69 6e 74 20 78 69 | 6e 63 2c 79 69 6e 63 3b |;.int xi|nc,yinc;|
|00002880| 0a 0a 2f 2a 20 63 6f 6d | 6d 61 6e 64 20 77 69 6e |../* com|mand win|
|00002890| 64 6f 77 20 2a 2f 0a 57 | 69 6e 64 6f 77 52 65 63 |dow */.W|indowRec|
|000028a0| 6f 72 64 20 63 77 72 65 | 63 6f 72 64 3b 0a 57 69 |ord cwre|cord;.Wi|
|000028b0| 6e 64 6f 77 50 74 72 20 | 63 77 69 6e 64 6f 77 3b |ndowPtr |cwindow;|
|000028c0| 0a 0a 2f 2a 20 67 72 61 | 70 68 69 63 73 20 77 69 |../* gra|phics wi|
|000028d0| 6e 64 6f 77 20 2a 2f 0a | 57 69 6e 64 6f 77 52 65 |ndow */.|WindowRe|
|000028e0| 63 6f 72 64 20 67 77 72 | 65 63 6f 72 64 3b 0a 57 |cord gwr|ecord;.W|
|000028f0| 69 6e 64 6f 77 50 74 72 | 20 67 77 69 6e 64 6f 77 |indowPtr| gwindow|
|00002900| 3b 0a 0a 2f 2a 20 77 69 | 6e 64 6f 77 20 6d 6f 64 |;../* wi|ndow mod|
|00002910| 65 20 2a 2f 0a 69 6e 74 | 20 73 70 6c 69 74 6d 6f |e */.int| splitmo|
|00002920| 64 65 3b 0a 0a 2f 2a 20 | 63 75 72 73 6f 72 20 76 |de;../* |cursor v|
|00002930| 61 72 69 61 62 6c 65 73 | 20 2a 2f 0a 6c 6f 6e 67 |ariables| */.long|
|00002940| 20 63 75 72 73 6f 72 74 | 69 6d 65 3b 0a 69 6e 74 | cursort|ime;.int|
|00002950| 20 63 75 72 73 6f 72 73 | 74 61 74 65 3b 0a 69 6e | cursors|tate;.in|
|00002960| 74 20 78 2c 79 3b 0a 0a | 2f 2a 20 73 63 72 65 65 |t x,y;..|/* scree|
|00002970| 6e 20 62 75 66 66 65 72 | 20 2a 2f 0a 63 68 61 72 |n buffer| */.char|
|00002980| 20 73 63 72 65 65 6e 5b | 53 43 52 48 2a 53 43 52 | screen[|SCRH*SCR|
|00002990| 57 5d 2c 2a 74 6f 70 6c | 69 6e 65 2c 2a 63 75 72 |W],*topl|ine,*cur|
|000029a0| 6c 69 6e 65 3b 0a 69 6e | 74 20 73 63 72 68 2c 73 |line;.in|t scrh,s|
|000029b0| 63 72 77 3b 0a 0a 2f 2a | 20 74 79 70 65 20 61 68 |crw;../*| type ah|
|000029c0| 65 61 64 20 62 75 66 66 | 65 72 20 2a 2f 0a 63 68 |ead buff|er */.ch|
|000029d0| 61 72 20 63 68 61 72 62 | 75 66 5b 43 48 41 52 4d |ar charb|uf[CHARM|
|000029e0| 41 58 5d 2c 2a 69 6e 70 | 74 72 2c 2a 6f 75 74 70 |AX],*inp|tr,*outp|
|000029f0| 74 72 3b 0a 69 6e 74 20 | 63 68 61 72 63 6e 74 3b |tr;.int |charcnt;|
|00002a00| 0a 0a 6d 61 63 69 6e 69 | 74 28 29 0a 7b 0a 20 20 |..macini|t().{. |
|00002a10| 20 20 2f 2a 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 | /* ini|tialize |
|00002a20| 74 68 65 20 74 6f 6f 6c | 62 6f 78 20 2a 2f 0a 20 |the tool|box */. |
|00002a30| 20 20 20 49 6e 69 74 47 | 72 61 66 28 26 74 68 65 | InitG|raf(&the|
|00002a40| 50 6f 72 74 29 3b 0a 20 | 20 20 20 49 6e 69 74 46 |Port);. | InitF|
|00002a50| 6f 6e 74 73 28 29 3b 0a | 20 20 20 20 49 6e 69 74 |onts();.| Init|
|00002a60| 57 69 6e 64 6f 77 73 28 | 29 3b 0a 20 20 20 20 49 |Windows(|);. I|
|00002a70| 6e 69 74 4d 65 6e 75 73 | 28 29 3b 0a 20 20 20 20 |nitMenus|();. |
|00002a80| 54 45 49 6e 69 74 28 29 | 3b 0a 20 20 20 20 49 6e |TEInit()|;. In|
|00002a90| 69 74 44 69 61 6c 6f 67 | 73 28 30 4c 29 3b 0a 20 |itDialog|s(0L);. |
|00002aa0| 20 20 20 49 6e 69 74 43 | 75 72 73 6f 72 28 29 3b | InitC|ursor();|
|00002ab0| 0a 0a 20 20 20 20 2f 2a | 20 73 65 74 75 70 20 74 |.. /*| setup t|
|00002ac0| 68 65 20 6d 65 6e 75 20 | 62 61 72 20 2a 2f 0a 20 |he menu |bar */. |
|00002ad0| 20 20 20 53 65 74 75 70 | 4d 65 6e 75 73 28 29 3b | Setup|Menus();|
|00002ae0| 0a 0a 20 20 20 20 2f 2a | 20 67 65 74 20 74 68 65 |.. /*| get the|
|00002af0| 20 73 69 7a 65 20 6f 66 | 20 74 68 65 20 73 63 72 | size of| the scr|
|00002b00| 65 65 6e 20 2a 2f 0a 20 | 20 20 20 73 63 72 65 65 |een */. | scree|
|00002b10| 6e 57 69 64 74 68 20 20 | 3d 20 73 63 72 65 65 6e |nWidth |= screen|
|00002b20| 42 69 74 73 2e 62 6f 75 | 6e 64 73 2e 72 69 67 68 |Bits.bou|nds.righ|
|00002b30| 74 20 20 2d 20 73 63 72 | 65 65 6e 42 69 74 73 2e |t - scr|eenBits.|
|00002b40| 62 6f 75 6e 64 73 2e 6c | 65 66 74 3b 0a 20 20 20 |bounds.l|eft;. |
|00002b50| 20 73 63 72 65 65 6e 48 | 65 69 67 68 74 20 3d 20 | screenH|eight = |
|00002b60| 73 63 72 65 65 6e 42 69 | 74 73 2e 62 6f 75 6e 64 |screenBi|ts.bound|
|00002b70| 73 2e 62 6f 74 74 6f 6d | 20 2d 20 73 63 72 65 65 |s.bottom| - scree|
|00002b80| 6e 42 69 74 73 2e 62 6f | 75 6e 64 73 2e 74 6f 70 |nBits.bo|unds.top|
|00002b90| 3b 0a 0a 20 20 20 20 2f | 2a 20 43 72 65 61 74 65 |;.. /|* Create|
|00002ba0| 20 74 68 65 20 67 72 61 | 70 68 69 63 73 20 61 6e | the gra|phics an|
|00002bb0| 64 20 63 6f 6e 74 72 6f | 6c 20 77 69 6e 64 6f 77 |d contro|l window|
|00002bc0| 73 20 2a 2f 0a 20 20 20 | 20 67 77 69 6e 64 6f 77 |s */. | gwindow|
|00002bd0| 20 3d 20 47 65 74 4e 65 | 77 57 69 6e 64 6f 77 28 | = GetNe|wWindow(|
|00002be0| 31 32 39 2c 26 67 77 72 | 65 63 6f 72 64 2c 2d 31 |129,&gwr|ecord,-1|
|00002bf0| 4c 29 3b 0a 20 20 20 20 | 63 77 69 6e 64 6f 77 20 |L);. |cwindow |
|00002c00| 3d 20 47 65 74 4e 65 77 | 57 69 6e 64 6f 77 28 31 |= GetNew|Window(1|
|00002c10| 32 38 2c 26 63 77 72 65 | 63 6f 72 64 2c 2d 31 4c |28,&cwre|cord,-1L|
|00002c20| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 65 73 74 61 62 |);.. |/* estab|
|00002c30| 6c 69 73 68 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |lish the| command|
|00002c40| 20 77 69 6e 64 6f 77 20 | 61 73 20 74 68 65 20 63 | window |as the c|
|00002c50| 75 72 72 65 6e 74 20 70 | 6f 72 74 20 2a 2f 0a 20 |urrent p|ort */. |
|00002c60| 20 20 20 53 65 74 50 6f | 72 74 28 63 77 69 6e 64 | SetPo|rt(cwind|
|00002c70| 6f 77 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 63 6f 6d |ow);.. | /* com|
|00002c80| 70 75 74 65 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |pute the| size of|
|00002c90| 20 74 68 65 20 6e 6f 72 | 6d 61 6c 20 63 6f 6d 6d | the nor|mal comm|
|00002ca0| 61 6e 64 20 77 69 6e 64 | 6f 77 20 2a 2f 0a 20 20 |and wind|ow */. |
|00002cb0| 20 20 6e 48 6f 72 69 7a | 6f 6e 74 61 6c 20 3d 20 | nHoriz|ontal = |
|00002cc0| 53 63 72 65 65 6e 4d 61 | 72 67 69 6e 3b 0a 20 20 |ScreenMa|rgin;. |
|00002cd0| 20 20 6e 56 65 72 74 69 | 63 61 6c 20 3d 20 4d 65 | nVerti|cal = Me|
|00002ce0| 6e 75 42 61 72 48 65 69 | 67 68 74 20 2b 20 54 69 |nuBarHei|ght + Ti|
|00002cf0| 74 6c 65 42 61 72 48 65 | 69 67 68 74 20 2b 20 53 |tleBarHe|ight + S|
|00002d00| 63 72 65 65 6e 4d 61 72 | 67 69 6e 20 2d 20 32 3b |creenMar|gin - 2;|
|00002d10| 0a 20 20 20 20 6e 57 69 | 64 74 68 20 3d 20 73 63 |. nWi|dth = sc|
|00002d20| 72 65 65 6e 57 69 64 74 | 68 20 2d 20 28 53 63 72 |reenWidt|h - (Scr|
|00002d30| 65 65 6e 4d 61 72 67 69 | 6e 20 2a 20 32 29 20 2d |eenMargi|n * 2) -|
|00002d40| 20 31 3b 0a 20 20 20 20 | 6e 48 65 69 67 68 74 20 | 1;. |nHeight |
|00002d50| 3d 20 73 63 72 65 65 6e | 48 65 69 67 68 74 20 2d |= screen|Height -|
|00002d60| 20 4d 65 6e 75 42 61 72 | 48 65 69 67 68 74 20 2d | MenuBar|Height -|
|00002d70| 20 54 69 74 6c 65 42 61 | 72 48 65 69 67 68 74 20 | TitleBa|rHeight |
|00002d80| 2d 20 28 53 63 72 65 65 | 6e 4d 61 72 67 69 6e 20 |- (Scree|nMargin |
|00002d90| 2a 20 32 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 63 6f |* 2);.. | /* co|
|00002da0| 6d 70 75 74 65 20 74 68 | 65 20 73 69 7a 65 20 6f |mpute th|e size o|
|00002db0| 66 20 74 68 65 20 73 70 | 6c 69 74 20 63 6f 6d 6d |f the sp|lit comm|
|00002dc0| 61 6e 64 20 77 69 6e 64 | 6f 77 20 2a 2f 0a 20 20 |and wind|ow */. |
|00002dd0| 20 20 73 48 6f 72 69 7a | 6f 6e 74 61 6c 20 3d 20 | sHoriz|ontal = |
|00002de0| 6e 48 6f 72 69 7a 6f 6e | 74 61 6c 3b 0a 20 20 20 |nHorizon|tal;. |
|00002df0| 20 73 56 65 72 74 69 63 | 61 6c 20 3d 20 6e 56 65 | sVertic|al = nVe|
|00002e00| 72 74 69 63 61 6c 20 2b | 20 47 48 65 69 67 68 74 |rtical +| GHeight|
|00002e10| 20 2b 20 31 3b 0a 20 20 | 20 20 73 57 69 64 74 68 | + 1;. | sWidth|
|00002e20| 20 3d 20 6e 57 69 64 74 | 68 3b 0a 20 20 20 20 73 | = nWidt|h;. s|
|00002e30| 48 65 69 67 68 74 20 3d | 20 6e 48 65 69 67 68 74 |Height =| nHeight|
|00002e40| 20 2d 20 47 48 65 69 67 | 68 74 20 2d 20 31 3b 0a | - GHeig|ht - 1;.|
|00002e50| 0a 20 20 20 20 2f 2a 20 | 63 6f 6d 70 75 74 65 20 |. /* |compute |
|00002e60| 74 68 65 20 73 69 7a 65 | 20 6f 66 20 74 68 65 20 |the size| of the |
|00002e70| 67 72 61 70 68 69 63 73 | 20 77 69 6e 64 6f 77 20 |graphics| window |
|00002e80| 2a 2f 0a 20 20 20 20 67 | 48 6f 72 69 7a 6f 6e 74 |*/. g|Horizont|
|00002e90| 61 6c 20 3d 20 6e 48 6f | 72 69 7a 6f 6e 74 61 6c |al = nHo|rizontal|
|00002ea0| 3b 0a 20 20 20 20 67 56 | 65 72 74 69 63 61 6c 20 |;. gV|ertical |
|00002eb0| 3d 20 4d 65 6e 75 42 61 | 72 48 65 69 67 68 74 20 |= MenuBa|rHeight |
|00002ec0| 2b 20 53 63 72 65 65 6e | 4d 61 72 67 69 6e 3b 0a |+ Screen|Margin;.|
|00002ed0| 20 20 20 20 67 57 69 64 | 74 68 20 3d 20 73 63 72 | gWid|th = scr|
|00002ee0| 65 65 6e 57 69 64 74 68 | 20 2d 20 28 53 63 72 65 |eenWidth| - (Scre|
|00002ef0| 65 6e 4d 61 72 67 69 6e | 20 2a 20 32 29 3b 0a 20 |enMargin| * 2);. |
|00002f00| 20 20 20 67 48 65 69 67 | 68 74 20 3d 20 47 48 65 | gHeig|ht = GHe|
|00002f10| 69 67 68 74 3b 0a 0a 20 | 20 20 20 2f 2a 20 6d 6f |ight;.. | /* mo|
|00002f20| 76 65 20 61 6e 64 20 73 | 69 7a 65 20 74 68 65 20 |ve and s|ize the |
|00002f30| 67 72 61 70 68 69 63 73 | 20 77 69 6e 64 6f 77 20 |graphics| window |
|00002f40| 2a 2f 0a 20 20 20 20 4d | 6f 76 65 57 69 6e 64 6f |*/. M|oveWindo|
|00002f50| 77 28 67 77 69 6e 64 6f | 77 2c 67 48 6f 72 69 7a |w(gwindo|w,gHoriz|
|00002f60| 6f 6e 74 61 6c 2c 67 56 | 65 72 74 69 63 61 6c 2c |ontal,gV|ertical,|
|00002f70| 30 29 3b 0a 20 20 20 20 | 53 69 7a 65 57 69 6e 64 |0);. |SizeWind|
|00002f80| 6f 77 28 67 77 69 6e 64 | 6f 77 2c 67 57 69 64 74 |ow(gwind|ow,gWidt|
|00002f90| 68 2c 67 48 65 69 67 68 | 74 2c 30 29 3b 0a 0a 20 |h,gHeigh|t,0);.. |
|00002fa0| 20 20 20 2f 2a 20 73 65 | 74 75 70 20 74 68 65 20 | /* se|tup the |
|00002fb0| 66 6f 6e 74 2c 20 73 69 | 7a 65 20 61 6e 64 20 77 |font, si|ze and w|
|00002fc0| 72 69 74 69 6e 67 20 6d | 6f 64 65 20 66 6f 72 20 |riting m|ode for |
|00002fd0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 77 69 6e 64 |the comm|and wind|
|00002fe0| 6f 77 20 2a 2f 0a 20 20 | 20 20 54 65 78 74 46 6f |ow */. | TextFo|
|00002ff0| 6e 74 28 6d 6f 6e 61 63 | 6f 29 3b 20 54 65 78 74 |nt(monac|o); Text|
|00003000| 53 69 7a 65 28 39 29 3b | 20 54 65 78 74 4d 6f 64 |Size(9);| TextMod|
|00003010| 65 28 73 72 63 43 6f 70 | 79 29 3b 0a 0a 20 20 20 |e(srcCop|y);.. |
|00003020| 20 2f 2a 20 73 65 74 75 | 70 20 63 6f 6d 6d 61 6e | /* setu|p comman|
|00003030| 64 20 6d 6f 64 65 20 2a | 2f 0a 20 20 20 20 73 63 |d mode *|/. sc|
|00003040| 72 73 70 6c 69 74 28 46 | 41 4c 53 45 29 3b 0a 0a |rsplit(F|ALSE);..|
|00003050| 20 20 20 20 2f 2a 20 64 | 69 73 61 62 6c 65 20 74 | /* d|isable t|
|00003060| 68 65 20 43 75 72 73 6f | 72 20 2a 2f 0a 20 20 20 |he Curso|r */. |
|00003070| 20 63 75 72 73 6f 72 73 | 74 61 74 65 20 3d 20 2d | cursors|tate = -|
|00003080| 31 3b 0a 0a 20 20 20 20 | 2f 2a 20 73 65 74 75 70 |1;.. |/* setup|
|00003090| 20 74 68 65 20 69 6e 70 | 75 74 20 72 69 6e 67 20 | the inp|ut ring |
|000030a0| 62 75 66 66 65 72 20 2a | 2f 0a 20 20 20 20 69 6e |buffer *|/. in|
|000030b0| 70 74 72 20 3d 20 6f 75 | 74 70 74 72 20 3d 20 63 |ptr = ou|tptr = c|
|000030c0| 68 61 72 62 75 66 3b 0a | 20 20 20 20 63 68 61 72 |harbuf;.| char|
|000030d0| 63 6e 74 20 3d 20 30 3b | 0a 20 20 20 20 0a 20 20 |cnt = 0;|. . |
|000030e0| 20 20 2f 2a 20 6c 6f 63 | 6b 20 74 68 65 20 66 6f | /* loc|k the fo|
|000030f0| 6e 74 20 69 6e 20 6d 65 | 6d 6f 72 79 20 2a 2f 0a |nt in me|mory */.|
|00003100| 20 20 20 20 53 65 74 46 | 6f 6e 74 4c 6f 63 6b 28 | SetF|ontLock(|
|00003110| 2d 31 29 3b 0a 7d 0a 0a | 53 65 74 75 70 4d 65 6e |-1);.}..|SetupMen|
|00003120| 75 73 28 29 0a 7b 0a 20 | 20 20 20 61 70 70 6c 65 |us().{. | apple|
|00003130| 4d 65 6e 75 20 3d 20 47 | 65 74 4d 65 6e 75 28 61 |Menu = G|etMenu(a|
|00003140| 70 70 6c 65 49 44 29 3b | 09 2f 2a 20 73 65 74 75 |ppleID);|./* setu|
|00003150| 70 20 74 68 65 20 61 70 | 70 6c 65 20 6d 65 6e 75 |p the ap|ple menu|
|00003160| 20 2a 2f 0a 20 20 20 20 | 41 64 64 52 65 73 4d 65 | */. |AddResMe|
|00003170| 6e 75 28 61 70 70 6c 65 | 4d 65 6e 75 2c 27 44 52 |nu(apple|Menu,'DR|
|00003180| 56 52 27 29 3b 0a 20 20 | 20 20 49 6e 73 65 72 74 |VR');. | Insert|
|00003190| 4d 65 6e 75 28 61 70 70 | 6c 65 4d 65 6e 75 2c 30 |Menu(app|leMenu,0|
|000031a0| 29 3b 0a 20 20 20 20 66 | 69 6c 65 4d 65 6e 75 20 |);. f|ileMenu |
|000031b0| 3d 20 47 65 74 4d 65 6e | 75 28 66 69 6c 65 49 44 |= GetMen|u(fileID|
|000031c0| 29 3b 09 09 2f 2a 20 73 | 65 74 75 70 20 74 68 65 |);../* s|etup the|
|000031d0| 20 66 69 6c 65 20 6d 65 | 6e 75 20 2a 2f 0a 20 20 | file me|nu */. |
|000031e0| 20 20 49 6e 73 65 72 74 | 4d 65 6e 75 28 66 69 6c | Insert|Menu(fil|
|000031f0| 65 4d 65 6e 75 2c 30 29 | 3b 0a 20 20 20 20 65 64 |eMenu,0)|;. ed|
|00003200| 69 74 4d 65 6e 75 20 3d | 20 47 65 74 4d 65 6e 75 |itMenu =| GetMenu|
|00003210| 28 65 64 69 74 49 44 29 | 3b 09 09 2f 2a 20 73 65 |(editID)|;../* se|
|00003220| 74 75 70 20 74 68 65 20 | 65 64 69 74 20 6d 65 6e |tup the |edit men|
|00003230| 75 20 2a 2f 0a 20 20 20 | 20 49 6e 73 65 72 74 4d |u */. | InsertM|
|00003240| 65 6e 75 28 65 64 69 74 | 4d 65 6e 75 2c 30 29 3b |enu(edit|Menu,0);|
|00003250| 0a 20 20 20 20 63 6f 6e | 74 72 6f 6c 4d 65 6e 75 |. con|trolMenu|
|00003260| 20 3d 20 47 65 74 4d 65 | 6e 75 28 63 6f 6e 74 72 | = GetMe|nu(contr|
|00003270| 6f 6c 49 44 29 3b 09 2f | 2a 20 73 65 74 75 70 20 |olID);./|* setup |
|00003280| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 20 6d 65 6e 75 |the cont|rol menu|
|00003290| 20 2a 2f 0a 20 20 20 20 | 49 6e 73 65 72 74 4d 65 | */. |InsertMe|
|000032a0| 6e 75 28 63 6f 6e 74 72 | 6f 6c 4d 65 6e 75 2c 30 |nu(contr|olMenu,0|
|000032b0| 29 3b 0a 20 20 20 20 44 | 72 61 77 4d 65 6e 75 42 |);. D|rawMenuB|
|000032c0| 61 72 28 29 3b 0a 7d 0a | 0a 69 6e 74 20 73 63 72 |ar();.}.|.int scr|
|000032d0| 67 65 74 63 28 29 0a 7b | 0a 20 20 20 20 43 75 72 |getc().{|. Cur|
|000032e0| 73 6f 72 4f 6e 28 29 3b | 0a 20 20 20 20 77 68 69 |sorOn();|. whi|
|000032f0| 6c 65 20 28 63 68 61 72 | 63 6e 74 20 3d 3d 20 30 |le (char|cnt == 0|
|00003300| 29 0a 09 44 6f 45 76 65 | 6e 74 28 29 3b 0a 20 20 |)..DoEve|nt();. |
|00003310| 20 20 43 75 72 73 6f 72 | 4f 66 66 28 29 3b 0a 20 | Cursor|Off();. |
|00003320| 20 20 20 72 65 74 75 72 | 6e 20 28 73 63 72 6e 65 | retur|n (scrne|
|00003330| 78 74 63 28 29 29 3b 0a | 7d 0a 0a 69 6e 74 20 73 |xtc());.|}..int s|
|00003340| 63 72 6e 65 78 74 63 28 | 29 0a 7b 0a 20 20 20 20 |crnextc(|).{. |
|00003350| 69 6e 74 20 63 68 3b 0a | 20 20 20 20 69 66 20 28 |int ch;.| if (|
|00003360| 63 68 61 72 63 6e 74 20 | 3e 20 30 29 20 7b 0a 09 |charcnt |> 0) {..|
|00003370| 63 68 20 3d 20 2a 6f 75 | 74 70 74 72 2b 2b 3b 20 |ch = *ou|tptr++; |
|00003380| 63 68 61 72 63 6e 74 2d | 2d 3b 0a 09 69 66 20 28 |charcnt-|-;..if (|
|00003390| 6f 75 74 70 74 72 20 3e | 3d 20 26 63 68 61 72 62 |outptr >|= &charb|
|000033a0| 75 66 5b 43 48 41 52 4d | 41 58 5d 29 0a 09 20 20 |uf[CHARM|AX]).. |
|000033b0| 20 20 6f 75 74 70 74 72 | 20 3d 20 63 68 61 72 62 | outptr| = charb|
|000033c0| 75 66 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 65 6c |uf;. |}. el|
|000033d0| 73 65 20 7b 0a 09 63 68 | 61 72 63 6e 74 20 3d 20 |se {..ch|arcnt = |
|000033e0| 30 3b 0a 09 63 68 20 3d | 20 2d 31 3b 0a 20 20 20 |0;..ch =| -1;. |
|000033f0| 20 7d 0a 20 20 20 20 72 | 65 74 75 72 6e 20 28 63 | }. r|eturn (c|
|00003400| 68 29 3b 0a 7d 0a 0a 73 | 63 72 70 75 74 63 28 63 |h);.}..s|crputc(c|
|00003410| 68 29 0a 20 20 69 6e 74 | 20 63 68 3b 0a 7b 0a 20 |h). int| ch;.{. |
|00003420| 20 20 20 73 77 69 74 63 | 68 20 28 63 68 29 20 7b | switc|h (ch) {|
|00003430| 0a 20 20 20 20 63 61 73 | 65 20 27 5c 72 27 3a 0a |. cas|e '\r':.|
|00003440| 09 78 20 3d 20 30 3b 0a | 09 62 72 65 61 6b 3b 0a |.x = 0;.|.break;.|
|00003450| 20 20 20 20 63 61 73 65 | 20 27 5c 6e 27 3a 0a 09 | case| '\n':..|
|00003460| 6e 65 78 74 6c 69 6e 65 | 28 26 63 75 72 6c 69 6e |nextline|(&curlin|
|00003470| 65 29 3b 0a 09 69 66 20 | 28 2b 2b 79 20 3e 3d 20 |e);..if |(++y >= |
|00003480| 73 63 72 68 29 20 7b 0a | 09 20 20 20 20 79 20 3d |scrh) {.|. y =|
|00003490| 20 73 63 72 68 20 2d 20 | 31 3b 0a 09 20 20 20 20 | scrh - |1;.. |
|000034a0| 73 63 72 6f 6c 6c 75 70 | 28 29 3b 0a 09 7d 0a 09 |scrollup|();..}..|
|000034b0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 63 61 73 65 20 |break;. | case |
|000034c0| 27 5c 74 27 3a 0a 09 64 | 6f 20 7b 20 73 63 72 70 |'\t':..d|o { scrp|
|000034d0| 75 74 63 28 27 20 27 29 | 3b 20 7d 20 77 68 69 6c |utc(' ')|; } whil|
|000034e0| 65 20 28 78 20 26 20 37 | 29 3b 0a 09 62 72 65 61 |e (x & 7|);..brea|
|000034f0| 6b 3b 0a 20 20 20 20 63 | 61 73 65 20 27 5c 30 31 |k;. c|ase '\01|
|00003500| 30 27 3a 0a 09 69 66 20 | 28 78 29 20 78 2d 2d 3b |0':..if |(x) x--;|
|00003510| 0a 09 62 72 65 61 6b 3b | 0a 20 20 20 20 64 65 66 |..break;|. def|
|00003520| 61 75 6c 74 3a 0a 09 69 | 66 20 28 63 68 20 3e 3d |ault:..i|f (ch >=|
|00003530| 20 30 78 32 30 20 26 26 | 20 63 68 20 3c 20 30 78 | 0x20 &&| ch < 0x|
|00003540| 37 46 29 20 7b 0a 09 20 | 20 20 20 73 63 72 70 6f |7F) {.. | scrpo|
|00003550| 73 69 74 69 6f 6e 28 78 | 2c 79 29 3b 0a 09 20 20 |sition(x|,y);.. |
|00003560| 20 20 44 72 61 77 43 68 | 61 72 28 63 68 29 3b 0a | DrawCh|ar(ch);.|
|00003570| 09 20 20 20 20 63 75 72 | 6c 69 6e 65 5b 78 5d 20 |. cur|line[x] |
|00003580| 3d 20 63 68 3b 0a 09 20 | 20 20 20 69 66 20 28 2b |= ch;.. | if (+|
|00003590| 2b 78 20 3e 3d 20 73 63 | 72 77 29 20 7b 0a 09 09 |+x >= sc|rw) {...|
|000035a0| 6e 65 78 74 6c 69 6e 65 | 28 26 63 75 72 6c 69 6e |nextline|(&curlin|
|000035b0| 65 29 3b 0a 09 09 69 66 | 20 28 2b 2b 79 20 3e 3d |e);...if| (++y >=|
|000035c0| 20 73 63 72 68 29 20 7b | 0a 09 09 20 20 20 20 79 | scrh) {|... y|
|000035d0| 20 3d 20 73 63 72 68 20 | 2d 20 31 3b 0a 09 09 20 | = scrh |- 1;... |
|000035e0| 20 20 20 73 63 72 6f 6c | 6c 75 70 28 29 3b 0a 09 | scrol|lup();..|
|000035f0| 09 7d 0a 09 09 78 20 3d | 20 30 3b 0a 09 20 20 20 |.}...x =| 0;.. |
|00003600| 20 7d 0a 09 7d 0a 09 62 | 72 65 61 6b 3b 0a 20 20 | }..}..b|reak;. |
|00003610| 20 20 7d 0a 7d 0a 0a 73 | 63 72 64 65 6c 65 74 65 | }.}..s|crdelete|
|00003620| 28 29 0a 7b 0a 20 20 20 | 20 73 63 72 70 75 74 63 |().{. | scrputc|
|00003630| 28 27 5c 30 31 30 27 29 | 3b 0a 20 20 20 20 73 63 |('\010')|;. sc|
|00003640| 72 70 75 74 63 28 27 20 | 27 29 3b 0a 20 20 20 20 |rputc(' |');. |
|00003650| 73 63 72 70 75 74 63 28 | 27 5c 30 31 30 27 29 3b |scrputc(|'\010');|
|00003660| 0a 7d 0a 0a 73 63 72 63 | 6c 65 61 72 28 29 0a 7b |.}..scrc|lear().{|
|00003670| 0a 20 20 20 20 63 75 72 | 6c 69 6e 65 20 3d 20 73 |. cur|line = s|
|00003680| 63 72 65 65 6e 3b 0a 20 | 20 20 20 66 6f 72 20 28 |creen;. | for (|
|00003690| 79 20 3d 20 30 3b 20 79 | 20 3c 20 53 43 52 48 3b |y = 0; y| < SCRH;|
|000036a0| 20 79 2b 2b 29 0a 09 66 | 6f 72 20 28 78 20 3d 20 | y++)..f|or (x = |
|000036b0| 30 3b 20 78 20 3c 20 53 | 43 52 57 3b 20 78 2b 2b |0; x < S|CRW; x++|
|000036c0| 29 0a 09 20 20 20 20 2a | 63 75 72 6c 69 6e 65 2b |).. *|curline+|
|000036d0| 2b 20 3d 20 27 20 27 3b | 0a 20 20 20 20 74 6f 70 |+ = ' ';|. top|
|000036e0| 6c 69 6e 65 20 3d 20 63 | 75 72 6c 69 6e 65 20 3d |line = c|urline =|
|000036f0| 20 73 63 72 65 65 6e 3b | 0a 20 20 20 20 78 20 3d | screen;|. x =|
|00003700| 20 79 20 3d 20 30 3b 0a | 7d 0a 0a 73 63 72 66 6c | y = 0;.|}..scrfl|
|00003710| 75 73 68 28 29 0a 7b 0a | 20 20 20 20 69 6e 70 74 |ush().{.| inpt|
|00003720| 72 20 3d 20 6f 75 74 70 | 74 72 20 3d 20 63 68 61 |r = outp|tr = cha|
|00003730| 72 62 75 66 3b 0a 20 20 | 20 20 63 68 61 72 63 6e |rbuf;. | charcn|
|00003740| 74 20 3d 20 2d 31 3b 0a | 20 20 20 20 6f 73 66 6c |t = -1;.| osfl|
|00003750| 75 73 68 28 29 3b 0a 7d | 0a 0a 73 63 72 70 6f 73 |ush();.}|..scrpos|
|00003760| 69 74 69 6f 6e 28 78 2c | 79 29 0a 20 20 69 6e 74 |ition(x,|y). int|
|00003770| 20 78 2c 79 3b 0a 7b 0a | 20 20 20 20 4d 6f 76 65 | x,y;.{.| Move|
|00003780| 54 6f 28 28 78 20 2a 20 | 78 69 6e 63 29 20 2b 20 |To((x * |xinc) + |
|00003790| 6c 6d 61 72 67 69 6e 2c | 28 79 20 2a 20 79 69 6e |lmargin,|(y * yin|
|000037a0| 63 29 20 2b 20 74 6d 61 | 72 67 69 6e 29 3b 0a 7d |c) + tma|rgin);.}|
|000037b0| 0a 0a 44 6f 45 76 65 6e | 74 28 29 0a 7b 0a 20 20 |..DoEven|t().{. |
|000037c0| 20 20 45 76 65 6e 74 52 | 65 63 6f 72 64 20 6d 79 | EventR|ecord my|
|000037d0| 45 76 65 6e 74 3b 0a 20 | 20 20 20 0a 20 20 20 20 |Event;. | . |
|000037e0| 53 79 73 74 65 6d 54 61 | 73 6b 28 29 3b 0a 20 20 |SystemTa|sk();. |
|000037f0| 20 20 43 75 72 73 6f 72 | 55 70 64 61 74 65 28 29 | Cursor|Update()|
|00003800| 3b 0a 0a 20 20 20 20 77 | 68 69 6c 65 20 28 47 65 |;.. w|hile (Ge|
|00003810| 74 4e 65 78 74 45 76 65 | 6e 74 28 65 76 65 72 79 |tNextEve|nt(every|
|00003820| 45 76 65 6e 74 2c 26 6d | 79 45 76 65 6e 74 29 29 |Event,&m|yEvent))|
|00003830| 0a 09 73 77 69 74 63 68 | 20 28 6d 79 45 76 65 6e |..switch| (myEven|
|00003840| 74 2e 77 68 61 74 29 20 | 7b 0a 09 20 20 20 20 63 |t.what) |{.. c|
|00003850| 61 73 65 20 6d 6f 75 73 | 65 44 6f 77 6e 3a 0a 09 |ase mous|eDown:..|
|00003860| 09 44 6f 4d 6f 75 73 65 | 44 6f 77 6e 28 26 6d 79 |.DoMouse|Down(&my|
|00003870| 45 76 65 6e 74 29 3b 0a | 09 09 62 72 65 61 6b 3b |Event);.|..break;|
|00003880| 0a 09 20 20 20 20 63 61 | 73 65 20 6b 65 79 44 6f |.. ca|se keyDo|
|00003890| 77 6e 3a 0a 09 20 20 20 | 20 63 61 73 65 20 61 75 |wn:.. | case au|
|000038a0| 74 6f 4b 65 79 3a 0a 09 | 09 44 6f 4b 65 79 50 72 |toKey:..|.DoKeyPr|
|000038b0| 65 73 73 28 26 6d 79 45 | 76 65 6e 74 29 3b 0a 09 |ess(&myE|vent);..|
|000038c0| 09 62 72 65 61 6b 3b 0a | 09 20 20 20 20 63 61 73 |.break;.|. cas|
|000038d0| 65 20 61 63 74 69 76 61 | 74 65 45 76 74 3a 0a 09 |e activa|teEvt:..|
|000038e0| 09 44 6f 41 63 74 69 76 | 61 74 65 28 26 6d 79 45 |.DoActiv|ate(&myE|
|000038f0| 76 65 6e 74 29 3b 0a 09 | 09 62 72 65 61 6b 3b 0a |vent);..|.break;.|
|00003900| 09 20 20 20 20 63 61 73 | 65 20 75 70 64 61 74 65 |. cas|e update|
|00003910| 45 76 74 3a 0a 09 09 44 | 6f 55 70 64 61 74 65 28 |Evt:...D|oUpdate(|
|00003920| 26 6d 79 45 76 65 6e 74 | 29 3b 0a 09 09 62 72 65 |&myEvent|);...bre|
|00003930| 61 6b 3b 0a 09 20 20 20 | 20 7d 0a 7d 0a 0a 44 6f |ak;.. | }.}..Do|
|00003940| 4d 6f 75 73 65 44 6f 77 | 6e 28 6d 79 45 76 65 6e |MouseDow|n(myEven|
|00003950| 74 29 0a 20 20 45 76 65 | 6e 74 52 65 63 6f 72 64 |t). Eve|ntRecord|
|00003960| 20 2a 6d 79 45 76 65 6e | 74 3b 0a 7b 0a 20 20 20 | *myEven|t;.{. |
|00003970| 20 57 69 6e 64 6f 77 50 | 74 72 20 77 68 69 63 68 | WindowP|tr which|
|00003980| 57 69 6e 64 6f 77 3b 0a | 0a 20 20 20 20 73 77 69 |Window;.|. swi|
|00003990| 74 63 68 20 28 46 69 6e | 64 57 69 6e 64 6f 77 28 |tch (Fin|dWindow(|
|000039a0| 6d 79 45 76 65 6e 74 2d | 3e 77 68 65 72 65 2c 26 |myEvent-|>where,&|
|000039b0| 77 68 69 63 68 57 69 6e | 64 6f 77 29 29 20 7b 0a |whichWin|dow)) {.|
|000039c0| 20 20 20 20 63 61 73 65 | 20 69 6e 4d 65 6e 75 42 | case| inMenuB|
|000039d0| 61 72 3a 0a 09 44 6f 4d | 65 6e 75 43 6c 69 63 6b |ar:..DoM|enuClick|
|000039e0| 28 6d 79 45 76 65 6e 74 | 29 3b 0a 09 62 72 65 61 |(myEvent|);..brea|
|000039f0| 6b 3b 0a 20 20 20 20 63 | 61 73 65 20 69 6e 53 79 |k;. c|ase inSy|
|00003a00| 73 57 69 6e 64 6f 77 3a | 0a 09 53 79 73 74 65 6d |sWindow:|..System|
|00003a10| 43 6c 69 63 6b 28 6d 79 | 45 76 65 6e 74 2c 77 68 |Click(my|Event,wh|
|00003a20| 69 63 68 57 69 6e 64 6f | 77 29 3b 0a 09 62 72 65 |ichWindo|w);..bre|
|00003a30| 61 6b 3b 0a 20 20 20 20 | 63 61 73 65 20 69 6e 44 |ak;. |case inD|
|00003a40| 72 61 67 3a 0a 09 44 6f | 44 72 61 67 28 6d 79 45 |rag:..Do|Drag(myE|
|00003a50| 76 65 6e 74 2c 77 68 69 | 63 68 57 69 6e 64 6f 77 |vent,whi|chWindow|
|00003a60| 29 3b 0a 09 62 72 65 61 | 6b 3b 0a 20 20 20 20 63 |);..brea|k;. c|
|00003a70| 61 73 65 20 69 6e 47 6f | 41 77 61 79 3a 0a 09 44 |ase inGo|Away:..D|
|00003a80| 6f 47 6f 41 77 61 79 28 | 6d 79 45 76 65 6e 74 2c |oGoAway(|myEvent,|
|00003a90| 77 68 69 63 68 57 69 6e | 64 6f 77 29 3b 0a 09 62 |whichWin|dow);..b|
|00003aa0| 72 65 61 6b 3b 0a 20 20 | 20 20 63 61 73 65 20 69 |reak;. | case i|
|00003ab0| 6e 47 72 6f 77 3a 0a 09 | 44 6f 47 72 6f 77 28 6d |nGrow:..|DoGrow(m|
|00003ac0| 79 45 76 65 6e 74 2c 77 | 68 69 63 68 57 69 6e 64 |yEvent,w|hichWind|
|00003ad0| 6f 77 29 3b 0a 09 62 72 | 65 61 6b 3b 0a 20 20 20 |ow);..br|eak;. |
|00003ae0| 20 63 61 73 65 20 69 6e | 43 6f 6e 74 65 6e 74 3a | case in|Content:|
|00003af0| 0a 09 44 6f 43 6f 6e 74 | 65 6e 74 28 6d 79 45 76 |..DoCont|ent(myEv|
|00003b00| 65 6e 74 2c 77 68 69 63 | 68 57 69 6e 64 6f 77 29 |ent,whic|hWindow)|
|00003b10| 3b 0a 09 62 72 65 61 6b | 3b 0a 20 20 20 20 7d 0a |;..break|;. }.|
|00003b20| 7d 0a 0a 44 6f 4d 65 6e | 75 43 6c 69 63 6b 28 6d |}..DoMen|uClick(m|
|00003b30| 79 45 76 65 6e 74 29 0a | 20 20 45 76 65 6e 74 52 |yEvent).| EventR|
|00003b40| 65 63 6f 72 64 20 2a 6d | 79 45 76 65 6e 74 3b 0a |ecord *m|yEvent;.|
|00003b50| 7b 0a 20 20 20 20 6c 6f | 6e 67 20 63 68 6f 69 63 |{. lo|ng choic|
|00003b60| 65 3b 0a 20 20 20 20 69 | 66 20 28 63 68 6f 69 63 |e;. i|f (choic|
|00003b70| 65 20 3d 20 4d 65 6e 75 | 53 65 6c 65 63 74 28 6d |e = Menu|Select(m|
|00003b80| 79 45 76 65 6e 74 2d 3e | 77 68 65 72 65 29 29 0a |yEvent->|where)).|
|00003b90| 09 44 6f 43 6f 6d 6d 61 | 6e 64 28 63 68 6f 69 63 |.DoComma|nd(choic|
|00003ba0| 65 29 3b 0a 7d 0a 0a 44 | 6f 44 72 61 67 28 6d 79 |e);.}..D|oDrag(my|
|00003bb0| 45 76 65 6e 74 2c 77 68 | 69 63 68 57 69 6e 64 6f |Event,wh|ichWindo|
|00003bc0| 77 29 0a 20 20 45 76 65 | 6e 74 52 65 63 6f 72 64 |w). Eve|ntRecord|
|00003bd0| 20 2a 6d 79 45 76 65 6e | 74 3b 0a 20 20 57 69 6e | *myEven|t;. Win|
|00003be0| 64 6f 77 50 74 72 20 77 | 68 69 63 68 57 69 6e 64 |dowPtr w|hichWind|
|00003bf0| 6f 77 3b 0a 7b 0a 20 20 | 20 20 52 65 63 74 20 64 |ow;.{. | Rect d|
|00003c00| 72 61 67 52 65 63 74 3b | 0a 20 20 20 20 53 65 74 |ragRect;|. Set|
|00003c10| 52 65 63 74 28 26 64 72 | 61 67 52 65 63 74 2c 30 |Rect(&dr|agRect,0|
|00003c20| 2c 4d 65 6e 75 42 61 72 | 48 65 69 67 68 74 2c 73 |,MenuBar|Height,s|
|00003c30| 63 72 65 65 6e 57 69 64 | 74 68 2c 73 63 72 65 65 |creenWid|th,scree|
|00003c40| 6e 48 65 69 67 68 74 29 | 3b 0a 20 20 20 20 49 6e |nHeight)|;. In|
|00003c50| 73 65 74 52 65 63 74 28 | 26 64 72 61 67 52 65 63 |setRect(|&dragRec|
|00003c60| 74 2c 53 63 72 65 65 6e | 4d 61 72 67 69 6e 2c 53 |t,Screen|Margin,S|
|00003c70| 63 72 65 65 6e 4d 61 72 | 67 69 6e 29 3b 0a 20 20 |creenMar|gin);. |
|00003c80| 20 20 44 72 61 67 57 69 | 6e 64 6f 77 28 77 68 69 | DragWi|ndow(whi|
|00003c90| 63 68 57 69 6e 64 6f 77 | 2c 6d 79 45 76 65 6e 74 |chWindow|,myEvent|
|00003ca0| 2d 3e 77 68 65 72 65 2c | 26 64 72 61 67 52 65 63 |->where,|&dragRec|
|00003cb0| 74 29 3b 0a 7d 0a 0a 44 | 6f 47 6f 41 77 61 79 28 |t);.}..D|oGoAway(|
|00003cc0| 6d 79 45 76 65 6e 74 2c | 77 68 69 63 68 57 69 6e |myEvent,|whichWin|
|00003cd0| 64 6f 77 29 0a 20 20 45 | 76 65 6e 74 52 65 63 6f |dow). E|ventReco|
|00003ce0| 72 64 20 2a 6d 79 45 76 | 65 6e 74 3b 0a 20 20 57 |rd *myEv|ent;. W|
|00003cf0| 69 6e 64 6f 77 50 74 72 | 20 77 68 69 63 68 57 69 |indowPtr| whichWi|
|00003d00| 6e 64 6f 77 3b 0a 7b 0a | 20 20 20 20 69 66 20 28 |ndow;.{.| if (|
|00003d10| 54 72 61 63 6b 47 6f 41 | 77 61 79 28 77 68 69 63 |TrackGoA|way(whic|
|00003d20| 68 57 69 6e 64 6f 77 2c | 6d 79 45 76 65 6e 74 2d |hWindow,|myEvent-|
|00003d30| 3e 77 68 65 72 65 29 29 | 0a 09 77 72 61 70 75 70 |>where))|..wrapup|
|00003d40| 28 29 3b 0a 7d 0a 0a 44 | 6f 47 72 6f 77 28 6d 79 |();.}..D|oGrow(my|
|00003d50| 45 76 65 6e 74 2c 77 68 | 69 63 68 57 69 6e 64 6f |Event,wh|ichWindo|
|00003d60| 77 29 0a 20 20 45 76 65 | 6e 74 52 65 63 6f 72 64 |w). Eve|ntRecord|
|00003d70| 20 2a 6d 79 45 76 65 6e | 74 3b 0a 20 20 57 69 6e | *myEven|t;. Win|
|00003d80| 64 6f 77 50 74 72 20 77 | 68 69 63 68 57 69 6e 64 |dowPtr w|hichWind|
|00003d90| 6f 77 3b 0a 7b 0a 20 20 | 20 20 52 65 63 74 20 73 |ow;.{. | Rect s|
|00003da0| 69 7a 65 52 65 63 74 3b | 0a 20 20 20 20 6c 6f 6e |izeRect;|. lon|
|00003db0| 67 20 6e 65 77 53 69 7a | 65 3b 0a 20 20 20 20 69 |g newSiz|e;. i|
|00003dc0| 66 20 28 77 68 69 63 68 | 57 69 6e 64 6f 77 20 21 |f (which|Window !|
|00003dd0| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 20 |= FrontW|indow() |
|00003de0| 26 26 20 77 68 69 63 68 | 57 69 6e 64 6f 77 20 21 |&& which|Window !|
|00003df0| 3d 20 67 77 69 6e 64 6f | 77 29 0a 09 53 65 6c 65 |= gwindo|w)..Sele|
|00003e00| 63 74 57 69 6e 64 6f 77 | 28 77 68 69 63 68 57 69 |ctWindow|(whichWi|
|00003e10| 6e 64 6f 77 29 3b 0a 20 | 20 20 20 65 6c 73 65 20 |ndow);. | else |
|00003e20| 7b 0a 09 53 65 74 52 65 | 63 74 28 26 73 69 7a 65 |{..SetRe|ct(&size|
|00003e30| 52 65 63 74 2c 4d 69 6e | 57 69 64 74 68 2c 4d 69 |Rect,Min|Width,Mi|
|00003e40| 6e 48 65 69 67 68 74 2c | 73 63 72 65 65 6e 57 69 |nHeight,|screenWi|
|00003e50| 64 74 68 2c 73 63 72 65 | 65 6e 48 65 69 67 68 74 |dth,scre|enHeight|
|00003e60| 2d 4d 65 6e 75 42 61 72 | 48 65 69 67 68 74 29 3b |-MenuBar|Height);|
|00003e70| 0a 09 6e 65 77 53 69 7a | 65 20 3d 20 47 72 6f 77 |..newSiz|e = Grow|
|00003e80| 57 69 6e 64 6f 77 28 77 | 68 69 63 68 57 69 6e 64 |Window(w|hichWind|
|00003e90| 6f 77 2c 6d 79 45 76 65 | 6e 74 2d 3e 77 68 65 72 |ow,myEve|nt->wher|
|00003ea0| 65 2c 26 73 69 7a 65 52 | 65 63 74 29 3b 0a 09 69 |e,&sizeR|ect);..i|
|00003eb0| 66 20 28 6e 65 77 53 69 | 7a 65 29 20 7b 0a 09 20 |f (newSi|ze) {.. |
|00003ec0| 20 20 20 45 72 61 73 65 | 52 65 63 74 28 26 77 68 | Erase|Rect(&wh|
|00003ed0| 69 63 68 57 69 6e 64 6f | 77 2d 3e 70 6f 72 74 52 |ichWindo|w->portR|
|00003ee0| 65 63 74 29 3b 0a 09 20 | 20 20 20 53 69 7a 65 57 |ect);.. | SizeW|
|00003ef0| 69 6e 64 6f 77 28 77 68 | 69 63 68 57 69 6e 64 6f |indow(wh|ichWindo|
|00003f00| 77 2c 4c 6f 57 6f 72 64 | 28 6e 65 77 53 69 7a 65 |w,LoWord|(newSize|
|00003f10| 29 2c 48 69 57 6f 72 64 | 28 6e 65 77 53 69 7a 65 |),HiWord|(newSize|
|00003f20| 29 2c 2d 31 29 3b 0a 09 | 20 20 20 20 49 6e 76 61 |),-1);..| Inva|
|00003f30| 6c 52 65 63 74 28 26 77 | 68 69 63 68 57 69 6e 64 |lRect(&w|hichWind|
|00003f40| 6f 77 2d 3e 70 6f 72 74 | 52 65 63 74 29 3b 0a 09 |ow->port|Rect);..|
|00003f50| 20 20 20 20 53 65 74 75 | 70 53 63 72 65 65 6e 28 | Setu|pScreen(|
|00003f60| 29 3b 0a 09 20 20 20 20 | 73 63 72 66 6c 75 73 68 |);.. |scrflush|
|00003f70| 28 29 3b 0a 09 7d 0a 20 | 20 20 20 7d 0a 7d 0a 0a |();..}. | }.}..|
|00003f80| 44 6f 43 6f 6e 74 65 6e | 74 28 6d 79 45 76 65 6e |DoConten|t(myEven|
|00003f90| 74 2c 77 68 69 63 68 57 | 69 6e 64 6f 77 29 0a 20 |t,whichW|indow). |
|00003fa0| 20 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 6d 79 | EventRe|cord *my|
|00003fb0| 45 76 65 6e 74 3b 0a 20 | 20 57 69 6e 64 6f 77 50 |Event;. | WindowP|
|00003fc0| 74 72 20 77 68 69 63 68 | 57 69 6e 64 6f 77 3b 0a |tr which|Window;.|
|00003fd0| 7b 0a 20 20 20 20 69 66 | 20 28 77 68 69 63 68 57 |{. if| (whichW|
|00003fe0| 69 6e 64 6f 77 20 21 3d | 20 46 72 6f 6e 74 57 69 |indow !=| FrontWi|
|00003ff0| 6e 64 6f 77 28 29 20 26 | 26 20 77 68 69 63 68 57 |ndow() &|& whichW|
|00004000| 69 6e 64 6f 77 20 21 3d | 20 67 77 69 6e 64 6f 77 |indow !=| gwindow|
|00004010| 29 0a 09 53 65 6c 65 63 | 74 57 69 6e 64 6f 77 28 |)..Selec|tWindow(|
|00004020| 77 68 69 63 68 57 69 6e | 64 6f 77 29 3b 0a 7d 0a |whichWin|dow);.}.|
|00004030| 0a 44 6f 4b 65 79 50 72 | 65 73 73 28 6d 79 45 76 |.DoKeyPr|ess(myEv|
|00004040| 65 6e 74 29 0a 20 20 45 | 76 65 6e 74 52 65 63 6f |ent). E|ventReco|
|00004050| 72 64 20 2a 6d 79 45 76 | 65 6e 74 3b 0a 7b 0a 20 |rd *myEv|ent;.{. |
|00004060| 20 20 20 6c 6f 6e 67 20 | 63 68 6f 69 63 65 3b 0a | long |choice;.|
|00004070| 20 20 20 20 0a 20 20 20 | 20 69 66 20 28 46 72 6f | . | if (Fro|
|00004080| 6e 74 57 69 6e 64 6f 77 | 28 29 20 3d 3d 20 63 77 |ntWindow|() == cw|
|00004090| 69 6e 64 6f 77 29 20 7b | 0a 09 69 66 20 28 6d 79 |indow) {|..if (my|
|000040a0| 45 76 65 6e 74 2d 3e 6d | 6f 64 69 66 69 65 72 73 |Event->m|odifiers|
|000040b0| 20 26 20 30 78 31 30 30 | 29 20 7b 0a 09 20 20 20 | & 0x100|) {.. |
|000040c0| 20 69 66 20 28 63 68 6f | 69 63 65 20 3d 20 4d 65 | if (cho|ice = Me|
|000040d0| 6e 75 4b 65 79 28 28 63 | 68 61 72 29 6d 79 45 76 |nuKey((c|har)myEv|
|000040e0| 65 6e 74 2d 3e 6d 65 73 | 73 61 67 65 29 29 0a 09 |ent->mes|sage))..|
|000040f0| 09 44 6f 43 6f 6d 6d 61 | 6e 64 28 63 68 6f 69 63 |.DoComma|nd(choic|
|00004100| 65 29 3b 0a 09 7d 0a 09 | 65 6c 73 65 20 7b 0a 09 |e);..}..|else {..|
|00004110| 20 20 20 20 69 66 20 28 | 63 68 61 72 63 6e 74 20 | if (|charcnt |
|00004120| 3c 20 43 48 41 52 4d 41 | 58 29 20 7b 0a 09 09 2a |< CHARMA|X) {...*|
|00004130| 69 6e 70 74 72 2b 2b 20 | 3d 20 6d 79 45 76 65 6e |inptr++ |= myEven|
|00004140| 74 2d 3e 6d 65 73 73 61 | 67 65 20 26 20 30 78 46 |t->messa|ge & 0xF|
|00004150| 46 3b 20 63 68 61 72 63 | 6e 74 2b 2b 3b 0a 09 09 |F; charc|nt++;...|
|00004160| 69 66 20 28 69 6e 70 74 | 72 20 3e 3d 20 26 63 68 |if (inpt|r >= &ch|
|00004170| 61 72 62 75 66 5b 43 48 | 41 52 4d 41 58 5d 29 0a |arbuf[CH|ARMAX]).|
|00004180| 09 09 20 20 20 20 69 6e | 70 74 72 20 3d 20 63 68 |.. in|ptr = ch|
|00004190| 61 72 62 75 66 3b 0a 09 | 20 20 20 20 7d 0a 09 7d |arbuf;..| }..}|
|000041a0| 0a 20 20 20 20 7d 0a 7d | 0a 0a 44 6f 41 63 74 69 |. }.}|..DoActi|
|000041b0| 76 61 74 65 28 6d 79 45 | 76 65 6e 74 29 0a 20 20 |vate(myE|vent). |
|000041c0| 45 76 65 6e 74 52 65 63 | 6f 72 64 20 2a 6d 79 45 |EventRec|ord *myE|
|000041d0| 76 65 6e 74 3b 0a 7b 0a | 20 20 20 20 57 69 6e 64 |vent;.{.| Wind|
|000041e0| 6f 77 50 74 72 20 77 68 | 69 63 68 57 69 6e 64 6f |owPtr wh|ichWindo|
|000041f0| 77 3b 0a 20 20 20 20 77 | 68 69 63 68 57 69 6e 64 |w;. w|hichWind|
|00004200| 6f 77 20 3d 20 28 57 69 | 6e 64 6f 77 50 74 72 29 |ow = (Wi|ndowPtr)|
|00004210| 6d 79 45 76 65 6e 74 2d | 3e 6d 65 73 73 61 67 65 |myEvent-|>message|
|00004220| 3b 0a 20 20 20 20 53 65 | 74 50 6f 72 74 28 77 68 |;. Se|tPort(wh|
|00004230| 69 63 68 57 69 6e 64 6f | 77 29 3b 0a 20 20 20 20 |ichWindo|w);. |
|00004240| 69 66 20 28 77 68 69 63 | 68 57 69 6e 64 6f 77 20 |if (whic|hWindow |
|00004250| 3d 3d 20 63 77 69 6e 64 | 6f 77 29 0a 09 44 72 61 |== cwind|ow)..Dra|
|00004260| 77 47 72 6f 77 49 63 6f | 6e 28 77 68 69 63 68 57 |wGrowIco|n(whichW|
|00004270| 69 6e 64 6f 77 29 3b 0a | 7d 0a 0a 44 6f 55 70 64 |indow);.|}..DoUpd|
|00004280| 61 74 65 28 6d 79 45 76 | 65 6e 74 29 0a 20 20 45 |ate(myEv|ent). E|
|00004290| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 6d 79 45 76 |ventReco|rd *myEv|
|000042a0| 65 6e 74 3b 0a 7b 0a 20 | 20 20 20 57 69 6e 64 6f |ent;.{. | Windo|
|000042b0| 77 50 74 72 20 77 68 69 | 63 68 57 69 6e 64 6f 77 |wPtr whi|chWindow|
|000042c0| 3b 0a 20 20 20 20 47 72 | 61 66 50 74 72 20 73 61 |;. Gr|afPtr sa|
|000042d0| 76 65 50 6f 72 74 3b 0a | 20 20 20 20 47 65 74 50 |vePort;.| GetP|
|000042e0| 6f 72 74 28 26 73 61 76 | 65 50 6f 72 74 29 3b 0a |ort(&sav|ePort);.|
|000042f0| 20 20 20 20 77 68 69 63 | 68 57 69 6e 64 6f 77 20 | whic|hWindow |
|00004300| 3d 20 28 57 69 6e 64 6f | 77 50 74 72 29 6d 79 45 |= (Windo|wPtr)myE|
|00004310| 76 65 6e 74 2d 3e 6d 65 | 73 73 61 67 65 3b 0a 20 |vent->me|ssage;. |
|00004320| 20 20 20 53 65 74 50 6f | 72 74 28 77 68 69 63 68 | SetPo|rt(which|
|00004330| 57 69 6e 64 6f 77 29 3b | 0a 20 20 20 20 42 65 67 |Window);|. Beg|
|00004340| 69 6e 55 70 64 61 74 65 | 28 77 68 69 63 68 57 69 |inUpdate|(whichWi|
|00004350| 6e 64 6f 77 29 3b 0a 20 | 20 20 20 45 72 61 73 65 |ndow);. | Erase|
|00004360| 52 65 63 74 28 26 77 68 | 69 63 68 57 69 6e 64 6f |Rect(&wh|ichWindo|
|00004370| 77 2d 3e 70 6f 72 74 52 | 65 63 74 29 3b 0a 20 20 |w->portR|ect);. |
|00004380| 20 20 69 66 20 28 77 68 | 69 63 68 57 69 6e 64 6f | if (wh|ichWindo|
|00004390| 77 20 3d 3d 20 63 77 69 | 6e 64 6f 77 29 20 7b 0a |w == cwi|ndow) {.|
|000043a0| 09 44 72 61 77 47 72 6f | 77 49 63 6f 6e 28 77 68 |.DrawGro|wIcon(wh|
|000043b0| 69 63 68 57 69 6e 64 6f | 77 29 3b 0a 09 52 65 64 |ichWindo|w);..Red|
|000043c0| 72 61 77 53 63 72 65 65 | 6e 28 29 3b 0a 20 20 20 |rawScree|n();. |
|000043d0| 20 7d 0a 20 20 20 20 45 | 6e 64 55 70 64 61 74 65 | }. E|ndUpdate|
|000043e0| 28 77 68 69 63 68 57 69 | 6e 64 6f 77 29 3b 0a 20 |(whichWi|ndow);. |
|000043f0| 20 20 20 53 65 74 50 6f | 72 74 28 73 61 76 65 50 | SetPo|rt(saveP|
|00004400| 6f 72 74 29 3b 0a 7d 0a | 0a 44 6f 43 6f 6d 6d 61 |ort);.}.|.DoComma|
|00004410| 6e 64 28 63 68 6f 69 63 | 65 29 0a 20 20 6c 6f 6e |nd(choic|e). lon|
|00004420| 67 20 63 68 6f 69 63 65 | 3b 0a 7b 0a 20 20 20 20 |g choice|;.{. |
|00004430| 69 6e 74 20 74 68 65 4d | 65 6e 75 2c 74 68 65 49 |int theM|enu,theI|
|00004440| 74 65 6d 3b 0a 20 20 20 | 20 0a 20 20 20 20 2f 2a |tem;. | . /*|
|00004450| 20 64 65 63 6f 64 65 20 | 74 68 65 20 6d 65 6e 75 | decode |the menu|
|00004460| 20 63 68 6f 69 63 65 20 | 2a 2f 0a 20 20 20 20 74 | choice |*/. t|
|00004470| 68 65 4d 65 6e 75 20 3d | 20 48 69 57 6f 72 64 28 |heMenu =| HiWord(|
|00004480| 63 68 6f 69 63 65 29 3b | 0a 20 20 20 20 74 68 65 |choice);|. the|
|00004490| 49 74 65 6d 20 3d 20 4c | 6f 57 6f 72 64 28 63 68 |Item = L|oWord(ch|
|000044a0| 6f 69 63 65 29 3b 0a 20 | 20 20 20 0a 20 20 20 20 |oice);. | . |
|000044b0| 43 75 72 73 6f 72 4f 66 | 66 28 29 3b 0a 20 20 20 |CursorOf|f();. |
|000044c0| 20 48 69 6c 69 74 65 4d | 65 6e 75 28 74 68 65 4d | HiliteM|enu(theM|
|000044d0| 65 6e 75 29 3b 0a 20 20 | 20 20 73 77 69 74 63 68 |enu);. | switch|
|000044e0| 20 28 74 68 65 4d 65 6e | 75 29 20 7b 0a 20 20 20 | (theMen|u) {. |
|000044f0| 20 63 61 73 65 20 61 70 | 70 6c 65 49 44 3a 0a 09 | case ap|pleID:..|
|00004500| 44 6f 41 70 70 6c 65 4d | 65 6e 75 28 74 68 65 49 |DoAppleM|enu(theI|
|00004510| 74 65 6d 29 3b 0a 09 62 | 72 65 61 6b 3b 0a 20 20 |tem);..b|reak;. |
|00004520| 20 20 63 61 73 65 20 66 | 69 6c 65 49 44 3a 0a 09 | case f|ileID:..|
|00004530| 44 6f 46 69 6c 65 4d 65 | 6e 75 28 74 68 65 49 74 |DoFileMe|nu(theIt|
|00004540| 65 6d 29 3b 0a 09 62 72 | 65 61 6b 3b 0a 20 20 20 |em);..br|eak;. |
|00004550| 20 63 61 73 65 20 65 64 | 69 74 49 44 3a 0a 09 44 | case ed|itID:..D|
|00004560| 6f 45 64 69 74 4d 65 6e | 75 28 74 68 65 49 74 65 |oEditMen|u(theIte|
|00004570| 6d 29 3b 0a 09 62 72 65 | 61 6b 3b 0a 20 20 20 20 |m);..bre|ak;. |
|00004580| 63 61 73 65 20 63 6f 6e | 74 72 6f 6c 49 44 3a 0a |case con|trolID:.|
|00004590| 09 44 6f 43 6f 6e 74 72 | 6f 6c 4d 65 6e 75 28 74 |.DoContr|olMenu(t|
|000045a0| 68 65 49 74 65 6d 29 3b | 0a 09 62 72 65 61 6b 3b |heItem);|..break;|
|000045b0| 0a 20 20 20 20 7d 0a 20 | 20 20 20 48 69 6c 69 74 |. }. | Hilit|
|000045c0| 65 4d 65 6e 75 28 30 29 | 3b 0a 20 20 20 20 43 75 |eMenu(0)|;. Cu|
|000045d0| 72 73 6f 72 4f 6e 28 29 | 3b 0a 7d 0a 0a 70 61 73 |rsorOn()|;.}..pas|
|000045e0| 63 61 6c 20 61 62 6f 75 | 74 66 69 6c 74 65 72 28 |cal abou|tfilter(|
|000045f0| 74 68 65 44 69 61 6c 6f | 67 2c 74 68 65 45 76 65 |theDialo|g,theEve|
|00004600| 6e 74 2c 69 74 65 6d 48 | 69 74 29 0a 20 20 44 69 |nt,itemH|it). Di|
|00004610| 61 6c 6f 67 50 74 72 20 | 74 68 65 44 69 61 6c 6f |alogPtr |theDialo|
|00004620| 67 3b 20 45 76 65 6e 74 | 52 65 63 6f 72 64 20 2a |g; Event|Record *|
|00004630| 74 68 65 45 76 65 6e 74 | 3b 20 69 6e 74 20 2a 69 |theEvent|; int *i|
|00004640| 74 65 6d 48 69 74 3b 0a | 7b 0a 20 20 20 20 72 65 |temHit;.|{. re|
|00004650| 74 75 72 6e 20 28 74 68 | 65 45 76 65 6e 74 2d 3e |turn (th|eEvent->|
|00004660| 77 68 61 74 20 3d 3d 20 | 6d 6f 75 73 65 44 6f 77 |what == |mouseDow|
|00004670| 6e 20 3f 20 2d 31 20 3a | 20 30 29 3b 0a 7d 0a 0a |n ? -1 :| 0);.}..|
|00004680| 44 6f 41 70 70 6c 65 4d | 65 6e 75 28 74 68 65 49 |DoAppleM|enu(theI|
|00004690| 74 65 6d 29 0a 20 20 69 | 6e 74 20 74 68 65 49 74 |tem). i|nt theIt|
|000046a0| 65 6d 3b 0a 7b 0a 20 20 | 20 20 44 69 61 6c 6f 67 |em;.{. | Dialog|
|000046b0| 52 65 63 6f 72 64 20 6d | 79 64 69 61 6c 6f 67 3b |Record m|ydialog;|
|000046c0| 0a 20 20 20 20 63 68 61 | 72 20 6e 61 6d 65 5b 32 |. cha|r name[2|
|000046d0| 35 36 5d 3b 0a 20 20 20 | 20 47 72 61 66 50 74 72 |56];. | GrafPtr|
|000046e0| 20 67 70 3b 0a 20 20 20 | 20 69 6e 74 20 6e 3b 0a | gp;. | int n;.|
|000046f0| 0a 20 20 20 20 73 77 69 | 74 63 68 20 28 74 68 65 |. swi|tch (the|
|00004700| 49 74 65 6d 29 20 7b 0a | 20 20 20 20 63 61 73 65 |Item) {.| case|
|00004710| 20 31 3a 0a 09 47 65 74 | 4e 65 77 44 69 61 6c 6f | 1:..Get|NewDialo|
|00004720| 67 28 31 32 39 2c 26 6d | 79 64 69 61 6c 6f 67 2c |g(129,&m|ydialog,|
|00004730| 2d 31 4c 29 3b 0a 09 4d | 6f 64 61 6c 44 69 61 6c |-1L);..M|odalDial|
|00004740| 6f 67 28 61 62 6f 75 74 | 66 69 6c 74 65 72 2c 26 |og(about|filter,&|
|00004750| 6e 29 3b 0a 09 43 6c 6f | 73 65 44 69 61 6c 6f 67 |n);..Clo|seDialog|
|00004760| 28 26 6d 79 64 69 61 6c | 6f 67 29 3b 0a 09 62 72 |(&mydial|og);..br|
|00004770| 65 61 6b 3b 0a 20 20 20 | 20 64 65 66 61 75 6c 74 |eak;. | default|
|00004780| 3a 0a 09 47 65 74 49 74 | 65 6d 28 61 70 70 6c 65 |:..GetIt|em(apple|
|00004790| 4d 65 6e 75 2c 74 68 65 | 49 74 65 6d 2c 6e 61 6d |Menu,the|Item,nam|
|000047a0| 65 29 3b 0a 09 47 65 74 | 50 6f 72 74 28 26 67 70 |e);..Get|Port(&gp|
|000047b0| 29 3b 0a 09 4f 70 65 6e | 44 65 73 6b 41 63 63 28 |);..Open|DeskAcc(|
|000047c0| 6e 61 6d 65 29 3b 0a 09 | 53 65 74 50 6f 72 74 28 |name);..|SetPort(|
|000047d0| 67 70 29 3b 0a 09 62 72 | 65 61 6b 3b 0a 20 20 20 |gp);..br|eak;. |
|000047e0| 20 7d 0a 7d 0a 0a 70 61 | 73 63 61 6c 20 69 6e 74 | }.}..pa|scal int|
|000047f0| 20 66 69 6c 65 66 69 6c | 74 65 72 28 70 62 6c 6f | filefil|ter(pblo|
|00004800| 63 6b 29 0a 20 20 50 61 | 72 6d 42 6c 6b 50 74 72 |ck). Pa|rmBlkPtr|
|00004810| 20 70 62 6c 6f 63 6b 3b | 0a 7b 0a 20 20 20 20 75 | pblock;|.{. u|
|00004820| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 70 3b |nsigned |char *p;|
|00004830| 20 69 6e 74 20 6c 65 6e | 3b 0a 20 20 20 20 70 20 | int len|;. p |
|00004840| 3d 20 70 62 6c 6f 63 6b | 2d 3e 66 69 6c 65 50 61 |= pblock|->filePa|
|00004850| 72 61 6d 2e 69 6f 4e 61 | 6d 65 50 74 72 3b 20 6c |ram.ioNa|mePtr; l|
|00004860| 65 6e 20 3d 20 2a 70 2b | 2b 20 26 30 78 46 46 3b |en = *p+|+ &0xFF;|
|00004870| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 6c 65 6e |. ret|urn (len|
|00004880| 20 3e 3d 20 34 20 26 26 | 20 73 74 72 6e 63 6d 70 | >= 4 &&| strncmp|
|00004890| 28 70 2b 6c 65 6e 2d 34 | 2c 22 2e 6c 73 70 22 2c |(p+len-4|,".lsp",|
|000048a0| 34 29 20 3d 3d 20 30 20 | 3f 20 30 20 3a 20 2d 31 |4) == 0 |? 0 : -1|
|000048b0| 29 3b 0a 7d 0a 0a 44 6f | 46 69 6c 65 4d 65 6e 75 |);.}..Do|FileMenu|
|000048c0| 28 74 68 65 49 74 65 6d | 29 0a 20 20 69 6e 74 20 |(theItem|). int |
|000048d0| 74 68 65 49 74 65 6d 3b | 0a 7b 0a 20 20 20 20 53 |theItem;|.{. S|
|000048e0| 46 52 65 70 6c 79 20 6c | 6f 61 64 66 69 6c 65 3b |FReply l|oadfile;|
|000048f0| 0a 20 20 20 20 50 6f 69 | 6e 74 20 70 3b 0a 0a 20 |. Poi|nt p;.. |
|00004900| 20 20 20 73 77 69 74 63 | 68 20 28 74 68 65 49 74 | switc|h (theIt|
|00004910| 65 6d 29 20 7b 0a 20 20 | 20 20 63 61 73 65 20 31 |em) {. | case 1|
|00004920| 3a 09 2f 2a 20 6c 6f 61 | 64 20 2a 2f 0a 20 20 20 |:./* loa|d */. |
|00004930| 20 63 61 73 65 20 32 3a | 09 2f 2a 20 6c 6f 61 64 | case 2:|./* load|
|00004940| 20 6e 6f 69 73 69 6c 79 | 20 2a 2f 0a 09 70 2e 68 | noisily| */..p.h|
|00004950| 20 3d 20 31 30 30 3b 20 | 70 2e 76 20 3d 20 31 30 | = 100; |p.v = 10|
|00004960| 30 3b 0a 09 53 46 47 65 | 74 46 69 6c 65 28 70 2c |0;..SFGe|tFile(p,|
|00004970| 22 5c 50 22 2c 66 69 6c | 65 66 69 6c 74 65 72 2c |"\P",fil|efilter,|
|00004980| 2d 31 2c 66 69 6c 65 74 | 79 70 65 73 2c 30 4c 2c |-1,filet|ypes,0L,|
|00004990| 26 6c 6f 61 64 66 69 6c | 65 29 3b 0a 09 69 66 20 |&loadfil|e);..if |
|000049a0| 28 6c 6f 61 64 66 69 6c | 65 2e 67 6f 6f 64 29 20 |(loadfil|e.good) |
|000049b0| 7b 0a 09 20 20 20 20 48 | 69 6c 69 74 65 4d 65 6e |{.. H|iliteMen|
|000049c0| 75 28 30 29 3b 0a 09 20 | 20 20 20 53 65 74 56 6f |u(0);.. | SetVo|
|000049d0| 6c 28 30 4c 2c 6c 6f 61 | 64 66 69 6c 65 2e 76 52 |l(0L,loa|dfile.vR|
|000049e0| 65 66 4e 75 6d 29 3b 0a | 09 20 20 20 20 69 66 20 |efNum);.|. if |
|000049f0| 28 78 6c 6c 6f 61 64 28 | 50 74 6f 43 73 74 72 28 |(xlload(|PtoCstr(|
|00004a00| 6c 6f 61 64 66 69 6c 65 | 2e 66 4e 61 6d 65 29 2c |loadfile|.fName),|
|00004a10| 31 2c 28 74 68 65 49 74 | 65 6d 20 3d 3d 20 31 20 |1,(theIt|em == 1 |
|00004a20| 3f 20 30 20 3a 20 31 29 | 29 29 0a 09 09 73 63 72 |? 0 : 1)|))...scr|
|00004a30| 66 6c 75 73 68 28 29 3b | 0a 09 20 20 20 20 65 6c |flush();|.. el|
|00004a40| 73 65 0a 09 09 78 6c 61 | 62 6f 72 74 28 22 6c 6f |se...xla|bort("lo|
|00004a50| 61 64 20 65 72 72 6f 72 | 22 29 3b 0a 09 7d 0a 09 |ad error|");..}..|
|00004a60| 62 72 65 61 6b 3b 0a 20 | 20 20 20 63 61 73 65 20 |break;. | case |
|00004a70| 34 3a 09 2f 2a 20 71 75 | 69 74 20 2a 2f 0a 09 77 |4:./* qu|it */..w|
|00004a80| 72 61 70 75 70 28 29 3b | 0a 20 20 20 20 7d 0a 7d |rapup();|. }.}|
|00004a90| 0a 0a 44 6f 45 64 69 74 | 4d 65 6e 75 28 74 68 65 |..DoEdit|Menu(the|
|00004aa0| 49 74 65 6d 29 0a 20 20 | 69 6e 74 20 74 68 65 49 |Item). |int theI|
|00004ab0| 74 65 6d 3b 0a 7b 0a 20 | 20 20 20 73 77 69 74 63 |tem;.{. | switc|
|00004ac0| 68 20 28 74 68 65 49 74 | 65 6d 29 20 7b 0a 20 20 |h (theIt|em) {. |
|00004ad0| 20 20 63 61 73 65 20 31 | 3a 09 2f 2a 20 75 6e 64 | case 1|:./* und|
|00004ae0| 6f 20 2a 2f 0a 20 20 20 | 20 63 61 73 65 20 33 3a |o */. | case 3:|
|00004af0| 09 2f 2a 20 63 75 74 20 | 2a 2f 0a 20 20 20 20 63 |./* cut |*/. c|
|00004b00| 61 73 65 20 34 3a 09 2f | 2a 20 63 6f 70 79 20 2a |ase 4:./|* copy *|
|00004b10| 2f 0a 20 20 20 20 63 61 | 73 65 20 35 3a 09 2f 2a |/. ca|se 5:./*|
|00004b20| 20 70 61 73 74 65 20 2a | 2f 0a 20 20 20 20 63 61 | paste *|/. ca|
|00004b30| 73 65 20 36 3a 09 2f 2a | 20 63 6c 65 61 72 20 2a |se 6:./*| clear *|
|00004b40| 2f 0a 09 53 79 73 74 65 | 6d 45 64 69 74 28 74 68 |/..Syste|mEdit(th|
|00004b50| 65 49 74 65 6d 2d 31 29 | 3b 0a 09 62 72 65 61 6b |eItem-1)|;..break|
|00004b60| 3b 0a 20 20 20 20 7d 0a | 7d 0a 0a 44 6f 43 6f 6e |;. }.|}..DoCon|
|00004b70| 74 72 6f 6c 4d 65 6e 75 | 28 74 68 65 49 74 65 6d |trolMenu|(theItem|
|00004b80| 29 0a 20 20 69 6e 74 20 | 74 68 65 49 74 65 6d 3b |). int |theItem;|
|00004b90| 0a 7b 0a 20 20 20 20 73 | 63 72 66 6c 75 73 68 28 |.{. s|crflush(|
|00004ba0| 29 3b 0a 20 20 20 20 48 | 69 6c 69 74 65 4d 65 6e |);. H|iliteMen|
|00004bb0| 75 28 30 29 3b 0a 20 20 | 20 20 73 77 69 74 63 68 |u(0);. | switch|
|00004bc0| 20 28 74 68 65 49 74 65 | 6d 29 20 7b 0a 20 20 20 | (theIte|m) {. |
|00004bd0| 20 63 61 73 65 20 31 3a | 09 2f 2a 20 62 72 65 61 | case 1:|./* brea|
|00004be0| 6b 20 2a 2f 0a 09 78 6c | 62 72 65 61 6b 28 22 75 |k */..xl|break("u|
|00004bf0| 73 65 72 20 62 72 65 61 | 6b 22 2c 73 5f 75 6e 62 |ser brea|k",s_unb|
|00004c00| 6f 75 6e 64 29 3b 0a 09 | 62 72 65 61 6b 3b 0a 20 |ound);..|break;. |
|00004c10| 20 20 20 63 61 73 65 20 | 32 3a 09 2f 2a 20 63 6f | case |2:./* co|
|00004c20| 6e 74 69 6e 75 65 20 2a | 2f 0a 09 78 6c 63 6f 6e |ntinue *|/..xlcon|
|00004c30| 74 69 6e 75 65 28 29 3b | 0a 09 62 72 65 61 6b 3b |tinue();|..break;|
|00004c40| 0a 20 20 20 20 63 61 73 | 65 20 33 3a 09 2f 2a 20 |. cas|e 3:./* |
|00004c50| 63 6c 65 61 6e 2d 75 70 | 20 65 72 72 6f 72 20 2a |clean-up| error *|
|00004c60| 2f 0a 09 78 6c 63 6c 65 | 61 6e 75 70 28 29 3b 0a |/..xlcle|anup();.|
|00004c70| 09 62 72 65 61 6b 3b 0a | 20 20 20 20 63 61 73 65 |.break;.| case|
|00004c80| 20 34 3a 09 2f 2a 20 43 | 61 6e 63 65 6c 20 69 6e | 4:./* C|ancel in|
|00004c90| 70 75 74 20 2a 2f 0a 09 | 78 6c 61 62 6f 72 74 28 |put */..|xlabort(|
|00004ca0| 22 69 6e 70 75 74 20 63 | 61 6e 63 65 6c 65 64 22 |"input c|anceled"|
|00004cb0| 29 3b 0a 09 62 72 65 61 | 6b 3b 0a 20 20 20 20 63 |);..brea|k;. c|
|00004cc0| 61 73 65 20 35 3a 09 2f | 2a 20 54 6f 70 20 4c 65 |ase 5:./|* Top Le|
|00004cd0| 76 65 6c 20 2a 2f 0a 09 | 78 6c 74 6f 70 6c 65 76 |vel */..|xltoplev|
|00004ce0| 65 6c 28 29 3b 0a 09 62 | 72 65 61 6b 3b 0a 20 20 |el();..b|reak;. |
|00004cf0| 20 20 63 61 73 65 20 37 | 3a 09 2f 2a 20 73 70 6c | case 7|:./* spl|
|00004d00| 69 74 20 73 63 72 65 65 | 6e 20 2a 2f 0a 09 73 63 |it scree|n */..sc|
|00004d10| 72 73 70 6c 69 74 28 73 | 70 6c 69 74 6d 6f 64 65 |rsplit(s|plitmode|
|00004d20| 20 3f 20 46 41 4c 53 45 | 20 3a 20 54 52 55 45 29 | ? FALSE| : TRUE)|
|00004d30| 3b 0a 09 62 72 65 61 6b | 3b 0a 20 20 20 20 7d 0a |;..break|;. }.|
|00004d40| 7d 0a 0a 73 63 72 73 70 | 6c 69 74 28 73 70 6c 69 |}..scrsp|lit(spli|
|00004d50| 74 29 0a 20 20 69 6e 74 | 20 73 70 6c 69 74 3b 0a |t). int| split;.|
|00004d60| 7b 0a 20 20 20 20 53 68 | 6f 77 48 69 64 65 28 63 |{. Sh|owHide(c|
|00004d70| 77 69 6e 64 6f 77 2c 30 | 29 3b 0a 20 20 20 20 69 |window,0|);. i|
|00004d80| 66 20 28 73 70 6c 69 74 | 29 20 7b 0a 09 43 68 65 |f (split|) {..Che|
|00004d90| 63 6b 49 74 65 6d 28 63 | 6f 6e 74 72 6f 6c 4d 65 |ckItem(c|ontrolMe|
|00004da0| 6e 75 2c 37 2c 2d 31 29 | 3b 0a 09 53 68 6f 77 48 |nu,7,-1)|;..ShowH|
|00004db0| 69 64 65 28 67 77 69 6e | 64 6f 77 2c 2d 31 29 3b |ide(gwin|dow,-1);|
|00004dc0| 0a 09 4d 6f 76 65 57 69 | 6e 64 6f 77 28 63 77 69 |..MoveWi|ndow(cwi|
|00004dd0| 6e 64 6f 77 2c 73 48 6f | 72 69 7a 6f 6e 74 61 6c |ndow,sHo|rizontal|
|00004de0| 2c 73 56 65 72 74 69 63 | 61 6c 2c 2d 31 29 3b 0a |,sVertic|al,-1);.|
|00004df0| 09 53 69 7a 65 57 69 6e | 64 6f 77 28 63 77 69 6e |.SizeWin|dow(cwin|
|00004e00| 64 6f 77 2c 73 57 69 64 | 74 68 2c 73 48 65 69 67 |dow,sWid|th,sHeig|
|00004e10| 68 74 2c 2d 31 29 3b 0a | 09 49 6e 76 61 6c 52 65 |ht,-1);.|.InvalRe|
|00004e20| 63 74 28 26 63 77 69 6e | 64 6f 77 2d 3e 70 6f 72 |ct(&cwin|dow->por|
|00004e30| 74 52 65 63 74 29 3b 0a | 09 53 65 74 75 70 53 63 |tRect);.|.SetupSc|
|00004e40| 72 65 65 6e 28 29 3b 0a | 20 20 20 20 7d 0a 20 20 |reen();.| }. |
|00004e50| 20 20 65 6c 73 65 20 7b | 0a 09 43 68 65 63 6b 49 | else {|..CheckI|
|00004e60| 74 65 6d 28 63 6f 6e 74 | 72 6f 6c 4d 65 6e 75 2c |tem(cont|rolMenu,|
|00004e70| 37 2c 30 29 3b 0a 09 53 | 68 6f 77 48 69 64 65 28 |7,0);..S|howHide(|
|00004e80| 67 77 69 6e 64 6f 77 2c | 30 29 3b 0a 09 4d 6f 76 |gwindow,|0);..Mov|
|00004e90| 65 57 69 6e 64 6f 77 28 | 63 77 69 6e 64 6f 77 2c |eWindow(|cwindow,|
|00004ea0| 6e 48 6f 72 69 7a 6f 6e | 74 61 6c 2c 6e 56 65 72 |nHorizon|tal,nVer|
|00004eb0| 74 69 63 61 6c 2c 2d 31 | 29 3b 0a 09 53 69 7a 65 |tical,-1|);..Size|
|00004ec0| 57 69 6e 64 6f 77 28 63 | 77 69 6e 64 6f 77 2c 6e |Window(c|window,n|
|00004ed0| 57 69 64 74 68 2c 6e 48 | 65 69 67 68 74 2c 2d 31 |Width,nH|eight,-1|
|00004ee0| 29 3b 0a 09 49 6e 76 61 | 6c 52 65 63 74 28 26 63 |);..Inva|lRect(&c|
|00004ef0| 77 69 6e 64 6f 77 2d 3e | 70 6f 72 74 52 65 63 74 |window->|portRect|
|00004f00| 29 3b 0a 09 53 65 74 75 | 70 53 63 72 65 65 6e 28 |);..Setu|pScreen(|
|00004f10| 29 3b 0a 20 20 20 20 7d | 0a 20 20 20 20 53 68 6f |);. }|. Sho|
|00004f20| 77 48 69 64 65 28 63 77 | 69 6e 64 6f 77 2c 2d 31 |wHide(cw|indow,-1|
|00004f30| 29 3b 0a 20 20 20 20 73 | 70 6c 69 74 6d 6f 64 65 |);. s|plitmode|
|00004f40| 20 3d 20 73 70 6c 69 74 | 3b 0a 7d 0a 0a 53 65 74 | = split|;.}..Set|
|00004f50| 75 70 53 63 72 65 65 6e | 28 29 0a 7b 0a 20 20 20 |upScreen|().{. |
|00004f60| 20 46 6f 6e 74 49 6e 66 | 6f 20 69 6e 66 6f 3b 0a | FontInf|o info;.|
|00004f70| 20 20 20 20 52 65 63 74 | 20 2a 70 52 65 63 74 3b | Rect| *pRect;|
|00004f80| 0a 0a 20 20 20 20 2f 2a | 20 67 65 74 20 66 6f 6e |.. /*| get fon|
|00004f90| 74 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 2a 2f |t inform|ation */|
|00004fa0| 0a 20 20 20 20 47 65 74 | 46 6f 6e 74 49 6e 66 6f |. Get|FontInfo|
|00004fb0| 28 26 69 6e 66 6f 29 3b | 0a 0a 20 20 20 20 2f 2a |(&info);|.. /*|
|00004fc0| 20 63 6f 6d 70 75 74 65 | 20 74 68 65 20 74 6f 70 | compute| the top|
|00004fd0| 20 61 6e 64 20 62 6f 74 | 74 6f 6d 20 6d 61 72 67 | and bot|tom marg|
|00004fe0| 69 6e 73 20 2a 2f 0a 20 | 20 20 20 74 6d 61 72 67 |ins */. | tmarg|
|00004ff0| 69 6e 20 3d 20 54 65 78 | 74 4d 61 72 67 69 6e 20 |in = Tex|tMargin |
|00005000| 2b 20 69 6e 66 6f 2e 61 | 73 63 65 6e 74 3b 0a 20 |+ info.a|scent;. |
|00005010| 20 20 20 6c 6d 61 72 67 | 69 6e 20 3d 20 54 65 78 | lmarg|in = Tex|
|00005020| 74 4d 61 72 67 69 6e 3b | 0a 0a 20 20 20 20 2f 2a |tMargin;|.. /*|
|00005030| 20 63 6f 6d 70 75 74 65 | 20 74 68 65 20 78 20 61 | compute| the x a|
|00005040| 6e 64 20 79 20 69 6e 63 | 72 65 6d 65 6e 74 73 20 |nd y inc|rements |
|00005050| 2a 2f 0a 20 20 20 20 78 | 69 6e 63 20 3d 20 69 6e |*/. x|inc = in|
|00005060| 66 6f 2e 77 69 64 4d 61 | 78 3b 0a 20 20 20 20 79 |fo.widMa|x;. y|
|00005070| 69 6e 63 20 3d 20 69 6e | 66 6f 2e 61 73 63 65 6e |inc = in|fo.ascen|
|00005080| 74 20 2b 20 69 6e 66 6f | 2e 64 65 73 63 65 6e 74 |t + info|.descent|
|00005090| 20 2b 20 69 6e 66 6f 2e | 6c 65 61 64 69 6e 67 3b | + info.|leading;|
|000050a0| 0a 0a 20 20 20 20 2f 2a | 20 63 6f 6d 70 75 74 65 |.. /*| compute|
|000050b0| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 64 | the cha|racter d|
|000050c0| 69 6d 65 6e 73 69 6f 6e | 73 20 6f 66 20 74 68 65 |imension|s of the|
|000050d0| 20 73 63 72 65 65 6e 20 | 2a 2f 0a 20 20 20 20 70 | screen |*/. p|
|000050e0| 52 65 63 74 20 3d 20 26 | 63 77 69 6e 64 6f 77 2d |Rect = &|cwindow-|
|000050f0| 3e 70 6f 72 74 52 65 63 | 74 3b 0a 20 20 20 20 73 |>portRec|t;. s|
|00005100| 63 72 68 20 3d 20 28 70 | 52 65 63 74 2d 3e 62 6f |crh = (p|Rect->bo|
|00005110| 74 74 6f 6d 20 2d 20 28 | 32 20 2a 20 54 65 78 74 |ttom - (|2 * Text|
|00005120| 4d 61 72 67 69 6e 29 20 | 2d 20 28 53 42 61 72 57 |Margin) |- (SBarW|
|00005130| 69 64 74 68 20 2d 20 31 | 29 29 20 2f 20 79 69 6e |idth - 1|)) / yin|
|00005140| 63 3b 0a 20 20 20 20 69 | 66 20 28 73 63 72 68 20 |c;. i|f (scrh |
|00005150| 3e 20 53 43 52 48 29 20 | 73 63 72 68 20 3d 20 53 |> SCRH) |scrh = S|
|00005160| 43 52 48 3b 0a 20 20 20 | 20 73 63 72 77 20 3d 20 |CRH;. | scrw = |
|00005170| 28 70 52 65 63 74 2d 3e | 72 69 67 68 74 20 2d 20 |(pRect->|right - |
|00005180| 28 32 20 2a 20 54 65 78 | 74 4d 61 72 67 69 6e 29 |(2 * Tex|tMargin)|
|00005190| 20 2d 20 28 53 42 61 72 | 57 69 64 74 68 20 2d 20 | - (SBar|Width - |
|000051a0| 31 29 29 20 2f 20 78 69 | 6e 63 3b 0a 20 20 20 20 |1)) / xi|nc;. |
|000051b0| 69 66 20 28 73 63 72 77 | 20 3e 20 53 43 52 57 29 |if (scrw| > SCRW)|
|000051c0| 20 73 63 72 77 20 3d 20 | 53 43 52 57 3b 0a 20 20 | scrw = |SCRW;. |
|000051d0| 20 20 0a 20 20 20 20 2f | 2a 20 63 6c 65 61 72 20 | . /|* clear |
|000051e0| 74 68 65 20 73 63 72 65 | 65 6e 20 2a 2f 0a 20 20 |the scre|en */. |
|000051f0| 20 20 73 63 72 63 6c 65 | 61 72 28 29 3b 0a 7d 0a | scrcle|ar();.}.|
|00005200| 0a 43 75 72 73 6f 72 55 | 70 64 61 74 65 28 29 0a |.CursorU|pdate().|
|00005210| 7b 0a 20 20 20 20 69 66 | 20 28 63 75 72 73 6f 72 |{. if| (cursor|
|00005220| 73 74 61 74 65 20 21 3d | 20 2d 31 29 0a 09 69 66 |state !=| -1)..if|
|00005230| 20 28 63 75 72 73 6f 72 | 74 69 6d 65 20 3c 20 54 | (cursor|time < T|
|00005240| 69 63 6b 43 6f 75 6e 74 | 28 29 29 20 7b 0a 09 20 |ickCount|()) {.. |
|00005250| 20 20 20 73 63 72 70 6f | 73 69 74 69 6f 6e 28 78 | scrpo|sition(x|
|00005260| 2c 79 29 3b 0a 09 20 20 | 20 20 69 66 20 28 63 75 |,y);.. | if (cu|
|00005270| 72 73 6f 72 73 74 61 74 | 65 29 20 7b 0a 09 09 44 |rsorstat|e) {...D|
|00005280| 72 61 77 43 68 61 72 28 | 27 20 27 29 3b 0a 09 09 |rawChar(|' ');...|
|00005290| 63 75 72 73 6f 72 74 69 | 6d 65 20 3d 20 54 69 63 |cursorti|me = Tic|
|000052a0| 6b 43 6f 75 6e 74 28 29 | 20 2b 20 54 49 4d 45 4f |kCount()| + TIMEO|
|000052b0| 46 46 3b 0a 09 09 63 75 | 72 73 6f 72 73 74 61 74 |FF;...cu|rsorstat|
|000052c0| 65 20 3d 20 30 3b 0a 09 | 20 20 20 20 7d 0a 09 20 |e = 0;..| }.. |
|000052d0| 20 20 20 65 6c 73 65 20 | 7b 0a 09 09 44 72 61 77 | else |{...Draw|
|000052e0| 43 68 61 72 28 27 5f 27 | 29 3b 0a 09 09 63 75 72 |Char('_'|);...cur|
|000052f0| 73 6f 72 74 69 6d 65 20 | 3d 20 54 69 63 6b 43 6f |sortime |= TickCo|
|00005300| 75 6e 74 28 29 20 2b 20 | 54 49 4d 45 4f 4e 3b 0a |unt() + |TIMEON;.|
|00005310| 09 09 63 75 72 73 6f 72 | 73 74 61 74 65 20 3d 20 |..cursor|state = |
|00005320| 31 3b 0a 09 20 20 20 20 | 7d 0a 09 7d 0a 7d 0a 0a |1;.. |}..}.}..|
|00005330| 43 75 72 73 6f 72 4f 6e | 28 29 0a 7b 0a 20 20 20 |CursorOn|().{. |
|00005340| 20 63 75 72 73 6f 72 74 | 69 6d 65 20 3d 20 54 69 | cursort|ime = Ti|
|00005350| 63 6b 43 6f 75 6e 74 28 | 29 3b 0a 20 20 20 20 63 |ckCount(|);. c|
|00005360| 75 72 73 6f 72 73 74 61 | 74 65 20 3d 20 30 3b 0a |ursorsta|te = 0;.|
|00005370| 7d 0a 0a 43 75 72 73 6f | 72 4f 66 66 28 29 0a 7b |}..Curso|rOff().{|
|00005380| 0a 20 20 20 20 69 66 20 | 28 63 75 72 73 6f 72 73 |. if |(cursors|
|00005390| 74 61 74 65 20 3d 3d 20 | 31 29 20 7b 0a 09 73 63 |tate == |1) {..sc|
|000053a0| 72 70 6f 73 69 74 69 6f | 6e 28 78 2c 79 29 3b 0a |rpositio|n(x,y);.|
|000053b0| 09 44 72 61 77 43 68 61 | 72 28 27 20 27 29 3b 0a |.DrawCha|r(' ');.|
|000053c0| 20 20 20 20 7d 0a 20 20 | 20 20 63 75 72 73 6f 72 | }. | cursor|
|000053d0| 73 74 61 74 65 20 3d 20 | 2d 31 3b 0a 7d 0a 0a 52 |state = |-1;.}..R|
|000053e0| 65 64 72 61 77 53 63 72 | 65 65 6e 28 29 0a 7b 0a |edrawScr|een().{.|
|000053f0| 20 20 20 20 63 68 61 72 | 20 2a 4c 69 6e 65 3b 20 | char| *Line; |
|00005400| 69 6e 74 20 79 3b 0a 20 | 20 20 20 4c 69 6e 65 20 |int y;. | Line |
|00005410| 3d 20 74 6f 70 6c 69 6e | 65 3b 0a 20 20 20 20 66 |= toplin|e;. f|
|00005420| 6f 72 20 28 79 20 3d 20 | 30 3b 20 79 20 3c 20 73 |or (y = |0; y < s|
|00005430| 63 72 68 3b 20 79 2b 2b | 29 20 7b 0a 09 73 63 72 |crh; y++|) {..scr|
|00005440| 70 6f 73 69 74 69 6f 6e | 28 30 2c 79 29 3b 0a 09 |position|(0,y);..|
|00005450| 44 72 61 77 54 65 78 74 | 28 4c 69 6e 65 2c 30 2c |DrawText|(Line,0,|
|00005460| 73 63 72 77 29 3b 0a 09 | 6e 65 78 74 6c 69 6e 65 |scrw);..|nextline|
|00005470| 28 26 4c 69 6e 65 29 3b | 0a 20 20 20 20 7d 0a 7d |(&Line);|. }.}|
|00005480| 0a 0a 6e 65 78 74 6c 69 | 6e 65 28 70 6c 69 6e 65 |..nextli|ne(pline|
|00005490| 29 0a 20 20 63 68 61 72 | 20 2a 2a 70 6c 69 6e 65 |). char| **pline|
|000054a0| 3b 0a 7b 0a 20 20 20 20 | 69 66 20 28 28 2a 70 6c |;.{. |if ((*pl|
|000054b0| 69 6e 65 20 2b 3d 20 53 | 43 52 57 29 20 3e 3d 20 |ine += S|CRW) >= |
|000054c0| 26 73 63 72 65 65 6e 5b | 53 43 52 48 2a 53 43 52 |&screen[|SCRH*SCR|
|000054d0| 57 5d 29 0a 09 2a 70 6c | 69 6e 65 20 3d 20 73 63 |W])..*pl|ine = sc|
|000054e0| 72 65 65 6e 3b 0a 7d 0a | 0a 73 63 72 6f 6c 6c 75 |reen;.}.|.scrollu|
|000054f0| 70 28 29 0a 7b 0a 20 20 | 20 20 52 67 6e 48 61 6e |p().{. | RgnHan|
|00005500| 64 6c 65 20 75 70 64 61 | 74 65 52 67 6e 3b 0a 20 |dle upda|teRgn;. |
|00005510| 20 20 20 52 65 63 74 20 | 72 65 63 74 3b 0a 20 20 | Rect |rect;. |
|00005520| 20 20 69 6e 74 20 78 3b | 0a 20 20 20 20 75 70 64 | int x;|. upd|
|00005530| 61 74 65 52 67 6e 20 3d | 20 4e 65 77 52 67 6e 28 |ateRgn =| NewRgn(|
|00005540| 29 3b 0a 20 20 20 20 72 | 65 63 74 20 3d 20 63 77 |);. r|ect = cw|
|00005550| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 3b |indow->p|ortRect;|
|00005560| 0a 20 20 20 20 72 65 63 | 74 2e 62 6f 74 74 6f 6d |. rec|t.bottom|
|00005570| 20 2d 3d 20 53 42 61 72 | 57 69 64 74 68 20 2d 20 | -= SBar|Width - |
|00005580| 31 3b 0a 20 20 20 20 72 | 65 63 74 2e 72 69 67 68 |1;. r|ect.righ|
|00005590| 74 20 2d 3d 20 53 42 61 | 72 57 69 64 74 68 20 2d |t -= SBa|rWidth -|
|000055a0| 20 31 3b 0a 20 20 20 20 | 53 63 72 6f 6c 6c 52 65 | 1;. |ScrollRe|
|000055b0| 63 74 28 26 72 65 63 74 | 2c 30 2c 2d 79 69 6e 63 |ct(&rect|,0,-yinc|
|000055c0| 2c 75 70 64 61 74 65 52 | 67 6e 29 3b 0a 20 20 20 |,updateR|gn);. |
|000055d0| 20 44 69 73 70 6f 73 65 | 52 67 6e 28 75 70 64 61 | Dispose|Rgn(upda|
|000055e0| 74 65 52 67 6e 29 3b 0a | 20 20 20 20 66 6f 72 20 |teRgn);.| for |
|000055f0| 28 78 20 3d 20 30 3b 20 | 78 20 3c 20 53 43 52 57 |(x = 0; |x < SCRW|
|00005600| 3b 20 78 2b 2b 29 0a 09 | 74 6f 70 6c 69 6e 65 5b |; x++)..|topline[|
|00005610| 78 5d 20 3d 20 27 20 27 | 3b 0a 20 20 20 20 6e 65 |x] = ' '|;. ne|
|00005620| 78 74 6c 69 6e 65 28 26 | 74 6f 70 6c 69 6e 65 29 |xtline(&|topline)|
|00005630| 3b 0a 7d 0a 0a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |;.}..===|========|
|00005640| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 20 6d 61 |========|===== ma|
|00005650| 63 73 74 75 66 66 2e 63 | 20 3d 3d 3d 3d 3d 3d 3d |cstuff.c| =======|
|00005660| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005670| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005680| 3d 3d 3d 0a 0a 2f 2a 20 | 6d 61 63 73 74 75 66 66 |===../* |macstuff|
|00005690| 2e 63 20 2d 20 6d 61 63 | 69 6e 74 6f 73 68 20 69 |.c - mac|intosh i|
|000056a0| 6e 74 65 72 66 61 63 65 | 20 72 6f 75 74 69 6e 65 |nterface| routine|
|000056b0| 73 20 66 6f 72 20 78 6c | 69 73 70 20 2a 2f 0a 0a |s for xl|isp */..|
|000056c0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|000056d0| 68 3e 0a 0a 2f 2a 20 70 | 72 6f 67 72 61 6d 20 6c |h>../* p|rogram l|
|000056e0| 69 6d 69 74 73 20 2a 2f | 0a 23 64 65 66 69 6e 65 |imits */|.#define|
|000056f0| 20 4c 49 4e 45 4d 41 58 | 20 09 32 30 30 09 2f 2a | LINEMAX| .200./*|
|00005700| 20 6d 61 78 69 6d 75 6d | 20 6c 69 6e 65 20 6c 65 | maximum| line le|
|00005710| 6e 67 74 68 20 2a 2f 0a | 0a 2f 2a 20 65 78 74 65 |ngth */.|./* exte|
|00005720| 72 6e 61 6c 73 20 2a 2f | 0a 65 78 74 65 72 6e 20 |rnals */|.extern |
|00005730| 46 49 4c 45 20 2a 74 66 | 70 3b 0a 65 78 74 65 72 |FILE *tf|p;.exter|
|00005740| 6e 20 69 6e 74 20 78 3b | 0a 0a 2f 2a 20 6c 6f 63 |n int x;|../* loc|
|00005750| 61 6c 20 76 61 72 69 61 | 62 6c 65 73 20 2a 2f 0a |al varia|bles */.|
|00005760| 73 74 61 74 69 63 20 63 | 68 61 72 20 6c 69 6e 65 |static c|har line|
|00005770| 62 75 66 5b 4c 49 4e 45 | 4d 41 58 2b 31 5d 2c 2a |buf[LINE|MAX+1],*|
|00005780| 6c 69 6e 65 70 74 72 3b | 0a 73 74 61 74 69 63 20 |lineptr;|.static |
|00005790| 69 6e 74 20 6c 69 6e 65 | 70 6f 73 5b 4c 49 4e 45 |int line|pos[LINE|
|000057a0| 4d 41 58 5d 2c 6c 69 6e | 65 6c 65 6e 3b 0a 73 74 |MAX],lin|elen;.st|
|000057b0| 61 74 69 63 20 6c 6f 6e | 67 20 72 73 65 65 64 20 |atic lon|g rseed |
|000057c0| 3d 20 31 4c 3b 0a 0a 6f | 73 69 6e 69 74 28 6e 61 |= 1L;..o|sinit(na|
|000057d0| 6d 65 29 0a 20 20 63 68 | 61 72 20 2a 6e 61 6d 65 |me). ch|ar *name|
|000057e0| 3b 0a 7b 0a 20 20 20 20 | 2f 2a 20 69 6e 69 74 69 |;.{. |/* initi|
|000057f0| 61 6c 69 7a 65 20 74 68 | 65 20 6d 61 63 20 69 6e |alize th|e mac in|
|00005800| 74 65 72 66 61 63 65 20 | 72 6f 75 74 69 6e 65 73 |terface |routines|
|00005810| 20 2a 2f 0a 20 20 20 20 | 6d 61 63 69 6e 69 74 28 | */. |macinit(|
|00005820| 29 3b 0a 0a 20 20 20 20 | 2f 2a 20 69 6e 69 74 69 |);.. |/* initi|
|00005830| 61 6c 69 7a 65 20 74 68 | 65 20 6c 69 6e 65 20 65 |alize th|e line e|
|00005840| 64 69 74 6f 72 20 2a 2f | 0a 20 20 20 20 6c 69 6e |ditor */|. lin|
|00005850| 65 6c 65 6e 20 3d 20 30 | 3b 0a 7d 0a 0a 6f 73 66 |elen = 0|;.}..osf|
|00005860| 69 6e 69 73 68 28 29 0a | 7b 0a 7d 0a 0a 6f 73 65 |inish().|{.}..ose|
|00005870| 72 72 6f 72 28 6d 73 67 | 29 0a 7b 0a 20 20 20 20 |rror(msg|).{. |
|00005880| 63 68 61 72 20 6c 69 6e | 65 5b 31 30 30 5d 2c 2a |char lin|e[100],*|
|00005890| 70 3b 0a 20 20 20 20 73 | 70 72 69 6e 74 66 28 6c |p;. s|printf(l|
|000058a0| 69 6e 65 2c 22 65 72 72 | 6f 72 3a 20 25 73 5c 6e |ine,"err|or: %s\n|
|000058b0| 22 2c 6d 73 67 29 3b 0a | 20 20 20 20 66 6f 72 20 |",msg);.| for |
|000058c0| 28 70 20 3d 20 6c 69 6e | 65 3b 20 2a 70 20 21 3d |(p = lin|e; *p !=|
|000058d0| 20 27 5c 30 27 3b 20 2b | 2b 70 29 0a 09 6f 73 74 | '\0'; +|+p)..ost|
|000058e0| 70 75 74 63 28 2a 70 29 | 3b 0a 7d 0a 0a 69 6e 74 |putc(*p)|;.}..int|
|000058f0| 20 6f 73 72 61 6e 64 28 | 6e 29 0a 20 20 69 6e 74 | osrand(|n). int|
|00005900| 20 6e 3b 0a 7b 0a 20 20 | 20 20 6c 6f 6e 67 20 6b | n;.{. | long k|
|00005910| 31 3b 0a 20 20 20 20 0a | 20 20 20 20 2f 2a 20 6d |1;. .| /* m|
|00005920| 61 6b 65 20 73 75 72 65 | 20 77 65 20 64 6f 6e 27 |ake sure| we don'|
|00005930| 74 20 67 65 74 20 73 74 | 75 63 6b 20 61 74 20 7a |t get st|uck at z|
|00005940| 65 72 6f 20 2a 2f 0a 20 | 20 20 20 69 66 20 28 72 |ero */. | if (r|
|00005950| 73 65 65 64 20 3d 3d 20 | 30 4c 29 20 72 73 65 65 |seed == |0L) rsee|
|00005960| 64 20 3d 20 31 4c 3b 0a | 20 20 20 20 0a 20 20 20 |d = 1L;.| . |
|00005970| 20 2f 2a 20 61 6c 67 6f | 72 69 74 68 6d 20 74 61 | /* algo|rithm ta|
|00005980| 6b 65 6e 20 66 72 6f 6d | 20 44 72 2e 20 44 6f 62 |ken from| Dr. Dob|
|00005990| 62 73 20 4a 6f 75 72 6e | 61 6c 2c 20 4e 6f 76 65 |bs Journ|al, Nove|
|000059a0| 6d 62 65 72 20 31 39 38 | 35 2c 20 50 61 67 65 20 |mber 198|5, Page |
|000059b0| 39 31 20 2a 2f 0a 20 20 | 20 20 6b 31 20 3d 20 72 |91 */. | k1 = r|
|000059c0| 73 65 65 64 20 2f 20 31 | 32 37 37 37 33 4c 3b 0a |seed / 1|27773L;.|
|000059d0| 20 20 20 20 69 66 20 28 | 28 72 73 65 65 64 20 3d | if (|(rseed =|
|000059e0| 20 31 36 38 30 37 4c 20 | 2a 20 28 72 73 65 65 64 | 16807L |* (rseed|
|000059f0| 20 2d 20 6b 31 20 2a 20 | 31 32 37 37 37 33 4c 29 | - k1 * |127773L)|
|00005a00| 20 2d 20 6b 31 20 2a 20 | 32 38 33 36 4c 29 20 3c | - k1 * |2836L) <|
|00005a10| 20 30 4c 29 0a 09 72 73 | 65 65 64 20 2b 3d 20 32 | 0L)..rs|eed += 2|
|00005a20| 31 34 37 34 38 33 36 34 | 37 4c 3b 0a 09 0a 20 20 |14748364|7L;... |
|00005a30| 20 20 2f 2a 20 72 65 74 | 75 72 6e 20 61 20 72 61 | /* ret|urn a ra|
|00005a40| 6e 64 6f 6d 20 6e 75 6d | 62 65 72 20 62 65 74 77 |ndom num|ber betw|
|00005a50| 65 65 6e 20 30 20 61 6e | 64 20 6e 2d 31 20 2a 2f |een 0 an|d n-1 */|
|00005a60| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 28 28 69 6e |. ret|urn ((in|
|00005a70| 74 29 28 72 73 65 65 64 | 20 25 20 28 6c 6f 6e 67 |t)(rseed| % (long|
|00005a80| 29 6e 29 29 3b 0a 7d 0a | 0a 46 49 4c 45 20 2a 6f |)n));.}.|.FILE *o|
|00005a90| 73 61 6f 70 65 6e 28 6e | 61 6d 65 2c 6d 6f 64 65 |saopen(n|ame,mode|
|00005aa0| 29 0a 20 20 63 68 61 72 | 20 2a 6e 61 6d 65 2c 2a |). char| *name,*|
|00005ab0| 6d 6f 64 65 3b 0a 7b 0a | 20 20 20 20 72 65 74 75 |mode;.{.| retu|
|00005ac0| 72 6e 20 28 66 6f 70 65 | 6e 28 6e 61 6d 65 2c 6d |rn (fope|n(name,m|
|00005ad0| 6f 64 65 29 29 3b 0a 7d | 0a 0a 46 49 4c 45 20 2a |ode));.}|..FILE *|
|00005ae0| 6f 73 62 6f 70 65 6e 28 | 6e 61 6d 65 2c 6d 6f 64 |osbopen(|name,mod|
|00005af0| 65 29 0a 20 20 63 68 61 | 72 20 2a 6e 61 6d 65 2c |e). cha|r *name,|
|00005b00| 2a 6d 6f 64 65 3b 0a 7b | 0a 20 20 20 20 63 68 61 |*mode;.{|. cha|
|00005b10| 72 20 6e 6d 6f 64 65 5b | 34 5d 3b 0a 20 20 20 20 |r nmode[|4];. |
|00005b20| 73 74 72 63 70 79 28 6e | 6d 6f 64 65 2c 6d 6f 64 |strcpy(n|mode,mod|
|00005b30| 65 29 3b 20 73 74 72 63 | 61 74 28 6e 6d 6f 64 65 |e); strc|at(nmode|
|00005b40| 2c 22 62 22 29 3b 0a 20 | 20 20 20 72 65 74 75 72 |,"b");. | retur|
|00005b50| 6e 20 28 66 6f 70 65 6e | 28 6e 61 6d 65 2c 6e 6d |n (fopen|(name,nm|
|00005b60| 6f 64 65 29 29 3b 0a 7d | 0a 0a 69 6e 74 20 6f 73 |ode));.}|..int os|
|00005b70| 63 6c 6f 73 65 28 66 70 | 29 0a 20 20 46 49 4c 45 |close(fp|). FILE|
|00005b80| 20 2a 66 70 3b 0a 7b 0a | 20 20 20 20 72 65 74 75 | *fp;.{.| retu|
|00005b90| 72 6e 20 28 66 63 6c 6f | 73 65 28 66 70 29 29 3b |rn (fclo|se(fp));|
|00005ba0| 0a 7d 0a 0a 69 6e 74 20 | 6f 73 61 67 65 74 63 28 |.}..int |osagetc(|
|00005bb0| 66 70 29 0a 20 20 46 49 | 4c 45 20 2a 66 70 3b 0a |fp). FI|LE *fp;.|
|00005bc0| 7b 0a 20 20 20 20 72 65 | 74 75 72 6e 20 28 67 65 |{. re|turn (ge|
|00005bd0| 74 63 28 66 70 29 29 3b | 0a 7d 0a 0a 69 6e 74 20 |tc(fp));|.}..int |
|00005be0| 6f 73 62 67 65 74 63 28 | 66 70 29 0a 20 20 46 49 |osbgetc(|fp). FI|
|00005bf0| 4c 45 20 2a 66 70 3b 0a | 7b 0a 20 20 20 20 72 65 |LE *fp;.|{. re|
|00005c00| 74 75 72 6e 20 28 67 65 | 74 63 28 66 70 29 29 3b |turn (ge|tc(fp));|
|00005c10| 0a 7d 0a 0a 69 6e 74 20 | 6f 73 61 70 75 74 63 28 |.}..int |osaputc(|
|00005c20| 63 68 2c 66 70 29 0a 20 | 20 69 6e 74 20 63 68 3b |ch,fp). | int ch;|
|00005c30| 20 46 49 4c 45 20 2a 66 | 70 3b 0a 7b 0a 20 20 20 | FILE *f|p;.{. |
|00005c40| 20 72 65 74 75 72 6e 20 | 28 70 75 74 63 28 63 68 | return |(putc(ch|
|00005c50| 2c 66 70 29 29 3b 0a 7d | 0a 0a 69 6e 74 20 6f 73 |,fp));.}|..int os|
|00005c60| 62 70 75 74 63 28 63 68 | 2c 66 70 29 0a 20 20 69 |bputc(ch|,fp). i|
|00005c70| 6e 74 20 63 68 3b 20 46 | 49 4c 45 20 2a 66 70 3b |nt ch; F|ILE *fp;|
|00005c80| 0a 7b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 28 70 |.{. r|eturn (p|
|00005c90| 75 74 63 28 63 68 2c 66 | 70 29 29 3b 0a 7d 0a 0a |utc(ch,f|p));.}..|
|00005ca0| 69 6e 74 20 6f 73 74 67 | 65 74 63 28 29 0a 7b 0a |int ostg|etc().{.|
|00005cb0| 20 20 20 20 69 6e 74 20 | 63 68 2c 69 3b 0a 0a 20 | int |ch,i;.. |
|00005cc0| 20 20 20 69 66 20 28 6c | 69 6e 65 6c 65 6e 2d 2d | if (l|inelen--|
|00005cd0| 29 20 72 65 74 75 72 6e | 20 28 2a 6c 69 6e 65 70 |) return| (*linep|
|00005ce0| 74 72 2b 2b 29 3b 0a 20 | 20 20 20 6c 69 6e 65 6c |tr++);. | linel|
|00005cf0| 65 6e 20 3d 20 30 3b 0a | 20 20 20 20 77 68 69 6c |en = 0;.| whil|
|00005d00| 65 20 28 28 63 68 20 3d | 20 73 63 72 67 65 74 63 |e ((ch =| scrgetc|
|00005d10| 28 29 29 20 21 3d 20 27 | 5c 72 27 29 0a 09 73 77 |()) != '|\r')..sw|
|00005d20| 69 74 63 68 20 28 63 68 | 29 20 7b 0a 09 63 61 73 |itch (ch|) {..cas|
|00005d30| 65 20 45 4f 46 3a 0a 09 | 20 20 20 20 72 65 74 75 |e EOF:..| retu|
|00005d40| 72 6e 20 28 6f 73 74 67 | 65 74 63 28 29 29 3b 0a |rn (ostg|etc());.|
|00005d50| 09 63 61 73 65 20 27 5c | 30 31 30 27 3a 0a 09 20 |.case '\|010':.. |
|00005d60| 20 20 20 69 66 20 28 6c | 69 6e 65 6c 65 6e 20 3e | if (l|inelen >|
|00005d70| 20 30 29 20 7b 0a 09 09 | 6c 69 6e 65 6c 65 6e 2d | 0) {...|linelen-|
|00005d80| 2d 3b 0a 09 09 77 68 69 | 6c 65 20 28 78 20 3e 20 |-;...whi|le (x > |
|00005d90| 6c 69 6e 65 70 6f 73 5b | 6c 69 6e 65 6c 65 6e 5d |linepos[|linelen]|
|00005da0| 29 0a 09 09 20 20 20 20 | 73 63 72 64 65 6c 65 74 |)... |scrdelet|
|00005db0| 65 28 29 3b 0a 09 20 20 | 20 20 7d 0a 09 20 20 20 |e();.. | }.. |
|00005dc0| 20 62 72 65 61 6b 3b 0a | 09 64 65 66 61 75 6c 74 | break;.|.default|
|00005dd0| 3a 0a 09 20 20 20 20 69 | 66 20 28 6c 69 6e 65 6c |:.. i|f (linel|
|00005de0| 65 6e 20 3c 20 4c 49 4e | 45 4d 41 58 29 20 7b 0a |en < LIN|EMAX) {.|
|00005df0| 09 20 20 20 20 20 20 20 | 20 6c 69 6e 65 62 75 66 |. | linebuf|
|00005e00| 5b 6c 69 6e 65 6c 65 6e | 5d 20 3d 20 63 68 3b 0a |[linelen|] = ch;.|
|00005e10| 09 09 6c 69 6e 65 70 6f | 73 5b 6c 69 6e 65 6c 65 |..linepo|s[linele|
|00005e20| 6e 5d 20 3d 20 78 3b 0a | 09 09 6c 69 6e 65 6c 65 |n] = x;.|..linele|
|00005e30| 6e 2b 2b 3b 0a 09 20 20 | 20 20 7d 0a 09 20 20 20 |n++;.. | }.. |
|00005e40| 20 73 63 72 70 75 74 63 | 28 63 68 29 3b 0a 09 20 | scrputc|(ch);.. |
|00005e50| 20 20 20 62 72 65 61 6b | 3b 0a 09 7d 0a 20 20 20 | break|;..}. |
|00005e60| 20 6c 69 6e 65 62 75 66 | 5b 6c 69 6e 65 6c 65 6e | linebuf|[linelen|
|00005e70| 2b 2b 5d 20 3d 20 27 5c | 6e 27 3b 0a 20 20 20 20 |++] = '\|n';. |
|00005e80| 73 63 72 70 75 74 63 28 | 27 5c 72 27 29 3b 20 73 |scrputc(|'\r'); s|
|00005e90| 63 72 70 75 74 63 28 27 | 5c 6e 27 29 3b 0a 20 20 |crputc('|\n');. |
|00005ea0| 20 20 69 66 20 28 74 66 | 70 29 0a 09 66 6f 72 20 | if (tf|p)..for |
|00005eb0| 28 69 20 3d 20 30 3b 20 | 69 20 3c 20 6c 69 6e 65 |(i = 0; |i < line|
|00005ec0| 6c 65 6e 3b 20 2b 2b 69 | 29 0a 09 20 20 20 20 6f |len; ++i|).. o|
|00005ed0| 73 61 70 75 74 63 28 6c | 69 6e 65 62 75 66 5b 69 |saputc(l|inebuf[i|
|00005ee0| 5d 2c 74 66 70 29 3b 0a | 20 20 20 20 6c 69 6e 65 |],tfp);.| line|
|00005ef0| 70 74 72 20 3d 20 6c 69 | 6e 65 62 75 66 3b 20 6c |ptr = li|nebuf; l|
|00005f00| 69 6e 65 6c 65 6e 2d 2d | 3b 0a 20 20 20 20 72 65 |inelen--|;. re|
|00005f10| 74 75 72 6e 20 28 2a 6c | 69 6e 65 70 74 72 2b 2b |turn (*l|ineptr++|
|00005f20| 29 3b 0a 7d 0a 0a 69 6e | 74 20 6f 73 74 70 75 74 |);.}..in|t ostput|
|00005f30| 63 28 63 68 29 0a 20 20 | 69 6e 74 20 63 68 3b 0a |c(ch). |int ch;.|
|00005f40| 7b 0a 20 20 20 20 69 66 | 20 28 63 68 20 3d 3d 20 |{. if| (ch == |
|00005f50| 27 5c 6e 27 29 0a 09 73 | 63 72 70 75 74 63 28 27 |'\n')..s|crputc('|
|00005f60| 5c 72 27 29 3b 0a 20 20 | 20 20 73 63 72 70 75 74 |\r');. | scrput|
|00005f70| 63 28 63 68 29 3b 0a 20 | 20 20 20 69 66 20 28 74 |c(ch);. | if (t|
|00005f80| 66 70 29 0a 09 6f 73 61 | 70 75 74 63 28 63 68 2c |fp)..osa|putc(ch,|
|00005f90| 74 66 70 29 3b 0a 20 20 | 20 20 72 65 74 75 72 6e |tfp);. | return|
|00005fa0| 20 28 31 29 3b 0a 7d 0a | 0a 6f 73 66 6c 75 73 68 | (1);.}.|.osflush|
|00005fb0| 28 29 0a 7b 0a 20 20 20 | 20 6c 69 6e 65 70 74 72 |().{. | lineptr|
|00005fc0| 20 3d 20 6c 69 6e 65 62 | 75 66 3b 0a 20 20 20 20 | = lineb|uf;. |
|00005fd0| 6c 69 6e 65 6c 65 6e 20 | 3d 20 30 3b 0a 7d 0a 0a |linelen |= 0;.}..|
|00005fe0| 6f 73 63 68 65 63 6b 28 | 29 0a 7b 0a 20 20 20 20 |oscheck(|).{. |
|00005ff0| 44 6f 45 76 65 6e 74 28 | 29 3b 0a 7d 0a 0a 0a 3d |DoEvent(|);.}...=|
|00006000| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 6f 73 64 65 66 |========|== osdef|
|00006020| 73 2e 68 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |s.h ====|========|
|00006030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0a 0a 65 78 74 65 72 |========|=..exter|
|00006050| 6e 20 4c 56 41 4c 20 78 | 70 74 73 69 7a 65 28 29 |n LVAL x|ptsize()|
|00006060| 2c 0a 09 20 20 20 20 78 | 68 69 64 65 70 65 6e 28 |,.. x|hidepen(|
|00006070| 29 2c 78 73 68 6f 77 70 | 65 6e 28 29 2c 78 67 65 |),xshowp|en(),xge|
|00006080| 74 70 65 6e 28 29 2c 78 | 70 65 6e 73 69 7a 65 28 |tpen(),x|pensize(|
|00006090| 29 2c 78 70 65 6e 6d 6f | 64 65 28 29 2c 0a 20 20 |),xpenmo|de(),. |
|000060a0| 20 20 20 20 20 20 20 20 | 20 20 78 70 65 6e 70 61 | | xpenpa|
|000060b0| 74 28 29 2c 78 70 65 6e | 6e 6f 72 6d 61 6c 28 29 |t(),xpen|normal()|
|000060c0| 2c 78 6d 6f 76 65 74 6f | 28 29 2c 78 6d 6f 76 65 |,xmoveto|(),xmove|
|000060d0| 28 29 2c 78 6c 69 6e 65 | 74 6f 28 29 2c 78 6c 69 |(),xline|to(),xli|
|000060e0| 6e 65 28 29 2c 0a 09 20 | 20 20 20 78 73 68 6f 77 |ne(),.. | xshow|
|000060f0| 67 72 61 70 68 69 63 73 | 28 29 2c 78 68 69 64 65 |graphics|(),xhide|
|00006100| 67 72 61 70 68 69 63 73 | 28 29 2c 78 63 6c 65 61 |graphics|(),xclea|
|00006110| 72 67 72 61 70 68 69 63 | 73 28 29 2c 0a 09 20 20 |rgraphic|s(),.. |
|00006120| 20 20 78 74 6f 6f 6c 28 | 29 2c 78 74 6f 6f 6c 31 | xtool(|),xtool1|
|00006130| 36 28 29 2c 78 74 6f 6f | 6c 33 32 28 29 2c 78 6e |6(),xtoo|l32(),xn|
|00006140| 65 77 68 61 6e 64 6c 65 | 28 29 2c 78 6e 65 77 70 |ewhandle|(),xnewp|
|00006150| 74 72 28 29 2c 0a 09 20 | 20 20 20 78 68 69 77 6f |tr(),.. | xhiwo|
|00006160| 72 64 28 29 2c 78 6c 6f | 77 6f 72 64 28 29 2c 78 |rd(),xlo|word(),x|
|00006170| 72 64 6e 6f 68 61 6e 67 | 28 29 3b 0a 0a 3d 3d 3d |rdnohang|();..===|
|00006180| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006190| 3d 3d 3d 3d 3d 3d 3d 3d | 20 6f 73 70 74 72 73 2e |========| osptrs.|
|000061a0| 68 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |h ======|========|
|000061b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000061c0| 3d 3d 3d 3d 3d 3d 3d 0a | 0a 7b 09 22 48 49 44 45 |=======.|.{."HIDE|
|000061d0| 50 45 4e 22 2c 09 09 09 | 53 2c 20 78 68 69 64 65 |PEN",...|S, xhide|
|000061e0| 70 65 6e 09 09 7d 2c 20 | 2f 2a 20 33 30 30 20 2a |pen..}, |/* 300 *|
|000061f0| 2f 0a 7b 09 22 53 48 4f | 57 50 45 4e 22 2c 09 09 |/.{."SHO|WPEN",..|
|00006200| 09 53 2c 20 78 73 68 6f | 77 70 65 6e 09 09 7d 2c |.S, xsho|wpen..},|
|00006210| 20 2f 2a 20 33 30 31 20 | 2a 2f 0a 7b 09 22 47 45 | /* 301 |*/.{."GE|
|00006220| 54 50 45 4e 22 2c 09 09 | 09 53 2c 20 78 67 65 74 |TPEN",..|.S, xget|
|00006230| 70 65 6e 09 09 7d 2c 20 | 2f 2a 20 33 30 32 20 2a |pen..}, |/* 302 *|
|00006240| 2f 0a 7b 09 22 50 45 4e | 53 49 5a 45 22 2c 09 09 |/.{."PEN|SIZE",..|
|00006250| 09 53 2c 20 78 70 65 6e | 73 69 7a 65 09 09 7d 2c |.S, xpen|size..},|
|00006260| 20 2f 2a 20 33 30 33 20 | 2a 2f 0a 7b 09 22 50 45 | /* 303 |*/.{."PE|
|00006270| 4e 4d 4f 44 45 22 2c 09 | 09 09 53 2c 20 78 70 65 |NMODE",.|..S, xpe|
|00006280| 6e 6d 6f 64 65 09 09 7d | 2c 20 2f 2a 20 33 30 34 |nmode..}|, /* 304|
|00006290| 20 2a 2f 0a 7b 09 22 50 | 45 4e 50 41 54 22 2c 09 | */.{."P|ENPAT",.|
|000062a0| 09 09 53 2c 20 78 70 65 | 6e 70 61 74 09 09 7d 2c |..S, xpe|npat..},|
|000062b0| 20 2f 2a 20 33 30 35 20 | 2a 2f 0a 7b 09 22 50 45 | /* 305 |*/.{."PE|
|000062c0| 4e 4e 4f 52 4d 41 4c 22 | 2c 09 09 09 53 2c 20 78 |NNORMAL"|,...S, x|
|000062d0| 70 65 6e 6e 6f 72 6d 61 | 6c 09 09 7d 2c 20 2f 2a |pennorma|l..}, /*|
|000062e0| 20 33 30 36 20 2a 2f 0a | 7b 09 22 4d 4f 56 45 54 | 306 */.|{."MOVET|
|000062f0| 4f 22 2c 09 09 09 53 2c | 20 78 6d 6f 76 65 74 6f |O",...S,| xmoveto|
|00006300| 09 09 7d 2c 20 2f 2a 20 | 33 30 37 20 2a 2f 0a 7b |..}, /* |307 */.{|
|00006310| 09 22 4d 4f 56 45 22 2c | 09 09 09 09 53 2c 20 78 |."MOVE",|....S, x|
|00006320| 6d 6f 76 65 09 09 7d 2c | 20 2f 2a 20 33 30 38 20 |move..},| /* 308 |
|00006330| 2a 2f 0a 7b 09 22 4c 49 | 4e 45 54 4f 22 2c 09 09 |*/.{."LI|NETO",..|
|00006340| 09 53 2c 20 78 6c 69 6e | 65 74 6f 09 09 7d 2c 20 |.S, xlin|eto..}, |
|00006350| 2f 2a 20 33 30 39 20 2a | 2f 0a 7b 09 22 4c 49 4e |/* 309 *|/.{."LIN|
|00006360| 45 22 2c 09 09 09 09 53 | 2c 20 78 6c 69 6e 65 09 |E",....S|, xline.|
|00006370| 09 7d 2c 20 2f 2a 20 33 | 31 30 20 2a 2f 0a 7b 09 |.}, /* 3|10 */.{.|
|00006380| 22 53 48 4f 57 2d 47 52 | 41 50 48 49 43 53 22 2c |"SHOW-GR|APHICS",|
|00006390| 09 09 53 2c 20 78 73 68 | 6f 77 67 72 61 70 68 69 |..S, xsh|owgraphi|
|000063a0| 63 73 09 7d 2c 20 2f 2a | 20 33 31 31 20 2a 2f 0a |cs.}, /*| 311 */.|
|000063b0| 7b 09 22 48 49 44 45 2d | 47 52 41 50 48 49 43 53 |{."HIDE-|GRAPHICS|
|000063c0| 22 2c 09 09 53 2c 20 78 | 68 69 64 65 67 72 61 70 |",..S, x|hidegrap|
|000063d0| 68 69 63 73 09 7d 2c 20 | 2f 2a 20 33 31 32 20 2a |hics.}, |/* 312 *|
|000063e0| 2f 0a 7b 09 22 43 4c 45 | 41 52 2d 47 52 41 50 48 |/.{."CLE|AR-GRAPH|
|000063f0| 49 43 53 22 2c 09 09 53 | 2c 20 78 63 6c 65 61 72 |ICS",..S|, xclear|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.