🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #578

Problem with TI/TE sequences in rn 44

#578
From: William Kucharski
Date: Tue, 10 Sep 1991 17:25
70 lines
3136 bytes
I sent this to Stan Barber, but I also wanted to ping the net on this:

> I've noticed one problem with rn 44, and that's that it uses the termlib init
> and end variables (TI and TE) if they exist.  Unfortunately, with terminal
> descriptions that have alternate screens (e.g. xterm), rn can confuse things
> quite a bit by doing this.  For example, when using rn and vi(1) as your
> editor, on a Solbourne or other SunOS machine, the following will happen:
> 
>     1) Start rn -- the screen will flip to the "alternate" screen.
>     2) Perform an action which calls an editor (e.g. vi(1)).  vi will
>        output the "TI" sequence, also setting "alternate" screen mode.
>        But when you exit vi, it emits a "TE" sequence, switching back
>        to the "normal" screen.
>     3) Now rn starts using the normal screen, with the unfortunate result
>        that the "send/edit/abort" prompt is placed in the middle of the
>        screen of text that was present when rn first switched to the
>        "alternate" screen.
> 
> I don't know if this is technically correct behavior or whether this happens
> because termlib wasn't designed to deal with the problem of two applications
> fighting for control of a sscreen/window.
> 
> For now, I've modified term.c:
> 
> *** term.c.orig	Tue Sep 10 11:09:44 1991
> --- term.c	Tue Sep 10 11:11:22 1991
> ***************
> *** 1119,1125 ****
>   void
>   termlib_init()
>   {
> ! #ifdef HAVETERMLIB
>   	if (TI && *TI)
>   		tputs (TI,1,putchr);
>   #endif
> --- 1119,1125 ----
>   void
>   termlib_init()
>   {
> ! #if defined HAVETERMLIB && !defined sun
>   	if (TI && *TI)
>   		tputs (TI,1,putchr);
>   #endif
> ***************
> *** 1128,1134 ****
>   void
>   termlib_reset()
>   {
> ! #ifdef HAVETERMLIB
>   	if (TE && *TE)
>   		tputs (TE,1,putchr);
>   #endif
> --- 1128,1134 ----
>   void
>   termlib_reset()
>   {
> ! #if defined HAVETERMLIB && !defined sun
>   	if (TE && *TE)
>   		tputs (TE,1,putchr);
>   #endif
> 
> But perhaps there should be some type of config variable to control this...

Anyone have any other proposals to solve this problem?
-- 
| William Kucharski, Solbourne Computer, Inc.     | Opinions expressed above
| Internet: kucharsk@solbourne.com   Ham: N0OKQ   | are MINE alone, not those
| uucp:	...!{boulder,sun,uunet}!stan!kucharsk     | of Solbourne...
| Snail Mail: 1900 Pike Road, Longmont, CO  80501 | "It's Night 9 With D2 Dave!"
Technical Details
Message-ID: <1991Sep10.172550.12050@solbourne.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!unidui!math.fu-berlin.de!ox.com!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!stan!kucharsk

Show Full Headers
Complete Article Headers
Message-ID: <1991Sep10.172550.12050@solbourne.com>
Subject: Problem with TI/TE sequences in rn 44
Date: Tue, 10 Sep 1991 17:25:50 +0000
From: kucharsk@solbourne.com (William Kucharski)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!unidui!math.fu-berlin.de!ox.com!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!stan!kucharsk
Newsgroups: news.software.readers
Organization: Solbourne Computer, Inc., Longmont, CO
Lines: 70