Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses ripoffline requires wnoutrefresh to work befor...



details:   https://anonhg.NetBSD.org/src/rev/dd52849e7dc9
branches:  trunk
changeset: 820555:dd52849e7dc9
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Jan 11 09:54:54 2017 +0000

description:
ripoffline requires wnoutrefresh to work before _cursesi_screen has been
set.

diffstat:

 lib/libcurses/refresh.c |  29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diffs (88 lines):

diff -r 295467d17bca -r dd52849e7dc9 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Wed Jan 11 09:09:42 2017 +0000
+++ b/lib/libcurses/refresh.c   Wed Jan 11 09:54:54 2017 +0000
@@ -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 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 @@
        __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 @@
        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 @@
        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 @@
                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) {



Home | Main Index | Thread Index | Old Index