/*
* Sherlock Library -- Fast Database Management Routines -- Internal Declarations
*
- * (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ * (c) 1999--2001 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
*/
#define SDBM_NUM_FREE_PAGE_POOLS 32
-struct sdbm_root {
+struct sdbm_root { /* Must fit in 1K which is minimum page size */
u32 magic;
u32 version;
u32 page_order; /* Binary logarithm of page size */
uns page_mask; /* page_size - 1 */
uns dir_size; /* Page directory size in entries */
uns dir_shift; /* Number of significant bits of hash function */
- uns file_size;
+ uns file_size; /* in pages */
uns flags;
- uns find_pos; /* Current pointer for sdbm_find_next() */
+ uns find_page, find_pos; /* Current pointer for sdbm_find_next() */
uns find_free_list; /* First free list entry not skipped by sdbm_find_next() */
};
#define SDBM_MAGIC 0x5344424d
-#define SDBM_VERSION 1
+#define SDBM_VERSION 2
#define GET32(p,o) *((u32 *)((p)+(o)))