From b07badb7bd8f0d03ba06a951f1a59ad6c36f0fe3 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 9 Aug 2001 15:12:59 +0000 Subject: Teach makewhatis(1) about mdoc(7) .Xr macro. % whatis finger.conf finger.conf(5) - finger 1 alias configuration file % whatis finger.conf finger.conf(5) - finger(1) alias configuration file Reviewed by: MAINTAINER timeout --- gnu/usr.bin/man/makewhatis/makewhatis.perl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.perl b/gnu/usr.bin/man/makewhatis/makewhatis.perl index 4a4ab4465464..599220e127fc 100644 --- a/gnu/usr.bin/man/makewhatis/makewhatis.perl +++ b/gnu/usr.bin/man/makewhatis/makewhatis.perl @@ -370,9 +370,15 @@ sub manual { } else { $list .= '- ' if (!$flag && !/^- /); $flag++; - s/^\.[A-Z][a-z][ \t]*//; - s/[ \t]+$//; - $list .= $_; + if (/^\.Xr/) { + split; + $list .= @_[1]; + $list .= "(@_[2])" if @_[2]; + } else { + s/^\.[A-Z][a-z][ \t]*//; + s/[ \t]+$//; + $list .= $_; + } $list .= ' '; } } -- cgit v1.3