Mercurial > hg > wm
comparison Meerwald/wm_kund2_d.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 |
---|---|
31 char signature_name[MAXPATHLEN]; | 31 char signature_name[MAXPATHLEN]; |
32 char output_name[MAXPATHLEN] = "(stdout)"; | 32 char output_name[MAXPATHLEN] = "(stdout)"; |
33 char input_name[MAXPATHLEN] = "(stdin)"; | 33 char input_name[MAXPATHLEN] = "(stdin)"; |
34 | 34 |
35 int r, c; | 35 int r, c; |
36 int i; | |
37 int quality = 0; | 36 int quality = 0; |
38 int blocksize = 0; | 37 int blocksize = 0; |
39 int seed = 0; | 38 int seed = 0; |
40 int n = 0; | 39 int n = 0; |
41 int method = -1; | 40 int method = -1; |
130 if (argc > 1) { | 129 if (argc > 1) { |
131 usage(); | 130 usage(); |
132 exit(1); | 131 exit(1); |
133 } | 132 } |
134 | 133 |
135 if (argc == 1 && *argv[0] != '-') | 134 if (argc == 1 && *argv[0] != '-') { |
136 if ((in = fopen(argv[0], "rb")) == NULL) { | 135 if ((in = fopen(argv[0], "rb")) == NULL) { |
137 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 136 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
138 exit(1); | 137 exit(1); |
139 } | 138 } |
140 else | 139 else |
141 strcpy(input_name, argv[0]); | 140 strcpy(input_name, argv[0]); |
142 | 141 } |
142 | |
143 if (sig) { | 143 if (sig) { |
144 char line[1024]; | 144 char line[1024]; |
145 fgets(line, sizeof(line), sig); | 145 fgets(line, sizeof(line), sig); |
146 if (strspn(line, "KD2SG") >= 5) { | 146 if (strspn(line, "KD2SG") >= 5) { |
147 fscanf(sig, "%d\n", &nbit_signature); | 147 fscanf(sig, "%d\n", &nbit_signature); |
225 | 225 |
226 // consider each resolution level | 226 // consider each resolution level |
227 while (p->coarse->level < level) { | 227 while (p->coarse->level < level) { |
228 int lwidth = p->vertical->image->width; | 228 int lwidth = p->vertical->image->width; |
229 int lheight = p->vertical->image->height; | 229 int lheight = p->vertical->image->height; |
230 int l = p->vertical->level; | |
231 int bx, by; | 230 int bx, by; |
232 int nblock; | 231 int nblock; |
233 | 232 |
234 nblock = 0; | 233 nblock = 0; |
235 for (bx = 0; bx < lwidth; bx += blocksize) { | 234 for (bx = 0; bx < lwidth; bx += blocksize) { |