X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_mouse.c;h=b6c888c1708ac0ae49fea3d73a1369863cef18d5;hp=72a99ce7922de9b071f471b77c383df5560411c0;hb=45766a7ed44677f18ccf230f9bd720862d7c69c8;hpb=def73dda3feef55f48cc205a763c06ba1ea70e78 diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index 72a99ce7..b6c888c1 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -84,7 +84,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mouse.c,v 1.167 2015/10/17 22:08:05 KO.Myung-Hun Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.168 2015/10/31 20:47:41 tom Exp $") #include @@ -641,13 +641,14 @@ initialize_mousetype(SCREEN *sp) #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);