* PATCH: non-ncurses fix
@ 2007-11-12 10:22 Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2007-11-12 10:22 UTC (permalink / raw)
To: Zsh hackers list
After playing with Solaris...
Index: Src/Modules/curses.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/curses.c,v
retrieving revision 1.39
diff -u -r1.39 curses.c
--- Src/Modules/curses.c 12 Nov 2007 09:43:56 -0000 1.39
+++ Src/Modules/curses.c 12 Nov 2007 10:21:48 -0000
@@ -94,7 +94,13 @@
static struct ttyinfo curses_tty_state;
static LinkList zcurses_windows;
static HashTable zcurses_colorpairs = NULL;
+#ifdef NCURSES_MOUSE_VERSION
+/*
+ * The following is in principle a general set of flags, but
+ * is currently only needed for mouse status.
+ */
static int zcurses_flags;
+#endif
#define ZCURSES_EINVALID 1
#define ZCURSES_EDEFINED 2
@@ -1331,14 +1337,14 @@
Colorpairnode cpn;
const struct zcurses_namenumberpair *zattrp;
LinkList clist;
- attr_t attrs;
#if defined(HAVE_WIN_WCH) && defined(HAVE_GETCCHAR)
+ attr_t attrs;
wchar_t c;
cchar_t cc;
int count;
VARARR(char, instr, 2*MB_CUR_MAX+1);
#else
- chtype inc;
+ chtype inc, attrs;
char instr[3];
#endif
@@ -1376,11 +1382,7 @@
instr[0] = STOUC(inc);
instr[1] = '\0';
}
- /*
- * I'm guessing this is OK... header says attr_t must be at
- * least as wide as chtype.
- */
- attrs = (attr_t)inc;
+ attrs = inc;
#endif
/*
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-12 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-12 10:22 PATCH: non-ncurses fix Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).