Source-Changes-HG archive

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

[src/curses-v3]: src/lib/libcurses Strip attributes from buf.ch.



details:   https://anonhg.NetBSD.org/src/rev/8a2b004bfe3c
branches:  curses-v3
changeset: 479960:8a2b004bfe3c
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Mar 05 23:21:00 2000 +0000

description:
Strip attributes from buf.ch.
Print attributes in hex when debugging.

diffstat:

 lib/libcurses/addch.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r a2450a12f83e -r 8a2b004bfe3c lib/libcurses/addch.c
--- a/lib/libcurses/addch.c     Sun Feb 06 09:21:57 2000 +0000
+++ b/lib/libcurses/addch.c     Sun Mar 05 23:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: addch.c,v 1.9.6.1 2000/01/09 20:43:17 jdc Exp $        */
+/*     $NetBSD: addch.c,v 1.9.6.2 2000/03/05 23:21:00 jdc Exp $        */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)addch.c    8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addch.c,v 1.9.6.1 2000/01/09 20:43:17 jdc Exp $");
+__RCSID("$NetBSD: addch.c,v 1.9.6.2 2000/03/05 23:21:00 jdc Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -56,10 +56,10 @@
 {
        __LDATA buf;
 
-       buf.ch = (wchar_t) ch;
+       buf.ch = (wchar_t) ch & __CHARTEXT;
        buf.attr = (attr_t) ch & __ATTRIBUTES;
 #ifdef DEBUG
-       __CTRACE("addch: %d : %d\n", buf.ch, buf.attr);
+       __CTRACE("addch: %d : 0x%x\n", buf.ch, buf.attr);
 #endif
        return (__waddch(win, &buf));
 }



Home | Main Index | Thread Index | Old Index