Mercurial > hg > wm
comparison Meerwald/wm_cox_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 | be303a3f5ea8 |
children | 4987db85cfae |
comparison
equal
deleted
inserted
replaced
7:2b350281f8b0 | 8:f83ef905a63d |
---|---|
23 char output_name[MAXPATHLEN] = "(stdout)"; | 23 char output_name[MAXPATHLEN] = "(stdout)"; |
24 char input_name[MAXPATHLEN] = "(stdin)"; | 24 char input_name[MAXPATHLEN] = "(stdin)"; |
25 char signature_name[MAXPATHLEN]; | 25 char signature_name[MAXPATHLEN]; |
26 | 26 |
27 int c; | 27 int c; |
28 int row, col; | 28 int row; |
29 int i,j; | 29 int i,j; |
30 | 30 |
31 int n; | 31 int n; |
32 | 32 |
33 double alpha = 0.0; | 33 double alpha = 0.0; |
37 gray **input_image; | 37 gray **input_image; |
38 gray **output_image; | 38 gray **output_image; |
39 double **dcts; | 39 double **dcts; |
40 | 40 |
41 gray maxval; | 41 gray maxval; |
42 int rows, cols, colors, format; | 42 int rows, cols, format; |
43 | 43 |
44 progname = argv[0]; | 44 progname = argv[0]; |
45 | 45 |
46 pgm_init(&argc, argv); wm_init(); | 46 pgm_init(&argc, argv); wm_init(); |
47 | 47 |
81 if (argc > 1) { | 81 if (argc > 1) { |
82 usage(); | 82 usage(); |
83 exit(1); | 83 exit(1); |
84 } | 84 } |
85 | 85 |
86 if (argc == 1 && *argv[0] != '-') | 86 if (argc == 1 && *argv[0] != '-') { |
87 if ((in = fopen(argv[0], "rb")) == NULL) { | 87 if ((in = fopen(argv[0], "rb")) == NULL) { |
88 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 88 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
89 exit(1); | 89 exit(1); |
90 } | 90 } |
91 else | 91 else |
92 strcpy(input_name, argv[0]); | 92 strcpy(input_name, argv[0]); |
93 | 93 } |
94 | |
94 if (sig) { | 95 if (sig) { |
95 char line[32]; | 96 char line[32]; |
96 fgets(line, sizeof(line), sig); | 97 fgets(line, sizeof(line), sig); |
97 if (strspn(line, "CXSG") >= 4) { | 98 if (strspn(line, "CXSG") >= 4) { |
98 fscanf(sig, "%d\n", &n); | 99 fscanf(sig, "%d\n", &n); |