X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_mouse.c;h=6422b52e0c1a869e7b0d9281a3f73eef46619885;hp=8705a39ae153d9c9c41889b92a2978e88e0488e0;hb=790a85dbd4a81d5f5d8dd02a44d84f01512ef443;hpb=2db461ea0b1b29c142e3000d830b520c946e385b diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index 8705a39a..6422b52e 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -85,7 +85,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mouse.c,v 1.186 2020/05/02 21:13:04 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.190 2020/05/27 23:55:32 tom Exp $") #include @@ -436,7 +436,7 @@ enable_xterm_mouse(SCREEN *sp, int enable) #if USE_EMX_MOUSE sp->_emxmouse_activated = enable; #else - NCURSES_PUTP2("xterm-mouse", TPARM_1(sp->_mouse_xtermcap, enable)); + NCURSES_PUTP2("xterm-mouse", TIPARM_1(sp->_mouse_xtermcap, enable)); #endif sp->_mouse_active = enable; } @@ -963,16 +963,16 @@ static bool decode_X10_bstate(SCREEN *sp, MEVENT * eventp, unsigned intro) { bool result; - int button; + int button = 0; int wheel = (intro & 96) == 96; eventp->bstate = 0; if (intro >= 96) { if (intro >= 160) { - button = (intro - 152); /* buttons 8-11 */ + button = (int) (intro - 152); /* buttons 8-11 */ } else if (intro >= 96) { - button = (intro - 92); /* buttons 4-7 */ + button = (int) (intro - 92); /* buttons 4-7 */ } } else { button = (intro & 3);