From: mah@mhorton.net (Mary Ann Horton)
Subject: [TUHS] I swear! I rtfm'ed
Date: Tue, 30 Dec 2014 18:33:10 -0800 [thread overview]
Message-ID: <54A36066.6080001@mhorton.net> (raw)
In-Reply-To: <CAGGBd_q93vW2XkoV5VojXr0+zfKtLHgdvinGHSv1yORGtOJz-w@mail.gmail.com>
This is the right info. Be sure to scroll up to see how to use tgetent,
tgetstr, and tputs. You aren't likely to need any padding.
Essentially:
tgetent using getenv("TERM") gets you the whole entry from
/etc/termcap
tgetstr of "cl" gets you the "clear"
sequence
tputs outputs the "clear"
sequence
On 12/30/2014 06:22 PM, Dan Stromberg wrote:
> Check out https://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termcap.html#SEC30
> - especially the "cl" entry.
>
> ISTR the database being at /etc/termcap normally.
>
> On Tue, Dec 30, 2014 at 4:01 PM, Jacob Ritorto <jacob.ritorto at gmail.com> wrote:
>> oops, thanks and sorry! I neglected to mention that this is in the context
>> of a c program.
>>
>> On Tue, Dec 30, 2014 at 6:05 PM, Warren Toomey <wkt at tuhs.org> wrote:
>>> 2.11 BSD has clear (1).
>>> http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/src/ucb/clear.c
>>> Cheers Warren
>>>
>>> On 31 December 2014 08:56:30 AEST, Jacob Ritorto <jacob.ritorto at gmail.com>
>>> wrote:
>>>> , but I can't see how you're supposed to clear the screen on a vt100 in
>>>> 2.9BSD. I guess printf'ing ("\033c") would do the trick, but I assumed
>>>> there was a more proper way; something that leverages the vt100 termcap
>>>> entry and does the right thing. Anyone?
>>>>
>>>> thx
>>>> jake
>>>>
>>>> ________________________________
>>>>
>>>> TUHS mailing list
>>>> TUHS at minnie.tuhs.org
>>>> https://minnie.tuhs.org/mailman/listinfo/tuhs
>>>
>>> --
>>> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>>
>>
>> _______________________________________________
>> TUHS mailing list
>> TUHS at minnie.tuhs.org
>> https://minnie.tuhs.org/mailman/listinfo/tuhs
>>
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
next prev parent reply other threads:[~2014-12-31 2:33 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-30 22:56 Jacob Ritorto
2014-12-30 22:59 ` Milo Velimirovic
2014-12-30 23:03 ` Larry McVoy
2014-12-31 0:03 ` Steve Nickolas
2014-12-30 23:05 ` Warren Toomey
2014-12-31 0:01 ` Jacob Ritorto
2014-12-31 2:22 ` Dan Stromberg
2014-12-31 2:33 ` Mary Ann Horton [this message]
2014-12-31 5:44 ` Jacob Ritorto
2014-12-31 6:02 ` [TUHS] K&R C on a modern Linux box? ( was Re: I swear! I rtfm'ed ) Derrik Walker v2.0
2014-12-31 6:16 ` Jacob Ritorto
2014-12-31 7:52 ` Derrik Walker v2.0
2014-12-31 6:24 ` [TUHS] I swear! I rtfm'ed Dave Horsfall
2014-12-31 6:36 ` Lyndon Nerenberg
2014-12-31 14:58 ` Tim Bradshaw
2014-12-31 15:31 ` arnold
2014-12-31 15:37 ` Milo Velimirovic
2014-12-31 17:37 ` Derrik Walker v2.0
2014-12-31 20:09 ` Larry McVoy
2014-12-31 22:25 ` Jacob Ritorto
2014-12-31 16:11 ` Mary Ann Horton
2014-12-31 20:14 ` Clem Cole
2014-12-31 20:45 ` Erik E. Fair
2014-12-31 21:05 ` Clem Cole
2014-12-31 22:30 ` Jacob Ritorto
2014-12-31 23:06 ` Mary Ann Horton
2014-12-31 23:11 ` Jacob Ritorto
2015-01-01 15:45 ` Clem Cole
[not found] <mailman.110.1420006566.3354.tuhs@minnie.tuhs.org>
2014-12-31 10:37 ` Johnny Billquist
2014-12-31 11:13 ` arnold
2014-12-31 16:25 Noel Chiappa
[not found] <mailman.116.1420056874.3354.tuhs@minnie.tuhs.org>
2014-12-31 23:52 ` Johnny Billquist
2015-01-01 1:29 ` Erik E. Fair
2015-01-01 15:03 ` Johnny Billquist
2015-01-01 15:59 ` Mary Ann Horton
2015-01-01 20:18 ` Dave Horsfall
2015-01-01 20:11 ` Dave Horsfall
2015-01-01 16:01 ` Clem Cole
2015-01-01 16:11 ` Johnny Billquist
2015-01-01 16:59 ` Clem Cole
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54A36066.6080001@mhorton.net \
--to=mah@mhorton.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).