Re: [PATCH/RFC] CodingStyle updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott Preece wrote:
[1]
Outside of comments, documentation and except in Kconfig, spaces are never
 used for indentation, and the above example is deliberately broken.
---

I realize it isn't text you added, but what's that supposed to mean?
Surely the 8-character indents are made up of spaces.  Does it mean

No, the 8-character indents are made of one ASCII TAB character.

"spaces other than 8-space blocks"? In any case, how does it synch
with the following chapter's statement that continuations " are placed
substantially to the right" - isn't that done with spaces, too?

That's usually (preferably) done with tab(s).  Sometimes it is done
with a few spaces instead.  (and we put up with it :)

Or am I just totally spacing out on what was meant?

I take [1] to mean that this example:

	if (condition) do_this;
	  do_something_everytime;

is broken in at least 3 ways:
1/ do_this(); should be on a separate line;
2/ do_something_everytime() should not be indented more than the "if"
	above it; and
3/ *if* do_something_everytime() were to be indented more than it is,
	it should be done with a tab, not spaces.

--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux