home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1990-05-23 | 4.9 KB | [TEXT/KAHL] |
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: print.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, Mon Jan 30 07:11:18 1989, modified Fri Jan 26 14:43:59 1990, creator Think C, type ASCII, 4785 bytes "print.c"
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| lsar
| MacBinary
| default
| |
100%
| gt2
| MAC Bilddatei
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 70 72 69 6e 74 2e | 63 00 00 00 00 00 00 00 |..print.|c.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 12 b1 00 | 00 00 00 a0 0a 01 66 a1 |........|......f.|
|00000060| e6 58 ff 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.X......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 2a 0d 20 2a 09 70 72 69 | 6e 74 2e 63 0d 20 2a 0d |*. *.pri|nt.c. *.|
|000000e0| 20 2a 09 50 72 69 6e 74 | 69 6e 67 20 50 61 63 6b | *.Print|ing Pack|
|000000f0| 61 67 65 0d 20 2a 0d 20 | 2a 09 57 72 69 74 74 65 |age. *. |*.Writte|
|00000100| 6e 20 62 79 20 50 61 63 | 6f 20 58 61 6e 64 65 72 |n by Pac|o Xander|
|00000110| 20 4e 61 74 68 61 6e 0d | 20 2a 09 a9 31 39 39 30 | Nathan.| *..1990|
|00000120| 2c 20 4d 6f 74 6f 72 6f | 6c 61 20 49 6e 63 2e 20 |, Motoro|la Inc. |
|00000130| 20 50 75 62 6c 69 63 20 | 64 6f 6d 61 69 6e 20 73 | Public |domain s|
|00000140| 6f 75 72 63 65 20 63 6f | 64 65 2e 0d 20 2a 2a 2a |ource co|de.. ***|
|00000150| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0d 0d |********|*****/..|
|000001a0| 23 69 6e 63 6c 75 64 65 | 20 22 61 70 70 6c 69 63 |#include| "applic|
|000001b0| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 77 69 |.h".#inc|lude "wi|
|000001c0| 6e 64 6f 77 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |ndow.h".|#include|
|000001d0| 20 22 64 69 61 6c 6f 67 | 2e 68 22 0d 23 69 6e 63 | "dialog|.h".#inc|
|000001e0| 6c 75 64 65 20 22 65 72 | 72 6f 72 2e 68 22 0d 23 |lude "er|ror.h".#|
|000001f0| 69 6e 63 6c 75 64 65 20 | 22 70 72 69 6e 74 2e 68 |include |"print.h|
|00000200| 22 0d 23 69 6e 63 6c 75 | 64 65 20 3c 50 72 69 6e |".#inclu|de <Prin|
|00000210| 74 4d 67 72 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |tMgr.h>.|#include|
|00000220| 20 3c 49 6e 74 6c 50 6b | 67 2e 68 3e 0d 0d 23 69 | <IntlPk|g.h>..#i|
|00000230| 6e 63 6c 75 64 65 20 22 | 74 65 73 74 2e 68 22 0d |nclude "|test.h".|
|00000240| 23 69 6e 63 6c 75 64 65 | 20 22 67 6e 6f 73 69 73 |#include| "gnosis|
|00000250| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 61 6e |.h".#inc|lude "an|
|00000260| 61 6c 79 73 69 73 2e 68 | 22 0d 0d 0d 2f 2a 20 4c |alysis.h|".../* L|
|00000270| 6f 63 61 6c 20 44 61 74 | 61 20 53 74 72 75 63 74 |ocal Dat|a Struct|
|00000280| 75 72 65 73 0d 20 2a 2f | 0d 73 74 61 74 69 63 20 |ures. */|.static |
|00000290| 54 48 50 72 69 6e 74 20 | 0d 09 70 72 69 6e 74 48 |THPrint |..printH|
|000002a0| 64 6c 20 3d 20 4e 55 4c | 4c 3b 0d 09 0d 73 74 61 |dl = NUL|L;...sta|
|000002b0| 74 69 63 20 54 50 50 72 | 50 6f 72 74 20 0d 09 70 |tic TPPr|Port ..p|
|000002c0| 72 69 6e 74 50 6f 72 74 | 3b 0d 0d 73 74 61 74 69 |rintPort|;..stati|
|000002d0| 63 20 54 50 72 53 74 61 | 74 75 73 0d 09 74 68 65 |c TPrSta|tus..the|
|000002e0| 53 74 61 74 75 73 3b 0d | 0d 73 74 61 74 69 63 20 |Status;.|.static |
|000002f0| 42 6f 6f 6c 65 61 6e 0d | 09 70 72 69 6e 74 46 69 |Boolean.|.printFi|
|00000300| 72 73 74 20 3d 20 54 52 | 55 45 3b 0d 0d 0d 23 69 |rst = TR|UE;...#i|
|00000310| 66 64 65 66 20 50 52 4f | 54 4f 54 59 50 45 53 0d |fdef PRO|TOTYPES.|
|00000320| 2f 2a 20 4c 6f 63 61 6c | 20 46 75 6e 63 74 69 6f |/* Local| Functio|
|00000330| 6e 20 50 72 6f 74 6f 74 | 79 70 65 73 0d 20 2a 2f |n Protot|ypes. */|
|00000340| 0d 42 6f 6f 6c 65 61 6e | 20 50 72 69 6e 74 53 74 |.Boolean| PrintSt|
|00000350| 79 6c 65 20 28 57 69 6e | 64 6f 77 50 74 72 20 74 |yle (Win|dowPtr t|
|00000360| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 76 6f 69 64 20 |heWindow|);.void |
|00000370| 50 72 69 6e 74 54 65 78 | 74 20 28 54 45 48 61 6e |PrintTex|t (TEHan|
|00000380| 64 6c 65 20 74 65 48 64 | 6c 2c 20 52 65 63 74 20 |dle teHd|l, Rect |
|00000390| 2a 70 61 67 65 52 65 63 | 74 29 3b 0d 23 65 6e 64 |*pageRec|t);.#end|
|000003a0| 69 66 0d 0d 0d 2f 2a 20 | 43 61 6c 6c 20 74 68 65 |if.../* |Call the|
|000003b0| 20 73 74 61 6e 64 61 72 | 64 20 70 61 67 65 20 73 | standar|d page s|
|000003c0| 65 74 75 70 20 64 69 61 | 6c 6f 67 0d 20 2a 2f 0d |etup dia|log. */.|
|000003d0| 73 74 61 74 69 63 20 42 | 6f 6f 6c 65 61 6e 0d 50 |static B|oolean.P|
|000003e0| 72 69 6e 74 53 74 79 6c | 65 20 28 74 68 65 57 69 |rintStyl|e (theWi|
|000003f0| 6e 64 6f 77 29 0d 09 72 | 65 67 69 73 74 65 72 20 |ndow)..r|egister |
|00000400| 57 69 6e 64 6f 77 50 74 | 72 20 74 68 65 57 69 6e |WindowPt|r theWin|
|00000410| 64 6f 77 3b 0d 7b 0d 09 | 72 65 67 69 73 74 65 72 |dow;.{..|register|
|00000420| 20 42 6f 6f 6c 65 61 6e | 20 72 65 73 75 6c 74 20 | Boolean| result |
|00000430| 3d 20 54 52 55 45 3b 0d | 0d 09 2f 2a 20 56 61 6c |= TRUE;.|../* Val|
|00000440| 69 64 61 74 65 20 74 68 | 65 20 70 72 69 6e 74 20 |idate th|e print |
|00000450| 68 61 6e 64 6c 65 20 69 | 66 20 74 68 65 20 75 73 |handle i|f the us|
|00000460| 65 72 20 68 61 73 20 73 | 65 6c 65 63 74 65 64 20 |er has s|elected |
|00000470| 74 68 69 73 20 61 6c 72 | 65 61 64 79 2e 2e 2e 0d |this alr|eady....|
|00000480| 09 20 2a 2f 0d 09 69 66 | 20 28 70 72 69 6e 74 46 |. */..if| (printF|
|00000490| 69 72 73 74 20 7c 7c 20 | 21 74 68 65 57 69 6e 64 |irst || |!theWind|
|000004a0| 6f 77 29 20 7b 0d 09 09 | 72 65 73 75 6c 74 20 3d |ow) {...|result =|
|000004b0| 20 50 72 53 74 6c 44 69 | 61 6c 6f 67 28 70 72 69 | PrStlDi|alog(pri|
|000004c0| 6e 74 48 64 6c 29 3b 0d | 09 09 50 72 56 61 6c 69 |ntHdl);.|..PrVali|
|000004d0| 64 61 74 65 28 70 72 69 | 6e 74 48 64 6c 29 3b 0d |date(pri|ntHdl);.|
|000004e0| 09 7d 0d 0d 09 72 65 74 | 75 72 6e 20 72 65 73 75 |.}...ret|urn resu|
|000004f0| 6c 74 3b 0d 7d 0d 0d 0d | 2f 2a 20 50 72 69 6e 74 |lt;.}...|/* Print|
|00000500| 20 61 20 54 45 20 72 65 | 63 6f 72 64 2c 20 70 61 | a TE re|cord, pa|
|00000510| 67 65 20 62 79 20 70 61 | 67 65 0d 20 2a 2f 0d 76 |ge by pa|ge. */.v|
|00000520| 6f 69 64 0d 50 72 69 6e | 74 54 65 78 74 20 28 74 |oid.Prin|tText (t|
|00000530| 65 48 64 6c 2c 20 70 61 | 67 65 52 65 63 74 29 0d |eHdl, pa|geRect).|
|00000540| 09 72 65 67 69 73 74 65 | 72 20 54 45 48 61 6e 64 |.registe|r TEHand|
|00000550| 6c 65 20 74 65 48 64 6c | 3b 0d 09 72 65 67 69 73 |le teHdl|;..regis|
|00000560| 74 65 72 20 52 65 63 74 | 20 2a 70 61 67 65 52 65 |ter Rect| *pageRe|
|00000570| 63 74 3b 0d 7b 0d 09 72 | 65 67 69 73 74 65 72 20 |ct;.{..r|egister |
|00000580| 54 45 48 61 6e 64 6c 65 | 20 70 61 67 65 54 45 3b |TEHandle| pageTE;|
|00000590| 0d 09 72 65 67 69 73 74 | 65 72 20 43 68 61 72 73 |..regist|er Chars|
|000005a0| 48 61 6e 64 6c 65 20 63 | 68 61 72 48 64 6c 3b 0d |Handle c|harHdl;.|
|000005b0| 09 72 65 67 69 73 74 65 | 72 20 57 4f 52 44 20 6d |.registe|r WORD m|
|000005c0| 61 78 4c 69 6e 65 73 2c | 20 6c 69 6e 65 73 49 6e |axLines,| linesIn|
|000005d0| 74 6f 2c 20 70 61 67 65 | 4c 69 6e 65 73 3b 0d 0d |to, page|Lines;..|
|000005e0| 09 2f 2a 20 43 72 65 61 | 74 65 20 61 20 74 65 6d |./* Crea|te a tem|
|000005f0| 70 6f 72 61 72 79 20 54 | 45 20 66 6f 72 20 69 6d |porary T|E for im|
|00000600| 61 67 69 6e 67 0d 09 20 | 2a 2f 0d 09 70 61 67 65 |aging.. |*/..page|
|00000610| 54 45 20 3d 20 54 45 4e | 65 77 28 70 61 67 65 52 |TE = TEN|ew(pageR|
|00000620| 65 63 74 2c 20 70 61 67 | 65 52 65 63 74 29 3b 0d |ect, pag|eRect);.|
|00000630| 09 63 68 61 72 48 64 6c | 20 3d 20 54 45 47 65 74 |.charHdl| = TEGet|
|00000640| 54 65 78 74 28 74 65 48 | 64 6c 29 3b 0d 09 54 45 |Text(teH|dl);..TE|
|00000650| 53 65 74 54 65 78 74 28 | 2a 63 68 61 72 48 64 6c |SetText(|*charHdl|
|00000660| 2c 20 47 65 74 48 61 6e | 64 6c 65 53 69 7a 65 28 |, GetHan|dleSize(|
|00000670| 63 68 61 72 48 64 6c 29 | 2c 20 70 61 67 65 54 45 |charHdl)|, pageTE|
|00000680| 29 3b 0d 0d 09 54 45 43 | 61 6c 54 65 78 74 28 70 |);...TEC|alText(p|
|00000690| 61 67 65 54 45 29 3b 0d | 09 6d 61 78 4c 69 6e 65 |ageTE);.|.maxLine|
|000006a0| 73 20 3d 20 28 2a 70 61 | 67 65 54 45 29 2d 3e 6e |s = (*pa|geTE)->n|
|000006b0| 4c 69 6e 65 73 3b 0d 09 | 6c 69 6e 65 73 49 6e 74 |Lines;..|linesInt|
|000006c0| 6f 20 3d 20 30 3b 0d 09 | 70 61 67 65 4c 69 6e 65 |o = 0;..|pageLine|
|000006d0| 73 20 3d 20 28 70 61 67 | 65 52 65 63 74 2d 3e 62 |s = (pag|eRect->b|
|000006e0| 6f 74 74 6f 6d 20 2d 20 | 70 61 67 65 52 65 63 74 |ottom - |pageRect|
|000006f0| 2d 3e 74 6f 70 29 20 2f | 20 28 2a 70 61 67 65 54 |->top) /| (*pageT|
|00000700| 45 29 2d 3e 6c 69 6e 65 | 48 65 69 67 68 74 3b 0d |E)->line|Height;.|
|00000710| 0d 09 77 68 69 6c 65 20 | 28 54 52 55 45 29 20 7b |..while |(TRUE) {|
|00000720| 0d 09 09 2f 2a 20 44 72 | 61 77 20 74 68 69 73 20 |.../* Dr|aw this |
|00000730| 76 69 65 77 52 65 63 74 | 20 61 6e 64 20 74 72 61 |viewRect| and tra|
|00000740| 63 6b 20 68 6f 77 20 6d | 61 6e 79 20 6c 69 6e 65 |ck how m|any line|
|00000750| 73 20 68 61 76 65 20 62 | 65 65 6e 20 64 72 61 77 |s have b|een draw|
|00000760| 6e 0d 09 09 20 2a 2f 0d | 09 09 54 45 55 70 64 61 |n... */.|..TEUpda|
|00000770| 74 65 28 70 61 67 65 52 | 65 63 74 2c 20 70 61 67 |te(pageR|ect, pag|
|00000780| 65 54 45 29 3b 0d 09 09 | 6c 69 6e 65 73 49 6e 74 |eTE);...|linesInt|
|00000790| 6f 20 2b 3d 20 70 61 67 | 65 4c 69 6e 65 73 3b 0d |o += pag|eLines;.|
|000007a0| 0d 09 09 2f 2a 20 47 6f | 20 6f 6e 20 74 6f 20 61 |.../* Go| on to a|
|000007b0| 6e 6f 74 68 65 72 20 70 | 61 67 65 2c 20 73 69 20 |nother p|age, si |
|000007c0| 6e 65 63 65 73 73 69 74 | 6f 0d 09 09 20 2a 2f 0d |necessit|o... */.|
|000007d0| 09 09 69 66 20 28 6c 69 | 6e 65 73 49 6e 74 6f 20 |..if (li|nesInto |
|000007e0| 3c 20 6d 61 78 4c 69 6e | 65 73 29 20 7b 0d 09 09 |< maxLin|es) {...|
|000007f0| 09 50 72 43 6c 6f 73 65 | 50 61 67 65 28 70 72 69 |.PrClose|Page(pri|
|00000800| 6e 74 50 6f 72 74 29 3b | 0d 09 09 09 50 72 4f 70 |ntPort);|....PrOp|
|00000810| 65 6e 50 61 67 65 28 70 | 72 69 6e 74 50 6f 72 74 |enPage(p|rintPort|
|00000820| 2c 20 4e 55 4c 4c 29 3b | 0d 09 09 0d 09 09 09 69 |, NULL);|.......i|
|00000830| 66 20 28 50 72 45 72 72 | 6f 72 28 29 20 3d 3d 20 |f (PrErr|or() == |
|00000840| 6e 6f 45 72 72 29 20 7b | 0d 09 09 09 09 53 65 74 |noErr) {|.....Set|
|00000850| 50 6f 72 74 28 70 72 69 | 6e 74 50 6f 72 74 29 3b |Port(pri|ntPort);|
|00000860| 0d 0d 09 09 09 09 2f 2a | 20 46 69 6e 64 20 74 68 |....../*| Find th|
|00000870| 65 20 6e 65 77 20 70 61 | 67 65 52 65 63 74 20 61 |e new pa|geRect a|
|00000880| 6e 64 20 72 6f 75 6e 64 | 20 69 74 20 74 6f 20 61 |nd round| it to a|
|00000890| 6e 20 65 76 65 6e 20 6e | 75 6d 62 65 72 20 6f 66 |n even n|umber of|
|000008a0| 20 0d 09 09 09 09 20 2a | 20 6c 69 6e 65 73 20 70 | ..... *| lines p|
|000008b0| 65 72 20 70 61 67 65 0d | 09 09 09 09 20 2a 2f 0d |er page.|.... */.|
|000008c0| 09 09 09 09 2a 70 61 67 | 65 52 65 63 74 20 3d 20 |....*pag|eRect = |
|000008d0| 28 2a 70 72 69 6e 74 48 | 64 6c 29 2d 3e 70 72 49 |(*printH|dl)->prI|
|000008e0| 6e 66 6f 2e 72 50 61 67 | 65 3b 0d 09 09 09 09 70 |nfo.rPag|e;.....p|
|000008f0| 61 67 65 4c 69 6e 65 73 | 20 3d 20 28 70 61 67 65 |ageLines| = (page|
|00000900| 52 65 63 74 2d 3e 62 6f | 74 74 6f 6d 20 2d 20 70 |Rect->bo|ttom - p|
|00000910| 61 67 65 52 65 63 74 2d | 3e 74 6f 70 29 20 2f 20 |ageRect-|>top) / |
|00000920| 28 2a 70 61 67 65 54 45 | 29 2d 3e 6c 69 6e 65 48 |(*pageTE|)->lineH|
|00000930| 65 69 67 68 74 3b 0d 09 | 09 09 09 70 61 67 65 52 |eight;..|...pageR|
|00000940| 65 63 74 2d 3e 62 6f 74 | 74 6f 6d 20 3d 20 70 61 |ect->bot|tom = pa|
|00000950| 67 65 52 65 63 74 2d 3e | 74 6f 70 20 2b 20 28 70 |geRect->|top + (p|
|00000960| 61 67 65 4c 69 6e 65 73 | 20 2a 20 28 2a 70 61 67 |ageLines| * (*pag|
|00000970| 65 54 45 29 2d 3e 6c 69 | 6e 65 48 65 69 67 68 74 |eTE)->li|neHeight|
|00000980| 29 3b 0d 0d 09 09 09 09 | 2f 2a 20 53 63 72 6f 6c |);......|/* Scrol|
|00000990| 6c 20 74 6f 20 74 68 65 | 20 6e 65 78 74 20 70 61 |l to the| next pa|
|000009a0| 67 65 0d 09 09 09 09 20 | 2a 2f 0d 09 09 09 09 28 |ge..... |*/.....(|
|000009b0| 2a 70 61 67 65 54 45 29 | 2d 3e 64 65 73 74 52 65 |*pageTE)|->destRe|
|000009c0| 63 74 20 3d 20 28 2a 70 | 61 67 65 54 45 29 2d 3e |ct = (*p|ageTE)->|
|000009d0| 76 69 65 77 52 65 63 74 | 20 3d 20 2a 70 61 67 65 |viewRect| = *page|
|000009e0| 52 65 63 74 3b 0d 09 09 | 09 09 54 45 43 61 6c 54 |Rect;...|..TECalT|
|000009f0| 65 78 74 28 70 61 67 65 | 54 45 29 3b 0d 09 09 09 |ext(page|TE);....|
|00000a00| 09 54 45 53 63 72 6f 6c | 6c 28 30 2c 20 6c 69 6e |.TEScrol|l(0, lin|
|00000a10| 65 73 49 6e 74 6f 20 2a | 20 2d 28 2a 70 61 67 65 |esInto *| -(*page|
|00000a20| 54 45 29 2d 3e 6c 69 6e | 65 48 65 69 67 68 74 2c |TE)->lin|eHeight,|
|00000a30| 20 70 61 67 65 54 45 29 | 3b 0d 09 09 09 7d 0d 09 | pageTE)|;....}..|
|00000a40| 09 7d 0d 09 09 65 6c 73 | 65 20 7b 0d 09 09 09 54 |.}...els|e {....T|
|00000a50| 45 44 69 73 70 6f 73 65 | 28 70 61 67 65 54 45 29 |EDispose|(pageTE)|
|00000a60| 3b 0d 09 09 09 72 65 74 | 75 72 6e 3b 0d 09 09 7d |;....ret|urn;...}|
|00000a70| 0d 09 7d 0d 7d 0d 0d 0d | 2f 2a 20 50 72 69 6e 74 |..}.}...|/* Print|
|00000a80| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 64 | the spe|cified d|
|00000a90| 6f 63 75 6d 65 6e 74 20 | 77 69 6e 64 6f 77 3b 20 |ocument |window; |
|00000aa0| 70 61 73 73 20 69 6e 20 | 4e 55 4c 4c 20 66 6f 72 |pass in |NULL for|
|00000ab0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 61 72 67 75 | the win|dow argu|
|00000ac0| 6d 65 6e 74 20 69 66 0d | 20 2a 20 6f 6e 6c 79 20 |ment if.| * only |
|00000ad0| 61 20 50 72 69 6e 74 20 | 53 65 74 75 70 20 64 69 |a Print |Setup di|
|00000ae0| 61 6c 6f 67 20 69 73 20 | 72 65 71 75 65 73 74 65 |alog is |requeste|
|00000af0| 64 2e 0d 20 2a 2f 0d 76 | 6f 69 64 0d 50 72 69 6e |d.. */.v|oid.Prin|
|00000b00| 74 44 6f 63 75 6d 65 6e | 74 20 28 74 68 65 57 69 |tDocumen|t (theWi|
|00000b10| 6e 64 6f 77 29 0d 09 72 | 65 67 69 73 74 65 72 20 |ndow)..r|egister |
|00000b20| 57 69 6e 64 6f 77 50 74 | 72 20 74 68 65 57 69 6e |WindowPt|r theWin|
|00000b30| 64 6f 77 3b 0d 7b 0d 09 | 72 65 67 69 73 74 65 72 |dow;.{..|register|
|00000b40| 20 49 6e 66 6f 50 74 72 | 20 69 6e 66 6f 50 74 72 | InfoPtr| infoPtr|
|00000b50| 20 3d 20 28 49 6e 66 6f | 50 74 72 29 20 47 65 74 | = (Info|Ptr) Get|
|00000b60| 57 52 65 66 43 6f 6e 28 | 77 50 74 72 54 65 78 74 |WRefCon(|wPtrText|
|00000b70| 29 3b 0d 09 72 65 67 69 | 73 74 65 72 20 54 45 48 |);..regi|ster TEH|
|00000b80| 61 6e 64 6c 65 20 74 65 | 48 64 6c 20 3d 20 69 6e |andle te|Hdl = in|
|00000b90| 66 6f 50 74 72 2d 3e 69 | 74 65 6d 2e 74 65 78 74 |foPtr->i|tem.text|
|00000ba0| 2e 74 65 48 64 6c 3b 0d | 09 72 65 67 69 73 74 65 |.teHdl;.|.registe|
|00000bb0| 72 20 57 4f 52 44 20 6e | 75 6d 50 61 67 65 73 2c |r WORD n|umPages,|
|00000bc0| 20 70 72 69 6e 74 45 72 | 72 3b 0d 09 52 65 63 74 | printEr|r;..Rect|
|00000bd0| 20 70 61 67 65 52 65 63 | 74 3b 0d 09 47 72 61 66 | pageRec|t;..Graf|
|00000be0| 50 74 72 20 73 61 76 65 | 50 6f 72 74 3b 0d 0d 09 |Ptr save|Port;...|
|00000bf0| 47 65 74 50 6f 72 74 28 | 26 73 61 76 65 50 6f 72 |GetPort(|&savePor|
|00000c00| 74 29 3b 0d 0d 09 2f 2a | 20 55 6e 6c 6f 61 64 20 |t);.../*| Unload |
|00000c10| 74 6f 6e 73 20 6f 66 20 | 73 65 67 6d 65 6e 74 73 |tons of |segments|
|00000c20| 2c 20 73 69 6e 63 65 20 | 74 68 65 20 70 72 69 6e |, since |the prin|
|00000c30| 74 20 64 72 69 76 65 72 | 20 69 73 20 6c 61 72 67 |t driver| is larg|
|00000c40| 65 72 20 74 68 61 6e 20 | 79 6f 75 72 0d 09 20 2a |er than |your.. *|
|00000c50| 20 77 6f 72 73 74 2f 62 | 65 73 74 20 6e 69 67 68 | worst/b|est nigh|
|00000c60| 74 6d 61 72 65 73 20 6f | 66 20 44 69 76 69 6e 65 |tmares o|f Divine|
|00000c70| 20 61 66 74 65 72 20 61 | 20 48 61 6c 6c 6f 77 65 | after a| Hallowe|
|00000c80| 65 6e 20 62 69 6e 67 65 | 0d 09 20 2a 2f 0d 0d 09 |en binge|.. */...|
|00000c90| 2f 2a 20 4e 65 77 20 74 | 72 69 70 20 69 6e 74 6f |/* New t|rip into|
|00000ca0| 20 74 68 69 73 20 70 72 | 69 6e 74 69 6e 67 20 71 | this pr|inting q|
|00000cb0| 75 61 67 6d 69 72 65 3f | 0d 09 20 2a 2f 0d 09 69 |uagmire?|.. */..i|
|00000cc0| 66 20 28 70 72 69 6e 74 | 46 69 72 73 74 29 0d 09 |f (print|First)..|
|00000cd0| 09 70 72 69 6e 74 48 64 | 6c 20 3d 20 28 54 48 50 |.printHd|l = (THP|
|00000ce0| 72 69 6e 74 29 20 45 72 | 72 4e 65 77 48 61 6e 64 |rint) Er|rNewHand|
|00000cf0| 6c 65 28 73 69 7a 65 6f | 66 28 54 50 72 69 6e 74 |le(sizeo|f(TPrint|
|00000d00| 29 29 3b 0d 0d 09 49 6e | 69 74 43 75 72 73 6f 72 |));...In|itCursor|
|00000d10| 28 29 3b 0d 09 50 72 4f | 70 65 6e 28 29 3b 0d 0d |();..PrO|pen();..|
|00000d20| 09 69 66 20 28 50 72 45 | 72 72 6f 72 28 29 20 3d |.if (PrE|rror() =|
|00000d30| 3d 20 6e 6f 45 72 72 29 | 20 7b 0d 09 09 50 72 69 |= noErr)| {...Pri|
|00000d40| 6e 74 44 65 66 61 75 6c | 74 28 70 72 69 6e 74 48 |ntDefaul|t(printH|
|00000d50| 64 6c 29 3b 0d 0d 09 09 | 69 66 20 28 50 72 45 72 |dl);....|if (PrEr|
|00000d60| 72 6f 72 28 29 20 3d 3d | 20 6e 6f 45 72 72 29 20 |ror() ==| noErr) |
|00000d70| 7b 0d 09 09 09 69 66 20 | 28 50 72 69 6e 74 53 74 |{....if |(PrintSt|
|00000d80| 79 6c 65 28 74 68 65 57 | 69 6e 64 6f 77 29 29 20 |yle(theW|indow)) |
|00000d90| 7b 0d 09 09 09 09 69 66 | 20 28 74 68 65 57 69 6e |{.....if| (theWin|
|00000da0| 64 6f 77 20 26 26 20 50 | 72 4a 6f 62 44 69 61 6c |dow && P|rJobDial|
|00000db0| 6f 67 28 70 72 69 6e 74 | 48 64 6c 29 29 20 7b 0d |og(print|Hdl)) {.|
|00000dc0| 09 09 09 09 09 2f 2a 20 | 67 65 74 20 66 69 72 73 |...../* |get firs|
|00000dd0| 74 20 61 6e 64 20 6c 61 | 73 74 20 70 61 67 65 73 |t and la|st pages|
|00000de0| 20 6f 66 20 64 6f 63 75 | 6d 65 6e 74 20 74 6f 20 | of docu|ment to |
|00000df0| 62 65 20 70 72 69 6e 74 | 65 64 0d 09 09 09 09 09 |be print|ed......|
|00000e00| 20 2a 20 66 72 6f 6d 20 | 74 68 65 20 69 46 73 74 | * from |the iFst|
|00000e10| 50 61 67 65 20 61 6e 64 | 20 69 4c 61 73 74 50 61 |Page and| iLastPa|
|00000e20| 67 65 20 66 69 65 6c 64 | 73 20 69 6e 20 74 68 65 |ge field|s in the|
|00000e30| 0d 09 09 09 09 09 20 2a | 20 54 50 72 4a 6f 62 20 |...... *| TPrJob |
|00000e40| 72 65 63 6f 72 64 20 28 | 49 4d 20 49 49 2d 31 35 |record (|IM II-15|
|00000e50| 31 29 0d 09 09 09 09 09 | 20 2a 2f 0d 0d 09 09 09 |1)......| */.....|
|00000e60| 09 09 6e 75 6d 50 61 67 | 65 73 20 3d 20 28 2a 70 |..numPag|es = (*p|
|00000e70| 72 69 6e 74 48 64 6c 29 | 2d 3e 70 72 4a 6f 62 2e |rintHdl)|->prJob.|
|00000e80| 69 43 6f 70 69 65 73 3b | 0d 09 09 09 09 09 70 72 |iCopies;|......pr|
|00000e90| 69 6e 74 50 6f 72 74 20 | 3d 20 50 72 4f 70 65 6e |intPort |= PrOpen|
|00000ea0| 44 6f 63 28 70 72 69 6e | 74 48 64 6c 2c 20 4e 55 |Doc(prin|tHdl, NU|
|00000eb0| 4c 4c 2c 20 4e 55 4c 4c | 29 3b 0d 0d 09 09 09 09 |LL, NULL|);......|
|00000ec0| 09 69 66 20 28 50 72 45 | 72 72 6f 72 28 29 20 3d |.if (PrE|rror() =|
|00000ed0| 3d 20 6e 6f 45 72 72 29 | 20 7b 0d 09 09 09 09 09 |= noErr)| {......|
|00000ee0| 09 66 6f 72 20 28 3b 20 | 6e 75 6d 50 61 67 65 73 |.for (; |numPages|
|00000ef0| 2d 2d 20 3e 20 30 3b 20 | 29 20 7b 0d 09 09 09 09 |-- > 0; |) {.....|
|00000f00| 09 09 09 50 72 4f 70 65 | 6e 50 61 67 65 28 70 72 |...PrOpe|nPage(pr|
|00000f10| 69 6e 74 50 6f 72 74 2c | 20 4e 55 4c 4c 29 3b 0d |intPort,| NULL);.|
|00000f20| 0d 09 09 09 09 09 09 09 | 69 66 20 28 50 72 45 72 |........|if (PrEr|
|00000f30| 72 6f 72 28 29 20 3d 3d | 20 6e 6f 45 72 72 29 20 |ror() ==| noErr) |
|00000f40| 7b 0d 09 09 09 09 09 09 | 09 09 2f 2a 20 72 50 61 |{.......|../* rPa|
|00000f50| 67 65 20 28 49 4d 20 49 | 49 2d 31 35 30 29 20 69 |ge (IM I|I-150) i|
|00000f60| 73 20 74 68 65 20 70 72 | 69 6e 74 61 62 6c 65 20 |s the pr|intable |
|00000f70| 61 72 65 61 0d 09 09 09 | 09 09 09 09 09 20 2a 20 |area....|..... * |
|00000f80| 61 6e 64 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 |and the |printer |
|00000f90| 70 6f 72 74 20 69 73 20 | 61 6c 72 65 61 64 79 20 |port is |already |
|00000fa0| 6f 70 65 6e 20 73 6f 0d | 09 09 09 09 09 09 09 09 |open so.|........|
|00000fb0| 20 2a 20 6a 75 73 74 20 | 72 65 64 72 61 77 20 79 | * just |redraw y|
|00000fc0| 6f 75 72 20 77 69 6e 64 | 6f 77 20 68 65 72 65 0d |our wind|ow here.|
|00000fd0| 09 09 09 09 09 09 09 09 | 20 2a 2f 0d 09 09 09 09 |........| */.....|
|00000fe0| 09 09 09 09 53 65 74 50 | 6f 72 74 28 70 72 69 6e |....SetP|ort(prin|
|00000ff0| 74 50 6f 72 74 29 3b 0d | 09 09 09 09 09 09 09 09 |tPort);.|........|
|00001000| 54 65 78 74 46 6f 6e 74 | 28 46 4f 4e 54 4e 55 4d |TextFont|(FONTNUM|
|00001010| 29 3b 0d 09 09 09 09 09 | 09 09 09 54 65 78 74 53 |);......|...TextS|
|00001020| 69 7a 65 28 46 4f 4e 54 | 53 49 5a 45 29 3b 0d 0d |ize(FONT|SIZE);..|
|00001030| 09 09 09 09 09 09 09 09 | 70 61 67 65 52 65 63 74 |........|pageRect|
|00001040| 20 3d 20 28 2a 70 72 69 | 6e 74 48 64 6c 29 2d 3e | = (*pri|ntHdl)->|
|00001050| 70 72 49 6e 66 6f 2e 72 | 50 61 67 65 3b 0d 09 09 |prInfo.r|Page;...|
|00001060| 09 09 09 09 09 09 41 6e | 61 6c 50 72 69 6e 74 28 |......An|alPrint(|
|00001070| 26 70 61 67 65 52 65 63 | 74 29 3b 0d 09 09 09 09 |&pageRec|t);.....|
|00001080| 09 09 09 09 50 72 69 6e | 74 54 65 78 74 28 74 65 |....Prin|tText(te|
|00001090| 48 64 6c 2c 20 26 70 61 | 67 65 52 65 63 74 29 3b |Hdl, &pa|geRect);|
|000010a0| 0d 09 09 09 09 09 09 09 | 7d 0d 0d 09 09 09 09 09 |........|}.......|
|000010b0| 09 09 50 72 43 6c 6f 73 | 65 50 61 67 65 28 70 72 |..PrClos|ePage(pr|
|000010c0| 69 6e 74 50 6f 72 74 29 | 3b 0d 09 09 09 09 09 09 |intPort)|;.......|
|000010d0| 7d 0d 09 09 09 09 09 7d | 0d 0d 09 09 09 09 09 50 |}......}|.......P|
|000010e0| 72 43 6c 6f 73 65 44 6f | 63 28 70 72 69 6e 74 50 |rCloseDo|c(printP|
|000010f0| 6f 72 74 29 3b 0d 09 09 | 09 09 7d 0d 09 09 09 7d |ort);...|..}....}|
|00001100| 0d 09 09 7d 0d 09 7d 0d | 0d 09 2f 2a 20 46 69 6e |...}..}.|../* Fin|
|00001110| 69 73 68 20 73 70 6f 6f | 6c 20 70 72 69 6e 74 69 |ish spoo|l printi|
|00001120| 6e 67 2c 20 69 66 20 75 | 73 65 64 0d 09 20 2a 2f |ng, if u|sed.. */|
|00001130| 0d 09 69 66 20 28 74 68 | 65 57 69 6e 64 6f 77 20 |..if (th|eWindow |
|00001140| 26 26 20 28 28 28 54 50 | 50 72 69 6e 74 29 20 2a |&& (((TP|Print) *|
|00001150| 70 72 69 6e 74 48 64 6c | 29 2d 3e 70 72 4a 6f 62 |printHdl|)->prJob|
|00001160| 2e 62 4a 44 6f 63 4c 6f | 6f 70 20 3d 3d 20 62 53 |.bJDocLo|op == bS|
|00001170| 70 6f 6f 6c 4c 6f 6f 70 | 29 20 26 26 20 28 50 72 |poolLoop|) && (Pr|
|00001180| 45 72 72 6f 72 28 29 20 | 3d 3d 20 6e 6f 45 72 72 |Error() |== noErr|
|00001190| 29 29 0d 09 09 50 72 50 | 69 63 46 69 6c 65 28 70 |))...PrP|icFile(p|
|000011a0| 72 69 6e 74 48 64 6c 2c | 20 4e 55 4c 4c 2c 20 4e |rintHdl,| NULL, N|
|000011b0| 55 4c 4c 2c 20 4e 55 4c | 4c 2c 20 26 74 68 65 53 |ULL, NUL|L, &theS|
|000011c0| 74 61 74 75 73 29 3b 0d | 09 09 0d 09 2f 2a 20 47 |tatus);.|..../* G|
|000011d0| 72 61 62 20 74 68 65 20 | 70 72 69 6e 74 65 72 20 |rab the |printer |
|000011e0| 65 72 72 6f 72 73 20 62 | 65 66 6f 72 65 20 63 6c |errors b|efore cl|
|000011f0| 6f 73 69 6e 67 20 74 68 | 65 20 50 72 69 6e 74 4d |osing th|e PrintM|
|00001200| 67 72 20 61 6e 64 20 74 | 68 65 20 65 72 72 6f 72 |gr and t|he error|
|00001210| 20 64 69 73 61 70 70 65 | 61 72 73 0d 09 20 2a 2f | disappe|ars.. */|
|00001220| 0d 09 70 72 69 6e 74 45 | 72 72 20 3d 20 50 72 45 |..printE|rr = PrE|
|00001230| 72 72 6f 72 28 29 3b 0d | 09 50 72 43 6c 6f 73 65 |rror();.|.PrClose|
|00001240| 28 29 3b 0d 09 0d 09 2f | 2a 20 44 6f 6e 27 74 20 |();..../|* Don't |
|00001250| 72 65 70 6f 72 74 20 70 | 72 69 6e 74 69 6e 67 20 |report p|rinting |
|00001260| 65 72 72 6f 72 73 20 62 | 65 66 6f 72 65 20 66 61 |errors b|efore fa|
|00001270| 6c 6c 69 6e 67 20 74 68 | 72 6f 75 67 68 20 74 68 |lling th|rough th|
|00001280| 65 20 70 72 69 6e 74 20 | 6c 6f 6f 70 2c 20 74 6f |e print |loop, to|
|00001290| 20 6d 61 6b 65 0d 09 20 | 2a 20 73 75 72 65 20 74 | make.. |* sure t|
|000012a0| 68 61 74 20 61 6c 6c 20 | 6f 66 20 74 68 65 20 50 |hat all |of the P|
|000012b0| 72 69 6e 74 4d 67 72 27 | 73 20 6f 70 65 6e 20 63 |rintMgr'|s open c|
|000012c0| 61 6c 6c 73 20 67 65 74 | 20 63 6c 6f 73 65 64 20 |alls get| closed |
|000012d0| 70 72 6f 70 65 72 6c 79 | 0d 09 20 2a 2f 0d 09 69 |properly|.. */..i|
|000012e0| 66 20 28 70 72 69 6e 74 | 45 72 72 20 21 3d 20 6e |f (print|Err != n|
|000012f0| 6f 45 72 72 29 0d 09 09 | 53 79 73 42 65 65 70 28 |oErr)...|SysBeep(|
|00001300| 35 29 3b 0d 09 0d 09 70 | 72 69 6e 74 46 69 72 73 |5);....p|rintFirs|
|00001310| 74 20 3d 20 46 41 4c 53 | 45 3b 0d 09 53 65 74 50 |t = FALS|E;..SetP|
|00001320| 6f 72 74 28 73 61 76 65 | 50 6f 72 74 29 3b 0d 7d |ort(save|Port);.}|
|00001330| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+