delete unused "lastline" state variable and some commented out lines;
authorschwarze <schwarze@openbsd.org>
Fri, 23 Jun 2017 19:56:57 +0000 (19:56 +0000)
committerschwarze <schwarze@openbsd.org>
Fri, 23 Jun 2017 19:56:57 +0000 (19:56 +0000)
no functional change

regress/usr.bin/mdoclint/mdoclint

index 31ba8af..9a61a02 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# $OpenBSD: mdoclint,v 1.71 2017/06/23 19:16:49 schwarze Exp $
+# $OpenBSD: mdoclint,v 1.72 2017/06/23 19:56:57 schwarze Exp $
 # $NetBSD: mdoclint,v 1.77 2017/06/08 10:19:56 wiz Exp $
 #
 # Copyright (c) 2001-2017 Thomas Klausner
@@ -209,7 +209,6 @@ sub new
        my $o = {
                mandoc_p => 1,
                all => [],
-               lastline => '',
                changes => 0,
                shseen => {},
                current_section_header => '',
@@ -298,13 +297,8 @@ sub process_line
        if (/^\.TH\s+/o) {
                $s->warning("not mandoc") if $opt_m;
                $s->{mandoc_p} = 0;
-#              /^.TH\s*[\w-_".]+\s*([1-9])/;
-#              $section = $1;
                return "$_\n";
        }
-#      if (/^.Dt\s*[\w-_".]+\s*([1-9])/) {
-#              $section = $1;
-#      }
        if (/^\.Dt\s+/o) {
                if (/^\.Dt\s+(?:[A-Z\d._-]+)\s+($sections_re)(?:\s+$arches_re)?$/o)  {
                        $s->{sec} = $1;
@@ -363,7 +357,6 @@ sub process_line
                        }
                }
        }
-       $s->{lastline} = $_;
        return "$_\n";
 }