====== tree ====== ===== tree 1.5.3 ===== The 1.5.3 release solves the problems shown below. All you have to do with this version is uncomment the OS X lines in the Makefile. You can change the prefix= line to /usr/local if you are set up that way. ===== tree 1.5.2 ===== * :!: patch files below work with tree version 1.5.2 * download source from http://mama.indstate.edu/users/ice/tree/ * use the patch files below to fix the code to compile on Mac OS X (10.5) * **tree.c.patch** --- tree.c 2008-06-04 12:45:46.000000000 -0700 +++ ../tree-1.5.2-wmh/tree.c 2008-07-20 22:26:48.000000000 -0700 @@ -143,7 +143,7 @@ /* Function prototypes: */ int color(u_short, char *, char, char), cmd(char *), patmatch(char *, char *); int alnumsort(struct _info **, struct _info **); -int versort(struct _info **a, struct _info **b); +// int versort(struct _info **a, struct _info **b); int reversealnumsort(struct _info **, struct _info **); int timesort(struct _info **, struct _info **); int dirsfirstsort(struct _info **, struct _info **); @@ -296,9 +296,9 @@ case 'r': cmpfunc = reversealnumsort; break; - case 'v': - cmpfunc = versort; - break; + // case 'v': + // cmpfunc = versort; + // break; case 'H': Hflag = TRUE; if (argv[n] == NULL) { @@ -580,7 +580,7 @@ fprintf(stderr," -h Print the size in a more human readable way.\n"); fprintf(stderr," -D Print the date of last modification.\n"); fprintf(stderr," -F Appends '/', '=', '*', or '|' as per ls -F.\n"); - fprintf(stderr," -v Sort files alphanumerically by version.\n"); + // fprintf(stderr," -v Sort files alphanumerically by version.\n"); fprintf(stderr," -r Sort files in reverse alphanumeric order.\n"); fprintf(stderr," -t Sort files by last modification time.\n"); fprintf(stderr," -x Stay on current filesystem only.\n"); @@ -917,10 +917,10 @@ return strcmp((*a)->name,(*b)->name); } -int versort(struct _info **a, struct _info **b) -{ - return strverscmp((*a)->name,(*b)->name); -} +// int versort(struct _info **a, struct _info **b) +// { + // return strverscmp((*a)->name,(*b)->name); +// } int reversealnumsort(struct _info **a, struct _info **b) { * **Makefile.patch** --- Makefile 2008-06-04 07:16:39.000000000 -0700 +++ ../tree-1.5.2-wmh/Makefile 2008-07-20 22:24:50.000000000 -0700 @@ -24,9 +24,9 @@ ## Comment out TREE_DEST definition below as well for Cygwin # Uncomment for OS X: -#CC=cc -#CFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp -#LDFLAGS= +CC=cc +CFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp +LDFLAGS= # Uncomment for HP/UX: #CC=cc @@ -38,7 +38,7 @@ #CFLAGS=-02 -Wall -fomit-frame-pointer -Zomf -Zsmall-conv #LDFLAGS=-s -Zomf -Zsmall-conv -prefix = /usr +prefix = /usr/local VERSION=1.5.2 TREE_DEST=tree * cd tree-1.5.2 * patch -p0 < tree.c.patch * patch -p0 < Makefile.patch * make * sudo make install