Re: K&R -> ANSI?

Joachim Schmitz <nospam.jojo@xxxxxxxxxxxxxxxxxx> wrote:
"Zach" <netrek@xxxxxxxxx> schrieb im Newsbeitrag
I am looking for a program which can automatically convert K&R C code
to ANSI C code.
protoize, comes with gcc

When I first noticed protoize, I found that it would change the
default type promotions. Checking now, I see this is still the

int foobar(a,b)
char a;
short b;
return a * b;

becomes (with protoize)

int foobar(char a, short int b)
return a * b;

where cproto will give

int foobar(int a, int b);

Thomas E. Dickey