History log of /freebsd-current/bin/ls/extern.h
Revision Date Author Comments
# 90aea514 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 42b38843 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .h pattern

Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/


# e2662256 23-Oct-2022 Aymeric Wibo <obiwac@gmail.com>

ls(1): add a -v flag to sort naturally

Add a -v flag for ls which sorts entries following a natural ordering
using strverscmp(3) (e.g. "bloem1 bloem9 bloem10" as opposed to
"bloem1 bloem10 bloem9").

Update the manual page and add a test case.

Reviewed by: pauamma, bcr
Tested by: pstef
Differential Revision: https://reviews.freebsd.org/D36407


# 97c31821 19-Sep-2021 Cameron Katri <me@cameronkatri.com>

ls(1): Allow LSCOLORS to specify an underline

Allows capitalizing the background color character to enable an
underline instead of bold, capitalizing the foreground color char will
still do bold.

Differential Revision: https://reviews.freebsd.org/D30547


# e10ba800 16-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

ls(1): Add --color=when

--color may be set to one of: 'auto', 'always', and 'never'.

'auto' is the default behavior- output colors only if -G or COLORTERM are
set, and only if stdout is a tty.

'always' is a new behavior- output colors always. termcap(5) will be
consulted unless TERM is unset or not a recognized terminal, in which case
ls(1) will fall back to explicitly outputting ANSI escape sequences.

'never' to turn off any environment variable and -G usage.

Reviewed by: cem, 0mp (both modulo last-minute manpage changes
Differential Revision: https://reviews.freebsd.org/D16741


# 0fdf7fa8 17-Jan-2018 Conrad Meyer <cem@FreeBSD.org>

Convert ls(1) to not use libxo(3)

libxo imposes a large burden on system utilities. In the case of ls, that
burden is difficult to justify -- any language that can interact with json
output can use readdir(3) and stat(2).

Logically, this reverts r291607, r285857, r285803, r285734, r285425,
r284494, r284489, r284252, and r284198.

Kyua tests continue to pass (libxo integration was entirely untested).

Reported by: many
Reviewed by: imp
Discussed with: manu, bdrewery
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D13959


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 52e4a08c 09-Jun-2015 Marcel Moolenaar <marcel@FreeBSD.org>

Convert ls(1) to use libxo(3).

Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.


# dfd91f79 08-Nov-2012 Greg Lehey <grog@FreeBSD.org>

Replace spaces with tabs where appropriate.

Reminded by: jh@


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# fe79420e 24-Mar-2006 John Baldwin <jhb@FreeBSD.org>

Add a new -U flag to instruct ls to use the birthtime for printing or
sorting.

Submitted by: Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after: 1 week


# 71b8b748 03-Jun-2005 Dima Dorfman <dd@FreeBSD.org>

Add the -S option to sort files by size. NetBSD and OpenBSD already
have this option with identical semantics (sorting large files first).
-r can be used to reverse the sort if that is desired.

PR: 81625
Submitted by: Kostas Blekos <mplekos@physics.upatras.gr>, keramida


# 107409f4 02-May-2004 Tim J. Robbins <tjr@FreeBSD.org>

Treat filenames as multibyte character strings (according to the current
LC_CTYPE setting) when determining which characters are printable.
This is an often-requested feature.

Use wcwidth() to determine the number of column positions a character
takes up, although there are still a few places left where we assume
1 byte = 1 column position, e.g. line-wrapping when handling the -m option.

The error handling here is somewhat more complicated than usual: we do
our best to show what we can of a filename in the presence of conversion
errors, instead of simply aborting.


# 6195fb41 06-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


# 40feca3a 03-May-2003 Mark Murray <markm@FreeBSD.org>

Fix a bazillion warnings. This makes almost the whole of src/bin/*
WARNS=6, std=c99 clean.

Tested on: i386, alpha


# 1656f850 18-Oct-2002 Tim J. Robbins <tjr@FreeBSD.org>

Print non-printing characters in directory names, as well as file names,
as `?' or `\ooo', depending on whether the -b or -B flags were used.

PR: 43995
MFC after: 1 month


# 94274c73 18-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Add missing options required by SUSv3:
-m List files across the page, separated by commas.
-p Print a slash after directory names
-x Same as -C but sort across the columns rather than down

Submitted by: Kyle Martin <mkm@ieee.org>


# 9052855a 03-Feb-2002 Mark Murray <markm@FreeBSD.org>

WARNS=4 fixes, plus a healthy dose of fixes inspired by lint.


# 46251dde 01-Feb-2002 Warner Losh <imp@FreeBSD.org>

o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.


# 6bd042df 28-Dec-2001 Josef Karthauser <joe@FreeBSD.org>

Mop up some warnings.


# c1499cf6 28-Dec-2001 Josef Karthauser <joe@FreeBSD.org>

Revamp the colour support to allow for bold characters. Colours
are now defined using the characters a-h and A-H for the bold
variants. The old way using 0-7 for the colours still works, but
prints a message asking the user to switch.

PR: bin/27374


# ee579ffb 04-Jul-2000 Assar Westerlund <assar@FreeBSD.org>

make sure we do not write out non-printable characters in file names
and symbolic links (by default)

PR: bin/19354
Reviewed by: silence on -current


# 141d77b8 17-Jun-2000 Josef Karthauser <joe@FreeBSD.org>

Switch over to using the new fflagstostr and strtofflags library calls.


# fd4e4d60 06-Jun-2000 Andrey A. Chernov <ache@FreeBSD.org>

Move colorquit() prototype to extern.h
Add "extern" to variables declarations in extern.h to not make them
commons into each compiled file.


# 38782c25 06-Jun-2000 Andrey A. Chernov <ache@FreeBSD.org>

Make signal handler safe - don't use stdio (pointed by bde)
Staticize some color functions
Add yet one tolower() call which is forgotten after check
Don't check for OOPS - not really needed


# 5a890e22 04-Jun-2000 Josef Karthauser <joe@FreeBSD.org>

Don't look up the ANSI sequences each time a colour is changed,
this is extremely inefficient, instead write them all down at the
beginning.

The correct sequence to switch colours off is to first use 'op' if
it exists, otherwise use 'oc'. If neither of these exist then we
shouldn't be doing colour with this terminal.

Reviewed by: ache


# 74985094 04-Jun-2000 Josef Karthauser <joe@FreeBSD.org>

* Re-implement colour support using termcap's AF and AB capabilities
to manage the ANSI colour sequences. Colour support is disabled
unless the TERM environment variable references a valid termcap.

* Allow optional compilation of the colour support in the Makefile,
defaulting to yes. This allows us to switch it off for fixit
floppies and other mediums where space is an issue and the extra
bloat of statically linking with ncurses isn't acceptable.

* Display a warning if colour is requested with '-G' but support
for it isn't compiled in.


# 3885812c 02-Jun-2000 Josef Karthauser <joe@FreeBSD.org>

Add colour support to /bin/ls (at a cost of 1056 bytes on my system).

It is not switched on by default and must be enabled with the -G
flag. When using ls -G the output behaviour is modified with ANSI
colour sequences wrapped around filenames to help distinguish file
types. (Colours can be redefined in the LSCOLORS environment
variable as described in the manual page.)

Colour support is silently disabled (if switched on) if stdout
isn't a tty.

Based on: asami's colorls port.
PR: bin/18900 && ports/18616.


# 2a456239 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 7ea30648 21-Apr-1998 Dag-Erling Smørgrav <des@FreeBSD.org>

Added -b option to display unprintables in octal.
PR: 1315


# d46c1a60 07-Aug-1997 Steve Price <steve@FreeBSD.org>

Remove #if(n)def BSD_4_4_LITE cruft and sccsid -> rcsid.


# b97fa2ef 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 89730b29 23-Sep-1994 David Greenman <dg@FreeBSD.org>

Added $Id$


# 4b88c807 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite bin Sources