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


_______________________________________________
bug-indent mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-indent

Reply via email to