comparison Meerwald/wm_wang_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
29 char output_name[MAXPATHLEN] = "(stdout)"; 29 char output_name[MAXPATHLEN] = "(stdout)";
30 char input_name[MAXPATHLEN] = "(stdin)"; 30 char input_name[MAXPATHLEN] = "(stdin)";
31 char signature_name[MAXPATHLEN]; 31 char signature_name[MAXPATHLEN];
32 32
33 int i, c, w; 33 int i, c, w;
34 int row, col; 34 int row;
35 35
36 int n; 36 int n;
37 37
38 double alpha = 0.0; 38 double alpha = 0.0;
39 double beta = 0.0; 39 double beta = 0.0;
47 47
48 gray **image; 48 gray **image;
49 Image_tree dwts; 49 Image_tree dwts;
50 50
51 gray maxval; 51 gray maxval;
52 int rows, cols, colors, format; 52 int rows, cols, format;
53 53
54 double *watermark; 54 double *watermark;
55 55
56 progname = argv[0]; 56 progname = argv[0];
57 57
124 if (argc > 1) { 124 if (argc > 1) {
125 usage(); 125 usage();
126 exit(1); 126 exit(1);
127 } 127 }
128 128
129 if (argc == 1 && *argv[0] != '-') 129 if (argc == 1 && *argv[0] != '-') {
130 if ((in = fopen(argv[0], "rb")) == NULL) { 130 if ((in = fopen(argv[0], "rb")) == NULL) {
131 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]);
132 exit(1); 132 exit(1);
133 } 133 }
134 else 134 else
135 strcpy(input_name, argv[0]); 135 strcpy(input_name, argv[0]);
136 136 }
137
137 if (sig) { 138 if (sig) {
138 char line[32]; 139 char line[32];
139 fgets(line, sizeof(line), sig); 140 fgets(line, sizeof(line), sig);
140 if (strspn(line, "WGSG") >= 4) { 141 if (strspn(line, "WGSG") >= 4) {
141 fscanf(sig, "%d\n", &n); 142 fscanf(sig, "%d\n", &n);

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