diff --git a/tools/fimg2fits.c b/tools/fimg2fits.c index 43564f16..7a0b3881 100644 --- a/tools/fimg2fits.c +++ b/tools/fimg2fits.c @@ -32,21 +32,23 @@ if (foo) { fimg_destroy(&fimg); -return -1; +return 0; } /* ----------------------------------------------------------------- */ static void help(int k) { puts("export to FITS format"); puts("\t-p select colorplane : R, G, B"); +puts("\t default is blue"); +puts("\t-v increase verbosity"); fimg_print_version(k); } /* ----------------------------------------------------------------- */ int main(int argc, char *argv[]) { -int opt; -int plane = '?'; +int opt, foo; +int plane = 'b'; while ((opt = getopt(argc, argv, "p:hv")) != -1) { switch(opt) { @@ -62,8 +64,11 @@ if (2 != argc-optind) { exit(1); } -export_fimg_plane_as_fits(argv[optind], argv[optind+1], plane); - +foo = export_fimg_plane_as_fits(argv[optind], argv[optind+1], plane); +if (foo) { + fprintf(stderr, "export_fimg_plane_as_fits --> %d\n", foo); + exit(1); + } return 0; } /* ----------------------------------------------------------------- */