Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses GC __FORCEPAINT.



details:   https://anonhg.NetBSD.org/src/rev/3f0835ac18cd
branches:  trunk
changeset: 486378:3f0835ac18cd
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Sat May 20 15:12:15 2000 +0000

description:
GC __FORCEPAINT.

diffstat:

 lib/libcurses/clrtobot.c       |   7 +--
 lib/libcurses/clrtoeol.c       |   6 +-
 lib/libcurses/curses_private.h |   5 +-
 lib/libcurses/delch.c          |   6 +-
 lib/libcurses/erase.c          |   7 +--
 lib/libcurses/insch.c          |   6 +-
 lib/libcurses/insdelln.c       |   8 ++--
 lib/libcurses/refresh.c        |  70 +++++++++++++----------------------------
 lib/libcurses/toucholap.c      |   6 +-
 lib/libcurses/touchwin.c       |  18 ++++------
 10 files changed, 55 insertions(+), 84 deletions(-)

diffs (truncated from 476 to 300 lines):

diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/clrtobot.c
--- a/lib/libcurses/clrtobot.c  Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/clrtobot.c  Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clrtobot.c,v 1.13 2000/04/18 22:45:24 jdc Exp $        */
+/*     $NetBSD: clrtobot.c,v 1.14 2000/05/20 15:12:15 mycroft Exp $    */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)clrtobot.c 8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: clrtobot.c,v 1.13 2000/04/18 22:45:24 jdc Exp $");
+__RCSID("$NetBSD: clrtobot.c,v 1.14 2000/05/20 15:12:15 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -94,8 +94,7 @@
                                sp->battr = win->battr;
                        }
                if (minx != -1)
-                       __touchline(win, y, minx, maxx - win->lines[y]->line,
-                           0);
+                       __touchline(win, y, minx, maxx - win->lines[y]->line);
                startx = 0;
        }
        return (OK);
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/clrtoeol.c
--- a/lib/libcurses/clrtoeol.c  Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/clrtoeol.c  Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clrtoeol.c,v 1.13 2000/04/18 22:45:24 jdc Exp $        */
+/*     $NetBSD: clrtoeol.c,v 1.14 2000/05/20 15:12:15 mycroft Exp $    */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: clrtoeol.c,v 1.13 2000/04/18 22:45:24 jdc Exp $");
+__RCSID("$NetBSD: clrtoeol.c,v 1.14 2000/05/20 15:12:15 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -98,5 +98,5 @@
            *win->lines[y]->lastchp);
 #endif
        /* Update firstch and lastch for the line. */
-       return (__touchline(win, y, x, (int) win->maxx - 1, 0));
+       return (__touchline(win, y, x, (int) win->maxx - 1));
 }
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/curses_private.h
--- a/lib/libcurses/curses_private.h    Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/curses_private.h    Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: curses_private.h,v 1.9 2000/05/01 12:30:30 blymn Exp $ */
+/*     $NetBSD: curses_private.h,v 1.10 2000/05/20 15:12:15 mycroft Exp $      */
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -53,7 +53,6 @@
 struct __line {
 #define        __ISDIRTY       0x01            /* Line is dirty. */
 #define __ISPASTEOL    0x02            /* Cursor is past end of line */
-#define __FORCEPAINT   0x04            /* Force a repaint of the line */
        unsigned int flags;
        unsigned int hash;              /* Hash value for the line. */
        int *firstchp, *lastchp;        /* First and last chngd columns ptrs */
@@ -126,7 +125,7 @@
 int     __stopwin(void);
 void    __swflags(WINDOW *win);
 int     __timeout(int delay);
-int     __touchline(WINDOW *win, int y, int sx, int ex, int force);
+int     __touchline(WINDOW *win, int y, int sx, int ex);
 int     __touchwin(WINDOW *win);
 char   *__tscroll(const char *cap, int n1, int n2);
 void    __unsetattr(int);
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/delch.c
--- a/lib/libcurses/delch.c     Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/delch.c     Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: delch.c,v 1.13 2000/04/18 22:45:24 jdc Exp $   */
+/*     $NetBSD: delch.c,v 1.14 2000/05/20 15:12:15 mycroft Exp $       */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)delch.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: delch.c,v 1.13 2000/04/18 22:45:24 jdc Exp $");
+__RCSID("$NetBSD: delch.c,v 1.14 2000/05/20 15:12:15 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -103,6 +103,6 @@
        temp1->bch = win->bch;
        temp1->attr = 0;
        temp1->battr = win->battr;
-       __touchline(win, (int) win->cury, (int) win->curx, (int) win->maxx - 1, 0);
+       __touchline(win, (int) win->cury, (int) win->curx, (int) win->maxx - 1);
        return (OK);
 }
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/erase.c
--- a/lib/libcurses/erase.c     Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/erase.c     Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: erase.c,v 1.14 2000/04/18 22:45:24 jdc Exp $   */
+/*     $NetBSD: erase.c,v 1.15 2000/05/20 15:12:15 mycroft Exp $       */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)erase.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: erase.c,v 1.14 2000/04/18 22:45:24 jdc Exp $");
+__RCSID("$NetBSD: erase.c,v 1.15 2000/05/20 15:12:15 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -92,8 +92,7 @@
                                sp->battr = win->battr;
                        }
                if (minx != -1)
-                       __touchline(win, y, minx, maxx - win->lines[y]->line,
-                           0);
+                       __touchline(win, y, minx, maxx - win->lines[y]->line);
        }
        wmove(win, 0, 0);
        return (OK);
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/insch.c
--- a/lib/libcurses/insch.c     Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/insch.c     Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: insch.c,v 1.14 2000/04/18 22:45:24 jdc Exp $   */
+/*     $NetBSD: insch.c,v 1.15 2000/05/20 15:12:15 mycroft Exp $       */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)insch.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: insch.c,v 1.14 2000/04/18 22:45:24 jdc Exp $");
+__RCSID("$NetBSD: insch.c,v 1.15 2000/05/20 15:12:15 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -105,7 +105,7 @@
        temp1->bch = win->bch;
        temp1->attr = (attr_t) ch & __ATTRIBUTES;
        temp1->battr = win->battr;
-       __touchline(win, (int) win->cury, (int) win->curx, (int) win->maxx - 1, 0);
+       __touchline(win, (int) win->cury, (int) win->curx, (int) win->maxx - 1);
        if (win->cury == LINES - 1 &&
            (win->lines[LINES - 1]->line[COLS - 1].ch != ' ' ||
                win->lines[LINES - 1]->line[COLS - 1].bch != ' ' ||
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/insdelln.c
--- a/lib/libcurses/insdelln.c  Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/insdelln.c  Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: insdelln.c,v 1.6 2000/04/24 14:09:43 blymn Exp $       */
+/*     $NetBSD: insdelln.c,v 1.7 2000/05/20 15:12:15 mycroft Exp $     */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: insdelln.c,v 1.6 2000/04/24 14:09:43 blymn Exp $");
+__RCSID("$NetBSD: insdelln.c,v 1.7 2000/05/20 15:12:15 mycroft Exp $");
 #endif                         /* not lint */
 
 /* 
@@ -110,7 +110,7 @@
                                win->lines[y]->line[i].battr = win->battr;
                        }
                for (y = win->maxy - 1; y >= win->cury; --y)
-                       __touchline(win, y, 0, (int) win->maxx - 1, 0);
+                       __touchline(win, y, 0, (int) win->maxx - 1);
        } else {
                /* Delete lines */
                lines = 0 - lines;
@@ -138,7 +138,7 @@
                                win->lines[y]->line[i].battr = win->battr;
                        }
                for (y = win->cury; y < win->maxy; y++)
-                       __touchline(win, y, 0, (int) win->maxx - 1, 0);
+                       __touchline(win, y, 0, (int) win->maxx - 1);
        }
        if (win->orig != NULL)
                __id_subwins(win->orig);
diff -r 0f3b03b55e0a -r 3f0835ac18cd lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Sat May 20 14:26:01 2000 +0000
+++ b/lib/libcurses/refresh.c   Sat May 20 15:12:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.34 2000/05/19 16:00:52 mycroft Exp $     */
+/*     $NetBSD: refresh.c,v 1.35 2000/05/20 15:12:15 mycroft Exp $     */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.7 (Berkeley) 8/13/94";
 #else
-__RCSID("$NetBSD: refresh.c,v 1.34 2000/05/19 16:00:52 mycroft Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.35 2000/05/20 15:12:15 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -107,7 +107,7 @@
                __CTRACE("wnoutrefresh: wy %d\tf: %d\tl:%d\tflags %x\n", wy,
                    *wlp->firstchp, *wlp->lastchp, wlp->flags);
 #endif
-               if ((wlp->flags & (__FORCEPAINT | __ISDIRTY)) == 0)
+               if ((wlp->flags & __ISDIRTY) == 0)
                        continue;
                vlp = __virtscr->lines[wy + win->begy];
 
@@ -131,10 +131,6 @@
                        }
 
                        /* Set flags on "__virtscr" and unset on "win". */
-                       if (wlp->flags & __FORCEPAINT) {
-                               vlp->flags |= __FORCEPAINT;
-                               wlp->flags &= ~__FORCEPAINT;
-                       }
                        if (wlp->flags & __ISPASTEOL)
                                vlp->flags |= __ISPASTEOL;
                        else
@@ -272,8 +268,7 @@
                 * in the window are dirty.
                 */
                for (wy = 0, dnum = 0; wy < win->maxy; wy++)
-                       if (win->lines[wy]->flags &
-                           (__ISDIRTY | __FORCEPAINT))
+                       if (win->lines[wy]->flags & __ISDIRTY)
                                dnum++;
                if (!__noqch && dnum > (int) win->maxy / 4)
                        quickch();
@@ -318,7 +313,7 @@
 #endif
                if (!curwin)
                        curscr->lines[wy]->hash = wlp->hash;
-               if (wlp->flags & (__ISDIRTY | __FORCEPAINT)) {
+               if (wlp->flags & __ISDIRTY) {
                        if (makech(wy) == ERR)
                                return (ERR);
                        else {
@@ -374,10 +369,9 @@
        WINDOW  *win;
        static __LDATA blank = {' ', 0, ' ', 0};
        __LDATA *nsp, *csp, *cp, *cep;
-       u_int   force;
        int     clsp, nlsp;     /* Last space in lines. */
        int     lch, wx;
-       char    *ce, cm_buff[1024];
+       char    *ce;
        attr_t  lspc;           /* Last space colour */
        attr_t  off, on;
 
@@ -413,8 +407,6 @@
                csp = &curscr->lines[wy]->line[wx];
 
        nsp = &win->lines[wy]->line[wx];
-       force = win->lines[wy]->flags & __FORCEPAINT;
-       win->lines[wy]->flags &= ~__FORCEPAINT;
        if (CE && !curwin) {
                cp = &win->lines[wy]->line[win->maxx - 1];
                lspc = cp->attr & __COLOR;
@@ -428,18 +420,8 @@
        else
                ce = NULL;
 
-       if (force) {
-               if (CM) {
-                       t_goto(NULL, CM, lx, ly, cm_buff, 1023);
-                       tputs(cm_buff, 0, __cputchar);
-               } else {
-                       tputs(HO, 0, __cputchar);
-                       __mvcur(0, 0, ly, lx, 1);
-               }
-       }
-
        while (wx <= lch) {
-               if (!force && memcmp(nsp, csp, sizeof(__LDATA)) == 0) {
+               if (memcmp(nsp, csp, sizeof(__LDATA)) == 0) {
                        if (wx <= lch) {
                                while (wx <= lch &&
                                    memcmp(nsp, csp, sizeof(__LDATA)) == 0) {
@@ -455,14 +437,12 @@
                domvcur(ly, lx, wy, wx);
 
 #ifdef DEBUG
-               __CTRACE("makech: 1: wx = %d, ly= %d, lx = %d, newy = %d, newx = %d, force =%d\n",
-                   wx, ly, lx, wy, wx, force);



Home | Main Index | Thread Index | Old Index