comparison Meerwald/wm_dugad_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
45 45
46 char signature_name[MAXPATHLEN]; 46 char signature_name[MAXPATHLEN];
47 char output_name[MAXPATHLEN] = "(stdout)"; 47 char output_name[MAXPATHLEN] = "(stdout)";
48 char input_name[MAXPATHLEN] = "(stdin)"; 48 char input_name[MAXPATHLEN] = "(stdin)";
49 49
50 int c, w; 50 int c;
51 int i; 51 int i;
52 int n = 0; 52 int n = 0;
53 int method = -1; 53 int method = -1;
54 int level = 0; 54 int level = 0;
55 int filter = 0; 55 int filter = 0;
59 double t2 = 0.0; 59 double t2 = 0.0;
60 60
61 int in_rows, in_cols, in_format; 61 int in_rows, in_cols, in_format;
62 gray in_maxval; 62 gray in_maxval;
63 int rows, cols; 63 int rows, cols;
64 int row, col; 64 int row;
65 65
66 double *watermark; 66 double *watermark;
67 67
68 Image_tree dwts, s; 68 Image_tree dwts, s;
69 69
104 usage(); 104 usage();
105 break; 105 break;
106 case 'l': 106 case 'l':
107 level = atoi(optarg); 107 level = atoi(optarg);
108 if (level <= 0) { 108 if (level <= 0) {
109 fprintf(stderr, "%s: decomposition level %d out of range\n", level); 109 fprintf(stderr, "%s: decomposition level %d out of range\n", progname, level);
110 exit(1); 110 exit(1);
111 } 111 }
112 break; 112 break;
113 113
114 case 'n': 114 case 'n':
155 if (argc > 1) { 155 if (argc > 1) {
156 usage(); 156 usage();
157 exit(1); 157 exit(1);
158 } 158 }
159 159
160 if (argc == 1 && *argv[0] != '-') 160 if (argc == 1 && *argv[0] != '-') {
161 if ((in = fopen(argv[0], "rb")) == NULL) { 161 if ((in = fopen(argv[0], "rb")) == NULL) {
162 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); 162 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]);
163 exit(1); 163 exit(1);
164 } 164 }
165 else 165 else
166 strcpy(input_name, argv[0]); 166 strcpy(input_name, argv[0]);
167 167 }
168
168 if (sig) { 169 if (sig) {
169 char line[32]; 170 char line[32];
170 fgets(line, sizeof(line), sig); 171 fgets(line, sizeof(line), sig);
171 if (strspn(line, "DGSG") >= 4) { 172 if (strspn(line, "DGSG") >= 4) {
172 fscanf(sig, "%d\n", &n); 173 fscanf(sig, "%d\n", &n);

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