Commit graph

39 commits

Author SHA1 Message Date
Warner Losh 0b8224d1cc 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
2023-11-26 22:23:58 -07:00
Warner Losh bdcbfde31e 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
2023-11-26 22:23:30 -07:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Wolfram Schneider a6c20ddd4a switch from short to int for lookup table
This simplifies the code, less casting is needed.
2022-02-05 08:44:35 +00:00
Wolfram Schneider d43255b50c remove dead code
A lookup array is faster than a function with linear search.
The old function was not used for years - spring cleaning.
2022-02-03 17:02:37 +00:00
Wolfram Schneider 834a8fa169 enable to configure the locate path length at compile time
The length has not changed and is 1024 chars (equals PATH_MAX).

PR: 201243
Submitted by: Willem Jan Withagen <wjw@digiware.nl>
2022-01-31 17:32:46 +00:00
Wolfram Schneider 8e7c0a6d32 fix fgets error handling (from last commit) 2022-01-30 13:08:42 +00:00
Wolfram Schneider 72a0982cd5 improve error handling 2022-01-30 09:27:21 +00:00
Baptiste Daroussin 389844c058 locate: change from BSD-4-clause to BSD-3-clause
We have the authorization from the University of California to remove
the advertising clause for a while, wosch@ who also hold a copyright
on this code also approved the relicensing

Approved by:	wosch@
MFC after:	3 days
2022-01-25 09:20:17 +01:00
Pedro F. Giffuni df57947f08 spdx: initial adoption of licensing ID tags.
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
2017-11-18 14:26:50 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty 3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Warner Losh 3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Gavin Atkinson 31fa41024e Various changes to make locate compilable with WARNS=6. Note that there
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
2010-06-28 12:04:55 +00:00
Ruslan Ermilov e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Ruslan Ermilov a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Warner Losh f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
Warner Losh 62f882d620 getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.
2000-09-04 06:09:54 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bruce Evans 043e1b65d9 <bsd.prog.mk> has always included ../Makefile.inc, and there are no
complications involving .PATH or dependencies, so don't include it here.
1997-12-17 19:49:09 +00:00
Warner Losh 1c8af87873 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
Peter Wemm c115df18cd Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
Jordan K. Hubbard 1130b656e5 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
Wolfram Schneider c83667e68c 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
Wolfram Schneider 139764e8e9 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
Wolfram Schneider 1a1ee31f10 NULL -> '\0'
Submitted by: Bruce, see also c-faq 5.6 and 5.9
1996-08-31 14:51:18 +00:00
Wolfram Schneider 7ec1929d53 code cleanup 1996-08-22 18:46:13 +00:00
Wolfram Schneider 370021810a 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
Andrey A. Chernov 2fdd39d28d Better protection against too long pathes and 8bit controls in file
names, locate dumps core instead
1995-01-21 05:50:50 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00