[MPlayer-dev-eng] Question about patches

Arpi arpi at thot.banki.hu
Sat Jan 4 21:04:25 CET 2003


Hi,

> Hi.
> 
> I know that you don't want patches that simply change the indenting of
> e.g. loops or functions. But what about if it becomes necessary to
> indent a whole block, e.g. because it now resides in a for loop? Is it
> acceptable to change the indenting for this block, or not? (I'd really
> like to, because it makes reading the source a lot easier, but I'll
> follow your rules of couse).

quoting cvs-howto.txt policy section:

5. We refuse source indentation and other cosmetical changes, such commits will
   be rejected and removed. Every developer has his own indentation style, you
   should not change it. Of course if you (re)write something, you can use your
   own style... (Many projects force a given indentation style - we don't.)
   Note: If you had to put if(){ .. } over a large (> 5 lines) chunk of code,
   do NOT change the indentation of the inner part (move it right)!


ie if it's just a few lines, then ok to move them.
if it's a big block, then place your new { } between the 2 indent depth.

for(x=0;x<w;x++){
	for(y=0;y<h;y++){
		something_long_code(x,y);
	}
}

changed to:

for(x=0;x<w;x++){
        for(y=0;y<h;y++){
	    for(i=0;i<3;i++){
                something_long_code(x,y);
	    }
        }
}



A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu


More information about the MPlayer-dev-eng mailing list