]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots_xcurses.c
ncurses 6.2 - patch 20210417
[ncurses.git] / test / dots_xcurses.c
index a2aa8b92661b6a82efd2267c4267fda39f9bd4a1..b640c2b612677224bec116fb965e904f085614a7 100644 (file)
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_xcurses.c,v 1.22 2020/05/10 00:32:33 tom Exp $
+ * $Id: dots_xcurses.c,v 1.24 2020/08/29 16:22:03 juergen Exp $
  *
  * A simple demo of the wide-curses interface used for comparison with termcap.
  */
 #include <test.priv.h>
 
-#if !defined(_WIN32)
+#if !defined(_NC_WINDOWS)
 #include <sys/time.h>
 #endif
 
@@ -244,7 +244,8 @@ main(int argc, char *argv[])
                set_colors(fg = z, bg);
            } else {
                set_colors(fg, bg = z);
-               napms(s_option);
+               if (s_option)
+                   napms(s_option);
            }
        } else {
            if (ranf() <= 0.01) {
@@ -253,7 +254,8 @@ main(int argc, char *argv[])
                } else {
                    attr_off(WA_REVERSE, NULL);
                }
-               napms(s_option);
+               if (s_option)
+                   napms(s_option);
            }
        }
        wch[0] = (wchar_t) p;