All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Stohr" <Alexander.Stohr@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: [patch-utility] remove whitespaces from kernel sources (for any kernel version)
Date: Tue, 31 Aug 2004 14:11:11 +0200 (MEST)	[thread overview]
Message-ID: <17345.1093954271@www23.gmx.net> (raw)

[-- 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

             reply	other threads:[~2004-08-31 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 12:11 Alexander Stohr [this message]
2004-08-31 13:41 ` [patch-utility] remove whitespaces from kernel sources (for any kernel version) Paul Wagland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17345.1093954271@www23.gmx.net \
    --to=alexander.stohr@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.