Source-Changes-HG archive

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

[src/netbsd-8]: src/lib/libcurses Back out the following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/be8516bd70b5
branches:  netbsd-8
changeset: 435301:be8516bd70b5
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Oct 09 10:01:38 2018 +0000

description:
Back out the following revision(s) (requested by roy in ticket #1049):

        lib/libcurses/refresh.c: revision 1.89
        lib/libcurses/newwin.c: revision 1.53

  curses: allow drawing the lowest right hand cell of the terminal

  This is a historical behaviour that needs fixing
  If any terminal does scroll when drawing in the lowest right hand cell
  of the terminal then an entry should be made in the terminfo database
  (currently there is no standard code) to state that and define
  __SCROLLWIN as before.

  Fixes PR# 30978.


As discussed in the PR, this change introduces a regression.

diffstat:

 lib/libcurses/newwin.c  |  10 +-----
 lib/libcurses/refresh.c |  78 +++++++++++++++++++++++++-----------------------
 2 files changed, 43 insertions(+), 45 deletions(-)

diffs (137 lines):

diff -r 79fe5a94f384 -r be8516bd70b5 lib/libcurses/newwin.c
--- a/lib/libcurses/newwin.c    Tue Oct 09 09:58:08 2018 +0000
+++ b/lib/libcurses/newwin.c    Tue Oct 09 10:01:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newwin.c,v 1.50.6.2 2018/10/09 09:49:35 martin Exp $   */
+/*     $NetBSD: newwin.c,v 1.50.6.3 2018/10/09 10:01:38 martin Exp $   */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)newwin.c   8.3 (Berkeley) 7/27/94";
 #else
-__RCSID("$NetBSD: newwin.c,v 1.50.6.2 2018/10/09 09:49:35 martin Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.50.6.3 2018/10/09 10:01:38 martin Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -422,14 +422,8 @@
                win->flags |= __ENDLINE;
                if (win->begx == 0 && win->maxy == LINES && win->begy == 0)
                        win->flags |= __FULLWIN;
-               /*
-                * Enable this if we have a terminfo setting which claims
-                * terminal will scroll. Currently there is none.
-                */
-#if 0
                if (win->begy + win->maxy == LINES)
                        win->flags |= __SCROLLWIN;
-#endif
        }
 }
 
diff -r 79fe5a94f384 -r be8516bd70b5 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Tue Oct 09 09:58:08 2018 +0000
+++ b/lib/libcurses/refresh.c   Tue Oct 09 10:01:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refresh.c,v 1.88.4.1 2018/10/09 09:49:35 martin Exp $  */
+/*     $NetBSD: refresh.c,v 1.88.4.2 2018/10/09 10:01:38 martin 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.88.4.1 2018/10/09 09:49:35 martin Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.88.4.2 2018/10/09 10:01:38 martin Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -1208,46 +1208,50 @@
                        wx++;
                        if (wx >= win->maxx &&
                            wy == win->maxy - 1 && !_cursesi_screen->curwin) {
-                               if (win->flags & __ENDLINE)
-                                       __unsetattr(1);
-                               if (!(win->flags & __SCROLLWIN)) {
-                                       if (!_cursesi_screen->curwin) {
-                                               csp->attr = nsp->attr;
-                                               csp->ch = nsp->ch;
+                               if (win->flags & __SCROLLOK) {
+                                       if (win->flags & __ENDLINE)
+                                               __unsetattr(1);
+                                       if (!(win->flags & __SCROLLWIN)) {
+                                               if (!_cursesi_screen->curwin) {
+                                                       csp->attr = nsp->attr;
+                                                       csp->ch = nsp->ch;
 #ifdef HAVE_WCHAR
-                                               if (_cursesi_copy_nsp(nsp->nsp, csp) == ERR)
-                                                       return ERR;
+                                                       if (_cursesi_copy_nsp(nsp->nsp, csp) == ERR)
+                                                               return ERR;
+#endif /* HAVE_WCHAR */
+                                               }
+#ifndef HAVE_WCHAR
+                                               __cputchar((int) nsp->ch);
+#else
+                                               if ( WCOL( *nsp ) > 0 ) {
+                                                       __cputwchar((int)nsp->ch);
+#ifdef DEBUG
+                                                       __CTRACE(__CTRACE_REFRESH,
+                                                           "makech: (%d,%d)putwchar(0x%x)\n",
+                                                               wy, wx - 1,
+                                                               nsp->ch );
+#endif /* DEBUG */
+                                                       /*
+                                                        * Output non-spacing
+                                                        * characters for the
+                                                        * cell.
+                                                        */
+                                                       __cursesi_putnsp(nsp->nsp,
+                                                                        wy, wx);
+
+                                               }
 #endif /* HAVE_WCHAR */
                                        }
-#ifndef HAVE_WCHAR
-                                       __cputchar((int) nsp->ch);
-#else
-                                       if ( WCOL( *nsp ) > 0 ) {
-                                               __cputwchar((int)nsp->ch);
-#ifdef DEBUG
-                                               __CTRACE(__CTRACE_REFRESH,
-                                                   "makech: (%d,%d)putwchar(0x%x)\n",
-                                                       wy, wx - 1,
-                                                       nsp->ch );
-#endif /* DEBUG */
-                                               /*
-                                                * Output non-spacing
-                                                * characters for the
-                                                * cell.
-                                                */
-                                               __cursesi_putnsp(nsp->nsp, wy, wx);
+                                       if (wx < curscr->maxx) {
+                                               domvcur(win,
+                                                   _cursesi_screen->ly, wx,
+                                                   (int)(win->maxy - 1),
+                                                   (int)(win->maxx - 1));
                                        }
-#endif /* HAVE_WCHAR */
+                                       _cursesi_screen->ly = win->maxy - 1;
+                                       _cursesi_screen->lx = win->maxx - 1;
+                                       return (OK);
                                }
-                               if (wx < curscr->maxx) {
-                                       domvcur(win,
-                                           _cursesi_screen->ly, wx,
-                                           (int)(win->maxy - 1),
-                                           (int)(win->maxx - 1));
-                               }
-                               _cursesi_screen->ly = win->maxy - 1;
-                               _cursesi_screen->lx = win->maxx - 1;
-                               return OK;
                        }
                        if (wx < win->maxx || wy < win->maxy - 1 ||
                            !(win->flags & __SCROLLWIN))



Home | Main Index | Thread Index | Old Index