home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / docs / linux-do / programm / lpg-0.4 / lpg-0 / LPG / graphic.tex < prev    next >
LaTeX Document  |  1995-03-28  |  160.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: Plain text[LF] default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 61 75 74 68 6f 72 7b | 53 76 65 6e 20 76 61 6e |\author{|Sven van|
|00000010| 20 64 65 72 20 4d 65 65 | 72 7d 0a 5c 64 61 74 65 | der Mee|r}.\date|
|00000020| 7b 76 30 2e 33 2e 33 2c | 20 31 39 20 4a 61 6e 20 |{v0.3.3,| 19 Jan |
|00000030| 31 39 39 35 7d 0a 0a 0a | 5c 6e 65 77 63 6f 6d 6d |1995}...|\newcomm|
|00000040| 61 6e 64 7b 5c 6e 6f 74 | 65 6e 6d 7d 5b 31 5d 7b |and{\not|enm}[1]{|
|00000050| 28 7b 5c 62 66 20 4e 6f | 74 65 3a 7d 20 23 31 2e |({\bf No|te:} #1.|
|00000060| 29 7d 25 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)}% | |
|00000070| 20 20 20 20 6e 6f 72 6d | 61 6c 20 4e 6f 74 65 3a | norm|al Note:|
|00000080| 0a 5c 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 6e 6f |.\newcom|mand{\no|
|00000090| 74 65 6e 69 7d 7b 5c 6e | 6f 74 65 6e 6d 7b 6e 6f |teni}{\n|otenm{no|
|000000a0| 74 20 69 6d 70 6c 65 6d | 65 6e 74 65 64 20 79 65 |t implem|ented ye|
|000000b0| 74 7d 7d 25 20 20 20 20 | 20 20 20 20 20 4e 6f 74 |t}}% | Not|
|000000c0| 65 3a 20 6e 6f 74 20 69 | 6d 70 6c 65 6d 65 6e 74 |e: not i|mplement|
|000000d0| 65 64 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |ed.\newc|ommand{\|
|000000e0| 6e 6f 74 65 6e 69 65 7d | 5b 31 5d 7b 5c 6e 6f 74 |notenie}|[1]{\not|
|000000f0| 65 6e 6d 7b 6e 6f 74 20 | 69 6d 70 6c 65 6d 65 6e |enm{not |implemen|
|00000100| 74 65 64 20 79 65 74 2c | 20 23 31 7d 7d 25 20 4e |ted yet,| #1}}% N|
|00000110| 6f 74 65 20 2b 20 23 31 | 20 6f 6e 20 62 65 67 69 |ote + #1| on begi|
|00000120| 6e 0a 5c 6e 65 77 63 6f | 6d 6d 61 6e 64 7b 5c 6e |n.\newco|mmand{\n|
|00000130| 6f 74 65 6e 69 62 7d 5b | 31 5d 7b 5c 6e 6f 74 65 |otenib}[|1]{\note|
|00000140| 6e 6d 7b 23 31 20 6e 6f | 74 20 69 6d 70 6c 65 6d |nm{#1 no|t implem|
|00000150| 65 6e 74 65 64 20 79 65 | 74 7d 7d 25 20 20 4e 6f |ented ye|t}}% No|
|00000160| 74 65 20 2b 20 23 31 20 | 6f 6e 20 65 6e 64 0a 0a |te + #1 |on end..|
|00000170| 5c 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 76 64 6d |\newcomm|and{\vdm|
|00000180| 61 72 67 7d 5b 31 5d 7b | 7b 5c 74 74 20 23 31 7d |arg}[1]{|{\tt #1}|
|00000190| 7d 20 20 25 20 66 75 6e | 63 74 69 6f 6e 20 61 72 |} % fun|ction ar|
|000001a0| 67 75 6d 65 6e 74 73 20 | 69 6e 20 64 65 73 63 72 |guments |in descr|
|000001b0| 69 70 74 69 6f 6e 0a 5c | 6e 65 77 63 6f 6d 6d 61 |iption.\|newcomma|
|000001c0| 6e 64 7b 5c 76 64 6d 66 | 75 6e 63 7d 5b 31 5d 7b |nd{\vdmf|unc}[1]{|
|000001d0| 7b 5c 62 66 20 23 31 7d | 7d 20 25 20 66 75 6e 63 |{\bf #1}|} % func|
|000001e0| 74 69 6f 6e 73 20 69 6e | 20 64 65 73 63 72 69 70 |tions in| descrip|
|000001f0| 74 69 6f 6e 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |tion.\ne|wcommand|
|00000200| 7b 5c 76 64 6d 75 6e 69 | 78 7d 5b 31 5d 7b 7b 5c |{\vdmuni|x}[1]{{\|
|00000210| 73 6c 23 31 7d 7d 20 20 | 25 20 75 6e 69 78 20 72 |sl#1}} |% unix r|
|00000220| 65 6c 61 74 65 64 20 73 | 74 75 66 66 20 69 6e 20 |elated s|tuff in |
|00000230| 64 65 73 63 72 69 70 74 | 69 6f 6e 0a 5c 6e 65 77 |descript|ion.\new|
|00000240| 63 6f 6d 6d 61 6e 64 7b | 5c 76 64 6d 73 63 72 7d |command{|\vdmscr}|
|00000250| 5b 31 5d 7b 7b 5c 73 6c | 23 31 7d 7d 20 20 20 25 |[1]{{\sl|#1}} %|
|00000260| 20 73 74 64 73 63 72 20 | 61 6e 64 20 63 75 72 73 | stdscr |and curs|
|00000270| 63 72 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |cr.\newc|ommand{\|
|00000280| 76 64 6d 6c 69 6e 65 73 | 7d 5b 31 5d 7b 7b 5c 73 |vdmlines|}[1]{{\s|
|00000290| 6c 23 31 7d 7d 20 25 20 | 66 6f 72 20 4c 49 4e 45 |l#1}} % |for LINE|
|000002a0| 53 20 61 6e 64 20 43 4f | 4c 53 0a 0a 5c 6e 65 77 |S and CO|LS..\new|
|000002b0| 63 6f 6d 6d 61 6e 64 7b | 5c 74 61 62 72 65 66 7d |command{|\tabref}|
|000002c0| 5b 31 5d 7b 74 61 62 6c | 65 20 5c 72 65 66 7b 23 |[1]{tabl|e \ref{#|
|000002d0| 31 7d 20 6f 6e 20 70 61 | 67 65 20 5c 70 61 67 65 |1} on pa|ge \page|
|000002e0| 72 65 66 7b 23 31 7d 7d | 20 20 20 20 25 20 66 6f |ref{#1}}| % fo|
|000002f0| 72 20 74 61 62 75 6c 61 | 72 0a 5c 6e 65 77 63 6f |r tabula|r.\newco|
|00000300| 6d 6d 61 6e 64 7b 5c 66 | 69 67 72 65 66 7d 5b 31 |mmand{\f|igref}[1|
|00000310| 5d 7b 66 69 67 75 72 65 | 20 5c 72 65 66 7b 23 31 |]{figure| \ref{#1|
|00000320| 7d 20 6f 6e 20 70 61 67 | 65 20 5c 70 61 67 65 72 |} on pag|e \pager|
|00000330| 65 66 7b 23 31 7d 7d 20 | 20 20 25 20 66 69 67 75 |ef{#1}} | % figu|
|00000340| 72 65 73 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |res.\new|command{|
|00000350| 5c 73 65 63 72 65 66 7d | 5b 31 5d 7b 73 65 63 74 |\secref}|[1]{sect|
|00000360| 69 6f 6e 20 5c 72 65 66 | 7b 23 31 7d 20 6f 6e 20 |ion \ref|{#1} on |
|00000370| 70 61 67 65 20 5c 70 61 | 67 65 72 65 66 7b 23 31 |page \pa|geref{#1|
|00000380| 7d 7d 20 20 25 20 66 6f | 72 20 73 65 63 74 69 6f |}} % fo|r sectio|
|00000390| 6e 73 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |ns.\newc|ommand{\|
|000003a0| 66 75 6e 72 65 66 7d 5b | 31 5d 7b 5c 70 61 67 65 |funref}[|1]{\page|
|000003b0| 72 65 66 7b 23 31 7d 7d | 20 20 20 20 20 20 20 20 |ref{#1}}| |
|000003c0| 20 20 25 20 72 65 66 65 | 72 65 6e 63 65 20 66 6f | % refe|rence fo|
|000003d0| 72 20 66 75 6e 63 74 69 | 6f 6e 73 0a 0a 5c 6e 65 |r functi|ons..\ne|
|000003e0| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 6e 63 76 65 72 7d |wcommand|{\ncver}|
|000003f0| 7b 31 2e 38 2e 36 7d 20 | 20 20 25 20 63 75 72 72 |{1.8.6} | % curr|
|00000400| 65 6e 74 20 6e 63 75 72 | 73 65 73 20 76 65 72 73 |ent ncur|ses vers|
|00000410| 69 6f 6e 0a 0a 0a 0a 5c | 63 68 61 70 74 65 72 7b |ion....\|chapter{|
|00000420| 5c 6c 61 62 65 6c 7b 76 | 64 6d 7d 43 68 61 72 61 |\label{v|dm}Chara|
|00000430| 63 74 65 72 20 43 65 6c | 6c 20 47 72 61 70 68 69 |cter Cel|l Graphi|
|00000440| 63 73 7d 0a 0a 54 68 69 | 73 20 63 68 61 70 74 65 |cs}..Thi|s chapte|
|00000450| 72 20 64 65 61 6c 73 20 | 77 69 74 68 20 73 63 72 |r deals |with scr|
|00000460| 65 65 6e 20 69 6e 70 75 | 74 20 61 6e 64 20 6f 75 |een inpu|t and ou|
|00000470| 74 70 75 74 20 74 68 61 | 74 20 69 73 20 6e 6f 74 |tput tha|t is not|
|00000480| 0a 70 69 78 65 6c 20 62 | 61 73 65 64 2c 20 62 75 |.pixel b|ased, bu|
|00000490| 74 20 63 68 61 72 61 63 | 74 65 72 20 62 61 73 65 |t charac|ter base|
|000004a0| 64 2e 20 57 68 65 6e 20 | 77 65 20 73 61 79 20 63 |d. When |we say c|
|000004b0| 68 61 72 61 63 74 65 72 | 2c 20 77 65 20 6d 65 61 |haracter|, we mea|
|000004c0| 6e 0a 61 20 63 6f 6d 70 | 6f 73 69 74 69 6f 6e 20 |n.a comp|osition |
|000004d0| 6f 66 20 70 69 78 65 6c | 73 20 74 68 61 74 20 63 |of pixel|s that c|
|000004e0| 61 6e 20 62 65 20 63 68 | 61 6e 67 65 64 20 64 65 |an be ch|anged de|
|000004f0| 70 65 6e 64 69 6e 67 20 | 6f 6e 20 61 20 63 68 61 |pending |on a cha|
|00000500| 72 73 65 74 2e 0a 59 6f | 75 72 20 67 72 61 70 68 |rset..Yo|ur graph|
|00000510| 69 63 20 63 61 72 64 20 | 61 6c 72 65 61 64 79 20 |ic card |already |
|00000520| 6f 66 66 65 72 73 20 6f | 6e 65 20 6f 72 20 6d 6f |offers o|ne or mo|
|00000530| 72 65 20 63 68 61 72 73 | 65 74 73 20 61 6e 64 20 |re chars|ets and |
|00000540| 6f 70 65 72 61 74 65 73 | 0a 62 79 20 64 65 66 61 |operates|.by defa|
|00000550| 75 6c 74 20 69 6e 20 74 | 65 78 74 20 28 63 68 61 |ult in t|ext (cha|
|00000560| 72 73 65 74 29 20 6d 6f | 64 65 20 62 65 63 61 75 |rset) mo|de becau|
|00000570| 73 65 20 74 65 78 74 20 | 63 61 6e 20 62 65 20 70 |se text |can be p|
|00000580| 72 6f 63 65 73 73 65 64 | 0a 6d 75 63 68 20 66 61 |rocessed|.much fa|
|00000590| 73 74 65 72 20 74 68 61 | 6e 20 70 69 78 65 6c 20 |ster tha|n pixel |
|000005a0| 67 72 61 70 68 69 63 2e | 20 20 54 68 65 72 65 20 |graphic.| There |
|000005b0| 69 73 20 6d 6f 72 65 20 | 74 6f 20 64 6f 20 77 69 |is more |to do wi|
|000005c0| 74 68 20 74 65 72 6d 69 | 6e 61 6c 73 0a 74 68 61 |th termi|nals.tha|
|000005d0| 6e 20 74 6f 20 75 73 65 | 20 74 68 65 6d 20 61 73 |n to use| them as|
|000005e0| 20 73 69 6d 70 6c 65 20 | 28 64 75 6d 62 29 20 61 | simple |(dumb) a|
|000005f0| 6e 64 20 62 6f 72 69 6e | 67 20 74 65 78 74 20 64 |nd borin|g text d|
|00000600| 69 73 70 6c 61 79 73 2e | 20 49 20 77 69 6c 6c 0a |isplays.| I will.|
|00000610| 64 65 73 63 72 69 62 65 | 20 68 6f 77 20 74 6f 20 |describe| how to |
|00000620| 75 73 65 20 74 68 65 20 | 73 70 65 63 69 61 6c 20 |use the |special |
|00000630| 66 65 61 74 75 72 65 73 | 20 74 68 61 74 20 79 6f |features| that yo|
|00000640| 75 72 20 6c 69 6e 75 78 | 20 74 65 72 6d 69 6e 61 |ur linux| termina|
|00000650| 6c 2c 0a 65 73 70 65 63 | 69 61 6c 6c 79 20 74 68 |l,.espec|ially th|
|00000660| 65 20 6c 69 6e 75 78 20 | 63 6f 6e 73 6f 6c 65 2c |e linux |console,|
|00000670| 20 6f 66 66 65 72 73 2e | 0a 0a 5c 62 65 67 69 6e | offers.|..\begin|
|00000680| 7b 69 74 65 6d 69 7a 65 | 7d 0a 20 20 5c 69 74 65 |{itemize|}. \ite|
|00000690| 6d 20 7b 5c 62 66 20 70 | 72 69 6e 74 66 2c 20 73 |m {\bf p|rintf, s|
|000006a0| 70 72 69 6e 74 66 2c 20 | 66 70 72 69 6e 74 66 2c |printf, |fprintf,|
|000006b0| 20 73 63 61 6e 66 2c 20 | 73 73 63 61 6e 66 2c 20 | scanf, |sscanf, |
|000006c0| 66 73 63 61 6e 66 7d 20 | 5c 5c 0a 20 20 20 20 20 |fscanf} |\\. |
|000006d0| 20 20 20 57 69 74 68 20 | 74 68 65 73 65 20 66 75 | With |these fu|
|000006e0| 6e 63 74 69 6f 6e 73 20 | 66 72 6f 6d 20 5c 76 64 |nctions |from \vd|
|000006f0| 6d 75 6e 69 78 7b 6c 69 | 62 63 7d 20 79 6f 75 20 |munix{li|bc} you |
|00000700| 63 61 6e 20 6f 75 74 70 | 75 74 20 66 6f 72 6d 61 |can outp|ut forma|
|00000710| 74 74 65 64 20 0a 20 20 | 20 20 20 20 20 20 73 74 |tted . | st|
|00000720| 72 69 6e 67 73 20 74 6f | 20 5c 76 64 6d 75 6e 69 |rings to| \vdmuni|
|00000730| 78 7b 73 74 64 6f 75 74 | 7d 20 28 73 74 61 6e 64 |x{stdout|} (stand|
|00000740| 61 72 64 20 6f 75 74 70 | 75 74 29 2c 20 5c 76 64 |ard outp|ut), \vd|
|00000750| 6d 75 6e 69 78 7b 73 74 | 64 65 72 72 7d 0a 20 20 |munix{st|derr}. |
|00000760| 20 20 20 20 20 20 28 73 | 74 61 6e 64 61 72 64 20 | (s|tandard |
|00000770| 65 72 72 6f 72 29 20 6f | 72 20 6f 74 68 65 72 20 |error) o|r other |
|00000780| 73 74 72 65 61 6d 73 20 | 64 65 66 69 6e 65 64 20 |streams |defined |
|00000790| 61 73 20 5c 76 64 6d 61 | 72 67 7b 46 49 4c 45 20 |as \vdma|rg{FILE |
|000007a0| 2a 73 74 72 65 61 6d 7d | 20 28 66 69 6c 65 73 2c |*stream}| (files,|
|000007b0| 0a 20 20 20 20 20 20 20 | 20 66 6f 72 20 65 78 61 |. | for exa|
|000007c0| 6d 70 6c 65 29 2e 20 5c | 76 64 6d 66 75 6e 63 7b |mple). \|vdmfunc{|
|000007d0| 53 63 61 6e 66 28 2e 2e | 2e 29 7d 20 70 72 6f 76 |Scanf(..|.)} prov|
|000007e0| 69 64 65 73 20 61 20 73 | 69 6d 69 6c 61 72 20 77 |ides a s|imilar w|
|000007f0| 61 79 20 74 6f 20 72 65 | 61 64 0a 20 20 20 20 20 |ay to re|ad. |
|00000800| 20 20 20 66 6f 72 6d 61 | 74 74 65 64 20 69 6e 70 | forma|tted inp|
|00000810| 75 74 20 66 72 6f 6d 20 | 5c 76 64 6d 75 6e 69 78 |ut from |\vdmunix|
|00000820| 7b 73 74 64 69 6e 7d 2e | 0a 0a 20 20 5c 69 74 65 |{stdin}.|.. \ite|
|00000830| 6d 20 7b 5c 62 66 20 74 | 65 72 6d 63 61 70 7d 20 |m {\bf t|ermcap} |
|00000840| 5c 5c 0a 09 54 68 65 20 | 54 45 52 4d 69 6e 61 6c |\\..The |TERMinal|
|00000850| 20 43 41 50 61 62 69 6c | 69 74 69 65 20 64 61 74 | CAPabil|itie dat|
|00000860| 61 62 61 73 65 20 69 73 | 20 61 20 73 65 74 20 6f |abase is| a set o|
|00000870| 66 20 74 65 72 6d 69 6e | 61 6c 0a 09 64 65 73 63 |f termin|al..desc|
|00000880| 72 69 70 74 69 6f 6e 20 | 65 6e 74 72 69 65 73 20 |ription |entries |
|00000890| 69 6e 20 74 68 65 20 41 | 53 43 49 49 20 66 69 6c |in the A|SCII fil|
|000008a0| 65 20 2f 65 74 63 2f 74 | 65 72 6d 63 61 70 2e 20 |e /etc/t|ermcap. |
|000008b0| 20 48 65 72 65 20 79 6f | 75 0a 09 63 61 6e 20 66 | Here yo|u..can f|
|000008c0| 69 6e 64 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ind info|rmation |
|000008d0| 61 62 6f 75 74 20 68 6f | 77 20 74 6f 20 64 69 73 |about ho|w to dis|
|000008e0| 70 6c 61 79 20 73 70 65 | 63 69 61 6c 20 63 68 61 |play spe|cial cha|
|000008f0| 72 61 63 74 65 72 73 2c | 0a 09 68 6f 77 20 74 6f |racters,|..how to|
|00000900| 20 70 65 72 66 6f 72 6d | 20 6f 70 65 72 61 74 69 | perform| operati|
|00000910| 6f 6e 73 20 28 64 65 6c | 65 74 65 2c 20 69 6e 73 |ons (del|ete, ins|
|00000920| 65 72 74 20 63 68 61 72 | 61 63 74 65 72 73 20 6f |ert char|acters o|
|00000930| 72 20 6c 69 6e 65 73 0a | 09 65 74 63 29 20 61 6e |r lines.|.etc) an|
|00000940| 64 20 68 6f 77 20 74 6f | 20 69 6e 69 74 69 61 6c |d how to| initial|
|00000950| 69 7a 65 20 61 20 74 65 | 72 6d 69 6e 61 6c 2e 20 |ize a te|rminal. |
|00000960| 54 68 65 20 64 61 74 61 | 62 61 73 65 20 69 73 20 |The data|base is |
|00000970| 75 73 65 64 2c 0a 09 66 | 6f 72 20 65 78 61 6d 70 |used,..f|or examp|
|00000980| 6c 65 2c 20 62 79 20 74 | 68 65 20 65 64 69 74 6f |le, by t|he edito|
|00000990| 72 20 76 69 2e 20 54 68 | 65 72 65 20 61 72 65 20 |r vi. Th|ere are |
|000009a0| 76 69 65 77 20 6c 69 62 | 72 61 72 79 20 66 75 6e |view lib|rary fun|
|000009b0| 63 74 69 6f 6e 73 0a 09 | 74 6f 20 72 65 61 64 20 |ctions..|to read |
|000009c0| 61 6e 64 20 75 73 65 20 | 74 68 65 20 74 65 72 6d |and use |the term|
|000009d0| 69 6e 61 6c 20 63 61 70 | 61 62 69 6c 69 74 69 65 |inal cap|abilitie|
|000009e0| 73 20 28 5c 76 64 6d 75 | 6e 69 78 7b 73 65 65 20 |s (\vdmu|nix{see |
|000009f0| 74 65 72 6d 63 61 70 28 | 33 78 29 7d 29 2e 0a 09 |termcap(|3x)})...|
|00000a00| 57 69 74 68 20 74 68 69 | 73 20 64 61 74 61 62 61 |With thi|s databa|
|00000a10| 73 65 2c 20 70 72 6f 67 | 72 61 6d 73 20 63 61 6e |se, prog|rams can|
|00000a20| 20 77 6f 72 6b 20 77 69 | 74 68 20 61 20 76 61 72 | work wi|th a var|
|00000a30| 69 65 74 79 20 6f 66 0a | 09 74 65 72 6d 69 6e 61 |iety of.|.termina|
|00000a40| 6c 73 20 77 69 74 68 20 | 74 68 65 20 73 61 6d 65 |ls with |the same|
|00000a50| 20 63 6f 64 65 2e 20 55 | 73 69 6e 67 20 74 68 65 | code. U|sing the|
|00000a60| 20 74 65 72 6d 63 61 70 | 20 64 61 74 61 62 61 73 | termcap| databas|
|00000a70| 65 20 61 6e 64 0a 09 6c | 69 62 72 61 72 79 20 66 |e and..l|ibrary f|
|00000a80| 75 6e 63 74 69 6f 6e 73 | 20 70 72 6f 76 69 64 65 |unctions| provide|
|00000a90| 73 20 6f 6e 6c 79 20 6c | 6f 77 20 6c 65 76 65 6c |s only l|ow level|
|00000aa0| 20 61 63 63 65 73 73 20 | 74 6f 20 74 68 65 0a 09 | access |to the..|
|00000ab0| 74 65 72 6d 69 6e 61 6c | 2e 20 43 68 61 6e 67 69 |terminal|. Changi|
|00000ac0| 6e 67 20 61 74 74 72 69 | 62 75 74 65 73 20 6f 72 |ng attri|butes or|
|00000ad0| 20 63 6f 6c 6f 72 73 2c | 20 70 61 72 61 6d 65 74 | colors,| paramet|
|00000ae0| 65 72 69 7a 65 64 20 6f | 75 74 70 75 74 0a 09 61 |erized o|utput..a|
|00000af0| 6e 64 20 6f 70 74 69 6d | 69 7a 61 74 69 6f 6e 20 |nd optim|ization |
|00000b00| 6d 75 73 74 20 62 65 20 | 64 6f 6e 65 20 62 79 20 |must be |done by |
|00000b10| 74 68 65 20 70 72 6f 67 | 72 61 6d 6d 65 72 20 68 |the prog|rammer h|
|00000b20| 69 6d 73 65 6c 66 2e 0a | 0a 5c 69 74 65 6d 20 20 |imself..|.\item |
|00000b30| 7b 5c 62 66 20 74 65 72 | 6d 69 6e 66 6f 20 64 61 |{\bf ter|minfo da|
|00000b40| 74 61 62 61 73 65 7d 20 | 5c 5c 0a 09 54 68 65 20 |tabase} |\\..The |
|00000b50| 54 45 52 4d 69 6e 61 6c | 20 49 4e 46 4f 72 6d 61 |TERMinal| INFOrma|
|00000b60| 74 69 6f 6e 20 64 61 74 | 61 62 61 73 65 20 69 73 |tion dat|abase is|
|00000b70| 20 62 61 73 65 64 20 6f | 6e 20 74 68 65 20 74 65 | based o|n the te|
|00000b80| 72 6d 63 61 70 0a 09 64 | 61 74 61 62 61 73 65 20 |rmcap..d|atabase |
|00000b90| 61 6e 64 20 61 6c 73 6f | 20 64 65 73 63 72 69 62 |and also| describ|
|00000ba0| 65 73 20 74 65 72 6d 69 | 6e 61 6c 20 63 61 70 61 |es termi|nal capa|
|00000bb0| 62 69 6c 69 74 69 65 73 | 2c 20 62 75 74 20 6f 6e |bilities|, but on|
|00000bc0| 20 61 0a 09 68 69 67 68 | 65 72 20 6c 65 76 65 6c | a..high|er level|
|00000bd0| 20 74 68 61 6e 20 74 65 | 72 6d 63 61 70 2e 20 20 | than te|rmcap. |
|00000be0| 55 73 69 6e 67 20 74 65 | 72 6d 69 6e 66 6f 2c 20 |Using te|rminfo, |
|00000bf0| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 63 61 6e 0a |the prog|ram can.|
|00000c00| 09 65 61 73 69 6c 79 20 | 63 68 61 6e 67 65 20 73 |.easily |change s|
|00000c10| 63 72 65 65 6e 20 61 74 | 74 72 69 62 75 74 65 73 |creen at|tributes|
|00000c20| 2c 20 75 73 65 20 73 70 | 65 63 69 61 6c 20 6b 65 |, use sp|ecial ke|
|00000c30| 79 73 20 73 75 63 68 20 | 61 73 0a 09 66 75 6e 63 |ys such |as..func|
|00000c40| 74 69 6f 6e 20 6b 65 79 | 73 20 61 6e 64 20 6d 6f |tion key|s and mo|
|00000c50| 72 65 2e 20 54 68 65 20 | 64 61 74 61 62 61 73 65 |re. The |database|
|00000c60| 20 63 61 6e 20 62 65 20 | 66 6f 75 6e 64 20 69 6e | can be |found in|
|00000c70| 20 0a 09 5c 76 64 6d 75 | 6e 69 78 7b 2f 75 73 72 | ..\vdmu|nix{/usr|
|00000c80| 2f 6c 69 62 2f 74 65 72 | 6d 69 6e 66 6f 2f 5b 41 |/lib/ter|minfo/[A|
|00000c90| 2d 7a 2c 30 2d 39 5d 2a | 7d 2e 20 45 76 65 72 79 |-z,0-9]*|}. Every|
|00000ca0| 20 66 69 6c 65 20 64 65 | 73 63 72 69 62 65 73 20 | file de|scribes |
|00000cb0| 6f 6e 65 0a 09 74 65 72 | 6d 69 6e 61 6c 2e 0a 0a |one..ter|minal...|
|00000cc0| 20 20 5c 69 74 65 6d 20 | 7b 5c 62 66 20 63 75 72 | \item |{\bf cur|
|00000cd0| 73 65 73 7d 20 5c 5c 0a | 09 54 65 72 6d 69 6e 66 |ses} \\.|.Terminf|
|00000ce0| 6f 20 69 73 20 61 20 67 | 6f 6f 64 20 62 61 73 65 |o is a g|ood base|
|00000cf0| 20 74 6f 20 75 73 65 20 | 66 6f 72 20 74 65 72 6d | to use |for term|
|00000d00| 69 6e 61 6c 20 68 61 6e | 64 6c 69 6e 67 20 69 6e |inal han|dling in|
|00000d10| 20 61 0a 09 70 72 6f 67 | 72 61 6d 2e 20 54 68 65 | a..prog|ram. The|
|00000d20| 20 28 42 53 44 2d 29 43 | 55 52 53 45 53 20 6c 69 | (BSD-)C|URSES li|
|00000d30| 62 72 61 72 79 20 67 69 | 76 65 73 20 79 6f 75 0a |brary gi|ves you.|
|00000d40| 09 68 69 67 68 20 6c 65 | 76 65 6c 20 61 63 63 65 |.high le|vel acce|
|00000d50| 73 73 20 74 6f 20 74 68 | 65 20 74 65 72 6d 69 6e |ss to th|e termin|
|00000d60| 61 6c 20 61 6e 64 20 69 | 73 20 62 61 73 65 64 20 |al and i|s based |
|00000d70| 6f 6e 20 74 68 65 20 74 | 65 72 6d 69 6e 66 6f 0a |on the t|erminfo.|
|00000d80| 09 64 61 74 61 62 61 73 | 65 2e 20 43 75 72 73 65 |.databas|e. Curse|
|00000d90| 73 20 61 6c 6c 6f 77 73 | 20 79 6f 75 20 74 6f 20 |s allows| you to |
|00000da0| 6f 70 65 6e 20 61 6e 64 | 20 6d 61 6e 69 70 75 6c |open and| manipul|
|00000db0| 61 74 65 20 77 69 6e 64 | 6f 77 73 20 6f 6e 0a 09 |ate wind|ows on..|
|00000dc0| 74 68 65 20 73 63 72 65 | 65 6e 2c 20 70 72 6f 76 |the scre|en, prov|
|00000dd0| 69 64 65 73 20 61 20 63 | 6f 6d 70 6c 65 74 65 20 |ides a c|omplete |
|00000de0| 73 65 74 20 6f 66 20 69 | 6e 70 75 74 20 61 6e 64 |set of i|nput and|
|00000df0| 20 6f 75 74 70 75 74 0a | 09 66 75 6e 63 74 69 6f | output.|.functio|
|00000e00| 6e 73 2c 20 61 6e 64 20 | 63 61 6e 20 61 6c 74 65 |ns, and |can alte|
|00000e10| 72 20 76 69 64 65 6f 20 | 61 74 74 72 69 62 75 74 |r video |attribut|
|00000e20| 65 73 20 69 6e 20 61 20 | 74 65 72 6d 69 6e 61 6c |es in a |terminal|
|00000e30| 0a 09 69 6e 64 65 70 65 | 6e 64 65 6e 74 20 6d 61 |..indepe|ndent ma|
|00000e40| 6e 6e 65 72 20 6f 6e 20 | 6d 6f 72 65 20 74 68 61 |nner on |more tha|
|00000e50| 6e 20 31 35 30 20 74 65 | 72 6d 69 6e 61 6c 73 2e |n 150 te|rminals.|
|00000e60| 20 54 68 65 20 63 75 72 | 73 65 73 0a 09 6c 69 62 | The cur|ses..lib|
|00000e70| 72 61 72 79 20 63 61 6e | 20 62 65 20 66 6f 75 6e |rary can| be foun|
|00000e80| 64 20 69 6e 20 5c 76 64 | 6d 75 6e 69 78 7b 2f 75 |d in \vd|munix{/u|
|00000e90| 73 72 2f 6c 69 62 2f 6c | 69 62 63 75 72 73 65 73 |sr/lib/l|ibcurses|
|00000ea0| 2e 61 7d 2e 0a 09 54 68 | 69 73 20 69 73 20 74 68 |.a}...Th|is is th|
|00000eb0| 65 20 42 53 44 20 76 65 | 72 73 69 6f 6e 20 6f 66 |e BSD ve|rsion of|
|00000ec0| 20 63 75 72 73 65 73 2e | 0a 0a 20 20 5c 69 74 65 | curses.|.. \ite|
|00000ed0| 6d 20 7b 5c 62 66 20 6e | 63 75 72 73 65 73 7d 20 |m {\bf n|curses} |
|00000ee0| 5c 5c 0a 20 20 20 20 20 | 20 20 20 4e 63 75 72 73 |\\. | Ncurs|
|00000ef0| 65 73 20 69 73 20 74 68 | 65 20 6e 65 78 74 20 69 |es is th|e next i|
|00000f00| 6d 70 72 6f 76 65 6d 65 | 6e 74 2e 20 49 6e 20 76 |mproveme|nt. In v|
|00000f10| 65 72 73 69 6f 6e 20 5c | 6e 63 76 65 72 20 69 74 |ersion \|ncver it|
|00000f20| 20 73 68 6f 75 6c 64 20 | 62 65 0a 20 20 20 20 20 | should |be. |
|00000f30| 20 20 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 77 69 | compa|tible wi|
|00000f40| 74 68 20 41 54 5c 26 54 | 20 63 75 72 73 65 73 20 |th AT\&T| curses |
|00000f50| 61 73 20 64 65 66 69 6e | 65 64 20 69 6e 20 53 59 |as defin|ed in SY|
|00000f60| 53 56 52 34 20 61 6e 64 | 20 68 61 73 20 73 6f 6d |SVR4 and| has som|
|00000f70| 65 0a 20 20 20 20 20 20 | 20 20 65 78 74 65 6e 73 |e. | extens|
|00000f80| 69 6f 6e 73 20 73 75 63 | 68 20 61 73 20 63 6f 6c |ions suc|h as col|
|00000f90| 6f 72 20 6d 61 6e 69 70 | 75 6c 61 74 69 6f 6e 2c |or manip|ulation,|
|00000fa0| 20 73 70 65 63 69 61 6c | 20 6f 70 74 69 6d 69 7a | special| optimiz|
|00000fb0| 61 74 69 6f 6e 20 66 6f | 72 0a 20 20 20 20 20 20 |ation fo|r. |
|00000fc0| 20 20 6f 75 74 70 75 74 | 2c 20 74 65 72 6d 69 6e | output|, termin|
|00000fd0| 61 6c 20 73 70 65 63 69 | 66 69 63 20 6f 70 74 69 |al speci|fic opti|
|00000fe0| 6d 69 7a 61 74 69 6f 6e | 73 2c 20 20 61 6e 64 20 |mization|s, and |
|00000ff0| 6d 6f 72 65 2e 20 49 74 | 20 68 61 73 20 62 65 65 |more. It| has bee|
|00001000| 6e 0a 20 20 20 20 20 20 | 20 20 74 65 73 74 65 64 |n. | tested|
|00001010| 20 6f 6e 20 61 20 6c 6f | 74 20 6f 66 20 73 79 73 | on a lo|t of sys|
|00001020| 74 65 6d 73 20 73 75 63 | 68 20 61 73 20 53 75 6e |tems suc|h as Sun|
|00001030| 2d 4f 53 2c 20 48 50 20 | 61 6e 64 20 4c 69 6e 75 |-OS, HP |and Linu|
|00001040| 78 2e 0a 20 20 20 20 20 | 20 20 20 49 20 72 65 63 |x.. | I rec|
|00001050| 6f 6d 6d 65 6e 64 20 75 | 73 69 6e 67 20 6e 63 75 |ommend u|sing ncu|
|00001060| 72 73 65 73 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |rses ins|tead of |
|00001070| 74 68 65 20 6f 74 68 65 | 72 73 2e 20 4f 6e 20 53 |the othe|rs. On S|
|00001080| 59 53 56 20 55 6e 69 78 | 0a 20 20 20 20 20 20 20 |YSV Unix|. |
|00001090| 20 73 79 73 74 65 6d 73 | 20 28 73 75 63 68 20 61 | systems| (such a|
|000010a0| 73 20 53 75 6e 27 73 20 | 53 6f 6c 61 72 69 73 29 |s Sun's |Solaris)|
|000010b0| 20 74 68 65 72 65 20 73 | 68 6f 75 6c 64 20 65 78 | there s|hould ex|
|000010c0| 69 73 74 20 61 20 63 75 | 72 73 65 73 0a 20 20 20 |ist a cu|rses. |
|000010d0| 20 20 20 20 20 6c 69 62 | 72 61 72 79 20 77 69 74 | lib|rary wit|
|000010e0| 68 0a 20 20 20 20 20 20 | 20 20 74 68 65 20 73 61 |h. | the sa|
|000010f0| 6d 65 20 66 75 6e 63 74 | 69 6f 6e 61 6c 69 74 79 |me funct|ionality|
|00001100| 20 61 73 20 6e 63 75 72 | 73 65 73 20 28 61 63 74 | as ncur|ses (act|
|00001110| 75 61 6c 6c 79 20 74 68 | 65 20 73 6f 6c 61 72 69 |ually th|e solari|
|00001120| 73 20 63 75 72 73 65 73 | 0a 20 20 20 20 20 20 20 |s curses|. |
|00001130| 20 68 61 73 20 73 6f 6d | 65 20 6d 6f 72 65 20 66 | has som|e more f|
|00001140| 75 6e 63 74 69 6f 6e 73 | 20 61 6e 64 20 6d 6f 75 |unctions| and mou|
|00001150| 73 65 20 73 75 70 70 6f | 72 74 29 2e 0a 5c 65 6e |se suppo|rt)..\en|
|00001160| 64 7b 69 74 65 6d 69 7a | 65 7d 0a 0a 09 49 6e 20 |d{itemiz|e}...In |
|00001170| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 73 65 |the foll|owing se|
|00001180| 63 74 69 6f 6e 73 20 49 | 20 77 69 6c 6c 20 64 65 |ctions I| will de|
|00001190| 73 63 72 69 62 65 20 68 | 6f 77 20 74 6f 20 75 73 |scribe h|ow to us|
|000011a0| 65 20 74 68 65 0a 09 64 | 69 66 66 65 72 65 6e 74 |e the..d|ifferent|
|000011b0| 20 70 61 63 6b 61 67 65 | 73 20 74 6f 20 61 63 63 | package|s to acc|
|000011c0| 65 73 73 20 61 20 74 65 | 72 6d 69 6e 61 6c 2e 20 |ess a te|rminal. |
|000011d0| 57 69 74 68 20 4c 69 6e | 75 78 20 77 65 20 68 61 |With Lin|ux we ha|
|000011e0| 76 65 20 74 68 65 0a 09 | 47 4e 55 2d 76 65 72 73 |ve the..|GNU-vers|
|000011f0| 69 6f 6e 20 6f 66 20 74 | 65 72 6d 63 61 70 20 61 |ion of t|ermcap a|
|00001200| 6e 64 20 77 65 20 63 61 | 6e 20 75 73 65 20 6e 63 |nd we ca|n use nc|
|00001210| 75 72 73 65 73 20 69 6e | 73 74 65 61 64 20 6f 66 |urses in|stead of|
|00001220| 0a 09 63 75 72 73 65 73 | 2e 0a 0a 0a 0a 0a 0a 0a |..curses|........|
|00001230| 0a 5c 73 65 63 74 69 6f | 6e 7b 49 2f 4f 20 46 75 |.\sectio|n{I/O Fu|
|00001240| 6e 63 74 69 6f 6e 20 69 | 6e 20 6c 69 62 63 7d 0a |nction i|n libc}.|
|00001250| 0a 5c 73 75 62 73 65 63 | 74 69 6f 6e 7b 46 6f 72 |.\subsec|tion{For|
|00001260| 6d 61 74 74 65 64 20 4f | 75 74 70 75 74 7d 5c 6c |matted O|utput}\l|
|00001270| 61 62 65 6c 7b 73 65 63 | 5f 66 6f 72 6d 6f 75 74 |abel{sec|_formout|
|00001280| 7d 0a 0a 54 68 65 20 5c | 76 64 6d 66 75 6e 63 7b |}..The \|vdmfunc{|
|00001290| 70 72 69 6e 74 66 28 2e | 2e 2e 29 7d 20 66 75 6e |printf(.|..)} fun|
|000012a0| 63 74 69 6f 6e 73 20 69 | 6e 20 5c 76 64 6d 75 6e |ctions i|n \vdmun|
|000012b0| 69 78 7b 6c 69 62 63 7d | 20 70 72 6f 76 69 64 65 |ix{libc}| provide|
|000012c0| 20 66 6f 72 6d 61 74 74 | 65 64 20 6f 75 74 70 75 | formatt|ed outpu|
|000012d0| 74 0a 61 6e 64 20 61 6c | 6c 6f 77 20 74 72 61 6e |t.and al|low tran|
|000012e0| 73 66 6f 72 6d 61 74 69 | 6f 6e 73 20 6f 66 20 74 |sformati|ons of t|
|000012f0| 68 65 20 61 72 67 75 6d | 65 6e 74 73 2e 0a 0a 5c |he argum|ents...\|
|00001300| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 7d 0a 20 |begin{it|emize}. |
|00001310| 20 5c 69 74 65 6d 20 7b | 5c 74 74 20 69 6e 74 20 | \item {|\tt int |
|00001320| 66 70 72 69 6e 74 66 28 | 46 49 4c 45 20 2a 73 74 |fprintf(|FILE *st|
|00001330| 72 65 61 6d 2c 20 63 6f | 6e 73 74 20 63 68 61 72 |ream, co|nst char|
|00001340| 20 2a 66 6f 72 6d 61 74 | 2c 20 2e 2e 2e 29 2c 7d | *format|, ...),}|
|00001350| 20 5c 6c 61 62 65 6c 7b | 66 75 6e 5f 66 70 72 69 | \label{|fun_fpri|
|00001360| 6e 74 66 7d 5c 5c 0a 20 | 20 20 20 20 20 20 20 77 |ntf}\\. | w|
|00001370| 69 6c 6c 20 74 72 61 6e | 73 66 6f 72 6d 20 74 68 |ill tran|sform th|
|00001380| 65 20 6f 75 74 70 75 74 | 20 28 61 72 67 75 6d 65 |e output| (argume|
|00001390| 6e 74 73 20 74 6f 20 66 | 69 6c 6c 20 69 6e 20 5c |nts to f|ill in \|
|000013a0| 76 64 6d 61 72 67 7b 2e | 2e 2e 7d 29 20 61 6e 64 |vdmarg{.|..}) and|
|000013b0| 20 0a 20 20 20 20 20 20 | 20 20 77 72 69 74 65 20 | . | write |
|000013c0| 69 74 20 74 6f 20 5c 76 | 64 6d 61 72 67 7b 73 74 |it to \v|dmarg{st|
|000013d0| 72 65 61 6d 7d 2e 20 54 | 68 65 20 66 6f 72 6d 61 |ream}. T|he forma|
|000013e0| 74 20 64 65 66 69 6e 65 | 64 20 69 6e 20 5c 76 64 |t define|d in \vd|
|000013f0| 6d 61 72 67 7b 66 6f 72 | 6d 61 74 7d 0a 20 20 20 |marg{for|mat}. |
|00001400| 20 20 20 20 20 77 69 6c | 6c 20 62 65 20 77 72 69 | wil|l be wri|
|00001410| 74 74 65 6e 2c 20 74 6f | 6f 2e 20 54 68 65 20 66 |tten, to|o. The f|
|00001420| 75 6e 63 74 69 6f 6e 20 | 77 69 6c 6c 20 72 65 74 |unction |will ret|
|00001430| 75 72 6e 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |urn the |number o|
|00001440| 66 20 77 72 69 74 74 65 | 6e 0a 20 20 20 20 20 20 |f writte|n. |
|00001450| 20 20 63 68 61 72 61 63 | 74 65 72 73 20 6f 72 20 | charac|ters or |
|00001460| 61 20 6e 65 67 61 74 69 | 76 65 20 76 61 6c 75 65 |a negati|ve value|
|00001470| 20 6f 6e 20 65 72 72 6f | 72 2e 0a 0a 20 20 20 20 | on erro|r... |
|00001480| 20 20 20 20 5c 76 64 6d | 61 72 67 7b 66 6f 72 6d | \vdm|arg{form|
|00001490| 61 74 7d 20 63 6f 6e 74 | 61 69 6e 73 20 74 77 6f |at} cont|ains two|
|000014a0| 20 6b 69 6e 64 73 20 6f | 66 20 6f 62 6a 65 63 74 | kinds o|f object|
|000014b0| 73 0a 20 20 20 20 20 20 | 20 20 5c 62 65 67 69 6e |s. | \begin|
|000014c0| 7b 65 6e 75 6d 65 72 61 | 74 65 7d 0a 20 20 20 20 |{enumera|te}. |
|000014d0| 20 20 20 20 20 5c 69 74 | 65 6d 20 20 6e 6f 72 6d | \it|em norm|
|000014e0| 61 6c 20 63 68 61 72 61 | 63 74 65 72 73 20 66 6f |al chara|cters fo|
|000014f0| 72 20 74 68 65 20 6f 75 | 74 70 75 74 20 61 6e 64 |r the ou|tput and|
|00001500| 0a 20 20 20 20 20 20 20 | 20 20 5c 69 74 65 6d 20 |. | \item |
|00001510| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 68 6f 77 | informa|tion how|
|00001520| 20 74 6f 20 74 72 61 6e | 73 66 6f 72 6d 20 6f 72 | to tran|sform or|
|00001530| 20 66 6f 72 6d 61 74 20 | 74 68 65 20 61 72 67 75 | format |the argu|
|00001540| 6d 65 6e 74 73 2e 0a 20 | 20 20 20 20 20 20 20 5c |ments.. | \|
|00001550| 65 6e 64 7b 65 6e 75 6d | 65 72 61 74 65 7d 0a 0a |end{enum|erate}..|
|00001560| 20 20 20 20 20 20 20 20 | 46 6f 72 6d 61 74 20 69 | |Format i|
|00001570| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 6d 75 73 74 20 |nformati|on must |
|00001580| 62 65 67 69 6e 20 77 69 | 74 68 20 7b 5c 69 74 20 |begin wi|th {\it |
|00001590| 5c 25 7d 20 66 6f 6c 6c | 6f 77 65 64 20 62 79 20 |\%} foll|owed by |
|000015a0| 76 61 6c 75 65 73 20 66 | 6f 72 20 74 68 65 0a 20 |values f|or the. |
|000015b0| 20 20 20 20 20 20 20 66 | 6f 72 6d 61 74 20 66 6f | f|ormat fo|
|000015c0| 6c 6c 6f 77 65 64 20 62 | 79 20 61 20 63 68 61 72 |llowed b|y a char|
|000015d0| 61 63 74 65 72 20 66 6f | 72 20 74 68 65 20 74 72 |acter fo|r the tr|
|000015e0| 61 6e 73 6c 61 74 69 6f | 6e 20 28 74 6f 20 70 72 |anslatio|n (to pr|
|000015f0| 69 6e 74 20 5c 25 20 62 | 79 0a 20 20 20 20 20 20 |int \% b|y. |
|00001600| 20 20 69 74 73 65 6c 66 | 20 75 73 65 20 7b 5c 69 | itself| use {\i|
|00001610| 74 20 20 5c 25 5c 25 7d | 29 2e 20 50 6f 73 73 69 |t \%\%}|). Possi|
|00001620| 62 6c 65 20 76 61 6c 75 | 65 73 20 66 6f 72 20 74 |ble valu|es for t|
|00001630| 68 65 20 66 6f 72 6d 61 | 74 20 61 72 65 3a 0a 0a |he forma|t are:..|
|00001640| 5c 62 65 67 69 6e 7b 69 | 74 65 6d 69 7a 65 7d 0a |\begin{i|temize}.|
|00001650| 20 5c 69 74 65 6d 20 46 | 6c 61 67 73 0a 20 20 5c | \item F|lags. \|
|00001660| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 7d 0a 20 |begin{it|emize}. |
|00001670| 20 20 5c 69 74 65 6d 20 | 7b 5c 74 74 20 2d 7d 20 | \item |{\tt -} |
|00001680| 5c 5c 0a 20 20 20 20 54 | 68 65 20 66 6f 72 6d 61 |\\. T|he forma|
|00001690| 74 74 65 64 20 61 72 67 | 75 6d 65 6e 74 20 77 69 |tted arg|ument wi|
|000016a0| 6c 6c 20 62 65 20 70 72 | 69 6e 74 65 64 20 6f 6e |ll be pr|inted on|
|000016b0| 20 74 68 65 20 6c 65 66 | 74 20 6d 61 72 67 69 6e | the lef|t margin|
|000016c0| 20 28 64 65 66 61 75 6c | 74 20 69 73 0a 20 20 20 | (defaul|t is. |
|000016d0| 20 74 68 65 20 72 69 67 | 68 74 20 6d 61 72 67 69 | the rig|ht margi|
|000016e0| 6e 20 69 6e 20 74 68 65 | 20 61 72 67 75 6d 65 6e |n in the| argumen|
|000016f0| 74 20 66 69 65 6c 64 29 | 2e 0a 20 20 20 5c 69 74 |t field)|.. \it|
|00001700| 65 6d 20 7b 5c 74 74 20 | 2b 7d 20 5c 5c 0a 20 20 |em {\tt |+} \\. |
|00001710| 20 20 45 76 65 72 79 20 | 6e 75 6d 62 65 72 20 77 | Every |number w|
|00001720| 69 6c 6c 20 62 65 20 70 | 72 69 6e 74 65 64 20 77 |ill be p|rinted w|
|00001730| 69 74 68 20 61 20 73 69 | 67 6e 2c 20 65 2e 67 2e |ith a si|gn, e.g.|
|00001740| 20 7b 5c 74 74 20 2b 31 | 32 7d 20 6f 72 20 7b 5c | {\tt +1|2} or {\|
|00001750| 74 74 20 2d 32 2e 33 32 | 7d 2e 0a 20 20 5c 65 6e |tt -2.32|}.. \en|
|00001760| 64 7b 69 74 65 6d 69 7a | 65 7d 0a 20 5c 69 74 65 |d{itemiz|e}. \ite|
|00001770| 6d 20 42 6c 61 6e 6b 20 | 5c 5c 0a 20 20 57 68 65 |m Blank |\\. Whe|
|00001780| 6e 20 74 68 65 20 66 69 | 72 73 74 20 63 68 61 72 |n the fi|rst char|
|00001790| 61 63 74 65 72 20 69 73 | 20 6e 6f 74 20 61 20 73 |acter is| not a s|
|000017a0| 69 67 6e 2c 20 61 20 62 | 6c 61 6e 6b 20 77 69 6c |ign, a b|lank wil|
|000017b0| 6c 20 62 65 20 69 6e 73 | 65 72 74 65 64 2e 0a 20 |l be ins|erted.. |
|000017c0| 5c 69 74 65 6d 20 7b 5c | 74 74 20 30 7d 20 5c 5c |\item {\|tt 0} \\|
|000017d0| 0a 20 20 46 6f 72 20 6e | 75 6d 65 72 69 63 20 74 |. For n|umeric t|
|000017e0| 72 61 6e 73 66 6f 72 6d | 61 74 69 6f 6e 20 74 68 |ransform|ation th|
|000017f0| 65 20 66 69 65 6c 64 20 | 77 69 64 74 68 20 77 69 |e field |width wi|
|00001800| 6c 6c 20 62 65 20 66 69 | 6c 6c 65 64 20 75 70 20 |ll be fi|lled up |
|00001810| 77 69 74 68 20 7b 5c 74 | 74 20 30 7d 27 73 0a 20 |with {\t|t 0}'s. |
|00001820| 20 6f 6e 20 74 68 65 20 | 6c 65 66 74 20 73 69 64 | on the |left sid|
|00001830| 65 2e 0a 20 5c 69 74 65 | 6d 20 7b 5c 74 74 20 5c |e.. \ite|m {\tt \|
|00001840| 23 7d 20 5c 5c 0a 20 20 | 41 6c 74 65 72 6e 61 74 |#} \\. |Alternat|
|00001850| 65 20 6f 75 74 70 75 74 | 20 64 65 70 65 6e 64 69 |e output| dependi|
|00001860| 6e 67 20 6f 6e 20 74 68 | 65 20 74 72 61 6e 73 66 |ng on th|e transf|
|00001870| 6f 72 6d 61 74 69 6f 6e | 20 66 6f 72 20 74 68 65 |ormation| for the|
|00001880| 20 61 72 67 75 6d 65 6e | 74 0a 20 20 5c 62 65 67 | argumen|t. \beg|
|00001890| 69 6e 7b 69 74 65 6d 69 | 7a 65 7d 0a 20 20 20 5c |in{itemi|ze}. \|
|000018a0| 69 74 65 6d 20 20 46 6f | 72 20 7b 5c 69 74 20 6f |item Fo|r {\it o|
|000018b0| 7d 20 74 68 65 20 66 69 | 72 73 74 20 6e 75 6d 62 |} the fi|rst numb|
|000018c0| 65 72 20 69 73 20 61 20 | 7b 5c 69 74 20 30 7d 2e |er is a |{\it 0}.|
|000018d0| 0a 20 20 20 5c 69 74 65 | 6d 20 20 46 6f 72 20 7b |. \ite|m For {|
|000018e0| 5c 69 74 20 78 7d 20 6f | 72 20 7b 5c 69 74 20 58 |\it x} o|r {\it X|
|000018f0| 7d 20 7b 5c 69 74 20 30 | 78 7d 20 6f 72 20 7b 5c |} {\it 0|x} or {\|
|00001900| 69 74 20 30 58 7d 20 77 | 69 6c 6c 20 62 65 20 70 |it 0X} w|ill be p|
|00001910| 72 69 6e 74 65 64 20 69 | 6e 0a 20 20 20 20 66 72 |rinted i|n. fr|
|00001920| 6f 6e 74 20 6f 66 20 74 | 68 65 20 61 72 67 75 6d |ont of t|he argum|
|00001930| 65 6e 74 2e 0a 20 20 20 | 5c 69 74 65 6d 20 20 46 |ent.. |\item F|
|00001940| 6f 72 20 7b 5c 69 74 20 | 65 7d 2c 20 7b 5c 69 74 |or {\it |e}, {\it|
|00001950| 20 45 7d 2c 20 7b 5c 69 | 74 20 66 7d 20 6f 72 20 | E}, {\i|t f} or |
|00001960| 7b 5c 69 74 20 46 7d 20 | 74 68 65 20 6f 75 74 70 |{\it F} |the outp|
|00001970| 75 74 20 68 61 73 20 61 | 20 64 65 63 69 6d 61 6c |ut has a| decimal|
|00001980| 0a 20 20 20 20 70 6f 69 | 6e 74 2e 0a 20 20 20 5c |. poi|nt.. \|
|00001990| 69 74 65 6d 20 20 46 6f | 72 20 7b 5c 69 74 20 67 |item Fo|r {\it g|
|000019a0| 7d 20 6f 72 20 7b 5c 69 | 74 20 47 7d 20 7a 65 72 |} or {\i|t G} zer|
|000019b0| 6f 65 73 20 6f 6e 20 74 | 68 65 20 65 6e 64 20 6f |oes on t|he end o|
|000019c0| 66 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 61 |f the ar|gument a|
|000019d0| 72 65 0a 20 20 20 20 70 | 72 69 6e 74 65 64 2e 0a |re. p|rinted..|
|000019e0| 20 20 5c 65 6e 64 7b 69 | 74 65 6d 69 7a 65 7d 0a | \end{i|temize}.|
|000019f0| 20 5c 69 74 65 6d 20 41 | 20 6e 75 6d 62 65 72 20 | \item A| number |
|00001a00| 66 6f 72 20 74 68 65 20 | 6d 69 6e 69 6d 61 6c 20 |for the |minimal |
|00001a10| 66 69 65 6c 64 20 77 69 | 64 74 68 2e 5c 5c 0a 20 |field wi|dth.\\. |
|00001a20| 20 54 68 65 20 74 72 61 | 6e 73 66 6f 72 6d 65 64 | The tra|nsformed|
|00001a30| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 70 72 69 | argumen|t is pri|
|00001a40| 6e 74 65 64 20 69 6e 20 | 61 20 66 69 65 6c 64 20 |nted in |a field |
|00001a50| 77 68 69 63 68 20 69 73 | 20 61 74 20 6c 65 61 73 |which is| at leas|
|00001a60| 74 20 61 73 20 62 69 67 | 20 61 73 0a 20 20 74 68 |t as big| as. th|
|00001a70| 65 20 61 72 67 75 6d 65 | 6e 74 20 69 74 73 65 6c |e argume|nt itsel|
|00001a80| 66 2e 20 57 69 74 68 20 | 61 20 6e 75 6d 62 65 72 |f. With |a number|
|00001a90| 20 79 6f 75 20 63 61 6e | 20 6d 61 6b 65 20 74 68 | you can| make th|
|00001aa0| 65 20 66 69 65 6c 64 20 | 77 69 64 74 68 20 62 69 |e field |width bi|
|00001ab0| 67 67 65 72 2e 0a 20 20 | 49 66 20 74 68 65 20 66 |gger.. |If the f|
|00001ac0| 6f 72 6d 61 74 74 65 64 | 20 61 72 67 75 6d 65 6e |ormatted| argumen|
|00001ad0| 74 20 69 73 20 73 6d 61 | 6c 6c 65 72 2c 20 74 68 |t is sma|ller, th|
|00001ae0| 65 6e 20 74 68 65 20 66 | 69 65 6c 64 20 77 69 64 |en the f|ield wid|
|00001af0| 74 68 20 77 69 6c 6c 20 | 62 65 20 66 69 6c 6c 65 |th will |be fille|
|00001b00| 64 0a 20 20 77 69 74 68 | 20 7a 65 72 6f 65 73 20 |d. with| zeroes |
|00001b10| 6f 72 20 62 6c 61 6e 6b | 73 2e 0a 20 5c 69 74 65 |or blank|s.. \ite|
|00001b20| 6d 20 20 41 20 70 6f 69 | 6e 74 20 74 6f 20 73 65 |m A poi|nt to se|
|00001b30| 70 61 72 61 74 65 20 74 | 68 65 20 66 69 65 6c 64 |parate t|he field|
|00001b40| 20 77 69 64 74 68 20 61 | 6e 64 20 74 68 65 20 70 | width a|nd the p|
|00001b50| 72 65 63 69 73 69 6f 6e | 2e 0a 20 5c 69 74 65 6d |recision|.. \item|
|00001b60| 20 20 41 20 6e 75 6d 62 | 65 72 20 66 6f 72 20 74 | A numb|er for t|
|00001b70| 68 65 20 70 72 65 63 69 | 73 69 6f 6e 2e 0a 5c 65 |he preci|sion..\e|
|00001b80| 6e 64 7b 69 74 65 6d 69 | 7a 65 7d 0a 0a 20 20 20 |nd{itemi|ze}.. |
|00001b90| 20 20 20 20 20 50 6f 73 | 73 69 62 6c 65 20 76 61 | Pos|sible va|
|00001ba0| 6c 75 65 73 20 66 6f 72 | 20 74 68 65 20 74 72 61 |lues for| the tra|
|00001bb0| 6e 73 66 6f 72 6d 61 74 | 69 6f 6e 20 61 72 65 20 |nsformat|ion are |
|00001bc0| 69 6e 20 5c 74 61 62 72 | 65 66 7b 74 61 62 5f 70 |in \tabr|ef{tab_p|
|00001bd0| 72 69 6e 74 66 7d 2e 0a | 0a 20 20 5c 69 74 65 6d |rintf}..|. \item|
|00001be0| 20 7b 5c 74 74 20 69 6e | 74 20 70 72 69 6e 74 66 | {\tt in|t printf|
|00001bf0| 28 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 66 6f 72 |(const c|har *for|
|00001c00| 6d 61 74 2c 20 2e 2e 2e | 29 7d 20 5c 6c 61 62 65 |mat, ...|)} \labe|
|00001c10| 6c 7b 66 75 6e 5f 70 72 | 69 6e 74 66 7d 5c 5c 0a |l{fun_pr|intf}\\.|
|00001c20| 20 20 20 20 20 20 20 20 | 53 61 6d 65 20 61 73 20 | |Same as |
|00001c30| 5c 76 64 6d 66 75 6e 63 | 7b 66 70 72 69 6e 74 66 |\vdmfunc|{fprintf|
|00001c40| 28 73 74 64 6f 75 74 2c | 20 2e 2e 2e 29 7d 2e 0a |(stdout,| ...)}..|
|00001c50| 0a 20 20 5c 69 74 65 6d | 20 7b 5c 74 74 20 69 6e |. \item| {\tt in|
|00001c60| 74 20 73 70 72 69 6e 74 | 66 28 63 68 61 72 20 2a |t sprint|f(char *|
|00001c70| 73 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 66 |s, const| char *f|
|00001c80| 6f 72 6d 61 74 2c 20 2e | 2e 2e 29 7d 20 5c 6c 61 |ormat, .|..)} \la|
|00001c90| 62 65 6c 7b 66 75 6e 5f | 73 70 72 69 6e 74 66 7d |bel{fun_|sprintf}|
|00001ca0| 5c 5c 0a 20 20 20 20 20 | 20 20 20 53 61 6d 65 20 |\\. | Same |
|00001cb0| 61 73 20 5c 76 64 6d 66 | 75 6e 63 7b 70 72 69 6e |as \vdmf|unc{prin|
|00001cc0| 74 66 28 2e 2e 2e 29 7d | 2c 20 65 78 63 65 70 74 |tf(...)}|, except|
|00001cd0| 20 74 68 61 74 20 74 68 | 65 20 6f 75 74 70 75 74 | that th|e output|
|00001ce0| 20 77 69 6c 6c 20 62 65 | 20 77 72 69 74 74 65 6e | will be| written|
|00001cf0| 0a 20 20 20 20 20 20 20 | 20 74 6f 20 74 68 65 20 |. | to the |
|00001d00| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 20 70 6f |the char|acter po|
|00001d10| 69 6e 74 65 72 20 5c 76 | 64 6d 61 72 67 7b 73 7d |inter \v|dmarg{s}|
|00001d20| 20 28 77 69 74 68 20 61 | 20 66 6f 6c 6c 6f 77 69 | (with a| followi|
|00001d30| 6e 67 20 0a 20 20 20 20 | 20 20 20 20 7b 5c 69 74 |ng . | {\it|
|00001d40| 20 5c 76 65 72 62 2b 5c | 2b 30 7d 29 2e 0a 0a 20 | \verb+\|+0})... |
|00001d50| 20 20 20 20 20 20 20 5c | 6e 6f 74 65 6e 6d 7b 59 | \|notenm{Y|
|00001d60| 6f 75 20 6d 75 73 74 20 | 61 6c 6c 6f 63 61 74 65 |ou must |allocate|
|00001d70| 20 65 6e 6f 75 67 68 20 | 6d 65 6d 6f 72 79 20 66 | enough |memory f|
|00001d80| 6f 72 20 5c 76 64 6d 61 | 72 67 7b 73 7d 7d 0a 0a |or \vdma|rg{s}}..|
|00001d90| 5c 69 74 65 6d 20 7b 5c | 74 74 20 76 70 72 69 6e |\item {\|tt vprin|
|00001da0| 74 66 28 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 66 |tf(const| char *f|
|00001db0| 6f 72 6d 61 74 2c 20 76 | 61 5c 5f 6c 69 73 74 20 |ormat, v|a\_list |
|00001dc0| 61 72 67 29 7d 20 5c 6c | 61 62 65 6c 7b 66 75 6e |arg)} \l|abel{fun|
|00001dd0| 5f 76 70 72 69 6e 74 66 | 7d 5c 5c 0a 20 20 20 20 |_vprintf|}\\. |
|00001de0| 20 20 7b 5c 74 74 20 76 | 66 70 72 69 6e 74 66 28 | {\tt v|fprintf(|
|00001df0| 46 49 4c 45 20 2a 73 74 | 72 65 61 6d 2c 20 63 6f |FILE *st|ream, co|
|00001e00| 6e 73 74 20 63 68 61 72 | 20 2a 66 6f 72 6d 61 74 |nst char| *format|
|00001e10| 2c 20 76 61 5c 5f 6c 69 | 73 74 20 61 72 67 29 7d |, va\_li|st arg)}|
|00001e20| 20 5c 6c 61 62 65 6c 7b | 66 75 6e 5f 76 66 70 72 | \label{|fun_vfpr|
|00001e30| 69 6e 74 66 7d 5c 5c 0a | 20 20 20 20 20 20 7b 5c |intf}\\.| {\|
|00001e40| 74 74 20 76 73 70 72 69 | 6e 74 66 28 63 68 61 72 |tt vspri|ntf(char|
|00001e50| 20 2a 73 2c 20 63 6f 6e | 73 74 20 63 68 61 72 20 | *s, con|st char |
|00001e60| 2a 66 6f 72 6d 61 74 2c | 20 76 61 5c 5f 6c 69 73 |*format,| va\_lis|
|00001e70| 74 20 61 72 67 29 7d 20 | 5c 6c 61 62 65 6c 7b 66 |t arg)} |\label{f|
|00001e80| 75 6e 5f 76 73 70 72 69 | 6e 74 66 7d 5c 5c 0a 20 |un_vspri|ntf}\\. |
|00001e90| 20 20 20 20 20 54 68 65 | 20 73 61 6d 65 20 61 73 | The| same as|
|00001ea0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 73 20 61 | the fun|ctions a|
|00001eb0| 62 6f 76 65 2c 20 6f 6e | 6c 79 20 74 68 65 20 61 |bove, on|ly the a|
|00001ec0| 72 67 75 6d 65 6e 74 20 | 6c 69 73 74 20 69 73 20 |rgument |list is |
|00001ed0| 73 65 74 20 74 6f 0a 20 | 20 20 20 20 20 5c 76 64 |set to. | \vd|
|00001ee0| 6d 61 72 67 7b 61 72 67 | 7d 2e 0a 5c 65 6e 64 7b |marg{arg|}..\end{|
|00001ef0| 69 74 65 6d 69 7a 65 7d | 0a 0a 5c 62 65 67 69 6e |itemize}|..\begin|
|00001f00| 7b 74 61 62 6c 65 7d 0a | 20 20 5c 63 61 70 74 69 |{table}.| \capti|
|00001f10| 6f 6e 7b 4c 69 62 63 20 | 2d 20 70 72 69 6e 74 66 |on{Libc |- printf|
|00001f20| 20 74 72 61 6e 73 66 6f | 72 6d 61 74 69 6f 6e 73 | transfo|rmations|
|00001f30| 7d 20 5c 6c 61 62 65 6c | 7b 74 61 62 5f 70 72 69 |} \label|{tab_pri|
|00001f40| 6e 74 66 7d 0a 20 20 5c | 62 65 67 69 6e 7b 63 65 |ntf}. \|begin{ce|
|00001f50| 6e 74 65 72 7d 0a 20 20 | 20 20 5c 62 65 67 69 6e |nter}. | \begin|
|00001f60| 7b 74 61 62 75 6c 61 72 | 7d 7b 63 7c 6c 7d 0a 20 |{tabular|}{c|l}. |
|00001f70| 20 20 20 7b 5c 62 66 20 | 43 68 61 72 61 63 74 65 | {\bf |Characte|
|00001f80| 72 7d 20 26 20 20 7b 5c | 62 66 20 46 6f 72 6d 61 |r} & {\|bf Forma|
|00001f90| 74 74 65 64 20 74 6f 7d | 20 5c 5c 20 5c 68 6c 69 |tted to}| \\ \hli|
|00001fa0| 6e 65 0a 20 20 20 20 64 | 2c 69 20 26 20 20 7b 5c |ne. d|,i & {\|
|00001fb0| 69 74 20 69 6e 74 7d 20 | 73 69 67 6e 65 64 2c 20 |it int} |signed, |
|00001fc0| 64 65 63 69 6d 61 6c 20 | 5c 5c 0a 20 20 20 20 6f |decimal |\\. o|
|00001fd0| 20 20 20 26 20 20 7b 5c | 69 74 20 69 6e 74 7d 20 | & {\|it int} |
|00001fe0| 75 6e 73 69 67 6e 65 64 | 2c 20 6f 63 74 61 6c 2c |unsigned|, octal,|
|00001ff0| 20 77 69 74 68 6f 75 74 | 20 6c 65 61 64 69 6e 67 | without| leading|
|00002000| 20 30 20 5c 5c 0a 20 20 | 20 20 78 2c 58 20 26 20 | 0 \\. | x,X & |
|00002010| 20 7b 5c 69 74 20 69 6e | 74 7d 20 75 6e 73 69 67 | {\it in|t} unsig|
|00002020| 6e 65 64 2c 20 68 65 78 | 61 64 65 63 69 6d 61 6c |ned, hex|adecimal|
|00002030| 20 77 69 74 68 6f 75 74 | 20 6c 65 61 64 69 6e 67 | without| leading|
|00002040| 20 30 78 20 5c 5c 0a 20 | 20 20 20 75 20 20 20 26 | 0x \\. | u &|
|00002050| 20 20 7b 5c 69 74 20 69 | 6e 74 7d 20 75 6e 73 69 | {\it i|nt} unsi|
|00002060| 67 6e 65 64 2c 20 64 65 | 63 69 6d 61 6c 20 5c 5c |gned, de|cimal \\|
|00002070| 0a 20 20 20 20 63 20 20 | 20 26 20 20 7b 5c 69 74 |. c | & {\it|
|00002080| 20 69 6e 74 7d 20 28 75 | 6e 73 69 67 6e 65 64 29 | int} (u|nsigned)|
|00002090| 20 73 69 6e 67 6c 65 20 | 63 68 61 72 61 63 74 65 | single |characte|
|000020a0| 72 20 5c 5c 0a 20 20 20 | 20 73 20 20 20 26 20 20 |r \\. | s & |
|000020b0| 7b 5c 69 74 20 63 68 61 | 72 20 2a 7d 20 75 70 20 |{\it cha|r *} up |
|000020c0| 74 6f 20 5c 76 65 72 62 | 2b 5c 2b 30 20 5c 5c 0a |to \verb|+\+0 \\.|
|000020d0| 20 20 20 20 66 20 20 20 | 26 20 20 7b 5c 69 74 20 | f |& {\it |
|000020e0| 64 6f 75 62 6c 65 7d 20 | 61 73 20 5b 2d 5d 6d 6d |double} |as [-]mm|
|000020f0| 6d 2e 64 64 64 20 5c 5c | 0a 20 20 20 20 65 2c 45 |m.ddd \\|. e,E|
|00002100| 20 26 20 20 7b 5c 69 74 | 20 64 6f 75 62 6c 65 7d | & {\it| double}|
|00002110| 20 61 73 20 5b 2d 5d 6d | 2e 64 64 64 64 64 64 65 | as [-]m|.dddddde|
|00002120| 24 5c 70 6d 24 78 78 20 | 5c 5c 0a 20 20 20 20 67 |$\pm$xx |\\. g|
|00002130| 2c 47 20 26 20 20 7b 5c | 69 74 20 64 6f 75 62 6c |,G & {\|it doubl|
|00002140| 65 7d 20 75 73 69 6e 67 | 20 5c 25 65 20 6f 72 20 |e} using| \%e or |
|00002150| 5c 25 66 20 61 73 20 6e | 65 65 64 65 64 20 5c 5c |\%f as n|eeded \\|
|00002160| 0a 20 20 20 20 70 20 20 | 20 26 20 20 7b 5c 69 74 |. p | & {\it|
|00002170| 20 76 6f 69 64 20 2a 7d | 20 5c 5c 0a 20 20 20 20 | void *}| \\. |
|00002180| 6e 20 20 20 26 20 20 7b | 5c 69 74 20 69 6e 74 20 |n & {|\it int |
|00002190| 2a 7d 20 5c 5c 0a 20 20 | 20 20 5c 25 20 20 26 20 |*} \\. | \% & |
|000021a0| 20 7b 5c 69 74 20 5c 25 | 7d 20 5c 5c 0a 20 20 20 | {\it \%|} \\. |
|000021b0| 20 5c 65 6e 64 7b 74 61 | 62 75 6c 61 72 7d 0a 20 | \end{ta|bular}. |
|000021c0| 20 5c 65 6e 64 7b 63 65 | 6e 74 65 72 7d 0a 5c 65 | \end{ce|nter}.\e|
|000021d0| 6e 64 7b 74 61 62 6c 65 | 7d 0a 0a 0a 0a 5c 73 75 |nd{table|}....\su|
|000021e0| 62 73 65 63 74 69 6f 6e | 7b 46 6f 72 6d 61 74 74 |bsection|{Formatt|
|000021f0| 65 64 20 49 6e 70 75 74 | 7d 5c 6c 61 62 65 6c 7b |ed Input|}\label{|
|00002200| 73 65 63 5f 66 6f 72 6d | 69 6e 7d 0a 0a 4a 75 73 |sec_form|in}..Jus|
|00002210| 74 20 61 73 20 5c 76 64 | 6d 66 75 6e 63 7b 70 72 |t as \vd|mfunc{pr|
|00002220| 69 6e 74 66 28 2e 2e 2e | 29 7d 20 69 73 20 75 73 |intf(...|)} is us|
|00002230| 65 64 20 66 6f 72 20 66 | 6f 72 6d 61 74 74 65 64 |ed for f|ormatted|
|00002240| 20 6f 75 74 70 75 74 20 | 79 6f 75 20 63 61 6e 20 | output |you can |
|00002250| 75 73 65 20 0a 5c 76 64 | 6d 66 75 6e 63 7b 73 63 |use .\vd|mfunc{sc|
|00002260| 61 6e 66 28 2e 2e 2e 29 | 7d 20 66 6f 72 20 66 6f |anf(...)|} for fo|
|00002270| 72 6d 61 74 74 65 64 20 | 69 6e 70 75 74 2e 0a 0a |rmatted |input...|
|00002280| 5c 62 65 67 69 6e 7b 69 | 74 65 6d 69 7a 65 7d 0a |\begin{i|temize}.|
|00002290| 20 20 5c 69 74 65 6d 20 | 7b 5c 74 74 20 69 6e 74 | \item |{\tt int|
|000022a0| 20 66 73 63 61 6e 66 28 | 46 49 4c 45 20 2a 73 74 | fscanf(|FILE *st|
|000022b0| 72 65 61 6d 2c 20 63 6f | 6e 73 74 20 63 68 61 72 |ream, co|nst char|
|000022c0| 20 2a 66 6f 72 6d 61 74 | 2c 20 2e 2e 2e 29 7d 20 | *format|, ...)} |
|000022d0| 5c 6c 61 62 65 6c 7b 66 | 75 6e 5f 66 73 63 61 6e |\label{f|un_fscan|
|000022e0| 66 7d 5c 5c 0a 20 20 20 | 20 20 20 20 20 5c 76 64 |f}\\. | \vd|
|000022f0| 6d 66 75 6e 63 7b 66 73 | 63 61 6e 66 28 2e 2e 2e |mfunc{fs|canf(...|
|00002300| 29 7d 20 72 65 61 64 73 | 20 66 72 6f 6d 20 5c 76 |)} reads| from \v|
|00002310| 64 6d 61 72 67 7b 73 74 | 72 65 61 6d 7d 20 61 6e |dmarg{st|ream} an|
|00002320| 64 20 77 69 6c 6c 20 74 | 72 61 6e 73 66 6f 72 6d |d will t|ransform|
|00002330| 20 74 68 65 0a 20 20 20 | 20 20 20 20 20 69 6e 70 | the. | inp|
|00002340| 75 74 20 77 69 74 68 20 | 74 68 65 20 72 75 6c 65 |ut with |the rule|
|00002350| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 5c 76 64 |s define|d in \vd|
|00002360| 6d 61 72 67 7b 66 6f 72 | 6d 61 74 7d 2e 20 54 68 |marg{for|mat}. Th|
|00002370| 65 20 72 65 73 75 6c 74 | 73 20 77 69 6c 6c 20 62 |e result|s will b|
|00002380| 65 0a 20 20 20 20 20 20 | 20 20 70 6c 61 63 65 64 |e. | placed|
|00002390| 20 69 6e 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 | in the |argument|
|000023a0| 73 20 67 69 76 65 6e 20 | 62 79 20 5c 76 64 6d 61 |s given |by \vdma|
|000023b0| 72 67 7b 2e 2e 2e 7d 5c | 6e 6f 74 65 6e 6d 7b 74 |rg{...}\|notenm{t|
|000023c0| 68 65 20 61 72 67 75 6d | 65 6e 74 73 0a 20 20 20 |he argum|ents. |
|000023d0| 20 20 20 20 20 7b 5c 62 | 66 20 6d 75 73 74 7d 20 | {\b|f must} |
|000023e0| 62 65 20 70 6f 69 6e 74 | 65 72 7d 2e 20 54 68 65 |be point|er}. The|
|000023f0| 20 72 65 61 64 20 65 6e | 64 73 2c 20 77 68 65 6e | read en|ds, when|
|00002400| 20 6e 6f 20 6d 6f 72 65 | 20 74 72 61 6e 73 66 6f | no more| transfo|
|00002410| 72 6d 61 74 69 6f 6e 0a | 20 20 20 20 20 20 20 20 |rmation.| |
|00002420| 72 75 6c 65 73 20 61 72 | 65 20 69 6e 20 5c 76 64 |rules ar|e in \vd|
|00002430| 6d 61 72 67 7b 66 6f 72 | 6d 61 74 7d 2e 20 5c 76 |marg{for|mat}. \v|
|00002440| 64 6d 66 75 6e 63 7b 66 | 73 63 61 6e 66 28 2e 2e |dmfunc{f|scanf(..|
|00002450| 2e 29 7d 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 |.)} will| return |
|00002460| 45 4f 46 0a 20 20 20 20 | 20 20 20 20 77 68 65 6e |EOF. | when|
|00002470| 20 74 68 65 20 66 69 72 | 73 74 20 74 72 61 6e 73 | the fir|st trans|
|00002480| 66 6f 72 6d 61 74 69 6f | 6e 20 72 65 61 63 68 65 |formatio|n reache|
|00002490| 64 20 74 68 65 20 66 69 | 6c 65 20 65 6e 64 20 6f |d the fi|le end o|
|000024a0| 72 20 73 6f 6d 65 20 65 | 72 72 6f 72 0a 20 20 20 |r some e|rror. |
|000024b0| 20 20 20 20 20 6f 63 63 | 75 72 65 64 2e 20 4f 74 | occ|ured. Ot|
|000024c0| 68 65 72 77 69 73 65 20 | 69 74 20 77 69 6c 6c 20 |herwise |it will |
|000024d0| 72 65 74 75 72 6e 20 74 | 68 65 20 6e 75 6d 62 65 |return t|he numbe|
|000024e0| 72 20 6f 66 20 74 72 61 | 6e 73 66 6f 72 6d 65 64 |r of tra|nsformed|
|000024f0| 20 61 72 67 75 6d 65 6e | 74 73 2e 0a 0a 20 20 20 | argumen|ts... |
|00002500| 20 20 20 20 20 5c 76 64 | 6d 61 72 67 7b 66 6f 72 | \vd|marg{for|
|00002510| 6d 61 74 7d 20 63 61 6e | 20 69 6e 63 6c 75 64 65 |mat} can| include|
|00002520| 20 72 75 6c 65 73 20 6f | 6e 20 68 6f 77 20 74 6f | rules o|n how to|
|00002530| 20 66 6f 72 6d 61 74 20 | 74 68 65 20 69 6e 70 75 | format |the inpu|
|00002540| 74 20 61 72 67 75 6d 65 | 6e 74 73 0a 20 20 20 20 |t argume|nts. |
|00002550| 20 20 20 20 28 73 65 65 | 20 5c 74 61 62 72 65 66 | (see| \tabref|
|00002560| 7b 74 61 62 5f 73 63 61 | 6e 66 7d 29 2e 20 49 74 |{tab_sca|nf}). It|
|00002570| 20 63 61 6e 20 61 6c 73 | 6f 20 69 6e 63 6c 75 64 | can als|o includ|
|00002580| 65 3a 0a 20 20 20 20 20 | 20 20 20 5c 62 65 67 69 |e:. | \begi|
|00002590| 6e 7b 69 74 65 6d 69 7a | 65 7d 0a 20 20 20 20 20 |n{itemiz|e}. |
|000025a0| 20 20 20 20 20 5c 69 74 | 65 6d 20 53 70 61 63 65 | \it|em Space|
|000025b0| 73 20 6f 72 20 74 61 62 | 73 2c 20 77 68 69 63 68 |s or tab|s, which|
|000025c0| 20 61 72 65 20 69 67 6e | 6f 72 65 64 2e 0a 20 20 | are ign|ored.. |
|000025d0| 20 20 20 20 20 20 20 20 | 5c 69 74 65 6d 20 61 6e | |\item an|
|000025e0| 79 20 6e 6f 72 6d 61 6c | 20 63 68 61 72 61 63 74 |y normal| charact|
|000025f0| 65 72 20 28 65 78 63 65 | 70 74 20 5c 25 29 2e 20 |er (exce|pt \%). |
|00002600| 54 68 65 20 63 68 61 72 | 61 63 74 65 72 73 20 6d |The char|acters m|
|00002610| 75 73 74 20 62 65 20 69 | 6e 20 74 68 65 0a 20 20 |ust be i|n the. |
|00002620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 69 6e | | in|
|00002630| 70 75 74 20 6f 6e 20 74 | 68 65 20 63 6f 72 72 65 |put on t|he corre|
|00002640| 73 70 6f 6e 64 69 6e 67 | 20 70 6f 73 69 74 69 6f |sponding| positio|
|00002650| 6e 2e 0a 20 20 20 20 20 | 20 20 20 20 20 5c 69 74 |n.. | \it|
|00002660| 65 6d 20 74 72 61 6e 73 | 66 6f 72 6d 61 74 69 6f |em trans|formatio|
|00002670| 6e 20 72 75 6c 65 73 2c | 20 77 68 69 63 68 20 61 |n rules,| which a|
|00002680| 73 73 65 6d 62 6c 65 64 | 20 77 69 74 68 20 61 20 |ssembled| with a |
|00002690| 7b 5c 69 74 20 5c 25 7d | 2c 20 74 68 65 0a 20 20 |{\it \%}|, the. |
|000026a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6f 70 | | op|
|000026b0| 74 69 6f 6e 61 6c 20 63 | 68 61 72 61 63 74 65 72 |tional c|haracter|
|000026c0| 20 7b 5c 69 74 20 2a 7d | 20 28 74 68 69 73 20 77 | {\it *}| (this w|
|000026d0| 69 6c 6c 20 70 65 72 6d | 69 74 20 5c 76 64 6d 66 |ill perm|it \vdmf|
|000026e0| 75 6e 63 7b 66 73 63 61 | 6e 66 28 2e 2e 2e 29 7d |unc{fsca|nf(...)}|
|000026f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002700| 20 74 6f 20 61 73 73 69 | 67 6e 0a 20 20 20 20 20 | to assi|gn. |
|00002710| 20 20 20 20 20 20 20 20 | 20 20 20 74 6f 20 61 6e | | to an|
|00002720| 20 61 72 67 75 6d 65 6e | 74 29 2c 20 61 6e 20 6f | argumen|t), an o|
|00002730| 70 74 69 6f 6e 61 6c 20 | 6e 75 6d 62 65 72 2c 20 |ptional |number, |
|00002740| 61 6e 20 6f 70 74 69 6f | 6e 61 6c 20 63 68 61 72 |an optio|nal char|
|00002750| 61 63 74 65 72 0a 20 20 | 20 20 20 20 20 20 20 20 |acter. | |
|00002760| 20 20 20 20 20 20 7b 5c | 69 74 20 68 2c 20 6c 20 | {\|it h, l |
|00002770| 6f 72 20 4c 7d 20 28 74 | 68 69 73 20 69 73 20 66 |or L} (t|his is f|
|00002780| 6f 72 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |or the l|ength of|
|00002790| 20 74 68 65 20 74 61 72 | 67 65 74 29 20 61 6e 64 | the tar|get) and|
|000027a0| 20 74 68 65 0a 20 20 20 | 20 20 20 20 20 20 20 20 | the. | |
|000027b0| 20 20 20 20 20 74 72 61 | 6e 73 66 6f 72 6d 61 74 | tra|nsformat|
|000027c0| 69 6f 6e 20 63 68 61 72 | 61 63 74 65 72 2e 0a 20 |ion char|acter.. |
|000027d0| 20 5c 65 6e 64 7b 69 74 | 65 6d 69 7a 65 7d 0a 0a | \end{it|emize}..|
|000027e0| 20 20 5c 69 74 65 6d 20 | 7b 5c 74 74 20 69 6e 74 | \item |{\tt int|
|000027f0| 20 73 63 61 6e 66 28 63 | 6f 6e 73 74 20 63 68 61 | scanf(c|onst cha|
|00002800| 72 20 2a 66 6f 72 6d 61 | 74 2c 20 2e 2e 2e 29 7d |r *forma|t, ...)}|
|00002810| 20 5c 6c 61 62 65 6c 7b | 66 75 6e 5f 73 63 61 6e | \label{|fun_scan|
|00002820| 66 7d 5c 5c 0a 20 20 20 | 20 20 20 20 20 54 68 65 |f}\\. | The|
|00002830| 20 73 61 6d 65 20 61 73 | 20 5c 76 64 6d 66 75 6e | same as| \vdmfun|
|00002840| 63 7b 66 73 63 61 6e 66 | 28 73 74 64 69 6e 2c 2e |c{fscanf|(stdin,.|
|00002850| 2e 2e 29 7d 2e 0a 0a 20 | 20 5c 69 74 65 6d 20 7b |..)}... | \item {|
|00002860| 5c 74 74 20 69 6e 74 20 | 73 73 63 61 6e 66 28 63 |\tt int |sscanf(c|
|00002870| 68 61 72 20 2a 73 74 72 | 2c 20 63 6f 6e 73 74 20 |har *str|, const |
|00002880| 63 68 61 72 20 2a 66 6f | 72 6d 61 74 2c 20 2e 2e |char *fo|rmat, ..|
|00002890| 2e 29 7d 20 5c 6c 61 62 | 65 6c 7b 66 75 6e 5f 73 |.)} \lab|el{fun_s|
|000028a0| 73 63 61 6e 66 7d 5c 5c | 0a 20 20 20 20 20 20 20 |scanf}\\|. |
|000028b0| 20 41 73 20 5c 76 64 6d | 66 75 6e 63 7b 73 63 61 | As \vdm|func{sca|
|000028c0| 6e 66 28 2e 2e 2e 29 7d | 2c 20 62 75 74 20 74 68 |nf(...)}|, but th|
|000028d0| 65 20 69 6e 70 75 74 20 | 63 6f 6d 65 73 20 66 72 |e input |comes fr|
|000028e0| 6f 6d 20 5c 76 64 6d 61 | 72 67 7b 73 74 72 7d 2e |om \vdma|rg{str}.|
|000028f0| 0a 5c 65 6e 64 7b 69 74 | 65 6d 69 7a 65 7d 0a 0a |.\end{it|emize}..|
|00002900| 0a 5c 62 65 67 69 6e 7b | 74 61 62 6c 65 7d 0a 20 |.\begin{|table}. |
|00002910| 20 5c 63 61 70 74 69 6f | 6e 7b 4c 69 62 63 20 2d | \captio|n{Libc -|
|00002920| 20 73 63 61 6e 66 20 74 | 72 61 6e 73 66 6f 72 6d | scanf t|ransform|
|00002930| 61 74 69 6f 6e 73 7d 20 | 5c 6c 61 62 65 6c 7b 74 |ations} |\label{t|
|00002940| 61 62 5f 73 63 61 6e 66 | 7d 0a 20 20 5c 62 65 67 |ab_scanf|}. \beg|
|00002950| 69 6e 7b 63 65 6e 74 65 | 72 7d 0a 20 20 20 20 5c |in{cente|r}. \|
|00002960| 62 65 67 69 6e 7b 74 61 | 62 75 6c 61 72 7d 7b 63 |begin{ta|bular}{c|
|00002970| 7c 6c 7d 0a 20 20 20 20 | 7b 5c 62 66 20 43 68 61 ||l}. |{\bf Cha|
|00002980| 72 61 63 74 65 72 7d 20 | 26 20 20 7b 5c 62 66 20 |racter} |& {\bf |
|00002990| 49 6e 70 75 74 20 2d 20 | 41 72 67 75 6d 65 6e 74 |Input - |Argument|
|000029a0| 74 79 70 7d 20 5c 5c 20 | 5c 68 6c 69 6e 65 0a 20 |typ} \\ |\hline. |
|000029b0| 20 20 20 64 20 20 20 26 | 20 20 64 65 63 69 6d 61 | d &| decima|
|000029c0| 6c 20 69 6e 74 65 67 65 | 72 20 2d 20 7b 5c 69 74 |l intege|r - {\it|
|000029d0| 20 69 6e 74 20 2a 7d 5c | 5c 0a 20 20 20 20 69 20 | int *}\|\. i |
|000029e0| 20 20 26 20 20 69 6e 74 | 65 67 65 72 20 2d 20 7b | & int|eger - {|
|000029f0| 5c 69 74 20 69 6e 74 20 | 2a 7d 20 28 69 6e 70 75 |\it int |*} (inpu|
|00002a00| 74 20 63 61 6e 20 62 65 | 20 6f 63 74 61 6c 20 6f |t can be| octal o|
|00002a10| 72 20 68 65 78 29 5c 5c | 0a 20 20 20 20 6f 20 20 |r hex)\\|. o |
|00002a20| 20 26 20 20 6f 63 74 61 | 6c 20 69 6e 74 65 67 65 | & octa|l intege|
|00002a30| 72 20 2d 20 7b 5c 69 74 | 20 69 6e 74 20 2a 7d 20 |r - {\it| int *} |
|00002a40| 28 77 69 74 68 20 6f 72 | 20 77 69 74 68 6f 75 74 |(with or| without|
|00002a50| 20 6c 65 61 64 69 6e 67 | 20 30 29 5c 5c 0a 20 20 | leading| 0)\\. |
|00002a60| 20 20 75 20 20 20 26 20 | 20 64 65 63 69 6d 61 6c | u & | decimal|
|00002a70| 2c 20 75 6e 73 69 67 6e | 65 64 20 2d 20 7b 5c 69 |, unsign|ed - {\i|
|00002a80| 74 20 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 2a |t unsign|ed int *|
|00002a90| 7d 5c 5c 0a 20 20 20 20 | 78 20 20 20 26 20 20 68 |}\\. |x & h|
|00002aa0| 65 78 20 69 6e 74 65 67 | 65 72 20 2d 20 7b 5c 69 |ex integ|er - {\i|
|00002ab0| 74 20 69 6e 74 20 2a 7d | 20 28 77 69 74 68 20 6f |t int *}| (with o|
|00002ac0| 72 20 77 69 74 68 6f 75 | 74 20 6c 65 61 64 69 6e |r withou|t leadin|
|00002ad0| 67 20 30 78 29 5c 5c 0a | 20 20 20 20 63 20 20 20 |g 0x)\\.| c |
|00002ae0| 26 20 20 6f 6e 65 20 6f | 72 20 6d 6f 72 65 20 63 |& one o|r more c|
|00002af0| 68 61 72 61 63 74 65 72 | 73 20 2d 20 7b 5c 69 74 |haracter|s - {\it|
|00002b00| 20 63 68 61 72 20 2a 7d | 20 28 77 69 74 68 6f 75 | char *}| (withou|
|00002b10| 74 20 5c 76 65 72 62 2b | 5c 2b 30 29 5c 5c 0a 20 |t \verb+|\+0)\\. |
|00002b20| 20 20 20 73 20 20 20 26 | 20 20 63 68 61 72 61 63 | s &| charac|
|00002b30| 74 65 72 73 28 77 69 74 | 68 6f 75 74 20 73 70 61 |ters(wit|hout spa|
|00002b40| 63 65 2c 20 74 61 62 20 | 2e 2e 2e 29 20 2d 20 7b |ce, tab |...) - {|
|00002b50| 5c 69 74 20 63 68 61 72 | 20 2a 7d 20 28 77 69 74 |\it char| *} (wit|
|00002b60| 68 20 5c 76 65 72 62 2b | 5c 2b 30 29 5c 5c 0a 65 |h \verb+|\+0)\\.e|
|00002b70| 2c 66 2c 67 66 20 20 26 | 20 20 66 6c 6f 61 74 20 |,f,gf &| float |
|00002b80| 2d 20 7b 5c 69 74 20 66 | 6c 6f 61 74 20 2a 7d 20 |- {\it f|loat *} |
|00002b90| 28 65 2e 67 20 5b 2d 5d | 6d 2e 64 64 64 64 64 64 |(e.g [-]|m.dddddd|
|00002ba0| 65 24 5c 70 6d 24 78 78 | 29 5c 5c 0a 20 20 20 20 |e$\pm$xx|)\\. |
|00002bb0| 70 20 20 20 26 20 20 70 | 6f 69 6e 74 65 72 20 2d |p & p|ointer -|
|00002bc0| 20 7b 5c 69 74 20 76 6f | 69 64 20 2a 7d 5c 5c 0a | {\it vo|id *}\\.|
|00002bd0| 20 20 20 20 6e 20 20 20 | 26 20 20 6e 75 6d 62 65 | n |& numbe|
|00002be0| 72 20 6f 66 20 74 72 61 | 6e 73 66 6f 72 6d 65 64 |r of tra|nsformed|
|00002bf0| 20 61 72 67 75 6d 65 6e | 74 73 20 2d 20 7b 5c 69 | argumen|ts - {\i|
|00002c00| 74 20 69 6e 74 20 2a 7d | 5c 5c 0a 24 5b 2e 2e 2e |t int *}|\\.$[...|
|00002c10| 5d 24 20 26 20 20 6e 6f | 6e 65 6d 70 74 79 20 63 |]$ & no|nempty c|
|00002c20| 68 61 72 61 63 74 65 72 | 73 20 69 6e 20 69 6e 70 |haracter|s in inp|
|00002c30| 75 74 20 2d 20 7b 5c 69 | 74 20 63 68 61 72 20 2a |ut - {\i|t char *|
|00002c40| 7d 5c 5c 0a 24 5b 24 5c | 5e 7b 7d 24 2e 2e 2e 5d |}\\.$[$\|^{}$...]|
|00002c50| 24 20 26 20 20 65 78 63 | 6c 75 64 65 20 74 68 6f |$ & exc|lude tho|
|00002c60| 73 65 20 6e 6f 6e 65 6d | 70 74 79 20 63 68 61 72 |se nonem|pty char|
|00002c70| 61 63 74 65 72 73 20 2d | 20 7b 5c 69 74 20 63 68 |acters -| {\it ch|
|00002c80| 61 72 20 2a 7d 5c 5c 0a | 20 20 20 20 5c 25 20 20 |ar *}\\.| \% |
|00002c90| 26 20 20 7b 5c 69 74 20 | 5c 25 7d 5c 5c 20 5c 68 |& {\it |\%}\\ \h|
|00002ca0| 6c 69 6e 65 0a 20 20 20 | 20 5c 6d 75 6c 74 69 63 |line. | \multic|
|00002cb0| 6f 6c 75 6d 6e 7b 32 7d | 7b 6c 7d 7b 7b 5c 69 74 |olumn{2}|{l}{{\it|
|00002cc0| 20 68 7d 20 63 61 6e 20 | 62 65 20 62 65 66 6f 72 | h} can |be befor|
|00002cd0| 65 20 64 2c 69 2c 6e 2c | 6f 2c 75 20 61 6e 64 20 |e d,i,n,|o,u and |
|00002ce0| 78 20 77 68 65 6e 20 74 | 68 65 20 70 6f 69 6e 74 |x when t|he point|
|00002cf0| 65 72 20 69 73 20 7b 5c | 69 74 20 73 68 6f 72 74 |er is {\|it short|
|00002d00| 7d 7d 5c 5c 0a 20 20 20 | 20 5c 6d 75 6c 74 69 63 |}}\\. | \multic|
|00002d10| 6f 6c 75 6d 6e 7b 32 7d | 7b 6c 7d 7b 7b 5c 69 74 |olumn{2}|{l}{{\it|
|00002d20| 20 6c 7d 20 63 61 6e 20 | 62 65 20 62 65 66 6f 72 | l} can |be befor|
|00002d30| 65 20 64 2c 69 2c 6e 2c | 6f 2c 75 20 61 6e 64 20 |e d,i,n,|o,u and |
|00002d40| 78 20 77 68 65 6e 20 74 | 68 65 20 70 6f 69 6e 74 |x when t|he point|
|00002d50| 65 72 20 69 73 20 7b 5c | 69 74 20 6c 6f 6e 67 7d |er is {\|it long}|
|00002d60| 7d 5c 5c 0a 20 20 20 20 | 5c 6d 75 6c 74 69 63 6f |}\\. |\multico|
|00002d70| 6c 75 6d 6e 7b 32 7d 7b | 6c 7d 7b 7b 5c 69 74 20 |lumn{2}{|l}{{\it |
|00002d80| 6c 7d 20 63 61 6e 20 62 | 65 20 62 65 66 6f 72 65 |l} can b|e before|
|00002d90| 20 65 2c 66 20 61 6e 64 | 20 67 20 77 68 65 6e 20 | e,f and| g when |
|00002da0| 74 68 65 20 70 6f 69 6e | 74 65 72 20 69 73 20 7b |the poin|ter is {|
|00002db0| 5c 69 74 20 64 6f 75 62 | 6c 65 7d 7d 5c 5c 0a 20 |\it doub|le}}\\. |
|00002dc0| 20 20 20 5c 6d 75 6c 74 | 69 63 6f 6c 75 6d 6e 7b | \mult|icolumn{|
|00002dd0| 32 7d 7b 6c 7d 7b 7b 5c | 69 74 20 4c 7d 20 63 61 |2}{l}{{\|it L} ca|
|00002de0| 6e 20 62 65 20 62 65 66 | 6f 72 65 20 65 2c 66 20 |n be bef|ore e,f |
|00002df0| 61 6e 64 20 67 20 77 68 | 65 6e 20 74 68 65 20 70 |and g wh|en the p|
|00002e00| 6f 69 6e 74 65 72 20 69 | 73 20 7b 5c 69 74 20 6c |ointer i|s {\it l|
|00002e10| 6f 6e 67 20 64 6f 75 62 | 6c 65 7d 7d 5c 5c 0a 20 |ong doub|le}}\\. |
|00002e20| 20 20 20 5c 65 6e 64 7b | 74 61 62 75 6c 61 72 7d | \end{|tabular}|
|00002e30| 0a 20 20 5c 65 6e 64 7b | 63 65 6e 74 65 72 7d 0a |. \end{|center}.|
|00002e40| 5c 65 6e 64 7b 74 61 62 | 6c 65 7d 0a 0a 0a 0a 0a |\end{tab|le}.....|
|00002e50| 0a 0a 0a 5c 73 65 63 74 | 69 6f 6e 7b 54 68 65 20 |...\sect|ion{The |
|00002e60| 54 65 72 6d 63 61 70 20 | 4c 69 62 72 61 72 79 7d |Termcap |Library}|
|00002e70| 0a 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 49 |...\subs|ection{I|
|00002e80| 6e 74 72 6f 64 75 63 74 | 69 6f 6e 7d 0a 0a 54 68 |ntroduct|ion}..Th|
|00002e90| 65 20 74 65 72 6d 63 61 | 70 20 6c 69 62 72 61 72 |e termca|p librar|
|00002ea0| 79 20 69 73 20 61 6e 20 | 41 50 49 20 74 6f 20 74 |y is an |API to t|
|00002eb0| 68 65 20 74 65 72 6d 63 | 61 70 20 64 61 74 61 62 |he termc|ap datab|
|00002ec0| 61 73 65 20 77 68 69 63 | 68 20 63 61 6e 20 62 65 |ase whic|h can be|
|00002ed0| 0a 66 6f 75 6e 64 20 69 | 6e 20 5c 76 64 6d 75 6e |.found i|n \vdmun|
|00002ee0| 69 78 7b 2f 65 74 63 2f | 74 65 72 6d 63 61 70 2f |ix{/etc/|termcap/|
|00002ef0| 7d 2e 20 54 68 65 20 6c | 69 62 72 61 72 79 20 66 |}. The l|ibrary f|
|00002f00| 75 6e 63 74 69 6f 6e 73 | 20 61 6c 6c 6f 77 0a 74 |unctions| allow.t|
|00002f10| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 61 63 74 |he follo|wing act|
|00002f20| 69 6f 6e 73 3a 0a 0a 5c | 62 65 67 69 6e 7b 69 74 |ions:..\|begin{it|
|00002f30| 65 6d 69 7a 65 7d 0a 20 | 20 5c 69 74 65 6d 20 47 |emize}. | \item G|
|00002f40| 65 74 20 61 20 64 65 73 | 63 72 69 70 74 69 6f 6e |et a des|cription|
|00002f50| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00002f60| 74 65 72 6d 69 6e 61 6c | 3a 20 5c 76 64 6d 66 75 |terminal|: \vdmfu|
|00002f70| 6e 63 7b 74 67 65 74 65 | 6e 74 28 2e 2e 2e 29 7d |nc{tgete|nt(...)}|
|00002f80| 2e 0a 20 20 5c 69 74 65 | 6d 20 53 65 61 72 63 68 |.. \ite|m Search|
|00002f90| 20 74 68 65 20 64 65 73 | 63 72 69 70 74 69 6f 6e | the des|cription|
|00002fa0| 20 66 6f 72 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e | for inf|ormation|
|00002fb0| 3a 0a 20 20 20 20 20 20 | 20 20 5c 76 64 6d 66 75 |:. | \vdmfu|
|00002fc0| 6e 63 7b 74 67 65 74 6e | 75 6d 28 2e 2e 2e 29 7d |nc{tgetn|um(...)}|
|00002fd0| 2c 20 5c 76 64 6d 66 75 | 6e 63 7b 74 67 65 74 66 |, \vdmfu|nc{tgetf|
|00002fe0| 6c 61 67 28 2e 2e 2e 29 | 7d 2c 20 0a 20 20 20 20 |lag(...)|}, . |
|00002ff0| 20 20 20 20 5c 76 64 6d | 66 75 6e 63 7b 74 67 65 | \vdm|func{tge|
|00003000| 74 73 74 72 28 2e 2e 2e | 29 7d 2e 0a 20 20 5c 69 |tstr(...|)}.. \i|
|00003010| 74 65 6d 20 45 6e 63 6f | 64 65 20 6e 75 6d 65 72 |tem Enco|de numer|
|00003020| 69 63 20 70 61 72 61 6d | 65 74 65 72 73 20 69 6e |ic param|eters in|
|00003030| 20 61 20 74 65 72 6d 69 | 6e 61 6c 20 73 70 65 63 | a termi|nal spec|
|00003040| 69 66 69 63 20 66 6f 72 | 6d 3a 0a 20 20 20 20 20 |ific for|m:. |
|00003050| 20 20 20 5c 76 64 6d 66 | 75 6e 63 7b 74 70 61 72 | \vdmf|unc{tpar|
|00003060| 61 6d 28 2e 2e 2e 29 7d | 2c 20 5c 76 64 6d 66 75 |am(...)}|, \vdmfu|
|00003070| 6e 63 7b 74 67 6f 74 6f | 28 2e 2e 2e 29 7d 2e 0a |nc{tgoto|(...)}..|
|00003080| 20 20 5c 69 74 65 6d 20 | 43 6f 6d 70 75 74 65 20 | \item |Compute |
|00003090| 61 6e 64 20 70 65 72 66 | 6f 72 6d 20 70 61 64 64 |and perf|orm padd|
|000030a0| 69 6e 67 20 5c 76 64 6d | 66 75 6e 63 7b 74 70 75 |ing \vdm|func{tpu|
|000030b0| 74 73 28 2e 2e 2e 29 7d | 2e 0a 5c 65 6e 64 7b 69 |ts(...)}|..\end{i|
|000030c0| 74 65 6d 69 7a 65 7d 0a | 0a 50 72 6f 67 72 61 6d |temize}.|.Program|
|000030d0| 73 20 75 73 69 6e 67 20 | 74 68 65 20 74 65 72 6d |s using |the term|
|000030e0| 63 61 70 20 6c 69 62 72 | 61 72 79 20 6d 75 73 74 |cap libr|ary must|
|000030f0| 20 69 6e 63 6c 75 64 65 | 20 5c 76 64 6d 75 6e 69 | include| \vdmuni|
|00003100| 78 7b 74 65 72 6d 63 61 | 70 2e 68 7d 0a 61 6e 64 |x{termca|p.h}.and|
|00003110| 20 73 68 6f 75 6c 64 20 | 62 65 20 6c 69 6e 6b 65 | should |be linke|
|00003120| 64 20 77 69 74 68 3a 0a | 0a 5c 62 65 67 69 6e 7b |d with:.|.\begin{|
|00003130| 74 73 63 72 65 65 6e 7d | 0a 5c 62 65 67 69 6e 7b |tscreen}|.\begin{|
|00003140| 76 65 72 62 61 74 69 6d | 7d 0a 20 20 20 20 67 63 |verbatim|}. gc|
|00003150| 63 20 5b 66 6c 61 67 73 | 5d 20 66 69 6c 65 73 20 |c [flags|] files |
|00003160| 2d 6c 74 65 72 6d 63 61 | 70 0a 5c 65 6e 64 7b 76 |-ltermca|p.\end{v|
|00003170| 65 72 62 61 74 69 6d 7d | 0a 5c 65 6e 64 7b 74 73 |erbatim}|.\end{ts|
|00003180| 63 72 65 65 6e 7d 0a 0a | 54 65 72 6d 63 61 70 20 |creen}..|Termcap |
|00003190| 66 75 6e 63 74 69 6f 6e | 73 20 61 72 65 20 74 65 |function|s are te|
|000031a0| 72 6d 69 6e 61 6c 20 69 | 6e 64 65 70 65 6e 64 65 |rminal i|ndepende|
|000031b0| 6e 74 20 72 6f 75 74 69 | 6e 65 73 20 62 75 74 20 |nt routi|nes but |
|000031c0| 6f 6e 6c 79 20 67 69 76 | 65 0a 74 68 65 20 70 72 |only giv|e.the pr|
|000031d0| 6f 67 72 61 6d 6d 65 72 | 20 6c 6f 77 20 6c 65 76 |ogrammer| low lev|
|000031e0| 65 6c 20 61 63 63 65 73 | 73 20 74 6f 20 74 68 65 |el acces|s to the|
|000031f0| 20 74 65 72 6d 69 6e 61 | 6c 2e 0a 46 6f 72 20 61 | termina|l..For a|
|00003200| 20 68 69 67 68 65 72 20 | 6c 65 76 65 6c 20 70 61 | higher |level pa|
|00003210| 63 6b 61 67 65 2c 20 63 | 75 72 73 65 73 20 6f 72 |ckage, c|urses or|
|00003220| 20 6e 63 75 72 73 65 73 | 20 73 68 6f 75 6c 64 20 | ncurses| should |
|00003230| 62 65 20 75 73 65 64 2e | 0a 0a 0a 5c 73 75 62 73 |be used.|...\subs|
|00003240| 65 63 74 69 6f 6e 7b 46 | 69 6e 64 20 61 20 54 65 |ection{F|ind a Te|
|00003250| 72 6d 69 6e 61 6c 20 44 | 65 73 63 72 69 70 74 69 |rminal D|escripti|
|00003260| 6f 6e 7d 0a 0a 5c 62 65 | 67 69 6e 7b 69 74 65 6d |on}..\be|gin{item|
|00003270| 69 7a 65 7d 0a 20 20 5c | 69 74 65 6d 20 7b 5c 74 |ize}. \|item {\t|
|00003280| 74 20 69 6e 74 20 74 67 | 65 74 65 6e 74 28 76 6f |t int tg|etent(vo|
|00003290| 69 64 20 2a 62 75 66 66 | 65 72 2c 20 63 6f 6e 73 |id *buff|er, cons|
|000032a0| 74 20 63 68 61 72 20 2a | 74 65 72 6d 74 79 70 65 |t char *|termtype|
|000032b0| 29 7d 20 5c 6c 61 62 65 | 6c 7b 66 75 6e 5f 74 67 |)} \labe|l{fun_tg|
|000032c0| 65 74 65 6e 74 7d 5c 5c | 0a 20 20 20 20 20 20 4f |etent}\\|. O|
|000032d0| 6e 20 74 68 65 20 4c 69 | 6e 75 78 20 6f 70 65 72 |n the Li|nux oper|
|000032e0| 61 74 69 6e 67 20 73 79 | 73 74 65 6d 20 74 68 65 |ating sy|stem the|
|000032f0| 20 63 75 72 72 65 6e 74 | 20 74 65 72 6d 69 6e 61 | current| termina|
|00003300| 6c 20 6e 61 6d 65 20 69 | 73 0a 20 20 20 20 20 20 |l name i|s. |
|00003310| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 20 74 68 65 |containe|d in the|
|00003320| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00003330| 69 61 62 6c 65 20 5c 76 | 64 6d 75 6e 69 78 7b 54 |iable \v|dmunix{T|
|00003340| 45 52 4d 7d 2e 20 53 6f | 2c 0a 20 20 20 20 20 20 |ERM}. So|,. |
|00003350| 5c 76 64 6d 61 72 67 7b | 74 65 72 6d 74 79 70 65 |\vdmarg{|termtype|
|00003360| 7d 20 69 73 20 74 68 65 | 20 72 65 73 75 6c 74 20 |} is the| result |
|00003370| 6f 66 20 61 20 63 61 6c | 6c 20 74 6f 20 5c 76 64 |of a cal|l to \vd|
|00003380| 6d 75 6e 69 78 7b 67 65 | 74 65 6e 76 28 33 29 7d |munix{ge|tenv(3)}|
|00003390| 2e 0a 0a 20 20 20 20 20 | 20 46 6f 72 20 5c 76 64 |... | For \vd|
|000033a0| 6d 61 72 67 7b 62 75 66 | 66 65 72 7d 2c 20 6e 6f |marg{buf|fer}, no|
|000033b0| 20 6d 65 6d 6f 72 79 20 | 68 61 73 20 74 6f 20 62 | memory |has to b|
|000033c0| 65 20 61 6c 6c 6f 63 61 | 74 65 64 20 77 68 65 6e |e alloca|ted when|
|000033d0| 20 75 73 69 6e 67 20 74 | 68 65 20 47 4e 55 0a 20 | using t|he GNU. |
|000033e0| 20 20 20 20 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 | ver|sion of |
|000033f0| 74 65 72 6d 63 61 70 2e | 20 20 54 68 69 73 20 69 |termcap.| This i|
|00003400| 73 20 77 68 61 74 20 77 | 65 20 63 61 6e 20 61 73 |s what w|e can as|
|00003410| 73 75 6d 65 20 75 6e 64 | 65 72 20 4c 69 6e 75 78 |sume und|er Linux|
|00003420| 21 0a 20 20 20 20 20 20 | 4f 74 68 65 72 77 69 73 |!. |Otherwis|
|00003430| 65 2c 20 79 6f 75 27 6c | 6c 20 68 61 76 65 20 74 |e, you'l|l have t|
|00003440| 6f 20 61 6c 6c 6f 63 61 | 74 65 20 32 30 34 38 20 |o alloca|te 2048 |
|00003450| 42 79 74 65 73 2e 0a 20 | 20 20 20 20 20 28 46 6f |Bytes.. | (Fo|
|00003460| 72 6d 65 72 6c 79 2c 20 | 5c 76 64 6d 61 72 67 7b |rmerly, |\vdmarg{|
|00003470| 62 75 66 66 65 72 7d 20 | 6f 6e 6c 79 20 6e 65 65 |buffer} |only nee|
|00003480| 64 65 64 20 74 6f 20 62 | 65 20 31 30 32 34 20 42 |ded to b|e 1024 B|
|00003490| 79 74 65 73 2c 20 62 75 | 74 0a 20 20 20 20 20 20 |ytes, bu|t. |
|000034a0| 74 68 65 20 73 69 7a 65 | 20 68 61 73 20 64 6f 75 |the size| has dou|
|000034b0| 62 6c 65 64 29 2e 0a 0a | 20 20 20 20 20 5c 76 64 |bled)...| \vd|
|000034c0| 6d 66 75 6e 63 7b 74 67 | 65 74 65 6e 74 28 2e 2e |mfunc{tg|etent(..|
|000034d0| 2e 29 7d 20 72 65 74 75 | 72 6e 73 20 31 20 6f 6e |.)} retu|rns 1 on|
|000034e0| 20 73 75 63 63 65 73 73 | 20 61 6e 64 20 30 20 77 | success| and 0 w|
|000034f0| 68 65 6e 20 74 68 65 0a | 20 20 20 20 20 64 61 74 |hen the.| dat|
|00003500| 61 62 61 73 65 20 69 73 | 20 66 6f 75 6e 64 20 62 |abase is| found b|
|00003510| 75 74 20 68 61 73 20 6e | 6f 20 65 6e 74 72 79 20 |ut has n|o entry |
|00003520| 66 6f 72 20 54 45 52 4d | 2e 20 4f 74 68 65 72 20 |for TERM|. Other |
|00003530| 65 72 72 6f 72 73 20 77 | 69 6c 6c 0a 20 20 20 20 |errors w|ill. |
|00003540| 20 72 65 74 75 72 6e 20 | 64 69 66 66 65 72 65 6e | return |differen|
|00003550| 74 20 76 61 6c 75 65 73 | 2e 0a 0a 20 20 20 20 20 |t values|... |
|00003560| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 65 78 |The foll|owing ex|
|00003570| 61 6d 70 6c 65 20 73 68 | 6f 75 6c 64 20 65 78 70 |ample sh|ould exp|
|00003580| 6c 61 69 6e 20 68 6f 77 | 20 74 6f 20 75 73 65 20 |lain how| to use |
|00003590| 5c 76 64 6d 66 75 6e 63 | 7b 74 67 65 74 65 6e 74 |\vdmfunc|{tgetent|
|000035a0| 28 2e 2e 2e 29 7d 3a 0a | 0a 5c 62 65 67 69 6e 7b |(...)}:.|.\begin{|
|000035b0| 74 73 63 72 65 65 6e 7d | 0a 5c 62 65 67 69 6e 7b |tscreen}|.\begin{|
|000035c0| 76 65 72 62 61 74 69 6d | 7d 0a 20 20 20 20 23 64 |verbatim|}. #d|
|000035d0| 65 66 69 6e 65 20 62 75 | 66 66 65 72 20 30 0a 20 |efine bu|ffer 0. |
|000035e0| 20 20 20 63 68 61 72 20 | 2a 74 65 72 6d 74 79 70 | char |*termtyp|
|000035f0| 65 3d 67 65 74 65 6e 76 | 28 22 54 45 52 4d 22 29 |e=getenv|("TERM")|
|00003600| 3b 0a 20 20 20 20 69 6e | 74 20 6f 6b 3b 0a 0a 20 |;. in|t ok;.. |
|00003610| 20 20 20 6f 6b 3d 74 67 | 65 74 65 6e 74 28 62 75 | ok=tg|etent(bu|
|00003620| 66 66 65 72 2c 74 65 72 | 6d 74 79 70 65 29 3b 0a |ffer,ter|mtype);.|
|00003630| 20 20 20 20 69 66 28 6f | 6b 3d 3d 31 29 0a 20 20 | if(o|k==1). |
|00003640| 20 20 20 20 2f 2a 20 61 | 6c 6c 20 72 69 67 68 74 | /* a|ll right|
|00003650| 2c 20 77 65 20 68 61 76 | 65 20 74 68 65 20 65 6e |, we hav|e the en|
|00003660| 74 72 79 20 2a 2f 0a 20 | 20 20 20 65 6c 73 65 20 |try */. | else |
|00003670| 69 66 28 6f 6b 3d 3d 30 | 29 0a 20 20 20 20 20 2f |if(ok==0|). /|
|00003680| 2a 20 75 75 70 73 2c 20 | 73 6f 6d 65 74 68 69 6e |* uups, |somethin|
|00003690| 67 20 77 72 6f 6e 67 20 | 77 69 74 68 20 54 45 52 |g wrong |with TER|
|000036a0| 4d 0a 20 20 20 20 20 20 | 2a 20 63 68 65 63 6b 20 |M. |* check |
|000036b0| 74 65 72 6d 74 79 70 65 | 20 66 69 72 73 74 2c 20 |termtype| first, |
|000036c0| 74 68 65 6e 20 74 65 72 | 6d 63 61 70 20 64 61 74 |then ter|mcap dat|
|000036d0| 61 62 61 73 65 0a 20 20 | 20 20 20 20 2a 2f 0a 20 |abase. | */. |
|000036e0| 20 20 20 65 6c 73 65 0a | 20 20 20 20 20 2f 2a 20 | else.| /* |
|000036f0| 68 75 75 75 2c 20 66 61 | 74 61 6c 20 65 72 72 6f |huuu, fa|tal erro|
|00003700| 72 20 2a 2f 0a 5c 65 6e | 64 7b 76 65 72 62 61 74 |r */.\en|d{verbat|
|00003710| 69 6d 7d 0a 5c 65 6e 64 | 7b 74 73 63 72 65 65 6e |im}.\end|{tscreen|
|00003720| 7d 0a 0a 09 42 79 2c 20 | 64 65 66 61 75 6c 74 20 |}...By, |default |
|00003730| 74 65 72 6d 63 61 70 20 | 75 73 65 73 20 5c 76 64 |termcap |uses \vd|
|00003740| 6d 75 6e 69 78 7b 2f 65 | 74 63 2f 74 65 72 6d 63 |munix{/e|tc/termc|
|00003750| 61 70 2f 7d 20 61 73 20 | 74 68 65 20 64 61 74 61 |ap/} as |the data|
|00003760| 62 61 73 65 2e 0a 09 49 | 66 20 74 68 65 20 65 6e |base...I|f the en|
|00003770| 76 69 72 6f 6e 6d 65 6e | 74 20 76 61 72 69 61 62 |vironmen|t variab|
|00003780| 6c 65 20 54 45 52 4d 43 | 41 50 20 69 73 20 73 65 |le TERMC|AP is se|
|00003790| 74 2c 20 77 69 74 68 0a | 09 5c 76 64 6d 75 6e 69 |t, with.|.\vdmuni|
|000037a0| 78 7b 5c 24 48 4f 4d 45 | 2f 6d 79 74 65 72 6d 63 |x{\$HOME|/mytermc|
|000037b0| 61 70 7d 0a 09 66 6f 72 | 20 69 6e 73 74 61 6e 63 |ap}..for| instanc|
|000037c0| 65 2c 20 61 6c 6c 20 66 | 75 6e 63 74 69 6f 6e 73 |e, all f|unctions|
|000037d0| 20 77 69 6c 6c 20 75 73 | 65 20 5c 76 64 6d 75 6e | will us|e \vdmun|
|000037e0| 69 78 7b 6d 79 74 65 72 | 6d 63 61 70 7d 0a 09 69 |ix{myter|mcap}..i|
|000037f0| 6e 73 74 65 61 64 20 6f | 66 20 5c 76 64 6d 75 6e |nstead o|f \vdmun|
|00003800| 69 78 7b 2f 65 74 63 2f | 74 65 72 6d 63 61 70 7d |ix{/etc/|termcap}|
|00003810| 2e 20 20 57 69 74 68 20 | 6e 6f 20 6c 65 61 64 69 |. With |no leadi|
|00003820| 6e 67 0a 09 73 6c 61 73 | 68 20 69 6e 20 54 45 52 |ng..slas|h in TER|
|00003830| 4d 43 41 50 2c 20 74 68 | 65 20 64 65 66 69 6e 65 |MCAP, th|e define|
|00003840| 64 20 76 61 6c 75 65 20 | 69 73 20 75 73 65 64 20 |d value |is used |
|00003850| 61 73 20 61 20 6e 61 6d | 65 20 66 6f 72 20 61 0a |as a nam|e for a.|
|00003860| 09 74 65 72 6d 69 6e 61 | 6c 2e 20 20 5c 65 6e 64 |.termina|l. \end|
|00003870| 7b 69 74 65 6d 69 7a 65 | 7d 0a 0a 5c 73 75 62 73 |{itemize|}..\subs|
|00003880| 65 63 74 69 6f 6e 7b 4c | 6f 6f 6b 20 61 74 20 61 |ection{L|ook at a|
|00003890| 20 54 65 72 6d 69 6e 61 | 6c 20 44 65 73 63 72 69 | Termina|l Descri|
|000038a0| 70 74 69 6f 6e 7d 0a 0a | 45 76 65 72 79 20 70 69 |ption}..|Every pi|
|000038b0| 65 63 65 20 6f 66 20 69 | 6e 66 6f 72 6d 61 74 69 |ece of i|nformati|
|000038c0| 6f 6e 20 69 73 20 63 61 | 6c 6c 65 64 20 61 20 63 |on is ca|lled a c|
|000038d0| 61 70 61 62 69 6c 69 74 | 79 2c 20 65 76 65 72 79 |apabilit|y, every|
|000038e0| 20 63 61 70 61 62 69 6c | 69 74 79 20 69 73 0a 61 | capabil|ity is.a|
|000038f0| 20 74 77 6f 20 6c 65 74 | 74 65 72 20 63 6f 64 65 | two let|ter code|
|00003900| 2c 20 61 6e 64 20 65 76 | 65 72 79 20 74 77 6f 20 |, and ev|ery two |
|00003910| 6c 65 74 74 65 72 20 63 | 6f 64 65 20 69 73 20 66 |letter c|ode is f|
|00003920| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 74 68 65 20 76 |ollowed |by the v|
|00003930| 61 6c 75 65 0a 66 6f 72 | 20 74 68 65 20 63 61 70 |alue.for| the cap|
|00003940| 61 62 69 6c 69 74 79 2e | 20 20 50 6f 73 73 69 62 |ability.| Possib|
|00003950| 6c 65 20 74 79 70 65 73 | 20 61 72 65 3a 0a 0a 5c |le types| are:..\|
|00003960| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 7d 0a 20 |begin{it|emize}. |
|00003970| 20 5c 69 74 65 6d 20 20 | 7b 5c 62 66 20 4e 75 6d | \item |{\bf Num|
|00003980| 65 72 69 63 7d 3a 20 46 | 6f 72 20 69 6e 73 74 61 |eric}: F|or insta|
|00003990| 6e 63 65 20 7b 5c 69 74 | 20 63 6f 7d 20 2d 2d 20 |nce {\it| co} -- |
|000039a0| 6e 75 6d 62 65 72 20 6f | 66 20 63 6f 6c 75 6d 6e |number o|f column|
|000039b0| 73 0a 20 20 5c 69 74 65 | 6d 20 20 7b 5c 62 66 20 |s. \ite|m {\bf |
|000039c0| 42 6f 6f 6c 65 61 6e 7d | 20 6f 72 20 7b 5c 62 66 |Boolean}| or {\bf|
|000039d0| 20 46 6c 61 67 7d 3a 20 | 46 6f 72 20 69 6e 73 74 | Flag}: |For inst|
|000039e0| 61 6e 63 65 20 7b 5c 69 | 74 20 68 63 7d 20 2d 2d |ance {\i|t hc} --|
|000039f0| 20 68 61 72 64 63 6f 70 | 79 0a 20 20 20 20 20 20 | hardcop|y. |
|00003a00| 20 20 20 74 65 72 6d 69 | 6e 61 6c 0a 20 20 5c 69 | termi|nal. \i|
|00003a10| 74 65 6d 20 20 7b 5c 62 | 66 20 53 74 72 69 6e 67 |tem {\b|f String|
|00003a20| 7d 3a 20 46 6f 72 20 69 | 6e 73 74 61 6e 63 65 20 |}: For i|nstance |
|00003a30| 7b 5c 69 74 20 73 74 7d | 20 2d 2d 20 73 65 74 20 |{\it st}| -- set |
|00003a40| 74 61 62 20 73 74 6f 70 | 0a 5c 65 6e 64 7b 69 74 |tab stop|.\end{it|
|00003a50| 65 6d 69 7a 65 7d 0a 0a | 45 61 63 68 20 63 61 70 |emize}..|Each cap|
|00003a60| 61 62 69 6c 69 74 79 20 | 69 73 20 61 73 73 6f 63 |ability |is assoc|
|00003a70| 69 61 74 65 64 20 77 69 | 74 68 20 61 20 73 69 6e |iated wi|th a sin|
|00003a80| 67 6c 65 20 76 61 6c 75 | 65 20 74 79 70 65 2e 20 |gle valu|e type. |
|00003a90| 28 7b 5c 69 74 20 63 6f | 7d 0a 69 73 20 61 6c 77 |({\it co|}.is alw|
|00003aa0| 61 79 73 20 6e 75 6d 65 | 72 69 63 2c 20 7b 5c 69 |ays nume|ric, {\i|
|00003ab0| 74 20 68 63 7d 20 69 73 | 20 61 6c 77 61 79 73 20 |t hc} is| always |
|00003ac0| 61 20 66 6c 61 67 20 61 | 6e 64 20 7b 5c 69 74 20 |a flag a|nd {\it |
|00003ad0| 73 74 7d 20 69 73 20 61 | 6c 77 61 79 73 20 61 20 |st} is a|lways a |
|00003ae0| 73 74 72 69 6e 67 29 2e | 0a 54 68 65 72 65 20 61 |string).|.There a|
|00003af0| 72 65 20 74 68 72 65 65 | 20 64 69 66 66 65 72 65 |re three| differe|
|00003b00| 6e 74 20 74 79 70 65 73 | 20 6f 66 20 76 61 6c 75 |nt types| of valu|
|00003b10| 65 73 2c 20 73 6f 20 74 | 68 65 72 65 20 61 72 65 |es, so t|here are|
|00003b20| 20 61 6c 73 6f 20 74 68 | 72 65 65 20 66 75 6e 63 | also th|ree func|
|00003b30| 74 69 6f 6e 73 20 74 6f | 0a 69 6e 74 65 72 72 6f |tions to|.interro|
|00003b40| 67 61 74 65 20 74 68 65 | 6d 2e 20 5c 76 64 6d 61 |gate the|m. \vdma|
|00003b50| 72 67 7b 63 68 61 72 20 | 2a 6e 61 6d 65 7d 20 69 |rg{char |*name} i|
|00003b60| 73 20 74 68 65 20 74 77 | 6f 20 6c 65 74 74 65 72 |s the tw|o letter|
|00003b70| 20 63 6f 64 65 20 66 6f | 72 20 74 68 65 20 63 61 | code fo|r the ca|
|00003b80| 70 61 62 69 6c 69 74 79 | 2e 0a 0a 5c 62 65 67 69 |pability|...\begi|
|00003b90| 6e 7b 69 74 65 6d 69 7a | 65 7d 0a 20 20 5c 69 74 |n{itemiz|e}. \it|
|00003ba0| 65 6d 20 7b 5c 74 74 20 | 69 6e 74 20 74 67 65 74 |em {\tt |int tget|
|00003bb0| 6e 75 6d 28 63 68 61 72 | 20 2a 6e 61 6d 65 29 7d |num(char| *name)}|
|00003bc0| 20 5c 6c 61 62 65 6c 7b | 66 75 6e 5f 74 67 65 74 | \label{|fun_tget|
|00003bd0| 6e 75 6d 7d 5c 5c 0a 20 | 20 20 20 20 20 20 20 47 |num}\\. | G|
|00003be0| 65 74 20 61 20 63 61 70 | 61 62 69 6c 69 74 79 20 |et a cap|ability |
|00003bf0| 76 61 6c 75 65 20 74 68 | 61 74 20 69 73 20 6e 75 |value th|at is nu|
|00003c00| 6d 65 72 69 63 2c 20 73 | 75 63 68 20 61 73 20 7b |meric, s|uch as {|
|00003c10| 5c 69 74 20 63 6f 7d 2e | 0a 20 20 20 20 20 20 20 |\it co}.|. |
|00003c20| 20 5c 76 64 6d 66 75 6e | 63 7b 74 67 65 74 6e 75 | \vdmfun|c{tgetnu|
|00003c30| 6d 28 2e 2e 2e 29 7d 20 | 72 65 74 75 72 6e 73 20 |m(...)} |returns |
|00003c40| 74 68 65 20 6e 75 6d 65 | 72 69 63 20 76 61 6c 75 |the nume|ric valu|
|00003c50| 65 20 69 66 20 74 68 65 | 20 63 61 70 61 62 69 6c |e if the| capabil|
|00003c60| 69 74 79 20 69 73 0a 20 | 20 20 20 20 20 20 20 61 |ity is. | a|
|00003c70| 76 61 69 6c 61 62 6c 65 | 2c 20 6f 74 68 65 72 77 |vailable|, otherw|
|00003c80| 69 73 65 20 31 2e 0a 20 | 20 20 20 20 20 20 20 28 |ise 1.. | (|
|00003c90| 4e 6f 74 65 3a 20 74 68 | 65 20 72 65 74 75 72 6e |Note: th|e return|
|00003ca0| 65 64 20 76 61 6c 75 65 | 20 69 73 20 6e 6f 74 20 |ed value| is not |
|00003cb0| 6e 65 67 61 74 69 76 65 | 2e 29 0a 0a 20 20 5c 69 |negative|.).. \i|
|00003cc0| 74 65 6d 20 7b 5c 74 74 | 20 69 6e 74 20 74 67 65 |tem {\tt| int tge|
|00003cd0| 74 66 6c 61 67 28 63 68 | 61 72 20 2a 6e 61 6d 65 |tflag(ch|ar *name|
|00003ce0| 29 7d 20 5c 6c 61 62 65 | 6c 7b 66 75 6e 5f 74 67 |)} \labe|l{fun_tg|
|00003cf0| 65 74 66 6c 61 67 7d 5c | 5c 0a 20 20 20 20 20 20 |etflag}\|\. |
|00003d00| 20 20 47 65 74 20 61 20 | 63 61 70 61 62 69 6c 69 | Get a |capabili|
|00003d10| 74 79 20 76 61 6c 75 65 | 20 74 68 61 74 20 69 73 |ty value| that is|
|00003d20| 20 62 6f 6f 6c 65 61 6e | 20 28 6f 72 20 66 6c 61 | boolean| (or fla|
|00003d30| 67 29 2e 0a 20 20 20 20 | 20 20 20 20 52 65 74 75 |g).. | Retu|
|00003d40| 72 6e 73 20 31 20 69 66 | 20 74 68 65 20 66 6c 61 |rns 1 if| the fla|
|00003d50| 67 20 69 73 20 70 72 65 | 73 65 6e 74 2c 20 30 20 |g is pre|sent, 0 |
|00003d60| 6f 74 68 65 72 77 69 73 | 65 2e 0a 0a 20 20 5c 69 |otherwis|e... \i|
|00003d70| 74 65 6d 20 7b 5c 74 74 | 20 63 68 61 72 20 2a 74 |tem {\tt| char *t|
|00003d80| 67 65 74 73 74 72 28 63 | 68 61 72 20 2a 6e 61 6d |getstr(c|har *nam|
|00003d90| 65 2c 20 63 68 61 72 20 | 2a 2a 61 72 65 61 29 7d |e, char |**area)}|
|00003da0| 20 5c 6c 61 62 65 6c 7b | 66 75 6e 5f 74 67 65 74 | \label{|fun_tget|
|00003db0| 73 74 72 7d 5c 5c 0a 09 | 47 65 74 20 61 20 63 61 |str}\\..|Get a ca|
|00003dc0| 70 61 62 69 6c 69 74 79 | 20 76 61 6c 75 65 20 74 |pability| value t|
|00003dd0| 68 61 74 20 69 73 20 61 | 20 73 74 72 69 6e 67 2e |hat is a| string.|
|00003de0| 20 52 65 74 75 72 6e 73 | 20 61 20 70 6f 69 6e 74 | Returns| a point|
|00003df0| 65 72 20 74 6f 0a 09 74 | 68 65 20 73 74 72 69 6e |er to..t|he strin|
|00003e00| 67 20 6f 72 20 4e 55 4c | 4c 20 69 66 20 6e 6f 74 |g or NUL|L if not|
|00003e10| 20 70 72 65 73 65 6e 74 | 2e 20 49 6e 20 74 68 65 | present|. In the|
|00003e20| 20 47 4e 55 20 76 65 72 | 73 69 6f 6e 2c 20 69 66 | GNU ver|sion, if|
|00003e30| 0a 09 5c 76 64 6d 61 72 | 67 7b 61 72 65 61 7d 20 |..\vdmar|g{area} |
|00003e40| 69 73 20 4e 55 4c 4c 2c | 20 74 65 72 6d 63 61 70 |is NULL,| termcap|
|00003e50| 20 77 69 6c 6c 20 61 6c | 6c 6f 63 61 74 65 20 6d | will al|locate m|
|00003e60| 65 6d 6f 72 79 20 62 79 | 0a 09 69 74 73 65 6c 66 |emory by|..itself|
|00003e70| 2e 20 20 54 65 72 6d 63 | 61 70 20 77 69 6c 6c 20 |. Termc|ap will |
|00003e80| 6e 65 76 65 72 20 72 65 | 66 65 72 20 74 6f 20 74 |never re|fer to t|
|00003e90| 68 69 73 20 70 6f 69 6e | 74 65 72 20 61 67 61 69 |his poin|ter agai|
|00003ea0| 6e 2c 20 73 6f 0a 09 64 | 6f 6e 27 74 20 66 6f 72 |n, so..d|on't for|
|00003eb0| 67 65 74 20 74 6f 20 66 | 72 65 65 20 5c 76 64 6d |get to f|ree \vdm|
|00003ec0| 61 72 67 7b 6e 61 6d 65 | 7d 20 62 65 66 6f 72 65 |arg{name|} before|
|00003ed0| 20 6c 65 61 76 69 6e 67 | 20 74 68 65 0a 09 70 72 | leaving| the..pr|
|00003ee0| 6f 67 72 61 6d 2e 20 20 | 54 68 69 73 20 6d 65 74 |ogram. |This met|
|00003ef0| 68 6f 64 20 69 73 20 70 | 72 65 66 65 72 72 65 64 |hod is p|referred|
|00003f00| 2c 20 62 65 63 61 75 73 | 65 20 79 6f 75 20 64 6f |, becaus|e you do|
|00003f10| 6e 27 74 20 6b 6e 6f 77 | 20 68 6f 77 0a 09 6d 75 |n't know| how..mu|
|00003f20| 63 68 20 73 70 61 63 65 | 20 69 73 20 6e 65 65 64 |ch space| is need|
|00003f30| 65 64 20 66 6f 72 20 74 | 68 65 20 70 6f 69 6e 74 |ed for t|he point|
|00003f40| 65 72 2c 20 73 6f 20 6c | 65 74 20 74 65 72 6d 63 |er, so l|et termc|
|00003f50| 61 70 20 64 6f 20 74 68 | 69 73 0a 09 66 6f 72 20 |ap do th|is..for |
|00003f60| 79 6f 75 2e 0a 5c 65 6e | 64 7b 69 74 65 6d 69 7a |you..\en|d{itemiz|
|00003f70| 65 7d 0a 0a 0a 5c 62 65 | 67 69 6e 7b 74 73 63 72 |e}...\be|gin{tscr|
|00003f80| 65 65 6e 7d 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 |een}.\be|gin{verb|
|00003f90| 61 74 69 6d 7d 0a 20 20 | 20 20 63 68 61 72 20 2a |atim}. | char *|
|00003fa0| 63 6c 73 74 72 2c 20 2a | 63 6d 73 74 72 3b 0a 20 |clstr, *|cmstr;. |
|00003fb0| 20 20 20 69 6e 74 20 20 | 20 6c 69 6e 65 73 2c 20 | int | lines, |
|00003fc0| 20 63 6f 6c 73 3b 0a 0a | 20 20 20 20 76 6f 69 64 | cols;..| void|
|00003fd0| 20 74 65 72 6d 5f 63 61 | 70 73 28 29 0a 20 20 20 | term_ca|ps(). |
|00003fe0| 20 7b 0a 20 20 20 20 63 | 68 61 72 20 2a 74 6d 70 | {. c|har *tmp|
|00003ff0| 3b 0a 0a 20 20 20 20 20 | 63 6c 73 74 72 3d 74 67 |;.. |clstr=tg|
|00004000| 65 74 73 74 72 28 22 63 | 6c 22 2c 30 29 3b 20 2f |etstr("c|l",0); /|
|00004010| 2a 20 63 6c 65 61 72 20 | 73 63 72 65 65 6e 20 2a |* clear |screen *|
|00004020| 2f 0a 20 20 20 20 20 63 | 6d 73 74 72 3d 74 67 65 |/. c|mstr=tge|
|00004030| 74 73 74 72 28 22 63 6d | 22 2c 30 29 3b 20 2f 2a |tstr("cm|",0); /*|
|00004040| 20 6d 6f 76 65 20 79 2c | 78 20 20 20 20 20 2a 2f | move y,|x */|
|00004050| 0a 0a 20 20 20 20 20 6c | 69 6e 65 73 3d 74 67 65 |.. l|ines=tge|
|00004060| 74 6e 75 6d 28 22 6c 69 | 22 29 3b 20 2f 2a 20 74 |tnum("li|"); /* t|
|00004070| 65 72 6d 69 6e 61 6c 20 | 6c 69 6e 65 73 20 20 20 |erminal |lines |
|00004080| 2a 2f 0a 20 20 20 20 20 | 63 6f 6c 73 3d 74 67 65 |*/. |cols=tge|
|00004090| 74 6e 75 6d 28 22 63 6f | 22 29 3b 20 20 2f 2a 20 |tnum("co|"); /* |
|000040a0| 74 65 72 6d 69 6e 61 6c | 20 63 6f 6c 75 6d 6e 73 |terminal| columns|
|000040b0| 20 2a 2f 0a 0a 20 20 20 | 20 20 74 6d 70 3d 74 67 | */.. | tmp=tg|
|000040c0| 65 74 73 74 72 28 22 70 | 63 22 2c 30 29 3b 20 2f |etstr("p|c",0); /|
|000040d0| 2a 20 70 61 64 64 69 6e | 67 20 63 68 61 72 61 63 |* paddin|g charac|
|000040e0| 74 65 72 20 2a 2f 0a 0a | 20 20 20 20 20 50 43 3d |ter */..| PC=|
|000040f0| 74 6d 70 20 3f 20 2a 74 | 6d 70 20 3a 20 30 3b 0a |tmp ? *t|mp : 0;.|
|00004100| 20 20 20 20 20 42 43 3d | 74 67 65 74 73 74 72 28 | BC=|tgetstr(|
|00004110| 22 6c 65 22 2c 30 29 3b | 20 2f 2a 20 63 75 72 73 |"le",0);| /* curs|
|00004120| 6f 72 20 6c 65 66 74 20 | 6f 6e 65 20 63 68 61 72 |or left |one char|
|00004130| 20 2a 2f 0a 20 20 20 20 | 20 55 50 3d 74 67 65 74 | */. | UP=tget|
|00004140| 73 74 72 28 22 75 70 22 | 2c 30 29 3b 20 2f 2a 20 |str("up"|,0); /* |
|00004150| 63 75 72 73 6f 72 20 75 | 70 20 6f 6e 65 20 6c 69 |cursor u|p one li|
|00004160| 6e 65 20 20 20 2a 2f 0a | 20 20 20 20 7d 0a 5c 65 |ne */.| }.\e|
|00004170| 6e 64 7b 76 65 72 62 61 | 74 69 6d 7d 0a 5c 65 6e |nd{verba|tim}.\en|
|00004180| 64 7b 74 73 63 72 65 65 | 6e 7d 0a 0a 0a 0a 5c 73 |d{tscree|n}....\s|
|00004190| 75 62 73 65 63 74 69 6f | 6e 7b 54 65 72 6d 63 61 |ubsectio|n{Termca|
|000041a0| 70 20 43 61 70 61 62 69 | 6c 69 74 69 65 73 7d 0a |p Capabi|lities}.|
|000041b0| 0a 5c 73 75 62 73 75 62 | 73 65 63 74 69 6f 6e 7b |.\subsub|section{|
|000041c0| 42 6f 6f 6c 65 61 6e 20 | 43 61 70 61 62 69 6c 69 |Boolean |Capabili|
|000041d0| 74 69 65 73 7d 0a 5c 62 | 65 67 69 6e 7b 73 6d 61 |ties}.\b|egin{sma|
|000041e0| 6c 6c 7d 0a 5c 62 65 67 | 69 6e 7b 74 61 62 62 69 |ll}.\beg|in{tabbi|
|000041f0| 6e 67 7d 0a 31 32 33 34 | 5c 3d 5c 6b 69 6c 6c 0a |ng}.1234|\=\kill.|
|00004200| 7b 5c 74 74 20 35 69 7d | 20 5c 3e 20 20 20 50 72 |{\tt 5i}| \> Pr|
|00004210| 69 6e 74 65 72 20 77 69 | 6c 6c 20 6e 6f 74 20 65 |inter wi|ll not e|
|00004220| 63 68 6f 20 6f 6e 20 73 | 63 72 65 65 6e 5c 5c 0a |cho on s|creen\\.|
|00004230| 7b 5c 74 74 20 61 6d 7d | 20 5c 3e 20 20 20 41 75 |{\tt am}| \> Au|
|00004240| 74 6f 6d 61 74 69 63 20 | 6d 61 72 67 69 6e 73 20 |tomatic |margins |
|00004250| 77 68 69 63 68 20 6d 65 | 61 6e 73 20 61 75 74 6f |which me|ans auto|
|00004260| 6d 61 74 69 63 20 6c 69 | 6e 65 20 77 72 61 70 5c |matic li|ne wrap\|
|00004270| 5c 0a 7b 5c 74 74 20 62 | 73 7d 20 5c 3e 20 20 20 |\.{\tt b|s} \> |
|00004280| 43 6f 6e 74 72 6f 6c 2d | 48 20 28 38 20 64 65 63 |Control-|H (8 dec|
|00004290| 2e 29 20 70 65 72 66 6f | 72 6d 73 20 61 20 62 61 |.) perfo|rms a ba|
|000042a0| 63 6b 73 70 61 63 65 5c | 5c 0a 7b 5c 74 74 20 62 |ckspace\|\.{\tt b|
|000042b0| 77 7d 20 5c 3e 20 20 20 | 42 61 63 6b 73 70 61 63 |w} \> |Backspac|
|000042c0| 65 20 6f 6e 20 6c 65 66 | 74 20 6d 61 72 67 69 6e |e on lef|t margin|
|000042d0| 20 77 72 61 70 73 20 74 | 6f 20 70 72 65 76 69 6f | wraps t|o previo|
|000042e0| 75 73 20 6c 69 6e 65 20 | 61 6e 64 20 72 69 67 68 |us line |and righ|
|000042f0| 74 20 6d 61 72 67 69 6e | 5c 5c 0a 7b 5c 74 74 20 |t margin|\\.{\tt |
|00004300| 64 61 7d 20 5c 3e 20 20 | 20 44 69 73 70 6c 61 79 |da} \> | Display|
|00004310| 20 72 65 74 61 69 6e 65 | 64 20 61 62 6f 76 65 20 | retaine|d above |
|00004320| 73 63 72 65 65 6e 5c 5c | 0a 7b 5c 74 74 20 64 62 |screen\\|.{\tt db|
|00004330| 7d 20 5c 3e 20 20 20 44 | 69 73 70 6c 61 79 20 72 |} \> D|isplay r|
|00004340| 65 74 61 69 6e 65 64 20 | 62 65 6c 6f 77 20 73 63 |etained |below sc|
|00004350| 72 65 65 6e 5c 5c 0a 7b | 5c 74 74 20 65 6f 7d 20 |reen\\.{|\tt eo} |
|00004360| 5c 3e 20 20 20 41 20 73 | 70 61 63 65 20 65 72 61 |\> A s|pace era|
|00004370| 73 65 73 20 61 6c 6c 20 | 63 68 61 72 61 63 74 65 |ses all |characte|
|00004380| 72 73 20 61 74 20 63 75 | 72 73 6f 72 20 70 6f 73 |rs at cu|rsor pos|
|00004390| 69 74 69 6f 6e 5c 5c 0a | 7b 5c 74 74 20 65 73 7d |ition\\.|{\tt es}|
|000043a0| 20 5c 3e 20 20 20 45 73 | 63 61 70 65 20 73 65 71 | \> Es|cape seq|
|000043b0| 75 65 6e 63 65 73 20 61 | 6e 64 20 73 70 65 63 69 |uences a|nd speci|
|000043c0| 61 6c 20 63 68 61 72 61 | 63 74 65 72 73 20 77 6f |al chara|cters wo|
|000043d0| 72 6b 20 69 6e 20 73 74 | 61 74 75 73 20 6c 69 6e |rk in st|atus lin|
|000043e0| 65 5c 5c 0a 7b 5c 74 74 | 20 67 6e 7d 20 5c 3e 20 |e\\.{\tt| gn} \> |
|000043f0| 20 20 47 65 6e 65 72 69 | 63 20 64 65 76 69 63 65 | Generi|c device|
|00004400| 5c 5c 0a 7b 5c 74 74 20 | 68 63 7d 20 5c 3e 20 20 |\\.{\tt |hc} \> |
|00004410| 20 54 68 69 73 20 69 73 | 20 61 20 68 61 72 64 63 | This is| a hardc|
|00004420| 6f 70 79 20 74 65 72 6d | 69 6e 61 6c 5c 5c 0a 7b |opy term|inal\\.{|
|00004430| 5c 74 74 20 48 43 7d 20 | 5c 3e 20 20 20 54 68 65 |\tt HC} |\> The|
|00004440| 20 63 75 72 73 6f 72 20 | 69 73 20 68 61 72 64 20 | cursor |is hard |
|00004450| 74 6f 20 73 65 65 20 77 | 68 65 6e 20 6e 6f 74 20 |to see w|hen not |
|00004460| 6f 6e 20 62 6f 74 74 6f | 6d 20 6c 69 6e 65 5c 5c |on botto|m line\\|
|00004470| 0a 7b 5c 74 74 20 68 73 | 7d 20 5c 3e 20 20 20 48 |.{\tt hs|} \> H|
|00004480| 61 73 20 61 20 73 74 61 | 74 75 73 20 6c 69 6e 65 |as a sta|tus line|
|00004490| 5c 5c 0a 7b 5c 74 74 20 | 68 7a 7d 20 5c 3e 20 20 |\\.{\tt |hz} \> |
|000044a0| 20 48 61 7a 65 6c 20 74 | 69 6e 65 20 62 75 67 2c | Hazel t|ine bug,|
|000044b0| 20 74 68 65 20 74 65 72 | 6d 69 6e 61 6c 20 63 61 | the ter|minal ca|
|000044c0| 6e 20 6e 6f 74 20 70 72 | 69 6e 74 20 74 69 6c 64 |n not pr|int tild|
|000044d0| 65 20 63 68 61 72 61 63 | 74 65 72 73 5c 5c 0a 7b |e charac|ters\\.{|
|000044e0| 5c 74 74 20 69 6e 7d 20 | 5c 3e 20 20 20 54 65 72 |\tt in} |\> Ter|
|000044f0| 6d 69 6e 61 6c 20 69 6e | 73 65 72 74 73 20 6e 75 |minal in|serts nu|
|00004500| 6c 6c 73 2c 20 6e 6f 74 | 20 73 70 61 63 65 73 2c |lls, not| spaces,|
|00004510| 20 74 6f 20 66 69 6c 6c | 20 77 68 69 74 65 73 70 | to fill| whitesp|
|00004520| 61 63 65 5c 5c 0a 7b 5c | 74 74 20 6b 6d 7d 20 5c |ace\\.{\|tt km} \|
|00004530| 3e 20 20 20 54 65 72 6d | 69 6e 61 6c 20 68 61 73 |> Term|inal has|
|00004540| 20 61 20 6d 65 74 61 20 | 6b 65 79 5c 5c 0a 7b 5c | a meta |key\\.{\|
|00004550| 74 74 20 6d 69 7d 20 5c | 3e 20 20 20 43 75 72 73 |tt mi} \|> Curs|
|00004560| 6f 72 20 6d 6f 76 65 6d | 65 6e 74 20 77 6f 72 6b |or movem|ent work|
|00004570| 73 20 69 6e 20 69 6e 73 | 65 72 74 20 6d 6f 64 65 |s in ins|ert mode|
|00004580| 5c 5c 0a 7b 5c 74 74 20 | 6d 73 7d 20 5c 3e 20 20 |\\.{\tt |ms} \> |
|00004590| 20 43 75 72 73 6f 72 20 | 6d 6f 76 65 6d 65 6e 74 | Cursor |movement|
|000045a0| 20 77 6f 72 6b 73 20 69 | 6e 20 73 74 61 6e 64 6f | works i|n stando|
|000045b0| 75 74 2f 75 6e 64 65 72 | 6c 69 6e 65 20 6d 6f 64 |ut/under|line mod|
|000045c0| 65 5c 5c 0a 7b 5c 74 74 | 20 4e 50 7d 20 5c 3e 20 |e\\.{\tt| NP} \> |
|000045d0| 20 20 4e 6f 20 70 61 64 | 20 63 68 61 72 61 63 74 | No pad| charact|
|000045e0| 65 72 5c 5c 0a 7b 5c 74 | 74 20 4e 52 7d 20 5c 3e |er\\.{\t|t NR} \>|
|000045f0| 20 20 20 74 69 20 64 6f | 65 73 20 6e 6f 74 20 72 | ti do|es not r|
|00004600| 65 76 65 72 73 65 20 74 | 65 5c 5c 0a 7b 5c 74 74 |everse t|e\\.{\tt|
|00004610| 20 6e 78 7d 20 5c 3e 20 | 20 20 4e 6f 20 70 61 64 | nx} \> | No pad|
|00004620| 64 69 6e 67 2c 20 6d 75 | 73 74 20 75 73 65 20 58 |ding, mu|st use X|
|00004630| 4f 4e 2f 58 4f 46 46 5c | 5c 0a 7b 5c 74 74 20 6f |ON/XOFF\|\.{\tt o|
|00004640| 73 7d 20 5c 3e 20 20 20 | 54 65 72 6d 69 6e 61 6c |s} \> |Terminal|
|00004650| 20 63 61 6e 20 6f 76 65 | 72 73 74 72 69 6b 65 5c | can ove|rstrike\|
|00004660| 5c 0a 7b 5c 74 74 20 75 | 6c 7d 20 5c 3e 20 20 20 |\.{\tt u|l} \> |
|00004670| 54 65 72 6d 69 6e 61 6c | 20 75 6e 64 65 72 6c 69 |Terminal| underli|
|00004680| 6e 65 73 20 61 6c 74 68 | 6f 75 67 68 20 69 74 20 |nes alth|ough it |
|00004690| 63 61 6e 20 6e 6f 74 20 | 6f 76 65 72 73 74 72 69 |can not |overstri|
|000046a0| 6b 65 5c 5c 0a 7b 5c 74 | 74 20 78 62 7d 20 5c 3e |ke\\.{\t|t xb} \>|
|000046b0| 20 20 20 42 65 65 68 69 | 76 65 20 67 6c 69 74 63 | Beehi|ve glitc|
|000046c0| 68 2c 20 66 31 20 73 65 | 6e 64 73 20 45 53 43 41 |h, f1 se|nds ESCA|
|000046d0| 50 45 2c 20 66 32 20 73 | 65 6e 64 73 20 5c 5e 7b |PE, f2 s|ends \^{|
|000046e0| 7d 43 5c 5c 0a 7b 5c 74 | 74 20 78 6e 7d 20 5c 3e |}C\\.{\t|t xn} \>|
|000046f0| 20 20 20 4e 65 77 6c 69 | 6e 65 2f 77 72 61 70 61 | Newli|ne/wrapa|
|00004700| 72 6f 75 6e 64 20 67 6c | 69 74 63 68 5c 5c 0a 7b |round gl|itch\\.{|
|00004710| 5c 74 74 20 78 6f 7d 20 | 5c 3e 20 20 20 54 65 72 |\tt xo} |\> Ter|
|00004720| 6d 69 6e 61 6c 20 75 73 | 65 73 20 78 6f 6e 2f 78 |minal us|es xon/x|
|00004730| 6f 66 66 20 70 72 6f 74 | 6f 63 6f 6c 5c 5c 0a 7b |off prot|ocol\\.{|
|00004740| 5c 74 74 20 78 73 7d 20 | 5c 3e 20 20 20 54 65 78 |\tt xs} |\> Tex|
|00004750| 74 20 74 79 70 65 64 20 | 6f 76 65 72 20 73 74 61 |t typed |over sta|
|00004760| 6e 64 6f 75 74 20 74 65 | 78 74 20 77 69 6c 6c 20 |ndout te|xt will |
|00004770| 62 65 20 64 69 73 70 6c | 61 79 65 64 20 69 6e 20 |be displ|ayed in |
|00004780| 73 74 61 6e 64 6f 75 74 | 5c 5c 0a 7b 5c 74 74 20 |standout|\\.{\tt |
|00004790| 78 74 7d 20 5c 3e 20 20 | 20 54 65 6c 65 72 61 79 |xt} \> | Teleray|
|000047a0| 20 67 6c 69 74 63 68 2c | 20 64 65 73 74 72 75 63 | glitch,| destruc|
|000047b0| 74 69 76 65 20 74 61 62 | 73 20 61 6e 64 20 6f 64 |tive tab|s and od|
|000047c0| 64 20 73 74 61 6e 64 6f | 75 74 20 6d 6f 64 65 5c |d stando|ut mode\|
|000047d0| 5c 0a 5c 65 6e 64 7b 74 | 61 62 62 69 6e 67 7d 0a |\.\end{t|abbing}.|
|000047e0| 5c 65 6e 64 7b 73 6d 61 | 6c 6c 7d 0a 0a 5c 73 75 |\end{sma|ll}..\su|
|000047f0| 62 73 75 62 73 65 63 74 | 69 6f 6e 7b 4e 75 6d 65 |bsubsect|ion{Nume|
|00004800| 72 69 63 20 43 61 70 61 | 62 69 6c 69 74 69 65 73 |ric Capa|bilities|
|00004810| 7d 0a 5c 62 65 67 69 6e | 7b 73 6d 61 6c 6c 7d 0a |}.\begin|{small}.|
|00004820| 5c 62 65 67 69 6e 7b 6d | 75 6c 74 69 63 6f 6c 73 |\begin{m|ulticols|
|00004830| 7d 7b 32 7d 0a 5c 62 65 | 67 69 6e 7b 74 61 62 62 |}{2}.\be|gin{tabb|
|00004840| 69 6e 67 7d 0a 31 32 33 | 34 5c 3d 5c 6b 69 6c 6c |ing}.123|4\=\kill|
|00004850| 0a 7b 5c 74 74 20 63 6f | 7d 20 5c 3e 20 20 20 4e |.{\tt co|} \> N|
|00004860| 75 6d 62 65 72 20 6f 66 | 20 63 6f 6c 75 6d 6e 73 |umber of| columns|
|00004870| 5c 5c 0a 7b 5c 74 74 20 | 64 42 7d 20 5c 3e 20 20 |\\.{\tt |dB} \> |
|00004880| 20 44 65 6c 61 79 20 69 | 6e 20 6d 69 6c 6c 69 73 | Delay i|n millis|
|00004890| 65 63 6f 6e 64 73 20 66 | 6f 72 20 62 61 63 6b 73 |econds f|or backs|
|000048a0| 70 61 63 65 5c 5c 0a 20 | 20 20 20 20 20 20 20 20 |pace\\. | |
|000048b0| 5c 3e 20 20 20 6f 6e 20 | 68 61 72 64 63 6f 70 79 |\> on |hardcopy|
|000048c0| 20 74 65 72 6d 69 6e 61 | 6c 73 5c 5c 0a 7b 5c 74 | termina|ls\\.{\t|
|000048d0| 74 20 64 43 7d 20 5c 3e | 20 20 20 44 65 6c 61 79 |t dC} \>| Delay|
|000048e0| 20 69 6e 20 6d 69 6c 6c | 69 73 65 63 6f 6e 64 73 | in mill|iseconds|
|000048f0| 20 66 6f 72 20 63 61 72 | 72 69 61 67 65 5c 5c 0a | for car|riage\\.|
|00004900| 20 20 20 20 20 20 20 20 | 20 5c 3e 20 20 20 72 65 | | \> re|
|00004910| 74 75 72 6e 20 6f 6e 20 | 68 61 72 64 63 6f 70 79 |turn on |hardcopy|
|00004920| 20 74 65 72 6d 69 6e 61 | 6c 73 5c 5c 0a 7b 5c 74 | termina|ls\\.{\t|
|00004930| 74 20 64 46 7d 20 5c 3e | 20 20 20 44 65 6c 61 79 |t dF} \>| Delay|
|00004940| 20 69 6e 20 6d 69 6c 6c | 69 73 65 63 6f 6e 64 73 | in mill|iseconds|
|00004950| 20 66 6f 72 20 66 6f 72 | 6d 20 66 65 65 64 5c 5c | for for|m feed\\|
|00004960| 0a 20 20 20 20 20 20 20 | 20 20 5c 3e 20 20 20 6f |. | \> o|
|00004970| 6e 20 68 61 72 64 63 6f | 70 79 20 74 65 72 6d 69 |n hardco|py termi|
|00004980| 6e 61 6c 73 5c 5c 0a 7b | 5c 74 74 20 64 4e 7d 20 |nals\\.{|\tt dN} |
|00004990| 5c 3e 20 20 20 44 65 6c | 61 79 20 69 6e 20 6d 69 |\> Del|ay in mi|
|000049a0| 6c 6c 69 73 65 63 6f 6e | 64 73 20 66 6f 72 20 6e |llisecon|ds for n|
|000049b0| 65 77 20 6c 69 6e 65 5c | 5c 0a 20 20 20 20 20 20 |ew line\|\. |
|000049c0| 20 20 20 5c 3e 20 20 20 | 6f 6e 20 68 61 72 64 63 | \> |on hardc|
|000049d0| 6f 70 79 20 74 65 72 6d | 69 6e 61 6c 73 5c 5c 0a |opy term|inals\\.|
|000049e0| 7b 5c 74 74 20 64 54 7d | 20 5c 3e 20 20 20 44 65 |{\tt dT}| \> De|
|000049f0| 6c 61 79 20 69 6e 20 6d | 69 6c 6c 69 73 65 63 6f |lay in m|illiseco|
|00004a00| 6e 64 73 20 66 6f 72 20 | 74 61 62 20 73 74 6f 70 |nds for |tab stop|
|00004a10| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 5c 3e 20 20 |\\. | \> |
|00004a20| 20 6f 6e 20 68 61 72 64 | 63 6f 70 79 20 74 65 72 | on hard|copy ter|
|00004a30| 6d 69 6e 61 6c 73 5c 5c | 0a 7b 5c 74 74 20 64 56 |minals\\|.{\tt dV|
|00004a40| 7d 20 5c 3e 20 20 20 44 | 65 6c 61 79 20 69 6e 20 |} \> D|elay in |
|00004a50| 6d 69 6c 6c 69 73 65 63 | 6f 6e 64 73 20 66 6f 72 |millisec|onds for|
|00004a60| 20 76 65 72 74 69 63 61 | 6c 5c 5c 0a 20 20 20 20 | vertica|l\\. |
|00004a70| 20 20 20 20 20 5c 3e 20 | 20 20 74 61 62 20 73 74 | \> | tab st|
|00004a80| 6f 70 20 6f 6e 20 68 61 | 72 64 63 6f 70 79 20 74 |op on ha|rdcopy t|
|00004a90| 65 72 6d 69 6e 61 6c 73 | 5c 5c 0a 7b 5c 74 74 20 |erminals|\\.{\tt |
|00004aa0| 69 74 7d 20 5c 3e 20 20 | 20 44 69 66 66 65 72 65 |it} \> | Differe|
|00004ab0| 6e 63 65 20 62 65 74 77 | 65 65 6e 20 74 61 62 20 |nce betw|een tab |
|00004ac0| 70 6f 73 69 74 69 6f 6e | 73 5c 5c 0a 7b 5c 74 74 |position|s\\.{\tt|
|00004ad0| 20 6c 68 7d 20 5c 3e 20 | 20 20 48 65 69 67 68 74 | lh} \> | Height|
|00004ae0| 20 6f 66 20 73 6f 66 74 | 20 6c 61 62 65 6c 73 5c | of soft| labels\|
|00004af0| 5c 0a 7b 5c 74 74 20 6c | 6d 7d 20 5c 3e 20 20 20 |\.{\tt l|m} \> |
|00004b00| 4c 69 6e 65 73 20 6f 66 | 20 6d 65 6d 6f 72 79 5c |Lines of| memory\|
|00004b10| 5c 0a 7b 5c 74 74 20 6c | 77 7d 20 5c 3e 20 20 20 |\.{\tt l|w} \> |
|00004b20| 57 69 64 74 68 20 6f 66 | 20 73 6f 66 74 20 6c 61 |Width of| soft la|
|00004b30| 62 65 6c 73 5c 5c 0a 7b | 5c 74 74 20 6c 69 7d 20 |bels\\.{|\tt li} |
|00004b40| 5c 3e 20 20 20 4e 75 6d | 62 65 72 20 6f 66 20 6c |\> Num|ber of l|
|00004b50| 69 6e 65 73 5c 5c 0a 7b | 5c 74 74 20 4e 6c 7d 20 |ines\\.{|\tt Nl} |
|00004b60| 5c 3e 20 20 20 4e 75 6d | 62 65 72 20 6f 66 20 73 |\> Num|ber of s|
|00004b70| 6f 66 74 20 6c 61 62 65 | 6c 73 5c 5c 0a 7b 5c 74 |oft labe|ls\\.{\t|
|00004b80| 74 20 70 62 7d 20 5c 3e | 20 20 20 4c 6f 77 65 73 |t pb} \>| Lowes|
|00004b90| 74 20 62 61 75 64 20 72 | 61 74 65 20 77 68 69 63 |t baud r|ate whic|
|00004ba0| 68 20 6e 65 65 64 73 5c | 5c 0a 20 20 20 20 20 20 |h needs\|\. |
|00004bb0| 20 20 20 5c 3e 20 20 20 | 70 61 64 64 69 6e 67 5c | \> |padding\|
|00004bc0| 5c 0a 7b 5c 74 74 20 73 | 67 7d 20 5c 3e 20 20 20 |\.{\tt s|g} \> |
|00004bd0| 53 74 61 6e 64 6f 75 74 | 20 67 6c 69 74 63 68 5c |Standout| glitch\|
|00004be0| 5c 0a 7b 5c 74 74 20 75 | 67 7d 20 5c 3e 20 20 20 |\.{\tt u|g} \> |
|00004bf0| 55 6e 64 65 72 6c 69 6e | 65 20 67 6c 69 74 63 68 |Underlin|e glitch|
|00004c00| 5c 5c 0a 7b 5c 74 74 20 | 76 74 7d 20 5c 3e 20 20 |\\.{\tt |vt} \> |
|00004c10| 20 76 69 72 74 75 61 6c | 20 74 65 72 6d 69 6e 61 | virtual| termina|
|00004c20| 6c 20 6e 75 6d 62 65 72 | 5c 5c 0a 7b 5c 74 74 20 |l number|\\.{\tt |
|00004c30| 77 73 7d 20 5c 3e 20 20 | 20 57 69 64 74 68 20 6f |ws} \> | Width o|
|00004c40| 66 20 73 74 61 74 75 73 | 20 6c 69 6e 65 20 69 66 |f status| line if|
|00004c50| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 5c 3e 20 20 |\\. | \> |
|00004c60| 20 64 69 66 66 65 72 65 | 6e 74 20 66 72 6f 6d 20 | differe|nt from |
|00004c70| 73 63 72 65 65 6e 20 77 | 69 64 74 68 5c 5c 0a 5c |screen w|idth\\.\|
|00004c80| 65 6e 64 7b 74 61 62 62 | 69 6e 67 7d 0a 5c 65 6e |end{tabb|ing}.\en|
|00004c90| 64 7b 6d 75 6c 74 69 63 | 6f 6c 73 7d 0a 5c 65 6e |d{multic|ols}.\en|
|00004ca0| 64 7b 73 6d 61 6c 6c 7d | 0a 25 5c 63 6c 65 61 72 |d{small}|.%\clear|
|00004cb0| 70 61 67 65 0a 0a 5c 73 | 75 62 73 75 62 73 65 63 |page..\s|ubsubsec|
|00004cc0| 74 69 6f 6e 7b 53 74 72 | 69 6e 67 20 43 61 70 61 |tion{Str|ing Capa|
|00004cd0| 62 69 6c 69 74 69 65 73 | 7d 0a 5c 62 65 67 69 6e |bilities|}.\begin|
|00004ce0| 7b 73 6d 61 6c 6c 7d 0a | 5c 62 65 67 69 6e 7b 6d |{small}.|\begin{m|
|00004cf0| 75 6c 74 69 63 6f 6c 73 | 7d 7b 32 7d 0a 5c 62 65 |ulticols|}{2}.\be|
|00004d00| 67 69 6e 7b 74 61 62 62 | 69 6e 67 7d 0a 31 32 33 |gin{tabb|ing}.123|
|00004d10| 34 5c 3d 5c 6b 69 6c 6c | 0a 7b 5c 74 74 20 21 31 |4\=\kill|.{\tt !1|
|00004d20| 7d 20 5c 3e 20 20 20 73 | 68 69 66 74 65 64 20 73 |} \> s|hifted s|
|00004d30| 61 76 65 20 6b 65 79 5c | 5c 0a 7b 5c 74 74 20 21 |ave key\|\.{\tt !|
|00004d40| 32 7d 20 5c 3e 20 20 20 | 73 68 69 66 74 65 64 20 |2} \> |shifted |
|00004d50| 73 75 73 70 65 6e 64 20 | 6b 65 79 5c 5c 0a 7b 5c |suspend |key\\.{\|
|00004d60| 74 74 20 21 33 7d 20 5c | 3e 20 20 20 73 68 69 66 |tt !3} \|> shif|
|00004d70| 74 65 64 20 75 6e 64 6f | 20 6b 65 79 5c 5c 0a 7b |ted undo| key\\.{|
|00004d80| 5c 74 74 20 5c 23 31 7d | 20 5c 3e 20 20 73 68 69 |\tt \#1}| \> shi|
|00004d90| 66 74 65 64 20 68 65 6c | 70 20 6b 65 79 5c 5c 0a |fted hel|p key\\.|
|00004da0| 7b 5c 74 74 20 5c 23 32 | 7d 20 5c 3e 20 20 73 68 |{\tt \#2|} \> sh|
|00004db0| 69 66 74 65 64 20 68 6f | 6d 65 20 6b 65 79 5c 5c |ifted ho|me key\\|
|00004dc0| 0a 7b 5c 74 74 20 5c 23 | 33 7d 20 5c 3e 20 20 73 |.{\tt \#|3} \> s|
|00004dd0| 68 69 66 74 65 64 20 69 | 6e 70 75 74 20 6b 65 79 |hifted i|nput key|
|00004de0| 5c 5c 0a 7b 5c 74 74 20 | 5c 23 34 7d 20 5c 3e 20 |\\.{\tt |\#4} \> |
|00004df0| 20 73 68 69 66 74 65 64 | 20 63 75 72 73 6f 72 20 | shifted| cursor |
|00004e00| 6c 65 66 74 20 6b 65 79 | 5c 5c 0a 7b 5c 74 74 20 |left key|\\.{\tt |
|00004e10| 5c 25 30 7d 20 5c 3e 20 | 20 72 65 64 6f 20 6b 65 |\%0} \> | redo ke|
|00004e20| 79 5c 5c 0a 7b 5c 74 74 | 20 5c 25 31 7d 20 5c 3e |y\\.{\tt| \%1} \>|
|00004e30| 20 20 68 65 6c 70 20 6b | 65 79 5c 5c 0a 7b 5c 74 | help k|ey\\.{\t|
|00004e40| 74 20 5c 25 32 7d 20 5c | 3e 20 20 6d 61 72 6b 20 |t \%2} \|> mark |
|00004e50| 6b 65 79 5c 5c 0a 7b 5c | 74 74 20 5c 25 33 7d 20 |key\\.{\|tt \%3} |
|00004e60| 5c 3e 20 20 6d 65 73 73 | 61 67 65 20 6b 65 79 5c |\> mess|age key\|
|00004e70| 5c 0a 7b 5c 74 74 20 5c | 25 34 7d 20 5c 3e 20 20 |\.{\tt \|%4} \> |
|00004e80| 6d 6f 76 65 20 6b 65 79 | 5c 5c 0a 7b 5c 74 74 20 |move key|\\.{\tt |
|00004e90| 5c 25 35 7d 20 5c 3e 20 | 20 6e 65 78 74 2d 6f 62 |\%5} \> | next-ob|
|00004ea0| 6a 65 63 74 20 6b 65 79 | 5c 5c 0a 7b 5c 74 74 20 |ject key|\\.{\tt |
|00004eb0| 5c 25 36 7d 20 5c 3e 20 | 20 6f 70 65 6e 20 6b 65 |\%6} \> | open ke|
|00004ec0| 79 5c 5c 0a 7b 5c 74 74 | 20 5c 25 37 7d 20 5c 3e |y\\.{\tt| \%7} \>|
|00004ed0| 20 20 6f 70 74 69 6f 6e | 73 20 6b 65 79 5c 5c 0a | option|s key\\.|
|00004ee0| 7b 5c 74 74 20 5c 25 38 | 7d 20 5c 3e 20 20 70 72 |{\tt \%8|} \> pr|
|00004ef0| 65 76 69 6f 75 73 2d 6f | 62 6a 65 63 74 20 6b 65 |evious-o|bject ke|
|00004f00| 79 5c 5c 0a 7b 5c 74 74 | 20 5c 25 39 7d 20 5c 3e |y\\.{\tt| \%9} \>|
|00004f10| 20 20 70 72 69 6e 74 20 | 6b 65 79 5c 5c 0a 7b 5c | print |key\\.{\|
|00004f20| 74 74 20 5c 25 61 7d 20 | 5c 3e 20 20 73 68 69 66 |tt \%a} |\> shif|
|00004f30| 74 65 64 20 6d 65 73 73 | 61 67 65 20 6b 65 79 5c |ted mess|age key\|
|00004f40| 5c 0a 7b 5c 74 74 20 5c | 25 62 7d 20 5c 3e 20 20 |\.{\tt \|%b} \> |
|00004f50| 73 68 69 66 74 65 64 20 | 6d 6f 76 65 20 6b 65 79 |shifted |move key|
|00004f60| 5c 5c 0a 7b 5c 74 74 20 | 5c 25 63 7d 20 5c 3e 20 |\\.{\tt |\%c} \> |
|00004f70| 20 73 68 69 66 74 65 64 | 20 6e 65 78 74 20 6b 65 | shifted| next ke|
|00004f80| 79 5c 5c 0a 7b 5c 74 74 | 20 5c 25 64 7d 20 5c 3e |y\\.{\tt| \%d} \>|
|00004f90| 20 20 73 68 69 66 74 65 | 64 20 6f 70 74 69 6f 6e | shifte|d option|
|00004fa0| 73 20 6b 65 79 5c 5c 0a | 7b 5c 74 74 20 5c 25 65 |s key\\.|{\tt \%e|
|00004fb0| 7d 20 5c 3e 20 20 73 68 | 69 66 74 65 64 20 70 72 |} \> sh|ifted pr|
|00004fc0| 65 76 69 6f 75 73 20 6b | 65 79 5c 5c 0a 7b 5c 74 |evious k|ey\\.{\t|
|00004fd0| 74 20 5c 25 66 7d 20 5c | 3e 20 20 73 68 69 66 74 |t \%f} \|> shift|
|00004fe0| 65 64 20 70 72 69 6e 74 | 20 6b 65 79 5c 5c 0a 7b |ed print| key\\.{|
|00004ff0| 5c 74 74 20 5c 25 67 7d | 20 5c 3e 20 20 73 68 69 |\tt \%g}| \> shi|
|00005000| 66 74 65 64 20 72 65 64 | 6f 20 6b 65 79 5c 5c 0a |fted red|o key\\.|
|00005010| 7b 5c 74 74 20 5c 25 68 | 7d 20 5c 3e 20 20 73 68 |{\tt \%h|} \> sh|
|00005020| 69 66 74 65 64 20 72 65 | 70 6c 61 63 65 20 6b 65 |ifted re|place ke|
|00005030| 79 5c 5c 0a 7b 5c 74 74 | 20 5c 25 69 7d 20 5c 3e |y\\.{\tt| \%i} \>|
|00005040| 20 20 73 68 69 66 74 65 | 64 20 63 75 72 73 6f 72 | shifte|d cursor|
|00005050| 20 72 69 67 68 74 20 6b | 65 79 5c 5c 0a 7b 5c 74 | right k|ey\\.{\t|
|00005060| 74 20 5c 25 6a 7d 20 5c | 3e 20 20 73 68 69 66 74 |t \%j} \|> shift|
|00005070| 65 64 20 72 65 73 75 6d | 65 20 6b 65 79 5c 5c 0a |ed resum|e key\\.|
|00005080| 7b 5c 74 74 20 5c 26 30 | 7d 20 5c 3e 20 20 73 68 |{\tt \&0|} \> sh|
|00005090| 69 66 74 65 64 20 63 61 | 6e 63 65 6c 20 6b 65 79 |ifted ca|ncel key|
|000050a0| 5c 5c 0a 7b 5c 74 74 20 | 5c 26 31 7d 20 5c 3e 20 |\\.{\tt |\&1} \> |
|000050b0| 20 72 65 66 65 72 65 6e | 63 65 20 6b 65 79 5c 5c | referen|ce key\\|
|000050c0| 0a 7b 5c 74 74 20 5c 26 | 32 7d 20 5c 3e 20 20 72 |.{\tt \&|2} \> r|
|000050d0| 65 66 72 65 73 68 20 6b | 65 79 5c 5c 0a 7b 5c 74 |efresh k|ey\\.{\t|
|000050e0| 74 20 5c 26 33 7d 20 5c | 3e 20 20 72 65 70 6c 61 |t \&3} \|> repla|
|000050f0| 63 65 20 6b 65 79 5c 5c | 0a 7b 5c 74 74 20 5c 26 |ce key\\|.{\tt \&|
|00005100| 34 7d 20 5c 3e 20 20 72 | 65 73 74 61 72 74 20 6b |4} \> r|estart k|
|00005110| 65 79 5c 5c 0a 7b 5c 74 | 74 20 5c 26 35 7d 20 5c |ey\\.{\t|t \&5} \|
|00005120| 3e 20 20 72 65 73 75 6d | 65 20 6b 65 79 5c 5c 0a |> resum|e key\\.|
|00005130| 7b 5c 74 74 20 5c 26 36 | 7d 20 5c 3e 20 20 73 61 |{\tt \&6|} \> sa|
|00005140| 76 65 20 6b 65 79 5c 5c | 0a 7b 5c 74 74 20 5c 26 |ve key\\|.{\tt \&|
|00005150| 37 7d 20 5c 3e 20 20 73 | 75 73 70 65 6e 64 20 6b |7} \> s|uspend k|
|00005160| 65 79 5c 5c 0a 7b 5c 74 | 74 20 5c 26 38 7d 20 5c |ey\\.{\t|t \&8} \|
|00005170| 3e 20 20 75 6e 64 6f 20 | 6b 65 79 5c 5c 0a 7b 5c |> undo |key\\.{\|
|00005180| 74 74 20 5c 26 39 7d 20 | 5c 3e 20 20 73 68 69 66 |tt \&9} |\> shif|
|00005190| 74 65 64 20 62 65 67 69 | 6e 20 6b 65 79 5c 5c 0a |ted begi|n key\\.|
|000051a0| 7b 5c 74 74 20 2a 30 7d | 20 5c 3e 20 20 20 73 68 |{\tt *0}| \> sh|
|000051b0| 69 66 74 65 64 20 66 69 | 6e 64 20 6b 65 79 5c 5c |ifted fi|nd key\\|
|000051c0| 0a 7b 5c 74 74 20 2a 31 | 7d 20 5c 3e 20 20 20 73 |.{\tt *1|} \> s|
|000051d0| 68 69 66 74 65 64 20 63 | 6f 6d 6d 61 6e 64 20 6b |hifted c|ommand k|
|000051e0| 65 79 5c 5c 0a 7b 5c 74 | 74 20 2a 32 7d 20 5c 3e |ey\\.{\t|t *2} \>|
|000051f0| 20 20 20 73 68 69 66 74 | 65 64 20 63 6f 70 79 20 | shift|ed copy |
|00005200| 6b 65 79 5c 5c 0a 7b 5c | 74 74 20 2a 33 7d 20 5c |key\\.{\|tt *3} \|
|00005210| 3e 20 20 20 73 68 69 66 | 74 65 64 20 63 72 65 61 |> shif|ted crea|
|00005220| 74 65 20 6b 65 79 5c 5c | 0a 7b 5c 74 74 20 2a 34 |te key\\|.{\tt *4|
|00005230| 7d 20 5c 3e 20 20 20 73 | 68 69 66 74 65 64 20 64 |} \> s|hifted d|
|00005240| 65 6c 65 74 65 20 63 68 | 61 72 61 63 74 65 72 5c |elete ch|aracter\|
|00005250| 5c 0a 7b 5c 74 74 20 2a | 35 7d 20 5c 3e 20 20 20 |\.{\tt *|5} \> |
|00005260| 73 68 69 66 74 65 64 20 | 64 65 6c 65 74 65 20 6c |shifted |delete l|
|00005270| 69 6e 65 5c 5c 0a 7b 5c | 74 74 20 2a 36 7d 20 5c |ine\\.{\|tt *6} \|
|00005280| 3e 20 20 20 73 65 6c 65 | 63 74 20 6b 65 79 5c 5c |> sele|ct key\\|
|00005290| 0a 7b 5c 74 74 20 2a 37 | 7d 20 5c 3e 20 20 20 73 |.{\tt *7|} \> s|
|000052a0| 68 69 66 74 65 64 20 65 | 6e 64 20 6b 65 79 5c 5c |hifted e|nd key\\|
|000052b0| 0a 7b 5c 74 74 20 2a 38 | 7d 20 5c 3e 20 20 20 73 |.{\tt *8|} \> s|
|000052c0| 68 69 66 74 65 64 20 63 | 6c 65 61 72 20 6c 69 6e |hifted c|lear lin|
|000052d0| 65 20 6b 65 79 5c 5c 0a | 7b 5c 74 74 20 2a 39 7d |e key\\.|{\tt *9}|
|000052e0| 20 5c 3e 20 20 20 73 68 | 69 66 74 65 64 20 65 78 | \> sh|ifted ex|
|000052f0| 69 74 20 6b 65 79 5c 5c | 0a 7b 5c 74 74 20 5c 40 |it key\\|.{\tt \@|
|00005300| 30 7d 20 5c 3e 20 20 20 | 66 69 6e 64 20 6b 65 79 |0} \> |find key|
|00005310| 5c 5c 0a 7b 5c 74 74 20 | 5c 40 31 7d 20 5c 3e 20 |\\.{\tt |\@1} \> |
|00005320| 20 20 62 65 67 69 6e 20 | 6b 65 79 5c 5c 0a 7b 5c | begin |key\\.{\|
|00005330| 74 74 20 5c 40 32 7d 20 | 5c 3e 20 20 20 63 61 6e |tt \@2} |\> can|
|00005340| 63 65 6c 20 6b 65 79 5c | 5c 0a 7b 5c 74 74 20 5c |cel key\|\.{\tt \|
|00005350| 40 33 7d 20 5c 3e 20 20 | 20 63 6c 6f 73 65 20 6b |@3} \> | close k|
|00005360| 65 79 5c 5c 0a 7b 5c 74 | 74 20 5c 40 34 7d 20 5c |ey\\.{\t|t \@4} \|
|00005370| 3e 20 20 20 63 6f 6d 6d | 61 6e 64 20 6b 65 79 5c |> comm|and key\|
|00005380| 5c 0a 7b 5c 74 74 20 5c | 40 35 7d 20 5c 3e 20 20 |\.{\tt \|@5} \> |
|00005390| 20 63 6f 70 79 20 6b 65 | 79 5c 5c 0a 7b 5c 74 74 | copy ke|y\\.{\tt|
|000053a0| 20 5c 40 36 7d 20 5c 3e | 20 20 20 63 72 65 61 74 | \@6} \>| creat|
|000053b0| 65 20 6b 65 79 5c 5c 0a | 7b 5c 74 74 20 5c 40 37 |e key\\.|{\tt \@7|
|000053c0| 7d 20 5c 3e 20 20 20 65 | 6e 64 20 6b 65 79 5c 5c |} \> e|nd key\\|
|000053d0| 0a 7b 5c 74 74 20 5c 40 | 38 7d 20 5c 3e 20 20 20 |.{\tt \@|8} \> |
|000053e0| 65 6e 74 65 72 2f 73 65 | 6e 64 20 6b 65 79 5c 5c |enter/se|nd key\\|
|000053f0| 0a 7b 5c 74 74 20 5c 40 | 39 7d 20 5c 3e 20 20 20 |.{\tt \@|9} \> |
|00005400| 65 78 69 74 20 6b 65 79 | 5c 5c 0a 7b 5c 74 74 20 |exit key|\\.{\tt |
|00005410| 61 6c 7d 20 5c 3e 20 20 | 20 49 6e 73 65 72 74 20 |al} \> | Insert |
|00005420| 6f 6e 65 20 6c 69 6e 65 | 5c 5c 0a 7b 5c 74 74 20 |one line|\\.{\tt |
|00005430| 41 4c 7d 20 5c 3e 20 20 | 20 49 6e 73 65 72 74 20 |AL} \> | Insert |
|00005440| 5c 25 31 20 6c 69 6e 65 | 73 5c 5c 0a 7b 5c 74 74 |\%1 line|s\\.{\tt|
|00005450| 20 61 63 7d 20 5c 3e 20 | 20 20 50 61 69 72 73 20 | ac} \> | Pairs |
|00005460| 6f 66 20 62 6c 6f 63 6b | 20 67 72 61 70 68 69 63 |of block| graphic|
|00005470| 20 63 68 61 72 61 63 74 | 65 72 73 20 74 6f 5c 5c | charact|ers to\\|
|00005480| 20 0a 20 20 20 20 20 20 | 20 20 20 5c 3e 20 20 20 | . | \> |
|00005490| 6d 61 70 20 61 6c 74 65 | 72 6e 61 74 65 20 63 68 |map alte|rnate ch|
|000054a0| 61 72 61 63 74 65 72 20 | 73 65 74 5c 5c 0a 7b 5c |aracter |set\\.{\|
|000054b0| 74 74 20 61 65 7d 20 5c | 3e 20 20 20 45 6e 64 20 |tt ae} \|> End |
|000054c0| 61 6c 74 65 72 6e 61 74 | 69 76 65 20 63 68 61 72 |alternat|ive char|
|000054d0| 61 63 74 65 72 20 73 65 | 74 5c 5c 0a 7b 5c 74 74 |acter se|t\\.{\tt|
|000054e0| 20 61 73 7d 20 5c 3e 20 | 20 20 53 74 61 72 74 20 | as} \> | Start |
|000054f0| 61 6c 74 65 72 6e 61 74 | 69 76 65 20 63 68 61 72 |alternat|ive char|
|00005500| 61 63 74 65 72 20 73 65 | 74 5c 5c 0a 20 20 20 20 |acter se|t\\. |
|00005510| 20 20 20 20 20 5c 3e 20 | 20 20 66 6f 72 20 62 6c | \> | for bl|
|00005520| 6f 63 6b 20 67 72 61 70 | 68 69 63 20 63 68 61 72 |ock grap|hic char|
|00005530| 61 63 74 65 72 73 5c 5c | 0a 7b 5c 74 74 20 62 63 |acters\\|.{\tt bc|
|00005540| 7d 20 5c 3e 20 20 20 42 | 61 63 6b 73 70 61 63 65 |} \> B|ackspace|
|00005550| 2c 20 69 66 20 6e 6f 74 | 20 5c 5e 7b 7d 48 5c 5c |, if not| \^{}H\\|
|00005560| 0a 7b 5c 74 74 20 62 6c | 7d 20 5c 3e 20 20 20 41 |.{\tt bl|} \> A|
|00005570| 75 64 69 6f 20 62 65 6c | 6c 5c 5c 0a 7b 5c 74 74 |udio bel|l\\.{\tt|
|00005580| 20 62 74 7d 20 5c 3e 20 | 20 20 4d 6f 76 65 20 74 | bt} \> | Move t|
|00005590| 6f 20 70 72 65 76 69 6f | 75 73 20 74 61 62 20 73 |o previo|us tab s|
|000055a0| 74 6f 70 5c 5c 0a 7b 5c | 74 74 20 63 62 7d 20 5c |top\\.{\|tt cb} \|
|000055b0| 3e 20 20 20 43 6c 65 61 | 72 20 66 72 6f 6d 20 62 |> Clea|r from b|
|000055c0| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 6c 69 6e 65 |eginning| of line|
|000055d0| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 5c 3e 20 20 |\\. | \> |
|000055e0| 20 74 6f 20 63 75 72 73 | 6f 72 5c 5c 0a 7b 5c 74 | to curs|or\\.{\t|
|000055f0| 74 20 63 63 7d 20 5c 3e | 20 20 20 44 75 6d 6d 79 |t cc} \>| Dummy|
|00005600| 20 63 6f 6d 6d 61 6e 64 | 20 63 68 61 72 61 63 74 | command| charact|
|00005610| 65 72 5c 5c 0a 7b 5c 74 | 74 20 63 64 7d 20 5c 3e |er\\.{\t|t cd} \>|
|00005620| 20 20 20 43 6c 65 61 72 | 20 74 6f 20 65 6e 64 20 | Clear| to end |
|00005630| 6f 66 20 73 63 72 65 65 | 6e 5c 5c 0a 7b 5c 74 74 |of scree|n\\.{\tt|
|00005640| 20 63 65 7d 20 5c 3e 20 | 20 20 43 6c 65 61 72 20 | ce} \> | Clear |
|00005650| 74 6f 20 65 6e 64 20 6f | 66 20 6c 69 6e 65 5c 5c |to end o|f line\\|
|00005660| 0a 7b 5c 74 74 20 63 68 | 7d 20 5c 3e 20 20 20 4d |.{\tt ch|} \> M|
|00005670| 6f 76 65 20 63 75 72 73 | 6f 72 20 68 6f 72 69 7a |ove curs|or horiz|
|00005680| 6f 6e 74 61 6c 6c 79 20 | 6f 6e 6c 79 20 74 6f 5c |ontally |only to\|
|00005690| 5c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\. | |
|000056a0| 63 6f 6c 75 6d 6e 20 5c | 25 31 5c 5c 0a 7b 5c 74 |column \|%1\\.{\t|
|000056b0| 74 20 63 6c 7d 20 5c 3e | 20 20 20 43 6c 65 61 72 |t cl} \>| Clear|
|000056c0| 20 73 63 72 65 65 6e 20 | 61 6e 64 20 63 75 72 73 | screen |and curs|
|000056d0| 6f 72 20 68 6f 6d 65 5c | 5c 0a 7b 5c 74 74 20 63 |or home\|\.{\tt c|
|000056e0| 6d 7d 20 5c 3e 20 20 20 | 43 75 72 73 6f 72 20 6d |m} \> |Cursor m|
|000056f0| 6f 76 65 20 74 6f 20 72 | 6f 77 20 5c 25 31 20 61 |ove to r|ow \%1 a|
|00005700| 6e 64 5c 5c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |nd\\. | |
|00005710| 20 20 20 63 6f 6c 75 6d | 6e 20 5c 25 32 20 28 6f | colum|n \%2 (o|
|00005720| 6e 20 73 63 72 65 65 6e | 29 5c 5c 0a 7b 5c 74 74 |n screen|)\\.{\tt|
|00005730| 20 43 4d 7d 20 5c 3e 20 | 20 20 4d 6f 76 65 20 63 | CM} \> | Move c|
|00005740| 75 72 73 6f 72 20 74 6f | 20 72 6f 77 20 5c 25 31 |ursor to| row \%1|
|00005750| 20 61 6e 64 5c 5c 0a 20 | 20 20 20 20 20 20 20 20 | and\\. | |
|00005760| 20 20 20 20 20 63 6f 6c | 75 6d 6e 20 5c 25 32 20 | col|umn \%2 |
|00005770| 28 69 6e 20 6d 65 6d 6f | 72 79 29 5c 5c 0a 7b 5c |(in memo|ry)\\.{\|
|00005780| 74 74 20 63 72 7d 20 5c | 3e 20 20 20 43 61 72 72 |tt cr} \|> Carr|
|00005790| 69 61 67 65 20 72 65 74 | 75 72 6e 5c 5c 0a 7b 5c |iage ret|urn\\.{\|
|000057a0| 74 74 20 63 73 7d 20 5c | 3e 20 20 20 53 63 72 6f |tt cs} \|> Scro|
|000057b0| 6c 6c 20 72 65 67 69 6f | 6e 20 66 72 6f 6d 20 6c |ll regio|n from l|
|000057c0| 69 6e 65 20 5c 25 31 20 | 74 6f 20 5c 25 32 5c 5c |ine \%1 |to \%2\\|
|000057d0| 0a 7b 5c 74 74 20 63 74 | 7d 20 5c 3e 20 20 20 43 |.{\tt ct|} \> C|
|000057e0| 6c 65 61 72 20 74 61 62 | 73 5c 5c 0a 7b 5c 74 74 |lear tab|s\\.{\tt|
|000057f0| 20 63 76 7d 20 5c 3e 20 | 20 20 4d 6f 76 65 20 63 | cv} \> | Move c|
|00005800| 75 72 73 6f 72 20 76 65 | 72 74 69 63 61 6c 6c 79 |ursor ve|rtically|
|00005810| 20 6f 6e 6c 79 20 74 6f | 5c 5c 0a 20 20 20 20 20 | only to|\\. |
|00005820| 20 20 20 20 5c 3e 20 20 | 20 6c 69 6e 65 20 5c 25 | \> | line \%|
|00005830| 31 5c 5c 0a 7b 5c 74 74 | 20 64 63 7d 20 5c 3e 20 |1\\.{\tt| dc} \> |
|00005840| 20 20 44 65 6c 65 74 65 | 20 6f 6e 65 20 63 68 61 | Delete| one cha|
|00005850| 72 61 63 74 65 72 5c 5c | 0a 7b 5c 74 74 20 44 43 |racter\\|.{\tt DC|
|00005860| 7d 20 5c 3e 20 20 20 44 | 65 6c 65 74 65 20 5c 25 |} \> D|elete \%|
|00005870| 31 20 63 68 61 72 61 63 | 74 65 72 73 5c 5c 0a 7b |1 charac|ters\\.{|
|00005880| 5c 74 74 20 64 6c 7d 20 | 5c 3e 20 20 20 44 65 6c |\tt dl} |\> Del|
|00005890| 65 74 65 20 6f 6e 65 20 | 6c 69 6e 65 5c 5c 0a 7b |ete one |line\\.{|
|000058a0| 5c 74 74 20 44 4c 7d 20 | 5c 3e 20 20 20 44 65 6c |\tt DL} |\> Del|
|000058b0| 65 74 65 20 5c 25 31 20 | 6c 69 6e 65 73 5c 5c 0a |ete \%1 |lines\\.|
|000058c0| 7b 5c 74 74 20 64 6d 7d | 20 5c 3e 20 20 20 42 65 |{\tt dm}| \> Be|
|000058d0| 67 69 6e 20 64 65 6c 65 | 74 65 20 6d 6f 64 65 5c |gin dele|te mode\|
|000058e0| 5c 0a 7b 5c 74 74 20 64 | 6f 7d 20 5c 3e 20 20 20 |\.{\tt d|o} \> |
|000058f0| 43 75 72 73 6f 72 20 64 | 6f 77 6e 20 6f 6e 65 20 |Cursor d|own one |
|00005900| 6c 69 6e 65 5c 5c 0a 7b | 5c 74 74 20 44 4f 7d 20 |line\\.{|\tt DO} |
|00005910| 5c 3e 20 20 20 43 75 72 | 73 6f 72 20 64 6f 77 6e |\> Cur|sor down|
|00005920| 20 5c 23 31 20 6c 69 6e | 65 73 5c 5c 0a 7b 5c 74 | \#1 lin|es\\.{\t|
|00005930| 74 20 64 73 7d 20 5c 3e | 20 20 20 44 69 73 61 62 |t ds} \>| Disab|
|00005940| 6c 65 20 73 74 61 74 75 | 73 20 6c 69 6e 65 5c 5c |le statu|s line\\|
|00005950| 0a 7b 5c 74 74 20 65 41 | 7d 20 5c 3e 20 20 20 45 |.{\tt eA|} \> E|
|00005960| 6e 61 62 6c 65 20 61 6c | 74 65 72 6e 61 74 65 20 |nable al|ternate |
|00005970| 63 68 61 72 61 63 74 65 | 72 20 73 65 74 5c 5c 0a |characte|r set\\.|
|00005980| 7b 5c 74 74 20 65 63 7d | 20 5c 3e 20 20 20 45 72 |{\tt ec}| \> Er|
|00005990| 61 73 65 20 5c 25 31 20 | 63 68 61 72 61 63 74 65 |ase \%1 |characte|
|000059a0| 72 73 20 73 74 61 72 74 | 69 6e 67 20 61 74 5c 5c |rs start|ing at\\|
|000059b0| 0a 20 20 20 20 20 20 20 | 20 20 5c 3e 20 20 20 63 |. | \> c|
|000059c0| 75 72 73 6f 72 5c 5c 0a | 7b 5c 74 74 20 65 64 7d |ursor\\.|{\tt ed}|
|000059d0| 20 5c 3e 20 20 20 45 6e | 64 20 64 65 6c 65 74 65 | \> En|d delete|
|000059e0| 20 6d 6f 64 65 5c 5c 0a | 7b 5c 74 74 20 65 69 7d | mode\\.|{\tt ei}|
|000059f0| 20 5c 3e 20 20 20 45 6e | 64 20 69 6e 73 65 72 74 | \> En|d insert|
|00005a00| 20 6d 6f 64 65 5c 5c 0a | 7b 5c 74 74 20 66 66 7d | mode\\.|{\tt ff}|
|00005a10| 20 5c 3e 20 20 20 46 6f | 72 6d 2d 66 65 65 64 20 | \> Fo|rm-feed |
|00005a20| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 68 61 72 |characte|r on har|
|00005a30| 64 63 6f 70 79 5c 5c 0a | 20 20 20 20 20 20 20 20 |dcopy\\.| |
|00005a40| 20 5c 3e 20 20 20 74 65 | 72 6d 69 6e 61 6c 73 5c | \> te|rminals\|
|00005a50| 5c 0a 7b 5c 74 74 20 66 | 73 7d 20 5c 3e 20 20 20 |\.{\tt f|s} \> |
|00005a60| 52 65 74 75 72 6e 20 63 | 68 61 72 61 63 74 65 72 |Return c|haracter|
|00005a70| 20 74 6f 20 69 74 73 20 | 70 6f 73 69 74 69 6f 6e | to its |position|
|00005a80| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 5c 3e 20 20 |\\. | \> |
|00005a90| 20 62 65 66 6f 72 65 20 | 67 6f 69 6e 67 20 74 6f | before |going to|
|00005aa0| 20 73 74 61 74 75 73 20 | 6c 69 6e 65 5c 5c 0a 7b | status |line\\.{|
|00005ab0| 5c 74 74 20 46 31 7d 20 | 5c 3e 20 20 20 54 68 65 |\tt F1} |\> The|
|00005ac0| 20 73 74 72 69 6e 67 20 | 73 65 6e 74 20 62 79 20 | string |sent by |
|00005ad0| 66 75 6e 63 74 69 6f 6e | 20 6b 65 79 20 66 31 31 |function| key f11|
|00005ae0| 5c 5c 0a 7b 5c 74 74 20 | 46 32 7d 20 5c 3e 20 20 |\\.{\tt |F2} \> |
|00005af0| 20 54 68 65 20 73 74 72 | 69 6e 67 20 73 65 6e 74 | The str|ing sent|
|00005b00| 20 62 79 20 66 75 6e 63 | 74 69 6f 6e 20 6b 65 79 | by func|tion key|
|00005b10| 20 66 31 32 5c 5c 0a 7b | 5c 74 74 20 46 33 7d 20 | f12\\.{|\tt F3} |
|00005b20| 5c 3e 20 20 20 54 68 65 | 20 73 74 72 69 6e 67 20 |\> The| string |
|00005b30| 73 65 6e 74 20 62 79 20 | 66 75 6e 63 74 69 6f 6e |sent by |function|
|00005b40| 20 6b 65 79 20 66 31 33 | 5c 5c 0a 20 20 20 20 20 | key f13|\\. |
|00005b50| 20 20 20 20 5c 3e 20 20 | 20 2e 2e 2e 20 20 2e 2e | \> | ... ..|
|00005b60| 2e 5c 5c 0a 7b 5c 74 74 | 20 46 39 7d 20 5c 3e 20 |.\\.{\tt| F9} \> |
|00005b70| 20 20 54 68 65 20 73 74 | 72 69 6e 67 20 73 65 6e | The st|ring sen|
|00005b80| 74 20 62 79 20 66 75 6e | 63 74 69 6f 6e 20 6b 65 |t by fun|ction ke|
|00005b90| 79 20 66 31 39 5c 5c 0a | 7b 5c 74 74 20 46 41 7d |y f19\\.|{\tt FA}|
|00005ba0| 20 5c 3e 20 20 20 54 68 | 65 20 73 74 72 69 6e 67 | \> Th|e string|
|00005bb0| 20 73 65 6e 74 20 62 79 | 20 66 75 6e 63 74 69 6f | sent by| functio|
|00005bc0| 6e 20 6b 65 79 20 66 32 | 30 5c 5c 0a 7b 5c 74 74 |n key f2|0\\.{\tt|
|00005bd0| 20 46 42 7d 20 5c 3e 20 | 20 20 54 68 65 20 73 74 | FB} \> | The st|
|00005be0| 72 69 6e 67 20 73 65 6e | 74 20 62 79 20 66 75 6e |ring sen|t by fun|
|00005bf0| 63 74 69 6f 6e 20 6b 65 | 79 20 66 32 31 5c 5c 0a |ction ke|y f21\\.|
|00005c00| 20 20 20 20 20 20 20 20 | 20 5c 3e 20 20 20 2e 2e | | \> ..|
|00005c10| 2e 20 20 2e 2e 2e 5c 5c | 0a 7b 5c 74 74 20 46 5a |. ...\\|.{\tt FZ|
|00005c20| 7d 20 5c 3e 20 20 20 54 | 68 65 20 73 74 72 69 6e |} \> T|he strin|
|00005c30| 67 20 73 65 6e 74 20 62 | 79 20 66 75 6e 63 74 69 |g sent b|y functi|
|00005c40| 6f 6e 20 6b 65 79 20 66 | 34 35 5c 5c 0a 7b 5c 74 |on key f|45\\.{\t|
|00005c50| 74 20 46 61 7d 20 5c 3e | 20 20 20 54 68 65 20 73 |t Fa} \>| The s|
|00005c60| 74 72 69 6e 67 20 73 65 | 6e 74 20 62 79 20 66 75 |tring se|nt by fu|
|00005c70| 6e 63 74 69 6f 6e 20 6b | 65 79 20 66 34 36 5c 5c |nction k|ey f46\\|
|00005c80| 0a 7b 5c 74 74 20 46 62 | 7d 20 5c 3e 20 20 20 54 |.{\tt Fb|} \> T|
|00005c90| 68 65 20 73 74 72 69 6e | 67 20 73 65 6e 74 20 62 |he strin|g sent b|
|00005ca0| 79 20 66 75 6e 63 74 69 | 6f 6e 20 6b 65 79 20 66 |y functi|on key f|
|00005cb0| 34 37 5c 5c 0a 20 20 20 | 20 20 20 20 20 20 5c 3e |47\\. | \>|
|00005cc0| 20 20 20 2e 2e 2e 20 20 | 2e 2e 2e 5c 5c 0a 7b 5c | ... |...\\.{\|
|00005cd0| 74 74 20 46 72 7d 20 5c | 3e 20 20 20 54 68 65 20 |tt Fr} \|> The |
|00005ce0| 73 74 72 69 6e 67 20 73 | 65 6e 74 20 62 79 20 66 |string s|ent by f|
|00005cf0| 75 6e 63 74 69 6f 6e 20 | 6b 65 79 20 66 36 33 5c |unction |key f63\|
|00005d00| 5c 0a 7b 5c 74 74 20 68 | 64 7d 20 5c 3e 20 20 20 |\.{\tt h|d} \> |
|00005d10| 4d 6f 76 65 20 63 75 72 | 73 6f 72 20 61 20 68 61 |Move cur|sor a ha|
|00005d20| 6c 66 20 6c 69 6e 65 20 | 64 6f 77 6e 5c 5c 0a 7b |lf line |down\\.{|
|00005d30| 5c 74 74 20 68 6f 7d 20 | 5c 3e 20 20 20 43 75 72 |\tt ho} |\> Cur|
|00005d40| 73 6f 72 20 68 6f 6d 65 | 5c 5c 0a 7b 5c 74 74 20 |sor home|\\.{\tt |
|00005d50| 68 75 7d 20 5c 3e 20 20 | 20 4d 6f 76 65 20 63 75 |hu} \> | Move cu|
|00005d60| 72 73 6f 72 20 61 20 68 | 61 6c 66 20 6c 69 6e 65 |rsor a h|alf line|
|00005d70| 20 75 70 5c 5c 0a 7b 5c | 74 74 20 69 31 7d 20 5c | up\\.{\|tt i1} \|
|00005d80| 3e 20 20 20 49 6e 69 74 | 69 61 6c 69 7a 61 74 69 |> Init|ializati|
|00005d90| 6f 6e 20 73 74 72 69 6e | 67 20 31 20 61 74 20 6c |on strin|g 1 at l|
|00005da0| 6f 67 69 6e 5c 5c 0a 7b | 5c 74 74 20 69 33 7d 20 |ogin\\.{|\tt i3} |
|00005db0| 5c 3e 20 20 20 49 6e 69 | 74 69 61 6c 69 7a 61 74 |\> Ini|tializat|
|00005dc0| 69 6f 6e 20 73 74 72 69 | 6e 67 20 33 20 61 74 20 |ion stri|ng 3 at |
|00005dd0| 6c 6f 67 69 6e 5c 5c 0a | 7b 5c 74 74 20 69 73 7d |login\\.|{\tt is}|
|00005de0| 20 5c 3e 20 20 20 49 6e | 69 74 69 61 6c 69 7a 61 | \> In|itializa|
|00005df0| 74 69 6f 6e 20 73 74 72 | 69 6e 67 20 32 20 61 74 |tion str|ing 2 at|
|00005e00| 20 6c 6f 67 69 6e 5c 5c | 0a 7b 5c 74 74 20 69 63 | login\\|.{\tt ic|
|00005e10| 7d 20 5c 3e 20 20 20 49 | 6e 73 65 72 74 20 6f 6e |} \> I|nsert on|
|00005e20| 65 20 63 68 61 72 61 63 | 74 65 72 5c 5c 0a 7b 5c |e charac|ter\\.{\|
|00005e30| 74 74 20 49 43 7d 20 5c | 3e 20 20 20 49 6e 73 65 |tt IC} \|> Inse|
|00005e40| 72 74 20 5c 25 31 20 63 | 68 61 72 61 63 74 65 72 |rt \%1 c|haracter|
|00005e50| 73 5c 5c 0a 7b 5c 74 74 | 20 69 66 7d 20 5c 3e 20 |s\\.{\tt| if} \> |
|00005e60| 20 20 49 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e | Initia|lization|
|00005e70| 20 66 69 6c 65 5c 5c 0a | 7b 5c 74 74 20 69 6d 7d | file\\.|{\tt im}|
|00005e80| 20 5c 3e 20 20 20 42 65 | 67 69 6e 20 69 6e 73 65 | \> Be|gin inse|
|00005e90| 72 74 20 6d 6f 64 65 5c | 5c 0a 7b 5c 74 74 20 69 |rt mode\|\.{\tt i|
|00005ea0| 70 7d 20 5c 3e 20 20 20 | 49 6e 73 65 72 74 20 70 |p} \> |Insert p|
|00005eb0| 61 64 20 74 69 6d 65 20 | 61 6e 64 20 6e 65 65 64 |ad time |and need|
|00005ec0| 65 64 20 73 70 65 63 69 | 61 6c 5c 5c 0a 20 20 20 |ed speci|al\\. |
|00005ed0| 20 20 20 20 20 20 5c 3e | 20 20 20 63 68 61 72 61 | \>| chara|
|00005ee0| 63 74 65 72 73 20 61 66 | 74 65 72 20 69 6e 73 65 |cters af|ter inse|
|00005ef0| 72 74 5c 5c 0a 7b 5c 74 | 74 20 69 50 7d 20 5c 3e |rt\\.{\t|t iP} \>|
|00005f00| 20 20 20 49 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f | Initi|alizatio|
|00005f10| 6e 20 70 72 6f 67 72 61 | 6d 5c 5c 0a 7b 5c 74 74 |n progra|m\\.{\tt|
|00005f20| 20 4b 31 7d 20 5c 3e 20 | 20 20 75 70 70 65 72 20 | K1} \> | upper |
|00005f30| 6c 65 66 74 20 6b 65 79 | 20 6f 6e 20 6b 65 79 70 |left key| on keyp|
|00005f40| 61 64 5c 5c 0a 7b 5c 74 | 74 20 4b 32 7d 20 5c 3e |ad\\.{\t|t K2} \>|
|00005f50| 20 20 20 63 65 6e 74 65 | 72 20 6b 65 79 20 6f 6e | cente|r key on|
|00005f60| 20 6b 65 79 70 61 64 5c | 5c 0a 7b 5c 74 74 20 4b | keypad\|\.{\tt K|
|00005f70| 33 7d 20 5c 3e 20 20 20 | 75 70 70 65 72 20 72 69 |3} \> |upper ri|
|00005f80| 67 68 74 20 6b 65 79 20 | 6f 6e 20 6b 65 79 70 61 |ght key |on keypa|
|00005f90| 64 5c 5c 0a 7b 5c 74 74 | 20 4b 34 7d 20 5c 3e 20 |d\\.{\tt| K4} \> |
|00005fa0| 20 20 62 6f 74 74 6f 6d | 20 6c 65 66 74 20 6b 65 | bottom| left ke|
|00005fb0| 79 20 6f 6e 20 6b 65 79 | 70 61 64 5c 5c 0a 7b 5c |y on key|pad\\.{\|
|00005fc0| 74 74 20 4b 35 7d 20 5c | 3e 20 20 20 62 6f 74 74 |tt K5} \|> bott|
|00005fd0| 6f 6d 20 72 69 67 68 74 | 20 6b 65 79 20 6f 6e 20 |om right| key on |
|00005fe0| 6b 65 79 70 61 64 5c 5c | 0a 7b 5c 74 74 20 6b 30 |keypad\\|.{\tt k0|
|00005ff0| 7d 20 5c 3e 20 20 20 46 | 75 6e 63 74 69 6f 6e 20 |} \> F|unction |
|00006000| 6b 65 79 20 30 5c 5c 0a | 7b 5c 74 74 20 6b 31 7d |key 0\\.|{\tt k1}|
|00006010| 20 5c 3e 20 20 20 46 75 | 6e 63 74 69 6f 6e 20 6b | \> Fu|nction k|
|00006020| 65 79 20 31 5c 5c 0a 7b | 5c 74 74 20 6b 32 7d 20 |ey 1\\.{|\tt k2} |
|00006030| 5c 3e 20 20 20 46 75 6e | 63 74 69 6f 6e 20 6b 65 |\> Fun|ction ke|
|00006040| 79 20 32 5c 5c 0a 7b 5c | 74 74 20 6b 33 7d 20 5c |y 2\\.{\|tt k3} \|
|00006050| 3e 20 20 20 46 75 6e 63 | 74 69 6f 6e 20 6b 65 79 |> Func|tion key|
|00006060| 20 33 5c 5c 0a 7b 5c 74 | 74 20 6b 34 7d 20 5c 3e | 3\\.{\t|t k4} \>|
|00006070| 20 20 20 46 75 6e 63 74 | 69 6f 6e 20 6b 65 79 20 | Funct|ion key |
|00006080| 34 5c 5c 0a 7b 5c 74 74 | 20 6b 35 7d 20 5c 3e 20 |4\\.{\tt| k5} \> |
|00006090| 20 20 46 75 6e 63 74 69 | 6f 6e 20 6b 65 79 20 35 | Functi|on key 5|
|000060a0| 5c 5c 0a 7b 5c 74 74 20 | 6b 36 7d 20 5c 3e 20 20 |\\.{\tt |k6} \> |
|000060b0| 20 46 75 6e 63 74 69 6f | 6e 20 6b 65 79 20 36 5c | Functio|n key 6\|
|000060c0| 5c 0a 7b 5c 74 74 20 6b | 37 7d 20 5c 3e 20 20 20 |\.{\tt k|7} \> |
|000060d0| 46 75 6e 63 74 69 6f 6e | 20 6b 65 79 20 37 5c 5c |Function| key 7\\|
|000060e0| 0a 7b 5c 74 74 20 6b 38 | 7d 20 5c 3e 20 20 20 46 |.{\tt k8|} \> F|
|000060f0| 75 6e 63 74 69 6f 6e 20 | 6b 65 79 20 38 5c 5c 0a |unction |key 8\\.|
|00006100| 7b 5c 74 74 20 6b 39 7d | 20 5c 3e 20 20 20 46 75 |{\tt k9}| \> Fu|
|00006110| 6e 63 74 69 6f 6e 20 6b | 65 79 20 39 5c 5c 0a 7b |nction k|ey 9\\.{|
|00006120| 5c 74 74 20 6b 3b 7d 20 | 5c 3e 20 20 20 46 75 6e |\tt k;} |\> Fun|
|00006130| 63 74 69 6f 6e 20 6b 65 | 79 20 31 30 5c 5c 0a 7b |ction ke|y 10\\.{|
|00006140| 5c 74 74 20 6b 61 7d 20 | 5c 3e 20 20 20 43 6c 65 |\tt ka} |\> Cle|
|00006150| 61 72 20 61 6c 6c 20 74 | 61 62 73 20 6b 65 79 5c |ar all t|abs key\|
|00006160| 5c 0a 7b 5c 74 74 20 6b | 41 7d 20 5c 3e 20 20 20 |\.{\tt k|A} \> |
|00006170| 49 6e 73 65 72 74 20 6c | 69 6e 65 20 6b 65 79 5c |Insert l|ine key\|
|00006180| 5c 0a 7b 5c 74 74 20 6b | 62 7d 20 5c 3e 20 20 20 |\.{\tt k|b} \> |
|00006190| 42 61 63 6b 73 70 61 63 | 65 20 6b 65 79 5c 5c 0a |Backspac|e key\\.|
|000061a0| 7b 5c 74 74 20 6b 42 7d | 20 5c 3e 20 20 20 42 61 |{\tt kB}| \> Ba|
|000061b0| 63 6b 20 74 61 62 20 73 | 74 6f 70 5c 5c 0a 7b 5c |ck tab s|top\\.{\|
|000061c0| 74 74 20 6b 43 7d 20 5c | 3e 20 20 20 43 6c 65 61 |tt kC} \|> Clea|
|000061d0| 72 20 73 63 72 65 65 6e | 20 6b 65 79 5c 5c 0a 7b |r screen| key\\.{|
|000061e0| 5c 74 74 20 6b 64 7d 20 | 5c 3e 20 20 20 43 75 72 |\tt kd} |\> Cur|
|000061f0| 73 6f 72 20 64 6f 77 6e | 20 6b 65 79 5c 5c 0a 7b |sor down| key\\.{|
|00006200| 5c 74 74 20 6b 44 7d 20 | 5c 3e 20 20 20 4b 65 79 |\tt kD} |\> Key|
|00006210| 20 66 6f 72 20 64 65 6c | 65 74 65 20 63 68 61 72 | for del|ete char|
|00006220| 61 63 74 65 72 5c 5c 0a | 20 20 20 20 20 20 20 20 |acter\\.| |
|00006230| 20 5c 3e 20 20 20 75 6e | 64 65 72 20 63 75 72 73 | \> un|der curs|
|00006240| 6f 72 5c 5c 0a 7b 5c 74 | 74 20 6b 65 7d 20 5c 3e |or\\.{\t|t ke} \>|
|00006250| 20 20 20 74 75 72 6e 20 | 6b 65 79 70 61 64 20 6f | turn |keypad o|
|00006260| 66 66 5c 5c 0a 7b 5c 74 | 74 20 6b 45 7d 20 5c 3e |ff\\.{\t|t kE} \>|
|00006270| 20 20 20 4b 65 79 20 66 | 6f 72 20 63 6c 65 61 72 | Key f|or clear|
|00006280| 20 74 6f 20 65 6e 64 20 | 6f 66 20 6c 69 6e 65 5c | to end |of line\|
|00006290| 5c 0a 7b 5c 74 74 20 6b | 46 7d 20 5c 3e 20 20 20 |\.{\tt k|F} \> |
|000062a0| 4b 65 79 20 66 6f 72 20 | 73 63 72 6f 6c 6c 69 6e |Key for |scrollin|
|000062b0| 67 20 66 6f 72 77 61 72 | 64 2f 64 6f 77 6e 5c 5c |g forwar|d/down\\|
|000062c0| 0a 7b 5c 74 74 20 6b 68 | 7d 20 5c 3e 20 20 20 43 |.{\tt kh|} \> C|
|000062d0| 75 72 73 6f 72 20 68 6f | 6d 65 20 6b 65 79 5c 5c |ursor ho|me key\\|
|000062e0| 0a 7b 5c 74 74 20 6b 48 | 7d 20 5c 3e 20 20 20 43 |.{\tt kH|} \> C|
|000062f0| 75 72 73 6f 72 20 68 6f | 6d 65 20 64 6f 77 6e 20 |ursor ho|me down |
|00006300| 6b 65 79 5c 5c 0a 7b 5c | 74 74 20 6b 49 7d 20 5c |key\\.{\|tt kI} \|
|00006310| 3e 20 20 20 49 6e 73 65 | 72 74 20 63 68 61 72 61 |> Inse|rt chara|
|00006320| 63 74 65 72 2f 49 6e 73 | 65 72 74 20 6d 6f 64 65 |cter/Ins|ert mode|
|00006330| 20 6b 65 79 5c 5c 0a 7b | 5c 74 74 20 6b 6c 7d 20 | key\\.{|\tt kl} |
|00006340| 5c 3e 20 20 20 43 75 72 | 73 6f 72 20 6c 65 66 74 |\> Cur|sor left|
|00006350| 20 6b 65 79 5c 5c 0a 7b | 5c 74 74 20 6b 4c 7d 20 | key\\.{|\tt kL} |
|00006360| 5c 3e 20 20 20 4b 65 79 | 20 66 6f 72 20 64 65 6c |\> Key| for del|
|00006370| 65 74 65 20 6c 69 6e 65 | 5c 5c 0a 7b 5c 74 74 20 |ete line|\\.{\tt |
|00006380| 6b 4d 7d 20 5c 3e 20 20 | 20 4b 65 79 20 66 6f 72 |kM} \> | Key for|
|00006390| 20 65 78 69 74 20 69 6e | 73 65 72 74 20 6d 6f 64 | exit in|sert mod|
|000063a0| 65 5c 5c 0a 7b 5c 74 74 | 20 6b 4e 7d 20 5c 3e 20 |e\\.{\tt| kN} \> |
|000063b0| 20 20 4b 65 79 20 66 6f | 72 20 6e 65 78 74 20 70 | Key fo|r next p|
|000063c0| 61 67 65 5c 5c 0a 7b 5c | 74 74 20 6b 50 7d 20 5c |age\\.{\|tt kP} \|
|000063d0| 3e 20 20 20 4b 65 79 20 | 66 6f 72 20 70 72 65 76 |> Key |for prev|
|000063e0| 69 6f 75 73 20 70 61 67 | 65 5c 5c 0a 7b 5c 74 74 |ious pag|e\\.{\tt|
|000063f0| 20 6b 72 7d 20 5c 3e 20 | 20 20 43 75 72 73 6f 72 | kr} \> | Cursor|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.