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: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C source text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 30 37 69 30 32 |Subject:| v07i02|
|00000010| 34 3a 20 20 50 75 62 6c | 69 63 2d 64 6f 6d 61 69 |4: Publ|ic-domai|
|00000020| 6e 20 74 70 75 74 28 31 | 29 20 70 72 6f 67 72 61 |n tput(1|) progra|
|00000030| 6d 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 6d 6f |m.Newsgr|oups: mo|
|00000040| 64 2e 73 6f 75 72 63 65 | 73 0a 41 70 70 72 6f 76 |d.source|s.Approv|
|00000050| 65 64 3a 20 6d 69 72 72 | 6f 72 21 72 73 0a 0a 53 |ed: mirr|or!rs..S|
|00000060| 75 62 6d 69 74 74 65 64 | 20 62 79 3a 20 73 65 69 |ubmitted| by: sei|
|00000070| 73 6d 6f 21 72 6f 63 68 | 65 73 74 65 72 21 75 72 |smo!roch|ester!ur|
|00000080| 2d 76 61 6c 68 61 6c 6c | 61 21 62 61 64 72 69 20 |-valhall|a!badri |
|00000090| 28 42 61 64 72 69 20 4c | 6f 6b 61 6e 61 74 68 61 |(Badri L|okanatha|
|000000a0| 6e 29 0a 4d 6f 64 2e 73 | 6f 75 72 63 65 73 3a 20 |n).Mod.s|ources: |
|000000b0| 56 6f 6c 75 6d 65 20 37 | 2c 20 49 73 73 75 65 20 |Volume 7|, Issue |
|000000c0| 32 34 0a 41 72 63 68 69 | 76 65 2d 6e 61 6d 65 3a |24.Archi|ve-name:|
|000000d0| 20 74 70 75 74 0a 0a 49 | 20 61 6d 20 65 6e 63 6c | tput..I| am encl|
|000000e0| 6f 73 69 6e 67 20 22 6d | 79 20 76 65 72 73 69 6f |osing "m|y versio|
|000000f0| 6e 22 20 6f 66 20 74 68 | 65 20 73 79 73 74 65 6d |n" of th|e system|
|00000100| 20 56 20 75 74 69 6c 69 | 74 79 20 74 70 75 74 2e | V utili|ty tput.|
|00000110| 20 54 68 65 20 73 68 61 | 72 20 66 69 6c 65 0a 63 | The sha|r file.c|
|00000120| 6f 6e 74 61 69 6e 73 20 | 61 20 43 20 73 6f 75 72 |ontains |a C sour|
|00000130| 63 65 20 66 69 6c 65 2c | 20 61 20 52 45 41 44 4d |ce file,| a READM|
|00000140| 45 2c 20 61 20 4d 61 6b | 65 66 69 6c 65 20 61 6e |E, a Mak|efile an|
|00000150| 64 20 61 20 6d 61 6e 20 | 70 61 67 65 2e 20 20 53 |d a man |page. S|
|00000160| 69 6e 63 65 20 49 0a 64 | 6f 20 6e 6f 74 20 68 61 |ince I.d|o not ha|
|00000170| 76 65 20 61 63 63 65 73 | 73 20 74 6f 20 61 20 73 |ve acces|s to a s|
|00000180| 79 73 74 65 6d 20 56 20 | 6d 61 63 68 69 6e 65 20 |ystem V |machine |
|00000190| 49 20 63 61 6e 6e 6f 74 | 20 76 6f 75 63 68 20 66 |I cannot| vouch f|
|000001a0| 6f 72 0a 63 6f 6d 70 61 | 74 69 62 69 6c 69 74 79 |or.compa|tibility|
|000001b0| 2e 0a 09 42 61 64 72 69 | 20 4c 6f 6b 61 6e 61 74 |...Badri| Lokanat|
|000001c0| 68 61 6e 0a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |han.----|--------|
|000001d0| 2d 2d 2d 2d 2d 2d 2d 2d | 43 55 54 20 48 45 52 45 |--------|CUT HERE|
|000001e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001f0| 2d 2d 2d 2d 0a 23 21 20 | 2f 62 69 6e 2f 73 68 0a |----.#! |/bin/sh.|
|00000200| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|00000210| 6c 20 61 72 63 68 69 76 | 65 2c 20 6d 65 61 6e 69 |l archiv|e, meani|
|00000220| 6e 67 3a 0a 23 20 31 2e | 20 52 65 6d 6f 76 65 20 |ng:.# 1.| Remove |
|00000230| 65 76 65 72 79 74 68 69 | 6e 67 20 61 62 6f 76 65 |everythi|ng above|
|00000240| 20 74 68 65 20 23 21 20 | 2f 62 69 6e 2f 73 68 20 | the #! |/bin/sh |
|00000250| 6c 69 6e 65 2e 0a 23 20 | 32 2e 20 53 61 76 65 20 |line..# |2. Save |
|00000260| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 74 65 |the resu|lting te|
|00000270| 78 74 20 69 6e 20 61 20 | 66 69 6c 65 2e 0a 23 20 |xt in a |file..# |
|00000280| 33 2e 20 45 78 65 63 75 | 74 65 20 74 68 65 20 66 |3. Execu|te the f|
|00000290| 69 6c 65 20 77 69 74 68 | 20 2f 62 69 6e 2f 73 68 |ile with| /bin/sh|
|000002a0| 20 28 6e 6f 74 20 63 73 | 68 29 20 74 6f 20 63 72 | (not cs|h) to cr|
|000002b0| 65 61 74 65 3a 0a 23 09 | 52 45 41 44 4d 45 0a 23 |eate:.#.|README.#|
|000002c0| 09 74 70 75 74 2e 31 0a | 23 09 74 70 75 74 2e 63 |.tput.1.|#.tput.c|
|000002d0| 0a 23 09 4d 61 6b 65 66 | 69 6c 65 0a 23 20 54 68 |.#.Makef|ile.# Th|
|000002e0| 69 73 20 61 72 63 68 69 | 76 65 20 63 72 65 61 74 |is archi|ve creat|
|000002f0| 65 64 3a 20 54 68 75 20 | 41 75 67 20 32 38 20 31 |ed: Thu |Aug 28 1|
|00000300| 30 3a 33 36 3a 33 38 20 | 31 39 38 36 0a 65 78 70 |0:36:38 |1986.exp|
|00000310| 6f 72 74 20 50 41 54 48 | 3b 20 50 41 54 48 3d 2f |ort PATH|; PATH=/|
|00000320| 62 69 6e 3a 2f 75 73 72 | 2f 62 69 6e 3a 24 50 41 |bin:/usr|/bin:$PA|
|00000330| 54 48 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 52 |TH.if te|st -f 'R|
|00000340| 45 41 44 4d 45 27 0a 74 | 68 65 6e 0a 09 65 63 68 |EADME'.t|hen..ech|
|00000350| 6f 20 73 68 61 72 3a 20 | 22 77 69 6c 6c 20 6e 6f |o shar: |"will no|
|00000360| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|00000370| 73 74 69 6e 67 20 66 69 | 6c 65 20 27 52 45 41 44 |sting fi|le 'READ|
|00000380| 4d 45 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |ME'".els|e.cat <<|
|00000390| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 52 45 | \SHAR_E|OF > 'RE|
|000003a0| 41 44 4d 45 27 0a 3e 46 | 72 6f 6d 20 72 6f 63 68 |ADME'.>F|rom roch|
|000003b0| 65 73 74 65 72 21 75 72 | 2d 76 61 6c 68 61 6c 6c |ester!ur|-valhall|
|000003c0| 61 21 62 61 64 72 69 20 | 20 41 75 67 20 32 38 20 |a!badri | Aug 28 |
|000003d0| 31 30 3a 30 32 0a 54 6f | 3a 20 77 68 6f 6d 20 69 |10:02.To|: whom i|
|000003e0| 74 20 6d 61 79 20 63 6f | 6e 63 65 72 6e 0a 53 75 |t may co|ncern.Su|
|000003f0| 62 6a 65 63 74 3a 20 74 | 70 75 74 20 69 6e 73 74 |bject: t|put inst|
|00000400| 72 75 63 74 69 6f 6e 73 | 0a 0a 54 68 69 73 20 70 |ructions|..This p|
|00000410| 72 6f 67 72 61 6d 20 69 | 73 20 73 75 70 70 6f 73 |rogram i|s suppos|
|00000420| 65 64 20 74 6f 20 62 65 | 20 65 71 75 69 76 61 6c |ed to be| equival|
|00000430| 65 6e 74 20 74 6f 20 74 | 68 65 20 73 79 73 74 65 |ent to t|he syste|
|00000440| 6d 20 56 20 75 74 69 6c | 69 74 79 0a 74 70 75 74 |m V util|ity.tput|
|00000450| 2c 20 77 68 69 63 68 20 | 68 61 6e 64 6c 65 73 20 |, which |handles |
|00000460| 73 63 72 65 65 6e 20 70 | 61 72 61 6d 65 74 65 72 |screen p|arameter|
|00000470| 73 20 66 72 6f 6d 20 74 | 65 72 6d 63 61 70 2e 20 |s from t|ermcap. |
|00000480| 49 74 20 6d 61 79 20 74 | 61 6b 65 20 69 6e 70 75 |It may t|ake inpu|
|00000490| 74 73 0a 69 6e 20 61 20 | 73 6c 69 67 68 74 6c 79 |ts.in a |slightly|
|000004a0| 20 64 69 66 66 65 72 65 | 6e 74 20 66 6f 72 6d 61 | differe|nt forma|
|000004b0| 74 20 28 62 61 73 69 63 | 61 6c 6c 79 20 62 65 63 |t (basic|ally bec|
|000004c0| 61 75 73 65 20 49 20 77 | 72 6f 74 65 20 74 68 69 |ause I w|rote thi|
|000004d0| 73 20 70 72 6f 67 72 61 | 6d 0a 77 69 74 68 6f 75 |s progra|m.withou|
|000004e0| 74 20 61 63 74 75 61 6c | 6c 79 20 68 61 76 69 6e |t actual|ly havin|
|000004f0| 67 20 77 6f 72 6b 65 64 | 20 6f 6e 20 74 68 65 20 |g worked| on the |
|00000500| 73 79 73 74 65 6d 20 56 | 20 74 70 75 74 2e 29 20 |system V| tput.) |
|00000510| 49 20 73 75 70 70 6f 73 | 65 20 74 68 65 0a 6d 61 |I suppos|e the.ma|
|00000520| 6e 20 70 61 67 65 20 69 | 73 20 64 69 66 66 65 72 |n page i|s differ|
|00000530| 65 6e 74 20 74 6f 6f 21 | 20 41 6e 79 20 73 75 67 |ent too!| Any sug|
|00000540| 67 65 73 74 69 6f 6e 73 | 2f 6d 6f 64 69 66 69 63 |gestions|/modific|
|00000550| 61 74 69 6f 6e 73 20 61 | 72 65 20 77 65 6c 63 6f |ations a|re welco|
|00000560| 6d 65 2e 0a 0a 59 6f 75 | 72 20 73 79 73 74 65 6d |me...You|r system|
|00000570| 20 69 73 20 61 73 73 75 | 6d 65 64 20 74 6f 20 68 | is assu|med to h|
|00000580| 61 76 65 20 74 65 72 6d | 6c 69 62 20 61 6e 64 20 |ave term|lib and |
|00000590| 61 73 73 6f 63 69 61 74 | 65 64 20 66 75 6e 63 74 |associat|ed funct|
|000005a0| 69 6f 6e 73 20 28 49 0a | 77 72 6f 74 65 20 74 68 |ions (I.|wrote th|
|000005b0| 65 20 70 72 6f 67 72 61 | 6d 20 6f 6e 20 42 53 44 |e progra|m on BSD|
|000005c0| 20 34 2e 32 2c 20 61 73 | 73 75 6d 69 6e 67 20 74 | 4.2, as|suming t|
|000005d0| 68 61 74 20 74 65 72 6d | 6c 69 62 20 77 61 73 20 |hat term|lib was |
|000005e0| 66 61 69 72 6c 79 0a 73 | 74 61 6e 64 61 72 64 2e |fairly.s|tandard.|
|000005f0| 29 20 54 68 65 72 65 20 | 69 73 20 6f 6e 65 20 69 |) There |is one i|
|00000600| 6e 63 6c 75 64 65 20 66 | 69 6c 65 20 69 6e 20 74 |nclude f|ile in t|
|00000610| 68 65 20 70 72 6f 67 72 | 61 6d 20 2d 20 73 67 74 |he progr|am - sgt|
|00000620| 74 79 2e 68 20 77 68 69 | 63 68 0a 73 68 6f 75 6c |ty.h whi|ch.shoul|
|00000630| 64 20 62 65 20 70 72 65 | 73 65 6e 74 2e 20 49 66 |d be pre|sent. If|
|00000640| 20 6e 6f 74 2c 20 49 20 | 68 6f 70 65 20 61 6e 20 | not, I |hope an |
|00000650| 65 71 75 69 76 61 6c 65 | 6e 74 20 65 78 69 73 74 |equivale|nt exist|
|00000660| 73 2e 0a 4f 74 68 65 72 | 20 74 68 61 6e 20 74 68 |s..Other| than th|
|00000670| 61 74 2c 20 74 68 65 20 | 63 6f 64 65 20 73 68 6f |at, the |code sho|
|00000680| 75 6c 64 20 62 65 20 66 | 61 69 72 6c 79 20 70 6f |uld be f|airly po|
|00000690| 72 74 61 62 6c 65 2c 20 | 73 69 6e 63 65 20 74 68 |rtable, |since th|
|000006a0| 65 72 65 0a 69 73 6e 27 | 74 20 6d 75 63 68 20 74 |ere.isn'|t much t|
|000006b0| 6f 20 69 74 21 0a 0a 54 | 68 65 20 6d 61 6b 65 20 |o it!..T|he make |
|000006c0| 66 69 6c 65 20 69 73 20 | 64 65 6c 69 62 72 61 74 |file is |delibrat|
|000006d0| 65 6c 79 20 74 72 69 76 | 69 61 6c 2e 20 49 74 20 |ely triv|ial. It |
|000006e0| 64 6f 65 73 20 6e 6f 74 | 20 64 6f 20 61 6e 79 20 |does not| do any |
|000006f0| 69 6e 73 74 61 6c 6c 61 | 74 69 6f 6e 0a 2d 20 6a |installa|tion.- j|
|00000700| 75 73 74 20 63 6f 6d 70 | 69 6c 61 74 69 6f 6e 2e |ust comp|ilation.|
|00000710| 0a 0a 6d 61 6b 65 0a 0a | 77 69 6c 6c 20 6d 61 6b |..make..|will mak|
|00000720| 65 20 74 70 75 74 20 69 | 6e 20 74 68 65 20 63 75 |e tput i|n the cu|
|00000730| 72 72 65 6e 74 20 64 69 | 72 65 63 74 6f 72 79 2e |rrent di|rectory.|
|00000740| 0a 0a 6d 61 6b 65 20 6d | 61 6e 0a 0a 77 69 6c 6c |..make m|an..will|
|00000750| 20 6d 61 6b 65 20 61 20 | 6d 61 6e 20 70 61 67 65 | make a |man page|
|00000760| 20 69 6e 20 74 70 75 74 | 2e 64 6f 63 2e 0a 0a 0a | in tput|.doc....|
|00000770| 74 70 75 74 2c 20 77 72 | 69 74 74 65 6e 20 62 79 |tput, wr|itten by|
|00000780| 20 42 61 64 72 69 20 4c | 6f 6b 61 6e 61 74 68 61 | Badri L|okanatha|
|00000790| 6e 2c 20 69 73 20 69 6e | 20 74 68 65 20 70 75 62 |n, is in| the pub|
|000007a0| 6c 69 63 20 64 6f 6d 61 | 69 6e 2c 20 61 6e 64 20 |lic doma|in, and |
|000007b0| 6d 61 79 20 62 65 0a 75 | 73 65 64 20 62 79 20 61 |may be.u|sed by a|
|000007c0| 6e 79 20 70 65 72 73 6f | 6e 20 6f 72 20 6f 72 67 |ny perso|n or org|
|000007d0| 61 6e 69 7a 61 74 69 6f | 6e 2c 20 69 6e 20 61 6e |anizatio|n, in an|
|000007e0| 79 20 77 61 79 20 61 6e | 64 20 66 6f 72 20 61 6e |y way an|d for an|
|000007f0| 79 20 70 75 72 70 6f 73 | 65 2e 0a 54 68 65 72 65 |y purpos|e..There|
|00000800| 20 69 73 20 6e 6f 20 77 | 61 72 72 61 6e 74 79 20 | is no w|arranty |
|00000810| 6f 66 20 6d 65 72 63 68 | 61 6e 74 61 62 69 6c 69 |of merch|antabili|
|00000820| 74 79 20 6e 6f 72 20 61 | 6e 79 20 77 61 72 72 61 |ty nor a|ny warra|
|00000830| 6e 74 79 20 6f 66 20 66 | 69 74 6e 65 73 73 20 66 |nty of f|itness f|
|00000840| 6f 72 0a 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |or.a par|ticular |
|00000850| 70 75 72 70 6f 73 65 20 | 6e 6f 72 20 61 6e 79 20 |purpose |nor any |
|00000860| 6f 74 68 65 72 20 77 61 | 72 72 61 6e 74 79 2c 20 |other wa|rranty, |
|00000870| 65 69 74 68 65 72 20 65 | 78 70 72 65 73 73 20 6f |either e|xpress o|
|00000880| 72 20 69 6d 70 6c 69 65 | 64 2c 0a 61 73 20 74 6f |r implie|d,.as to|
|00000890| 20 74 68 65 20 61 63 63 | 75 72 61 63 79 20 6f 66 | the acc|uracy of|
|000008a0| 20 74 68 65 20 65 6e 63 | 6c 6f 73 65 64 20 6d 61 | the enc|losed ma|
|000008b0| 74 65 72 69 61 6c 73 20 | 6f 72 20 61 73 20 74 6f |terials |or as to|
|000008c0| 20 74 68 65 69 72 20 73 | 75 69 74 61 62 69 6c 69 | their s|uitabili|
|000008d0| 74 79 0a 66 6f 72 20 61 | 6e 79 20 70 61 72 74 69 |ty.for a|ny parti|
|000008e0| 63 75 6c 61 72 20 70 75 | 72 70 6f 73 65 2e 20 20 |cular pu|rpose. |
|000008f0| 41 63 63 6f 72 64 69 6e | 67 6c 79 2c 20 74 68 65 |Accordin|gly, the|
|00000900| 20 61 75 74 68 6f 72 20 | 61 73 73 75 6d 65 73 20 | author |assumes |
|00000910| 6e 6f 20 72 65 73 70 6f | 6e 2d 0a 73 69 62 69 6c |no respo|n-.sibil|
|00000920| 69 74 79 20 66 6f 72 20 | 74 68 65 69 72 20 75 73 |ity for |their us|
|00000930| 65 20 62 79 20 74 68 65 | 20 72 65 63 69 70 69 65 |e by the| recipie|
|00000940| 6e 74 2e 20 20 20 46 75 | 72 74 68 65 72 2c 20 74 |nt. Fu|rther, t|
|00000950| 68 65 20 61 75 74 68 6f | 72 20 61 73 73 75 6d 65 |he autho|r assume|
|00000960| 73 0a 6e 6f 20 6f 62 6c | 69 67 61 74 69 6f 6e 20 |s.no obl|igation |
|00000970| 74 6f 20 66 75 72 6e 69 | 73 68 20 61 6e 79 20 61 |to furni|sh any a|
|00000980| 73 73 69 73 74 61 6e 63 | 65 20 6f 66 20 61 6e 79 |ssistanc|e of any|
|00000990| 20 6b 69 6e 64 20 77 68 | 61 74 73 6f 65 76 65 72 | kind wh|atsoever|
|000009a0| 2c 20 6f 72 20 74 6f 0a | 66 75 72 6e 69 73 68 20 |, or to.|furnish |
|000009b0| 61 6e 79 20 61 64 64 69 | 74 69 6f 6e 61 6c 20 69 |any addi|tional i|
|000009c0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 6f 72 20 64 6f |nformati|on or do|
|000009d0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2e 0a 53 48 41 |cumentat|ion..SHA|
|000009e0| 52 5f 45 4f 46 0a 66 69 | 0a 69 66 20 74 65 73 74 |R_EOF.fi|.if test|
|000009f0| 20 2d 66 20 27 74 70 75 | 74 2e 31 27 0a 74 68 65 | -f 'tpu|t.1'.the|
|00000a00| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 22 77 |n..echo |shar: "w|
|00000a10| 69 6c 6c 20 6e 6f 74 20 | 6f 76 65 72 2d 77 72 69 |ill not |over-wri|
|00000a20| 74 65 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |te exist|ing file|
|00000a30| 20 27 74 70 75 74 2e 31 | 27 22 0a 65 6c 73 65 0a | 'tput.1|'".else.|
|00000a40| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00000a50| 20 3e 20 27 74 70 75 74 | 2e 31 27 0a 2e 54 48 20 | > 'tput|.1'..TH |
|00000a60| 74 70 75 74 20 31 6c 6f | 63 61 6c 20 22 55 52 20 |tput 1lo|cal "UR |
|00000a70| 45 45 20 47 52 41 44 55 | 41 54 45 20 56 4c 53 49 |EE GRADU|ATE VLSI|
|00000a80| 20 4c 41 42 22 0a 2e 53 | 48 20 4e 41 4d 45 0a 74 | LAB"..S|H NAME.t|
|00000a90| 70 75 74 20 5c 2d 20 43 | 68 61 6e 67 65 20 74 65 |put \- C|hange te|
|00000aa0| 72 6d 69 6e 61 6c 20 64 | 69 73 70 6c 61 79 20 63 |rminal d|isplay c|
|00000ab0| 68 61 72 61 63 74 65 72 | 69 73 74 69 63 73 2e 0a |haracter|istics..|
|00000ac0| 2e 53 48 20 53 59 4e 4f | 50 53 49 53 0a 2e 42 20 |.SH SYNO|PSIS..B |
|00000ad0| 20 74 70 75 74 20 6f 70 | 74 69 6f 6e 0a 5b 0a 2e | tput op|tion.[..|
|00000ae0| 49 20 22 78 22 0a 2e 49 | 20 22 79 22 0a 5d 0a 2e |I "x"..I| "y".]..|
|00000af0| 53 48 20 44 45 53 43 52 | 49 50 54 49 4f 4e 0a 2e |SH DESCR|IPTION..|
|00000b00| 49 20 74 70 75 74 0a 73 | 65 6e 64 73 20 61 20 73 |I tput.s|ends a s|
|00000b10| 65 71 75 65 6e 63 65 20 | 6f 66 20 63 68 61 72 61 |equence |of chara|
|00000b20| 63 74 65 72 73 20 63 6f | 72 72 65 73 70 6f 6e 64 |cters co|rrespond|
|00000b30| 69 6e 67 20 74 6f 20 74 | 68 65 20 6f 70 65 72 61 |ing to t|he opera|
|00000b40| 74 69 6f 6e 0a 73 70 65 | 63 69 66 69 65 64 20 69 |tion.spe|cified i|
|00000b50| 6e 20 6f 70 74 69 6f 6e | 2e 20 49 74 20 69 73 20 |n option|. It is |
|00000b60| 69 6e 74 65 6e 64 65 64 | 20 74 6f 20 65 6d 75 6c |intended| to emul|
|00000b70| 61 74 65 20 74 68 65 20 | 73 79 73 74 65 6d 20 56 |ate the |system V|
|00000b80| 20 75 74 69 6c 69 74 79 | 0a 74 70 75 74 2e 0a 2e | utility|.tput...|
|00000b90| 50 50 0a 4f 70 74 69 6f | 6e 20 69 73 20 61 20 74 |PP.Optio|n is a t|
|00000ba0| 77 6f 20 6c 65 74 74 65 | 72 20 63 61 70 61 62 69 |wo lette|r capabi|
|00000bb0| 6c 69 74 79 20 61 73 20 | 73 70 65 63 69 66 69 65 |lity as |specifie|
|00000bc0| 64 20 69 6e 20 74 65 72 | 6d 63 61 70 28 35 29 2e |d in ter|mcap(5).|
|00000bd0| 0a 78 20 61 6e 64 20 79 | 20 61 72 65 20 69 6e 74 |.x and y| are int|
|00000be0| 65 67 65 72 20 76 61 6c | 75 65 73 20 66 6f 72 20 |eger val|ues for |
|00000bf0| 63 75 72 73 6f 72 20 6d | 6f 76 65 6d 65 6e 74 2e |cursor m|ovement.|
|00000c00| 0a 54 79 70 69 63 61 6c | 20 6f 70 74 69 6f 6e 73 |.Typical| options|
|00000c10| 20 61 72 65 20 67 69 76 | 65 6e 20 62 65 6c 6f 77 | are giv|en below|
|00000c20| 2e 0a 2e 53 48 20 52 45 | 51 55 45 53 54 53 0a 2e |...SH RE|QUESTS..|
|00000c30| 74 69 30 0a 2e 49 20 22 | 4f 70 74 69 6f 6e 20 20 |ti0..I "|Option |
|00000c40| 20 20 20 20 20 20 20 20 | 20 20 45 78 70 6c 61 6e | | Explan|
|00000c50| 61 74 69 6f 6e 22 0a 2e | 74 69 30 0a 2e 6c 69 0a |ation"..|ti0..li.|
|00000c60| 62 6c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |bl | |
|00000c70| 20 20 42 65 65 70 20 74 | 68 65 20 74 65 72 6d 69 | Beep t|he termi|
|00000c80| 6e 61 6c 0a 2e 74 69 30 | 0a 2e 6c 69 0a 63 6c 20 |nal..ti0|..li.cl |
|00000c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 43 | | C|
|00000ca0| 6c 65 61 72 20 73 63 72 | 65 65 6e 0a 2e 74 69 30 |lear scr|een..ti0|
|00000cb0| 0a 2e 6c 69 0a 6d 62 20 | 20 20 20 20 20 20 20 20 |..li.mb | |
|00000cc0| 20 20 20 20 20 20 20 42 | 6c 69 6e 6b 20 6c 69 6e | B|link lin|
|00000cd0| 65 0a 2e 74 69 30 0a 2e | 6c 69 0a 6d 64 20 20 20 |e..ti0..|li.md |
|00000ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 48 69 67 | | Hig|
|00000cf0| 68 6c 69 67 68 74 20 6c | 69 6e 65 0a 2e 74 69 30 |hlight l|ine..ti0|
|00000d00| 0a 2e 6c 69 0a 6d 65 20 | 20 20 20 20 20 20 20 20 |..li.me | |
|00000d10| 20 20 20 20 20 20 20 52 | 65 73 74 6f 72 65 20 6e | R|estore n|
|00000d20| 6f 72 6d 61 6c 20 6d 6f | 64 65 0a 2e 74 69 30 0a |ormal mo|de..ti0.|
|00000d30| 2e 6c 69 0a 6d 72 20 20 | 20 20 20 20 20 20 20 20 |.li.mr | |
|00000d40| 20 20 20 20 20 20 52 65 | 76 65 72 73 65 20 76 69 | Re|verse vi|
|00000d50| 64 65 6f 20 6c 69 6e 65 | 0a 2e 74 69 30 0a 2e 6c |deo line|..ti0..l|
|00000d60| 69 0a 73 65 20 20 20 20 | 20 20 20 20 20 20 20 20 |i.se | |
|00000d70| 20 20 20 20 45 6e 64 20 | 53 74 61 6e 64 6f 75 74 | End |Standout|
|00000d80| 20 6d 6f 64 65 0a 2e 74 | 69 30 0a 2e 6c 69 0a 73 | mode..t|i0..li.s|
|00000d90| 6f 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |o | |
|00000da0| 20 42 65 67 69 6e 20 53 | 74 61 6e 64 6f 75 74 20 | Begin S|tandout |
|00000db0| 6d 6f 64 65 0a 2e 74 69 | 30 0a 2e 6c 69 0a 75 65 |mode..ti|0..li.ue|
|00000dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000dd0| 45 6e 64 20 75 6e 64 65 | 72 6c 69 6e 69 6e 67 20 |End unde|rlining |
|00000de0| 6d 6f 64 65 0a 2e 74 69 | 30 0a 2e 6c 69 0a 75 73 |mode..ti|0..li.us|
|00000df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e00| 53 74 61 72 74 20 75 6e | 64 65 72 6c 69 6e 69 6e |Start un|derlinin|
|00000e10| 67 20 6d 6f 64 65 0a 2e | 50 50 0a 41 20 74 79 70 |g mode..|PP.A typ|
|00000e20| 69 63 61 6c 20 63 75 72 | 73 6f 72 20 61 64 64 72 |ical cur|sor addr|
|00000e30| 65 73 73 69 6e 67 20 6f | 70 74 69 6f 6e 20 77 6f |essing o|ption wo|
|00000e40| 75 6c 64 20 62 65 20 73 | 65 74 20 73 63 72 6f 6c |uld be s|et scrol|
|00000e50| 6c 20 72 65 67 69 6f 6e | 20 28 69 66 20 73 75 70 |l region| (if sup|
|00000e60| 70 6f 72 74 65 64 29 3a | 0a 2e 50 50 0a 74 70 75 |ported):|..PP.tpu|
|00000e70| 74 20 63 73 20 35 20 33 | 0a 2e 50 50 0a 77 6f 75 |t cs 5 3|..PP.wou|
|00000e80| 6c 64 20 73 65 74 20 74 | 68 65 20 73 63 72 6f 6c |ld set t|he scrol|
|00000e90| 6c 69 6e 67 20 62 65 74 | 77 65 65 6e 20 6c 69 6e |ling bet|ween lin|
|00000ea0| 65 73 20 33 20 61 6e 64 | 20 35 2e 0a 2e 53 48 20 |es 3 and| 5...SH |
|00000eb0| 46 49 4c 45 53 0a 2f 65 | 74 63 2f 74 65 72 6d 63 |FILES./e|tc/termc|
|00000ec0| 61 70 0a 2e 53 48 20 53 | 45 45 20 41 4c 53 4f 0a |ap..SH S|EE ALSO.|
|00000ed0| 74 65 72 6d 63 61 70 28 | 33 58 29 2c 20 74 65 72 |termcap(|3X), ter|
|00000ee0| 6d 63 61 70 28 35 29 0a | 2e 53 48 20 44 49 41 47 |mcap(5).|.SH DIAG|
|00000ef0| 4e 4f 53 54 49 43 53 0a | 52 65 74 75 72 6e 73 20 |NOSTICS.|Returns |
|00000f00| 30 20 69 66 20 69 74 20 | 77 6f 72 6b 65 64 3b 20 |0 if it |worked; |
|00000f10| 65 6c 73 65 20 72 65 74 | 75 72 6e 73 20 31 2e 0a |else ret|urns 1..|
|00000f20| 2e 53 48 20 42 55 47 53 | 0a 2e 50 50 0a 54 68 65 |.SH BUGS|..PP.The|
|00000f30| 20 6f 6e 75 73 20 6f 66 | 20 68 61 6e 64 6c 69 6e | onus of| handlin|
|00000f40| 67 20 75 6e 61 76 61 69 | 6c 61 62 6c 65 20 6f 70 |g unavai|lable op|
|00000f50| 74 69 6f 6e 73 20 69 73 | 20 6f 6e 20 74 68 65 20 |tions is| on the |
|00000f60| 75 73 65 72 2e 0a 2e 53 | 48 20 41 55 54 48 4f 52 |user...S|H AUTHOR|
|00000f70| 0a 42 61 64 72 69 20 4c | 6f 6b 61 6e 61 74 68 61 |.Badri L|okanatha|
|00000f80| 6e 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 0a 69 66 |n.SHAR_E|OF.fi.if|
|00000f90| 20 74 65 73 74 20 2d 66 | 20 27 74 70 75 74 2e 63 | test -f| 'tput.c|
|00000fa0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00000fb0| 72 3a 20 22 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |r: "will| not ove|
|00000fc0| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00000fd0| 20 66 69 6c 65 20 27 74 | 70 75 74 2e 63 27 22 0a | file 't|put.c'".|
|00000fe0| 65 6c 73 65 0a 63 61 74 | 20 3c 3c 20 5c 53 48 41 |else.cat| << \SHA|
|00000ff0| 52 5f 45 4f 46 20 3e 20 | 27 74 70 75 74 2e 63 27 |R_EOF > |'tput.c'|
|00001000| 0a 23 69 66 6e 64 65 66 | 20 4c 49 4e 54 0a 73 74 |.#ifndef| LINT.st|
|00001010| 61 74 69 63 20 63 68 61 | 72 20 72 63 73 69 64 5b |atic cha|r rcsid[|
|00001020| 5d 20 3d 20 22 24 48 65 | 61 64 65 72 3a 20 74 70 |] = "$He|ader: tp|
|00001030| 75 74 2e 63 2c 76 20 31 | 2e 32 20 38 36 2f 30 38 |ut.c,v 1|.2 86/08|
|00001040| 2f 32 32 20 31 33 3a 33 | 39 3a 32 37 20 62 61 64 |/22 13:3|9:27 bad|
|00001050| 72 69 20 45 78 70 20 24 | 22 20 3b 0a 23 65 6e 64 |ri Exp $|" ;.#end|
|00001060| 69 66 20 4c 49 4e 54 0a | 2f 2a 0a 20 2a 20 43 6f |if LINT.|/*. * Co|
|00001070| 70 79 72 69 67 68 74 20 | 28 43 29 20 24 44 61 74 |pyright |(C) $Dat|
|00001080| 65 3a 20 38 36 2f 30 38 | 2f 32 32 20 31 33 3a 33 |e: 86/08|/22 13:3|
|00001090| 39 3a 32 37 20 24 0a 20 | 2a 20 62 79 20 24 41 75 |9:27 $. |* by $Au|
|000010a0| 74 68 6f 72 3a 20 62 61 | 64 72 69 20 24 0a 20 2a |thor: ba|dri $. *|
|000010b0| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 52 | Univers|ity of R|
|000010c0| 6f 63 68 65 73 74 65 72 | 2c 0a 20 2a 20 44 65 70 |ochester|,. * Dep|
|000010d0| 61 72 74 6d 65 6e 74 20 | 6f 66 20 45 6c 65 63 74 |artment |of Elect|
|000010e0| 72 69 63 61 6c 20 45 6e | 67 69 6e 65 65 72 69 6e |rical En|gineerin|
|000010f0| 67 2e 0a 20 2a 0a 20 2a | 20 43 6f 4e 74 45 6e 54 |g.. *. *| CoNtEnT|
|00001100| 73 20 20 20 54 68 69 73 | 20 66 69 6c 65 20 63 6f |s This| file co|
|00001110| 6e 74 61 69 6e 73 20 61 | 20 70 72 6f 67 72 61 6d |ntains a| program|
|00001120| 20 74 6f 20 65 6d 75 6c | 61 74 65 20 74 68 65 20 | to emul|ate the |
|00001130| 73 79 73 74 65 6d 20 56 | 0a 20 2a 20 43 6f 4e 74 |system V|. * CoNt|
|00001140| 45 6e 54 73 20 20 20 76 | 65 72 73 69 6f 6e 20 6f |EnTs v|ersion o|
|00001150| 66 20 74 70 75 74 2e 0a | 20 2a 0a 20 2a 20 24 4c |f tput..| *. * $L|
|00001160| 6f 63 6b 65 72 3a 20 62 | 61 64 72 69 20 24 0a 20 |ocker: b|adri $. |
|00001170| 2a 20 24 53 6f 75 72 63 | 65 3a 20 2f 75 2f 75 73 |* $Sourc|e: /u/us|
|00001180| 65 72 73 2f 62 61 64 72 | 69 2f 75 73 72 2f 73 72 |ers/badr|i/usr/sr|
|00001190| 63 2f 6c 6f 63 61 6c 2f | 74 70 75 74 2f 52 43 53 |c/local/|tput/RCS|
|000011a0| 2f 74 70 75 74 2e 63 2c | 76 20 24 0a 20 2a 20 24 |/tput.c,|v $. * $|
|000011b0| 52 65 76 69 73 69 6f 6e | 3a 20 31 2e 32 20 24 0a |Revision|: 1.2 $.|
|000011c0| 20 2a 0a 20 2a 20 48 69 | 73 74 6f 72 79 20 6f 66 | *. * Hi|story of|
|000011d0| 20 74 68 69 73 20 72 65 | 6c 65 61 73 65 3a 0a 20 | this re|lease:. |
|000011e0| 2a 20 24 4c 6f 67 3a 09 | 74 70 75 74 2e 63 2c 76 |* $Log:.|tput.c,v|
|000011f0| 20 24 0a 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 31 | $. * Re|vision 1|
|00001200| 2e 32 20 20 38 36 2f 30 | 38 2f 32 32 20 20 31 33 |.2 86/0|8/22 13|
|00001210| 3a 33 39 3a 32 37 20 20 | 62 61 64 72 69 0a 20 2a |:39:27 |badri. *|
|00001220| 20 31 2e 20 43 6f 72 72 | 65 63 74 65 64 20 61 20 | 1. Corr|ected a |
|00001230| 62 75 67 20 74 68 61 74 | 20 77 6f 75 6c 64 20 63 |bug that| would c|
|00001240| 61 75 73 65 20 25 64 20 | 74 6f 20 66 61 69 6c 20 |ause %d |to fail |
|00001250| 61 66 74 65 72 20 25 25 | 2e 0a 20 2a 20 32 2e 20 |after %%|.. * 2. |
|00001260| 49 6e 63 6c 75 64 65 64 | 20 58 54 41 42 53 20 68 |Included| XTABS h|
|00001270| 61 6e 64 6c 69 6e 67 2e | 0a 20 2a 20 33 2e 20 47 |andling.|. * 3. G|
|00001280| 65 6e 65 72 61 6c 20 63 | 6c 65 61 6e 75 70 20 6f |eneral c|leanup o|
|00001290| 66 20 63 6f 64 65 2e 0a | 20 2a 20 0a 20 2a 20 52 |f code..| * . * R|
|000012a0| 65 76 69 73 69 6f 6e 20 | 31 2e 31 20 20 38 36 2f |evision |1.1 86/|
|000012b0| 30 38 2f 32 31 20 20 31 | 39 3a 32 33 3a 33 33 20 |08/21 1|9:23:33 |
|000012c0| 20 62 61 64 72 69 0a 20 | 2a 20 49 6e 69 74 69 61 | badri. |* Initia|
|000012d0| 6c 20 72 65 76 69 73 69 | 6f 6e 0a 20 2a 20 0a 20 |l revisi|on. * . |
|000012e0| 2a 2f 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 67 74 |*/.#incl|ude <sgt|
|000012f0| 74 79 2e 68 3e 0a 0a 23 | 69 66 6e 64 65 66 20 58 |ty.h>..#|ifndef X|
|00001300| 54 41 42 53 0a 23 64 65 | 66 69 6e 65 20 58 54 41 |TABS.#de|fine XTA|
|00001310| 42 53 20 30 30 30 36 30 | 30 30 0a 23 65 6e 64 69 |BS 00060|00.#endi|
|00001320| 66 20 20 58 54 41 42 53 | 0a 0a 23 64 65 66 69 6e |f XTABS|..#defin|
|00001330| 65 20 4c 41 52 47 45 42 | 55 46 20 31 30 32 34 0a |e LARGEB|UF 1024.|
|00001340| 23 64 65 66 69 6e 65 20 | 53 4d 41 4c 4c 42 55 46 |#define |SMALLBUF|
|00001350| 20 20 20 36 34 0a 23 64 | 65 66 69 6e 65 20 4f 55 | 64.#d|efine OU|
|00001360| 54 50 55 54 20 20 20 20 | 20 20 31 0a 23 64 65 66 |TPUT | 1.#def|
|00001370| 69 6e 65 20 53 55 43 43 | 45 53 53 20 20 20 20 20 |ine SUCC|ESS |
|00001380| 30 0a 23 64 65 66 69 6e | 65 20 46 41 49 4c 55 52 |0.#defin|e FAILUR|
|00001390| 45 20 20 20 20 20 31 0a | 23 64 65 66 69 6e 65 20 |E 1.|#define |
|000013a0| 41 46 46 4c 49 4e 45 53 | 20 20 20 20 31 0a 0a 69 |AFFLINES| 1..i|
|000013b0| 6e 74 20 65 72 72 6e 6f | 3b 0a 0a 6d 61 69 6e 28 |nt errno|;..main(|
|000013c0| 61 72 67 63 2c 61 72 67 | 76 29 0a 69 6e 74 20 61 |argc,arg|v).int a|
|000013d0| 72 67 63 3b 0a 63 68 61 | 72 20 2a 61 72 67 76 5b |rgc;.cha|r *argv[|
|000013e0| 5d 3b 0a 7b 0a 09 63 68 | 61 72 20 62 70 5b 4c 41 |];.{..ch|ar bp[LA|
|000013f0| 52 47 45 42 55 46 5d 2c | 20 2a 67 65 74 65 6e 76 |RGEBUF],| *getenv|
|00001400| 28 29 2c 20 2a 74 67 65 | 74 73 74 72 28 29 2c 20 |(), *tge|tstr(), |
|00001410| 2a 74 67 6f 74 6f 28 29 | 2c 0a 09 20 20 20 20 20 |*tgoto()|,.. |
|00001420| 62 75 66 5b 53 4d 41 4c | 4c 42 55 46 5d 2c 20 2a |buf[SMAL|LBUF], *|
|00001430| 61 72 65 61 2c 20 2a 70 | 74 72 3b 0a 09 69 6e 74 |area, *p|tr;..int|
|00001440| 20 6f 75 74 63 28 29 3b | 0a 09 73 74 72 75 63 74 | outc();|..struct|
|00001450| 20 73 67 74 74 79 62 20 | 74 74 79 70 72 6d 3b 0a | sgttyb |ttyprm;.|
|00001460| 09 73 68 6f 72 74 20 74 | 74 79 66 6c 67 3b 0a 0a |.short t|tyflg;..|
|00001470| 09 69 66 20 28 61 72 67 | 63 20 3c 20 32 29 20 65 |.if (arg|c < 2) e|
|00001480| 78 69 74 28 46 41 49 4c | 55 52 45 29 3b 0a 0a 09 |xit(FAIL|URE);...|
|00001490| 73 77 69 74 63 68 20 28 | 74 67 65 74 65 6e 74 28 |switch (|tgetent(|
|000014a0| 62 70 2c 67 65 74 65 6e | 76 28 22 54 45 52 4d 22 |bp,geten|v("TERM"|
|000014b0| 29 29 29 0a 09 7b 0a 09 | 09 63 61 73 65 20 2d 31 |)))..{..|.case -1|
|000014c0| 3a 0a 09 09 09 65 78 69 | 74 28 46 41 49 4c 55 52 |:....exi|t(FAILUR|
|000014d0| 45 29 3b 0a 0a 09 09 63 | 61 73 65 20 20 30 3a 0a |E);....c|ase 0:.|
|000014e0| 09 09 09 65 78 69 74 28 | 46 41 49 4c 55 52 45 29 |...exit(|FAILURE)|
|000014f0| 3b 0a 0a 09 09 63 61 73 | 65 20 20 31 3a 0a 09 09 |;....cas|e 1:...|
|00001500| 09 62 72 65 61 6b 3b 0a | 09 7d 0a 09 61 72 65 61 |.break;.|.}..area|
|00001510| 20 3d 20 62 75 66 3b 0a | 09 69 66 20 28 2a 28 70 | = buf;.|.if (*(p|
|00001520| 74 72 3d 74 67 65 74 73 | 74 72 28 61 72 67 76 5b |tr=tgets|tr(argv[|
|00001530| 31 5d 2c 26 61 72 65 61 | 29 29 20 3d 3d 20 27 5c |1],&area|)) == '\|
|00001540| 30 27 29 20 65 78 69 74 | 28 46 41 49 4c 55 52 45 |0') exit|(FAILURE|
|00001550| 29 3b 0a 0a 09 2f 2a 0a | 09 20 2a 20 45 78 61 6d |);.../*.|. * Exam|
|00001560| 69 6e 65 20 69 66 20 63 | 75 72 73 6f 72 20 6d 6f |ine if c|ursor mo|
|00001570| 76 65 6d 65 6e 74 20 73 | 70 65 63 69 66 69 65 64 |vement s|pecified|
|00001580| 2e 20 54 68 69 73 20 69 | 73 20 64 6f 6e 65 0a 09 |. This i|s done..|
|00001590| 20 2a 20 62 79 20 6c 6f | 6f 6b 69 6e 67 20 66 6f | * by lo|oking fo|
|000015a0| 72 20 25 20 66 6f 6c 6c | 6f 77 65 64 20 62 79 20 |r % foll|owed by |
|000015b0| 61 6e 79 20 62 75 74 20 | 25 2e 20 53 69 6e 63 65 |any but |%. Since|
|000015c0| 20 25 25 0a 09 20 2a 20 | 69 73 20 61 20 73 69 6e | %%.. * |is a sin|
|000015d0| 67 6c 65 20 25 2c 20 77 | 65 20 68 61 76 65 20 74 |gle %, w|e have t|
|000015e0| 6f 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 61 74 |o make s|ure that|
|000015f0| 20 25 25 20 66 6f 6c 6c | 6f 77 65 64 0a 09 20 2a | %% foll|owed.. *|
|00001600| 20 62 79 20 61 6e 79 20 | 62 75 74 20 25 20 69 73 | by any |but % is|
|00001610| 20 6e 6f 74 20 69 6e 74 | 65 72 70 72 65 74 65 64 | not int|erpreted|
|00001620| 20 61 73 20 61 20 66 6f | 72 6d 61 74 2e 0a 09 20 | as a fo|rmat... |
|00001630| 2a 20 49 66 20 63 75 72 | 73 6f 72 20 6d 6f 76 65 |* If cur|sor move|
|00001640| 6d 65 6e 74 20 69 73 20 | 73 70 65 63 69 66 69 65 |ment is |specifie|
|00001650| 64 20 74 68 65 6e 20 74 | 67 6f 74 6f 20 6e 65 65 |d then t|goto nee|
|00001660| 64 73 0a 09 20 2a 20 74 | 6f 20 62 65 20 69 6e 76 |ds.. * t|o be inv|
|00001670| 6f 6b 65 64 2e 20 45 6c | 73 65 20 70 75 74 20 61 |oked. El|se put a|
|00001680| 73 20 69 73 2e 0a 09 20 | 2a 2f 0a 09 70 74 72 20 |s is... |*/..ptr |
|00001690| 3d 20 62 75 66 3b 0a 09 | 77 68 69 6c 65 20 28 2a |= buf;..|while (*|
|000016a0| 70 74 72 20 21 3d 20 27 | 5c 30 27 29 0a 09 7b 0a |ptr != '|\0')..{.|
|000016b0| 09 09 69 66 20 28 2a 28 | 70 74 72 2b 2b 29 20 21 |..if (*(|ptr++) !|
|000016c0| 3d 20 27 25 27 29 20 63 | 6f 6e 74 69 6e 75 65 3b |= '%') c|ontinue;|
|000016d0| 0a 09 09 69 66 20 28 2a | 70 74 72 20 21 3d 20 27 |...if (*|ptr != '|
|000016e0| 5c 30 27 20 26 26 20 2a | 28 70 74 72 2b 2b 29 20 |\0' && *|(ptr++) |
|000016f0| 21 3d 20 27 25 27 29 0a | 09 09 7b 0a 09 09 09 2f |!= '%').|..{..../|
|00001700| 2a 20 54 68 69 73 20 73 | 74 72 69 6e 67 20 69 73 |* This s|tring is|
|00001710| 20 61 20 63 6d 20 73 74 | 72 69 6e 67 2e 20 2a 2f | a cm st|ring. */|
|00001720| 0a 09 09 09 69 66 20 28 | 61 72 67 63 20 21 3d 20 |....if (|argc != |
|00001730| 34 29 20 65 78 69 74 28 | 46 41 49 4c 55 52 45 29 |4) exit(|FAILURE)|
|00001740| 3b 0a 0a 09 09 09 69 66 | 20 28 2a 28 70 74 72 3d |;.....if| (*(ptr=|
|00001750| 74 67 6f 74 6f 28 62 75 | 66 2c 61 74 6f 69 28 61 |tgoto(bu|f,atoi(a|
|00001760| 72 67 76 5b 32 5d 29 2c | 61 74 6f 69 28 61 72 67 |rgv[2]),|atoi(arg|
|00001770| 76 5b 33 5d 29 29 29 20 | 3d 3d 20 27 4f 27 0a 09 |v[3]))) |== 'O'..|
|00001780| 09 09 09 26 26 20 2a 28 | 70 74 72 2b 31 29 20 3d |...&& *(|ptr+1) =|
|00001790| 3d 20 27 4f 27 20 26 26 | 20 2a 28 70 74 72 2b 32 |= 'O' &&| *(ptr+2|
|000017a0| 29 20 3d 3d 20 27 50 27 | 0a 09 09 09 09 26 26 20 |) == 'P'|.....&& |
|000017b0| 2a 28 70 74 72 2b 33 29 | 20 3d 3d 20 27 53 27 29 |*(ptr+3)| == 'S')|
|000017c0| 20 65 78 69 74 28 46 41 | 49 4c 55 52 45 29 3b 0a | exit(FA|ILURE);.|
|000017d0| 0a 09 09 09 2f 2a 20 54 | 75 72 6e 20 6f 66 66 20 |..../* T|urn off |
|000017e0| 58 54 41 42 53 2c 20 62 | 75 74 20 73 61 76 65 20 |XTABS, b|ut save |
|000017f0| 6f 6c 64 20 66 6c 61 67 | 73 20 66 69 72 73 74 2e |old flag|s first.|
|00001800| 20 2a 2f 0a 09 09 09 69 | 66 20 28 67 74 74 79 28 | */....i|f (gtty(|
|00001810| 4f 55 54 50 55 54 2c 26 | 74 74 79 70 72 6d 29 20 |OUTPUT,&|ttyprm) |
|00001820| 3c 20 30 29 20 65 78 69 | 74 28 65 72 72 6e 6f 29 |< 0) exi|t(errno)|
|00001830| 3b 0a 09 09 09 74 74 79 | 66 6c 67 20 3d 20 74 74 |;....tty|flg = tt|
|00001840| 79 70 72 6d 2e 73 67 5f | 66 6c 61 67 73 3b 0a 0a |yprm.sg_|flags;..|
|00001850| 09 09 09 74 74 79 70 72 | 6d 2e 73 67 5f 66 6c 61 |...ttypr|m.sg_fla|
|00001860| 67 73 20 26 3d 20 7e 58 | 54 41 42 53 3b 0a 09 09 |gs &= ~X|TABS;...|
|00001870| 09 69 66 20 28 73 74 74 | 79 28 4f 55 54 50 55 54 |.if (stt|y(OUTPUT|
|00001880| 2c 26 74 74 79 70 72 6d | 29 20 3c 20 30 29 20 65 |,&ttyprm|) < 0) e|
|00001890| 78 69 74 28 65 72 72 6e | 6f 29 3b 0a 0a 09 09 09 |xit(errn|o);.....|
|000018a0| 74 70 75 74 73 28 70 74 | 72 2c 41 46 46 4c 49 4e |tputs(pt|r,AFFLIN|
|000018b0| 45 53 2c 6f 75 74 63 29 | 3b 0a 0a 09 09 09 2f 2a |ES,outc)|;...../*|
|000018c0| 20 52 65 73 74 6f 72 65 | 20 6f 6c 64 20 66 6c 61 | Restore| old fla|
|000018d0| 67 73 2e 20 2a 2f 0a 09 | 09 09 74 74 79 70 72 6d |gs. */..|..ttyprm|
|000018e0| 2e 73 67 5f 66 6c 61 67 | 73 20 3d 20 74 74 79 66 |.sg_flag|s = ttyf|
|000018f0| 6c 67 3b 0a 09 09 09 69 | 66 20 28 73 74 74 79 28 |lg;....i|f (stty(|
|00001900| 4f 55 54 50 55 54 2c 26 | 74 74 79 70 72 6d 29 20 |OUTPUT,&|ttyprm) |
|00001910| 3c 20 30 29 20 65 78 69 | 74 28 65 72 72 6e 6f 29 |< 0) exi|t(errno)|
|00001920| 3b 0a 09 09 09 65 78 69 | 74 28 53 55 43 43 45 53 |;....exi|t(SUCCES|
|00001930| 53 29 3b 0a 09 09 7d 0a | 09 65 78 69 74 28 46 41 |S);...}.|.exit(FA|
|00001940| 49 4c 55 52 45 29 3b 0a | 09 7d 0a 09 74 70 75 74 |ILURE);.|.}..tput|
|00001950| 73 28 62 75 66 2c 41 46 | 46 4c 49 4e 45 53 2c 6f |s(buf,AF|FLINES,o|
|00001960| 75 74 63 29 3b 0a 09 65 | 78 69 74 28 65 72 72 6e |utc);..e|xit(errn|
|00001970| 6f 29 3b 0a 7d 0a 0a 6f | 75 74 63 28 63 29 0a 63 |o);.}..o|utc(c).c|
|00001980| 68 61 72 20 63 3b 0a 7b | 0a 09 69 66 20 28 77 72 |har c;.{|..if (wr|
|00001990| 69 74 65 28 4f 55 54 50 | 55 54 2c 26 63 2c 73 69 |ite(OUTP|UT,&c,si|
|000019a0| 7a 65 6f 66 28 63 68 61 | 72 29 29 20 3c 20 30 29 |zeof(cha|r)) < 0)|
|000019b0| 20 65 78 69 74 28 65 72 | 72 6e 6f 29 3b 0a 09 72 | exit(er|rno);..r|
|000019c0| 65 74 75 72 6e 28 53 55 | 43 43 45 53 53 29 3b 0a |eturn(SU|CCESS);.|
|000019d0| 7d 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 0a 69 66 |}.SHAR_E|OF.fi.if|
|000019e0| 20 74 65 73 74 20 2d 66 | 20 27 4d 61 6b 65 66 69 | test -f| 'Makefi|
|000019f0| 6c 65 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |le'.then|..echo s|
|00001a00| 68 61 72 3a 20 22 77 69 | 6c 6c 20 6e 6f 74 20 6f |har: "wi|ll not o|
|00001a10| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00001a20| 6e 67 20 66 69 6c 65 20 | 27 4d 61 6b 65 66 69 6c |ng file |'Makefil|
|00001a30| 65 27 22 0a 65 6c 73 65 | 0a 63 61 74 20 3c 3c 20 |e'".else|.cat << |
|00001a40| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 4d 61 6b |\SHAR_EO|F > 'Mak|
|00001a50| 65 66 69 6c 65 27 0a 74 | 70 75 74 3a 20 74 70 75 |efile'.t|put: tpu|
|00001a60| 74 2e 63 0a 09 63 63 20 | 2d 6f 20 74 70 75 74 20 |t.c..cc |-o tput |
|00001a70| 74 70 75 74 2e 63 20 2d | 6c 74 65 72 6d 6c 69 62 |tput.c -|ltermlib|
|00001a80| 0a 0a 6d 61 6e 3a 20 74 | 70 75 74 2e 31 0a 09 6e |..man: t|put.1..n|
|00001a90| 72 6f 66 66 20 2d 6d 61 | 6e 20 74 70 75 74 2e 31 |roff -ma|n tput.1|
|00001aa0| 20 3e 20 74 70 75 74 2e | 64 6f 63 0a 0a 64 74 70 | > tput.|doc..dtp|
|00001ab0| 75 74 3a 20 74 70 75 74 | 2e 63 0a 09 63 63 20 2d |ut: tput|.c..cc -|
|00001ac0| 67 20 2d 6f 20 64 74 70 | 75 74 20 74 70 75 74 2e |g -o dtp|ut tput.|
|00001ad0| 63 20 2d 6c 74 65 72 6d | 6c 69 62 0a 53 48 41 52 |c -lterm|lib.SHAR|
|00001ae0| 5f 45 4f 46 0a 66 69 0a | 65 78 69 74 20 30 0a 23 |_EOF.fi.|exit 0.#|
|00001af0| 09 45 6e 64 20 6f 66 20 | 73 68 65 6c 6c 20 61 72 |.End of |shell ar|
|00001b00| 63 68 69 76 65 0a 0a | |chive.. | |
+--------+-------------------------+-------------------------+--------+--------+