#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.166 2015/07/05 00:28:27 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.168 2015/10/31 20:47:41 tom Exp $")
#include <tic.h>
#if USE_SYSMOUSE
{
+ static char dev_tty[] = "/dev/tty";
struct mouse_info the_mouse;
char *the_device = 0;
if (NC_ISATTY(sp->_ifd))
the_device = ttyname(sp->_ifd);
if (the_device == 0)
- the_device = "/dev/tty";
+ the_device = dev_tty;
sp->_mouse_fd = open(the_device, O_RDWR);
do { \
eventp->bstate = MASK_PRESS(n); \
sp->_mouse_bstate |= MASK_PRESS(n); \
- if (kbuf[0] & 0x40) { \
+ if (button & 0x40) { \
eventp->bstate = MASK_RELEASE(n); \
sp->_mouse_bstate &= ~MASK_PRESS(n); \
} \