summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2008-11-01 07:49:54 +0000
committerjmc <jmc@openbsd.org>2008-11-01 07:49:54 +0000
commitc64960a6a0f7f17eb448cf8761e9275a0cdf720a (patch)
tree27238217ad26bd224e6584fb6027f67ca0776e60
parentremove commented out -S option; (diff)
downloadwireguard-openbsd-c64960a6a0f7f17eb448cf8761e9275a0cdf720a.tar.xz
wireguard-openbsd-c64960a6a0f7f17eb448cf8761e9275a0cdf720a.zip
- since mdocdate fills in the date automatically, we no longer have to check
that a valid date is entered. instead, just make sure there is an mdocdate tag there. saves us bumping the year too. ok millert - adjust man page accordingly - remove -e from default options list in usage() - add a HISTORY section
-rw-r--r--regress/usr.bin/mdoclint/mdoclint6
-rw-r--r--regress/usr.bin/mdoclint/mdoclint.113
2 files changed, 13 insertions, 6 deletions
diff --git a/regress/usr.bin/mdoclint/mdoclint b/regress/usr.bin/mdoclint/mdoclint
index 07bbe246a32..7507f731ebd 100644
--- a/regress/usr.bin/mdoclint/mdoclint
+++ b/regress/usr.bin/mdoclint/mdoclint
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# $OpenBSD: mdoclint,v 1.3 2008/10/31 14:42:44 millert Exp $
+# $OpenBSD: mdoclint,v 1.4 2008/11/01 07:49:54 jmc Exp $
# $NetBSD: mdoclint,v 1.18 2008/01/05 09:03:50 wiz Exp $
#
# Copyright (c) 2001-2008 Thomas Klausner
@@ -68,7 +68,7 @@ my $usage = "mdoclint: verify man page correctness\n".
" -v\tverbose output\n".
" -X\twarn about explicit mentions of FreeBSD, NetBSD, or OpenBSD\n".
" -x\twarn about cross-references with missing targets\n\n".
- "Default is -aDdefHmnoPprSsXx if no flag is specified.\n";
+ "Default is -aDdfHmnoPprSsXx if no flag is specified.\n";
my %short = (
"Free" => ".Fx",
@@ -323,7 +323,7 @@ sub handle_file {
}
}
if ($opt_d) {
- if (/^.Dd/ and not /^.Dd\s*.Mdocdate:\s*(January|February|March|April|May|June|July|August|September|October|November|December)\s*[1-9][0-9]*\s*(198[0-9]|199[0-9]|200[012345678])\s*\$$/) {
+ if (/^.Dd/ and not /^.Dd [\$]Mdocdate/) {
warning("Invalid date found: `$_'");
}
}
diff --git a/regress/usr.bin/mdoclint/mdoclint.1 b/regress/usr.bin/mdoclint/mdoclint.1
index 399945bc6fc..5e9b3eb0826 100644
--- a/regress/usr.bin/mdoclint/mdoclint.1
+++ b/regress/usr.bin/mdoclint/mdoclint.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mdoclint.1,v 1.2 2008/10/31 14:26:56 jmc Exp $
+.\" $OpenBSD: mdoclint.1,v 1.3 2008/11/01 07:49:54 jmc Exp $
.\" $NetBSD: mdoclint.1,v 1.3 2003/05/09 09:22:05 wiz Exp $
.\"
.\" Copyright (c) 2001, 2002, 2003 Thomas Klausner
@@ -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 $Mdocdate: October 31 2008 $
+.Dd $Mdocdate: November 1 2008 $
.Os
.Dt MDOCLINT 1
.Sh NAME
@@ -56,7 +56,9 @@ between or after the cross-references.
.It Fl D
Warn about bad casing and architectures in the .Dt macro.
.It Fl d
-Warn about bad date strings (in the .Dd macro).
+Warn about .Dd strings
+that don't start
+.Dq .Dd $\&Mdocdate .
.It Fl e
Warn about unsorted errors (for functions).
.It Fl F
@@ -138,6 +140,11 @@ and
.Sh SEE ALSO
.Xr mdoc 7 ,
.Xr mdoc.samples 7
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Ox 4.5 .
.Sh AUTHORS
.An Thomas Klausner
.Aq wiz@netbsd.org