diff options
author | des <des@FreeBSD.org> | 1998-04-24 12:43:26 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 1998-04-24 12:43:26 +0000 |
commit | 7f8983e5f50864be87a5d978f4c4b46e8c1b7591 (patch) | |
tree | 4ac5da9a8bccd136cbb8d25743982b314a2cb5c4 /bin/ls/ls.c | |
parent | 8047e5cea0b71ae987d9b5d875ebbd2e416bc4cc (diff) | |
download | FreeBSD-src-7f8983e5f50864be87a5d978f4c4b46e8c1b7591.zip FreeBSD-src-7f8983e5f50864be87a5d978f4c4b46e8c1b7591.tar.gz |
o Removed two unused variables (f_dirname and f_newline) in ls.c
o Added the -H and -P options for treatment of symbolic links.
o Removed the #ifdef BSD4_4_LITE, since it does not seem to do anything
useful
o Fixed up prn_octal() so its output looks more like that of AT&T Unices
when -b is given.
The next two lines apply only to the first two changes above:
PR: bin/6140
Submitted by: Max Euston
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r-- | bin/ls/ls.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 7fdad3d..5a6561d 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "@(#)ls.c 8.5 (Berkeley) 4/2/94"; #else static const char rcsid[] = - "$Id: ls.c,v 1.18 1998/04/21 22:02:00 des Exp $"; + "$Id: ls.c,v 1.19 1998/04/24 07:49:47 des Exp $"; #endif #endif /* not lint */ @@ -85,7 +85,6 @@ int f_kblocks; /* print size in kilobytes */ int f_listdir; /* list actual directory, not contents */ int f_listdot; /* list files beginning with . */ int f_longform; /* long listing format */ -int f_newline; /* if precede with newline */ int f_nonprint; /* show unprintables as ? */ int f_nosort; /* don't sort output */ int f_octal; /* show unprintables as \xxx */ @@ -96,7 +95,6 @@ int f_sectime; /* print the real time for all files */ int f_singlecol; /* use single column output */ int f_size; /* list size in short listing */ int f_statustime; /* use time of last mode change */ -int f_dirname; /* if precede with directory name */ int f_timesort; /* sort by time vice name */ int f_type; /* add type character for non-regular files */ int f_whiteout; /* show whiteout entries */ @@ -137,7 +135,7 @@ main(argc, argv) f_listdot = 1; fts_options = FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "?1ABCFLRTWabcdfgikloqrstu")) != -1) { + while ((ch = getopt(argc, argv, "?1ABCFHLPRTWabcdfgikloqrstu")) != -1) { switch (ch) { /* * The -1, -C and -l options all override each other so shell @@ -172,10 +170,18 @@ main(argc, argv) case 'F': f_type = 1; break; + case 'H': + fts_options |= FTS_COMFOLLOW; + break; case 'L': fts_options &= ~FTS_PHYSICAL; fts_options |= FTS_LOGICAL; break; + case 'P': + fts_options &= ~FTS_COMFOLLOW; + fts_options &= ~FTS_LOGICAL; + fts_options |= FTS_PHYSICAL; + break; case 'R': f_recursive = 1; break; |