Module Name:    src
Committed By:   blymn
Date:           Sun Aug  7 10:57:10 UTC 2011

Modified Files:
        src/lib/libcurses: inchstr.c

Log Message:
Merge the attributes into the returned characters.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libcurses/inchstr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/inchstr.c
diff -u src/lib/libcurses/inchstr.c:1.3 src/lib/libcurses/inchstr.c:1.4
--- src/lib/libcurses/inchstr.c:1.3	Wed Jul 22 16:57:14 2009
+++ src/lib/libcurses/inchstr.c	Sun Aug  7 10:57:10 2011
@@ -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++;
 	}

Reply via email to