From 5efd71038d4207b576caea3ce148a8cffe268eae Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 17 Apr 2002 12:30:45 +1000 Subject: - (djm) Fix .Nm in mdoc2man.pl from pspencer@fields.utoronto.ca --- mdoc2man.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mdoc2man.pl') diff --git a/mdoc2man.pl b/mdoc2man.pl index fddb2e09d..928fc5d7a 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; -- cgit v1.2.3