2 * Copyright (c) 1996-1998, Index Data.
3 * See the file LICENSE for details.
6 * merge-d.c: merge routines for isamd
18 static char *hexdump(unsigned char *p, int len, char *buff) {
19 static char localbuff[128];
21 if (!buff) buff=localbuff;
24 sprintf(bytebuff,"%02x",*p);
26 strcat(buff,bytebuff);
27 if (len) strcat(buff,",");
33 /* isamd - heikki's append-only isam
35 * The record pointers arre kept in a linked list of buffers, as usual.
36 * When modifying the list, we just store diffs at the end of it (either
37 * in the only block, or in a separate block). Occasionally we have too
38 * many blocks, and then we merge the diffs into the list.
43 ISAMD_P isamd_append (ISAMD is, ISAMD_P ipos, ISAMD_I data)
45 char i_item[128]; /* one input item */
48 int i_mode; /* 0 for delete, 1 for insert */
55 i_more = (*data->read_item)(data->clientData, &i_ptr, &i_mode);
57 memcpy(&retval,i_item, sizeof(retval));
65 * Revision 1.2 1999-07-14 15:05:30 heikki
66 * slow start on isam-d
68 * Revision 1.1 1999/07/14 13:14:47 heikki