Add some more debugging information.

This commit is contained in:
jdc 2006-08-23 19:23:55 +00:00
parent ed312f0773
commit 52ef6583f9
3 changed files with 31 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: touchwin.c,v 1.21 2006/01/01 11:48:31 jdc Exp $ */
/* $NetBSD: touchwin.c,v 1.22 2006/08/23 19:23:55 jdc 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.21 2006/01/01 11:48:31 jdc Exp $");
__RCSID("$NetBSD: touchwin.c,v 1.22 2006/08/23 19:23:55 jdc Exp $");
#endif
#endif /* not lint */
@ -62,6 +62,9 @@ is_linetouched(WINDOW *win, int line)
int
touchline(WINDOW *win, int start, int count)
{
#ifdef DEBUG
__CTRACE("touchline: (%p, %d, %d)\n", win, start, count);
#endif
return wtouchln(win, start, count, 1);
}
@ -129,6 +132,9 @@ redrawwin(WINDOW *win)
int
untouchwin(WINDOW *win)
{
#ifdef DEBUG
__CTRACE("untouchwin: (%p)\n", win);
#endif
return wtouchln(win, 0, win->maxy, 0);
}
@ -165,7 +171,6 @@ wtouchln(WINDOW *win, int line, int n, int changed)
return OK;
}
int
__touchwin(WINDOW *win)
@ -173,7 +178,7 @@ __touchwin(WINDOW *win)
int y, maxy;
#ifdef DEBUG
__CTRACE("touchwin: (%p)\n", win);
__CTRACE("__touchwin: (%p)\n", win);
#endif
maxy = win->maxy;
for (y = 0; y < maxy; y++)
@ -185,8 +190,8 @@ int
__touchline(WINDOW *win, int y, int sx, int ex)
{
#ifdef DEBUG
__CTRACE("touchline: (%p, %d, %d, %d)\n", win, y, sx, ex);
__CTRACE("touchline: first = %d, last = %d\n",
__CTRACE("__touchline: (%p, %d, %d, %d)\n", win, y, sx, ex);
__CTRACE("__touchline: first = %d, last = %d\n",
*win->lines[y]->firstchp, *win->lines[y]->lastchp);
#endif
sx += win->ch_off;
@ -199,7 +204,7 @@ __touchline(WINDOW *win, int y, int sx, int ex)
if (*win->lines[y]->lastchp < ex)
*win->lines[y]->lastchp = ex;
#ifdef DEBUG
__CTRACE("touchline: first = %d, last = %d\n",
__CTRACE("__touchline: first = %d, last = %d\n",
*win->lines[y]->firstchp, *win->lines[y]->lastchp);
#endif
return (OK);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tstp.c,v 1.32 2004/03/25 07:35:40 jdc Exp $ */
/* $NetBSD: tstp.c,v 1.33 2006/08/23 19:23:55 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tstp.c 8.3 (Berkeley) 5/4/94";
#else
__RCSID("$NetBSD: tstp.c,v 1.32 2004/03/25 07:35:40 jdc Exp $");
__RCSID("$NetBSD: tstp.c,v 1.33 2006/08/23 19:23:55 jdc Exp $");
#endif
#endif /* not lint */
@ -168,6 +168,10 @@ __set_winchhandler(void)
sigemptyset(&sa.sa_mask);
sigaction(SIGWINCH, &sa, &owsa);
winch_set = 1;
#ifdef DEBUG
__CTRACE("__set_winchhandler: owsa.sa_handler=%p\n",
owsa.sa_handler);
#endif
}
}
@ -192,6 +196,9 @@ __restore_winchhandler(void)
int
__stopwin(void)
{
#ifdef DEBUG
__CTRACE("__stopwin\n");
#endif
if (_cursesi_screen->endwin)
return OK;
@ -204,7 +211,8 @@ __stopwin(void)
if (curscr != NULL) {
__unsetattr(0);
__mvcur((int) curscr->cury, (int) curscr->curx, (int) curscr->maxy - 1, 0, 0);
__mvcur((int) curscr->cury, (int) curscr->curx,
(int) curscr->maxy - 1, 0, 0);
}
if (__tc_mo != NULL)
@ -230,6 +238,9 @@ __restartwin(void)
{
struct winsize win;
#ifdef DEBUG
__CTRACE("__restartwin\n");
#endif
if (!_cursesi_screen->endwin)
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tty.c,v 1.37 2006/07/25 21:45:00 christos Exp $ */
/* $NetBSD: tty.c,v 1.38 2006/08/23 19:23:55 jdc Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95";
#else
__RCSID("$NetBSD: tty.c,v 1.37 2006/07/25 21:45:00 christos Exp $");
__RCSID("$NetBSD: tty.c,v 1.38 2006/08/23 19:23:55 jdc Exp $");
#endif
#endif /* not lint */
@ -563,6 +563,9 @@ __startwin(SCREEN *screen)
int
endwin(void)
{
#ifdef DEBUG
__CTRACE("endwin\n");
#endif
return __stopwin();
}