I've come across some code that was a real hack job, and was written by a real hacker. I'm not exactly sure what his function declarations are doing:
Code:
docmd_w(cm,cmd,dr)
char cm;
char *cmd;
int dr;
{
char c,t;
char *p,*s;
int st,r,i,j,l,ch;
...
I had assumed that this would be equivalent to
Code:
int docmd_w(char cm, char *cmd, int dr)
{
...
but GCC disagrees (in the form of error messages if I change the function declaration). Can someone explain the subtleties of declaring functions his way?