Source-Changes-HG archive

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

[src/curses-v3]: src/lib/libcurses Correctly handle characters with 8th bit s...



details:   https://anonhg.NetBSD.org/src/rev/2c6de44adf91
branches:  curses-v3
changeset: 479955:2c6de44adf91
user:      jdc <jdc%NetBSD.org@localhost>
date:      Thu Jan 13 13:04:19 2000 +0000

description:
Correctly handle characters with 8th bit set in __winwrite().
Add a DEBUG entry.

diffstat:

 lib/libcurses/printw.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r eb90be077c07 -r 2c6de44adf91 lib/libcurses/printw.c
--- a/lib/libcurses/printw.c    Sun Jan 09 21:10:40 2000 +0000
+++ b/lib/libcurses/printw.c    Thu Jan 13 13:04:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: printw.c,v 1.11.6.1 2000/01/09 20:43:21 jdc Exp $      */
+/*     $NetBSD: printw.c,v 1.11.6.2 2000/01/13 13:04:19 jdc Exp $      */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)printw.c   8.3 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: printw.c,v 1.11.6.1 2000/01/09 20:43:21 jdc Exp $");
+__RCSID("$NetBSD: printw.c,v 1.11.6.2 2000/01/13 13:04:19 jdc Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -180,8 +180,13 @@
        int     c;
 
        for (c = n, win = cookie; --c >= 0;)
-               if (waddch(win, (chtype) *buf++) == ERR)
+       {
+#ifdef DEBUG
+               __CTRACE("__winwrite: %c\n", *buf);
+#endif
+               if (waddch(win, (chtype) (*buf++ & __CHARTEXT)) == ERR)
                        return (-1);
+       }
        return (n);
 }
 /*



Home | Main Index | Thread Index | Old Index