-/* $Id: zrpn.c,v 1.206 2005-11-02 11:43:26 adam Exp $
+/* $Id: zrpn.c,v 1.210 2006-03-30 09:52:16 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
{
const char *cp = zebra_maps_output(zh->reg->zebra_maps,
reg_type, &src);
- if (!cp && len < IT_MAX_WORD-1)
- dst[len++] = *src++;
+ if (!cp)
+ {
+ if (len < IT_MAX_WORD-1)
+ dst[len++] = *src;
+ src++;
+ }
else
while (*cp && len < IT_MAX_WORD-1)
dst[len++] = *cp++;
zebra_term_untrans (p->zh, p->reg_type, term_tmp, name+len+1);
yaz_log(log_level_rpn, "grep: %d %c %s", ord, name[len], term_tmp);
zebraExplain_lookup_ord (p->zh->reg->zei,
- ord, 0 /* index_type */, &db, &set, &use);
+ ord, 0 /* index_type */, &db, &set, &use, 0);
yaz_log(log_level_rpn, "grep: set=%d use=%d db=%s", set, use, db);
resultSetAddTerm(p->zh, p->termset, name[len], db,
attr_init(&term_ref_id_attr, zapt, 10);
term_ref_id_int = attr_find_ex(&term_ref_id_attr, NULL, term_ref_id_str);
- if (term_ref_id_int != -1)
+ if (term_ref_id_int >= 0)
{
char *res = nmem_malloc(nmem, 20);
sprintf(res, "%d", term_ref_id_int);
attr_ok = 1;
term_dict[prefix_len++] = ')';
-#if REG_TYPE_PREFIX
- term_dict[prefix_len++] = 1;
- term_dict[prefix_len++] = reg_type;
- yaz_log(log_level_rpn, "reg_type = %d", term_dict[prefix_len-1]);
-#endif
term_dict[prefix_len] = '\0';
j = prefix_len;
switch (truncation_value)
}
bases_ok++;
term_dict[prefix_len++] = ')';
-#if REG_TYPE_PREFIX
- term_dict[prefix_len++] = 1;
- term_dict[prefix_len++] = reg_type;
- yaz_log(YLOG_DEBUG, "reg_type = %d", term_dict[prefix_len-1]);
-#endif
term_dict[prefix_len] = '\0';
if (!numeric_relation(zh, zapt, &termp, term_dict,
attributeSet, grep_info, &max_pos, reg_type,
term_dict[prefix_len++] = ord_buf[i];
}
term_dict[prefix_len++] = ')';
-#if REG_TYPE_PREFIX
- term_dict[prefix_len++] = 1;
- term_dict[prefix_len++] = reg_type;
-#endif
strcpy(term_dict+prefix_len, term);
grep_info.isam_p_indx = 0;
scan_info->list[j].term = NULL;
prefix_len += key_SU_encode (ords[i], termz + prefix_len);
-#if REG_TYPE_PREFIX
- termz[prefix_len++] = reg_id;
-#endif
termz[prefix_len] = 0;
strcpy(scan_info->prefix, termz);