R. Clayton (rclayton@clayton.cs.monmouth.edu)
(no date)
Draw-tree is available in /export/home/class/cs-509/pa2. Draw-tree displays
the tree it reads from std-in. A typical use of draw-tree is
make-tree $RANDOM | layout-tree | draw-tree
assuming your tree program is called layout-tree. $RANDOM is a ksh variable
that returns a random number; $RANDOM is not available in sh or csh (although
they may support a similar feature).
I found it useful to stick a tee in the pipeline to capture the input to
layout-tree; if there's a problem with the tree layout, I then have copy of the
input that caused the trouble. For example,
make-tree $RANDOM | tee t | layout-tree | draw-tree
makes a copy of the tree in the file t; see the tee man page for more details.
You must be sitting in front of a system that's running the X window system to
be able to use draw-tree; if you are sitting in front of a system that's not
running the X window system, you can't use draw-tree. If you are sitting in
front of a cs lab machine or a pc running linux and you're running a window
manager, then you're sitting in front of a system running the X window system
and you can use draw-tree. If you're sitting in front of a pc running ms
windows, then you are sitting in front of a system that is not running the X
window system and you can't use draw-tree. Draw-tree is written in plain old
version 8 Tcl-Tk, so you should be able to run a copy of it on any system that
supports a recent enough version of Tcl-Tk.
Draw-tree doesn't check the tree it reads from std-in to see if it's neatly
laid out; I'll eventually add that code.
This archive was generated by hypermail 2.0b3 on Fri Dec 21 2001 - 17:00:04 EST