rc-list - mailing list for the rc(1) shell
 help / 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
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 index

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-17 15:56 are there any patches which add ~ expansion to rc Joseph Skinner
1997-09-17 21:56 ` Scott Schwartz
1997-09-17 22:08 ` Mark K. Gardner
1997-09-18 23:26 Chris Siebenmann
     [not found] ` <cks@hawkwind.utcs.toronto.edu>
1992-06-04 10:05   ` $pid malte
1992-11-04 12:45   ` set subtract malte
1992-11-06 12:03   ` rc and signal handlers malte
1997-09-19 17:21   ` are there any patches which add ~ expansion to rc Jeremy Fitzhardinge
2001-10-24  3:25   ` Beta release rc-1.6b3 available Chris Siebenmann
2001-10-24  3:41     ` Scott Schwartz
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
     [not found]   ` <tjg@star.le.ac.uk>
2000-05-08 11:50     ` David Luyer
2002-04-04 10:04     ` rc 1.6 $version Tim Goodwin
2002-04-04 21:42       ` Scott Schwartz
2000-05-08 13:28   ` building rc on QNX4 Carlo Strozzi
     [not found] <tell@cs.unc.edu>
2000-05-08 23:25 ` Stephen Tell
2000-05-10  0:37   ` builtins Scott Schwartz
2000-05-12  7:22     ` builtins Carlo Strozzi
2001-10-15 13:56 Beta release rc-1.6b3 available Tim Goodwin
2001-10-17 14:13 ` Buggs
2001-10-17 14:34   ` Tim Goodwin
2001-10-17 21:13     ` Buggs
2001-10-23  7:55 ` Carlo Strozzi
2001-10-23 12:44   ` Tim Goodwin
2001-10-23 15:47   ` Markus Friedl
2001-10-23 21:09     ` Carlo Strozzi
     [not found] <sroberts@certicom.com>
2001-10-23 15:55 ` Sam Roberts
2001-10-23 21:14   ` Scott Schwartz
2001-10-23 21:32 Carlo Strozzi
2001-10-24  3:34 ` Chris Siebenmann
2001-10-24  8:04   ` Carlo Strozzi
2002-03-14 22:37 rc 1.6 $version erik quanstrom
2002-03-27 13:27 ` Tim Goodwin
2002-03-27 21:12   ` Carlo Strozzi
2002-03-30 18:43     ` Paul Haahr
2002-03-31 15:13       ` Carlo Strozzi
2002-04-03 14:31       ` Tim Goodwin
2002-04-03 15:06         ` Paul Haahr

Reply instructions:

You may reply publically 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

rc-list - mailing list for the rc(1) shell

Archives are clonable: git clone --mirror http://inbox.vuxu.org/rc-list

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.rc-list


AGPL code for this site: git clone https://public-inbox.org/ public-inbox