home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1989-09-14 | 7.5 KB | [TEXT/????] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: window.c.bin
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| AMOS Picture Packer (image/amosPicturePacker)
| ext
| Supported |
1%
| dexvert
| Debian floppy split (archive/debianFloppySplit)
| ext
| Unsupported |
1%
| dexvert
| Sound Images sound sample (audio/soundImagesSoundSample)
| ext
| Unsupported |
1%
| dexvert
| DESI-III drawing (image/desiIIIDrawing)
| ext
| Unsupported |
1%
| dexvert
| MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable)
| ext
| Unsupported |
1%
| dexvert
| Alien Trilogytextures (other/alienTrilogyTextures)
| ext
| Unsupported |
1%
| dexvert
| APT cache data (other/aptCacheData)
| ext
| Unsupported |
1%
| dexvert
| CorelTRACE configuration (other/corelTRACEConfiguration)
| ext
| Unsupported |
1%
| dexvert
| Dreamcast Disc (other/dreamcastDisc)
| ext
| Unsupported |
1%
| dexvert
| EST flat binary (other/estFlatBinary)
| ext
| Unsupported |
1%
| dexvert
| Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat)
| ext
| Unsupported |
1%
| dexvert
| Sega Genesis/Megadrive/32x ROM (other/genesisROM)
| ext
| Unsupported |
1%
| dexvert
| Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive)
| ext
| Unsupported |
1%
| dexvert
| Sound Images Sound Driver (other/soundImagesSoundDriver)
| ext
| Unsupported |
1%
| dexvert
| Symantec/Norton Config (other/symantecNortonConfig)
| ext
| Unsupported |
1%
| dexvert
| Vectrex ROM (other/vectrexROM)
| ext
| Unsupported |
1%
| dexvert
| BIS raP encoded format (other/bisraPEncoded)
| ext
| Unsupported |
1%
| dexvert
| Pascal Script binary (other/pascalScriptBinary)
| ext
| Unsupported |
1%
| dexvert
| 7th Level game data archive (other/seventhLevelGameDataArchive)
| ext
| Unsupported |
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Binary Text (image/binaryText)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary, Wed Feb 24 17:28:39 1988, modified Mon May 29 09:33:56 1989, creator '????', type ASCII, 7162 bytes "window.c" , at 0x1c7a 382 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| lsar
| MacBinary
| default
| |
100%
| gt2
| MAC Bilddatei
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [????] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 77 69 6e 64 6f 77 | 2e 63 00 00 00 00 00 00 |..window|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 3f 3f 3f | 3f 00 00 00 00 00 00 00 |.TEXT???|?.......|
|00000050| 00 00 00 00 00 1b fa 00 | 00 01 7e 9e 49 02 97 a0 |........|..~.I...|
|00000060| a6 f7 44 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..D.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 4d 61 | 63 69 6e 74 6f 73 68 20 |/*. * Ma|cintosh |
|00000090| 54 61 72 0d 20 2a 0d 20 | 2a 20 57 72 69 74 74 65 |Tar. *. |* Writte|
|000000a0| 6e 20 62 79 20 43 72 61 | 69 67 20 52 75 66 66 0d |n by Cra|ig Ruff.|
|000000b0| 20 2a 0d 20 2a 20 57 69 | 6e 64 6f 77 20 6d 61 6e | *. * Wi|ndow man|
|000000c0| 69 70 75 6c 61 74 69 6f | 6e 20 72 6f 75 74 69 6e |ipulatio|n routin|
|000000d0| 65 73 20 66 6f 72 20 64 | 69 73 70 6c 61 79 20 28 |es for d|isplay (|
|000000e0| 61 6e 64 20 70 72 69 6e | 74 65 72 29 20 6c 69 73 |and prin|ter) lis|
|000000f0| 74 69 6e 67 73 20 6f 66 | 20 61 72 63 68 69 76 65 |tings of| archive|
|00000100| 73 2e 0d 20 2a 2f 0d 0d | 23 69 6e 63 6c 75 64 65 |s.. */..|#include|
|00000110| 20 22 74 61 72 2e 68 22 | 0d 23 69 6e 63 6c 75 64 | "tar.h"|.#includ|
|00000120| 65 20 3c 52 65 73 6f 75 | 72 63 65 73 2e 68 3e 0d |e <Resou|rces.h>.|
|00000130| 23 69 6e 63 6c 75 64 65 | 20 3c 53 74 64 41 72 67 |#include| <StdArg|
|00000140| 2e 68 3e 0d 0d 23 64 65 | 66 69 6e 65 20 64 69 73 |.h>..#de|fine dis|
|00000150| 70 49 44 09 31 32 39 09 | 09 2f 2a 20 44 69 73 70 |pID.129.|./* Disp|
|00000160| 6c 61 79 20 77 69 6e 64 | 6f 77 20 49 44 20 28 69 |lay wind|ow ID (i|
|00000170| 6e 20 72 65 73 6f 75 72 | 63 65 20 66 69 6c 65 29 |n resour|ce file)|
|00000180| 20 2a 2f 0d 23 64 65 66 | 69 6e 65 20 4c 45 46 54 | */.#def|ine LEFT|
|00000190| 4d 41 52 09 35 0d 23 64 | 65 66 69 6e 65 20 54 4f |MAR.5.#d|efine TO|
|000001a0| 50 4d 41 52 09 35 0d 0d | 57 69 6e 64 6f 77 50 74 |PMAR.5..|WindowPt|
|000001b0| 72 09 64 69 73 70 57 69 | 6e 64 3b 0d 42 6f 6f 6c |r.dispWi|nd;.Bool|
|000001c0| 65 61 6e 09 09 77 69 6e | 64 4f 70 65 6e 20 3d 20 |ean..win|dOpen = |
|000001d0| 66 61 6c 73 65 3b 0d 73 | 68 6f 72 74 09 09 66 6f |false;.s|hort..fo|
|000001e0| 6e 74 48 65 69 67 68 74 | 3b 0d 73 68 6f 72 74 09 |ntHeight|;.short.|
|000001f0| 09 62 6f 74 74 6f 6d 4d | 61 72 67 69 6e 3b 0d 73 |.bottomM|argin;.s|
|00000200| 68 6f 72 74 09 09 62 6f | 74 74 6f 6d 4c 69 6e 65 |hort..bo|ttomLine|
|00000210| 3b 0d 73 68 6f 72 74 09 | 09 74 6f 70 4c 69 6e 65 |;.short.|.topLine|
|00000220| 3b 0d 73 68 6f 72 74 09 | 09 63 75 72 4c 69 6e 65 |;.short.|.curLine|
|00000230| 3b 0d 73 68 6f 72 74 09 | 09 77 4c 69 6e 65 73 3b |;.short.|.wLines;|
|00000240| 0d 73 68 6f 72 74 09 09 | 77 43 75 72 4c 69 6e 65 |.short..|wCurLine|
|00000250| 20 3d 20 30 3b 0d 52 67 | 6e 48 61 6e 64 6c 65 20 | = 0;.Rg|nHandle |
|00000260| 09 75 70 64 61 74 65 3b | 0d 54 50 50 72 50 6f 72 |.update;|.TPPrPor|
|00000270| 74 09 70 72 50 6f 72 74 | 3b 0d 47 72 61 66 50 74 |t.prPort|;.GrafPt|
|00000280| 72 09 09 73 61 76 65 64 | 50 6f 72 74 3b 0d 0d 2f |r..saved|Port;../|
|00000290| 2a 0d 20 2a 20 57 69 6e | 64 49 6e 69 74 20 2d 20 |*. * Win|dInit - |
|000002a0| 65 69 74 68 65 72 20 6f | 70 65 6e 20 74 68 65 20 |either o|pen the |
|000002b0| 77 69 6e 64 6f 77 20 6f | 72 20 70 72 69 6e 74 65 |window o|r printe|
|000002c0| 72 20 70 6f 72 74 0d 20 | 2a 0d 20 2a 09 52 65 74 |r port. |*. *.Ret|
|000002d0| 75 72 6e 73 20 74 72 75 | 65 20 69 66 20 61 6e 20 |urns tru|e if an |
|000002e0| 65 72 72 6f 72 20 69 73 | 20 66 6f 75 6e 64 2c 20 |error is| found, |
|000002f0| 66 61 6c 73 65 20 6f 74 | 68 65 72 77 69 73 65 2e |false ot|herwise.|
|00000300| 0d 20 2a 0d 20 2a 09 53 | 65 70 61 72 61 74 65 20 |. *. *.S|eparate |
|00000310| 72 6f 75 74 69 6e 65 73 | 20 66 6f 72 20 73 63 72 |routines| for scr|
|00000320| 65 65 6e 20 61 6e 64 20 | 70 72 69 6e 74 65 72 20 |een and |printer |
|00000330| 61 72 65 20 6e 6f 74 20 | 72 65 61 6c 6c 79 20 6e |are not |really n|
|00000340| 65 65 64 65 64 2e 0d 20 | 2a 2f 0d 42 6f 6f 6c 65 |eeded.. |*/.Boole|
|00000350| 61 6e 0d 57 69 6e 64 49 | 6e 69 74 28 29 20 7b 0d |an.WindI|nit() {.|
|00000360| 09 46 6f 6e 74 49 6e 66 | 6f 09 66 49 6e 66 6f 3b |.FontInf|o.fInfo;|
|00000370| 0d 09 63 68 61 72 09 09 | 2a 72 6f 75 74 69 6e 65 |..char..|*routine|
|00000380| 20 3d 20 22 5c 70 57 69 | 6e 64 49 6e 69 74 22 3b | = "\pWi|ndInit";|
|00000390| 0d 0d 09 69 66 20 28 64 | 6f 50 72 69 6e 74 29 20 |...if (d|oPrint) |
|000003a0| 7b 0d 09 09 2f 2a 0d 09 | 09 20 2a 20 57 65 20 61 |{.../*..|. * We a|
|000003b0| 72 65 20 6c 69 73 74 69 | 6e 67 20 74 6f 20 74 68 |re listi|ng to th|
|000003c0| 65 20 70 72 69 6e 74 65 | 72 2e 0d 09 09 20 2a 20 |e printe|r.... * |
|000003d0| 4d 61 6b 65 20 73 75 72 | 65 20 77 65 20 68 61 76 |Make sur|e we hav|
|000003e0| 65 20 6f 70 65 6e 65 64 | 20 74 68 65 20 70 72 69 |e opened| the pri|
|000003f0| 6e 74 65 72 20 64 72 69 | 76 65 72 2e 0d 09 09 20 |nter dri|ver.... |
|00000400| 2a 2f 0d 09 09 69 66 20 | 28 21 70 4f 70 65 6e 20 |*/...if |(!pOpen |
|00000410| 26 26 20 50 72 53 65 74 | 75 70 28 29 29 0d 09 09 |&& PrSet|up())...|
|00000420| 09 72 65 74 75 72 6e 28 | 74 72 75 65 29 3b 0d 0d |.return(|true);..|
|00000430| 09 09 2f 2a 0d 09 09 20 | 2a 20 41 73 6b 20 61 62 |../*... |* Ask ab|
|00000440| 6f 75 74 20 74 68 69 73 | 20 6c 69 73 74 69 6e 67 |out this| listing|
|00000450| 73 20 73 70 65 63 69 66 | 69 63 73 2e 0d 09 09 20 |s specif|ics.... |
|00000460| 2a 2f 0d 09 09 69 66 20 | 28 50 72 4a 6f 62 44 69 |*/...if |(PrJobDi|
|00000470| 61 6c 6f 67 28 70 72 52 | 65 63 48 64 6c 29 20 3d |alog(prR|ecHdl) =|
|00000480| 3d 20 66 61 6c 73 65 29 | 0d 09 09 09 72 65 74 75 |= false)|....retu|
|00000490| 72 6e 28 74 72 75 65 29 | 3b 0d 0d 09 09 69 66 20 |rn(true)|;....if |
|000004a0| 28 50 72 45 72 72 6f 72 | 28 29 20 21 3d 20 6e 6f |(PrError|() != no|
|000004b0| 45 72 72 29 20 7b 0d 09 | 09 09 4f 53 41 6c 65 72 |Err) {..|..OSAler|
|000004c0| 74 28 72 6f 75 74 69 6e | 65 2c 20 22 5c 70 50 72 |t(routin|e, "\pPr|
|000004d0| 4a 6f 62 44 69 61 6c 6f | 67 22 2c 20 6e 69 6c 2c |JobDialo|g", nil,|
|000004e0| 20 50 72 45 72 72 6f 72 | 28 29 29 3b 0d 09 09 09 | PrError|());....|
|000004f0| 72 65 74 75 72 6e 28 74 | 72 75 65 29 3b 0d 09 09 |return(t|rue);...|
|00000500| 7d 0d 0d 09 09 2f 2a 0d | 09 09 20 2a 20 4f 70 65 |}..../*.|.. * Ope|
|00000510| 6e 20 74 68 65 20 70 72 | 69 6e 74 65 72 20 64 6f |n the pr|inter do|
|00000520| 63 75 6d 65 6e 74 20 28 | 6f 6e 63 65 20 70 65 72 |cument (|once per|
|00000530| 20 6c 69 73 74 69 6e 67 | 29 2e 0d 09 09 20 2a 2f | listing|).... */|
|00000540| 0d 09 09 70 72 50 6f 72 | 74 20 3d 20 50 72 4f 70 |...prPor|t = PrOp|
|00000550| 65 6e 44 6f 63 28 70 72 | 52 65 63 48 64 6c 2c 20 |enDoc(pr|RecHdl, |
|00000560| 6e 69 6c 2c 20 6e 69 6c | 29 3b 0d 09 09 69 66 20 |nil, nil|);...if |
|00000570| 28 50 72 45 72 72 6f 72 | 28 29 20 21 3d 20 6e 6f |(PrError|() != no|
|00000580| 45 72 72 29 20 7b 0d 09 | 09 09 4f 53 41 6c 65 72 |Err) {..|..OSAler|
|00000590| 74 28 72 6f 75 74 69 6e | 65 2c 20 22 5c 70 50 72 |t(routin|e, "\pPr|
|000005a0| 4f 70 65 6e 44 6f 63 22 | 2c 20 6e 69 6c 2c 20 50 |OpenDoc"|, nil, P|
|000005b0| 72 45 72 72 6f 72 28 29 | 29 3b 0d 09 09 09 72 65 |rError()|);....re|
|000005c0| 74 75 72 6e 28 74 72 75 | 65 29 3b 0d 09 09 7d 0d |turn(tru|e);...}.|
|000005d0| 0d 09 09 2f 2a 0d 09 09 | 20 2a 20 4f 70 65 6e 20 |.../*...| * Open |
|000005e0| 74 68 65 20 70 61 67 65 | 20 28 6f 6e 63 65 20 70 |the page| (once p|
|000005f0| 65 72 20 70 68 79 73 69 | 63 61 6c 20 70 61 67 65 |er physi|cal page|
|00000600| 29 2e 0d 09 09 20 2a 2f | 0d 09 09 50 72 4f 70 65 |).... */|...PrOpe|
|00000610| 6e 50 61 67 65 28 70 72 | 50 6f 72 74 2c 20 6e 69 |nPage(pr|Port, ni|
|00000620| 6c 29 3b 0d 09 09 69 66 | 20 28 50 72 45 72 72 6f |l);...if| (PrErro|
|00000630| 72 28 29 20 21 3d 20 6e | 6f 45 72 72 29 20 7b 0d |r() != n|oErr) {.|
|00000640| 09 09 09 4f 53 41 6c 65 | 72 74 28 72 6f 75 74 69 |...OSAle|rt(routi|
|00000650| 6e 65 2c 20 22 5c 70 50 | 72 4f 70 65 6e 50 61 67 |ne, "\pP|rOpenPag|
|00000660| 65 22 2c 20 6e 69 6c 2c | 20 50 72 45 72 72 6f 72 |e", nil,| PrError|
|00000670| 28 29 29 3b 0d 09 09 09 | 72 65 74 75 72 6e 28 74 |());....|return(t|
|00000680| 72 75 65 29 3b 0d 09 09 | 7d 0d 0d 09 09 2f 2a 0d |rue);...|}..../*.|
|00000690| 09 09 20 2a 20 55 73 65 | 20 6d 6f 6e 61 63 6f 20 |.. * Use| monaco |
|000006a0| 39 20 73 6f 20 6f 75 72 | 20 6c 69 73 74 69 6e 67 |9 so our| listing|
|000006b0| 20 6c 69 6e 65 73 20 75 | 70 20 70 72 6f 70 65 72 | lines u|p proper|
|000006c0| 6c 79 2e 0d 09 09 20 2a | 20 28 4c 61 7a 79 29 0d |ly.... *| (Lazy).|
|000006d0| 09 09 20 2a 2f 0d 09 09 | 47 65 74 50 6f 72 74 28 |.. */...|GetPort(|
|000006e0| 26 73 61 76 65 64 50 6f | 72 74 29 3b 0d 09 09 53 |&savedPo|rt);...S|
|000006f0| 65 74 50 6f 72 74 28 26 | 70 72 50 6f 72 74 2d 3e |etPort(&|prPort->|
|00000700| 67 50 6f 72 74 29 3b 0d | 09 09 54 65 78 74 46 6f |gPort);.|..TextFo|
|00000710| 6e 74 28 6d 6f 6e 61 63 | 6f 29 3b 0d 09 09 54 65 |nt(monac|o);...Te|
|00000720| 78 74 53 69 7a 65 28 39 | 29 3b 0d 0d 09 09 2f 2a |xtSize(9|);..../*|
|00000730| 0d 09 09 20 2a 20 46 69 | 67 75 72 65 20 6f 75 74 |... * Fi|gure out|
|00000740| 20 68 6f 77 20 6d 61 6e | 79 20 6c 69 6e 65 73 20 | how man|y lines |
|00000750| 66 69 74 20 6f 6e 20 61 | 20 70 61 67 65 2e 0d 09 |fit on a| page...|
|00000760| 09 20 2a 2f 0d 09 09 47 | 65 74 46 6f 6e 74 49 6e |. */...G|etFontIn|
|00000770| 66 6f 28 26 66 49 6e 66 | 6f 29 3b 0d 09 09 66 6f |fo(&fInf|o);...fo|
|00000780| 6e 74 48 65 69 67 68 74 | 20 3d 20 66 49 6e 66 6f |ntHeight| = fInfo|
|00000790| 2e 61 73 63 65 6e 74 20 | 2b 20 66 49 6e 66 6f 2e |.ascent |+ fInfo.|
|000007a0| 64 65 73 63 65 6e 74 20 | 2b 20 66 49 6e 66 6f 2e |descent |+ fInfo.|
|000007b0| 6c 65 61 64 69 6e 67 3b | 0d 09 09 4d 6f 76 65 54 |leading;|...MoveT|
|000007c0| 6f 28 4c 45 46 54 4d 41 | 52 2c 20 63 75 72 4c 69 |o(LEFTMA|R, curLi|
|000007d0| 6e 65 20 3d 20 66 6f 6e | 74 48 65 69 67 68 74 29 |ne = fon|tHeight)|
|000007e0| 3b 0d 09 09 62 6f 74 74 | 6f 6d 4c 69 6e 65 20 3d |;...bott|omLine =|
|000007f0| 20 28 28 28 2a 2a 70 72 | 52 65 63 48 64 6c 29 2e | (((**pr|RecHdl).|
|00000800| 70 72 49 6e 66 6f 2e 72 | 50 61 67 65 2e 62 6f 74 |prInfo.r|Page.bot|
|00000810| 74 6f 6d 20 2f 20 66 6f | 6e 74 48 65 69 67 68 74 |tom / fo|ntHeight|
|00000820| 29 20 2d 20 31 29 0d 09 | 09 09 09 2a 20 66 6f 6e |) - 1)..|...* fon|
|00000830| 74 48 65 69 67 68 74 3b | 0d 0d 09 09 72 65 74 75 |tHeight;|....retu|
|00000840| 72 6e 28 66 61 6c 73 65 | 29 3b 0d 09 7d 0d 0d 09 |rn(false|);..}...|
|00000850| 2f 2a 0d 09 20 2a 20 4c | 69 73 74 69 6e 67 20 74 |/*.. * L|isting t|
|00000860| 6f 20 73 63 72 65 65 6e | 2e 0d 09 20 2a 20 47 65 |o screen|... * Ge|
|00000870| 74 20 61 20 74 65 6d 70 | 6f 72 61 72 79 20 72 65 |t a temp|orary re|
|00000880| 67 69 6f 6e 20 66 6f 72 | 20 73 63 72 6f 6c 6c 69 |gion for| scrolli|
|00000890| 6e 67 20 62 69 74 73 2e | 0d 09 20 2a 20 47 65 74 |ng bits.|.. * Get|
|000008a0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 74 65 6d 70 | the win|dow temp|
|000008b0| 6c 61 74 65 20 66 72 6f | 6d 20 74 68 65 20 72 65 |late fro|m the re|
|000008c0| 73 6f 75 72 63 65 20 66 | 69 6c 65 2e 0d 09 20 2a |source f|ile... *|
|000008d0| 2f 0d 09 69 66 20 28 28 | 75 70 64 61 74 65 20 3d |/..if ((|update =|
|000008e0| 20 4e 65 77 52 67 6e 28 | 29 29 20 3d 3d 20 6e 69 | NewRgn(|)) == ni|
|000008f0| 6c 29 20 7b 0d 09 09 4f | 53 41 6c 65 72 74 28 72 |l) {...O|SAlert(r|
|00000900| 6f 75 74 69 6e 65 2c 20 | 22 5c 70 4e 65 77 52 67 |outine, |"\pNewRg|
|00000910| 6e 22 2c 20 6e 69 6c 2c | 20 4d 65 6d 45 72 72 6f |n", nil,| MemErro|
|00000920| 72 28 29 29 3b 0d 09 09 | 72 65 74 75 72 6e 28 74 |r());...|return(t|
|00000930| 72 75 65 29 3b 0d 09 7d | 0d 0d 09 69 66 20 28 28 |rue);..}|...if ((|
|00000940| 64 69 73 70 57 69 6e 64 | 20 3d 20 47 65 74 4e 65 |dispWind| = GetNe|
|00000950| 77 57 69 6e 64 6f 77 28 | 64 69 73 70 49 44 2c 20 |wWindow(|dispID, |
|00000960| 6e 69 6c 2c 20 28 57 69 | 6e 64 6f 77 50 74 72 29 |nil, (Wi|ndowPtr)|
|00000970| 20 2d 31 29 29 20 3d 3d | 20 6e 69 6c 29 20 7b 0d | -1)) ==| nil) {.|
|00000980| 09 09 4f 53 41 6c 65 72 | 74 28 72 6f 75 74 69 6e |..OSAler|t(routin|
|00000990| 65 2c 20 22 5c 70 47 65 | 74 4e 65 77 57 69 6e 64 |e, "\pGe|tNewWind|
|000009a0| 6f 77 22 2c 20 6e 69 6c | 2c 20 52 65 73 45 72 72 |ow", nil|, ResErr|
|000009b0| 6f 72 28 29 29 3b 0d 09 | 09 72 65 74 75 72 6e 28 |or());..|.return(|
|000009c0| 74 72 75 65 29 3b 0d 09 | 7d 0d 0d 09 2f 2a 0d 09 |true);..|}.../*..|
|000009d0| 20 2a 20 55 73 65 20 6d | 6f 6e 61 63 6f 20 39 20 | * Use m|onaco 9 |
|000009e0| 73 6f 20 6f 75 72 20 6c | 69 73 74 69 6e 67 20 6c |so our l|isting l|
|000009f0| 69 6e 65 73 20 75 70 2e | 0d 09 20 2a 2f 0d 09 53 |ines up.|.. */..S|
|00000a00| 65 74 50 6f 72 74 28 64 | 69 73 70 57 69 6e 64 29 |etPort(d|ispWind)|
|00000a10| 3b 0d 09 54 65 78 74 46 | 6f 6e 74 28 6d 6f 6e 61 |;..TextF|ont(mona|
|00000a20| 63 6f 29 3b 0d 09 54 65 | 78 74 53 69 7a 65 28 39 |co);..Te|xtSize(9|
|00000a30| 29 3b 0d 0d 09 2f 2a 0d | 09 20 2a 20 46 69 67 75 |);.../*.|. * Figu|
|00000a40| 72 65 20 6f 75 74 20 68 | 6f 77 20 6d 61 6e 79 20 |re out h|ow many |
|00000a50| 6c 69 6e 65 73 20 66 69 | 74 20 6f 6e 20 61 20 70 |lines fi|t on a p|
|00000a60| 61 67 65 2c 20 73 61 76 | 65 20 74 68 69 73 20 61 |age, sav|e this a|
|00000a70| 73 20 6d 61 72 67 69 6e | 20 69 6e 66 6f 2e 0d 09 |s margin| info...|
|00000a80| 20 2a 2f 0d 09 47 65 74 | 46 6f 6e 74 49 6e 66 6f | */..Get|FontInfo|
|00000a90| 28 26 66 49 6e 66 6f 29 | 3b 0d 09 66 6f 6e 74 48 |(&fInfo)|;..fontH|
|00000aa0| 65 69 67 68 74 20 3d 20 | 66 49 6e 66 6f 2e 61 73 |eight = |fInfo.as|
|00000ab0| 63 65 6e 74 20 2b 20 66 | 49 6e 66 6f 2e 64 65 73 |cent + f|Info.des|
|00000ac0| 63 65 6e 74 20 2b 20 66 | 49 6e 66 6f 2e 6c 65 61 |cent + f|Info.lea|
|00000ad0| 64 69 6e 67 3b 0d 0d 09 | 4d 6f 76 65 54 6f 28 4c |ding;...|MoveTo(L|
|00000ae0| 45 46 54 4d 41 52 2c 20 | 63 75 72 4c 69 6e 65 20 |EFTMAR, |curLine |
|00000af0| 3d 20 66 6f 6e 74 48 65 | 69 67 68 74 29 3b 0d 09 |= fontHe|ight);..|
|00000b00| 74 6f 70 4c 69 6e 65 20 | 3d 20 63 75 72 4c 69 6e |topLine |= curLin|
|00000b10| 65 20 2b 20 66 49 6e 66 | 6f 2e 64 65 73 63 65 6e |e + fInf|o.descen|
|00000b20| 74 20 2b 20 66 49 6e 66 | 6f 2e 6c 65 61 64 69 6e |t + fInf|o.leadin|
|00000b30| 67 3b 0d 09 62 6f 74 74 | 6f 6d 4c 69 6e 65 20 3d |g;..bott|omLine =|
|00000b40| 20 28 77 4c 69 6e 65 73 | 20 3d 20 64 69 73 70 57 | (wLines| = dispW|
|00000b50| 69 6e 64 2d 3e 70 6f 72 | 74 52 65 63 74 2e 62 6f |ind->por|tRect.bo|
|00000b60| 74 74 6f 6d 20 2f 20 66 | 6f 6e 74 48 65 69 67 68 |ttom / f|ontHeigh|
|00000b70| 74 29 20 2a 20 66 6f 6e | 74 48 65 69 67 68 74 3b |t) * fon|tHeight;|
|00000b80| 0d 09 62 6f 74 74 6f 6d | 4d 61 72 67 69 6e 20 3d |..bottom|Margin =|
|00000b90| 20 62 6f 74 74 6f 6d 4c | 69 6e 65 20 2b 20 66 49 | bottomL|ine + fI|
|00000ba0| 6e 66 6f 2e 64 65 73 63 | 65 6e 74 20 2b 20 66 49 |nfo.desc|ent + fI|
|00000bb0| 6e 66 6f 2e 6c 65 61 64 | 69 6e 67 3b 0d 0d 09 77 |nfo.lead|ing;...w|
|00000bc0| 43 75 72 4c 69 6e 65 20 | 3d 20 30 3b 0d 09 77 69 |CurLine |= 0;..wi|
|00000bd0| 6e 64 4f 70 65 6e 20 3d | 20 74 72 75 65 3b 0d 09 |ndOpen =| true;..|
|00000be0| 72 65 74 75 72 6e 28 66 | 61 6c 73 65 29 3b 0d 7d |return(f|alse);.}|
|00000bf0| 0d 0d 2f 2a 0d 20 2a 20 | 57 69 6e 64 45 6e 64 20 |../*. * |WindEnd |
|00000c00| 2d 20 63 6c 65 61 6e 20 | 75 70 20 61 66 74 65 72 |- clean |up after|
|00000c10| 20 61 20 6c 69 73 74 69 | 6e 67 20 74 6f 20 73 63 | a listi|ng to sc|
|00000c20| 72 65 65 6e 20 6f 72 20 | 70 72 69 6e 74 65 72 0d |reen or |printer.|
|00000c30| 20 2a 2f 0d 57 69 6e 64 | 45 6e 64 28 6b 65 79 57 | */.Wind|End(keyW|
|00000c40| 61 69 74 29 0d 42 6f 6f | 6c 65 61 6e 09 6b 65 79 |ait).Boo|lean.key|
|00000c50| 57 61 69 74 3b 0d 7b 0d | 09 69 66 20 28 70 4f 70 |Wait;.{.|.if (pOp|
|00000c60| 65 6e 29 20 7b 0d 09 09 | 54 50 72 53 74 61 74 75 |en) {...|TPrStatu|
|00000c70| 73 09 70 72 53 74 3b 0d | 09 09 63 68 61 72 09 09 |s.prSt;.|..char..|
|00000c80| 2a 72 6f 75 74 69 6e 65 | 20 3d 20 22 5c 70 57 69 |*routine| = "\pWi|
|00000c90| 6e 64 45 6e 64 22 3b 0d | 09 09 73 68 6f 72 74 09 |ndEnd";.|..short.|
|00000ca0| 09 65 72 72 3b 0d 0d 09 | 09 2f 2a 0d 09 09 20 2a |.err;...|./*... *|
|00000cb0| 20 50 72 69 6e 74 69 6e | 67 2c 20 63 6c 6f 73 65 | Printin|g, close|
|00000cc0| 20 70 61 67 65 20 61 6e | 64 20 64 6f 63 75 6d 65 | page an|d docume|
|00000cd0| 6e 74 2e 0d 09 09 20 2a | 2f 0d 09 09 50 72 43 6c |nt.... *|/...PrCl|
|00000ce0| 6f 73 65 50 61 67 65 28 | 70 72 50 6f 72 74 29 3b |osePage(|prPort);|
|00000cf0| 0d 09 09 69 66 20 28 28 | 65 72 72 20 3d 20 50 72 |...if ((|err = Pr|
|00000d00| 45 72 72 6f 72 28 29 29 | 20 21 3d 20 6e 6f 45 72 |Error())| != noEr|
|00000d10| 72 29 20 7b 0d 09 09 09 | 69 66 20 28 65 72 72 20 |r) {....|if (err |
|00000d20| 21 3d 20 69 50 72 41 62 | 6f 72 74 29 0d 09 09 09 |!= iPrAb|ort)....|
|00000d30| 09 4f 53 41 6c 65 72 74 | 28 72 6f 75 74 69 6e 65 |.OSAlert|(routine|
|00000d40| 2c 20 22 5c 70 50 72 43 | 6c 6f 73 65 50 61 67 65 |, "\pPrC|losePage|
|00000d50| 22 2c 20 6e 69 6c 2c 20 | 50 72 45 72 72 6f 72 28 |", nil, |PrError(|
|00000d60| 29 29 3b 0d 09 09 09 67 | 6f 74 6f 20 64 6f 6e 65 |));....g|oto done|
|00000d70| 3b 0d 09 09 7d 0d 0d 09 | 09 50 72 43 6c 6f 73 65 |;...}...|.PrClose|
|00000d80| 44 6f 63 28 70 72 50 6f | 72 74 29 3b 0d 09 09 69 |Doc(prPo|rt);...i|
|00000d90| 66 20 28 28 65 72 72 20 | 3d 20 50 72 45 72 72 6f |f ((err |= PrErro|
|00000da0| 72 28 29 29 20 21 3d 20 | 6e 6f 45 72 72 29 20 7b |r()) != |noErr) {|
|00000db0| 0d 09 09 09 69 66 20 28 | 65 72 72 20 21 3d 20 69 |....if (|err != i|
|00000dc0| 50 72 41 62 6f 72 74 29 | 0d 09 09 09 09 4f 53 41 |PrAbort)|.....OSA|
|00000dd0| 6c 65 72 74 28 72 6f 75 | 74 69 6e 65 2c 20 22 5c |lert(rou|tine, "\|
|00000de0| 70 50 72 43 6c 6f 73 65 | 44 6f 63 22 2c 20 6e 69 |pPrClose|Doc", ni|
|00000df0| 6c 2c 20 50 72 45 72 72 | 6f 72 28 29 29 3b 0d 09 |l, PrErr|or());..|
|00000e00| 09 09 67 6f 74 6f 20 64 | 6f 6e 65 3b 0d 09 09 7d |..goto d|one;...}|
|00000e10| 0d 0d 09 09 2f 2a 0d 09 | 09 20 2a 20 49 66 20 74 |..../*..|. * If t|
|00000e20| 68 65 20 70 72 69 6e 74 | 69 6e 67 20 69 6e 76 6f |he print|ing invo|
|00000e30| 6c 76 65 64 20 73 70 6f | 6f 6c 69 6e 67 2c 20 73 |lved spo|oling, s|
|00000e40| 70 6f 6f 6c 20 69 74 20 | 6e 6f 77 2e 0d 09 09 20 |pool it |now.... |
|00000e50| 2a 2f 0d 09 09 69 66 20 | 28 28 2a 2a 70 72 52 65 |*/...if |((**prRe|
|00000e60| 63 48 64 6c 29 2e 70 72 | 4a 6f 62 2e 62 4a 44 6f |cHdl).pr|Job.bJDo|
|00000e70| 63 4c 6f 6f 70 20 3d 3d | 20 62 53 70 6f 6f 6c 4c |cLoop ==| bSpoolL|
|00000e80| 6f 6f 70 29 20 0d 09 09 | 09 50 72 50 69 63 46 69 |oop) ...|.PrPicFi|
|00000e90| 6c 65 28 70 72 52 65 63 | 48 64 6c 2c 20 6e 69 6c |le(prRec|Hdl, nil|
|00000ea0| 2c 20 6e 69 6c 2c 20 6e | 69 6c 2c 20 26 70 72 53 |, nil, n|il, &prS|
|00000eb0| 74 29 3b 0d 0d 09 64 6f | 6e 65 3a 09 53 65 74 50 |t);...do|ne:.SetP|
|00000ec0| 6f 72 74 28 73 61 76 65 | 64 50 6f 72 74 29 3b 0d |ort(save|dPort);.|
|00000ed0| 09 09 70 4f 70 65 6e 20 | 3d 20 66 61 6c 73 65 3b |..pOpen |= false;|
|00000ee0| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 7d 0d 0d 09 |...retur|n;..}...|
|00000ef0| 2f 2a 0d 09 20 2a 20 4c | 69 73 74 69 6e 67 20 74 |/*.. * L|isting t|
|00000f00| 6f 20 73 63 72 65 65 6e | 2e 20 20 53 65 65 20 69 |o screen|. See i|
|00000f10| 66 20 77 65 20 73 68 6f | 75 6c 64 20 77 61 69 74 |f we sho|uld wait|
|00000f20| 20 66 6f 72 20 61 20 6b | 65 79 20 70 72 65 73 73 | for a k|ey press|
|00000f30| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 2e 0d 09 20 | to cont|inue... |
|00000f40| 2a 2f 0d 09 69 66 20 28 | 6b 65 79 57 61 69 74 29 |*/..if (|keyWait)|
|00000f50| 20 7b 0d 09 09 45 76 65 | 6e 74 52 65 63 6f 72 64 | {...Eve|ntRecord|
|00000f60| 09 65 3b 0d 09 09 42 6f | 6f 6c 65 61 6e 09 09 6f |.e;...Bo|olean..o|
|00000f70| 6c 64 41 75 74 6f 50 61 | 67 65 20 3d 20 61 75 74 |ldAutoPa|ge = aut|
|00000f80| 6f 50 61 67 65 3b 0d 0d | 09 09 61 75 74 6f 50 61 |oPage;..|..autoPa|
|00000f90| 67 65 20 3d 20 66 61 6c | 73 65 3b 09 2f 2a 20 53 |ge = fal|se;./* S|
|00000fa0| 6f 20 77 65 20 64 6f 6e | 27 74 20 67 65 74 20 74 |o we don|'t get t|
|00000fb0| 77 6f 20 6d 65 73 73 61 | 67 65 73 20 2a 2f 0d 09 |wo messa|ges */..|
|00000fc0| 09 69 66 20 28 21 64 6f | 50 72 69 6e 74 29 0d 09 |.if (!do|Print)..|
|00000fd0| 09 09 57 50 72 69 6e 74 | 66 28 22 50 72 65 73 73 |..WPrint|f("Press|
|00000fe0| 20 61 6e 79 20 6b 65 79 | 20 74 6f 20 63 6f 6e 74 | any key| to cont|
|00000ff0| 69 6e 75 65 22 29 3b 0d | 0d 09 09 64 6f 20 7b 0d |inue");.|...do {.|
|00001000| 09 09 09 53 79 73 74 65 | 6d 54 61 73 6b 28 29 3b |...Syste|mTask();|
|00001010| 0d 09 09 09 69 66 20 28 | 47 65 74 4e 65 78 74 45 |....if (|GetNextE|
|00001020| 76 65 6e 74 28 6b 65 79 | 44 6f 77 6e 4d 61 73 6b |vent(key|DownMask|
|00001030| 2c 20 26 65 29 20 3d 3d | 20 66 61 6c 73 65 29 0d |, &e) ==| false).|
|00001040| 09 09 09 09 65 2e 77 68 | 61 74 20 3d 20 6e 75 6c |....e.wh|at = nul|
|00001050| 6c 45 76 65 6e 74 3b 0d | 09 09 7d 20 77 68 69 6c |lEvent;.|..} whil|
|00001060| 65 20 28 65 2e 77 68 61 | 74 20 21 3d 20 6b 65 79 |e (e.wha|t != key|
|00001070| 44 6f 77 6e 29 3b 0d 0d | 09 09 61 75 74 6f 50 61 |Down);..|..autoPa|
|00001080| 67 65 20 3d 20 6f 6c 64 | 41 75 74 6f 50 61 67 65 |ge = old|AutoPage|
|00001090| 3b 0d 09 7d 0d 0d 09 44 | 69 73 70 6f 73 65 57 69 |;..}...D|isposeWi|
|000010a0| 6e 64 6f 77 28 64 69 73 | 70 57 69 6e 64 29 3b 0d |ndow(dis|pWind);.|
|000010b0| 09 44 69 73 70 6f 73 65 | 52 67 6e 28 75 70 64 61 |.Dispose|Rgn(upda|
|000010c0| 74 65 29 3b 0d 09 77 69 | 6e 64 4f 70 65 6e 20 3d |te);..wi|ndOpen =|
|000010d0| 20 66 61 6c 73 65 3b 0d | 7d 0d 0d 2f 2a 0d 20 2a | false;.|}../*. *|
|000010e0| 20 57 50 72 69 6e 74 66 | 20 2d 20 70 72 69 6e 74 | WPrintf| - print|
|000010f0| 66 20 74 6f 20 74 68 65 | 20 73 63 72 65 65 6e 20 |f to the| screen |
|00001100| 6f 72 20 70 72 69 6e 74 | 65 72 0d 20 2a 0d 20 2a |or print|er. *. *|
|00001110| 20 09 55 73 65 64 20 6c | 69 6b 65 20 79 6f 75 27 | .Used l|ike you'|
|00001120| 64 20 65 78 70 65 63 74 | 2c 20 62 75 74 20 64 6f |d expect|, but do|
|00001130| 65 73 20 4e 4f 54 20 68 | 61 6e 64 6c 65 20 70 61 |es NOT h|andle pa|
|00001140| 70 65 72 20 6d 6f 74 69 | 6f 6e 0d 20 2a 09 63 68 |per moti|on. *.ch|
|00001150| 61 72 61 63 74 65 72 73 | 20 6c 69 6b 65 20 6e 65 |aracters| like ne|
|00001160| 77 6c 69 6e 65 2c 20 65 | 74 63 2e 0d 20 2a 2f 0d |wline, e|tc.. */.|
|00001170| 57 50 72 69 6e 74 66 28 | 63 68 61 72 20 2a 66 6d |WPrintf(|char *fm|
|00001180| 74 2c 20 2e 2e 2e 29 0d | 7b 0d 09 52 65 63 74 09 |t, ...).|{..Rect.|
|00001190| 09 72 3b 0d 09 63 68 61 | 72 09 09 62 75 66 5b 32 |.r;..cha|r..buf[2|
|000011a0| 35 36 5d 3b 0d 09 45 76 | 65 6e 74 52 65 63 6f 72 |56];..Ev|entRecor|
|000011b0| 64 09 65 3b 0d 09 63 68 | 61 72 09 09 2a 72 6f 75 |d.e;..ch|ar..*rou|
|000011c0| 74 69 6e 65 20 3d 20 22 | 5c 70 57 50 72 69 6e 74 |tine = "|\pWPrint|
|000011d0| 66 22 3b 0d 09 73 68 6f | 72 74 09 09 65 72 72 3b |f";..sho|rt..err;|
|000011e0| 0d 09 76 61 5f 6c 69 73 | 74 09 09 61 70 3b 0d 0d |..va_lis|t..ap;..|
|000011f0| 09 69 66 20 28 21 77 69 | 6e 64 4f 70 65 6e 20 26 |.if (!wi|ndOpen &|
|00001200| 26 20 21 70 4f 70 65 6e | 29 0d 09 09 72 65 74 75 |& !pOpen|)...retu|
|00001210| 72 6e 3b 0d 0d 09 76 61 | 5f 73 74 61 72 74 28 61 |rn;...va|_start(a|
|00001220| 70 2c 20 66 6d 74 29 3b | 0d 09 76 73 70 72 69 6e |p, fmt);|..vsprin|
|00001230| 74 66 28 62 75 66 2c 20 | 66 6d 74 2c 20 61 70 29 |tf(buf, |fmt, ap)|
|00001240| 3b 0d 09 76 61 5f 65 6e | 64 28 61 70 29 3b 0d 09 |;..va_en|d(ap);..|
|00001250| 69 66 20 28 73 74 72 6c | 65 6e 28 62 75 66 29 20 |if (strl|en(buf) |
|00001260| 3e 3d 20 73 69 7a 65 6f | 66 28 62 75 66 29 29 0d |>= sizeo|f(buf)).|
|00001270| 09 09 53 74 6b 45 72 72 | 41 6c 65 72 74 28 29 3b |..StkErr|Alert();|
|00001280| 09 09 2f 2a 20 53 61 6e | 69 74 79 20 63 68 65 63 |../* San|ity chec|
|00001290| 6b 2c 20 73 74 61 63 6b | 20 6f 76 65 72 72 75 6e |k, stack| overrun|
|000012a0| 20 2a 2f 0d 0d 09 69 66 | 20 28 64 6f 50 72 69 6e | */...if| (doPrin|
|000012b0| 74 29 20 7b 0d 09 09 2f | 2a 0d 09 09 20 2a 20 50 |t) {.../|*... * P|
|000012c0| 72 69 6e 74 69 6e 67 2e | 0d 09 09 20 2a 2f 0d 09 |rinting.|... */..|
|000012d0| 09 69 66 20 28 63 75 72 | 4c 69 6e 65 20 3e 20 62 |.if (cur|Line > b|
|000012e0| 6f 74 74 6f 6d 4c 69 6e | 65 29 20 7b 0d 09 09 09 |ottomLin|e) {....|
|000012f0| 2f 2a 0d 09 09 09 20 2a | 20 41 74 20 65 6e 64 20 |/*.... *| At end |
|00001300| 6f 66 20 70 61 67 65 2c | 20 73 74 61 72 74 20 61 |of page,| start a|
|00001310| 20 6e 65 77 20 6f 6e 65 | 2e 0d 09 09 09 20 2a 2f | new one|..... */|
|00001320| 0d 09 09 09 50 72 43 6c | 6f 73 65 50 61 67 65 28 |....PrCl|osePage(|
|00001330| 70 72 50 6f 72 74 29 3b | 0d 09 09 09 69 66 20 28 |prPort);|....if (|
|00001340| 28 65 72 72 20 3d 20 50 | 72 45 72 72 6f 72 28 29 |(err = P|rError()|
|00001350| 29 20 21 3d 20 6e 6f 45 | 72 72 29 20 7b 0d 09 09 |) != noE|rr) {...|
|00001360| 09 09 69 66 20 28 65 72 | 72 20 21 3d 20 69 50 72 |..if (er|r != iPr|
|00001370| 41 62 6f 72 74 29 0d 09 | 09 09 09 09 4f 53 41 6c |Abort)..|....OSAl|
|00001380| 65 72 74 28 72 6f 75 74 | 69 6e 65 2c 20 22 5c 70 |ert(rout|ine, "\p|
|00001390| 50 72 43 6c 6f 73 65 50 | 61 67 65 22 2c 20 6e 69 |PrCloseP|age", ni|
|000013a0| 6c 2c 0d 09 09 09 09 09 | 09 09 50 72 45 72 72 6f |l,......|..PrErro|
|000013b0| 72 28 29 29 3b 0d 09 09 | 09 09 72 65 74 75 72 6e |r());...|..return|
|000013c0| 3b 0d 09 09 09 7d 0d 0d | 09 09 09 50 72 4f 70 65 |;....}..|...PrOpe|
|000013d0| 6e 50 61 67 65 28 70 72 | 50 6f 72 74 2c 20 6e 69 |nPage(pr|Port, ni|
|000013e0| 6c 29 3b 0d 09 09 09 69 | 66 20 28 50 72 45 72 72 |l);....i|f (PrErr|
|000013f0| 6f 72 28 29 20 21 3d 20 | 6e 6f 45 72 72 29 20 7b |or() != |noErr) {|
|00001400| 0d 09 09 09 09 69 66 20 | 28 65 72 72 20 21 3d 20 |.....if |(err != |
|00001410| 69 50 72 41 62 6f 72 74 | 29 0d 09 09 09 09 09 4f |iPrAbort|)......O|
|00001420| 53 41 6c 65 72 74 28 72 | 6f 75 74 69 6e 65 2c 20 |SAlert(r|outine, |
|00001430| 22 5c 70 50 72 43 6c 6f | 73 65 50 61 67 65 22 2c |"\pPrClo|sePage",|
|00001440| 20 6e 69 6c 2c 0d 09 09 | 09 09 09 09 09 50 72 45 | nil,...|.....PrE|
|00001450| 72 72 6f 72 28 29 29 3b | 0d 09 09 09 09 72 65 74 |rror());|.....ret|
|00001460| 75 72 6e 3b 0d 09 09 09 | 7d 0d 0d 09 09 09 2f 2a |urn;....|}...../*|
|00001470| 0d 09 09 09 20 2a 20 59 | 65 73 2c 20 77 65 20 72 |.... * Y|es, we r|
|00001480| 65 61 6c 6c 79 20 6d 75 | 73 74 20 72 65 73 65 74 |eally mu|st reset|
|00001490| 20 74 68 65 20 66 6f 6e | 74 2e 0d 09 09 09 20 2a | the fon|t..... *|
|000014a0| 2f 0d 09 09 09 4d 6f 76 | 65 54 6f 28 4c 45 46 54 |/....Mov|eTo(LEFT|
|000014b0| 4d 41 52 2c 20 63 75 72 | 4c 69 6e 65 20 3d 20 66 |MAR, cur|Line = f|
|000014c0| 6f 6e 74 48 65 69 67 68 | 74 29 3b 0d 09 09 09 54 |ontHeigh|t);....T|
|000014d0| 65 78 74 46 61 63 65 28 | 75 6e 64 65 72 6c 69 6e |extFace(|underlin|
|000014e0| 65 29 3b 0d 09 09 09 44 | 72 61 77 54 65 78 74 28 |e);....D|rawText(|
|000014f0| 68 65 61 64 65 72 2c 20 | 30 2c 20 73 74 72 6c 65 |header, |0, strle|
|00001500| 6e 28 68 65 61 64 65 72 | 29 29 3b 0d 09 09 09 54 |n(header|));....T|
|00001510| 65 78 74 46 61 63 65 28 | 30 29 3b 0d 09 09 09 4d |extFace(|0);....M|
|00001520| 6f 76 65 54 6f 28 4c 45 | 46 54 4d 41 52 2c 20 63 |oveTo(LE|FTMAR, c|
|00001530| 75 72 4c 69 6e 65 20 2b | 3d 20 66 6f 6e 74 48 65 |urLine +|= fontHe|
|00001540| 69 67 68 74 29 3b 0d 09 | 09 7d 0d 0d 09 09 44 72 |ight);..|.}....Dr|
|00001550| 61 77 54 65 78 74 28 62 | 75 66 2c 20 30 2c 20 73 |awText(b|uf, 0, s|
|00001560| 74 72 6c 65 6e 28 62 75 | 66 29 29 3b 0d 09 09 4d |trlen(bu|f));...M|
|00001570| 6f 76 65 54 6f 28 4c 45 | 46 54 4d 41 52 2c 20 63 |oveTo(LE|FTMAR, c|
|00001580| 75 72 4c 69 6e 65 20 2b | 3d 20 66 6f 6e 74 48 65 |urLine +|= fontHe|
|00001590| 69 67 68 74 29 3b 0d 09 | 09 72 65 74 75 72 6e 3b |ight);..|.return;|
|000015a0| 0d 09 7d 0d 0d 09 2f 2a | 0d 09 20 2a 20 4f 6e 20 |..}.../*|.. * On |
|000015b0| 73 63 72 65 65 6e 2e 0d | 09 20 2a 2f 0d 09 53 65 |screen..|. */..Se|
|000015c0| 74 50 6f 72 74 28 64 69 | 73 70 57 69 6e 64 29 3b |tPort(di|spWind);|
|000015d0| 0d 09 69 66 20 28 63 75 | 72 4c 69 6e 65 20 3e 20 |..if (cu|rLine > |
|000015e0| 62 6f 74 74 6f 6d 4c 69 | 6e 65 29 20 7b 0d 09 09 |bottomLi|ne) {...|
|000015f0| 2f 2a 0d 09 09 20 2a 20 | 41 74 20 65 6e 64 20 6f |/*... * |At end o|
|00001600| 66 20 73 63 72 65 65 6e | 2c 20 73 63 72 6f 6c 6c |f screen|, scroll|
|00001610| 20 75 70 2e 0d 09 09 20 | 2a 2f 0d 09 09 53 65 74 | up.... |*/...Set|
|00001620| 52 65 63 74 28 26 72 2c | 20 64 69 73 70 57 69 6e |Rect(&r,| dispWin|
|00001630| 64 2d 3e 70 6f 72 74 52 | 65 63 74 2e 6c 65 66 74 |d->portR|ect.left|
|00001640| 2c 20 74 6f 70 4c 69 6e | 65 2c 0d 09 09 09 09 64 |, topLin|e,.....d|
|00001650| 69 73 70 57 69 6e 64 2d | 3e 70 6f 72 74 52 65 63 |ispWind-|>portRec|
|00001660| 74 2e 72 69 67 68 74 2c | 20 62 6f 74 74 6f 6d 4d |t.right,| bottomM|
|00001670| 61 72 67 69 6e 29 3b 0d | 09 09 53 63 72 6f 6c 6c |argin);.|..Scroll|
|00001680| 52 65 63 74 28 26 72 2c | 20 30 2c 20 2d 66 6f 6e |Rect(&r,| 0, -fon|
|00001690| 74 48 65 69 67 68 74 2c | 20 75 70 64 61 74 65 29 |tHeight,| update)|
|000016a0| 3b 0d 09 09 53 65 74 45 | 6d 70 74 79 52 67 6e 28 |;...SetE|mptyRgn(|
|000016b0| 75 70 64 61 74 65 29 3b | 0d 09 09 4d 6f 76 65 54 |update);|...MoveT|
|000016c0| 6f 28 4c 45 46 54 4d 41 | 52 2c 20 63 75 72 4c 69 |o(LEFTMA|R, curLi|
|000016d0| 6e 65 20 3d 20 62 6f 74 | 74 6f 6d 4c 69 6e 65 29 |ne = bot|tomLine)|
|000016e0| 3b 0d 09 7d 0d 0d 09 69 | 66 20 28 61 75 74 6f 50 |;..}...i|f (autoP|
|000016f0| 61 67 65 20 26 26 20 28 | 2b 2b 77 43 75 72 4c 69 |age && (|++wCurLi|
|00001700| 6e 65 20 3d 3d 20 77 4c | 69 6e 65 73 29 29 20 7b |ne == wL|ines)) {|
|00001710| 0d 09 09 2f 2a 0d 09 09 | 20 2a 20 41 74 20 65 6e |.../*...| * At en|
|00001720| 64 20 6f 66 20 73 63 72 | 65 65 6e 2c 20 77 61 69 |d of scr|een, wai|
|00001730| 74 20 66 6f 72 20 6b 65 | 79 20 70 72 65 73 73 2e |t for ke|y press.|
|00001740| 0d 09 09 20 2a 2f 0d 09 | 09 77 43 75 72 4c 69 6e |... */..|.wCurLin|
|00001750| 65 20 3d 20 30 3b 0d 09 | 09 44 72 61 77 54 65 78 |e = 0;..|.DrawTex|
|00001760| 74 28 22 50 72 65 73 73 | 20 61 6e 79 20 6b 65 79 |t("Press| any key|
|00001770| 20 74 6f 20 63 6f 6e 74 | 69 6e 75 65 22 2c 20 30 | to cont|inue", 0|
|00001780| 2c 20 32 35 29 3b 0d 09 | 09 64 6f 20 7b 0d 09 09 |, 25);..|.do {...|
|00001790| 09 53 79 73 74 65 6d 54 | 61 73 6b 28 29 3b 0d 09 |.SystemT|ask();..|
|000017a0| 09 09 69 66 20 28 47 65 | 74 4e 65 78 74 45 76 65 |..if (Ge|tNextEve|
|000017b0| 6e 74 28 6b 65 79 44 6f | 77 6e 4d 61 73 6b 2c 20 |nt(keyDo|wnMask, |
|000017c0| 26 65 29 20 3d 3d 20 66 | 61 6c 73 65 29 0d 09 09 |&e) == f|alse)...|
|000017d0| 09 09 65 2e 77 68 61 74 | 20 3d 20 6e 75 6c 6c 45 |..e.what| = nullE|
|000017e0| 76 65 6e 74 3b 0d 09 09 | 7d 20 77 68 69 6c 65 20 |vent;...|} while |
|000017f0| 28 65 2e 77 68 61 74 20 | 21 3d 20 6b 65 79 44 6f |(e.what |!= keyDo|
|00001800| 77 6e 29 3b 0d 0d 09 09 | 53 65 74 52 65 63 74 28 |wn);....|SetRect(|
|00001810| 26 72 2c 20 64 69 73 70 | 57 69 6e 64 2d 3e 70 6f |&r, disp|Wind->po|
|00001820| 72 74 52 65 63 74 2e 6c | 65 66 74 2c 20 62 6f 74 |rtRect.l|eft, bot|
|00001830| 74 6f 6d 4d 61 72 67 69 | 6e 20 2d 20 66 6f 6e 74 |tomMargi|n - font|
|00001840| 48 65 69 67 68 74 2c 0d | 09 09 09 09 64 69 73 70 |Height,.|....disp|
|00001850| 57 69 6e 64 2d 3e 70 6f | 72 74 52 65 63 74 2e 72 |Wind->po|rtRect.r|
|00001860| 69 67 68 74 2c 20 62 6f | 74 74 6f 6d 4d 61 72 67 |ight, bo|ttomMarg|
|00001870| 69 6e 29 3b 0d 09 09 45 | 72 61 73 65 52 65 63 74 |in);...E|raseRect|
|00001880| 28 26 72 29 3b 0d 09 09 | 4d 6f 76 65 54 6f 28 4c |(&r);...|MoveTo(L|
|00001890| 45 46 54 4d 41 52 2c 20 | 63 75 72 4c 69 6e 65 29 |EFTMAR, |curLine)|
|000018a0| 3b 0d 0d 09 7d 20 65 6c | 73 65 20 7b 0d 09 09 2f |;...} el|se {.../|
|000018b0| 2a 0d 09 09 20 2a 20 4e | 6f 20 61 75 74 6f 20 70 |*... * N|o auto p|
|000018c0| 61 67 65 2c 20 6f 6e 6c | 79 20 73 74 6f 70 20 69 |age, onl|y stop i|
|000018d0| 66 20 63 6f 6d 6d 61 6e | 64 20 53 20 69 73 20 70 |f comman|d S is p|
|000018e0| 72 65 73 73 65 64 2e 0d | 09 09 20 2a 2f 0d 09 09 |ressed..|.. */...|
|000018f0| 69 66 20 28 47 65 74 4e | 65 78 74 45 76 65 6e 74 |if (GetN|extEvent|
|00001900| 28 6b 65 79 44 6f 77 6e | 4d 61 73 6b 2c 20 26 65 |(keyDown|Mask, &e|
|00001910| 29 29 20 7b 0d 09 09 09 | 69 66 20 28 28 28 65 2e |)) {....|if (((e.|
|00001920| 6d 65 73 73 61 67 65 20 | 26 20 63 68 61 72 43 6f |message |& charCo|
|00001930| 64 65 4d 61 73 6b 20 26 | 20 7e 30 78 32 30 29 20 |deMask &| ~0x20) |
|00001940| 3d 3d 20 27 53 27 29 0d | 09 09 09 09 09 09 26 26 |== 'S').|......&&|
|00001950| 20 28 65 2e 6d 6f 64 69 | 66 69 65 72 73 20 26 20 | (e.modi|fiers & |
|00001960| 63 6d 64 4b 65 79 29 29 | 20 7b 0d 09 09 09 09 64 |cmdKey))| {.....d|
|00001970| 6f 20 7b 0d 09 09 09 09 | 09 2f 2a 0d 09 09 09 09 |o {.....|./*.....|
|00001980| 09 20 2a 20 53 74 61 72 | 74 20 61 67 61 69 6e 20 |. * Star|t again |
|00001990| 61 66 74 65 72 20 63 6f | 6d 6d 61 6e 64 20 51 2e |after co|mmand Q.|
|000019a0| 0d 09 09 09 09 09 20 2a | 2f 0d 09 09 09 09 09 53 |...... *|/......S|
|000019b0| 79 73 74 65 6d 54 61 73 | 6b 28 29 3b 0d 09 09 09 |ystemTas|k();....|
|000019c0| 09 09 69 66 20 28 47 65 | 74 4e 65 78 74 45 76 65 |..if (Ge|tNextEve|
|000019d0| 6e 74 28 6b 65 79 44 6f | 77 6e 4d 61 73 6b 2c 20 |nt(keyDo|wnMask, |
|000019e0| 26 65 29 20 3d 3d 20 66 | 61 6c 73 65 29 0d 09 09 |&e) == f|alse)...|
|000019f0| 09 09 09 09 65 2e 6d 65 | 73 73 61 67 65 20 3d 20 |....e.me|ssage = |
|00001a00| 30 3b 0d 0d 09 09 09 09 | 09 65 2e 6d 65 73 73 61 |0;......|.e.messa|
|00001a10| 67 65 20 26 3d 20 63 68 | 61 72 43 6f 64 65 4d 61 |ge &= ch|arCodeMa|
|00001a20| 73 6b 20 26 20 7e 30 78 | 32 30 3b 0d 09 09 09 09 |sk & ~0x|20;.....|
|00001a30| 7d 20 77 68 69 6c 65 20 | 28 65 2e 6d 65 73 73 61 |} while |(e.messa|
|00001a40| 67 65 20 21 3d 20 27 51 | 27 29 3b 0d 09 09 09 7d |ge != 'Q|');....}|
|00001a50| 0d 09 09 7d 0d 09 7d 0d | 0d 09 44 72 61 77 54 65 |...}..}.|..DrawTe|
|00001a60| 78 74 28 62 75 66 2c 20 | 30 2c 20 73 74 72 6c 65 |xt(buf, |0, strle|
|00001a70| 6e 28 62 75 66 29 29 3b | 0d 09 4d 6f 76 65 54 6f |n(buf));|..MoveTo|
|00001a80| 28 4c 45 46 54 4d 41 52 | 2c 20 63 75 72 4c 69 6e |(LEFTMAR|, curLin|
|00001a90| 65 20 2b 3d 20 66 6f 6e | 74 48 65 69 67 68 74 29 |e += fon|tHeight)|
|00001aa0| 3b 0d 7d 0d 0d 2f 2a 0d | 20 2a 20 50 72 53 65 74 |;.}../*.| * PrSet|
|00001ab0| 75 70 20 2d 20 6d 61 6b | 65 20 73 75 72 65 20 74 |up - mak|e sure t|
|00001ac0| 68 65 20 70 72 69 6e 74 | 65 72 20 64 72 69 76 65 |he print|er drive|
|00001ad0| 72 20 68 61 73 20 62 65 | 65 6e 20 6f 70 65 6e 65 |r has be|en opene|
|00001ae0| 64 2e 0d 20 2a 0d 20 2a | 09 52 65 74 75 72 6e 73 |d.. *. *|.Returns|
|00001af0| 20 74 72 75 65 20 69 66 | 20 61 6e 20 65 72 72 6f | true if| an erro|
|00001b00| 72 20 69 73 20 66 6f 75 | 6e 64 2c 20 66 61 6c 73 |r is fou|nd, fals|
|00001b10| 65 20 6f 74 68 65 72 77 | 69 73 65 2e 0d 20 2a 2f |e otherw|ise.. */|
|00001b20| 0d 42 6f 6f 6c 65 61 6e | 0d 50 72 53 65 74 75 70 |.Boolean|.PrSetup|
|00001b30| 28 29 20 7b 0d 09 63 68 | 61 72 09 2a 72 6f 75 74 |() {..ch|ar.*rout|
|00001b40| 69 6e 65 20 3d 20 22 5c | 70 50 72 53 65 74 75 70 |ine = "\|pPrSetup|
|00001b50| 22 3b 0d 0d 09 69 66 20 | 28 21 70 4f 70 65 6e 29 |";...if |(!pOpen)|
|00001b60| 20 7b 0d 09 09 50 72 4f | 70 65 6e 28 29 3b 0d 09 | {...PrO|pen();..|
|00001b70| 09 69 66 20 28 50 72 45 | 72 72 6f 72 28 29 20 21 |.if (PrE|rror() !|
|00001b80| 3d 20 6e 6f 45 72 72 29 | 20 7b 0d 09 09 09 4f 53 |= noErr)| {....OS|
|00001b90| 41 6c 65 72 74 28 72 6f | 75 74 69 6e 65 2c 20 22 |Alert(ro|utine, "|
|00001ba0| 5c 70 50 72 4f 70 65 6e | 22 2c 20 6e 69 6c 2c 20 |\pPrOpen|", nil, |
|00001bb0| 50 72 45 72 72 6f 72 28 | 29 29 3b 0d 09 09 09 72 |PrError(|));....r|
|00001bc0| 65 74 75 72 6e 28 74 72 | 75 65 29 3b 0d 09 09 7d |eturn(tr|ue);...}|
|00001bd0| 0d 0d 09 09 70 4f 70 65 | 6e 20 3d 20 74 72 75 65 |....pOpe|n = true|
|00001be0| 3b 0d 09 09 50 72 69 6e | 74 44 65 66 61 75 6c 74 |;...Prin|tDefault|
|00001bf0| 28 70 72 52 65 63 48 64 | 6c 29 3b 0d 09 09 69 66 |(prRecHd|l);...if|
|00001c00| 20 28 50 72 45 72 72 6f | 72 28 29 20 21 3d 20 6e | (PrErro|r() != n|
|00001c10| 6f 45 72 72 29 20 7b 0d | 09 09 09 4f 53 41 6c 65 |oErr) {.|...OSAle|
|00001c20| 72 74 28 72 6f 75 74 69 | 6e 65 2c 20 22 5c 70 50 |rt(routi|ne, "\pP|
|00001c30| 72 69 6e 74 44 65 66 61 | 75 6c 74 22 2c 20 6e 69 |rintDefa|ult", ni|
|00001c40| 6c 2c 20 50 72 45 72 72 | 6f 72 28 29 29 3b 0d 09 |l, PrErr|or());..|
|00001c50| 09 09 72 65 74 75 72 6e | 28 74 72 75 65 29 3b 0d |..return|(true);.|
|00001c60| 09 09 7d 0d 09 7d 0d 0d | 09 72 65 74 75 72 6e 28 |..}..}..|.return(|
|00001c70| 66 61 6c 73 65 29 3b 0d | 7d 0d 00 00 00 00 00 00 |false);.|}.......|
|00001c80| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001c90| 54 61 72 0d 20 2a 0d 20 | 2a 20 57 72 69 74 74 65 |Tar. *. |* Writte|
|00001ca0| 6e 20 62 79 20 43 72 61 | 69 67 20 52 75 66 66 0d |n by Cra|ig Ruff.|
|00001cb0| 08 77 69 6e 64 6f 77 2e | 63 2e 02 00 00 00 00 00 |.window.|c.......|
|00001cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 a0 cb 8f b8 00 00 | 00 00 00 00 01 7e 76 65 |........|.....~ve|
|00001d00| 73 2e 0d 20 2a 2f 0d 0d | 23 69 6e 63 6c 75 64 65 |s.. */..|#include|
|00001d10| 20 22 74 61 72 2e 68 22 | 0d 23 69 6e 63 6c 75 64 | "tar.h"|.#includ|
|00001d20| 65 20 3c 72 65 73 6f 75 | 72 63 65 2e 68 3e 0d 0d |e <resou|rce.h>..|
|00001d30| 23 64 65 66 69 6e 65 20 | 64 69 73 70 49 44 09 31 |#define |dispID.1|
|00001d40| 32 39 09 09 2f 2a 20 44 | 69 73 70 6c 61 79 20 77 |29../* D|isplay w|
|00001d50| 69 6e 64 6f 77 20 49 44 | 20 28 69 6e 20 72 65 73 |indow ID| (in res|
|00001d60| 6f 75 72 63 65 20 66 69 | 6c 65 29 20 2a 2f 0d 23 |ource fi|le) */.#|
|00001d70| 64 65 66 69 6e 65 20 4c | 45 46 54 4d 41 52 09 35 |define L|EFTMAR.5|
|00001d80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 20 57 69 |...H..Mo|naco. Wi|
|00001d90| 6e 64 6f 77 20 6d 61 6e | 69 70 75 6c 61 74 69 6f |ndow man|ipulatio|
|00001da0| 6e 20 72 6f 75 74 00 06 | 00 08 00 2a 00 03 01 53 |n rout..|...*...S|
|00001db0| 01 fd 00 3c 00 24 01 53 | 01 bd a0 a6 f7 44 00 00 |...<.$.S|.....D..|
|00001dc0| 0e 60 00 00 0e 60 00 00 | 02 e0 01 00 00 00 01 00 |.`...`..|........|
|00001dd0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 1a 66 0e |...L...L|...2..f.|
|00001de0| 08 16 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00001df0| 00 0a 03 ed ff ff 00 00 | 00 00 00 1b 9f 80 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+