home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / grafix / doc / grafsec1.tex < prev    next >
LaTeX Document  |  1987-09-04  |  20.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: grafsec1.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document, ASCII text, with CRLF line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[CRLF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 6d 61 6e 70 61 67 65 | 20 69 6e 74 72 6f 28 31 |\manpage| intro(1|
|00000010| 29 0d 0a 0d 0a 5c 6d 61 | 6e 6e 61 6d 65 0d 0a 09 |)....\ma|nname...|
|00000020| 69 6e 74 72 6f 20 2d 2d | 2d 20 69 6e 74 72 6f 64 |intro --|- introd|
|00000030| 75 63 74 69 6f 6e 20 74 | 6f 20 67 72 61 70 68 69 |uction t|o graphi|
|00000040| 63 73 20 66 75 6e 63 74 | 69 6f 6e 73 0d 0a 5c 6d |cs funct|ions..\m|
|00000050| 61 6e 64 73 63 72 0d 0a | 0d 0a 5c 6d 61 6e 68 65 |andscr..|..\manhe|
|00000060| 61 64 20 55 73 69 6e 67 | 20 74 68 65 20 6c 69 62 |ad Using| the lib|
|00000070| 72 61 72 79 5c 70 61 72 | 0d 0a 0d 0a 09 57 68 65 |rary\par|.....Whe|
|00000080| 6e 20 77 72 69 74 69 6e | 67 20 61 20 70 72 6f 67 |n writin|g a prog|
|00000090| 72 61 6d 20 74 68 61 74 | 20 75 73 65 73 20 74 68 |ram that| uses th|
|000000a0| 65 20 47 72 61 66 69 78 | 20 6c 69 62 72 61 72 79 |e Grafix| library|
|000000b0| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 0d 0a 09 69 |, you sh|ould...i|
|000000c0| 6e 63 6c 75 64 65 20 74 | 68 65 20 66 69 6c 65 20 |nclude t|he file |
|000000d0| 5c 62 66 6e 63 20 67 72 | 61 66 2e 68 20 2e 20 54 |\bfnc gr|af.h . T|
|000000e0| 68 69 73 20 66 69 6c 65 | 20 64 65 66 69 6e 65 73 |his file| defines|
|000000f0| 20 70 72 6f 74 6f 74 79 | 70 65 73 20 66 6f 72 0d | prototy|pes for.|
|00000100| 0a 09 61 6c 6c 20 74 68 | 65 20 67 72 61 70 68 69 |..all th|e graphi|
|00000110| 63 73 20 66 75 6e 63 74 | 69 6f 6e 73 20 61 6e 64 |cs funct|ions and|
|00000120| 20 73 65 76 65 72 61 6c | 20 73 79 6d 62 6f 6c 69 | several| symboli|
|00000130| 63 20 63 6f 6e 73 74 61 | 6e 74 73 2e 0d 0a 09 57 |c consta|nts....W|
|00000140| 68 65 6e 20 6c 69 6e 6b | 69 6e 67 2c 20 73 69 6d |hen link|ing, sim|
|00000150| 70 6c 79 20 69 6e 63 6c | 75 64 65 20 74 68 65 20 |ply incl|ude the |
|00000160| 47 72 61 66 69 78 20 6c | 69 62 72 61 72 79 20 69 |Grafix l|ibrary i|
|00000170| 6e 20 74 68 65 20 6c 69 | 73 74 0d 0a 09 6f 66 20 |n the li|st...of |
|00000180| 6c 69 62 72 61 72 69 65 | 73 20 79 6f 75 20 73 75 |librarie|s you su|
|00000190| 70 70 6c 79 20 74 6f 20 | 4c 49 4e 4b 2e 20 54 68 |pply to |LINK. Th|
|000001a0| 65 20 73 6d 61 6c 6c 20 | 6d 6f 64 65 6c 20 6c 69 |e small |model li|
|000001b0| 62 72 61 72 79 0d 0a 09 | 69 73 20 6e 61 6d 65 64 |brary...|is named|
|000001c0| 20 5c 62 66 6e 63 20 67 | 72 61 66 69 78 2e 6c 69 | \bfnc g|rafix.li|
|000001d0| 62 20 2c 20 61 6e 64 20 | 74 68 65 20 6d 65 64 69 |b , and |the medi|
|000001e0| 75 6d 2c 20 63 6f 6d 70 | 61 63 74 2c 20 61 6e 64 |um, comp|act, and|
|000001f0| 0d 0a 09 6c 61 72 67 65 | 20 6d 6f 64 65 6c 20 6c |...large| model l|
|00000200| 69 62 72 61 72 69 65 73 | 20 61 72 65 20 6e 61 6d |ibraries| are nam|
|00000210| 65 64 20 5c 62 66 6e 63 | 20 67 72 61 66 69 78 6d |ed \bfnc| grafixm|
|00000220| 2e 6c 69 62 20 2c 0d 0a | 09 5c 62 66 6e 63 20 67 |.lib ,..|.\bfnc g|
|00000230| 72 61 66 69 78 63 2e 6c | 69 62 20 2c 20 61 6e 64 |rafixc.l|ib , and|
|00000240| 20 5c 62 66 6e 63 20 67 | 72 61 66 69 78 6c 2e 6c | \bfnc g|rafixl.l|
|00000250| 69 62 20 2c 20 72 65 73 | 70 65 63 74 69 76 65 6c |ib , res|pectivel|
|00000260| 79 2e 0d 0a 0d 0a 09 4e | 6f 74 65 20 74 68 61 74 |y......N|ote that|
|00000270| 20 5c 69 74 77 64 20 67 | 5f 69 6e 69 74 20 6d 75 | \itwd g|_init mu|
|00000280| 73 74 20 62 65 20 74 68 | 65 20 66 69 72 73 74 20 |st be th|e first |
|00000290| 66 75 6e 63 74 69 6f 6e | 20 69 6e 20 74 68 65 0d |function| in the.|
|000002a0| 0a 09 6c 69 62 72 61 72 | 79 20 74 6f 20 62 65 20 |..librar|y to be |
|000002b0| 63 61 6c 6c 65 64 2c 20 | 61 6e 64 20 74 68 61 74 |called, |and that|
|000002c0| 20 5c 69 74 77 64 20 67 | 5f 6f 70 65 6e 20 6d 75 | \itwd g|_open mu|
|000002d0| 73 74 20 62 65 20 74 68 | 65 20 73 65 63 6f 6e 64 |st be th|e second|
|000002e0| 2e 0d 0a 09 57 68 65 6e | 20 79 6f 75 20 66 69 6e |....When| you fin|
|000002f0| 69 73 68 20 77 69 74 68 | 20 74 68 65 20 67 72 61 |ish with| the gra|
|00000300| 70 68 69 63 73 20 64 69 | 73 70 6c 61 79 2c 20 79 |phics di|splay, y|
|00000310| 6f 75 20 73 68 6f 75 6c | 64 0d 0a 09 63 61 6c 6c |ou shoul|d...call|
|00000320| 20 5c 69 74 77 64 20 67 | 5f 63 6c 6f 73 65 20 74 | \itwd g|_close t|
|00000330| 6f 20 72 65 73 65 74 20 | 74 68 65 20 64 69 73 70 |o reset |the disp|
|00000340| 6c 61 79 20 74 6f 20 74 | 65 78 74 20 6d 6f 64 65 |lay to t|ext mode|
|00000350| 2e 0d 0a 0d 0a 5c 6d 61 | 6e 68 65 61 64 20 53 75 |.....\ma|nhead Su|
|00000360| 70 70 6f 72 74 65 64 20 | 68 61 72 64 77 61 72 65 |pported |hardware|
|00000370| 5c 70 61 72 0d 0a 0d 0a | 09 54 68 65 20 47 72 61 |\par....|.The Gra|
|00000380| 66 69 78 20 6c 69 62 72 | 61 72 79 20 63 75 72 72 |fix libr|ary curr|
|00000390| 65 6e 74 6c 79 20 73 75 | 70 70 6f 72 74 73 20 74 |ently su|pports t|
|000003a0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 67 72 61 |he follo|wing gra|
|000003b0| 70 68 69 63 73 0d 0a 09 | 68 61 72 64 77 61 72 65 |phics...|hardware|
|000003c0| 3a 0d 0a 0d 0a 09 49 42 | 4d 20 43 6f 6c 6f 72 20 |:.....IB|M Color |
|000003d0| 47 72 61 70 68 69 63 73 | 20 41 64 61 70 74 65 72 |Graphics| Adapter|
|000003e0| 20 28 43 47 41 29 20 77 | 69 74 68 20 61 20 43 6f | (CGA) w|ith a Co|
|000003f0| 6c 6f 72 20 44 69 73 70 | 6c 61 79 20 6f 72 20 65 |lor Disp|lay or e|
|00000400| 71 75 69 76 61 6c 65 6e | 74 73 2e 0d 0a 0d 0a 09 |quivalen|ts......|
|00000410| 49 42 4d 20 45 6e 68 61 | 6e 63 65 64 20 47 72 61 |IBM Enha|nced Gra|
|00000420| 70 68 69 63 73 20 41 64 | 61 70 74 65 72 20 28 45 |phics Ad|apter (E|
|00000430| 47 41 29 20 77 69 74 68 | 20 61 20 45 6e 68 61 6e |GA) with| a Enhan|
|00000440| 63 65 64 20 47 72 61 70 | 68 69 63 73 20 44 69 73 |ced Grap|hics Dis|
|00000450| 70 6c 61 79 2c 0d 0a 09 | 77 69 74 68 20 61 20 43 |play,...|with a C|
|00000460| 6f 6c 6f 72 20 44 69 73 | 70 6c 61 79 2c 20 6f 72 |olor Dis|play, or|
|00000470| 20 77 69 74 68 20 61 20 | 4d 6f 6e 6f 63 68 72 6f | with a |Monochro|
|00000480| 6d 65 20 44 69 73 70 6c | 61 79 20 6f 72 20 65 71 |me Displ|ay or eq|
|00000490| 75 69 76 61 6c 65 6e 74 | 73 2e 0d 0a 0d 0a 5c 6d |uivalent|s.....\m|
|000004a0| 61 6e 68 65 61 64 20 43 | 6f 6c 6f 72 73 5c 70 61 |anhead C|olors\pa|
|000004b0| 72 0d 0a 09 49 74 20 73 | 68 6f 75 6c 64 20 62 65 |r...It s|hould be|
|000004c0| 20 6b 65 70 74 20 69 6e | 20 6d 69 6e 64 20 74 68 | kept in| mind th|
|000004d0| 61 74 20 74 68 65 20 63 | 6f 6c 6f 72 20 76 61 6c |at the c|olor val|
|000004e0| 75 65 73 20 77 68 69 63 | 68 20 61 72 65 20 70 61 |ues whic|h are pa|
|000004f0| 73 73 65 64 20 74 6f 0d | 0a 09 74 68 65 20 67 72 |ssed to.|..the gr|
|00000500| 61 70 68 69 63 73 0d 0a | 09 72 6f 75 74 69 6e 65 |aphics..|.routine|
|00000510| 73 20 61 6e 64 20 77 72 | 69 74 74 65 6e 20 69 6e |s and wr|itten in|
|00000520| 74 6f 20 74 68 65 20 67 | 72 61 70 68 69 63 73 20 |to the g|raphics |
|00000530| 62 75 66 66 65 72 73 20 | 63 6f 72 72 65 73 70 6f |buffers |correspo|
|00000540| 6e 64 20 6f 6e 6c 79 0d | 0a 09 69 6e 64 69 72 65 |nd only.|..indire|
|00000550| 63 74 6c 79 20 74 6f 20 | 74 68 65 20 63 6f 6c 6f |ctly to |the colo|
|00000560| 72 73 20 61 63 74 75 61 | 6c 6c 79 20 64 69 73 70 |rs actua|lly disp|
|00000570| 6c 61 79 65 64 20 6f 6e | 20 74 68 65 20 73 63 72 |layed on| the scr|
|00000580| 65 65 6e 2e 20 54 68 65 | 0d 0a 09 6d 61 70 70 69 |een. The|...mappi|
|00000590| 6e 67 20 62 65 74 77 65 | 65 6e 20 63 6f 6c 6f 72 |ng betwe|en color|
|000005a0| 20 76 61 6c 75 65 73 20 | 61 6e 64 20 64 69 73 70 | values |and disp|
|000005b0| 6c 61 79 65 64 20 63 6f | 6c 6f 72 73 20 63 61 6e |layed co|lors can|
|000005c0| 0d 0a 09 62 65 20 63 68 | 61 6e 67 65 64 20 62 79 |...be ch|anged by|
|000005d0| 20 74 68 65 20 5c 69 74 | 77 64 20 67 5f 73 65 74 | the \it|wd g_set|
|000005e0| 62 61 63 6b 20 61 6e 64 | 20 5c 69 74 77 64 20 67 |back and| \itwd g|
|000005f0| 5f 73 65 74 70 61 6c 20 | 66 75 6e 63 74 69 6f 6e |_setpal |function|
|00000600| 73 2e 0d 0a 09 53 65 65 | 20 74 68 65 20 60 60 63 |s....See| the ``c|
|00000610| 6f 6c 6f 72 73 28 31 29 | 27 27 20 6d 61 6e 75 61 |olors(1)|'' manua|
|00000620| 6c 20 70 61 67 65 20 66 | 6f 72 20 61 20 64 65 73 |l page f|or a des|
|00000630| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |cription| of the |
|00000640| 61 76 61 69 6c 61 62 6c | 65 0d 0a 09 63 6f 6c 6f |availabl|e...colo|
|00000650| 72 73 2e 0d 0a 5c 6d 61 | 6e 65 78 0d 0a 5c 76 69 |rs...\ma|nex..\vi|
|00000660| 6e 70 75 74 20 67 72 61 | 66 65 78 31 2e 63 0d 0a |nput gra|fex1.c..|
|00000670| 5c 6d 61 6e 70 65 6e 64 | 0d 0a 0d 0a 5c 6d 61 6e |\manpend|....\man|
|00000680| 70 61 67 65 20 63 6f 6c | 6f 72 73 28 31 29 0d 0a |page col|ors(1)..|
|00000690| 0d 0a 5c 6d 61 6e 70 61 | 67 65 20 63 6f 6c 6f 72 |..\manpa|ge color|
|000006a0| 73 28 31 29 0d 0a 0d 0a | 5c 6d 61 6e 6e 61 6d 65 |s(1)....|\manname|
|000006b0| 0d 0a 09 63 6f 6c 6f 72 | 73 20 2d 2d 2d 20 73 75 |...color|s --- su|
|000006c0| 6d 6d 61 72 79 20 6f 66 | 20 64 69 73 70 6c 61 79 |mmary of| display|
|000006d0| 61 62 6c 65 20 63 6f 6c | 6f 72 73 0d 0a 5c 6d 61 |able col|ors..\ma|
|000006e0| 6e 64 73 63 72 0d 0a 09 | 54 68 65 20 66 6f 6c 6c |ndscr...|The foll|
|000006f0| 6f 77 69 6e 67 20 73 75 | 6d 6d 61 72 69 7a 65 73 |owing su|mmarizes|
|00000700| 20 74 68 65 20 64 69 73 | 70 6c 61 79 61 62 6c 65 | the dis|playable|
|00000710| 20 63 6f 6c 6f 72 73 20 | 69 6e 20 74 68 65 0d 0a | colors |in the..|
|00000720| 09 76 61 72 69 6f 75 73 | 20 73 75 70 70 6f 72 74 |.various| support|
|00000730| 65 64 20 67 72 61 70 68 | 69 63 73 20 6d 6f 64 65 |ed graph|ics mode|
|00000740| 73 2e 0d 0a 0d 0a 5c 6d | 61 6e 68 65 61 64 20 43 |s.....\m|anhead C|
|00000750| 47 41 20 33 32 30 20 62 | 79 20 32 30 30 20 66 6f |GA 320 b|y 200 fo|
|00000760| 75 72 20 63 6f 6c 6f 72 | 20 6d 6f 64 65 5c 70 61 |ur color| mode\pa|
|00000770| 72 0d 0a 0d 0a 09 49 6e | 20 74 68 69 73 20 6d 6f |r.....In| this mo|
|00000780| 64 65 2c 20 63 6f 6c 6f | 72 20 76 61 6c 75 65 7e |de, colo|r value~|
|00000790| 30 20 69 73 20 74 68 65 | 20 62 61 63 6b 67 72 6f |0 is the| backgro|
|000007a0| 75 6e 64 2e 20 42 79 20 | 64 65 66 61 75 6c 74 20 |und. By |default |
|000007b0| 69 74 0d 0a 09 69 73 20 | 62 6c 61 63 6b 20 62 75 |it...is |black bu|
|000007c0| 74 20 6d 61 79 20 62 65 | 20 63 68 61 6e 67 65 64 |t may be| changed|
|000007d0| 20 62 79 20 75 73 65 20 | 6f 66 20 74 68 65 20 5c | by use |of the \|
|000007e0| 69 74 77 64 20 67 5f 73 | 65 74 62 61 63 6b 20 66 |itwd g_s|etback f|
|000007f0| 75 6e 63 74 69 6f 6e 0d | 0a 09 74 6f 20 61 6e 79 |unction.|..to any|
|00000800| 20 6f 66 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | of the |followin|
|00000810| 67 20 63 6f 6c 6f 72 73 | 3a 0d 0a 5c 62 65 67 69 |g colors|:..\begi|
|00000820| 6e 74 61 62 6c 65 0d 0a | 5c 63 65 6e 74 65 72 6c |ntable..|\centerl|
|00000830| 69 6e 65 7b 5c 76 62 6f | 78 7b 25 0d 0a 5c 73 65 |ine{\vbo|x{%..\se|
|00000840| 74 74 61 62 73 5c 2b 26 | 5c 69 74 20 76 61 6c 26 |ttabs\+&|\it val&|
|00000850| 75 65 5c 71 75 61 64 26 | 5c 63 72 0d 0a 09 09 5c |ue\quad&|\cr....\|
|00000860| 2b 26 5c 69 74 20 76 61 | 6c 75 65 26 26 5c 69 74 |+&\it va|lue&&\it|
|00000870| 20 63 6f 6c 6f 72 5c 63 | 72 0d 0a 09 09 5c 73 6d | color\c|r....\sm|
|00000880| 61 6c 6c 73 6b 69 70 0d | 0a 09 09 5c 2b 26 5c 68 |allskip.|...\+&\h|
|00000890| 66 69 6c 6c 20 30 26 26 | 20 62 6c 61 63 6b 5c 63 |fill 0&&| black\c|
|000008a0| 72 0d 0a 09 09 5c 2b 26 | 5c 68 66 69 6c 6c 20 31 |r....\+&|\hfill 1|
|000008b0| 26 26 20 62 6c 75 65 5c | 63 72 0d 0a 09 09 5c 2b |&& blue\|cr....\+|
|000008c0| 26 5c 68 66 69 6c 6c 20 | 32 26 26 20 67 72 65 65 |&\hfill |2&& gree|
|000008d0| 6e 5c 63 72 0d 0a 09 09 | 5c 2b 26 5c 68 66 69 6c |n\cr....|\+&\hfil|
|000008e0| 6c 20 33 26 26 20 63 79 | 61 6e 5c 63 72 0d 0a 09 |l 3&& cy|an\cr...|
|000008f0| 09 5c 2b 26 5c 68 66 69 | 6c 6c 20 34 26 26 20 72 |.\+&\hfi|ll 4&& r|
|00000900| 65 64 5c 63 72 0d 0a 09 | 09 5c 2b 26 5c 68 66 69 |ed\cr...|.\+&\hfi|
|00000910| 6c 6c 20 35 26 26 20 70 | 75 72 70 6c 65 5c 63 72 |ll 5&& p|urple\cr|
|00000920| 0d 0a 09 09 5c 2b 26 5c | 68 66 69 6c 6c 20 36 26 |....\+&\|hfill 6&|
|00000930| 26 20 62 72 6f 77 6e 5c | 63 72 0d 0a 09 09 5c 2b |& brown\|cr....\+|
|00000940| 26 5c 68 66 69 6c 6c 20 | 37 26 26 20 77 68 69 74 |&\hfill |7&& whit|
|00000950| 65 5c 63 72 0d 0a 09 09 | 5c 2b 26 5c 68 66 69 6c |e\cr....|\+&\hfil|
|00000960| 6c 20 38 26 26 20 67 72 | 65 79 5c 63 72 0d 0a 09 |l 8&& gr|ey\cr...|
|00000970| 09 5c 2b 26 5c 68 66 69 | 6c 6c 20 39 26 26 20 62 |.\+&\hfi|ll 9&& b|
|00000980| 72 69 67 68 74 20 62 6c | 75 65 5c 63 72 0d 0a 09 |right bl|ue\cr...|
|00000990| 09 5c 2b 26 5c 68 66 69 | 6c 6c 20 31 30 26 26 20 |.\+&\hfi|ll 10&& |
|000009a0| 62 72 69 67 68 74 20 67 | 72 65 65 6e 5c 63 72 0d |bright g|reen\cr.|
|000009b0| 0a 09 09 5c 2b 26 5c 68 | 66 69 6c 6c 20 31 31 26 |...\+&\h|fill 11&|
|000009c0| 26 20 62 72 69 67 68 74 | 20 63 79 61 6e 5c 63 72 |& bright| cyan\cr|
|000009d0| 0d 0a 09 09 5c 2b 26 5c | 68 66 69 6c 6c 20 31 32 |....\+&\|hfill 12|
|000009e0| 26 26 20 62 72 69 67 68 | 74 20 72 65 64 5c 63 72 |&& brigh|t red\cr|
|000009f0| 0d 0a 09 09 5c 2b 26 5c | 68 66 69 6c 6c 20 31 33 |....\+&\|hfill 13|
|00000a00| 26 26 20 62 72 69 67 68 | 74 20 70 75 72 70 6c 65 |&& brigh|t purple|
|00000a10| 5c 63 72 0d 0a 09 09 5c | 2b 26 5c 68 66 69 6c 6c |\cr....\|+&\hfill|
|00000a20| 20 31 34 26 26 20 62 72 | 69 67 68 74 20 79 65 6c | 14&& br|ight yel|
|00000a30| 6c 6f 77 5c 63 72 0d 0a | 09 09 5c 2b 26 5c 68 66 |low\cr..|..\+&\hf|
|00000a40| 69 6c 6c 20 31 35 26 26 | 20 62 72 69 67 68 74 20 |ill 15&&| bright |
|00000a50| 77 68 69 74 65 5c 63 72 | 0d 0a 7d 7d 0d 0a 5c 65 |white\cr|..}}..\e|
|00000a60| 6e 64 74 61 62 6c 65 0d | 0a 09 43 6f 6c 6f 72 20 |ndtable.|..Color |
|00000a70| 76 61 6c 75 65 73 7e 20 | 31 2d 2d 33 20 61 72 65 |values~ |1--3 are|
|00000a80| 20 74 68 65 20 66 6f 72 | 65 67 72 6f 75 6e 64 2c | the for|eground,|
|00000a90| 20 61 6e 64 20 74 77 6f | 20 63 6f 6c 6f 72 20 6d | and two| color m|
|00000aa0| 61 70 70 69 6e 67 73 0d | 0a 09 6f 72 20 60 60 70 |appings.|..or ``p|
|00000ab0| 61 6c 65 74 74 65 73 27 | 27 20 61 72 65 20 61 76 |alettes'|' are av|
|00000ac0| 61 69 6c 61 62 6c 65 2e | 20 42 79 20 64 65 66 61 |ailable.| By defa|
|00000ad0| 75 6c 74 2c 20 70 61 6c | 65 74 74 65 20 31 20 69 |ult, pal|ette 1 i|
|00000ae0| 73 0d 0a 09 61 63 74 69 | 76 65 2c 20 62 75 74 20 |s...acti|ve, but |
|00000af0| 69 74 20 6d 61 79 20 62 | 65 0d 0a 09 63 68 61 6e |it may b|e...chan|
|00000b00| 67 65 64 20 77 69 74 68 | 20 74 68 65 20 5c 69 74 |ged with| the \it|
|00000b10| 77 64 20 67 5f 73 65 74 | 70 61 6c 20 66 75 6e 63 |wd g_set|pal func|
|00000b20| 74 69 6f 6e 20 77 69 74 | 68 20 74 68 65 20 66 6f |tion wit|h the fo|
|00000b30| 6c 6c 6f 77 69 6e 67 0d | 0a 09 72 65 73 75 6c 74 |llowing.|..result|
|00000b40| 73 3a 0d 0a 5c 62 65 67 | 69 6e 74 61 62 6c 65 0d |s:..\beg|intable.|
|00000b50| 0a 5c 63 65 6e 74 65 72 | 6c 69 6e 65 7b 5c 76 62 |.\center|line{\vb|
|00000b60| 6f 78 7b 25 0d 0a 20 20 | 5c 73 65 74 74 61 62 73 |ox{%.. |\settabs|
|00000b70| 5c 2b 26 5c 69 74 20 63 | 6f 6c 6f 72 26 5c 69 74 |\+&\it c|olor&\it|
|00000b80| 20 76 61 6c 75 65 5c 71 | 75 61 64 20 26 62 61 63 | value\q|uad &bac|
|00000b90| 6b 67 72 6f 75 6e 64 5c | 71 75 61 64 26 5c 63 72 |kground\|quad&\cr|
|00000ba0| 0d 0a 20 20 5c 2b 26 5c | 69 74 20 63 6f 6c 6f 72 |.. \+&\|it color|
|00000bb0| 20 76 61 6c 75 65 26 26 | 24 5c 69 74 20 70 61 6c | value&&|$\it pal|
|00000bc0| 65 74 74 65 3d 30 24 26 | 24 5c 69 74 20 70 61 6c |ette=0$&|$\it pal|
|00000bd0| 65 74 74 65 3d 31 24 5c | 63 72 0d 0a 20 20 5c 73 |ette=1$\|cr.. \s|
|00000be0| 6d 61 6c 6c 73 6b 69 70 | 0d 0a 20 20 5c 2b 26 26 |mallskip|.. \+&&|
|00000bf0| 20 30 20 26 62 61 63 6b | 67 72 6f 75 6e 64 26 62 | 0 &back|ground&b|
|00000c00| 61 63 6b 67 72 6f 75 6e | 64 5c 63 72 0d 0a 20 20 |ackgroun|d\cr.. |
|00000c10| 5c 2b 26 26 20 31 20 26 | 67 72 65 65 6e 26 63 79 |\+&& 1 &|green&cy|
|00000c20| 61 6e 5c 63 72 0d 0a 20 | 20 5c 2b 26 26 20 32 20 |an\cr.. | \+&& 2 |
|00000c30| 26 72 65 64 26 6d 61 67 | 65 6e 74 61 5c 63 72 0d |&red&mag|enta\cr.|
|00000c40| 0a 20 20 5c 2b 26 26 20 | 33 20 26 79 65 6c 6c 6f |. \+&& |3 &yello|
|00000c50| 77 26 77 68 69 74 65 5c | 63 72 0d 0a 7d 7d 0d 0a |w&white\|cr..}}..|
|00000c60| 5c 65 6e 64 74 61 62 6c | 65 0d 0a 0d 0a 5c 6d 61 |\endtabl|e....\ma|
|00000c70| 6e 68 65 61 64 20 43 47 | 41 20 36 34 30 20 62 79 |nhead CG|A 640 by|
|00000c80| 20 32 30 30 20 74 77 6f | 20 63 6f 6c 6f 72 20 6d | 200 two| color m|
|00000c90| 6f 64 65 5c 70 61 72 0d | 0a 0d 0a 09 49 6e 20 74 |ode\par.|....In t|
|00000ca0| 68 69 73 20 6d 6f 64 65 | 2c 20 63 6f 6c 6f 72 20 |his mode|, color |
|00000cb0| 76 61 6c 75 65 7e 30 20 | 69 73 20 74 68 65 20 62 |value~0 |is the b|
|00000cc0| 61 63 6b 67 72 6f 75 6e | 64 20 61 6e 64 20 69 73 |ackgroun|d and is|
|00000cd0| 20 61 6c 77 61 79 73 0d | 0a 09 64 69 73 70 6c 61 | always.|..displa|
|00000ce0| 79 65 64 20 61 73 20 62 | 6c 61 63 6b 2e 20 43 6f |yed as b|lack. Co|
|00000cf0| 6c 6f 72 20 76 61 6c 75 | 65 7e 31 20 69 73 20 74 |lor valu|e~1 is t|
|00000d00| 68 65 20 66 6f 72 65 67 | 72 6f 75 6e 64 20 61 6e |he foreg|round an|
|00000d10| 64 20 68 61 73 0d 0a 09 | 61 20 64 65 66 61 75 6c |d has...|a defaul|
|00000d20| 74 20 63 6f 6c 6f 72 20 | 6f 66 20 77 68 69 74 65 |t color |of white|
|00000d30| 2e 20 54 68 69 73 20 6d | 61 79 20 62 65 20 63 68 |. This m|ay be ch|
|00000d40| 61 6e 67 65 64 2c 20 68 | 6f 77 65 76 65 72 2c 20 |anged, h|owever, |
|00000d50| 77 69 74 68 0d 0a 09 74 | 68 65 20 5c 69 74 77 64 |with...t|he \itwd|
|00000d60| 20 67 5f 73 65 74 70 61 | 6c 20 66 75 6e 63 74 69 | g_setpa|l functi|
|00000d70| 6f 6e 20 74 6f 20 61 6e | 79 20 6f 66 20 74 68 65 |on to an|y of the|
|00000d80| 20 63 6f 6c 6f 72 73 20 | 6c 69 73 74 65 64 20 61 | colors |listed a|
|00000d90| 73 0d 0a 09 61 20 43 47 | 41 20 62 61 63 6b 67 72 |s...a CG|A backgr|
|00000da0| 6f 75 6e 64 20 63 6f 6c | 6f 72 20 69 6e 20 74 68 |ound col|or in th|
|00000db0| 65 20 70 72 65 76 69 6f | 75 73 20 73 65 63 74 69 |e previo|us secti|
|00000dc0| 6f 6e 2e 0d 0a 0d 0a 5c | 6d 61 6e 68 65 61 64 20 |on.....\|manhead |
|00000dd0| 45 47 41 20 73 69 78 74 | 65 65 6e 20 63 6f 6c 6f |EGA sixt|een colo|
|00000de0| 72 20 6d 6f 64 65 5c 70 | 61 72 0d 0a 0d 0a 09 54 |r mode\p|ar.....T|
|00000df0| 68 65 20 45 47 41 20 68 | 61 73 20 36 34 20 64 69 |he EGA h|as 64 di|
|00000e00| 73 70 6c 61 79 61 62 6c | 65 20 63 6f 6c 6f 72 73 |splayabl|e colors|
|00000e10| 2c 0d 0a 09 31 36 20 6f | 66 20 77 68 69 63 68 20 |,...16 o|f which |
|00000e20| 63 61 6e 20 62 65 20 64 | 69 73 70 6c 61 79 65 64 |can be d|isplayed|
|00000e30| 20 61 74 20 61 6e 79 20 | 74 69 6d 65 2e 20 54 68 | at any |time. Th|
|00000e40| 65 20 64 69 73 70 6c 61 | 79 61 62 6c 65 0d 0a 09 |e displa|yable...|
|00000e50| 63 6f 6c 6f 72 73 20 61 | 72 65 20 72 65 70 72 65 |colors a|re repre|
|00000e60| 73 65 6e 74 65 64 20 61 | 73 20 61 20 73 69 78 2d |sented a|s a six-|
|00000e70| 62 69 74 20 76 61 6c 75 | 65 20 77 69 74 68 20 66 |bit valu|e with f|
|00000e80| 6f 72 6d 61 74 0d 0a 09 | 72 67 62 52 47 42 2c 20 |ormat...|rgbRGB, |
|00000e90| 77 68 65 72 65 20 74 68 | 65 20 69 6e 74 65 6e 73 |where th|e intens|
|00000ea0| 69 74 69 65 73 20 6f 66 | 20 6f 66 20 74 68 65 20 |ities of| of the |
|00000eb0| 70 72 69 6d 61 72 79 20 | 63 6f 6c 6f 72 73 0d 0a |primary |colors..|
|00000ec0| 09 28 72 65 64 2c 20 67 | 72 65 65 6e 2c 20 61 6e |.(red, g|reen, an|
|00000ed0| 64 20 62 6c 75 65 29 20 | 61 72 65 20 69 6e 20 74 |d blue) |are in t|
|00000ee0| 68 65 20 72 61 6e 67 65 | 20 30 2d 2d 33 20 61 6e |he range| 0--3 an|
|00000ef0| 64 20 72 65 70 72 65 73 | 65 6e 74 65 64 0d 0a 09 |d repres|ented...|
|00000f00| 61 73 20 74 68 65 20 74 | 77 6f 2d 62 69 74 20 76 |as the t|wo-bit v|
|00000f10| 61 6c 75 65 73 20 52 72 | 2c 20 47 67 2c 20 61 6e |alues Rr|, Gg, an|
|00000f20| 64 20 42 62 2e 20 54 68 | 65 20 6d 61 70 70 69 6e |d Bb. Th|e mappin|
|00000f30| 67 20 6f 66 20 63 6f 6c | 6f 72 0d 0a 09 76 61 6c |g of col|or...val|
|00000f40| 75 65 73 20 74 6f 20 74 | 68 65 73 65 20 63 6f 6c |ues to t|hese col|
|00000f50| 6f 72 73 20 63 61 6e 20 | 62 65 20 63 68 61 6e 67 |ors can |be chang|
|00000f60| 65 64 20 75 73 69 6e 67 | 20 74 68 65 20 5c 69 74 |ed using| the \it|
|00000f70| 77 64 20 67 5f 73 65 74 | 70 61 6c 0d 0a 09 66 75 |wd g_set|pal...fu|
|00000f80| 6e 63 74 69 6f 6e 20 28 | 6f 72 20 5c 69 74 77 64 |nction (|or \itwd|
|00000f90| 20 67 5f 73 65 74 62 61 | 63 6b 20 66 6f 72 20 63 | g_setba|ck for c|
|00000fa0| 6f 6c 6f 72 20 76 61 6c | 75 65 7e 30 29 2e 20 54 |olor val|ue~0). T|
|00000fb0| 68 65 20 64 65 66 61 75 | 6c 74 20 6d 61 70 70 69 |he defau|lt mappi|
|00000fc0| 6e 67 0d 0a 09 69 73 20 | 61 73 20 66 6f 6c 6c 6f |ng...is |as follo|
|00000fd0| 77 73 3a 0d 0a 5c 62 65 | 67 69 6e 74 61 62 6c 65 |ws:..\be|gintable|
|00000fe0| 0d 0a 5c 63 65 6e 74 65 | 72 6c 69 6e 65 7b 5c 76 |..\cente|rline{\v|
|00000ff0| 62 6f 78 7b 25 0d 0a 20 | 20 5c 73 65 74 74 61 62 |box{%.. | \settab|
|00001000| 73 5c 2b 26 5c 69 74 20 | 63 6f 6c 6f 72 20 26 5c |s\+&\it |color &\|
|00001010| 69 74 20 76 61 6c 75 65 | 5c 71 75 61 64 26 62 72 |it value|\quad&br|
|00001020| 69 67 68 74 20 79 65 6c | 6c 6f 77 5c 71 75 61 64 |ight yel|low\quad|
|00001030| 26 5c 69 74 20 73 69 78 | 2d 62 69 74 20 26 5c 63 |&\it six|-bit &\c|
|00001040| 72 0d 0a 20 20 5c 2b 26 | 5c 69 74 20 63 6f 6c 6f |r.. \+&|\it colo|
|00001050| 72 20 76 61 6c 75 65 26 | 26 5c 69 74 20 63 6f 6c |r value&|&\it col|
|00001060| 6f 72 26 5c 69 74 20 73 | 69 78 2d 62 69 74 20 76 |or&\it s|ix-bit v|
|00001070| 61 6c 75 65 5c 63 72 0d | 0a 20 20 5c 73 6d 61 6c |alue\cr.|. \smal|
|00001080| 6c 73 6b 69 70 0d 0a 20 | 20 5c 2b 26 5c 68 66 69 |lskip.. | \+&\hfi|
|00001090| 6c 6c 20 30 26 26 62 6c | 61 63 6b 26 5c 68 66 69 |ll 0&&bl|ack&\hfi|
|000010a0| 6c 6c 20 30 26 5c 63 72 | 0d 0a 20 20 5c 2b 26 5c |ll 0&\cr|.. \+&\|
|000010b0| 68 66 69 6c 6c 20 31 26 | 26 62 6c 75 65 26 5c 68 |hfill 1&|&blue&\h|
|000010c0| 66 69 6c 6c 20 31 26 5c | 63 72 0d 0a 20 20 5c 2b |fill 1&\|cr.. \+|
|000010d0| 26 5c 68 66 69 6c 6c 20 | 32 26 26 67 72 65 65 6e |&\hfill |2&&green|
|000010e0| 26 5c 68 66 69 6c 6c 20 | 32 26 5c 63 72 0d 0a 20 |&\hfill |2&\cr.. |
|000010f0| 20 5c 2b 26 5c 68 66 69 | 6c 6c 20 33 26 26 63 79 | \+&\hfi|ll 3&&cy|
|00001100| 61 6e 26 5c 68 66 69 6c | 6c 20 33 26 5c 63 72 0d |an&\hfil|l 3&\cr.|
|00001110| 0a 20 20 5c 2b 26 5c 68 | 66 69 6c 6c 20 34 26 26 |. \+&\h|fill 4&&|
|00001120| 72 65 64 26 5c 68 66 69 | 6c 6c 20 34 26 5c 63 72 |red&\hfi|ll 4&\cr|
|00001130| 0d 0a 20 20 5c 2b 26 5c | 68 66 69 6c 6c 20 35 26 |.. \+&\|hfill 5&|
|00001140| 26 70 75 72 70 6c 65 26 | 5c 68 66 69 6c 6c 20 35 |&purple&|\hfill 5|
|00001150| 26 5c 63 72 0d 0a 20 20 | 5c 2b 26 5c 68 66 69 6c |&\cr.. |\+&\hfil|
|00001160| 6c 20 36 26 26 62 72 6f | 77 6e 26 5c 68 66 69 6c |l 6&&bro|wn&\hfil|
|00001170| 6c 20 32 30 26 5c 63 72 | 0d 0a 20 20 5c 2b 26 5c |l 20&\cr|.. \+&\|
|00001180| 68 66 69 6c 6c 20 37 26 | 26 77 68 69 74 65 26 5c |hfill 7&|&white&\|
|00001190| 68 66 69 6c 6c 20 37 26 | 5c 63 72 0d 0a 20 20 5c |hfill 7&|\cr.. \|
|000011a0| 2b 26 5c 68 66 69 6c 6c | 20 38 26 26 67 72 65 79 |+&\hfill| 8&&grey|
|000011b0| 26 5c 68 66 69 6c 6c 20 | 35 36 26 5c 63 72 0d 0a |&\hfill |56&\cr..|
|000011c0| 20 20 5c 2b 26 5c 68 66 | 69 6c 6c 20 39 26 26 62 | \+&\hf|ill 9&&b|
|000011d0| 72 69 67 68 74 20 62 6c | 75 65 26 5c 68 66 69 6c |right bl|ue&\hfil|
|000011e0| 6c 20 35 37 26 5c 63 72 | 0d 0a 20 20 5c 2b 26 5c |l 57&\cr|.. \+&\|
|000011f0| 68 66 69 6c 6c 20 31 30 | 26 26 62 72 69 67 68 74 |hfill 10|&&bright|
|00001200| 20 67 72 65 65 6e 26 5c | 68 66 69 6c 6c 20 35 38 | green&\|hfill 58|
|00001210| 26 5c 63 72 0d 0a 20 20 | 5c 2b 26 5c 68 66 69 6c |&\cr.. |\+&\hfil|
|00001220| 6c 20 31 31 26 26 62 72 | 69 67 68 74 20 63 79 61 |l 11&&br|ight cya|
|00001230| 6e 26 5c 68 66 69 6c 6c | 20 35 39 26 5c 63 72 0d |n&\hfill| 59&\cr.|
|00001240| 0a 20 20 5c 2b 26 5c 68 | 66 69 6c 6c 20 31 32 26 |. \+&\h|fill 12&|
|00001250| 26 62 72 69 67 68 74 20 | 72 65 64 26 5c 68 66 69 |&bright |red&\hfi|
|00001260| 6c 6c 20 36 30 26 5c 63 | 72 0d 0a 20 20 5c 2b 26 |ll 60&\c|r.. \+&|
|00001270| 5c 68 66 69 6c 6c 20 31 | 33 26 26 62 72 69 67 68 |\hfill 1|3&&brigh|
|00001280| 74 20 70 75 72 70 6c 65 | 26 5c 68 66 69 6c 6c 20 |t purple|&\hfill |
|00001290| 36 31 26 5c 63 72 0d 0a | 20 20 5c 2b 26 5c 68 66 |61&\cr..| \+&\hf|
|000012a0| 69 6c 6c 20 31 34 26 26 | 62 72 69 67 68 74 20 79 |ill 14&&|bright y|
|000012b0| 65 6c 6c 6f 77 26 5c 68 | 66 69 6c 6c 20 36 32 26 |ellow&\h|fill 62&|
|000012c0| 5c 63 72 0d 0a 20 20 5c | 2b 26 5c 68 66 69 6c 6c |\cr.. \|+&\hfill|
|000012d0| 20 31 35 26 26 62 72 69 | 67 68 74 20 77 68 69 74 | 15&&bri|ght whit|
|000012e0| 65 26 5c 68 66 69 6c 6c | 20 36 33 26 5c 63 72 0d |e&\hfill| 63&\cr.|
|000012f0| 0a 7d 7d 0d 0a 5c 65 6e | 64 74 61 62 6c 65 0d 0a |.}}..\en|dtable..|
|00001300| 0d 0a 5c 6d 61 6e 73 65 | 65 0d 0a 09 69 6e 74 72 |..\manse|e...intr|
|00001310| 6f 28 31 29 2c 20 67 5f | 73 65 74 62 61 63 6b 28 |o(1), g_|setback(|
|00001320| 31 29 2c 20 67 5f 73 65 | 74 70 61 6c 28 31 29 2e |1), g_se|tpal(1).|
|00001330| 0d 0a 5c 6d 61 6e 70 65 | 6e 64 0d 0a 0d 0a 5c 6d |..\manpe|nd....\m|
|00001340| 61 6e 70 61 67 65 20 67 | 5f 62 6f 78 28 31 29 0d |anpage g|_box(1).|
|00001350| 0a 0d 0a 5c 6d 61 6e 6e | 61 6d 65 0d 0a 09 67 5f |...\mann|ame...g_|
|00001360| 62 6f 78 20 2d 2d 2d 20 | 64 72 61 77 20 61 20 72 |box --- |draw a r|
|00001370| 65 63 74 61 6e 67 75 6c | 61 72 20 62 6f 78 0d 0a |ectangul|ar box..|
|00001380| 5c 6d 61 6e 73 79 6e 0d | 0a 09 76 6f 69 64 20 67 |\mansyn.|..void g|
|00001390| 5f 62 6f 78 28 78 31 2c | 20 79 31 2c 20 78 32 2c |_box(x1,| y1, x2,|
|000013a0| 20 79 32 2c 20 63 6f 6c | 6f 72 29 0d 0a 0d 0a 09 | y2, col|or).....|
|000013b0| 69 6e 74 20 78 31 2c 20 | 79 31 2c 20 78 32 2c 20 |int x1, |y1, x2, |
|000013c0| 79 32 3b 0d 0a 09 75 6e | 73 69 67 6e 65 64 20 63 |y2;...un|signed c|
|000013d0| 6f 6c 6f 72 3b 0d 0a 5c | 6d 61 6e 64 73 63 72 0d |olor;..\|mandscr.|
|000013e0| 0a 09 54 68 65 20 5c 69 | 74 77 64 20 67 5f 62 6f |..The \i|twd g_bo|
|000013f0| 78 20 66 75 6e 63 74 69 | 6f 6e 20 64 72 61 77 73 |x functi|on draws|
|00001400| 20 74 68 65 20 72 65 63 | 74 61 6e 67 75 6c 61 72 | the rec|tangular|
|00001410| 20 62 6f 78 0d 0a 09 20 | 64 65 66 69 6e 65 64 20 | box... |defined |
|00001420| 62 79 20 74 68 65 20 70 | 6f 69 6e 74 73 0d 0a 09 |by the p|oints...|
|00001430| 5c 69 74 70 6e 74 20 28 | 78 31 2c 20 79 31 29 20 |\itpnt (|x1, y1) |
|00001440| 61 6e 64 20 5c 69 74 70 | 6e 74 20 28 78 32 2c 20 |and \itp|nt (x2, |
|00001450| 79 32 29 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |y2) in t|he curre|
|00001460| 6e 74 20 64 72 61 77 69 | 6e 67 20 62 75 66 66 65 |nt drawi|ng buffe|
|00001470| 72 0d 0a 20 20 20 20 20 | 20 20 20 77 69 74 68 20 |r.. | with |
|00001480| 63 6f 6c 6f 72 7e 5c 69 | 74 6e 63 20 63 6f 6c 6f |color~\i|tnc colo|
|00001490| 72 20 2e 20 49 66 20 78 | 6f 72 20 6d 6f 64 65 20 |r . If x|or mode |
|000014a0| 69 73 20 6f 6e 2c 20 74 | 68 65 20 72 65 63 74 61 |is on, t|he recta|
|000014b0| 6e 67 6c 65 20 77 69 6c | 6c 20 62 65 0d 0a 09 6c |ngle wil|l be...l|
|000014c0| 6f 67 69 63 61 6c 6c 79 | 20 78 6f 72 27 65 64 20 |ogically| xor'ed |
|000014d0| 77 69 74 68 20 74 68 65 | 20 65 78 69 73 74 69 6e |with the| existin|
|000014e0| 67 20 64 61 74 61 20 69 | 6e 20 74 68 65 20 62 75 |g data i|n the bu|
|000014f0| 66 66 65 72 2e 0d 0a 5c | 6d 61 6e 73 65 65 0d 0a |ffer...\|mansee..|
|00001500| 09 67 5f 6c 69 6e 65 28 | 31 29 2e 0d 0a 5c 6d 61 |.g_line(|1)...\ma|
|00001510| 6e 70 65 6e 64 0d 0a 0d | 0a 5c 6d 61 6e 70 61 67 |npend...|.\manpag|
|00001520| 65 20 67 5f 63 69 72 63 | 6c 65 28 31 29 0d 0a 0d |e g_circ|le(1)...|
|00001530| 0a 5c 6d 61 6e 6e 61 6d | 65 0d 0a 09 67 5f 63 69 |.\mannam|e...g_ci|
|00001540| 72 63 6c 65 20 2d 2d 2d | 20 64 72 61 77 20 61 20 |rcle ---| draw a |
|00001550| 63 69 72 63 6c 65 0d 0a | 5c 6d 61 6e 73 79 6e 0d |circle..|\mansyn.|
|00001560| 0a 09 76 6f 69 64 20 67 | 5f 63 69 72 63 6c 65 28 |..void g|_circle(|
|00001570| 78 2c 20 79 2c 20 72 2c | 20 63 6f 6c 6f 72 29 0d |x, y, r,| color).|
|00001580| 0a 0d 0a 09 69 6e 74 20 | 78 2c 20 79 2c 20 72 3b |....int |x, y, r;|
|00001590| 0d 0a 09 75 6e 73 69 67 | 6e 65 64 20 63 6f 6c 6f |...unsig|ned colo|
|000015a0| 72 3b 0d 0a 5c 6d 61 6e | 64 73 63 72 0d 0a 09 54 |r;..\man|dscr...T|
|000015b0| 68 65 20 5c 69 74 77 64 | 20 67 5f 63 69 72 63 6c |he \itwd| g_circl|
|000015c0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 64 72 61 77 73 |e functi|on draws|
|000015d0| 20 61 20 63 69 72 63 6c | 65 20 63 65 6e 74 65 72 | a circl|e center|
|000015e0| 65 64 20 6f 6e 20 74 68 | 65 20 70 6f 69 6e 74 0d |ed on th|e point.|
|000015f0| 0a 09 5c 69 74 70 6e 74 | 20 28 78 2c 20 79 29 20 |..\itpnt| (x, y) |
|00001600| 77 69 74 68 20 72 61 64 | 69 75 73 7e 5c 69 74 6e |with rad|ius~\itn|
|00001610| 63 20 72 20 2e 20 54 68 | 65 20 63 69 72 63 6c 65 |c r . Th|e circle|
|00001620| 20 69 73 20 64 72 61 77 | 6e 20 69 6e 20 74 68 65 | is draw|n in the|
|00001630| 0d 0a 09 63 75 72 72 65 | 6e 74 20 64 72 61 77 69 |...curre|nt drawi|
|00001640| 6e 67 20 62 75 66 66 65 | 72 20 77 69 74 68 20 63 |ng buffe|r with c|
|00001650| 6f 6c 6f 72 7e 5c 69 74 | 6e 63 20 63 6f 6c 6f 72 |olor~\it|nc color|
|00001660| 20 2e 20 49 66 20 78 6f | 72 20 6d 6f 64 65 20 69 | . If xo|r mode i|
|00001670| 73 0d 0a 09 6f 6e 2c 20 | 74 68 65 20 63 69 72 63 |s...on, |the circ|
|00001680| 6c 65 20 69 73 20 6c 6f | 67 69 63 61 6c 6c 79 20 |le is lo|gically |
|00001690| 78 6f 72 27 65 64 20 77 | 69 74 68 20 74 68 65 20 |xor'ed w|ith the |
|000016a0| 65 78 69 73 74 69 6e 67 | 20 64 61 74 61 20 69 6e |existing| data in|
|000016b0| 20 74 68 65 0d 0a 09 62 | 75 66 66 65 72 2e 20 54 | the...b|uffer. T|
|000016c0| 68 65 20 72 61 64 69 75 | 73 20 69 73 20 74 61 6b |he radiu|s is tak|
|000016d0| 65 6e 20 74 6f 20 62 65 | 20 68 61 6c 66 20 6f 66 |en to be| half of|
|000016e0| 20 74 68 65 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 | the hor|izontal |
|000016f0| 64 69 61 6d 65 74 65 72 | 0d 0a 09 6f 66 20 74 68 |diameter|...of th|
|00001700| 65 20 63 69 72 63 6c 65 | 2c 20 69 6e 20 70 69 78 |e circle|, in pix|
|00001710| 65 6c 73 20 28 62 65 63 | 61 75 73 65 20 6f 66 20 |els (bec|ause of |
|00001720| 74 68 65 20 67 72 61 70 | 68 69 63 73 20 64 69 73 |the grap|hics dis|
|00001730| 70 6c 61 79 27 73 0d 0a | 09 61 73 70 65 63 74 20 |play's..|.aspect |
|00001740| 72 61 74 69 6f 2c 20 74 | 68 69 73 20 77 69 6c 6c |ratio, t|his will|
|00001750| 20 6e 6f 74 20 69 6e 20 | 67 65 6e 65 72 61 6c 20 | not in |general |
|00001760| 62 65 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 74 |be the s|ame as t|
|00001770| 68 65 20 76 65 72 74 69 | 63 61 6c 0d 0a 09 72 61 |he verti|cal...ra|
|00001780| 64 69 75 73 20 6f 66 20 | 74 68 65 20 63 69 72 63 |dius of |the circ|
|00001790| 6c 65 29 2e 0d 0a 5c 6d | 61 6e 73 65 65 0d 0a 09 |le)...\m|ansee...|
|000017a0| 67 5f 65 6c 6c 69 70 73 | 65 28 31 29 2e 0d 0a 5c |g_ellips|e(1)...\|
|000017b0| 6d 61 6e 70 65 6e 64 0d | 0a 0d 0a 5c 6d 61 6e 70 |manpend.|...\manp|
|000017c0| 61 67 65 20 67 5f 63 6c | 65 61 72 28 31 29 0d 0a |age g_cl|ear(1)..|
|000017d0| 0d 0a 5c 6d 61 6e 6e 61 | 6d 65 0d 0a 09 67 5f 63 |..\manna|me...g_c|
|000017e0| 6c 65 61 72 20 2d 2d 2d | 20 63 6c 65 61 72 20 74 |lear ---| clear t|
|000017f0| 68 65 20 61 72 65 61 20 | 77 69 74 68 69 6e 20 74 |he area |within t|
|00001800| 68 65 20 63 6c 69 70 70 | 69 6e 67 20 62 6f 75 6e |he clipp|ing boun|
|00001810| 64 61 72 79 20 74 6f 20 | 61 0d 0a 09 67 69 76 65 |dary to |a...give|
|00001820| 6e 20 63 6f 6c 6f 72 0d | 0a 5c 6d 61 6e 73 79 6e |n color.|.\mansyn|
|00001830| 0d 0a 09 76 6f 69 64 20 | 67 5f 63 6c 65 61 72 28 |...void |g_clear(|
|00001840| 63 6f 6c 6f 72 29 0d 0a | 0d 0a 09 75 6e 73 69 67 |color)..|...unsig|
|00001850| 6e 65 64 20 63 6f 6c 6f | 72 3b 0d 0a 5c 6d 61 6e |ned colo|r;..\man|
|00001860| 64 73 63 72 0d 0a 09 54 | 68 65 20 5c 69 74 77 64 |dscr...T|he \itwd|
|00001870| 20 67 5f 63 6c 65 61 72 | 20 66 75 6e 63 74 69 6f | g_clear| functio|
|00001880| 6e 20 73 65 74 73 20 61 | 6c 6c 20 74 68 65 20 70 |n sets a|ll the p|
|00001890| 69 78 65 6c 73 20 77 69 | 74 68 69 6e 20 74 68 65 |ixels wi|thin the|
|000018a0| 20 63 75 72 72 65 6e 74 | 0d 0a 09 63 6c 69 70 70 | current|...clipp|
|000018b0| 69 6e 67 20 62 6f 75 6e | 64 61 72 79 20 69 6e 20 |ing boun|dary in |
|000018c0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 64 72 61 77 |the curr|ent draw|
|000018d0| 69 6e 67 20 62 75 66 66 | 65 72 20 74 6f 20 63 6f |ing buff|er to co|
|000018e0| 6c 6f 72 20 5c 69 74 6e | 63 20 63 6f 6c 6f 72 20 |lor \itn|c color |
|000018f0| 2e 0d 0a 5c 6d 61 6e 73 | 65 65 0d 0a 09 67 5f 63 |...\mans|ee...g_c|
|00001900| 6c 65 61 72 61 6c 6c 28 | 31 29 2c 20 67 5f 72 65 |learall(|1), g_re|
|00001910| 67 66 69 6c 6c 28 31 29 | 2c 20 67 5f 73 65 74 63 |gfill(1)|, g_setc|
|00001920| 6c 69 70 28 31 29 2e 0d | 0a 5c 6d 61 6e 70 65 6e |lip(1)..|.\manpen|
|00001930| 64 0d 0a 0d 0a 5c 6d 61 | 6e 70 61 67 65 20 67 5f |d....\ma|npage g_|
|00001940| 63 6c 65 61 72 61 6c 6c | 28 31 29 0d 0a 0d 0a 5c |clearall|(1)....\|
|00001950| 6d 61 6e 6e 61 6d 65 0d | 0a 09 67 5f 63 6c 65 61 |manname.|..g_clea|
|00001960| 72 61 6c 6c 20 2d 2d 2d | 20 63 6c 65 61 72 20 61 |rall ---| clear a|
|00001970| 6e 20 65 6e 74 69 72 65 | 20 62 75 66 66 65 72 20 |n entire| buffer |
|00001980| 74 6f 20 61 20 73 70 65 | 63 69 66 69 65 64 20 63 |to a spe|cified c|
|00001990| 6f 6c 6f 72 0d 0a 5c 6d | 61 6e 73 79 6e 0d 0a 09 |olor..\m|ansyn...|
|000019a0| 76 6f 69 64 20 67 5f 63 | 6c 65 61 72 61 6c 6c 28 |void g_c|learall(|
|000019b0| 63 6f 6c 6f 72 29 0d 0a | 0d 0a 09 75 6e 73 69 67 |color)..|...unsig|
|000019c0| 6e 65 64 20 63 6f 6c 6f | 72 3b 0d 0a 5c 6d 61 6e |ned colo|r;..\man|
|000019d0| 64 73 63 72 0d 0a 09 54 | 68 65 20 5c 69 74 77 64 |dscr...T|he \itwd|
|000019e0| 20 67 5f 63 6c 65 61 72 | 61 6c 6c 20 66 75 6e 63 | g_clear|all func|
|000019f0| 74 69 6f 6e 20 73 65 74 | 73 20 74 68 65 20 65 6e |tion set|s the en|
|00001a00| 74 69 72 65 20 63 75 72 | 72 65 6e 74 20 64 72 61 |tire cur|rent dra|
|00001a10| 77 69 6e 67 20 62 75 66 | 66 65 72 0d 0a 09 74 6f |wing buf|fer...to|
|00001a20| 20 63 6f 6c 6f 72 7e 5c | 69 74 6e 63 20 63 6f 6c | color~\|itnc col|
|00001a30| 6f 72 20 2c 20 72 65 67 | 61 72 64 6c 65 73 73 20 |or , reg|ardless |
|00001a40| 6f 66 20 63 6c 69 70 70 | 69 6e 67 20 62 6f 75 6e |of clipp|ing boun|
|00001a50| 64 61 72 69 65 73 2e 20 | 46 6f 72 0d 0a 09 63 6c |daries. |For...cl|
|00001a60| 65 61 72 69 6e 67 20 74 | 68 65 20 65 6e 74 69 72 |earing t|he entir|
|00001a70| 65 20 73 63 72 65 65 6e | 2c 20 5c 69 74 77 64 20 |e screen|, \itwd |
|00001a80| 67 5f 63 6c 65 61 72 61 | 6c 6c 20 73 68 6f 75 6c |g_cleara|ll shoul|
|00001a90| 64 20 62 65 0d 0a 09 73 | 6f 6d 65 77 68 61 74 20 |d be...s|omewhat |
|00001aa0| 66 61 73 74 65 72 20 74 | 68 61 6e 20 5c 69 74 6e |faster t|han \itn|
|00001ab0| 63 20 67 5f 63 6c 65 61 | 72 20 2e 0d 0a 5c 6d 61 |c g_clea|r ...\ma|
|00001ac0| 6e 73 65 65 0d 0a 09 67 | 5f 63 6c 65 61 72 28 31 |nsee...g|_clear(1|
|00001ad0| 29 2e 0d 0a 5c 6d 61 6e | 70 65 6e 64 0d 0a 0d 0a |)...\man|pend....|
|00001ae0| 5c 6d 61 6e 70 61 67 65 | 20 67 5f 63 6c 6f 73 65 |\manpage| g_close|
|00001af0| 28 31 29 0d 0a 0d 0a 5c | 6d 61 6e 6e 61 6d 65 0d |(1)....\|manname.|
|00001b00| 0a 09 67 5f 63 6c 6f 73 | 65 20 2d 2d 2d 20 74 65 |..g_clos|e --- te|
|00001b10| 72 6d 69 6e 61 74 65 20 | 67 72 61 70 68 69 63 73 |rminate |graphics|
|00001b20| 20 64 72 61 77 69 6e 67 | 0d 0a 5c 6d 61 6e 73 79 | drawing|..\mansy|
|00001b30| 6e 0d 0a 09 76 6f 69 64 | 20 67 5f 63 6c 6f 73 65 |n...void| g_close|
|00001b40| 28 29 0d 0a 5c 6d 61 6e | 64 73 63 72 0d 0a 09 54 |()..\man|dscr...T|
|00001b50| 68 65 20 5c 69 74 77 64 | 20 67 5f 63 6c 6f 73 65 |he \itwd| g_close|
|00001b60| 20 66 75 6e 63 74 69 6f | 6e 20 74 65 72 6d 69 6e | functio|n termin|
|00001b70| 61 74 65 73 20 67 72 61 | 70 68 69 63 73 20 64 72 |ates gra|phics dr|
|00001b80| 61 77 69 6e 67 20 61 6e | 64 0d 0a 09 72 65 73 65 |awing an|d...rese|
|00001b90| 74 73 20 74 68 65 20 64 | 69 73 70 6c 61 79 20 74 |ts the d|isplay t|
|00001ba0| 6f 20 38 30 2d 63 6f 6c | 75 6d 6e 20 74 65 78 74 |o 80-col|umn text|
|00001bb0| 20 6d 6f 64 65 2e 0d 0a | 5c 6d 61 6e 73 65 65 0d | mode...|\mansee.|
|00001bc0| 0a 09 67 5f 69 6e 69 74 | 28 31 29 2c 20 67 5f 6f |..g_init|(1), g_o|
|00001bd0| 70 65 6e 28 31 29 2e 0d | 0a 5c 6d 61 6e 70 65 6e |pen(1)..|.\manpen|
|00001be0| 64 0d 0a 0d 0a 5c 6d 61 | 6e 70 61 67 65 20 67 5f |d....\ma|npage g_|
|00001bf0| 65 6c 6c 69 70 73 65 28 | 31 29 0d 0a 0d 0a 5c 6d |ellipse(|1)....\m|
|00001c00| 61 6e 6e 61 6d 65 0d 0a | 09 67 5f 65 6c 6c 69 70 |anname..|.g_ellip|
|00001c10| 73 65 20 2d 2d 2d 20 64 | 72 61 77 20 61 6e 20 65 |se --- d|raw an e|
|00001c20| 6c 6c 69 70 73 65 0d 0a | 5c 6d 61 6e 73 79 6e 0d |llipse..|\mansyn.|
|00001c30| 0a 09 76 6f 69 64 20 67 | 5f 65 6c 6c 69 70 73 65 |..void g|_ellipse|
|00001c40| 28 78 2c 20 79 2c 20 72 | 5f 73 75 62 5f 6d 2c 20 |(x, y, r|_sub_m, |
|00001c50| 61 73 70 65 63 74 2c 20 | 63 6f 6c 6f 72 29 0d 0a |aspect, |color)..|
|00001c60| 0d 0a 09 69 6e 74 20 78 | 2c 20 79 2c 20 72 5f 73 |...int x|, y, r_s|
|00001c70| 75 62 5f 6d 3b 0d 0a 09 | 66 6c 6f 61 74 20 61 73 |ub_m;...|float as|
|00001c80| 70 65 63 74 3b 0d 0a 09 | 75 6e 73 69 67 6e 65 64 |pect;...|unsigned|
|00001c90| 20 63 6f 6c 6f 72 3b 0d | 0a 5c 6d 61 6e 64 73 63 | color;.|.\mandsc|
|00001ca0| 72 0d 0a 09 54 68 65 20 | 5c 69 74 77 64 20 67 5f |r...The |\itwd g_|
|00001cb0| 65 6c 6c 69 70 73 65 20 | 66 75 6e 63 74 69 6f 6e |ellipse |function|
|00001cc0| 20 64 72 61 77 73 20 61 | 6e 20 65 6c 6c 69 70 73 | draws a|n ellips|
|00001cd0| 65 20 69 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e in the| current|
|00001ce0| 0d 0a 09 64 72 61 77 69 | 6e 67 20 62 75 66 66 65 |...drawi|ng buffe|
|00001cf0| 72 0d 0a 09 77 69 74 68 | 20 63 6f 6c 6f 72 7e 5c |r...with| color~\|
|00001d00| 69 74 77 64 20 63 6f 6c | 6f 72 20 63 65 6e 74 65 |itwd col|or cente|
|00001d10| 72 65 64 20 6f 6e 20 74 | 68 65 20 70 6f 69 6e 74 |red on t|he point|
|00001d20| 7e 5c 69 74 70 6e 74 20 | 28 78 2c 20 79 29 20 77 |~\itpnt |(x, y) w|
|00001d30| 69 74 68 0d 0a 09 73 65 | 6d 69 2d 6d 61 6a 6f 72 |ith...se|mi-major|
|00001d40| 20 61 78 69 73 20 6c 65 | 6e 67 74 68 7e 5c 69 74 | axis le|ngth~\it|
|00001d50| 77 64 20 72 5f 73 75 62 | 5f 6d 20 61 6e 64 20 61 |wd r_sub|_m and a|
|00001d60| 73 70 65 63 74 20 72 61 | 74 69 6f 7e 5c 69 74 6e |spect ra|tio~\itn|
|00001d70| 63 20 61 73 70 65 63 74 | 20 2e 0d 0a 09 54 68 65 |c aspect| ....The|
|00001d80| 20 61 73 70 65 63 74 20 | 72 61 74 69 6f 20 69 73 | aspect |ratio is|
|00001d90| 20 64 65 66 69 6e 65 64 | 20 61 73 20 74 68 65 20 | defined| as the |
|00001da0| 72 61 74 69 6f 20 6f 66 | 20 74 68 65 20 76 65 72 |ratio of| the ver|
|00001db0| 74 69 63 61 6c 20 64 69 | 61 6d 65 74 65 72 0d 0a |tical di|ameter..|
|00001dc0| 09 6f 66 20 74 68 65 20 | 65 6c 6c 69 70 73 65 20 |.of the |ellipse |
|00001dd0| 74 6f 20 69 74 73 20 68 | 6f 72 69 7a 6f 6e 74 61 |to its h|orizonta|
|00001de0| 6c 20 64 69 61 6d 65 74 | 65 72 2c 20 61 6e 64 20 |l diamet|er, and |
|00001df0| 74 68 65 20 73 65 6d 69 | 2d 6d 61 6a 6f 72 0d 0a |the semi|-major..|
|00001e00| 09 61 78 69 73 20 6c 65 | 6e 67 74 68 20 69 73 20 |.axis le|ngth is |
|00001e10| 68 61 6c 66 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |half the| length |
|00001e20| 6f 66 20 74 68 65 20 6c | 61 72 67 65 73 74 20 64 |of the l|argest d|
|00001e30| 69 61 6d 65 74 65 72 20 | 28 77 68 69 63 68 0d 0a |iameter |(which..|
|00001e40| 09 69 73 20 76 65 72 74 | 69 63 61 6c 20 69 66 20 |.is vert|ical if |
|00001e50| 24 20 61 73 70 65 63 74 | 20 3e 20 31 2e 30 20 24 |$ aspect| > 1.0 $|
|00001e60| 20 61 6e 64 20 68 6f 72 | 69 7a 6f 6e 74 61 6c 20 | and hor|izontal |
|00001e70| 69 66 20 24 20 61 73 70 | 65 63 74 20 3c 20 31 2e |if $ asp|ect < 1.|
|00001e80| 30 20 24 29 2e 0d 0a 09 | 49 66 20 78 6f 72 20 6d |0 $)....|If xor m|
|00001e90| 6f 64 65 20 69 73 20 6f | 6e 2c 20 74 68 65 20 65 |ode is o|n, the e|
|00001ea0| 6c 6c 69 70 73 65 20 77 | 69 6c 6c 20 62 65 20 6c |llipse w|ill be l|
|00001eb0| 6f 67 69 63 61 6c 6c 79 | 20 78 6f 72 27 65 64 20 |ogically| xor'ed |
|00001ec0| 77 69 74 68 20 74 68 65 | 0d 0a 09 65 78 69 73 74 |with the|...exist|
|00001ed0| 69 6e 67 20 64 61 74 61 | 20 69 6e 20 74 68 65 20 |ing data| in the |
|00001ee0| 62 75 66 66 65 72 2e 0d | 0a 09 4e 6f 74 65 20 74 |buffer..|..Note t|
|00001ef0| 68 61 74 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |hat this| routine|
|00001f00| 20 63 61 6e 20 6f 6e 6c | 79 20 62 65 20 75 73 65 | can onl|y be use|
|00001f10| 64 20 74 6f 20 64 72 61 | 77 20 65 6c 6c 69 70 73 |d to dra|w ellips|
|00001f20| 65 73 20 74 68 61 74 20 | 68 61 76 65 0d 0a 09 74 |es that |have...t|
|00001f30| 68 65 69 72 20 61 78 65 | 73 20 6f 72 69 65 6e 74 |heir axe|s orient|
|00001f40| 65 64 20 68 6f 72 69 7a | 6f 6e 74 61 6c 6c 79 20 |ed horiz|ontally |
|00001f50| 61 6e 64 20 76 65 72 74 | 69 63 61 6c 6c 79 2e 0d |and vert|ically..|
|00001f60| 0a 5c 6d 61 6e 62 75 67 | 73 0d 0a 09 54 68 65 20 |.\manbug|s...The |
|00001f70| 61 73 70 65 63 74 20 72 | 61 74 69 6f 20 6f 66 20 |aspect r|atio of |
|00001f80| 74 68 65 20 73 63 72 65 | 65 6e 20 69 73 20 6e 6f |the scre|en is no|
|00001f90| 74 20 61 63 63 6f 75 6e | 74 65 64 20 66 6f 72 20 |t accoun|ted for |
|00001fa0| 69 6e 20 74 68 69 73 0d | 0a 09 72 6f 75 74 69 6e |in this.|..routin|
|00001fb0| 65 2e 20 49 66 20 79 6f | 75 20 77 61 6e 74 20 74 |e. If yo|u want t|
|00001fc0| 6f 20 68 61 76 65 20 61 | 6e 20 65 6c 6c 69 70 73 |o have a|n ellips|
|00001fd0| 65 20 64 72 61 77 6e 20 | 69 6e 20 74 68 65 20 73 |e drawn |in the s|
|00001fe0| 61 6d 65 0d 0a 09 73 68 | 61 70 65 20 6f 6e 20 61 |ame...sh|ape on a|
|00001ff0| 6c 6c 20 73 75 70 70 6f | 72 74 65 64 20 64 69 73 |ll suppo|rted dis|
|00002000| 70 6c 61 79 73 2c 20 67 | 65 74 20 74 68 65 20 64 |plays, g|et the d|
|00002010| 69 73 70 6c 61 79 27 73 | 20 61 73 70 65 63 74 0d |isplay's| aspect.|
|00002020| 0a 09 72 61 74 69 6f 20 | 77 69 74 68 20 74 68 65 |..ratio |with the|
|00002030| 20 5c 69 74 77 64 20 67 | 5f 69 6e 66 6f 20 63 61 | \itwd g|_info ca|
|00002040| 6c 6c 20 61 6e 64 20 6d | 75 6c 74 69 70 6c 79 20 |ll and m|ultiply |
|00002050| 79 6f 75 72 20 64 65 73 | 69 72 65 64 0d 0a 09 61 |your des|ired...a|
|00002060| 73 70 65 63 74 20 72 61 | 74 69 6f 20 62 79 20 69 |spect ra|tio by i|
|00002070| 74 20 62 65 66 6f 72 65 | 20 70 61 73 73 69 6e 67 |t before| passing|
|00002080| 20 69 74 20 74 6f 20 5c | 69 74 6e 63 20 67 5f 65 | it to \|itnc g_e|
|00002090| 6c 6c 69 70 73 65 20 2e | 0d 0a 5c 6d 61 6e 73 65 |llipse .|..\manse|
|000020a0| 65 0d 0a 09 67 5f 63 69 | 72 63 6c 65 28 31 29 2c |e...g_ci|rcle(1),|
|000020b0| 20 67 5f 69 6e 66 6f 28 | 31 29 2e 0d 0a 5c 6d 61 | g_info(|1)...\ma|
|000020c0| 6e 70 65 6e 64 0d 0a 0d | 0a 5c 6d 61 6e 70 61 67 |npend...|.\manpag|
|000020d0| 65 20 67 5f 69 6e 66 6f | 0d 0a 0d 0a 5c 6d 61 6e |e g_info|....\man|
|000020e0| 6e 61 6d 65 0d 0a 09 67 | 5f 69 6e 66 6f 20 2d 2d |name...g|_info --|
|000020f0| 2d 20 67 65 74 20 69 6e | 66 6f 72 6d 61 74 69 6f |- get in|formatio|
|00002100| 6e 20 61 62 6f 75 74 20 | 74 68 65 20 67 72 61 70 |n about |the grap|
|00002110| 68 69 63 73 20 64 65 76 | 69 63 65 20 69 6e 20 75 |hics dev|ice in u|
|00002120| 73 65 0d 0a 5c 6d 61 6e | 73 79 6e 0d 0a 09 76 6f |se..\man|syn...vo|
|00002130| 69 64 20 67 5f 69 6e 66 | 6f 28 69 6e 66 6f 29 0d |id g_inf|o(info).|
|00002140| 0a 0d 0a 09 73 74 72 75 | 63 74 20 67 5f 69 6e 66 |....stru|ct g_inf|
|00002150| 6f 20 2a 69 6e 66 6f 3b | 0d 0a 5c 6d 61 6e 64 73 |o *info;|..\mands|
|00002160| 63 72 0d 0a 09 54 68 65 | 20 5c 69 74 77 64 20 67 |cr...The| \itwd g|
|00002170| 5f 69 6e 66 6f 20 66 75 | 6e 63 74 69 6f 6e 20 63 |_info fu|nction c|
|00002180| 6f 70 69 65 73 20 70 61 | 72 61 6d 65 74 65 72 73 |opies pa|rameters|
|00002190| 20 66 6f 72 20 74 68 65 | 20 63 75 72 72 65 6e 74 | for the| current|
|000021a0| 20 6d 6f 64 65 0d 0a 09 | 61 6e 64 20 61 64 61 70 | mode...|and adap|
|000021b0| 74 65 72 0d 0a 09 69 6e | 74 6f 20 74 68 65 20 73 |ter...in|to the s|
|000021c0| 74 72 75 63 74 75 72 65 | 7e 5c 69 74 6e 63 20 69 |tructure|~\itnc i|
|000021d0| 6e 66 6f 20 2e 20 54 68 | 65 20 5c 69 74 77 64 20 |nfo . Th|e \itwd |
|000021e0| 67 5f 69 6e 66 6f 20 73 | 74 72 75 63 74 75 72 65 |g_info s|tructure|
|000021f0| 0d 0a 09 69 73 20 64 65 | 66 69 6e 65 64 20 69 6e |...is de|fined in|
|00002200| 20 74 68 65 20 66 69 6c | 65 20 5c 62 66 77 64 20 | the fil|e \bfwd |
|00002210| 67 72 61 66 2e 68 20 61 | 73 3a 0d 0a 5c 6d 61 6e |graf.h a|s:..\man|
|00002220| 63 6f 64 65 62 65 67 0d | 0a 09 20 20 73 74 72 75 |codebeg.|.. stru|
|00002230| 63 74 20 67 5f 69 6e 66 | 6f 20 7b 0d 0a 09 20 20 |ct g_inf|o {... |
|00002240| 20 20 75 6e 73 69 67 6e | 65 64 20 63 61 72 64 3b | unsign|ed card;|
|00002250| 0d 0a 09 20 20 20 20 75 | 6e 73 69 67 6e 65 64 20 |... u|nsigned |
|00002260| 64 69 73 70 6c 61 79 3b | 0d 0a 09 20 20 20 20 75 |display;|... u|
|00002270| 6e 73 69 67 6e 65 64 20 | 78 73 69 7a 65 2c 20 79 |nsigned |xsize, y|
|00002280| 73 69 7a 65 3b 0d 0a 09 | 20 20 20 20 75 6e 73 69 |size;...| unsi|
|00002290| 67 6e 65 64 20 78 63 68 | 73 69 7a 65 2c 20 79 63 |gned xch|size, yc|
|000022a0| 68 73 69 7a 65 3b 0d 0a | 09 20 20 20 20 75 6e 73 |hsize;..|. uns|
|000022b0| 69 67 6e 65 64 20 63 6f | 6c 6f 72 6d 61 78 3b 0d |igned co|lormax;.|
|000022c0| 0a 09 20 20 20 20 75 6e | 73 69 67 6e 65 64 20 70 |.. un|signed p|
|000022d0| 61 67 65 73 3b 0d 0a 09 | 20 20 20 20 75 6e 73 69 |ages;...| unsi|
|000022e0| 67 6e 65 64 20 63 75 72 | 70 61 67 65 3b 0d 0a 09 |gned cur|page;...|
|000022f0| 20 20 7d 3b 0d 0a 5c 6d | 61 6e 63 6f 64 65 65 6e | };..\m|ancodeen|
|00002300| 64 0d 0a 09 5c 69 74 77 | 64 20 43 61 72 64 20 61 |d...\itw|d Card a|
|00002310| 6e 64 20 5c 69 74 77 64 | 20 64 69 73 70 6c 61 79 |nd \itwd| display|
|00002320| 20 63 6f 6e 74 61 69 6e | 20 74 68 65 20 63 75 72 | contain| the cur|
|00002330| 72 65 6e 74 20 74 79 70 | 65 73 20 6f 66 0d 0a 09 |rent typ|es of...|
|00002340| 74 68 65 20 67 72 61 70 | 68 69 63 73 20 63 61 72 |the grap|hics car|
|00002350| 64 20 61 6e 64 20 74 68 | 65 20 67 72 61 70 68 69 |d and th|e graphi|
|00002360| 63 73 20 64 69 73 70 6c | 61 79 2c 20 72 65 73 70 |cs displ|ay, resp|
|00002370| 65 63 74 69 76 65 6c 79 | 0d 0a 09 28 74 68 65 20 |ectively|...(the |
|00002380| 74 79 70 65 73 20 61 72 | 65 20 64 65 66 69 6e 65 |types ar|e define|
|00002390| 64 20 69 6e 20 5c 62 66 | 77 64 6e 20 67 72 61 66 |d in \bf|wdn graf|
|000023a0| 2e 68 20 29 2e 20 5c 69 | 74 77 64 20 58 73 69 7a |.h ). \i|twd Xsiz|
|000023b0| 65 0d 0a 09 61 6e 64 20 | 5c 69 74 77 64 20 79 73 |e...and |\itwd ys|
|000023c0| 69 7a 65 20 63 6f 6e 74 | 61 69 6e 20 74 68 65 20 |ize cont|ain the |
|000023d0| 58 20 61 6e 64 20 59 20 | 73 69 7a 65 73 20 6f 66 |X and Y |sizes of|
|000023e0| 20 74 68 65 20 64 69 73 | 70 6c 61 79 2c 0d 0a 09 | the dis|play,...|
|000023f0| 5c 69 74 77 64 20 78 63 | 68 73 69 7a 65 20 61 6e |\itwd xc|hsize an|
|00002400| 64 20 5c 69 74 77 64 20 | 79 63 68 73 69 7a 65 20 |d \itwd |ychsize |
|00002410| 63 6f 6e 74 61 69 6e 20 | 74 68 65 20 73 69 7a 65 |contain |the size|
|00002420| 20 6f 66 20 74 68 65 0d | 0a 09 73 63 72 65 65 6e | of the.|..screen|
|00002430| 20 69 6e 20 63 68 61 72 | 61 63 74 65 72 73 2c 20 | in char|acters, |
|00002440| 61 6e 64 0d 0a 09 5c 69 | 74 77 64 20 63 6f 6c 6f |and...\i|twd colo|
|00002450| 72 6d 61 78 20 63 6f 6e | 74 61 69 6e 73 20 74 68 |rmax con|tains th|
|00002460| 65 20 6d 61 78 69 6d 75 | 6d 20 63 6f 6c 6f 72 20 |e maximu|m color |
|00002470| 76 61 6c 75 65 20 28 69 | 2e 65 2e 2c 20 69 66 0d |value (i|.e., if.|
|00002480| 0a 09 74 68 65 72 65 20 | 61 72 65 20 66 6f 75 72 |..there |are four|
|00002490| 20 63 6f 6c 6f 72 73 2c | 20 5c 69 74 77 64 20 63 | colors,| \itwd c|
|000024a0| 6f 6c 6f 72 6d 61 78 20 | 77 69 6c 6c 20 62 65 20 |olormax |will be |
|000024b0| 33 29 2e 20 5c 69 74 77 | 64 20 50 61 67 65 73 0d |3). \itw|d Pages.|
|000024c0| 0a 09 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 6e |..contai|ns the n|
|000024d0| 75 6d 62 65 72 20 6f 66 | 20 64 69 73 70 6c 61 79 |umber of| display|
|000024e0| 61 62 6c 65 20 70 61 67 | 65 73 20 74 68 61 74 20 |able pag|es that |
|000024f0| 74 68 65 20 67 72 61 70 | 68 69 63 73 20 61 64 61 |the grap|hics ada|
|00002500| 70 74 65 72 0d 0a 09 73 | 75 70 70 6f 72 74 73 20 |pter...s|upports |
|00002510| 61 6e 64 20 5c 69 74 77 | 64 20 63 75 72 70 61 67 |and \itw|d curpag|
|00002520| 65 20 63 6f 6e 74 61 69 | 6e 73 20 74 68 65 20 70 |e contai|ns the p|
|00002530| 61 67 65 20 74 68 61 74 | 20 69 73 20 63 75 72 72 |age that| is curr|
|00002540| 65 6e 74 6c 79 0d 0a 09 | 62 65 69 6e 67 20 64 69 |ently...|being di|
|00002550| 73 70 6c 61 79 65 64 2e | 0d 0a 0d 0a 09 5c 69 74 |splayed.|.....\it|
|00002560| 77 64 20 47 5f 69 6e 66 | 6f 20 6d 75 73 74 20 62 |wd G_inf|o must b|
|00002570| 65 20 63 61 6c 6c 65 64 | 20 5c 69 74 77 64 20 61 |e called| \itwd a|
|00002580| 66 74 65 72 20 74 68 65 | 20 64 69 73 70 6c 61 79 |fter the| display|
|00002590| 20 69 73 0d 0a 09 6f 70 | 65 6e 65 64 20 77 69 74 | is...op|ened wit|
|000025a0| 68 20 5c 69 74 6e 63 20 | 67 5f 6f 70 65 6e 20 2e |h \itnc |g_open .|
|000025b0| 0d 0a 5c 6d 61 6e 73 65 | 65 0d 0a 09 67 5f 69 6e |..\manse|e...g_in|
|000025c0| 69 74 28 31 29 2c 20 67 | 5f 6f 70 65 6e 28 31 29 |it(1), g|_open(1)|
|000025d0| 2e 0d 0a 5c 6d 61 6e 70 | 65 6e 64 0d 0a 0d 0a 0d |...\manp|end.....|
|000025e0| 0a 5c 6d 61 6e 6e 61 6d | 65 0d 0a 09 67 5f 69 6e |.\mannam|e...g_in|
|000025f0| 69 74 20 2d 2d 2d 20 69 | 6e 69 74 69 61 6c 69 7a |it --- i|nitializ|
|00002600| 65 20 74 68 65 20 67 72 | 61 70 68 69 63 73 20 6c |e the gr|aphics l|
|00002610| 69 62 72 61 72 79 0d 0a | 5c 6d 61 6e 73 79 6e 0d |ibrary..|\mansyn.|
|00002620| 0a 09 76 6f 69 64 20 67 | 5f 69 6e 69 74 28 63 61 |..void g|_init(ca|
|00002630| 72 64 2c 20 64 69 73 70 | 6c 61 79 29 0d 0a 0d 0a |rd, disp|lay)....|
|00002640| 09 75 6e 73 69 67 6e 65 | 64 20 63 61 72 64 2c 20 |.unsigne|d card, |
|00002650| 64 69 73 70 6c 61 79 3b | 0d 0a 5c 6d 61 6e 64 73 |display;|..\mands|
|00002660| 63 72 0d 0a 09 54 68 65 | 20 5c 69 74 77 64 20 67 |cr...The| \itwd g|
|00002670| 5f 69 6e 69 74 20 66 75 | 6e 63 74 69 6f 6e 20 69 |_init fu|nction i|
|00002680| 6e 69 74 69 61 6c 69 7a | 65 73 20 74 68 65 20 67 |nitializ|es the g|
|00002690| 72 61 70 68 69 63 73 20 | 6c 69 62 72 61 72 79 20 |raphics |library |
|000026a0| 66 6f 72 0d 0a 09 74 68 | 65 20 67 72 61 70 68 69 |for...th|e graphi|
|000026b0| 63 73 20 63 61 72 64 20 | 61 6e 64 20 64 69 73 70 |cs card |and disp|
|000026c0| 6c 61 79 20 69 6e 20 75 | 73 65 2e 20 49 66 20 5c |lay in u|se. If \|
|000026d0| 69 74 77 64 20 67 5f 69 | 6e 69 74 20 69 73 20 63 |itwd g_i|nit is c|
|000026e0| 61 6c 6c 65 64 0d 0a 09 | 77 69 74 68 20 5c 69 74 |alled...|with \it|
|000026f0| 77 64 20 63 61 72 64 20 | 73 65 74 20 74 6f 20 7a |wd card |set to z|
|00002700| 65 72 6f 2c 20 69 74 20 | 77 69 6c 6c 20 61 74 74 |ero, it |will att|
|00002710| 65 6d 70 74 20 74 6f 20 | 64 65 74 65 72 6d 69 6e |empt to |determin|
|00002720| 65 0d 0a 09 77 68 61 74 | 20 67 72 61 70 68 69 63 |e...what| graphic|
|00002730| 73 20 68 61 72 64 77 61 | 72 65 20 69 73 20 61 74 |s hardwa|re is at|
|00002740| 74 61 63 68 65 64 2e 20 | 54 68 65 20 5c 69 74 77 |tached. |The \itw|
|00002750| 64 20 64 69 73 70 6c 61 | 79 20 70 61 72 61 6d 65 |d displa|y parame|
|00002760| 74 65 72 0d 0a 09 69 73 | 20 69 67 6e 6f 72 65 64 |ter...is| ignored|
|00002770| 20 69 6e 20 74 68 69 73 | 20 63 61 73 65 20 61 6e | in this| case an|
|00002780| 64 20 6d 61 79 20 62 65 | 20 6f 6d 69 74 74 65 64 |d may be| omitted|
|00002790| 2e 20 49 66 20 5c 69 74 | 77 64 20 63 61 72 64 20 |. If \it|wd card |
|000027a0| 69 73 0d 0a 09 6f 6e 65 | 20 6f 66 20 74 68 65 20 |is...one| of the |
|000027b0| 28 6e 6f 6e 7a 65 72 6f | 29 20 73 79 6d 62 6f 6c |(nonzero|) symbol|
|000027c0| 69 63 20 63 6f 6e 73 74 | 61 6e 74 73 20 66 6f 72 |ic const|ants for|
|000027d0| 20 67 72 61 70 68 69 63 | 73 20 61 64 61 70 74 65 | graphic|s adapte|
|000027e0| 72 73 0d 0a 09 64 65 66 | 69 6e 65 64 20 69 6e 20 |rs...def|ined in |
|000027f0| 5c 62 66 6e 63 20 67 72 | 61 66 2e 68 20 2c 20 74 |\bfnc gr|af.h , t|
|00002800| 68 65 20 67 72 61 70 68 | 69 63 73 20 6c 69 62 72 |he graph|ics libr|
|00002810| 61 72 79 20 61 73 73 75 | 6d 65 73 20 74 68 61 74 |ary assu|mes that|
|00002820| 0d 0a 09 74 68 61 74 20 | 63 61 72 64 20 69 73 20 |...that |card is |
|00002830| 61 74 74 61 63 68 65 64 | 2e 20 49 6e 20 74 68 69 |attached|. In thi|
|00002840| 73 20 63 61 73 65 2c 20 | 74 68 65 20 70 61 72 61 |s case, |the para|
|00002850| 6d 65 74 65 72 7e 5c 69 | 74 77 64 20 64 69 73 70 |meter~\i|twd disp|
|00002860| 6c 61 79 0d 0a 09 6d 75 | 73 74 20 61 6c 73 6f 20 |lay...mu|st also |
|00002870| 62 65 20 73 70 65 63 69 | 66 69 65 64 20 61 73 20 |be speci|fied as |
|00002880| 6f 6e 65 20 6f 66 20 74 | 68 65 20 73 79 6d 62 6f |one of t|he symbo|
|00002890| 6c 69 63 20 63 6f 6e 73 | 74 61 6e 74 73 20 64 65 |lic cons|tants de|
|000028a0| 66 69 6e 65 64 0d 0a 09 | 69 6e 20 5c 62 66 6e 63 |fined...|in \bfnc|
|000028b0| 20 67 72 61 66 2e 68 20 | 2e 0d 0a 0d 0a 09 54 68 | graf.h |......Th|
|000028c0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 6d 75 73 74 |is funct|ion must|
|000028d0| 20 62 65 20 63 61 6c 6c | 65 64 20 62 65 66 6f 72 | be call|ed befor|
|000028e0| 65 20 61 6e 79 20 6f 74 | 68 65 72 73 2e 0d 0a 5c |e any ot|hers...\|
|000028f0| 6d 61 6e 73 65 65 0d 0a | 09 67 5f 6f 70 65 6e 28 |mansee..|.g_open(|
|00002900| 31 29 2c 20 67 5f 63 6c | 6f 73 65 28 31 29 2c 20 |1), g_cl|ose(1), |
|00002910| 67 5f 69 6e 66 6f 28 31 | 29 2e 0d 0a 5c 6d 61 6e |g_info(1|)...\man|
|00002920| 70 65 6e 64 0d 0a 0d 0a | 5c 6d 61 6e 70 61 67 65 |pend....|\manpage|
|00002930| 20 67 5f 6c 69 6e 65 28 | 31 29 0d 0a 0d 0a 5c 6d | g_line(|1)....\m|
|00002940| 61 6e 6e 61 6d 65 0d 0a | 09 67 5f 6c 69 6e 65 20 |anname..|.g_line |
|00002950| 2d 2d 2d 20 64 72 61 77 | 20 61 20 6c 69 6e 65 0d |--- draw| a line.|
|00002960| 0a 5c 6d 61 6e 73 79 6e | 0d 0a 09 76 6f 69 64 20 |.\mansyn|...void |
|00002970| 67 5f 6c 69 6e 65 28 78 | 31 2c 20 79 31 2c 20 78 |g_line(x|1, y1, x|
|00002980| 32 2c 20 79 32 2c 20 63 | 6f 6c 6f 72 29 0d 0a 0d |2, y2, c|olor)...|
|00002990| 0a 09 69 6e 74 20 78 31 | 2c 20 79 31 2c 20 78 32 |..int x1|, y1, x2|
|000029a0| 2c 20 79 32 3b 0d 0a 09 | 75 6e 73 69 67 6e 65 64 |, y2;...|unsigned|
|000029b0| 20 63 6f 6c 6f 72 3b 0d | 0a 5c 6d 61 6e 64 73 63 | color;.|.\mandsc|
|000029c0| 72 0d 0a 09 54 68 65 20 | 5c 69 74 77 64 20 67 5f |r...The |\itwd g_|
|000029d0| 6c 69 6e 65 20 66 75 6e | 63 74 69 6f 6e 20 64 72 |line fun|ction dr|
|000029e0| 61 77 73 20 61 20 6c 69 | 6e 65 20 69 6e 20 74 68 |aws a li|ne in th|
|000029f0| 65 20 63 75 72 72 65 6e | 74 20 64 72 61 77 69 6e |e curren|t drawin|
|00002a00| 67 0d 0a 09 62 75 66 66 | 65 72 20 77 69 74 68 20 |g...buff|er with |
|00002a10| 63 6f 6c 6f 72 7e 5c 69 | 74 77 64 20 63 6f 6c 6f |color~\i|twd colo|
|00002a20| 72 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 70 6f |r betwee|n the po|
|00002a30| 69 6e 74 73 20 5c 69 74 | 70 6e 74 20 28 78 31 2c |ints \it|pnt (x1,|
|00002a40| 20 79 31 29 0d 0a 09 61 | 6e 64 7e 5c 69 74 70 6e | y1)...a|nd~\itpn|
|00002a50| 74 20 28 78 32 2c 20 79 | 32 29 2e 20 49 66 20 78 |t (x2, y|2). If x|
|00002a60| 6f 72 20 6d 6f 64 65 20 | 69 73 20 6f 6e 2c 20 74 |or mode |is on, t|
|00002a70| 68 65 20 6c 69 6e 65 20 | 69 73 20 6c 6f 67 69 63 |he line |is logic|
|00002a80| 61 6c 6c 79 0d 0a 09 78 | 6f 72 27 65 64 20 77 69 |ally...x|or'ed wi|
|00002a90| 74 68 20 74 68 65 20 65 | 78 69 73 74 69 6e 67 20 |th the e|xisting |
|00002aa0| 64 61 74 61 20 69 6e 20 | 74 68 65 20 62 75 66 66 |data in |the buff|
|00002ab0| 65 72 2e 0d 0a 5c 6d 61 | 6e 73 65 65 0d 0a 09 67 |er...\ma|nsee...g|
|00002ac0| 5f 62 6f 78 28 31 29 2c | 20 67 5f 70 6f 69 6e 74 |_box(1),| g_point|
|00002ad0| 28 31 29 2e 0d 0a 5c 6d | 61 6e 70 65 6e 64 0d 0a |(1)...\m|anpend..|
|00002ae0| 0d 0a 5c 6d 61 6e 70 61 | 67 65 20 67 5f 6f 70 65 |..\manpa|ge g_ope|
|00002af0| 6e 28 31 29 0d 0a 0d 0a | 5c 6d 61 6e 6e 61 6d 65 |n(1)....|\manname|
|00002b00| 0d 0a 09 67 5f 6f 70 65 | 6e 20 2d 2d 2d 20 74 75 |...g_ope|n --- tu|
|00002b10| 72 6e 20 6f 6e 20 67 72 | 61 70 68 69 63 73 20 6d |rn on gr|aphics m|
|00002b20| 6f 64 65 20 61 6e 64 20 | 70 72 65 70 61 72 65 20 |ode and |prepare |
|00002b30| 66 6f 72 20 64 72 61 77 | 69 6e 67 0d 0a 5c 6d 61 |for draw|ing..\ma|
|00002b40| 6e 73 79 6e 0d 0a 09 76 | 6f 69 64 20 67 5f 6f 70 |nsyn...v|oid g_op|
|00002b50| 65 6e 28 6d 6f 64 65 29 | 0d 0a 0d 0a 09 75 6e 73 |en(mode)|.....uns|
|00002b60| 69 67 6e 65 64 20 6d 6f | 64 65 3b 0d 0a 5c 6d 61 |igned mo|de;..\ma|
|00002b70| 6e 64 73 63 72 0d 0a 09 | 54 68 65 20 5c 69 74 77 |ndscr...|The \itw|
|00002b80| 64 20 67 5f 6f 70 65 6e | 20 66 75 6e 63 74 69 6f |d g_open| functio|
|00002b90| 6e 20 73 77 69 74 63 68 | 65 73 20 74 68 65 20 64 |n switch|es the d|
|00002ba0| 69 73 70 6c 61 79 20 74 | 6f 20 61 20 67 72 61 70 |isplay t|o a grap|
|00002bb0| 68 69 63 73 0d 0a 09 6d | 6f 64 65 20 61 6e 64 20 |hics...m|ode and |
|00002bc0| 70 72 65 70 61 72 65 73 | 20 74 68 65 20 67 72 61 |prepares| the gra|
|00002bd0| 70 68 69 63 73 20 72 6f | 75 74 69 6e 65 73 20 66 |phics ro|utines f|
|00002be0| 6f 72 20 64 72 61 77 69 | 6e 67 2e 20 54 68 65 0d |or drawi|ng. The.|
|00002bf0| 0a 09 69 6e 74 65 72 70 | 72 65 74 61 74 69 6f 6e |..interp|retation|
|00002c00| 20 6f 66 20 74 68 65 20 | 5c 69 74 77 64 20 6d 6f | of the |\itwd mo|
|00002c10| 64 65 20 70 61 72 61 6d | 65 74 65 72 20 69 73 20 |de param|eter is |
|00002c20| 64 65 76 69 63 65 2d 64 | 65 70 65 6e 64 65 6e 74 |device-d|ependent|
|00002c30| 2e 0d 0a 09 43 75 72 72 | 65 6e 74 6c 79 2c 20 6f |....Curr|ently, o|
|00002c40| 6e 20 74 68 65 20 43 47 | 41 2c 20 5c 68 62 6f 78 |n the CG|A, \hbox|
|00002c50| 7b 6d 6f 64 65 20 3d 20 | 43 47 41 5f 36 34 30 7d |{mode = |CGA_640}|
|00002c60| 20 69 73 20 74 68 65 20 | 36 34 30 20 62 79 20 32 | is the |640 by 2|
|00002c70| 30 30 0d 0a 09 74 77 6f | 20 63 6f 6c 6f 72 0d 0a |00...two| color..|
|00002c80| 09 6d 6f 64 65 2c 20 61 | 6e 64 20 5c 68 62 6f 78 |.mode, a|nd \hbox|
|00002c90| 7b 6d 6f 64 65 20 3d 20 | 43 47 41 5f 33 32 30 7d |{mode = |CGA_320}|
|00002ca0| 20 69 73 20 74 68 65 20 | 33 32 30 20 62 79 20 32 | is the |320 by 2|
|00002cb0| 30 30 20 66 6f 75 72 20 | 63 6f 6c 6f 72 20 6d 6f |00 four |color mo|
|00002cc0| 64 65 2e 0d 0a 09 54 68 | 65 20 5c 69 74 77 64 20 |de....Th|e \itwd |
|00002cd0| 43 47 41 5f 36 34 30 20 | 61 6e 64 20 5c 69 74 77 |CGA_640 |and \itw|
|00002ce0| 64 20 43 47 41 5f 33 32 | 30 20 63 6f 6e 73 74 61 |d CGA_32|0 consta|
|00002cf0| 6e 74 73 20 61 72 65 20 | 64 65 66 69 6e 65 64 0d |nts are |defined.|
|00002d00| 0a 09 69 6e 20 5c 62 66 | 6e 63 20 67 72 61 66 2e |..in \bf|nc graf.|
|00002d10| 68 20 2e 20 4f 6e 20 74 | 68 65 0d 0a 09 45 47 41 |h . On t|he...EGA|
|00002d20| 2c 20 74 68 65 20 5c 69 | 74 77 64 20 6d 6f 64 65 |, the \i|twd mode|
|00002d30| 20 70 61 72 61 6d 65 74 | 65 72 20 69 73 20 69 67 | paramet|er is ig|
|00002d40| 6e 6f 72 65 64 2c 20 61 | 6e 64 20 74 68 65 20 64 |nored, a|nd the d|
|00002d50| 69 73 70 6c 61 79 0d 0a | 09 69 73 20 6f 70 65 6e |isplay..|.is open|
|00002d60| 65 64 20 69 6e 20 74 68 | 65 20 36 34 30 20 62 79 |ed in th|e 640 by|
|00002d70| 20 33 35 30 20 73 69 78 | 74 65 65 6e 20 63 6f 6c | 350 six|teen col|
|00002d80| 6f 72 20 6d 6f 64 65 20 | 75 73 69 6e 67 20 74 68 |or mode |using th|
|00002d90| 65 0d 0a 09 45 6e 68 61 | 6e 63 65 64 20 43 6f 6c |e...Enha|nced Col|
|00002da0| 6f 72 20 44 69 73 70 6c | 61 79 2c 20 74 68 65 20 |or Displ|ay, the |
|00002db0| 36 34 30 20 62 79 20 32 | 30 30 20 73 69 78 74 65 |640 by 2|00 sixte|
|00002dc0| 65 6e 20 63 6f 6c 6f 72 | 20 6d 6f 64 65 0d 0a 09 |en color| mode...|
|00002dd0| 75 73 69 6e 67 20 74 68 | 65 20 43 6f 6c 6f 72 20 |using th|e Color |
|00002de0| 44 69 73 70 6c 61 79 2c | 20 61 6e 64 20 74 68 65 |Display,| and the|
|00002df0| 20 36 34 30 20 62 79 20 | 33 35 30 20 6d 6f 6e 6f | 640 by |350 mono|
|00002e00| 63 68 72 6f 6d 65 0d 0a | 09 6d 6f 64 65 20 75 73 |chrome..|.mode us|
|00002e10| 69 6e 67 20 74 68 65 20 | 4d 6f 6e 6f 63 68 72 6f |ing the |Monochro|
|00002e20| 6d 65 20 44 69 73 70 6c | 61 79 2e 20 54 6f 20 75 |me Displ|ay. To u|
|00002e30| 73 65 20 61 6e 20 45 47 | 41 20 69 6e 20 61 0d 0a |se an EG|A in a..|
|00002e40| 09 43 47 41 20 6d 6f 64 | 65 2c 20 70 61 73 73 20 |.CGA mod|e, pass |
|00002e50| 43 47 41 20 61 73 20 74 | 68 65 20 5c 69 74 77 64 |CGA as t|he \itwd|
|00002e60| 20 63 61 72 64 20 70 61 | 72 61 6d 65 74 65 72 20 | card pa|rameter |
|00002e70| 74 6f 20 5c 69 74 6e 63 | 20 67 5f 69 6e 69 74 20 |to \itnc| g_init |
|00002e80| 2e 0d 0a 0d 0a 09 42 65 | 73 69 64 65 73 20 73 65 |......Be|sides se|
|00002e90| 74 74 69 6e 67 20 74 68 | 65 20 67 72 61 70 68 69 |tting th|e graphi|
|00002ea0| 63 73 20 6d 6f 64 65 2c | 20 74 68 65 20 5c 69 74 |cs mode,| the \it|
|00002eb0| 77 64 20 67 5f 6f 70 65 | 6e 20 66 75 6e 63 74 69 |wd g_ope|n functi|
|00002ec0| 6f 6e 0d 0a 09 61 6c 73 | 6f 20 63 6c 65 61 72 73 |on...als|o clears|
|00002ed0| 20 74 68 65 20 73 63 72 | 65 65 6e 2c 20 72 65 73 | the scr|een, res|
|00002ee0| 65 74 73 20 74 68 65 20 | 63 6f 6c 6f 72 20 6d 61 |ets the |color ma|
|00002ef0| 70 70 69 6e 67 20 74 6f | 20 74 68 65 20 64 65 66 |pping to| the def|
|00002f00| 61 75 6c 74 2c 0d 0a 09 | 74 75 72 6e 73 20 6f 66 |ault,...|turns of|
|00002f10| 66 20 78 6f 72 20 6d 6f | 64 65 20 61 6e 64 20 73 |f xor mo|de and s|
|00002f20| 63 72 65 65 6e 20 62 75 | 66 66 65 72 69 6e 67 2c |creen bu|ffering,|
|00002f30| 20 61 6e 64 20 72 65 73 | 65 74 73 20 74 68 65 0d | and res|ets the.|
|00002f40| 0a 09 63 6c 69 70 70 69 | 6e 67 20 62 6f 75 6e 64 |..clippi|ng bound|
|00002f50| 61 72 69 65 73 20 74 6f | 20 74 68 65 20 70 68 79 |aries to| the phy|
|00002f60| 73 69 63 61 6c 20 62 6f | 75 6e 64 61 72 69 65 73 |sical bo|undaries|
|00002f70| 20 6f 66 20 74 68 65 20 | 73 63 72 65 65 6e 2e 0d | of the |screen..|
|00002f80| 0a 0d 0a 09 54 68 69 73 | 20 66 75 6e 63 74 69 6f |....This| functio|
|00002f90| 6e 20 6d 75 73 74 20 62 | 65 20 63 61 6c 6c 65 64 |n must b|e called|
|00002fa0| 20 61 66 74 65 72 20 5c | 69 74 6e 63 20 67 5f 69 | after \|itnc g_i|
|00002fb0| 6e 69 74 20 2c 20 61 6e | 64 20 62 65 66 6f 72 65 |nit , an|d before|
|00002fc0| 0d 0a 09 61 6e 79 20 6f | 74 68 65 72 20 67 72 61 |...any o|ther gra|
|00002fd0| 70 68 69 63 73 20 66 75 | 6e 63 74 69 6f 6e 73 2e |phics fu|nctions.|
|00002fe0| 0d 0a 5c 6d 61 6e 73 65 | 65 0d 0a 09 67 5f 69 6e |..\manse|e...g_in|
|00002ff0| 69 74 28 31 29 2c 20 67 | 5f 63 6c 6f 73 65 28 31 |it(1), g|_close(1|
|00003000| 29 2c 20 67 5f 69 6e 66 | 6f 28 31 29 2e 0d 0a 5c |), g_inf|o(1)...\|
|00003010| 6d 61 6e 70 65 6e 64 0d | 0a 0d 0a 5c 6d 61 6e 70 |manpend.|...\manp|
|00003020| 61 67 65 20 67 5f 70 6f | 69 6e 74 28 31 29 0d 0a |age g_po|int(1)..|
|00003030| 0d 0a 5c 6d 61 6e 6e 61 | 6d 65 0d 0a 09 67 5f 70 |..\manna|me...g_p|
|00003040| 6f 69 6e 74 20 2d 2d 2d | 20 70 6c 6f 74 20 61 20 |oint ---| plot a |
|00003050| 70 6f 69 6e 74 0d 0a 5c | 6d 61 6e 73 79 6e 0d 0a |point..\|mansyn..|
|00003060| 09 76 6f 69 64 20 67 5f | 70 6f 69 6e 74 28 78 2c |.void g_|point(x,|
|00003070| 20 79 2c 20 63 6f 6c 6f | 72 29 0d 0a 0d 0a 09 69 | y, colo|r).....i|
|00003080| 6e 74 20 78 2c 20 79 3b | 0d 0a 09 75 6e 73 69 67 |nt x, y;|...unsig|
|00003090| 6e 65 64 20 63 6f 6c 6f | 72 3b 0d 0a 5c 6d 61 6e |ned colo|r;..\man|
|000030a0| 64 73 63 72 0d 0a 09 54 | 68 65 20 5c 69 74 77 64 |dscr...T|he \itwd|
|000030b0| 20 67 5f 70 6f 69 6e 74 | 20 66 75 6e 63 74 69 6f | g_point| functio|
|000030c0| 6e 20 73 65 74 73 20 74 | 68 65 20 70 6f 69 6e 74 |n sets t|he point|
|000030d0| 7e 5c 69 74 70 6e 74 20 | 28 78 2c 20 79 29 20 69 |~\itpnt |(x, y) i|
|000030e0| 6e 20 74 68 65 0d 0a 09 | 63 75 72 72 65 6e 74 20 |n the...|current |
|000030f0| 64 72 61 77 69 6e 67 20 | 62 75 66 66 65 72 20 74 |drawing |buffer t|
|00003100| 6f 20 63 6f 6c 6f 72 7e | 5c 69 74 6e 63 20 63 6f |o color~|\itnc co|
|00003110| 6c 6f 72 20 2e 20 49 66 | 20 78 6f 72 20 6d 6f 64 |lor . If| xor mod|
|00003120| 65 20 69 73 20 6f 6e 2c | 0d 0a 09 74 68 65 20 70 |e is on,|...the p|
|00003130| 6f 69 6e 74 20 69 73 20 | 78 6f 72 27 65 64 20 77 |oint is |xor'ed w|
|00003140| 69 74 68 20 74 68 65 20 | 65 78 69 73 74 69 6e 67 |ith the |existing|
|00003150| 20 64 61 74 61 20 69 6e | 20 74 68 65 20 62 75 66 | data in| the buf|
|00003160| 66 65 72 2e 0d 0a 5c 6d | 61 6e 73 65 65 0d 0a 09 |fer...\m|ansee...|
|00003170| 67 5f 6c 69 6e 65 28 31 | 29 2e 0d 0a 5c 6d 61 6e |g_line(1|)...\man|
|00003180| 70 65 6e 64 0d 0a 0d 0a | 5c 6d 61 6e 70 61 67 65 |pend....|\manpage|
|00003190| 20 67 5f 72 65 67 66 69 | 6c 6c 28 31 29 0d 0a 0d | g_regfi|ll(1)...|
|000031a0| 0a 5c 6d 61 6e 6e 61 6d | 65 0d 0a 09 67 5f 72 65 |.\mannam|e...g_re|
|000031b0| 67 66 69 6c 6c 20 2d 2d | 2d 20 66 69 6c 6c 20 61 |gfill --|- fill a|
|000031c0| 20 72 65 63 74 61 6e 67 | 75 6c 61 72 20 72 65 67 | rectang|ular reg|
|000031d0| 69 6f 6e 20 77 69 74 68 | 20 61 20 63 6f 6c 6f 72 |ion with| a color|
|000031e0| 0d 0a 5c 6d 61 6e 73 79 | 6e 0d 0a 09 76 6f 69 64 |..\mansy|n...void|
|000031f0| 20 67 5f 72 65 67 66 69 | 6c 6c 28 78 31 2c 20 79 | g_regfi|ll(x1, y|
|00003200| 31 2c 20 78 32 2c 20 79 | 32 2c 20 63 6f 6c 6f 72 |1, x2, y|2, color|
|00003210| 29 0d 0a 0d 0a 09 69 6e | 74 20 78 31 2c 20 79 31 |).....in|t x1, y1|
|00003220| 2c 20 78 32 2c 20 79 32 | 3b 0d 0a 09 75 6e 73 69 |, x2, y2|;...unsi|
|00003230| 67 6e 65 64 20 63 6f 6c | 6f 72 3b 0d 0a 5c 6d 61 |gned col|or;..\ma|
|00003240| 6e 64 73 63 72 0d 0a 09 | 54 68 65 20 5c 69 74 77 |ndscr...|The \itw|
|00003250| 64 20 67 5f 72 65 67 66 | 69 6c 6c 20 66 75 6e 63 |d g_regf|ill func|
|00003260| 74 69 6f 6e 20 73 65 74 | 73 20 61 6c 6c 20 74 68 |tion set|s all th|
|00003270| 65 20 70 6f 69 6e 74 73 | 20 69 6e 20 74 68 65 20 |e points| in the |
|00003280| 63 75 72 72 65 6e 74 0d | 0a 09 64 72 61 77 69 6e |current.|..drawin|
|00003290| 67 20 62 75 66 66 65 72 | 20 77 69 74 68 69 6e 20 |g buffer| within |
|000032a0| 74 68 65 20 72 65 63 74 | 61 6e 67 6c 65 20 64 65 |the rect|angle de|
|000032b0| 66 69 6e 65 64 20 62 79 | 20 74 68 65 20 70 6f 69 |fined by| the poi|
|000032c0| 6e 74 73 0d 0a 09 5c 69 | 74 70 6e 74 20 28 78 31 |nts...\i|tpnt (x1|
|000032d0| 2c 20 79 31 29 20 61 6e | 64 20 5c 69 74 70 6e 74 |, y1) an|d \itpnt|
|000032e0| 20 28 78 32 2c 20 79 32 | 29 20 28 61 6e 64 20 77 | (x2, y2|) (and w|
|000032f0| 69 74 68 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |ithin th|e curren|
|00003300| 74 0d 0a 09 63 6c 69 70 | 70 69 6e 67 20 62 6f 75 |t...clip|ping bou|
|00003310| 6e 64 61 72 79 29 20 74 | 6f 20 63 6f 6c 6f 72 7e |ndary) t|o color~|
|00003320| 5c 69 74 6e 63 20 63 6f | 6c 6f 72 20 2e 0d 0a 5c |\itnc co|lor ...\|
|00003330| 6d 61 6e 62 75 67 73 0d | 0a 09 44 6f 65 73 6e 27 |manbugs.|..Doesn'|
|00003340| 74 20 73 75 70 70 6f 72 | 74 20 78 6f 72 20 6d 6f |t suppor|t xor mo|
|00003350| 64 65 0d 0a 5c 6d 61 6e | 73 65 65 0d 0a 09 67 5f |de..\man|see...g_|
|00003360| 63 6c 65 61 72 28 31 29 | 2e 0d 0a 5c 6d 61 6e 70 |clear(1)|...\manp|
|00003370| 65 6e 64 0d 0a 0d 0a 5c | 6d 61 6e 70 61 67 65 20 |end....\|manpage |
|00003380| 67 5f 73 65 74 62 61 63 | 6b 28 31 29 0d 0a 0d 0a |g_setbac|k(1)....|
|00003390| 5c 6d 61 6e 6e 61 6d 65 | 0d 0a 09 67 5f 73 65 74 |\manname|...g_set|
|000033a0| 62 61 63 6b 20 2d 2d 2d | 20 73 65 74 20 74 68 65 |back ---| set the|
|000033b0| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 63 6f 6c 6f | backgro|und colo|
|000033c0| 72 0d 0a 5c 6d 61 6e 73 | 79 6e 0d 0a 09 76 6f 69 |r..\mans|yn...voi|
|000033d0| 64 20 67 5f 73 65 74 62 | 61 63 6b 28 63 6f 6c 6f |d g_setb|ack(colo|
|000033e0| 72 29 0d 0a 0d 0a 09 75 | 6e 73 69 67 6e 65 64 20 |r).....u|nsigned |
|000033f0| 63 6f 6c 6f 72 3b 0d 0a | 5c 6d 61 6e 64 73 63 72 |color;..|\mandscr|
|00003400| 0d 0a 09 54 68 65 20 5c | 69 74 77 64 20 67 5f 73 |...The \|itwd g_s|
|00003410| 65 74 62 61 63 6b 20 66 | 75 6e 63 74 69 6f 6e 20 |etback f|unction |
|00003420| 63 68 61 6e 67 65 73 20 | 74 68 65 20 63 6f 6c 6f |changes |the colo|
|00003430| 72 0d 0a 09 64 69 73 70 | 6c 61 79 65 64 20 66 6f |r...disp|layed fo|
|00003440| 72 20 74 68 65 20 62 61 | 63 6b 67 72 6f 75 6e 64 |r the ba|ckground|
|00003450| 20 63 6f 6c 6f 72 20 76 | 61 6c 75 65 20 28 30 29 | color v|alue (0)|
|00003460| 2e 20 0d 0a 0d 0a 09 54 | 68 65 20 61 63 74 75 61 |. .....T|he actua|
|00003470| 6c 20 66 75 6e 63 74 69 | 6f 6e 69 6e 67 20 6f 66 |l functi|oning of|
|00003480| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 64 65 | this ro|utine de|
|00003490| 70 65 6e 64 73 20 6f 6e | 20 74 68 65 0d 0a 09 67 |pends on| the...g|
|000034a0| 72 61 70 68 69 63 73 20 | 6d 6f 64 65 20 61 73 20 |raphics |mode as |
|000034b0| 66 6f 6c 6c 6f 77 73 3a | 0d 0a 0d 0a 5c 6d 61 6e |follows:|....\man|
|000034c0| 68 65 61 64 20 43 47 41 | 20 36 34 30 20 62 79 20 |head CGA| 640 by |
|000034d0| 32 30 30 20 74 77 6f 20 | 63 6f 6c 6f 72 20 6d 6f |200 two |color mo|
|000034e0| 64 65 5c 70 61 72 0d 0a | 0d 0a 09 54 68 65 20 5c |de\par..|...The \|
|000034f0| 69 74 77 64 20 67 5f 73 | 65 74 62 61 63 6b 20 66 |itwd g_s|etback f|
|00003500| 75 6e 63 74 69 6f 6e 0d | 0a 09 64 6f 65 73 20 6e |unction.|..does n|
|00003510| 6f 74 20 77 6f 72 6b 20 | 69 6e 20 74 68 69 73 20 |ot work |in this |
|00003520| 6d 6f 64 65 2e 0d 0a 0d | 0a 5c 6d 61 6e 68 65 61 |mode....|.\manhea|
|00003530| 64 20 43 47 41 20 33 32 | 30 20 62 79 20 32 30 30 |d CGA 32|0 by 200|
|00003540| 20 66 6f 75 72 20 63 6f | 6c 6f 72 20 6d 6f 64 65 | four co|lor mode|
|00003550| 5c 70 61 72 0d 0a 0d 0a | 09 54 68 65 20 5c 69 74 |\par....|.The \it|
|00003560| 77 64 20 63 6f 6c 6f 72 | 20 70 61 72 61 6d 65 74 |wd color| paramet|
|00003570| 65 72 20 73 68 6f 75 6c | 64 0d 0a 09 62 65 20 74 |er shoul|d...be t|
|00003580| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 0d 0a 09 6f |he value| of ...o|
|00003590| 6e 65 20 6f 66 20 74 68 | 65 20 63 6f 6c 6f 72 73 |ne of th|e colors|
|000035a0| 20 6c 69 73 74 65 64 20 | 69 6e 20 74 68 65 20 43 | listed |in the C|
|000035b0| 47 41 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 63 6f |GA backg|round co|
|000035c0| 6c 6f 72 20 74 61 62 6c | 65 0d 0a 09 6f 6e 20 74 |lor tabl|e...on t|
|000035d0| 68 65 20 60 60 63 6f 6c | 6f 72 73 28 31 29 27 27 |he ``col|ors(1)''|
|000035e0| 20 6d 61 6e 75 61 6c 20 | 70 61 67 65 2e 0d 0a 0d | manual |page....|
|000035f0| 0a 5c 6d 61 6e 68 65 61 | 64 20 45 47 41 20 73 69 |.\manhea|d EGA si|
|00003600| 78 74 65 65 6e 20 63 6f | 6c 6f 72 20 6d 6f 64 65 |xteen co|lor mode|
|00003610| 5c 70 61 72 0d 0a 0d 0a | 09 54 68 65 20 5c 69 74 |\par....|.The \it|
|00003620| 77 64 20 63 6f 6c 6f 72 | 20 70 61 72 61 6d 65 74 |wd color| paramet|
|00003630| 65 72 20 69 73 20 61 20 | 73 69 78 2d 62 69 74 20 |er is a |six-bit |
|00003640| 63 6f 6c 6f 72 20 76 61 | 6c 75 65 0d 0a 09 61 73 |color va|lue...as|
|00003650| 20 64 69 73 63 75 73 73 | 65 64 20 6f 6e 20 74 68 | discuss|ed on th|
|00003660| 65 20 45 47 41 20 73 65 | 63 74 69 6f 6e 20 69 6e |e EGA se|ction in|
|00003670| 20 74 68 65 20 60 60 63 | 6f 6c 6f 72 73 28 31 29 | the ``c|olors(1)|
|00003680| 27 27 20 6d 61 6e 75 61 | 6c 20 70 61 67 65 2e 0d |'' manua|l page..|
|00003690| 0a 5c 6d 61 6e 62 75 67 | 73 0d 0a 09 44 6f 65 73 |.\manbug|s...Does|
|000036a0| 6e 27 74 20 77 6f 72 6b | 20 69 6e 20 74 68 65 20 |n't work| in the |
|000036b0| 43 47 41 20 74 77 6f 20 | 63 6f 6c 6f 72 20 6d 6f |CGA two |color mo|
|000036c0| 64 65 2e 0d 0a 5c 6d 61 | 6e 73 65 65 0d 0a 09 69 |de...\ma|nsee...i|
|000036d0| 6e 74 72 6f 28 31 29 2c | 20 63 6f 6c 6f 72 73 28 |ntro(1),| colors(|
|000036e0| 31 29 2c 20 67 5f 73 65 | 74 70 61 6c 28 31 29 2e |1), g_se|tpal(1).|
|000036f0| 0d 0a 5c 6d 61 6e 70 65 | 6e 64 0d 0a 0d 0a 5c 6d |..\manpe|nd....\m|
|00003700| 61 6e 70 61 67 65 20 67 | 5f 73 65 74 62 75 66 28 |anpage g|_setbuf(|
|00003710| 31 29 0d 0a 0d 0a 5c 6d | 61 6e 6e 61 6d 65 0d 0a |1)....\m|anname..|
|00003720| 09 67 5f 73 65 74 62 75 | 66 20 2d 2d 2d 20 74 75 |.g_setbu|f --- tu|
|00003730| 72 6e 20 6f 6e 20 73 63 | 72 65 65 6e 20 62 75 66 |rn on sc|reen buf|
|00003740| 66 65 72 69 6e 67 0d 0a | 5c 6d 61 6e 73 79 6e 0d |fering..|\mansyn.|
|00003750| 0a 09 76 6f 69 64 20 67 | 5f 73 65 74 62 75 66 28 |..void g|_setbuf(|
|00003760| 66 6c 61 67 29 0d 0a 0d | 0a 09 75 6e 73 69 67 6e |flag)...|..unsign|
|00003770| 65 64 20 66 6c 61 67 3b | 0d 0a 5c 6d 61 6e 64 73 |ed flag;|..\mands|
|00003780| 63 72 0d 0a 09 54 68 65 | 20 5c 69 74 77 64 20 67 |cr...The| \itwd g|
|00003790| 5f 73 65 74 62 75 66 20 | 66 75 6e 63 74 69 6f 6e |_setbuf |function|
|000037a0| 20 74 75 72 6e 73 20 73 | 63 72 65 65 6e 20 62 75 | turns s|creen bu|
|000037b0| 66 66 65 72 69 6e 67 20 | 6f 6e 2c 20 69 66 0d 0a |ffering |on, if..|
|000037c0| 09 5c 69 74 77 64 20 66 | 6c 61 67 20 69 73 20 6e |.\itwd f|lag is n|
|000037d0| 6f 6e 7a 65 72 6f 2c 20 | 6f 72 20 6f 66 66 20 69 |onzero, |or off i|
|000037e0| 66 20 5c 69 74 77 64 20 | 66 6c 61 67 20 69 73 20 |f \itwd |flag is |
|000037f0| 7a 65 72 6f 2e 0d 0a 09 | 57 68 65 6e 20 73 63 72 |zero....|When scr|
|00003800| 65 65 6e 20 62 75 66 66 | 65 72 69 6e 67 20 69 73 |een buff|ering is|
|00003810| 20 6f 6e 2c 20 64 72 61 | 77 69 6e 67 20 74 61 6b | on, dra|wing tak|
|00003820| 65 73 20 70 6c 61 63 65 | 20 69 6e 0d 0a 09 61 6e |es place| in...an|
|00003830| 20 6f 66 66 2d 73 63 72 | 65 65 6e 20 62 75 66 66 | off-scr|een buff|
|00003840| 65 72 2c 20 69 6e 73 74 | 65 61 64 20 6f 66 20 69 |er, inst|ead of i|
|00003850| 6e 20 74 68 65 20 62 75 | 66 66 65 72 20 74 68 61 |n the bu|ffer tha|
|00003860| 74 20 69 73 20 63 75 72 | 72 65 6e 74 6c 79 0d 0a |t is cur|rently..|
|00003870| 09 62 65 69 6e 67 20 64 | 69 73 70 6c 61 79 65 64 |.being d|isplayed|
|00003880| 2e 20 54 68 69 73 20 6f | 66 66 2d 73 63 72 65 65 |. This o|ff-scree|
|00003890| 6e 20 62 75 66 66 65 72 | 20 63 61 6e 20 74 68 65 |n buffer| can the|
|000038a0| 6e 20 62 65 20 6d 61 64 | 65 0d 0a 09 76 69 73 69 |n be mad|e...visi|
|000038b0| 62 6c 65 20 61 6c 6d 6f | 73 74 20 69 6e 73 74 61 |ble almo|st insta|
|000038c0| 6e 74 61 6e 65 6f 75 73 | 6c 79 20 77 69 74 68 20 |ntaneous|ly with |
|000038d0| 74 68 65 20 5c 69 74 77 | 64 20 67 5f 73 68 6f 77 |the \itw|d g_show|
|000038e0| 20 66 75 6e 63 74 69 6f | 6e 2e 0d 0a 09 54 68 69 | functio|n....Thi|
|000038f0| 73 20 63 61 6e 20 62 65 | 20 61 20 67 72 65 61 74 |s can be| a great|
|00003900| 20 68 65 6c 70 20 69 6e | 20 61 63 68 69 65 76 69 | help in| achievi|
|00003910| 6e 67 20 73 6d 6f 6f 74 | 68 20 61 6e 69 6d 61 74 |ng smoot|h animat|
|00003920| 69 6f 6e 0d 0a 09 61 6e | 64 20 6f 74 68 65 72 20 |ion...an|d other |
|00003930| 65 66 66 65 63 74 73 2e | 0d 0a 0d 0a 09 54 68 65 |effects.|.....The|
|00003940| 72 65 20 69 73 2c 20 68 | 6f 77 65 76 65 72 2c 20 |re is, h|owever, |
|00003950| 6f 6e 65 20 69 6d 70 6f | 72 74 61 6e 74 20 63 6f |one impo|rtant co|
|00003960| 6e 73 69 64 65 72 61 74 | 69 6f 6e 20 74 6f 20 6b |nsiderat|ion to k|
|00003970| 65 65 70 20 69 6e 0d 0a | 09 6d 69 6e 64 2e 20 46 |eep in..|.mind. F|
|00003980| 6f 72 20 65 66 66 65 63 | 69 65 6e 63 79 20 72 65 |or effec|iency re|
|00003990| 61 73 6f 6e 73 2c 20 74 | 68 65 20 5c 69 74 77 64 |asons, t|he \itwd|
|000039a0| 20 67 5f 73 68 6f 77 20 | 66 75 6e 63 74 69 6f 6e | g_show |function|
|000039b0| 0d 0a 09 69 73 20 69 6d | 70 6c 65 6d 65 6e 74 65 |...is im|plemente|
|000039c0| 64 20 64 69 66 66 65 72 | 65 6e 74 6c 79 20 6f 6e |d differ|ently on|
|000039d0| 0d 0a 09 64 69 66 66 65 | 72 65 6e 74 20 67 72 61 |...diffe|rent gra|
|000039e0| 70 68 69 63 73 20 64 65 | 76 69 63 65 73 2e 20 4f |phics de|vices. O|
|000039f0| 6e 20 74 68 65 20 43 47 | 41 2c 20 74 68 65 20 64 |n the CG|A, the d|
|00003a00| 72 61 77 69 6e 67 20 69 | 73 0d 0a 09 64 6f 6e 65 |rawing i|s...done|
|00003a10| 20 69 6e 20 61 20 73 69 | 6e 67 6c 65 20 6f 66 66 | in a si|ngle off|
|00003a20| 2d 73 63 72 65 65 6e 20 | 62 75 66 66 65 72 20 77 |-screen |buffer w|
|00003a30| 68 69 63 68 20 69 73 20 | 74 68 65 6e 20 63 6f 70 |hich is |then cop|
|00003a40| 69 65 64 0d 0a 09 74 6f | 20 74 68 65 20 70 68 79 |ied...to| the phy|
|00003a50| 73 69 63 61 6c 20 73 63 | 72 65 65 6e 20 62 75 66 |sical sc|reen buf|
|00003a60| 66 65 72 20 77 68 65 6e | 20 5c 69 74 77 64 20 67 |fer when| \itwd g|
|00003a70| 5f 73 68 6f 77 20 69 73 | 0d 0a 09 63 61 6c 6c 65 |_show is|...calle|
|00003a80| 64 2e 20 4f 6e 20 74 68 | 65 20 45 47 41 2c 20 77 |d. On th|e EGA, w|
|00003a90| 68 69 63 68 20 68 61 73 | 20 74 77 6f 20 64 69 73 |hich has| two dis|
|00003aa0| 70 6c 61 79 20 70 61 67 | 65 73 2c 20 64 72 61 77 |play pag|es, draw|
|00003ab0| 69 6e 67 0d 0a 09 69 73 | 20 64 6f 6e 65 20 69 6e |ing...is| done in|
|00003ac0| 20 74 68 65 20 70 61 67 | 65 20 74 68 61 74 20 69 | the pag|e that i|
|00003ad0| 73 20 6e 6f 74 20 76 69 | 73 69 62 6c 65 20 61 6e |s not vi|sible an|
|00003ae0| 64 20 74 68 65 20 70 61 | 67 65 73 20 61 72 65 0d |d the pa|ges are.|
|00003af0| 0a 09 73 77 61 70 70 65 | 64 20 77 68 65 6e 20 5c |..swappe|d when \|
|00003b00| 69 74 77 64 20 67 5f 73 | 68 6f 77 20 69 73 20 63 |itwd g_s|how is c|
|00003b10| 61 6c 6c 65 64 2e 20 54 | 68 69 73 20 6d 65 61 6e |alled. T|his mean|
|00003b20| 73 20 74 68 61 74 0d 0a | 09 69 6d 6d 65 64 69 61 |s that..|.immedia|
|00003b30| 74 65 6c 79 20 61 66 74 | 65 72 20 63 61 6c 6c 69 |tely aft|er calli|
|00003b40| 6e 67 20 5c 69 74 77 64 | 20 67 5f 73 68 6f 77 20 |ng \itwd| g_show |
|00003b50| 6f 6e 20 61 20 43 47 41 | 2c 0d 0a 09 74 68 65 20 |on a CGA|,...the |
|00003b60| 64 72 61 77 69 6e 67 20 | 62 75 66 66 65 72 20 63 |drawing |buffer c|
|00003b70| 6f 6e 74 61 69 6e 73 20 | 61 20 63 6f 70 79 20 6f |ontains |a copy o|
|00003b80| 66 20 74 68 65 20 69 6d | 61 67 65 0d 0a 09 62 65 |f the im|age...be|
|00003b90| 69 6e 67 20 73 68 6f 77 | 6e 20 6f 6e 20 74 68 65 |ing show|n on the|
|00003ba0| 20 64 69 73 70 6c 61 79 | 2e 20 42 75 74 0d 0a 09 | display|. But...|
|00003bb0| 69 6d 6d 65 64 69 61 74 | 65 6c 79 20 61 66 74 65 |immediat|ely afte|
|00003bc0| 72 20 63 61 6c 6c 69 6e | 67 20 69 74 20 6f 6e 20 |r callin|g it on |
|00003bd0| 61 6e 20 45 47 41 2c 0d | 0a 09 74 68 65 20 64 72 |an EGA,.|..the dr|
|00003be0| 61 77 69 6e 67 20 62 75 | 66 66 65 72 20 63 6f 6e |awing bu|ffer con|
|00003bf0| 74 61 69 6e 73 20 74 68 | 65 20 69 6d 61 67 65 20 |tains th|e image |
|00003c00| 74 68 61 74 20 77 61 73 | 20 76 69 73 69 62 6c 65 |that was| visible|
|00003c10| 0d 0a 09 6a 75 73 74 20 | 5c 69 74 6e 63 73 20 62 |...just |\itncs b|
|00003c20| 65 66 6f 72 65 20 69 74 | 20 77 61 73 20 63 61 6c |efore it| was cal|
|00003c30| 6c 65 64 2e 20 54 68 69 | 73 20 64 69 66 66 69 63 |led. Thi|s diffic|
|00003c40| 75 6c 74 79 0d 0a 09 63 | 61 6e 20 62 65 20 61 76 |ulty...c|an be av|
|00003c50| 6f 69 64 65 64 20 62 79 | 20 74 68 65 20 73 69 6d |oided by| the sim|
|00003c60| 70 6c 65 20 65 78 70 65 | 64 69 65 6e 74 20 6f 66 |ple expe|dient of|
|00003c70| 20 65 72 61 73 69 6e 67 | 20 74 68 65 0d 0a 09 61 | erasing| the...a|
|00003c80| 63 74 69 76 65 20 61 72 | 65 61 20 6f 66 20 74 68 |ctive ar|ea of th|
|00003c90| 65 20 64 72 61 77 69 6e | 67 20 62 75 66 66 65 72 |e drawin|g buffer|
|00003ca0| 20 69 6d 6d 65 64 69 61 | 74 65 6c 79 20 61 66 74 | immedia|tely aft|
|00003cb0| 65 72 0d 0a 09 65 76 65 | 72 79 20 63 61 6c 6c 20 |er...eve|ry call |
|00003cc0| 74 6f 20 5c 69 74 6e 63 | 20 67 5f 73 68 6f 77 20 |to \itnc| g_show |
|00003cd0| 2e 0d 0a 5c 6d 61 6e 73 | 65 65 0d 0a 09 67 5f 73 |...\mans|ee...g_s|
|00003ce0| 68 6f 77 28 31 29 2e 0d | 0a 5c 6d 61 6e 70 65 6e |how(1)..|.\manpen|
|00003cf0| 64 0d 0a 0d 0a 5c 6d 61 | 6e 70 61 67 65 20 67 5f |d....\ma|npage g_|
|00003d00| 73 65 74 63 6c 69 70 28 | 31 29 0d 0a 0d 0a 5c 6d |setclip(|1)....\m|
|00003d10| 61 6e 6e 61 6d 65 0d 0a | 09 67 5f 73 65 74 63 6c |anname..|.g_setcl|
|00003d20| 69 70 20 2d 2d 2d 20 73 | 65 74 20 74 68 65 20 63 |ip --- s|et the c|
|00003d30| 6c 69 70 70 69 6e 67 20 | 62 6f 75 6e 64 61 72 69 |lipping |boundari|
|00003d40| 65 73 0d 0a 5c 6d 61 6e | 73 79 6e 0d 0a 09 76 6f |es..\man|syn...vo|
|00003d50| 69 64 20 67 5f 73 65 74 | 63 6c 69 70 28 78 31 2c |id g_set|clip(x1,|
|00003d60| 20 79 31 2c 20 78 32 2c | 20 79 32 29 0d 0a 0d 0a | y1, x2,| y2)....|
|00003d70| 09 69 6e 74 20 78 31 2c | 20 79 31 2c 20 78 32 2c |.int x1,| y1, x2,|
|00003d80| 20 79 32 3b 0d 0a 5c 6d | 61 6e 64 73 63 72 0d 0a | y2;..\m|andscr..|
|00003d90| 09 54 68 65 20 5c 69 74 | 77 64 20 67 5f 73 65 74 |.The \it|wd g_set|
|00003da0| 63 6c 69 70 20 66 75 6e | 63 74 69 6f 6e 20 72 65 |clip fun|ction re|
|00003db0| 73 74 72 69 63 74 73 20 | 64 72 61 77 69 6e 67 0d |stricts |drawing.|
|00003dc0| 0a 09 74 6f 20 74 68 65 | 20 72 65 63 74 61 6e 67 |..to the| rectang|
|00003dd0| 75 6c 61 72 20 61 72 65 | 61 20 64 65 66 69 6e 65 |ular are|a define|
|00003de0| 64 20 62 79 20 74 68 65 | 20 70 6f 69 6e 74 73 0d |d by the| points.|
|00003df0| 0a 09 5c 69 74 70 6e 74 | 20 28 78 31 2c 20 79 31 |..\itpnt| (x1, y1|
|00003e00| 29 20 61 6e 64 20 5c 69 | 74 70 6e 74 20 28 78 32 |) and \i|tpnt (x2|
|00003e10| 2c 20 79 32 29 2e 20 50 | 6f 69 6e 74 73 20 74 68 |, y2). P|oints th|
|00003e20| 61 74 20 6c 69 65 20 6f | 75 74 73 69 64 65 0d 0a |at lie o|utside..|
|00003e30| 09 74 68 69 73 20 72 65 | 63 74 61 6e 67 6c 65 20 |.this re|ctangle |
|00003e40| 28 74 68 65 20 60 60 63 | 6c 69 70 70 69 6e 67 20 |(the ``c|lipping |
|00003e50| 62 6f 75 6e 64 61 72 69 | 65 73 27 27 29 20 77 69 |boundari|es'') wi|
|00003e60| 6c 6c 20 62 65 20 70 72 | 6f 74 65 63 74 65 64 0d |ll be pr|otected.|
|00003e70| 0a 09 66 72 6f 6d 20 63 | 68 61 6e 67 65 20 62 79 |..from c|hange by|
|00003e80| 20 61 6e 79 20 74 68 65 | 20 72 6f 75 74 69 6e 65 | any the| routine|
|00003e90| 73 20 74 68 61 74 20 72 | 65 73 70 65 63 74 20 74 |s that r|espect t|
|00003ea0| 68 65 20 63 6c 69 70 70 | 69 6e 67 20 62 6f 75 6e |he clipp|ing boun|
|00003eb0| 64 61 72 69 65 73 2e 0d | 0a 09 54 68 65 20 63 6c |daries..|..The cl|
|00003ec0| 69 70 70 69 6e 67 20 62 | 6f 75 6e 64 61 72 69 65 |ipping b|oundarie|
|00003ed0| 73 0d 0a 09 63 61 6e 6e | 6f 74 20 62 65 20 73 65 |s...cann|ot be se|
|00003ee0| 74 20 6f 75 74 73 69 64 | 65 20 6f 66 20 74 68 65 |t outsid|e of the|
|00003ef0| 20 70 68 79 73 69 63 61 | 6c 20 73 63 72 65 65 6e | physica|l screen|
|00003f00| 2e 20 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 73 0d |. The fu|nctions.|
|00003f10| 0a 09 77 68 69 63 68 20 | 72 65 73 70 65 63 74 20 |..which |respect |
|00003f20| 74 68 65 20 63 6c 69 70 | 70 69 6e 67 20 62 6f 75 |the clip|ping bou|
|00003f30| 6e 64 61 72 69 65 73 20 | 61 72 65 20 7b 5c 69 74 |ndaries |are {\it|
|00003f40| 20 67 5f 62 6f 78 2c 0d | 0a 09 67 5f 63 69 72 63 | g_box,.|..g_circ|
|00003f50| 6c 65 2c 20 67 5f 63 6c | 65 61 72 2c 20 67 5f 65 |le, g_cl|ear, g_e|
|00003f60| 6c 6c 69 70 73 65 2c 20 | 67 5f 6c 69 6e 65 2c 20 |llipse, |g_line, |
|00003f70| 67 5f 70 6f 69 6e 74 2c | 20 7d 20 61 6e 64 0d 0a |g_point,| } and..|
|00003f80| 09 5c 69 74 6e 63 20 67 | 5f 72 65 67 66 69 6c 6c |.\itnc g|_regfill|
|00003f90| 20 2e 0d 0a 5c 6d 61 6e | 70 65 6e 64 0d 0a 0d 0a | ...\man|pend....|
|00003fa0| 5c 6d 61 6e 70 61 67 65 | 20 67 5f 73 65 74 70 61 |\manpage| g_setpa|
|00003fb0| 6c 28 31 29 0d 0a 0d 0a | 5c 6d 61 6e 6e 61 6d 65 |l(1)....|\manname|
|00003fc0| 0d 0a 09 67 5f 73 65 74 | 70 61 6c 20 2d 2d 2d 20 |...g_set|pal --- |
|00003fd0| 63 68 61 6e 67 65 20 74 | 68 65 20 63 6f 6c 6f 72 |change t|he color|
|00003fe0| 20 6d 61 70 70 69 6e 67 | 0d 0a 5c 6d 61 6e 73 79 | mapping|..\mansy|
|00003ff0| 6e 0d 0a 09 76 6f 69 64 | 20 67 5f 73 65 74 70 61 |n...void| g_setpa|
|00004000| 6c 28 70 61 6c 65 74 74 | 65 2c 20 76 61 6c 75 65 |l(palett|e, value|
|00004010| 29 0d 0a 0d 0a 09 75 6e | 73 69 67 6e 65 64 20 70 |).....un|signed p|
|00004020| 61 6c 65 74 74 65 2c 20 | 76 61 6c 75 65 3b 0d 0a |alette, |value;..|
|00004030| 5c 6d 61 6e 64 73 63 72 | 0d 0a 09 54 68 65 20 5c |\mandscr|...The \|
|00004040| 69 74 77 64 20 67 5f 73 | 65 74 70 61 6c 20 66 75 |itwd g_s|etpal fu|
|00004050| 6e 63 74 69 6f 6e 20 61 | 6c 6c 6f 77 73 20 6f 6e |nction a|llows on|
|00004060| 65 20 74 6f 20 63 68 61 | 6e 67 65 20 74 68 65 20 |e to cha|nge the |
|00004070| 6d 61 70 70 69 6e 67 0d | 0a 09 62 65 74 77 65 65 |mapping.|..betwee|
|00004080| 6e 20 74 68 65 20 66 6f | 72 65 67 72 6f 75 6e 64 |n the fo|reground|
|00004090| 20 63 6f 6c 6f 72 20 76 | 61 6c 75 65 73 20 70 61 | color v|alues pa|
|000040a0| 73 73 65 64 20 74 6f 20 | 74 68 65 20 67 72 61 70 |ssed to |the grap|
|000040b0| 68 69 63 73 0d 0a 09 72 | 6f 75 74 69 6e 65 73 20 |hics...r|outines |
|000040c0| 61 6e 64 20 74 68 65 20 | 76 69 73 69 62 6c 65 20 |and the |visible |
|000040d0| 63 6f 6c 6f 72 73 20 61 | 63 74 75 61 6c 6c 79 20 |colors a|ctually |
|000040e0| 64 69 73 70 6c 61 79 65 | 64 2e 0d 0a 0d 0a 09 54 |displaye|d......T|
|000040f0| 68 65 20 61 63 74 75 61 | 6c 20 66 75 6e 63 74 69 |he actua|l functi|
|00004100| 6f 6e 69 6e 67 20 6f 66 | 20 74 68 69 73 20 72 6f |oning of| this ro|
|00004110| 75 74 69 6e 65 20 64 65 | 70 65 6e 64 73 20 6f 6e |utine de|pends on|
|00004120| 20 74 68 65 20 67 72 61 | 70 68 69 63 73 0d 0a 09 | the gra|phics...|
|00004130| 6d 6f 64 65 20 69 6e 20 | 75 73 65 20 61 73 20 66 |mode in |use as f|
|00004140| 6f 6c 6c 6f 77 73 3a 0d | 0a 0d 0a 5c 6d 61 6e 68 |ollows:.|...\manh|
|00004150| 65 61 64 20 43 47 41 20 | 36 34 30 20 62 79 20 32 |ead CGA |640 by 2|
|00004160| 30 30 20 74 77 6f 20 63 | 6f 6c 6f 72 20 6d 6f 64 |00 two c|olor mod|
|00004170| 65 5c 70 61 72 0d 0a 0d | 0a 09 54 68 65 20 5c 69 |e\par...|..The \i|
|00004180| 74 77 64 20 67 5f 73 65 | 74 70 61 6c 20 66 75 6e |twd g_se|tpal fun|
|00004190| 63 74 69 6f 6e 0d 0a 09 | 63 68 61 6e 67 65 73 20 |ction...|changes |
|000041a0| 74 68 65 20 20 63 6f 6c | 6f 72 20 6f 66 20 74 68 |the col|or of th|
|000041b0| 65 20 66 6f 72 65 67 72 | 6f 75 6e 64 20 63 6f 6c |e foregr|ound col|
|000041c0| 6f 72 0d 0a 09 76 61 6c | 75 65 20 28 31 29 2e 20 |or...val|ue (1). |
|000041d0| 54 68 65 20 76 61 6c 75 | 65 20 6f 66 20 5c 69 74 |The valu|e of \it|
|000041e0| 77 64 20 70 61 6c 65 74 | 74 65 20 69 73 20 69 67 |wd palet|te is ig|
|000041f0| 6e 6f 72 65 64 2c 0d 0a | 09 61 6e 64 20 5c 69 74 |nored,..|.and \it|
|00004200| 77 64 20 76 61 6c 75 65 | 20 73 68 6f 75 6c 64 20 |wd value| should |
|00004210| 62 65 20 74 68 65 20 76 | 61 6c 75 65 20 6f 66 20 |be the v|alue of |
|00004220| 6f 6e 65 20 6f 66 20 74 | 68 65 0d 0a 09 63 6f 6c |one of t|he...col|
|00004230| 6f 72 73 20 6c 69 73 74 | 65 64 20 69 6e 20 43 47 |ors list|ed in CG|
|00004240| 41 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 63 6f 6c |A backgr|ound col|
|00004250| 6f 72 20 74 61 62 6c 65 | 20 69 6e 20 74 68 65 0d |or table| in the.|
|00004260| 0a 09 60 60 63 6f 6c 6f | 72 73 28 31 29 27 27 20 |..``colo|rs(1)'' |
|00004270| 6d 61 6e 75 61 6c 20 70 | 61 67 65 2e 0d 0a 09 54 |manual p|age....T|
|00004280| 68 65 20 76 69 73 69 62 | 6c 65 20 63 6f 6c 6f 72 |he visib|le color|
|00004290| 20 6f 66 20 74 68 65 20 | 66 6f 72 65 67 72 6f 75 | of the |foregrou|
|000042a0| 6e 64 20 77 69 6c 6c 20 | 62 65 20 63 68 61 6e 67 |nd will |be chang|
|000042b0| 65 64 20 74 6f 20 74 68 | 69 73 0d 0a 09 63 6f 6c |ed to th|is...col|
|000042c0| 6f 72 2e 0d 0a 0d 0a 5c | 6d 61 6e 68 65 61 64 20 |or.....\|manhead |
|000042d0| 43 47 41 20 33 32 30 20 | 62 79 20 32 30 30 20 66 |CGA 320 |by 200 f|
|000042e0| 6f 75 72 20 63 6f 6c 6f | 72 20 6d 6f 64 65 5c 70 |our colo|r mode\p|
|000042f0| 61 72 0d 0a 0d 0a 09 49 | 6e 20 74 68 69 73 20 6d |ar.....I|n this m|
|00004300| 6f 64 65 2c 20 74 68 65 | 20 5c 69 74 77 64 20 76 |ode, the| \itwd v|
|00004310| 61 6c 75 65 20 70 61 72 | 61 6d 65 74 65 72 20 69 |alue par|ameter i|
|00004320| 73 20 69 67 6e 6f 72 65 | 64 2c 20 61 6e 64 0d 0a |s ignore|d, and..|
|00004330| 09 5c 69 74 77 64 20 70 | 61 6c 65 74 74 65 20 73 |.\itwd p|alette s|
|00004340| 68 6f 75 6c 64 20 62 65 | 20 65 69 74 68 65 72 20 |hould be| either |
|00004350| 30 20 6f 72 20 31 2e 0d | 0a 09 54 68 65 20 64 69 |0 or 1..|..The di|
|00004360| 73 70 6c 61 79 65 64 20 | 63 6f 6c 6f 72 73 20 61 |splayed |colors a|
|00004370| 72 65 20 67 69 76 65 6e | 20 62 79 20 74 68 65 20 |re given| by the |
|00004380| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 61 62 6c 65 3a |followin|g table:|
|00004390| 0d 0a 5c 62 65 67 69 6e | 74 61 62 6c 65 0d 0a 5c |..\begin|table..\|
|000043a0| 63 65 6e 74 65 72 6c 69 | 6e 65 7b 5c 76 62 6f 78 |centerli|ne{\vbox|
|000043b0| 7b 25 0d 0a 20 20 5c 73 | 65 74 74 61 62 73 5c 2b |{%.. \s|ettabs\+|
|000043c0| 26 5c 69 74 20 63 6f 6c | 6f 72 26 5c 69 74 20 76 |&\it col|or&\it v|
|000043d0| 61 6c 75 65 5c 71 75 61 | 64 20 26 62 61 63 6b 67 |alue\qua|d &backg|
|000043e0| 72 6f 75 6e 64 5c 71 75 | 61 64 26 5c 63 72 0d 0a |round\qu|ad&\cr..|
|000043f0| 20 20 5c 2b 26 5c 69 74 | 20 63 6f 6c 6f 72 20 76 | \+&\it| color v|
|00004400| 61 6c 75 65 26 26 24 5c | 69 74 20 70 61 6c 65 74 |alue&&$\|it palet|
|00004410| 74 65 3d 30 24 26 24 5c | 69 74 20 70 61 6c 65 74 |te=0$&$\|it palet|
|00004420| 74 65 3d 31 24 5c 63 72 | 0d 0a 20 20 5c 73 6d 61 |te=1$\cr|.. \sma|
|00004430| 6c 6c 73 6b 69 70 0d 0a | 20 20 5c 2b 26 26 20 30 |llskip..| \+&& 0|
|00004440| 20 26 62 61 63 6b 67 72 | 6f 75 6e 64 26 62 61 63 | &backgr|ound&bac|
|00004450| 6b 67 72 6f 75 6e 64 5c | 63 72 0d 0a 20 20 5c 2b |kground\|cr.. \+|
|00004460| 26 26 20 31 20 26 67 72 | 65 65 6e 26 63 79 61 6e |&& 1 &gr|een&cyan|
|00004470| 5c 63 72 0d 0a 20 20 5c | 2b 26 26 20 32 20 26 72 |\cr.. \|+&& 2 &r|
|00004480| 65 64 26 6d 61 67 65 6e | 74 61 5c 63 72 0d 0a 20 |ed&magen|ta\cr.. |
|00004490| 20 5c 2b 26 26 20 33 20 | 26 79 65 6c 6c 6f 77 26 | \+&& 3 |&yellow&|
|000044a0| 77 68 69 74 65 5c 63 72 | 0d 0a 7d 7d 0d 0a 5c 65 |white\cr|..}}..\e|
|000044b0| 6e 64 74 61 62 6c 65 0d | 0a 0d 0a 5c 6d 61 6e 68 |ndtable.|...\manh|
|000044c0| 65 61 64 20 45 47 41 20 | 73 69 78 74 65 65 6e 20 |ead EGA |sixteen |
|000044d0| 63 6f 6c 6f 72 20 6d 6f | 64 65 5c 70 61 72 0d 0a |color mo|de\par..|
|000044e0| 0d 0a 09 20 49 6e 20 74 | 68 69 73 20 6d 6f 64 65 |... In t|his mode|
|000044f0| 2c 20 74 68 65 20 5c 69 | 74 77 64 20 67 5f 73 65 |, the \i|twd g_se|
|00004500| 74 70 61 6c 20 66 75 6e | 63 74 69 6f 6e 0d 0a 09 |tpal fun|ction...|
|00004510| 64 69 72 65 63 74 6c 79 | 20 73 65 74 73 20 74 68 |directly| sets th|
|00004520| 65 20 76 69 73 69 62 6c | 65 20 63 6f 6c 6f 72 20 |e visibl|e color |
|00004530| 6f 66 20 74 68 65 20 63 | 6f 6c 6f 72 20 76 61 6c |of the c|olor val|
|00004540| 75 65 20 67 69 76 65 6e | 0d 0a 09 62 79 20 5c 69 |ue given|...by \i|
|00004550| 74 77 64 20 70 61 6c 65 | 74 74 65 20 74 6f 20 5c |twd pale|tte to \|
|00004560| 69 74 6e 63 20 76 61 6c | 75 65 20 2c 20 77 68 69 |itnc val|ue , whi|
|00004570| 63 68 20 69 73 20 61 20 | 73 69 78 2d 62 69 74 0d |ch is a |six-bit.|
|00004580| 0a 09 63 6f 6c 6f 72 20 | 61 73 20 64 69 73 63 75 |..color |as discu|
|00004590| 73 73 65 64 20 69 6e 20 | 74 68 65 20 45 47 41 20 |ssed in |the EGA |
|000045a0| 73 65 63 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 60 |section |of the `|
|000045b0| 60 63 6f 6c 6f 72 73 28 | 31 29 27 27 0d 0a 09 6d |`colors(|1)''...m|
|000045c0| 61 6e 75 61 6c 20 70 61 | 67 65 2e 0d 0a 5c 6d 61 |anual pa|ge...\ma|
|000045d0| 6e 73 65 65 0d 0a 09 69 | 6e 74 72 6f 28 31 29 2c |nsee...i|ntro(1),|
|000045e0| 20 63 6f 6c 6f 72 73 28 | 31 29 2c 20 67 5f 73 65 | colors(|1), g_se|
|000045f0| 74 62 61 63 6b 28 31 29 | 2e 0d 0a 5c 6d 61 6e 70 |tback(1)|...\manp|
|00004600| 65 6e 64 0d 0a 0d 0a 0d | 0a 5c 6d 61 6e 70 61 67 |end.....|.\manpag|
|00004610| 65 20 67 5f 73 65 74 78 | 6f 72 28 31 29 0d 0a 0d |e g_setx|or(1)...|
|00004620| 0a 5c 6d 61 6e 6e 61 6d | 65 0d 0a 09 67 5f 73 65 |.\mannam|e...g_se|
|00004630| 74 78 6f 72 20 2d 2d 2d | 20 74 75 72 6e 20 78 6f |txor ---| turn xo|
|00004640| 72 20 6d 6f 64 65 20 6f | 6e 20 6f 72 20 6f 66 66 |r mode o|n or off|
|00004650| 0d 0a 5c 6d 61 6e 73 79 | 6e 0d 0a 09 76 6f 69 64 |..\mansy|n...void|
|00004660| 20 67 5f 73 65 74 78 6f | 72 28 66 6c 61 67 29 0d | g_setxo|r(flag).|
|00004670| 0a 0d 0a 09 75 6e 73 69 | 67 6e 65 64 20 66 6c 61 |....unsi|gned fla|
|00004680| 67 3b 0d 0a 5c 6d 61 6e | 64 73 63 72 0d 0a 09 54 |g;..\man|dscr...T|
|00004690| 68 65 20 5c 69 74 77 64 | 20 67 5f 73 65 74 78 6f |he \itwd| g_setxo|
|000046a0| 72 20 66 75 6e 63 74 69 | 6f 6e 20 74 75 72 6e 73 |r functi|on turns|
|000046b0| 20 78 6f 72 20 6d 6f 64 | 65 20 6f 6e 20 69 66 7e | xor mod|e on if~|
|000046c0| 5c 69 74 77 64 20 66 6c | 61 67 0d 0a 09 69 73 20 |\itwd fl|ag...is |
|000046d0| 6e 6f 6e 7a 65 72 6f 2c | 20 6f 72 20 6f 66 66 20 |nonzero,| or off |
|000046e0| 69 66 7e 5c 69 74 77 64 | 20 66 6c 61 67 20 69 73 |if~\itwd| flag is|
|000046f0| 20 7a 65 72 6f 2e 20 57 | 68 65 6e 20 78 6f 72 20 | zero. W|hen xor |
|00004700| 6d 6f 64 65 20 69 73 0d | 0a 09 6f 66 66 2c 20 64 |mode is.|..off, d|
|00004710| 72 61 77 6e 20 6f 62 6a | 65 63 74 73 20 61 72 65 |rawn obj|ects are|
|00004720| 20 73 69 6d 70 6c 79 20 | 77 72 69 74 74 65 6e 20 | simply |written |
|00004730| 6f 76 65 72 20 65 78 69 | 73 74 69 6e 67 20 64 61 |over exi|sting da|
|00004740| 74 61 20 69 6e 0d 0a 09 | 74 68 65 20 64 72 61 77 |ta in...|the draw|
|00004750| 69 6e 67 20 62 75 66 66 | 65 72 2e 20 42 75 74 20 |ing buff|er. But |
|00004760| 69 66 20 78 6f 72 20 6d | 6f 64 65 20 69 73 20 6f |if xor m|ode is o|
|00004770| 6e 2c 20 64 72 61 77 6e | 20 6f 62 6a 65 63 74 73 |n, drawn| objects|
|00004780| 0d 0a 09 61 72 65 20 6c | 6f 67 69 63 61 6c 6c 79 |...are l|ogically|
|00004790| 20 78 6f 72 27 65 64 20 | 77 69 74 68 20 74 68 65 | xor'ed |with the|
|000047a0| 20 65 78 69 73 74 69 6e | 67 20 64 61 74 61 2e 20 | existin|g data. |
|000047b0| 54 68 75 73 20 69 66 20 | 61 6e 20 6f 62 6a 65 63 |Thus if |an objec|
|000047c0| 74 0d 0a 09 69 73 20 64 | 72 61 77 6e 20 74 77 69 |t...is d|rawn twi|
|000047d0| 63 65 20 69 6e 20 61 20 | 72 6f 77 20 69 6e 20 65 |ce in a |row in e|
|000047e0| 78 61 63 74 6c 79 20 74 | 68 65 20 73 61 6d 65 20 |xactly t|he same |
|000047f0| 70 6f 73 69 74 69 6f 6e | 20 77 69 74 68 20 78 6f |position| with xo|
|00004800| 72 0d 0a 09 6d 6f 64 65 | 20 6f 6e 2c 20 69 74 20 |r...mode| on, it |
|00004810| 77 69 6c 6c 20 62 65 20 | 63 6f 6d 70 6c 65 74 65 |will be |complete|
|00004820| 6c 79 20 65 72 61 73 65 | 64 20 61 66 74 65 72 20 |ly erase|d after |
|00004830| 74 68 65 20 73 65 63 6f | 6e 64 0d 0a 09 64 72 61 |the seco|nd...dra|
|00004840| 77 69 6e 67 20 61 6e 64 | 20 74 68 65 20 69 6d 61 |wing and| the ima|
|00004850| 67 65 20 6f 6e 20 74 68 | 65 0d 0a 09 73 63 72 65 |ge on th|e...scre|
|00004860| 65 6e 20 72 65 73 74 6f | 72 65 64 20 74 6f 20 69 |en resto|red to i|
|00004870| 74 73 20 73 74 61 74 65 | 20 70 72 65 76 69 6f 75 |ts state| previou|
|00004880| 73 20 74 6f 20 74 68 65 | 20 66 69 72 73 74 20 64 |s to the| first d|
|00004890| 72 61 77 69 6e 67 2e 0d | 0a 09 54 68 69 73 20 6d |rawing..|..This m|
|000048a0| 61 6b 65 73 20 78 6f 72 | 20 6d 6f 64 65 20 75 73 |akes xor| mode us|
|000048b0| 65 66 75 6c 20 66 6f 72 | 20 61 6e 69 6d 61 74 69 |eful for| animati|
|000048c0| 6f 6e 20 61 6e 64 20 6f | 74 68 65 72 20 65 66 66 |on and o|ther eff|
|000048d0| 65 63 74 73 2e 0d 0a 09 | 46 75 6e 63 74 69 6f 6e |ects....|Function|
|000048e0| 73 20 77 68 69 63 68 20 | 73 75 70 70 6f 72 74 20 |s which |support |
|000048f0| 78 6f 72 20 6d 6f 64 65 | 20 61 72 65 20 7b 5c 69 |xor mode| are {\i|
|00004900| 74 20 67 5f 62 6f 78 2c | 20 67 5f 63 69 72 63 6c |t g_box,| g_circl|
|00004910| 65 2c 0d 0a 09 67 5f 65 | 6c 6c 69 70 73 65 2c 20 |e,...g_e|llipse, |
|00004920| 67 5f 6c 69 6e 65 2c 7d | 20 61 6e 64 20 5c 69 74 |g_line,}| and \it|
|00004930| 6e 63 20 67 5f 70 6f 69 | 6e 74 20 2e 0d 0a 5c 6d |nc g_poi|nt ...\m|
|00004940| 61 6e 70 65 6e 64 0d 0a | 0d 0a 5c 6d 61 6e 70 61 |anpend..|..\manpa|
|00004950| 67 65 20 67 5f 73 68 6f | 77 28 31 29 0d 0a 0d 0a |ge g_sho|w(1)....|
|00004960| 5c 6d 61 6e 6e 61 6d 65 | 0d 0a 09 67 5f 73 68 6f |\manname|...g_sho|
|00004970| 77 20 2d 2d 2d 20 6d 61 | 6b 65 20 74 68 65 20 64 |w --- ma|ke the d|
|00004980| 72 61 77 69 6e 67 20 62 | 75 66 66 65 72 20 76 69 |rawing b|uffer vi|
|00004990| 73 69 62 6c 65 0d 0a 5c | 6d 61 6e 73 79 6e 0d 0a |sible..\|mansyn..|
|000049a0| 09 76 6f 69 64 20 67 5f | 73 68 6f 77 28 29 0d 0a |.void g_|show()..|
|000049b0| 5c 6d 61 6e 64 73 63 72 | 0d 0a 09 49 66 20 73 63 |\mandscr|...If sc|
|000049c0| 72 65 65 6e 20 62 75 66 | 66 65 72 69 6e 67 20 69 |reen buf|fering i|
|000049d0| 73 20 6f 6e 2c 20 74 68 | 65 20 5c 69 74 77 64 20 |s on, th|e \itwd |
|000049e0| 67 5f 73 68 6f 77 20 66 | 75 6e 63 74 69 6f 6e 20 |g_show f|unction |
|000049f0| 6d 61 6b 65 73 0d 0a 09 | 74 68 65 20 64 72 61 77 |makes...|the draw|
|00004a00| 69 6e 67 20 62 75 66 66 | 65 72 20 76 69 73 69 62 |ing buff|er visib|
|00004a10| 6c 65 20 62 79 20 65 69 | 74 68 65 72 20 63 6f 70 |le by ei|ther cop|
|00004a20| 79 69 6e 67 20 69 74 20 | 74 6f 20 74 68 65 0d 0a |ying it |to the..|
|00004a30| 09 70 68 79 73 69 63 61 | 6c 20 73 63 72 65 65 6e |.physica|l screen|
|00004a40| 20 62 75 66 66 65 72 20 | 28 6f 6e 20 61 64 61 70 | buffer |(on adap|
|00004a50| 74 65 72 73 20 77 69 74 | 68 20 6f 6e 6c 79 20 6f |ters wit|h only o|
|00004a60| 6e 65 20 70 61 67 65 29 | 20 6f 72 0d 0a 09 73 77 |ne page)| or...sw|
|00004a70| 61 70 70 69 6e 67 20 69 | 74 20 77 69 74 68 20 74 |apping i|t with t|
|00004a80| 68 65 20 63 75 72 72 65 | 6e 74 6c 79 20 76 69 73 |he curre|ntly vis|
|00004a90| 69 62 6c 65 20 70 61 67 | 65 20 28 6f 6e 20 61 64 |ible pag|e (on ad|
|00004aa0| 61 70 74 65 72 73 0d 0a | 09 77 69 74 68 20 6d 6f |apters..|.with mo|
|00004ab0| 72 65 20 74 68 61 6e 20 | 6f 6e 65 20 70 61 67 65 |re than |one page|
|00004ac0| 29 2e 20 49 66 20 73 63 | 72 65 65 6e 20 62 75 66 |). If sc|reen buf|
|00004ad0| 66 65 72 69 6e 67 20 69 | 73 20 6f 66 66 2c 0d 0a |fering i|s off,..|
|00004ae0| 09 5c 69 74 77 64 20 67 | 5f 73 68 6f 77 20 64 6f |.\itwd g|_show do|
|00004af0| 65 73 20 6e 6f 74 68 69 | 6e 67 2e 0d 0a 0d 0a 09 |es nothi|ng......|
|00004b00| 53 65 65 20 74 68 65 20 | 64 65 73 63 72 69 70 74 |See the |descript|
|00004b10| 69 6f 6e 20 6f 66 20 74 | 68 65 20 5c 69 74 77 64 |ion of t|he \itwd|
|00004b20| 20 67 5f 73 65 74 62 75 | 66 20 66 75 6e 63 74 69 | g_setbu|f functi|
|00004b30| 6f 6e 20 66 6f 72 0d 0a | 09 66 75 72 74 68 65 72 |on for..|.further|
|00004b40| 20 64 69 73 63 75 73 73 | 69 6f 6e 20 6f 66 20 73 | discuss|ion of s|
|00004b50| 63 72 65 65 6e 20 62 75 | 66 66 65 72 69 6e 67 2e |creen bu|ffering.|
|00004b60| 0d 0a 5c 6d 61 6e 73 65 | 65 0d 0a 09 67 5f 73 65 |..\manse|e...g_se|
|00004b70| 74 62 75 66 28 31 29 2e | 0d 0a 5c 6d 61 6e 70 65 |tbuf(1).|..\manpe|
|00004b80| 6e 64 0d 0a 0d 0a 5c 6d | 61 6e 70 61 67 65 20 67 |nd....\m|anpage g|
|00004b90| 5f 77 72 69 74 65 63 68 | 28 31 29 0d 0a 0d 0a 5c |_writech|(1)....\|
|00004ba0| 6d 61 6e 6e 61 6d 65 0d | 0a 09 67 5f 77 72 69 74 |manname.|..g_writ|
|00004bb0| 65 63 68 20 2d 2d 2d 20 | 77 72 69 74 65 20 61 20 |ech --- |write a |
|00004bc0| 63 68 61 72 61 63 74 65 | 72 0d 0a 5c 6d 61 6e 73 |characte|r..\mans|
|00004bd0| 79 6e 0d 0a 09 76 6f 69 | 64 20 67 5f 77 72 69 74 |yn...voi|d g_writ|
|00004be0| 65 63 68 28 72 6f 77 2c | 20 63 6f 6c 2c 20 63 68 |ech(row,| col, ch|
|00004bf0| 2c 20 63 6f 6c 6f 72 2c | 20 70 61 67 65 29 0d 0a |, color,| page)..|
|00004c00| 0d 0a 09 75 6e 73 69 67 | 6e 65 64 20 72 6f 77 2c |...unsig|ned row,|
|00004c10| 20 63 6f 6c 3b 0d 0a 09 | 63 68 61 72 20 63 68 3b | col;...|char ch;|
|00004c20| 0d 0a 09 75 6e 73 69 67 | 6e 65 64 20 63 6f 6c 6f |...unsig|ned colo|
|00004c30| 72 3b 0d 0a 09 69 6e 74 | 20 70 61 67 65 3b 0d 0a |r;...int| page;..|
|00004c40| 5c 6d 61 6e 64 73 63 72 | 0d 0a 09 54 68 65 20 5c |\mandscr|...The \|
|00004c50| 69 74 77 64 20 67 5f 77 | 72 69 74 65 63 68 20 66 |itwd g_w|ritech f|
|00004c60| 75 6e 63 74 69 6f 6e 20 | 77 72 69 74 65 73 20 74 |unction |writes t|
|00004c70| 68 65 20 73 69 6e 67 6c | 65 20 63 68 61 72 61 63 |he singl|e charac|
|00004c80| 74 65 72 7e 5c 69 74 77 | 64 20 63 68 0d 0a 09 61 |ter~\itw|d ch...a|
|00004c90| 74 20 63 68 61 72 61 63 | 74 65 72 20 70 6f 73 69 |t charac|ter posi|
|00004ca0| 74 69 6f 6e 7e 5c 69 74 | 70 6e 74 20 28 72 6f 77 |tion~\it|pnt (row|
|00004cb0| 2c 20 63 6f 6c 29 20 77 | 69 74 68 20 63 6f 6c 6f |, col) w|ith colo|
|00004cc0| 72 7e 5c 69 74 6e 63 20 | 63 6f 6c 6f 72 20 2e 0d |r~\itnc |color ..|
|00004cd0| 0a 09 49 66 7e 5c 69 74 | 77 64 20 70 61 67 65 20 |..If~\it|wd page |
|00004ce0| 69 73 20 24 2d 24 31 2c | 20 74 68 65 20 63 68 61 |is $-$1,| the cha|
|00004cf0| 72 61 63 74 65 72 20 69 | 73 20 77 72 69 74 74 65 |racter i|s writte|
|00004d00| 6e 20 74 6f 20 74 68 65 | 20 63 75 72 72 65 6e 74 |n to the| current|
|00004d10| 0d 0a 09 64 72 61 77 69 | 6e 67 20 62 75 66 66 65 |...drawi|ng buffe|
|00004d20| 72 3b 20 6f 74 68 65 72 | 77 69 73 65 20 69 74 20 |r; other|wise it |
|00004d30| 69 73 20 77 72 69 74 74 | 65 6e 20 74 6f 20 70 61 |is writt|en to pa|
|00004d40| 67 65 7e 5c 69 74 77 64 | 20 70 61 67 65 0d 0a 09 |ge~\itwd| page...|
|00004d50| 28 6e 6f 74 65 3a 20 74 | 68 69 73 20 69 73 20 6e |(note: t|his is n|
|00004d60| 6f 74 20 73 75 70 70 6f | 72 74 65 64 20 77 69 74 |ot suppo|rted wit|
|00004d70| 68 20 74 68 65 20 43 47 | 41 2c 20 61 73 20 69 74 |h the CG|A, as it|
|00004d80| 20 6f 6e 6c 79 0d 0a 09 | 68 61 73 20 6f 6e 65 20 | only...|has one |
|00004d90| 70 61 67 65 29 2e 0d 0a | 5c 6d 61 6e 62 75 67 73 |page)...|\manbugs|
|00004da0| 0d 0a 09 57 69 74 68 20 | 74 68 65 20 43 47 41 20 |...With |the CGA |
|00004db0| 61 64 61 70 74 65 72 2c | 20 74 68 65 20 5c 69 74 |adapter,| the \it|
|00004dc0| 77 64 20 70 61 67 65 20 | 70 61 72 61 6d 65 74 65 |wd page |paramete|
|00004dd0| 72 20 69 73 20 69 67 6e | 6f 72 65 64 2e 0d 0a 0d |r is ign|ored....|
|00004de0| 0a 09 58 6f 72 20 6d 6f | 64 65 20 69 73 20 6e 6f |..Xor mo|de is no|
|00004df0| 74 20 73 75 70 70 6f 72 | 74 65 64 2e 0d 0a 0d 0a |t suppor|ted.....|
|00004e00| 09 43 6c 69 70 70 69 6e | 67 20 62 6f 75 6e 64 61 |.Clippin|g bounda|
|00004e10| 72 69 65 73 20 61 72 65 | 20 6e 6f 74 20 72 65 73 |ries are| not res|
|00004e20| 70 65 63 74 65 64 2e 0d | 0a 5c 6d 61 6e 73 65 65 |pected..|.\mansee|
|00004e30| 0d 0a 09 67 5f 77 72 69 | 74 65 73 74 72 28 31 29 |...g_wri|testr(1)|
|00004e40| 2e 0d 0a 5c 6d 61 6e 70 | 65 6e 64 0d 0a 0d 0a 5c |...\manp|end....\|
|00004e50| 6d 61 6e 70 61 67 65 20 | 67 5f 77 72 69 74 65 73 |manpage |g_writes|
|00004e60| 74 72 28 31 29 0d 0a 0d | 0a 5c 6d 61 6e 6e 61 6d |tr(1)...|.\mannam|
|00004e70| 65 0d 0a 09 67 5f 77 72 | 69 74 65 73 74 72 20 2d |e...g_wr|itestr -|
|00004e80| 2d 2d 20 77 72 69 74 65 | 20 61 20 73 74 72 69 6e |-- write| a strin|
|00004e90| 67 20 74 65 6c 65 74 79 | 70 65 20 73 74 79 6c 65 |g telety|pe style|
|00004ea0| 0d 0a 5c 6d 61 6e 73 79 | 6e 0d 0a 09 76 6f 69 64 |..\mansy|n...void|
|00004eb0| 20 67 5f 77 72 69 74 65 | 73 74 72 28 72 6f 77 2c | g_write|str(row,|
|00004ec0| 20 63 6f 6c 2c 20 73 2c | 20 63 6f 6c 6f 72 2c 20 | col, s,| color, |
|00004ed0| 70 61 67 65 29 0d 0a 0d | 0a 09 75 6e 73 69 67 6e |page)...|..unsign|
|00004ee0| 65 64 20 72 6f 77 2c 20 | 63 6f 6c 3b 0d 0a 09 63 |ed row, |col;...c|
|00004ef0| 68 61 72 20 2a 73 3b 0d | 0a 09 75 6e 73 69 67 6e |har *s;.|..unsign|
|00004f00| 65 64 20 63 6f 6c 6f 72 | 3b 0d 0a 09 69 6e 74 20 |ed color|;...int |
|00004f10| 70 61 67 65 3b 0d 0a 5c | 6d 61 6e 64 73 63 72 0d |page;..\|mandscr.|
|00004f20| 0a 09 54 68 65 20 5c 69 | 74 77 64 20 67 5f 77 72 |..The \i|twd g_wr|
|00004f30| 69 74 65 73 74 72 20 77 | 72 69 74 65 73 20 74 68 |itestr w|rites th|
|00004f40| 65 20 6e 75 6c 6c 2d 74 | 65 72 6d 69 6e 61 74 65 |e null-t|erminate|
|00004f50| 64 20 73 74 72 69 6e 67 | 0d 0a 09 70 6f 69 6e 74 |d string|...point|
|00004f60| 65 64 20 74 6f 20 62 79 | 7e 5c 69 74 77 64 20 73 |ed to by|~\itwd s|
|00004f70| 20 73 74 61 72 74 69 6e | 67 20 61 74 20 63 68 61 | startin|g at cha|
|00004f80| 72 61 63 74 65 72 20 70 | 6f 73 69 74 69 6f 6e 0d |racter p|osition.|
|00004f90| 0a 09 5c 69 74 70 6e 74 | 20 28 72 6f 77 2c 20 63 |..\itpnt| (row, c|
|00004fa0| 6f 6c 29 20 77 69 74 68 | 20 63 6f 6c 6f 72 7e 5c |ol) with| color~\|
|00004fb0| 69 74 6e 63 20 63 6f 6c | 6f 72 20 2e 20 0d 0a 09 |itnc col|or . ...|
|00004fc0| 49 66 7e 5c 69 74 77 64 | 20 70 61 67 65 20 69 73 |If~\itwd| page is|
|00004fd0| 20 24 2d 24 31 2c 20 74 | 68 65 20 63 68 61 72 61 | $-$1, t|he chara|
|00004fe0| 63 74 65 72 20 69 73 20 | 77 72 69 74 74 65 6e 20 |cter is |written |
|00004ff0| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 0d 0a |to the c|urrent..|
|00005000| 09 64 72 61 77 69 6e 67 | 20 62 75 66 66 65 72 3b |.drawing| buffer;|
|00005010| 20 6f 74 68 65 72 77 69 | 73 65 20 69 74 20 69 73 | otherwi|se it is|
|00005020| 20 77 72 69 74 74 65 6e | 20 74 6f 20 70 61 67 65 | written| to page|
|00005030| 7e 5c 69 74 77 64 20 70 | 61 67 65 0d 0a 09 28 6e |~\itwd p|age...(n|
|00005040| 6f 74 65 3a 20 74 68 69 | 73 20 69 73 20 6e 6f 74 |ote: thi|s is not|
|00005050| 20 73 75 70 70 6f 72 74 | 65 64 20 77 69 74 68 20 | support|ed with |
|00005060| 74 68 65 20 43 47 41 2c | 20 61 73 20 69 74 20 6f |the CGA,| as it o|
|00005070| 6e 6c 79 0d 0a 09 68 61 | 73 20 6f 6e 65 20 70 61 |nly...ha|s one pa|
|00005080| 67 65 29 2e 0d 0a 0d 0a | 09 54 68 65 20 63 68 61 |ge).....|.The cha|
|00005090| 72 61 63 74 65 72 73 20 | 61 72 65 20 77 72 69 74 |racters |are writ|
|000050a0| 74 65 6e 20 66 72 6f 6d | 20 6c 65 66 74 20 74 6f |ten from| left to|
|000050b0| 20 72 69 67 68 74 2c 20 | 74 6f 70 20 74 6f 20 62 | right, |top to b|
|000050c0| 6f 74 74 6f 6d 2e 0d 0a | 09 49 66 20 74 68 65 20 |ottom...|.If the |
|000050d0| 77 72 69 74 69 6e 67 20 | 67 6f 65 73 20 6f 66 66 |writing |goes off|
|000050e0| 20 74 68 65 20 72 69 67 | 68 74 20 65 64 67 65 20 | the rig|ht edge |
|000050f0| 6f 66 20 74 68 65 20 73 | 63 72 65 65 6e 2c 20 69 |of the s|creen, i|
|00005100| 74 0d 0a 09 63 6f 6e 74 | 69 6e 75 65 73 20 61 74 |t...cont|inues at|
|00005110| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|00005120| 66 20 74 68 65 20 6e 65 | 78 74 20 6c 69 6e 65 2e |f the ne|xt line.|
|00005130| 20 49 66 20 74 68 65 0d | 0a 09 77 72 69 74 69 6e | If the.|..writin|
|00005140| 67 20 67 6f 65 73 20 6f | 66 66 20 74 68 65 20 62 |g goes o|ff the b|
|00005150| 6f 74 74 6f 6d 20 6f 66 | 20 74 68 65 20 73 63 72 |ottom of| the scr|
|00005160| 65 65 6e 2c 20 74 68 65 | 20 66 75 6e 63 74 69 6f |een, the| functio|
|00005170| 6e 20 69 73 20 61 62 6f | 72 74 65 64 2e 0d 0a 0d |n is abo|rted....|
|00005180| 0a 09 54 68 65 20 6f 6e | 6c 79 20 73 70 65 63 69 |..The on|ly speci|
|00005190| 61 6c 20 63 68 61 72 61 | 63 74 65 72 73 20 72 65 |al chara|cters re|
|000051a0| 63 6f 67 6e 69 7a 65 64 | 20 61 72 65 20 6e 65 77 |cognized| are new|
|000051b0| 6c 69 6e 65 20 28 6f 63 | 74 61 6c 0d 0a 09 31 32 |line (oc|tal...12|
|000051c0| 29 2c 20 77 68 69 63 68 | 20 63 61 75 73 65 73 20 |), which| causes |
|000051d0| 74 68 65 20 77 72 69 74 | 69 6e 67 20 74 6f 20 77 |the writ|ing to w|
|000051e0| 72 61 70 20 61 72 6f 75 | 6e 64 20 74 6f 20 74 68 |rap arou|nd to th|
|000051f0| 65 20 62 65 67 69 6e 6e | 69 6e 67 0d 0a 09 6f 66 |e beginn|ing...of|
|00005200| 20 74 68 65 20 6e 65 78 | 74 20 6c 69 6e 65 2c 20 | the nex|t line, |
|00005210| 61 6e 64 20 63 61 72 72 | 69 61 67 65 20 72 65 74 |and carr|iage ret|
|00005220| 75 72 6e 20 28 6f 63 74 | 61 6c 20 31 35 29 20 77 |urn (oct|al 15) w|
|00005230| 68 69 63 68 0d 0a 09 69 | 73 20 73 69 6d 70 6c 79 |hich...i|s simply|
|00005240| 20 69 67 6e 6f 72 65 64 | 2e 0d 0a 5c 6d 61 6e 62 | ignored|...\manb|
|00005250| 75 67 73 0d 0a 09 57 69 | 74 68 20 74 68 65 20 43 |ugs...Wi|th the C|
|00005260| 47 41 20 61 64 61 70 74 | 65 72 2c 20 74 68 65 20 |GA adapt|er, the |
|00005270| 5c 69 74 77 64 20 70 61 | 67 65 20 70 61 72 61 6d |\itwd pa|ge param|
|00005280| 65 74 65 72 20 69 73 20 | 69 67 6e 6f 72 65 64 2e |eter is |ignored.|
|00005290| 0d 0a 0d 0a 09 58 6f 72 | 20 6d 6f 64 65 20 69 73 |.....Xor| mode is|
|000052a0| 20 6e 6f 74 20 73 75 70 | 70 6f 72 74 65 64 2e 0d | not sup|ported..|
|000052b0| 0a 0d 0a 09 43 6c 69 70 | 70 69 6e 67 20 62 6f 75 |....Clip|ping bou|
|000052c0| 6e 64 61 72 69 65 73 20 | 61 72 65 20 6e 6f 74 20 |ndaries |are not |
|000052d0| 72 65 73 70 65 63 74 65 | 64 2e 0d 0a 5c 6d 61 6e |respecte|d...\man|
|000052e0| 73 65 65 0d 0a 09 67 5f | 77 72 69 74 65 63 68 28 |see...g_|writech(|
|000052f0| 31 29 2e 0d 0a 5c 6d 61 | 6e 70 65 6e 64 0d 0a 0d |1)...\ma|npend...|
|00005300| 0a 0d 0a | |... | |
+--------+-------------------------+-------------------------+--------+--------+