#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.162 2014/10/12 00:03:37 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.165 2014/11/01 12:27:59 tom Exp $")
#include <tic.h>
#if USE_GPM_SUPPORT
static bool
-allow_gpm_mouse(SCREEN *sp)
+allow_gpm_mouse(SCREEN *sp GCC_UNUSED)
{
bool result = FALSE;
#endif
/* GPM does printf's without checking if stdout is a terminal */
if (NC_ISATTY(fileno(stdout))) {
- char *list = getenv("NCURSES_GPM_TERMS");
- char *env = getenv("TERM");
+ const char *list = getenv("NCURSES_GPM_TERMS");
+ const char *env = getenv("TERM");
if (list != 0) {
if (env != 0) {
result = _nc_name_match(list, env, "|:");
int rc;
if (!sp->_emxmouse_buttons[0]) {
- char *s = getenv("MOUSE_BUTTONS_123");
+ const char *s = getenv("MOUSE_BUTTONS_123");
sp->_emxmouse_buttons[0] = 1;
if (s && strlen(s) >= 3) {
kbuf + grabbed, 1);
if (res == -1)
break;
- grabbed += res;
+ grabbed += (size_t) res;
if (grabbed > 1) {
size_t check = 1;
int n;
for (n = 0; n < 2; ++n) {
if (check >= grabbed)
break;
- rc = _nc_conv_to_utf32(&coords[n], kbuf + check, grabbed - check);
+ rc = _nc_conv_to_utf32(&coords[n], kbuf + check, (unsigned)
+ (grabbed - check));
if (!rc)
break;
- check += rc;
+ check += (size_t) rc;
}
if (n >= 2)
break;
result = decode_X10_bstate(sp, eventp, UChar(kbuf[0]));
- eventp->x = (coords[0] - ' ') - 1;
- eventp->y = (coords[1] - ' ') - 1;
+ eventp->x = (int) (coords[0] - ' ') - 1;
+ eventp->y = (int) (coords[1] - ' ') - 1;
return result;
}