aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-03-04 11:40:09 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-03-04 11:40:09 +0000
commit04c83a367828561c8e5f8f4beb200e2978b5753c (patch)
tree5238eef40f95236b75a7a811e04c73b25003c006
parent7c82417f7ab1a3ccce8838c6cdc87c05291cf642 (diff)
downloadmandoc-04c83a367828561c8e5f8f4beb200e2978b5753c.tar.gz
mandoc-04c83a367828561c8e5f8f4beb200e2978b5753c.tar.zst
mandoc-04c83a367828561c8e5f8f4beb200e2978b5753c.zip
Fix the last straggler where the struct roff_node "line" member
was abused to detect an input line break; instead, use the NODE_LINE flag to improve robustness.
-rw-r--r--TODO6
-rw-r--r--mdoc_validate.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/TODO b/TODO
index 60551694..5df81ae1 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
************************************************************************
* Official mandoc TODO.
-* $Id: TODO,v 1.287 2019/03/04 11:37:30 schwarze Exp $
+* $Id: TODO,v 1.288 2019/03/04 11:40:09 schwarze Exp $
************************************************************************
Many issues are annotated for difficulty as follows:
@@ -523,10 +523,6 @@ are mere guesses, and some may be wrong.
Found by Aaron M. Ucko in the GNU Hurd via Bdale Garbee,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624
-- We use the input line number at several places to distinguish
- same-line from different-line input. That plainly doesn't work
- with user-defined macros, leading to random breakage.
-
- Is it possible to further simplify ENDBODY_SPACE?
- Find better ways to prevent endless loops
diff --git a/mdoc_validate.c b/mdoc_validate.c
index bd697e54..448cc7ca 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.369 2018/12/31 08:38:21 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.370 2019/03/04 11:40:09 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -1581,7 +1581,7 @@ post_it(POST_ARGS)
mandoc_msg(MANDOCERR_BL_COL, nit->line, nit->pos,
"%d columns, %d cells", cols, i);
else if (nit->head->next->child != NULL &&
- nit->head->next->child->line > nit->line)
+ nit->head->next->child->flags & NODE_LINE)
mandoc_msg(MANDOCERR_IT_NOARG,
nit->line, nit->pos, "Bl -column It");
break;