Mercurial > hg > wm
comparison Meerwald/cmp_xie_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 | ad1d224896c5 |
comparison
equal
deleted
inserted
replaced
| 7:2b350281f8b0 | 8:f83ef905a63d |
|---|---|
| 30 int verbose = 0; | 30 int verbose = 0; |
| 31 int filter = 0; | 31 int filter = 0; |
| 32 int method = 0; | 32 int method = 0; |
| 33 int level = 0; | 33 int level = 0; |
| 34 double alpha = 0.0; | 34 double alpha = 0.0; |
| 35 double intensity = 0.0; | |
| 36 int subband = 0; | |
| 37 char filter_name[MAXPATHLEN] = ""; | 35 char filter_name[MAXPATHLEN] = ""; |
| 38 | 36 |
| 39 int seed; | 37 int seed; |
| 40 char line[32]; | 38 char line[32]; |
| 41 | 39 |
| 80 if (argc > 1) { | 78 if (argc > 1) { |
| 81 usage(); | 79 usage(); |
| 82 exit(1); | 80 exit(1); |
| 83 } | 81 } |
| 84 | 82 |
| 85 if (argc == 1 && *argv[0] != '-') | 83 if (argc == 1 && *argv[0] != '-') { |
| 86 if ((in = fopen(argv[0], "r")) == NULL) { | 84 if ((in = fopen(argv[0], "r")) == NULL) { |
| 87 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 85 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
| 88 exit(1); | 86 exit(1); |
| 89 } | 87 } |
| 90 else | 88 else |
| 91 strcpy(input_name, argv[0]); | 89 strcpy(input_name, argv[0]); |
| 92 | 90 } |
| 91 | |
| 93 if (sig) { | 92 if (sig) { |
| 94 fgets(line, sizeof(line), sig); | 93 fgets(line, sizeof(line), sig); |
| 95 if (strspn(line, "XESG") >= 4) { | 94 if (strspn(line, "XESG") >= 4) { |
| 96 fscanf(sig, "%d\n", &nbit_signature1); | 95 fscanf(sig, "%d\n", &nbit_signature1); |
| 97 fscanf(sig, "%lf\n", &alpha); | 96 fscanf(sig, "%lf\n", &alpha); |
| 107 } | 106 } |
| 108 else { | 107 else { |
| 109 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); | 108 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); |
| 110 exit(1); | 109 exit(1); |
| 111 } | 110 } |
| 112 close(sig); | 111 fclose(sig); |
| 113 } | 112 } |
| 114 else { | 113 else { |
| 115 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); | 114 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); |
| 116 exit(1); | 115 exit(1); |
| 117 } | 116 } |
