History log of /freebsd-current/usr.bin/look/look.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.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


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# a1b6427a 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# 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


# b5bb9538 03-Jul-2014 Eitan Adler <eadler@FreeBSD.org>

look: implement long options
gentoo has "util-linux 2.24.1" with long options. Other distributions
have similar.

usage() is intentionally unchanged to keep it short and sweet

Reviewed by: jmg
Discussed with: adrian, jilles


# b245fc98 10-May-2014 Eitan Adler <eadler@FreeBSD.org>

look(1): add compability with other implementations.

On other implementations 'look -a' uses an alternate dictionary. Since we don't
have one, just ignore it.


# 76de4396 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to look(1)


# 2a5e51fa 17-Oct-2011 Ed Schouten <ed@FreeBSD.org>

Sort header file names.

Spotted by: des


# d13b008d 16-Oct-2011 Ed Schouten <ed@FreeBSD.org>

Add missing #include.

Note to myself: don't write patches while watching a movie.


# d2ea3bed 16-Oct-2011 Ed Schouten <ed@FreeBSD.org>

Don't cast SIZE_T_MAX to off_t.

I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.

Reported by: cperciva


# 58345854 14-Oct-2011 Ed Schouten <ed@FreeBSD.org>

Build look(1) with WARNS=6.


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# 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.


# ee1db5ae 31-Aug-2009 Colin Percival <cperciva@FreeBSD.org>

MFC r196558: Don't try to mmap the contents of empty files. This behaviour
was harmless prior to r195693, when mmap(2) changed from silently ignoring
requests for mapping zero bytes to returning EINVAL; this commit can be seen
as adjusting for the change in mmap(2) in order to make look(1) act like it
did previously.

Reviewed by: jhb
Approved by: re (kib)


# f9f23184 25-Aug-2009 Colin Percival <cperciva@FreeBSD.org>

Don't try to mmap the contents of empty files. This behaviour was harmless
prior to r195693, since historical behaviour of mmap(2) was to silently
ignore length-zero mmap requests; but mmap now returns EINVAL, which caused
look(1) to emit an error message and fail.

Among other things, this makes `freebsd-update fetch` on a newly installed
8.0-BETA3 system print bogus warning messages.

MFC after: 3 days


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

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


# 845b8cbc 18-Jul-2006 Stefan Farfeleder <stefanf@FreeBSD.org>

Remove break after return.


# d67148e4 19-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Add support for multibyte characters. While here, fix a longstanding bug in
the implementation of the -d option: we were skipping too many characters
when a non-alphanumeric character was encountered.


# f4ac32de 04-Sep-2002 David Malone <dwmalone@FreeBSD.org>

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


# e026a48c 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use FBSDID


# 9e5ff032 27-Apr-2002 Mark Murray <markm@FreeBSD.org>

Fix a const-char vs char issue.


# f1bb2cd2 21-Mar-2002 Warner Losh <imp@FreeBSD.org>

remove __P


# 106b1a8c 03-Dec-2001 David Malone <dwmalone@FreeBSD.org>

Warns cleanup - not ready for WARNS=2 yet.


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

$Id$ -> $FreeBSD$


# 4d3ee609 31-Aug-1998 Wolfram Schneider <wosch@FreeBSD.org>

Support multiple databases. For example

$ look miau dict1 dict2 dict3


# d0380274 15-Sep-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

revert: The warning was supposed to irritate someone into fixing this.


# 0a214d26 15-Sep-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

unsigned char -> caddr_t for mmap's return value.


# 9baefe4a 23-Jul-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3) instead of local redefinition.


# 1c8af878 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# df3f5d9d 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Merge from Lite2


# 0da30e9a 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build.


# 8abdc2eb 16-Jan-1997 Alexander Langer <alex@FreeBSD.org>

Sweep through the tree fixing mmap() usage:

- Use MAP_FAILED instead of the constant -1 to indicate
failure (required by POSIX).
- Removed flag arguments of '0' (required by POSIX).
- Fixed code which expected an error return of 0.
- Fixed code which thought any address with the high bit set
was an error.
- Check for failure where no checks were present.

Discussed with: bde


# ac7154f5 28-Oct-1995 Andrey A. Chernov <ache@FreeBSD.org>

Make it works with 8bit charsets
Add setlocale LC_CTYPE


# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources