[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
indent help wrt function return types
From: |
Mike Burrell |
Subject: |
indent help wrt function return types |
Date: |
Mon, 18 Feb 2008 14:49:21 GMT |
User-agent: |
Unison/1.7.9 |
Hello all!
I'm trying to come up with GNU Indent options that will get a C
function with a storage class modifier (namely "static") to come out
looking like:
static
int
foo(void)
{
return 5;
}
I thought a simple "-psl" option would handle this, but unfortunately
with -psl, that looks like:
static
int
foo(void)
{
return 5;
}
(if it's not clear, the "int" is indented one level, instead of being
in the first column). I tried setting -ci0, -cli0, -p0, -d0, -di0,
etc., trying to get that "int" to not indent, but I can't make it
happen. For what it's worth, if the function returns a pointer type,
then it works perfectly, e.g.:
static
int *
foo(void)
{
return 0;
}
Also, if the function does not have a storage class modifier (i.e.,
it's not "static"), then this problem doesn't come up.
Can anyone shed some light on what option I need to give indent to make
the "int" always show up in the first column? Any help would be
appreciated.
indent --version yields "GNU indent 2.2.9"
Thanks a bunch,
Mike
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- indent help wrt function return types,
Mike Burrell <=