Possible buglet with use of -bad with indent v2.2.10
Steve McInerney <[email protected]>
| Newsgroups | gmane.comp.gnu.indent.bugs |
|---|---|
| Message-ID | <[email protected]> |
When using the -bad option with v2.2.10, all *lines* of declarations get a
blank line added, vs blocks of declarations.
Used to work fine with v2.2.9.
eg. See below.
Cheers!
- Steve
PS Thanks for a truly wonderful program. Has saved me vast numbers of hours
fixing my poor formatting. :-)
$ cat test1.c
#include <stdio.h>
char *foo;
char *bar;
/* This separates blocks of declarations. */
int baz;
main ()
{
printf("Hello World\n");
exit (0);
}
$ /usr/local/bin/indent --version
GNU indent 2.2.10
$ /usr/local/bin/indent -v -npro -bad test1.c -o /dev/stdout
option: npro
option: bad
option: o
#include <stdio.h>
char *foo;
char *bar;
/* This separates blocks of declarations. */
int baz;
main ()
{
printf ("Hello World\n");
exit (0);
}
There were 10 non-blank output lines and 1 comments
(Lines with comments)/(Lines with code): 0.111
$ /usr/local/bin/indent -v -npro -nbad test1.c -o /dev/stdout
option: npro
option: nbad
option: o
#include <stdio.h>
char *foo;
char *bar;
/* This separates blocks of declarations. */
int baz;
main ()
{
printf ("Hello World\n");
exit (0);
}
There were 10 non-blank output lines and 1 comments
(Lines with comments)/(Lines with code): 0.111