NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/53635: Anomalies in soft label key functions in curses(3)



>Number:         53635
>Category:       lib
>Synopsis:       Anomalies in soft label key functions in curses(3)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 28 08:35:00 +0000 2018
>Originator:     Kamil Rytarowski
>Release:        NetBSD 8.99.25 amd64
>Organization:
TNF
>Environment:
NetBSD chieftec 8.99.25 NetBSD 8.99.25 (GENERIC) #0: Tue Sep 25 20:06:09 CEST 2018  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
>Description:
1. Soft label keys are not printed upon getch(3), when the window is marked with wnoutrefresh(3).

2. The bottom line is not aligned to bottom of the terminal, it might be 1 line above it.

3. If we register a top window with ripoffline(3), the bottom line is multiline and the first word printed with wprint(3) is in a different line than the remaining part of the string.

4. Cursor probably shall point position 0,0 below the soft label window, instead of pointing at it.

All of these issues do not exist in ncurses.
>How-To-Repeat:
#include <curses.h>

int
top(WINDOW *win, int cols)
{

	mvwprintw(win, 0, 0, "Hello top in %d columns", cols);

	wnoutrefresh(win);

	return 0;
}

int
setup(WINDOW *win, int cols)
{

	mvwprintw(win, 0, 0, "Hello world in %d columns", cols);

	wnoutrefresh(win);

	return 0;
}

int
main(int argc, char **argv)
{

	ripoffline(1, top);
	ripoffline(-1, setup);
	initscr();

	refresh(); // unneeded in ncurses
	getch();
	endwin();
}

// ncurses
// gcc test.c -lncurses -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -I/usr/pkg/include -I/usr/pkg/include/ncurses

// NetBSD curses(3)
// gcc test.c -lcurses
>Fix:
N/A



Home | Main Index | Thread Index | Old Index