$NetBSD: patch-aa,v 1.2 2005/06/23 15:35:07 wiz Exp $ --- nap.c.orig 2000-09-08 17:16:13.000000000 +0200 +++ nap.c @@ -10,7 +10,6 @@ #include #include #include -#include #ifndef MCURSES #include #endif @@ -151,10 +150,8 @@ void resize() ioctl(fileno(stdin), TIOCGWINSZ, &ws); resizeterm(ws.ws_row, ws.ws_col); - winput->_begy = LINES-1; - winput->_begx = 0; - sep->_begy = LINES-2; - sep->_begx = 0; + mvderwin(winput, LINES-1, 0); + mvderwin(sep, LINES-2, 0); if (notop) wresize(wchan, LINES-2, COLS); else @@ -187,10 +184,10 @@ void resize() void wstats(WINDOW *win) { - wp(win, "stdscr to %i - %i\n", stdscr->_maxy, stdscr->_maxx); - wp(win, "winput to %i - %i\n", winput->_maxy, winput->_maxx); - wp(win, "sep to %i - %i\n", sep->_maxy, sep->_maxx); - wp(win, "wchan to %i - %i\n", wchan->_maxy, wchan->_maxx); + wp(win, "stdscr to %i - %i\n", getmaxy(stdscr), getmaxx(stdscr)); + wp(win, "winput to %i - %i\n", getmaxy(winput), getmaxx(winput)); + wp(win, "sep to %i - %i\n", getmaxy(sep), getmaxx(sep)); + wp(win, "wchan to %i - %i\n", getmaxy(wchan), getmaxx(wchan)); wp(win, "LINES/COLS to %i - %i\n", LINES, COLS); drw(win); } @@ -790,7 +787,7 @@ void dscr(WINDOW *win) if (cur == NULL) return; - i = win->_maxy-1; + i = getmaxy(win)-1; if (cur->chan && (wmode && cur->chan != curchan)) i++; @@ -805,7 +802,7 @@ void dscr(WINDOW *win) i--; } - c = win->_maxy; + c = getmaxy(win); for (j=0,i=0;i<=c;cur=cur->next) {