-/* $Id: tree.c,v 1.42 2011/07/21 14:13:00 kristaps Exp $ */
+/* $Id: tree.c,v 1.44 2011/07/21 23:30:39 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
#endif
#include <assert.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
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);
+ print_box(ep->first, indent + 1);
break;
case (EQN_SUBEXPR):
- printf("eqn-subxpr(%d, %d, %d)\n",
- ep->pos, ep->font, ep->mark);
- print_box(ep->child, indent + 1);
+ printf("eqn-subxpr(%d, %d, %d, %d, %d, %d, \"%s\", \"%s\")\n",
+ EQN_DEFSIZE == ep->size ? 0 : ep->size,
+ ep->pos, ep->font, ep->mark,
+ ep->pile, ep->above,
+ ep->left ? ep->left : "",
+ ep->right ? ep->right : "");
+ print_box(ep->first, 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: