summaryrefslogtreecommitdiffstats
path: root/tree.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-21 15:21:13 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-21 15:21:13 +0000
commitff6ddfd72fee08b3063dffb618af31325e51beea (patch)
tree13490df552db9fb8c134636ddefc554d2ded3c46 /tree.c
parentfaba8b69bbb1a57a9980aa454612ab8cca95e93a (diff)
downloadmandoc-ff6ddfd72fee08b3063dffb618af31325e51beea.tar.gz
Support `size' constructs in eqn.7. Generalise mandoc_strontou to this
effect.
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tree.c b/tree.c
index 22f91a10..c1d7937e 100644
--- a/tree.c
+++ b/tree.c
@@ -19,6 +19,7 @@
#endif
#include <assert.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@@ -270,17 +271,20 @@ print_box(const struct eqn_box *ep, int indent)
switch (ep->type) {
case (EQN_ROOT):
- printf("eqn-root(%d, %d, %d)\n",
+ printf("eqn-root(%d, %d, %d, %d)\n",
+ EQN_DEFSIZE == ep->size ? 0 : ep->size,
ep->pos, ep->font, ep->mark);
print_box(ep->child, indent + 1);
break;
case (EQN_SUBEXPR):
- printf("eqn-subxpr(%d, %d, %d)\n",
+ printf("eqn-subxpr(%d, %d, %d, %d)\n",
+ EQN_DEFSIZE == ep->size ? 0 : ep->size,
ep->pos, ep->font, ep->mark);
print_box(ep->child, indent + 1);
break;
case (EQN_TEXT):
- printf("eqn-text(%d, %d, %d): [%s]\n",
+ printf("eqn-text(%d, %d, %d, %d): [%s]\n",
+ EQN_DEFSIZE == ep->size ? 0 : ep->size,
ep->pos, ep->font, ep->mark, ep->text);
break;
default: