Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Improve debug information.
details: https://anonhg.NetBSD.org/src/rev/1d956e84bd41
branches: trunk
changeset: 349482:1d956e84bd41
user: blymn <blymn%NetBSD.org@localhost>
date: Sun Dec 11 21:25:22 2016 +0000
description:
Improve debug information.
diffstat:
lib/libcurses/copywin.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (51 lines):
diff -r 6a54cc8a4684 -r 1d956e84bd41 lib/libcurses/copywin.c
--- a/lib/libcurses/copywin.c Sun Dec 11 20:40:41 2016 +0000
+++ b/lib/libcurses/copywin.c Sun Dec 11 21:25:22 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: copywin.c,v 1.15 2009/07/22 16:57:14 roy Exp $ */
+/* $NetBSD: copywin.c,v 1.16 2016/12/11 21:25:22 blymn Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: copywin.c,v 1.15 2009/07/22 16:57:14 roy Exp $");
+__RCSID("$NetBSD: copywin.c,v 1.16 2016/12/11 21:25:22 blymn Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -59,6 +59,13 @@
nschar_t *np;
#endif /* HAVE_WCHAR */
+#ifdef DEBUG
+ __CTRACE(__CTRACE_WINDOW,
+ "copywin %s mode: from (%d,%d) to (%d,%d-%d,%d)\n",
+ dooverlay ? "overlay" : "overwrite",
+ sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol);
+#endif
+
/* overwrite() and overlay() can come here with -ve srcwin coords */
if (sminrow < 0) {
dminrow -= sminrow;
@@ -104,12 +111,18 @@
for (; dminrow <= dmaxrow; sminrow++, dminrow++) {
sp = &srcwin->alines[sminrow]->line[smincol];
end = sp + dmaxcol - dmincol;
+#ifdef DEBUG
+ __CTRACE(__CTRACE_WINDOW, "copywin: row %d\n", sminrow);
+#endif
for (dcol = dmincol; sp <= end; dcol++, sp++) {
/* XXX: Perhaps this should check for the
* background character
*/
if ((dooverlay && !isspace(sp->ch)) || !dooverlay) {
wmove(dstwin, dminrow, dcol);
+#ifdef DEBUG
+ __CTRACE(__CTRACE_WINDOW, "copywin: dcol = %d\n", dcol);
+#endif
#ifndef HAVE_WCHAR
__waddch(dstwin, sp);
#else
Home |
Main Index |
Thread Index |
Old Index