diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-11-16 18:40:40 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2012-11-16 18:40:40 +0000 |
commit | 061a6346f4f4414832b2c18ac23ca3e0613b32f3 (patch) | |
tree | efa7efe1f4bce64ed27e93b55b7517014ae2cf00 | |
parent | 06de48388a133b00eb9122b0fa77d1ee45f80c83 (diff) |
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/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Ap/eos.in | 12 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Ap/eos.out_ascii | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/In/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/In/eos.in | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/In/eos.out_ascii | 9 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_argv.c | 7 |
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 5c5fb4109d6..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 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 */ |