The point in ANSI prototypes is that when you use them,
any call to the function will actually convert the parameters
to whatever type the prototye says.
More clearly, the K&R style declaration of
arguments (which is not a prototype btw) say
only what the function pops off the stack,
but not what the caller pushes to the stack.
If, however, a function has an ANSI C prototype
(and it's included in wherever you call the function from),
the C compiler will automatically convert parameters
to whatever the prototye says, and will warn
you if you call the function with an incompatible
number or type of parameters.
In both cases the type (and most of the modifiers and other cruft) is on the wrong side of the variable. Does anyone think "and now I'm going to need an int, let's call it counter"? I think not. Normal people say to themselves "and now I'm going to need a counter, an int will be enough".
Not speaking about the mess with pointers to functions and functions returning pointers etc. int *foo() vs. int (*)foo() anyone?
Jenda Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne