use __cputchar(), not putchar().

otherwise, __CTRACE() will not be useful for debugging curses internals.
This commit is contained in:
itojun 2000-08-01 04:17:09 +00:00
parent ead5ad8885
commit 67175858ec
3 changed files with 18 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cr_put.c,v 1.18 2000/05/19 01:05:43 mycroft Exp $ */ /* $NetBSD: cr_put.c,v 1.19 2000/08/01 04:17:09 itojun Exp $ */
/* /*
* Copyright (c) 1981, 1993, 1994 * Copyright (c) 1981, 1993, 1994
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)cr_put.c 8.3 (Berkeley) 5/4/94"; static char sccsid[] = "@(#)cr_put.c 8.3 (Berkeley) 5/4/94";
#else #else
__RCSID("$NetBSD: cr_put.c,v 1.18 2000/05/19 01:05:43 mycroft Exp $"); __RCSID("$NetBSD: cr_put.c,v 1.19 2000/08/01 04:17:09 itojun Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -113,12 +113,12 @@ fgoto(in_refresh)
if (CR) if (CR)
tputs(CR, 0, __cputchar); tputs(CR, 0, __cputchar);
else else
putchar('\r'); __cputchar('\r');
} }
if (NL) if (NL)
tputs(NL, 0, __cputchar); tputs(NL, 0, __cputchar);
else else
putchar('\n'); __cputchar('\n');
l--; l--;
} }
outcol = 0; outcol = 0;
@ -158,7 +158,7 @@ fgoto(in_refresh)
if (NL /* && !XB */ && __pfast) if (NL /* && !XB */ && __pfast)
tputs(NL, 0, __cputchar); tputs(NL, 0, __cputchar);
else else
putchar('\n'); __cputchar('\n');
l--; l--;
if (__pfast == 0) if (__pfast == 0)
outcol = 0; outcol = 0;
@ -198,7 +198,7 @@ plodput(c)
if (plodflg) if (plodflg)
--plodcnt; --plodcnt;
else else
putchar(c); __cputchar(c);
return (0); return (0);
} }
@ -400,7 +400,7 @@ dontcr:while (outline < destline) {
& __CHARTEXT; & __CHARTEXT;
if (curscr->lines[outline]->line[outcol].attr if (curscr->lines[outline]->line[outcol].attr
== curscr->wattr) == curscr->wattr)
putchar(i); __cputchar(i);
else else
goto nondes; goto nondes;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: refresh.c,v 1.38 2000/07/03 03:56:20 matt Exp $ */ /* $NetBSD: refresh.c,v 1.39 2000/08/01 04:17:09 itojun Exp $ */
/* /*
* Copyright (c) 1981, 1993, 1994 * Copyright (c) 1981, 1993, 1994
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94"; static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else #else
__RCSID("$NetBSD: refresh.c,v 1.38 2000/07/03 03:56:20 matt Exp $"); __RCSID("$NetBSD: refresh.c,v 1.39 2000/08/01 04:17:09 itojun Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -254,7 +254,7 @@ doupdate(void)
} }
if (!CA) { if (!CA) {
if (win->curx != 0) if (win->curx != 0)
putchar('\n'); __cputchar('\n');
if (!curwin) if (!curwin)
werase(curscr); werase(curscr);
} }
@ -617,11 +617,11 @@ makech(wy)
if (!(win->flags & __SCROLLWIN)) { if (!(win->flags & __SCROLLWIN)) {
if (!curwin) { if (!curwin) {
csp->attr = nsp->attr; csp->attr = nsp->attr;
putchar((int) __cputchar((int)
(csp->ch = (csp->ch =
nsp->ch)); nsp->ch));
} else } else
putchar((int) nsp->ch); __cputchar((int) nsp->ch);
} }
if (wx < curscr->maxx) { if (wx < curscr->maxx) {
domvcur(ly, wx, domvcur(ly, wx,
@ -636,17 +636,17 @@ makech(wy)
!(win->flags & __SCROLLWIN)) { !(win->flags & __SCROLLWIN)) {
if (!curwin) { if (!curwin) {
csp->attr = nsp->attr; csp->attr = nsp->attr;
putchar((int) (csp->ch = nsp->ch)); __cputchar((int) (csp->ch = nsp->ch));
csp++; csp++;
} else } else
putchar((int) nsp->ch); __cputchar((int) nsp->ch);
} }
#ifdef DEBUG #ifdef DEBUG
__CTRACE("makech: putchar(%c)\n", nsp->ch & 0177); __CTRACE("makech: putchar(%c)\n", nsp->ch & 0177);
#endif #endif
if (UC && ((nsp->attr & __STANDOUT) || if (UC && ((nsp->attr & __STANDOUT) ||
(nsp->attr & __UNDERSCORE))) { (nsp->attr & __UNDERSCORE))) {
putchar('\b'); __cputchar('\b');
tputs(UC, 0, __cputchar); tputs(UC, 0, __cputchar);
} }
nsp++; nsp++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: scroll.c,v 1.12 2000/04/15 13:17:04 blymn Exp $ */ /* $NetBSD: scroll.c,v 1.13 2000/08/01 04:17:10 itojun Exp $ */
/* /*
* Copyright (c) 1981, 1993, 1994 * Copyright (c) 1981, 1993, 1994
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94"; static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94";
#else #else
__RCSID("$NetBSD: scroll.c,v 1.12 2000/04/15 13:17:04 blymn Exp $"); __RCSID("$NetBSD: scroll.c,v 1.13 2000/08/01 04:17:10 itojun Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -93,7 +93,7 @@ wscrl(WINDOW *win, int lines)
wmove(win, oy, ox); wmove(win, oy, ox);
if (win == curscr) { if (win == curscr) {
putchar('\n'); __cputchar('\n');
if (!NONL) if (!NONL)
win->curx = 0; win->curx = 0;
#ifdef DEBUG #ifdef DEBUG