- /* consider next block pointer */
- if (last && i == ptr-1)
- mb[i+1].block = 0;
- else if (!mb[i+1].block)
- mb[i+1].block = isc_alloc_block (is, cat);
-
- /* write block */
- assert (mb[i+1].offset > mb[i].offset);
- isc_write_dblock (is, cat, mb[i].block, r_buf + mb[i].offset,
- mb[i+1].block, mb[i+1].offset - mb[i].offset);
+ memcpy (src+sizeof(zint)+sizeof(ssize), numkeys, sizeof(*numkeys));
+ if (is->method->debug > 2)
+ yaz_log (YLOG_LOG, "isc: flush ptr=%d numk=" ZINT_FORMAT " size=%d nextpos="
+ ZINT_FORMAT, i, *numkeys, (int) ssize, mb[i+1].block);
+ }
+ else
+ {
+ src = r_buf + mb[i].offset - ISAMC_BLOCK_OFFSET_N;
+ ssize += ISAMC_BLOCK_OFFSET_N;
+ if (is->method->debug > 2)
+ yaz_log (YLOG_LOG, "isc: flush ptr=%d size=%d nextpos=" ZINT_FORMAT,
+ i, (int) ssize, mb[i+1].block);
+ }
+ memcpy (src, &mb[i+1].block, sizeof(zint));
+ memcpy (src+sizeof(zint), &ssize, sizeof(ssize));
+ isamc_write_block (is, cat, mb[i].block, src);