Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Initialization of the backing store pointers i...



details:   https://anonhg.NetBSD.org/src/rev/b06c900644b3
branches:  trunk
changeset: 472144:b06c900644b3
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Thu Apr 22 22:39:09 1999 +0000

description:
Initialization of the backing store pointers in __set_subwin() was just
totally wrong.  It needs to offset by the origin of the parent window.

diffstat:

 lib/libcurses/newwin.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r a83a619a2c91 -r b06c900644b3 lib/libcurses/newwin.c
--- a/lib/libcurses/newwin.c    Thu Apr 22 20:37:37 1999 +0000
+++ b/lib/libcurses/newwin.c    Thu Apr 22 22:39:09 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newwin.c,v 1.10 1999/04/13 14:08:18 mrg Exp $  */
+/*     $NetBSD: newwin.c,v 1.11 1999/04/22 22:39:09 mycroft Exp $      */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)newwin.c   8.3 (Berkeley) 7/27/94";
 #else
-__RCSID("$NetBSD: newwin.c,v 1.10 1999/04/13 14:08:18 mrg Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.11 1999/04/22 22:39:09 mycroft Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -141,8 +141,8 @@
        /* Point line pointers to line space. */
        for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++) {
                win->lines[i] = lp;
-               olp = orig->lines[i + win->begy];
-               lp->line = &olp->line[win->begx];
+               olp = orig->lines[i + win->begy - orig->begy];
+               lp->line = &olp->line[win->begx - orig->begx];
                lp->firstchp = &olp->firstch;
                lp->lastchp = &olp->lastch;
                lp->hash = __hash((char *) lp->line, (int) (win->maxx * __LDATASIZE));



Home | Main Index | Thread Index | Old Index