Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Add/improve debug output for some routines.
details: https://anonhg.NetBSD.org/src/rev/8ad71d9346f6
branches: trunk
changeset: 456113:8ad71d9346f6
user: blymn <blymn%NetBSD.org@localhost>
date: Wed Apr 24 07:09:44 2019 +0000
description:
Add/improve debug output for some routines.
diffstat:
lib/libcurses/add_wch.c | 7 ++++---
lib/libcurses/refresh.c | 25 +++++++++++++++----------
lib/libcurses/touchwin.c | 12 ++++++++++--
3 files changed, 29 insertions(+), 15 deletions(-)
diffs (114 lines):
diff -r 651d0eb0bb22 -r 8ad71d9346f6 lib/libcurses/add_wch.c
--- a/lib/libcurses/add_wch.c Wed Apr 24 06:37:31 2019 +0000
+++ b/lib/libcurses/add_wch.c Wed Apr 24 07:09:44 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: add_wch.c,v 1.6 2018/11/22 22:16:45 uwe Exp $ */
+/* $NetBSD: add_wch.c,v 1.7 2019/04/24 07:09:44 blymn Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: add_wch.c,v 1.6 2018/11/22 22:16:45 uwe Exp $");
+__RCSID("$NetBSD: add_wch.c,v 1.7 2019/04/24 07:09:44 blymn Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -101,7 +101,8 @@
for (i = 0; i < win->maxy; i++) {
assert(win->alines[i]->sentinel == SENTINEL_VALUE);
}
- __CTRACE(__CTRACE_INPUT, "wadd_wch: win(%p)\n", win);
+ __CTRACE(__CTRACE_INPUT, "wadd_wch: win(%p), x: %d, y: %d\n",
+ win, x, y);
#endif
lnp = win->alines[y];
return _cursesi_addwchar(win, &lnp, &y, &x, wch, 1);
diff -r 651d0eb0bb22 -r 8ad71d9346f6 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c Wed Apr 24 06:37:31 2019 +0000
+++ b/lib/libcurses/refresh.c Wed Apr 24 07:09:44 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.107 2019/03/29 18:32:45 roy Exp $ */
+/* $NetBSD: refresh.c,v 1.108 2019/04/24 07:09:44 blymn 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.107 2019/03/29 18:32:45 roy Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.108 2019/04/24 07:09:44 blymn Exp $");
#endif
#endif /* not lint */
@@ -251,14 +251,19 @@
"_wnoutrefresh: wy %d\tf %d\tl %d\tflags %x\n",
wy, *wlp->firstchp, *wlp->lastchp, wlp->flags);
- if ((dwin->flags & __ISDERWIN) != 0) {
- __CTRACE(__CTRACE_REFRESH,
- "_wnoutrefresh: derwin wy %d\tf %d\tl %d\tflags %x\n",
- dy_off, *dwlp->firstchp, *dwlp->lastchp, dwlp->flags);
- __CTRACE(__CTRACE_REFRESH,
- "_wnoutrefresh: derwin maxx %d\tch_off %d\n",
- dwin->maxx, dwin->ch_off);
- }
+ char *_wintype;
+
+ if ((dwin->flags & __ISDERWIN) != 0)
+ _wintype = "derwin";
+ else
+ _wintype = "dwin";
+
+ __CTRACE(__CTRACE_REFRESH,
+ "_wnoutrefresh: %s wy %d\tf %d\tl %d\tflags %x\n",
+ _wintype, dy_off, *dwlp->firstchp, *dwlp->lastchp, dwlp->flags);
+ __CTRACE(__CTRACE_REFRESH,
+ "_wnoutrefresh: %s maxx %d\tch_off %d\n",
+ _wintype, dwin->maxx, dwin->ch_off);
#endif
if (((wlp->flags & (__ISDIRTY | __ISFORCED)) == 0) &&
((dwlp->flags & (__ISDIRTY | __ISFORCED)) == 0))
diff -r 651d0eb0bb22 -r 8ad71d9346f6 lib/libcurses/touchwin.c
--- a/lib/libcurses/touchwin.c Wed Apr 24 06:37:31 2019 +0000
+++ b/lib/libcurses/touchwin.c Wed Apr 24 07:09:44 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: touchwin.c,v 1.30 2017/01/06 13:53:18 roy Exp $ */
+/* $NetBSD: touchwin.c,v 1.31 2019/04/24 07:09:44 blymn Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)touchwin.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: touchwin.c,v 1.30 2017/01/06 13:53:18 roy Exp $");
+__RCSID("$NetBSD: touchwin.c,v 1.31 2019/04/24 07:09:44 blymn Exp $");
#endif
#endif /* not lint */
@@ -67,6 +67,10 @@
if (line > win->maxy)
return FALSE;
+#ifdef DEBUG
+ __CTRACE(__CTRACE_LINE, "is_linetouched: (%p, line %d, dirty %d)\n",
+ win, line, (win->alines[line]->flags & __ISDIRTY));
+#endif
return (win->alines[line]->flags & __ISDIRTY) != 0;
}
@@ -106,6 +110,10 @@
{
int y, maxy;
+#ifdef DEBUG
+ __CTRACE(__CTRACE_LINE, "is_wintouched: (%p, maxy %d)\n", win,
+ win->maxy);
+#endif
maxy = win->maxy;
for (y = 0; y < maxy; y++) {
if (is_linetouched(win, y) == TRUE)
Home |
Main Index |
Thread Index |
Old Index