Patch 20040321 for audio recording with /dev/dsp (indented), test issues

Nicholas Wourms nwourms@netscape.net
Tue Mar 23 15:46:00 GMT 2004


cgf wrote:

> On Tue, Mar 23, 2004 at 12:09:33PM +0100, Corinna Vinschen wrote:
> 
>>Chris, do you have a personally approved set of indent options which
>>give a useful result, perhaps?
> 
> 
> No, I don't use indent very often.
> 
> Gdb has an indent script, though.  I've attached it to this message.  I
> can't confirm or deny if it works well for c++, though.
> 

Indent is really for C code only, so it totally botches C++ 
constructors, destructors, classes, templates, virtuals, and just about 
anything else not C (especially templates).  I was not aware that GNU 
had any style standards for C++-specific code.  But then again, I find 
their standards to be boring, so I really haven't read them.  Like 
Corinna, I usually run it through ident using -gnu and fix it up 
afterwards.  Sometimes, if you pass private, public, class names and 
method names using -T<name1> -T<name2> it won't totally screw up.  It 
still will treat labels (both C++ public/private and C goto) as if they 
were part of a switch statement, indenting them.  Also, you'll want to 
use -T to declare any non-basic typedefs, such as off_t, clock_t, or 
size_t.  If you don't, it will indent a pointer declaration as if it 
were a multiplication statement.  Anyhow, IIRC, I believe these extra 
flags can be stored in a local dot file in the directory of the source 
file being indented (.indent.pro?).

Cheers,
Nicholas



More information about the Cygwin-patches mailing list