I'm not sure how exactly to read this:
void (*signal(int sig, void (*func)(int))) (int);
I know that void (*func)(int)
is a pointer to a function accepting int and returning void.
My best guess is: signal is a function accepting int, and void (*func)(int)
, which returns a pointer to a function accepting int and returning void (so another void (*func)(int)
). I am just a bit confused by this usage, and also the fact that this website is not able to translate it properly.