X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fdb_internal.h;h=72c1ee0851a175b22bd9c88945d1b7446323a7a2;hb=89b67b2c54822c7867d8a91a896386f632d2051e;hp=7a72a83caa54b6ac744332c478f6cc049905c31c;hpb=2907289f9d5713b3f6f02a2ebaa3afebe50095d0;p=libucw.git diff --git a/lib/db_internal.h b/lib/db_internal.h index 7a72a83c..72c1ee08 100644 --- a/lib/db_internal.h +++ b/lib/db_internal.h @@ -1,12 +1,15 @@ /* * Sherlock Library -- Fast Database Management Routines -- Internal Declarations * - * (c) 1999 Martin Mares + * (c) 1999--2001 Martin Mares + * + * 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 */ @@ -43,13 +46,13 @@ struct sdbm { 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)))