X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Fisamb.c;h=0ee485c35089bc8ab3df6bf17317a0fb8fe06b08;hb=a8be496e66ed5ba01a42537e4aa29c6670cd3037;hp=294683d01ac3cdbd267c42fd8e496f058bd1a7aa;hpb=ecf94fc25324414287d3bbfbeba4440e558edd17;p=idzebra-moved-to-github.git diff --git a/isamb/isamb.c b/isamb/isamb.c index 294683d..0ee485c 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -1,4 +1,4 @@ -/* $Id: isamb.c,v 1.76 2005-04-13 13:03:47 adam Exp $ +/* $Id: isamb.c,v 1.79 2005-04-25 10:45:28 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -196,7 +196,7 @@ ISAMB isamb_open(BFiles bfs, const char *name, int writeflag, ISAMC_M *method, isamb->skipped_numbers = 0; isamb->returned_numbers = 0; for (i = 0; iskipped_nodes[i] = isamb->accessed_nodes[i] = 0; + isamb->skipped_nodes[i] = isamb->accessed_nodes[i] = 0; assert(cache == 0); isamb->file = xmalloc(sizeof(*isamb->file) * isamb->no_cat); @@ -1799,10 +1799,10 @@ int isamb_pp_forward (ISAMB_PP pp, void *buf, const void *untilbuf) void isamb_pp_pos(ISAMB_PP pp, double *current, double *total) { /* return an estimate of the current position and of the total number of */ /* occureences in the isam tree, based on the current leaf */ - struct ISAMB_block *p = pp->block[pp->level]; assert(total); assert(current); - assert(p->leaf); + + /* if end-of-stream PP may not be leaf */ *total = (double) (pp->block[0]->no_items); *current = (double) pp->returned_numbers;