=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.281 retrieving revision 1.282 diff -u -p -r1.281 -r1.282 --- mandoc/roff.c 2015/10/20 02:01:32 1.281 +++ mandoc/roff.c 2015/10/21 23:51:11 1.282 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.281 2015/10/20 02:01:32 schwarze Exp $ */ +/* $Id: roff.c,v 1.282 2015/10/21 23:51:11 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -1025,47 +1025,31 @@ roff_node_append(struct roff_man *man, struct roff_nod abort(); } n->parent->nchild++; + man->last = n; - /* - * Copy over the normalised-data pointer of our parent. Not - * everybody has one, but copying a null pointer is fine. - */ - switch (n->type) { - case ROFFT_BODY: - if (n->end != ENDBODY_NOT) - break; - /* FALLTHROUGH */ - case ROFFT_TAIL: case ROFFT_HEAD: - n->norm = n->parent->norm; - break; - default: - break; - } - - if (man->macroset == MACROSET_MDOC) - mdoc_valid_pre(man, n); - - switch (n->type) { - case ROFFT_HEAD: - assert(n->parent->type == ROFFT_BLOCK); n->parent->head = n; break; case ROFFT_BODY: - if (n->end) - break; - assert(n->parent->type == ROFFT_BLOCK); + if (n->end != ENDBODY_NOT) + return; n->parent->body = n; break; case ROFFT_TAIL: - assert(n->parent->type == ROFFT_BLOCK); n->parent->tail = n; break; default: - break; + return; } - man->last = n; + + /* + * Copy over the normalised-data pointer of our parent. Not + * everybody has one, but copying a null pointer is fine. + */ + + n->norm = n->parent->norm; + assert(n->parent->type == ROFFT_BLOCK); } void