diff Meerwald/gen_bruyn_sig.c @ 8:f83ef905a63d

fixing many warnings increase capacity for coordinates in bruyn fix some uninit. variables
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Tue, 22 Apr 2008 13:36:05 +0200
parents be303a3f5ea8
children 4987db85cfae
line wrap: on
line diff
--- a/Meerwald/gen_bruyn_sig.c	Wed Apr 16 15:55:52 2008 +0200
+++ b/Meerwald/gen_bruyn_sig.c	Tue Apr 22 13:36:05 2008 +0200
@@ -131,17 +131,18 @@
   }
 
   if (b % 2 > 0 || b <= 2) {
-    fprintf(stderr, "%s: block size has to be even and greater than 2\n");
+    fprintf(stderr, "%s: block size has to be even and greater than 2\n", progname);
     exit(1);
   }
 
-  if (argc == 1 && *argv[0] != '-')
+  if (argc == 1 && *argv[0] != '-') {
   if ((in = fopen(argv[0], "rb")) == NULL) {
     fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]);
     exit(1);
   }
   else
     strcpy(input_name, argv[0]);
+  }
 
   // read signature file and set options
   // command line options override signature file options
@@ -221,7 +222,7 @@
   fprintf(out, "%f\n", t1);
   fprintf(out, "%f\n", t2);
   fprintf(out, "%d\n", b);
-  fprintf(out, "%d\n", random());
+  fprintf(out, "%ld\n", random());
   fwrite(signature, sizeof(char), nb, out);
   fprintf(out, "\n");
 

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.