diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-30 21:18:24 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-30 21:18:24 +0000 |
commit | b9959419144200aae35b8cb648937b9bd18a5716 (patch) | |
tree | c3f77cc28c6cb4c2534c00ca792e5715937d367a /mdoc.c | |
parent | bdbc20253f6d0e531a1f1bf519d9d01a5c1059a3 (diff) | |
download | mandoc-b9959419144200aae35b8cb648937b9bd18a5716.tar.gz |
garbage collect three unused global flags; no functional change
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 40 |
1 files changed, 6 insertions, 34 deletions
@@ -104,7 +104,6 @@ const struct mdoc_node * mdoc_node(const struct mdoc *mdoc) { - assert( ! (MDOC_HALT & mdoc->flags)); return(mdoc->first); } @@ -112,7 +111,6 @@ const struct mdoc_meta * mdoc_meta(const struct mdoc *mdoc) { - assert( ! (MDOC_HALT & mdoc->flags)); return(&mdoc->meta); } @@ -205,19 +203,11 @@ mdoc_alloc(struct roff *roff, struct mparse *parse, return(p); } -/* - * Climb back up the parse tree, validating open scopes. Mostly calls - * through to macro_end() in macro.c. - */ int mdoc_endparse(struct mdoc *mdoc) { - assert( ! (MDOC_HALT & mdoc->flags)); - if (mdoc_macroend(mdoc)) - return(1); - mdoc->flags |= MDOC_HALT; - return(0); + return(mdoc_macroend(mdoc)); } int @@ -225,8 +215,6 @@ mdoc_addeqn(struct mdoc *mdoc, const struct eqn *ep) { struct mdoc_node *n; - assert( ! (MDOC_HALT & mdoc->flags)); - n = node_alloc(mdoc, ep->ln, ep->pos, MDOC_MAX, MDOC_EQN); n->eqn = ep; @@ -242,8 +230,6 @@ mdoc_addspan(struct mdoc *mdoc, const struct tbl_span *sp) { struct mdoc_node *n; - assert( ! (MDOC_HALT & mdoc->flags)); - n = node_alloc(mdoc, sp->line, 0, MDOC_MAX, MDOC_TBL); n->span = sp; @@ -262,8 +248,6 @@ int mdoc_parseln(struct mdoc *mdoc, int ln, char *buf, int offs) { - assert( ! (MDOC_HALT & mdoc->flags)); - mdoc->flags |= MDOC_NEWLINE; /* @@ -883,11 +867,8 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) * into macro processing. */ - if (NULL == mdoc->last || MDOC_It == tok || MDOC_El == tok) { - if ( ! mdoc_macro(mdoc, tok, ln, sv, &offs, buf)) - goto err; - return(1); - } + if (NULL == mdoc->last || MDOC_It == tok || MDOC_El == tok) + return(mdoc_macro(mdoc, tok, ln, sv, &offs, buf)); n = mdoc->last; assert(mdoc->last); @@ -900,9 +881,7 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) if (MDOC_Bl == n->tok && MDOC_BODY == n->type && LIST_column == n->norm->Bl.type) { mdoc->flags |= MDOC_FREECOL; - if ( ! mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf)) - goto err; - return(1); + return(mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf)); } /* @@ -916,15 +895,13 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) MDOC_Bl == n->parent->tok && LIST_column == n->parent->norm->Bl.type) { mdoc->flags |= MDOC_FREECOL; - if ( ! mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf)) - goto err; - return(1); + return(mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf)); } /* Normal processing of a macro. */ if ( ! mdoc_macro(mdoc, tok, ln, sv, &offs, buf)) - goto err; + return(0); /* In quick mode (for mandocdb), abort after the NAME section. */ @@ -933,11 +910,6 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) return(2); return(1); - -err: /* Error out. */ - - mdoc->flags |= MDOC_HALT; - return(0); } enum mdelim |