Commit Graph

42 Commits

Author SHA1 Message Date
wiz c63e1c5ce5 Bump date for previous. 2009-01-28 09:11:16 +00:00
lukem afa4cb0e7f Rework how reading keys functions so that key lookups from hash databases
works again.  (I accidentally broke that in rev 1.15)
Fixes problem noted by Masao Uebayashi.
2009-01-28 05:48:49 +00:00
lukem 1a5f8e0d09 update documentation to reflect reality:
* read mode supports -D for btree
* all modes support -U
2009-01-28 05:31:18 +00:00
lukem 0449f26fed fix -Wsign-compare issues 2009-01-18 01:02:41 +00:00
lukem 9cec53beb4 Explicitly pull in "nbtool_config.h" if available.
Fixes tools/db build, as reported by Matthias Scheler.
2008-10-07 10:03:47 +00:00
lukem 84d42cdace Fail with a non-zero exit code if deleting a non-existant key.
Fixes bug introduced in rev 1.15, and reported in PR 39710 from Juan RP.

Don't display various warnings in delete if -q.
Suggested in PR 39710.

Add some sanity enforcing abort()s.
2008-10-07 01:32:51 +00:00
wiz fb73034467 Sort SEE ALSO.
Remove unnecessary Bk/Ek in SYNOPSIS.
2008-09-05 09:05:13 +00:00
lukem b5b5e891d4 crank to WARNS=4 2008-09-05 07:56:07 +00:00
lukem 68089bcfee Add -P pagesize, to tune the btree psize and hash bsize.
Set to 0 to let the system choose (based on st_blksize of the file)
Defaults to 4096.
2008-09-05 07:55:33 +00:00
lukem 0e22f8f32f Support -Th (VIS_HTTPSTYLE) when -U decoding key/value for delete or write 2008-09-05 05:04:40 +00:00
lukem 081a7c3db2 Fix -N so that it sets O_TRUNC in the flags to pass to dbopen(3)
and not the flags used by db(1) to control internal behaviour.
2008-09-05 03:41:35 +00:00
lukem 82ec76f4db Support -Th to enable VIS_HTTPSTYLE.
Expand description of -T so there's less need to consult
both vis(1) and strvis(3) to determine what the characters mean.
2008-09-04 09:54:56 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
wiz 665cd277c5 Comment out xref to makemap(8), which does not exist. 2007-12-27 12:56:49 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
lukem b234edd83d * Support reading multiple keys with the same name if '-D' is given,
using db->seq() and match comparison rather than db->get().
* Deleting multiple keys of the same name appears to already work as-is
  with a single db->del() call; I had code to implement this if '-D'
  is given but it appears to be unnecessary.
* Cosmetic/KNF tweaks.
2007-04-03 04:52:32 +00:00
lukem 50ec57658e Allow the input [file] field separator to be a string and not just a
single character.
Use argument-specific value names in the usage string & manual page
to simplify searching for the value's use.
2005-06-20 02:53:38 +00:00
lukem 21271b283d When vis encoding with -S, only remove the trailing NUL if -N isn't used and
the item's size is > 0.
2004-10-04 10:56:12 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
itojun 4f228a52dc safer use of realloc 2003-10-16 06:45:22 +00:00
wiz 8ea3e956e8 Add another Ns to avoid a space. 2003-06-26 17:14:13 +00:00
wiz 8128a46b63 Add Ns to avoid a space. 2003-06-26 17:13:44 +00:00
aymeric 9bdcb47acd add missing #ifdef __RCSID
(these files are compiled as host tools)
from Nicolas Ollinger, fixes PR#21892
2003-06-23 20:02:53 +00:00
wiz 3443db5bce Sync usage with man page; break to 80 chars/line. 2003-05-20 08:34:52 +00:00
wiz 5a5ddfd30b More option sorting; sync -f argument name with db.c. 2003-05-20 08:32:42 +00:00
wiz 3b86e27c3d Sort options. New sentence, new line. 2003-05-20 08:27:39 +00:00
seb 8875d36598 Bump date for last change. 2003-05-19 00:28:37 +00:00
seb c4cd748ebd Add option -S to specify strvis(3) encoding of keys and/or values
when reading a database.  Add options -T and -X to tweak encoding.

Add option -U to specify strunvis(3) decoding of keys and/or values
when writing a database or deleting entries from a database.

Kill TODO item 'add option to strunvis(3) key (& value) from infile
?': unvis(1) can be used to achieve that.

Approved by lukem@. And thanks to him for suggestions.
2003-05-19 00:27:06 +00:00
lukem 91618e1c90 -N also prevents NUL termination of value 2003-05-18 12:26:18 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
grant 2ceb845887 The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
2003-02-14 15:59:16 +00:00
atatat dd0a8acd21 The next release will be 2.0, not 1.7. 2003-01-19 21:25:36 +00:00
seb a74ab65529 Fix usage message and SYNOPSIS section wrt to option O as suggested by wiz. 2003-01-05 13:07:38 +00:00
seb 28089a8457 After discussion with lukem rename 's' option to 'O'.
Hopefully 's' option has been here only a couple of hours.
2002-12-29 18:42:49 +00:00
seb da890ac594 Fix error message for option `F' when passed a bogus argument.
Actually activate option `F' in getopt's optstring.
Implement option `s' to specify output field separator string.

Approved by lukem.
2002-12-29 11:17:04 +00:00
lukem 64fd31222b fix -E endian 2002-12-22 11:26:20 +00:00
lukem 47c5aec4fe document defaults 2002-12-22 11:22:49 +00:00
wiz 7177b5877e Drop trailing whitespace, use Aq instead of Lt and Gt. 2002-12-18 20:16:48 +00:00
lukem 5b7400f6ea some todo items 2002-12-11 14:33:15 +00:00
lukem a3d56580b8 - set cachesize to 1MB (instead of default 2.5KB); greatly improves
performance on large imports
- remove unnecessary asserts
2002-12-11 14:30:53 +00:00
lukem a8f67a8b25 db(1) - manipulate db(3)'s btree(3) and hash(3) databases 2002-12-11 13:40:42 +00:00