- bf_read (isamb->file[i].bf, 0, 0, sizeof(struct ISAMB_head),
- &isamb->file[i].head);
+ if (!bf_read (isamb->file[i].bf, 0, 0, sizeof(struct ISAMB_head),
+ &isamb->file[i].head))
+ {
+ isamb->file[i].head.first_block = 1;
+ isamb->file[i].head.last_block = 1;
+ isamb->file[i].head.block_size = b_size;
+ isamb->file[i].head.block_max = b_size - ISAMB_DATA_OFFSET;
+ }
+ assert (isamb->file[i].head.block_size >= ISAMB_DATA_OFFSET);
+ isamb->file[i].head_dirty = 0;
+ b_size = b_size * 4;