
This article consists of a set of C sources to implement a B-tree
algorithm and several accompanying tests. It was derived from a single 
program obtained from net.sources some time ago but has been revised and
extended somewhat since then. 

The code builds to 2 executables:
(1) btree.fe	- an interactive front-end to the main B-tree system
		  this implements a simple set of commands
		  <number>	: insert given key value into the tree
		  i<number>	: ditto
		  d<number>	: delete given key value from tree
		  l<number>	: locate a given key in tree
		  p		: print current tree
		  s		: set up a default tree
		  x		: exit from program
(2) btree.test	- a series of tests for the B-tree system - typically this
		  should be run after any significant change to the B-tree
		  code. 
		- 3 tests are performed as follows (a test will only
		  proceed if the previous test succeeded):
			(i)   Perform a series of random inserts, deletes
			      and searches, maintaining an external checklist 
			      and checking the shape of the tree after every
			      action
			(ii)  Insert a fixed number of keys in ascending order
			      then delete them in ascending order
			(iii) As (ii) but everything is in descending order

Limitations:
	(1)	The B-tree is implemented as a series of *struct*s in
		memory - explicit reads and writes of (disc) blocks would
		be more useful.
	(2)	The current system only allows for unique key values
		and not data with identical key values which can then be
		distinguished by the actual information content of the data.
If anyone has any suggestions or modifications for this code, or indeed has any B-tree code of their own which they are willing to release, I would most 
interested.

				Steve Jefferson
			(smj@uk.co.ssl-macc or smj@sslvax.UUCP)


--------------------------------- cut here -----------------------------------

