]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/test_mouse.c
ncurses 6.3 - patch 20221112
[ncurses.git] / test / test_mouse.c
index c898080a9e63e43e5bad0db8d8a6a27a3a689cba..1348877f667a5c81180f3156e399f11e31439cc2 100644 (file)
@@ -22,7 +22,7 @@
  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
  ****************************************************************************/
 /*
- * $Id: test_mouse.c,v 1.20 2022/07/16 18:52:09 tom Exp $
+ * $Id: test_mouse.c,v 1.23 2022/08/20 18:12:16 tom Exp $
  *
  * Author: Leonid S Usov
  *
@@ -47,11 +47,11 @@ raw_loop(void)
     cfmakeraw(&tty);
 #else
     tty = old;
-    tty.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
-                    | INLCR | IGNCR | ICRNL | IXON);
-    tty.c_oflag &= ~OPOST;
-    tty.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
-    tty.c_cflag &= ~(CSIZE | PARENB);
+    tty.c_iflag &= (unsigned) (~(IGNBRK | BRKINT | PARMRK | ISTRIP
+                                | INLCR | IGNCR | ICRNL | IXON));
+    tty.c_oflag &= (unsigned) (~OPOST);
+    tty.c_lflag &= (unsigned) (~(ECHO | ECHONL | ICANON | ISIG | IEXTEN));
+    tty.c_cflag &= (unsigned) (~(CSIZE | PARENB));
     tty.c_cflag |= CS8;
     tcsetattr(0, TCSANOW, &tty);
 #endif
@@ -97,11 +97,13 @@ static void
 logw(const char *fmt, ...)
 {
     int row = getcury(stdscr);
-
     va_list args;
+
     va_start(args, fmt);
     wmove(stdscr, row++, 0);
     vw_printw(stdscr, fmt, args);
+    va_end(args);
+
     clrtoeol();
 
     row %= (getmaxy(stdscr) - logoffset);
@@ -121,7 +123,7 @@ usage(void)
     {
        "Usage: test_mouse [options]",
        "",
-       "Test mouse events.  These examples for $TERM demonstrate xterm"
+       "Test mouse events.  These examples for $TERM demonstrate xterm",
        "features:",
        "    xterm",
        "    xterm-1002",