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
Added test cases for @and, @or, @not including bug #619.
[idzebra-moved-to-github.git]
/
index
/
kinput.c
diff --git
a/index/kinput.c
b/index/kinput.c
index
e1dcc77
..
1e9e9a5
100644
(file)
--- a/
index/kinput.c
+++ b/
index/kinput.c
@@
-1,4
+1,4
@@
-/* $Id: kinput.c,v 1.70 2006-02-20 18:40:23 adam Exp $
+/* $Id: kinput.c,v 1.75 2006-05-17 17:46:45 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-55,7
+55,7
@@
struct key_file {
Res res;
};
Res res;
};
-#if 1
+#if 0
static void pkey(const char *b, int mode)
{
key_logdump_txt(YLOG_LOG, b, mode ? "i" : "d");
static void pkey(const char *b, int mode)
{
key_logdump_txt(YLOG_LOG, b, mode ? "i" : "d");
@@
-311,8
+311,6
@@
struct heap_info *key_heap_init_raw(ZebraHandle zh,
void key_heap_destroy (struct heap_info *hi, int nkeys)
{
int i;
void key_heap_destroy (struct heap_info *hi, int nkeys)
{
int i;
- yaz_log (YLOG_DEBUG, "key_heap_destroy");
- yaz_log (YLOG_DEBUG, "key_heap_destroy nk=%d",nkeys);
if (!hi->raw_reading)
for (i = 0; i<=nkeys; i++)
xfree (hi->info.buf[i]);
if (!hi->raw_reading)
for (i = 0; i<=nkeys; i++)
xfree (hi->info.buf[i]);
@@
-386,8
+384,6
@@
static int heap_read_one_raw(struct heap_info *hi, char *name, char *key)
return 0;
--(zh->reg->ptr_i);
cp=(zh->reg->key_buf)[zh->reg->ptr_top - ptr_i];
return 0;
--(zh->reg->ptr_i);
cp=(zh->reg->key_buf)[zh->reg->ptr_top - ptr_i];
- yaz_log (YLOG_DEBUG, " raw: i=%ld top=%ld cp=%p", (long) ptr_i,
- (long) zh->reg->ptr_top, cp);
strcpy(name, cp);
memcpy(key, cp+strlen(name)+1, KEY_SIZE);
hi->no_iterations++;
strcpy(name, cp);
memcpy(key, cp+strlen(name)+1, KEY_SIZE);
hi->no_iterations++;
@@
-420,7
+416,7
@@
static int heap_read_one (struct heap_info *hi, char *name, char *key)
#define PR_KEY_LOW 0
#define PR_KEY_TOP 0
#define PR_KEY_LOW 0
#define PR_KEY_TOP 0
-#if 1
+#if 0
/* for debugging only */
static void print_dict_item(ZebraHandle zh, const char *s)
{
/* for debugging only */
static void print_dict_item(ZebraHandle zh, const char *s)
{
@@
-435,7
+431,7
@@
static void print_dict_item(ZebraHandle zh, const char *s)
else
{
zebraExplain_lookup_ord (zh->reg->zei,
else
{
zebraExplain_lookup_ord (zh->reg->zei,
- ord, &index_type, &db, 0, 0);
+ ord, &index_type, &db, 0, 0, 0);
zebra_term_untrans(zh, index_type, dst, s + len);
zebra_term_untrans(zh, index_type, dst, s + len);
@@
-607,7
+603,7
@@
int heap_inpc (struct heap_cread_info *hci, struct heap_info *hi)
char *dict_info;
strcpy (this_name, hci->cur_name);
char *dict_info;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
if ((dict_info = dict_lookup (hi->reg->dict, hci->cur_name)))
{
hi->no_diffs++;
if ((dict_info = dict_lookup (hi->reg->dict, hci->cur_name)))
{
@@
-652,7
+648,7
@@
int heap_inp0(struct heap_cread_info *hci, struct heap_info *hi)
int mode;
strcpy (this_name, hci->cur_name);
int mode;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
while (heap_cread_item2(hci, &dst, &mode))
hi->no_diffs++;
while (heap_cread_item2(hci, &dst, &mode))
@@
-676,7
+672,7
@@
int heap_inpb(struct heap_cread_info *hci, struct heap_info *hi)
char *dict_info;
strcpy (this_name, hci->cur_name);
char *dict_info;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
#if 0
hi->no_diffs++;
#if 0
@@
-730,7
+726,7
@@
int heap_inps (struct heap_cread_info *hci, struct heap_info *hi)
char *dict_info;
strcpy (this_name, hci->cur_name);
char *dict_info;
strcpy (this_name, hci->cur_name);
- assert (hci->cur_name[1]);
+ assert (hci->cur_name[0]);
hi->no_diffs++;
if (!(dict_info = dict_lookup (hi->reg->dict, hci->cur_name)))
{
hi->no_diffs++;
if (!(dict_info = dict_lookup (hi->reg->dict, hci->cur_name)))
{
@@
-889,3
+885,11
@@
void zebra_index_merge (ZebraHandle zh)
key_heap_destroy (hi, nkeys);
}
key_heap_destroy (hi, nkeys);
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+