History log of /freebsd-9.3-release/usr.bin/locate/locate/fastfind.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 195839 24-Jul-2009 jhb

Move the check to ensure the locate database has the minimum required size
when using mmap() before invoking mmap(). This avoids a confusing error
message when locate is invoked against a zero-size database after the
recent change to make mmap() fail requests to map 0 bytes.

Submitted by: Jaakko Heinonen jh of saunalahti dot fi
Approved by: re (kensmith)
MFC after: 1 week


# 190656 02-Apr-2009 delphij

Don't crash when we have an invalid count number.

PR: bin/32686
Submitted by: Jaakko Heinonen <jh saunalahti.fi>
MFC after: 1 week


# 153197 07-Dec-2005 des

Add a -0 option for interoperability with xargs -0.

PR: bin/56558
Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>
MFC after: 2 weeks


# 70716 06-Jan-2001 wosch

Off by one error in reading mmap data.

Submitted by: Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 29739 23-Sep-1997 wosch

Float overflow in statistic function for large databases
(>100MB characters).


# 27574 21-Jul-1997 charnier

Use err(3). Use .Pa macro for filenames in man page.


# 23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

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.


# 20406 13-Dec-1996 wosch

Fix uninitialized memory read for case insensitive search. Harmless.

submitted by: purify


# 19214 27-Oct-1996 alex

Typo: to --> too. Fixes PR#1907.

Pointed out by: Pat Lashley <patl@Phoenix.Volant.ORG>


# 19134 23-Oct-1996 ache

Rename FNM_ICASE to FNM_CASEFOLD


# 19060 20-Oct-1996 wosch

Better case insensitve search support for pattern with meta chars.
In some rare cases this does not work proper before flag FNM_ICASE was
added to fnmatch(3).


# 18905 12-Oct-1996 wosch

8-Bit character support.

Old locate(1) programs still works with the new database format, print
some garbage for 8 bit characters, but don't core (maybe except char 30).

7-Bit Puritan should not notice any difference. Same speed,
Same database size if the database contain only ASCII characters.

Reviewed by: ache


# 18829 08-Oct-1996 wosch

Fix searching for shell quoting characters. I guess it was
broken since locate exists.

This works now

$ locate '*\['
$ locate '*i386-\**'
$ locate '*[C\[]'


# 17980 31-Aug-1996 wosch

optimized search algorithm
faster IO due mmap(2) [-m | -s]
better error check for damaged databases
support for databases in network byte order (SunOS/sparc)
optional case insensitve search [-i]
optional multiple databases
optional multiple pattern
new enviroment variable LOCATE_PATH for database(s)
[-S] print some statistic about the database
[-l number] limit output to number file names
[-c] suppress normal output; instead print a count of matching file names