comparison Meerwald/cmp_koch_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 3bdb67e76858
comparison
equal deleted inserted replaced
7:2b350281f8b0 8:f83ef905a63d
75 if (argc > 1) { 75 if (argc > 1) {
76 usage(); 76 usage();
77 exit(1); 77 exit(1);
78 } 78 }
79 79
80 if (argc == 1 && *argv[0] != '-') 80 if (argc == 1 && *argv[0] != '-') {
81 if ((in = fopen(argv[0], "r")) == NULL) { 81 if ((in = fopen(argv[0], "r")) == NULL) {
82 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); 82 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]);
83 exit(1); 83 exit(1);
84 } 84 }
85 else 85 else
86 strcpy(input_name, argv[0]); 86 strcpy(input_name, argv[0]);
87 87 }
88
88 if (sig) { 89 if (sig) {
89 fgets(line, sizeof(line), sig); 90 fgets(line, sizeof(line), sig);
90 if (strspn(line, "KCSG") >= 4) { 91 if (strspn(line, "KCSG") >= 4) {
91 fscanf(sig, "%d\n", &nbit_signature1); 92 fscanf(sig, "%d\n", &nbit_signature1);
92 fscanf(sig, "%lf\n", &quality); 93 fscanf(sig, "%lf\n", &quality);
99 } 100 }
100 else { 101 else {
101 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); 102 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name);
102 exit(1); 103 exit(1);
103 } 104 }
104 close(sig); 105 fclose(sig);
105 } 106 }
106 else { 107 else {
107 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); 108 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname);
108 exit(1); 109 exit(1);
109 } 110 }

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