> Related to FLTK 3: since I have touched EVERY file of FLTK3 anyways,
> there is no need to keep history of a file or do a diff at some point.
> That would be a nice occasion to run some app that will re-indent the
> files.
>
> Any suggestions for a tool? Preferably on OS X? Maybe someone even has =
> the correct settings for FLTK's coding style?

It's a good opportunity, and a good idea, but...

I've only ever tried "indent" in the past, which seems to have
zillions of combinations of options, but I could never manage to get
it to generate the code in the format the *I* wanted. Your best bet
is to choose a set of options, and let that define your formatting
style. And then add the indent options to the CMP / coding standards.

I've just re-read the man page. There's an option that tells indent
not to reformat any comments at all [-nfca, --dont-format-comments]
otherwise it will reformat all comments except "boxed" comments. As
far as doxygen comments are concerned, I argued against using "boxed"
comments because they are a pain to maintain. Sigh...

FLTK code isn't *my* code, and I have to conform to the FLTK coding
standards, so I can live with whatever tool/options are chosen.

I gave up on indent, because the code I had inherited was very like
FLTK's, with long names, lots of arguments to functions, and lots of
if and while statements with multiple calls to those functions in
the conditionals, and I didn't like the resulting layout at all.
And if you impose an 80-char line length too, which is what I always
try to work with to make printing easier or to allow cut and paste
into design documents, indent comes up with some bizarre layouts.

In conclusion: indent is powerful, but whichever options you choose
are not going to please all of the developers all of the time. And I
suspect this will be true of whichever tool you use. You also have to
decide whether this is a one-off reformatting, or whether all code
has to go through such a tool before every check-in...

Cheers
D
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to