summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorblymn <blymn@NetBSD.org>2011-08-07 10:57:10 +0000
committerblymn <blymn@NetBSD.org>2011-08-07 10:57:10 +0000
commit2ed8bfcd5ae9ff2b9ac8773fccb55de24571f2c6 (patch)
treef2d50124bea9434845fcaf230c55c259ac3db02a /lib
parent73f05a1cc87edeefbd7c4272c3ae4e62c172b843 (diff)
Merge the attributes into the returned characters.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcurses/inchstr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libcurses/inchstr.c b/lib/libcurses/inchstr.c
index 00318e509c3..acc3d375ec8 100644
--- a/lib/libcurses/inchstr.c
+++ b/lib/libcurses/inchstr.c
@@ -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 @@ winchnstr(WINDOW *win, chtype *chstr, int n)
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++;
}