X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Fisamb.c;h=0578ff7931bb3a913196bfe5248b3bb81feb5593;hb=b2200ef6f97a9b967723643d27a4ffb388883f6d;hp=8e464ba951e651cb3f18030fd57d9fbe9fff9ecd;hpb=0f78f3fe78e859d9f0d3f0d3e13fcd28085dd427;p=idzebra-moved-to-github.git diff --git a/isamb/isamb.c b/isamb/isamb.c index 8e464ba..0578ff7 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -1,4 +1,4 @@ -/* $Id: isamb.c,v 1.85 2006-11-14 08:12:08 adam Exp $ +/* $Id: isamb.c,v 1.86 2006-11-14 12:03:48 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -462,11 +462,11 @@ static struct ISAMB_block *open_block(ISAMB b, ISAM_P pos) if (!cache_block (b, pos, p->buf, 0)) { yaz_log(b->log_io, "bf_read: open_block"); - if (!bf_read(b->file[cat].bf, pos/CAT_MAX, 0, 0, p->buf)) + if (bf_read(b->file[cat].bf, pos/CAT_MAX, 0, 0, p->buf) != 1) { yaz_log(YLOG_FATAL, "isamb: read fail for pos=%ld block=%ld", (long) pos, (long) pos/CAT_MAX); - abort(); + zebra_exit("isamb:open_block"); } } p->bytes = (char *)p->buf + offset; @@ -512,7 +512,7 @@ struct ISAMB_block *new_block (ISAMB b, int leaf, int cat) { yaz_log(YLOG_FATAL, "isamb: read fail for pos=%ld block=%ld", (long) p->pos/CAT_MAX, (long) p->pos/CAT_MAX); - abort (); + zebra_exit("isamb:new_block"); } } yaz_log(b->log_freelist, "got block " ZINT_FORMAT " from freelist %d:" ZINT_FORMAT, p->pos, @@ -889,7 +889,7 @@ int insert_leaf (ISAMB b, struct ISAMB_block **sp1, void *lookahead_item, if (!*lookahead_mode) { yaz_log(YLOG_WARN, "isamb: Inconsistent register (1)"); - assert (*lookahead_mode); + assert(*lookahead_mode); } } else @@ -1007,7 +1007,7 @@ int insert_leaf (ISAMB b, struct ISAMB_block **sp1, void *lookahead_item, { /* this is append. So a delete is bad */ yaz_log(YLOG_WARN, "isamb: Inconsistent register (2)"); - abort(); + assert(*lookahead_mode); } else if (!half1 && dst > tail_cut) {