diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-25 12:27:37 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-02-25 12:27:37 +0000 |
commit | a017287dafe633c9f23e9990989b55dea239344c (patch) | |
tree | b376c10c00c43d91aebb5492af1ae2a91a9baa6a /mdocterm.c | |
parent | 3da36abba778bbb6f652585d4c8d476dcee854a4 (diff) | |
download | mandoc-a017287dafe633c9f23e9990989b55dea239344c.tar.gz mandoc-a017287dafe633c9f23e9990989b55dea239344c.tar.zst mandoc-a017287dafe633c9f23e9990989b55dea239344c.zip |
Some offsets built into termpair.
Diffstat (limited to 'mdocterm.c')
-rw-r--r-- | mdocterm.c | 22 |
1 files changed, 7 insertions, 15 deletions
@@ -1,4 +1,4 @@ - /* $Id: mdocterm.c,v 1.9 2009/02/25 12:09:20 kristaps Exp $ */ + /* $Id: mdocterm.c,v 1.10 2009/02/25 12:27:37 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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. */ |