diff options
author | 2018-12-13 03:40:13 +0000 | |
---|---|---|
committer | 2018-12-13 03:40:13 +0000 | |
commit | 41c83570cd0b176c663b583e5990f9869f214754 (patch) | |
tree | 95da442ae18416eff5593d4cdb041f4ad5bc78c7 /roff.c | |
parent | 8778c0e49080778fd04dc5a3c1aac38addbfa5a4 (diff) | |
download | mandoc-41c83570cd0b176c663b583e5990f9869f214754.tar.gz mandoc-41c83570cd0b176c663b583e5990f9869f214754.tar.zst mandoc-41c83570cd0b176c663b583e5990f9869f214754.zip |
Cleanup, no functional change:
In libroff.h, nothing was left except the eqn(7) parser interface, which
isn't really part of the roff(7) parser, so rename it to eqn_parse.h.
While here, move struct eqn_def to eqn.c because that's the only
file using it, and let eqn_box_free() and eqn_free() handle NULL.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.346 2018/12/13 02:06:07 schwarze Exp $ */ +/* $Id: roff.c,v 1.347 2018/12/13 03:40:13 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -34,8 +34,8 @@ #include "roff.h" #include "libmandoc.h" #include "roff_int.h" -#include "libroff.h" #include "tbl_parse.h" +#include "eqn_parse.h" /* Maximum number of string expansions per line, to break infinite loops. */ #define EXPAND_LIMIT 1000 @@ -723,8 +723,7 @@ roff_free1(struct roff *r) tbl_free(r->first_tbl); r->first_tbl = r->last_tbl = r->tbl = NULL; - if (r->last_eqn != NULL) - eqn_free(r->last_eqn); + eqn_free(r->last_eqn); r->last_eqn = r->eqn = NULL; while (r->mstackpos >= 0) @@ -1079,8 +1078,7 @@ roff_node_free(struct roff_node *n) mdoc_argv_free(n->args); if (n->type == ROFFT_BLOCK || n->type == ROFFT_ELEM) free(n->norm); - if (n->eqn != NULL) - eqn_box_free(n->eqn); + eqn_box_free(n->eqn); free(n->string); free(n); } |