-/* $Id: extract.c,v 1.234 2006-11-02 10:47:05 adam Exp $
+/* $Id: extract.c,v 1.236 2006-11-14 08:12:08 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
if (!(outf = fopen (out_fname, "wb")))
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", out_fname);
- exit (1);
+ zebra_exit("extract_flushWriteKeys");
}
yaz_log (YLOG_LOG, "writing section %d", zh->reg->key_file_no);
prevcp = cp = (zh->reg->key_buf)[zh->reg->ptr_top - ptr_i];
if (!(outf = fopen (out_fname, "wb")))
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", out_fname);
- exit (1);
+ zebra_exit("extract_flushWriteKeys");
}
yaz_log (YLOG_LOG, "writing section %d", key_file_no);
i = ptr_i;
if (fclose (outf))
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fclose %s", out_fname);
- exit (1);
+ zebra_exit("extract_flushWriteKeys");
}
yaz_log (YLOG_LOG, "finished section %d", zh->reg->key_file_no);
zh->reg->ptr_i = 0;
zh->reg->key_buf_used = 0;
}
-ZEBRA_RES zebra_snippets_rec_keys(ZebraHandle zh,
- zebra_rec_keys_t reckeys,
- zebra_snippets *snippets)
+ZEBRA_RES zebra_rec_keys_to_snippets(ZebraHandle zh,
+ zebra_rec_keys_t reckeys,
+ zebra_snippets *snippets)
{
NMEM nmem = nmem_create();
if (zebra_rec_keys_rewind(reckeys))
if (fwrite (i->buf, bp - i->buf, 1, outf) != 1)
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fwrite");
- exit (1);
+ zebra_exit("encode_key_write");
}
#if 0