diff --git a/Fonderie/single.c b/Fonderie/single.c index a7caacd..fdfbbb3 100644 --- a/Fonderie/single.c +++ b/Fonderie/single.c @@ -20,20 +20,22 @@ /* * singleton/private variables */ - static int nextpng, counter; static char *destination; static int chainfilter; +/* and the classic global var */ +extern int verbosity; + /* -------------------------------------------------------------- */ -int single_init(int next, char *dest, int fxchain) +int single_init(int next, char *dest, int fxchain, int outfmt) { int foo; struct stat stbuf; #if DEBUG_LEVEL -fprintf(stderr, ">>> %s ( %d '%s' %d )\n", __func__, - next, dest, fxchain); +fprintf(stderr, ">>> %s ( %d '%s' %d %d )\n", __func__, + next, dest, fxchain, outfmt); #endif nextpng = next; diff --git a/Fonderie/single.h b/Fonderie/single.h index 7f2cea4..d197ac7 100644 --- a/Fonderie/single.h +++ b/Fonderie/single.h @@ -6,7 +6,7 @@ /* -------------------------------------------------------------- */ -int single_init(int next, char *dest, int fxchain); +int single_init(int next, char *dest, int fxchain, int outfmt); int single_push_picture(FloatImg *pimg); int single_print_state(char *title, int k); diff --git a/Fonderie/singlepass.c b/Fonderie/singlepass.c index c3154b2..eb0be50 100644 --- a/Fonderie/singlepass.c +++ b/Fonderie/singlepass.c @@ -23,7 +23,8 @@ int verbosity; /* ----------------------------------------------------------- */ -int run_the_singlepass(char *globber, char *destdir, int fchain) +int run_the_singlepass(char *globber, char *destdir, + int fchain, int outfmt) { FloatImg image = { 0 }; int idx, foo; @@ -32,15 +33,15 @@ char *fname; double elapsed; #if DEBUG_LEVEL -fprintf(stderr, ">>> %s ( '%s' '%s' %d )\n", __func__, - globber, destdir, fchain); +fprintf(stderr, ">>> %s ( '%s' '%s' %d %d )\n", __func__, + globber, destdir, fchain, outfmt); #endif // filterstack_list(fchain, "Run the single pass"); (void)fimg_timer_set(0); -foo = single_init(0, destdir, fchain); +foo = single_init(0, destdir, fchain, outfmt); if (foo) { fprintf(stderr, "erreur %d single_init\n", foo); return foo; @@ -106,8 +107,10 @@ for (idx=0; idx %d\n", foo); return 0; diff --git a/Fonderie/t.c b/Fonderie/t.c index 8d45b2c..288cc1e 100644 --- a/Fonderie/t.c +++ b/Fonderie/t.c @@ -89,7 +89,7 @@ fprintf(stderr, ">>> %s ( '%s' '%s' %d )\n", __func__, filterstack_list(chain, "essai du single"); -foo = single_init(0, destdir, chain); +foo = single_init(0, destdir, chain, -1); if (foo) { fprintf(stderr, "erreur %d single_init\n", foo); return foo;