bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-indent] unhelpful error message: unknown option ""


From: John E Hein
Subject: [Bug-indent] unhelpful error message: unknown option ""
Date: Wed, 02 Nov 2005 19:35:05 -0000

After updating from 2.2.6 to 2.2.9, I had a problem with the
--no-parameter-indentation option I was using.

As it turns out, it was removed in favor of using
just --parameter-indentation0.  The documentation was not
updated.  That's a different bug.

When I tried to use 2.2.9 for the first time, I got this:

% indent -npro -nip
indent: unknown option ""
% indent -npro --no-parameter-indentation
indent: unknown option ""

That's not a very useful error message.  It looks like somewhere
between 2.2.6 & 2.2.9, it was broken due to a new way that long/short
options are parsed.

Note that it was broken in a different way in 2.2.6 (didn't print the
same # of dashes used on the command line - or didn't strip them
correctly), but at least it was more useful.

Anyway, here's a patch to fix the error message.


--- args.c.orig Sun Nov 10 14:02:48 2002
+++ args.c      Wed Nov  2 12:24:15 2005
@@ -714,7 +714,7 @@
 
     if (!found)
     {
-        fprintf (stderr, _("indent: unknown option \"%s\"\n"), option - 1);
+        fprintf (stderr, _("indent: unknown option \"%s\"\n"), option);
         exit (invocation_error);
     }
     else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]