From: ellson Date: Tue, 18 Oct 2005 18:28:07 +0000 (+0000) Subject: provide some plugin status information in "dot -v" X-Git-Tag: LAST_LIBGRAPH~32^2~7321 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6575607e7437e2f61c3dee5e848291830d9858f0;p=graphviz provide some plugin status information in "dot -v" --- diff --git a/lib/common/args.c b/lib/common/args.c index 7b258c742..5d389e99a 100644 --- a/lib/common/args.c +++ b/lib/common/args.c @@ -254,5 +254,7 @@ int gvParseArgs(GVC_t *gvc, int argc, char** argv) argc = memtest_extra_args(gvc, argc, argv); argc = config_extra_args(gvc, argc, argv); dotneato_args_initialize(gvc, argc, argv); + if (Verbose) + gvplugin_write_status(gvc); return 0; } diff --git a/lib/gvc/gvcproc.h b/lib/gvc/gvcproc.h index 1a8605bf0..00c6c8600 100644 --- a/lib/gvc/gvcproc.h +++ b/lib/gvc/gvcproc.h @@ -45,6 +45,7 @@ extern "C" { extern const char *gvplugin_list(GVC_t * gvc, api_t api, char *str); extern api_t gvplugin_api(char *str); extern char * gvplugin_api_name(api_t api); + extern void gvplugin_write_status(GVC_t * gvc); /* job */ diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index c508d5c7f..073cb21c4 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -328,3 +328,18 @@ const char *gvplugin_list(GVC_t * gvc, api_t api, char *str) free(s); return buf; } + +void gvplugin_write_status(GVC_t * gvc) +{ + int api; + + fprintf(stderr,"The plugin configuration file:\n\t%s\n", gvc->config_path); + if (gvc->config_found) + fprintf(stderr,"\t\twas successfully loaded.\n"); + else + fprintf(stderr,"\t\twas not found or not usable. No on-demand plugins.\n"); + + for (api = 0; api < ARRAY_SIZE(api_names); api++) { + fprintf(stderr," %s\t: %s\n", api_names[api], gvplugin_list(gvc, api, ":")); + } +}