Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following declaration of the signal() function is difficult to read and comprehend.

Code Block
bgColor#FFcccc
langc
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
bgColor#ccccff
langc
typedef void (*SighandlerType)(int signum);
extern SighandlerType signal(
  int signum,
  SighandlerType handler
);

...