[MPlayer-dev-eng] the great reformatting

Ingo Brückl ib at wupperonline.de
Tue Feb 22 10:34:25 CET 2011


Clément Boesch wrote on Tue, 22 Feb 2011 00:00:38 +0100:

> So there is another setting to set:

>     align_var_def_span = 1

I did this and the result is attached.

(BTW, I don't get whether aligning of var_def is favored, while var_struct
isn't. I, as mentioned, would vote against all aligning :), but if that's
convention, shouldn't it be consistent?)

> But, this is not enough too. In fact I was afraid uncrustify removed the
> variable names from the prototypes here:

>> int fntFindID(char *);
>> void fntFreeFont(void);
>> int fntRead(char *, char *);
>> txSample *fntRender(wItem *, int, char *);
>> int fntTextWidth(int, char *);

> While in fact it was you :)

Oh, sorry for not mentioning. Yes, I'd like to remove the unnecessary
variable names from header files (redundant and not needed by the compiler)
unless of course this would be against the coding style.

(If uncrustify would have done this, it would have been an unauthorized code
modification.)

> But it also shows me the indent here is also too much tolerant. In the
> real case, this:

>     int        fntRead( char * path, char * fname );

> Is replaced by:

>     int        fntRead(char *path, char *fname);

> Which is not fine.

This seems to be option sp_inside_fparen which also affects function calls,
i.e. you'd get

  int fntRead( char *path, char *fname )

but (if the programmer has used these spaces already)

  id = fntAddNewFont( fname );

as well.

IMHO the current setting (remove) is best.

> IMO it's fine, you can go commit that stuff, but you should wait for
> Reimar or Diego agreement.

I sure will do.

> to have the GUI re-indented so Ingo can't use his time to his fullest,
> etc.

I humbly ask to not do this automatically for all the gui files at a single
blow, but give me the chance to look over them, adding newlines to group
blocks of statements for example to make them more readable etc.

Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cut.c
Type: text/x-c
Size: 1341 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110222/f1c48871/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: font.c
Type: text/x-c
Size: 9899 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110222/f1c48871/attachment-0001.bin>


More information about the MPlayer-dev-eng mailing list