summaryrefslogtreecommitdiff
path: root/net/nap/patches/patch-aa
blob: 5e2208eeb8801c620a79eb24d1d6fdb8b0ab42a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
$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 <dirent.h>
 #include <fcntl.h>
 #include <sys/types.h>
-#include <arpa/inet.h>
 #ifndef MCURSES
   #include <ncurses.h>
 #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)
   {