Stripping of whitespaces at the end of lines

Vincent Béron vberon at
Wed May 29 20:12:36 CDT 2002

Alexandre Julliard a écrit :
> Vincent Béron <vberon at> writes:
> > If Alexandre wants to do it locally, I support him (our mailboxes will
> > appreciate).
> If you want me to do that please send me a script that I can run
> across the tree to do the change. Please don't send patches for this
> kind of things.
> --
> Alexandre Julliard
> julliard at

Here it is. It only targets .c and .h files.
The diff was ~4MB in size between before and after. The savings in a
.tar.gz of the whole tree were modest, around 25KB.

Now to find a good set of arguments to feed indent(1) so we all use the
same coding style...

Not! ;)

-------------- next part --------------

FILELIST=`find . \( -name \*.c -o -name \*.h \) -print`

for eachfile in ${FILELIST}; do
	sed -e "s/[[:space:]]\+$//g" ${eachfile} >${eachfile}.${EXTENSION} ;
	sed -e "s/;\+$/;/g" ${eachfile}.${EXTENSION} >${eachfile} ;
	rm ${eachfile}.${EXTENSION} ;

More information about the wine-devel mailing list