[MPlayer-users] [OFF-TOPIC] Allman/BSD-style indenter

Nico Sabbi Nicola.Sabbi at poste.it
Fri Apr 25 08:06:02 CEST 2008


Il Thursday 24 April 2008 19:35:18 Don Koch ha scritto:
> On Thu, 24 Apr 2008 15:17:59 +0200
> Nico Sabbi wrote:
> 
> > Hi,
> > I'm search the right settings for GNU indent to reformat the code
> > using the Allman/BSD style, that is:
> > 
> > if(1)
> > {
> > 	int a,b;
> > 
> > 	while(a && b)
> > 	{
> > 		//something
> > 	}
> > }
> > 
> > - using exclusively tabs instead of spaces for nested blocks
> 
> -ut -ts8 -i8
> 
> (I personally hate this; the code wanders off the right side of
> the screen too fast.)
> 
> > - starting and ending braces on the same column as the
> >   starting block
> 
> -bl -bli0
> 
> > - no unneeded spaces in ()
> 
> -nprs  (default, not needed)
> 
> > in short the formatting I use in files like libmpdemux/demux_ts.c,
> > but it seems that GNU indent can't do it. Did I read incorrectly the 
> > man page?
> > Or can some other software do this?
> > 
> > Thanks,
> > 	Nico
> 
> -d

splendid, thanks!
I also needed -bad and all -np options



More information about the MPlayer-users mailing list