Albrecht Schlosser wrote: > 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.
Here is a batch file to use for test and comparison, also I'm using latest astyle svn it has some improvements worth try: rem astyle.exe --options=fltk_style.txt Fl_Help_View.cxx rem astyle Domingo's options copy Fl_Text_Buffer.cxx formated0.cpp astyle -T -a -S -w -M -f -p -D -H formated0.cpp rem astyle Ian's options copy Fl_Text_Buffer.cxx formated1.cpp astyle -a -C -S -M -m0 -U -s2 -t8 -p -x -o -O -k3 formated1.cpp copy Fl_Text_Buffer.cxx formated2.cpp astyle -a -C -S -m0 -U -t8 -s2 -p -x -o -O -k3 formated2.cpp copy Fl_Text_Buffer.cxx formated3.cpp astyle -a -C -S -m0 -U -s2 -p -x -o -O -k3 formated3.cpp copy Fl_Text_Buffer.cxx formated4.cpp astyle -a -C -S -m0 -U -t8 -s2 -p -o -O -k3 formated4.cpp _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev