- return(rew_last(mdoc, n));
-}
-
-
-static int
-rew_expblock(struct mdoc *mdoc, int tok, int line, int ppos)
-{
- struct mdoc_node *n;
- int c;
-
- /* LINTED */
- for (n = mdoc->last; n; n = n->parent) {
- c = rew_dohalt(tok, MDOC_BLOCK, n);
- if (REWIND_HALT == c)
- return(mdoc_perr(mdoc, line, ppos, ENOCTX));
- if (REWIND_REWIND == c)
- break;
- else if (rew_dobreak(tok, n))
- continue;
- if ( ! swarn(mdoc, MDOC_BLOCK, line, ppos, n))
- return(0);
- }
-
- assert(n);
- return(rew_last(mdoc, n));
-}
-
-
-static int
-rew_impblock(struct mdoc *mdoc, int tok, int line, int ppos)
-{
- struct mdoc_node *n;
- int c;
-
- /* LINTED */
- for (n = mdoc->last; n; n = n->parent) {
- c = rew_dohalt(tok, MDOC_BLOCK, n);
- if (REWIND_HALT == c)
- return(1);
- else if (REWIND_REWIND == c)
- break;
- else if (rew_dobreak(tok, n))
- continue;
- if ( ! swarn(mdoc, MDOC_BLOCK, line, ppos, n))
- return(0);
- }
-
- assert(n);
- return(rew_last(mdoc, n));