The NetBSD Project

CVS log for src/bin/ls/ls.c

[BACK] Up to [cvs.NetBSD.org] / src / bin / ls

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.78 / (download) - annotate - [select for diffs], Fri Feb 2 22:58:26 2024 UTC (2 months, 2 weeks ago) by christos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)

PR/57892: Roberto Branco: Print full pathname in error messages

Revision 1.77 / (download) - annotate - [select for diffs], Tue Jul 7 14:29:06 2020 UTC (3 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.76: +5 -3 lines
Diff to previous 1.76 (colored)

Fix skipping of directories that begin with a '.' in -R mode.
It is not enough to avoid displaying the contents of the directory,
we need to set FTS_SKIP to avoid descending into any subdirs too.
Otherwise, if a ".foo" directory has a subdirectory "bar", ls will
descend into bar and display its contents. From Todd Miller

Revision 1.76.12.2 / (download) - annotate - [select for diffs], Tue Apr 21 19:37:33 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.76.12.1: +0 -0 lines
Diff to previous 1.76.12.1 (colored) to branchpoint 1.76 (colored) next main 1.77 (colored)

Ooops, restore accidently removed files from merge mishap

Revision 1.76.12.1, Tue Apr 21 18:41:05 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.76: +2 -2 lines
FILE REMOVED

Sync with HEAD

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:50:42 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync with HEAD

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:51:32 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync with HEAD

Revision 1.76 / (download) - annotate - [select for diffs], Mon Feb 6 21:06:04 2017 UTC (7 years, 2 months ago) by rin
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, is-mlppp-base, is-mlppp, bouyer-socketcan-base1
Branch point for: phil-wifi
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

white space

Revision 1.75 / (download) - annotate - [select for diffs], Mon May 30 17:26:29 2016 UTC (7 years, 10 months ago) by dholland
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.74: +6 -6 lines
Diff to previous 1.74 (colored)

PR 50997 David Binderman: fix format strings

Revision 1.69.8.2 / (download) - annotate - [select for diffs], Tue Aug 19 23:45:11 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.69.8.1: +26 -12 lines
Diff to previous 1.69.8.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:26:23 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.69.2.1: +26 -12 lines
Diff to previous 1.69.2.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.74 / (download) - annotate - [select for diffs], Wed Apr 2 10:55:47 2014 UTC (10 years ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.73: +5 -5 lines
Diff to previous 1.73 (colored)

Apply diff from Igor Sobrado <isd@orion.ciencias.uniovi.es>:

We have written a diff to our ls(1) to recover the traditional behaviour
of -f implying -a.  This change does not only accommodates POSIX.1
but also matches traditional UNIX.

OpenBSD commit message:

CVSROOT:        /cvs
Module name:    src
Changes by:     sobrado@cvs.openbsd.org 2014/03/31 14:54:37

Modified files:
        bin/ls         : ls.1 ls.c

Log message:
restore the traditional behavior of -f implying -a; apparently Keith Bostic
forgot to restore it when the -f flag was put back on 2nd of September 1989,
after being removed on 16th of August as a consequence of issues getting it
working over NFS, so deviation from traditional UNIX behavior in all BSDs
looks like an historical accident; as a side effect, this change accommodates
behavior of this option to IEEE Std 1003.1-2008 (``POSIX.1'').

joint work with jmc@ (who found the inaccuracy in our implementation),
schwarze@ (who provided a detailed tracking of historical facts) and millert@

ok millert@, schwarze@

Revision 1.73 / (download) - annotate - [select for diffs], Sat Feb 22 13:08:13 2014 UTC (10 years, 1 month ago) by mlelstv
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

add u option to getopt again.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Feb 21 02:42:41 2014 UTC (10 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.71: +8 -4 lines
Diff to previous 1.71 (colored)

Add -X (don't cross mount points when recursing) from tls@

Revision 1.71 / (download) - annotate - [select for diffs], Thu Feb 20 18:56:36 2014 UTC (10 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.70: +18 -8 lines
Diff to previous 1.70 (colored)

Add -O (only leaf files) and -P (print full path), from tls@

Revision 1.69.8.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:23:52 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

resync with head

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Wed Jan 16 05:25:52 2013 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

sync with (a bit old) head

Revision 1.70 / (download) - annotate - [select for diffs], Tue Nov 20 12:37:29 2012 UTC (11 years, 5 months ago) by abs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

PR/47167
ls.1:
- Sort options in `SYNOPSIS', the option list, and texts within
  the man page;
- improve wording;
- improve macro usage;
- use more consistency regarding (locations for) information about
  which options override which;
- cross-reference `-d' and `-R';
- simplify description of `-k', removing redundant and unneeded
  information;
- sort entry type list (but leave `-a' and `-A' as they are, given
  their meaning);
- correct / augment description of `BLOCKSIZE' environment variable
  in `ENVIRONMENT' section;
- bump date.

ls.c:
- Sort options in `usage';
- augment comment about when to figure out block size.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Aug 29 14:44:21 2011 UTC (12 years, 7 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.68: +13 -2 lines
Diff to previous 1.68 (colored)

Move usage and mark it static+dead

Revision 1.68 / (download) - annotate - [select for diffs], Tue Mar 15 03:52:37 2011 UTC (13 years, 1 month ago) by erh
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp
Changes since 1.67: +13 -3 lines
Diff to previous 1.67 (colored)

PR#7540, add a -M option to ls which causes sizes (and number of blocks) to be
displayed with comma separators (or a locale specific separator).

Revision 1.67 / (download) - annotate - [select for diffs], Thu Jul 8 20:43:34 2010 UTC (13 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored)

Add #include <sys/param.h> for howmany().

Revision 1.65.6.1 / (download) - annotate - [select for diffs], Wed May 13 19:15:50 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.65: +9 -5 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.66 / (download) - annotate - [select for diffs], Sat Feb 14 08:02:04 2009 UTC (15 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.65: +9 -5 lines
Diff to previous 1.65 (colored)

fix -Wsign-compare issues

Revision 1.65 / (download) - annotate - [select for diffs], Thu Sep 25 23:44:05 2008 UTC (15 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: jym-xensuspend
Changes since 1.64: +4 -2 lines
Diff to previous 1.64 (colored)

Change '-n' so that it implies '-l' rather than requires '-l'.
Brings ls(1) closer to POSIX.1 2004.
Per discussion with Thomas Klausner and Igor Sobrado.

Revision 1.63.12.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:27:41 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Jul 20 00:52:40 2008 UTC (15 years, 9 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored)

Remove the \n and tabs from the __COPYRIGHT() strings.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Dec 14 20:09:36 2006 UTC (17 years, 4 months ago) by he
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-1, wrstuden-revivesa-base, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: wrstuden-revivesa
Changes since 1.62: +4 -2 lines
Diff to previous 1.62 (colored)

Complete the move of string_to_flags() and flags_to_string() from the
bin/ls sources to libutil:
 o Bump libutil minor version number
 o Fix uses to include <util.h> to pick up the function definitions
 o Fix most uses of flags_to_string() to release the now-malloc()ed result

Revision 1.62 / (download) - annotate - [select for diffs], Thu Dec 14 14:15:26 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.61: +11 -14 lines
Diff to previous 1.61 (colored)

Pass lint. From Anon Ymous

Revision 1.61 / (download) - annotate - [select for diffs], Sat Sep 23 19:54:53 2006 UTC (17 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

PR/34499: mac at S dot culver dot net: ls allocates more memory than needed
Applied patch, thanks!

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Sun Aug 27 01:27:52 2006 UTC (17 years, 7 months ago) by riz
Branch: abandoned-netbsd-4
Changes since 1.59: +4 -2 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

Pull up following revision(s) (requested by christos in ticket #53):
	bin/df/df.c: revision 1.71
	bin/mv/mv.c: revision 1.36
	bin/ls/ls.1: revision 1.61
	bin/ls/ls.c: revision 1.60
-h and -[mgk] are mutually exclusive. Only use the last specified. [from zafer]
Use one variable instead of 3 flags to hold the scale, so that we don't have
to reset each flag.
from zafer: you can have either -k or -h but not both since it does not make
sense.
- detect buffer overflow.
- if we have a trailing slash, don't add another one.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Aug 21 19:08:47 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.59: +4 -2 lines
Diff to previous 1.59 (colored)

from zafer: you can have either -k or -h but not both since it does not make
sense.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Mar 22 16:20:34 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.58: +9 -4 lines
Diff to previous 1.58 (colored)

Coverity CID 1755: Add fts_close() in traverse.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Oct 26 02:24:22 2005 UTC (18 years, 5 months ago) by jschauma
Branch: MAIN
Changes since 1.57: +7 -10 lines
Diff to previous 1.57 (colored)

Rather than '-h' suppressing '-s' when using '-l', make it display
the blocks used in human readable form, as suggested by Alan Barrett
and Daniel Carosone.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 14 16:02:26 2005 UTC (18 years, 6 months ago) by jschauma
Branch: MAIN
Changes since 1.56: +8 -5 lines
Diff to previous 1.56 (colored)

Honor the COLUMNS variable even when producing output not to a terminal,
as long as a specific format (that could use COLUMNS) was requested.
This makes

env COLUMNS=50 ls -C > file

not surprise the user who clearly wanted some specific output in the file.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Jun 17 14:36:16 2005 UTC (18 years, 10 months ago) by hira
Branch: MAIN
Changes since 1.55: +3 -2 lines
Diff to previous 1.55 (colored)

- Add -h to usage.
- Use set/getprogname(3).

Revision 1.55 / (download) - annotate - [select for diffs], Fri Dec 26 10:51:25 2003 UTC (20 years, 3 months ago) by simonb
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.54: +5 -3 lines
Diff to previous 1.54 (colored)

Fix bug with previous change- always initialise d.s_block.  Now "ls -1sh"
works.
XXX: ls -sh now always uses 4 chars for the size column width even if it
     needs less than that.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Dec 26 10:47:32 2003 UTC (20 years, 3 months ago) by simonb
Branch: MAIN
Changes since 1.53: +5 -4 lines
Diff to previous 1.53 (colored)

KNF - wrap long lines.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Dec 26 06:19:19 2003 UTC (20 years, 3 months ago) by grant
Branch: MAIN
Changes since 1.52: +26 -10 lines
Diff to previous 1.52 (colored)

implement -h(umanize).

from David P. Reese Jr. in PR bin/23870.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Sep 22 02:43:20 2003 UTC (20 years, 7 months ago) by jschauma
Branch: MAIN
Changes since 1.51: +23 -8 lines
Diff to previous 1.51 (colored)

After last weeks addition of the '-b' flag, add '-B' and '-w' flags,
suggested by uwe@, inspired by FreeBSD.  The three flags override
each other (and the '-q' flag) and behave as follows:

     -B      Force printing of non-printable characters in file names as
	     \xxx, where xxx is the numeric value of the character in octal.

     -b      As -B, but use C escape codes whenever possible.

     -w      Force raw printing of non-printable characters.  This is the
             default when output is not to a terminal.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Sep 14 19:16:06 2003 UTC (20 years, 7 months ago) by jschauma
Branch: MAIN
Changes since 1.50: +11 -3 lines
Diff to previous 1.50 (colored)

Implement '-b' option, which, following FreeBSD, Linux and (I think) Solaris
prints octal escapes for nongraphic characters.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Aug 7 09:05:15 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.49: +3 -7 lines
Diff to previous 1.49 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.

Revision 1.49 / (download) - annotate - [select for diffs], Fri May 30 00:17:25 2003 UTC (20 years, 10 months ago) by simonb
Branch: MAIN
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored)

Pass a NULL to getbsize() for any arguments that aren't needed, and
remove the otherwise unused variables.

Revision 1.48 / (download) - annotate - [select for diffs], Sun May 11 08:06:01 2003 UTC (20 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.47: +15 -5 lines
Diff to previous 1.47 (colored)

If both -g and -l options are present, let -l take precedence over -g,
as requested by several users.

POSIX-2001 is unclear on conflicting option letters as far as the -g
option is concerned; a clarification request will be made.

Addresses PR bin/21519 by Geoff Wing.

Revision 1.47 / (download) - annotate - [select for diffs], Wed May 7 13:23:32 2003 UTC (20 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.46: +3 -2 lines
Diff to previous 1.46 (colored)

Add a FALLTHROUGH to keep lint happy.

Revision 1.46 / (download) - annotate - [select for diffs], Wed May 7 13:00:24 2003 UTC (20 years, 11 months ago) by grant
Branch: MAIN
Changes since 1.45: +6 -4 lines
Diff to previous 1.45 (colored)

make -g behave as it should according to SUSv3 (long listing without
owner).

ok'd by kleink@.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Sep 27 12:01:51 2002 UTC (21 years, 6 months ago) by simonb
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Need to initialise the blocksize variable if the -i option is used
too.  The code in display() could possibly be a bit smarter about this
requirement...

Fixes the problem in PR bin/18321 from David Laight and PR bin/18436
from FUKAUMI Naoki.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Sep 14 04:25:55 2002 UTC (21 years, 7 months ago) by sommerfeld
Branch: MAIN
Changes since 1.43: +4 -3 lines
Diff to previous 1.43 (colored)

Use the output blocksize when computing how much room to leave for the
-s option, to suppress unnecessary leading spaces.

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 15:03:42 2000 UTC (23 years, 7 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.36: +6 -3 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

Pull up revision 1.37 (requested by hubertf):
  Exit with non-zero status if an error was encountered.  Fixes
  PR#7514.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Jul 29 03:46:15 2000 UTC (23 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.42: +11 -17 lines
Diff to previous 1.42 (colored)

convert to new KNF

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 15:03:43 2000 UTC (23 years, 10 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.41: +2 -4 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Jun 17 16:11:25 2000 UTC (23 years, 10 months ago) by assar
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.41: +2 -4 lines
Diff to previous 1.41 (colored)

Do not modify the file name when not printing non-printables, also do
it consistently with the file name and possible symbolic link target.

fixes bin/10385 and bin/10384

Revision 1.41 / (download) - annotate - [select for diffs], Mon Mar 6 11:03:45 2000 UTC (24 years, 1 month ago) by enami
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.40: +11 -14 lines
Diff to previous 1.40 (colored)

- Fix a typo that when group_from_gid is failed (though it merely fails
  on NetBSD), numeric gid string is used as `user'.
- Don't mix use %u and %d for numeric uid/gid.
- Share temporary buffer.

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:27:06 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.38: +7 -4 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Pull up to last week's -current.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Nov 9 15:06:31 1999 UTC (24 years, 5 months ago) by drochner
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Nov 2 19:44:07 1999 UTC (24 years, 5 months ago) by tron
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Changes since 1.38: +5 -2 lines
Diff to previous 1.38 (colored)

Call setlocale(3) to use localization in "ls" as suggested by
Jens A Nilsson in PR bin/8730.

Revision 1.38 / (download) - annotate - [select for diffs], Mon May 17 12:16:03 1999 UTC (24 years, 11 months ago) by lukem
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.37: +3 -5 lines
Diff to previous 1.37 (colored)

Rename ls.c::main() -> ls.c::ls_main(), and add a wrapper in main.c::main().
This allows other programs to link in against ls (e.g, ftpd), without having
to have hacks to deal with multiple main()s.

Yes, I know this is ugly. The clean alternative (move lots of this
into libutil, yada yada yada) isn't fun, and the effort probably isn't
justified...

Revision 1.37 / (download) - annotate - [select for diffs], Tue May 4 11:55:22 1999 UTC (24 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.36: +6 -3 lines
Diff to previous 1.36 (colored)

If an error is encountered, exit with non-zero status.

Based on FreeBSD fix (in 1996!), and fixes PR bin/7514 from
Jorgen Pehrson.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Feb 17 15:28:09 1999 UTC (25 years, 2 months ago) by kleink
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Branch point for: netbsd-1-4
Changes since 1.35: +9 -5 lines
Diff to previous 1.35 (colored)

Add support for the XCU5 -p option (-F restricted to directories).

Revision 1.35 / (download) - annotate - [select for diffs], Fri Feb 12 14:35:49 1999 UTC (25 years, 2 months ago) by kleink
Branch: MAIN
Changes since 1.34: +21 -12 lines
Diff to previous 1.34 (colored)

Implement 1003.2 -m option (stream output format).

Revision 1.34 / (download) - annotate - [select for diffs], Wed Nov 4 18:53:17 1998 UTC (25 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

%q -> %ll

Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 4 18:50:22 1998 UTC (25 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

include termios.h for struct winsize

Revision 1.32 / (download) - annotate - [select for diffs], Tue Oct 13 16:55:22 1998 UTC (25 years, 6 months ago) by wsanchez
Branch: MAIN
Changes since 1.31: +11 -5 lines
Diff to previous 1.31 (colored)

Check for NULL value returned by user_from_uid and group_from_gid and DTRT,
rather than crash.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Aug 19 01:44:19 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +4 -3 lines
Diff to previous 1.30 (colored)

Add some braces to make egcs happy.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jul 28 05:31:25 1998 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

Delint.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jul 28 05:15:47 1998 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.28: +6 -6 lines
Diff to previous 1.28 (colored)

Delint.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Jul 27 17:55:17 1998 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.27: +6 -4 lines
Diff to previous 1.27 (colored)

Slight code reduction.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jul 27 17:06:48 1998 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

__AUDIT__ cleanup.

Revision 1.26 / (download) - annotate - [select for diffs], Sat May 16 15:12:26 1998 UTC (25 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.25: +17 -19 lines
Diff to previous 1.25 (colored)

* blocks can be 64bit (not u_long), so calculate and display accordingly
* cleanup some other typedamage (int is as good as u_long)
* remove unused variables

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Mon Feb 9 05:05:55 1998 UTC (26 years, 2 months ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001
Changes since 1.22: +24 -7 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Pull up 1.23 (mycroft)

Revision 1.25 / (download) - annotate - [select for diffs], Tue Feb 3 02:02:13 1998 UTC (26 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +7 -2 lines
Diff to previous 1.24 (colored)

Deal with GCC warning.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jan 18 13:30:07 1998 UTC (26 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.23: +33 -18 lines
Diff to previous 1.23 (colored)

* implement -x; sort columns across the page rather than down the page
* in printcol(), don't bother building an index to the linked list if
  only printing one column with printscol()...
* implement -n; prevent [gu]id->name mapping in long listings.
  inspired by openbsd, but does *not* imply -l by itself.
* fix sorting with -d (or mismatched types in general).  (from openbsd).
* document -g. (from openbsd).

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jan 17 12:00:42 1998 UTC (26 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +24 -7 lines
Diff to previous 1.22 (colored)

Automatically resize the major and minor number fields, and DTRT if the size
field is not the same size.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jul 30 05:01:01 1997 UTC (26 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Add some casts to printf args to keep the compiler happy on the Alpha.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 20 19:20:01 1997 UTC (26 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.20: +4 -2 lines
Diff to previous 1.20 (colored)

include <pwd.h> and <grp.h> to bring prototypes into scope.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jul 20 19:07:05 1997 UTC (26 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.19: +2 -4 lines
Diff to previous 1.19 (colored)

remove user_from_uid and group_from_gid prototypes.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 20 18:53:07 1997 UTC (26 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.18: +10 -8 lines
Diff to previous 1.18 (colored)

Fix compiler warnings.
Add WARNS=1

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Tue Dec 10 05:41:44 1996 UTC (27 years, 4 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.16: +8 -3 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

From trunk:
Various changes to make the sorting deterministic (and correct).

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jul 9 09:16:29 1996 UTC (27 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Sort FTS_NS entries by name, just so the order is well-defined.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 8 10:20:16 1996 UTC (27 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +8 -3 lines
Diff to previous 1.16 (colored)

Partition FTS_NS entries from others, to avoid confusing qsort().
Don't bother to order the FTS_NS entries amongst themselves.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 14 05:58:53 1996 UTC (28 years, 2 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.15: +6 -8 lines
Diff to previous 1.15 (colored)

Changed so that COLUMNS environment variable will override the value
obtained via the TIOCGWINSIZ ioctl.  This is required by POSIX.2, see
section 4.39.5.3.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Sep 7 06:42:58 1995 UTC (28 years, 7 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Sync with 4.4lite2

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Thu Sep 7 06:31:21 1995 UTC (28 years, 7 months ago) by jtc
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +14 -2 lines
Diff to previous 1.1.1.2 (colored)

imported from 44lite2

Revision 1.14 / (download) - annotate - [select for diffs], Tue Mar 21 09:06:30 1995 UTC (29 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.13: +7 -2 lines
Diff to previous 1.13 (colored)

convert to new RCS id conventions.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Dec 27 23:14:49 1994 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +15 -3 lines
Diff to previous 1.12 (colored)

Sync with CSRG.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Sep 23 06:14:51 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +43 -75 lines
Diff to previous 1.11 (colored)

Merge with 4.4-Lite version.

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Thu Sep 22 03:05:15 1994 UTC (29 years, 7 months ago) by mycroft
Branch: WFJ-920714, CSRG
CVS Tags: lite-1
Changes since 1.1.1.1: +294 -285 lines
Diff to previous 1.1.1.1 (colored)

Import original 4.4-Lite version.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 8 02:06:45 1994 UTC (30 years ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.10: +10 -9 lines
Diff to previous 1.10 (colored)

Changed traverse() and display() so that errors are reported when
they are first detected in display(), rather than waiting until later
in traverse().

The old code allowed "Can not read directory" error messages to be
left unreported unless the -R (recurse) option was used.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Apr 4 19:29:42 1994 UTC (30 years ago) by chopps
Branch: MAIN
Changes since 1.9: +1 -9 lines
Diff to previous 1.9 (colored)

"yet" on quad_t/off_t things. (not noticed on i386 becuase of endian I guess.)

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jan 25 20:44:58 1994 UTC (30 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.8: +10 -10 lines
Diff to previous 1.8 (colored)

(1) fixup getbsize() calls
(2) convert to use err(), warn(), and warnx(), as appropriate.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Dec 5 21:35:27 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +44 -20 lines
Diff to previous 1.7 (colored)

Patches from Thomas Eberhardt <thomas@mathematik.uni-Bremen.de> to allow
sorting by size.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Aug 7 03:56:58 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +334 -278 lines
Diff to previous 1.6 (colored)

New version from uunet, with -k option readded, and 4.4 ffs--specific stuff
in `#ifdef notyet'.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 1 18:59:29 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Add RCS identifiers.

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 26 10:23:24 1993 UTC (30 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.4: +5 -2 lines
Diff to previous 1.4 (colored)

previous patch to ls.c wasn't quite correct. This patch from same author.

Revision 1.4 / (download) - annotate - [select for diffs], Mon May 24 07:15:03 1993 UTC (30 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +5 -7 lines
Diff to previous 1.3 (colored)

first environment variable was trounced in the case of
"ls -l". Patch from <bob@obiwan.uucp> Bob Willcox

Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 23 00:26:08 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

changed "Id" to "Header" for rcsids

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 22 08:04:00 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

added rcs ids to all files

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>