Mercurial > hg > wm
comparison Meerwald/cmp_kund2_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 | acb6967ee76d |
| children | ad1d224896c5 |
comparison
equal
deleted
inserted
replaced
| 7:2b350281f8b0 | 8:f83ef905a63d |
|---|---|
| 82 if (argc > 1) { | 82 if (argc > 1) { |
| 83 usage(); | 83 usage(); |
| 84 exit(1); | 84 exit(1); |
| 85 } | 85 } |
| 86 | 86 |
| 87 if (argc == 1 && *argv[0] != '-') | 87 if (argc == 1 && *argv[0] != '-') { |
| 88 if ((in = fopen(argv[0], "r")) == NULL) { | 88 if ((in = fopen(argv[0], "r")) == NULL) { |
| 89 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 89 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
| 90 exit(1); | 90 exit(1); |
| 91 } | 91 } |
| 92 else | 92 else |
| 93 strcpy(input_name, argv[0]); | 93 strcpy(input_name, argv[0]); |
| 94 | 94 } |
| 95 | |
| 95 if (sig) { | 96 if (sig) { |
| 96 fgets(line, sizeof(line), sig); | 97 fgets(line, sizeof(line), sig); |
| 97 if (strspn(line, "KD2SG") >= 5) { | 98 if (strspn(line, "KD2SG") >= 5) { |
| 98 fscanf(sig, "%d\n", &nbit_signature1); | 99 fscanf(sig, "%d\n", &nbit_signature1); |
| 99 fscanf(sig, "%d\n", &quality); | 100 fscanf(sig, "%d\n", &quality); |
| 113 } | 114 } |
| 114 else { | 115 else { |
| 115 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); | 116 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); |
| 116 exit(1); | 117 exit(1); |
| 117 } | 118 } |
| 118 close(sig); | 119 fclose(sig); |
| 119 } | 120 } |
| 120 else { | 121 else { |
| 121 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); | 122 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); |
| 122 exit(1); | 123 exit(1); |
| 123 } | 124 } |
