aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/man
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>1997-07-04 22:32:59 +0000
committerWolfram Schneider <wosch@FreeBSD.org>1997-07-04 22:32:59 +0000
commit09eac7d4b2f3a44d79b6a2f42e4d35f62aaed510 (patch)
tree69878c4c4e0f21e721e6bfe7ee48ae29c68aa4a4 /gnu/usr.bin/man
parentc3d7c52e04eeceeaf9858cca79a6c76a4278c468 (diff)
downloadsrc-09eac7d4b2f3a44d79b6a2f42e4d35f62aaed510.tar.gz
src-09eac7d4b2f3a44d79b6a2f42e4d35f62aaed510.zip
Better section guessing for manual pages without suffix. The
plan9 manual pages dont have a suffix.
Notes
Notes: svn path=/head/; revision=27198
Diffstat (limited to 'gnu/usr.bin/man')
-rw-r--r--gnu/usr.bin/man/makewhatis/makewhatis.perl8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.perl b/gnu/usr.bin/man/makewhatis/makewhatis.perl
index 453787e3e0bf..b3ceeaa20ca7 100644
--- a/gnu/usr.bin/man/makewhatis/makewhatis.perl
+++ b/gnu/usr.bin/man/makewhatis/makewhatis.perl
@@ -26,7 +26,7 @@
#
# makewhatis -- update the whatis database in the man directories.
#
-# $Id: makewhatis.perl,v 1.11 1996/08/27 20:04:09 wosch Exp $
+# $Id: makewhatis.perl,v 1.16 1997/03/14 21:58:43 wosch Exp $
sub usage {
@@ -172,7 +172,7 @@ sub parse_dir {
delete $man_red{$file};
}
- if ($dir =~ /man$/) {
+ if ($dir =~ /man/) {
warn "\n" if $verbose && $pointflag;
warn "open manpath directory ``$dir''\n" if $verbose;
$pointflag = 0;
@@ -218,10 +218,10 @@ sub ext {
$extension =~ s/$ext$//g; # strip .gz
$extension =~ s/.*\///g; # basename
- if ($extension !~ /\./) { # no dot
+ if ($extension !~ m%[^/]+\.[^.]+$%) { # no dot
$extension = $filename;
#$extension =~ s|/[^/]+$||;
- $extension =~ s/.*(.)/$1/; # last character
+ $extension =~ s%.*man([^/]+)/[^/]+%$1%; # last character
warn "\n" if $verbose && $pointflag;
warn "$filename has no extension, try section ``$extension''\n"
if $verbose;