From owner-freebsd-doc@FreeBSD.ORG Wed Oct 6 14:20:07 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C47C16A4D0 for ; Wed, 6 Oct 2004 14:20:07 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CAC043D48 for ; Wed, 6 Oct 2004 14:20:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i96EK7en061349 for ; Wed, 6 Oct 2004 14:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i96EK7Ks061348; Wed, 6 Oct 2004 14:20:07 GMT (envelope-from gnats) Date: Wed, 6 Oct 2004 14:20:07 GMT Message-Id: <200410061420.i96EK7Ks061348@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Joseph Koshy Subject: Re: docs/72375: prototype error in signal(3) X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Joseph Koshy List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 14:20:07 -0000 The following reply was made to PR docs/72375; it has been noted by GNATS. From: Joseph Koshy To: Giorgos Keramidas 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