minor tweaks
This commit is contained in:
@@ -36,11 +36,13 @@ return 0;
|
||||
/* --------------------------------------------------------------------- */
|
||||
void help(int v)
|
||||
{
|
||||
puts("");
|
||||
puts("$ cumulfimgs a.fimg b.fimg c-fimg ...");
|
||||
puts("cumulator options :");
|
||||
puts("\t-v\tincrease verbosity");
|
||||
puts("\t-o\tname of output file");
|
||||
puts("\t-g\tconvert to gray level");
|
||||
|
||||
puts("");
|
||||
if (verbosity) { puts(""); fimg_print_version(1); }
|
||||
exit(0);
|
||||
}
|
||||
@@ -71,10 +73,6 @@ if (verbosity) fprintf(stderr, "------ cumulfimgs ------\n");
|
||||
fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
|
||||
#endif
|
||||
|
||||
// foo = testfile(output_file);
|
||||
// fprintf(stderr, "Output %s -> %d\n", output_file, foo);
|
||||
|
||||
|
||||
for (idx=optind; idx<argc; idx++) {
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
@@ -84,6 +82,7 @@ for (idx=optind; idx<argc; idx++) {
|
||||
foo = testfile(argv[idx]);
|
||||
if (foo) {
|
||||
fprintf(stderr, "testfile %s -> %d\n", argv[idx],foo);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ( ! src_loaded ) {
|
||||
@@ -112,6 +111,10 @@ if (to_gray) {
|
||||
}
|
||||
|
||||
foo = fimg_dump_to_file(&accu, output_file, 0);
|
||||
if (foo) {
|
||||
fprintf(stderr, "error %d while saving '%s'\n", foo, output_file);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -36,8 +36,10 @@ D=" 800 600 "
|
||||
./mkfimg -v -t hdeg hdeg.fimg $D
|
||||
./mkfimg -v -t vdeg vdeg.fimg $D
|
||||
./mkfimg -v -t drand48 rand.fimg $D
|
||||
./mkfimg -v -t tpat0 pat0.fimg $D
|
||||
|
||||
./cumulfimgs -v -g -o foo.fimg hdeg.fimg rand.fimg vdeg.fimg
|
||||
./cumulfimgs -v -g -o foo.fimg \
|
||||
hdeg.fimg pat0.fimg rand.fimg vdeg.fimg
|
||||
}
|
||||
# -----------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user