lkml.org 
[lkml]   [2005]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 20 Jul 2005 09:52:40 +0200 (MEST)
FromJan Engelhardt <>
SubjectRe: kernel guide to space

> 3) If a normal line of code is more than 80 characters, one of the
> following is probably true: you need to break the line up and use temps
> for clarity, or your function is so big that you're tabbing over too
> far.

(Find source files, expand tab chars to their on-screen length, print if
>= 80, count lines)

~/linux-2.6.12 >
find . -type f "(" -iname "*.c" -o -iname "*.h" -o -iname "*.S" ")" -print0 |
xargs -0 perl -pe '1 while s/\t+/" "x(length($&)*8-length($`)%8)/e' | \
perl -ne 'print if/.{80}/' | \
wc -l
208420
If the indent was just 4 spc wide, the number of extending
lines is just 131925.


Jan Engelhardt
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-20 09:56    [from the cache]
©2003-2010