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

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