I have old C code and would like to reformat it with clang-format. One problem im facing is, many of old functions are written with K&R parameter initializer lists. And clang-format does a strange reformatting on these lines.
For example following original code:
int tz_start_new( nr, start, old )
char *nr;
char *start;
char *old;
{
return 0;
}
gets formatted to:
int tz_start_new( nr, start, old ) char *nr;
char *start;
char *old;
{
return 0;
}
So the first parameter is written directly behind the function declaration. The others tays as they were before.
This is the format file i’m using: