Mercurial > hg > wm
comparison Meerwald/wm_kund3_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 |
---|---|
30 char signature_name[MAXPATHLEN]; | 30 char signature_name[MAXPATHLEN]; |
31 char output_name[MAXPATHLEN] = "(stdout)"; | 31 char output_name[MAXPATHLEN] = "(stdout)"; |
32 char input_name[MAXPATHLEN] = "(stdin)"; | 32 char input_name[MAXPATHLEN] = "(stdin)"; |
33 | 33 |
34 int r, c; | 34 int r, c; |
35 int i; | |
36 int quality = 0; | 35 int quality = 0; |
37 int seed = 0; | 36 int seed = 0; |
38 int n = 0; | 37 int n = 0; |
39 int method = -1; | 38 int method = -1; |
40 int filter = 0; | 39 int filter = 0; |
41 char filter_name[MAXPATHLEN] = ""; | 40 char filter_name[MAXPATHLEN] = ""; |
42 | 41 |
43 char *binstr; | 42 char *binstr; |
44 | 43 |
45 int level = 0; | 44 int level = 0; |
46 double alpha = 0.0; | |
47 | 45 |
48 int in_rows, in_cols, in_format; | 46 int in_rows, in_cols, in_format; |
49 gray in_maxval; | 47 gray in_maxval; |
50 int rows, cols; | 48 int rows, cols; |
51 int row, col; | 49 int row, col; |
126 if (argc > 1) { | 124 if (argc > 1) { |
127 usage(); | 125 usage(); |
128 exit(1); | 126 exit(1); |
129 } | 127 } |
130 | 128 |
131 if (argc == 1 && *argv[0] != '-') | 129 if (argc == 1 && *argv[0] != '-') { |
132 if ((in = fopen(argv[0], "rb")) == NULL) { | 130 if ((in = fopen(argv[0], "rb")) == NULL) { |
133 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 131 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
134 exit(1); | 132 exit(1); |
135 } | 133 } |
136 else | 134 else |
137 strcpy(input_name, argv[0]); | 135 strcpy(input_name, argv[0]); |
138 | 136 } |
137 | |
139 if (sig) { | 138 if (sig) { |
140 char line[32]; | 139 char line[32]; |
141 fgets(line, sizeof(line), sig); | 140 fgets(line, sizeof(line), sig); |
142 if (strspn(line, "KD3SG") >= 5) { | 141 if (strspn(line, "KD3SG") >= 5) { |
143 fscanf(sig, "%d\n", &nbit_signature); | 142 fscanf(sig, "%d\n", &nbit_signature); |