]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/ncurses.c
ncurses 6.1 - patch 20180929
[ncurses.git] / test / ncurses.c
index ff46265f43cbdb43c8f2dbcbc844b936ed8dd7af..c9367296ace95f6ea3be339a00aa3f44ae2803fa 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.506 2018/05/12 16:00:22 tom Exp $
+$Id: ncurses.c,v 1.508 2018/09/22 21:21:43 tom Exp $
 
 ***************************************************************************/
 
@@ -488,7 +488,7 @@ ShellOut(bool message)
        addstr("Shelling out...");
     def_prog_mode();
     endwin();
-#ifdef __MINGW32__
+#ifdef _WIN32
     system("cmd.exe");
 #else
     IGNORE_RC(system("sh"));
@@ -7619,7 +7619,7 @@ usage(void)
 #if USE_LIBPANEL
        ,"  -s msec  specify nominal time for panel-demo (default: 1, to hold)"
 #endif
-#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(__MINGW32__)
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32)
        ,"  -T       call use_tioctl(TRUE) to allow SIGWINCH to override environment"
 #endif
 #ifdef TRACE
@@ -7775,6 +7775,10 @@ main_menu(bool top)
            if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
                if (command == 0)
                    command = 'q';
+               if (errno == EINTR) {
+                   clearerr(stdin);
+                   continue;
+               }
                break;
            } else if (command == 0 && !isspace(UChar(ch))) {
                command = ch;
@@ -7908,7 +7912,7 @@ main(int argc, char *argv[])
            nap_msec = (int) atol(optarg);
            break;
 #endif
-#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(__MINGW32__)
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714) && !defined(_WIN32)
        case 'T':
            use_tioctl(TRUE);
            break;