summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2012-11-16 18:40:39 +0000
committerschwarze <schwarze@openbsd.org>2012-11-16 18:40:39 +0000
commitcf9fe9ab99cbcdea4870ca15a7c83e50f8d3ffa3 (patch)
treed9c4fb1794a97da6c0eb817711831d4169f0817e
parentImprove formatting of badly nested font blocks. (diff)
downloadwireguard-openbsd-cf9fe9ab99cbcdea4870ca15a7c83e50f8d3ffa3.tar.xz
wireguard-openbsd-cf9fe9ab99cbcdea4870ca15a7c83e50f8d3ffa3.zip
Two more macros (.Ap and .In) do trailing delimiter handling.
This fixes the end of sentence spacing in open(2) and in about 150 pages in the NetBSD base system. Reported by Nicolas Joly <njoly a pasteur point fr>, merci!
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ap/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ap/eos.in12
-rw-r--r--regress/usr.bin/mandoc/mdoc/Ap/eos.out_ascii10
-rw-r--r--regress/usr.bin/mandoc/mdoc/In/Makefile4
-rw-r--r--regress/usr.bin/mandoc/mdoc/In/eos.in10
-rw-r--r--regress/usr.bin/mandoc/mdoc/In/eos.out_ascii9
-rw-r--r--usr.bin/mandoc/mdoc_argv.c7
7 files changed, 49 insertions, 7 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Ap/Makefile b/regress/usr.bin/mandoc/mdoc/Ap/Makefile
index dfa81cedcfe..4ee492534dc 100644
--- a/regress/usr.bin/mandoc/mdoc/Ap/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Ap/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.1.1.1 2011/12/04 03:09:25 schwarze Exp $
+# $OpenBSD: Makefile,v 1.2 2012/11/16 18:40:39 schwarze Exp $
-REGRESS_TARGETS=middle
+REGRESS_TARGETS = middle eos
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/Ap/eos.in b/regress/usr.bin/mandoc/mdoc/Ap/eos.in
new file mode 100644
index 00000000000..032cf72ab45
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ap/eos.in
@@ -0,0 +1,12 @@
+.Dd November 16, 2012
+.Dt AP-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm Ap-eos
+.Nd end of sentence handling after the apostrophe macro
+.Sh DESCRIPTION
+The first sentence is
+.An Ingo Ap s .
+The second is
+.An Kristaps Ap .
+No idea about the third.
diff --git a/regress/usr.bin/mandoc/mdoc/Ap/eos.out_ascii b/regress/usr.bin/mandoc/mdoc/Ap/eos.out_ascii
new file mode 100644
index 00000000000..91d3084b02a
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Ap/eos.out_ascii
@@ -0,0 +1,10 @@
+AP-EOS(1) OpenBSD Reference Manual AP-EOS(1)
+
+NNAAMMEE
+ AApp--eeooss - end of sentence handling after the apostrophe macro
+
+DDEESSCCRRIIPPTTIIOONN
+ The first sentence is Ingo's. The second is Kristaps'. No idea about
+ the third.
+
+OpenBSD November 16, 2012 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/In/Makefile b/regress/usr.bin/mandoc/mdoc/In/Makefile
index 8d76a4df828..55c83febd60 100644
--- a/regress/usr.bin/mandoc/mdoc/In/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/In/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.4 2012/07/09 17:52:09 schwarze Exp $
+# $OpenBSD: Makefile,v 1.5 2012/11/16 18:40:39 schwarze Exp $
-REGRESS_TARGETS = break font
+REGRESS_TARGETS = break font eos
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/mandoc/mdoc/In/eos.in b/regress/usr.bin/mandoc/mdoc/In/eos.in
new file mode 100644
index 00000000000..929c2be9a8e
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/In/eos.in
@@ -0,0 +1,10 @@
+.Dd November 16, 2012
+.Dt IN-EOS 1
+.Os OpenBSD
+.Sh NAME
+.Nm In-eos
+.Nd end of sentence handling after the include macro
+.Sh DESCRIPTION
+Let's use
+.In string.h .
+And then something else.
diff --git a/regress/usr.bin/mandoc/mdoc/In/eos.out_ascii b/regress/usr.bin/mandoc/mdoc/In/eos.out_ascii
new file mode 100644
index 00000000000..fee045373bc
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/In/eos.out_ascii
@@ -0,0 +1,9 @@
+IN-EOS(1) OpenBSD Reference Manual IN-EOS(1)
+
+NNAAMMEE
+ IInn--eeooss - end of sentence handling after the include macro
+
+DDEESSCCRRIIPPTTIIOONN
+ Let's use <_s_t_r_i_n_g_._h>. And then something else.
+
+OpenBSD November 16, 2012 OpenBSD
diff --git a/usr.bin/mandoc/mdoc_argv.c b/usr.bin/mandoc/mdoc_argv.c
index 2daa8853b4f..11cba1fefd7 100644
--- a/usr.bin/mandoc/mdoc_argv.c
+++ b/usr.bin/mandoc/mdoc_argv.c
@@ -1,6 +1,7 @@
-/* $Id: mdoc_argv.c,v 1.40 2012/04/15 10:31:00 schwarze Exp $ */
+/* $Id: mdoc_argv.c,v 1.41 2012/11/16 18:40:39 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2012 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -139,7 +140,7 @@ static const enum mdocargt args_Bl[] = {
};
static const struct mdocarg mdocargs[MDOC_MAX] = {
- { ARGSFL_NONE, NULL }, /* Ap */
+ { ARGSFL_DELIM, NULL }, /* Ap */
{ ARGSFL_NONE, NULL }, /* Dd */
{ ARGSFL_NONE, NULL }, /* Dt */
{ ARGSFL_NONE, NULL }, /* Os */
@@ -168,7 +169,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = {
{ ARGSFL_DELIM, NULL }, /* Fn */
{ ARGSFL_DELIM, NULL }, /* Ft */
{ ARGSFL_DELIM, NULL }, /* Ic */
- { ARGSFL_NONE, NULL }, /* In */
+ { ARGSFL_DELIM, NULL }, /* In */
{ ARGSFL_DELIM, NULL }, /* Li */
{ ARGSFL_NONE, NULL }, /* Nd */
{ ARGSFL_DELIM, NULL }, /* Nm */