From d5e1ccb6de73cd87d11400b2f3d09826595bfc89 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 4 Dec 2018 02:53:51 +0000 Subject: Clean up the validation of .Pp, .PP, .sp, and .br. Make sure all combinations are handled, and are handled in a systematic manner. This resolves some erratic duplicate handling, handles a number of missing cases, and improves diagnostics in various respects. Move validation of .br and .sp to the roff validation module rather than doing that twice in the mdoc and man validation modules. Move the node relinking function to the roff library where it belongs. In validation functions, only look at the node itself, at previous nodes, and at descendants, not at following nodes or ancestors, such that only nodes are inspected which are already validated. --- mdoc.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'mdoc.c') diff --git a/mdoc.c b/mdoc.c index 22f25b69..1c852cc8 100644 --- a/mdoc.c +++ b/mdoc.c @@ -155,15 +155,6 @@ mdoc_elem_alloc(struct roff_man *mdoc, int line, int pos, mdoc->next = ROFF_NEXT_CHILD; } -void -mdoc_node_relink(struct roff_man *mdoc, struct roff_node *p) -{ - - roff_node_unlink(mdoc, p); - p->prev = p->next = NULL; - roff_node_append(mdoc, p); -} - /* * Parse free-form text, that is, a line that does not begin with the * control character. -- cgit