- void *page;
- if (*pos == 0)
- {
- *pos = isamb_alloc_block (is, isamb->block_size[0], &page);
- isamb_page_set_leaf (page);
- isamb_page_set_no (page, 0);
- }
- else /* find leaf ... */
+#if 0
+/* read page at pos */
+void isamb_get_block (ISAMB is, ISAMB_pos pos, Bpage *page)
+{
+}
+
+/* alloc page */
+ISAMB_pos isamb_alloc_block (ISAMB is, int block_size, Bpage *page)
+{
+}
+
+#define isamb_page_set_leaf (p) 0[p] = 1
+#define isamb_page_set_noleaf (p) 0[p] = 0
+#define isamb_page_datalist (4+p)
+
+static void isamb_page_set_no(Bpage page, int no)
+{
+ page[1] = no & 255;
+ page[2] = (no >> 8) & 255;
+ page[3] = (no >> 16) & 255;
+}
+
+static int isamb_page_get_no(Bpage page)
+{
+ return page[1] + 256*page[2] + 65536*page[3];
+}
+
+void isamb_insert_sub(ISAMB is, ISAMB_pos *pos, const void *data)
+{
+ const char *src;
+ char dst[200];
+ int no, i;
+
+ isamb_get_block (is, *pos, &page);
+ if (!isamb_page_isleaf (page))