Subject: lib/17406: declaration syntax in signal(3) is wrong
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 06/26/2002 11:25:51
>Number:         17406
>Category:       lib
>Synopsis:       declaration syntax in signal(3) is wrong
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 26 08:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        NetBSD-current 2002/06/23
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:

	the syntax of the signal() declaration in the signal(3) manual
	page SYNOPSIS is wrong.

	there are also some missing cross-references in the SEE ALSO
	section.

>How-To-Repeat:

	get disgusted at the incorrect syntax in signal(3):SYNOPSIS and
	then fight tooth and nail with mdoc(7) to get something
	resembling the correct presentation.

>Fix:

Index: signal.3
===================================================================
RCS file: /cvs/master/m-NetBSD/main/basesrc/lib/libc/gen/signal.3,v
retrieving revision 1.17
diff -c -c -r1.17 signal.3
*** signal.3	21 Feb 2002 11:09:07 -0000	1.17
--- signal.3	26 Jun 2002 15:22:17 -0000
***************
*** 33,39 ****
  .\"
  .\"     @(#)signal.3	8.3 (Berkeley) 4/19/94
  .\"
! .Dd April 19, 1994
  .Dt SIGNAL 3
  .Os
  .Sh NAME
--- 33,39 ----
  .\"
  .\"     @(#)signal.3	8.3 (Berkeley) 4/19/94
  .\"
! .Dd June 26, 2002
  .Dt SIGNAL 3
  .Os
  .Sh NAME
***************
*** 43,54 ****
  .Lb libc
  .Sh SYNOPSIS
  .Fd #include \*[Lt]signal.h\*[Gt]
  .Ft void
- .\" can not do this with just .Fn yet
  .br
  .Po
! .Fn *signal "int sig" "void (*func)(int)"
! .Pc Ns \*(lp\*(rp
  .Sh DESCRIPTION
  This
  .Fn signal
--- 43,65 ----
  .Lb libc
  .Sh SYNOPSIS
  .Fd #include \*[Lt]signal.h\*[Gt]
+ .\" we can not write decls using function pointers with .Fn yet
  .Ft void
  .br
+ .Ic ( *signal (
+ .Ft int
+ .Fa signo ,
+ .Ft void
+ .Pq Fa *func
+ .Po
+ .Vt int
+ .Pc
+ .No ))
  .Po
! .Vt int
! .Pc
! .No ;
! .\"
  .Sh DESCRIPTION
  This
  .Fn signal
***************
*** 177,183 ****
--- 188,196 ----
  .Xr sigaltstack 2 ,
  .Xr sigprocmask 2 ,
  .Xr sigsuspend 2 ,
+ .Xr psignal 3 ,
  .Xr setjmp 3 ,
+ .Xr strsignal 3 ,
  .Xr tty 4 ,
  .Xr signal 7
  .Sh HISTORY
>Release-Note:
>Audit-Trail:
>Unformatted: