#!/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
my $o = {
mandoc_p => 1,
all => [],
- lastline => '',
changes => 0,
shseen => {},
current_section_header => '',
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;
}
}
}
- $s->{lastline} = $_;
return "$_\n";
}