comparison Meerwald/wm_dugad_e.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
38 char output_name[MAXPATHLEN] = "(stdout)"; 38 char output_name[MAXPATHLEN] = "(stdout)";
39 char input_name[MAXPATHLEN] = "(stdin)"; 39 char input_name[MAXPATHLEN] = "(stdin)";
40 char signature_name[MAXPATHLEN]; 40 char signature_name[MAXPATHLEN];
41 41
42 int i, c; 42 int i, c;
43 int row, col; 43 int row;
44 44
45 int n; 45 int n;
46 46
47 double alpha = 0.0; 47 double alpha = 0.0;
48 double t1 = 0.0; 48 double t1 = 0.0;
56 56
57 gray **image; 57 gray **image;
58 Image_tree dwts, s; 58 Image_tree dwts, s;
59 59
60 gray maxval; 60 gray maxval;
61 int rows, cols, colors, format; 61 int rows, cols, format;
62 62
63 double *watermark; 63 double *watermark;
64 64
65 progname = argv[0]; 65 progname = argv[0];
66 66
97 usage(); 97 usage();
98 break; 98 break;
99 case 'l': 99 case 'l':
100 level = atoi(optarg); 100 level = atoi(optarg);
101 if (level <= 0) { 101 if (level <= 0) {
102 fprintf(stderr, "%s: decomposition level %d out of range\n", level); 102 fprintf(stderr, "%s: decomposition level %d out of range\n", progname, level);
103 exit(1); 103 exit(1);
104 } 104 }
105 break; 105 break;
106 case 'o': 106 case 'o':
107 if ((out = fopen(optarg, "wb")) == NULL) { 107 if ((out = fopen(optarg, "wb")) == NULL) {
140 if (argc > 1) { 140 if (argc > 1) {
141 usage(); 141 usage();
142 exit(1); 142 exit(1);
143 } 143 }
144 144
145 if (argc == 1 && *argv[0] != '-') 145 if (argc == 1 && *argv[0] != '-') {
146 if ((in = fopen(argv[0], "rb")) == NULL) { 146 if ((in = fopen(argv[0], "rb")) == NULL) {
147 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); 147 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]);
148 exit(1); 148 exit(1);
149 } 149 }
150 else 150 else
151 strcpy(input_name, argv[0]); 151 strcpy(input_name, argv[0]);
152 152 }
153
153 if (sig) { 154 if (sig) {
154 char line[32]; 155 char line[32];
155 fgets(line, sizeof(line), sig); 156 fgets(line, sizeof(line), sig);
156 if (strspn(line, "DGSG") >= 4) { 157 if (strspn(line, "DGSG") >= 4) {
157 fscanf(sig, "%d\n", &n); 158 fscanf(sig, "%d\n", &n);

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