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 files with problems. I doubt Christos verified
> each and every source file.
>
I was not found other problematic files but yes it is possible that
there are other problematic files too. It is very difficult to examine
all the code. Looking the diffs it is possible I am loosing thinks...
>
> Agreed. And I think it would be fairly easy to disable that in code
> since there is already a command line option that affects the behavior.
> In fact, Christos, have you tried using "-cc 0"?
Yes, using this parameter the comment go to the previews line:
test++; /*A comment*/
converted to:
/*A comment */
test++;
>
>> Does it still do that if the comments are seperate from code lines? I'm
>> thinking how would this affect the longer comments and auto-docs comments
>> might be a problem.
>
> Yes, needs checking.
There is not any problem here. The comments have the same indentation as
the code.
> I did not count any showstoppers for bcpp.
I think the (1), (2) (3) and (4) are just formating styles and there is
not any problem with them. The problematic cases are the (5) (6) and (7)
which maybe can fixed using a perl script like this we trying to build
for use with astyle.
I must say that the bcpp is not trying to add/remove spaces located
inside the code (sorry I did not mentioned before ). For example does
not trying to format the following:
afunc(a,b, t);
Because of that it is a simpler formatter and this is why it makes less
mistakes.
The astyle in the other hand trying to be a full formatter but in some
cases breaks the code which is bad........
Also for bcpp looks easier to touch its code, but I can not say how easy
is to fix thinks ( and possibly it is better to spend this time for
squid ...)
>
> I doubt the rest is OK for astyle, and we should not forget that astyle
> requires pre- and post-processing. It is likely that similar pre-post
> processing or code modification can fix bcpp problems as well.
>
> In general, I think astyle _quality_ is much worse (it actually breaks
> valid programs), but bcpp is a dead project (last change - 2005/07/25)
> and astyle does show signs of life once in a while.
>
> I think the biggest question right now is whether Christos can confirm
> that astyle (with pre- and post-processing) screws up only two source
> files.
>
> Thank you,
>
> Alex.
>
>
>
Received on Wed Feb 13 2008 - 11:35:41 MST
This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST