-static void isamb_pp_descend_to_leaf(ISAMB_PP pp, ISAMB_P pos, const void *untilbuf)
-{ /* climbs down the tree, from pos, to the leftmost leaf */
- struct ISAMB_block *p = pp->block[pp->level];
- const char *src;
- assert(!p->leaf);
-#if ISAMB_DEBUG
- yaz_log(YLOG_DEBUG,"isamb_pp_descend_to_leaf "
- "starting at lev %d node %d ofs=%d lf=%d u=%p",
- pp->level, p->pos, p->offset, p->leaf, untilbuf);
-#endif
- if (untilbuf)
- pos=isamb_pp_forward_unode(pp,pos,untilbuf);
- ++(pp->level);
- assert(pos);
- p=open_block(pp->isamb, pos);
- pp->block[pp->level]=p;
- ++(pp->accessed_nodes[pp->maxlevel-pp->level]);
- ++(pp->no_blocks);
-#if ISAMB_DEBUG
- yaz_log(YLOG_DEBUG,"isamb_pp_descend_to_leaf "
- "got lev %d node %d lf=%d",
- pp->level, p->pos, p->leaf);
-#endif
- if (p->leaf)
- return;
- assert (p->offset==0 );
- src=p->bytes + p->offset;
- decode_ptr(&src, &pos);
- p->offset=src-(char*)p->bytes;
- isamb_pp_descend_to_leaf(pp,pos,untilbuf);
-#if ISAMB_DEBUG
- yaz_log(YLOG_DEBUG,"isamb_pp_descend_to_leaf "
- "returning at lev %d node %d ofs=%d lf=%d",
- pp->level, p->pos, p->offset, p->leaf);
-#endif
-} /* descend_to_leaf */