Re: [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle



On Fri, Jul 20, 2007 at 10:50:42PM +0200, Oleg Verych wrote:
Of course, we can't add this flag to Lindent until it's widely
circulating amongst the distributions. Perhaps we can add this to
Lindent in the meantime:

sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"

which will replace the leading tabs and spaces with one space.
It should leave case labels unmolested, as they should be indented with
tabs, not 6 spaces.

Any regexp ninjas want to have a go at something better?

I'm the one. Trying to write portable, optimized and easy to
understand scripts [0].

Please, describe more what must be done, and i will do it. Case labels
are handled very strangely in you example.

OK. indent will indent labels to a column number that's a multiple of
8, plus 6. So it may start in column 6, 14, 20, 28, etc. I'm not quite
sure what the definition of a label is; I had it as \w*: up there, but I
don't know if that would match the _. The point is to *not* handle case
labels, only goto labels.

--
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: checking out my usercontrol
    ... can it be a side effect of the overflow problem? ... it's the positioning of all labels that involves the overflow.... ... When I click on say 'May' all the tabs change, ... all to check out my calendar control written in VB6. ...
    (microsoft.public.vb.general.discussion)
  • Re: typing and printing tabs for s files
    ... If you don't have a product code and the tabs are not standard, ... Word MVP web site http://word.mvps.org ... Use Word's Labels feature, click the ...
    (microsoft.public.word.docmanagement)
  • Fixing lables after GNU indent (Re: [PATCH 1/2] run scripts/Lindent on it to match Documentation/Cod
    ... which will replace the leading tabs and spaces with one space. ... It should leave case labels unmolested, as they should be indented with ... indent will indent labels to a column number that's a multiple of ... tab, and a label, i.e. `label_name:' without space before colon; ...
    (Linux-Kernel)
  • Re: Fw: [PATCH][RFC] PCMCIA support for 8xx using platform devices
    ... DTC supports labels now; we should be using those instead of hardcoded ... phandles. ... Also, please indent by tabs. ...
    (Linux-Kernel)
  • Re: Not To Repeat the Labels
    ... A messy way would be to apply some soft of naming convention to your labels ... Visible property of the various labels as appropriate. ... > have different labels and controls. ... > in all 3 tabs. ...
    (microsoft.public.access.forms)