Search code examples
ccode-formattinggnu-indent

GNU indent: which option puts function return type same line


Using GNU indent, when I used gnu style, I will end up with a source like this:

void
compute_column_indices(u32 size, s32 * ind)
{
    ...
}

But I don't want the return value (void) to sit on its own line. The linux style does it but it introduces other style aspects I don't like.

This is what I want to have done:

void compute_column_indices(u32 size, s32 * ind)
{
    ...
}

What switch to use to accomplish this? I stared at the man page and I can't find it.


Solution

  • Argh, I found it! It is --procnames-start-lines option (or -psl for short).