...
The following declaration of the signal()
function is difficult to read and comprehend.
Code Block | ||||
---|---|---|---|---|
| ||||
void (*signal(int, void (*)(int)))(int); |
...
This compliant solution makes use of type definitions to specify the same type as in the noncompliant code example.
Code Block | ||||
---|---|---|---|---|
| ||||
typedef void (*SighandlerType)(int signum); extern SighandlerType signal( int signum, SighandlerType handler ); |
...