the origin c declaration is
void (*signal(int signo, void (*func)(int)))(int);
I could understand this statement declare a function call signal that takes an int and an pointer to a function as parameters and returns a pointer to a function. But the use of the typedef as follows is hard to understand:
typedef void Sigfunc(int);
Sigfunc *signal(int signo, Sigfunc *func);
If I replace the "Sigfunc" with "void (int)", I couldn't transform the second declaration to the first. How to interpret the typedef in a right way.
What'more , can I write the following code to get the equivalent declaration
typedef void (*p_Sigfunc)(int);
p_Sigfunc signal(int signo, p_Sigfunc func);