summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2017-05-15 09:33:03 +0000
committerwiz <wiz@pkgsrc.org>2017-05-15 09:33:03 +0000
commitf8a27c8ead5f6b278445d18e0398b241b8e4aeb2 (patch)
treeada25b4ec8d81b93d0cb8d4e5125e05336f8a2eb /textproc
parent4ac9e36a574a40e13a06280046add0e673cf6d94 (diff)
downloadpkgsrc-f8a27c8ead5f6b278445d18e0398b241b8e4aeb2.tar.gz
More cleanup from Ingo Schwarze.
Remove -a remnants, simplify section header code, delete 9-argument check - OpenBSD does not use groff for quite some time now. Bump version.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/mdoclint/Makefile6
-rwxr-xr-xtextproc/mdoclint/files/mdoclint24
2 files changed, 5 insertions, 25 deletions
diff --git a/textproc/mdoclint/Makefile b/textproc/mdoclint/Makefile
index 02b4ee7dff7..50388c412fc 100644
--- a/textproc/mdoclint/Makefile
+++ b/textproc/mdoclint/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.61 2017/05/14 18:04:23 wiz Exp $
+# $NetBSD: Makefile,v 1.62 2017/05/15 09:33:03 wiz Exp $
-DISTNAME= mdoclint-1.50
+DISTNAME= mdoclint-1.51
CATEGORIES= textproc
MASTER_SITES= # none
DISTFILES= # none
@@ -12,8 +12,6 @@ LICENSE= 2-clause-bsd
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-CONFLICTS= mdocml<1.6.9
-
WRKSRC= ${WRKDIR}
NO_BUILD= yes
USE_LANGUAGES= # none
diff --git a/textproc/mdoclint/files/mdoclint b/textproc/mdoclint/files/mdoclint
index 2d90e21d8e1..f6352071673 100755
--- a/textproc/mdoclint/files/mdoclint
+++ b/textproc/mdoclint/files/mdoclint
@@ -1,7 +1,7 @@
#!@PERL5@
#
# $OpenBSD: mdoclint,v 1.48 2016/01/24 20:10:48 schwarze Exp $
-# $NetBSD: mdoclint,v 1.70 2017/05/14 18:04:23 wiz Exp $
+# $NetBSD: mdoclint,v 1.71 2017/05/15 09:33:03 wiz Exp $
#
# Copyright (c) 2001-2017 Thomas Klausner
# All rights reserved.
@@ -39,7 +39,6 @@ use Getopt::Std;
use constant {
OPENBSD => 0,
NETBSD => 1,
- SECTION_NAME => 2,
};
use vars qw(
@@ -55,12 +54,11 @@ my $options="aDdeFfHhlmnoprSvwXx";
sub usage
{
- my $default = OPENBSD ? "-aDdfmnoprSXx" : "-aDdeflmnoprSXx";
+ my $default = OPENBSD ? "-DdfmnoprSXx" : "-DdeflmnoprSXx";
print STDERR <<"EOF";
mdoclint: verify man page correctness
usage: mdoclint [-$options] file ...
- -a warn about SEE ALSO section problems
-D warn about bad casing and archs in .Dt
-d warn about bad date strings (in .Dd only)
-e warn about unsorted errors (for functions)
@@ -304,8 +302,6 @@ sub new
changes => 0,
oxrcsidseen => 0,
nxrcsidseen => 0,
- lastsh => 0,
- in_section => 0,
inliteral => 0,
shseen => {},
last_error_name => '',
@@ -351,9 +347,6 @@ sub parse_macro_args
push(@params, $1);
}
}
- if (@params > 9 and OPENBSD) {
- $s->warning("$string holds >9 parameters");
- }
return @params;
}
@@ -362,22 +355,11 @@ sub set_section_header
my ($s, $section_header) = @_;
$section_header = join(' ', $s->parse_macro_args($section_header));
- if ($section_header eq 'NAME') {
- $s->{in_section} = SECTION_NAME;
- } else {
- $s->{in_section} = 0;
- }
-
if (not $sections{$section_header}) {
$s->warning("unknown section header: ",
"`$section_header'") if $opt_S;
} else {
- if ($s->{lastsh} >= $sections{$section_header}) {
- $s->warning("section header ",
- "`$section_header' in wrong order") if $opt_S;
- }
$s->{shseen}->{$section_header} = 1;
- $s->{lastsh} = $sections{$section_header};
}
$s->{current_section_header} = $section_header;
@@ -452,7 +434,7 @@ sub process_line
}
}
- if ($s->{in_section} == SECTION_NAME) {
+ if ($s->{current_section_header} eq "NAME") {
if (/^\.Nm\s+(\S+)/o) {
$s->{names}{$1.$s->{sec}} = 1;
}