Fix to tree for 4.1BSD
utzoo!decvax!wivax!linus!genradbo!john
utzoo!decvax!wivax!linus!genradbo!john
Fri Jan 21 21:14:55 AEST 1983
Other than the fact that Dave Borman assumed that the type t_ino was the
same size as an unsigned, and that he misused some structure references,
his "tree" program works fine on 32 bit machines after minor modifications.
I have modified it to run under 4.1 BSD: Note that this program makes
major assumptions about the structure of directories and will NOT work
on 4.2 BSD without major modification. If get bored I may make the changes.
70,73c70,73
< unsigned short dir : 1; /* entry is a directory */
< unsigned short last : 1;/* last entry in the dir. */
< unsigned short dev : 1; /* set if same device as top */
< unsigned short end : 13;/* index of last subdir entry */
---
> unsigned dir : 1; /* entry is a directory */
> unsigned last : 1; /* last entry in the dir. */
> unsigned dev : 1; /* set if same device as top */
> unsigned end : 13; /* index of last subdir entry */
335c335
< if (a->u.flags.dir) /* sort by dir first */
---
> if (a->u.dir) /* sort by dir first */
397c397
< if (l->u.flags.dir != 0 && l->next != 0) {
---
> if (l->u.flags.dir != 0 && l->u.flags.next != 0) {
411c411
< if (hdr[j]->u.flags.last != 0)
---
> if (hdr[j]->last != 0)
John P. Nelson (decvax!genradbolton!john)
More information about the Comp.sources.unix
mailing list