Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Add more debug so a call to waddbytes can be t...
details: https://anonhg.NetBSD.org/src/rev/eafd0efa53eb
branches: trunk
changeset: 372699:eafd0efa53eb
user: blymn <blymn%NetBSD.org@localhost>
date: Wed Dec 21 06:18:01 2022 +0000
description:
Add more debug so a call to waddbytes can be traced to the caller.
diffstat:
lib/libcurses/addnstr.c | 22 ++++++++++++++++++++--
lib/libcurses/printw.c | 6 ++++--
2 files changed, 24 insertions(+), 4 deletions(-)
diffs (112 lines):
diff -r dd212835edb6 -r eafd0efa53eb lib/libcurses/addnstr.c
--- a/lib/libcurses/addnstr.c Wed Dec 21 05:19:15 2022 +0000
+++ b/lib/libcurses/addnstr.c Wed Dec 21 06:18:01 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: addnstr.c,v 1.20 2021/10/19 06:41:03 blymn Exp $ */
+/* $NetBSD: addnstr.c,v 1.21 2022/12/21 06:18:01 blymn Exp $ */
/*
* Copyright (c) 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)addnstr.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: addnstr.c,v 1.20 2021/10/19 06:41:03 blymn Exp $");
+__RCSID("$NetBSD: addnstr.c,v 1.21 2022/12/21 06:18:01 blymn Exp $");
#endif
#endif /* not lint */
@@ -52,6 +52,8 @@
int
addstr(const char *s)
{
+ __CTRACE(__CTRACE_INPUT, "addstr: %s\n", s);
+
return waddnstr(stdscr, s, -1);
}
@@ -62,6 +64,8 @@
int
waddstr(WINDOW *win, const char *s)
{
+ __CTRACE(__CTRACE_INPUT, "addstr: win %p, sttring: %s\n", win, s);
+
return waddnstr(win, s, -1);
}
@@ -73,6 +77,8 @@
int
addnstr(const char *str, int n)
{
+ __CTRACE(__CTRACE_INPUT, "addnstr: n: %d, string: %s\n", n, str);
+
return waddnstr(stdscr, str, n);
}
@@ -83,6 +89,9 @@
int
mvaddstr(int y, int x, const char *str)
{
+ __CTRACE(__CTRACE_INPUT, "mvaddnstr: y: %d, x: %d, string: %s\n", y,
+ x, str);
+
return mvwaddnstr(stdscr, y, x, str, -1);
}
@@ -93,6 +102,9 @@
int
mvwaddstr(WINDOW *win, int y, int x, const char *str)
{
+ __CTRACE(__CTRACE_INPUT, "mvwaddnstr: win: %p, y: %d, x: %d, string: %s\n",
+ win, y, x, str);
+
return mvwaddnstr(win, y, x, str, -1);
}
@@ -104,6 +116,9 @@
int
mvaddnstr(int y, int x, const char *str, int count)
{
+ __CTRACE(__CTRACE_INPUT, "mvaddnstr: n: %d, y: %d, x: %d, string: %s\n",
+ count, y, x, str);
+
return mvwaddnstr(stdscr, y, x, str, count);
}
@@ -115,6 +130,9 @@
int
mvwaddnstr(WINDOW *win, int y, int x, const char *str, int count)
{
+ __CTRACE(__CTRACE_INPUT, "mvwaddnstr: win: %p, n: %d, y: %d, x: %d, string: %s\n",
+ win, count, y, x, str);
+
if (wmove(win, y, x) == ERR)
return ERR;
diff -r dd212835edb6 -r eafd0efa53eb lib/libcurses/printw.c
--- a/lib/libcurses/printw.c Wed Dec 21 05:19:15 2022 +0000
+++ b/lib/libcurses/printw.c Wed Dec 21 06:18:01 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: printw.c,v 1.29 2019/06/09 07:40:14 blymn Exp $ */
+/* $NetBSD: printw.c,v 1.30 2022/12/21 06:18:01 blymn Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)printw.c 8.3 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: printw.c,v 1.29 2019/06/09 07:40:14 blymn Exp $");
+__RCSID("$NetBSD: printw.c,v 1.30 2022/12/21 06:18:01 blymn Exp $");
#endif
#endif /* not lint */
@@ -120,6 +120,8 @@
{
int n;
+ __CTRACE(__CTRACE_INPUT, "vw_printw: win %p\n", win);
+
if (win->fp == NULL) {
win->fp = open_memstream(&win->buf, &win->buflen);
if (__predict_false(win->fp == NULL))
Home |
Main Index |
Thread Index |
Old Index