pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/mdoclint More cleanup from Ingo Schwarze.
details: https://anonhg.NetBSD.org/pkgsrc/rev/6e41aee99754
branches: trunk
changeset: 362429:6e41aee99754
user: wiz <wiz%pkgsrc.org@localhost>
date: Mon May 15 09:33:03 2017 +0000
description:
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:
textproc/mdoclint/Makefile | 6 ++----
textproc/mdoclint/files/mdoclint | 24 +++---------------------
2 files changed, 5 insertions(+), 25 deletions(-)
diffs (106 lines):
diff -r b128e05106bc -r 6e41aee99754 textproc/mdoclint/Makefile
--- a/textproc/mdoclint/Makefile Mon May 15 08:54:53 2017 +0000
+++ b/textproc/mdoclint/Makefile Mon May 15 09:33:03 2017 +0000
@@ -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 @@
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
-CONFLICTS= mdocml<1.6.9
-
WRKSRC= ${WRKDIR}
NO_BUILD= yes
USE_LANGUAGES= # none
diff -r b128e05106bc -r 6e41aee99754 textproc/mdoclint/files/mdoclint
--- a/textproc/mdoclint/files/mdoclint Mon May 15 08:54:53 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint Mon May 15 09:33:03 2017 +0000
@@ -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 constant {
OPENBSD => 0,
NETBSD => 1,
- SECTION_NAME => 2,
};
use vars qw(
@@ -55,12 +54,11 @@
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 @@
changes => 0,
oxrcsidseen => 0,
nxrcsidseen => 0,
- lastsh => 0,
- in_section => 0,
inliteral => 0,
shseen => {},
last_error_name => '',
@@ -351,9 +347,6 @@
push(@params, $1);
}
}
- if (@params > 9 and OPENBSD) {
- $s->warning("$string holds >9 parameters");
- }
return @params;
}
@@ -362,22 +355,11 @@
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 @@
}
}
- if ($s->{in_section} == SECTION_NAME) {
+ if ($s->{current_section_header} eq "NAME") {
if (/^\.Nm\s+(\S+)/o) {
$s->{names}{$1.$s->{sec}} = 1;
}
Home |
Main Index |
Thread Index |
Old Index