Subject: Curious SYNOPSIS in signal(3)
To: None <current-users@netbsd.org>
From: Eric Jacoboni <jaco@teaser.fr>
List: current-users
Date: 06/25/2002 22:01:17
This synopsis is :

/-----------------
| #include <signal.h>
| 
|      void
|      (*signal(int sig, void (*func)(int));)()
\-----------------

(note the semi-colon...)

I think it would be better to read :


/-----------------
| #include <signal.h>
| 
|      void
|      (*signal(int sig, void (*func)(int)))(int);
\-----------------

Also, the FreeBSD's typedef'd synopsys is somewhat clearer:

/-----------------
| typedef void (*sig_t)(int);
| 
| sig_t
| signal(int sig, sig_t func);
\-----------------

it could be nice to add it in the synopsis as an alternative for the
basic syntax.
-- 
Éric Jacoboni, né il y a 1328478937 secondes