recognition of manpages based on the names

This commit is contained in:
espie 2004-08-03 10:16:58 +00:00
parent db1072e6d9
commit a2e191d19b

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
# $OpenBSD: make-plist,v 1.39 2004/07/22 22:24:51 espie Exp $
# $OpenBSD: make-plist,v 1.40 2004/08/03 10:16:58 espie Exp $
# Copyright (c) 1999 Marc Espie
#
@ -71,6 +71,18 @@ sub is_info
}
}
sub is_manpage
{
local $_ = shift;
if (m/\/man\/man(.*?)\/[^\/]+\.\1(?:\.gz|\.Z)?$/) {
return 1;
}
if (m/\/man\/cat.*?\/[^\/]+\.0(?:\.gz|\.Z)?$/) {
return 1;
}
return 0;
}
sub is_dir
{
my $filename = shift;
@ -151,6 +163,8 @@ sub annotate
next;
} elsif (m/^\@info\s+/) {
$_=$';
} elsif (m/^\@man\s+/) {
$_=$';
} elsif (m/^\@/) {
$manual = 1;
next;
@ -265,6 +279,9 @@ sub handle_file
if (is_info $item) {
$string= "\@info $string";
}
if (is_manpage $item) {
$string="\@man $string";
}
if (defined $newdir->{$item}) {
if (defined $annotated_dir->{$fname}) {