indent help wrt function return types

Mike Burrell <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization University of Western Ontario
Message-ID <2008021809491916807-mburrel@SPAMuwoca>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.