-/* $Id: insert.c,v 1.28 2006-08-29 13:39:18 adam Exp $
+/* $Id: insert.c,v 1.29 2006-11-14 12:04:38 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
}
}
}
- if (best_no < 0) /* we didn't find any tail string entry at all! */
- return -1;
+ assert(best_no >= 0); /* we didn't find any tail string entry at all! */
j = best_indxp - (short*) p;
subptr = new_page (dict, ptr, &subp);
if (split_page (dict, ptr, p))
{
yaz_log (YLOG_FATAL, "Unable to split page %d\n", ptr);
- abort ();
+ assert(0);
}
return dict_ins (dict, str-1, ptr, userlen, userinfo);
}
-/* $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
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;
{
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,
if (!*lookahead_mode)
{
yaz_log(YLOG_WARN, "isamb: Inconsistent register (1)");
- assert (*lookahead_mode);
+ assert(*lookahead_mode);
}
}
else
{
/* 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)
{