diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-18 20:46:19 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-06-18 20:46:19 +0000 |
commit | 65dc168510767708e266ed70c10c9e2a646424fa (patch) | |
tree | 893ef034f49f88a19a1a3a753e0d514227aaa6ce /man.c | |
parent | 5a58b9c46f195b91a6e97db9ae3778de5e5bae2f (diff) | |
download | mandoc-65dc168510767708e266ed70c10c9e2a646424fa.tar.gz mandoc-65dc168510767708e266ed70c10c9e2a646424fa.tar.zst mandoc-65dc168510767708e266ed70c10c9e2a646424fa.zip |
Added nchild decrement in libman (not used, but better in than forgotten).
Added nchild to libmdoc, deprecated count() functions in validator.
Diffstat (limited to 'man.c')
-rw-r--r-- | man.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.23 2009/06/18 10:53:58 kristaps Exp $ */ +/* $Id: man.c,v 1.24 2009/06/18 20:46:19 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -252,6 +252,8 @@ man_node_free(struct man_node *p) if (p->string) free(p->string); + if (p->parent) + p->parent->nchild--; free(p); } @@ -265,6 +267,7 @@ man_node_freelist(struct man_node *p) if (p->next) man_node_freelist(p->next); + assert(0 == p->nchild); man_node_free(p); } |