Commit Graph

23 Commits

Author SHA1 Message Date
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
christos 69637e8009 Write the database file into a temporary file first, because otherwise if
we don't specify an output filename, the database file we create will end
up being used during population as the database file to find entries quickly.
2005-04-13 04:50:22 +00:00
christos 5cb9041b96 const, knf, WARNS=3 2004-04-23 21:39:33 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
itojun d5250e4ec9 safer use of realloc 2003-10-16 06:34:19 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
uwe 4eb408dcd9 Avoid cgetcap &co prototypes conflicting with those provided by the host.
With this change we can cross-compile on FreeBSD 4.x.
2003-01-31 20:50:29 +00:00
tv cce248537b Make this compilable as a host tool. 2002-01-31 19:23:50 +00:00
jdolecek b80b95a77a Examine input files and set the openinfo hint accordingly to number of
found records. This makes resulting db for small capability databases
much smaller - for vgrind(1), the resulting vgrindefs.db is about 24KB
instead of ~500KB.

The hint passed to dbopen() is number of records in input files
rounded up to nearest power-of-two value and multiplied by two.
Besides being a nice conservative value, termcap.db become about
70KB bigger if the hint matches the count of records (1023), probably
due to hash overflows.
2001-01-28 20:01:42 +00:00
jdolecek 26a80cb447 make local functions static 2001-01-28 19:42:17 +00:00
jdolecek 8d46cb93bd db_build(): fix memory leak, free() the buffer allocated by cgetnext() on
every loop iteration
2001-01-28 17:34:31 +00:00
mjl 7063d4bc33 Un-__P and ANSIfy. 2000-10-04 20:02:26 +00:00
mjl a1ac373d57 Remove unused includes. 2000-10-04 20:00:47 +00:00
simonb a1997f6cbe Add -b and -l options to generate big- or little-endian databases
regardless of host byte order.
1999-06-27 05:49:02 +00:00
mycroft 8cedc3e89f Increase the initial hash table size. 1998-07-28 19:27:00 +00:00
mrg 15dc191955 fix compile warnings on the alpha. 1997-10-19 14:05:47 +00:00
lukem 9992ac3ea9 getopt returns -1 not EOF 1997-10-18 12:54:24 +00:00
lukem b749a32930 WARNSify, fix .Nm usage 1997-10-18 12:31:01 +00:00
jtc 3e4b73c5a6 Sync with 4.4lite2 1995-09-02 05:45:13 +00:00
glass c27cdc6057 new rcsid format 1995-03-26 03:59:33 +00:00
mycroft 573393b3d1 Tweak the hash parameters a bit; big win when run over NFS. Merge (copyright
notice) changes from 4.4-Lite.
1994-08-29 22:53:45 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 8d5826635d bring in getcap routines, supplied by CSRG, from 4.4... 1993-05-18 07:37:51 +00:00