home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Amigaguide Document
(document/amigaGuide).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Amigaguide Document (document/amigaGuide)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| AmigaGuide file, ISO-8859 text
| default
| |
100%
| TrID
| Scribe Markup
| default (weak)
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| x-fmt/111 Plain Text File
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 40 44 61 74 61 42 61 73 | 65 20 74 65 72 6d 63 61 |@DataBas|e termca|
|00000010| 70 0a 40 4d 61 73 74 65 | 72 20 74 65 72 6d 63 61 |p.@Maste|r termca|
|00000020| 70 0a 40 28 43 29 20 74 | 72 61 6e 73 6c 61 74 69 |p.@(C) t|ranslati|
|00000030| 6f 6e 20 66 72 6f 6d 20 | 4d 61 6b 65 69 6e 66 6f |on from |Makeinfo|
|00000040| 20 62 79 20 49 6e 66 6f | 32 47 75 69 64 65 2e 52 | by Info|2Guide.R|
|00000050| 45 58 58 20 a9 20 31 39 | 39 33 20 41 2e 50 6f 6e |EXX . 19|93 A.Pon|
|00000060| 7a 69 6f 0a 23 23 0a 40 | 4e 6f 64 65 20 4d 61 69 |zio.##.@|Node Mai|
|00000070| 6e 20 22 74 65 72 6d 63 | 61 70 22 0a 0a 28 49 6e |n "termc|ap"..(In|
|00000080| 64 69 72 65 63 74 29 0a | 20 40 7b 22 20 54 6f 70 |direct).| @{" Top|
|00000090| 20 22 20 4c 69 6e 6b 20 | 22 54 6f 70 22 7d 0a 20 | " Link |"Top"}. |
|000000a0| 40 7b 22 20 49 6e 74 72 | 6f 64 75 63 74 69 6f 6e |@{" Intr|oduction|
|000000b0| 20 22 20 4c 69 6e 6b 20 | 22 49 6e 74 72 6f 64 75 | " Link |"Introdu|
|000000c0| 63 74 69 6f 6e 22 7d 0a | 20 40 7b 22 20 4c 69 62 |ction"}.| @{" Lib|
|000000d0| 72 61 72 79 20 22 20 4c | 69 6e 6b 20 22 4c 69 62 |rary " L|ink "Lib|
|000000e0| 72 61 72 79 22 7d 0a 20 | 40 7b 22 20 50 72 65 70 |rary"}. |@{" Prep|
|000000f0| 61 72 61 74 69 6f 6e 20 | 22 20 4c 69 6e 6b 20 22 |aration |" Link "|
|00000100| 50 72 65 70 61 72 61 74 | 69 6f 6e 22 7d 0a 20 40 |Preparat|ion"}. @|
|00000110| 7b 22 20 46 69 6e 64 20 | 22 20 4c 69 6e 6b 20 22 |{" Find |" Link "|
|00000120| 46 69 6e 64 22 7d 0a 20 | 40 7b 22 20 49 6e 74 65 |Find"}. |@{" Inte|
|00000130| 72 72 6f 67 61 74 65 20 | 22 20 4c 69 6e 6b 20 22 |rrogate |" Link "|
|00000140| 49 6e 74 65 72 72 6f 67 | 61 74 65 22 7d 0a 20 40 |Interrog|ate"}. @|
|00000150| 7b 22 20 49 6e 69 74 69 | 61 6c 69 7a 65 20 22 20 |{" Initi|alize " |
|00000160| 4c 69 6e 6b 20 22 49 6e | 69 74 69 61 6c 69 7a 65 |Link "In|itialize|
|00000170| 22 7d 0a 20 40 7b 22 20 | 50 61 64 64 69 6e 67 20 |"}. @{" |Padding |
|00000180| 22 20 4c 69 6e 6b 20 22 | 50 61 64 64 69 6e 67 22 |" Link "|Padding"|
|00000190| 7d 0a 20 40 7b 22 20 57 | 68 79 20 50 61 64 20 22 |}. @{" W|hy Pad "|
|000001a0| 20 4c 69 6e 6b 20 22 57 | 68 79 20 50 61 64 22 7d | Link "W|hy Pad"}|
|000001b0| 0a 20 40 7b 22 20 4e 6f | 74 20 45 6e 6f 75 67 68 |. @{" No|t Enough|
|000001c0| 20 22 20 4c 69 6e 6b 20 | 22 4e 6f 74 20 45 6e 6f | " Link |"Not Eno|
|000001d0| 75 67 68 22 7d 0a 20 40 | 7b 22 20 44 65 73 63 72 |ugh"}. @|{" Descr|
|000001e0| 69 62 65 20 50 61 64 64 | 69 6e 67 20 22 20 4c 69 |ibe Padd|ing " Li|
|000001f0| 6e 6b 20 22 44 65 73 63 | 72 69 62 65 20 50 61 64 |nk "Desc|ribe Pad|
|00000200| 64 69 6e 67 22 7d 0a 20 | 40 7b 22 20 4f 75 74 70 |ding"}. |@{" Outp|
|00000210| 75 74 20 50 61 64 64 69 | 6e 67 20 22 20 4c 69 6e |ut Paddi|ng " Lin|
|00000220| 6b 20 22 4f 75 74 70 75 | 74 20 50 61 64 64 69 6e |k "Outpu|t Paddin|
|00000230| 67 22 7d 0a 20 40 7b 22 | 20 50 61 72 61 6d 65 74 |g"}. @{"| Paramet|
|00000240| 65 72 73 20 22 20 4c 69 | 6e 6b 20 22 50 61 72 61 |ers " Li|nk "Para|
|00000250| 6d 65 74 65 72 73 22 7d | 0a 20 40 7b 22 20 45 6e |meters"}|. @{" En|
|00000260| 63 6f 64 65 20 50 61 72 | 61 6d 65 74 65 72 73 20 |code Par|ameters |
|00000270| 22 20 4c 69 6e 6b 20 22 | 45 6e 63 6f 64 65 20 50 |" Link "|Encode P|
|00000280| 61 72 61 6d 65 74 65 72 | 73 22 7d 0a 20 40 7b 22 |arameter|s"}. @{"|
|00000290| 20 55 73 69 6e 67 20 50 | 61 72 61 6d 65 74 65 72 | Using P|arameter|
|000002a0| 73 20 22 20 4c 69 6e 6b | 20 22 55 73 69 6e 67 20 |s " Link| "Using |
|000002b0| 50 61 72 61 6d 65 74 65 | 72 73 22 7d 0a 20 40 7b |Paramete|rs"}. @{|
|000002c0| 22 20 74 70 61 72 61 6d | 20 22 20 4c 69 6e 6b 20 |" tparam| " Link |
|000002d0| 22 74 70 61 72 61 6d 22 | 7d 0a 20 40 7b 22 20 74 |"tparam"|}. @{" t|
|000002e0| 67 6f 74 6f 20 22 20 4c | 69 6e 6b 20 22 74 67 6f |goto " L|ink "tgo|
|000002f0| 74 6f 22 7d 0a 20 40 7b | 22 20 44 61 74 61 20 42 |to"}. @{|" Data B|
|00000300| 61 73 65 20 22 20 4c 69 | 6e 6b 20 22 44 61 74 61 |ase " Li|nk "Data|
|00000310| 20 42 61 73 65 22 7d 0a | 20 40 7b 22 20 46 6f 72 | Base"}.| @{" For|
|00000320| 6d 61 74 20 22 20 4c 69 | 6e 6b 20 22 46 6f 72 6d |mat " Li|nk "Form|
|00000330| 61 74 22 7d 0a 20 40 7b | 22 20 43 61 70 61 62 69 |at"}. @{|" Capabi|
|00000340| 6c 69 74 79 20 46 6f 72 | 6d 61 74 20 22 20 4c 69 |lity For|mat " Li|
|00000350| 6e 6b 20 22 43 61 70 61 | 62 69 6c 69 74 79 20 46 |nk "Capa|bility F|
|00000360| 6f 72 6d 61 74 22 7d 0a | 20 40 7b 22 20 4e 61 6d |ormat"}.| @{" Nam|
|00000370| 69 6e 67 20 22 20 4c 69 | 6e 6b 20 22 4e 61 6d 69 |ing " Li|nk "Nami|
|00000380| 6e 67 22 7d 0a 20 40 7b | 22 20 49 6e 68 65 72 69 |ng"}. @{|" Inheri|
|00000390| 74 69 6e 67 20 22 20 4c | 69 6e 6b 20 22 49 6e 68 |ting " L|ink "Inh|
|000003a0| 65 72 69 74 69 6e 67 22 | 7d 0a 20 40 7b 22 20 43 |eriting"|}. @{" C|
|000003b0| 68 61 6e 67 69 6e 67 20 | 22 20 4c 69 6e 6b 20 22 |hanging |" Link "|
|000003c0| 43 68 61 6e 67 69 6e 67 | 22 7d 0a 20 40 7b 22 20 |Changing|"}. @{" |
|000003d0| 43 61 70 61 62 69 6c 69 | 74 69 65 73 20 22 20 4c |Capabili|ties " L|
|000003e0| 69 6e 6b 20 22 43 61 70 | 61 62 69 6c 69 74 69 65 |ink "Cap|abilitie|
|000003f0| 73 22 7d 0a 20 40 7b 22 | 20 42 61 73 69 63 20 22 |s"}. @{"| Basic "|
|00000400| 20 4c 69 6e 6b 20 22 42 | 61 73 69 63 22 7d 0a 20 | Link "B|asic"}. |
|00000410| 40 7b 22 20 53 63 72 65 | 65 6e 20 53 69 7a 65 20 |@{" Scre|en Size |
|00000420| 22 20 4c 69 6e 6b 20 22 | 53 63 72 65 65 6e 20 53 |" Link "|Screen S|
|00000430| 69 7a 65 22 7d 0a 20 40 | 7b 22 20 43 75 72 73 6f |ize"}. @|{" Curso|
|00000440| 72 20 4d 6f 74 69 6f 6e | 20 22 20 4c 69 6e 6b 20 |r Motion| " Link |
|00000450| 22 43 75 72 73 6f 72 20 | 4d 6f 74 69 6f 6e 22 7d |"Cursor |Motion"}|
|00000460| 0a 20 40 7b 22 20 57 72 | 61 70 70 69 6e 67 20 22 |. @{" Wr|apping "|
|00000470| 20 4c 69 6e 6b 20 22 57 | 72 61 70 70 69 6e 67 22 | Link "W|rapping"|
|00000480| 7d 0a 20 40 7b 22 20 53 | 63 72 6f 6c 6c 69 6e 67 |}. @{" S|crolling|
|00000490| 20 22 20 4c 69 6e 6b 20 | 22 53 63 72 6f 6c 6c 69 | " Link |"Scrolli|
|000004a0| 6e 67 22 7d 0a 20 40 7b | 22 20 57 69 6e 64 6f 77 |ng"}. @{|" Window|
|000004b0| 73 20 22 20 4c 69 6e 6b | 20 22 57 69 6e 64 6f 77 |s " Link| "Window|
|000004c0| 73 22 7d 0a 20 40 7b 22 | 20 43 6c 65 61 72 69 6e |s"}. @{"| Clearin|
|000004d0| 67 20 22 20 4c 69 6e 6b | 20 22 43 6c 65 61 72 69 |g " Link| "Cleari|
|000004e0| 6e 67 22 7d 0a 20 40 7b | 22 20 49 6e 73 64 65 6c |ng"}. @{|" Insdel|
|000004f0| 20 4c 69 6e 65 20 22 20 | 4c 69 6e 6b 20 22 49 6e | Line " |Link "In|
|00000500| 73 64 65 6c 20 4c 69 6e | 65 22 7d 0a 20 40 7b 22 |sdel Lin|e"}. @{"|
|00000510| 20 49 6e 73 64 65 6c 20 | 43 68 61 72 20 22 20 4c | Insdel |Char " L|
|00000520| 69 6e 6b 20 22 49 6e 73 | 64 65 6c 20 43 68 61 72 |ink "Ins|del Char|
|00000530| 22 7d 0a 20 40 7b 22 20 | 53 74 61 6e 64 6f 75 74 |"}. @{" |Standout|
|00000540| 20 22 20 4c 69 6e 6b 20 | 22 53 74 61 6e 64 6f 75 | " Link |"Standou|
|00000550| 74 22 7d 0a 20 40 7b 22 | 20 55 6e 64 65 72 6c 69 |t"}. @{"| Underli|
|00000560| 6e 69 6e 67 20 22 20 4c | 69 6e 6b 20 22 55 6e 64 |ning " L|ink "Und|
|00000570| 65 72 6c 69 6e 69 6e 67 | 22 7d 0a 20 40 7b 22 20 |erlining|"}. @{" |
|00000580| 43 75 72 73 6f 72 20 56 | 69 73 69 62 69 6c 69 74 |Cursor V|isibilit|
|00000590| 79 20 22 20 4c 69 6e 6b | 20 22 43 75 72 73 6f 72 |y " Link| "Cursor|
|000005a0| 20 56 69 73 69 62 69 6c | 69 74 79 22 7d 0a 20 40 | Visibil|ity"}. @|
|000005b0| 7b 22 20 42 65 6c 6c 20 | 22 20 4c 69 6e 6b 20 22 |{" Bell |" Link "|
|000005c0| 42 65 6c 6c 22 7d 0a 20 | 40 7b 22 20 4b 65 79 70 |Bell"}. |@{" Keyp|
|000005d0| 61 64 20 22 20 4c 69 6e | 6b 20 22 4b 65 79 70 61 |ad " Lin|k "Keypa|
|000005e0| 64 22 7d 0a 20 40 7b 22 | 20 4d 65 74 61 20 4b 65 |d"}. @{"| Meta Ke|
|000005f0| 79 20 22 20 4c 69 6e 6b | 20 22 4d 65 74 61 20 4b |y " Link| "Meta K|
|00000600| 65 79 22 7d 0a 20 40 7b | 22 20 49 6e 69 74 69 61 |ey"}. @{|" Initia|
|00000610| 6c 69 7a 61 74 69 6f 6e | 20 22 20 4c 69 6e 6b 20 |lization| " Link |
|00000620| 22 49 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 22 |"Initial|ization"|
|00000630| 7d 0a 20 40 7b 22 20 50 | 61 64 20 53 70 65 63 73 |}. @{" P|ad Specs|
|00000640| 20 22 20 4c 69 6e 6b 20 | 22 50 61 64 20 53 70 65 | " Link |"Pad Spe|
|00000650| 63 73 22 7d 0a 20 40 7b | 22 20 53 74 61 74 75 73 |cs"}. @{|" Status|
|00000660| 20 4c 69 6e 65 20 22 20 | 4c 69 6e 6b 20 22 53 74 | Line " |Link "St|
|00000670| 61 74 75 73 20 4c 69 6e | 65 22 7d 0a 20 40 7b 22 |atus Lin|e"}. @{"|
|00000680| 20 48 61 6c 66 2d 4c 69 | 6e 65 20 22 20 4c 69 6e | Half-Li|ne " Lin|
|00000690| 6b 20 22 48 61 6c 66 2d | 4c 69 6e 65 22 7d 0a 20 |k "Half-|Line"}. |
|000006a0| 40 7b 22 20 50 72 69 6e | 74 65 72 20 22 20 4c 69 |@{" Prin|ter " Li|
|000006b0| 6e 6b 20 22 50 72 69 6e | 74 65 72 22 7d 0a 20 40 |nk "Prin|ter"}. @|
|000006c0| 7b 22 20 53 75 6d 6d 61 | 72 79 20 22 20 4c 69 6e |{" Summa|ry " Lin|
|000006d0| 6b 20 22 53 75 6d 6d 61 | 72 79 22 7d 0a 20 40 7b |k "Summa|ry"}. @{|
|000006e0| 22 20 56 61 72 20 49 6e | 64 65 78 20 22 20 4c 69 |" Var In|dex " Li|
|000006f0| 6e 6b 20 22 56 61 72 20 | 49 6e 64 65 78 22 7d 0a |nk "Var |Index"}.|
|00000700| 20 40 7b 22 20 43 61 70 | 20 49 6e 64 65 78 20 22 | @{" Cap| Index "|
|00000710| 20 4c 69 6e 6b 20 22 43 | 61 70 20 49 6e 64 65 78 | Link "C|ap Index|
|00000720| 22 7d 0a 20 40 7b 22 20 | 49 6e 64 65 78 20 22 20 |"}. @{" |Index " |
|00000730| 4c 69 6e 6b 20 22 49 6e | 64 65 78 22 7d 0a 40 45 |Link "In|dex"}.@E|
|00000740| 6e 64 4e 6f 64 65 20 22 | 4d 61 69 6e 22 0a 0a 40 |ndNode "|Main"..@|
|00000750| 4e 6f 64 65 20 22 54 6f | 70 22 20 22 54 6f 70 22 |Node "To|p" "Top"|
|00000760| 0a 40 4e 65 78 74 20 22 | 49 6e 74 72 6f 64 75 63 |.@Next "|Introduc|
|00000770| 74 69 6f 6e 22 20 22 49 | 6e 74 72 6f 64 75 63 74 |tion" "I|ntroduct|
|00000780| 69 6f 6e 22 0a 40 50 72 | 65 76 20 22 22 20 22 22 |ion".@Pr|ev "" ""|
|00000790| 0a 40 54 6f 63 20 22 22 | 20 22 22 0a 0a 3e 3e 20 |.@Toc ""| ""..>> |
|000007a0| 47 6f 20 42 61 63 6b 20 | 74 6f 20 40 7b 22 47 63 |Go Back |to @{"Gc|
|000007b0| 63 47 75 69 64 65 22 20 | 4c 69 6e 6b 20 22 67 63 |cGuide" |Link "gc|
|000007c0| 63 3a 67 63 63 67 75 69 | 64 65 2f 4d 61 69 6e 22 |c:gccgui|de/Main"|
|000007d0| 20 30 7d 2e 20 3c 3c 0a | 0a 2a 20 4d 65 6e 75 3a | 0}. <<.|.* Menu:|
|000007e0| 0a 0a 2a 20 40 7b 22 49 | 6e 74 72 6f 64 75 63 74 |..* @{"I|ntroduct|
|000007f0| 69 6f 6e 22 20 4c 69 6e | 6b 20 22 49 6e 74 72 6f |ion" Lin|k "Intro|
|00000800| 64 75 63 74 69 6f 6e 22 | 7d 20 20 20 57 68 61 74 |duction"|} What|
|00000810| 20 69 73 20 74 65 72 6d | 63 61 70 3f 20 20 57 68 | is term|cap? Wh|
|00000820| 79 20 74 68 69 73 20 6d | 61 6e 75 61 6c 3f 0a 2a |y this m|anual?.*|
|00000830| 20 40 7b 22 4c 69 62 72 | 61 72 79 22 20 4c 69 6e | @{"Libr|ary" Lin|
|00000840| 6b 20 22 4c 69 62 72 61 | 72 79 22 7d 20 20 20 20 |k "Libra|ry"} |
|00000850| 20 20 54 68 65 20 74 65 | 72 6d 63 61 70 20 6c 69 | The te|rmcap li|
|00000860| 62 72 61 72 79 20 66 75 | 6e 63 74 69 6f 6e 73 2e |brary fu|nctions.|
|00000870| 0a 2a 20 40 7b 22 44 61 | 74 61 20 42 61 73 65 22 |.* @{"Da|ta Base"|
|00000880| 20 4c 69 6e 6b 20 22 44 | 61 74 61 20 42 61 73 65 | Link "D|ata Base|
|00000890| 22 7d 20 20 20 20 57 68 | 61 74 20 74 65 72 6d 69 |"} Wh|at termi|
|000008a0| 6e 61 6c 20 64 65 73 63 | 72 69 70 74 69 6f 6e 73 |nal desc|riptions|
|000008b0| 20 69 6e 20 60 2f 65 74 | 63 2f 74 65 72 6d 63 61 | in `/et|c/termca|
|000008c0| 70 27 20 6c 6f 6f 6b 20 | 6c 69 6b 65 2e 0a 2a 20 |p' look |like..* |
|000008d0| 40 7b 22 43 61 70 61 62 | 69 6c 69 74 69 65 73 22 |@{"Capab|ilities"|
|000008e0| 20 4c 69 6e 6b 20 22 43 | 61 70 61 62 69 6c 69 74 | Link "C|apabilit|
|000008f0| 69 65 73 22 7d 20 20 20 | 44 65 66 69 6e 69 74 69 |ies"} |Definiti|
|00000900| 6f 6e 73 20 6f 66 20 74 | 68 65 20 69 6e 64 69 76 |ons of t|he indiv|
|00000910| 69 64 75 61 6c 20 74 65 | 72 6d 69 6e 61 6c 20 63 |idual te|rminal c|
|00000920| 61 70 61 62 69 6c 69 74 | 69 65 73 3a 0a 20 20 20 |apabilit|ies:. |
|00000930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 68 6f | | ho|
|00000940| 77 20 74 6f 20 77 72 69 | 74 65 20 74 68 65 6d 20 |w to wri|te them |
|00000950| 69 6e 20 64 65 73 63 72 | 69 70 74 69 6f 6e 73 2c |in descr|iptions,|
|00000960| 20 61 6e 64 20 68 6f 77 | 20 74 6f 20 75 73 65 0a | and how| to use.|
|00000970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000980| 20 74 68 65 69 72 20 76 | 61 6c 75 65 73 20 74 6f | their v|alues to|
|00000990| 20 64 6f 20 64 69 73 70 | 6c 61 79 20 75 70 64 61 | do disp|lay upda|
|000009a0| 74 69 6e 67 2e 0a 2a 20 | 40 7b 22 53 75 6d 6d 61 |ting..* |@{"Summa|
|000009b0| 72 79 22 20 4c 69 6e 6b | 20 22 53 75 6d 6d 61 72 |ry" Link| "Summar|
|000009c0| 79 22 7d 20 20 20 20 20 | 20 42 72 69 65 66 20 74 |y"} | Brief t|
|000009d0| 61 62 6c 65 20 6f 66 20 | 63 61 70 61 62 69 6c 69 |able of |capabili|
|000009e0| 74 79 20 6e 61 6d 65 73 | 20 61 6e 64 20 74 68 65 |ty names| and the|
|000009f0| 69 72 20 6d 65 61 6e 69 | 6e 67 73 2e 0a 2a 20 40 |ir meani|ngs..* @|
|00000a00| 7b 22 56 61 72 20 49 6e | 64 65 78 22 20 4c 69 6e |{"Var In|dex" Lin|
|00000a10| 6b 20 22 56 61 72 20 49 | 6e 64 65 78 22 7d 20 20 |k "Var I|ndex"} |
|00000a20| 20 20 49 6e 64 65 78 20 | 6f 66 20 43 20 66 75 6e | Index |of C fun|
|00000a30| 63 74 69 6f 6e 73 20 61 | 6e 64 20 76 61 72 69 61 |ctions a|nd varia|
|00000a40| 62 6c 65 73 2e 0a 2a 20 | 40 7b 22 43 61 70 20 49 |bles..* |@{"Cap I|
|00000a50| 6e 64 65 78 22 20 4c 69 | 6e 6b 20 22 43 61 70 20 |ndex" Li|nk "Cap |
|00000a60| 49 6e 64 65 78 22 7d 20 | 20 20 20 49 6e 64 65 78 |Index"} | Index|
|00000a70| 20 6f 66 20 74 65 72 6d | 63 61 70 20 63 61 70 61 | of term|cap capa|
|00000a80| 62 69 6c 69 74 69 65 73 | 2e 0a 2a 20 40 7b 22 49 |bilities|..* @{"I|
|00000a90| 6e 64 65 78 22 20 4c 69 | 6e 6b 20 22 49 6e 64 65 |ndex" Li|nk "Inde|
|00000aa0| 78 22 7d 20 20 20 20 20 | 20 20 20 43 6f 6e 63 65 |x"} | Conce|
|00000ab0| 70 74 20 69 6e 64 65 78 | 2e 0a 0a 20 2d 2d 20 54 |pt index|... -- T|
|00000ac0| 68 65 20 44 65 74 61 69 | 6c 65 64 20 4e 6f 64 65 |he Detai|led Node|
|00000ad0| 20 4c 69 73 74 69 6e 67 | 20 2d 2d 0a 0a 54 68 65 | Listing| --..The|
|00000ae0| 20 54 65 72 6d 63 61 70 | 20 4c 69 62 72 61 72 79 | Termcap| Library|
|00000af0| 0a 0a 2a 20 40 7b 22 50 | 72 65 70 61 72 61 74 69 |..* @{"P|reparati|
|00000b00| 6f 6e 22 20 4c 69 6e 6b | 20 22 50 72 65 70 61 72 |on" Link| "Prepar|
|00000b10| 61 74 69 6f 6e 22 7d 20 | 20 20 50 72 65 70 61 72 |ation"} | Prepar|
|00000b20| 69 6e 67 20 74 6f 20 75 | 73 65 20 74 68 65 20 74 |ing to u|se the t|
|00000b30| 65 72 6d 63 61 70 20 6c | 69 62 72 61 72 79 2e 0a |ermcap l|ibrary..|
|00000b40| 2a 20 40 7b 22 46 69 6e | 64 22 20 4c 69 6e 6b 20 |* @{"Fin|d" Link |
|00000b50| 22 46 69 6e 64 22 7d 20 | 20 20 20 20 20 20 20 20 |"Find"} | |
|00000b60| 46 69 6e 64 69 6e 67 20 | 74 68 65 20 64 65 73 63 |Finding |the desc|
|00000b70| 72 69 70 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 74 |ription |of the t|
|00000b80| 65 72 6d 69 6e 61 6c 20 | 62 65 69 6e 67 20 75 73 |erminal |being us|
|00000b90| 65 64 2e 0a 2a 20 40 7b | 22 49 6e 74 65 72 72 6f |ed..* @{|"Interro|
|00000ba0| 67 61 74 65 22 20 4c 69 | 6e 6b 20 22 49 6e 74 65 |gate" Li|nk "Inte|
|00000bb0| 72 72 6f 67 61 74 65 22 | 7d 20 20 20 49 6e 74 65 |rrogate"|} Inte|
|00000bc0| 72 72 6f 67 61 74 69 6e | 67 20 74 68 65 20 64 65 |rrogatin|g the de|
|00000bd0| 73 63 72 69 70 74 69 6f | 6e 20 66 6f 72 20 70 61 |scriptio|n for pa|
|00000be0| 72 74 69 63 75 6c 61 72 | 20 63 61 70 61 62 69 6c |rticular| capabil|
|00000bf0| 69 74 69 65 73 2e 0a 2a | 20 40 7b 22 49 6e 69 74 |ities..*| @{"Init|
|00000c00| 69 61 6c 69 7a 65 22 20 | 4c 69 6e 6b 20 22 49 6e |ialize" |Link "In|
|00000c10| 69 74 69 61 6c 69 7a 65 | 22 7d 20 20 20 49 6e 69 |itialize|"} Ini|
|00000c20| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 20 66 6f 72 20 |tializat|ion for |
|00000c30| 6f 75 74 70 75 74 20 75 | 73 69 6e 67 20 74 65 72 |output u|sing ter|
|00000c40| 6d 63 61 70 2e 0a 2a 20 | 40 7b 22 50 61 64 64 69 |mcap..* |@{"Paddi|
|00000c50| 6e 67 22 20 4c 69 6e 6b | 20 22 50 61 64 64 69 6e |ng" Link| "Paddin|
|00000c60| 67 22 7d 20 20 20 20 20 | 20 4f 75 74 70 75 74 74 |g"} | Outputt|
|00000c70| 69 6e 67 20 70 61 64 64 | 69 6e 67 2e 0a 2a 20 40 |ing padd|ing..* @|
|00000c80| 7b 22 50 61 72 61 6d 65 | 74 65 72 73 22 20 4c 69 |{"Parame|ters" Li|
|00000c90| 6e 6b 20 22 50 61 72 61 | 6d 65 74 65 72 73 22 7d |nk "Para|meters"}|
|00000ca0| 20 20 20 45 6e 63 6f 64 | 69 6e 67 20 70 61 72 61 | Encod|ing para|
|00000cb0| 6d 65 74 65 72 73 20 73 | 75 63 68 20 61 73 20 63 |meters s|uch as c|
|00000cc0| 75 72 73 6f 72 20 70 6f | 73 69 74 69 6f 6e 73 2e |ursor po|sitions.|
|00000cd0| 0a 0a 50 61 64 64 69 6e | 67 0a 0a 2a 20 40 7b 22 |..Paddin|g..* @{"|
|00000ce0| 57 68 79 20 50 61 64 22 | 20 4c 69 6e 6b 20 22 57 |Why Pad"| Link "W|
|00000cf0| 68 79 20 50 61 64 22 7d | 20 20 20 20 20 20 45 78 |hy Pad"}| Ex|
|00000d00| 70 6c 61 6e 61 74 69 6f | 6e 20 6f 66 20 70 61 64 |planatio|n of pad|
|00000d10| 64 69 6e 67 2e 0a 2a 20 | 40 7b 22 4e 6f 74 20 45 |ding..* |@{"Not E|
|00000d20| 6e 6f 75 67 68 22 20 4c | 69 6e 6b 20 22 4e 6f 74 |nough" L|ink "Not|
|00000d30| 20 45 6e 6f 75 67 68 22 | 7d 20 20 20 57 68 65 6e | Enough"|} When|
|00000d40| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 74 20 65 6e | there i|s not en|
|00000d50| 6f 75 67 68 20 70 61 64 | 64 69 6e 67 2e 0a 2a 20 |ough pad|ding..* |
|00000d60| 40 7b 22 44 65 73 63 72 | 69 62 65 20 50 61 64 64 |@{"Descr|ibe Padd|
|00000d70| 69 6e 67 22 20 4c 69 6e | 6b 20 22 44 65 73 63 72 |ing" Lin|k "Descr|
|00000d80| 69 62 65 20 50 61 64 64 | 69 6e 67 22 7d 20 20 20 |ibe Padd|ing"} |
|00000d90| 54 68 65 20 64 61 74 61 | 20 62 61 73 65 20 73 61 |The data| base sa|
|00000da0| 79 73 20 68 6f 77 20 6d | 75 63 68 20 70 61 64 64 |ys how m|uch padd|
|00000db0| 69 6e 67 20 61 20 74 65 | 72 6d 69 6e 61 6c 20 6e |ing a te|rminal n|
|00000dc0| 65 65 64 73 2e 0a 2a 20 | 40 7b 22 4f 75 74 70 75 |eeds..* |@{"Outpu|
|00000dd0| 74 20 50 61 64 64 69 6e | 67 22 20 4c 69 6e 6b 20 |t Paddin|g" Link |
|00000de0| 22 4f 75 74 70 75 74 20 | 50 61 64 64 69 6e 67 22 |"Output |Padding"|
|00000df0| 7d 20 20 20 20 20 55 73 | 69 6e 67 20 60 74 70 75 |} Us|ing `tpu|
|00000e00| 74 73 27 20 74 6f 20 6f | 75 74 70 75 74 20 74 68 |ts' to o|utput th|
|00000e10| 65 20 6e 65 65 64 65 64 | 20 70 61 64 64 69 6e 67 |e needed| padding|
|00000e20| 2e 0a 0a 46 69 6c 6c 69 | 6e 67 20 49 6e 20 50 61 |...Filli|ng In Pa|
|00000e30| 72 61 6d 65 74 65 72 73 | 0a 0a 2a 20 40 7b 22 45 |rameters|..* @{"E|
|00000e40| 6e 63 6f 64 65 20 50 61 | 72 61 6d 65 74 65 72 73 |ncode Pa|rameters|
|00000e50| 22 20 4c 69 6e 6b 20 22 | 45 6e 63 6f 64 65 20 50 |" Link "|Encode P|
|00000e60| 61 72 61 6d 65 74 65 72 | 73 22 7d 20 20 20 54 68 |arameter|s"} Th|
|00000e70| 65 20 6c 61 6e 67 75 61 | 67 65 20 66 6f 72 20 65 |e langua|ge for e|
|00000e80| 6e 63 6f 64 69 6e 67 20 | 70 61 72 61 6d 65 74 65 |ncoding |paramete|
|00000e90| 72 73 2e 0a 2a 20 40 7b | 22 55 73 69 6e 67 20 50 |rs..* @{|"Using P|
|00000ea0| 61 72 61 6d 65 74 65 72 | 73 22 20 4c 69 6e 6b 20 |arameter|s" Link |
|00000eb0| 22 55 73 69 6e 67 20 50 | 61 72 61 6d 65 74 65 72 |"Using P|arameter|
|00000ec0| 73 22 7d 20 20 20 20 4f | 75 74 70 75 74 74 69 6e |s"} O|utputtin|
|00000ed0| 67 20 61 20 73 74 72 69 | 6e 67 20 63 6f 6d 6d 61 |g a stri|ng comma|
|00000ee0| 6e 64 20 77 69 74 68 20 | 70 61 72 61 6d 65 74 65 |nd with |paramete|
|00000ef0| 72 73 2e 0a 0a 53 65 6e | 64 69 6e 67 20 44 69 73 |rs...Sen|ding Dis|
|00000f00| 70 6c 61 79 20 43 6f 6d | 6d 61 6e 64 73 20 77 69 |play Com|mands wi|
|00000f10| 74 68 20 50 61 72 61 6d | 65 74 65 72 73 0a 0a 2a |th Param|eters..*|
|00000f20| 20 40 7b 22 74 70 61 72 | 61 6d 22 20 4c 69 6e 6b | @{"tpar|am" Link|
|00000f30| 20 22 74 70 61 72 61 6d | 22 7d 20 20 20 20 20 20 | "tparam|"} |
|00000f40| 20 54 68 65 20 67 65 6e | 65 72 61 6c 20 63 61 73 | The gen|eral cas|
|00000f50| 65 2c 20 66 6f 72 20 47 | 4e 55 20 74 65 72 6d 63 |e, for G|NU termc|
|00000f60| 61 70 20 6f 6e 6c 79 2e | 0a 2a 20 40 7b 22 74 67 |ap only.|.* @{"tg|
|00000f70| 6f 74 6f 22 20 4c 69 6e | 6b 20 22 74 67 6f 74 6f |oto" Lin|k "tgoto|
|00000f80| 22 7d 20 20 20 20 20 20 | 20 20 54 68 65 20 73 70 |"} | The sp|
|00000f90| 65 63 69 61 6c 20 63 61 | 73 65 20 6f 66 20 63 75 |ecial ca|se of cu|
|00000fa0| 72 73 6f 72 20 6d 6f 74 | 69 6f 6e 2e 0a 0a 54 68 |rsor mot|ion...Th|
|00000fb0| 65 20 46 6f 72 6d 61 74 | 20 6f 66 20 74 68 65 20 |e Format| of the |
|00000fc0| 44 61 74 61 20 42 61 73 | 65 0a 0a 2a 20 40 7b 22 |Data Bas|e..* @{"|
|00000fd0| 46 6f 72 6d 61 74 22 20 | 4c 69 6e 6b 20 22 46 6f |Format" |Link "Fo|
|00000fe0| 72 6d 61 74 22 7d 20 20 | 20 20 20 20 20 4f 76 65 |rmat"} | Ove|
|00000ff0| 72 61 6c 6c 20 66 6f 72 | 6d 61 74 20 6f 66 20 61 |rall for|mat of a|
|00001000| 20 74 65 72 6d 69 6e 61 | 6c 20 64 65 73 63 72 69 | termina|l descri|
|00001010| 70 74 69 6f 6e 2e 0a 2a | 20 40 7b 22 43 61 70 61 |ption..*| @{"Capa|
|00001020| 62 69 6c 69 74 79 20 46 | 6f 72 6d 61 74 22 20 4c |bility F|ormat" L|
|00001030| 69 6e 6b 20 22 43 61 70 | 61 62 69 6c 69 74 79 20 |ink "Cap|ability |
|00001040| 46 6f 72 6d 61 74 22 7d | 20 20 20 46 6f 72 6d 61 |Format"}| Forma|
|00001050| 74 20 6f 66 20 63 61 70 | 61 62 69 6c 69 74 69 65 |t of cap|abilitie|
|00001060| 73 20 77 69 74 68 69 6e | 20 61 20 64 65 73 63 72 |s within| a descr|
|00001070| 69 70 74 69 6f 6e 2e 0a | 2a 20 40 7b 22 4e 61 6d |iption..|* @{"Nam|
|00001080| 69 6e 67 22 20 4c 69 6e | 6b 20 22 4e 61 6d 69 6e |ing" Lin|k "Namin|
|00001090| 67 22 7d 20 20 20 20 20 | 20 20 4e 61 6d 69 6e 67 |g"} | Naming|
|000010a0| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 73 20 66 6f 72 | convent|ions for|
|000010b0| 20 74 65 72 6d 69 6e 61 | 6c 20 74 79 70 65 73 2e | termina|l types.|
|000010c0| 0a 2a 20 40 7b 22 49 6e | 68 65 72 69 74 69 6e 67 |.* @{"In|heriting|
|000010d0| 22 20 4c 69 6e 6b 20 22 | 49 6e 68 65 72 69 74 69 |" Link "|Inheriti|
|000010e0| 6e 67 22 7d 20 20 20 49 | 6e 68 65 72 69 74 69 6e |ng"} I|nheritin|
|000010f0| 67 20 70 61 72 74 20 6f | 66 20 61 20 64 65 73 63 |g part o|f a desc|
|00001100| 72 69 70 74 69 6f 6e 20 | 66 72 6f 6d 0a 20 20 20 |ription |from. |
|00001110| 20 20 20 20 20 20 20 20 | 20 20 61 20 72 65 6c 61 | | a rela|
|00001120| 74 65 64 20 74 65 72 6d | 69 6e 61 6c 20 74 79 70 |ted term|inal typ|
|00001130| 65 2e 0a 2a 20 40 7b 22 | 43 68 61 6e 67 69 6e 67 |e..* @{"|Changing|
|00001140| 22 20 4c 69 6e 6b 20 22 | 43 68 61 6e 67 69 6e 67 |" Link "|Changing|
|00001150| 22 7d 20 20 20 20 20 57 | 68 65 6e 20 63 68 61 6e |"} W|hen chan|
|00001160| 67 65 73 20 69 6e 20 74 | 68 65 20 64 61 74 61 20 |ges in t|he data |
|00001170| 62 61 73 65 20 74 61 6b | 65 20 65 66 66 65 63 74 |base tak|e effect|
|00001180| 2e 0a 0a 44 65 66 69 6e | 69 74 69 6f 6e 73 20 6f |...Defin|itions o|
|00001190| 66 20 74 68 65 20 54 65 | 72 6d 69 6e 61 6c 20 43 |f the Te|rminal C|
|000011a0| 61 70 61 62 69 6c 69 74 | 69 65 73 0a 0a 2a 20 40 |apabilit|ies..* @|
|000011b0| 7b 22 42 61 73 69 63 22 | 20 4c 69 6e 6b 20 22 42 |{"Basic"| Link "B|
|000011c0| 61 73 69 63 22 7d 20 20 | 20 20 20 20 20 20 42 61 |asic"} | Ba|
|000011d0| 73 69 63 20 63 68 61 72 | 61 63 74 65 72 69 73 74 |sic char|acterist|
|000011e0| 69 63 73 2e 0a 2a 20 40 | 7b 22 53 63 72 65 65 6e |ics..* @|{"Screen|
|000011f0| 20 53 69 7a 65 22 20 4c | 69 6e 6b 20 22 53 63 72 | Size" L|ink "Scr|
|00001200| 65 65 6e 20 53 69 7a 65 | 22 7d 20 20 20 53 63 72 |een Size|"} Scr|
|00001210| 65 65 6e 20 73 69 7a 65 | 2c 20 61 6e 64 20 77 68 |een size|, and wh|
|00001220| 61 74 20 68 61 70 70 65 | 6e 73 20 77 68 65 6e 20 |at happe|ns when |
|00001230| 69 74 20 63 68 61 6e 67 | 65 73 2e 0a 2a 20 40 7b |it chang|es..* @{|
|00001240| 22 43 75 72 73 6f 72 20 | 4d 6f 74 69 6f 6e 22 20 |"Cursor |Motion" |
|00001250| 4c 69 6e 6b 20 22 43 75 | 72 73 6f 72 20 4d 6f 74 |Link "Cu|rsor Mot|
|00001260| 69 6f 6e 22 7d 20 20 20 | 56 61 72 69 6f 75 73 20 |ion"} |Various |
|00001270| 77 61 79 73 20 74 6f 20 | 6d 6f 76 65 20 74 68 65 |ways to |move the|
|00001280| 20 63 75 72 73 6f 72 2e | 0a 2a 20 40 7b 22 57 72 | cursor.|.* @{"Wr|
|00001290| 61 70 70 69 6e 67 22 20 | 4c 69 6e 6b 20 22 57 72 |apping" |Link "Wr|
|000012a0| 61 70 70 69 6e 67 22 7d | 20 20 20 20 20 57 68 61 |apping"}| Wha|
|000012b0| 74 20 68 61 70 70 65 6e | 73 20 69 66 20 79 6f 75 |t happen|s if you|
|000012c0| 20 77 72 69 74 65 20 61 | 20 63 68 61 72 61 63 74 | write a| charact|
|000012d0| 65 72 20 69 6e 20 74 68 | 65 20 6c 61 73 74 20 63 |er in th|e last c|
|000012e0| 6f 6c 75 6d 6e 2e 0a 2a | 20 40 7b 22 53 63 72 6f |olumn..*| @{"Scro|
|000012f0| 6c 6c 69 6e 67 22 20 4c | 69 6e 6b 20 22 53 63 72 |lling" L|ink "Scr|
|00001300| 6f 6c 6c 69 6e 67 22 7d | 20 20 20 20 50 75 73 68 |olling"}| Push|
|00001310| 69 6e 67 20 74 65 78 74 | 20 75 70 20 61 6e 64 20 |ing text| up and |
|00001320| 64 6f 77 6e 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |down on |the scre|
|00001330| 65 6e 2e 0a 2a 20 40 7b | 22 57 69 6e 64 6f 77 73 |en..* @{|"Windows|
|00001340| 22 20 4c 69 6e 6b 20 22 | 57 69 6e 64 6f 77 73 22 |" Link "|Windows"|
|00001350| 7d 20 20 20 20 20 20 4c | 69 6d 69 74 69 6e 67 20 |} L|imiting |
|00001360| 74 68 65 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 |the part| of the |
|00001370| 77 69 6e 64 6f 77 20 74 | 68 61 74 20 6f 75 74 70 |window t|hat outp|
|00001380| 75 74 20 61 66 66 65 63 | 74 73 2e 0a 2a 20 40 7b |ut affec|ts..* @{|
|00001390| 22 43 6c 65 61 72 69 6e | 67 22 20 4c 69 6e 6b 20 |"Clearin|g" Link |
|000013a0| 22 43 6c 65 61 72 69 6e | 67 22 7d 20 20 20 20 20 |"Clearin|g"} |
|000013b0| 45 72 61 73 69 6e 67 20 | 6f 6e 65 20 6f 72 20 6d |Erasing |one or m|
|000013c0| 61 6e 79 20 6c 69 6e 65 | 73 2e 0a 2a 20 40 7b 22 |any line|s..* @{"|
|000013d0| 49 6e 73 64 65 6c 20 4c | 69 6e 65 22 20 4c 69 6e |Insdel L|ine" Lin|
|000013e0| 6b 20 22 49 6e 73 64 65 | 6c 20 4c 69 6e 65 22 7d |k "Insde|l Line"}|
|000013f0| 20 20 20 4d 61 6b 69 6e | 67 20 6e 65 77 20 62 6c | Makin|g new bl|
|00001400| 61 6e 6b 20 6c 69 6e 65 | 73 20 69 6e 20 6d 69 64 |ank line|s in mid|
|00001410| 2d 73 63 72 65 65 6e 3b | 20 64 65 6c 65 74 69 6e |-screen;| deletin|
|00001420| 67 20 6c 69 6e 65 73 2e | 0a 2a 20 40 7b 22 49 6e |g lines.|.* @{"In|
|00001430| 73 64 65 6c 20 43 68 61 | 72 22 20 4c 69 6e 6b 20 |sdel Cha|r" Link |
|00001440| 22 49 6e 73 64 65 6c 20 | 43 68 61 72 22 7d 20 20 |"Insdel |Char"} |
|00001450| 20 49 6e 73 65 72 74 69 | 6e 67 20 61 6e 64 20 64 | Inserti|ng and d|
|00001460| 65 6c 65 74 69 6e 67 20 | 63 68 61 72 61 63 74 65 |eleting |characte|
|00001470| 72 73 20 77 69 74 68 69 | 6e 20 61 20 6c 69 6e 65 |rs withi|n a line|
|00001480| 2e 0a 2a 20 40 7b 22 53 | 74 61 6e 64 6f 75 74 22 |..* @{"S|tandout"|
|00001490| 20 4c 69 6e 6b 20 22 53 | 74 61 6e 64 6f 75 74 22 | Link "S|tandout"|
|000014a0| 7d 20 20 20 20 20 48 69 | 67 68 6c 69 67 68 74 69 |} Hi|ghlighti|
|000014b0| 6e 67 20 73 6f 6d 65 20 | 6f 66 20 74 68 65 20 74 |ng some |of the t|
|000014c0| 65 78 74 2e 0a 2a 20 40 | 7b 22 55 6e 64 65 72 6c |ext..* @|{"Underl|
|000014d0| 69 6e 69 6e 67 22 20 4c | 69 6e 6b 20 22 55 6e 64 |ining" L|ink "Und|
|000014e0| 65 72 6c 69 6e 69 6e 67 | 22 7d 20 20 20 55 6e 64 |erlining|"} Und|
|000014f0| 65 72 6c 69 6e 69 6e 67 | 20 73 6f 6d 65 20 6f 66 |erlining| some of|
|00001500| 20 74 68 65 20 74 65 78 | 74 2e 0a 2a 20 40 7b 22 | the tex|t..* @{"|
|00001510| 43 75 72 73 6f 72 20 56 | 69 73 69 62 69 6c 69 74 |Cursor V|isibilit|
|00001520| 79 22 20 4c 69 6e 6b 20 | 22 43 75 72 73 6f 72 20 |y" Link |"Cursor |
|00001530| 56 69 73 69 62 69 6c 69 | 74 79 22 7d 20 20 20 4d |Visibili|ty"} M|
|00001540| 61 6b 69 6e 67 20 74 68 | 65 20 63 75 72 73 6f 72 |aking th|e cursor|
|00001550| 20 6d 6f 72 65 20 6f 72 | 20 6c 65 73 73 20 65 61 | more or| less ea|
|00001560| 73 79 20 74 6f 20 73 70 | 6f 74 2e 0a 2a 20 40 7b |sy to sp|ot..* @{|
|00001570| 22 42 65 6c 6c 22 20 4c | 69 6e 6b 20 22 42 65 6c |"Bell" L|ink "Bel|
|00001580| 6c 22 7d 20 20 20 20 20 | 20 20 20 20 41 74 74 72 |l"} | Attr|
|00001590| 61 63 74 73 20 75 73 65 | 72 27 73 20 61 74 74 65 |acts use|r's atte|
|000015a0| 6e 74 69 6f 6e 3b 20 6e | 6f 74 20 6c 6f 63 61 6c |ntion; n|ot local|
|000015b0| 69 7a 65 64 20 6f 6e 20 | 74 68 65 20 73 63 72 65 |ized on |the scre|
|000015c0| 65 6e 2e 0a 2a 20 40 7b | 22 4b 65 79 70 61 64 22 |en..* @{|"Keypad"|
|000015d0| 20 4c 69 6e 6b 20 22 4b | 65 79 70 61 64 22 7d 20 | Link "K|eypad"} |
|000015e0| 20 20 20 20 20 20 52 65 | 63 6f 67 6e 69 7a 69 6e | Re|cognizin|
|000015f0| 67 20 77 68 65 6e 20 66 | 75 6e 63 74 69 6f 6e 20 |g when f|unction |
|00001600| 6b 65 79 73 20 6f 72 20 | 61 72 72 6f 77 73 20 61 |keys or |arrows a|
|00001610| 72 65 20 74 79 70 65 64 | 2e 0a 2a 20 40 7b 22 4d |re typed|..* @{"M|
|00001620| 65 74 61 20 4b 65 79 22 | 20 4c 69 6e 6b 20 22 4d |eta Key"| Link "M|
|00001630| 65 74 61 20 4b 65 79 22 | 7d 20 20 20 20 20 4d 45 |eta Key"|} ME|
|00001640| 54 41 20 61 63 74 73 20 | 6c 69 6b 65 20 61 6e 20 |TA acts |like an |
|00001650| 65 78 74 72 61 20 73 68 | 69 66 74 20 6b 65 79 2e |extra sh|ift key.|
|00001660| 0a 2a 20 40 7b 22 49 6e | 69 74 69 61 6c 69 7a 61 |.* @{"In|itializa|
|00001670| 74 69 6f 6e 22 20 4c 69 | 6e 6b 20 22 49 6e 69 74 |tion" Li|nk "Init|
|00001680| 69 61 6c 69 7a 61 74 69 | 6f 6e 22 7d 20 20 20 43 |ializati|on"} C|
|00001690| 6f 6d 6d 61 6e 64 73 20 | 75 73 65 64 20 74 6f 20 |ommands |used to |
|000016a0| 69 6e 69 74 69 61 6c 69 | 7a 65 20 6f 72 20 72 65 |initiali|ze or re|
|000016b0| 73 65 74 20 74 68 65 20 | 74 65 72 6d 69 6e 61 6c |set the |terminal|
|000016c0| 2e 0a 2a 20 40 7b 22 50 | 61 64 20 53 70 65 63 73 |..* @{"P|ad Specs|
|000016d0| 22 20 4c 69 6e 6b 20 22 | 50 61 64 20 53 70 65 63 |" Link "|Pad Spec|
|000016e0| 73 22 7d 20 20 20 20 49 | 6e 66 6f 20 66 6f 72 20 |s"} I|nfo for |
|000016f0| 74 68 65 20 6b 65 72 6e | 65 6c 20 6f 6e 20 68 6f |the kern|el on ho|
|00001700| 77 20 6d 75 63 68 20 70 | 61 64 64 69 6e 67 20 69 |w much p|adding i|
|00001710| 73 20 6e 65 65 64 65 64 | 2e 0a 2a 20 40 7b 22 53 |s needed|..* @{"S|
|00001720| 74 61 74 75 73 20 4c 69 | 6e 65 22 20 4c 69 6e 6b |tatus Li|ne" Link|
|00001730| 20 22 53 74 61 74 75 73 | 20 4c 69 6e 65 22 7d 20 | "Status| Line"} |
|00001740| 20 20 41 20 73 74 61 74 | 75 73 20 6c 69 6e 65 20 | A stat|us line |
|00001750| 64 69 73 70 6c 61 79 73 | 20 22 62 61 63 6b 67 72 |displays| "backgr|
|00001760| 6f 75 6e 64 22 20 69 6e | 66 6f 72 6d 61 74 69 6f |ound" in|formatio|
|00001770| 6e 2e 0a 2a 20 40 7b 22 | 48 61 6c 66 2d 4c 69 6e |n..* @{"|Half-Lin|
|00001780| 65 22 20 4c 69 6e 6b 20 | 22 48 61 6c 66 2d 4c 69 |e" Link |"Half-Li|
|00001790| 6e 65 22 7d 20 20 20 20 | 4d 6f 76 69 6e 67 20 62 |ne"} |Moving b|
|000017a0| 79 20 68 61 6c 66 2d 6c | 69 6e 65 73 2c 20 66 6f |y half-l|ines, fo|
|000017b0| 72 20 73 75 70 65 72 73 | 63 72 69 70 74 73 20 61 |r supers|cripts a|
|000017c0| 6e 64 20 73 75 62 73 63 | 72 69 70 74 73 2e 0a 2a |nd subsc|ripts..*|
|000017d0| 20 40 7b 22 50 72 69 6e | 74 65 72 22 20 4c 69 6e | @{"Prin|ter" Lin|
|000017e0| 6b 20 22 50 72 69 6e 74 | 65 72 22 7d 20 20 20 20 |k "Print|er"} |
|000017f0| 20 20 43 6f 6e 74 72 6f | 6c 6c 69 6e 67 20 61 75 | Contro|lling au|
|00001800| 78 69 6c 69 61 72 79 20 | 70 72 69 6e 74 65 72 73 |xiliary |printers|
|00001810| 20 6f 66 20 64 69 73 70 | 6c 61 79 20 74 65 72 6d | of disp|lay term|
|00001820| 69 6e 61 6c 73 2e 0a 0a | 40 45 6e 64 4e 6f 64 65 |inals...|@EndNode|
|00001830| 0a 0a 0a 40 4e 6f 64 65 | 20 22 49 6e 74 72 6f 64 |...@Node| "Introd|
|00001840| 75 63 74 69 6f 6e 22 20 | 22 49 6e 74 72 6f 64 75 |uction" |"Introdu|
|00001850| 63 74 69 6f 6e 22 0a 40 | 4e 65 78 74 20 22 4c 69 |ction".@|Next "Li|
|00001860| 62 72 61 72 79 22 20 22 | 4c 69 62 72 61 72 79 22 |brary" "|Library"|
|00001870| 0a 40 50 72 65 76 20 22 | 54 6f 70 22 20 22 54 6f |.@Prev "|Top" "To|
|00001880| 70 22 0a 40 54 6f 63 20 | 22 54 6f 70 22 20 22 54 |p".@Toc |"Top" "T|
|00001890| 6f 70 22 0a 49 6e 74 72 | 6f 64 75 63 74 69 6f 6e |op".Intr|oduction|
|000018a0| 0a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0a 0a 20 |.*******|*****.. |
|000018b0| 20 20 22 54 65 72 6d 63 | 61 70 22 20 69 73 20 61 | "Termc|ap" is a|
|000018c0| 20 6c 69 62 72 61 72 79 | 20 61 6e 64 20 64 61 74 | library| and dat|
|000018d0| 61 20 62 61 73 65 20 74 | 68 61 74 20 65 6e 61 62 |a base t|hat enab|
|000018e0| 6c 65 73 20 70 72 6f 67 | 72 61 6d 73 20 74 6f 20 |les prog|rams to |
|000018f0| 75 73 65 0a 64 69 73 70 | 6c 61 79 20 74 65 72 6d |use.disp|lay term|
|00001900| 69 6e 61 6c 73 20 69 6e | 20 61 20 74 65 72 6d 69 |inals in| a termi|
|00001910| 6e 61 6c 2d 69 6e 64 65 | 70 65 6e 64 65 6e 74 20 |nal-inde|pendent |
|00001920| 6d 61 6e 6e 65 72 2e 20 | 20 49 74 20 6f 72 69 67 |manner. | It orig|
|00001930| 69 6e 61 74 65 64 20 69 | 6e 0a 42 65 72 6b 65 6c |inated i|n.Berkel|
|00001940| 65 79 20 55 6e 69 78 2e | 0a 0a 20 20 20 54 68 65 |ey Unix.|.. The|
|00001950| 20 74 65 72 6d 63 61 70 | 20 64 61 74 61 20 62 61 | termcap| data ba|
|00001960| 73 65 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |se descr|ibes the|
|00001970| 20 63 61 70 61 62 69 6c | 69 74 69 65 73 20 6f 66 | capabil|ities of|
|00001980| 20 68 75 6e 64 72 65 64 | 73 20 6f 66 0a 64 69 66 | hundred|s of.dif|
|00001990| 66 65 72 65 6e 74 20 64 | 69 73 70 6c 61 79 20 74 |ferent d|isplay t|
|000019a0| 65 72 6d 69 6e 61 6c 73 | 20 69 6e 20 67 72 65 61 |erminals| in grea|
|000019b0| 74 20 64 65 74 61 69 6c | 2e 20 20 53 6f 6d 65 20 |t detail|. Some |
|000019c0| 65 78 61 6d 70 6c 65 73 | 20 6f 66 20 74 68 65 0a |examples| of the.|
|000019d0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 72 65 63 6f |informat|ion reco|
|000019e0| 72 64 65 64 20 66 6f 72 | 20 61 20 74 65 72 6d 69 |rded for| a termi|
|000019f0| 6e 61 6c 20 63 6f 75 6c | 64 20 69 6e 63 6c 75 64 |nal coul|d includ|
|00001a00| 65 20 68 6f 77 20 6d 61 | 6e 79 20 63 6f 6c 75 6d |e how ma|ny colum|
|00001a10| 6e 73 20 77 69 64 65 0a | 69 74 20 69 73 2c 20 77 |ns wide.|it is, w|
|00001a20| 68 61 74 20 73 74 72 69 | 6e 67 20 74 6f 20 73 65 |hat stri|ng to se|
|00001a30| 6e 64 20 74 6f 20 6d 6f | 76 65 20 74 68 65 20 63 |nd to mo|ve the c|
|00001a40| 75 72 73 6f 72 20 74 6f | 20 61 6e 20 61 72 62 69 |ursor to| an arbi|
|00001a50| 74 72 61 72 79 20 70 6f | 73 69 74 69 6f 6e 0a 28 |trary po|sition.(|
|00001a60| 69 6e 63 6c 75 64 69 6e | 67 20 68 6f 77 20 74 6f |includin|g how to|
|00001a70| 20 65 6e 63 6f 64 65 20 | 74 68 65 20 72 6f 77 20 | encode |the row |
|00001a80| 61 6e 64 20 63 6f 6c 75 | 6d 6e 20 6e 75 6d 62 65 |and colu|mn numbe|
|00001a90| 72 73 29 2c 20 68 6f 77 | 20 74 6f 20 73 63 72 6f |rs), how| to scro|
|00001aa0| 6c 6c 20 74 68 65 0a 73 | 63 72 65 65 6e 20 75 70 |ll the.s|creen up|
|00001ab0| 20 6f 6e 65 20 6f 72 20 | 73 65 76 65 72 61 6c 20 | one or |several |
|00001ac0| 6c 69 6e 65 73 2c 20 61 | 6e 64 20 68 6f 77 20 6d |lines, a|nd how m|
|00001ad0| 75 63 68 20 70 61 64 64 | 69 6e 67 20 69 73 20 6e |uch padd|ing is n|
|00001ae0| 65 65 64 65 64 20 66 6f | 72 20 73 75 63 68 0a 61 |eeded fo|r such.a|
|00001af0| 20 73 63 72 6f 6c 6c 69 | 6e 67 20 6f 70 65 72 61 | scrolli|ng opera|
|00001b00| 74 69 6f 6e 2e 0a 0a 20 | 20 20 54 68 65 20 74 65 |tion... | The te|
|00001b10| 72 6d 63 61 70 20 6c 69 | 62 72 61 72 79 20 69 73 |rmcap li|brary is|
|00001b20| 20 70 72 6f 76 69 64 65 | 64 20 66 6f 72 20 65 61 | provide|d for ea|
|00001b30| 73 79 20 61 63 63 65 73 | 73 20 74 68 69 73 20 64 |sy acces|s this d|
|00001b40| 61 74 61 20 62 61 73 65 | 20 69 6e 0a 70 72 6f 67 |ata base| in.prog|
|00001b50| 72 61 6d 73 20 74 68 61 | 74 20 77 61 6e 74 20 74 |rams tha|t want t|
|00001b60| 6f 20 64 6f 20 74 65 72 | 6d 69 6e 61 6c 2d 69 6e |o do ter|minal-in|
|00001b70| 64 65 70 65 6e 64 65 6e | 74 20 63 68 61 72 61 63 |dependen|t charac|
|00001b80| 74 65 72 2d 62 61 73 65 | 64 20 64 69 73 70 6c 61 |ter-base|d displa|
|00001b90| 79 0a 6f 75 74 70 75 74 | 2e 0a 0a 20 20 20 54 68 |y.output|... Th|
|00001ba0| 69 73 20 6d 61 6e 75 61 | 6c 20 64 65 73 63 72 69 |is manua|l descri|
|00001bb0| 62 65 73 20 74 68 65 20 | 47 4e 55 20 76 65 72 73 |bes the |GNU vers|
|00001bc0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 74 65 72 6d 63 |ion of t|he termc|
|00001bd0| 61 70 20 6c 69 62 72 61 | 72 79 2c 20 77 68 69 63 |ap libra|ry, whic|
|00001be0| 68 0a 68 61 73 20 73 6f | 6d 65 20 65 78 74 65 6e |h.has so|me exten|
|00001bf0| 73 69 6f 6e 73 20 6f 76 | 65 72 20 74 68 65 20 55 |sions ov|er the U|
|00001c00| 6e 69 78 20 76 65 72 73 | 69 6f 6e 2e 20 20 41 6c |nix vers|ion. Al|
|00001c10| 6c 20 74 68 65 20 65 78 | 74 65 6e 73 69 6f 6e 73 |l the ex|tensions|
|00001c20| 20 61 72 65 0a 69 64 65 | 6e 74 69 66 69 65 64 20 | are.ide|ntified |
|00001c30| 61 73 20 73 75 63 68 2c | 20 73 6f 20 74 68 69 73 |as such,| so this|
|00001c40| 20 6d 61 6e 75 61 6c 20 | 61 6c 73 6f 20 74 65 6c | manual |also tel|
|00001c50| 6c 73 20 79 6f 75 20 68 | 6f 77 20 74 6f 20 75 73 |ls you h|ow to us|
|00001c60| 65 20 74 68 65 20 55 6e | 69 78 0a 74 65 72 6d 63 |e the Un|ix.termc|
|00001c70| 61 70 2e 0a 0a 20 20 20 | 54 68 65 20 47 4e 55 20 |ap... |The GNU |
|00001c80| 76 65 72 73 69 6f 6e 20 | 6f 66 20 74 68 65 20 74 |version |of the t|
|00001c90| 65 72 6d 63 61 70 20 6c | 69 62 72 61 72 79 20 69 |ermcap l|ibrary i|
|00001ca0| 73 20 61 76 61 69 6c 61 | 62 6c 65 20 66 72 65 65 |s availa|ble free|
|00001cb0| 20 61 73 20 73 6f 75 72 | 63 65 0a 63 6f 64 65 2c | as sour|ce.code,|
|00001cc0| 20 66 6f 72 20 75 73 65 | 20 69 6e 20 66 72 65 65 | for use| in free|
|00001cd0| 20 70 72 6f 67 72 61 6d | 73 2c 20 61 6e 64 20 72 | program|s, and r|
|00001ce0| 75 6e 73 20 6f 6e 20 55 | 6e 69 78 20 61 6e 64 20 |uns on U|nix and |
|00001cf0| 56 4d 53 20 73 79 73 74 | 65 6d 73 20 28 61 74 0a |VMS syst|ems (at.|
|00001d00| 6c 65 61 73 74 29 2e 20 | 20 59 6f 75 20 63 61 6e |least). | You can|
|00001d10| 20 66 69 6e 64 20 69 74 | 20 69 6e 20 74 68 65 20 | find it| in the |
|00001d20| 47 4e 55 20 45 6d 61 63 | 73 20 64 69 73 74 72 69 |GNU Emac|s distri|
|00001d30| 62 75 74 69 6f 6e 20 69 | 6e 20 74 68 65 20 66 69 |bution i|n the fi|
|00001d40| 6c 65 73 0a 60 74 65 72 | 6d 63 61 70 2e 63 27 20 |les.`ter|mcap.c' |
|00001d50| 61 6e 64 20 60 74 70 61 | 72 61 6d 2e 63 27 2e 0a |and `tpa|ram.c'..|
|00001d60| 0a 20 20 20 54 68 69 73 | 20 6d 61 6e 75 61 6c 20 |. This| manual |
|00001d70| 77 61 73 20 77 72 69 74 | 74 65 6e 20 66 6f 72 20 |was writ|ten for |
|00001d80| 74 68 65 20 47 4e 55 20 | 70 72 6f 6a 65 63 74 2c |the GNU |project,|
|00001d90| 20 77 68 6f 73 65 20 67 | 6f 61 6c 20 69 73 20 74 | whose g|oal is t|
|00001da0| 6f 0a 64 65 76 65 6c 6f | 70 20 61 20 63 6f 6d 70 |o.develo|p a comp|
|00001db0| 6c 65 74 65 20 66 72 65 | 65 20 6f 70 65 72 61 74 |lete fre|e operat|
|00001dc0| 69 6e 67 20 73 79 73 74 | 65 6d 20 75 70 77 61 72 |ing syst|em upwar|
|00001dd0| 64 2d 63 6f 6d 70 61 74 | 69 62 6c 65 20 77 69 74 |d-compat|ible wit|
|00001de0| 68 20 55 6e 69 78 0a 66 | 6f 72 20 75 73 65 72 20 |h Unix.f|or user |
|00001df0| 70 72 6f 67 72 61 6d 73 | 2e 20 20 54 68 65 20 70 |programs|. The p|
|00001e00| 72 6f 6a 65 63 74 20 69 | 73 20 61 70 70 72 6f 78 |roject i|s approx|
|00001e10| 69 6d 61 74 65 6c 79 20 | 74 77 6f 20 74 68 69 72 |imately |two thir|
|00001e20| 64 73 20 63 6f 6d 70 6c | 65 74 65 2e 0a 46 6f 72 |ds compl|ete..For|
|00001e30| 20 6d 6f 72 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | more in|formatio|
|00001e40| 6e 20 6f 6e 20 74 68 65 | 20 47 4e 55 20 70 72 6f |n on the| GNU pro|
|00001e50| 6a 65 63 74 2c 20 69 6e | 63 6c 75 64 69 6e 67 20 |ject, in|cluding |
|00001e60| 74 68 65 20 47 4e 55 20 | 45 6d 61 63 73 20 65 64 |the GNU |Emacs ed|
|00001e70| 69 74 6f 72 0a 61 6e 64 | 20 74 68 65 20 6d 6f 73 |itor.and| the mos|
|00001e80| 74 6c 79 2d 70 6f 72 74 | 61 62 6c 65 20 6f 70 74 |tly-port|able opt|
|00001e90| 69 6d 69 7a 69 6e 67 20 | 43 20 63 6f 6d 70 69 6c |imizing |C compil|
|00001ea0| 65 72 2c 20 73 65 6e 64 | 20 6f 6e 65 20 64 6f 6c |er, send| one dol|
|00001eb0| 6c 61 72 20 74 6f 0a 0a | 20 20 20 20 20 46 72 65 |lar to..| Fre|
|00001ec0| 65 20 53 6f 66 74 77 61 | 72 65 20 46 6f 75 6e 64 |e Softwa|re Found|
|00001ed0| 61 74 69 6f 6e 0a 20 20 | 20 20 20 36 37 35 20 4d |ation. | 675 M|
|00001ee0| 61 73 73 20 41 76 65 0a | 20 20 20 20 20 43 61 6d |ass Ave.| Cam|
|00001ef0| 62 72 69 64 67 65 2c 20 | 4d 41 20 30 32 31 33 39 |bridge, |MA 02139|
|00001f00| 0a 0a 40 45 6e 64 4e 6f | 64 65 0a 0a 0a 40 4e 6f |..@EndNo|de...@No|
|00001f10| 64 65 20 22 4c 69 62 72 | 61 72 79 22 20 22 4c 69 |de "Libr|ary" "Li|
|00001f20| 62 72 61 72 79 22 0a 40 | 4e 65 78 74 20 22 44 61 |brary".@|Next "Da|
|00001f30| 74 61 20 42 61 73 65 22 | 20 22 44 61 74 61 20 42 |ta Base"| "Data B|
|00001f40| 61 73 65 22 0a 40 50 72 | 65 76 20 22 49 6e 74 72 |ase".@Pr|ev "Intr|
|00001f50| 6f 64 75 63 74 69 6f 6e | 22 20 22 49 6e 74 72 6f |oduction|" "Intro|
|00001f60| 64 75 63 74 69 6f 6e 22 | 0a 40 54 6f 63 20 22 54 |duction"|.@Toc "T|
|00001f70| 6f 70 22 20 22 54 6f 70 | 22 0a 54 68 65 20 54 65 |op" "Top|".The Te|
|00001f80| 72 6d 63 61 70 20 4c 69 | 62 72 61 72 79 0a 2a 2a |rmcap Li|brary.**|
|00001f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001fa0| 2a 0a 0a 20 20 20 54 68 | 65 20 74 65 72 6d 63 61 |*.. Th|e termca|
|00001fb0| 70 20 6c 69 62 72 61 72 | 79 20 69 73 20 74 68 65 |p librar|y is the|
|00001fc0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 70 72 6f | applica|tion pro|
|00001fd0| 67 72 61 6d 6d 65 72 27 | 73 20 69 6e 74 65 72 66 |grammer'|s interf|
|00001fe0| 61 63 65 20 74 6f 20 74 | 68 65 0a 74 65 72 6d 63 |ace to t|he.termc|
|00001ff0| 61 70 20 64 61 74 61 20 | 62 61 73 65 2e 20 20 49 |ap data |base. I|
|00002000| 74 20 63 6f 6e 74 61 69 | 6e 73 20 66 75 6e 63 74 |t contai|ns funct|
|00002010| 69 6f 6e 73 20 66 6f 72 | 20 74 68 65 20 66 6f 6c |ions for| the fol|
|00002020| 6c 6f 77 69 6e 67 20 70 | 75 72 70 6f 73 65 73 3a |lowing p|urposes:|
|00002030| 0a 0a 20 20 20 2a 20 46 | 69 6e 64 69 6e 67 20 74 |.. * F|inding t|
|00002040| 68 65 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 6f |he descr|iption o|
|00002050| 66 20 74 68 65 20 75 73 | 65 72 27 73 20 74 65 72 |f the us|er's ter|
|00002060| 6d 69 6e 61 6c 20 74 79 | 70 65 20 28 60 74 67 65 |minal ty|pe (`tge|
|00002070| 74 65 6e 74 27 29 2e 0a | 0a 20 20 20 2a 20 49 6e |tent')..|. * In|
|00002080| 74 65 72 72 6f 67 61 74 | 69 6e 67 20 74 68 65 20 |terrogat|ing the |
|00002090| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 66 6f 72 20 |descript|ion for |
|000020a0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 6f 6e 20 76 |informat|ion on v|
|000020b0| 61 72 69 6f 75 73 20 74 | 6f 70 69 63 73 0a 20 20 |arious t|opics. |
|000020c0| 20 20 20 28 60 74 67 65 | 74 6e 75 6d 27 2c 20 60 | (`tge|tnum', `|
|000020d0| 74 67 65 74 66 6c 61 67 | 27 2c 20 60 74 67 65 74 |tgetflag|', `tget|
|000020e0| 73 74 72 27 29 2e 0a 0a | 20 20 20 2a 20 43 6f 6d |str')...| * Com|
|000020f0| 70 75 74 69 6e 67 20 61 | 6e 64 20 70 65 72 66 6f |puting a|nd perfo|
|00002100| 72 6d 69 6e 67 20 70 61 | 64 64 69 6e 67 20 28 60 |rming pa|dding (`|
|00002110| 74 70 75 74 73 27 29 2e | 0a 0a 20 20 20 2a 20 45 |tputs').|.. * E|
|00002120| 6e 63 6f 64 69 6e 67 20 | 6e 75 6d 65 72 69 63 20 |ncoding |numeric |
|00002130| 70 61 72 61 6d 65 74 65 | 72 73 20 73 75 63 68 20 |paramete|rs such |
|00002140| 61 73 20 63 75 72 73 6f | 72 20 70 6f 73 69 74 69 |as curso|r positi|
|00002150| 6f 6e 73 20 69 6e 74 6f | 20 74 68 65 0a 20 20 20 |ons into| the. |
|00002160| 20 20 74 65 72 6d 69 6e | 61 6c 2d 73 70 65 63 69 | termin|al-speci|
|00002170| 66 69 63 20 66 6f 72 6d | 20 72 65 71 75 69 72 65 |fic form| require|
|00002180| 64 20 66 6f 72 20 64 69 | 73 70 6c 61 79 20 63 6f |d for di|splay co|
|00002190| 6d 6d 61 6e 64 73 20 28 | 60 74 70 61 72 61 6d 27 |mmands (|`tparam'|
|000021a0| 2c 0a 20 20 20 20 20 60 | 74 67 6f 74 6f 27 29 2e |,. `|tgoto').|
|000021b0| 0a 0a 2a 20 4d 65 6e 75 | 3a 0a 0a 2a 20 40 7b 22 |..* Menu|:..* @{"|
|000021c0| 50 72 65 70 61 72 61 74 | 69 6f 6e 22 20 4c 69 6e |Preparat|ion" Lin|
|000021d0| 6b 20 22 50 72 65 70 61 | 72 61 74 69 6f 6e 22 7d |k "Prepa|ration"}|
|000021e0| 20 20 20 50 72 65 70 61 | 72 69 6e 67 20 74 6f 20 | Prepa|ring to |
|000021f0| 75 73 65 20 74 68 65 20 | 74 65 72 6d 63 61 70 20 |use the |termcap |
|00002200| 6c 69 62 72 61 72 79 2e | 0a 2a 20 40 7b 22 46 69 |library.|.* @{"Fi|
|00002210| 6e 64 22 20 4c 69 6e 6b | 20 22 46 69 6e 64 22 7d |nd" Link| "Find"}|
|00002220| 20 20 20 20 20 20 20 20 | 20 46 69 6e 64 69 6e 67 | | Finding|
|00002230| 20 74 68 65 20 64 65 73 | 63 72 69 70 74 69 6f 6e | the des|cription|
|00002240| 20 6f 66 20 74 68 65 20 | 74 65 72 6d 69 6e 61 6c | of the |terminal|
|00002250| 20 62 65 69 6e 67 20 75 | 73 65 64 2e 0a 2a 20 40 | being u|sed..* @|
|00002260| 7b 22 49 6e 74 65 72 72 | 6f 67 61 74 65 22 20 4c |{"Interr|ogate" L|
|00002270| 69 6e 6b 20 22 49 6e 74 | 65 72 72 6f 67 61 74 65 |ink "Int|errogate|
|00002280| 22 7d 20 20 20 49 6e 74 | 65 72 72 6f 67 61 74 69 |"} Int|errogati|
|00002290| 6e 67 20 74 68 65 20 64 | 65 73 63 72 69 70 74 69 |ng the d|escripti|
|000022a0| 6f 6e 20 66 6f 72 20 70 | 61 72 74 69 63 75 6c 61 |on for p|articula|
|000022b0| 72 20 63 61 70 61 62 69 | 6c 69 74 69 65 73 2e 0a |r capabi|lities..|
|000022c0| 2a 20 40 7b 22 49 6e 69 | 74 69 61 6c 69 7a 65 22 |* @{"Ini|tialize"|
|000022d0| 20 4c 69 6e 6b 20 22 49 | 6e 69 74 69 61 6c 69 7a | Link "I|nitializ|
|000022e0| 65 22 7d 20 20 20 49 6e | 69 74 69 61 6c 69 7a 61 |e"} In|itializa|
|000022f0| 74 69 6f 6e 20 66 6f 72 | 20 6f 75 74 70 75 74 20 |tion for| output |
|00002300| 75 73 69 6e 67 20 74 65 | 72 6d 63 61 70 2e 0a 2a |using te|rmcap..*|
|00002310| 20 40 7b 22 50 61 64 64 | 69 6e 67 22 20 4c 69 6e | @{"Padd|ing" Lin|
|00002320| 6b 20 22 50 61 64 64 69 | 6e 67 22 7d 20 20 20 20 |k "Paddi|ng"} |
|00002330| 20 20 4f 75 74 70 75 74 | 74 69 6e 67 20 70 61 64 | Output|ting pad|
|00002340| 64 69 6e 67 2e 0a 2a 20 | 40 7b 22 50 61 72 61 6d |ding..* |@{"Param|
|00002350| 65 74 65 72 73 22 20 4c | 69 6e 6b 20 22 50 61 72 |eters" L|ink "Par|
|00002360| 61 6d 65 74 65 72 73 22 | 7d 20 20 20 45 6e 63 6f |ameters"|} Enco|
|00002370| 64 69 6e 67 20 70 61 72 | 61 6d 65 74 65 72 73 20 |ding par|ameters |
|00002380| 73 75 63 68 20 61 73 20 | 63 75 72 73 6f 72 20 70 |such as |cursor p|
|00002390| 6f 73 69 74 69 6f 6e 73 | 2e 0a 0a 40 45 6e 64 4e |ositions|...@EndN|
|000023a0| 6f 64 65 0a 0a 0a 40 4e | 6f 64 65 20 22 50 72 65 |ode...@N|ode "Pre|
|000023b0| 70 61 72 61 74 69 6f 6e | 22 20 22 50 72 65 70 61 |paration|" "Prepa|
|000023c0| 72 61 74 69 6f 6e 22 0a | 40 4e 65 78 74 20 22 46 |ration".|@Next "F|
|000023d0| 69 6e 64 22 20 22 46 69 | 6e 64 22 0a 40 54 6f 63 |ind" "Fi|nd".@Toc|
|000023e0| 20 22 4c 69 62 72 61 72 | 79 22 20 22 4c 69 62 72 | "Librar|y" "Libr|
|000023f0| 61 72 79 22 0a 50 72 65 | 70 61 72 69 6e 67 20 74 |ary".Pre|paring t|
|00002400| 6f 20 55 73 65 20 74 68 | 65 20 54 65 72 6d 63 61 |o Use th|e Termca|
|00002410| 70 20 4c 69 62 72 61 72 | 79 0a 3d 3d 3d 3d 3d 3d |p Librar|y.======|
|00002420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002430| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 0a |========|======..|
|00002440| 20 20 20 54 6f 20 75 73 | 65 20 74 68 65 20 74 65 | To us|e the te|
|00002450| 72 6d 63 61 70 20 6c 69 | 62 72 61 72 79 20 69 6e |rmcap li|brary in|
|00002460| 20 61 20 70 72 6f 67 72 | 61 6d 2c 20 79 6f 75 20 | a progr|am, you |
|00002470| 6e 65 65 64 20 74 77 6f | 20 6b 69 6e 64 73 20 6f |need two| kinds o|
|00002480| 66 0a 70 72 65 70 61 72 | 61 74 69 6f 6e 3a 0a 0a |f.prepar|ation:..|
|00002490| 20 20 20 2a 20 54 68 65 | 20 63 6f 6d 70 69 6c 65 | * The| compile|
|000024a0| 72 20 6e 65 65 64 73 20 | 64 65 63 6c 61 72 61 74 |r needs |declarat|
|000024b0| 69 6f 6e 73 20 6f 66 20 | 74 68 65 20 66 75 6e 63 |ions of |the func|
|000024c0| 74 69 6f 6e 73 20 61 6e | 64 20 76 61 72 69 61 62 |tions an|d variab|
|000024d0| 6c 65 73 20 69 6e 0a 20 | 20 20 20 20 74 68 65 20 |les in. | the |
|000024e0| 6c 69 62 72 61 72 79 2e | 0a 0a 20 20 20 20 20 4f |library.|.. O|
|000024f0| 6e 20 47 4e 55 20 73 79 | 73 74 65 6d 73 2c 20 69 |n GNU sy|stems, i|
|00002500| 74 20 73 75 66 66 69 63 | 65 73 20 74 6f 20 69 6e |t suffic|es to in|
|00002510| 63 6c 75 64 65 20 74 68 | 65 20 68 65 61 64 65 72 |clude th|e header|
|00002520| 20 66 69 6c 65 20 60 74 | 65 72 6d 63 61 70 2e 68 | file `t|ermcap.h|
|00002530| 27 0a 20 20 20 20 20 69 | 6e 20 65 61 63 68 20 73 |'. i|n each s|
|00002540| 6f 75 72 63 65 20 66 69 | 6c 65 20 74 68 61 74 20 |ource fi|le that |
|00002550| 75 73 65 73 20 74 68 65 | 73 65 20 66 75 6e 63 74 |uses the|se funct|
|00002560| 69 6f 6e 73 20 61 6e 64 | 20 76 61 72 69 61 62 6c |ions and| variabl|
|00002570| 65 73 2e 0a 0a 20 20 20 | 20 20 4f 6e 20 55 6e 69 |es... | On Uni|
|00002580| 78 20 73 79 73 74 65 6d | 73 2c 20 74 68 65 72 65 |x system|s, there|
|00002590| 20 69 73 20 6f 66 74 65 | 6e 20 6e 6f 20 73 75 63 | is ofte|n no suc|
|000025a0| 68 20 68 65 61 64 65 72 | 20 66 69 6c 65 2e 20 20 |h header| file. |
|000025b0| 54 68 65 6e 20 79 6f 75 | 20 6d 75 73 74 0a 20 20 |Then you| must. |
|000025c0| 20 20 20 65 78 70 6c 69 | 63 74 6c 79 20 64 65 63 | expli|ctly dec|
|000025d0| 6c 61 72 65 20 74 68 65 | 20 76 61 72 69 61 62 6c |lare the| variabl|
|000025e0| 65 73 20 61 73 20 65 78 | 74 65 72 6e 61 6c 2e 20 |es as ex|ternal. |
|000025f0| 20 59 6f 75 20 63 61 6e | 20 64 6f 20 6c 69 6b 65 | You can| do like|
|00002600| 77 69 73 65 0a 20 20 20 | 20 20 66 6f 72 20 74 68 |wise. | for th|
|00002610| 65 20 66 75 6e 63 74 69 | 6f 6e 73 2c 20 6f 72 20 |e functi|ons, or |
|00002620| 6c 65 74 20 74 68 65 6d | 20 62 65 20 69 6d 70 6c |let them| be impl|
|00002630| 69 63 69 74 6c 79 20 64 | 65 63 6c 61 72 65 64 20 |icitly d|eclared |
|00002640| 61 6e 64 20 63 61 73 74 | 0a 20 20 20 20 20 74 68 |and cast|. th|
|00002650| 65 69 72 20 76 61 6c 75 | 65 73 20 66 72 6f 6d 20 |eir valu|es from |
|00002660| 74 79 70 65 20 60 69 6e | 74 27 20 74 6f 20 74 68 |type `in|t' to th|
|00002670| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 74 79 |e approp|riate ty|
|00002680| 70 65 2e 0a 0a 20 20 20 | 20 20 57 65 20 69 6c 6c |pe... | We ill|
|00002690| 75 73 74 72 61 74 65 20 | 74 68 65 20 64 65 63 6c |ustrate |the decl|
|000026a0| 61 72 61 74 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |arations| of the |
|000026b0| 69 6e 64 69 76 69 64 75 | 61 6c 20 74 65 72 6d 63 |individu|al termc|
|000026c0| 61 70 20 6c 69 62 72 61 | 72 79 0a 20 20 20 20 20 |ap libra|ry. |
|000026d0| 66 75 6e 63 74 69 6f 6e | 73 20 77 69 74 68 20 41 |function|s with A|
|000026e0| 4e 53 49 20 43 20 70 72 | 6f 74 6f 74 79 70 65 73 |NSI C pr|ototypes|
|000026f0| 20 62 65 63 61 75 73 65 | 20 74 68 65 79 20 73 68 | because| they sh|
|00002700| 6f 77 20 68 6f 77 20 74 | 6f 20 70 61 73 73 20 74 |ow how t|o pass t|
|00002710| 68 65 0a 20 20 20 20 20 | 61 72 67 75 6d 65 6e 74 |he. |argument|
|00002720| 73 2e 20 20 49 66 20 79 | 6f 75 20 61 72 65 20 6e |s. If y|ou are n|
|00002730| 6f 74 20 75 73 69 6e 67 | 20 74 68 65 20 47 4e 55 |ot using| the GNU|
|00002740| 20 43 20 63 6f 6d 70 69 | 6c 65 72 2c 20 79 6f 75 | C compi|ler, you|
|00002750| 20 70 72 6f 62 61 62 6c | 79 0a 20 20 20 20 20 63 | probabl|y. c|
|00002760| 61 6e 6e 6f 74 20 75 73 | 65 20 66 75 6e 63 74 69 |annot us|e functi|
|00002770| 6f 6e 20 70 72 6f 74 6f | 74 79 70 65 73 2c 20 73 |on proto|types, s|
|00002780| 6f 20 6f 6d 69 74 20 74 | 68 65 20 61 72 67 75 6d |o omit t|he argum|
|00002790| 65 6e 74 20 74 79 70 65 | 73 20 61 6e 64 0a 20 20 |ent type|s and. |
|000027a0| 20 20 20 6e 61 6d 65 73 | 20 66 72 6f 6d 20 79 6f | names| from yo|
|000027b0| 75 72 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 2e |ur decla|rations.|
|000027c0| 0a 0a 20 20 20 2a 20 54 | 68 65 20 6c 69 6e 6b 65 |.. * T|he linke|
|000027d0| 72 20 6e 65 65 64 73 20 | 74 6f 20 73 65 61 72 63 |r needs |to searc|
|000027e0| 68 20 74 68 65 20 6c 69 | 62 72 61 72 79 2e 20 20 |h the li|brary. |
|000027f0| 55 73 75 61 6c 6c 79 20 | 65 69 74 68 65 72 0a 20 |Usually |either. |
|00002800| 20 20 20 20 60 2d 6c 74 | 65 72 6d 63 61 70 27 20 | `-lt|ermcap' |
|00002810| 6f 72 20 60 2d 6c 74 65 | 72 6d 6c 69 62 27 20 61 |or `-lte|rmlib' a|
|00002820| 73 20 61 6e 20 61 72 67 | 75 6d 65 6e 74 20 77 68 |s an arg|ument wh|
|00002830| 65 6e 20 6c 69 6e 6b 69 | 6e 67 20 77 69 6c 6c 20 |en linki|ng will |
|00002840| 64 6f 0a 20 20 20 20 20 | 74 68 69 73 2e 0a 0a 40 |do. |this...@|
|00002850| 45 6e 64 4e 6f 64 65 0a | 0a 0a 40 4e 6f 64 65 20 |EndNode.|..@Node |
|00002860| 22 46 69 6e 64 22 20 22 | 46 69 6e 64 22 0a 40 4e |"Find" "|Find".@N|
|00002870| 65 78 74 20 22 49 6e 74 | 65 72 72 6f 67 61 74 65 |ext "Int|errogate|
|00002880| 22 20 22 49 6e 74 65 72 | 72 6f 67 61 74 65 22 0a |" "Inter|rogate".|
|00002890| 40 50 72 65 76 20 22 50 | 72 65 70 61 72 61 74 69 |@Prev "P|reparati|
|000028a0| 6f 6e 22 20 22 50 72 65 | 70 61 72 61 74 69 6f 6e |on" "Pre|paration|
|000028b0| 22 0a 40 54 6f 63 20 22 | 4c 69 62 72 61 72 79 22 |".@Toc "|Library"|
|000028c0| 20 22 4c 69 62 72 61 72 | 79 22 0a 46 69 6e 64 69 | "Librar|y".Findi|
|000028d0| 6e 67 20 61 20 54 65 72 | 6d 69 6e 61 6c 20 44 65 |ng a Ter|minal De|
|000028e0| 73 63 72 69 70 74 69 6f | 6e 3a 20 60 74 67 65 74 |scriptio|n: `tget|
|000028f0| 65 6e 74 27 0a 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ent'.===|========|
|00002900| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002910| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 0a |========|======..|
|00002920| 20 20 20 41 6e 20 61 70 | 70 6c 69 63 61 74 69 6f | An ap|plicatio|
|00002930| 6e 20 70 72 6f 67 72 61 | 6d 20 74 68 61 74 20 69 |n progra|m that i|
|00002940| 73 20 67 6f 69 6e 67 20 | 74 6f 20 75 73 65 20 74 |s going |to use t|
|00002950| 65 72 6d 63 61 70 20 6d | 75 73 74 20 66 69 72 73 |ermcap m|ust firs|
|00002960| 74 20 6c 6f 6f 6b 0a 75 | 70 20 74 68 65 20 64 65 |t look.u|p the de|
|00002970| 73 63 72 69 70 74 69 6f | 6e 20 6f 66 20 74 68 65 |scriptio|n of the|
|00002980| 20 74 65 72 6d 69 6e 61 | 6c 20 74 79 70 65 20 69 | termina|l type i|
|00002990| 6e 20 75 73 65 2e 20 20 | 54 68 69 73 20 69 73 20 |n use. |This is |
|000029a0| 64 6f 6e 65 20 62 79 20 | 63 61 6c 6c 69 6e 67 0a |done by |calling.|
|000029b0| 60 74 67 65 74 65 6e 74 | 27 2c 20 77 68 6f 73 65 |`tgetent|', whose|
|000029c0| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 20 69 6e 20 | declara|tion in |
|000029d0| 41 4e 53 49 20 53 74 61 | 6e 64 61 72 64 20 43 20 |ANSI Sta|ndard C |
|000029e0| 6c 6f 6f 6b 73 20 6c 69 | 6b 65 3a 0a 0a 20 20 20 |looks li|ke:.. |
|000029f0| 20 20 69 6e 74 20 74 67 | 65 74 65 6e 74 20 28 63 | int tg|etent (c|
|00002a00| 68 61 72 20 2a 42 55 46 | 46 45 52 2c 20 63 68 61 |har *BUF|FER, cha|
|00002a10| 72 20 2a 54 45 52 4d 54 | 59 50 45 29 3b 0a 0a 54 |r *TERMT|YPE);..T|
|00002a20| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 66 69 6e |his func|tion fin|
|00002a30| 64 73 20 74 68 65 20 64 | 65 73 63 72 69 70 74 69 |ds the d|escripti|
|00002a40| 6f 6e 20 61 6e 64 20 72 | 65 6d 65 6d 62 65 72 73 |on and r|emembers|
|00002a50| 20 69 74 20 69 6e 74 65 | 72 6e 61 6c 6c 79 20 73 | it inte|rnally s|
|00002a60| 6f 20 74 68 61 74 0a 79 | 6f 75 20 63 61 6e 20 69 |o that.y|ou can i|
|00002a70| 6e 74 65 72 72 6f 67 61 | 74 65 20 69 74 20 61 62 |nterroga|te it ab|
|00002a80| 6f 75 74 20 73 70 65 63 | 69 66 69 63 20 74 65 72 |out spec|ific ter|
|00002a90| 6d 69 6e 61 6c 20 63 61 | 70 61 62 69 6c 69 74 69 |minal ca|pabiliti|
|00002aa0| 65 73 20 0a 28 40 7b 22 | 49 6e 74 65 72 72 6f 67 |es .(@{"|Interrog|
|00002ab0| 61 74 65 22 20 4c 69 6e | 6b 20 22 49 6e 74 65 72 |ate" Lin|k "Inter|
|00002ac0| 72 6f 67 61 74 65 22 7d | 29 2e 0a 0a 20 20 20 54 |rogate"}|)... T|
|00002ad0| 68 65 20 61 72 67 75 6d | 65 6e 74 20 54 45 52 4d |he argum|ent TERM|
|00002ae0| 54 59 50 45 20 69 73 20 | 61 20 73 74 72 69 6e 67 |TYPE is |a string|
|00002af0| 20 77 68 69 63 68 20 69 | 73 20 74 68 65 20 6e 61 | which i|s the na|
|00002b00| 6d 65 20 66 6f 72 20 74 | 68 65 20 74 79 70 65 20 |me for t|he type |
|00002b10| 6f 66 0a 74 65 72 6d 69 | 6e 61 6c 20 74 6f 20 6c |of.termi|nal to l|
|00002b20| 6f 6f 6b 20 75 70 2e 20 | 20 55 73 75 61 6c 6c 79 |ook up. | Usually|
|00002b30| 20 79 6f 75 20 77 6f 75 | 6c 64 20 6f 62 74 61 69 | you wou|ld obtai|
|00002b40| 6e 20 74 68 69 73 20 66 | 72 6f 6d 20 74 68 65 20 |n this f|rom the |
|00002b50| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 0a 76 61 72 69 |environm|ent.vari|
|00002b60| 61 62 6c 65 20 60 54 45 | 52 4d 27 20 75 73 69 6e |able `TE|RM' usin|
|00002b70| 67 20 60 67 65 74 65 6e | 76 20 28 22 54 45 52 4d |g `geten|v ("TERM|
|00002b80| 22 29 27 2e 0a 0a 20 20 | 20 49 66 20 79 6f 75 20 |")'... | If you |
|00002b90| 61 72 65 20 75 73 69 6e | 67 20 74 68 65 20 47 4e |are usin|g the GN|
|00002ba0| 55 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 65 72 |U versio|n of ter|
|00002bb0| 6d 63 61 70 2c 20 79 6f | 75 20 63 61 6e 20 61 6c |mcap, yo|u can al|
|00002bc0| 74 65 72 6e 61 74 69 76 | 65 6c 79 0a 61 73 6b 20 |ternativ|ely.ask |
|00002bd0| 60 74 67 65 74 65 6e 74 | 27 20 74 6f 20 61 6c 6c |`tgetent|' to all|
|00002be0| 6f 63 61 74 65 20 65 6e | 6f 75 67 68 20 73 70 61 |ocate en|ough spa|
|00002bf0| 63 65 2e 20 20 50 61 73 | 73 20 61 20 6e 75 6c 6c |ce. Pas|s a null|
|00002c00| 20 70 6f 69 6e 74 65 72 | 20 66 6f 72 0a 42 55 46 | pointer| for.BUF|
|00002c10| 46 45 52 2c 20 61 6e 64 | 20 60 74 67 65 74 65 6e |FER, and| `tgeten|
|00002c20| 74 27 20 69 74 73 65 6c | 66 20 61 6c 6c 6f 63 61 |t' itsel|f alloca|
|00002c30| 74 65 73 20 74 68 65 20 | 73 74 6f 72 61 67 65 20 |tes the |storage |
|00002c40| 75 73 69 6e 67 20 60 6d | 61 6c 6c 6f 63 27 2e 20 |using `m|alloc'. |
|00002c50| 20 49 6e 0a 74 68 69 73 | 20 63 61 73 65 20 74 68 | In.this| case th|
|00002c60| 65 20 72 65 74 75 72 6e | 65 64 20 76 61 6c 75 65 |e return|ed value|
|00002c70| 20 6f 6e 20 73 75 63 63 | 65 73 73 20 69 73 20 74 | on succ|ess is t|
|00002c80| 68 65 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 68 |he addre|ss of th|
|00002c90| 65 20 73 74 6f 72 61 67 | 65 2c 0a 63 61 73 74 20 |e storag|e,.cast |
|00002ca0| 74 6f 20 60 69 6e 74 27 | 2e 20 20 42 75 74 20 6e |to `int'|. But n|
|00002cb0| 6f 72 6d 61 6c 6c 79 20 | 74 68 65 72 65 20 69 73 |ormally |there is|
|00002cc0| 20 6e 6f 20 6e 65 65 64 | 20 66 6f 72 20 79 6f 75 | no need| for you|
|00002cd0| 20 74 6f 20 6c 6f 6f 6b | 20 61 74 20 74 68 65 0a | to look| at the.|
|00002ce0| 61 64 64 72 65 73 73 2e | 20 20 44 6f 20 6e 6f 74 |address.| Do not|
|00002cf0| 20 66 72 65 65 20 74 68 | 65 20 73 74 6f 72 61 67 | free th|e storag|
|00002d00| 65 20 79 6f 75 72 73 65 | 6c 66 2e 0a 0a 20 20 20 |e yourse|lf... |
|00002d10| 57 69 74 68 20 74 68 65 | 20 55 6e 69 78 20 76 65 |With the| Unix ve|
|00002d20| 72 73 69 6f 6e 20 6f 66 | 20 74 65 72 6d 63 61 70 |rsion of| termcap|
|00002d30| 2c 20 79 6f 75 20 6d 75 | 73 74 20 61 6c 6c 6f 63 |, you mu|st alloc|
|00002d40| 61 74 65 20 73 70 61 63 | 65 20 66 6f 72 20 74 68 |ate spac|e for th|
|00002d50| 65 0a 64 65 73 63 72 69 | 70 74 69 6f 6e 20 79 6f |e.descri|ption yo|
|00002d60| 75 72 73 65 6c 66 20 61 | 6e 64 20 70 61 73 73 20 |urself a|nd pass |
|00002d70| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 20 74 |the addr|ess of t|
|00002d80| 68 65 20 73 70 61 63 65 | 20 61 73 20 74 68 65 20 |he space| as the |
|00002d90| 61 72 67 75 6d 65 6e 74 | 0a 42 55 46 46 45 52 2e |argument|.BUFFER.|
|00002da0| 20 20 54 68 65 72 65 20 | 69 73 20 6e 6f 20 77 61 | There |is no wa|
|00002db0| 79 20 79 6f 75 20 63 61 | 6e 20 74 65 6c 6c 20 68 |y you ca|n tell h|
|00002dc0| 6f 77 20 6d 75 63 68 20 | 73 70 61 63 65 20 69 73 |ow much |space is|
|00002dd0| 20 6e 65 65 64 65 64 2c | 20 73 6f 20 74 68 65 0a | needed,| so the.|
|00002de0| 63 6f 6e 76 65 6e 74 69 | 6f 6e 20 69 73 20 74 6f |conventi|on is to|
|00002df0| 20 61 6c 6c 6f 63 61 74 | 65 20 61 20 62 75 66 66 | allocat|e a buff|
|00002e00| 65 72 20 32 30 34 38 20 | 63 68 61 72 61 63 74 65 |er 2048 |characte|
|00002e10| 72 73 20 6c 6f 6e 67 20 | 61 6e 64 20 61 73 73 75 |rs long |and assu|
|00002e20| 6d 65 20 74 68 61 74 0a | 69 73 20 65 6e 6f 75 67 |me that.|is enoug|
|00002e30| 68 2e 20 20 28 46 6f 72 | 6d 65 72 6c 79 20 74 68 |h. (For|merly th|
|00002e40| 65 20 63 6f 6e 76 65 6e | 74 69 6f 6e 20 77 61 73 |e conven|tion was|
|00002e50| 20 74 6f 20 61 6c 6c 6f | 63 61 74 65 20 31 30 32 | to allo|cate 102|
|00002e60| 34 20 63 68 61 72 61 63 | 74 65 72 73 20 61 6e 64 |4 charac|ters and|
|00002e70| 0a 61 73 73 75 6d 65 20 | 74 68 61 74 20 77 61 73 |.assume |that was|
|00002e80| 20 65 6e 6f 75 67 68 2e | 20 20 42 75 74 20 6f 6e | enough.| But on|
|00002e90| 65 20 64 61 79 2c 20 66 | 6f 72 20 6f 6e 65 20 6b |e day, f|or one k|
|00002ea0| 69 6e 64 20 6f 66 20 74 | 65 72 6d 69 6e 61 6c 2c |ind of t|erminal,|
|00002eb0| 20 74 68 61 74 20 77 61 | 73 0a 6e 6f 74 20 65 6e | that wa|s.not en|
|00002ec0| 6f 75 67 68 2e 29 0a 0a | 20 20 20 4e 6f 20 6d 61 |ough.)..| No ma|
|00002ed0| 74 74 65 72 20 68 6f 77 | 20 74 68 65 20 73 70 61 |tter how| the spa|
|00002ee0| 63 65 20 74 6f 20 73 74 | 6f 72 65 20 74 68 65 20 |ce to st|ore the |
|00002ef0| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 68 61 73 20 |descript|ion has |
|00002f00| 62 65 65 6e 20 6f 62 74 | 61 69 6e 65 64 2c 0a 74 |been obt|ained,.t|
|00002f10| 65 72 6d 63 61 70 20 72 | 65 63 6f 72 64 73 20 69 |ermcap r|ecords i|
|00002f20| 74 73 20 61 64 64 72 65 | 73 73 20 69 6e 74 65 72 |ts addre|ss inter|
|00002f30| 6e 61 6c 6c 79 20 66 6f | 72 20 75 73 65 20 77 68 |nally fo|r use wh|
|00002f40| 65 6e 20 79 6f 75 20 6c | 61 74 65 72 0a 69 6e 74 |en you l|ater.int|
|00002f50| 65 72 72 6f 67 61 74 65 | 20 74 68 65 20 64 65 73 |errogate| the des|
|00002f60| 63 72 69 70 74 69 6f 6e | 20 77 69 74 68 20 60 74 |cription| with `t|
|00002f70| 67 65 74 6e 75 6d 27 2c | 20 60 74 67 65 74 73 74 |getnum',| `tgetst|
|00002f80| 72 27 20 6f 72 20 60 74 | 67 65 74 66 6c 61 67 27 |r' or `t|getflag'|
|00002f90| 2e 20 20 49 66 0a 74 68 | 65 20 62 75 66 66 65 72 |. If.th|e buffer|
|00002fa0| 20 77 61 73 20 61 6c 6c | 6f 63 61 74 65 64 20 62 | was all|ocated b|
|00002fb0| 79 20 74 65 72 6d 63 61 | 70 2c 20 69 74 20 77 69 |y termca|p, it wi|
|00002fc0| 6c 6c 20 62 65 20 66 72 | 65 65 64 20 62 79 20 74 |ll be fr|eed by t|
|00002fd0| 65 72 6d 63 61 70 20 74 | 6f 6f 20 69 66 0a 79 6f |ermcap t|oo if.yo|
|00002fe0| 75 20 63 61 6c 6c 20 60 | 74 67 65 74 65 6e 74 27 |u call `|tgetent'|
|00002ff0| 20 61 67 61 69 6e 2e 20 | 20 49 66 20 74 68 65 20 | again. | If the |
|00003000| 62 75 66 66 65 72 20 77 | 61 73 20 70 72 6f 76 69 |buffer w|as provi|
|00003010| 64 65 64 20 62 79 20 79 | 6f 75 2c 20 79 6f 75 20 |ded by y|ou, you |
|00003020| 6d 75 73 74 0a 6d 61 6b | 65 20 73 75 72 65 20 74 |must.mak|e sure t|
|00003030| 68 61 74 20 69 74 73 20 | 63 6f 6e 74 65 6e 74 73 |hat its |contents|
|00003040| 20 72 65 6d 61 69 6e 20 | 75 6e 63 68 61 6e 67 65 | remain |unchange|
|00003050| 64 20 66 6f 72 20 61 73 | 20 6c 6f 6e 67 20 61 73 |d for as| long as|
|00003060| 20 79 6f 75 20 73 74 69 | 6c 6c 0a 70 6c 61 6e 20 | you sti|ll.plan |
|00003070| 74 6f 20 69 6e 74 65 72 | 72 6f 67 61 74 65 20 74 |to inter|rogate t|
|00003080| 68 65 20 64 65 73 63 72 | 69 70 74 69 6f 6e 2e 0a |he descr|iption..|
|00003090| 0a 20 20 20 54 68 65 20 | 72 65 74 75 72 6e 20 76 |. The |return v|
|000030a0| 61 6c 75 65 20 6f 66 20 | 60 74 67 65 74 65 6e 74 |alue of |`tgetent|
|000030b0| 27 20 69 73 20 2d 31 20 | 69 66 20 74 68 65 72 65 |' is -1 |if there|
|000030c0| 20 69 73 20 73 6f 6d 65 | 20 64 69 66 66 69 63 75 | is some| difficu|
|000030d0| 6c 74 79 0a 61 63 63 65 | 73 73 69 6e 67 20 74 68 |lty.acce|ssing th|
|000030e0| 65 20 64 61 74 61 20 62 | 61 73 65 20 6f 66 20 74 |e data b|ase of t|
|000030f0| 65 72 6d 69 6e 61 6c 20 | 74 79 70 65 73 2c 20 30 |erminal |types, 0|
|00003100| 20 69 66 20 74 68 65 20 | 64 61 74 61 20 62 61 73 | if the |data bas|
|00003110| 65 20 69 73 0a 61 63 63 | 65 73 73 69 62 6c 65 20 |e is.acc|essible |
|00003120| 62 75 74 20 74 68 65 20 | 73 70 65 63 69 66 69 65 |but the |specifie|
|00003130| 64 20 74 79 70 65 20 69 | 73 20 6e 6f 74 20 64 65 |d type i|s not de|
|00003140| 66 69 6e 65 64 20 69 6e | 20 69 74 2c 20 61 6e 64 |fined in| it, and|
|00003150| 20 73 6f 6d 65 20 6f 74 | 68 65 72 0a 76 61 6c 75 | some ot|her.valu|
|00003160| 65 20 6f 74 68 65 72 77 | 69 73 65 2e 0a 0a 20 20 |e otherw|ise... |
|00003170| 20 48 65 72 65 20 69 73 | 20 68 6f 77 20 79 6f 75 | Here is| how you|
|00003180| 20 6d 69 67 68 74 20 75 | 73 65 20 74 68 65 20 66 | might u|se the f|
|00003190| 75 6e 63 74 69 6f 6e 20 | 60 74 67 65 74 65 6e 74 |unction |`tgetent|
|000031a0| 27 3a 0a 0a 20 20 20 20 | 20 23 69 66 64 65 66 20 |':.. | #ifdef |
|000031b0| 75 6e 69 78 0a 20 20 20 | 20 20 73 74 61 74 69 63 |unix. | static|
|000031c0| 20 63 68 61 72 20 74 65 | 72 6d 5f 62 75 66 66 65 | char te|rm_buffe|
|000031d0| 72 5b 32 30 34 38 5d 3b | 0a 20 20 20 20 20 23 65 |r[2048];|. #e|
|000031e0| 6c 73 65 0a 20 20 20 20 | 20 23 64 65 66 69 6e 65 |lse. | #define|
|000031f0| 20 74 65 72 6d 5f 62 75 | 66 66 65 72 20 30 0a 20 | term_bu|ffer 0. |
|00003200| 20 20 20 20 23 65 6e 64 | 69 66 0a 20 20 20 20 20 | #end|if. |
|00003210| 0a 20 20 20 20 20 69 6e | 69 74 5f 74 65 72 6d 69 |. in|it_termi|
|00003220| 6e 61 6c 5f 64 61 74 61 | 20 28 29 0a 20 20 20 20 |nal_data| (). |
|00003230| 20 7b 0a 20 20 20 20 20 | 20 20 63 68 61 72 20 2a | {. | char *|
|00003240| 74 65 72 6d 74 79 70 65 | 20 3d 20 67 65 74 65 6e |termtype| = geten|
|00003250| 76 20 28 22 54 45 52 4d | 22 29 3b 0a 20 20 20 20 |v ("TERM|");. |
|00003260| 20 20 20 69 6e 74 20 73 | 75 63 63 65 73 73 3b 0a | int s|uccess;.|
|00003270| 20 20 20 20 20 0a 20 20 | 20 20 20 20 20 69 66 20 | . | if |
|00003280| 28 74 65 72 6d 74 79 70 | 65 20 3d 3d 20 30 29 0a |(termtyp|e == 0).|
|00003290| 20 20 20 20 20 20 20 20 | 20 66 61 74 61 6c 20 28 | | fatal (|
|000032a0| 22 53 70 65 63 69 66 79 | 20 61 20 74 65 72 6d 69 |"Specify| a termi|
|000032b0| 6e 61 6c 20 74 79 70 65 | 20 77 69 74 68 20 60 73 |nal type| with `s|
|000032c0| 65 74 65 6e 76 20 54 45 | 52 4d 20 3c 79 6f 75 72 |etenv TE|RM <your|
|000032d0| 74 79 70 65 3e 27 2e 5c | 6e 22 29 3b 0a 20 20 20 |type>'.\|n");. |
|000032e0| 20 20 0a 20 20 20 20 20 | 20 20 73 75 63 63 65 73 | . | succes|
|000032f0| 73 20 3d 20 74 67 65 74 | 65 6e 74 20 28 74 65 72 |s = tget|ent (ter|
|00003300| 6d 5f 62 75 66 66 65 72 | 2c 20 74 65 72 6d 74 79 |m_buffer|, termty|
|00003310| 70 65 29 3b 0a 20 20 20 | 20 20 20 20 69 66 20 28 |pe);. | if (|
|00003320| 73 75 63 63 65 73 73 20 | 3c 20 30 29 0a 20 20 20 |success |< 0). |
|00003330| 20 20 20 20 20 20 66 61 | 74 61 6c 20 28 22 43 6f | fa|tal ("Co|
|00003340| 75 6c 64 20 6e 6f 74 20 | 61 63 63 65 73 73 20 74 |uld not |access t|
|00003350| 68 65 20 74 65 72 6d 63 | 61 70 20 64 61 74 61 20 |he termc|ap data |
|00003360| 62 61 73 65 2e 5c 6e 22 | 29 3b 0a 20 20 20 20 20 |base.\n"|);. |
|00003370| 20 20 69 66 20 28 73 75 | 63 63 65 73 73 20 3d 3d | if (su|ccess ==|
|00003380| 20 30 29 0a 20 20 20 20 | 20 20 20 20 20 66 61 74 | 0). | fat|
|00003390| 61 6c 20 28 22 54 65 72 | 6d 69 6e 61 6c 20 74 79 |al ("Ter|minal ty|
|000033a0| 70 65 20 60 25 73 27 20 | 69 73 20 6e 6f 74 20 64 |pe `%s' |is not d|
|000033b0| 65 66 69 6e 65 64 2e 5c | 6e 22 2c 20 74 65 72 6d |efined.\|n", term|
|000033c0| 74 79 70 65 29 3b 0a 20 | 20 20 20 20 7d 0a 0a 48 |type);. | }..H|
|000033d0| 65 72 65 20 77 65 20 61 | 73 73 75 6d 65 20 74 68 |ere we a|ssume th|
|000033e0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 60 66 61 74 61 |e functi|on `fata|
|000033f0| 6c 27 20 70 72 69 6e 74 | 73 20 61 6e 20 65 72 72 |l' print|s an err|
|00003400| 6f 72 20 6d 65 73 73 61 | 67 65 20 61 6e 64 20 65 |or messa|ge and e|
|00003410| 78 69 74 73 2e 0a 0a 20 | 20 20 49 66 20 74 68 65 |xits... | If the|
|00003420| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 76 61 72 | environ|ment var|
|00003430| 69 61 62 6c 65 20 60 54 | 45 52 4d 43 41 50 27 20 |iable `T|ERMCAP' |
|00003440| 69 73 20 64 65 66 69 6e | 65 64 2c 20 69 74 73 20 |is defin|ed, its |
|00003450| 76 61 6c 75 65 20 69 73 | 20 75 73 65 64 0a 74 6f |value is| used.to|
|00003460| 20 6f 76 65 72 72 69 64 | 65 20 74 68 65 20 74 65 | overrid|e the te|
|00003470| 72 6d 69 6e 61 6c 20 74 | 79 70 65 20 64 61 74 61 |rminal t|ype data|
|00003480| 20 62 61 73 65 2e 20 20 | 54 68 65 20 66 75 6e 63 | base. |The func|
|00003490| 74 69 6f 6e 20 60 74 67 | 65 74 65 6e 74 27 20 63 |tion `tg|etent' c|
|000034a0| 68 65 63 6b 73 0a 74 68 | 65 20 76 61 6c 75 65 20 |hecks.th|e value |
|000034b0| 6f 66 20 60 54 45 52 4d | 43 41 50 27 20 61 75 74 |of `TERM|CAP' aut|
|000034c0| 6f 6d 61 74 69 63 61 6c | 6c 79 2e 20 20 49 66 20 |omatical|ly. If |
|000034d0| 74 68 65 20 76 61 6c 75 | 65 20 73 74 61 72 74 73 |the valu|e starts|
|000034e0| 20 77 69 74 68 20 60 2f | 27 0a 74 68 65 6e 20 69 | with `/|'.then i|
|000034f0| 74 20 69 73 20 74 61 6b | 65 6e 20 61 73 20 61 20 |t is tak|en as a |
|00003500| 66 69 6c 65 20 6e 61 6d | 65 20 74 6f 20 75 73 65 |file nam|e to use|
|00003510| 20 61 73 20 74 68 65 20 | 64 61 74 61 20 62 61 73 | as the |data bas|
|00003520| 65 20 66 69 6c 65 2c 20 | 69 6e 73 74 65 61 64 0a |e file, |instead.|
|00003530| 6f 66 20 60 2f 65 74 63 | 2f 74 65 72 6d 63 61 70 |of `/etc|/termcap|
|00003540| 27 20 77 68 69 63 68 20 | 69 73 20 74 68 65 20 73 |' which |is the s|
|00003550| 74 61 6e 64 61 72 64 20 | 64 61 74 61 20 62 61 73 |tandard |data bas|
|00003560| 65 2e 20 20 49 66 20 74 | 68 65 20 76 61 6c 75 65 |e. If t|he value|
|00003570| 20 64 6f 65 73 0a 6e 6f | 74 20 73 74 61 72 74 20 | does.no|t start |
|00003580| 77 69 74 68 20 60 2f 27 | 20 74 68 65 6e 20 69 74 |with `/'| then it|
|00003590| 20 69 73 20 69 74 73 65 | 6c 66 20 75 73 65 64 20 | is itse|lf used |
|000035a0| 61 73 20 74 68 65 20 74 | 65 72 6d 69 6e 61 6c 20 |as the t|erminal |
|000035b0| 64 65 73 63 72 69 70 74 | 69 6f 6e 2c 0a 70 72 6f |descript|ion,.pro|
|000035c0| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 65 20 74 |vided th|at the t|
|000035d0| 65 72 6d 69 6e 61 6c 20 | 74 79 70 65 20 54 45 52 |erminal |type TER|
|000035e0| 4d 54 59 50 45 20 69 73 | 20 61 6d 6f 6e 67 20 74 |MTYPE is| among t|
|000035f0| 68 65 20 74 79 70 65 73 | 20 69 74 20 63 6c 61 69 |he types| it clai|
|00003600| 6d 73 0a 74 6f 20 61 70 | 70 6c 79 20 74 6f 2e 20 |ms.to ap|ply to. |
|00003610| 20 40 7b 22 44 61 74 61 | 20 42 61 73 65 22 20 4c | @{"Data| Base" L|
|00003620| 69 6e 6b 20 22 44 61 74 | 61 20 42 61 73 65 22 7d |ink "Dat|a Base"}|
|00003630| 20 2c 20 66 6f 72 20 69 | 6e 66 6f 72 6d 61 74 69 | , for i|nformati|
|00003640| 6f 6e 20 6f 6e 20 74 68 | 65 20 66 6f 72 6d 61 74 |on on th|e format|
|00003650| 20 6f 66 20 61 0a 74 65 | 72 6d 69 6e 61 6c 20 64 | of a.te|rminal d|
|00003660| 65 73 63 72 69 70 74 69 | 6f 6e 2e 0a 0a 40 45 6e |escripti|on...@En|
|00003670| 64 4e 6f 64 65 0a 0a 0a | 40 4e 6f 64 65 20 22 49 |dNode...|@Node "I|
|00003680| 6e 74 65 72 72 6f 67 61 | 74 65 22 20 22 49 6e 74 |nterroga|te" "Int|
|00003690| 65 72 72 6f 67 61 74 65 | 22 0a 40 4e 65 78 74 20 |errogate|".@Next |
|000036a0| 22 49 6e 69 74 69 61 6c | 69 7a 65 22 20 22 49 6e |"Initial|ize" "In|
|000036b0| 69 74 69 61 6c 69 7a 65 | 22 0a 40 50 72 65 76 20 |itialize|".@Prev |
|000036c0| 22 46 69 6e 64 22 20 22 | 46 69 6e 64 22 0a 40 54 |"Find" "|Find".@T|
|000036d0| 6f 63 20 22 4c 69 62 72 | 61 72 79 22 20 22 4c 69 |oc "Libr|ary" "Li|
|000036e0| 62 72 61 72 79 22 0a 49 | 6e 74 65 72 72 6f 67 61 |brary".I|nterroga|
|000036f0| 74 69 6e 67 20 74 68 65 | 20 54 65 72 6d 69 6e 61 |ting the| Termina|
|00003700| 6c 20 44 65 73 63 72 69 | 70 74 69 6f 6e 0a 3d 3d |l Descri|ption.==|
|00003710| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003720| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003730| 3d 3d 3d 3d 0a 0a 20 20 | 20 45 61 63 68 20 70 69 |====.. | Each pi|
|00003740| 65 63 65 20 6f 66 20 69 | 6e 66 6f 72 6d 61 74 69 |ece of i|nformati|
|00003750| 6f 6e 20 72 65 63 6f 72 | 64 65 64 20 69 6e 20 61 |on recor|ded in a|
|00003760| 20 74 65 72 6d 69 6e 61 | 6c 20 64 65 73 63 72 69 | termina|l descri|
|00003770| 70 74 69 6f 6e 20 69 73 | 0a 63 61 6c 6c 65 64 20 |ption is|.called |
|00003780| 61 20 22 63 61 70 61 62 | 69 6c 69 74 79 22 2e 20 |a "capab|ility". |
|00003790| 20 45 61 63 68 20 64 65 | 66 69 6e 65 64 20 74 65 | Each de|fined te|
|000037a0| 72 6d 69 6e 61 6c 20 63 | 61 70 61 62 69 6c 69 74 |rminal c|apabilit|
|000037b0| 79 20 68 61 73 20 61 0a | 74 77 6f 2d 6c 65 74 74 |y has a.|two-lett|
|000037c0| 65 72 20 63 6f 64 65 20 | 6e 61 6d 65 20 61 6e 64 |er code |name and|
|000037d0| 20 61 20 73 70 65 63 69 | 66 69 63 20 6d 65 61 6e | a speci|fic mean|
|000037e0| 69 6e 67 2e 20 20 46 6f | 72 20 65 78 61 6d 70 6c |ing. Fo|r exampl|
|000037f0| 65 2c 20 74 68 65 20 6e | 75 6d 62 65 72 0a 6f 66 |e, the n|umber.of|
|00003800| 20 63 6f 6c 75 6d 6e 73 | 20 69 73 20 6e 61 6d 65 | columns| is name|
|00003810| 64 20 60 63 6f 27 2e 20 | 20 40 7b 22 43 61 70 61 |d `co'. | @{"Capa|
|00003820| 62 69 6c 69 74 69 65 73 | 22 20 4c 69 6e 6b 20 22 |bilities|" Link "|
|00003830| 43 61 70 61 62 69 6c 69 | 74 69 65 73 22 7d 20 2c |Capabili|ties"} ,|
|00003840| 20 66 6f 72 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 | for def|initions|
|00003850| 20 6f 66 20 61 6c 6c 0a | 74 68 65 20 73 74 61 6e | of all.|the stan|
|00003860| 64 61 72 64 20 63 61 70 | 61 62 69 6c 69 74 79 20 |dard cap|ability |
|00003870| 6e 61 6d 65 73 2e 0a 0a | 20 20 20 4f 6e 63 65 20 |names...| Once |
|00003880| 79 6f 75 20 68 61 76 65 | 20 66 6f 75 6e 64 20 74 |you have| found t|
|00003890| 68 65 20 70 72 6f 70 65 | 72 20 74 65 72 6d 69 6e |he prope|r termin|
|000038a0| 61 6c 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 77 |al descr|iption w|
|000038b0| 69 74 68 20 60 74 67 65 | 74 65 6e 74 27 0a 28 40 |ith `tge|tent'.(@|
|000038c0| 7b 22 46 69 6e 64 22 20 | 4c 69 6e 6b 20 22 46 69 |{"Find" |Link "Fi|
|000038d0| 6e 64 22 7d 29 2c 20 79 | 6f 75 72 20 61 70 70 6c |nd"}), y|our appl|
|000038e0| 69 63 61 74 69 6f 6e 20 | 70 72 6f 67 72 61 6d 20 |ication |program |
|000038f0| 6d 75 73 74 20 22 69 6e | 74 65 72 72 6f 67 61 74 |must "in|terrogat|
|00003900| 65 22 20 69 74 20 66 6f | 72 0a 76 61 72 69 6f 75 |e" it fo|r.variou|
|00003910| 73 20 74 65 72 6d 69 6e | 61 6c 20 63 61 70 61 62 |s termin|al capab|
|00003920| 69 6c 69 74 69 65 73 2e | 20 20 59 6f 75 20 6d 75 |ilities.| You mu|
|00003930| 73 74 20 73 70 65 63 69 | 66 79 20 74 68 65 20 74 |st speci|fy the t|
|00003940| 77 6f 2d 6c 65 74 74 65 | 72 20 63 6f 64 65 20 6f |wo-lette|r code o|
|00003950| 66 0a 74 68 65 20 63 61 | 70 61 62 69 6c 69 74 79 |f.the ca|pability|
|00003960| 20 77 68 6f 73 65 20 76 | 61 6c 75 65 20 79 6f 75 | whose v|alue you|
|00003970| 20 73 65 65 6b 2e 0a 0a | 20 20 20 43 61 70 61 62 | seek...| Capab|
|00003980| 69 6c 69 74 79 20 76 61 | 6c 75 65 73 20 63 61 6e |ility va|lues can|
|00003990| 20 62 65 20 6e 75 6d 65 | 72 69 63 2c 20 62 6f 6f | be nume|ric, boo|
|000039a0| 6c 65 61 6e 20 28 63 61 | 70 61 62 69 6c 69 74 79 |lean (ca|pability|
|000039b0| 20 69 73 20 65 69 74 68 | 65 72 0a 70 72 65 73 65 | is eith|er.prese|
|000039c0| 6e 74 20 6f 72 20 61 62 | 73 65 6e 74 29 20 6f 72 |nt or ab|sent) or|
|000039d0| 20 73 74 72 69 6e 67 73 | 2e 20 20 41 6e 79 20 70 | strings|. Any p|
|000039e0| 61 72 74 69 63 75 6c 61 | 72 20 63 61 70 61 62 69 |articula|r capabi|
|000039f0| 6c 69 74 79 20 61 6c 77 | 61 79 73 20 68 61 73 0a |lity alw|ays has.|
|00003a00| 74 68 65 20 73 61 6d 65 | 20 76 61 6c 75 65 20 74 |the same| value t|
|00003a10| 79 70 65 3b 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 |ype; for| example|
|00003a20| 2c 20 60 63 6f 27 20 61 | 6c 77 61 79 73 20 68 61 |, `co' a|lways ha|
|00003a30| 73 20 61 20 6e 75 6d 65 | 72 69 63 20 76 61 6c 75 |s a nume|ric valu|
|00003a40| 65 2c 0a 77 68 69 6c 65 | 20 60 61 6d 27 20 28 61 |e,.while| `am' (a|
|00003a50| 75 74 6f 6d 61 74 69 63 | 20 77 72 61 70 20 61 74 |utomatic| wrap at|
|00003a60| 20 6d 61 72 67 69 6e 29 | 20 69 73 20 61 6c 77 61 | margin)| is alwa|
|00003a70| 79 73 20 61 20 66 6c 61 | 67 2c 20 61 6e 64 20 60 |ys a fla|g, and `|
|00003a80| 63 6d 27 0a 28 63 75 72 | 73 6f 72 20 6d 6f 74 69 |cm'.(cur|sor moti|
|00003a90| 6f 6e 20 63 6f 6d 6d 61 | 6e 64 29 20 61 6c 77 61 |on comma|nd) alwa|
|00003aa0| 79 73 20 68 61 73 20 61 | 20 73 74 72 69 6e 67 20 |ys has a| string |
|00003ab0| 76 61 6c 75 65 2e 20 20 | 54 68 65 20 64 6f 63 75 |value. |The docu|
|00003ac0| 6d 65 6e 74 61 74 69 6f | 6e 0a 6f 66 20 65 61 63 |mentatio|n.of eac|
|00003ad0| 68 20 63 61 70 61 62 69 | 6c 69 74 79 20 73 61 79 |h capabi|lity say|
|00003ae0| 73 20 77 68 69 63 68 20 | 74 79 70 65 20 6f 66 20 |s which |type of |
|00003af0| 76 61 6c 75 65 20 69 74 | 20 68 61 73 2e 0a 0a 20 |value it| has... |
|00003b00| 20 20 54 68 65 72 65 20 | 61 72 65 20 74 68 72 65 | There |are thre|
|00003b10| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 74 6f 20 75 |e functi|ons to u|
|00003b20| 73 65 20 74 6f 20 67 65 | 74 20 74 68 65 20 76 61 |se to ge|t the va|
|00003b30| 6c 75 65 20 6f 66 20 61 | 20 63 61 70 61 62 69 6c |lue of a| capabil|
|00003b40| 69 74 79 2c 0a 64 65 70 | 65 6e 64 69 6e 67 20 6f |ity,.dep|ending o|
|00003b50| 6e 20 74 68 65 20 74 79 | 70 65 20 6f 66 20 76 61 |n the ty|pe of va|
|00003b60| 6c 75 65 20 74 68 65 20 | 63 61 70 61 62 69 6c 69 |lue the |capabili|
|00003b70| 74 79 20 68 61 73 2e 20 | 20 48 65 72 65 20 61 72 |ty has. | Here ar|
|00003b80| 65 20 74 68 65 69 72 0a | 64 65 63 6c 61 72 61 74 |e their.|declarat|
|00003b90| 69 6f 6e 73 20 69 6e 20 | 41 4e 53 49 20 43 3a 0a |ions in |ANSI C:.|
|00003ba0| 0a 20 20 20 20 20 69 6e | 74 20 74 67 65 74 6e 75 |. in|t tgetnu|
|00003bb0| 6d 20 28 63 68 61 72 20 | 2a 4e 41 4d 45 29 3b 0a |m (char |*NAME);.|
|00003bc0| 20 20 20 20 20 69 6e 74 | 20 74 67 65 74 66 6c 61 | int| tgetfla|
|00003bd0| 67 20 28 63 68 61 72 20 | 2a 4e 41 4d 45 29 3b 0a |g (char |*NAME);.|
|00003be0| 20 20 20 20 20 63 68 61 | 72 20 2a 74 67 65 74 73 | cha|r *tgets|
|00003bf0| 74 72 20 28 63 68 61 72 | 20 2a 4e 41 4d 45 2c 20 |tr (char| *NAME, |
|00003c00| 63 68 61 72 20 2a 2a 41 | 52 45 41 29 3b 0a 0a 60 |char **A|REA);..`|
|00003c10| 74 67 65 74 6e 75 6d 27 | 0a 20 20 20 20 20 55 73 |tgetnum'|. Us|
|00003c20| 65 20 60 74 67 65 74 6e | 75 6d 27 20 74 6f 20 67 |e `tgetn|um' to g|
|00003c30| 65 74 20 61 20 63 61 70 | 61 62 69 6c 69 74 79 20 |et a cap|ability |
|00003c40| 76 61 6c 75 65 20 74 68 | 61 74 20 69 73 20 6e 75 |value th|at is nu|
|00003c50| 6d 65 72 69 63 2e 20 20 | 54 68 65 0a 20 20 20 20 |meric. |The. |
|00003c60| 20 61 72 67 75 6d 65 6e | 74 20 4e 41 4d 45 20 69 | argumen|t NAME i|
|00003c70| 73 20 74 68 65 20 74 77 | 6f 2d 6c 65 74 74 65 72 |s the tw|o-letter|
|00003c80| 20 63 6f 64 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 | code na|me of th|
|00003c90| 65 20 63 61 70 61 62 69 | 6c 69 74 79 2e 20 20 49 |e capabi|lity. I|
|00003ca0| 66 0a 20 20 20 20 20 74 | 68 65 20 63 61 70 61 62 |f. t|he capab|
|00003cb0| 69 6c 69 74 79 20 69 73 | 20 70 72 65 73 65 6e 74 |ility is| present|
|00003cc0| 2c 20 60 74 67 65 74 6e | 75 6d 27 20 72 65 74 75 |, `tgetn|um' retu|
|00003cd0| 72 6e 73 20 74 68 65 20 | 6e 75 6d 65 72 69 63 20 |rns the |numeric |
|00003ce0| 76 61 6c 75 65 0a 20 20 | 20 20 20 28 77 68 69 63 |value. | (whic|
|00003cf0| 68 20 69 73 20 6e 6f 6e | 6e 65 67 61 74 69 76 65 |h is non|negative|
|00003d00| 29 2e 20 20 49 66 20 74 | 68 65 20 63 61 70 61 62 |). If t|he capab|
|00003d10| 69 6c 69 74 79 20 69 73 | 20 6e 6f 74 20 6d 65 6e |ility is| not men|
|00003d20| 74 69 6f 6e 65 64 20 69 | 6e 20 74 68 65 0a 20 20 |tioned i|n the. |
|00003d30| 20 20 20 74 65 72 6d 69 | 6e 61 6c 20 64 65 73 63 | termi|nal desc|
|00003d40| 72 69 70 74 69 6f 6e 2c | 20 60 74 67 65 74 6e 75 |ription,| `tgetnu|
|00003d50| 6d 27 20 72 65 74 75 72 | 6e 73 20 2d 31 2e 0a 0a |m' retur|ns -1...|
|00003d60| 60 74 67 65 74 66 6c 61 | 67 27 0a 20 20 20 20 20 |`tgetfla|g'. |
|00003d70| 55 73 65 20 60 74 67 65 | 74 66 6c 61 67 27 20 74 |Use `tge|tflag' t|
|00003d80| 6f 20 67 65 74 20 61 20 | 62 6f 6f 6c 65 61 6e 20 |o get a |boolean |
|00003d90| 76 61 6c 75 65 2e 20 20 | 49 66 20 74 68 65 20 63 |value. |If the c|
|00003da0| 61 70 61 62 69 6c 69 74 | 79 20 4e 41 4d 45 20 69 |apabilit|y NAME i|
|00003db0| 73 0a 20 20 20 20 20 70 | 72 65 73 65 6e 74 20 69 |s. p|resent i|
|00003dc0| 6e 20 74 68 65 20 74 65 | 72 6d 69 6e 61 6c 20 64 |n the te|rminal d|
|00003dd0| 65 73 63 72 69 70 74 69 | 6f 6e 2c 20 60 74 67 65 |escripti|on, `tge|
|00003de0| 74 66 6c 61 67 27 20 72 | 65 74 75 72 6e 73 20 31 |tflag' r|eturns 1|
|00003df0| 3b 0a 20 20 20 20 20 6f | 74 68 65 72 77 69 73 65 |;. o|therwise|
|00003e00| 2c 20 69 74 20 72 65 74 | 75 72 6e 73 20 30 2e 0a |, it ret|urns 0..|
|00003e10| 0a 60 74 67 65 74 73 74 | 72 27 0a 20 20 20 20 20 |.`tgetst|r'. |
|00003e20| 55 73 65 20 60 74 67 65 | 74 73 74 72 27 20 74 6f |Use `tge|tstr' to|
|00003e30| 20 67 65 74 20 61 20 73 | 74 72 69 6e 67 20 76 61 | get a s|tring va|
|00003e40| 6c 75 65 2e 20 20 49 74 | 20 72 65 74 75 72 6e 73 |lue. It| returns|
|00003e50| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 61 0a | a point|er to a.|
|00003e60| 20 20 20 20 20 73 74 72 | 69 6e 67 20 77 68 69 63 | str|ing whic|
|00003e70| 68 20 69 73 20 74 68 65 | 20 63 61 70 61 62 69 6c |h is the| capabil|
|00003e80| 69 74 79 20 76 61 6c 75 | 65 2c 20 6f 72 20 61 20 |ity valu|e, or a |
|00003e90| 6e 75 6c 6c 20 70 6f 69 | 6e 74 65 72 20 69 66 20 |null poi|nter if |
|00003ea0| 74 68 65 0a 20 20 20 20 | 20 63 61 70 61 62 69 6c |the. | capabil|
|00003eb0| 69 74 79 20 69 73 20 6e | 6f 74 20 70 72 65 73 65 |ity is n|ot prese|
|00003ec0| 6e 74 20 69 6e 20 74 68 | 65 20 74 65 72 6d 69 6e |nt in th|e termin|
|00003ed0| 61 6c 20 64 65 73 63 72 | 69 70 74 69 6f 6e 2e 0a |al descr|iption..|
|00003ee0| 0a 20 20 20 20 20 54 68 | 65 72 65 20 61 72 65 20 |. Th|ere are |
|00003ef0| 74 77 6f 20 77 61 79 73 | 20 60 74 67 65 74 73 74 |two ways| `tgetst|
|00003f00| 72 27 20 63 61 6e 20 66 | 69 6e 64 20 73 70 61 63 |r' can f|ind spac|
|00003f10| 65 20 74 6f 20 73 74 6f | 72 65 20 74 68 65 20 73 |e to sto|re the s|
|00003f20| 74 72 69 6e 67 0a 20 20 | 20 20 20 76 61 6c 75 65 |tring. | value|
|00003f30| 3a 0a 0a 20 20 20 20 20 | 20 20 20 2a 20 59 6f 75 |:.. | * You|
|00003f40| 20 63 61 6e 20 61 73 6b | 20 60 74 67 65 74 73 74 | can ask| `tgetst|
|00003f50| 72 27 20 74 6f 20 61 6c | 6c 6f 63 61 74 65 20 74 |r' to al|locate t|
|00003f60| 68 65 20 73 70 61 63 65 | 2e 20 20 50 61 73 73 20 |he space|. Pass |
|00003f70| 61 20 6e 75 6c 6c 0a 20 | 20 20 20 20 20 20 20 20 |a null. | |
|00003f80| 20 70 6f 69 6e 74 65 72 | 20 66 6f 72 20 74 68 65 | pointer| for the|
|00003f90| 20 61 72 67 75 6d 65 6e | 74 20 41 52 45 41 2c 20 | argumen|t AREA, |
|00003fa0| 61 6e 64 20 60 74 67 65 | 74 73 74 72 27 20 77 69 |and `tge|tstr' wi|
|00003fb0| 6c 6c 20 75 73 65 0a 20 | 20 20 20 20 20 20 20 20 |ll use. | |
|00003fc0| 20 60 6d 61 6c 6c 6f 63 | 27 20 74 6f 20 61 6c 6c | `malloc|' to all|
|00003fd0| 6f 63 61 74 65 20 73 74 | 6f 72 61 67 65 20 62 69 |ocate st|orage bi|
|00003fe0| 67 20 65 6e 6f 75 67 68 | 20 66 6f 72 20 74 68 65 |g enough| for the|
|00003ff0| 20 76 61 6c 75 65 2e 0a | 20 20 20 20 20 20 20 20 | value..| |
|00004000| 20 20 54 65 72 6d 63 61 | 70 20 77 69 6c 6c 20 6e | Termca|p will n|
|00004010| 65 76 65 72 20 66 72 65 | 65 20 74 68 69 73 20 73 |ever fre|e this s|
|00004020| 74 6f 72 61 67 65 20 6f | 72 20 72 65 66 65 72 20 |torage o|r refer |
|00004030| 74 6f 20 69 74 20 61 67 | 61 69 6e 3b 20 79 6f 75 |to it ag|ain; you|
|00004040| 0a 20 20 20 20 20 20 20 | 20 20 20 73 68 6f 75 6c |. | shoul|
|00004050| 64 20 66 72 65 65 20 69 | 74 20 77 68 65 6e 20 79 |d free i|t when y|
|00004060| 6f 75 20 61 72 65 20 66 | 69 6e 69 73 68 65 64 20 |ou are f|inished |
|00004070| 77 69 74 68 20 69 74 2e | 0a 0a 20 20 20 20 20 20 |with it.|.. |
|00004080| 20 20 20 20 54 68 69 73 | 20 6d 65 74 68 6f 64 20 | This| method |
|00004090| 69 73 20 6d 6f 72 65 20 | 72 6f 62 75 73 74 2c 20 |is more |robust, |
|000040a0| 73 69 6e 63 65 20 74 68 | 65 72 65 20 69 73 20 6e |since th|ere is n|
|000040b0| 6f 20 6e 65 65 64 20 74 | 6f 20 67 75 65 73 73 0a |o need t|o guess.|
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 68 6f 77 20 6d 75 | | how mu|
|000040d0| 63 68 20 73 70 61 63 65 | 20 69 73 20 6e 65 65 64 |ch space| is need|
|000040e0| 65 64 2e 20 20 42 75 74 | 20 69 74 20 69 73 20 73 |ed. But| it is s|
|000040f0| 75 70 70 6f 72 74 65 64 | 20 6f 6e 6c 79 20 62 79 |upported| only by|
|00004100| 20 74 68 65 20 47 4e 55 | 0a 20 20 20 20 20 20 20 | the GNU|. |
|00004110| 20 20 20 74 65 72 6d 63 | 61 70 20 6c 69 62 72 61 | termc|ap libra|
|00004120| 72 79 2e 0a 0a 20 20 20 | 20 20 20 20 20 2a 20 59 |ry... | * Y|
|00004130| 6f 75 20 63 61 6e 20 70 | 72 6f 76 69 64 65 20 74 |ou can p|rovide t|
|00004140| 68 65 20 73 70 61 63 65 | 2e 20 20 50 72 6f 76 69 |he space|. Provi|
|00004150| 64 65 20 66 6f 72 20 74 | 68 65 20 61 72 67 75 6d |de for t|he argum|
|00004160| 65 6e 74 20 41 52 45 41 | 20 74 68 65 0a 20 20 20 |ent AREA| the. |
|00004170| 20 20 20 20 20 20 20 61 | 64 64 72 65 73 73 20 6f | a|ddress o|
|00004180| 66 20 61 20 70 6f 69 6e | 74 65 72 20 76 61 72 69 |f a poin|ter vari|
|00004190| 61 62 6c 65 20 6f 66 20 | 74 79 70 65 20 60 63 68 |able of |type `ch|
|000041a0| 61 72 20 2a 27 2e 20 20 | 42 65 66 6f 72 65 0a 20 |ar *'. |Before. |
|000041b0| 20 20 20 20 20 20 20 20 | 20 63 61 6c 6c 69 6e 67 | | calling|
|000041c0| 20 60 74 67 65 74 73 74 | 72 27 2c 20 69 6e 69 74 | `tgetst|r', init|
|000041d0| 69 61 6c 69 7a 65 20 74 | 68 65 20 76 61 72 69 61 |ialize t|he varia|
|000041e0| 62 6c 65 20 74 6f 20 70 | 6f 69 6e 74 20 61 74 0a |ble to p|oint at.|
|000041f0| 20 20 20 20 20 20 20 20 | 20 20 61 76 61 69 6c 61 | | availa|
|00004200| 62 6c 65 20 73 70 61 63 | 65 2e 20 20 54 68 65 6e |ble spac|e. Then|
|00004210| 20 60 74 67 65 74 73 74 | 72 27 20 77 69 6c 6c 20 | `tgetst|r' will |
|00004220| 73 74 6f 72 65 20 74 68 | 65 20 73 74 72 69 6e 67 |store th|e string|
|00004230| 20 76 61 6c 75 65 0a 20 | 20 20 20 20 20 20 20 20 | value. | |
|00004240| 20 69 6e 20 74 68 61 74 | 20 73 70 61 63 65 20 61 | in that| space a|
|00004250| 6e 64 20 77 69 6c 6c 20 | 69 6e 63 72 65 6d 65 6e |nd will |incremen|
|00004260| 74 20 74 68 65 20 70 6f | 69 6e 74 65 72 20 76 61 |t the po|inter va|
|00004270| 72 69 61 62 6c 65 20 74 | 6f 0a 20 20 20 20 20 20 |riable t|o. |
|00004280| 20 20 20 20 70 6f 69 6e | 74 20 61 66 74 65 72 20 | poin|t after |
|00004290| 74 68 65 20 73 70 61 63 | 65 20 74 68 61 74 20 68 |the spac|e that h|
|000042a0| 61 73 20 62 65 65 6e 20 | 75 73 65 64 2e 20 20 59 |as been |used. Y|
|000042b0| 6f 75 20 63 61 6e 20 75 | 73 65 20 74 68 65 0a 20 |ou can u|se the. |
|000042c0| 20 20 20 20 20 20 20 20 | 20 73 61 6d 65 20 70 6f | | same po|
|000042d0| 69 6e 74 65 72 20 76 61 | 72 69 61 62 6c 65 20 66 |inter va|riable f|
|000042e0| 6f 72 20 6d 61 6e 79 20 | 63 61 6c 6c 73 20 74 6f |or many |calls to|
|000042f0| 20 60 74 67 65 74 73 74 | 72 27 2e 0a 0a 20 20 20 | `tgetst|r'... |
|00004300| 20 20 20 20 20 20 20 54 | 68 65 72 65 20 69 73 20 | T|here is |
|00004310| 6e 6f 20 77 61 79 20 74 | 6f 20 64 65 74 65 72 6d |no way t|o determ|
|00004320| 69 6e 65 20 68 6f 77 20 | 6d 75 63 68 20 73 70 61 |ine how |much spa|
|00004330| 63 65 20 69 73 20 6e 65 | 65 64 65 64 20 66 6f 72 |ce is ne|eded for|
|00004340| 20 61 0a 20 20 20 20 20 | 20 20 20 20 20 73 69 6e | a. | sin|
|00004350| 67 6c 65 20 73 74 72 69 | 6e 67 2c 20 61 6e 64 20 |gle stri|ng, and |
|00004360| 6e 6f 20 77 61 79 20 66 | 6f 72 20 79 6f 75 20 74 |no way f|or you t|
|00004370| 6f 20 70 72 65 76 65 6e | 74 20 6f 72 20 68 61 6e |o preven|t or han|
|00004380| 64 6c 65 0a 20 20 20 20 | 20 20 20 20 20 20 6f 76 |dle. | ov|
|00004390| 65 72 66 6c 6f 77 20 6f | 66 20 74 68 65 20 61 72 |erflow o|f the ar|
|000043a0| 65 61 20 79 6f 75 20 68 | 61 76 65 20 70 72 6f 76 |ea you h|ave prov|
|000043b0| 69 64 65 64 2e 20 20 48 | 6f 77 65 76 65 72 2c 20 |ided. H|owever, |
|000043c0| 79 6f 75 20 63 61 6e 20 | 62 65 0a 20 20 20 20 20 |you can |be. |
|000043d0| 20 20 20 20 20 73 75 72 | 65 20 74 68 61 74 20 74 | sur|e that t|
|000043e0| 68 65 20 74 6f 74 61 6c | 20 73 69 7a 65 20 6f 66 |he total| size of|
|000043f0| 20 61 6c 6c 20 74 68 65 | 20 73 74 72 69 6e 67 20 | all the| string |
|00004400| 76 61 6c 75 65 73 20 79 | 6f 75 20 77 69 6c 6c 0a |values y|ou will.|
|00004410| 20 20 20 20 20 20 20 20 | 20 20 6f 62 74 61 69 6e | | obtain|
|00004420| 20 66 72 6f 6d 20 74 68 | 65 20 74 65 72 6d 69 6e | from th|e termin|
|00004430| 61 6c 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 69 |al descr|iption i|
|00004440| 73 20 6e 6f 20 67 72 65 | 61 74 65 72 20 74 68 61 |s no gre|ater tha|
|00004450| 6e 20 74 68 65 0a 20 20 | 20 20 20 20 20 20 20 20 |n the. | |
|00004460| 73 69 7a 65 20 6f 66 20 | 74 68 65 20 64 65 73 63 |size of |the desc|
|00004470| 72 69 70 74 69 6f 6e 20 | 28 75 6e 6c 65 73 73 20 |ription |(unless |
|00004480| 79 6f 75 20 67 65 74 20 | 74 68 65 20 73 61 6d 65 |you get |the same|
|00004490| 20 63 61 70 61 62 69 6c | 69 74 79 0a 20 20 20 20 | capabil|ity. |
|000044a0| 20 20 20 20 20 20 74 77 | 69 63 65 29 2e 20 20 59 | tw|ice). Y|
|000044b0| 6f 75 20 63 61 6e 20 64 | 65 74 65 72 6d 69 6e 65 |ou can d|etermine|
|000044c0| 20 74 68 61 74 20 73 69 | 7a 65 20 77 69 74 68 20 | that si|ze with |
|000044d0| 60 73 74 72 6c 65 6e 27 | 20 6f 6e 20 74 68 65 0a |`strlen'| on the.|
|000044e0| 20 20 20 20 20 20 20 20 | 20 20 62 75 66 66 65 72 | | buffer|
|000044f0| 20 79 6f 75 20 70 72 6f | 76 69 64 65 64 20 74 6f | you pro|vided to|
|00004500| 20 60 74 67 65 74 65 6e | 74 27 2e 20 20 53 65 65 | `tgeten|t'. See|
|00004510| 20 62 65 6c 6f 77 20 66 | 6f 72 20 61 6e 20 65 78 | below f|or an ex|
|00004520| 61 6d 70 6c 65 2e 0a 0a | 20 20 20 20 20 20 20 20 |ample...| |
|00004530| 20 20 50 72 6f 76 69 64 | 69 6e 67 20 74 68 65 20 | Provid|ing the |
|00004540| 73 70 61 63 65 20 79 6f | 75 72 73 65 6c 66 20 69 |space yo|urself i|
|00004550| 73 20 74 68 65 20 6f 6e | 6c 79 20 6d 65 74 68 6f |s the on|ly metho|
|00004560| 64 20 73 75 70 70 6f 72 | 74 65 64 20 62 79 0a 20 |d suppor|ted by. |
|00004570| 20 20 20 20 20 20 20 20 | 20 74 68 65 20 55 6e 69 | | the Uni|
|00004580| 78 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 65 72 |x versio|n of ter|
|00004590| 6d 63 61 70 2e 0a 0a 20 | 20 20 4e 6f 74 65 20 74 |mcap... | Note t|
|000045a0| 68 61 74 20 79 6f 75 20 | 64 6f 20 6e 6f 74 20 68 |hat you |do not h|
|000045b0| 61 76 65 20 74 6f 20 73 | 70 65 63 69 66 79 20 61 |ave to s|pecify a|
|000045c0| 20 74 65 72 6d 69 6e 61 | 6c 20 74 79 70 65 20 6f | termina|l type o|
|000045d0| 72 20 74 65 72 6d 69 6e | 61 6c 0a 64 65 73 63 72 |r termin|al.descr|
|000045e0| 69 70 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 69 |iption f|or the i|
|000045f0| 6e 74 65 72 72 6f 67 61 | 74 69 6f 6e 20 66 75 6e |nterroga|tion fun|
|00004600| 63 74 69 6f 6e 73 2e 20 | 20 54 68 65 79 20 61 75 |ctions. | They au|
|00004610| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 75 73 65 20 |tomatica|lly use |
|00004620| 74 68 65 0a 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |the.desc|ription |
|00004630| 66 6f 75 6e 64 20 62 79 | 20 74 68 65 20 6d 6f 73 |found by| the mos|
|00004640| 74 20 72 65 63 65 6e 74 | 20 63 61 6c 6c 20 74 6f |t recent| call to|
|00004650| 20 60 74 67 65 74 65 6e | 74 27 2e 0a 0a 20 20 20 | `tgeten|t'... |
|00004660| 48 65 72 65 20 69 73 20 | 61 6e 20 65 78 61 6d 70 |Here is |an examp|
|00004670| 6c 65 20 6f 66 20 69 6e | 74 65 72 72 6f 67 61 74 |le of in|terrogat|
|00004680| 69 6e 67 20 61 20 74 65 | 72 6d 69 6e 61 6c 20 64 |ing a te|rminal d|
|00004690| 65 73 63 72 69 70 74 69 | 6f 6e 20 66 6f 72 0a 76 |escripti|on for.v|
|000046a0| 61 72 69 6f 75 73 20 63 | 61 70 61 62 69 6c 69 74 |arious c|apabilit|
|000046b0| 69 65 73 2c 20 77 69 74 | 68 20 63 6f 6e 64 69 74 |ies, wit|h condit|
|000046c0| 69 6f 6e 61 6c 73 20 74 | 6f 20 73 65 6c 65 63 74 |ionals t|o select|
|000046d0| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 55 6e 69 | between| the Uni|
|000046e0| 78 20 61 6e 64 0a 47 4e | 55 20 6d 65 74 68 6f 64 |x and.GN|U method|
|000046f0| 73 20 6f 66 20 70 72 6f | 76 69 64 69 6e 67 20 62 |s of pro|viding b|
|00004700| 75 66 66 65 72 20 73 70 | 61 63 65 2e 0a 0a 20 20 |uffer sp|ace... |
|00004710| 20 20 20 63 68 61 72 20 | 2a 74 67 65 74 73 74 72 | char |*tgetstr|
|00004720| 20 28 29 3b 0a 20 20 20 | 20 20 0a 20 20 20 20 20 | ();. | . |
|00004730| 63 68 61 72 20 2a 63 6c | 5f 73 74 72 69 6e 67 2c |char *cl|_string,|
|00004740| 20 2a 63 6d 5f 73 74 72 | 69 6e 67 3b 0a 20 20 20 | *cm_str|ing;. |
|00004750| 20 20 69 6e 74 20 68 65 | 69 67 68 74 3b 0a 20 20 | int he|ight;. |
|00004760| 20 20 20 69 6e 74 20 77 | 69 64 74 68 3b 0a 20 20 | int w|idth;. |
|00004770| 20 20 20 69 6e 74 20 61 | 75 74 6f 5f 77 72 61 70 | int a|uto_wrap|
|00004780| 3b 0a 20 20 20 20 20 0a | 20 20 20 20 20 63 68 61 |;. .| cha|
|00004790| 72 20 50 43 3b 20 20 20 | 2f 2a 20 46 6f 72 20 74 |r PC; |/* For t|
|000047a0| 70 75 74 73 2e 20 20 2a | 2f 0a 20 20 20 20 20 63 |puts. *|/. c|
|000047b0| 68 61 72 20 2a 42 43 3b | 20 20 2f 2a 20 46 6f 72 |har *BC;| /* For|
|000047c0| 20 74 67 6f 74 6f 2e 20 | 20 2a 2f 0a 20 20 20 20 | tgoto. | */. |
|000047d0| 20 63 68 61 72 20 2a 55 | 50 3b 0a 20 20 20 20 20 | char *U|P;. |
|000047e0| 0a 20 20 20 20 20 69 6e | 74 65 72 72 6f 67 61 74 |. in|terrogat|
|000047f0| 65 5f 74 65 72 6d 69 6e | 61 6c 20 28 29 0a 20 20 |e_termin|al (). |
|00004800| 20 20 20 7b 0a 20 20 20 | 20 20 23 69 66 64 65 66 | {. | #ifdef|
|00004810| 20 55 4e 49 58 0a 20 20 | 20 20 20 20 20 2f 2a 20 | UNIX. | /* |
|00004820| 48 65 72 65 20 77 65 20 | 61 73 73 75 6d 65 20 74 |Here we |assume t|
|00004830| 68 61 74 20 61 6e 20 65 | 78 70 6c 69 63 69 74 20 |hat an e|xplicit |
|00004840| 74 65 72 6d 5f 62 75 66 | 66 65 72 0a 20 20 20 20 |term_buf|fer. |
|00004850| 20 20 20 20 20 20 77 61 | 73 20 70 72 6f 76 69 64 | wa|s provid|
|00004860| 65 64 20 74 6f 20 74 67 | 65 74 65 6e 74 2e 20 20 |ed to tg|etent. |
|00004870| 2a 2f 0a 20 20 20 20 20 | 20 20 63 68 61 72 20 2a |*/. | char *|
|00004880| 62 75 66 66 65 72 0a 20 | 20 20 20 20 20 20 20 20 |buffer. | |
|00004890| 3d 20 28 63 68 61 72 20 | 2a 29 20 6d 61 6c 6c 6f |= (char |*) mallo|
|000048a0| 63 20 28 73 74 72 6c 65 | 6e 20 28 74 65 72 6d 5f |c (strle|n (term_|
|000048b0| 62 75 66 66 65 72 29 29 | 3b 0a 20 20 20 20 20 23 |buffer))|;. #|
|000048c0| 64 65 66 69 6e 65 20 42 | 55 46 46 41 44 44 52 20 |define B|UFFADDR |
|000048d0| 26 62 75 66 66 65 72 0a | 20 20 20 20 20 23 65 6c |&buffer.| #el|
|000048e0| 73 65 0a 20 20 20 20 20 | 23 64 65 66 69 6e 65 20 |se. |#define |
|000048f0| 42 55 46 46 41 44 44 52 | 20 30 0a 20 20 20 20 20 |BUFFADDR| 0. |
|00004900| 23 65 6e 64 69 66 0a 20 | 20 20 20 20 0a 20 20 20 |#endif. | . |
|00004910| 20 20 20 20 63 68 61 72 | 20 2a 74 65 6d 70 3b 0a | char| *temp;.|
|00004920| 20 20 20 20 20 0a 20 20 | 20 20 20 20 20 2f 2a 20 | . | /* |
|00004930| 45 78 74 72 61 63 74 20 | 69 6e 66 6f 72 6d 61 74 |Extract |informat|
|00004940| 69 6f 6e 20 77 65 20 77 | 69 6c 6c 20 75 73 65 2e |ion we w|ill use.|
|00004950| 20 20 2a 2f 0a 20 20 20 | 20 20 20 20 63 6c 5f 73 | */. | cl_s|
|00004960| 74 72 69 6e 67 20 3d 20 | 74 67 65 74 73 74 72 20 |tring = |tgetstr |
|00004970| 28 22 63 6c 22 2c 20 42 | 55 46 46 41 44 44 52 29 |("cl", B|UFFADDR)|
|00004980| 3b 0a 20 20 20 20 20 20 | 20 63 6d 5f 73 74 72 69 |;. | cm_stri|
|00004990| 6e 67 20 3d 20 74 67 65 | 74 73 74 72 20 28 22 63 |ng = tge|tstr ("c|
|000049a0| 6d 22 2c 20 42 55 46 46 | 41 44 44 52 29 3b 0a 20 |m", BUFF|ADDR);. |
|000049b0| 20 20 20 20 20 20 61 75 | 74 6f 5f 77 72 61 70 20 | au|to_wrap |
|000049c0| 3d 20 74 67 65 74 66 6c | 61 67 20 28 22 61 6d 22 |= tgetfl|ag ("am"|
|000049d0| 29 3b 0a 20 20 20 20 20 | 20 20 68 65 69 67 68 74 |);. | height|
|000049e0| 20 3d 20 74 67 65 74 6e | 75 6d 20 28 22 6c 69 22 | = tgetn|um ("li"|
|000049f0| 29 3b 0a 20 20 20 20 20 | 20 20 77 69 64 74 68 20 |);. | width |
|00004a00| 3d 20 74 67 65 74 6e 75 | 6d 20 28 22 63 6f 22 29 |= tgetnu|m ("co")|
|00004a10| 3b 0a 20 20 20 20 20 0a | 20 20 20 20 20 20 20 2f |;. .| /|
|00004a20| 2a 20 45 78 74 72 61 63 | 74 20 69 6e 66 6f 72 6d |* Extrac|t inform|
|00004a30| 61 74 69 6f 6e 20 74 68 | 61 74 20 74 65 72 6d 63 |ation th|at termc|
|00004a40| 61 70 20 66 75 6e 63 74 | 69 6f 6e 73 20 75 73 65 |ap funct|ions use|
|00004a50| 2e 20 20 2a 2f 0a 20 20 | 20 20 20 20 20 74 65 6d |. */. | tem|
|00004a60| 70 20 3d 20 74 67 65 74 | 73 74 72 20 28 22 70 63 |p = tget|str ("pc|
|00004a70| 22 2c 20 42 55 46 46 41 | 44 44 52 29 3b 0a 20 20 |", BUFFA|DDR);. |
|00004a80| 20 20 20 20 20 50 43 20 | 3d 20 74 65 6d 70 20 3f | PC |= temp ?|
|00004a90| 20 2a 74 65 6d 70 20 3a | 20 30 3b 0a 20 20 20 20 | *temp :| 0;. |
|00004aa0| 20 20 20 42 43 20 3d 20 | 74 67 65 74 73 74 72 20 | BC = |tgetstr |
|00004ab0| 28 22 6c 65 22 2c 20 42 | 55 46 46 41 44 44 52 29 |("le", B|UFFADDR)|
|00004ac0| 3b 0a 20 20 20 20 20 20 | 20 55 50 20 3d 20 74 67 |;. | UP = tg|
|00004ad0| 65 74 73 74 72 20 28 22 | 75 70 22 2c 20 42 55 46 |etstr ("|up", BUF|
|00004ae0| 46 41 44 44 52 29 3b 0a | 20 20 20 20 20 7d 0a 0a |FADDR);.| }..|
|00004af0| 40 7b 22 50 61 64 64 69 | 6e 67 22 20 4c 69 6e 6b |@{"Paddi|ng" Link|
|00004b00| 20 22 50 61 64 64 69 6e | 67 22 7d 20 2c 20 66 6f | "Paddin|g"} , fo|
|00004b10| 72 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 6f 6e |r inform|ation on|
|00004b20| 20 74 68 65 20 76 61 72 | 69 61 62 6c 65 20 60 50 | the var|iable `P|
|00004b30| 43 27 2e 20 20 0a 40 7b | 22 55 73 69 6e 67 20 50 |C'. .@{|"Using P|
|00004b40| 61 72 61 6d 65 74 65 72 | 73 22 20 4c 69 6e 6b 20 |arameter|s" Link |
|00004b50| 22 55 73 69 6e 67 20 50 | 61 72 61 6d 65 74 65 72 |"Using P|arameter|
|00004b60| 73 22 7d 20 2c 20 66 6f | 72 20 69 6e 66 6f 72 6d |s"} , fo|r inform|
|00004b70| 61 74 69 6f 6e 20 6f 6e | 20 60 55 50 27 20 61 6e |ation on| `UP' an|
|00004b80| 64 20 60 42 43 27 2e 0a | 0a 40 45 6e 64 4e 6f 64 |d `BC'..|.@EndNod|
|00004b90| 65 0a 0a 0a 40 4e 6f 64 | 65 20 22 49 6e 69 74 69 |e...@Nod|e "Initi|
|00004ba0| 61 6c 69 7a 65 22 20 22 | 49 6e 69 74 69 61 6c 69 |alize" "|Initiali|
|00004bb0| 7a 65 22 0a 40 4e 65 78 | 74 20 22 50 61 64 64 69 |ze".@Nex|t "Paddi|
|00004bc0| 6e 67 22 20 22 50 61 64 | 64 69 6e 67 22 0a 40 50 |ng" "Pad|ding".@P|
|00004bd0| 72 65 76 20 22 49 6e 74 | 65 72 72 6f 67 61 74 65 |rev "Int|errogate|
|00004be0| 22 20 22 49 6e 74 65 72 | 72 6f 67 61 74 65 22 0a |" "Inter|rogate".|
|00004bf0| 40 54 6f 63 20 22 4c 69 | 62 72 61 72 79 22 20 22 |@Toc "Li|brary" "|
|00004c00| 4c 69 62 72 61 72 79 22 | 0a 49 6e 69 74 69 61 6c |Library"|.Initial|
|00004c10| 69 7a 61 74 69 6f 6e 20 | 66 6f 72 20 55 73 65 20 |ization |for Use |
|00004c20| 6f 66 20 54 65 72 6d 63 | 61 70 0a 3d 3d 3d 3d 3d |of Termc|ap.=====|
|00004c30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004c40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0a 0a 20 20 |========|====.. |
|00004c50| 20 42 65 66 6f 72 65 20 | 73 74 61 72 74 69 6e 67 | Before |starting|
|00004c60| 20 74 6f 20 6f 75 74 70 | 75 74 20 63 6f 6d 6d 61 | to outp|ut comma|
|00004c70| 6e 64 73 20 74 6f 20 61 | 20 74 65 72 6d 69 6e 61 |nds to a| termina|
|00004c80| 6c 20 75 73 69 6e 67 20 | 74 65 72 6d 63 61 70 2c |l using |termcap,|
|00004c90| 20 61 6e 0a 61 70 70 6c | 69 63 61 74 69 6f 6e 20 | an.appl|ication |
|00004ca0| 70 72 6f 67 72 61 6d 20 | 73 68 6f 75 6c 64 20 64 |program |should d|
|00004cb0| 6f 20 74 77 6f 20 74 68 | 69 6e 67 73 3a 0a 0a 20 |o two th|ings:.. |
|00004cc0| 20 20 2a 20 49 6e 69 74 | 69 61 6c 69 7a 65 20 76 | * Init|ialize v|
|00004cd0| 61 72 69 6f 75 73 20 67 | 6c 6f 62 61 6c 20 76 61 |arious g|lobal va|
|00004ce0| 72 69 61 62 6c 65 73 20 | 77 68 69 63 68 20 74 65 |riables |which te|
|00004cf0| 72 6d 63 61 70 20 6c 69 | 62 72 61 72 79 20 6f 75 |rmcap li|brary ou|
|00004d00| 74 70 75 74 0a 20 20 20 | 20 20 66 75 6e 63 74 69 |tput. | functi|
|00004d10| 6f 6e 73 20 72 65 66 65 | 72 20 74 6f 2e 20 20 54 |ons refe|r to. T|
|00004d20| 68 65 73 65 20 69 6e 63 | 6c 75 64 65 20 60 50 43 |hese inc|lude `PC|
|00004d30| 27 20 61 6e 64 20 60 6f | 73 70 65 65 64 27 20 66 |' and `o|speed' f|
|00004d40| 6f 72 20 70 61 64 64 69 | 6e 67 0a 20 20 20 20 20 |or paddi|ng. |
|00004d50| 28 40 7b 22 4f 75 74 70 | 75 74 20 50 61 64 64 69 |(@{"Outp|ut Paddi|
|00004d60| 6e 67 22 20 4c 69 6e 6b | 20 22 4f 75 74 70 75 74 |ng" Link| "Output|
|00004d70| 20 50 61 64 64 69 6e 67 | 22 7d 29 20 61 6e 64 20 | Padding|"}) and |
|00004d80| 60 55 50 27 20 61 6e 64 | 20 60 42 43 27 20 66 6f |`UP' and| `BC' fo|
|00004d90| 72 20 63 75 72 73 6f 72 | 20 6d 6f 74 69 6f 6e 0a |r cursor| motion.|
|00004da0| 20 20 20 20 20 28 40 7b | 22 74 67 6f 74 6f 22 20 | (@{|"tgoto" |
|00004db0| 4c 69 6e 6b 20 22 74 67 | 6f 74 6f 22 7d 29 2e 0a |Link "tg|oto"})..|
|00004dc0| 0a 20 20 20 2a 20 54 65 | 6c 6c 20 74 68 65 20 6b |. * Te|ll the k|
|00004dd0| 65 72 6e 65 6c 20 74 6f | 20 74 75 72 6e 20 6f 66 |ernel to| turn of|
|00004de0| 66 20 61 6c 74 65 72 61 | 74 69 6f 6e 20 61 6e 64 |f altera|tion and|
|00004df0| 20 70 61 64 64 69 6e 67 | 20 6f 66 0a 20 20 20 20 | padding| of. |
|00004e00| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 2d 74 61 62 20 | horizon|tal-tab |
|00004e10| 63 68 61 72 61 63 74 65 | 72 73 20 73 65 6e 74 20 |characte|rs sent |
|00004e20| 74 6f 20 74 68 65 20 74 | 65 72 6d 69 6e 61 6c 2e |to the t|erminal.|
|00004e30| 0a 0a 20 20 20 54 6f 20 | 74 75 72 6e 20 6f 66 66 |.. To |turn off|
|00004e40| 20 6f 75 74 70 75 74 20 | 70 72 6f 63 65 73 73 69 | output |processi|
|00004e50| 6e 67 20 69 6e 20 42 65 | 72 6b 65 6c 65 79 20 55 |ng in Be|rkeley U|
|00004e60| 6e 69 78 20 79 6f 75 20 | 77 6f 75 6c 64 20 75 73 |nix you |would us|
|00004e70| 65 20 60 69 6f 63 74 6c | 27 0a 77 69 74 68 20 63 |e `ioctl|'.with c|
|00004e80| 6f 64 65 20 60 54 49 4f | 43 4c 53 45 54 27 20 74 |ode `TIO|CLSET' t|
|00004e90| 6f 20 73 65 74 20 74 68 | 65 20 62 69 74 20 6e 61 |o set th|e bit na|
|00004ea0| 6d 65 64 20 60 4c 4c 49 | 54 4f 55 54 27 2c 20 61 |med `LLI|TOUT', a|
|00004eb0| 6e 64 20 63 6c 65 61 72 | 20 74 68 65 20 62 69 74 |nd clear| the bit|
|00004ec0| 73 0a 60 41 4e 59 44 45 | 4c 41 59 27 20 75 73 69 |s.`ANYDE|LAY' usi|
|00004ed0| 6e 67 20 60 54 49 4f 43 | 53 45 54 4e 27 2e 20 20 |ng `TIOC|SETN'. |
|00004ee0| 49 6e 20 50 4f 53 49 58 | 20 6f 72 20 53 79 73 74 |In POSIX| or Syst|
|00004ef0| 65 6d 20 56 2c 20 79 6f | 75 20 6d 75 73 74 20 63 |em V, yo|u must c|
|00004f00| 6c 65 61 72 20 74 68 65 | 0a 62 69 74 20 6e 61 6d |lear the|.bit nam|
|00004f10| 65 64 20 60 4f 50 4f 53 | 54 27 2e 20 20 52 65 66 |ed `OPOS|T'. Ref|
|00004f20| 65 72 20 74 6f 20 74 68 | 65 20 73 79 73 74 65 6d |er to th|e system|
|00004f30| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 66 | documen|tation f|
|00004f40| 6f 72 20 64 65 74 61 69 | 6c 73 2e 0a 0a 20 20 20 |or detai|ls... |
|00004f50| 49 66 20 79 6f 75 20 64 | 6f 20 6e 6f 74 20 73 65 |If you d|o not se|
|00004f60| 74 20 74 68 65 20 74 65 | 72 6d 69 6e 61 6c 20 66 |t the te|rminal f|
|00004f70| 6c 61 67 73 20 70 72 6f | 70 65 72 6c 79 2c 20 73 |lags pro|perly, s|
|00004f80| 6f 6d 65 20 6f 6c 64 65 | 72 20 74 65 72 6d 69 6e |ome olde|r termin|
|00004f90| 61 6c 73 0a 77 69 6c 6c | 20 6e 6f 74 20 77 6f 72 |als.will| not wor|
|00004fa0| 6b 2e 20 20 54 68 69 73 | 20 69 73 20 62 65 63 61 |k. This| is beca|
|00004fb0| 75 73 65 20 74 68 65 69 | 72 20 63 6f 6d 6d 61 6e |use thei|r comman|
|00004fc0| 64 73 20 6d 61 79 20 63 | 6f 6e 74 61 69 6e 20 74 |ds may c|ontain t|
|00004fd0| 68 65 0a 63 68 61 72 61 | 63 74 65 72 73 20 74 68 |he.chara|cters th|
|00004fe0| 61 74 20 6e 6f 72 6d 61 | 6c 6c 79 20 73 69 67 6e |at norma|lly sign|
|00004ff0| 69 66 79 20 6e 65 77 6c | 69 6e 65 2c 20 63 61 72 |ify newl|ine, car|
|00005000| 72 69 61 67 65 20 72 65 | 74 75 72 6e 20 61 6e 64 |riage re|turn and|
|00005010| 0a 68 6f 72 69 7a 6f 6e | 74 61 6c 20 74 61 62 2d |.horizon|tal tab-|
|00005020| 2d 63 68 61 72 61 63 74 | 65 72 73 20 77 68 69 63 |-charact|ers whic|
|00005030| 68 20 74 68 65 20 6b 65 | 72 6e 65 6c 20 74 68 69 |h the ke|rnel thi|
|00005040| 6e 6b 73 20 69 74 20 6f | 75 67 68 74 20 74 6f 20 |nks it o|ught to |
|00005050| 6d 6f 64 69 66 79 0a 62 | 65 66 6f 72 65 20 6f 75 |modify.b|efore ou|
|00005060| 74 70 75 74 2e 0a 0a 20 | 20 20 57 68 65 6e 20 79 |tput... | When y|
|00005070| 6f 75 20 63 68 61 6e 67 | 65 20 74 68 65 20 6b 65 |ou chang|e the ke|
|00005080| 72 6e 65 6c 27 73 20 74 | 65 72 6d 69 6e 61 6c 20 |rnel's t|erminal |
|00005090| 66 6c 61 67 73 2c 20 79 | 6f 75 20 6d 75 73 74 20 |flags, y|ou must |
|000050a0| 61 72 72 61 6e 67 65 20 | 74 6f 0a 72 65 73 74 6f |arrange |to.resto|
|000050b0| 72 65 20 74 68 65 6d 20 | 74 6f 20 74 68 65 69 72 |re them |to their|
|000050c0| 20 6e 6f 72 6d 61 6c 20 | 73 74 61 74 65 20 77 68 | normal |state wh|
|000050d0| 65 6e 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 20 |en your |program |
|000050e0| 65 78 69 74 73 2e 20 20 | 54 68 69 73 0a 69 6d 70 |exits. |This.imp|
|000050f0| 6c 69 65 73 20 74 68 61 | 74 20 74 68 65 20 70 72 |lies tha|t the pr|
|00005100| 6f 67 72 61 6d 20 6d 75 | 73 74 20 63 61 74 63 68 |ogram mu|st catch|
|00005110| 20 66 61 74 61 6c 20 73 | 69 67 6e 61 6c 73 20 73 | fatal s|ignals s|
|00005120| 75 63 68 20 61 73 20 60 | 53 49 47 51 55 49 54 27 |uch as `|SIGQUIT'|
|00005130| 20 61 6e 64 0a 60 53 49 | 47 49 4e 54 27 20 61 6e | and.`SI|GINT' an|
|00005140| 64 20 72 65 73 74 6f 72 | 65 20 74 68 65 20 6f 6c |d restor|e the ol|
|00005150| 64 20 74 65 72 6d 69 6e | 61 6c 20 66 6c 61 67 73 |d termin|al flags|
|00005160| 20 62 65 66 6f 72 65 20 | 61 63 74 75 61 6c 6c 79 | before |actually|
|00005170| 20 74 65 72 6d 69 6e 61 | 74 69 6e 67 2e 0a 0a 20 | termina|ting... |
|00005180| 20 20 4d 6f 64 65 72 6e | 20 74 65 72 6d 69 6e 61 | Modern| termina|
|00005190| 6c 73 27 20 63 6f 6d 6d | 61 6e 64 73 20 64 6f 20 |ls' comm|ands do |
|000051a0| 6e 6f 74 20 75 73 65 20 | 74 68 65 73 65 20 73 70 |not use |these sp|
|000051b0| 65 63 69 61 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ecial ch|aracters|
|000051c0| 2c 20 73 6f 0a 69 66 20 | 79 6f 75 20 64 6f 20 6e |, so.if |you do n|
|000051d0| 6f 74 20 63 61 72 65 20 | 61 62 6f 75 74 20 70 72 |ot care |about pr|
|000051e0| 6f 62 6c 65 6d 73 20 77 | 69 74 68 20 6f 6c 64 20 |oblems w|ith old |
|000051f0| 74 65 72 6d 69 6e 61 6c | 73 2c 20 79 6f 75 20 63 |terminal|s, you c|
|00005200| 61 6e 20 6c 65 61 76 65 | 20 74 68 65 0a 6b 65 72 |an leave| the.ker|
|00005210| 6e 65 6c 27 73 20 74 65 | 72 6d 69 6e 61 6c 20 66 |nel's te|rminal f|
|00005220| 6c 61 67 73 20 75 6e 61 | 6c 74 65 72 65 64 2e 0a |lags una|ltered..|
|00005230| 0a 40 45 6e 64 4e 6f 64 | 65 0a 0a 0a 40 4e 6f 64 |.@EndNod|e...@Nod|
|00005240| 65 20 22 50 61 64 64 69 | 6e 67 22 20 22 50 61 64 |e "Paddi|ng" "Pad|
|00005250| 64 69 6e 67 22 0a 40 4e | 65 78 74 20 22 50 61 72 |ding".@N|ext "Par|
|00005260| 61 6d 65 74 65 72 73 22 | 20 22 50 61 72 61 6d 65 |ameters"| "Parame|
|00005270| 74 65 72 73 22 0a 40 50 | 72 65 76 20 22 49 6e 69 |ters".@P|rev "Ini|
|00005280| 74 69 61 6c 69 7a 65 22 | 20 22 49 6e 69 74 69 61 |tialize"| "Initia|
|00005290| 6c 69 7a 65 22 0a 40 54 | 6f 63 20 22 4c 69 62 72 |lize".@T|oc "Libr|
|000052a0| 61 72 79 22 20 22 4c 69 | 62 72 61 72 79 22 0a 50 |ary" "Li|brary".P|
|000052b0| 61 64 64 69 6e 67 0a 3d | 3d 3d 3d 3d 3d 3d 0a 0a |adding.=|======..|
|000052c0| 20 20 20 22 50 61 64 64 | 69 6e 67 22 20 6d 65 61 | "Padd|ing" mea|
|000052d0| 6e 73 20 6f 75 74 70 75 | 74 74 69 6e 67 20 6e 75 |ns outpu|tting nu|
|000052e0| 6c 6c 20 63 68 61 72 61 | 63 74 65 72 73 20 66 6f |ll chara|cters fo|
|000052f0| 6c 6c 6f 77 69 6e 67 20 | 61 20 74 65 72 6d 69 6e |llowing |a termin|
|00005300| 61 6c 0a 64 69 73 70 6c | 61 79 20 63 6f 6d 6d 61 |al.displ|ay comma|
|00005310| 6e 64 20 74 68 61 74 20 | 74 61 6b 65 73 20 61 20 |nd that |takes a |
|00005320| 6c 6f 6e 67 20 74 69 6d | 65 20 74 6f 20 65 78 65 |long tim|e to exe|
|00005330| 63 75 74 65 2e 20 20 54 | 68 65 20 74 65 72 6d 69 |cute. T|he termi|
|00005340| 6e 61 6c 0a 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |nal.desc|ription |
|00005350| 73 61 79 73 20 77 68 69 | 63 68 20 63 6f 6d 6d 61 |says whi|ch comma|
|00005360| 6e 64 73 20 72 65 71 75 | 69 72 65 20 70 61 64 64 |nds requ|ire padd|
|00005370| 69 6e 67 20 61 6e 64 20 | 68 6f 77 20 6d 75 63 68 |ing and |how much|
|00005380| 3b 20 74 68 65 0a 66 75 | 6e 63 74 69 6f 6e 20 60 |; the.fu|nction `|
|00005390| 74 70 75 74 73 27 2c 20 | 64 65 73 63 72 69 62 65 |tputs', |describe|
|000053a0| 64 20 62 65 6c 6f 77 2c | 20 6f 75 74 70 75 74 73 |d below,| outputs|
|000053b0| 20 61 20 74 65 72 6d 69 | 6e 61 6c 20 63 6f 6d 6d | a termi|nal comm|
|000053c0| 61 6e 64 20 77 68 69 6c | 65 0a 65 78 74 72 61 63 |and whil|e.extrac|
|000053d0| 74 69 6e 67 20 66 72 6f | 6d 20 69 74 20 74 68 65 |ting fro|m it the|
|000053e0| 20 70 61 64 64 69 6e 67 | 20 69 6e 66 6f 72 6d 61 | padding| informa|
|000053f0| 74 69 6f 6e 2c 20 61 6e | 64 20 74 68 65 6e 20 6f |tion, an|d then o|
|00005400| 75 74 70 75 74 73 20 74 | 68 65 0a 70 61 64 64 69 |utputs t|he.paddi|
|00005410| 6e 67 20 74 68 61 74 20 | 69 73 20 6e 65 63 65 73 |ng that |is neces|
|00005420| 73 61 72 79 2e 0a 0a 2a | 20 4d 65 6e 75 3a 0a 0a |sary...*| Menu:..|
|00005430| 2a 20 40 7b 22 57 68 79 | 20 50 61 64 22 20 4c 69 |* @{"Why| Pad" Li|
|00005440| 6e 6b 20 22 57 68 79 20 | 50 61 64 22 7d 20 20 20 |nk "Why |Pad"} |
|00005450| 20 20 20 45 78 70 6c 61 | 6e 61 74 69 6f 6e 20 6f | Expla|nation o|
|00005460| 66 20 70 61 64 64 69 6e | 67 2e 0a 2a 20 40 7b 22 |f paddin|g..* @{"|
|00005470| 4e 6f 74 20 45 6e 6f 75 | 67 68 22 20 4c 69 6e 6b |Not Enou|gh" Link|
|00005480| 20 22 4e 6f 74 20 45 6e | 6f 75 67 68 22 7d 20 20 | "Not En|ough"} |
|00005490| 20 57 68 65 6e 20 74 68 | 65 72 65 20 69 73 20 6e | When th|ere is n|
|000054a0| 6f 74 20 65 6e 6f 75 67 | 68 20 70 61 64 64 69 6e |ot enoug|h paddin|
|000054b0| 67 2e 0a 2a 20 40 7b 22 | 44 65 73 63 72 69 62 65 |g..* @{"|Describe|
|000054c0| 20 50 61 64 64 69 6e 67 | 22 20 4c 69 6e 6b 20 22 | Padding|" Link "|
|000054d0| 44 65 73 63 72 69 62 65 | 20 50 61 64 64 69 6e 67 |Describe| Padding|
|000054e0| 22 7d 20 20 20 54 68 65 | 20 64 61 74 61 20 62 61 |"} The| data ba|
|000054f0| 73 65 20 73 61 79 73 20 | 68 6f 77 20 6d 75 63 68 |se says |how much|
|00005500| 20 70 61 64 64 69 6e 67 | 20 61 20 74 65 72 6d 69 | padding| a termi|
|00005510| 6e 61 6c 20 6e 65 65 64 | 73 2e 0a 2a 20 40 7b 22 |nal need|s..* @{"|
|00005520| 4f 75 74 70 75 74 20 50 | 61 64 64 69 6e 67 22 20 |Output P|adding" |
|00005530| 4c 69 6e 6b 20 22 4f 75 | 74 70 75 74 20 50 61 64 |Link "Ou|tput Pad|
|00005540| 64 69 6e 67 22 7d 20 20 | 20 55 73 69 6e 67 20 60 |ding"} | Using `|
|00005550| 74 70 75 74 73 27 20 74 | 6f 20 6f 75 74 70 75 74 |tputs' t|o output|
|00005560| 20 74 68 65 20 6e 65 65 | 64 65 64 20 70 61 64 64 | the nee|ded padd|
|00005570| 69 6e 67 2e 0a 0a 40 45 | 6e 64 4e 6f 64 65 0a 0a |ing...@E|ndNode..|
|00005580| 0a 40 4e 6f 64 65 20 22 | 57 68 79 20 50 61 64 22 |.@Node "|Why Pad"|
|00005590| 20 22 57 68 79 20 50 61 | 64 22 0a 40 4e 65 78 74 | "Why Pa|d".@Next|
|000055a0| 20 22 4e 6f 74 20 45 6e | 6f 75 67 68 22 20 22 4e | "Not En|ough" "N|
|000055b0| 6f 74 20 45 6e 6f 75 67 | 68 22 0a 40 54 6f 63 20 |ot Enoug|h".@Toc |
|000055c0| 22 50 61 64 64 69 6e 67 | 22 20 22 50 61 64 64 69 |"Padding|" "Paddi|
|000055d0| 6e 67 22 0a 57 68 79 20 | 50 61 64 2c 20 61 6e 64 |ng".Why |Pad, and|
|000055e0| 20 48 6f 77 0a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | How.---|--------|
|000055f0| 2d 2d 2d 2d 2d 0a 0a 20 | 20 20 4d 6f 73 74 20 74 |-----.. | Most t|
|00005600| 79 70 65 73 20 6f 66 20 | 74 65 72 6d 69 6e 61 6c |ypes of |terminal|
|00005610| 20 68 61 76 65 20 63 6f | 6d 6d 61 6e 64 73 20 74 | have co|mmands t|
|00005620| 68 61 74 20 74 61 6b 65 | 20 6c 6f 6e 67 65 72 20 |hat take| longer |
|00005630| 74 6f 20 65 78 65 63 75 | 74 65 0a 74 68 61 6e 20 |to execu|te.than |
|00005640| 74 68 65 79 20 64 6f 20 | 74 6f 20 73 65 6e 64 20 |they do |to send |
|00005650| 6f 76 65 72 20 61 20 68 | 69 67 68 2d 73 70 65 65 |over a h|igh-spee|
|00005660| 64 20 6c 69 6e 65 2e 20 | 20 46 6f 72 20 65 78 61 |d line. | For exa|
|00005670| 6d 70 6c 65 2c 20 63 6c | 65 61 72 69 6e 67 20 74 |mple, cl|earing t|
|00005680| 68 65 0a 73 63 72 65 65 | 6e 20 6d 61 79 20 74 61 |he.scree|n may ta|
|00005690| 6b 65 20 32 30 6d 73 65 | 63 20 6f 6e 63 65 20 74 |ke 20mse|c once t|
|000056a0| 68 65 20 65 6e 74 69 72 | 65 20 63 6f 6d 6d 61 6e |he entir|e comman|
|000056b0| 64 20 69 73 20 72 65 63 | 65 69 76 65 64 2e 20 20 |d is rec|eived. |
|000056c0| 44 75 72 69 6e 67 0a 74 | 68 61 74 20 74 69 6d 65 |During.t|hat time|
|000056d0| 2c 20 6f 6e 20 61 20 39 | 36 30 30 20 62 70 73 20 |, on a 9|600 bps |
|000056e0| 6c 69 6e 65 2c 20 74 68 | 65 20 74 65 72 6d 69 6e |line, th|e termin|
|000056f0| 61 6c 20 63 6f 75 6c 64 | 20 72 65 63 65 69 76 65 |al could| receive|
|00005700| 20 61 62 6f 75 74 20 32 | 30 0a 61 64 64 69 74 69 | about 2|0.additi|
|00005710| 6f 6e 61 6c 20 6f 75 74 | 70 75 74 20 63 68 61 72 |onal out|put char|
|00005720| 61 63 74 65 72 73 20 77 | 68 69 6c 65 20 73 74 69 |acters w|hile sti|
|00005730| 6c 6c 20 62 75 73 79 20 | 63 6c 65 61 72 69 6e 67 |ll busy |clearing|
|00005740| 20 74 68 65 20 73 63 72 | 65 65 6e 2e 0a 45 76 65 | the scr|een..Eve|
|00005750| 72 79 20 74 65 72 6d 69 | 6e 61 6c 20 68 61 73 20 |ry termi|nal has |
|00005760| 61 20 63 65 72 74 61 69 | 6e 20 61 6d 6f 75 6e 74 |a certai|n amount|
|00005770| 20 6f 66 20 62 75 66 66 | 65 72 69 6e 67 20 63 61 | of buff|ering ca|
|00005780| 70 61 63 69 74 79 20 74 | 6f 20 72 65 6d 65 6d 62 |pacity t|o rememb|
|00005790| 65 72 0a 6f 75 74 70 75 | 74 20 63 68 61 72 61 63 |er.outpu|t charac|
|000057a0| 74 65 72 73 20 74 68 61 | 74 20 63 61 6e 6e 6f 74 |ters tha|t cannot|
|000057b0| 20 62 65 20 70 72 6f 63 | 65 73 73 65 64 20 79 65 | be proc|essed ye|
|000057c0| 74 2c 20 62 75 74 20 74 | 6f 6f 20 6d 61 6e 79 20 |t, but t|oo many |
|000057d0| 73 6c 6f 77 0a 63 6f 6d | 6d 61 6e 64 73 20 69 6e |slow.com|mands in|
|000057e0| 20 61 20 72 6f 77 20 63 | 61 6e 20 63 61 75 73 65 | a row c|an cause|
|000057f0| 20 74 68 65 20 62 75 66 | 66 65 72 20 74 6f 20 66 | the buf|fer to f|
|00005800| 69 6c 6c 20 75 70 2e 20 | 20 54 68 65 6e 20 61 6e |ill up. | Then an|
|00005810| 79 20 61 64 64 69 74 69 | 6f 6e 61 6c 0a 6f 75 74 |y additi|onal.out|
|00005820| 70 75 74 20 74 68 61 74 | 20 63 61 6e 6e 6f 74 20 |put that| cannot |
|00005830| 62 65 20 70 72 6f 63 65 | 73 73 65 64 20 69 6d 6d |be proce|ssed imm|
|00005840| 65 64 69 61 74 65 6c 79 | 20 77 69 6c 6c 20 62 65 |ediately| will be|
|00005850| 20 6c 6f 73 74 2e 0a 0a | 20 20 20 54 6f 20 61 76 | lost...| To av|
|00005860| 6f 69 64 20 74 68 69 73 | 20 70 72 6f 62 6c 65 6d |oid this| problem|
|00005870| 2c 20 77 65 20 6e 6f 72 | 6d 61 6c 6c 79 20 66 6f |, we nor|mally fo|
|00005880| 6c 6c 6f 77 20 65 61 63 | 68 20 64 69 73 70 6c 61 |llow eac|h displa|
|00005890| 79 20 63 6f 6d 6d 61 6e | 64 20 77 69 74 68 0a 65 |y comman|d with.e|
|000058a0| 6e 6f 75 67 68 20 75 73 | 65 6c 65 73 73 20 63 68 |nough us|eless ch|
|000058b0| 61 72 61 74 65 72 73 20 | 28 75 73 75 61 6c 6c 79 |araters |(usually|
|000058c0| 20 6e 75 6c 6c 20 63 68 | 61 72 61 63 74 65 72 73 | null ch|aracters|
|000058d0| 29 20 74 6f 20 66 69 6c | 6c 20 75 70 20 74 68 65 |) to fil|l up the|
|000058e0| 20 74 69 6d 65 0a 74 68 | 61 74 20 74 68 65 20 64 | time.th|at the d|
|000058f0| 69 73 70 6c 61 79 20 63 | 6f 6d 6d 61 6e 64 20 6e |isplay c|ommand n|
|00005900| 65 65 64 73 20 74 6f 20 | 65 78 65 63 75 74 65 2e |eeds to |execute.|
|00005910| 20 20 54 68 69 73 20 64 | 6f 65 73 20 74 68 65 20 | This d|oes the |
|00005920| 6a 6f 62 20 69 66 20 74 | 68 65 0a 74 65 72 6d 69 |job if t|he.termi|
|00005930| 6e 61 6c 20 74 68 72 6f | 77 73 20 61 77 61 79 20 |nal thro|ws away |
|00005940| 6e 75 6c 6c 20 63 68 61 | 72 61 63 74 65 72 73 20 |null cha|racters |
|00005950| 77 69 74 68 6f 75 74 20 | 75 73 69 6e 67 20 75 70 |without |using up|
|00005960| 20 73 70 61 63 65 20 69 | 6e 20 74 68 65 0a 62 75 | space i|n the.bu|
|00005970| 66 66 65 72 20 28 77 68 | 69 63 68 20 6d 6f 73 74 |ffer (wh|ich most|
|00005980| 20 74 65 72 6d 69 6e 61 | 6c 73 20 64 6f 29 2e 20 | termina|ls do). |
|00005990| 20 49 66 20 65 6e 6f 75 | 67 68 20 70 61 64 64 69 | If enou|gh paddi|
|000059a0| 6e 67 20 69 73 20 75 73 | 65 64 2c 20 6e 6f 20 6f |ng is us|ed, no o|
|000059b0| 75 74 70 75 74 0a 63 61 | 6e 20 65 76 65 72 20 62 |utput.ca|n ever b|
|000059c0| 65 20 6c 6f 73 74 2e 20 | 20 54 68 65 20 72 69 67 |e lost. | The rig|
|000059d0| 68 74 20 61 6d 6f 75 6e | 74 20 6f 66 20 70 61 64 |ht amoun|t of pad|
|000059e0| 64 69 6e 67 20 61 76 6f | 69 64 73 20 6c 6f 73 73 |ding avo|ids loss|
|000059f0| 20 6f 66 20 6f 75 74 70 | 75 74 0a 77 69 74 68 6f | of outp|ut.witho|
|00005a00| 75 74 20 73 6c 6f 77 69 | 6e 67 20 64 6f 77 6e 20 |ut slowi|ng down |
|00005a10| 6f 70 65 72 61 74 69 6f | 6e 2c 20 73 69 6e 63 65 |operatio|n, since|
|00005a20| 20 74 68 65 20 74 69 6d | 65 20 75 73 65 64 20 74 | the tim|e used t|
|00005a30| 6f 20 74 72 61 6e 73 6d | 69 74 20 70 61 64 64 69 |o transm|it paddi|
|00005a40| 6e 67 0a 69 73 20 74 69 | 6d 65 20 74 68 61 74 20 |ng.is ti|me that |
|00005a50| 6e 6f 74 68 69 6e 67 20 | 65 6c 73 65 20 63 6f 75 |nothing |else cou|
|00005a60| 6c 64 20 62 65 20 64 6f | 6e 65 2e 0a 0a 20 20 20 |ld be do|ne... |
|00005a70| 54 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 70 61 |The numb|er of pa|
|00005a80| 64 64 69 6e 67 20 63 68 | 61 72 61 63 74 65 72 73 |dding ch|aracters|
|00005a90| 20 6e 65 65 64 65 64 20 | 66 6f 72 20 61 6e 20 6f | needed |for an o|
|00005aa0| 70 65 72 61 74 69 6f 6e | 20 64 65 70 65 6e 64 73 |peration| depends|
|00005ab0| 20 6f 6e 0a 74 68 65 20 | 6c 69 6e 65 20 73 70 65 | on.the |line spe|
|00005ac0| 65 64 2e 20 20 49 6e 20 | 66 61 63 74 2c 20 69 74 |ed. In |fact, it|
|00005ad0| 20 69 73 20 70 72 6f 70 | 6f 72 74 69 6f 6e 61 6c | is prop|ortional|
|00005ae0| 20 74 6f 20 74 68 65 20 | 6c 69 6e 65 20 73 70 65 | to the |line spe|
|00005af0| 65 64 2e 20 20 41 20 39 | 36 30 30 0a 62 61 75 64 |ed. A 9|600.baud|
|00005b00| 20 6c 69 6e 65 20 74 72 | 61 6e 73 6d 69 74 73 20 | line tr|ansmits |
|00005b10| 61 62 6f 75 74 20 6f 6e | 65 20 63 68 61 72 61 63 |about on|e charac|
|00005b20| 74 65 72 20 70 65 72 20 | 6d 73 65 63 2c 20 73 6f |ter per |msec, so|
|00005b30| 20 74 68 65 20 63 6c 65 | 61 72 20 73 63 72 65 65 | the cle|ar scree|
|00005b40| 6e 0a 63 6f 6d 6d 61 6e | 64 20 69 6e 20 74 68 65 |n.comman|d in the|
|00005b50| 20 65 78 61 6d 70 6c 65 | 20 61 62 6f 76 65 20 77 | example| above w|
|00005b60| 6f 75 6c 64 20 6e 65 65 | 64 20 61 62 6f 75 74 20 |ould nee|d about |
|00005b70| 32 30 20 63 68 61 72 61 | 63 74 65 72 73 20 6f 66 |20 chara|cters of|
|00005b80| 20 70 61 64 64 69 6e 67 | 2e 0a 41 74 20 31 32 30 | padding|..At 120|
|00005b90| 30 20 62 61 75 64 2c 20 | 68 6f 77 65 76 65 72 2c |0 baud, |however,|
|00005ba0| 20 6f 6e 6c 79 20 61 62 | 6f 75 74 20 33 20 63 68 | only ab|out 3 ch|
|00005bb0| 61 72 61 63 74 65 72 73 | 20 6f 66 20 70 61 64 64 |aracters| of padd|
|00005bc0| 69 6e 67 20 61 72 65 20 | 6e 65 65 64 65 64 0a 74 |ing are |needed.t|
|00005bd0| 6f 20 66 69 6c 6c 20 75 | 70 20 32 30 6d 73 65 63 |o fill u|p 20msec|
|00005be0| 2e 0a 0a 40 45 6e 64 4e | 6f 64 65 0a 0a 0a 40 4e |...@EndN|ode...@N|
|00005bf0| 6f 64 65 20 22 4e 6f 74 | 20 45 6e 6f 75 67 68 22 |ode "Not| Enough"|
|00005c00| 20 22 4e 6f 74 20 45 6e | 6f 75 67 68 22 0a 40 4e | "Not En|ough".@N|
|00005c10| 65 78 74 20 22 44 65 73 | 63 72 69 62 65 20 50 61 |ext "Des|cribe Pa|
|00005c20| 64 64 69 6e 67 22 20 22 | 44 65 73 63 72 69 62 65 |dding" "|Describe|
|00005c30| 20 50 61 64 64 69 6e 67 | 22 0a 40 50 72 65 76 20 | Padding|".@Prev |
|00005c40| 22 57 68 79 20 50 61 64 | 22 20 22 57 68 79 20 50 |"Why Pad|" "Why P|
|00005c50| 61 64 22 0a 40 54 6f 63 | 20 22 50 61 64 64 69 6e |ad".@Toc| "Paddin|
|00005c60| 67 22 20 22 50 61 64 64 | 69 6e 67 22 0a 57 68 65 |g" "Padd|ing".Whe|
|00005c70| 6e 20 54 68 65 72 65 20 | 49 73 20 4e 6f 74 20 45 |n There |Is Not E|
|00005c80| 6e 6f 75 67 68 20 50 61 | 64 64 69 6e 67 0a 2d 2d |nough Pa|dding.--|
|00005c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005ca0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 0a |--------|------..|
|00005cb0| 20 20 20 54 68 65 72 65 | 20 61 72 65 20 73 65 76 | There| are sev|
|00005cc0| 65 72 61 6c 20 63 6f 6d | 6d 6f 6e 20 6d 61 6e 69 |eral com|mon mani|
|00005cd0| 66 65 73 74 61 74 69 6f | 6e 73 20 6f 66 20 69 6e |festatio|ns of in|
|00005ce0| 73 75 66 66 69 63 69 65 | 6e 74 20 70 61 64 64 69 |sufficie|nt paddi|
|00005cf0| 6e 67 2e 0a 0a 20 20 20 | 2a 20 45 6d 61 63 73 20 |ng... |* Emacs |
|00005d00| 64 69 73 70 6c 61 79 73 | 20 60 49 2d 73 65 61 72 |displays| `I-sear|
|00005d10| 63 68 3a 20 5e 51 2d 27 | 20 61 74 20 74 68 65 20 |ch: ^Q-'| at the |
|00005d20| 62 6f 74 74 6f 6d 20 6f | 66 20 74 68 65 20 73 63 |bottom o|f the sc|
|00005d30| 72 65 65 6e 2e 0a 0a 20 | 20 20 20 20 54 68 69 73 |reen... | This|
|00005d40| 20 6d 65 61 6e 73 20 74 | 68 61 74 20 74 68 65 20 | means t|hat the |
|00005d50| 74 65 72 6d 69 6e 61 6c | 20 74 68 6f 75 67 68 74 |terminal| thought|
|00005d60| 20 69 74 73 20 62 75 66 | 66 65 72 20 77 61 73 20 | its buf|fer was |
|00005d70| 67 65 74 74 69 6e 67 20 | 66 75 6c 6c 20 6f 66 0a |getting |full of.|
|00005d80| 20 20 20 20 20 64 69 73 | 70 6c 61 79 20 63 6f 6d | dis|play com|
|00005d90| 6d 61 6e 64 73 2c 20 73 | 6f 20 69 74 20 74 72 69 |mands, s|o it tri|
|00005da0| 65 64 20 74 6f 20 74 65 | 6c 6c 20 74 68 65 20 63 |ed to te|ll the c|
|00005db0| 6f 6d 70 75 74 65 72 20 | 74 6f 20 73 74 6f 70 20 |omputer |to stop |
|00005dc0| 73 65 6e 64 69 6e 67 0a | 20 20 20 20 20 61 6e 79 |sending.| any|
|00005dd0| 2e 0a 0a 20 20 20 2a 20 | 54 68 65 20 73 63 72 65 |... * |The scre|
|00005de0| 65 6e 20 69 73 20 67 61 | 72 62 6c 65 64 20 69 6e |en is ga|rbled in|
|00005df0| 74 65 72 6d 69 74 74 65 | 6e 74 6c 79 2c 20 6f 72 |termitte|ntly, or|
|00005e00| 20 74 68 65 20 64 65 74 | 61 69 6c 73 20 6f 66 20 | the det|ails of |
|00005e10| 67 61 72 62 6c 69 6e 67 | 0a 20 20 20 20 20 76 61 |garbling|. va|
|00005e20| 72 79 20 77 68 65 6e 20 | 79 6f 75 20 72 65 70 65 |ry when |you repe|
|00005e30| 61 74 20 74 68 65 20 61 | 63 74 69 6f 6e 2e 20 20 |at the a|ction. |
|00005e40| 28 41 20 67 61 72 62 6c | 65 64 20 73 63 72 65 65 |(A garbl|ed scree|
|00005e50| 6e 20 63 6f 75 6c 64 20 | 62 65 20 64 75 65 0a 20 |n could |be due. |
|00005e60| 20 20 20 20 74 6f 20 61 | 20 63 6f 6d 6d 61 6e 64 | to a| command|
|00005e70| 20 77 68 69 63 68 20 69 | 73 20 73 69 6d 70 6c 79 | which i|s simply|
|00005e80| 20 69 6e 63 6f 72 72 65 | 63 74 2c 20 6f 72 20 74 | incorre|ct, or t|
|00005e90| 6f 20 75 73 65 72 20 6f | 70 74 69 6f 6e 20 69 6e |o user o|ption in|
|00005ea0| 20 74 68 65 0a 20 20 20 | 20 20 74 65 72 6d 69 6e | the. | termin|
|00005eb0| 61 6c 20 77 68 69 63 68 | 20 64 6f 65 73 6e 27 74 |al which| doesn't|
|00005ec0| 20 6d 61 74 63 68 20 74 | 68 65 20 61 73 73 75 6d | match t|he assum|
|00005ed0| 70 74 69 6f 6e 73 20 6f | 66 20 74 68 65 20 74 65 |ptions o|f the te|
|00005ee0| 72 6d 69 6e 61 6c 0a 20 | 20 20 20 20 64 65 73 63 |rminal. | desc|
|00005ef0| 72 69 70 74 69 6f 6e 2c | 20 62 75 74 20 74 68 69 |ription,| but thi|
|00005f00| 73 20 75 73 75 61 6c 6c | 79 20 6c 65 61 64 73 20 |s usuall|y leads |
|00005f10| 74 6f 20 72 65 70 72 6f | 64 75 63 69 62 6c 65 20 |to repro|ducible |
|00005f20| 66 61 69 6c 75 72 65 2e | 29 0a 0a 20 20 20 20 20 |failure.|).. |
|00005f30| 54 68 69 73 20 6d 65 61 | 6e 73 20 74 68 61 74 20 |This mea|ns that |
|00005f40| 74 68 65 20 62 75 66 66 | 65 72 20 64 69 64 20 67 |the buff|er did g|
|00005f50| 65 74 20 66 75 6c 6c 2c | 20 61 6e 64 20 73 6f 6d |et full,| and som|
|00005f60| 65 20 63 6f 6d 6d 61 6e | 64 73 20 77 65 72 65 0a |e comman|ds were.|
|00005f70| 20 20 20 20 20 6c 6f 73 | 74 2e 20 20 4d 61 6e 79 | los|t. Many|
|00005f80| 20 63 68 61 6e 67 65 61 | 62 6c 65 20 66 61 63 74 | changea|ble fact|
|00005f90| 6f 72 73 20 63 61 6e 20 | 63 68 61 6e 67 65 20 77 |ors can |change w|
|00005fa0| 68 69 63 68 20 6f 6e 65 | 73 20 61 72 65 20 6c 6f |hich one|s are lo|
|00005fb0| 73 74 2e 0a 0a 20 20 20 | 2a 20 53 63 72 65 65 6e |st... |* Screen|
|00005fc0| 20 69 73 20 67 61 72 62 | 6c 65 64 20 61 74 20 68 | is garb|led at h|
|00005fd0| 69 67 68 20 6f 75 74 70 | 75 74 20 73 70 65 65 64 |igh outp|ut speed|
|00005fe0| 73 20 62 75 74 20 6e 6f | 74 20 61 74 20 6c 6f 77 |s but no|t at low|
|00005ff0| 20 73 70 65 65 64 73 2e | 0a 20 20 20 20 20 50 61 | speeds.|. Pa|
|00006000| 64 64 69 6e 67 20 70 72 | 6f 62 6c 65 6d 73 20 6e |dding pr|oblems n|
|00006010| 65 61 72 6c 79 20 61 6c | 77 61 79 73 20 67 6f 20 |early al|ways go |
|00006020| 61 77 61 79 20 61 74 20 | 6c 6f 77 20 73 70 65 65 |away at |low spee|
|00006030| 64 73 2c 20 75 73 75 61 | 6c 6c 79 20 65 76 65 6e |ds, usua|lly even|
|00006040| 0a 20 20 20 20 20 61 74 | 20 31 32 30 30 20 62 61 |. at| 1200 ba|
|00006050| 75 64 2e 0a 0a 20 20 20 | 20 20 54 68 69 73 20 6d |ud... | This m|
|00006060| 65 61 6e 73 20 74 68 61 | 74 20 61 20 68 69 67 68 |eans tha|t a high|
|00006070| 20 65 6e 6f 75 67 68 20 | 73 70 65 65 64 20 70 65 | enough |speed pe|
|00006080| 72 6d 69 74 73 20 63 6f | 6d 6d 61 6e 64 73 20 74 |rmits co|mmands t|
|00006090| 6f 20 61 72 72 69 76 65 | 0a 20 20 20 20 20 66 61 |o arrive|. fa|
|000060a0| 73 74 65 72 20 74 68 61 | 6e 20 74 68 65 79 20 63 |ster tha|n they c|
|000060b0| 61 6e 20 62 65 20 65 78 | 65 63 75 74 65 64 2e 0a |an be ex|ecuted..|
|000060c0| 0a 20 20 20 41 6c 74 68 | 6f 75 67 68 20 61 6e 79 |. Alth|ough any|
|000060d0| 20 6f 62 73 63 75 72 65 | 20 63 6f 6d 6d 61 6e 64 | obscure| command|
|000060e0| 20 6f 6e 20 61 6e 20 6f | 62 73 63 75 72 65 20 74 | on an o|bscure t|
|000060f0| 65 72 6d 69 6e 61 6c 20 | 6d 69 67 68 74 20 6c 61 |erminal |might la|
|00006100| 63 6b 0a 70 61 64 64 69 | 6e 67 2c 20 69 6e 20 70 |ck.paddi|ng, in p|
|00006110| 72 61 63 74 69 63 65 20 | 70 72 6f 62 6c 65 6d 73 |ractice |problems|
|00006120| 20 61 72 69 73 65 20 6d | 6f 73 74 20 6f 66 74 65 | arise m|ost ofte|
|00006130| 6e 20 66 72 6f 6d 20 74 | 68 65 20 63 6c 65 61 72 |n from t|he clear|
|00006140| 69 6e 67 0a 63 6f 6d 6d | 61 6e 64 73 20 60 63 6c |ing.comm|ands `cl|
|00006150| 27 20 61 6e 64 20 60 63 | 64 27 20 28 40 7b 22 43 |' and `c|d' (@{"C|
|00006160| 6c 65 61 72 69 6e 67 22 | 20 4c 69 6e 6b 20 22 43 |learing"| Link "C|
|00006170| 6c 65 61 72 69 6e 67 22 | 7d 29 2c 20 74 68 65 20 |learing"|}), the |
|00006180| 73 63 72 6f 6c 6c 69 6e | 67 20 63 6f 6d 6d 61 6e |scrollin|g comman|
|00006190| 64 73 20 60 73 66 27 0a | 61 6e 64 20 60 73 72 27 |ds `sf'.|and `sr'|
|000061a0| 20 28 40 7b 22 53 63 72 | 6f 6c 6c 69 6e 67 22 20 | (@{"Scr|olling" |
|000061b0| 4c 69 6e 6b 20 22 53 63 | 72 6f 6c 6c 69 6e 67 22 |Link "Sc|rolling"|
|000061c0| 7d 29 2c 20 61 6e 64 20 | 74 68 65 20 6c 69 6e 65 |}), and |the line|
|000061d0| 20 69 6e 73 65 72 74 2f | 64 65 6c 65 74 65 20 63 | insert/|delete c|
|000061e0| 6f 6d 6d 61 6e 64 73 20 | 60 61 6c 27 0a 61 6e 64 |ommands |`al'.and|
|000061f0| 20 60 64 6c 27 20 28 40 | 7b 22 49 6e 73 64 65 6c | `dl' (@|{"Insdel|
|00006200| 20 4c 69 6e 65 22 20 4c | 69 6e 6b 20 22 49 6e 73 | Line" L|ink "Ins|
|00006210| 64 65 6c 20 4c 69 6e 65 | 22 7d 29 2e 0a 0a 20 20 |del Line|"})... |
|00006220| 20 4f 63 63 61 73 69 6f | 6e 61 6c 6c 79 20 74 68 | Occasio|nally th|
|00006230| 65 20 74 65 72 6d 69 6e | 61 6c 20 64 65 73 63 72 |e termin|al descr|
|00006240| 69 70 74 69 6f 6e 20 66 | 61 69 6c 73 20 74 6f 20 |iption f|ails to |
|00006250| 64 65 66 69 6e 65 20 60 | 73 66 27 20 61 6e 64 20 |define `|sf' and |
|00006260| 73 6f 6d 65 0a 70 72 6f | 67 72 61 6d 73 20 77 69 |some.pro|grams wi|
|00006270| 6c 6c 20 75 73 65 20 60 | 64 6f 27 20 69 6e 73 74 |ll use `|do' inst|
|00006280| 65 61 64 2c 20 73 6f 20 | 79 6f 75 20 6d 61 79 20 |ead, so |you may |
|00006290| 67 65 74 20 61 20 70 72 | 6f 62 6c 65 6d 20 77 69 |get a pr|oblem wi|
|000062a0| 74 68 20 60 64 6f 27 2e | 20 20 49 66 0a 73 6f 2c |th `do'.| If.so,|
|000062b0| 20 66 69 72 73 74 20 64 | 65 66 69 6e 65 20 60 73 | first d|efine `s|
|000062c0| 66 27 20 6a 75 73 74 20 | 6c 69 6b 65 20 60 64 6f |f' just |like `do|
|000062d0| 27 2c 20 74 68 65 6e 20 | 61 64 64 20 73 6f 6d 65 |', then |add some|
|000062e0| 20 70 61 64 64 69 6e 67 | 20 74 6f 20 60 73 66 27 | padding| to `sf'|
|000062f0| 2e 0a 0a 20 20 20 54 68 | 65 20 62 65 73 74 20 73 |... Th|e best s|
|00006300| 74 72 61 74 65 67 79 20 | 69 73 20 74 6f 20 61 64 |trategy |is to ad|
|00006310| 64 20 61 20 6c 6f 74 20 | 6f 66 20 70 61 64 64 69 |d a lot |of paddi|
|00006320| 6e 67 20 61 74 20 66 69 | 72 73 74 2c 20 70 65 72 |ng at fi|rst, per|
|00006330| 68 61 70 73 20 32 30 30 | 0a 6d 73 65 63 2e 20 20 |haps 200|.msec. |
|00006340| 54 68 69 73 20 69 73 20 | 6d 75 63 68 20 6d 6f 72 |This is |much mor|
|00006350| 65 20 74 68 61 6e 20 65 | 6e 6f 75 67 68 3b 20 69 |e than e|nough; i|
|00006360| 6e 20 66 61 63 74 2c 20 | 69 74 20 73 68 6f 75 6c |n fact, |it shoul|
|00006370| 64 20 63 61 75 73 65 20 | 61 0a 76 69 73 69 62 6c |d cause |a.visibl|
|00006380| 65 20 73 6c 6f 77 64 6f | 77 6e 2e 20 20 28 49 66 |e slowdo|wn. (If|
|00006390| 20 79 6f 75 20 64 6f 6e | 27 74 20 73 65 65 20 61 | you don|'t see a|
|000063a0| 20 73 6c 6f 77 64 6f 77 | 6e 2c 20 74 68 65 20 63 | slowdow|n, the c|
|000063b0| 68 61 6e 67 65 20 68 61 | 73 20 6e 6f 74 0a 74 61 |hange ha|s not.ta|
|000063c0| 6b 65 6e 20 65 66 66 65 | 63 74 3b 20 40 7b 22 43 |ken effe|ct; @{"C|
|000063d0| 68 61 6e 67 69 6e 67 22 | 20 4c 69 6e 6b 20 22 43 |hanging"| Link "C|
|000063e0| 68 61 6e 67 69 6e 67 22 | 7d 2e 29 20 20 49 66 20 |hanging"|}.) If |
|000063f0| 74 68 69 73 20 6d 61 6b | 65 73 20 74 68 65 20 70 |this mak|es the p|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.