projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor changes.
[idzebra-moved-to-github.git]
/
include
/
isam.h
diff --git
a/include/isam.h
b/include/isam.h
index
126270e
..
dd70f69
100644
(file)
--- a/
include/isam.h
+++ b/
include/isam.h
@@
-4,7
+4,13
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: isam.h,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: isam.h,v $
- * Revision 1.1 1994-09-12 08:02:07 quinn
+ * Revision 1.3 1994-09-26 16:08:42 quinn
+ * Most of the functionality in place.
+ *
+ * Revision 1.2 1994/09/14 13:10:35 quinn
+ * Small changes
+ *
+ * Revision 1.1 1994/09/12 08:02:07 quinn
* Not functional yet
*
*/
* Not functional yet
*
*/
@@
-16,6
+22,8
@@
#include <isam.h>
#define IS_MAX_BLOCKTYPES 4
#include <isam.h>
#define IS_MAX_BLOCKTYPES 4
+#define IS_MAX_RECORD 512
+#define IS_DEF_REPACK_PERCENT "30" /* how much relative change before repack */
typedef unsigned int SYSNO; /* should be somewhere else */
typedef unsigned int ISAM_P;
typedef unsigned int SYSNO; /* should be somewhere else */
typedef unsigned int ISAM_P;
@@
-27,9
+35,15
@@
typedef struct isam_blocktype
{
BFile bf; /* blocked file */
int blocksize;
{
BFile bf; /* blocked file */
int blocksize;
+ int first_block; /* position of first data block */
int max_keys_block; /* max num of keys per block */
int max_keys_block; /* max num of keys per block */
+ int max_keys_block0; /* max num of keys in first block */
int nice_keys_block; /* nice number of keys per block */
int max_keys; /* max number of keys per table */
int nice_keys_block; /* nice number of keys per block */
int max_keys; /* max number of keys per table */
+ int freelist; /* fist free block */
+ int top; /* first unused block */
+ int index; /* placeholder. Always 0. */
+ char *dbuf; /* buffer for use in I/O operations */
} isam_blocktype;
/*
} isam_blocktype;
/*
@@
-41,6
+55,7
@@
typedef struct isam_struct
int num_types; /* number of block types used */
int writeflag;
int keysize; /* size of the keys (records) used */
int num_types; /* number of block types used */
int writeflag;
int keysize; /* size of the keys (records) used */
+ int repack; /* how many percent to grow before repack */
int (*cmp)(const void *k1, const void *k2); /* compare function */
} isam_struct, *ISAM;
int (*cmp)(const void *k1, const void *k2); /* compare function */
} isam_struct, *ISAM;
@@
-52,8
+67,10
@@
typedef struct ispt_struct
struct ispt_struct *next; /* freelist */
} ispt_struct, *ISPT;
struct ispt_struct *next; /* freelist */
} ispt_struct, *ISPT;
-#define IS_TYPE(x) ((x) & 3)) /* type part of position */
-#define IS_BLOCK(x) ((x >> 2)) /* block # part of position */
+#define is_type(x) ((x) & 3) /* type part of position */
+#define is_block(x) ((x) >> 2) /* block # part of position */
+
+#define is_keysize(is) ((is)->keysize)
/*
* Public Prototypes.
/*
* Public Prototypes.
@@
-86,4
+103,8
@@
void is_pt_free(ISPT ip);
*/
int is_readkey(ISPT ip, void *buf);
*/
int is_readkey(ISPT ip, void *buf);
+int is_writekey(ISPT ip, const void *buf);
+
+ISAM_P is_merge(ISAM is, ISAM_P pos, int num, const char *data);
+
#endif
#endif