summaryrefslogtreecommitdiffstats
path: root/mdocterm.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 12:27:37 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-25 12:27:37 +0000
commit8f3ec82bd3ba7aa8787e16c8c71de3b052b4866a (patch)
tree96b81baf67cff089fdf6a6420ddaa14ad443b893 /mdocterm.c
parent17758e0da9b52fb54e22c38cf77b36a01e52eb66 (diff)
downloadmandoc-8f3ec82bd3ba7aa8787e16c8c71de3b052b4866a.tar.gz
Some offsets built into termpair.
Diffstat (limited to 'mdocterm.c')
-rw-r--r--mdocterm.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/mdocterm.c b/mdocterm.c
index 014a010f..2f14ef44 100644
--- a/mdocterm.c
+++ b/mdocterm.c
@@ -416,6 +416,8 @@ body(struct termp *p, const struct mdoc_meta *meta,
dochild = 1;
pair.type = 0;
+ pair.offset = 0;
+ pair.flag = 0;
if (MDOC_TEXT != node->type) {
if (termacts[node->tok].pre)
@@ -426,24 +428,14 @@ body(struct termp *p, const struct mdoc_meta *meta,
/* Children. */
- switch (pair.type) {
- case (TERMPAIR_FLAG):
- p->flags |= pair.data.flag;
- break;
- default:
- break;
- }
+ if (TERMPAIR_FLAG & pair.type)
+ p->flags |= pair.flag;
if (dochild && node->child)
body(p, meta, node->child);
- switch (pair.type) {
- case (TERMPAIR_FLAG):
- p->flags &= ~pair.data.flag;
- break;
- default:
- break;
- }
+ if (TERMPAIR_FLAG & pair.type)
+ p->flags &= ~pair.flag;
/* Post-processing. */