Mercurial > hg > wm
comparison Meerwald/cmp_pgm.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 | bd669312f068 |
comparison
equal
deleted
inserted
replaced
7:2b350281f8b0 | 8:f83ef905a63d |
---|---|
34 gray orig_maxval; | 34 gray orig_maxval; |
35 int cols, rows, format; | 35 int cols, rows, format; |
36 gray maxval; | 36 gray maxval; |
37 int col, row; | 37 int col, row; |
38 | 38 |
39 int i; | |
40 int c; | 39 int c; |
41 | 40 |
42 int m = 0; | 41 int m = 0; |
43 int min, max; | 42 int min, max; |
44 | 43 |
97 if (argc > 1) { | 96 if (argc > 1) { |
98 usage(); | 97 usage(); |
99 exit(1); | 98 exit(1); |
100 } | 99 } |
101 | 100 |
102 if (argc == 1 && *argv[0] != '-') | 101 if (argc == 1 && *argv[0] != '-') { |
103 if ((in = fopen(argv[0], "rb")) == NULL) { | 102 if ((in = fopen(argv[0], "rb")) == NULL) { |
104 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 103 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); |
105 exit(1); | 104 exit(1); |
106 } | 105 } |
107 else | 106 else |
108 strcpy(input_name, argv[0]); | 107 strcpy(input_name, argv[0]); |
109 | 108 } |
109 | |
110 if (!orig) { | 110 if (!orig) { |
111 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); | 111 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); |
112 exit(1); | 112 exit(1); |
113 } | 113 } |
114 | 114 |