Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site starfire.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!stolaf!umn-cs!ncs-med!starfire!john From: john@starfire.UUCP (John Lind) Newsgroups: net.sources Subject: dtree patches for 4.1, kudos Message-ID: <144@starfire.UUCP> Date: Thu, 10-Oct-85 16:44:55 EDT Article-I.D.: starfire.144 Posted: Thu Oct 10 16:44:55 1985 Date-Received: Sun, 13-Oct-85 04:21:37 EDT Distribution: net Organization: Starfire Consulting Services, Mpls MN Lines: 32 Dtree came along at a good time -- it was just what some of my users wanted. I did have a little bit of trouble with long names for both directories and files, and I will enclose the (probably kludgy) fixes that I made. 14 character directory names cause problems with stating the files, and 14 character file names messed up the output. These patches are "least path of resistance", but they work. I lost the header lines to the original posting, else I would have sent the problem and the patched to the author for his reactions. I was not sure, after reading the comments, who might have posted it. At any rate, my thanks to whoever did the posting. 89c89 < #define TWIDDLE 4 --- > #define TWIDDLE 2 /* 16 bit bus */ 409c409 < sprintf(sub, "%s", dp->d_name); --- > sprintf(sub, "%.*s", MAXNAMLEN, dp->d_name); 670c670,671 < printf("|-%.*s",Maxes[Level],l->e_name); --- > printf("|-%.*s",Maxes[Level] > MAXNAMLEN ? MAXNAMLEN : > Maxes[Level],l->e_name); ------ "The question 'Can machines think?' is as ill-posed and uninteresting as the question 'Can submarines swim?'" -- Dr. E.W. Dijkstra, EWD-854 John Lind, Starfire Consulting Services E-mail: ihnp4!umn-cs!starfire!john USnail: PO Box 13001, Mpls MN 55414