From 04c83a367828561c8e5f8f4beb200e2978b5753c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 4 Mar 2019 11:40:09 +0000 Subject: 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. --- TODO | 6 +----- mdoc_validate.c | 4 ++-- 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 * Copyright (c) 2010-2018 Ingo Schwarze @@ -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; -- cgit v1.2.3-56-ge451