sync with 4.6 and drop mention of xterm-xfree86

This commit is contained in:
naddy 2009-10-29 20:10:39 +00:00
parent 84d3978d5e
commit 9b4230aeff
6 changed files with 42 additions and 48 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.15 2009/02/14 16:39:28 naddy Exp $
# $OpenBSD: Makefile,v 1.16 2009/10/29 20:10:39 naddy Exp $
COMMENT= ls that can use color to display file attributes
DISTNAME= ls-4.5
DISTNAME= ls-4.6
PKGNAME= color${DISTNAME}
CATEGORIES= sysutils

View File

@ -1,5 +1,5 @@
MD5 (ls-4.5.tar.gz) = MbUZOQgtpBov/h50a5/LjA==
RMD160 (ls-4.5.tar.gz) = mQGhYnKeMhAE1wlhiqvTTX+zvhc=
SHA1 (ls-4.5.tar.gz) = w5mY4cPmZtDhPRT4A8z6VUxdM7U=
SHA256 (ls-4.5.tar.gz) = SRuilGEa/jBPUyfZ6EJQGl+d9g+1JnRpQfH8i/iOrqY=
SIZE (ls-4.5.tar.gz) = 12633
MD5 (ls-4.6.tar.gz) = 30l3PNvfxsxyzV1ttuVoUA==
RMD160 (ls-4.6.tar.gz) = PxIiVxNKx1AzMp9Y9xMaqC1Aj/k=
SHA1 (ls-4.6.tar.gz) = 7ip12RSDEe2eG+lbUi48CWCcLzc=
SHA256 (ls-4.6.tar.gz) = 7b607kVhSaQp0NxOPUwdtmhdfBbl3OE5DaIPoiQDdFw=
SIZE (ls-4.6.tar.gz) = 12501

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
--- colorls.1.orig Sat Feb 14 17:29:39 2009
+++ colorls.1 Sat Feb 14 17:33:51 2009
$OpenBSD: patch-colorls_1,v 1.12 2009/10/29 20:10:39 naddy Exp $
--- colorls.1.orig Thu Oct 29 20:53:23 2009
+++ colorls.1 Thu Oct 29 21:04:05 2009
@@ -37,11 +37,11 @@
.Dt COLORLS 1
.Os
@ -13,7 +13,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
-.Op Fl 1AaCcdFfghikLlmnopqRrSsTtux
+.Nm
+.Op Fl 1AaCcdFfGghikLlmnopqRrSsTtux
.Op Ar file ...
.Op Ar
.Sh DESCRIPTION
For each operand that names a
@@ -121,6 +121,12 @@ and a vertical bar
@ -29,7 +29,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
.It Fl g
List in long format as in
.Fl l ,
@@ -420,7 +426,7 @@ system immutable
@@ -418,7 +424,7 @@ user immutable
.Pp
.Ex -std ls
.Sh ENVIRONMENT
@ -38,7 +38,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
.It Ev BLOCKSIZE
If the environment variable
.Ev BLOCKSIZE
@@ -430,6 +436,44 @@ option is not specified, the block counts
@@ -428,11 +434,138 @@ option is not specified, the block counts
(see
.Fl s )
will be displayed in units of that size block.
@ -61,11 +61,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
+the
+.Ev TERM
+variable must be set to
+.Dq wsvt25
+and in an
+.Xr xterm 1
+to
+.Dq Li xterm-xfree86 .
+.Dq wsvt25 .
+Other terminal types may require similar adjustments.
+Colorization is silently disabled if the output isn't directed to a terminal
+unless the
@ -83,10 +79,8 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
.It COLUMNS
If this variable contains a string representing a
decimal integer, it is used as the
@@ -442,6 +486,99 @@ many pathname text columns to display
based on the width provided
(see
.Fl C ) .
column position width for displaying
multiple-text-column output.
+.It Ev LSCOLORS
+The value of this variable describes what color to use for which
+attribute when colors are enabled with
@ -183,7 +177,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
.It Ev TZ
The time zone to use when displaying dates.
See
@@ -451,24 +588,25 @@ for more information.
@@ -442,24 +575,25 @@ for more information.
.Sh EXAMPLES
List the contents of the current working directory in long format:
.Pp
@ -212,7 +206,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
.Xr symlink 7 ,
.Xr sticky 8
.Sh STANDARDS
@@ -479,7 +617,7 @@ utility is compliant with the
@@ -470,7 +604,7 @@ utility is compliant with the
specification.
.Pp
The flags
@ -221,7 +215,7 @@ $OpenBSD: patch-colorls_1,v 1.11 2009/02/14 16:39:28 naddy Exp $
are extensions to that specification.
.Pp
Historically, the
@@ -500,6 +638,6 @@ flags differs between this implementation and
@@ -491,6 +625,6 @@ flags differs between this implementation and
.St -p1003.1-2008 .
.Sh HISTORY
An

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-ls_c,v 1.10 2009/02/14 16:39:28 naddy Exp $
--- ls.c.orig Sat Feb 14 17:24:38 2009
+++ ls.c Sat Feb 14 17:28:28 2009
@@ -62,6 +62,10 @@ static char rcsid[] = "$OpenBSD: ls.c,v 1.33 2008/12/3
$OpenBSD: patch-ls_c,v 1.11 2009/10/29 20:10:39 naddy Exp $
--- ls.c.orig Wed Oct 28 00:59:21 2009
+++ ls.c Thu Oct 29 20:21:13 2009
@@ -48,6 +48,10 @@
#include <string.h>
#include <unistd.h>
#include <util.h>
@ -12,7 +12,7 @@ $OpenBSD: patch-ls_c,v 1.10 2009/02/14 16:39:28 naddy Exp $
#include "ls.h"
#include "extern.h"
@@ -104,6 +108,15 @@ int f_statustime; /* use time of last mode change */
@@ -90,6 +94,15 @@ int f_statustime; /* use time of last mode change */
int f_stream; /* stream format */
int f_type; /* add type character for non-regular files */
int f_typedir; /* add type character for directories */
@ -28,7 +28,7 @@ $OpenBSD: patch-ls_c,v 1.10 2009/02/14 16:39:28 naddy Exp $
int rval;
@@ -115,6 +128,11 @@ ls_main(int argc, char *argv[])
@@ -101,6 +114,11 @@ ls_main(int argc, char *argv[])
int ch, fts_options, notused;
int kflag = 0;
char *p;
@ -40,7 +40,7 @@ $OpenBSD: patch-ls_c,v 1.10 2009/02/14 16:39:28 naddy Exp $
/* Terminal defaults to -Cq, non-terminal defaults to -1. */
if (isatty(STDOUT_FILENO)) {
@@ -132,7 +150,7 @@ ls_main(int argc, char *argv[])
@@ -122,7 +140,7 @@ ls_main(int argc, char *argv[])
f_listdot = 1;
fts_options = FTS_PHYSICAL;
@ -49,7 +49,7 @@ $OpenBSD: patch-ls_c,v 1.10 2009/02/14 16:39:28 naddy Exp $
switch (ch) {
/*
* The -1, -C and -l, -m, -n and -x options all override each
@@ -186,6 +204,9 @@ ls_main(int argc, char *argv[])
@@ -176,6 +194,9 @@ ls_main(int argc, char *argv[])
case 'F':
f_type = 1;
break;
@ -59,7 +59,7 @@ $OpenBSD: patch-ls_c,v 1.10 2009/02/14 16:39:28 naddy Exp $
case 'L':
fts_options &= ~FTS_PHYSICAL;
fts_options |= FTS_LOGICAL;
@@ -255,11 +276,46 @@ ls_main(int argc, char *argv[])
@@ -245,11 +266,46 @@ ls_main(int argc, char *argv[])
if (f_grouponly == -1)
f_grouponly = 0;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
--- print.c.orig Mon May 7 20:39:28 2007
+++ print.c Sat Aug 11 19:28:48 2007
@@ -56,6 +56,11 @@ static char rcsid[] = "$OpenBSD: print.c,v 1.25 2007/0
$OpenBSD: patch-print_c,v 1.8 2009/10/29 20:10:39 naddy Exp $
--- print.c.orig Wed Oct 28 00:59:21 2009
+++ print.c Thu Oct 29 20:21:22 2009
@@ -48,6 +48,11 @@
#include <tzfile.h>
#include <unistd.h>
#include <util.h>
@ -13,7 +13,7 @@ $OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
#include "ls.h"
#include "extern.h"
@@ -66,9 +71,39 @@ static void printsize(size_t, off_t);
@@ -58,9 +63,39 @@ static void printsize(size_t, off_t);
static void printtime(time_t);
static int printtype(u_int);
static int compute_columns(DISPLAY *, int *);
@ -53,7 +53,7 @@ $OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
void
printscol(DISPLAY *dp)
{
@@ -89,6 +124,9 @@ printlong(DISPLAY *dp)
@@ -81,6 +116,9 @@ printlong(DISPLAY *dp)
FTSENT *p;
NAMES *np;
char buf[20];
@ -63,7 +63,7 @@ $OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size))
(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
@@ -124,7 +162,15 @@ printlong(DISPLAY *dp)
@@ -116,7 +154,15 @@ printlong(DISPLAY *dp)
printtime(sp->st_ctime);
else
printtime(sp->st_mtime);
@ -79,7 +79,7 @@ $OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
if (f_type || (f_typedir && S_ISDIR(sp->st_mode)))
(void)printtype(sp->st_mode);
if (S_ISLNK(sp->st_mode))
@@ -224,6 +270,9 @@ printaname(FTSENT *p, u_long inodefield, u_long sizefi
@@ -216,6 +262,9 @@ printaname(FTSENT *p, u_long inodefield, u_long sizefi
{
struct stat *sp;
int chcnt;
@ -89,7 +89,7 @@ $OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
sp = p->fts_statp;
chcnt = 0;
@@ -232,7 +281,15 @@ printaname(FTSENT *p, u_long inodefield, u_long sizefi
@@ -224,7 +273,15 @@ printaname(FTSENT *p, u_long inodefield, u_long sizefi
if (f_size)
chcnt += printf("%*qd ",
(int)sizefield, howmany(sp->st_blocks, blocksize));
@ -105,7 +105,7 @@ $OpenBSD: patch-print_c,v 1.7 2007/08/11 17:52:11 naddy Exp $
if (f_type || (f_typedir && S_ISDIR(sp->st_mode)))
chcnt += printtype(sp->st_mode);
return (chcnt);
@@ -346,6 +403,151 @@ printtype(u_int mode)
@@ -338,6 +395,151 @@ printtype(u_int mode)
}
return (0);
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-util_c,v 1.5 2007/08/11 17:52:11 naddy Exp $
--- util.c.orig Wed Apr 25 10:16:10 2007
+++ util.c Sat Aug 11 19:30:28 2007
@@ -67,7 +67,11 @@ void
$OpenBSD: patch-util_c,v 1.6 2009/10/29 20:10:39 naddy Exp $
--- util.c.orig Wed Oct 28 00:59:21 2009
+++ util.c Thu Oct 29 20:21:26 2009
@@ -59,7 +59,11 @@ void
usage(void)
{
(void)fprintf(stderr,