The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: clemc@ccc.com (Clem Cole)
Subject: [TUHS] I swear! I rtfm'ed
Date: Wed, 31 Dec 2014 15:14:00 -0500	[thread overview]
Message-ID: <CAC20D2MfLEhHhkfrH1E8QKo1__nALTWfFBtrhEXoX60NzC05TA@mail.gmail.com> (raw)
In-Reply-To: <CAHYQbfBF5ro-SCebomP0MOnC9ngSXmX59S6wsC=tZEcMdhzT_A@mail.gmail.com>

Jake - you have lots of help from others and using curses(3) is definitely
the right way to program.

But to answer your specific question about printf(string), according to
Chapter 3 (Programmer's Info) of my old VT-100 user's guide, I think what
is you are doing wrong is that "\033c" is not the ANSI clear to end of
screen command.

When I saw your message on my iPhone last night, the cache said - wait that
can't be correct.   But I could not remember why.   So I had to wait until
I got back home today to look in my basement.

As I suspected, it's not an ANSI sequence.  So are you running in VT-100
(ANSI) mode or VT52 mode?  I ask because it is close to the VT52 cursor
right command which is actually:  "\033C"  but I do not remember is case
mattered.

In VT52 mode you need to send the terminal:  "\033H\033J" to clear the
screen.

In ANSI mode, it becomes:  "\033[1;1\033[0J"

A few things to remember:
1.) Clear takes the current cursor position and clears from there to end of
X (where X depends on mode, and type of clear).  So you need to move the
cursor to home position (aka 1,1).

2.) VT-100's did not implement the full ANSI spec like Ann Arbor, Heathkit,
Wyse etc.  So there are a number of things that those terminals did
better.  A really good reason to you curses(3) because all the knowledge is
keep in the termcap and as a programmer you don't need to worry about it.

3.) I saw sites were VT52 mode was sometimes preferred because it was good
enough for most editing, and needed fewer chars to do manipulation.  On
slow serial lines, this sometimes was helpful.  That said, give me an AAA
any day.  Like others, I still miss that terminal. :-)

Clem

On Tue, Dec 30, 2014 at 5:56 PM, 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20141231/75ed2bb9/attachment.html>


  parent reply	other threads:[~2014-12-31 20:14 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
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 [this message]
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=CAC20D2MfLEhHhkfrH1E8QKo1__nALTWfFBtrhEXoX60NzC05TA@mail.gmail.com \
    --to=clemc@ccc.com \
    /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).