summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-12 17:49:32 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-12 17:49:32 +0000
commit7b6ee4765fc5ee5661973ca07f8ccda5e9539a10 (patch)
tree33ed6e813c4cfd84c4fdb2798854f08b6fe2eabe
parentbfd4387d2751308ae900ec2c5ea535290e4e5173 (diff)
downloadmandoc-7b6ee4765fc5ee5661973ca07f8ccda5e9539a10.tar.gz
mandoc-7b6ee4765fc5ee5661973ca07f8ccda5e9539a10.tar.zst
mandoc-7b6ee4765fc5ee5661973ca07f8ccda5e9539a10.zip
Removed rmargin from termpair (right in print_node()).
-rw-r--r--mdoc_term.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 1e8d7867..b4dfa3df 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.29 2009/07/12 17:45:17 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.30 2009/07/12 17:49:32 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -86,8 +86,7 @@ const int ttypes[TTYPE_NMAX] = {
*/
struct termpair {
struct termpair *ppair;
- int flag; /* Whether being used. */
- size_t rmargin; /* Right margin. */
+ int flag; /* Cross-body struct termp:flags. */
int count; /* Enum count. */
};
@@ -346,15 +345,13 @@ print_node(DECL_ARGS)
{
int dochild;
struct termpair npair;
- size_t offset;
-
- /* Pre-processing. */
+ size_t offset, rmargin;
dochild = 1;
offset = p->offset;
+ rmargin = p->rmargin;
npair.ppair = pair;
- npair.rmargin = 0;
npair.flag = 0;
npair.count = 0;
@@ -379,6 +376,7 @@ print_node(DECL_ARGS)
(*termacts[node->tok].post)(p, &npair, meta, node);
p->offset = offset;
+ p->rmargin = rmargin;
p->flags &= ~npair.flag;
}
@@ -708,7 +706,6 @@ termp_it_pre(DECL_ARGS)
/* Save parent attributes. */
- pair->rmargin = p->rmargin;
pair->flag = p->flags;
/* Get list width and offset. */
@@ -971,7 +968,6 @@ termp_it_post(DECL_ARGS)
break;
}
- p->rmargin = pair->rmargin;
p->flags = pair->flag;
}
@@ -1125,6 +1121,7 @@ termp_nd_pre(DECL_ARGS)
if (MDOC_BODY != node->type)
return(1);
+
/*
* XXX: signed off by jmc@openbsd.org. This technically
* produces a minus sign after the Nd, which is wrong, but is