#include <yaz/yconfig.h>
#include <idzebra/version.h>
#include <idzebra/bfile.h>
+#include <yaz/wrbuf.h>
YAZ_BEGIN_CDECL
#define ZEBRA_SORT_TYPE_FLAT 1
#define ZEBRA_SORT_TYPE_ISAMB 2
+#define ZEBRA_SORT_TYPE_MULTI 3
+struct zebra_sort_ent {
+ int num;
+ WRBUF wrbuf;
+};
/** \brief creates sort handle
\param bfs block files handle
void zebra_sort_add(zebra_sort_index_t si, const char *buf, int len);
+/** \brief adds multi-map content to sort file
+ \param si sort index handle
+ \param ent multi-map value
+
+ zebra_sort_type and zebra_sort_sysno must be called prior to this
+*/
+void zebra_sort_add_ent(zebra_sort_index_t si, struct zebra_sort_ent *ent);
+
+
/** \brief delete sort entry
\param si sort index handle
\retval 0 could not be read
\retval 1 could be read (found)
*/
-int zebra_sort_read(zebra_sort_index_t si, char *buf);
+int zebra_sort_read(zebra_sort_index_t si, WRBUF w);
YAZ_END_CDECL