summaryrefslogtreecommitdiffstats
path: root/macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-12 17:26:42 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-12 17:26:42 +0000
commit29a6a3e523dc0b1673d87a68f8801d248cc7926d (patch)
treee9e37b64db68050e4d1e16819aa722abbd7a583b /macro.c
parent1ffa508fd07870fb2094e48de2c5207abd02fc6c (diff)
downloadmandoc-29a6a3e523dc0b1673d87a68f8801d248cc7926d.tar.gz
*** empty log message ***
Diffstat (limited to 'macro.c')
-rw-r--r--macro.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/macro.c b/macro.c
index 37769a85..673325d4 100644
--- a/macro.c
+++ b/macro.c
@@ -68,6 +68,8 @@ rewind_last(struct mdoc *mdoc, struct mdoc_node *to)
return(0);
if ( ! mdoc_action_post(mdoc))
return(0);
+ mdoc_msg(mdoc, "rewound to %s",
+ mdoc_macronames[mdoc->last->tok]);
return(1);
}
@@ -78,6 +80,8 @@ rewind_last(struct mdoc *mdoc, struct mdoc_node *to)
return(0);
if ( ! mdoc_action_post(mdoc))
return(0);
+ mdoc_msg(mdoc, "rewound to %s",
+ mdoc_macronames[mdoc->last->tok]);
} while (mdoc->last != to);
return(1);
@@ -109,11 +113,10 @@ rewind_body(struct mdoc *mdoc, int tok)
/* LINTED */
for (n = mdoc->last; n; n = n->parent) {
- if (MDOC_BODY != n->type)
- continue;
- if (tok == (t = n->tok))
+ t = n->tok;
+ if (MDOC_BODY == n->type && tok == t)
break;
- if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags))
+ if (MDOC_NESTED & mdoc_macros[t].flags)
continue;
return(mdoc_verr(mdoc, n, ERR_SCOPE_BREAK));
}
@@ -133,11 +136,10 @@ rewind_head(struct mdoc *mdoc, int tok)
/* LINTED */
for (n = mdoc->last; n; n = n->parent) {
- if (MDOC_HEAD != n->type)
- continue;
- if (tok == (t = n->tok))
+ t = n->tok;
+ if (MDOC_HEAD == n->type && tok == t)
break;
- if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags))
+ if (MDOC_NESTED & mdoc_macros[t].flags)
continue;
return(mdoc_verr(mdoc, n, ERR_SCOPE_BREAK));
}
@@ -157,9 +159,8 @@ rewind_expblock(struct mdoc *mdoc, int tok)
/* LINTED */
for ( ; n; n = n->parent) {
- if (MDOC_BLOCK != n->type)
- continue;
- if (tok == (t = n->tok))
+ t = n->tok;
+ if (MDOC_BLOCK == n->type && tok == t)
break;
if (MDOC_NESTED & mdoc_macros[t].flags)
continue;
@@ -181,9 +182,8 @@ rewind_impblock(struct mdoc *mdoc, int tok)
/* LINTED */
for ( ; n; n = n->parent) {
- if (MDOC_BLOCK != n->type)
- continue;
- if (tok == (t = n->tok))
+ t = n->tok;
+ if (MDOC_BLOCK == n->type && tok == t)
break;
if ( ! (MDOC_EXPLICIT & mdoc_macros[t].flags))
continue;