diff options
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Cd/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Cd/eos.in | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Cd/eos.out_ascii | 9 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Fd/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Fd/eos.in | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Fd/eos.out_ascii | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Fo/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Fo/eos.in | 15 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Fo/eos.out_ascii | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Lb/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Lb/eos.in | 10 | ||||
-rw-r--r-- | regress/usr.bin/mandoc/mdoc/Lb/eos.out_ascii | 9 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_argv.c | 8 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 5 |
14 files changed, 102 insertions, 14 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Cd/Makefile b/regress/usr.bin/mandoc/mdoc/Cd/Makefile index 24e03a34e5c..c4a874f256f 100644 --- a/regress/usr.bin/mandoc/mdoc/Cd/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Cd/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.3 2012/07/09 17:52:09 schwarze Exp $ +# $OpenBSD: Makefile,v 1.4 2012/11/18 00:05:28 schwarze Exp $ -REGRESS_TARGETS = noarg font +REGRESS_TARGETS = noarg font eos .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Cd/eos.in b/regress/usr.bin/mandoc/mdoc/Cd/eos.in new file mode 100644 index 00000000000..9f83b8fc9be --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cd/eos.in @@ -0,0 +1,10 @@ +.Dd November 17, 2012 +.Dt CD-EOS 1 +.Os OpenBSD +.Sh NAME +.Nm Cd-eos +.Nd end of sentence handling after the configuration directive macro +.Sh DESCRIPTION +Do not use +.Cd options INSECURE . +It is insecure. diff --git a/regress/usr.bin/mandoc/mdoc/Cd/eos.out_ascii b/regress/usr.bin/mandoc/mdoc/Cd/eos.out_ascii new file mode 100644 index 00000000000..7a708a00660 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cd/eos.out_ascii @@ -0,0 +1,9 @@ +CD-EOS(1) OpenBSD Reference Manual CD-EOS(1) + +NNAAMMEE + CCdd--eeooss - end of sentence handling after the configuration directive macro + +DDEESSCCRRIIPPTTIIOONN + Do not use ooppttiioonnss IINNSSEECCUURREE. It is insecure. + +OpenBSD November 17, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fd/Makefile b/regress/usr.bin/mandoc/mdoc/Fd/Makefile index aebcffbadd8..18ce23ac96d 100644 --- a/regress/usr.bin/mandoc/mdoc/Fd/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Fd/Makefile @@ -1,5 +1,7 @@ -# $OpenBSD: Makefile,v 1.1 2012/07/09 23:52:47 schwarze Exp $ +# $OpenBSD: Makefile,v 1.2 2012/11/18 00:05:28 schwarze Exp $ -REGRESS_TARGETS = break font +REGRESS_TARGETS = break font eos + +SKIP_TMAN = eos .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Fd/eos.in b/regress/usr.bin/mandoc/mdoc/Fd/eos.in new file mode 100644 index 00000000000..f2efb028280 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fd/eos.in @@ -0,0 +1,10 @@ +.Dd November 17, 2012 +.Dt FD-EOS 1 +.Os OpenBSD +.Sh NAME +.Nm Fd-eos +.Nd end of sentence handling after the legacy include macro +.Sh DESCRIPTION +Let's use +.Fd string.h . +And then something else. diff --git a/regress/usr.bin/mandoc/mdoc/Fd/eos.out_ascii b/regress/usr.bin/mandoc/mdoc/Fd/eos.out_ascii new file mode 100644 index 00000000000..deb09b50b78 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fd/eos.out_ascii @@ -0,0 +1,10 @@ +FD-EOS(1) OpenBSD Reference Manual FD-EOS(1) + +NNAAMMEE + FFdd--eeooss - end of sentence handling after the legacy include macro + +DDEESSCCRRIIPPTTIIOONN + Let's use ssttrriinngg..hh .. + And then something else. + +OpenBSD November 17, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fo/Makefile b/regress/usr.bin/mandoc/mdoc/Fo/Makefile index d9da91a2621..48facb8351c 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Fo/Makefile @@ -1,9 +1,11 @@ -# $OpenBSD: Makefile,v 1.5 2012/07/09 17:52:09 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2012/11/18 00:05:28 schwarze Exp $ -REGRESS_TARGETS = basic section noarg font +REGRESS_TARGETS = basic section noarg font eos # groff 1.21 does not handle .nr nS SKIP_GROFF ?= section +SKIP_TMAN = eos + .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Fo/eos.in b/regress/usr.bin/mandoc/mdoc/Fo/eos.in new file mode 100644 index 00000000000..a97e00f9442 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fo/eos.in @@ -0,0 +1,15 @@ +.Dd November 17, 2012 +.Dt FO-EOS 1 +.Os OpenBSD +.Sh NAME +.Nm Fo-eos +.Nd end of sentence handling after a function block +.Sh DESCRIPTION +As an example of a trigonometric function, let us consider +.Fn "double sin" "double x" . +Or do you prefer +.Ft double +.Fo cos +.Fa double x +.Fc . +Either will do. diff --git a/regress/usr.bin/mandoc/mdoc/Fo/eos.out_ascii b/regress/usr.bin/mandoc/mdoc/Fo/eos.out_ascii new file mode 100644 index 00000000000..3690acafb7a --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Fo/eos.out_ascii @@ -0,0 +1,10 @@ +FO-EOS(1) OpenBSD Reference Manual FO-EOS(1) + +NNAAMMEE + FFoo--eeooss - end of sentence handling after a function block + +DDEESSCCRRIIPPTTIIOONN + As an example of a trigonometric function, let us consider ddoouubbllee + ssiinn(_d_o_u_b_l_e _x). Or do you prefer _d_o_u_b_l_e ccooss(_d_o_u_b_l_e, _x). Either will do. + +OpenBSD November 17, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Lb/Makefile b/regress/usr.bin/mandoc/mdoc/Lb/Makefile index b3a6bc02761..db35db4b92f 100644 --- a/regress/usr.bin/mandoc/mdoc/Lb/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Lb/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.4 2012/07/07 14:10:55 schwarze Exp $ +# $OpenBSD: Makefile,v 1.5 2012/11/18 00:05:28 schwarze Exp $ -REGRESS_TARGETS=break badargs +REGRESS_TARGETS = break badargs eos .include <bsd.regress.mk> diff --git a/regress/usr.bin/mandoc/mdoc/Lb/eos.in b/regress/usr.bin/mandoc/mdoc/Lb/eos.in new file mode 100644 index 00000000000..73a5cdcc569 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Lb/eos.in @@ -0,0 +1,10 @@ +.Dd November 17, 2012 +.Dt LB-EOS 1 +.Os OpenBSD +.Sh NAME +.Nm Lb-eos +.Nd end of sentence handling after the library macro +.Sh DESCRIPTION +Let's use the +.Lb libm . +And some other libraries. diff --git a/regress/usr.bin/mandoc/mdoc/Lb/eos.out_ascii b/regress/usr.bin/mandoc/mdoc/Lb/eos.out_ascii new file mode 100644 index 00000000000..1d868d70c8d --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Lb/eos.out_ascii @@ -0,0 +1,9 @@ +LB-EOS(1) OpenBSD Reference Manual LB-EOS(1) + +NNAAMMEE + LLbb--eeooss - end of sentence handling after the library macro + +DDEESSCCRRIIPPTTIIOONN + Let's use the Math Library (libm, -lm). And some other libraries. + +OpenBSD November 17, 2012 OpenBSD diff --git a/usr.bin/mandoc/mdoc_argv.c b/usr.bin/mandoc/mdoc_argv.c index 05448c7aa25..bf822dfa18c 100644 --- a/usr.bin/mandoc/mdoc_argv.c +++ b/usr.bin/mandoc/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.42 2012/11/17 00:25:20 schwarze Exp $ */ +/* $Id: mdoc_argv.c,v 1.43 2012/11/18 00:05:28 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2012 Ingo Schwarze <schwarze@openbsd.org> @@ -157,7 +157,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = { { ARGSFL_DELIM, NULL }, /* Ad */ { ARGSFL_DELIM, args_An }, /* An */ { ARGSFL_DELIM, NULL }, /* Ar */ - { ARGSFL_NONE, NULL }, /* Cd */ + { ARGSFL_DELIM, NULL }, /* Cd */ { ARGSFL_DELIM, NULL }, /* Cm */ { ARGSFL_DELIM, NULL }, /* Dv */ { ARGSFL_DELIM, NULL }, /* Er */ @@ -237,7 +237,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = { { ARGSFL_DELIM, NULL }, /* Xc */ { ARGSFL_NONE, NULL }, /* Xo */ { ARGSFL_NONE, NULL }, /* Fo */ - { ARGSFL_NONE, NULL }, /* Fc */ + { ARGSFL_DELIM, NULL }, /* Fc */ { ARGSFL_NONE, NULL }, /* Oo */ { ARGSFL_DELIM, NULL }, /* Oc */ { ARGSFL_NONE, args_Bk }, /* Bk */ @@ -246,7 +246,7 @@ static const struct mdocarg mdocargs[MDOC_MAX] = { { ARGSFL_NONE, NULL }, /* Hf */ { ARGSFL_NONE, NULL }, /* Fr */ { ARGSFL_NONE, NULL }, /* Ud */ - { ARGSFL_NONE, NULL }, /* Lb */ + { ARGSFL_DELIM, NULL }, /* Lb */ { ARGSFL_NONE, NULL }, /* Lp */ { ARGSFL_DELIM, NULL }, /* Lk */ { ARGSFL_DELIM, NULL }, /* Mt */ diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 4600b4e499f..8093a52a50a 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.76 2012/11/17 00:25:20 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.77 2012/11/18 00:05:28 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2012 Ingo Schwarze <schwarze@openbsd.org> @@ -608,7 +608,8 @@ dword(struct mdoc *mdoc, int line, */ else if (DELIM_CLOSE == d && mdoc->last->prev && - mdoc->last->prev->tok != MDOC_No) + mdoc->last->prev->tok != MDOC_No && + mdoc->last->parent->tok != MDOC_Fd) mdoc->last->flags |= MDOC_DELIMC; return(1); |