slow start on isam-d
[idzebra-moved-to-github.git] / isamc / isamd-p.h
index 81d1530..bffb923 100644 (file)
@@ -3,7 +3,7 @@
  * See the file LICENSE for details.
  * Heikki Levanto
  *
- *
+ * log at the end
  */
 
 #include <bfile.h>
@@ -25,7 +25,7 @@ typedef struct ISAMD_file_s {
     BFile bf;
     int head_is_dirty;
     
-    int no_writes;
+    int no_writes;  /* statistics, to be used properly... */
     int no_reads;
     int no_skip_writes;
     int no_allocated;
@@ -39,7 +39,7 @@ typedef struct ISAMD_file_s {
     int no_next;
     int no_prev;
 
-    char *alloc_buf;
+    char *alloc_buf;    /* free-list handling (?) */
     int alloc_entries_num;
     int alloc_entries_max;
 
@@ -50,25 +50,25 @@ typedef struct ISAMD_file_s {
 struct ISAMD_s {
     int no_files;
     int max_cat;
-  //  char *merge_buf;
-    char *startblock; /* start of the chain, update lastptr and numKeys here */
-    char *lastblock;  /* end of the chain, append here */
+    //char *startblock; /* start of the chain, update lastptr and numKeys here */
+    //char *lastblock;  /* end of the chain, append here */
+    //                  /* ??? */
     ISAMD_M method;
     ISAMD_file files;
 }; 
 
 struct ISAMD_PP_s {
-    char *buf;
-    ISAMD_BLOCK_SIZE offset;
-    ISAMD_BLOCK_SIZE size;
+    char *buf;   /* buffer for read/write operations */
+    ISAMD_BLOCK_SIZE offset; /* position for next read/write */
+    ISAMD_BLOCK_SIZE size;   /* size of actual pointer data */
     int cat;  /* category of this block */
     int pos;  /* block number of this block */
     int next; /* number of the next block */
+    int diffs; /* either block or offset (in head) of start of diffs */
     ISAMD is;
     void *decodeClientData;
-    int deleteFlag;
+    //int deleteFlag;
     int numKeys;
-    ISAMD_BLOCK_SIZE lastblock;  /* last block in chain */
 };
 
 #define ISAMD_BLOCK_OFFSET_N (sizeof(int) +  \
@@ -92,8 +92,8 @@ int isamd_write_block (ISAMD is, int cat, int pos, char *src);
 
 /*
  * $Log: isamd-p.h,v $
- * Revision 1.2  1999-07-14 13:21:34  heikki
- * Added isam-d files. Compiles (almost) clean. Doesn't work at all
+ * Revision 1.3  1999-07-14 15:05:30  heikki
+ * slow start on isam-d
  *
  * Revision 1.1  1999/07/14 12:34:43  heikki
  * Copied from isamh, starting to change things...