From 3c57b84babf2f55c9532d892999da0258ef9bcc1 Mon Sep 17 00:00:00 2001 From: schwarze Date: Wed, 31 May 2017 15:35:22 +0000 Subject: [PATCH] remove -X, it was just migrated to mandoc -Wstyle; OK wiz@ --- regress/usr.bin/mdoclint/mdoclint | 35 +++++------------------------ regress/usr.bin/mdoclint/mdoclint.1 | 33 +++++++++------------------ 2 files changed, 17 insertions(+), 51 deletions(-) diff --git a/regress/usr.bin/mdoclint/mdoclint b/regress/usr.bin/mdoclint/mdoclint index 4c6783304ed..e37832b9060 100644 --- a/regress/usr.bin/mdoclint/mdoclint +++ b/regress/usr.bin/mdoclint/mdoclint @@ -1,7 +1,7 @@ #!/usr/bin/perl # -# $OpenBSD: mdoclint,v 1.63 2017/05/15 17:24:48 schwarze Exp $ -# $NetBSD: mdoclint,v 1.71 2017/05/15 09:33:03 wiz Exp $ +# $OpenBSD: mdoclint,v 1.64 2017/05/31 15:35:22 schwarze Exp $ +# $NetBSD: mdoclint,v 1.72 2017/05/16 13:27:39 wiz Exp $ # # Copyright (c) 2001-2017 Thomas Klausner # All rights reserved. @@ -43,8 +43,7 @@ use constant { use vars qw( $opt_D $opt_d $opt_e $opt_F $opt_f $opt_h $opt_l - $opt_m $opt_n $opt_o $opt_p $opt_r $opt_S $opt_v $opt_w - $opt_X $opt_x + $opt_m $opt_n $opt_o $opt_p $opt_r $opt_S $opt_v $opt_w $opt_x ); @@ -54,7 +53,7 @@ my $options="aDdeFfHhlmnoprSvwXx"; sub usage { - my $default = OPENBSD ? "-DdfmnoprSXx" : "-DdeflmnoprSXx"; + my $default = OPENBSD ? "-DdfmnoprSx" : "-DdeflmnoprSx"; print STDERR <<"EOF"; mdoclint: verify man page correctness @@ -74,7 +73,6 @@ usage: mdoclint [-$options] file ... -S warn about any .Sh weirdness -v verbose output -w show section header in warnings - -X warn about explicit mentions of the *BSD system names -x warn about cross-references with missing targets Default is $default if no flag is specified. EOF @@ -82,13 +80,6 @@ EOF } -my %short = ( - "Free" => ".Fx", - "Net" => ".Nx", - "DragonFly" => ".Dx", - "Open" => ".Ox" -); - my %libraries = ( "libarchive" => 1, "libarm" => 1, @@ -248,10 +239,10 @@ sub handle_options # default to all warnings if no flag is set unless ($opt_D or $opt_d or $opt_e or $opt_f or $opt_l or $opt_m or $opt_n or $opt_o or $opt_p or $opt_r - or $opt_S or $opt_X or $opt_x) { + or $opt_S or $opt_x) { $opt_D = $opt_d = $opt_f = $opt_m = $opt_n = $opt_o = $opt_p = $opt_r = $opt_S = - $opt_X = $opt_x = 1; + $opt_x = 1; $opt_e = $opt_l = 1 if NETBSD; } } @@ -442,20 +433,6 @@ sub process_line if (/^\.Fn.*,.+/o) { $s->warning("possible .Fn misuse: `$_'") if $opt_f; } - - if (/\b(Free|Net|DragonFly|Open)BSD\b/o - and not /\b(?:www|ftp)\.(?:Free|Net|DragonFly|Open)BSD\.org\b/o - and not /\bOpenBSD\::.*3p\b/o - and not /\/pub\/OpenBSD\//o - and not /\@(?:Free|Net|Open)BSD\.(?i:org)\b/o) { - $s->warning("verbose mention of `$1BSD' instead of " - . "`$short{$1}': `$_'") if $opt_X; - } - if (/^\./o and (/Bx (Open)/o or /Bx (Free)/o - or /Bx (DragonFly)/o or /Bx (Net)/o)) { - $s->warning("`.Bx $1' found -- use $short{$1} instead") - if $opt_X; - } if (/^\.Lb\s+(\S+)/o) { if (not $libraries{$1}) { $s->warning("Unknown library `$1' used as Lb argument") if $opt_l; diff --git a/regress/usr.bin/mdoclint/mdoclint.1 b/regress/usr.bin/mdoclint/mdoclint.1 index 1f3bc1b15b3..ce7016aee98 100644 --- a/regress/usr.bin/mdoclint/mdoclint.1 +++ b/regress/usr.bin/mdoclint/mdoclint.1 @@ -1,5 +1,5 @@ -.\" $OpenBSD: mdoclint.1,v 1.21 2017/05/15 17:24:48 schwarze Exp $ -.\" $NetBSD: mdoclint.1,v 1.15 2017/05/02 13:59:10 wiz Exp $ +.\" $OpenBSD: mdoclint.1,v 1.22 2017/05/31 15:35:22 schwarze Exp $ +.\" $NetBSD: mdoclint.1,v 1.18 2017/05/16 13:27:39 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 $Mdocdate: May 15 2017 $ +.Dd $Mdocdate: May 31 2017 $ .Dt MDOCLINT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd man page verifier .Sh SYNOPSIS .Nm -.Op Fl DdeFfhlmnoprSvwXx +.Op Fl DdeFfhlmnoprSvwx .Ar .Sh DESCRIPTION .Nm @@ -41,7 +41,7 @@ is a man page verifier. It tries to automatically find as many common errors that occur when writing man pages as possible. If no flags are given, -.Fl DdfmnoprSXx +.Fl DdfmnoprSx is assumed (that is, everything except .Fl eFhlvw ) . .Pp @@ -92,21 +92,6 @@ Verbose output. Display the section name, in addition to the relevant line number, in warnings. -.It Fl X -Warn about explicit mentions of the words -.Dq FreeBSD , -.Dq NetBSD , -.Dq DragonFlyBSD , -and -.Dq OpenBSD , -which should be replaced by .Fx, .Nx, .Dx, and .Ox respectively. -Also notices occurrences of -.Dq \&.Bx Free , -.Dq \&.Bx Net , -.Dq \&.Bx DragonFly , -and -.Dq \&.Bx Open , -for which the same applies. .It Fl x Warn about cross-references whose target is missing, cross-references to itself, or plain bogus cross-references. @@ -128,8 +113,12 @@ The utility first appeared in .Ox 4.5 . .Sh AUTHORS -.An Thomas Klausner Aq Mt wiz@netbsd.org -.An Marc Espie Aq Mt espie@openbsd.org +.An Thomas Klausner +.Aq Mt wiz@NetBSD.org +.An Marc Espie +.Aq Mt espie@OpenBSD.org +.An Ingo Schwarze +.Aq Mt schwarze@OpenBSD.org .Sh BUGS The .Fl o -- 2.20.1