public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.5] quotemarks and trailing whitespaces (1st, revisited)
@ 2002-06-12 21:21 Lightweight patch manager
  2002-06-23 11:50 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Lightweight patch manager @ 2002-06-12 21:21 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Linus Torvalds

I redid the quotemark patch. Since I'm a lazy typist, I had a script which
removed all whitespaces before virtual or real newline characters. Does
this one look OK to you?

This patch is available as
<URL:http://luckynet.dynu.com/~thunder/patches/double-quotes-1-rev.patch>
-- 
Lightweight patch manager using pine. If you have any objections, tell me.


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

* Re: [PATCH][2.5] quotemarks and trailing whitespaces (1st, revisited)
  2002-06-12 21:21 [PATCH][2.5] quotemarks and trailing whitespaces (1st, revisited) Lightweight patch manager
@ 2002-06-23 11:50 ` Pavel Machek
  2002-06-24 14:53   ` Padraig Brady
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2002-06-23 11:50 UTC (permalink / raw)
  To: Lightweight patch manager; +Cc: Linux Kernel Mailing List, Linus Torvalds

Hi!

> I redid the quotemark patch. Since I'm a lazy typist, I had a script which
> removed all whitespaces before virtual or real newline characters. Does
> this one look OK to you?

Perhaps such patch should go to scripts/ in distribution, so when
someone finishes big cleanup for driver can run it at the same time?
									Pavel
-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa

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

* Re: [PATCH][2.5] quotemarks and trailing whitespaces (1st, revisited)
  2002-06-23 11:50 ` Pavel Machek
@ 2002-06-24 14:53   ` Padraig Brady
  0 siblings, 0 replies; 3+ messages in thread
From: Padraig Brady @ 2002-06-24 14:53 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Lightweight patch manager, Linux Kernel Mailing List,
	Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

Pavel Machek wrote:
> Hi!
> 
> 
>>I redid the quotemark patch. Since I'm a lazy typist, I had a script which
>>removed all whitespaces before virtual or real newline characters. Does
>>this one look OK to you?
> 
> 
> Perhaps such patch should go to scripts/ in distribution, so when
> someone finishes big cleanup for driver can run it at the same time?
> 									Pavel

This thread is probably of interest.
http://marc.theaimsgroup.com/?l=linux-kernel&m=100653615123970&w=2
It was just when 2.5.0 came out since I thought it was the
most appropriate time for something like this.
Anyway the simple script I used is attached.
Note for 2.5.0 it removed 224,654 bytes.

Padraig.

[-- Attachment #2: rmws --]
[-- Type: text/plain, Size: 902 bytes --]

#!/bin/sh
# Remove trailing whitespace. By default it runs
# in the current directry, on all files, but you 
# can change this by passing parameters as you 
# would to find.
#
# Note this doesn't change file (timestamps)
# which don't need to be updated.

#Note super sed has a -i option to do this (edit files in place)
#also perl can edit files in place easily.

# Temporary file
temp=/tmp/runsed$$

find "$@" -type f -print |
while read file
do
    echo -n "editing $file: "
    if test -s $file; then
       sed -e 's/[ 	]*$//g' <$file > $temp
       if test -s $temp; then
           if cmp -s $file $temp; then
             echo -n "file not changed: "
           else
             cp $temp $file
           fi
           echo "done"
       else
           echo "produced an empty file - aborting"
       fi
    else
       echo "original file is empty."
    fi
done
echo "all done"
rm -f $temp


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

end of thread, other threads:[~2002-06-24 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-12 21:21 [PATCH][2.5] quotemarks and trailing whitespaces (1st, revisited) Lightweight patch manager
2002-06-23 11:50 ` Pavel Machek
2002-06-24 14:53   ` Padraig Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox