aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-22 13:25:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-22 13:25:17 +0000
commit830c24fffe79c67457607547e232de5f54da6c43 (patch)
tree2a10c95b729c6497acdcae00a35242ed9cef8631 /man_macro.c
parent6e5d31b93c4a3072b8551675dbceafc6b25a8a33 (diff)
downloadmandoc-830c24fffe79c67457607547e232de5f54da6c43.tar.gz
mandoc-830c24fffe79c67457607547e232de5f54da6c43.tar.zst
mandoc-830c24fffe79c67457607547e232de5f54da6c43.zip
Implement end-of-sentence spacing at the end of man(7) macro lines.
Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/man_macro.c b/man_macro.c
index 0078f479..d89298e2 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.77 2013/11/11 00:37:55 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.78 2013/12/22 13:25:17 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -432,6 +432,15 @@ in_line_eoln(MACRO_PROT_ARGS)
}
/*
+ * Append MAN_EOS in case the last snipped argument
+ * ends with a dot, e.g. `.IR syslog (3).'
+ */
+
+ if (n != man->last &&
+ mandoc_eos(man->last->string, strlen(man->last->string), 0))
+ man->last->flags |= MAN_EOS;
+
+ /*
* If no arguments are specified and this is MAN_SCOPED (i.e.,
* next-line scoped), then set our mode to indicate that we're
* waiting for terms to load into our context.