Home | History | Annotate | Line # | Download | only in hash
README revision 1.2
      1  1.2  cgd #	@(#)README	8.1 (Berkeley) 6/4/93
      2  1.1  cgd 
      3  1.1  cgd This package implements a superset of the hsearch and dbm/ndbm libraries.
      4  1.1  cgd 
      5  1.1  cgd Test Programs:
      6  1.1  cgd 	All test programs which need key/data pairs expect them entered
      7  1.1  cgd 	with key and data on separate lines
      8  1.1  cgd 
      9  1.1  cgd 	tcreat3.c	
     10  1.1  cgd 		Takes 
     11  1.1  cgd 			bucketsize (bsize), 
     12  1.1  cgd 			fill factor (ffactor), and
     13  1.1  cgd 			initial number of elements (nelem).  
     14  1.1  cgd 		Creates a hash table named hashtest containing the 
     15  1.1  cgd 		keys/data pairs entered from standard in.
     16  1.1  cgd 	thash4.c
     17  1.1  cgd 		Takes
     18  1.1  cgd 			bucketsize (bsize), 
     19  1.1  cgd 			fill factor (ffactor), 
     20  1.1  cgd 			initial number of elements (nelem)
     21  1.1  cgd 			bytes of cache (ncached), and
     22  1.1  cgd 			file from which to read data  (fname)
     23  1.1  cgd 		Creates a table from the key/data pairs on standard in and
     24  1.1  cgd 		then does a read of each key/data in fname
     25  1.1  cgd 	tdel.c
     26  1.1  cgd 		Takes
     27  1.1  cgd 			bucketsize (bsize), and
     28  1.1  cgd 			fill factor (ffactor).
     29  1.1  cgd 			file from which to read data (fname)
     30  1.1  cgd 		Reads each key/data pair from fname and deletes the
     31  1.1  cgd 		key from the hash table hashtest
     32  1.1  cgd 	tseq.c
     33  1.1  cgd 		Reads the key/data pairs in the file hashtest and writes them
     34  1.1  cgd 		to standard out.
     35  1.1  cgd 	tread2.c
     36  1.1  cgd 		Takes
     37  1.1  cgd 			butes of cache (ncached).
     38  1.1  cgd 		Reads key/data pairs from standard in and looks them up
     39  1.1  cgd 		in the file hashtest.
     40  1.1  cgd 	tverify.c
     41  1.1  cgd 		Reads key/data pairs from standard in, looks them up
     42  1.1  cgd 		in the file hashtest, and verifies that the data is
     43  1.1  cgd 		correct.
     44  1.1  cgd 
     45  1.1  cgd NOTES:
     46  1.1  cgd 
     47  1.1  cgd The file search.h is provided for using the hsearch compatible interface
     48  1.1  cgd on BSD systems.  On System V derived systems, search.h should appear in 
     49  1.1  cgd /usr/include.
     50  1.1  cgd 
     51  1.2  cgd The man page ../man/db.3 explains the interface to the hashing system.
     52  1.1  cgd The file hash.ps is a postscript copy of a paper explaining
     53  1.1  cgd the history, implementation, and performance of the hash package.
     54  1.1  cgd 
     55  1.1  cgd "bugs" or idiosyncracies
     56  1.1  cgd 
     57  1.1  cgd If you have a lot of overflows, it is possible to run out of overflow
     58  1.1  cgd pages.  Currently, this will cause a message to be printed on stderr.
     59  1.1  cgd Eventually, this will be indicated by a return error code.
     60  1.1  cgd 
     61  1.1  cgd If you are using the ndbm interface and exit without flushing or closing the
     62  1.1  cgd file, you may lose updates since the package buffers all writes.  Also,
     63  1.1  cgd the db interface only creates a single database file.  To avoid overwriting
     64  1.1  cgd the user's original file, the suffix ".db" is appended to the file name
     65  1.1  cgd passed to dbm_open.  Additionally, if your code "knows" about the historic
     66  1.1  cgd .dir and .pag files, it will break.  
     67  1.1  cgd 
     68  1.1  cgd There is a fundamental difference between this package and the old hsearch.
     69  1.1  cgd Hsearch requires the user to maintain the keys and data in the application's
     70  1.1  cgd allocated memory while hash takes care of all storage management.  The down
     71  1.1  cgd side is that the byte strings passed in the ENTRY structure must be null
     72  1.1  cgd terminated (both the keys and the data).
     73