Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Oct 2004 14:20:07 GMT
From:      Joseph Koshy <joseph.koshy@gmail.com>
To:        freebsd-doc@FreeBSD.org
Subject:   Re: docs/72375: prototype error in signal(3)
Message-ID:  <200410061420.i96EK7Ks061348@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/72375; it has been noted by GNATS.

From: Joseph Koshy <joseph.koshy@gmail.com>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: bug-followup@freebsd.org
Subject: Re: docs/72375: prototype error in signal(3)
Date: Wed, 6 Oct 2004 14:18:10 +0000

 > Err, please no.  The type of the return value of signal() is not really
 > `void (*)' but something more like:
 > 
 >         void (*)(int)
 
 Yes, my bad.  Please ignore the previous misguided patch.
 
 > But this is not so easy to separate from the name of the signal()
 > function without a typedef; at least not without breaking the validity
 > of the C declaration, which is a bad thing since then manpage readers
 > cannot copy/paste the prototype of signal() from its manpage.
 
 Well the visual ugliness in the current manual page arises from the 
 fact that the .Ft macro forces a line break after its idea of the 
 "type" of the function.
 
 Using .Xo/.Xc suppresses this, and puts the whole declaration on
 one line.
 
 I don't know how to suppress the inter-argument spaces inserted by
 ".Ft".  There is probably still scope for improvement of the patch
 below.
 
 Index: signal.3
 ===================================================================
 RCS file: /cvs/FreeBSD/src/lib/libc/gen/signal.3,v
 retrieving revision 1.38
 diff -u -u -r1.38 signal.3
 --- signal.3    3 Jul 2004 22:30:08 -0000       1.38
 +++ signal.3    6 Oct 2004 19:49:41 -0000
 @@ -45,8 +45,9 @@
  .\" The following is Quite Ugly, but syntactically correct.
  .\" Don't try to
  .\" fix it.
 -.Ft void \*(lp*
 +.Ft void \*(lp* Ns Xo
  .Fn signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint"
 +.Xc
  .Pp
  or in
  .Fx Ns 's



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410061420.i96EK7Ks061348>