projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix setting of recordAttr->recordSize in case of storeData method.
[idzebra-moved-to-github.git]
/
index
/
extract.c
diff --git
a/index/extract.c
b/index/extract.c
index
f4d53de
..
fb7b91a
100644
(file)
--- a/
index/extract.c
+++ b/
index/extract.c
@@
-1,4
+1,4
@@
-/* $Id: extract.c,v 1.234 2006-11-02 10:47:05 adam Exp $
+/* $Id: extract.c,v 1.237 2006-11-16 11:11:36 adam Exp $
Copyright (C) 1995-2006
Index Data ApS
Copyright (C) 1995-2006
Index Data ApS
@@
-824,6
+824,7
@@
ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh,
rec->size[recInfo_storeData] = zh->store_data_size;
rec->info[recInfo_storeData] = zh->store_data_buf;
zh->store_data_buf = 0;
rec->size[recInfo_storeData] = zh->store_data_size;
rec->info[recInfo_storeData] = zh->store_data_buf;
zh->store_data_buf = 0;
+ recordAttr->recordSize = zh->store_data_size;
}
else if (zh->m_store_data)
{
}
else if (zh->m_store_data)
{
@@
-1202,7
+1203,7
@@
void extract_flushWriteKeys (ZebraHandle zh, int final)
if (!(outf = fopen (out_fname, "wb")))
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", out_fname);
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];
}
yaz_log (YLOG_LOG, "writing section %d", zh->reg->key_file_no);
prevcp = cp = (zh->reg->key_buf)[zh->reg->ptr_top - ptr_i];
@@
-1231,7
+1232,7
@@
void extract_flushWriteKeys (ZebraHandle zh, int final)
if (!(outf = fopen (out_fname, "wb")))
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fopen %s", out_fname);
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;
}
yaz_log (YLOG_LOG, "writing section %d", key_file_no);
i = ptr_i;
@@
-1264,16
+1265,16
@@
void extract_flushWriteKeys (ZebraHandle zh, int final)
if (fclose (outf))
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fclose %s", out_fname);
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;
}
}
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))
{
NMEM nmem = nmem_create();
if (zebra_rec_keys_rewind(reckeys))
@@
-1631,7
+1632,7
@@
static void encode_key_write (char *k, struct encode_info *i, FILE *outf)
if (fwrite (i->buf, bp - i->buf, 1, outf) != 1)
{
yaz_log (YLOG_FATAL|YLOG_ERRNO, "fwrite");
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
}
#if 0