Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/lib/libcurses Pull up following revision(s) (requested by...
details: https://anonhg.NetBSD.org/src/rev/fb00973a1d66
branches: netbsd-8
changeset: 435297:fb00973a1d66
user: martin <martin%NetBSD.org@localhost>
date: Tue Oct 09 09:49:35 2018 +0000
description:
Pull up 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.
diffstat:
lib/libcurses/newwin.c | 10 +++++-
lib/libcurses/refresh.c | 78 +++++++++++++++++++++++-------------------------
2 files changed, 45 insertions(+), 43 deletions(-)
diffs (137 lines):
diff -r 3ed7d122bd5a -r fb00973a1d66 lib/libcurses/newwin.c
--- a/lib/libcurses/newwin.c Tue Oct 09 09:46:09 2018 +0000
+++ b/lib/libcurses/newwin.c Tue Oct 09 09:49:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: newwin.c,v 1.50.6.1 2018/10/04 10:20:12 martin Exp $ */
+/* $NetBSD: newwin.c,v 1.50.6.2 2018/10/09 09:49:35 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.1 2018/10/04 10:20:12 martin Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.50.6.2 2018/10/09 09:49:35 martin Exp $");
#endif
#endif /* not lint */
@@ -422,8 +422,14 @@
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 3ed7d122bd5a -r fb00973a1d66 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c Tue Oct 09 09:46:09 2018 +0000
+++ b/lib/libcurses/refresh.c Tue Oct 09 09:49:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.88 2017/03/20 20:42:39 christos Exp $ */
+/* $NetBSD: refresh.c,v 1.88.4.1 2018/10/09 09:49:35 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 2017/03/20 20:42:39 christos Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.88.4.1 2018/10/09 09:49:35 martin Exp $");
#endif
#endif /* not lint */
@@ -1208,50 +1208,46 @@
wx++;
if (wx >= win->maxx &&
wy == win->maxy - 1 && !_cursesi_screen->curwin) {
- 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;
+ 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;
-#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 (_cursesi_copy_nsp(nsp->nsp, csp) == ERR)
+ return ERR;
#endif /* HAVE_WCHAR */
}
- if (wx < curscr->maxx) {
- domvcur(win,
- _cursesi_screen->ly, wx,
- (int)(win->maxy - 1),
- (int)(win->maxx - 1));
+#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);
}
- _cursesi_screen->ly = win->maxy - 1;
- _cursesi_screen->lx = win->maxx - 1;
- return (OK);
+#endif /* HAVE_WCHAR */
}
+ 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