/****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.165 2014/11/01 12:27:59 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); \
} \
int b = data.params[0];
int b3 = 1 + (b & 3);
- result = TRUE;
eventp->id = NORMAL_EVENT;
if (data.final == 'M') {
(void) handle_wheel(sp, eventp, b, (b & 64) == 64);