Greg Ercolano wrote:
> Albrecht Schlosser wrote:
>> BTW: I used Fl_Help_View.cxx for my tests, because this is
>> definitely not in the correct FLTK style.
>>
>> Maybe we could do a one-shot-formatting with manual cleanup?
>> Find another tool ?
>> Or leave it as it is ...>
> I'd be happy to do a manual cleanup of Fl_Help_View.cxx's indents.
> What svn branch is this, and I'll check it out, fix it, put it back.
Of course, *the* branch (FLTK 1.3) - but wait a moment ...
That was only an example. I think that we're trying to find a
solution, and such an example is a good working base to find
the right tool. Once we have a decision, we might have a tool
(and no one needs to do anything) or we may have lots of work
to do.
Let's make a contest: ;-)
We should try to find the best options and share them, as Ian
started today with astyle, and see what we can find out.
Ian's options for astyle, in the order he wrote them today:
#1: astyle -a -C -S -M -m0 -U -s2 -t8 -p -x -o -O -k3
#2: astyle -a -C -S -m0 -U -t8 -s2 -p -x -o -O -k3
#3: astyle -a -C -S -m0 -U -s2 -p -x -o -O -k3
#4: astyle -a -C -S -m0 -U -t8 -s2 -p -o -O -k3
I experimented with some of them, and I agree that #4 is
probably the best choice so far.
My quick reference:
$ astyle Ian's options
-----------------------------------------------------------------
-a --brackets=attach
-C --indent-classes
-S --indent-switches
-M --max-instatement-indent [ =40 ] ( < 80 )
-m0 --min-conditional-indent=#
-U --unpad-paren
-t8 tab == 8 spaces \ _ ordering is significant (?)
-s2 indent 2 spaces /
-p --pad-oper ??? [removed]
-x --delete-empty-lines ??? [removed]
-o --keep-one-line-statements
-O --keep-one-line-blocks
-k3 --align-pointer=name
-----------------------------------------------------------------
More options to test
-----------------------------------------------------------------
-T --indent-force-tab [ =8 ]
-l --brackets=linux (break functions,classes,namespaces,
attach otherwise (statements))
-K --indent-cases
-z# --lineend=... 1=windows, 2=linux, 3=macold
Please note that Cygwin's astyle (1.23) doesn't support -k3, maybe
that's one of the problems I saw.
But that would be another problem: we would all need to use the
*same* versions of the *same* tool with the *same* setup so that
we wouldn't always reformat the files with different layouts.
... or do a one-time formatting, or do nothing at all ...
Other options/tools/ideas?
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev