diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-04-06 11:33:00 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-04-06 11:33:00 +0000 |
commit | 22d01d0d9aae6da89fe61b15d0879d6ee8a348ae (patch) | |
tree | 787ae86e6c1a869d2906b025eee3e0a5e19386f5 /mdoc_action.c | |
parent | 80afe8e5f638df0bd4a6db2145ae2babd9ede57d (diff) | |
download | mandoc-22d01d0d9aae6da89fe61b15d0879d6ee8a348ae.tar.gz mandoc-22d01d0d9aae6da89fe61b15d0879d6ee8a348ae.tar.zst mandoc-22d01d0d9aae6da89fe61b15d0879d6ee8a348ae.zip |
Migrating mdoc_node_free() and mdoc_node_freelist() to use mdoc_node_delete(), which has a more intuitive interface and mirrors libman.
Diffstat (limited to 'mdoc_action.c')
-rw-r--r-- | mdoc_action.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index dcf3d32d..1d0245c7 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.52 2010/04/05 09:03:12 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.53 2010/04/06 11:33:00 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -729,7 +729,7 @@ post_bl_head(POST_ARGS) nn->string = NULL; nnp = nn; nn = nn->next; - mdoc_node_free(nnp); + mdoc_node_delete(NULL, nnp); } n->nchild = 0; @@ -854,29 +854,10 @@ post_dd(POST_ARGS) 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); } |