]> granicus.if.org Git - graphviz/commitdiff
One more revision to error message when plugins missing
authorellson <devnull@localhost>
Tue, 27 Oct 2009 19:46:54 +0000 (19:46 +0000)
committerellson <devnull@localhost>
Tue, 27 Oct 2009 19:46:54 +0000 (19:46 +0000)
lib/common/input.c

index e669a711b9a400f33da47b16e5d3c1dd868fbf7f..9dba60bd3f87ffd645c38d81be2da96ffd313a84 100644 (file)
@@ -262,7 +262,10 @@ void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv)
     if (i == NO_SUPPORT) {
        fprintf(stderr, "There is no layout engine support for \"%s\"\n", gvc->common.cmdname);
         if (streq(gvc->common.cmdname, "dot")) {
-          fprintf(stderr, "Perhaps \"dot -c\" needs to be run by root to register the plugins?\n");
+           fprintf(stderr, "Perhaps \"dot -c\" needs to be run (with installer's privileges) to register the plugins?\n");
+       }
+       else {
+           fprintf(stderr, "Use one of:%s\n", gvplugin_list(gvc, API_layout, val));
        }
        exit(1);
     }
@@ -344,9 +347,15 @@ void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv)
                 }
                 v = gvlayout_select(gvc, val);
                 if (v == NO_SUPPORT) {
-                    fprintf(stderr, "Layout type: \"%s\" not recognized. Use one of:%s\n",
-                        val, gvplugin_list(gvc, API_layout, val));
-                    exit(1);
+                   fprintf(stderr, "There is no layout engine support for \"%s\"\n", val);
+                    if (streq(val, "dot")) {
+                        fprintf(stderr, "Perhaps \"dot -c\" needs to be run (with installer's privileges) to register the plugins?\n");
+                    }
+                   else {
+                        fprintf(stderr, "Use one of:%s\n",
+                               gvplugin_list(gvc, API_layout, val));
+                   }
+                   exit(1);
                 }
                break;
            case 'P':