[MPlayer-dev-eng] the great reformatting

Clément Bœsch ubitux at gmail.com
Tue Feb 15 08:17:16 CET 2011


On Tue, Feb 15, 2011 at 01:53:55AM +0100, Diego Biurrun wrote:
> I've been experimenting with uncrustify for a while now[1].  Unlike all
> the other code formatters I have tried over the years, most prominently
> GNU indent, it screws up very little and mostly does the right thing.
> Plus, the author reacts to bug reports.
> 
> I have cooked up a suitable K&R style configuration that should work
> well with MPlayer.  I have tested against mplayer.c to my satisfaction,
> if somebody knows a trickier file, let me know.
> 
> I'm attaching the config file, it would be suitable to place under
> TOOLS or so.  Grab uncrustify from
> 
> http://uncrustify.sourceforge.net/
> 
> and experiment.  I used a git clone from today.
> 
> 
> So, in short, the time for the great reformatting is finally arriving.
> Constructive comments are welcome, skip the flaming and bikeshedding
> please.
> 

What I fear the most is the vertical alignment we can find in various
places, here for instance:

    100.0 * video_time_usage / total_time_usage,
    100.0 * vout_time_usage / total_time_usage,
    100.0 * audio_time_usage / total_time_usage,

This could have been:

    100.0 * video_time_usage / total_time_usage,
    100.0 *  vout_time_usage / total_time_usage,
    100.0 * audio_time_usage / total_time_usage,

While it's not important in this case, it could be in part with real a/v
processing where it's pleasant to have series of buffer vertical
alignments.

IMO, we can apply it on most of the code relatively safely, with two-pass
(I have the same issue as Ingo with spaces). Of course, binary
verification is still required… And we should be cautious with real a/v
processing part like the filters.

Regards,

-- 
Clément B.


More information about the MPlayer-dev-eng mailing list