This commit is contained in:
Oliver Lehmann 1989-12-11 12:32:28 +00:00
parent f94914987d
commit 414a0c87d8
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# include <stdio.h>
# include "gen.h"
# include "../h/dbs.h"
# include "../h/aux.h"
# include "../h/tree.h"
# include "../h/pipes.h"
# include "decomp.h"
static int tr_level;
printree(p, string)
register QTREE *p;
register char *string;
{
tr_level = 0;
printf("%s: 0%o\n", string, p);
prtree1(p);
}
prtree1(p)
register QTREE *p;
{
register int i;
if (!p)
return;
tr_level++;
prtree1(p->left);
prtree1(p->right);
printf("...%d\t", tr_level);
writenod(p);
--tr_level;
}