Module Name: src
Committed By: joerg
Date: Tue Apr 20 18:07:52 UTC 2010
Modified Files:
src/external/bsd/mdocml/dist: mdoc_action.c
Log Message:
Merge for mdocml-1.9.23.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/mdocml/dist/mdoc_action.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/mdocml/dist/mdoc_action.c
diff -u src/external/bsd/mdocml/dist/mdoc_action.c:1.6 src/external/bsd/mdocml/dist/mdoc_action.c:1.7
--- src/external/bsd/mdocml/dist/mdoc_action.c:1.6 Mon Apr 5 14:22:59 2010
+++ src/external/bsd/mdocml/dist/mdoc_action.c Tue Apr 20 18:07:52 2010
@@ -1,4 +1,4 @@
-/* $Vendor-Id: mdoc_action.c,v 1.51 2010/03/31 07:13:53 kristaps Exp $ */
+/* $Vendor-Id: mdoc_action.c,v 1.53 2010/04/06 11:33:00 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <[email protected]>
*
@@ -420,7 +420,11 @@
if ( ! concat(m, buf, n->child, BUFSIZ))
return(0);
sec = mdoc_atosec(buf);
- if (SEC_CUSTOM != sec)
+ /*
+ * The first section should always make us move into a non-new
+ * state.
+ */
+ if (SEC_NONE == m->lastnamed || SEC_CUSTOM != sec)
m->lastnamed = sec;
/* Some sections only live in certain manual sections. */
@@ -725,7 +729,7 @@
nn->string = NULL;
nnp = nn;
nn = nn->next;
- mdoc_node_free(nnp);
+ mdoc_node_delete(NULL, nnp);
}
n->nchild = 0;
@@ -850,29 +854,10 @@
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);
+ mdoc_node_delete(m, n);
if (m->meta.title && m->meta.date && m->meta.os)
m->flags |= MDOC_PBODY;
-
return(1);
}