+ if ( is_singleton(ipos) )
+ {
+ pp->cat=0;
+ pp->pos=0;
+ if (is->method->debug > 5)
+ logf (LOG_LOG, "isamd_pp_open %p %d=%d:%d sz=%d n=%d=%d:%d",
+ pp, isamd_addr(pp->pos, pp->cat), pp->cat, pp->pos, pp->size,
+ pp->next, isamd_type(pp->next), isamd_block(pp->next) );
+ singleton_decode(ipos, &singlekey );
+ pp->offset=ISAMD_BLOCK_OFFSET_1;
+ pp->numKeys = 1;
+ ofs=pp->offset+sizeof(int); /* reserve length of diffsegment */
+ singlekey.seqno = singlekey.seqno * 2 + 1; /* make an insert diff */
+ c_ptr=&(pp->buf[ofs]);
+ i_ptr=(char*)(&singlekey);
+ (*is->method->code_item)(ISAMD_ENCODE, pp->decodeClientData,
+ &c_ptr, &i_ptr);
+ (*is->method->code_reset)(pp->decodeClientData);
+ ofs += c_ptr-&(pp->buf[ofs]);
+ memcpy( &(pp->buf[pp->offset]), &ofs, sizeof(int) );
+ /* since we memset buf earlier, we already have a zero endmark! */
+ pp->size = ofs;
+ if (is->method->debug > 5)
+ logf (LOG_LOG, "isamd_pp_open single %d=%x: %d.%d sz=%d",
+ ipos,ipos,
+ singlekey.sysno, singlekey.seqno/2,
+ pp->size );
+ return pp;
+ } /* singleton */
+
+
+ ipos=ipos>>1; /* remove the singleton bit */
+
+ pp->cat = isamd_type(ipos);
+ pp->pos = isamd_block(ipos);
+