CVS commit: src/tests/lib/libcurses/director

2021-06-10 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Thu Jun 10 07:21:07 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
Unset ESCDELAY in libcurses test director to ensure consistent results

Non-default values of ESCDELAY may result in unexpected test failures.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libcurses/director/director.c
diff -u src/tests/lib/libcurses/director/director.c:1.28 src/tests/lib/libcurses/director/director.c:1.29
--- src/tests/lib/libcurses/director/director.c:1.28	Sat Feb 13 09:18:12 2021
+++ src/tests/lib/libcurses/director/director.c	Thu Jun 10 07:21:07 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: director.c,v 1.28 2021/02/13 09:18:12 rillig Exp $	*/
+/*	$NetBSD: director.c,v 1.29 2021/06/10 07:21:07 mcf Exp $	*/
 
 /*-
  * Copyright 2009 Brett Lymn 
@@ -195,6 +195,9 @@ main(int argc, char *argv[])
 	if (setenv("TERM", term, 1) != 0)
 		err(2, "Failed to set TERM variable");
 
+	if (unsetenv("ESCDELAY") != 0)
+		err(2, "Failed to unset ESCDELAY variable");
+
 	if (stat(termpath, ) == -1)
 		err(1, "Cannot stat %s", termpath);
 



CVS commit: src/tests/lib/libcurses/director

2021-06-10 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Thu Jun 10 07:21:07 UTC 2021

Modified Files:
src/tests/lib/libcurses/director: director.c

Log Message:
Unset ESCDELAY in libcurses test director to ensure consistent results

Non-default values of ESCDELAY may result in unexpected test failures.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libcurses/director/director.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-06-10 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Thu Jun 10 07:15:40 UTC 2021

Modified Files:
src/lib/libcurses: setterm.c

Log Message:
Add missing newline to debug trace message

ok blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/lib/libcurses/setterm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-06-10 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Thu Jun 10 07:15:40 UTC 2021

Modified Files:
src/lib/libcurses: setterm.c

Log Message:
Add missing newline to debug trace message

ok blymn@


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/lib/libcurses/setterm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/setterm.c
diff -u src/lib/libcurses/setterm.c:1.68 src/lib/libcurses/setterm.c:1.69
--- src/lib/libcurses/setterm.c:1.68	Fri Oct 26 22:22:24 2018
+++ src/lib/libcurses/setterm.c	Thu Jun 10 07:15:40 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: setterm.c,v 1.68 2018/10/26 22:22:24 uwe Exp $	*/
+/*	$NetBSD: setterm.c,v 1.69 2021/06/10 07:15:40 mcf Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)setterm.c	8.8 (Berkeley) 10/25/94";
 #else
-__RCSID("$NetBSD: setterm.c,v 1.68 2018/10/26 22:22:24 uwe Exp $");
+__RCSID("$NetBSD: setterm.c,v 1.69 2021/06/10 07:15:40 mcf Exp $");
 #endif
 #endif /* not lint */
 
@@ -103,7 +103,7 @@ _cursesi_setterm(char *type, SCREEN *scr
 		t_lines(screen->term) = 1;
 	}
 #ifdef DEBUG
-	__CTRACE(__CTRACE_INIT, "setterm: filtered %d", screen->filtered);
+	__CTRACE(__CTRACE_INIT, "setterm: filtered %d\n", screen->filtered);
 #endif
 
 	if ((p = getenv("ESCDELAY")) != NULL)



CVS commit: src/lib/libcurses

2021-05-31 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Tue Jun  1 00:59:02 UTC 2021

Modified Files:
src/lib/libcurses: newwin.c

Log Message:
Fix initial line hash calculation for subwindows

lp->hash is not initialized at this point. Since the hash is
calculated in chunks using __hash_more(), it needs to be initialized
to 0 first (just as in doupdate()).

Detected with valgrind while running python's test suite when
debugging an unrelated issue.

ok uwe@


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libcurses/newwin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libcurses

2021-05-31 Thread Michael Forney
Module Name:src
Committed By:   mcf
Date:   Tue Jun  1 00:59:02 UTC 2021

Modified Files:
src/lib/libcurses: newwin.c

Log Message:
Fix initial line hash calculation for subwindows

lp->hash is not initialized at this point. Since the hash is
calculated in chunks using __hash_more(), it needs to be initialized
to 0 first (just as in doupdate()).

Detected with valgrind while running python's test suite when
debugging an unrelated issue.

ok uwe@


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/lib/libcurses/newwin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/newwin.c
diff -u src/lib/libcurses/newwin.c:1.59 src/lib/libcurses/newwin.c:1.60
--- src/lib/libcurses/newwin.c:1.59	Sat May 15 11:06:07 2021
+++ src/lib/libcurses/newwin.c	Tue Jun  1 00:59:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: newwin.c,v 1.59 2021/05/15 11:06:07 uwe Exp $	*/
+/*	$NetBSD: newwin.c,v 1.60 2021/06/01 00:59:01 mcf 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.59 2021/05/15 11:06:07 uwe Exp $");
+__RCSID("$NetBSD: newwin.c,v 1.60 2021/06/01 00:59:01 mcf Exp $");
 #endif
 #endif/* not lint */
 
@@ -252,6 +252,7 @@ __set_subwin(WINDOW *orig, WINDOW *win)
 		lp->hash = __hash((char *)(void *)lp->line,
   (size_t)(win->maxx * __LDATASIZE));
 #else
+		lp->hash = 0;
 		for (cp = lp->line, j = 0; j < win->maxx; j++, cp++) {
 			lp->hash = __hash_more( >ch,
 			sizeof( wchar_t ), lp->hash );