]> granicus.if.org Git - graphviz/commitdiff
provide some plugin status information in "dot -v"
authorellson <devnull@localhost>
Tue, 18 Oct 2005 18:28:07 +0000 (18:28 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 18:28:07 +0000 (18:28 +0000)
lib/common/args.c
lib/gvc/gvcproc.h
lib/gvc/gvplugin.c

index 7b258c742398f8f5e02af386a81bd9b323c5aa02..5d389e99aea29d9a22841821bdac9a519cf80934 100644 (file)
@@ -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;
 }
index 1a8605bf0c3d371941830ee216ce90a03df17598..00c6c860010b8a0db7e9fcd62dff2424e87e3cb5 100644 (file)
@@ -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 */
 
index c508d5c7f1168e91c33efedaacd6b52d96438e9f..073cb21c44f6f5f3773c46aeb94e337a10248062 100644 (file)
@@ -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, ":"));
+    }
+}