bug-indent
[Top][All Lists]
Advanced

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

Possible buglet with use of -bad with indent v2.2.10


From: Steve McInerney
Subject: Possible buglet with use of -bad with indent v2.2.10
Date: Sat, 18 Oct 2008 21:53:05 +1100
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

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






reply via email to

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