Alexandre Julliard a écrit :
Vincent Béron vberon@mecano.gme.usherb.ca 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@winehq.com
Here it is. It only targets .c and .h files.
Looks good.
<shameless-plug-for-perl>
However the script can be written much shorter in Perl
find . -name '*.[ch]' | xargs perl -i -pe 's/[ \t]+$//; s/;;+$/;/'
</shameless-plug-for-perl>
The diff was ~4MB in size between before and after. The savings in a .tar.gz of the whole tree were modest, around 25KB.
I have read through the diff (rather quickly) and it seem to be OK. In fact I can't think of anything in the C semantics that can make a difference if trailing whitespace or extra semicolon is removed.
Now to find a good set of arguments to feed indent(1) so we all use the same coding style...
Not! ;)
Good luck finding something that everybody can agree upon. :-)
Patrik Stridvall a écrit :
Here it is. It only targets .c and .h files.
Looks good.
<shameless-plug-for-perl>
However the script can be written much shorter in Perl
find . -name '*.[ch]' | xargs perl -i -pe 's/[ \t]+$//; s/;;+$/;/'
</shameless-plug-for-perl>
Unfortunately for me, Perl is still in my "to learn" pile of stuff. But I will learn it, someday...
The diff was ~4MB in size between before and after. The savings in a .tar.gz of the whole tree were modest, around 25KB.
I have read through the diff (rather quickly) and it seem to be OK. In fact I can't think of anything in the C semantics that can make a difference if trailing whitespace or extra semicolon is removed.
Thanks for the checking.
Vincent
Patrik Stridvall wrote:
I have read through the diff (rather quickly) and it seem to be OK. In fact I can't think of anything in the C semantics that can make a difference if trailing whitespace or extra semicolon is removed.
<petty asshole response> I can. printf("blah blah blah _ ");
Remove the trailing whitespace and the thing actually compiles </petty asshole response>