From: erg Date: Thu, 6 May 2010 16:03:08 +0000 (+0000) Subject: Fix gvconfig_libdir function to report resolved lib directory if -v set. X-Git-Tag: LAST_LIBGRAPH~32^2~1341 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06810213a8099362fcfe7174feaa4d62a3fcddca;p=graphviz Fix gvconfig_libdir function to report resolved lib directory if -v set. Previously, this was set up to be done on the first call to this function, but at that time, argv[] hasn't been process, so job->common.verbose had not yet been set, and nothing is printed. --- diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index ad4a45e08..ca5cf6ae1 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -267,6 +267,7 @@ char * gvconfig_libdir(GVC_t * gvc) { static char line[BSZ]; static char *libdir; + static boolean dirShown = 0; char *path, *tmp; FILE *f; @@ -323,9 +324,10 @@ char * gvconfig_libdir(GVC_t * gvc) } #endif } - if (gvc->common.verbose > 1) - fprintf (stderr, "libdir = \"%s\"\n", - (libdir ? libdir : "")); + } + if (gvc->common.verbose && !dirShown) { + fprintf (stderr, "libdir = \"%s\"\n", (libdir ? libdir : "")); + dirShown = 1; } return libdir; }