summaryrefslogtreecommitdiffstats
path: root/mdoc2man.pl
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-04-17 12:30:45 +1000
committerDamien Miller <djm@mindrot.org>2002-04-17 12:30:45 +1000
commit5efd71038d4207b576caea3ce148a8cffe268eae (patch)
tree6b00381d4e08ddff7dac52937153069ff58d298c /mdoc2man.pl
parentbd63874d4bc3048f5dfbba8dc5f02fd57e9bdc7b (diff)
- (djm) Fix .Nm in mdoc2man.pl from pspencer@fields.utoronto.ca
Diffstat (limited to 'mdoc2man.pl')
-rw-r--r--mdoc2man.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc2man.pl b/mdoc2man.pl
index fddb2e09..928fc5d7 100644
--- a/mdoc2man.pl
+++ b/mdoc2man.pl
@@ -318,11 +318,13 @@ sub ParseMacro # ($line)
if (/^Nm$/)
{
- $name = shift @words
+ my $n = $name;
+ $n = shift @words
if (@words > 0);
+ $name = $n unless $name;
$retval .= ".br\n"
if ($synopsis);
- $retval .= "\\fB$name\\fP";
+ $retval .= "\\fB$n\\fP";
$nospace = 1
if (! $nospace && $words[0] =~ m/^[\.,]/);
next;