From 3d83c79ffa7d9a17bb296c711a439e4c752fcb9c Mon Sep 17 00:00:00 2001 From: schwarze Date: Tue, 13 Jun 2017 15:05:22 +0000 Subject: [PATCH] Delete the arbitrary range restriction for -Owidth. We provide users with tools. We don't attempt to prevent them from using them in stupid ways: depending on the context, not every stupid-looking use is necessarily actually stupid, and not every stupidity can be automatically detected anyway, so don't even try. --- usr.bin/mandoc/mandoc.1 | 7 +++---- usr.bin/mandoc/manpath.c | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1 index 7eae59f2374..19253b8219d 100644 --- a/usr.bin/mandoc/mandoc.1 +++ b/usr.bin/mandoc/mandoc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mandoc.1,v 1.122 2017/06/11 17:16:36 schwarze Exp $ +.\" $OpenBSD: mandoc.1,v 1.123 2017/06/13 15:05:22 schwarze Exp $ .\" .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2012, 2014-2017 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 11 2017 $ +.Dd $Mdocdate: June 13 2017 $ .Dt MANDOC 1 .Os .Sh NAME @@ -301,8 +301,7 @@ Increasing this is not recommended; it may result in degraded formatting, for example overfull lines or ugly line breaks. .It Cm width Ns = Ns Ar width The output width is set to -.Ar width , -which will normalise to \(>=58. +.Ar width . .El .Ss HTML Output Output produced by diff --git a/usr.bin/mandoc/manpath.c b/usr.bin/mandoc/manpath.c index aae0b75e30b..47ba19036d8 100644 --- a/usr.bin/mandoc/manpath.c +++ b/usr.bin/mandoc/manpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: manpath.c,v 1.20 2017/02/10 15:44:31 schwarze Exp $ */ +/* $OpenBSD: manpath.c,v 1.21 2017/06/13 15:05:22 schwarze Exp $ */ /* * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze * Copyright (c) 2011 Kristaps Dzonsons @@ -298,7 +298,7 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile) mandoc_asprintf(&oldval, "%zu", conf->width); break; } - conf->width = strtonum(cp, 58, 1000, &errstr); + conf->width = strtonum(cp, 1, 1000, &errstr); if (errstr == NULL) return 0; warnx("-O width=%s is %s", cp, errstr); -- 2.20.1