[comp.sys.hp] more curses bugs

gls@corona.ATT.COM (Col. G. L. Sicherman) (04/15/91)

Here's what seems to be another bug in curses under HP-UX.  The HP-UX
OS version:

	$ uname -a
	HP-UX corona A.B7.00 U 9000/855 707402991
	$

The C program:

#include <curses.h>

main()
{
	WINDOW *use, *comment;
	initscr();
	comment = newwin(2, 0, 5, 1);
	use = newwin(1, 28, 9, 1);
	
	mvwaddstr(comment,
		0,0, "mvwaddstr(use, 0, 0, \"this is a long message\\n\")\n");
	wrefresh(comment);
	mvwaddstr(use, 0, 0, "this is a long message\n");
	wrefresh(use);
	sleep(5);
	mvwaddstr(comment,
		1,0, "mvwaddstr(use, 0, 0, \"short message\\n\")\n");
	wrefresh(comment);
	mvwaddstr(use, 0, 0, "short message\n");
	wrefresh(use);
	endwin();
}

With TERM=vt100, this writes "short" over "this ", leaving line 9 reading

	 shortis a long message

Here is a dump of the output:

0000000 033   [   m 033   [   H 033   [   2   J 033   7 033   [   1   ;
0000020   2   4   r 033   8 033   [   5   B       m   v   w   a   d   d
0000040   s   t   r   (   u   s   e   ,       0   ,       0   ,       "
0000060   t   h   i   s       i   s       a       l   o   n   g       m
0000100   e   s   s   a   g   e   \   n   "   ) 033   [   7   ;   2   H
0000120 033   [   3   B   t   h   i   s       i   s       a       l   o
0000140   n   g       m   e   s   s   a   g   e 033   [   7   ;   2   H
0000160   m   v   w   a   d   d   s   t   r   (   u   s   e   ,       0
0000200   ,       0   ,       "   s   h   o   r   t       m   e   s   s
0000220   a   g   e   \   n   "   ) 033   [   1   0   ;   2   H   s   h
0000240   o   r   t  \t  \t  \b  \b  \r 033   [   1   4   B

And here is an untic of the vt100 terminfo entry:

vt100|vt100-am|dec vt100,
	am, xenl, 
	cols#80, it#8, lines#24, vt#3, 
	bel=^G, cr=\r, csr=\E[%i%p1%d;%p2%dr, tbc=\E[3g, 
	clear=\E[H\E[2J, el=\E[K, ed=\E[J, cup=\E[%i%p1%d;%p2%dH, 
	cud1=\n, home=\E[H, cub1=\b, cuf1=\E[C, 
	cuu1=\E[A, blink=\E[5m, bold=\E[1m, rev=\E[7m, 
	smso=\E[7m, smul=\E[4m, sgr0=\E[m, rmso=\E[m, 
	rmul=\E[m, kbs=\b, kcud1=\EOB, kcub1=\EOD, 
	kcuf1=\EOC, kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=, 
	cud=\E[%p1%dB, cub=\E[%p1%dD, cuf=\E[%p1%dC, cuu=\E[%p1%dA, 
	rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, rc=\E8, sc=\E7, ind=\n, 
	ri=\EM, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, hts=\EH, ht=\t, 
	

I see nothing wrong with the terminfo entry.  What's wrong with curses?
-- 
Col. G. L. Sicherman
gls@corona.att.COM

cedman@golem.ps.uci.edu (Carl Edman) (04/16/91)

This bug seems to be identical to a bug I reported a few weeks ago on
this group.  The solution is to use a different curses library. If you
have 6.5 that works fine, so will - hopefully - 8.0.

        Carl Edman

--
"We hold that what one man cannot morally do, a million men cannot
morally do, and government, representing many millions of men, cannot
do." -- Auberon Herbert
          Send mail to Carl Edman <cedman@golem.ps.uci.edu>