From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from danbala.ifoer.tuwien.ac.at (danbala.ifoer.tuwien.ac.at [128.130.168.64]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id sAJMadvj003906 for ; Wed, 19 Nov 2014 17:36:39 -0500 (EST) Received: by danbala.ifoer.tuwien.ac.at (Postfix, from userid 116) id 9593AA5AF; Wed, 19 Nov 2014 23:36:36 +0100 (CET) Date: Wed, 19 Nov 2014 23:36:36 +0100 From: Thomas Klausner To: discuss@mdocml.bsd.lv Subject: Ft/Fn vs. parentheses weirdness Message-ID: <20141119223636.GS12758@danbala.tuwien.ac.at> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="lrvsYIebpInmECXG" Content-Disposition: inline --lrvsYIebpInmECXG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi! I wanted to mark up a function like this: int (*foo)(bar, baz) using Ft/Fn. I noticed that I can't really do that, and found some weird behaviour both with groff 1.19.2 and mandoc 1.13.0 (the newest I have installed). Can you please take a look at the attached test page and tell me * if there is a way to do what I want? * how many bugs I found? :) For the record, this is what it looks like for me with groff: # groff -mandoc -T ascii test.3 |less test.3:24: environment stack underflow test.3:24: cannot chop empty macro TEST(3) NetBSD Library Functions Manual TEST(3) NAME test -- test page SYNOPSIS Some weird Fn/Ft test cases DESCRIPTION Case 1 int bar(void) Function gets formatted even though inside a Bd literal. Case 2 int (*foo()) bar baz Parentheses are in weird places, arguments are not taken as function argument. Case 3 int Po(*foo) ) bar baz Loses Fn completely due to Po/Pc. Case 4 int (*foo)(bar, baz) This is what I wanted, but the parentheses are marked up in bold. NetBSD 7.0 November 19, 2014 NetBSD 7.0 and mandoc: # mandoc test.3 |less TEST(3) Library Functions Manual TEST(3) NAME test -- test page SYNOPSIS Some weird Fn/Ft test cases DESCRIPTION Case 1 int bar(void) Function gets formatted even though inside a Bd literal. Case 2 int (*foo()) bar(baz) Parentheses are in weird places, arguments are not taken as function argument. Case 3 int (*foo) bar baz Loses Fn completely due to Po/Pc. Case 4 int (*foo)(bar, baz) This is what I wanted, but the parentheses are marked up in bold. NetBSD 7.99.1 November 19, 2014 NetBSD 7.99.1 Thanks, Thomas --lrvsYIebpInmECXG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="test.3" .Dd November 19, 2014 .Dt TEST 3 .Os .Sh NAME .Nm test .Nd test page .Sh SYNOPSIS Some weird Fn/Ft test cases .Sh DESCRIPTION .Ss Case 1 .Bd -literal .Ft int .Fn bar void .Ed Function gets formatted even though inside a Bd literal. .Ss Case 2 .Ft int .Fn ( *foo ) bar baz .Pp Parentheses are in weird places, arguments are not taken as function argument. .Ss Case 3 .Ft int .Fn Po *foo Pc bar baz .Pp Loses Fn completely due to Po/Pc. .Ss Case 4 .Ft int .Fn (*foo) bar baz .Pp This is what I wanted, but the parentheses are marked up in bold. --lrvsYIebpInmECXG-- -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv