home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / leda / man / changes.tex < prev    next >
Texinfo Document  |  1991-11-15  |  11.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Texinfo Document (document/texInfo).

You can browse this item here: changes.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Texinfo Document (document/texInfo) 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 TeX document, ASCII text 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[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 69 6e 70 75 74 20 68 | 70 2e 6d 61 63 0a 0a 5c |\input h|p.mac..\|
|00000010| 69 6e 70 75 74 20 4c 45 | 44 41 2e 6d 61 63 0a 0a |input LE|DA.mac..|
|00000020| 5c 62 61 73 65 6c 69 6e | 65 73 6b 69 70 20 31 34 |\baselin|eskip 14|
|00000030| 70 74 0a 5c 73 70 61 63 | 65 73 6b 69 70 20 20 2e |pt.\spac|eskip .|
|00000040| 34 65 6d 20 70 6c 75 73 | 20 2e 32 35 65 6d 20 6d |4em plus| .25em m|
|00000050| 69 6e 75 73 20 2e 32 35 | 65 6d 0a 5c 78 73 70 61 |inus .25|em.\xspa|
|00000060| 63 65 73 6b 69 70 20 2e | 36 35 65 6d 0a 0a 5c 70 |ceskip .|65em..\p|
|00000070| 61 72 73 6b 69 70 20 31 | 31 70 74 20 70 6c 75 73 |arskip 1|1pt plus|
|00000080| 20 31 70 74 20 6d 69 6e | 75 73 20 31 70 74 0a 0a | 1pt min|us 1pt..|
|00000090| 5c 70 61 67 65 6e 6f 3d | 31 32 31 0a 0a 7b 5c 6d |\pageno=|121..{\m|
|000000a0| 61 67 74 77 6f 62 66 20 | 43 68 61 6e 67 65 73 20 |agtwobf |Changes |
|000000b0| 20 77 69 74 68 20 72 65 | 73 70 65 63 74 20 74 6f | with re|spect to|
|000000c0| 20 76 65 72 73 69 6f 6e | 20 32 2e 30 7d 0a 5c 62 | version| 2.0}.\b|
|000000d0| 69 67 73 6b 69 70 0a 0a | 7b 5c 6d 61 67 6f 6e 65 |igskip..|{\magone|
|000000e0| 62 66 20 31 2e 36 20 49 | 6e 70 75 74 20 61 6e 64 |bf 1.6 I|nput and|
|000000f0| 20 6f 75 74 70 75 74 7d | 0a 5c 62 69 67 73 6b 69 | output}|.\bigski|
|00000100| 70 0a 0a 54 68 65 20 6f | 76 65 72 6c 6f 61 64 65 |p..The o|verloade|
|00000110| 64 20 24 52 65 61 64 24 | 20 61 6e 64 20 24 57 72 |d $Read$| and $Wr|
|00000120| 69 74 65 24 20 66 75 6e | 63 74 69 6f 6e 73 20 66 |ite$ fun|ctions f|
|00000130| 6f 72 20 64 65 66 69 6e | 69 6e 67 20 69 6e 70 75 |or defin|ing inpu|
|00000140| 74 20 61 6e 64 20 6f 75 | 74 70 75 74 20 0a 66 75 |t and ou|tput .fu|
|00000150| 6e 63 74 69 6f 6e 73 20 | 66 6f 72 20 75 73 65 72 |nctions |for user|
|00000160| 20 64 65 66 69 6e 65 64 | 20 70 6f 69 6e 74 65 72 | defined| pointer|
|00000170| 20 74 79 70 65 73 20 6e | 6f 77 20 68 61 76 65 20 | types n|ow have |
|00000180| 61 6e 20 61 64 64 69 74 | 69 6f 6e 61 6c 20 73 74 |an addit|ional st|
|00000190| 72 65 61 6d 20 61 72 67 | 75 6d 65 6e 74 2e 0a 0a |ream arg|ument...|
|000001a0| 24 76 6f 69 64 24 5c 20 | 5c 20 20 24 52 65 61 64 |$void$\ |\ $Read|
|000001b0| 28 54 5c 26 2c 5c 20 69 | 73 74 72 65 61 6d 5c 26 |(T\&,\ i|stream\&|
|000001c0| 29 24 20 20 24 5c 7b 24 | 20 5c 64 6f 74 73 20 24 |)$ $\{$| \dots $|
|000001d0| 5c 7d 24 5c 6e 6c 0a 64 | 65 66 69 6e 65 73 20 61 |\}$\nl.d|efines a|
|000001e0| 6e 20 69 6e 70 75 74 20 | 66 75 6e 63 74 69 6f 6e |n input |function|
|000001f0| 20 66 6f 72 20 72 65 61 | 64 69 6e 67 20 6f 62 6a | for rea|ding obj|
|00000200| 65 63 74 73 20 6f 66 20 | 74 79 70 65 20 24 54 24 |ects of |type $T$|
|00000210| 20 66 72 6f 6d 20 61 6e | 20 69 6e 70 75 74 20 73 | from an| input s|
|00000220| 74 72 65 61 6d 2e 0a 0a | 24 76 6f 69 64 24 5c 20 |tream...|$void$\ |
|00000230| 5c 20 20 24 50 72 69 6e | 74 28 54 5c 26 2c 5c 20 |\ $Prin|t(T\&,\ |
|00000240| 6f 73 74 72 65 61 6d 5c | 26 29 24 20 20 24 5c 7b |ostream\|&)$ $\{|
|00000250| 24 20 5c 64 6f 74 73 20 | 24 5c 7d 24 20 5c 6e 6c |$ \dots |$\}$ \nl|
|00000260| 0a 64 65 66 69 6e 65 73 | 20 61 6e 20 6f 75 74 70 |.defines| an outp|
|00000270| 75 74 20 66 75 6e 63 74 | 69 6f 6e 20 66 6f 72 20 |ut funct|ion for |
|00000280| 70 72 69 6e 74 69 6e 67 | 20 6f 62 6a 65 63 74 73 |printing| objects|
|00000290| 20 6f 66 20 74 79 70 65 | 20 24 54 24 20 74 6f 20 | of type| $T$ to |
|000002a0| 61 6e 20 6f 75 74 70 75 | 74 20 73 74 72 65 61 6d |an outpu|t stream|
|000002b0| 2e 0a 0a 0a 5c 2b 5c 63 | 6c 65 61 72 74 61 62 73 |....\+\c|leartabs|
|000002c0| 20 26 20 5c 68 73 6b 69 | 70 20 32 74 72 75 65 63 | & \hski|p 2truec|
|000002d0| 6d 20 26 20 5c 68 73 6b | 69 70 20 35 2e 35 74 72 |m & \hsk|ip 5.5tr|
|000002e0| 75 65 63 6d 20 26 5c 63 | 72 0a 0a 5c 62 69 67 73 |uecm &\c|r..\bigs|
|000002f0| 6b 69 70 0a 7b 5c 6d 61 | 67 6f 6e 65 62 66 20 33 |kip.{\ma|gonebf 3|
|00000300| 2e 31 20 4f 6e 65 20 44 | 69 6d 65 6e 73 69 6f 6e |.1 One D|imension|
|00000310| 61 6c 20 41 72 72 61 79 | 73 20 28 61 72 72 61 79 |al Array|s (array|
|00000320| 29 7d 0a 5c 62 69 67 73 | 6b 69 70 0a 5c 64 65 66 |)}.\bigs|kip.\def|
|00000330| 5c 76 61 72 20 20 7b 24 | 41 24 7d 0a 5c 2b 5c 6f |\var {$|A$}.\+\o|
|00000340| 70 20 20 76 6f 69 64 20 | 20 20 20 20 20 73 6f 72 |p void | sor|
|00000350| 74 20 7b 69 6e 74 5c 20 | 28 2a 63 6d 70 29 28 45 |t {int\ |(*cmp)(E|
|00000360| 5c 26 2c 20 45 5c 26 29 | 2c 5c 20 69 6e 74 5c 20 |\&, E\&)|,\ int\ |
|00000370| 6c 2c 5c 20 69 6e 74 5c | 20 68 7d 20 20 7b 7d 0a |l,\ int\| h} {}.|
|00000380| 5c 2b 5c 6e 6f 70 20 20 | 20 20 20 20 20 20 20 20 |\+\nop | |
|00000390| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 61 70 70 | | {app|
|000003a0| 6c 69 65 73 20 74 68 65 | 20 73 6f 72 74 69 6e 67 |lies the| sorting|
|000003b0| 20 6f 70 65 72 61 74 69 | 6f 6e 20 74 6f 20 74 68 | operati|on to th|
|000003c0| 65 20 73 75 62 2d 61 72 | 72 61 79 7d 0a 5c 2b 5c |e sub-ar|ray}.\+\|
|000003d0| 6e 6f 70 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nop | |
|000003e0| 20 20 20 20 20 20 20 20 | 20 7b 5c 76 61 72 24 5b | | {\var$[|
|000003f0| 6c 2e 2e 68 5d 24 2e 7d | 0a 5c 6d 65 64 73 6b 69 |l..h]$.}|.\medski|
|00000400| 70 0a 5c 2b 5c 6f 70 20 | 76 6f 69 64 20 20 20 20 |p.\+\op |void |
|00000410| 20 20 20 72 65 61 64 20 | 7b 69 73 74 72 65 61 6d | read |{istream|
|00000420| 5c 20 49 7d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |\ I}. | |
|00000430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000440| 20 7b 72 65 61 64 73 20 | 24 62 2d 61 2b 31 24 20 | {reads |$b-a+1$ |
|00000450| 6f 62 6a 65 63 74 73 20 | 6f 66 20 74 79 70 65 20 |objects |of type |
|00000460| 24 45 24 20 66 72 6f 6d | 20 74 68 65 20 69 6e 70 |$E$ from| the inp|
|00000470| 75 74 7d 0a 5c 2b 5c 6e | 6f 70 20 20 20 20 20 20 |ut}.\+\n|op |
|00000480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000490| 7b 73 74 72 65 61 6d 20 | 24 49 24 20 69 6e 74 6f |{stream |$I$ into|
|000004a0| 20 74 68 65 20 61 72 72 | 61 79 20 24 41 24 20 75 | the arr|ay $A$ u|
|000004b0| 73 69 6e 67 20 74 68 65 | 20 6f 76 65 72 6c 6f 61 |sing the| overloa|
|000004c0| 64 65 64 7d 0a 5c 2b 5c | 6e 6f 70 20 20 20 20 20 |ded}.\+\|nop |
|000004d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004e0| 20 7b 24 52 65 61 64 24 | 20 66 75 6e 63 74 69 6f | {$Read$| functio|
|000004f0| 6e 20 28 73 65 63 74 69 | 6f 6e 20 31 2e 36 29 7d |n (secti|on 1.6)}|
|00000500| 0a 5c 73 6d 61 6c 6c 73 | 6b 69 70 0a 5c 2b 5c 6f |.\smalls|kip.\+\o|
|00000510| 70 20 76 6f 69 64 20 20 | 20 20 20 20 20 72 65 61 |p void | rea|
|00000520| 64 20 7b 7d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |d {}. | |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 20 7b 43 61 6c 6c 73 20 | 24 41 24 2e 72 65 61 64 | {Calls |$A$.read|
|00000550| 28 24 63 69 6e 24 29 20 | 74 6f 20 72 65 61 64 20 |($cin$) |to read |
|00000560| 24 41 24 20 66 72 6f 6d | 7d 0a 5c 2b 5c 6e 6f 70 |$A$ from|}.\+\nop|
|00000570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000580| 20 20 20 20 20 20 7b 74 | 68 65 20 73 74 61 6e 64 | {t|he stand|
|00000590| 61 72 64 20 69 6e 70 75 | 74 20 73 74 72 65 61 6d |ard inpu|t stream|
|000005a0| 20 24 63 69 6e 24 2e 7d | 0a 5c 73 6d 61 6c 6c 73 | $cin$.}|.\smalls|
|000005b0| 6b 69 70 0a 5c 2b 5c 6f | 70 20 76 6f 69 64 20 20 |kip.\+\o|p void |
|000005c0| 20 20 20 20 20 72 65 61 | 64 20 7b 73 74 72 69 6e | rea|d {strin|
|000005d0| 67 5c 20 73 7d 0a 20 20 | 20 20 20 20 20 20 20 20 |g\ s}. | |
|000005e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005f0| 20 20 7b 41 73 20 61 62 | 6f 76 65 2c 20 62 75 74 | {As ab|ove, but|
|00000600| 20 75 73 65 73 20 73 74 | 72 69 6e 67 20 24 73 24 | uses st|ring $s$|
|00000610| 20 61 73 20 61 20 70 72 | 6f 6d 70 74 2e 7d 0a 5c | as a pr|ompt.}.\|
|00000620| 73 6d 61 6c 6c 73 6b 69 | 70 0a 5c 2b 5c 6f 70 20 |smallski|p.\+\op |
|00000630| 76 6f 69 64 20 20 20 20 | 20 20 20 70 72 69 6e 74 |void | print|
|00000640| 20 7b 6f 73 74 72 65 61 | 6d 5c 20 4f 2c 5c 20 63 | {ostrea|m\ O,\ c|
|00000650| 68 61 72 5c 20 73 70 61 | 63 65 20 3d 20 27 5c 20 |har\ spa|ce = '\ |
|00000660| 27 7d 20 20 20 20 7b 7d | 20 0a 5c 2b 5c 6e 6f 70 |'} {}| .\+\nop|
|00000670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000680| 20 20 20 20 20 20 7b 50 | 72 69 6e 74 73 20 74 68 | {P|rints th|
|00000690| 65 20 63 6f 6e 74 65 6e | 74 73 20 6f 66 20 61 72 |e conten|ts of ar|
|000006a0| 72 61 79 20 24 41 24 20 | 74 6f 20 74 68 65 20 6f |ray $A$ |to the o|
|000006b0| 75 74 70 75 74 7d 0a 5c | 2b 5c 6e 6f 70 20 20 20 |utput}.\|+\nop |
|000006c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006d0| 20 20 20 7b 73 74 72 65 | 61 6d 20 24 4f 24 20 75 | {stre|am $O$ u|
|000006e0| 73 69 6e 67 20 74 68 65 | 20 6f 76 65 72 6c 6f 61 |sing the| overloa|
|000006f0| 64 20 24 50 72 69 6e 74 | 24 20 66 75 6e 63 74 69 |d $Print|$ functi|
|00000700| 6f 6e 7d 0a 5c 2b 5c 6e | 6f 70 20 20 20 20 20 20 |on}.\+\n|op |
|00000710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000720| 7b 28 73 65 63 74 69 6f | 6e 20 31 2e 35 29 20 74 |{(sectio|n 1.5) t|
|00000730| 6f 20 70 72 69 6e 74 20 | 65 61 63 68 20 65 6c 65 |o print |each ele|
|00000740| 6d 65 6e 74 2e 20 54 68 | 65 20 65 6c 65 6d 65 6e |ment. Th|e elemen|
|00000750| 74 73 7d 0a 5c 2b 5c 6e | 6f 70 20 20 20 20 20 20 |ts}.\+\n|op |
|00000760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000770| 7b 61 72 65 20 73 65 70 | 61 72 61 74 65 64 20 62 |{are sep|arated b|
|00000780| 79 20 74 68 65 20 73 70 | 61 63 65 20 63 68 61 72 |y the sp|ace char|
|00000790| 61 63 74 65 72 20 24 73 | 70 61 63 65 24 2e 7d 0a |acter $s|pace$.}.|
|000007a0| 5c 73 6d 61 6c 6c 73 6b | 69 70 0a 5c 2b 5c 6f 70 |\smallsk|ip.\+\op|
|000007b0| 20 76 6f 69 64 20 20 20 | 20 20 20 20 70 72 69 6e | void | prin|
|000007c0| 74 20 7b 63 68 61 72 5c | 20 73 70 61 63 65 20 3d |t {char\| space =|
|000007d0| 20 27 5c 20 27 7d 0a 20 | 20 20 20 20 20 20 20 20 | '\ '}. | |
|000007e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000007f0| 20 20 20 7b 43 61 6c 6c | 73 20 24 41 24 2e 70 72 | {Call|s $A$.pr|
|00000800| 69 6e 74 28 24 63 6f 75 | 74 24 2c 20 24 73 70 61 |int($cou|t$, $spa|
|00000810| 63 65 24 29 20 74 6f 20 | 70 72 69 6e 74 20 24 41 |ce$) to |print $A|
|00000820| 24 20 6f 6e 7d 0a 5c 2b | 5c 6e 6f 70 20 20 20 20 |$ on}.\+|\nop |
|00000830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000840| 20 20 7b 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 | {the s|tandard |
|00000850| 6f 75 74 70 75 74 20 73 | 74 72 65 61 6d 20 24 63 |output s|tream $c|
|00000860| 6f 75 74 24 2e 7d 0a 5c | 73 6d 61 6c 6c 73 6b 69 |out$.}.\|smallski|
|00000870| 70 0a 5c 2b 5c 6f 70 20 | 76 6f 69 64 20 20 20 20 |p.\+\op |void |
|00000880| 20 20 20 70 72 69 6e 74 | 20 7b 73 74 72 69 6e 67 | print| {string|
|00000890| 5c 20 73 2c 5c 20 63 68 | 61 72 5c 20 73 70 61 63 |\ s,\ ch|ar\ spac|
|000008a0| 65 20 3d 20 27 5c 20 27 | 7d 20 20 20 20 7b 7d 20 |e = '\ '|} {} |
|000008b0| 0a 5c 2b 5c 6e 6f 70 20 | 20 20 20 20 20 20 20 20 |.\+\nop | |
|000008c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 41 73 | | {As|
|000008d0| 20 61 62 6f 76 65 2c 20 | 62 75 74 20 75 73 65 73 | above, |but uses|
|000008e0| 20 73 74 72 69 6e 67 20 | 24 73 24 20 61 73 20 61 | string |$s$ as a|
|000008f0| 20 68 65 61 64 65 72 2e | 7d 0a 0a 0a 5c 76 66 69 | header.|}...\vfi|
|00000900| 6c 6c 5c 65 6a 65 63 74 | 0a 0a 5c 62 69 67 73 6b |ll\eject|..\bigsk|
|00000910| 69 70 0a 7b 5c 6d 61 67 | 6f 6e 65 62 66 20 33 2e |ip.{\mag|onebf 3.|
|00000920| 37 20 4c 69 6e 65 61 72 | 20 4c 69 73 74 73 20 28 |7 Linear| Lists (|
|00000930| 6c 69 73 74 29 7d 0a 5c | 62 69 67 73 6b 69 70 0a |list)}.\|bigskip.|
|00000940| 5c 64 65 66 5c 76 61 72 | 20 7b 24 4c 24 7d 0a 5c |\def\var| {$L$}.\|
|00000950| 2b 5c 6f 70 20 76 6f 69 | 64 20 20 20 20 20 20 20 |+\op voi|d |
|00000960| 72 65 61 64 20 7b 69 73 | 74 72 65 61 6d 5c 20 49 |read {is|tream\ I|
|00000970| 2c 5c 20 63 68 61 72 5c | 20 64 65 6c 69 6d 20 3d |,\ char\| delim =|
|00000980| 20 27 5c 62 61 63 6b 73 | 6c 61 73 68 20 6e 27 7d | '\backs|lash n'}|
|00000990| 20 20 20 20 20 7b 7d 0a | 5c 2b 5c 6e 6f 70 20 20 | {}.|\+\nop |
|000009a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009b0| 20 20 20 20 7b 72 65 61 | 64 73 20 61 20 73 65 71 | {rea|ds a seq|
|000009c0| 75 65 6e 63 65 20 6f 66 | 20 6f 62 6a 65 63 74 73 |uence of| objects|
|000009d0| 20 6f 66 20 74 79 70 65 | 20 24 45 24 20 74 65 72 | of type| $E$ ter|
|000009e0| 6d 69 6e 61 74 65 64 7d | 0a 5c 2b 5c 6e 6f 70 20 |minated}|.\+\nop |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a00| 20 20 20 20 20 7b 62 79 | 20 74 68 65 20 64 65 6c | {by| the del|
|00000a10| 69 6d 69 74 65 72 20 24 | 64 65 6c 69 6d 24 20 66 |imiter $|delim$ f|
|00000a20| 72 6f 6d 20 74 68 65 20 | 69 6e 70 75 74 20 73 74 |rom the |input st|
|00000a30| 72 65 61 6d 20 24 49 24 | 7d 0a 5c 2b 5c 6e 6f 70 |ream $I$|}.\+\nop|
|00000a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a50| 20 20 20 20 20 20 7b 75 | 73 69 6e 67 20 74 68 65 | {u|sing the|
|00000a60| 20 6f 76 65 72 6c 6f 61 | 64 65 64 20 24 52 65 61 | overloa|ded $Rea|
|00000a70| 64 24 20 66 75 6e 63 74 | 69 6f 6e 20 28 73 65 63 |d$ funct|ion (sec|
|00000a80| 74 69 6f 6e 20 31 2e 35 | 29 7d 0a 5c 2b 5c 6e 6f |tion 1.5|)}.\+\no|
|00000a90| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | |
|00000aa0| 20 20 20 20 20 20 20 7b | 24 4c 24 20 69 73 20 6d | {|$L$ is m|
|00000ab0| 61 64 65 20 61 20 6c 69 | 73 74 20 6f 66 20 61 70 |ade a li|st of ap|
|00000ac0| 70 72 6f 70 72 69 61 74 | 65 20 6c 65 6e 67 74 68 |propriat|e length|
|00000ad0| 20 61 6e 64 20 74 68 65 | 7d 0a 5c 2b 5c 6e 6f 70 | and the|}.\+\nop|
|00000ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000af0| 20 20 20 20 20 20 7b 73 | 65 71 75 65 6e 63 65 20 | {s|equence |
|00000b00| 69 73 20 73 74 6f 72 65 | 64 20 69 6e 20 24 4c 24 |is store|d in $L$|
|00000b10| 2e 7d 0a 5c 73 6d 61 6c | 6c 73 6b 69 70 0a 5c 2b |.}.\smal|lskip.\+|
|00000b20| 5c 6f 70 20 76 6f 69 64 | 20 20 20 20 20 20 20 72 |\op void| r|
|00000b30| 65 61 64 20 7b 63 68 61 | 72 5c 20 64 65 6c 69 6d |ead {cha|r\ delim|
|00000b40| 20 3d 20 27 5c 62 61 63 | 6b 73 6c 61 73 68 20 6e | = '\bac|kslash n|
|00000b50| 27 7d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |'}. | |
|00000b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00000b70| 43 61 6c 6c 73 20 24 4c | 24 2e 72 65 61 64 28 24 |Calls $L|$.read($|
|00000b80| 63 69 6e 24 2c 20 24 64 | 65 6c 69 6d 24 29 20 74 |cin$, $d|elim$) t|
|00000b90| 6f 20 72 65 61 64 20 24 | 4c 24 20 66 72 6f 6d 7d |o read $|L$ from}|
|00000ba0| 0a 5c 2b 5c 6e 6f 70 20 | 20 20 20 20 20 20 20 20 |.\+\nop | |
|00000bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 74 68 | | {th|
|00000bc0| 65 20 73 74 61 6e 64 61 | 72 64 20 69 6e 70 75 74 |e standa|rd input|
|00000bd0| 20 73 74 72 65 61 6d 20 | 24 63 69 6e 24 2e 7d 0a | stream |$cin$.}.|
|00000be0| 5c 73 6d 61 6c 6c 73 6b | 69 70 0a 5c 2b 5c 6f 70 |\smallsk|ip.\+\op|
|00000bf0| 20 76 6f 69 64 20 20 20 | 20 20 20 20 72 65 61 64 | void | read|
|00000c00| 20 7b 73 74 72 69 6e 67 | 5c 20 73 2c 5c 20 63 68 | {string|\ s,\ ch|
|00000c10| 61 72 5c 20 64 65 6c 69 | 6d 20 3d 20 27 5c 62 61 |ar\ deli|m = '\ba|
|00000c20| 63 6b 73 6c 61 73 68 20 | 6e 27 7d 20 20 20 20 20 |ckslash |n'} |
|00000c30| 7b 7d 0a 5c 2b 5c 6e 6f | 70 20 20 20 20 20 20 20 |{}.\+\no|p |
|00000c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00000c50| 41 73 20 61 62 6f 76 65 | 2c 20 62 75 74 20 75 73 |As above|, but us|
|00000c60| 65 73 20 73 74 72 69 6e | 67 20 24 73 24 20 61 73 |es strin|g $s$ as|
|00000c70| 20 61 20 70 72 6f 6d 70 | 74 2e 7d 0a 5c 73 6d 61 | a promp|t.}.\sma|
|00000c80| 6c 6c 73 6b 69 70 0a 5c | 2b 5c 6f 70 20 76 6f 69 |llskip.\|+\op voi|
|00000c90| 64 20 20 20 20 20 20 20 | 70 72 69 6e 74 20 7b 6f |d |print {o|
|00000ca0| 73 74 72 65 61 6d 5c 20 | 4f 2c 5c 20 63 68 61 72 |stream\ |O,\ char|
|00000cb0| 5c 20 73 70 61 63 65 20 | 3d 20 27 5c 20 27 7d 20 |\ space |= '\ '} |
|00000cc0| 20 20 20 7b 7d 20 0a 5c | 2b 5c 6e 6f 70 20 20 20 | {} .\|+\nop |
|00000cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ce0| 20 20 20 7b 50 72 69 6e | 74 73 20 74 68 65 20 63 | {Prin|ts the c|
|00000cf0| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 6c 69 73 74 20 |ontents |of list |
|00000d00| 24 4c 24 20 74 6f 20 74 | 68 65 20 6f 75 74 70 75 |$L$ to t|he outpu|
|00000d10| 74 7d 0a 5c 2b 5c 6e 6f | 70 20 20 20 20 20 20 20 |t}.\+\no|p |
|00000d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00000d30| 73 74 72 65 61 6d 20 24 | 4f 24 20 75 73 69 6e 67 |stream $|O$ using|
|00000d40| 20 74 68 65 20 6f 76 65 | 72 6c 6f 61 64 20 24 50 | the ove|rload $P|
|00000d50| 72 69 6e 74 24 20 66 75 | 6e 63 74 69 6f 6e 7d 0a |rint$ fu|nction}.|
|00000d60| 5c 2b 5c 6e 6f 70 20 20 | 20 20 20 20 20 20 20 20 |\+\nop | |
|00000d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 28 73 65 | | {(se|
|00000d80| 63 74 69 6f 6e 20 31 2e | 35 29 20 74 6f 20 70 72 |ction 1.|5) to pr|
|00000d90| 69 6e 74 20 65 61 63 68 | 20 65 6c 65 6d 65 6e 74 |int each| element|
|00000da0| 2e 20 54 68 65 20 65 6c | 65 6d 65 6e 74 73 7d 0a |. The el|ements}.|
|00000db0| 5c 2b 5c 6e 6f 70 20 20 | 20 20 20 20 20 20 20 20 |\+\nop | |
|00000dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 61 72 65 | | {are|
|00000dd0| 20 73 65 70 61 72 61 74 | 65 64 20 62 79 20 74 68 | separat|ed by th|
|00000de0| 65 20 73 70 61 63 65 20 | 63 68 61 72 61 63 74 65 |e space |characte|
|00000df0| 72 20 24 73 70 61 63 65 | 24 2e 7d 0a 5c 73 6d 61 |r $space|$.}.\sma|
|00000e00| 6c 6c 73 6b 69 70 0a 5c | 2b 5c 6f 70 20 76 6f 69 |llskip.\|+\op voi|
|00000e10| 64 20 20 20 20 20 20 20 | 70 72 69 6e 74 20 7b 63 |d |print {c|
|00000e20| 68 61 72 5c 20 73 70 61 | 63 65 20 3d 20 27 5c 20 |har\ spa|ce = '\ |
|00000e30| 27 7d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |'}. | |
|00000e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00000e50| 43 61 6c 6c 73 20 24 4c | 24 2e 70 72 69 6e 74 28 |Calls $L|$.print(|
|00000e60| 24 63 6f 75 74 24 2c 20 | 24 73 70 61 63 65 24 29 |$cout$, |$space$)|
|00000e70| 20 74 6f 20 70 72 69 6e | 74 20 24 4c 24 20 6f 6e | to prin|t $L$ on|
|00000e80| 7d 0a 5c 2b 5c 6e 6f 70 | 20 20 20 20 20 20 20 20 |}.\+\nop| |
|00000e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 74 | | {t|
|00000ea0| 68 65 20 73 74 61 6e 64 | 61 72 64 20 6f 75 74 70 |he stand|ard outp|
|00000eb0| 75 74 20 73 74 72 65 61 | 6d 20 24 63 6f 75 74 24 |ut strea|m $cout$|
|00000ec0| 2e 7d 0a 5c 73 6d 61 6c | 6c 73 6b 69 70 0a 5c 2b |.}.\smal|lskip.\+|
|00000ed0| 5c 6f 70 20 76 6f 69 64 | 20 20 20 20 20 20 20 70 |\op void| p|
|00000ee0| 72 69 6e 74 20 7b 73 74 | 72 69 6e 67 5c 20 73 2c |rint {st|ring\ s,|
|00000ef0| 5c 20 63 68 61 72 5c 20 | 73 70 61 63 65 20 3d 20 |\ char\ |space = |
|00000f00| 27 5c 20 27 7d 20 20 20 | 20 7b 7d 20 0a 5c 2b 5c |'\ '} | {} .\+\|
|00000f10| 6e 6f 70 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nop | |
|00000f20| 20 20 20 20 20 20 20 20 | 20 7b 41 73 20 61 62 6f | | {As abo|
|00000f30| 76 65 2c 20 62 75 74 20 | 75 73 65 73 20 73 74 72 |ve, but |uses str|
|00000f40| 69 6e 67 20 24 73 24 20 | 61 73 20 61 20 68 65 61 |ing $s$ |as a hea|
|00000f50| 64 65 72 2e 7d 0a 0a 0a | 5c 62 69 67 73 6b 69 70 |der.}...|\bigskip|
|00000f60| 0a 7b 5c 6d 61 67 6f 6e | 65 62 66 20 35 2e 34 20 |.{\magon|ebf 5.4 |
|00000f70| 20 50 61 72 61 6d 65 74 | 65 72 69 7a 65 64 20 47 | Paramet|erized G|
|00000f80| 72 61 70 68 73 20 28 47 | 52 41 50 48 29 7d 0a 5c |raphs (G|RAPH)}.\|
|00000f90| 62 69 67 73 6b 69 70 0a | 5c 64 65 66 5c 76 61 72 |bigskip.|\def\var|
|00000fa0| 20 7b 24 47 24 7d 0a 5c | 2b 5c 6f 70 20 76 6f 69 | {$G$}.\|+\op voi|
|00000fb0| 64 20 20 20 77 72 69 74 | 65 20 7b 73 74 72 69 6e |d writ|e {strin|
|00000fc0| 67 5c 20 66 6e 61 6d 65 | 7d 20 20 20 20 20 20 20 |g\ fname|} |
|00000fd0| 20 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00000fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 77 72 69 | | {wri|
|00000ff0| 74 65 73 20 24 47 24 20 | 74 6f 20 74 68 65 20 66 |tes $G$ |to the f|
|00001000| 69 6c 65 20 77 69 74 68 | 20 6e 61 6d 65 20 24 66 |ile with| name $f|
|00001010| 6e 61 6d 65 24 2e 20 54 | 68 65 7d 0a 5c 2b 5c 6e |name$. T|he}.\+\n|
|00001020| 6f 70 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |op | |
|00001030| 20 20 20 20 20 20 7b 6f | 76 65 72 6c 6f 61 64 65 | {o|verloade|
|00001040| 64 20 66 75 6e 63 74 69 | 6f 6e 73 20 24 50 72 69 |d functi|ons $Pri|
|00001050| 6e 74 28 76 74 79 70 65 | 2c 6f 73 74 72 65 61 6d |nt(vtype|,ostream|
|00001060| 29 24 7d 0a 5c 2b 5c 6e | 6f 70 20 20 20 20 20 20 |)$}.\+\n|op |
|00001070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 61 | | {a|
|00001080| 6e 64 20 24 50 72 69 6e | 74 28 65 74 79 70 65 2c |nd $Prin|t(etype,|
|00001090| 6f 73 74 72 65 61 6d 29 | 24 20 28 63 66 2e 20 73 |ostream)|$ (cf. s|
|000010a0| 65 63 74 69 6f 6e 20 31 | 2e 36 29 7d 0a 5c 2b 5c |ection 1|.6)}.\+\|
|000010b0| 6e 6f 70 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nop | |
|000010c0| 20 20 20 20 20 20 20 7b | 61 72 65 20 75 73 65 64 | {|are used|
|000010d0| 20 74 6f 20 77 72 69 74 | 65 20 74 68 65 20 6e 6f | to writ|e the no|
|000010e0| 64 65 20 61 6e 64 20 65 | 64 67 65 20 65 6e 74 72 |de and e|dge entr|
|000010f0| 69 65 73 7d 0a 5c 2b 5c | 6e 6f 70 20 20 20 20 20 |ies}.\+\|nop |
|00001100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00001110| 6f 66 20 24 47 24 20 72 | 65 73 70 65 63 74 69 76 |of $G$ r|espectiv|
|00001120| 65 6c 79 2e 7d 0a 5c 73 | 6d 61 6c 6c 73 6b 69 70 |ely.}.\s|mallskip|
|00001130| 0a 5c 2b 5c 6f 70 20 69 | 6e 74 20 20 20 20 72 65 |.\+\op i|nt re|
|00001140| 61 64 20 7b 73 74 72 69 | 6e 67 5c 20 66 6e 61 6d |ad {stri|ng\ fnam|
|00001150| 65 7d 20 20 20 20 20 20 | 20 20 20 0a 20 20 20 20 |e} | . |
|00001160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001170| 20 20 20 20 20 20 7b 72 | 65 61 64 73 20 24 47 24 | {r|eads $G$|
|00001180| 20 66 72 6f 6d 20 74 68 | 65 20 66 69 6c 65 20 77 | from th|e file w|
|00001190| 69 74 68 20 6e 61 6d 65 | 20 24 66 6e 61 6d 65 24 |ith name| $fname$|
|000011a0| 2e 20 54 68 65 7d 0a 5c | 2b 5c 6e 6f 70 20 20 20 |. The}.\|+\nop |
|000011b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011c0| 20 7b 6f 76 65 72 6c 6f | 61 64 65 64 20 66 75 6e | {overlo|aded fun|
|000011d0| 63 74 69 6f 6e 73 20 24 | 52 65 61 64 28 76 74 79 |ctions $|Read(vty|
|000011e0| 70 65 2c 69 73 74 72 65 | 61 6d 29 24 7d 0a 5c 2b |pe,istre|am)$}.\+|
|000011f0| 5c 6e 6f 70 20 20 20 20 | 20 20 20 20 20 20 20 20 |\nop | |
|00001200| 20 20 20 20 20 20 20 20 | 7b 61 6e 64 20 24 52 65 | |{and $Re|
|00001210| 61 64 28 65 74 79 70 65 | 2c 69 73 74 72 65 61 6d |ad(etype|,istream|
|00001220| 29 24 20 28 63 66 2e 20 | 73 65 63 74 69 6f 6e 20 |)$ (cf. |section |
|00001230| 31 2e 36 29 7d 0a 5c 2b | 5c 6e 6f 70 20 20 20 20 |1.6)}.\+|\nop |
|00001240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001250| 7b 61 72 65 20 75 73 65 | 64 20 74 6f 20 72 65 61 |{are use|d to rea|
|00001260| 64 20 74 68 65 20 6e 6f | 64 65 20 61 6e 64 20 65 |d the no|de and e|
|00001270| 64 67 65 20 65 6e 74 72 | 69 65 73 7d 0a 5c 2b 5c |dge entr|ies}.\+\|
|00001280| 6e 6f 70 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nop | |
|00001290| 20 20 20 20 20 20 20 7b | 6f 66 20 24 47 24 20 72 | {|of $G$ r|
|000012a0| 65 73 70 65 63 74 69 76 | 65 6c 79 2e 20 52 65 74 |espectiv|ely. Ret|
|000012b0| 75 72 6e 73 20 65 72 72 | 6f 72 20 63 6f 64 65 7d |urns err|or code}|
|000012c0| 0a 5c 2b 5c 6e 6f 70 20 | 20 20 20 20 20 20 20 20 |.\+\nop | |
|000012d0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 31 20 5c 71 | | {1 \q|
|000012e0| 75 61 64 20 69 66 20 66 | 69 6c 65 20 24 66 6e 61 |uad if f|ile $fna|
|000012f0| 6d 65 24 20 64 6f 65 73 | 20 6e 6f 74 20 65 78 69 |me$ does| not exi|
|00001300| 73 74 7d 0a 5c 2b 5c 6e | 6f 70 20 20 20 20 20 20 |st}.\+\n|op |
|00001310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 32 | | {2|
|00001320| 20 5c 71 75 61 64 20 69 | 66 20 67 72 61 70 68 20 | \quad i|f graph |
|00001330| 69 73 20 6e 6f 74 20 6f | 66 20 74 79 70 65 20 24 |is not o|f type $|
|00001340| 47 52 41 50 48 28 76 74 | 79 70 65 2c 65 74 79 70 |GRAPH(vt|ype,etyp|
|00001350| 65 29 24 7d 0a 5c 2b 5c | 6e 6f 70 20 20 20 20 20 |e)$}.\+\|nop |
|00001360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|00001370| 33 20 5c 71 75 61 64 20 | 69 66 20 66 69 6c 65 20 |3 \quad |if file |
|00001380| 24 66 6e 61 6d 65 24 20 | 64 6f 65 73 20 6e 6f 74 |$fname$ |does not|
|00001390| 20 63 6f 6e 74 61 69 6e | 20 61 20 67 72 61 70 68 | contain| a graph|
|000013a0| 7d 0a 5c 2b 5c 6e 6f 70 | 20 20 20 20 20 20 20 20 |}.\+\nop| |
|000013b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 30 20 5c | | {0 \|
|000013c0| 71 75 61 64 20 6f 74 68 | 65 72 77 69 73 65 2e 7d |quad oth|erwise.}|
|000013d0| 0a 0a 5c 76 66 69 6c 6c | 5c 65 6a 65 63 74 0a 0a |..\vfill|\eject..|
|000013e0| 5c 62 69 67 73 6b 69 70 | 0a 7b 5c 6d 61 67 6f 6e |\bigskip|.{\magon|
|000013f0| 65 62 66 20 36 2e 33 20 | 53 65 74 73 20 6f 66 20 |ebf 6.3 |Sets of |
|00001400| 74 77 6f 2d 64 69 6d 65 | 6e 73 69 6f 6e 61 6c 20 |two-dime|nsional |
|00001410| 70 6f 69 6e 74 73 20 28 | 70 6f 69 6e 74 5c 5f 73 |points (|point\_s|
|00001420| 65 74 29 7d 0a 5c 62 69 | 67 73 6b 69 70 0a 5c 64 |et)}.\bi|gskip.\d|
|00001430| 65 66 5c 76 61 72 20 20 | 7b 24 53 24 7d 0a 5c 2b |ef\var |{$S$}.\+|
|00001440| 5c 63 6c 65 61 72 74 61 | 62 73 20 26 20 5c 68 73 |\clearta|bs & \hs|
|00001450| 6b 69 70 20 33 74 72 75 | 65 63 6d 20 26 20 5c 68 |kip 3tru|ecm & \h|
|00001460| 73 6b 69 70 20 34 2e 35 | 74 72 75 65 63 6d 20 26 |skip 4.5|truecm &|
|00001470| 5c 63 72 0a 5c 2b 5c 6f | 70 20 6c 69 73 74 28 70 |\cr.\+\o|p list(p|
|00001480| 73 5c 5f 69 74 65 6d 29 | 20 63 6f 6e 76 65 78 5c |s\_item)| convex\|
|00001490| 5f 68 75 6c 6c 20 7b 7d | 20 7b 7d 0a 5c 2b 5c 6e |_hull {}| {}.\+\n|
|000014a0| 6f 70 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |op | |
|000014b0| 20 20 7b 72 65 74 75 72 | 6e 73 20 74 68 65 20 6c | {retur|ns the l|
|000014c0| 69 73 74 20 6f 66 20 69 | 74 65 6d 73 20 63 6f 6e |ist of i|tems con|
|000014d0| 74 61 69 6e 69 6e 67 7d | 0a 5c 2b 5c 6e 6f 70 20 |taining}|.\+\nop |
|000014e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|000014f0| 61 6c 6c 20 70 6f 69 6e | 74 73 20 6f 66 20 74 68 |all poin|ts of th|
|00001500| 65 20 63 6f 6e 76 65 78 | 20 68 75 6c 6c 20 6f 66 |e convex| hull of|
|00001510| 20 5c 76 61 72 7d 0a 5c | 2b 5c 6e 6f 70 20 20 20 | \var}.\|+\nop |
|00001520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 69 6e | | {in|
|00001530| 20 63 6c 6f 63 6b 77 69 | 73 65 20 6f 72 64 65 72 | clockwi|se order|
|00001540| 2e 7d 0a 0a 0a 5c 62 69 | 67 73 6b 69 70 0a 7b 5c |.}...\bi|gskip.{\|
|00001550| 6d 61 67 6f 6e 65 62 66 | 20 36 2e 31 2e 36 20 50 |magonebf| 6.1.6 P|
|00001560| 6c 61 6e 65 20 41 6c 67 | 6f 72 69 74 68 6d 73 7d |lane Alg|orithms}|
|00001570| 0a 5c 62 69 67 73 6b 69 | 70 0a 0a 24 5c 62 75 6c |.\bigski|p..$\bul|
|00001580| 6c 65 74 24 20 7b 5c 62 | 66 20 56 6f 72 6f 6e 6f |let$ {\b|f Vorono|
|00001590| 69 20 44 69 61 67 72 61 | 6d 73 7d 0a 0a 24 76 6f |i Diagra|ms}..$vo|
|000015a0| 69 64 24 5c 71 75 61 64 | 20 56 4f 52 4f 4e 4f 49 |id$\quad| VORONOI|
|000015b0| 24 28 6c 69 73 74 28 70 | 6f 69 6e 74 29 5c 26 20 |$(list(p|oint)\& |
|000015c0| 5c 20 73 69 74 65 73 2c | 5c 20 72 65 61 6c 5c 20 |\ sites,|\ real\ |
|000015d0| 52 2c 5c 20 47 52 41 50 | 48 28 70 6f 69 6e 74 2c |R,\ GRAP|H(point,|
|000015e0| 70 6f 69 6e 74 29 5c 26 | 5c 20 47 29 24 0a 0a 56 |point)\&|\ G)$..V|
|000015f0| 4f 52 4f 4e 4f 49 20 74 | 61 6b 65 73 20 61 73 20 |ORONOI t|akes as |
|00001600| 69 6e 70 75 74 20 61 20 | 6c 69 73 74 20 6f 66 20 |input a |list of |
|00001610| 70 6f 69 6e 74 73 20 20 | 24 73 69 74 65 73 24 20 |points |$sites$ |
|00001620| 61 6e 64 20 61 20 72 65 | 61 6c 20 6e 75 6d 62 65 |and a re|al numbe|
|00001630| 72 20 0a 24 52 24 2e 20 | 49 74 20 63 6f 6d 70 75 |r .$R$. |It compu|
|00001640| 74 65 73 20 61 20 64 69 | 72 65 63 74 65 64 20 67 |tes a di|rected g|
|00001650| 72 61 70 68 20 24 47 24 | 20 72 65 70 72 65 73 65 |raph $G$| represe|
|00001660| 6e 74 69 6e 67 20 74 68 | 65 20 70 6c 61 6e 61 72 |nting th|e planar|
|00001670| 20 73 75 62 64 69 76 69 | 73 69 6f 6e 0a 64 65 66 | subdivi|sion.def|
|00001680| 69 6e 65 64 20 62 79 20 | 74 68 65 20 56 6f 72 6f |ined by |the Voro|
|00001690| 6e 6f 69 2d 64 69 61 67 | 72 61 6d 20 6f 66 20 24 |noi-diag|ram of $|
|000016a0| 73 69 74 65 73 24 20 77 | 68 65 72 65 20 61 6c 6c |sites$ w|here all|
|000016b0| 20 60 60 69 6e 66 69 6e | 69 74 65 22 20 65 64 67 | ``infin|ite" edg|
|000016c0| 65 73 20 68 61 76 65 0a | 6c 65 6e 67 74 68 20 24 |es have.|length $|
|000016d0| 52 24 2e 20 46 6f 72 20 | 65 61 63 68 20 6e 6f 64 |R$. For |each nod|
|000016e0| 65 20 24 76 24 20 24 47 | 24 2e 69 6e 66 28 24 76 |e $v$ $G|$.inf($v|
|000016f0| 24 29 20 69 73 20 74 68 | 65 20 63 6f 72 72 65 73 |$) is th|e corres|
|00001700| 70 6f 6e 64 69 6e 67 20 | 56 6f 72 6f 6e 6f 69 20 |ponding |Voronoi |
|00001710| 0a 76 65 72 74 65 78 20 | 28 24 70 6f 69 6e 74 24 |.vertex |($point$|
|00001720| 29 20 61 6e 64 20 66 6f | 72 20 65 61 63 68 20 65 |) and fo|r each e|
|00001730| 64 67 65 20 24 65 24 20 | 20 24 47 24 2e 69 6e 66 |dge $e$ | $G$.inf|
|00001740| 28 24 65 24 29 20 69 73 | 20 74 68 65 20 73 69 74 |($e$) is| the sit|
|00001750| 65 20 28 24 70 6f 69 6e | 74 24 29 20 0a 77 68 6f |e ($poin|t$) .who|
|00001760| 73 65 20 56 6f 72 6f 6e | 6f 69 20 72 65 67 69 6f |se Voron|oi regio|
|00001770| 6e 20 69 73 20 62 6f 75 | 6e 64 65 64 20 62 79 20 |n is bou|nded by |
|00001780| 24 65 24 2e 20 0a 0a 5c | 62 69 67 73 6b 69 70 0a |$e$. ..\|bigskip.|
|00001790| 7b 5c 6d 61 67 6f 6e 65 | 62 66 20 36 2e 37 20 20 |{\magone|bf 6.7 |
|000017a0| 47 72 61 70 68 69 63 20 | 57 69 6e 64 6f 77 73 20 |Graphic |Windows |
|000017b0| 28 77 69 6e 64 6f 77 29 | 7d 0a 0a 44 61 74 61 20 |(window)|}..Data |
|000017c0| 74 79 70 65 20 24 67 77 | 69 6e 64 6f 77 24 20 6e |type $gw|indow$ n|
|000017d0| 6f 20 6c 6f 6e 67 65 72 | 20 65 78 69 73 74 73 2c |o longer| exists,|
|000017e0| 20 69 74 20 69 73 20 72 | 65 70 6c 61 63 65 64 20 | it is r|eplaced |
|000017f0| 62 79 20 64 61 74 61 20 | 74 79 70 65 20 24 77 69 |by data |type $wi|
|00001800| 6e 64 6f 77 24 0a 0a 54 | 68 65 20 64 61 74 61 20 |ndow$..T|he data |
|00001810| 74 79 70 65 20 24 77 69 | 6e 64 6f 77 24 20 70 72 |type $wi|ndow$ pr|
|00001820| 6f 76 69 64 65 73 20 61 | 6e 20 69 6e 74 65 72 66 |ovides a|n interf|
|00001830| 61 63 65 20 66 6f 72 20 | 74 68 65 20 69 6e 70 75 |ace for |the inpu|
|00001840| 74 20 61 6e 64 20 0a 6f | 75 74 70 75 74 20 6f 66 |t and .o|utput of|
|00001850| 20 62 61 73 69 63 20 74 | 77 6f 2d 64 69 6d 65 6e | basic t|wo-dimen|
|00001860| 73 69 6e 61 6c 20 67 65 | 6f 6d 65 74 72 69 63 20 |sinal ge|ometric |
|00001870| 6f 62 6a 65 63 74 73 20 | 28 63 66 2e 20 73 65 63 |objects |(cf. sec|
|00001880| 74 69 6f 6e 20 35 2e 31 | 29 20 0a 75 73 69 6e 67 |tion 5.1|) .using|
|00001890| 20 74 68 65 20 58 31 31 | 20 28 78 76 69 65 77 29 | the X11| (xview)|
|000018a0| 20 6f 72 20 53 75 6e 56 | 69 65 77 20 77 69 6e 64 | or SunV|iew wind|
|000018b0| 6f 77 20 73 79 73 74 65 | 6d 2e 0a 54 68 65 72 65 |ow syste|m..There|
|000018c0| 20 61 72 65 20 74 77 6f | 20 6f 62 6a 65 63 74 20 | are two| object |
|000018d0| 63 6f 64 65 20 6c 69 62 | 72 61 72 69 65 73 20 28 |code lib|raries (|
|000018e0| 6c 69 62 57 73 2e 61 2c | 20 6c 69 62 57 78 2e 61 |libWs.a,| libWx.a|
|000018f0| 29 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 0a 69 6d |) contai|ning .im|
|00001900| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 73 20 66 6f |plementa|tions fo|
|00001910| 72 20 64 69 66 66 65 72 | 65 6e 74 20 65 6e 76 69 |r differ|ent envi|
|00001920| 72 6f 6e 6d 65 6e 74 73 | 2e 20 41 70 70 6c 69 63 |ronments|. Applic|
|00001930| 61 74 69 6f 6e 20 70 72 | 6f 67 72 61 6d 73 20 75 |ation pr|ograms u|
|00001940| 73 69 6e 67 20 64 61 74 | 61 20 74 79 70 65 0a 24 |sing dat|a type.$|
|00001950| 77 69 6e 64 6f 77 24 20 | 68 61 76 65 20 74 6f 20 |window$ |have to |
|00001960| 62 65 20 6c 69 6e 6b 65 | 64 20 77 69 74 68 20 6f |be linke|d with o|
|00001970| 6e 65 20 6f 66 20 74 68 | 65 73 65 20 6c 69 62 72 |ne of th|ese libr|
|00001980| 61 72 69 65 73 20 28 63 | 66 2e 20 73 65 63 74 69 |aries (c|f. secti|
|00001990| 6f 6e 7e 31 2e 36 29 3a | 0a 0a 5c 62 65 67 69 6e |on~1.6):|..\begin|
|000019a0| 69 74 65 6d 0a 5c 69 74 | 65 6d 7b 20 61 29 7d 20 |item.\it|em{ a)} |
|000019b0| 0a 46 6f 72 20 74 68 65 | 20 53 75 6e 56 69 65 77 |.For the| SunView|
|000019c0| 20 77 69 6e 64 6f 77 20 | 73 79 73 74 65 6d 3a 5c | window |system:\|
|000019d0| 6e 6c 0a 43 43 20 24 70 | 72 6f 67 2e 63 24 20 2d |nl.CC $p|rog.c$ -|
|000019e0| 6c 57 73 20 2d 6c 50 20 | 2d 6c 47 20 2d 6c 4c 20 |lWs -lP |-lG -lL |
|000019f0| 2d 6c 6d 20 20 2d 6c 73 | 75 6e 74 6f 6f 6c 20 2d |-lm -ls|untool -|
|00001a00| 6c 73 75 6e 77 69 6e 64 | 6f 77 20 2d 6c 70 69 78 |lsunwind|ow -lpix|
|00001a10| 72 65 63 74 0a 0a 5c 69 | 74 65 6d 7b 20 62 29 7d |rect..\i|tem{ b)}|
|00001a20| 20 0a 46 6f 72 20 74 68 | 65 20 58 31 31 20 28 6f | .For th|e X11 (o|
|00001a30| 70 65 6e 20 77 69 6e 64 | 6f 77 73 29 20 77 69 6e |pen wind|ows) win|
|00001a40| 64 6f 77 20 73 79 73 74 | 65 6d 3a 5c 6e 6c 0a 43 |dow syst|em:\nl.C|
|00001a50| 43 20 24 70 72 6f 67 2e | 63 24 20 2d 6c 57 78 20 |C $prog.|c$ -lWx |
|00001a60| 2d 6c 50 20 2d 6c 47 20 | 2d 6c 4c 20 2d 6c 6d 20 |-lP -lG |-lL -lm |
|00001a70| 20 2d 6c 78 76 69 65 77 | 20 2d 6c 6f 6c 67 78 20 | -lxview| -lolgx |
|00001a80| 2d 6c 58 31 31 20 0a 0a | 5c 65 6e 64 69 74 65 6d |-lX11 ..|\enditem|
|00001a90| 0a 0a 5c 76 66 69 6c 6c | 5c 65 6a 65 63 74 0a 0a |..\vfill|\eject..|
|00001aa0| 7b 5c 62 66 20 43 72 65 | 61 74 69 6f 6e 20 6f 66 |{\bf Cre|ation of|
|00001ab0| 20 61 20 67 72 61 70 68 | 69 63 20 77 69 6e 64 6f | a graph|ic windo|
|00001ac0| 77 20 7d 0a 5c 62 69 67 | 73 6b 69 70 0a 5c 63 6c |w }.\big|skip.\cl|
|00001ad0| 65 61 72 74 61 62 73 0a | 5c 62 69 67 73 6b 69 70 |eartabs.|\bigskip|
|00001ae0| 0a 5c 2b 61 29 20 26 24 | 77 69 6e 64 6f 77 24 20 |.\+a) &$|window$ |
|00001af0| 24 57 28 69 6e 74 5c 20 | 78 70 69 78 2c 5c 20 69 |$W(int\ |xpix,\ i|
|00001b00| 6e 74 5c 20 79 70 69 78 | 2c 5c 20 69 6e 74 5c 20 |nt\ ypix|,\ int\ |
|00001b10| 78 70 6f 73 2c 5c 20 69 | 6e 74 5c 20 79 70 6f 73 |xpos,\ i|nt\ ypos|
|00001b20| 29 24 3b 5c 63 72 0a 5c | 62 69 67 73 6b 69 70 0a |)$;\cr.\|bigskip.|
|00001b30| 5c 2b 62 29 20 26 24 77 | 69 6e 64 6f 77 24 20 24 |\+b) &$w|indow$ $|
|00001b40| 57 28 69 6e 74 5c 20 78 | 70 69 78 2c 5c 20 69 6e |W(int\ x|pix,\ in|
|00001b50| 74 5c 20 79 70 69 78 29 | 24 3b 5c 63 72 0a 5c 62 |t\ ypix)|$;\cr.\b|
|00001b60| 69 67 73 6b 69 70 0a 5c | 2b 63 29 20 26 24 77 69 |igskip.\|+c) &$wi|
|00001b70| 6e 64 6f 77 24 20 24 57 | 28 29 24 3b 5c 63 72 0a |ndow$ $W|()$;\cr.|
|00001b80| 5c 62 69 67 73 6b 69 70 | 0a 0a 56 61 72 69 61 6e |\bigskip|..Varian|
|00001b90| 74 20 61 29 20 63 72 65 | 61 74 65 73 20 61 20 77 |t a) cre|ates a w|
|00001ba0| 69 6e 64 6f 77 20 24 57 | 24 20 6f 66 20 70 68 79 |indow $W|$ of phy|
|00001bb0| 73 69 63 61 6c 20 73 69 | 7a 65 20 24 78 70 69 78 |sical si|ze $xpix|
|00001bc0| 20 5c 74 69 6d 65 73 20 | 79 70 69 78 24 20 70 69 | \times |ypix$ pi|
|00001bd0| 78 65 6c 73 20 0a 77 69 | 74 68 20 69 74 73 20 75 |xels .wi|th its u|
|00001be0| 70 70 65 72 20 6c 65 66 | 74 20 63 6f 72 6e 65 72 |pper lef|t corner|
|00001bf0| 20 61 74 20 70 6f 73 69 | 74 69 6f 6e 20 28 24 78 | at posi|tion ($x|
|00001c00| 70 6f 73 2c 79 70 6f 73 | 24 29 20 6f 6e 20 74 68 |pos,ypos|$) on th|
|00001c10| 65 20 73 63 72 65 65 6e | 2c 0a 76 61 72 69 61 6e |e screen|,.varian|
|00001c20| 74 20 62 29 20 70 6c 61 | 63 65 73 20 24 57 24 20 |t b) pla|ces $W$ |
|00001c30| 69 6e 74 6f 20 74 68 65 | 20 75 70 70 65 72 20 72 |into the| upper r|
|00001c40| 69 67 68 74 20 63 6f 72 | 6e 65 72 20 6f 66 20 74 |ight cor|ner of t|
|00001c50| 68 65 20 73 63 72 65 65 | 6e 2c 20 61 6e 64 0a 76 |he scree|n, and.v|
|00001c60| 61 72 69 61 6e 74 20 63 | 29 20 63 72 65 61 74 65 |ariant c|) create|
|00001c70| 73 20 61 20 24 38 35 30 | 20 5c 74 69 6d 65 73 20 |s a $850| \times |
|00001c80| 38 35 30 24 20 70 69 78 | 65 6c 20 77 69 6e 64 6f |850$ pix|el windo|
|00001c90| 77 20 70 6f 73 69 74 69 | 6f 6e 65 64 20 69 6e 74 |w positi|oned int|
|00001ca0| 6f 20 74 68 65 0a 75 70 | 70 65 72 20 72 69 67 68 |o the.up|per righ|
|00001cb0| 74 20 63 6f 72 6e 65 72 | 2e 0a 0a 41 6c 6c 20 74 |t corner|...All t|
|00001cc0| 68 72 65 65 20 76 61 72 | 69 61 6e 74 73 20 69 6e |hree var|iants in|
|00001cd0| 69 74 69 61 6c 69 7a 65 | 20 74 68 65 20 63 6f 6f |itialize| the coo|
|00001ce0| 72 64 69 6e 61 74 65 73 | 20 6f 66 20 24 57 24 20 |rdinates| of $W$ |
|00001cf0| 74 6f 20 24 78 30 20 3d | 20 30 24 2c 0a 24 78 31 |to $x0 =| 0$,.$x1|
|00001d00| 20 3d 20 31 30 30 24 20 | 61 6e 64 20 24 79 30 20 | = 100$ |and $y0 |
|00001d10| 3d 20 30 24 2e 20 54 68 | 65 20 24 69 6e 69 74 24 |= 0$. Th|e $init$|
|00001d20| 20 6f 70 65 72 61 74 69 | 6f 6e 20 28 73 65 65 20 | operati|on (see |
|00001d30| 20 62 65 6c 6f 77 29 20 | 63 61 6e 20 6c 61 74 65 | below) |can late|
|00001d40| 72 20 0a 62 65 20 75 73 | 65 64 20 74 6f 20 63 68 |r .be us|ed to ch|
|00001d50| 61 6e 67 65 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |ange the| window |
|00001d60| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 61 6e 64 20 |coordina|tes and |
|00001d70| 73 63 61 6c 69 6e 67 2e | 0a 0a 0a 7b 5c 62 66 20 |scaling.|...{\bf |
|00001d80| 41 64 64 69 74 69 6f 6e | 61 6c 20 6f 70 65 72 61 |Addition|al opera|
|00001d90| 74 69 6f 6e 73 3a 7d 0a | 0a 5c 62 69 67 73 6b 69 |tions:}.|.\bigski|
|00001da0| 70 0a 5c 62 69 67 73 6b | 69 70 0a 5c 64 65 66 5c |p.\bigsk|ip.\def\|
|00001db0| 76 61 72 20 7b 24 57 24 | 7d 0a 5c 2b 5c 6f 70 20 |var {$W$|}.\+\op |
|00001dc0| 69 6e 74 20 20 72 65 61 | 64 5c 5f 70 61 6e 65 6c |int rea|d\_panel|
|00001dd0| 20 7b 73 74 72 69 6e 67 | 5c 20 68 2c 5c 20 69 6e | {string|\ h,\ in|
|00001de0| 74 5c 20 6e 2c 5c 20 73 | 74 72 69 6e 67 2a 5c 20 |t\ n,\ s|tring*\ |
|00001df0| 53 7d 20 7b 7d 0a 5c 2b | 5c 6e 6f 70 20 20 20 20 |S} {}.\+|\nop |
|00001e00| 20 20 20 20 20 20 20 7b | 64 69 73 70 6c 61 79 73 | {|displays|
|00001e10| 20 61 20 70 61 6e 65 6c | 20 77 69 74 68 20 68 65 | a panel| with he|
|00001e20| 61 64 65 72 20 24 68 24 | 20 61 6e 64 20 61 6e 20 |ader $h$| and an |
|00001e30| 61 72 72 61 79 20 24 53 | 5b 31 2e 2e 6e 5d 24 20 |array $S|[1..n]$ |
|00001e40| 7d 0a 5c 2b 5c 6e 6f 70 | 20 20 20 20 20 20 20 20 |}.\+\nop| |
|00001e50| 20 20 20 7b 6f 66 20 24 | 6e 24 20 73 74 72 69 6e | {of $|n$ strin|
|00001e60| 67 20 69 74 65 6d 73 2c | 20 72 65 74 75 72 6e 73 |g items,| returns|
|00001e70| 20 74 68 65 20 69 6e 64 | 65 78 20 6f 66 20 74 68 | the ind|ex of th|
|00001e80| 65 20 73 65 6c 65 63 74 | 65 64 7d 0a 5c 2b 5c 6e |e select|ed}.\+\n|
|00001e90| 6f 70 20 20 20 20 20 20 | 20 20 20 20 20 7b 69 74 |op | {it|
|00001ea0| 65 6d 2e 7d 0a 5c 6d 65 | 64 73 6b 69 70 0a 5c 2b |em.}.\me|dskip.\+|
|00001eb0| 5c 6f 70 20 69 6e 74 20 | 20 72 65 61 64 5c 5f 76 |\op int | read\_v|
|00001ec0| 70 61 6e 65 6c 20 7b 73 | 74 72 69 6e 67 5c 20 68 |panel {s|tring\ h|
|00001ed0| 2c 5c 20 69 6e 74 5c 20 | 6e 2c 5c 20 73 74 72 69 |,\ int\ |n,\ stri|
|00001ee0| 6e 67 2a 5c 20 53 7d 20 | 7b 7d 0a 5c 2b 5c 6e 6f |ng*\ S} |{}.\+\no|
|00001ef0| 70 20 20 20 20 20 20 20 | 20 20 20 20 7b 6c 69 6b |p | {lik|
|00001f00| 65 20 72 65 61 64 5c 5f | 70 61 6e 65 6c 20 77 69 |e read\_|panel wi|
|00001f10| 74 68 20 76 65 72 74 69 | 63 61 6c 20 62 75 74 74 |th verti|cal butt|
|00001f20| 6f 6e 20 6c 61 79 6f 75 | 74 7d 0a 5c 6d 65 64 73 |on layou|t}.\meds|
|00001f30| 6b 69 70 0a 5c 2b 5c 6f | 70 20 69 6e 74 20 20 72 |kip.\+\o|p int r|
|00001f40| 65 61 64 5c 5f 69 6e 74 | 20 7b 73 74 72 69 6e 67 |ead\_int| {string|
|00001f50| 5c 20 70 7d 20 7b 7d 0a | 5c 2b 5c 6e 6f 70 20 20 |\ p} {}.|\+\nop |
|00001f60| 20 20 20 20 20 20 20 20 | 20 7b 64 69 73 70 6c 61 | | {displa|
|00001f70| 79 73 20 61 20 70 61 6e | 65 6c 20 77 69 74 68 20 |ys a pan|el with |
|00001f80| 70 72 6f 6d 70 74 20 24 | 70 24 20 66 6f 72 20 69 |prompt $|p$ for i|
|00001f90| 6e 74 65 67 65 72 20 69 | 6e 70 75 74 2c 7d 0a 5c |nteger i|nput,}.\|
|00001fa0| 2b 5c 6e 6f 70 20 20 20 | 20 20 20 20 20 20 20 20 |+\nop | |
|00001fb0| 7b 72 65 74 75 72 6e 73 | 20 74 68 65 20 69 6e 70 |{returns| the inp|
|00001fc0| 75 74 7d 0a 5c 6d 65 64 | 73 6b 69 70 0a 5c 2b 5c |ut}.\med|skip.\+\|
|00001fd0| 6f 70 20 72 65 61 6c 20 | 20 72 65 61 64 5c 5f 72 |op real | read\_r|
|00001fe0| 65 61 6c 20 7b 73 74 72 | 69 6e 67 5c 20 70 7d 20 |eal {str|ing\ p} |
|00001ff0| 7b 7d 0a 5c 2b 5c 6e 6f | 70 20 20 20 20 20 20 20 |{}.\+\no|p |
|00002000| 20 20 20 20 7b 64 69 73 | 70 6c 61 79 73 20 61 20 | {dis|plays a |
|00002010| 70 61 6e 65 6c 20 77 69 | 74 68 20 70 72 6f 6d 70 |panel wi|th promp|
|00002020| 74 20 24 70 24 20 66 6f | 72 20 72 65 61 6c 20 69 |t $p$ fo|r real i|
|00002030| 6e 70 75 74 7d 0a 5c 2b | 5c 6e 6f 70 20 20 20 20 |nput}.\+|\nop |
|00002040| 20 20 20 20 20 20 20 7b | 72 65 74 75 72 6e 73 20 | {|returns |
|00002050| 74 68 65 20 69 6e 70 75 | 74 7d 0a 5c 6d 65 64 73 |the inpu|t}.\meds|
|00002060| 6b 69 70 0a 5c 2b 5c 6f | 70 20 73 74 72 69 6e 67 |kip.\+\o|p string|
|00002070| 20 20 72 65 61 64 5c 5f | 73 74 72 69 6e 67 20 7b | read\_|string {|
|00002080| 73 74 72 69 6e 67 5c 20 | 70 7d 20 7b 7d 0a 5c 2b |string\ |p} {}.\+|
|00002090| 5c 6e 6f 70 20 20 20 20 | 20 20 20 20 20 20 20 7b |\nop | {|
|000020a0| 64 69 73 70 6c 61 79 73 | 20 61 20 70 61 6e 65 6c |displays| a panel|
|000020b0| 20 77 69 74 68 20 70 72 | 6f 6d 70 74 20 24 70 24 | with pr|ompt $p$|
|000020c0| 20 66 6f 72 20 73 74 72 | 69 6e 67 20 69 6e 70 75 | for str|ing inpu|
|000020d0| 74 2c 7d 0a 5c 2b 5c 6e | 6f 70 20 20 20 20 20 20 |t,}.\+\n|op |
|000020e0| 20 20 20 20 20 7b 72 65 | 74 75 72 6e 73 20 74 68 | {re|turns th|
|000020f0| 65 20 69 6e 70 75 74 7d | 0a 5c 6d 65 64 73 6b 69 |e input}|.\medski|
|00002100| 70 0a 5c 2b 5c 6f 70 20 | 73 74 72 69 6e 67 20 20 |p.\+\op |string |
|00002110| 72 65 61 64 5c 5f 73 74 | 72 69 6e 67 20 7b 73 74 |read\_st|ring {st|
|00002120| 72 69 6e 67 5c 20 70 2c | 5c 20 6c 69 73 74 28 73 |ring\ p,|\ list(s|
|00002130| 74 72 69 6e 67 29 5c 20 | 6d 65 6e 75 7d 20 7b 7d |tring)\ |menu} {}|
|00002140| 0a 5c 2b 5c 6e 6f 70 20 | 20 20 20 20 20 20 20 20 |.\+\nop | |
|00002150| 20 20 7b 61 73 20 61 62 | 6f 76 65 2c 20 61 64 64 | {as ab|ove, add|
|00002160| 73 20 61 6e 20 61 64 64 | 69 74 69 6f 6e 61 6c 20 |s an add|itional |
|00002170| 6d 65 6e 75 20 62 75 74 | 74 6f 6e 20 77 68 69 63 |menu but|ton whic|
|00002180| 68 7d 0a 5c 2b 5c 6e 6f | 70 20 20 20 20 20 20 20 |h}.\+\no|p |
|00002190| 20 20 20 20 7b 63 61 6e | 20 62 65 20 75 73 65 64 | {can| be used|
|000021a0| 20 74 6f 20 73 65 6c 65 | 63 74 20 61 20 73 74 72 | to sele|ct a str|
|000021b0| 69 6e 67 20 66 72 6f 6d | 20 24 6d 65 6e 75 24 2e |ing from| $menu$.|
|000021c0| 7d 0a 5c 6d 65 64 73 6b | 69 70 0a 5c 2b 5c 6f 70 |}.\medsk|ip.\+\op|
|000021d0| 20 73 74 72 69 6e 67 20 | 20 72 65 61 64 5c 5f 73 | string | read\_s|
|000021e0| 74 72 69 6e 67 20 7b 73 | 74 72 69 6e 67 5c 20 70 |tring {s|tring\ p|
|000021f0| 2c 5c 20 73 74 72 69 6e | 67 5c 20 6c 61 62 65 6c |,\ strin|g\ label|
|00002200| 2c 5c 20 6c 69 73 74 28 | 73 74 72 69 6e 67 29 5c |,\ list(|string)\|
|00002210| 20 6d 65 6e 75 7d 20 7b | 7d 0a 5c 2b 5c 6e 6f 70 | menu} {|}.\+\nop|
|00002220| 20 20 20 20 20 20 20 20 | 20 20 20 7b 61 73 20 61 | | {as a|
|00002230| 62 6f 76 65 2c 20 74 68 | 65 20 6d 65 6e 75 20 62 |bove, th|e menu b|
|00002240| 75 74 74 6f 6e 20 69 73 | 20 6c 61 62 65 6c 6c 65 |utton is| labelle|
|00002250| 64 20 77 69 74 68 20 24 | 6c 61 62 65 6c 24 2e 7d |d with $|label$.}|
|00002260| 0a 5c 6d 65 64 73 6b 69 | 70 0a 0a 0a 5c 76 66 69 |.\medski|p...\vfi|
|00002270| 6c 6c 5c 65 6a 65 63 74 | 0a 0a 0a 0a 7b 5c 6d 61 |ll\eject|....{\ma|
|00002280| 67 6f 6e 65 62 66 20 37 | 2e 31 20 53 74 72 65 61 |gonebf 7|.1 Strea|
|00002290| 6d 73 7d 0a 0a 54 68 65 | 20 73 74 72 65 61 6d 20 |ms}..The| stream |
|000022a0| 64 61 74 61 20 74 79 70 | 65 73 20 64 65 73 63 72 |data typ|es descr|
|000022b0| 69 62 65 64 20 69 6e 20 | 74 68 69 73 20 73 65 63 |ibed in |this sec|
|000022c0| 74 69 6f 6e 20 61 72 65 | 20 61 6c 6c 20 64 65 72 |tion are| all der|
|000022d0| 69 76 65 64 20 66 72 6f | 6d 0a 74 68 65 20 5c 43 |ived fro|m.the \C|
|000022e0| 43 20 73 74 72 65 61 6d | 20 74 79 70 65 73 20 24 |C stream| types $|
|000022f0| 69 73 74 72 65 61 6d 24 | 20 61 6e 64 20 24 6f 73 |istream$| and $os|
|00002300| 74 72 65 61 6d 24 2e 20 | 53 6f 6d 65 20 6f 66 20 |tream$. |Some of |
|00002310| 74 68 65 73 65 20 74 79 | 70 65 73 20 0a 6d 61 79 |these ty|pes .may|
|00002320| 20 62 65 20 6f 62 73 6f | 6c 65 74 65 20 69 6e 20 | be obso|lete in |
|00002330| 63 6f 6d 62 69 6e 61 74 | 69 6f 6e 20 77 69 74 68 |combinat|ion with|
|00002340| 20 73 6f 6d 65 20 6f 66 | 20 74 68 65 20 6c 61 74 | some of| the lat|
|00002350| 65 73 74 20 76 65 72 73 | 69 6f 6e 73 20 6f 66 20 |est vers|ions of |
|00002360| 74 68 65 20 0a 73 74 61 | 6e 64 61 72 64 20 5c 43 |the .sta|ndard \C|
|00002370| 43 20 49 2f 4f 20 6c 69 | 62 72 61 72 79 2e 0a 0a |C I/O li|brary...|
|00002380| 0a 5c 62 69 67 73 6b 69 | 70 0a 7b 5c 6d 61 67 6f |.\bigski|p.{\mago|
|00002390| 6e 65 62 66 20 37 2e 31 | 2e 33 20 53 74 72 69 6e |nebf 7.1|.3 Strin|
|000023a0| 67 20 69 6e 70 75 74 20 | 73 74 72 65 61 6d 73 20 |g input |streams |
|000023b0| 28 73 74 72 69 6e 67 5c | 5f 69 73 74 72 65 61 6d |(string\|_istream|
|000023c0| 29 7d 0a 0a 41 6e 20 69 | 6e 73 74 61 6e 63 65 20 |)}..An i|nstance |
|000023d0| 24 49 24 20 6f 66 20 74 | 68 65 20 64 61 74 61 20 |$I$ of t|he data |
|000023e0| 74 79 70 65 20 24 73 74 | 72 69 6e 67 5c 5f 69 73 |type $st|ring\_is|
|000023f0| 74 72 65 61 6d 24 20 69 | 73 20 61 6e 20 5c 43 43 |tream$ i|s an \CC|
|00002400| 20 69 73 74 72 65 61 6d | 0a 63 6f 6e 6e 65 63 74 | istream|.connect|
|00002410| 65 64 20 74 6f 20 61 20 | 73 74 72 69 6e 67 20 24 |ed to a |string $|
|00002420| 73 24 2c 20 69 2e 65 2e | 2c 20 61 6c 6c 20 69 6e |s$, i.e.|, all in|
|00002430| 70 75 74 20 6f 70 65 72 | 61 74 69 6f 6e 73 20 6f |put oper|ations o|
|00002440| 72 20 6f 70 65 72 61 74 | 6f 72 73 0a 61 70 70 6c |r operat|ors.appl|
|00002450| 69 65 64 20 74 6f 20 24 | 49 24 20 72 65 61 64 20 |ied to $|I$ read |
|00002460| 66 72 6f 6d 20 24 73 24 | 2e 20 0a 0a 7b 5c 62 66 |from $s$|. ..{\bf|
|00002470| 20 31 2e 20 43 72 65 61 | 74 69 6f 6e 20 6f 66 20 | 1. Crea|tion of |
|00002480| 61 20 73 74 72 69 6e 67 | 20 69 6e 70 75 74 20 73 |a string| input s|
|00002490| 74 72 65 61 6d 7d 20 0a | 0a 24 73 74 72 69 6e 67 |tream} .|.$string|
|000024a0| 5c 5f 69 73 74 72 65 61 | 6d 5c 20 5c 20 5c 20 49 |\_istrea|m\ \ \ I|
|000024b0| 28 73 74 72 69 6e 67 5c | 20 73 29 24 3b 0a 0a 63 |(string\| s)$;..c|
|000024c0| 72 65 61 74 65 73 20 61 | 6e 20 69 6e 73 74 61 6e |reates a|n instan|
|000024d0| 63 65 20 24 49 24 20 6f | 66 20 74 79 70 65 20 73 |ce $I$ o|f type s|
|000024e0| 74 72 69 6e 67 5c 5f 69 | 73 74 72 65 61 6d 20 63 |tring\_i|stream c|
|000024f0| 6f 6e 6e 65 63 74 65 64 | 20 74 6f 20 74 68 65 20 |onnected| to the |
|00002500| 73 74 72 69 6e 67 20 24 | 73 24 2e 0a 0a 7b 5c 62 |string $|s$...{\b|
|00002510| 66 20 32 2e 20 4f 70 65 | 72 61 74 69 6f 6e 73 7d |f 2. Ope|rations}|
|00002520| 20 0a 0a 41 6c 6c 20 6f | 70 65 72 61 74 69 6f 6e | ..All o|peration|
|00002530| 73 20 61 6e 64 20 6f 70 | 65 72 61 74 6f 72 73 20 |s and op|erators |
|00002540| 28 24 3e 3e 24 29 20 64 | 65 66 69 6e 65 64 20 66 |($>>$) d|efined f|
|00002550| 6f 72 20 5c 43 43 20 69 | 73 74 72 65 61 6d 73 20 |or \CC i|streams |
|00002560| 63 61 6e 0a 62 65 20 61 | 70 70 6c 69 65 64 20 74 |can.be a|pplied t|
|00002570| 6f 20 73 74 72 69 6e 67 | 20 69 6e 70 75 74 20 73 |o string| input s|
|00002580| 74 72 65 61 6d 73 20 61 | 73 20 77 65 6c 6c 2e 0a |treams a|s well..|
|00002590| 0a 5c 62 69 67 73 6b 69 | 70 0a 7b 5c 6d 61 67 6f |.\bigski|p.{\mago|
|000025a0| 6e 65 62 66 20 37 2e 31 | 2e 34 20 53 74 72 69 6e |nebf 7.1|.4 Strin|
|000025b0| 67 20 6f 75 74 70 75 74 | 20 73 74 72 65 61 6d 73 |g output| streams|
|000025c0| 20 28 73 74 72 69 6e 67 | 5c 5f 6f 73 74 72 65 61 | (string|\_ostrea|
|000025d0| 6d 29 7d 0a 0a 41 6e 20 | 69 6e 73 74 61 6e 63 65 |m)}..An |instance|
|000025e0| 20 24 4f 24 20 6f 66 20 | 74 68 65 20 64 61 74 61 | $O$ of |the data|
|000025f0| 20 74 79 70 65 20 24 73 | 74 72 69 6e 67 5c 5f 6f | type $s|tring\_o|
|00002600| 73 74 72 65 61 6d 24 20 | 69 73 20 61 6e 20 5c 43 |stream$ |is an \C|
|00002610| 43 20 6f 73 74 72 65 61 | 6d 0a 63 6f 6e 6e 65 63 |C ostrea|m.connec|
|00002620| 74 65 64 20 74 6f 20 61 | 6e 20 69 6e 74 65 72 6e |ted to a|n intern|
|00002630| 61 6c 20 73 74 72 69 6e | 67 20 62 75 66 66 65 72 |al strin|g buffer|
|00002640| 2c 20 69 2e 65 2e 2c 20 | 61 6c 6c 20 6f 75 74 70 |, i.e., |all outp|
|00002650| 75 74 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 0a 6f |ut opera|tions .o|
|00002660| 72 20 6f 70 65 72 61 74 | 6f 72 73 20 61 70 70 6c |r operat|ors appl|
|00002670| 69 65 64 20 74 6f 20 24 | 4f 24 20 77 72 69 74 65 |ied to $|O$ write|
|00002680| 20 69 6e 74 6f 20 74 68 | 69 73 20 69 6e 74 65 72 | into th|is inter|
|00002690| 6e 61 6c 20 62 75 66 66 | 65 72 2e 20 20 54 68 65 |nal buff|er. The|
|000026a0| 20 63 75 72 72 65 6e 74 | 0a 76 61 6c 75 65 20 6f | current|.value o|
|000026b0| 66 20 74 68 65 20 62 75 | 66 66 65 72 20 69 73 20 |f the bu|ffer is |
|000026c0| 63 61 6c 6c 65 64 20 74 | 68 65 20 63 6f 6e 74 65 |called t|he conte|
|000026d0| 6e 74 73 20 6f 66 20 24 | 4f 24 2e 0a 0a 7b 5c 62 |nts of $|O$...{\b|
|000026e0| 66 20 31 2e 20 43 72 65 | 61 74 69 6f 6e 20 6f 66 |f 1. Cre|ation of|
|000026f0| 20 61 20 73 74 72 69 6e | 67 20 6f 75 74 70 75 74 | a strin|g output|
|00002700| 20 73 74 72 65 61 6d 7d | 20 0a 0a 24 73 74 72 69 | stream}| ..$stri|
|00002710| 6e 67 5c 5f 6f 73 74 72 | 65 61 6d 5c 20 5c 20 5c |ng\_ostr|eam\ \ \|
|00002720| 20 4f 24 3b 0a 0a 63 72 | 65 61 74 65 73 20 61 6e | O$;..cr|eates an|
|00002730| 20 69 6e 73 74 61 6e 63 | 65 20 24 4f 24 20 6f 66 | instanc|e $O$ of|
|00002740| 20 74 79 70 65 20 73 74 | 72 69 6e 67 5c 5f 6f 73 | type st|ring\_os|
|00002750| 74 72 65 61 6d 2e 0a 0a | 7b 5c 62 66 20 32 2e 20 |tream...|{\bf 2. |
|00002760| 4f 70 65 72 61 74 69 6f | 6e 73 7d 20 0a 5c 6d 65 |Operatio|ns} .\me|
|00002770| 64 73 6b 69 70 0a 5c 63 | 6c 65 61 72 74 61 62 73 |dskip.\c|leartabs|
|00002780| 0a 5c 2b 5c 68 73 6b 69 | 70 20 31 2e 38 74 72 75 |.\+\hski|p 1.8tru|
|00002790| 65 63 6d 20 26 5c 68 73 | 6b 69 70 20 35 74 72 75 |ecm &\hs|kip 5tru|
|000027a0| 65 63 6d 20 26 5c 63 72 | 0a 5c 6d 65 64 73 6b 69 |ecm &\cr|.\medski|
|000027b0| 70 0a 5c 2b 73 74 72 69 | 6e 67 20 20 20 20 20 20 |p.\+stri|ng |
|000027c0| 26 4f 2e 63 6c 65 61 72 | 28 29 20 20 26 63 6c 65 |&O.clear|() &cle|
|000027d0| 61 72 73 20 74 68 65 20 | 63 6f 6e 74 65 6e 74 73 |ars the |contents|
|000027e0| 20 6f 66 20 24 4f 24 5c | 63 72 0a 5c 6d 65 64 73 | of $O$\|cr.\meds|
|000027f0| 6b 69 70 0a 5c 2b 73 74 | 72 69 6e 67 20 20 20 20 |kip.\+st|ring |
|00002800| 20 20 26 4f 2e 73 74 72 | 28 29 20 20 20 20 26 72 | &O.str|() &r|
|00002810| 65 74 75 72 6e 73 20 74 | 68 65 20 63 75 72 72 65 |eturns t|he curre|
|00002820| 6e 74 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 24 |nt conte|nts of $|
|00002830| 4f 24 5c 63 72 0a 5c 73 | 6d 61 6c 6c 73 6b 69 70 |O$\cr.\s|mallskip|
|00002840| 0a 0a 41 6c 6c 20 6f 70 | 65 72 61 74 69 6f 6e 73 |..All op|erations|
|00002850| 20 61 6e 64 20 6f 70 65 | 72 61 74 6f 72 73 20 28 | and ope|rators (|
|00002860| 24 3c 3c 24 29 20 64 65 | 66 69 6e 65 64 20 66 6f |$<<$) de|fined fo|
|00002870| 72 20 5c 43 43 20 6f 73 | 74 72 65 61 6d 73 20 63 |r \CC os|treams c|
|00002880| 61 6e 0a 62 65 20 61 70 | 70 6c 69 65 64 20 74 6f |an.be ap|plied to|
|00002890| 20 73 74 72 69 6e 67 20 | 6f 75 74 70 75 74 20 73 | string |output s|
|000028a0| 74 72 65 61 6d 73 20 61 | 73 20 77 65 6c 6c 2e 0a |treams a|s well..|
|000028b0| 0a 5c 62 69 67 73 6b 69 | 70 0a 7b 5c 6d 61 67 6f |.\bigski|p.{\mago|
|000028c0| 6e 65 62 66 20 37 2e 31 | 2e 35 20 43 6f 6d 6d 61 |nebf 7.1|.5 Comma|
|000028d0| 6e 64 20 69 6e 70 75 74 | 20 73 74 72 65 61 6d 73 |nd input| streams|
|000028e0| 20 28 63 6d 64 5c 5f 69 | 73 74 72 65 61 6d 29 7d | (cmd\_i|stream)}|
|000028f0| 0a 0a 41 6e 20 69 6e 73 | 74 61 6e 63 65 20 24 49 |..An ins|tance $I|
|00002900| 24 20 6f 66 20 74 68 65 | 20 64 61 74 61 20 74 79 |$ of the| data ty|
|00002910| 70 65 20 24 63 6d 64 5c | 5f 69 73 74 72 65 61 6d |pe $cmd\|_istream|
|00002920| 24 20 69 73 20 61 6e 20 | 5c 43 43 20 69 73 74 72 |$ is an |\CC istr|
|00002930| 65 61 6d 0a 63 6f 6e 6e | 65 63 74 65 64 20 74 6f |eam.conn|ected to|
|00002940| 20 74 68 65 20 6f 75 74 | 70 75 74 20 6f 66 20 61 | the out|put of a|
|00002950| 20 73 68 65 6c 6c 20 63 | 6f 6d 6d 61 6e 64 20 24 | shell c|ommand $|
|00002960| 63 6d 64 24 2c 20 69 2e | 65 2e 2c 20 61 6c 6c 20 |cmd$, i.|e., all |
|00002970| 69 6e 70 75 74 20 6f 70 | 65 72 61 74 69 6f 6e 73 |input op|erations|
|00002980| 20 0a 6f 72 20 6f 70 65 | 72 61 74 6f 72 73 20 61 | .or ope|rators a|
|00002990| 70 70 6c 69 65 64 20 74 | 6f 20 24 49 24 20 72 65 |pplied t|o $I$ re|
|000029a0| 61 64 20 66 72 6f 6d 20 | 74 68 65 20 73 74 61 6e |ad from |the stan|
|000029b0| 64 61 72 64 20 6f 75 74 | 70 75 74 20 6f 66 20 63 |dard out|put of c|
|000029c0| 6f 6d 6d 61 6e 64 20 24 | 63 6d 64 24 2e 20 0a 0a |ommand $|cmd$. ..|
|000029d0| 7b 5c 62 66 20 31 2e 20 | 43 72 65 61 74 69 6f 6e |{\bf 1. |Creation|
|000029e0| 20 6f 66 20 61 20 63 6f | 6d 6d 61 6e 64 20 69 6e | of a co|mmand in|
|000029f0| 70 75 74 20 73 74 72 65 | 61 6d 7d 20 0a 0a 24 63 |put stre|am} ..$c|
|00002a00| 6d 64 5c 5f 69 73 74 72 | 65 61 6d 5c 20 5c 20 5c |md\_istr|eam\ \ \|
|00002a10| 20 69 6e 28 73 74 72 69 | 6e 67 5c 20 63 6d 64 29 | in(stri|ng\ cmd)|
|00002a20| 24 3b 0a 0a 63 72 65 61 | 74 65 73 20 61 6e 20 69 |$;..crea|tes an i|
|00002a30| 6e 73 74 61 6e 63 65 20 | 24 69 6e 24 20 6f 66 20 |nstance |$in$ of |
|00002a40| 74 79 70 65 20 63 6d 64 | 5c 5f 69 73 74 72 65 61 |type cmd|\_istrea|
|00002a50| 6d 20 63 6f 6e 6e 65 63 | 74 65 64 20 74 6f 20 74 |m connec|ted to t|
|00002a60| 68 65 20 6f 75 74 70 75 | 74 20 6f 66 20 63 6f 6d |he outpu|t of com|
|00002a70| 6d 61 6e 64 20 24 63 6d | 64 24 2e 0a 0a 7b 5c 62 |mand $cm|d$...{\b|
|00002a80| 66 20 32 2e 20 4f 70 65 | 72 61 74 69 6f 6e 73 7d |f 2. Ope|rations}|
|00002a90| 20 0a 0a 41 6c 6c 20 6f | 70 65 72 61 74 69 6f 6e | ..All o|peration|
|00002aa0| 73 20 61 6e 64 20 6f 70 | 65 72 61 74 6f 72 73 20 |s and op|erators |
|00002ab0| 28 24 3e 3e 24 29 20 64 | 65 66 69 6e 65 64 20 66 |($>>$) d|efined f|
|00002ac0| 6f 72 20 5c 43 43 20 69 | 73 74 72 65 61 6d 73 20 |or \CC i|streams |
|00002ad0| 63 61 6e 0a 62 65 20 61 | 70 70 6c 69 65 64 20 74 |can.be a|pplied t|
|00002ae0| 6f 20 63 6f 6d 6d 61 6e | 64 20 69 6e 70 75 74 20 |o comman|d input |
|00002af0| 73 74 72 65 61 6d 73 20 | 61 73 20 77 65 6c 6c 2e |streams |as well.|
|00002b00| 0a 0a 0a 5c 62 69 67 73 | 6b 69 70 0a 7b 5c 6d 61 |...\bigs|kip.{\ma|
|00002b10| 67 6f 6e 65 62 66 20 37 | 2e 31 2e 36 20 43 6f 6d |gonebf 7|.1.6 Com|
|00002b20| 6d 61 6e 64 20 6f 75 74 | 70 75 74 20 73 74 72 65 |mand out|put stre|
|00002b30| 61 6d 73 20 28 63 6d 64 | 5c 5f 6f 73 74 72 65 61 |ams (cmd|\_ostrea|
|00002b40| 6d 29 7d 0a 0a 41 6e 20 | 69 6e 73 74 61 6e 63 65 |m)}..An |instance|
|00002b50| 20 24 4f 24 20 6f 66 20 | 74 68 65 20 64 61 74 61 | $O$ of |the data|
|00002b60| 20 74 79 70 65 20 24 63 | 6d 64 5c 5f 6f 73 74 72 | type $c|md\_ostr|
|00002b70| 65 61 6d 24 20 69 73 20 | 61 6e 20 5c 43 43 20 6f |eam$ is |an \CC o|
|00002b80| 73 74 72 65 61 6d 0a 63 | 6f 6e 6e 65 63 74 65 64 |stream.c|onnected|
|00002b90| 20 74 6f 20 74 68 65 20 | 69 6e 70 75 74 20 6f 66 | to the |input of|
|00002ba0| 20 61 20 73 68 65 6c 6c | 20 63 6f 6d 6d 61 6e 64 | a shell| command|
|00002bb0| 20 24 63 6d 64 24 2c 20 | 69 2e 65 2e 2c 20 61 6c | $cmd$, |i.e., al|
|00002bc0| 6c 20 6f 75 74 70 75 74 | 20 6f 70 65 72 61 74 69 |l output| operati|
|00002bd0| 6f 6e 73 20 0a 6f 72 20 | 6f 70 65 72 61 74 6f 72 |ons .or |operator|
|00002be0| 73 20 61 70 70 6c 69 65 | 64 20 74 6f 20 24 4f 24 |s applie|d to $O$|
|00002bf0| 20 77 72 69 74 65 20 69 | 6e 74 6f 20 74 68 65 20 | write i|nto the |
|00002c00| 73 74 61 6e 64 61 72 64 | 20 69 6e 70 75 74 20 6f |standard| input o|
|00002c10| 66 20 63 6f 6d 6d 61 6e | 64 20 24 63 6d 64 24 2e |f comman|d $cmd$.|
|00002c20| 20 0a 0a 7b 5c 62 66 20 | 31 2e 20 43 72 65 61 74 | ..{\bf |1. Creat|
|00002c30| 69 6f 6e 20 6f 66 20 61 | 20 63 6f 6d 6d 61 6e 64 |ion of a| command|
|00002c40| 20 6f 75 74 70 75 74 20 | 73 74 72 65 61 6d 7d 20 | output |stream} |
|00002c50| 0a 0a 24 63 6d 64 5c 5f | 6f 73 74 72 65 61 6d 5c |..$cmd\_|ostream\|
|00002c60| 20 5c 20 5c 20 6f 75 74 | 28 73 74 72 69 6e 67 5c | \ \ out|(string\|
|00002c70| 20 63 6d 64 29 24 3b 0a | 0a 63 72 65 61 74 65 73 | cmd)$;.|.creates|
|00002c80| 20 61 6e 20 69 6e 73 74 | 61 6e 63 65 20 24 6f 75 | an inst|ance $ou|
|00002c90| 74 24 20 6f 66 20 74 79 | 70 65 20 63 6d 64 5c 5f |t$ of ty|pe cmd\_|
|00002ca0| 6f 73 74 72 65 61 6d 20 | 63 6f 6e 6e 65 63 74 65 |ostream |connecte|
|00002cb0| 64 20 74 6f 20 74 68 65 | 20 69 6e 70 75 74 20 6f |d to the| input o|
|00002cc0| 66 20 0a 63 6f 6d 6d 61 | 6e 64 20 24 63 6d 64 24 |f .comma|nd $cmd$|
|00002cd0| 2e 20 0a 0a 7b 5c 62 66 | 20 32 2e 20 4f 70 65 72 |. ..{\bf| 2. Oper|
|00002ce0| 61 74 69 6f 6e 73 7d 20 | 0a 0a 41 6c 6c 20 6f 70 |ations} |..All op|
|00002cf0| 65 72 61 74 69 6f 6e 73 | 20 61 6e 64 20 6f 70 65 |erations| and ope|
|00002d00| 72 61 74 6f 72 73 20 28 | 24 3c 3c 24 29 20 64 65 |rators (|$<<$) de|
|00002d10| 66 69 6e 65 64 20 66 6f | 72 20 5c 43 43 20 6f 73 |fined fo|r \CC os|
|00002d20| 74 72 65 61 6d 73 20 63 | 61 6e 0a 62 65 20 61 70 |treams c|an.be ap|
|00002d30| 70 6c 69 65 64 20 74 6f | 20 63 6f 6d 6d 61 6e 64 |plied to| command|
|00002d40| 20 6f 75 74 70 75 74 20 | 73 74 72 65 61 6d 73 20 | output |streams |
|00002d50| 61 73 20 77 65 6c 6c 2e | 0a 0a 5c 76 66 69 6c 6c |as well.|..\vfill|
|00002d60| 5c 65 6a 65 63 74 0a 5c | 62 79 65 0a |\eject.\|bye. |
+--------+-------------------------+-------------------------+--------+--------+