[net.unix-wizards] dirtree revisited

ordy (01/15/83)

	My dirtree program has generated more response than I anticipated.
In particular, most everybody, including myself, would like it to produce
output optionally as something like:

               |--lisp
               |
               |--project
               |
          src--|--accounting---old
           |   |
           |   |--otherproj
           |
           |
           |    |--vlsi
           |    |
         graph--|
           |    |  |--library
	   |    |  |
           |    |--|
           |       |
           |       |--graphics
           |
        .--|
           |
           |
           .
           .
           .


(thanks to David Cherveny for the above example)

	I am working on such a translation, and unless somebody else
comes up with it first, I will post when finished. There was a bug
fix which I added, which caused some confusion as to its exact location.
Here is some context:

	In the function 'build_tree':

	if ((fp = fopen (".", "r")) == NULL) {
		pp = xalloc (strlen (dp->d_dname) + 3);
		sprintf (pp, "-%s-", dp->d_dname);
		dp->d_dname = pp;
		dp->d_length = strlen (pp);
add this ->	chdir ("..");			<---- add this line
		return;
	}

	There also was a claim that when directories which had the '*'
and '-' character bracketing occured they skewed the output. I guess
I don't see that as happening, so if others notice it, please tell me.

	Thanks for all the response, I think that if we can rotate
the output as suggested by many, the program will be much better.
So far I know it is also working under EUNICE, and on an HP9000!

	Greg Ordy (decvax!cwruecmp!ordy)