aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/man/makewhatis/makewhatis.perl
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-08-09 15:12:59 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-08-09 15:12:59 +0000
commitb07badb7bd8f0d03ba06a951f1a59ad6c36f0fe3 (patch)
tree214a9384b03e73c1836d0cee6bfccab12e7d0c5a /gnu/usr.bin/man/makewhatis/makewhatis.perl
parent95d6ec368c72f73737a9bc41e5f297d73cdfa0b0 (diff)
downloadsrc-b07badb7bd8f0d03ba06a951f1a59ad6c36f0fe3.tar.gz
src-b07badb7bd8f0d03ba06a951f1a59ad6c36f0fe3.zip
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
Notes
Notes: svn path=/head/; revision=81355
Diffstat (limited to 'gnu/usr.bin/man/makewhatis/makewhatis.perl')
-rw-r--r--gnu/usr.bin/man/makewhatis/makewhatis.perl12
1 files changed, 9 insertions, 3 deletions
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 .= ' ';
}
}