Commit Graph

36 Commits

Author SHA1 Message Date
charnier
473366caf4 Use err(3). Use .Pa macro for filenames in man page. 1997-07-21 12:08:14 +00:00
jmg
c1513ecd7d fix up this man page
one typo was:
Submitted by: Josh Gilliam
PR#3319
1997-04-18 11:12:52 +00:00
imp
cd84ece5fd compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
jmg
8fe249dc4f fix a couple misspellings, one of 'em closes pr 2892. 1997-03-06 05:11:55 +00:00
peter
aef78d145b Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
alex
ee019a53dc 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
1997-01-16 21:58:40 +00:00
jkh
9c0cd3f9df 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.
1997-01-14 07:20:47 +00:00
wosch
89cd712450 Fix uninitialized memory read for case insensitive search. Harmless.
submitted by: purify
1996-12-13 20:28:24 +00:00
wosch
ee564131a0 add forgotten variable $locate 1996-10-31 22:46:52 +00:00
alex
4a0237feb9 Typo: to --> too. Fixes PR#1907.
Pointed out by:	Pat Lashley <patl@Phoenix.Volant.ORG>
1996-10-27 19:18:06 +00:00
wosch
6815328d14 Do not store character 30. I made a test at my CS department
and at least one user use this char in a file name. Older
locate implementions core'd.
1996-10-27 19:04:27 +00:00
ache
b5cbb253de Rename FNM_ICASE to FNM_CASEFOLD 1996-10-23 16:46:47 +00:00
wosch
addcba9b4b 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).
1996-10-20 16:54:51 +00:00
wosch
6e160d3429 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
1996-10-13 01:44:43 +00:00
wosch
ea6be4baab export variable TMPDIR (which maybe set, but not exported in /etc/locate.rc) 1996-10-12 20:29:25 +00:00
wosch
fe7480e022 Fix searching for shell quoting characters. I guess it was
broken since locate exists.

This works now

$ locate '*\['
$ locate '*i386-\**'
$ locate '*[C\[]'
1996-10-09 00:33:34 +00:00
wosch
7fe6e7c615 #include <fastfind.c> -> #include "fastfind.c" 1996-09-16 01:17:25 +00:00
wosch
3ddb4ac93a remove unnecessary boundary check, 2x faster
code cleanup
1996-09-14 20:15:49 +00:00
guido
c7390feb6d Document the existance of a configuration file for updatedb.
Fix a typo in the default rc file and add a comment about
default values.
1996-09-05 20:18:15 +00:00
wosch
67799b57ee Fix to work with obj directories: -I. -> -I${.CURDIR}
Submitted by: Bruce
1996-09-01 16:03:28 +00:00
wosch
40d168cca1 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
1996-08-31 23:14:54 +00:00
wosch
fc2c08f011 NULL -> '\0'
Submitted by: Bruce, see also c-faq 5.6 and 5.9
1996-08-31 14:51:18 +00:00
peter
d4ed6f192d fix prototypes/forward declarations/return type
kill obsolete updatedb.csh, it's been rewritten in sh now.
1996-08-30 03:08:26 +00:00
peter
7ff76c3c85 delete unused #include <string.h> 1996-08-30 03:06:15 +00:00
wosch
e99625b29c sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
wosch
69b6891bd1 code cleanup 1996-08-22 18:46:13 +00:00
wosch
d0178711b1 bigram
Bigram does not remove newline at end of filename. This
	break particulary the bigram algorithm and /var/db/locate.database
	grow up 15 %.

	Bigram does not check for characters outside 32-127.

	The bigram output is silly and need ~1/2 CPU time of
	database rebuilding.

	old:
	locate.bigram < $filelist | sort | uniq -c | sort -nr
                                    ^^^^^^^^^^^^^^
				    this can easy made bigram

	new:
        bigram < $filelist | sort -nr

code
	Code does not check for char 31.
	Use a lookup array instead a function. 3 x faster.

updatedb
	rewritten
	sync with bigram changes

	read config file /etc/locate.rc if exists
	submitted by: guido@gvr.win.tue.nl (Guido van Rooij)

concatdb - concatenate locate databases
mklocatedb - build locate database
1996-08-14 00:22:31 +00:00
dg
4e123937ca Use '-fstype ufs' rather than '-fstype local' on the find command to avoid
special non-filesystems like procfs from being included.
1996-03-05 13:07:04 +00:00
mpp
b2a2cfc2c1 Added a small man page for locate.updatedb(8). 1996-02-11 18:54:39 +00:00
mpp
ce4cb0d718 Added some info describing the script that updates the database,
and the fact that it is usually run by /etc/weekly.
Closes docs/127.
1996-02-11 18:34:22 +00:00
nate
051167aad1 Re-wrote the locate.updatedb script in /bin/sh for speed and portability.
Obtained from: Partially my work in 1.
1995-11-09 00:48:41 +00:00
bde
8a5789682c Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
rgrimes
79e59e9123 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
ache
43c32831ea Better protection against too long pathes and 8bit controls in file
names, locate dumps core instead
1995-01-21 05:50:50 +00:00
jkh
f5fe6852c2 Fix a longstanding bogon with setenv usage.
Submitted by:	jkh
1994-09-07 08:45:39 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00