On Thu, 14 Dec 2006, Randy Dunlap wrote:
> On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote:
>
> > On Thu, 14 Dec 2006, Randy Dunlap wrote:
> >
> > > David Weinehall wrote:
> > > > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
> > > >
> > > > [snip]
> > > >
> > > >
On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote:
> On Thu, 14 Dec 2006, Randy Dunlap wrote:
>
> > David Weinehall wrote:
> > > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
> > >
> > > [snip]
> > >
> > > > +but no space after unary operators:
> > > > +
On Thu, 14 Dec 2006, Randy Dunlap wrote:
> David Weinehall wrote:
> > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
> >
> > [snip]
> >
> > > +but no space after unary operators:
> > > + sizeof ++ -- & * + - ~ ! defined
> >
> > Uhm, that doesn't compute... If you
On 12/14/06, Randy Dunlap <[EMAIL PROTECTED]> wrote:
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
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
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
"spaces
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
> +but no space after unary operators:
> + sizeof ++ -- & * + - ~ ! defined
Uhm, that doesn't compute... If you don't put a space after sizeof,
the program won't compile.
int c;
printf("%d", sizeofc);
David Weinehall wrote:
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
+but no space after unary operators:
+ sizeof ++ -- & * + - ~ ! defined
Uhm, that doesn't compute... If you don't put a space after sizeof,
the program won't compile.
int c;
David Weinehall wrote:
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
+but no space after unary operators:
+ sizeof ++ --* + - ~ ! defined
Uhm, that doesn't compute... If you don't put a space after sizeof,
the program won't compile.
int c;
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
+but no space after unary operators:
+ sizeof ++ --* + - ~ ! defined
Uhm, that doesn't compute... If you don't put a space after sizeof,
the program won't compile.
int c;
printf(%d, sizeofc);
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
spaces
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
On 12/14/06, Randy Dunlap [EMAIL PROTECTED] wrote:
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
On Thu, 14 Dec 2006, Randy Dunlap wrote:
David Weinehall wrote:
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
+but no space after unary operators:
+ sizeof ++ --* + - ~ ! defined
Uhm, that doesn't compute... If you don't put a space
On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote:
On Thu, 14 Dec 2006, Randy Dunlap wrote:
David Weinehall wrote:
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
+but no space after unary operators:
+ sizeof ++ --*
On Thu, 14 Dec 2006, Randy Dunlap wrote:
On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote:
On Thu, 14 Dec 2006, Randy Dunlap wrote:
David Weinehall wrote:
On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
[snip]
+but no space after unary
On Dec 7 2006 15:00, Randy Dunlap wrote:
>
>> > +but no space after unary operators:
>> > + sizeof ++ -- & * + - ~ ! defined
>>
>> You could mention typeof too, which is a keyword but should be done like
>> sizeof.
>
> Hm, is that a gcc-ism? It's not listed in the C99 spec.
>
On Thu, 07 Dec 2006 15:06:35 -0800 (PST) David Miller wrote:
> From: Randy Dunlap <[EMAIL PROTECTED]>
> Date: Thu, 07 Dec 2006 15:00:31 -0800
>
> > Alistair John Strachan wrote:
> >
> > >> +but no space after unary operators:
> > >> +sizeof ++ -- & * + - ~ ! defined
> >
From: Randy Dunlap <[EMAIL PROTECTED]>
Date: Thu, 07 Dec 2006 15:00:31 -0800
> Alistair John Strachan wrote:
>
> >> +but no space after unary operators:
> >> + sizeof ++ -- & * + - ~ ! defined
> >
> > You could mention typeof too, which is a keyword but should be done like
>
Alistair John Strachan wrote:
+but no space after unary operators:
+ sizeof ++ -- & * + - ~ ! defined
You could mention typeof too, which is a keyword but should be done like
sizeof.
Hm, is that a gcc-ism? It's not listed in the C99 spec.
Are there other gcc-isms
Hi Randy,
On Thursday 07 December 2006 08:48, Randy Dunlap wrote:
[snip]
> + 3.1: Spaces
> +
> +Linux kernel style for use of spaces depends (mostly) on
> +function-versus-keyword usage. Use a space after (most) keywords.
> +The notable exception is "sizeof", which looks like a
Jan Engelhardt wrote:
On Dec 7 2006 00:48, Randy Dunlap wrote:
+The preferred way to ease multiple indentation levels in a switch
+statement is to align the "switch" and its subordinate "case" labels in
+the same column instead of "double-indenting" the "case" labels. E.g.:
+
+ switch
Jan Engelhardt wrote:
What keyword is "defined"? Did you have too much Perl coffee? :)
Maybe macro formatting?
#if defined(CONFIG_FOO)
Yes, that's it.
Ah thanks for the hint. This also raises another stylistic aspect:
#ifdef XYZ over #if defined(XYZ) when there is only one macro to be
>> What keyword is "defined"? Did you have too much Perl coffee? :)
>
> Maybe macro formatting?
>
> #if defined(CONFIG_FOO)
Ah thanks for the hint. This also raises another stylistic aspect:
#ifdef XYZ over #if defined(XYZ) when there is only one macro to be
tested for.
-`J'
--
-
To
Jan Engelhardt wrote:
What keyword is "defined"? Did you have too much Perl coffee? :)
Maybe macro formatting?
#if defined(CONFIG_FOO)
Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at
On Dec 7 2006 00:48, Randy Dunlap wrote:
>+The preferred way to ease multiple indentation levels in a switch
>+statement is to align the "switch" and its subordinate "case" labels in
>+the same column instead of "double-indenting" the "case" labels. E.g.:
>+
>+ switch (suffix) {
>+
On 07/12/06, Randy Dunlap <[EMAIL PROTECTED]> wrote:
From: Randy Dunlap <[EMAIL PROTECTED]>
Add some kernel coding style comments, mostly pulled from emails
by Andrew Morton, Jesper Juhl, and Randy Dunlap.
- add paragraph on switch/case indentation
- add paragraph on multiple-assignments
- add
From: Randy Dunlap <[EMAIL PROTECTED]>
Add some kernel coding style comments, mostly pulled from emails
by Andrew Morton, Jesper Juhl, and Randy Dunlap.
- add paragraph on switch/case indentation
- add paragraph on multiple-assignments
- add more on Braces
- add section on Spaces
- add paragraph
From: Randy Dunlap [EMAIL PROTECTED]
Add some kernel coding style comments, mostly pulled from emails
by Andrew Morton, Jesper Juhl, and Randy Dunlap.
- add paragraph on switch/case indentation
- add paragraph on multiple-assignments
- add more on Braces
- add section on Spaces
- add paragraph
On 07/12/06, Randy Dunlap [EMAIL PROTECTED] wrote:
From: Randy Dunlap [EMAIL PROTECTED]
Add some kernel coding style comments, mostly pulled from emails
by Andrew Morton, Jesper Juhl, and Randy Dunlap.
- add paragraph on switch/case indentation
- add paragraph on multiple-assignments
- add
On Dec 7 2006 00:48, Randy Dunlap wrote:
+The preferred way to ease multiple indentation levels in a switch
+statement is to align the switch and its subordinate case labels in
+the same column instead of double-indenting the case labels. E.g.:
+
+ switch (suffix) {
+ case 'G':
+
Jan Engelhardt wrote:
What keyword is defined? Did you have too much Perl coffee? :)
Maybe macro formatting?
#if defined(CONFIG_FOO)
Chris
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at
What keyword is defined? Did you have too much Perl coffee? :)
Maybe macro formatting?
#if defined(CONFIG_FOO)
Ah thanks for the hint. This also raises another stylistic aspect:
#ifdef XYZ over #if defined(XYZ) when there is only one macro to be
tested for.
-`J'
--
-
To
Jan Engelhardt wrote:
On Dec 7 2006 00:48, Randy Dunlap wrote:
+The preferred way to ease multiple indentation levels in a switch
+statement is to align the switch and its subordinate case labels in
+the same column instead of double-indenting the case labels. E.g.:
+
+ switch (suffix) {
Jan Engelhardt wrote:
What keyword is defined? Did you have too much Perl coffee? :)
Maybe macro formatting?
#if defined(CONFIG_FOO)
Yes, that's it.
Ah thanks for the hint. This also raises another stylistic aspect:
#ifdef XYZ over #if defined(XYZ) when there is only one macro to be
Hi Randy,
On Thursday 07 December 2006 08:48, Randy Dunlap wrote:
[snip]
+ 3.1: Spaces
+
+Linux kernel style for use of spaces depends (mostly) on
+function-versus-keyword usage. Use a space after (most) keywords.
+The notable exception is sizeof, which looks like a function
Alistair John Strachan wrote:
+but no space after unary operators:
+ sizeof ++ --* + - ~ ! defined
You could mention typeof too, which is a keyword but should be done like
sizeof.
Hm, is that a gcc-ism? It's not listed in the C99 spec.
Are there other gcc-isms
From: Randy Dunlap [EMAIL PROTECTED]
Date: Thu, 07 Dec 2006 15:00:31 -0800
Alistair John Strachan wrote:
+but no space after unary operators:
+ sizeof ++ --* + - ~ ! defined
You could mention typeof too, which is a keyword but should be done like
sizeof.
Hm,
On Thu, 07 Dec 2006 15:06:35 -0800 (PST) David Miller wrote:
From: Randy Dunlap [EMAIL PROTECTED]
Date: Thu, 07 Dec 2006 15:00:31 -0800
Alistair John Strachan wrote:
+but no space after unary operators:
+sizeof ++ --* + - ~ ! defined
You could
On Dec 7 2006 15:00, Randy Dunlap wrote:
+but no space after unary operators:
+ sizeof ++ --* + - ~ ! defined
You could mention typeof too, which is a keyword but should be done like
sizeof.
Hm, is that a gcc-ism? It's not listed in the C99 spec.
Are there other
40 matches
Mail list logo