]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/ncurses.c
ncurses 6.1 - patch 20180623
[ncurses.git] / test / ncurses.c
index 86a842c30407e63ba3e1e9e692b6b290c7fee938..9c7516896cf1b0e4fa476bec8e47620068e9ebb3 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -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.504 2017/11/24 20:51:18 tom Exp $
+$Id: ncurses.c,v 1.507 2018/06/23 21:35:06 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"));
@@ -7170,9 +7170,12 @@ overlap_test(bool recur GCC_UNUSED)
     int shift = 0, last_refresh = -1;
     int state, flavor[OVERLAP_FLAVORS];
 
-    if ((win1 = make_overlap(0)) == 0
-       || (win2 = make_overlap(1)) == 0)
+    if ((win1 = make_overlap(0)) == 0) {
        return ERR;
+    } else if ((win2 = make_overlap(1)) == 0) {
+       delwin(win1);
+       return ERR;
+    }
 
     curs_set(0);
     raw();
@@ -7367,9 +7370,12 @@ x_overlap_test(bool recur GCC_UNUSED)
     int shift = 0, last_refresh = -1;
     int state, flavor[OVERLAP_FLAVORS];
 
-    if ((win1 = make_overlap(0)) == 0
-       || (win2 = make_overlap(1)) == 0)
+    if ((win1 = make_overlap(0)) == 0) {
        return ERR;
+    } else if ((win2 = make_overlap(1)) == 0) {
+       delwin(win1);
+       return ERR;
+    }
 
     curs_set(0);
     raw();
@@ -7613,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
@@ -7902,7 +7908,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;