bug-indent
[Top][All Lists]
Advanced

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

indent 2.2.9: -bap conflicts with -npsl ?


From: dan orzechowski
Subject: indent 2.2.9: -bap conflicts with -npsl ?
Date: Tue, 18 Nov 2008 17:33:15 -0500

I'm running into a problem with indent 2.2.9 where blank lines aren't
being placed between my functions (-bap) if I also want to keep the
function's return type on the same line as the function name (-npsl).
I've pasted the output of my small test case below:

--

address@hidden: ~]$ cat test.c
#include <stdio.h>
int a = 0;
void foo(void)
{
  printf("hi\n");
}
int main(void)
{
  foo();

  return (0);
}
address@hidden: ~]$ indent --version
GNU indent 2.2.9
address@hidden: ~]$ indent -bap test.c -o /dev/stdout
#include <stdio.h>
int a = 0;
int
foo (void)
{
  printf ("hi\n");
}

int
main (void)
{
  foo ();

  return (0);
}
address@hidden: ~]$ indent -bap -npsl test.c -o /dev/stdout
#include <stdio.h>
int a = 0;
int foo (void)
{
  printf ("hi\n");
}
int main (void)
{
  foo ();

  return (0);
}

--

Is this intentional behavior?  If so (or even if not), is there a way
I can have whitespace between functions and still have the function
declaration on a single line?  Apologies in advance if this has
already been asked or answered; quick archive searches for 'npsl' and
'bap' didn't return anything useful.

thanks

- dan




reply via email to

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