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/61b2cf014ea3
branches:  netbsd-8
changeset: 435286:61b2cf014ea3
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Oct 03 17:49:06 2018 +0000

description:
Pull up following revision(s) (requested by roy in ticket #1043):

        lib/libcurses/resize.c: revision 1.27
        lib/libcurses/get_wch.c: revision 1.19
        lib/libcurses/getch.c: revision 1.70

curses: resizeterm(3) should always send KEY_RESIZE

Fixes #53636

OK kamil@

diffstat:

 lib/libcurses/get_wch.c |  8 ++++----
 lib/libcurses/getch.c   |  8 ++++----
 lib/libcurses/resize.c  |  6 ++++--
 3 files changed, 12 insertions(+), 10 deletions(-)

diffs (102 lines):

diff -r fb513474f9ef -r 61b2cf014ea3 lib/libcurses/get_wch.c
--- a/lib/libcurses/get_wch.c   Fri Sep 28 08:33:43 2018 +0000
+++ b/lib/libcurses/get_wch.c   Wed Oct 03 17:49:06 2018 +0000
@@ -1,4 +1,4 @@
-/*   $NetBSD: get_wch.c,v 1.14.4.2 2018/09/27 15:12:15 martin Exp $ */
+/*   $NetBSD: get_wch.c,v 1.14.4.3 2018/10/03 17:49:06 martin Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: get_wch.c,v 1.14.4.2 2018/09/27 15:12:15 martin Exp $");
+__RCSID("$NetBSD: get_wch.c,v 1.14.4.3 2018/10/03 17:49:06 martin Exp $");
 #endif                                           /* not lint */
 
 #include <errno.h>
@@ -530,8 +530,8 @@
            __echoit, __rawmode, _cursesi_screen->nl, win->flags);
 #endif
        if (_cursesi_screen->resized) {
+               resizeterm(LINES, COLS);
                _cursesi_screen->resized = 0;
-               resizeterm(LINES, COLS);
                *ch = KEY_RESIZE;
                return KEY_CODE_YES;
        }
@@ -684,8 +684,8 @@
 #ifdef DEBUG
        __CTRACE(__CTRACE_INPUT, "__fgetwc_resize returning KEY_RESIZE\n");
 #endif
+       resizeterm(LINES, COLS);
        _cursesi_screen->resized = 0;
-       resizeterm(LINES, COLS);
        *resized = true;
        return c;
 }
diff -r fb513474f9ef -r 61b2cf014ea3 lib/libcurses/getch.c
--- a/lib/libcurses/getch.c     Fri Sep 28 08:33:43 2018 +0000
+++ b/lib/libcurses/getch.c     Wed Oct 03 17:49:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getch.c,v 1.65.4.2 2018/09/27 15:12:15 martin Exp $    */
+/*     $NetBSD: getch.c,v 1.65.4.3 2018/10/03 17:49:06 martin Exp $    */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)getch.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: getch.c,v 1.65.4.2 2018/09/27 15:12:15 martin Exp $");
+__RCSID("$NetBSD: getch.c,v 1.65.4.3 2018/10/03 17:49:06 martin Exp $");
 #endif
 #endif                                 /* not lint */
 
@@ -824,8 +824,8 @@
            __echoit, __rawmode, _cursesi_screen->nl, win->flags, win->delay);
 #endif
        if (_cursesi_screen->resized) {
+               resizeterm(LINES, COLS);
                _cursesi_screen->resized = 0;
-               resizeterm(LINES, COLS);
 #ifdef DEBUG
                __CTRACE(__CTRACE_INPUT, "wgetch returning KEY_RESIZE\n");
 #endif
@@ -1013,7 +1013,7 @@
 #ifdef DEBUG
        __CTRACE(__CTRACE_INPUT, "__fgetc_resize returning KEY_RESIZE\n");
 #endif
+       resizeterm(LINES, COLS);
        _cursesi_screen->resized = 0;
-       resizeterm(LINES, COLS);
        return KEY_RESIZE;
 }
diff -r fb513474f9ef -r 61b2cf014ea3 lib/libcurses/resize.c
--- a/lib/libcurses/resize.c    Fri Sep 28 08:33:43 2018 +0000
+++ b/lib/libcurses/resize.c    Wed Oct 03 17:49:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: resize.c,v 1.26 2017/01/24 17:27:30 roy Exp $  */
+/*     $NetBSD: resize.c,v 1.26.4.1 2018/10/03 17:49:06 martin Exp $   */
 
 /*
  * Copyright (c) 2001
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)resize.c   blymn 2001/08/26";
 #else
-__RCSID("$NetBSD: resize.c,v 1.26 2017/01/24 17:27:30 roy Exp $");
+__RCSID("$NetBSD: resize.c,v 1.26.4.1 2018/10/03 17:49:06 martin Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -163,6 +163,8 @@
        __CTRACE(__CTRACE_WINDOW, "resizeterm: (%d, %d)\n", nlines, ncols);
 #endif
 
+       /* Unconditionally inform application screen has been resized. */
+       _cursesi_screen->resized = 1;
 
        if (!is_term_resized(nlines, ncols))
                return OK;



Home | Main Index | Thread Index | Old Index