]> thyrsus.com Git - deal.git/commitdiff
Lintified.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 13 Apr 1995 05:56:06 +0000 (05:56 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 13 Apr 1995 05:56:06 +0000 (05:56 +0000)
deal.c

diff --git a/deal.c b/deal.c
index 811798d459a6c7843dbc1826585efb1eed115bfc..8e2aff8202cce51ea84fc35e531578bf611cdc8d 100644 (file)
--- a/deal.c
+++ b/deal.c
@@ -10,49 +10,50 @@ main(argc, argv)
     double hyper_prob();
 
     if  (argc == 1) {
-        printf("Help for Cardprobs : here's the order of the arguments:\n");
-        printf("     # special cards; # total cards; # of turns; \n");
-        printf("     # columns.\n");
-        printf("No arguments are optional.\n");
+        (void) printf("Help for Cardprobs : here's the order of the arguments:\n");
+        (void) printf("     # special cards; # total cards; # of turns; \n");
+        (void) printf("     # columns.\n");
+        (void) printf("No arguments are optional.\n");
     } else {
         special = atoi(argv[1]);
         total = atoi(argv[2]);
         turns = atoi(argv[3]);
         if (total < special) {
-            printf("Can't have more specials than total cards!\n");
+            (void) printf("Can't have more specials than total cards!\n");
             exit(-1);
         }
         columns = atoi(argv[4]);
         if (columns > special-1) {
-            printf("using %d columns because can only have ",special+1);
-            printf("0 to %d specials\n",special);
+            (void) printf("using %d columns because can only have ",special+1);
+            (void) printf("0 to %d specials\n",special);
             columns = special+1;
         }
                 
-        printf("%d special cards out of %d total; %d turns, %d columns\n",special,total,turns,columns);
+        (void) printf("%d specials out of %d total; %d turns, %d columns\n",
+                     special, total, turns, columns);
 
-        printf("     |  %% chance of this number of specials\n");
-        printf("Turn | ");
+        (void) printf("     |  %% chance of this number of specials\n");
+        (void) printf("Turn | ");
         for (j = 0; j < columns; j++)
-            printf("%2d ",j);
-        printf("\n");
-        printf("-----+");
+            (void) printf("%2d ",j);
+        (void) printf("\n");
+        (void) printf("-----+");
         for (j = 0; j < columns; j++)
-            printf("---",j);
-        printf("\n");
+            (void) printf("---",j);
+        (void) printf("\n");
 
         for (i = 1; i <= turns; i++) {
-            printf("%2d   | ",i);
+            (void) printf("%2d   | ",i);
             for (j = 0; (j < columns) && (j < i + (BASEHAND+1)) && (j < special+1); j++)
            {
                double p = hyper_prob(j, i + BASEHAND, special, total);
 
-                printf("%2.2d ",(int)rint(p * 100));
+                (void) printf("%2.2d ",(int)rint(p * 100));
            }
 
             for (j = i + (BASEHAND+1); j < columns; j++)
-                printf(" * ");
-            printf("\n");
+                (void) printf(" * ");
+            (void) printf("\n");
         }
     }
 }