comparison Meerwald/wm_zhu_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
1 #include "wm.h" 1 #include "wm.h"
2 #include "dwt.h" 2 #include "dwt.h"
3 #include "pgm.h" 3 #include "pgm.h"
4 #include "sort.h"
4 5
5 char *progname; 6 char *progname;
6 7
7 void usage(void) { 8 void usage(void) {
8 fprintf(stderr, "usage: %s [-a n] [-e n] [-f n] [-F file] [-h] [-l n] [-o file] [-v n] -s file -i file file\n\n", progname); 9 fprintf(stderr, "usage: %s [-a n] [-e n] [-f n] [-F file] [-h] [-l n] [-o file] [-v n] -s file -i file file\n\n", progname);
56 int in_rows, in_cols, in_format; 57 int in_rows, in_cols, in_format;
57 gray in_maxval; 58 gray in_maxval;
58 int orig_rows, orig_cols, orig_format; 59 int orig_rows, orig_cols, orig_format;
59 gray orig_maxval; 60 gray orig_maxval;
60 int rows, cols; 61 int rows, cols;
61 int row, col; 62 int row;
62 63
63 double *watermark; 64 double *watermark;
64 65
65 Image_tree input_dwts, orig_dwts, p, q; 66 Image_tree input_dwts, orig_dwts, p, q;
66 67
144 if (argc > 1) { 145 if (argc > 1) {
145 usage(); 146 usage();
146 exit(1); 147 exit(1);
147 } 148 }
148 149
149 if (argc == 1 && *argv[0] != '-') 150 if (argc == 1 && *argv[0] != '-') {
150 if ((in = fopen(argv[0], "rb")) == NULL) { 151 if ((in = fopen(argv[0], "rb")) == NULL) {
151 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); 152 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]);
152 exit(1); 153 exit(1);
153 } 154 }
154 else 155 else
155 strcpy(input_name, argv[0]); 156 strcpy(input_name, argv[0]);
156 157 }
158
157 if (!orig) { 159 if (!orig) {
158 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); 160 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname);
159 exit(1); 161 exit(1);
160 } 162 }
161 163

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