=================================================================== RCS file: /cvs/mandoc/mdoc.c,v retrieving revision 1.235 retrieving revision 1.238 diff -u -p -r1.235 -r1.238 --- mandoc/mdoc.c 2015/02/02 04:26:44 1.235 +++ mandoc/mdoc.c 2015/02/12 13:00:52 1.238 @@ -1,7 +1,7 @@ -/* $Id: mdoc.c,v 1.235 2015/02/02 04:26:44 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.238 2015/02/12 13:00:52 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze + * Copyright (c) 2010, 2012-2015 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -363,7 +363,6 @@ node_alloc(struct mdoc *mdoc, int line, int pos, p->sec = mdoc->lastsec; p->line = line; p->pos = pos; - p->lastline = line; p->tok = tok; p->type = type; @@ -420,8 +419,10 @@ mdoc_endbody_alloc(struct mdoc *mdoc, int line, int po { struct mdoc_node *p; + body->flags |= MDOC_ENDED; + body->parent->flags |= MDOC_ENDED; p = node_alloc(mdoc, line, pos, tok, MDOC_BODY); - p->pending = body; + p->body = body; p->norm = body->norm; p->end = end; node_append(mdoc, p); @@ -600,8 +601,8 @@ mdoc_ptext(struct mdoc *mdoc, int line, char *buf, int * process within its context in the normal way). */ - if (MDOC_Bl == n->tok && MDOC_BODY == n->type && - LIST_column == n->norm->Bl.type) { + if (n->tok == MDOC_Bl && n->type == MDOC_BODY && + n->end == ENDBODY_NOT && n->norm->Bl.type == LIST_column) { /* `Bl' is open without any children. */ mdoc->flags |= MDOC_FREECOL; mdoc_macro(mdoc, MDOC_It, line, offs, &offs, buf); @@ -777,8 +778,8 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int * context around the parsed macro. */ - if (MDOC_Bl == n->tok && MDOC_BODY == n->type && - LIST_column == n->norm->Bl.type) { + if (n->tok == MDOC_Bl && n->type == MDOC_BODY && + n->end == ENDBODY_NOT && n->norm->Bl.type == LIST_column) { mdoc->flags |= MDOC_FREECOL; mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf); return(1);