[MPlayer-users] [OFF-TOPIC] Allman/BSD-style indenter
    Don Koch 
    aardvark at krl.com
       
    Thu Apr 24 19:35:18 CEST 2008
    
    
  
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
    
    
More information about the MPlayer-users
mailing list