=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/Attic/mdoc_action.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/mandoc/Attic/mdoc_action.c 2010/04/04 17:36:57 1.29 --- src/usr.bin/mandoc/Attic/mdoc_action.c 2010/04/07 23:15:05 1.30 *************** *** 1,4 **** ! /* $Id: mdoc_action.c,v 1.29 2010/04/04 17:36:57 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: mdoc_action.c,v 1.30 2010/04/07 23:15:05 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 417,422 **** --- 417,426 ---- if ( ! concat(m, buf, n->child, BUFSIZ)) return(0); sec = mdoc_atosec(buf); + /* + * The first section should always make us move into a non-new + * state. + */ if (SEC_NONE == m->lastnamed || SEC_CUSTOM != sec) m->lastnamed = sec; *************** *** 722,728 **** nn->string = NULL; nnp = nn; nn = nn->next; ! mdoc_node_free(nnp); } n->nchild = 0; --- 726,732 ---- nn->string = NULL; nnp = nn; nn = nn->next; ! mdoc_node_delete(NULL, nnp); } n->nchild = 0; *************** *** 847,875 **** static int post_prol(POST_ARGS) { - struct mdoc_node *np; ! if (n->parent->child == n) ! n->parent->child = n->prev; ! if (n->prev) ! n->prev->next = NULL; ! ! np = n; ! assert(NULL == n->next); ! ! if (n->prev) { ! m->last = n->prev; ! m->next = MDOC_NEXT_SIBLING; ! } else { ! m->last = n->parent; ! m->next = MDOC_NEXT_CHILD; ! } ! ! mdoc_node_freelist(np); ! if (m->meta.title && m->meta.date && m->meta.os) m->flags |= MDOC_PBODY; - return(1); } --- 851,860 ---- static int post_prol(POST_ARGS) { ! mdoc_node_delete(m, n); if (m->meta.title && m->meta.date && m->meta.os) m->flags |= MDOC_PBODY; return(1); }