9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Micah Stetson <micah@cnm-vra.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] The VT saga
Date: Thu,  9 Nov 2000 17:05:30 -0800	[thread overview]
Message-ID: <20001109170530.A322@cnm-vra.com> (raw)
In-Reply-To: <20001109062700.B29086@cackle.proxima.alt.za>; from lucio@proxima.alt.za on Thu, Nov 09, 2000 at 06:27:01AM +0200

[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]

> Surely Rob should be arbitrator.  I have not had time to look at the
> patch, but I'd like to point out one issue I have not examined and I
> don't think the patch addressed: the highlight termination does not work,
> vt (-2 is what I always use) waits for the end of line to turn highlight
> off.

Hmmn, I hadn't paid any attention to vt -2.  I don't have
the problem without it and not always with it.  Maybe
there's an unimplemented VT220 escape sequence that does
that.  Let me grab the manual...  (Incidentally, if you
want a user's guide, you can download one from vt100.net.
They have the manuals for several of the VT models including
the 100 102 and 220.)  Hmmn...It looks like the VT220 uses
some nonzero arguments to the SGR control sequence (ESC[m)
to set certain kinds of standout to off.  The current
implementation will not support this properly.

Attached is a diff against the version of vt.c that I posted
here a couple of days ago.  This is still problematic as it
only handles the last option to the control sequence, but if
I'm going to fix that, I may as well do it for all of the
escape sequences.  Also, it interprets the vt220 options
even when in vt100 mode which it probably shouldn't do, but
it does fix the problem for me.

There's still a lot to fix here, especially in vt220 mode,
so I'll get back to work.

Micah


[-- Attachment #2: vt.c.diff --]
[-- Type: text/plain, Size: 972 bytes --]

56a57,63
> enum SGR {
> 	SGR_BOLD = 1,
> 	SGR_UNDER = 2,
> 	SGR_BLINK = 4,
> 	SGR_NEG = 8,
> };
> 
439a447,451
> 					 *	Also for VT220:
> 					 *	22	Normal intensity
> 					 *	24	Not underlined
> 					 *	25	Not blinking
> 					 *	27	Positive image
442c454,482
< 						standout = operand;
---
> 						switch (operand) {
> 							case 0:
> 								standout = 0;
> 								break;
> 							case 1:
> 								standout |= SGR_BOLD;
> 								break;
> 							case 4:
> 								standout |= SGR_UNDER;
> 								break;
> 							case 5:
> 								standout |= SGR_BLINK;
> 								break;
> 							case 7:
> 								standout |= SGR_NEG;
> 								break;
> 							case 22:
> 								standout &= ~SGR_BOLD;
> 								break;
> 							case 24:
> 								standout &= ~SGR_UNDER;
> 								break;
> 							case 25:
> 								standout &= ~SGR_BLINK;
> 								break;
> 							case 27:
> 								standout &= ~SGR_NEG;
> 								break;
> 						}

  reply	other threads:[~2000-11-10  1:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-08 22:57 presotto
2000-11-09  4:27 ` Lucio De Re
2000-11-10  1:05   ` Micah Stetson [this message]
2000-11-10  4:14     ` Lucio De Re
  -- strict thread matches above, loose matches on Subject: below --
2000-11-10 14:37 presotto
2000-09-11  9:41 lucio
2000-11-07 14:32 ` Micah Stetson
2000-09-10 16:25 Lucio De Re
2000-09-10 16:37 ` Lucio De Re

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=20001109170530.A322@cnm-vra.com \
    --to=micah@cnm-vra.com \
    --cc=9fans@cse.psu.edu \
    /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).