pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/mdoclint



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon May 15 09:33:03 UTC 2017

Modified Files:
        pkgsrc/textproc/mdoclint: Makefile
        pkgsrc/textproc/mdoclint/files: mdoclint

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 pkgsrc/textproc/mdoclint/Makefile
cvs rdiff -u -r1.70 -r1.71 pkgsrc/textproc/mdoclint/files/mdoclint

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/mdoclint/Makefile
diff -u pkgsrc/textproc/mdoclint/Makefile:1.61 pkgsrc/textproc/mdoclint/Makefile:1.62
--- pkgsrc/textproc/mdoclint/Makefile:1.61      Sun May 14 18:04:23 2017
+++ pkgsrc/textproc/mdoclint/Makefile   Mon May 15 09:33:03 2017
@@ -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

Index: pkgsrc/textproc/mdoclint/files/mdoclint
diff -u pkgsrc/textproc/mdoclint/files/mdoclint:1.70 pkgsrc/textproc/mdoclint/files/mdoclint:1.71
--- pkgsrc/textproc/mdoclint/files/mdoclint:1.70        Sun May 14 18:04:23 2017
+++ pkgsrc/textproc/mdoclint/files/mdoclint     Mon May 15 09:33:03 2017
@@ -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;
                }



Home | Main Index | Thread Index | Old Index