Module Name: src
Committed By: roy
Date: Wed Jan 11 09:54:54 UTC 2017
Modified Files:
src/lib/libcurses: refresh.c
Log Message:
ripoffline requires wnoutrefresh to work before _cursesi_screen has been
set.
To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/lib/libcurses/refresh.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/refresh.c
diff -u src/lib/libcurses/refresh.c:1.85 src/lib/libcurses/refresh.c:1.86
--- src/lib/libcurses/refresh.c:1.85 Tue Jan 10 10:33:49 2017
+++ src/lib/libcurses/refresh.c Wed Jan 11 09:54:54 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.85 2017/01/10 10:33:49 roy Exp $ */
+/* $NetBSD: refresh.c,v 1.86 2017/01/11 09:54:54 roy Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else
-__RCSID("$NetBSD: refresh.c,v 1.85 2017/01/10 10:33:49 roy Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.86 2017/01/11 09:54:54 roy Exp $");
#endif
#endif /* not lint */
@@ -50,8 +50,7 @@ static int makech(int);
static void quickch(void);
static void scrolln(int, int, int, int, int);
-static int _cursesi_wnoutrefresh(SCREEN *, WINDOW *,
- int, int, int, int, int, int);
+static int _wnoutrefresh(WINDOW *, int, int, int, int, int, int);
#ifdef HAVE_WCHAR
int cellcmp( __LDATA *, __LDATA * );
@@ -88,8 +87,8 @@ wnoutrefresh(WINDOW *win)
__CTRACE(__CTRACE_REFRESH, "wnoutrefresh: win %p\n", win);
#endif
- return _cursesi_wnoutrefresh(_cursesi_screen, win, 0, 0, win->begy,
- win->begx, win->maxy, win->maxx);
+ return _wnoutrefresh(win, 0, 0, win->begy, win->begx,
+ win->maxy, win->maxx);
}
/*
@@ -120,7 +119,7 @@ pnoutrefresh(WINDOW *pad, int pbegy, int
if (sbegx < 0)
sbegx = 0;
- /* Calculate rectangle on pad - used by _cursesi_wnoutrefresh */
+ /* Calculate rectangle on pad - used by _wnoutrefresh */
pmaxy = pbegy + smaxy - sbegy + 1;
pmaxx = pbegx + smaxx - sbegx + 1;
@@ -133,22 +132,22 @@ pnoutrefresh(WINDOW *pad, int pbegy, int
if (smaxy - sbegy < 0 || smaxx - sbegx < 0 )
return ERR;
- return _cursesi_wnoutrefresh(_cursesi_screen, pad,
+ return _wnoutrefresh(pad,
pad->begy + pbegy, pad->begx + pbegx, pad->begy + sbegy,
pad->begx + sbegx, pmaxy, pmaxx);
}
/*
- * _cursesi_wnoutrefresh --
+ * _wnoutrefresh --
* Does the grunt work for wnoutrefresh to the given screen.
* Copies the part of the window given by the rectangle
* (begy, begx) to (maxy, maxx) at screen position (wbegy, wbegx).
*/
-int
-_cursesi_wnoutrefresh(SCREEN *screen, WINDOW *win, int begy, int begx,
- int wbegy, int wbegx, int maxy, int maxx)
+static int
+_wnoutrefresh(WINDOW *win, int begy, int begx, int wbegy, int wbegx,
+ int maxy, int maxx)
{
-
+ SCREEN *screen = win->screen;
short sy, wy, wx, y_off, x_off, mx, dy_off, dx_off, endy;
__LINE *wlp, *vlp, *dwlp;
WINDOW *sub_win, *orig, *swin, *dwin;
@@ -440,8 +439,8 @@ wrefresh(WINDOW *win)
pbegy, pbegx);
#endif
}
- retval = _cursesi_wnoutrefresh(_cursesi_screen, win, pbegy,
- pbegx, win->begy, win->begx, win->maxy, win->maxx);
+ retval = _wnoutrefresh(win, pbegy, pbegx, win->begy, win->begx,
+ win->maxy, win->maxx);
} else
retval = OK;
if (retval == OK) {