Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: non-ncurses fix
- X-seq: zsh-workers 24089
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: non-ncurses fix
- Date: Mon, 12 Nov 2007 10:22:50 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author