Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Merge the attributes into the returned charact...



details:   https://anonhg.NetBSD.org/src/rev/85e52e8f9d46
branches:  trunk
changeset: 768054:85e52e8f9d46
user:      blymn <blymn%NetBSD.org@localhost>
date:      Sun Aug 07 10:57:10 2011 +0000

description:
Merge the attributes into the returned characters.

diffstat:

 lib/libcurses/inchstr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7dc679847f16 -r 85e52e8f9d46 lib/libcurses/inchstr.c
--- a/lib/libcurses/inchstr.c   Sun Aug 07 10:55:59 2011 +0000
+++ b/lib/libcurses/inchstr.c   Sun Aug 07 10:57:10 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inchstr.c,v 1.3 2009/07/22 16:57:14 roy Exp $  */
+/*     $NetBSD: inchstr.c,v 1.4 2011/08/07 10:57:10 blymn Exp $        */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: inchstr.c,v 1.3 2009/07/22 16:57:14 roy Exp $");
+__RCSID("$NetBSD: inchstr.c,v 1.4 2011/08/07 10:57:10 blymn Exp $");
 #endif                         /* not lint */
 
 #include "curses.h"
@@ -144,7 +144,8 @@
        end = &win->alines[win->cury]->line[epos];
 
        while (start <= end) {
-               *chstr = start->ch;
+               /* or in the attributes but strip out internal flags */
+               *chstr = start->ch | (start->attr & ~__ACS_IS_WACS);
                chstr++;
                start++;
        }



Home | Main Index | Thread Index | Old Index