Mercurial > hg > wm
comparison Meerwald/wm_xia_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 |
|---|---|
| 63 char signature_name[MAXPATHLEN]; | 63 char signature_name[MAXPATHLEN]; |
| 64 char output_name[MAXPATHLEN] = "(stdout)"; | 64 char output_name[MAXPATHLEN] = "(stdout)"; |
| 65 char input_name[MAXPATHLEN] = "(stdin)"; | 65 char input_name[MAXPATHLEN] = "(stdin)"; |
| 66 char orig_name[MAXPATHLEN]; | 66 char orig_name[MAXPATHLEN]; |
| 67 | 67 |
| 68 int c, w; | 68 int c; |
| 69 int i; | |
| 70 int n = 0; | 69 int n = 0; |
| 71 int method = -1; | 70 int method = -1; |
| 72 int filter = 0; | 71 int filter = 0; |
| 73 char filter_name[MAXPATHLEN] = ""; | 72 char filter_name[MAXPATHLEN] = ""; |
| 74 | 73 |
| 78 int in_rows, in_cols, in_format; | 77 int in_rows, in_cols, in_format; |
| 79 gray in_maxval; | 78 gray in_maxval; |
| 80 int orig_rows, orig_cols, orig_format; | 79 int orig_rows, orig_cols, orig_format; |
| 81 gray orig_maxval; | 80 gray orig_maxval; |
| 82 int rows, cols; | 81 int rows, cols; |
| 83 int row, col; | 82 int row; |
| 84 | 83 |
| 85 double *watermark; | 84 double *watermark; |
| 86 | 85 |
| 87 Image_tree input_dwts, orig_dwts, p, q; | 86 Image_tree input_dwts, orig_dwts, p, q; |
| 88 | 87 |
| 166 if (argc > 1) { | 165 if (argc > 1) { |
| 167 usage(); | 166 usage(); |
| 168 exit(1); | 167 exit(1); |
| 169 } | 168 } |
| 170 | 169 |
| 171 if (argc == 1 && *argv[0] != '-') | 170 if (argc == 1 && *argv[0] != '-') { |
| 172 if ((in = fopen(argv[0], "rb")) == NULL) { | 171 if ((in = fopen(argv[0], "rb")) == NULL) { |
| 173 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 172 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
| 174 exit(1); | 173 exit(1); |
| 175 } | 174 } |
| 176 else | 175 else |
| 177 strcpy(input_name, argv[0]); | 176 strcpy(input_name, argv[0]); |
| 178 | 177 } |
| 178 | |
| 179 if (!orig) { | 179 if (!orig) { |
| 180 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); | 180 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); |
| 181 exit(1); | 181 exit(1); |
| 182 } | 182 } |
| 183 | 183 |
