rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: "Sam Roberts" <sam@cogent.ca>
To: "rc" <rc@hawkwind.utcs.toronto.edu>, "Gert-Jan Vons" <vons@ocegr.fr>
Cc: <sam@cogent.ca>
Subject: Re: vrl (was: Re: building rc on QNX4)
Date: Fri, 28 Apr 2000 14:38:40 -0400	[thread overview]
Message-ID: <001801bfb140$f9785760$1403a8c0@cogent.ca> (raw)
In-Reply-To: <4.3.1.2.20000428085436.00b3c4e0@mailhost.ocegr.fr>

> 
> >Speaking of which, is this an appropriate place to talk about
> >vrl? I posted some diffs to the author, no response yet (only
> >been a day or so -- I'm just mentioning, not griping).
> 
> That would be me, since I'm the author :-) I assume you sent it to my 
> (old) usa.net address, I'll check my inbox there.

Yep, that's what's in 1.3's README! ;-)
 
> >I had some trubles with it's termcap usage. It seems to
> >think that @7 is the keypad END key/capability. This wasn't
> >defined on my system, and while I found it defined in a bunch
> >of Linux termcap entries (mostly in what looked like old PC
> >consoles), it wasn't in the ansi entries.
> >
> >Poking around it seemed the right thing was to use kh for HOME
> >and kH for END (vrl was using kh for HOME and @7 for END).
> 
> kH is the "last-line" key according to FreeBSD's termcap(5). What is the 
> OS you are using, what is the tty type, and on what hardware? (please 
> mail me the termcap entry for your tty)

QNX4, using their pterm (the Photon Terminal, Photon being the GUI
system), with ANSI emulation. The esc sequence for END (by observation)
is \E[Y, but is not present in their /etc/termcap (I guess most programs
are useing terminfo now). Below is the termcap:

qansi|qansi-m|qansi-8859m|QNX ANSI:am:G0:co#80:it#8:li#25:ti=\E[?7h:\
    :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:LE=\E[%dD:\
    :RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:\
    :ae=^O:al=\E[L:as=^N:bt=\E[Z:cb=\E[K\E[X:cd=\E[J:ce=\E[K:ch=\E[%i%dG:\
    :cl=\E[2J\E[H:cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[2g:dc=\E[P:dl=\E[M:do=\E[B:\
    :ec=\E[%dX:ho=\E[H:ic=\E[@:is=\E[?7h\E[0;10;39;49m:\
    :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\EOT:k6=\EOU:k7=\EOV:k8=\EOW:k9=\EOX:\
    :k;=\EOY:kB=\E[Z:kC=\ENa:kD=\E[P:kF=\E[a:kI=\E[@:kN=\E[U:kP=\E[V:kR=\E[b:kT=\ENb:\
    :ka=\ENd:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:kr=\E[C:ku=\E[A:\
    :le=\E[D:ll=\E[99H:mb=\E[5m:md=\E[1m:me=\E[m^O:mh=\E[2m:mk=\E[9m:mr=\E[7m:\
    :nd=\E[C:nw=\EE:op=\E[39;49m:rp=%.\E[%p2%{1}%-%db:\
    :se=\E[27m:sf=\E[S:so=\E[7m:sr=\E[T:st=\EH:ue=\E[24m:up=\E[A:us=\E[4m:\
    :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
    :vb=\E[?5h\E[?5l:ve=\E[?25h\E[?12l:vi=\E[?25l:\
    :ws=\E[5m:we=\E[m:bo=\E[1m:be=\E[m:

So, I can just add ":@7=\E[Y:", but I looked at /usr/lib/terminfo/terminfo.src,
and checked out the other emulation pterm can do, the native QNX terminal
type:

term   terminfo              termcap
----   --------              -------
qnx    kend=\377\250         kH=\0377\0250
ansi   kend=\E[Y             Nothing at all...

Thus I made the obvious assumption that vrl should use 'kH', and I
should add 'kH' to the termcap entry for ansi. Then rc/vrl would
work fine with both emulations.

It doesn't surprise me that this is wrong, QNX is relatively new,
and some of their support for legacy Unix stuff is shaky.

So, what's the "right" way? A note in the README for QNX4 users saying
to add :@7\E[Y: to "qansi" and :@7=\0377\0250: to "qnx" in their
termcaps so that all works well?

> "last-line" for going to the end of a line seems a bit strange, but if 
> that is what your tty sends when you hit the End key... I could fall back 
> to kH if there is no @7 defined.
> 

> >Also, I just noticed ^L doesn't clear the screen. I'll look
> >into that sometime.
> 
> Nope. When you use vrl, ^L redisplays the line, useful in case it got 
> garbled by the output of some background process. Note also that vrl is 
> about lines, it doesn't (want/need to) know about the screen. The unix 
> 'clear' command handles that very well.

And fn clear { /bin/echo \f } is working well for me, thanks for the clarification.

Sam




  reply	other threads:[~2000-04-28 20:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sroberts@uniserve.com>
2000-04-26 15:02 ` building rc on QNX4 Sam Roberts
2000-04-27 16:56   ` Scott Schwartz
2000-04-27 20:41     ` Sam Roberts
2000-04-28  7:28       ` vrl (was: Re: building rc on QNX4) Gert-Jan Vons
2000-04-28 18:38         ` Sam Roberts [this message]
2000-05-02  8:16           ` Gert-Jan Vons
2000-04-28 19:03         ` rc not session leader? Sam Roberts
2000-04-27 17:39   ` building rc on QNX4 Carlo Strozzi
2000-05-02 14:41     ` Tim Goodwin
2000-05-04 15:18       ` Carlo Strozzi
2000-05-08  8:29         ` Tim Goodwin
2000-05-08  8:58           ` Chris Siebenmann
2000-05-08  9:15             ` Tim Goodwin
2000-05-08 23:25               ` Stephen Tell
2000-05-10  0:37                 ` builtins Scott Schwartz
2000-05-12  7:22                   ` builtins Carlo Strozzi
2000-05-08 11:50           ` building rc on QNX4 David Luyer
2000-05-08 13:28           ` Carlo Strozzi

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='001801bfb140$f9785760$1403a8c0@cogent.ca' \
    --to=sam@cogent.ca \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=vons@ocegr.fr \
    /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).