X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamc%2Fisamh-p.h;h=c1adaa00fd0e13fa8d21694fb748201d360902c7;hb=544e8fcc65541951ba92d0212838a0bebbc3084c;hp=3957303a5ace132c90f031b765a9a8bb9b6bc262;hpb=e1d0fa1a3689bc422a3c22a676eb0192f34ddb02;p=idzebra-moved-to-github.git diff --git a/isamc/isamh-p.h b/isamc/isamh-p.h index 3957303..c1adaa0 100644 --- a/isamc/isamh-p.h +++ b/isamc/isamh-p.h @@ -50,7 +50,9 @@ typedef struct ISAMH_file_s { struct ISAMH_s { int no_files; int max_cat; - char *merge_buf; + // char *merge_buf; + char *startblock; /* start of the chain, update lastptr and numKeys here */ + char *lastblock; /* end of the chain, append here */ ISAMH_M method; ISAMH_file files; }; @@ -59,17 +61,24 @@ struct ISAMH_PP_s { char *buf; ISAMH_BLOCK_SIZE offset; ISAMH_BLOCK_SIZE size; - int cat; - int pos; - int next; + int cat; /* category of this block */ + int pos; /* block number of this block */ + int next; /* number of the next block */ ISAMH is; void *decodeClientData; int deleteFlag; int numKeys; + ISAMH_BLOCK_SIZE lastblock; /* last block in chain */ }; -#define ISAMH_BLOCK_OFFSET_N (sizeof(int)+sizeof(ISAMH_BLOCK_SIZE)) -#define ISAMH_BLOCK_OFFSET_1 (sizeof(int)+sizeof(ISAMH_BLOCK_SIZE)+sizeof(int)) +#define ISAMH_BLOCK_OFFSET_N (sizeof(int) + \ + sizeof(ISAMH_BLOCK_SIZE)) +/* == 8 */ +#define ISAMH_BLOCK_OFFSET_1 (sizeof(int) + \ + sizeof(ISAMH_BLOCK_SIZE) + \ + sizeof(int) + \ + sizeof(ISAMH_BLOCK_SIZE)) +/* == 16 */ int isamh_alloc_block (ISAMH is, int cat); void isamh_release_block (ISAMH is, int cat, int pos); int isamh_read_block (ISAMH is, int cat, int pos, char *dst); @@ -83,7 +92,13 @@ int isamh_write_block (ISAMH is, int cat, int pos, char *src); /* * $Log: isamh-p.h,v $ - * Revision 1.1 1999-06-30 15:05:45 heikki + * Revision 1.3 1999-07-07 09:36:04 heikki + * Fixed an assertion in isamh + * + * Revision 1.2 1999/07/06 09:37:05 heikki + * Working on isamh - not ready yet. + * + * Revision 1.1 1999/06/30 15:05:45 heikki * opied from isamc.p.h, starting to simplify * */ \ No newline at end of file