[ale] VT-100-220-320 docs, anyone?

Jeff Lightner jlightner at water.com
Thu Dec 7 19:29:24 EST 2006


DEC who made the vt100 et al were notorious for making terminals that
did things strangely as compared to others.  I recall at least 2
products that delayed their rollouts at the last moment because all the
testing worked on everything but then blew up at the first vt100 site.

Oddly though most terminal emulators based their setup on vt100 (even
xterm is really just modified vt100).

Anyway I guess the answer to your question would be you'd have to
consult the documentation for the real terminal to get all the details.


However back when I worked on serial terminals full time (yes there was
UNIX before X-Windows) I usually consulted the manuals to come up with
source like you see with infocmp.  The command to compile such source by
the way is "tic".  So on occasion I'd just infocmp (actually usually
either "distic" or "untic" depending on flavor) something close to the
what I was using then add the capabilities I new were available and run
tic to recompile.  Of course I'd have to remember to change the name in
the source - the compile actually overwrites the files based on the
names in the source.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of John
To: ale at ale.org
Wells
Sent: Thursday, December 07, 2006 5:20 PM
To: Atlanta Linux Enthusiasts
Cc: Atlanta Linux Enthusiasts
Subject: Re: [ale] VT-100-220-320 docs, anyone?

Jeff Lightner said:
> Oops - il & il1 are in infocmp for vt320 but not vt100.

Ok, well, I fixed my issue. Turned out, the terminal we're using
(http://sf.net/projects/jsat) was setting margins at an improper time
when
using vt220 and vt320.

This will hopefully illustrate my point. The terminfo man page, along
with
output from infocmp, was indeed very useful. I was able to track down
the
two escape sequences that cause our terminal to reset margins: \E8 and
\E[%i%p1%d;%p2%dr.

\E8 maps to "restore_cursor", according to man 5
terminfo...\E[%i%p1%d;%p2%dr  maps to "change_scroll_region". While
"change_scroll_region" sounds reasonable to set margins, as a margin at
a
given point in time can refer to both window margins and margins of
scrollable sections, "restore_cursor" raised my eyebrows. Why would you
set margins when responding to "restore_cursor"?

I compared this to a number of other terminals...gnome-terminal,
konsole,
and mindterm. I could not find similar behavior in any.

Commenting this out fixed my problem. Here's the actual code, so you can
see what I mean:

case '8': /*restore cursor, attributes, margins */
       C = Sc;
       R = Sr;
       gl = Sgl;
       gr = Sgr;
       for (int i = 0; i < 4; i++) gx[i] = Sgx[i];
       // setMargins(Sbm, Stm);
       attributes = Sa;
       if (debug > 1)
         System.out.println("ESC 8");
     break;

See that commented out setMargins call? That was causing my problem.

Now, my point...if I didn't have gnome-terminal, mindterm and konsole
source (or any terminal source for that matter), how would I know that
resizing the margins would be invalid here? In standard software
development thinking, to create a terminal emulator, you would think
you'd
at least have basic requirements, or at least possible actions (escape
sequences) and expected outcomes (what happens in response).

I can get as far as determining that \E8 means "restore_cursor" and
\E[%i%p1%d;%p2%dr  means "change_scroll_region"...but if I didn't have
other terminal source to look at, how would I know what to do when I see
either?

That's the missing link for me.

Thanks guys.

John

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list