Re: a simple formatter

2008-02-21 Thread Tsantilas Christos
Hi all, I believe, I solved (most of?) the problems in astyle. I am attaching the new version of the formatter.pl I test it only using the astyle version 1.21. This version does simpler hooks than the previous versions. The input filter: 1) Converts patterns unsigned int aparam:1;

Re: a simple formatter

2008-02-21 Thread Alex Rousskov
On Thu, 2008-02-21 at 20:01 +0200, Tsantilas Christos wrote: I believe, I solved (most of?) the problems in astyle. I am attaching the new version of the formatter.pl I test it only using the astyle version 1.21. Christos, Thanks a lot for polishing this! Any objections to

Re: a simple formatter

2008-02-13 Thread Alex Rousskov
On Wed, 2008-02-13 at 20:35 +0200, Tsantilas Christos wrote: Alex Rousskov wrote: On Wed, 2008-02-13 at 13:52 +1300, Amos Jeffries wrote: Or is it possible to omit the src/tools.cc src/stat.cc files from astyle until they can be cleaned manually to work better. I bet there are other

Re: a simple formatter

2008-02-13 Thread Tsantilas Christos
Alex Rousskov wrote: On Wed, 2008-02-13 at 20:35 +0200, Tsantilas Christos wrote: Alex Rousskov wrote: On Wed, 2008-02-13 at 13:52 +1300, Amos Jeffries wrote: Or is it possible to omit the src/tools.cc src/stat.cc files from astyle until they can be cleaned manually to work better. I bet

Re: a simple formatter

2008-02-11 Thread Robert Collins
On Fri, 2008-02-08 at 23:26 +0200, Tsantilas Christos wrote: Alex Rousskov wrote: Changes in the current code are only bad for outstanding patches and forgotten branches, right? If everybody applies the same formatting to all their branches and HEAD, we should not have many conflicts,

Re: a simple formatter

2008-02-08 Thread Amos Jeffries
Tsantilas Christos wrote: On Fri, 2008-02-08 at 16:10 +1300, Amos Jeffries wrote: The same() operations used in those tests may be different from a same_MD5s() operation. Try inserting an empty line in a middle of a function and recompile. You will get a different MD5. Stripping the executable

Re: a simple formatter

2008-02-07 Thread Tsantilas Christos
Tested. I have made a (small) file of the structures I've noticed past formatting errors on. With a manual fix-up to what I think it should look like in readable C++ under the published squid formatting description. The output of your script does this: .. It is the

Re: a simple formatter

2008-02-07 Thread Amos Jeffries
Tested. I have made a (small) file of the structures I've noticed past formatting errors on. With a manual fix-up to what I think it should look like in readable C++ under the published squid formatting description. The output of your script does this: .. It is the

Re: a simple formatter

2008-02-07 Thread Alex Rousskov
On Wed, 2008-02-06 at 21:26 +0200, Tsantilas Christos wrote: Do we need something like that? Any comments/suggestions? Any testers? I believe we do and I appreciate you working on it! Please try to fix the remaining problems Amos pointed out. Also, can you apply it to the entire Squid tree,

Re: a simple formatter

2008-02-07 Thread Amos Jeffries
On Wed, 2008-02-06 at 21:26 +0200, Tsantilas Christos wrote: Do we need something like that? Any comments/suggestions? Any testers? I believe we do and I appreciate you working on it! Please try to fix the remaining problems Amos pointed out. Also, can you apply it to the entire Squid tree,

Re: a simple formatter

2008-02-07 Thread Alex Rousskov
On Fri, 2008-02-08 at 14:31 +1300, Amos Jeffries wrote: On Wed, 2008-02-06 at 21:26 +0200, Tsantilas Christos wrote: Do we need something like that? Any comments/suggestions? Any testers? I believe we do and I appreciate you working on it! Please try to fix the remaining problems Amos

Re: a simple formatter

2008-02-07 Thread Amos Jeffries
On Fri, 2008-02-08 at 14:31 +1300, Amos Jeffries wrote: On Wed, 2008-02-06 at 21:26 +0200, Tsantilas Christos wrote: Do we need something like that? Any comments/suggestions? Any testers? I believe we do and I appreciate you working on it! Please try to fix the remaining problems Amos

a simple formatter

2008-02-06 Thread Tsantilas Christos
Hi all, I wrote a small perl script which fixes (some of) the astyle problems. Before use it, you must adjust the $ASTYLE_BIN variable at the beggining of the formatter.pl file. I am running it using the following command: # find . -name *.cc -exec formater.pl \{\} \; but it can take

Re: a simple formatter

2008-02-06 Thread Amos Jeffries
Hi all, I wrote a small perl script which fixes (some of) the astyle problems. Before use it, you must adjust the $ASTYLE_BIN variable at the beggining of the formatter.pl file. I am running it using the following command: # find . -name *.cc -exec formater.pl \{\} \; but it can take