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);
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, "");