]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots_curses.c
ncurses 6.2 - patch 20210807
[ncurses.git] / test / dots_curses.c
index 4754e98ab2bbac13701fd164bdae3d4318caedc8..95ddb93155c98df3a8f0e715d702bca5facd9074 100644 (file)
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_curses.c,v 1.19 2020/05/10 00:31:59 tom Exp $
+ * $Id: dots_curses.c,v 1.21 2020/08/29 16:22:03 juergen Exp $
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
 #include <test.priv.h>
 
-#if !defined(_WIN32)
+#if !defined(_NC_WINDOWS)
 #include <sys/time.h>
 #endif
 
@@ -206,7 +206,8 @@ main(int argc, char *argv[])
                attron(COLOR_PAIR(mypair(fg, bg)));
            } else {
                set_colors(fg, bg = z);
-               napms(s_option);
+               if (s_option)
+                   napms(s_option);
            }
        } else {
            if (ranf() <= 0.01) {
@@ -215,7 +216,8 @@ main(int argc, char *argv[])
                } else {
                    attroff(A_REVERSE);
                }
-               napms(s_option);
+               if (s_option)
+                   napms(s_option);
            }
        }
        AddCh(p);