While working with very old minix sw (MINIX 1.5) I encountered weird function declarations; 1) the declaration of a function's prototype, and 2) the declaration of the function itself
/* in header file the prototype of a signal function, with my annotations */
/*---is this some sort of casting ???---*/
/*----two input arguments----*/
void (*signal(int sig, void (*_func)(int) ) ) (int);
/*---func ptr---*/
I can only deduct a casting, but what is casted
here and how would you describe the resulting function? The same definition is maintained in the code file, so we are definitely talking a function declaration, but its output is not clear to me. Refer to the next code snippet. Some reference to documentation is welcome.
/* in the code file */
PUBLIC void (*signal(int signr, void (*func)(int))) (int){
void (*old) (int);
/* there is more code, but not relevant for the problem */
return(old);
}