X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdb_internal.h;h=b480a794aba6eacb2253b1507c698430f4e40a87;hb=c0544008a494710146ac6cf88b61b5fd2d46f51b;hp=e54d711454a353105ba2ba92578328bc6d94baba;hpb=1571781022499a9d0c32d249f89945d034d1cbff;p=libucw.git diff --git a/lib/db_internal.h b/lib/db_internal.h index e54d7114..b480a794 100644 --- a/lib/db_internal.h +++ b/lib/db_internal.h @@ -1,12 +1,15 @@ /* - * Sherlock Library -- Fast Database Management Routines -- Internal Declarations + * UCW 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)))