summaryrefslogtreecommitdiff
path: root/usr.bin/locate/code/locate.code.c
Commit message (Collapse)AuthorAgeFilesLines
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | 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. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* Various changes to make locate compilable with WARNS=6. Note that thereGavin Atkinson2010-06-281-9/+8
| | | | | | | | | | | is still one issue on FreeBSD/arm (signed vs unsigned char) which prevents actually bumping this to WARNS=6 - I'm still considering the correct solution to this issue. Tested by: make universe Notes: svn path=/head/; revision=209571
* remove __PWarner Losh2002-03-221-2/+2
| | | | Notes: svn path=/head/; revision=92920
* getopt and friends are declared in <unistd.h>Warner Losh2000-09-041-2/+1
| | | | | | | getopt returns -1 not EOF. Notes: svn path=/head/; revision=65428
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Do not store character 30. I made a test at my CS departmentWolfram Schneider1996-10-271-1/+8
| | | | | | | | and at least one user use this char in a file name. Older locate implementions core'd. Notes: svn path=/head/; revision=19213
* 8-Bit character support.Wolfram Schneider1996-10-131-26/+56
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=18905
* NULL -> '\0'Wolfram Schneider1996-08-311-7/+7
| | | | | | | Submitted by: Bruce, see also c-faq 5.6 and 5.9 Notes: svn path=/head/; revision=17972
* code cleanupWolfram Schneider1996-08-221-7/+12
| | | | Notes: svn path=/head/; revision=17776
* bigramWolfram Schneider1996-08-141-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=17592
* Better protection against too long pathes and 8bit controls in fileAndrey A. Chernov1995-01-211-4/+4
| | | | | | | names, locate dumps core instead Notes: svn path=/head/; revision=5761
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+212
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590