60 lines
1.5 KiB
Text
60 lines
1.5 KiB
Text
$NetBSD: patch-aa,v 1.1 2001/01/08 14:20:20 wiz Exp $
|
|
|
|
--- nap.c.orig Mon Aug 28 00:39:57 2000
|
|
+++ nap.c
|
|
@@ -10,9 +10,8 @@
|
|
#include <dirent.h>
|
|
#include <fcntl.h>
|
|
#include <sys/types.h>
|
|
-#include <arpa/inet.h>
|
|
#ifndef MCURSES
|
|
#include <ncurses.h>
|
|
#endif
|
|
#include <stdlib.h>
|
|
#include <signal.h>
|
|
@@ -190,10 +189,8 @@
|
|
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
|
|
@@ -226,10 +223,10 @@
|
|
|
|
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);
|
|
}
|
|
@@ -831,7 +828,7 @@
|
|
if (cur == NULL)
|
|
return;
|
|
|
|
- i = win->_maxy-1;
|
|
+ i = getmaxy(win)-1;
|
|
|
|
if (cur->chan && (wmode && cur->chan != curchan))
|
|
i++;
|
|
@@ -846,7 +843,7 @@
|
|
i--;
|
|
}
|
|
|
|
- c = win->_maxy;
|
|
+ c = getmaxy(win);
|
|
|
|
for (j=0,i=0;i<=c;cur=cur->next)
|
|
{
|