From 88750dda2da444fce307d20d33700d72e7c49c7f Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 27 Feb 2020 01:43:52 +0000 Subject: Introduce the concept of nodes that are semantically transparent: they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm and .Tg, and man(7) .DT and .PD. Use this concept for a variety of improved decisions in various validators and formatters. While here, * remove a few const qualifiers on struct arguments that caused trouble; * get rid of some more Yoda notation in the vicinity; * and apply some other stylistic improvements in the vicinity. I found this class of issues while considering .Tg patches from kn@. --- regress/man/HP/Makefile | 4 ++-- regress/man/HP/vert.in | 14 ++++++++++++++ regress/man/HP/vert.out_ascii | 21 +++++++++++++++++++++ regress/man/IP/Makefile | 7 ++++--- regress/man/IP/bullet.in | 22 ++++++++++++++++++++++ regress/man/IP/bullet.out_ascii | 28 ++++++++++++++++++++++++++++ regress/man/IP/bullet.out_html | 12 ++++++++++++ regress/man/IP/bullet.out_utf8 | 28 ++++++++++++++++++++++++++++ regress/man/IP/vert.in | 10 ++++++++++ regress/man/IP/vert.out_ascii | 16 ++++++++++++++++ regress/man/PP/Makefile | 4 ++-- regress/man/PP/vert.in | 10 ++++++++++ regress/man/PP/vert.out_ascii | 16 ++++++++++++++++ regress/man/SH/Makefile | 4 ++-- regress/man/SH/vert.in | 10 ++++++++++ regress/man/SH/vert.out_ascii | 14 ++++++++++++++ regress/man/SS/Makefile | 4 ++-- regress/man/SS/vert.in | 12 ++++++++++++ regress/man/SS/vert.out_ascii | 17 +++++++++++++++++ regress/man/TP/Makefile | 6 +++--- regress/man/TP/vert.in | 17 +++++++++++++++++ regress/man/TP/vert.out_ascii | 20 ++++++++++++++++++++ regress/man/TP/vert.out_html | 9 +++++++++ 23 files changed, 291 insertions(+), 14 deletions(-) create mode 100644 regress/man/HP/vert.in create mode 100644 regress/man/HP/vert.out_ascii create mode 100644 regress/man/IP/bullet.in create mode 100644 regress/man/IP/bullet.out_ascii create mode 100644 regress/man/IP/bullet.out_html create mode 100644 regress/man/IP/bullet.out_utf8 create mode 100644 regress/man/IP/vert.in create mode 100644 regress/man/IP/vert.out_ascii create mode 100644 regress/man/PP/vert.in create mode 100644 regress/man/PP/vert.out_ascii create mode 100644 regress/man/SH/vert.in create mode 100644 regress/man/SH/vert.out_ascii create mode 100644 regress/man/SS/vert.in create mode 100644 regress/man/SS/vert.out_ascii create mode 100644 regress/man/TP/vert.in create mode 100644 regress/man/TP/vert.out_ascii create mode 100644 regress/man/TP/vert.out_html (limited to 'regress/man') diff --git a/regress/man/HP/Makefile b/regress/man/HP/Makefile index 1e33cfb4..945f5339 100644 --- a/regress/man/HP/Makefile +++ b/regress/man/HP/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.3 2019/01/06 04:41:15 schwarze Exp $ +# $OpenBSD: Makefile,v 1.4 2020/02/27 01:25:58 schwarze Exp $ -REGRESS_TARGETS = break literal macrotag manyargs spacing +REGRESS_TARGETS = break literal macrotag manyargs spacing vert HTML_TARGETS = literal .include diff --git a/regress/man/HP/vert.in b/regress/man/HP/vert.in new file mode 100644 index 00000000..b433c7e0 --- /dev/null +++ b/regress/man/HP/vert.in @@ -0,0 +1,14 @@ +.\" $OpenBSD: vert.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH HP-VERT 1 "February 19, 2020" +.SH NAME +HP-vert \- vertical spacing before hanged lists +.SH DESCRIPTION +.PD 2v +.HP +Each hanged paragraph gets a sufficient amount of text +to wrap to the next line. +.HP +Each hanged paragraph gets a sufficient amount of text +to wrap to the next line. +.LP +Normal text. diff --git a/regress/man/HP/vert.out_ascii b/regress/man/HP/vert.out_ascii new file mode 100644 index 00000000..30fa3dd4 --- /dev/null +++ b/regress/man/HP/vert.out_ascii @@ -0,0 +1,21 @@ +HP-VERT(1) General Commands Manual HP-VERT(1) + + + +NNAAMMEE + HP-vert - vertical spacing before hanged lists + +DDEESSCCRRIIPPTTIIOONN + Each hanged paragraph gets a sufficient amount of text to wrap to the + next line. + + + Each hanged paragraph gets a sufficient amount of text to wrap to the + next line. + + + Normal text. + + + +OpenBSD February 19, 2020 HP-VERT(1) diff --git a/regress/man/IP/Makefile b/regress/man/IP/Makefile index a677b970..70094e5f 100644 --- a/regress/man/IP/Makefile +++ b/regress/man/IP/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.9 2019/01/06 04:41:15 schwarze Exp $ +# $OpenBSD: Makefile,v 1.10 2020/02/27 01:25:58 schwarze Exp $ -REGRESS_TARGETS = empty literal longhead manyargs spacing width +REGRESS_TARGETS = bullet empty literal longhead manyargs spacing vert width +UTF8_TARGETS = bullet LINT_TARGETS = empty -HTML_TARGETS = literal +HTML_TARGETS = bullet literal .include diff --git a/regress/man/IP/bullet.in b/regress/man/IP/bullet.in new file mode 100644 index 00000000..138a681b --- /dev/null +++ b/regress/man/IP/bullet.in @@ -0,0 +1,22 @@ +.\" $OpenBSD: bullet.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH IP-BULLET 1 "February 20, 2020" +.SH NAME +IP-bullet \- bullet lists +.SH DESCRIPTION +BEGINTEST +.IP * 3n +one +.IP * +two +.IP \(bu +three +.IP \(bu +four +.IP \- +five +.IP \- +six +.PP +ENDTEST +.br +end of file diff --git a/regress/man/IP/bullet.out_ascii b/regress/man/IP/bullet.out_ascii new file mode 100644 index 00000000..a01f25c2 --- /dev/null +++ b/regress/man/IP/bullet.out_ascii @@ -0,0 +1,28 @@ +IP-BULLET(1) General Commands Manual IP-BULLET(1) + + + +NNAAMMEE + IP-bullet - bullet lists + +DDEESSCCRRIIPPTTIIOONN + BEGINTEST + + * one + + * two + + +o three + + +o four + + - five + + - six + + ENDTEST + end of file + + + +OpenBSD February 20, 2020 IP-BULLET(1) diff --git a/regress/man/IP/bullet.out_html b/regress/man/IP/bullet.out_html new file mode 100644 index 00000000..95c452b0 --- /dev/null +++ b/regress/man/IP/bullet.out_html @@ -0,0 +1,12 @@ +
    +
  • one
  • +
  • two
  • +
+
    +
  • three
  • +
  • four
  • +
+
    +
  • five
  • +
  • six
  • +
diff --git a/regress/man/IP/bullet.out_utf8 b/regress/man/IP/bullet.out_utf8 new file mode 100644 index 00000000..fa021fd5 --- /dev/null +++ b/regress/man/IP/bullet.out_utf8 @@ -0,0 +1,28 @@ +IP-BULLET(1) General Commands Manual IP-BULLET(1) + + + +NNAAMMEE + IP-bullet - bullet lists + +DDEESSCCRRIIPPTTIIOONN + BEGINTEST + + * one + + * two + + • three + + • four + + - five + + - six + + ENDTEST + end of file + + + +OpenBSD February 20, 2020 IP-BULLET(1) diff --git a/regress/man/IP/vert.in b/regress/man/IP/vert.in new file mode 100644 index 00000000..cc5e2038 --- /dev/null +++ b/regress/man/IP/vert.in @@ -0,0 +1,10 @@ +.\" $OpenBSD: vert.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH IP-VERT 1 "February 19, 2020" +.SH NAME +IP-vert \- vertical spacing before indented paragraphs +.SH DESCRIPTION +.PD 2v +.IP tag +text +.IP tag +text diff --git a/regress/man/IP/vert.out_ascii b/regress/man/IP/vert.out_ascii new file mode 100644 index 00000000..428733be --- /dev/null +++ b/regress/man/IP/vert.out_ascii @@ -0,0 +1,16 @@ +IP-VERT(1) General Commands Manual IP-VERT(1) + + + +NNAAMMEE + IP-vert - vertical spacing before indented paragraphs + +DDEESSCCRRIIPPTTIIOONN + tag text + + + tag text + + + +OpenBSD February 19, 2020 IP-VERT(1) diff --git a/regress/man/PP/Makefile b/regress/man/PP/Makefile index 7655d294..a9eb9760 100644 --- a/regress/man/PP/Makefile +++ b/regress/man/PP/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.4 2014/07/04 16:11:41 schwarze Exp $ +# $OpenBSD: Makefile,v 1.5 2020/02/27 01:25:58 schwarze Exp $ -REGRESS_TARGETS = args empty +REGRESS_TARGETS = args empty vert LINT_TARGETS = args empty .include diff --git a/regress/man/PP/vert.in b/regress/man/PP/vert.in new file mode 100644 index 00000000..e15148c8 --- /dev/null +++ b/regress/man/PP/vert.in @@ -0,0 +1,10 @@ +.\" $OpenBSD: vert.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH PP-VERT 1 "February 19, 2020" +.SH NAME +PP-vert \- vertical spacing before an ordinary paragraph +.SH DESCRIPTION +.PD 2v +.PP +first paragraph +.PP +second paragraph diff --git a/regress/man/PP/vert.out_ascii b/regress/man/PP/vert.out_ascii new file mode 100644 index 00000000..ac53e071 --- /dev/null +++ b/regress/man/PP/vert.out_ascii @@ -0,0 +1,16 @@ +PP-VERT(1) General Commands Manual PP-VERT(1) + + + +NNAAMMEE + PP-vert - vertical spacing before an ordinary paragraph + +DDEESSCCRRIIPPTTIIOONN + first paragraph + + + second paragraph + + + +OpenBSD February 19, 2020 PP-VERT(1) diff --git a/regress/man/SH/Makefile b/regress/man/SH/Makefile index 55133efe..f42a85b2 100644 --- a/regress/man/SH/Makefile +++ b/regress/man/SH/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.6 2019/01/06 04:41:15 schwarze Exp $ +# $OpenBSD: Makefile,v 1.7 2020/02/27 01:25:58 schwarze Exp $ -REGRESS_TARGETS = broken broken_eline empty_before longarg noarg paragraph +REGRESS_TARGETS = broken broken_eline empty_before longarg noarg paragraph vert LINT_TARGETS = broken broken_eline empty_before noarg HTML_TARGETS = paragraph diff --git a/regress/man/SH/vert.in b/regress/man/SH/vert.in new file mode 100644 index 00000000..e4154782 --- /dev/null +++ b/regress/man/SH/vert.in @@ -0,0 +1,10 @@ +.\" $OpenBSD: vert.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH SH-VERT 1 "February 20, 2020" +.SH NAME +SH-vert \- vertical spacing of sections +.SH DESCRIPTION +.PD 2v +.SH EXAMPLES +.PD 1v +.PP +text diff --git a/regress/man/SH/vert.out_ascii b/regress/man/SH/vert.out_ascii new file mode 100644 index 00000000..f8afd7e0 --- /dev/null +++ b/regress/man/SH/vert.out_ascii @@ -0,0 +1,14 @@ +SH-VERT(1) General Commands Manual SH-VERT(1) + + + +NNAAMMEE + SH-vert - vertical spacing of sections + +DDEESSCCRRIIPPTTIIOONN +EEXXAAMMPPLLEESS + text + + + +OpenBSD February 20, 2020 SH-VERT(1) diff --git a/regress/man/SS/Makefile b/regress/man/SS/Makefile index 0ae0fbc5..edbe4c2c 100644 --- a/regress/man/SS/Makefile +++ b/regress/man/SS/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.4 2019/01/06 04:41:15 schwarze Exp $ +# $OpenBSD: Makefile,v 1.5 2020/02/27 01:25:58 schwarze Exp $ -REGRESS_TARGETS = broken broken_eline longarg noarg paragraph +REGRESS_TARGETS = broken broken_eline longarg noarg paragraph vert LINT_TARGETS = broken broken_eline noarg HTML_TARGETS = paragraph diff --git a/regress/man/SS/vert.in b/regress/man/SS/vert.in new file mode 100644 index 00000000..8beb98a6 --- /dev/null +++ b/regress/man/SS/vert.in @@ -0,0 +1,12 @@ +.\" $OpenBSD: vert.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH SS-VERT 1 "February 19, 2020" +.SH NAME +SS-vert \- vertical spacing of subsections +.SH DESCRIPTION +.PD 2v +.SS First subsection +.PD 1v +.SS Second subsection +first paragraph +.PP +second paragraph diff --git a/regress/man/SS/vert.out_ascii b/regress/man/SS/vert.out_ascii new file mode 100644 index 00000000..9b5dc152 --- /dev/null +++ b/regress/man/SS/vert.out_ascii @@ -0,0 +1,17 @@ +SS-VERT(1) General Commands Manual SS-VERT(1) + + + +NNAAMMEE + SS-vert - vertical spacing of subsections + +DDEESSCCRRIIPPTTIIOONN + FFiirrsstt ssuubbsseeccttiioonn + SSeeccoonndd ssuubbsseeccttiioonn + first paragraph + + second paragraph + + + +OpenBSD February 19, 2020 SS-VERT(1) diff --git a/regress/man/TP/Makefile b/regress/man/TP/Makefile index 2fc1074f..ca2475b0 100644 --- a/regress/man/TP/Makefile +++ b/regress/man/TP/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.15 2019/01/06 04:41:15 schwarze Exp $ +# $OpenBSD: Makefile,v 1.16 2020/02/27 01:25:58 schwarze Exp $ REGRESS_TARGETS = badarg broken double eof fill indent literal longhead -REGRESS_TARGETS += macrotag manyargs sameline spacing width +REGRESS_TARGETS += macrotag manyargs sameline spacing vert width LINT_TARGETS = broken double eof -HTML_TARGETS = literal +HTML_TARGETS = literal vert # groff-1.22.3 defects: # - If .TP precedes .RE, the latter does not properly reset indentation. diff --git a/regress/man/TP/vert.in b/regress/man/TP/vert.in new file mode 100644 index 00000000..086976df --- /dev/null +++ b/regress/man/TP/vert.in @@ -0,0 +1,17 @@ +.\" $OpenBSD: vert.in,v 1.1 2020/02/27 01:25:58 schwarze Exp $ +.TH TP-VERT 1 "February 19, 2020" +.SH NAME +TP-vert \- vertical spacing before tagged paragraphs +BEGINTEST +.SH DESCRIPTION +.PD 2v +.TP +tag +text +.TP +tag +text +.PP +ENDTEST +.br +end of file diff --git a/regress/man/TP/vert.out_ascii b/regress/man/TP/vert.out_ascii new file mode 100644 index 00000000..32b26ca9 --- /dev/null +++ b/regress/man/TP/vert.out_ascii @@ -0,0 +1,20 @@ +TP-VERT(1) General Commands Manual TP-VERT(1) + + + +NNAAMMEE + TP-vert - vertical spacing before tagged paragraphs BEGINTEST + +DDEESSCCRRIIPPTTIIOONN + tag text + + + tag text + + + ENDTEST + end of file + + + +OpenBSD February 19, 2020 TP-VERT(1) diff --git a/regress/man/TP/vert.out_html b/regress/man/TP/vert.out_html new file mode 100644 index 00000000..7301819f --- /dev/null +++ b/regress/man/TP/vert.out_html @@ -0,0 +1,9 @@ + +
+

+
+
tag
+
text
+
tag
+
text
+
-- cgit v1.2.3-56-ge451