pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/mdoclint Remove -e and -l; both now supported...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f88326718f41
branches:  trunk
changeset: 363417:f88326718f41
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Jun 08 10:19:56 2017 +0000

description:
Remove -e and -l; both now supported by mandoc.

>From Ingo Schwarze.

Bump version.

diffstat:

 textproc/mdoclint/Makefile         |    4 +-
 textproc/mdoclint/files/mdoclint   |  107 ++----------------------------------
 textproc/mdoclint/files/mdoclint.1 |   12 +--
 3 files changed, 12 insertions(+), 111 deletions(-)

diffs (245 lines):

diff -r 5f78a5163bff -r f88326718f41 textproc/mdoclint/Makefile
--- a/textproc/mdoclint/Makefile        Thu Jun 08 09:52:47 2017 +0000
+++ b/textproc/mdoclint/Makefile        Thu Jun 08 10:19:56 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.66 2017/06/07 19:09:55 wiz Exp $
+# $NetBSD: Makefile,v 1.67 2017/06/08 10:19:56 wiz Exp $
 
-DISTNAME=      mdoclint-1.55
+DISTNAME=      mdoclint-1.56
 CATEGORIES=    textproc
 MASTER_SITES=  # none
 DISTFILES=     # none
diff -r 5f78a5163bff -r f88326718f41 textproc/mdoclint/files/mdoclint
--- a/textproc/mdoclint/files/mdoclint  Thu Jun 08 09:52:47 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint  Thu Jun 08 10:19:56 2017 +0000
@@ -1,7 +1,7 @@
 #!@PERL5@
 #
 # $OpenBSD: mdoclint,v 1.48 2016/01/24 20:10:48 schwarze Exp $
-# $NetBSD: mdoclint,v 1.76 2017/06/07 19:17:29 wiz Exp $
+# $NetBSD: mdoclint,v 1.77 2017/06/08 10:19:56 wiz Exp $
 #
 # Copyright (c) 2001-2017 Thomas Klausner
 # All rights reserved.
@@ -42,28 +42,24 @@
 };
 
 use vars qw(
-       $opt_D $opt_d $opt_e $opt_F $opt_h $opt_l
+       $opt_D $opt_d $opt_F $opt_h
        $opt_m $opt_o $opt_p $opt_r $opt_S $opt_v $opt_w $opt_x
 );
 
 
 my $arch=`uname -m`;
 chomp($arch);
-my $options="DdeFhlmoprSvwx";
+my $options="DdFhmoprSvwx";
 
 sub usage
-       {
-       my $default = OPENBSD ? "-DdmoprSx" : "-DdelmoprSx";
-
+{
        print STDERR <<"EOF";
 mdoclint: verify man page correctness
 usage: mdoclint [-$options] file ...
        -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)
        -F      fix whitespace problems (asks before overwriting)
        -h      display this help text
-       -l      warn about unknown libraries
        -m      warn about man pages that are not in mdoc(7) format
        -o      warn about non-empty .Os strings
        -p      warn about punctuation problems
@@ -72,71 +68,11 @@
        -v      verbose output
        -w      show section header in warnings
        -x      warn about cross-references with missing targets
-Default is $default if no flag is specified.
+Default is -DdmoprSx if no flag is specified.
 EOF
        exit(0);
 }
 
-
-my %libraries = (
-    "libarchive" => 1,
-    "libarm" => 1,
-    "libarm32" => 1,
-    "libbluetooth" => 1,
-    "libc" => 1,
-    "libcdk" => 1,
-    "libcompat" => 1,
-    "libcrypt" => 1,
-    "libcurses" => 1,
-    "libdm" => 1,
-    "libedit" => 1,
-    "libelf" => 1,
-    "libevent" => 1,
-    "libexecinfo" => 1,
-    "libfetch" => 1,
-    "libform" => 1,
-    "libi386" => 1,
-    "libintl" => 1,
-    "libipsec" => 1,
-    "libiscsi" => 1,
-    "libisns" => 1,
-    "libkvm" => 1,
-    "libm" => 1,
-    "libm68k" => 1,
-    "libmagic" => 1,
-    "libmandoc" => 1,
-    "libmenu" => 1,
-    "libmj" => 1,
-    "libnetpgp" => 1,
-    "libnetpgpverify" => 1,
-    "libnpf" => 1,
-    "libossaudio" => 1,
-    "libpam" => 1,
-    "libpcap" => 1,
-    "libpci" => 1,
-    "libperfuse" => 1,
-    "libpmc" => 1,
-    "libposix" => 1,
-    "libppath" => 1,
-    "libprop" => 1,
-    "libpthread" => 1,
-    "libpthread_dbg" => 1,
-    "libpuffs" => 1,
-    "libquota" => 1,
-    "librefuse" => 1,
-    "libresolv" => 1,
-    "librt" => 1,
-    "librumpclient" => 1,
-    "libsaslc" => 1,
-    "libssp" => 1,
-    "libtermcap" => 1,
-    "libterminfo" => 1,
-    "libusbhid" => 1,
-    "libutil" => 1,
-    "libx86_64" => 1,
-    "libz" => 1
-);
-
 # constants to build
 my %sections;
 my $arches_re;
@@ -235,11 +171,10 @@
        $opt_h and usage();
 
        # default to all warnings if no flag is set
-       unless ($opt_D or $opt_d or $opt_e or $opt_l or $opt_m
+       unless ($opt_D or $opt_d or $opt_m
            or $opt_o or $opt_p or $opt_r or $opt_S or $opt_x) {
                $opt_D = $opt_d = $opt_m =
                    $opt_o = $opt_p = $opt_r = $opt_S = $opt_x = 1;
-               $opt_e = $opt_l = 1 if NETBSD;
        }
 }
 
@@ -290,7 +225,6 @@
                nxrcsidseen => 0,
                inliteral => 0,
                shseen => {},
-               last_error_name => '',
                current_section_header => '',
                sec => '0',
                names => { $fn => 1 },
@@ -425,12 +359,6 @@
                        $s->{names}{$1.$s->{sec}} = 1;
                }
        }
-
-       if (/^\.Lb\s+(\S+)/o) {
-               if (not $libraries{$1}) {
-                       $s->warning("Unknown library `$1' used as Lb argument") if $opt_l;
-               }
-       }
        if (/^\.Os\s+(.+)/o) {
                $s->warning(".Os used with argument `$1'") if $opt_o;
        }
@@ -484,29 +412,6 @@
                }
        }
 
-       # Check whether the list of possible errors for a function is
-       # sorted alphabetically.
-       #
-       # Error names should not be sorted across different lists.
-       # (see bind(2) for an example.)
-       #
-       /^\.Bl\s+/o and $s->{last_error_name} = "";
-
-       if ($s->{current_section_header} eq "ERRORS" and
-           /^\.It\s+(Bq\s+)?(Er\s+)?(E[\w_]+)$/o) {
-               my $current_error_name = $3;
-
-               if ($s->{last_error_name} eq $current_error_name) {
-                       $s->warning("Duplicate item for ",
-                           $current_error_name, ".") if $opt_e;
-               } elsif ($current_error_name lt $s->{last_error_name}) {
-                       $s->warning("$s->{last_error_name} and ",
-                           "$current_error_name are not in ",
-                           "alphabetical order.") if $opt_e;
-               }
-               $s->{last_error_name} = $current_error_name;
-       }
-
        $s->{lastline} = $_;
        return "$_\n";
 }
diff -r 5f78a5163bff -r f88326718f41 textproc/mdoclint/files/mdoclint.1
--- a/textproc/mdoclint/files/mdoclint.1        Thu Jun 08 09:52:47 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint.1        Thu Jun 08 10:19:56 2017 +0000
@@ -1,5 +1,5 @@
 .\"    $OpenBSD: mdoclint.1,v 1.7 2009/04/13 19:06:38 jmc Exp $
-.\" $NetBSD: mdoclint.1,v 1.22 2017/06/07 19:17:29 wiz Exp $
+.\" $NetBSD: mdoclint.1,v 1.23 2017/06/08 10:19:56 wiz Exp $
 .\"
 .\" Copyright (c) 2001-2013 Thomas Klausner
 .\" All rights reserved.
@@ -25,7 +25,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 15, 2017
+.Dd June 8, 2017
 .Dt MDOCLINT 1
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Nd man page verifier
 .Sh SYNOPSIS
 .Nm
-.Op Fl DdeFhlmoprSvwx
+.Op Fl DdFhmoprSvwx
 .Ar
 .Sh DESCRIPTION
 .Nm
@@ -41,7 +41,7 @@
 It tries to automatically find as many common
 errors that occur when writing man pages as possible.
 If no flags are given,
-.Fl DdelmoprSx
+.Fl DdmoprSx
 is assumed (that is, everything except
 .Fl Fhvw ) .
 .Pp
@@ -51,14 +51,10 @@
 Warn about bad casing and architectures in the .Dt macro.
 .It Fl d
 Warn about bad date strings (in the .Dd macro).
-.It Fl e
-Warn about unsorted errors (for functions).
 .It Fl F
 Delete whitespace at the end of input lines.
 .It Fl h
 Display usage.
-.It Fl l
-Warn about unknown libraries used as arguments to Lb.
 .It Fl m
 Warn if man page is not in
 .Xr mdoc 7



Home | Main Index | Thread Index | Old Index