Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses use __cputchar(), not putchar().



details:   https://anonhg.NetBSD.org/src/rev/db2eddccd580
branches:  trunk
changeset: 495594:db2eddccd580
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Aug 01 04:17:09 2000 +0000

description:
use __cputchar(), not putchar().
otherwise, __CTRACE() will not be useful for debugging curses internals.

diffstat:

 lib/libcurses/cr_put.c  |  14 +++++++-------
 lib/libcurses/refresh.c |  16 ++++++++--------
 lib/libcurses/scroll.c  |   6 +++---
 3 files changed, 18 insertions(+), 18 deletions(-)

diffs (149 lines):

diff -r bccd9a8738b6 -r db2eddccd580 lib/libcurses/cr_put.c
--- a/lib/libcurses/cr_put.c    Tue Aug 01 03:46:09 2000 +0000
+++ b/lib/libcurses/cr_put.c    Tue Aug 01 04:17:09 2000 +0000
@@ -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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)cr_put.c   8.3 (Berkeley) 5/4/94";
 #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                         /* not lint */
 
@@ -113,12 +113,12 @@
                                        if (CR)
                                                tputs(CR, 0, __cputchar);
                                        else
-                                               putchar('\r');
+                                               __cputchar('\r');
                                }
                                if (NL)
                                        tputs(NL, 0, __cputchar);
                                else
-                                       putchar('\n');
+                                       __cputchar('\n');
                                l--;
                        }
                        outcol = 0;
@@ -158,7 +158,7 @@
                        if (NL /* && !XB */ && __pfast)
                                tputs(NL, 0, __cputchar);
                        else
-                               putchar('\n');
+                               __cputchar('\n');
                        l--;
                        if (__pfast == 0)
                                outcol = 0;
@@ -198,7 +198,7 @@
        if (plodflg)
                --plodcnt;
        else
-               putchar(c);
+               __cputchar(c);
        return (0);
 }
 
@@ -400,7 +400,7 @@
                                    & __CHARTEXT;
                                if (curscr->lines[outline]->line[outcol].attr
                                    == curscr->wattr)
-                                       putchar(i);
+                                       __cputchar(i);
                                else
                                        goto nondes;
                        }
diff -r bccd9a8738b6 -r db2eddccd580 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c   Tue Aug 01 03:46:09 2000 +0000
+++ b/lib/libcurses/refresh.c   Tue Aug 01 04:17:09 2000 +0000
@@ -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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)refresh.c  8.7 (Berkeley) 8/13/94";
 #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                         /* not lint */
 
@@ -254,7 +254,7 @@
        }
        if (!CA) {
                if (win->curx != 0)
-                       putchar('\n');
+                       __cputchar('\n');
                if (!curwin)
                        werase(curscr);
        }
@@ -617,11 +617,11 @@
                                        if (!(win->flags & __SCROLLWIN)) {
                                                if (!curwin) {
                                                        csp->attr = nsp->attr;
-                                                       putchar((int)
+                                                       __cputchar((int)
                                                            (csp->ch =
                                                            nsp->ch));
                                                } else
-                                                       putchar((int) nsp->ch);
+                                                       __cputchar((int) nsp->ch);
                                        }
                                        if (wx < curscr->maxx) {
                                                domvcur(ly, wx,
@@ -636,17 +636,17 @@
                            !(win->flags & __SCROLLWIN)) {
                                if (!curwin) {
                                        csp->attr = nsp->attr;
-                                       putchar((int) (csp->ch = nsp->ch));
+                                       __cputchar((int) (csp->ch = nsp->ch));
                                        csp++;
                                } else
-                                       putchar((int) nsp->ch);
+                                       __cputchar((int) nsp->ch);
                        }
 #ifdef DEBUG
                        __CTRACE("makech: putchar(%c)\n", nsp->ch & 0177);
 #endif
                        if (UC && ((nsp->attr & __STANDOUT) ||
                            (nsp->attr & __UNDERSCORE))) {
-                               putchar('\b');
+                               __cputchar('\b');
                                tputs(UC, 0, __cputchar);
                        }
                        nsp++;
diff -r bccd9a8738b6 -r db2eddccd580 lib/libcurses/scroll.c
--- a/lib/libcurses/scroll.c    Tue Aug 01 03:46:09 2000 +0000
+++ b/lib/libcurses/scroll.c    Tue Aug 01 04:17:09 2000 +0000
@@ -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
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)scroll.c   8.3 (Berkeley) 5/4/94";
 #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                         /* not lint */
 
@@ -93,7 +93,7 @@
        wmove(win, oy, ox);
 
        if (win == curscr) {
-               putchar('\n');
+               __cputchar('\n');
                if (!NONL)
                        win->curx = 0;
 #ifdef DEBUG



Home | Main Index | Thread Index | Old Index