2 changed files with 29 additions and 82 deletions
@ -1,92 +1,39 @@
|
||||
Index: man/tree.1
|
||||
--- 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 @@
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
\fITree\fP is a recursive directory listing program that produces a depth
|
||||
-indented listing of files, which is colorized ala \fIdircolors\fP if the \fBLS_COLORS\fP
|
||||
-environment variable is set and output is to tty. With no arguments,
|
||||
+indented listing of files. Color is supported ala \fIdircolors\fP if the \fBLS_COLORS\fP
|
||||
+environment variable is set, output is to a tty, and the \fB-C\fP flag is used. With no arguments,
|
||||
\fItree\fP lists the files in the current directory. When directory
|
||||
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
|
||||
@@ -149,11 +149,7 @@
|
||||
.PP
|
||||
.TP
|
||||
.B -N
|
||||
-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.
|
||||
.PP
|
||||
.TP
|
||||
.B -r
|
||||
Index: tree.c
|
||||
--- 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 <pwd.h>
|
||||
#include <grp.h>
|
||||
+
|
||||
+#if !defined(LINUX_BIGFILE) && defined(__linux__)
|
||||
+# define stat64 stat
|
||||
+# define lstat64 lstat
|
||||
+#endif
|
||||
+
|
||||
#ifdef __EMX__ /* for OS/2 systems */
|
||||
# define INCL_DOSFILEMGR
|
||||
# define INCL_DOSNLS
|
||||
@@ -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;
|
||||
aflag = dflag = fflag = lflag = pflag = sflag = Fflag = uflag = gflag = FALSE;
|
||||
Dflag = qflag = Nflag = Hflag = Rflag = hflag = FALSE;
|
||||
- noindent = force_color = nocolor = xdev = noreport = nolinks = FALSE;
|
||||
+ noindent = force_color = xdev = noreport = nolinks = FALSE;
|
||||
+ nocolor = TRUE;
|
||||
inodeflag = devflag = FALSE;
|
||||
flimit = 0;
|
||||
dirs = xmalloc(sizeof(int) * (maxdirs=4096));
|
||||
@@ -296,9 +302,6 @@
|
||||
--- tree.c.orig 2014-04-29 08:25:55.220977000 +0200
|
||||
+++ tree.c 2014-04-29 08:27:11.471402152 +0200
|
||||
@@ -64,7 +64,6 @@
|
||||
int (*cmpfunc)();
|
||||
} sorts[] = {
|
||||
{"name", alnumsort},
|
||||
- {"version", versort},
|
||||
{"size", fsizesort},
|
||||
{"mtime", mtimesort},
|
||||
{"ctime", ctimesort},
|
||||
@@ -214,9 +213,6 @@
|
||||
case 'r':
|
||||
cmpfunc = reversealnumsort;
|
||||
reverse = TRUE;
|
||||
break;
|
||||
- case 'v':
|
||||
- cmpfunc = versort;
|
||||
- break;
|
||||
case 'H':
|
||||
Hflag = TRUE;
|
||||
if (argv[n] == NULL) {
|
||||
@@ -658,7 +661,7 @@
|
||||
#ifdef __USE_FILE_OFFSET64
|
||||
if (inodeflag) sprintf(path," %7lld",(*dir)->inode);
|
||||
#else
|
||||
- if (inodeflag) sprintf(path," %7ld",(*dir)->inode);
|
||||
+ if (inodeflag) sprintf(path," %7ld", (long int)((*dir)->inode));
|
||||
#endif
|
||||
if (devflag) sprintf(path+strlen(path), " %3d", (int)(*dir)->dev);
|
||||
#ifdef __EMX__
|
||||
@@ -917,11 +920,6 @@
|
||||
return strcmp((*a)->name,(*b)->name);
|
||||
case 'U':
|
||||
cmpfunc = NULL;
|
||||
break;
|
||||
@@ -898,17 +894,6 @@
|
||||
return reverse? -v : v;
|
||||
}
|
||||
|
||||
-int versort(struct _info **a, struct _info **b)
|
||||
-{
|
||||
- return strverscmp((*a)->name,(*b)->name);
|
||||
- int v;
|
||||
-
|
||||
- if (dirsfirst && ((*a)->isdir != (*b)->isdir)) {
|
||||
- return (*a)->isdir ? -1 : 1;
|
||||
- }
|
||||
- v = strverscmp((*a)->name,(*b)->name);
|
||||
- return reverse? -v : v;
|
||||
-}
|
||||
-
|
||||
int reversealnumsort(struct _info **a, struct _info **b)
|
||||
int mtimesort(struct _info **a, struct _info **b)
|
||||
{
|
||||
return strcmp((*b)->name,(*a)->name);
|
||||
int v;
|
||||
|
||||
Loading…
Reference in new issue