Domingo Alvarez Duarte schrieb: > Matthias Melcher wrote: >> That would be a nice occasion to run some app that will re-indet the >> files.
yup, good idea >> Any suggestions for a tool? Preferably on OS X? Maybe someone even has >> the correct settings for FLTK's coding style? It would be a great advantage not only to have a coding style definition, but also to have a tool to check this. >> Xcode would be OK, but it left-aligns all comments which destroys >> doxygen indenting in /code sections :-( Probably formatting documents could be overdone. I would prefer only handling indentation and not tampering other formatings like comments. (Exception may be to force spaces between keywords and parameters like in "for (;;)", but thats not absolute required) Having a tool for automatic indenting is a great help in logical analysis and reading other sources. I dont understand the dislike of tabs for indentation, cause its up to the user what width would be used on display. So anything between start of line and the first character could be aligned with tabs. My personal opinion is: - no trailing blanks - tabs only for indentation - no reformatting of code - allow single liners - avoid multiple blank lines > I've used astyle http://astyle.sourceforge.net/ and for me it's a good agree to this. astyle does not reformats code and can handle just indents the mentioned way. For those who are interested, i like astyle -toObBL -t use tabs (width is NOT interesting, display depnds on editor) -oO keep one liners -L indent labels (like branches in switch statements) -b break brackets from pre code block, (this is a reformatting!, -a would attach) -B indent blocks, (yes its weird, or at least uncommon, but i like to have corresponding brackets on the same column. they dont get lost and vertical space is no real issue these days) So brackets in the first column are only for namespaces! FLTK's coing style would be something like astyle -toOaL Just my 2ct Gombok _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
