#include <yaz/yconfig.h>
#include <yaz/log.h>
-#include <idzebra/version.h>
-
/**
expand GCC_ATTRIBUTE if GCC is in use. See :
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
#define ZEBRA_GCC_ATTR(x)
#endif
-/* check that we don't have all too old yaz */
-#ifndef YLOG_ERRNO
-#error Need a modern yaz with YLOG_ defines
-#endif
-
YAZ_BEGIN_CDECL
/** \var zint
#ifndef ZEBRA_IT_KEY_H
#define ZEBRA_IT_KEY_H
-#include <idzebra/version.h>
#include <idzebra/util.h>
YAZ_BEGIN_CDECL
void key_init(struct it_key *k);
zint key_get_seq(const void *p);
zint key_get_segment(const void *p);
-int key_compare_it(const void *p1, const void *p2);
int key_qsort_compare(const void *p1, const void *p2);
char *key_print_it(const void *p, char *buf);
void key_logdump(int mask, const void *p);
#define SORTIDX_H
#include <yaz/yconfig.h>
-#include <idzebra/version.h>
#include <idzebra/bfile.h>
#include <yaz/wrbuf.h>
#ifndef ZEBRA_SU_CODEC_H
#define ZEBRA_SU_CODEC_H
-#include <idzebra/version.h>
#include <idzebra/util.h>
YAZ_BEGIN_CDECL
kc->context = cp;
kc->key_size = sizeof(struct it_key);
- kc->cmp = key_compare_it;
+ kc->cmp = key_compare;
kc->key_logdump_txt = key_logdump_txt;
kc->getseq = key_get_seq;
kctrl, scope, 0);
rscur++;
}
- ti = heap_init (rscur, sizeof(struct it_key), key_compare_it);
+ ti = heap_init (rscur, sizeof(struct it_key), key_compare);
for (i = rscur; --i >= 0; )
{
rsfd[i] = rset_open(rset[i], RSETF_READ);
ispt = (ISAMC_PP *) xmalloc(sizeof(*ispt) * (to-from));
ti = heap_init(to-from, sizeof(struct it_key),
- key_compare_it);
+ key_compare);
for (i = to-from; --i >= 0; )
{
ispt[i] = isamc_pp_open(zi->reg->isamc, isam_p[from+i]);
ispt = (ISAMS_PP *) xmalloc(sizeof(*ispt) * (to-from));
ti = heap_init(to-from, sizeof(struct it_key),
- key_compare_it);
+ key_compare);
for (i = to-from; --i >= 0; )
{
ispt[i] = isams_pp_open(zi->reg->isams, isam_p[from+i]);
ispt = (ISAMB_PP *) xmalloc(sizeof(*ispt) * (to-from));
ti = heap_init(to-from, sizeof(struct it_key),
- key_compare_it);
+ key_compare);
for (i = to-from; --i >= 0; )
{
if (isam_p[from+i]) {
key_logdump_txt(logmask, p, "");
}
-int key_compare_it (const void *p1, const void *p2)
-{
- int i, l = ((struct it_key *) p1)->len;
- if (((struct it_key *) p2)->len > l)
- l = ((struct it_key *) p2)->len;
- assert (l <= IT_KEY_LEVEL_MAX && l > 0);
- for (i = 0; i < l; i++)
- {
- if (((struct it_key *) p1)->mem[i] != ((struct it_key *) p2)->mem[i])
- {
- if (((struct it_key *) p1)->mem[i] > ((struct it_key *) p2)->mem[i])
- return l-i;
- else
- return i-l;
- }
- }
- return 0;
-}
-
char *key_print_it (const void *p, char *buf)
{
strcpy(buf, "");