No option to control label indentation

Eliot Blennerhassett <[email protected]>
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
Hello,

Using indent on linux kernel source, its not possible to meet LK coding style 
requirement for labels in column 1.  Eg.

void foo(void) 
{
    goto exit:
    bar(1)
exit:
}

indent is coded to indent the label to the current code indent -2.

The relevant code is in io.c compute_label_target().
...
    else
    {
       return parser_state_tos->ind_level - LABEL_OFFSET + 1;
    }


It would be useful to have a commandline option to controls this.
Something like

    else
    {
       return parser_state_tos->ind_level - settings.label_dedent + 1;
    }

label_dedent would default to 2.
But setting it to a big number would force labels into the left  margin.

regards



-- 
--
Eliot Blennerhassett
www.audioscience.com
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.