[MPlayer-dev-eng] [bikeshed] Coding style

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Jun 16 18:10:42 CEST 2008


On Mon, 2008-06-16 at 13:45 +0200, Luca Barbato wrote:
> Given that some people seems to be fine with the cleanup weekend here 
> something to start a nice flame:
> 
> We could decide a coding style and try to be consistent as much as possible.
> 
> I like trying to leave spaces when possible but I like better having 
> *pointer, conditional blocks should keep the bracket in the same line, 
> functions the line immediately after.

Standard K&R style as generated by the -kr option of the indent program,
without any "personal" variations. Some deviations can be allowed but
they should be viewed as that, deviations from the recommended style.
Trying to create an MPlayer-specific style is a bad idea which will
cause unnecessary arguments without any real benefit and with real harm
such as making the style less obvious to people not familiar with
MPlayer.

Note that defining the style as that produced by the indent program does
not mean using the output of the program unchanged as it can't handle
everything correctly. It can't handle preprocessor tricks where they
affect formatting. One common problem is that unrecognized type names in
function argument lists produce "foo * ptr" instead of "foo *ptr".




More information about the MPlayer-dev-eng mailing list