[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
adding feature to indent
From: |
Jean-Christophe Dubois |
Subject: |
adding feature to indent |
Date: |
Thu, 17 May 2007 10:30:18 +0200 |
User-agent: |
KMail/1.9.6 |
Hi,
I'd like to propose a patch to ease the "linux coding style" with indent.
in the Linux source tree there is a script that shows the recommended Linux
coding style using indent in scripts/Lindent. The content is as follow:
#!/bin/sh
indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs "$@"
So indent is almost there. However, anytime I post an "indented" file with
labels on a linux mailing list, I am told that any (goto) label should start
at column 1 always. I don't think there is any option in the actual indent to
force (goto) label to start at column 1.
So this is what my attached patch is doing. It adds an option to specify the
label offset and also add a "linux" profile that sums up the above line with
the new "label offset" option.
Note that if the label offset option is not specified on the command line then
there should be no change in behavior compared to the "old" indent.
I have not updated the documentation (man, ...) with the new option.
Thanks.
JC
- adding feature to indent,
Jean-Christophe Dubois <=
Re: adding feature to indent, Jean-Christophe Dubois, 2007/05/17