]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots.c
ncurses 5.7 - patch 20101113
[ncurses.git] / test / dots.c
index 1fdcff95e101de85835ad7b067c054af2bba5cf2..2533c7e3b49d237f1385ab10b569d7042692926a 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1999
  *
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1999
  *
- * $Id: dots.c,v 1.20 2010/05/01 22:04:08 tom Exp $
+ * $Id: dots.c,v 1.22 2010/11/14 01:00:02 tom Exp $
  *
  * A simple demo of the terminfo interface.
  */
  *
  * A simple demo of the terminfo interface.
  */
@@ -82,7 +82,7 @@ cleanup(void)
 
     printf("\n\n%ld total chars, rate %.2f/sec\n",
           total_chars,
 
     printf("\n\n%ld total chars, rate %.2f/sec\n",
           total_chars,
-          ((double) (total_chars) / (time((time_t *) 0) - started)));
+          ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
 }
 
 static void
 }
 
 static void
@@ -91,21 +91,20 @@ onsig(int n GCC_UNUSED)
     interrupted = TRUE;
 }
 
     interrupted = TRUE;
 }
 
-static float
+static double
 ranf(void)
 {
     long r = (rand() & 077777);
 ranf(void)
 {
     long r = (rand() & 077777);
-    return ((float) r / 32768.);
+    return ((double) r / 32768.);
 }
 
 int
 }
 
 int
-main(
-       int argc GCC_UNUSED,
-       char *argv[]GCC_UNUSED)
+main(int argc GCC_UNUSED,
+     char *argv[]GCC_UNUSED)
 {
     int x, y, z, p;
 {
     int x, y, z, p;
-    float r;
-    float c;
+    double r;
+    double c;
 
     CATCHALL(onsig);
 
 
     CATCHALL(onsig);
 
@@ -120,8 +119,8 @@ main(
            max_colors = -1;
     }
 
            max_colors = -1;
     }
 
-    r = (float) (lines - 4);
-    c = (float) (columns - 4);
+    r = (double) (lines - 4);
+    c = (double) (columns - 4);
     started = time((time_t *) 0);
 
     while (!interrupted) {
     started = time((time_t *) 0);
 
     while (!interrupted) {