Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Fix build break if curses is built without wid...
details: https://anonhg.NetBSD.org/src/rev/5b76b8630cb2
branches: trunk
changeset: 778936:5b76b8630cb2
user: blymn <blymn%NetBSD.org@localhost>
date: Sat Apr 21 11:33:16 2012 +0000
description:
Fix build break if curses is built without wide char support
diffstat:
lib/libcurses/inchstr.c | 8 ++++++--
lib/libcurses/refresh.c | 19 +++++++++++++++----
2 files changed, 21 insertions(+), 6 deletions(-)
diffs (70 lines):
diff -r 6467d76e3ea2 -r 5b76b8630cb2 lib/libcurses/inchstr.c
--- a/lib/libcurses/inchstr.c Sat Apr 21 11:31:59 2012 +0000
+++ b/lib/libcurses/inchstr.c Sat Apr 21 11:33:16 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inchstr.c,v 1.5 2012/04/21 11:31:59 blymn Exp $ */
+/* $NetBSD: inchstr.c,v 1.6 2012/04/21 11:33:16 blymn Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: inchstr.c,v 1.5 2012/04/21 11:31:59 blymn Exp $");
+__RCSID("$NetBSD: inchstr.c,v 1.6 2012/04/21 11:33:16 blymn Exp $");
#endif /* not lint */
#include "curses.h"
@@ -145,7 +145,11 @@
while (start <= end) {
/* or in the attributes but strip out internal flags */
+#ifdef HAVE_WCHAR
*chstr = start->ch | (start->attr & ~__ACS_IS_WACS);
+#else
+ *chstr = start->ch | start->attr;
+#endif
chstr++;
start++;
}
diff -r 6467d76e3ea2 -r 5b76b8630cb2 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c Sat Apr 21 11:31:59 2012 +0000
+++ b/lib/libcurses/refresh.c Sat Apr 21 11:33:16 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.75 2011/10/03 12:32:15 roy Exp $ */
+/* $NetBSD: refresh.c,v 1.76 2012/04/21 11:33:16 blymn Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else
-__RCSID("$NetBSD: refresh.c,v 1.75 2011/10/03 12:32:15 roy Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.76 2012/04/21 11:33:16 blymn Exp $");
#endif
#endif /* not lint */
@@ -849,8 +849,19 @@
#ifdef DEBUG
__CTRACE(__CTRACE_REFRESH,
"makech: have attr %08x, need attr %08x\n",
- curscr->wattr & WA_ATTRIBUTES,
- nsp->attr & WA_ATTRIBUTES);
+ curscr->wattr
+#ifndef HAVE_WCHAR
+ & __ATTRIBUTES
+#else
+ & WA_ATTRIBUTES
+#endif
+ , nsp->attr
+#ifndef HAVE_WCHAR
+ & __ATTRIBUTES
+#else
+ & WA_ATTRIBUTES
+#endif
+ );
#endif
off = (~nsp->attr & curscr->wattr)
Home |
Main Index |
Thread Index |
Old Index