|
@@ -1,6 +1,6 @@
|
|
|
Index: man/tree.1
|
|
Index: man/tree.1
|
|
|
---- man/tree.1.orig 2007-06-11 15:22:14 +0200
|
|
|
|
|
-+++ man/tree.1 2008-06-04 22:20:33 +0200
|
|
|
|
|
|
|
+--- man/tree.1.orig 2008-06-04 17:35:31 +0200
|
|
|
|
|
++++ man/tree.1 2008-06-07 20:49:03 +0200
|
|
|
@@ -25,8 +25,8 @@
|
|
@@ -25,8 +25,8 @@
|
|
|
.br
|
|
.br
|
|
|
.SH DESCRIPTION
|
|
.SH DESCRIPTION
|
|
@@ -12,19 +12,23 @@ Index: man/tree.1
|
|
|
\fItree\fP lists the files in the current directory. When directory
|
|
\fItree\fP lists the files in the current directory. When directory
|
|
|
arguments are given, \fItree\fP lists all the files and/or directories found
|
|
arguments are given, \fItree\fP lists all the files and/or directories found
|
|
|
in the given directories each in turn. Upon completion of listing all
|
|
in the given directories each in turn. Upon completion of listing all
|
|
|
-@@ -149,7 +149,7 @@
|
|
|
|
|
|
|
+@@ -149,11 +149,7 @@
|
|
|
.PP
|
|
.PP
|
|
|
.TP
|
|
.TP
|
|
|
.B -N
|
|
.B -N
|
|
|
-Print non-printable characters as is instead of the default carrot notation.
|
|
-Print non-printable characters as is instead of the default carrot notation.
|
|
|
|
|
+-.PP
|
|
|
|
|
+-.TP
|
|
|
|
|
+-.B -v
|
|
|
|
|
+-Sort the output by version.
|
|
|
+Print non-printable characters as is instead of the default caret notation.
|
|
+Print non-printable characters as is instead of the default caret notation.
|
|
|
.PP
|
|
.PP
|
|
|
.TP
|
|
.TP
|
|
|
.B -r
|
|
.B -r
|
|
|
Index: tree.c
|
|
Index: tree.c
|
|
|
---- tree.c.orig 2008-06-04 16:15:11 +0200
|
|
|
|
|
-+++ tree.c 2008-06-04 22:20:33 +0200
|
|
|
|
|
-@@ -31,6 +31,12 @@
|
|
|
|
|
|
|
+--- tree.c.orig 2008-06-04 21:45:46 +0200
|
|
|
|
|
++++ tree.c 2008-06-07 20:49:20 +0200
|
|
|
|
|
+@@ -33,6 +33,12 @@
|
|
|
#include <limits.h>
|
|
#include <limits.h>
|
|
|
#include <pwd.h>
|
|
#include <pwd.h>
|
|
|
#include <grp.h>
|
|
#include <grp.h>
|
|
@@ -37,7 +41,15 @@ Index: tree.c
|
|
|
#ifdef __EMX__ /* for OS/2 systems */
|
|
#ifdef __EMX__ /* for OS/2 systems */
|
|
|
# define INCL_DOSFILEMGR
|
|
# define INCL_DOSFILEMGR
|
|
|
# define INCL_DOSNLS
|
|
# define INCL_DOSNLS
|
|
|
-@@ -196,7 +202,8 @@
|
|
|
|
|
|
|
+@@ -143,7 +149,6 @@
|
|
|
|
|
+ /* 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 reversealnumsort(struct _info **, struct _info **);
|
|
|
|
|
+ int timesort(struct _info **, struct _info **);
|
|
|
|
|
+ int dirsfirstsort(struct _info **, struct _info **);
|
|
|
|
|
+@@ -200,7 +205,8 @@
|
|
|
q = p = dtotal = ftotal = 0;
|
|
q = p = dtotal = ftotal = 0;
|
|
|
aflag = dflag = fflag = lflag = pflag = sflag = Fflag = uflag = gflag = FALSE;
|
|
aflag = dflag = fflag = lflag = pflag = sflag = Fflag = uflag = gflag = FALSE;
|
|
|
Dflag = qflag = Nflag = Hflag = Rflag = hflag = FALSE;
|
|
Dflag = qflag = Nflag = Hflag = Rflag = hflag = FALSE;
|
|
@@ -45,9 +57,19 @@ Index: tree.c
|
|
|
+ noindent = force_color = xdev = noreport = nolinks = FALSE;
|
|
+ noindent = force_color = xdev = noreport = nolinks = FALSE;
|
|
|
+ nocolor = TRUE;
|
|
+ nocolor = TRUE;
|
|
|
inodeflag = devflag = FALSE;
|
|
inodeflag = devflag = FALSE;
|
|
|
|
|
+ flimit = 0;
|
|
|
dirs = xmalloc(sizeof(int) * (maxdirs=4096));
|
|
dirs = xmalloc(sizeof(int) * (maxdirs=4096));
|
|
|
- dirs[0] = 0;
|
|
|
|
|
-@@ -624,7 +631,7 @@
|
|
|
|
|
|
|
+@@ -296,9 +302,6 @@
|
|
|
|
|
+ case 'r':
|
|
|
|
|
+ cmpfunc = reversealnumsort;
|
|
|
|
|
+ break;
|
|
|
|
|
+- case 'v':
|
|
|
|
|
+- cmpfunc = versort;
|
|
|
|
|
+- break;
|
|
|
|
|
+ case 'H':
|
|
|
|
|
+ Hflag = TRUE;
|
|
|
|
|
+ if (argv[n] == NULL) {
|
|
|
|
|
+@@ -658,7 +661,7 @@
|
|
|
#ifdef __USE_FILE_OFFSET64
|
|
#ifdef __USE_FILE_OFFSET64
|
|
|
if (inodeflag) sprintf(path," %7lld",(*dir)->inode);
|
|
if (inodeflag) sprintf(path," %7lld",(*dir)->inode);
|
|
|
#else
|
|
#else
|
|
@@ -56,3 +78,15 @@ Index: tree.c
|
|
|
#endif
|
|
#endif
|
|
|
if (devflag) sprintf(path+strlen(path), " %3d", (int)(*dir)->dev);
|
|
if (devflag) sprintf(path+strlen(path), " %3d", (int)(*dir)->dev);
|
|
|
#ifdef __EMX__
|
|
#ifdef __EMX__
|
|
|
|
|
+@@ -917,11 +920,6 @@
|
|
|
|
|
+ return strcmp((*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)
|
|
|
|
|
+ {
|
|
|
|
|
+ return strcmp((*b)->name,(*a)->name);
|