Unbork fs.h
grep -r "sizeof (" linux | wc -l,
grep -r "sizeof(" linux | wc -l:
sizeof (foo): 1611, sizeof(foo): 19364 => -bs should be removed
> > -psl: Put the type of a procedure on the line before its name.
grep -r -B2 "^{" linux | grep "^[^ ]*(" | wc -l,
grep -r -B2 "^{" linux | grep "^.* .*(" | wc -l:
int
foo(int x): 11408, int foo(int x): 57275 => -psl should be removedI do not think good style is best defined by majority vote.
grep -r "\*) [a-z_(]" . | wc -l,
grep -r "\*)[a-z_(]" . | wc -l:
(void *) foo: 11274, (void *)foo: 17062 => -ncs should be added
> Not putting a space after a cast is gross ;)
Well, it seems you are in the (slight) minority on this one. It's not as big a margin as the other ones, but still measurable. I wasn't able to find any examples from the King Penguin himself on this one.
Read old kernel sources.
de = (struct minix_dir_entry *) (offset + bh->b_data); :"S" ((long) name),"D" ((long) buffer),"c" (len) if (32 != sizeof (struct minix_inode))
Quoted 6 lines · On Jan 04, 2002 15:16 +0000, [email protected] wrote:
sizeof (foo): 1611, sizeof(foo): 19364 => -bs should be removed int foo(int x): 11408, int foo(int x): 57275 => -psl should be removedI do not think good style is best defined by majority vote.
Certainly not. However, the Lindent style I'm trying to achieve is that dictated by Linus. However, CodingStyle doesn't give all of the details of how code should be formatted, so I have to look at the code to see what is actually there.
Quoted 9 lines
(void *) foo: 11274, (void *)foo: 17062 => -ncs should be addedRead old kernel sources.
de = (struct minix_dir_entry *) (offset + bh->b_data); :"S" ((long) name),"D" ((long) buffer),"c" (len) if (32 != sizeof (struct minix_inode))
Well, that's what I was trying to do when I found out that lksr.org (hosted by innominate.de) was not available. It seems the -ncs change is incorrect then (although my preference is to add it - there doesn't seem to me to be any benefit of having the extra space).
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
Quoted 19 lines · Andreas Dilger
Quoted 6 lines · On Jan 04, 2002 15:16 +0000, [email protected] wrote:
sizeof (foo): 1611, sizeof(foo): 19364 => -bs should be removed int foo(int x): 11408, int foo(int x): 57275 => -psl should be removedI do not think good style is best defined by majority vote.
Certainly not. However, the Lindent style I'm trying to achieve is that dictated by Linus. However, CodingStyle doesn't give all of the details of how code should be formatted, so I have to look at the code to see what is actually there.
Quoted 6 lines
(void *) foo: 11274, (void *)foo: 17062 => -ncs should be addedRead old kernel sources.
de = (struct minix_dir_entry *) (offset + bh->b_data);
Quoted 8 lines
Quoted 3 lines
:"S" ((long) name),"D" ((long) buffer),"c" (len) if (32 != sizeof (struct minix_inode))Well, that's what I was trying to do when I found out that lksr.org (hosted by innominate.de) was not available. It seems the -ncs change is incorrect then (although my preference is to add it - there doesn't seem to me to be any benefit of having the extra space).
Thomas Graichen told me that lksr.org will be back up 'soon'. Innominate.org is back up, run by Gerrit Pape, one of a group of Berliners who call themselves 'exnominate' (that would include me). In fact, innominate itself is back, but that's a whole nuther story.
p.s., if Andries is right - and he probably is - then it looks like Linus's habitual style is 'space after cast' and 'space after sizeof'. We could always ask.
If we put enough work into lindent, maybe we'll come up with a Linusbot?
--
Daniel