]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/worm.c
ncurses 5.7 - patch 20100417
[ncurses.git] / test / worm.c
index 2029b34f9e3cefdd00d0c3d4a03ef3b88baf103a..0bcd8d3dddc8e2c86f0cfa406a9972f57bb8dd75 100644 (file)
@@ -61,7 +61,7 @@ Options:
   traces will be dumped.  The program stops and waits for one character of
   input at the beginning and end of the interval.
 
   traces will be dumped.  The program stops and waits for one character of
   input at the beginning and end of the interval.
 
-  $Id: worm.c,v 1.58 2008/10/04 21:54:09 tom Exp $
+  $Id: worm.c,v 1.59 2008/11/16 00:19:59 juergen Exp $
 */
 
 #include <test.priv.h>
 */
 
 #include <test.priv.h>
@@ -330,7 +330,11 @@ start_worm(void *arg)
     while (!quit_worm(((struct worm *) arg) - worm)) {
        while (compare < sequence) {
            ++compare;
     while (!quit_worm(((struct worm *) arg) - worm)) {
        while (compare < sequence) {
            ++compare;
+#if HAVE_USE_WINDOW
            use_window(stdscr, draw_worm, arg);
            use_window(stdscr, draw_worm, arg);
+#else
+           draw_worm(stdscr, arg);
+#endif
        }
     }
     Trace(("...start_worm (done)"));
        }
     }
     Trace(("...start_worm (done)"));
@@ -356,7 +360,13 @@ draw_all_worms(void)
     }
 #else
     for (n = 0, w = &worm[0]; n < number; n++, w++) {
     }
 #else
     for (n = 0, w = &worm[0]; n < number; n++, w++) {
-       if (USING_WINDOW2(stdscr, draw_worm, w))
+       if (
+#if HAVE_USE_WINDOW
+              USING_WINDOW2(stdscr, draw_worm, w)
+#else
+              draw_worm(stdscr, w)
+#endif
+           )
            done = TRUE;
     }
 #endif
            done = TRUE;
     }
 #endif