From 681899b06d67fcb2d4837922a1de353394ef269b Mon Sep 17 00:00:00 2001 From: tTh Date: Mon, 25 Mar 2024 12:45:15 +0100 Subject: [PATCH] less verbosity is better --- Fonderie/fonderie.c | 8 ++++---- Fonderie/interpolator.c | 6 +++--- Fonderie/singlepass.c | 9 ++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Fonderie/fonderie.c b/Fonderie/fonderie.c index 063c2f9b..89d5d8ce 100644 --- a/Fonderie/fonderie.c +++ b/Fonderie/fonderie.c @@ -108,7 +108,7 @@ fprintf(stderr, "glob '%s' -> %d, %d files found\n", pattern, foo, /* get the size of the inputs images */ foo = fimg_fileinfos(globbuf.gl_pathv[0], datas); width = datas[0]; height = datas[1]; -fprintf(stderr, "first image size %dx%d\n", width, height); +if (verbosity) fprintf(stderr, "first image size %dx%d\n", width, height); fimg_create(&input, width, height, 3); @@ -120,10 +120,10 @@ if (foo) { exit(1); } maxvalue = fimg_get_maxvalue(&input); -fprintf(stderr, "first image maxvalue %f\n", maxvalue); +if (verbosity) fprintf(stderr, "first image maxvalue %f\n", maxvalue); foo = create_fifo(szfifo, width, height, FIMG_TYPE_RGB); -fprintf(stderr, "init fifo (%d slots) --> %d\n", szfifo, foo); +if (verbosity) fprintf(stderr, "init fifo (%d slots) = %d\n", szfifo, foo); /* XXX inject a few strange pics in the fifo */ insert_blank(&input, blk, outdir); @@ -206,7 +206,7 @@ char *OutFchain = "none"; fprintf(stderr, "*** %s\n\tcompiled %s, %s, pid %d\n", argv[0], __DATE__, __TIME__, getpid()); -fimg_print_version(2); +if (verbosity) fimg_print_version(2); while ((opt = getopt(argc, argv, "B:E:F:ghI:LO:T:vw:x:")) != -1) { switch(opt) { diff --git a/Fonderie/interpolator.c b/Fonderie/interpolator.c index 18bcf564..b4dc9e3c 100644 --- a/Fonderie/interpolator.c +++ b/Fonderie/interpolator.c @@ -58,7 +58,7 @@ fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__, ptr_glob, ptr_idxval, method); #endif -if (0 == method) { +if (0==method && verbosity) { fprintf(stderr, "\tWTF? in %s, method was ZERO?\n", __func__); } @@ -159,7 +159,7 @@ if (FIMG_TYPE_RGB != iarray[2]) { } w = iarray[0], h = iarray[1]; -fprintf(stderr, "first image size : %dx%d\n", w, h); +if (verbosity) fprintf(stderr, "first image size : %dx%d\n", w, h); fimg_create(&A, w, h, 3); pFirst = &A; fimg_clear(&A); fimg_create(&B, w, h, 3); pSecond = &B; fimg_clear(&B); @@ -259,7 +259,7 @@ char *OutFchain = "0"; fprintf(stderr, "*** %s\n\tcompiled on %s %s\n", argv[0], __DATE__, __TIME__); -fimg_print_version(2); +if (verbosity) fimg_print_version(2); #if DEBUG_LEVEL /* this is for the debug off calling shellscript */ diff --git a/Fonderie/singlepass.c b/Fonderie/singlepass.c index 15084bc4..9f7edde1 100644 --- a/Fonderie/singlepass.c +++ b/Fonderie/singlepass.c @@ -89,7 +89,7 @@ for (idx=0; idx %d\n", foo); +fprintf(stderr, "\tRun the single pass --> %d\n", foo); return 0; }