]> granicus.if.org Git - graphviz/commitdiff
Show usage and exit non-zero for unsupported option in lefty
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 3 Oct 2020 14:02:09 +0000 (16:02 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:25 +0000 (21:10 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1843.

cmd/lefty/lefty.c

index e49eaa7acf56ba6db9f1b7166e81ee92042bccf5..25cf1eccde6698e6ab4d561fc0008bcc83d7c0a2 100644 (file)
@@ -471,7 +471,8 @@ static void processargs (int argc, char *argv[]) {
                 fclose(fp);
             fp = stdin;
         } else if (argv[0][0] == '-') {
-            fprintf (stderr, "option %s unrecognized - ignored\n", argv[0]);
+            fprintf (stderr, "option %s unrecognized\n", argv[0]);
+            usage(1);
         }
         else {
             if (fp != NULL && fp != stdin)