[comp.sources.bugs] NN screws up screen if terminfo entry has flash capability

pim@ctisbv.UUCP (Pim Zandbergen) (07/13/89)

We run NN on an AT&T 3B2/600 (SysVr3.1.1), all terminals here are
Wyse 50's.

When I first ran NN, it  failed to clear the screen before it drew 
the next one. In stead of the clear-screen escape sequence
">\EA00" was sent to the screen.

This looked a lot like the flash capability I added to the
Wyse-50 terminfo entry (flash=\EA04$<200>\EA00). After removing
this capability, everything worked fine.

I haven't yet really dug into the sources, but it looks like the
flash string is sent to the screen literally, instead of using
the flash() function in curses(3X).

Does anyone have a patch for this, so I can make my Wyse-50
flash again when I make a mistake in vi? :-)
-- 
--------------------+----------------------+-----------------------------------
Pim Zandbergen      | phone: +31 70 542302 | CTI Software BV
pim@ctisbv.UUCP     | fax  : +31 70 512837 | Laan Copes van Cattenburch 70
...!uunet!mcvax!hp4nl!ctisbv!pim           | 2585 GD The Hague, The Netherlands

seindal@skinfaxe.diku.dk (Rene' Seindal) (07/13/89)

pim@ctisbv.UUCP (Pim Zandbergen) writes:

> I haven't yet really dug into the sources, but it looks like the
> flash string is sent to the screen literally, instead of using
> the flash() function in curses(3X).

When you dig into the sources you will see that nn does not use curses.  There
are just too many buggy curses versions out there, so you can't rely on it, if
you want to write portable programs.

Sorry.

Rene' Seindal (seindal@diku.dk).

storm@texas.dk (Kim F. Storm) (07/14/89)

pim@ctisbv.UUCP (Pim Zandbergen) writes:
>When I first ran NN, it  failed to clear the screen before it drew 
>the next one. In stead of the clear-screen escape sequence
>">\EA00" was sent to the screen.

That is because of a (depressingly trivial) mistake in the way I
handle the flash capability when terminfo is defined:  I *copy*
it into the space being occupied by the `bell' capability.  But
with terminfo, both `flash' and `bell' are just pointers into a
large array - which unfortunately also contains the `clear screen'
escape sequence etc. :-(

The bug will be fixed by patch #5 which also has a `visible-bell'
variable you can unset if you want to eliminate the flashing screen,
when the flash capability is defined.
-- 
Kim F. Storm        storm@texas.dk        Tel +45 429 174 00
Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
	  No news is good news, but nn is better!