You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.4 KiB

Index: man/tree.1
--- man/tree.1.orig 2007-01-09 21:53:30 +0100
+++ man/tree.1 2007-01-10 19:42:01 +0100
@@ -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,7 +149,7 @@
.PP
.TP
.B -N
-Print non-printable characters as is instead of the default carrot notation.
+Print non-printable characters as is instead of the default caret notation.
.PP
.TP
.B -r
Index: tree.c
--- tree.c.orig 2007-01-09 22:07:16 +0100
+++ tree.c 2007-01-10 19:42:47 +0100
@@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#if defined(__linux__)
#include <features.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
@@ -32,6 +34,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
@@ -181,7 +189,7 @@
#ifdef CYGWIN
extern int MB_CUR_MAX;
-#else
+#elif defined(__linux__)
extern size_t MB_CUR_MAX;
#endif
@@ -194,7 +202,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;
dirs = xmalloc(sizeof(int) * (maxdirs=4096));
dirs[0] = 0;
@@ -624,7 +633,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__