Mercurial > hg > wm
comparison Meerwald/wm_wang_d.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 | 
|---|---|
| 36 char output_name[MAXPATHLEN] = "(stdout)"; | 36 char output_name[MAXPATHLEN] = "(stdout)"; | 
| 37 char input_name[MAXPATHLEN] = "(stdin)"; | 37 char input_name[MAXPATHLEN] = "(stdin)"; | 
| 38 char orig_name[MAXPATHLEN]; | 38 char orig_name[MAXPATHLEN]; | 
| 39 | 39 | 
| 40 int c, w; | 40 int c, w; | 
| 41 int i; | |
| 42 int n = 0; | 41 int n = 0; | 
| 43 int method = -1; | 42 int method = -1; | 
| 44 int filter = 0; | 43 int filter = 0; | 
| 45 char filter_name[MAXPATHLEN] = ""; | 44 char filter_name[MAXPATHLEN] = ""; | 
| 46 | 45 | 
| 51 int in_rows, in_cols, in_format; | 50 int in_rows, in_cols, in_format; | 
| 52 gray in_maxval; | 51 gray in_maxval; | 
| 53 int orig_rows, orig_cols, orig_format; | 52 int orig_rows, orig_cols, orig_format; | 
| 54 gray orig_maxval; | 53 gray orig_maxval; | 
| 55 int rows, cols; | 54 int rows, cols; | 
| 56 int row, col; | 55 int row; | 
| 57 | 56 | 
| 58 double *watermark; | 57 double *watermark; | 
| 59 | 58 | 
| 60 Image_tree input_dwts; | 59 Image_tree input_dwts; | 
| 61 Image_tree orig_dwts; | 60 Image_tree orig_dwts; | 
| 147 if (argc > 1) { | 146 if (argc > 1) { | 
| 148 usage(); | 147 usage(); | 
| 149 exit(1); | 148 exit(1); | 
| 150 } | 149 } | 
| 151 | 150 | 
| 152 if (argc == 1 && *argv[0] != '-') | 151 if (argc == 1 && *argv[0] != '-') { | 
| 153 if ((in = fopen(argv[0], "rb")) == NULL) { | 152 if ((in = fopen(argv[0], "rb")) == NULL) { | 
| 154 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 153 fprintf(stderr, "%s: unable to open input file %s\n", progname, argv[0]); | 
| 155 exit(1); | 154 exit(1); | 
| 156 } | 155 } | 
| 157 else | 156 else | 
| 158 strcpy(input_name, argv[0]); | 157 strcpy(input_name, argv[0]); | 
| 159 | 158 } | 
| 159 | |
| 160 if (!orig) { | 160 if (!orig) { | 
| 161 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); | 161 fprintf(stderr, "%s: original image file not specified, use -i file option\n", progname); | 
| 162 exit(1); | 162 exit(1); | 
| 163 } | 163 } | 
| 164 | 164 | 
