Re: [Libphidget-devel] just playing with indent . . .
Status: Alpha
Brought to you by:
jstrohm
|
From: Vadim T. <vt...@fr...> - 2002-09-10 02:42:51
|
According to Jack Strohm: > > > hmmm, doesn't sound good. > > > > OK, preliminary research shows that I've made a major flop here :( Shouldn't > > have touched the indent at all. So far, I haven't found the tools that work > > reliably (astyle has its own problems, and there's nothing else, really...) > > > > Two ways out: > > > > 1. Roll back all the cc/c/h commits to the way it was before > > > > 2. Curse a lot, and keep the code the way it is now, and remove (rather > > comment out, though) the indent related portions of the makefile, hoping > > silently that there'll be a day when they fix their bugs. > > > > Even though I hate the GNU style, I'd rather go with #2, 'cause this is at > > least a sort of a standard... Minor mistakes that indent introduced can be > > fixed manually, should there be a need to do so. > > > > #2 gets my vote. What's yours? Remember, you're the boss here. > > I'd say #2, although, the current way the code is indented needs a bit > of work. What is GNU style exactly anyway. GNU style is what you see ;) The current contents of ./indent.rules is simply '--gnu-style', therefore, piping the source through indent produces the code formatted according to GNU style. Here's an update: I'm looking at the Apache source code - those guys made it work. The key seems to be -T option, I'll play with that and let's see what happens. Some more: if you could read 'man indent' and experiment with the detailed options a little bit, I'd feel better about the style. Granted, neither of the default styles (K&R, GNU, BSD) is not nice enough as of today. --vt |