[MPlayer-dev-eng] the great reformatting

Ingo Brückl ib at wupperonline.de
Tue Feb 22 15:13:58 CET 2011


Clément Boesch wrote on Tue, 22 Feb 2011 13:51:35 +0100:

> afaik the only things to vertical align are:

> 1. variable assignment:
> 2. structure fields:
> 3. on line break:

You already achieve this with the config you posted and the two intermediate
changes:

sp_func_def_paren = force
align_var_struct_span = 0

> 4. you are also allowed to vertical align when you think it's worth like:

>     buf[i    ] = input[j + 3] ^ output[j    ]
>     buf[i + 1] = input[j    ] ^ output[j + 3]

It seems that such statements will be retained with the current config also,
although I cannot test, because uncrustify has a bug with this. (But such
alignment cannot be automatically achieved, of course.)

The remaining question is:

Should

int          a;
unsigned int b;
char         c;

typedef struct {
    int          a;
    unsigned int b;
    char         c;
} foo;

remain if in a source that way (this is already achieved with the current
config) or forced to

int a;
unsigned int b;
char c;

typedef struct {
    int a;
    unsigned int b;
    char c;
} foo;

In the latter case change:

sp_after_type = force

Ingo


More information about the MPlayer-dev-eng mailing list