Browse Source

- improved readability

development
Andreas Romeyke 2 years ago
parent
commit
f9a02cbd1e
1 changed files with 10 additions and 14 deletions
  1. +10
    -14
      src/checkit_tiff_risk.c

+ 10
- 14
src/checkit_tiff_risk.c View File

@ -1,7 +1,7 @@
/* rule based checks if given TIFF is a specific baseline TIFF
*
*
* author: Andreas Romeyke, 2015/16
* licensed under conditions of libtiff
* licensed under conditions of libtiff
* (see http://libtiff.maptools.org/misc.html)
*
*/
@ -55,20 +55,14 @@ int main(int argc, char * argv[]) {
flag_print_stats = FLAGGED;
break;
case '?': /* something goes wrong */
/*
if (optopt == 'r') {
fprintf (stderr, "Option -%c requires an argument.\n", optopt);
return (-1);
}
else*/ if (isprint (optopt)) {
if (isprint (optopt)) {
fprintf (stderr, "Unknown option `-%c'.\n", optopt);
return (-1);
}
else if (0 !=optopt) {
} else if (0 !=optopt) {
fprintf (stderr, "Unknown option character `\\x%x'.\n", optopt);
return (-1);
}
break;
}
break;
default:
abort();
}
@ -87,10 +81,12 @@ int main(int argc, char * argv[]) {
ret_t res=get_first_IFD(ctif, &offset);
if (res.returncode == is_valid) {
mem_map_t * memmap_p = scan_mem_map(ctif);
if (FLAGGED == flag_print_map)
if (FLAGGED == flag_print_map) {
print_mem_map ( memmap_p );
if (FLAGGED == flag_print_stats)
}
if (FLAGGED == flag_print_stats) {
print_mem_stats( memmap_p );
}
return (EXIT_SUCCESS);
} else {
return (EXIT_FAILURE);


Loading…
Cancel
Save