All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch-utility] remove whitespaces from kernel sources (for any kernel version)
@ 2004-08-31 12:11 Alexander Stohr
  2004-08-31 13:41 ` Paul Wagland
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stohr @ 2004-08-31 12:11 UTC (permalink / raw)
  To: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 947 bytes --]

Hello,

the attached shell skript recursively removes
any trailing spaces and tabs from c and h files.

for current 2.6.x kernel a resulting diff had a size
of about 24 MB unpacked. i suppose that other kernel
trees will compare to this magnitude.

this means the linux kernel source has an interesting potential
for optimisation which will result in smaller tarballs,
faster compilation in misc stages of code preprocessing
and last but not least lesser fuzz in diffs for people
that do use editors which will strip such charcters by themselves.

please note that i did not use the [[:space:]] qualifier in the script
since that would strip the intentional <Form-Feed> chars as well.

i would enjoy if you could apply those patch to your kernel source.

-Alex.

PS: please CC me on replys since i am not subscribed to this list

-- 
Supergünstige DSL-Tarife + WLAN-Router für 0,- EUR*
Jetzt zu GMX wechseln und sparen http://www.gmx.net/de/go/dsl

[-- Attachment #2: strip_spc_r --]
[-- Type: application/octet-stream, Size: 206 bytes --]

#!/bin/bash
# file recursive removal of whitespaces (but not form-feed) at the end of a line
for f in `find . -name *[.][ch]`
do
  echo $f
  mv $f $f.tmp
  sed -e "s/[\t ]*$//g" $f.tmp >$f
  rm $f.tmp
done

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-31 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-31 12:11 [patch-utility] remove whitespaces from kernel sources (for any kernel version) Alexander Stohr
2004-08-31 13:41 ` Paul Wagland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.