Date: Sun, 26 Sep 1999 13:44:26 +0200 (CEST) From: hm@kts.org To: FreeBSD-gnats-submit@freebsd.org Subject: misc/13978: (n)curses bug in FreeBSD-current Message-ID: <m11VCjC-00002wC@bert.kts.org>
index | next in thread | raw e-mail
>Number: 13978
>Category: misc
>Synopsis: a write to last column bug appears since ncurses conversion
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Sep 26 11:10:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Hellmuth Michaelis
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
Kitchen Table Systems
>Environment:
FreeBSD ernie.kts.org 3.2-STABLE FreeBSD 3.2-STABLE #5: Thu Sep 16 16:44:33 CEST 1999
and
FreeBSD bert.kts.org 4.0-CURRENT FreeBSD 4.0-CURRENT #0: Sat Sep 25 15:53:18 CEST 1999
>Description:
In contrast to FreeBSD 3.2-Stable, it is no longer possible in a
curses window (with scrollok enabled - if that matters) to write
to the last column without causing a newline to occur.
Running the program below compiled on 3.2 displaying in an xterm
on a 4.0 machine gives one output line beneath the other without
blank lines between output lines.
Running the same program compiled on 4.0 displaying in the same
xterm on a 4.0 machine gives a blank line after each line of output
from the program.
>How-To-Repeat:
Compile the program on a 3.2-stable system and on a 4.0 current
system (later or equal to September 25, 1999) with:
cc test.c -lcurses
and run each compilation result in a standard xterm (my termcap
entry used was "xterms|vs100s" on 4.0 current) as described above
in the Description section.
The effect is also visible on the console using the pcvt
driver in 3.2 and 4.0.
#include <curses.h>
#define MAXJ 10
main()
{
WINDOW *windowp;
int i, j;
initscr();
noecho();
raw();
if((windowp = newwin(10, COLS, 5, 0)) == NULL)
{
endwin();
fprintf(stderr, "ERROR, curses init window\n");
exit(1);
}
scrollok(windowp, 1);
wmove(windowp, 0, 0);
for(j=0; j < MAXJ; j++)
{
char buf[] = "BUFFER";
char what[] = "WHAT";
char msg[] = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>";
wprintw(windowp, "%d %s %s %-.*s\n", j, buf, what,
COLS-((strlen(buf))+(strlen(what))+4), msg);
wrefresh(windowp);
sleep(1);
}
endwin();
}
>Fix:
None.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m11VCjC-00002wC>
