X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fisamd.h;h=9dc95fe87f411e6f4521f21bc45941684f332e88;hb=43e51e6fd8d1e10b5d5b6d62de8da6ec833f806c;hp=acd202437d3319a1c2b047768bb0dc9280458b29;hpb=8e5f17591325078343ec4dff4708a12c78863f78;p=idzebra-moved-to-github.git diff --git a/include/isamd.h b/include/isamd.h index acd2024..9dc95fe 100644 --- a/include/isamd.h +++ b/include/isamd.h @@ -12,8 +12,8 @@ * */ -#ifndef ISAMH_H -#define ISAMH_H +#ifndef ISAMD_H +#define ISAMD_H #include @@ -21,22 +21,22 @@ extern "C" { #endif -typedef struct ISAMH_s *ISAMH; -typedef int ISAMH_P; -typedef struct ISAMH_PP_s *ISAMH_PP; +typedef struct ISAMD_s *ISAMD; +typedef int ISAMD_P; +typedef struct ISAMD_PP_s *ISAMD_PP; -typedef struct ISAMH_filecat_s { /* filecategories, mostly block sizes */ +typedef struct ISAMD_filecat_s { /* filecategories, mostly block sizes */ int bsize; /* block size */ int mblocks; /* maximum keys before switching to larger sizes */ -} *ISAMH_filecat; +} *ISAMD_filecat; -typedef struct ISAMH_M_s { - ISAMH_filecat filecat; +typedef struct ISAMD_M_s { + ISAMD_filecat filecat; int (*compare_item)(const void *a, const void *b); -#define ISAMH_DECODE 0 -#define ISAMH_ENCODE 1 +#define ISAMD_DECODE 0 +#define ISAMD_ENCODE 1 void *(*code_start)(int mode); void (*code_stop)(int mode, void *p); void (*code_item)(int mode, void *p, char **dst, char **src); @@ -44,46 +44,58 @@ typedef struct ISAMH_M_s { int max_blocks_mem; int debug; -} *ISAMH_M; +} *ISAMD_M; -typedef struct ISAMH_I_s { /* encapsulation of input data */ +typedef struct ISAMD_I_s { /* encapsulation of input data */ int (*read_item)(void *clientData, char **dst, int *insertMode); void *clientData; -} *ISAMH_I; +} *ISAMD_I; -ISAMH_M isamd_getmethod (void); +ISAMD_M isamd_getmethod (ISAMD_M me); -ISAMH isamd_open (BFiles bfs, const char *name, int writeflag, ISAMH_M method); -int isamd_close (ISAMH is); -ISAMH_P isamd_append (ISAMH is, ISAMH_P pos, ISAMH_I data); +ISAMD isamd_open (BFiles bfs, const char *name, int writeflag, ISAMD_M method); +int isamd_close (ISAMD is); +ISAMD_P isamd_append (ISAMD is, ISAMD_P pos, ISAMD_I data); /* corresponds to isc_merge */ -ISAMH_PP isamd_pp_open (ISAMH is, ISAMH_P pos); -void isamd_pp_close (ISAMH_PP pp); -int isamd_read_item (ISAMH_PP pp, char **dst); -int isamd_pp_read (ISAMH_PP pp, void *buf); -int isamd_pp_num (ISAMH_PP pp); +ISAMD_PP isamd_pp_open (ISAMD is, ISAMD_P pos); +void isamd_pp_close (ISAMD_PP pp); +int isamd_read_item (ISAMD_PP pp, char **dst); +int isamd_read_main_item (ISAMD_PP pp, char **dst); +int isamd_pp_read (ISAMD_PP pp, void *buf); +int isamd_pp_num (ISAMD_PP pp); -int isamd_block_used (ISAMH is, int type); -int isamd_block_size (ISAMH is, int type); +int isamd_block_used (ISAMD is, int type); +int isamd_block_size (ISAMD is, int type); #define isamd_type(x) ((x) & 7) #define isamd_block(x) ((x) >> 3) #define isamd_addr(blk,typ) (((blk)<<3)+(typ)) -void isamd_buildfirstblock(ISAMH_PP pp); -void isamd_buildlaterblock(ISAMH_PP pp); +void isamd_buildfirstblock(ISAMD_PP pp); +void isamd_buildlaterblock(ISAMD_PP pp); + + #ifdef __cplusplus } #endif -#endif /* ISAMH_H */ +#endif /* ISAMD_H */ /* - * $Log: $ + * $Log: isamd.h,v $ + * Revision 1.3 1999/08/18 08:33:41 heikki + * Fixes + * + * Revision 1.2 1999/07/14 13:21:34 heikki + * Added isam-d files. Compiles (almost) clean. Doesn't work at all + * + * Revision 1.1 1999/07/14 12:34:43 heikki + * Copied from isamh, starting to change things... + * * */