Mercurial > hg > wm
comparison Meerwald/cmp_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 |
comparison
equal
deleted
inserted
replaced
7:2b350281f8b0 | 8:f83ef905a63d |
---|---|
78 if (argc > 1) { | 78 if (argc > 1) { |
79 usage(); | 79 usage(); |
80 exit(1); | 80 exit(1); |
81 } | 81 } |
82 | 82 |
83 if (argc == 1 && *argv[0] != '-') | 83 if (argc == 1 && *argv[0] != '-') { |
84 if ((in = fopen(argv[0], "r")) == NULL) { | 84 if ((in = fopen(argv[0], "r")) == NULL) { |
85 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]); |
86 exit(1); | 86 exit(1); |
87 } | 87 } |
88 else | 88 else |
89 strcpy(input_name, argv[0]); | 89 strcpy(input_name, argv[0]); |
90 | 90 } |
91 | |
91 if (sig) { | 92 if (sig) { |
92 fgets(line, sizeof(line), sig); | 93 fgets(line, sizeof(line), sig); |
93 if (strspn(line, "BRSG") >= 4) { | 94 if (strspn(line, "BRSG") >= 4) { |
94 fscanf(sig, "%d\n", &nbit_signature1); | 95 fscanf(sig, "%d\n", &nbit_signature1); |
95 fscanf(sig, "%d\n", &skipping); | 96 fscanf(sig, "%d\n", &skipping); |
107 } | 108 } |
108 else { | 109 else { |
109 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); | 110 fprintf(stderr, "%s: invalid signature file %s\n", progname, signature_name); |
110 exit(1); | 111 exit(1); |
111 } | 112 } |
112 close(sig); | 113 fclose(sig); |
113 } | 114 } |
114 else { | 115 else { |
115 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); | 116 fprintf(stderr, "%s: original signature file not specified, use -s file option\n", progname); |
116 exit(1); | 117 exit(1); |
117 } | 118 } |