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

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