X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Falvis.c;h=b3f533fac7c5e3db335a8961a5f04bc2ced4b161;hb=71f81d5c693d08d8cdc4f371d38c9598b3813243;hp=10c603af118dd304e7dca76e8cad9fc58046e128;hpb=40294b8507793f9447a647bfe2f961d232091456;p=idzebra-moved-to-github.git diff --git a/index/alvis.c b/index/alvis.c index 10c603a..b3f533f 100644 --- a/index/alvis.c +++ b/index/alvis.c @@ -1,4 +1,4 @@ -/* $Id: alvis.c,v 1.18 2007-08-21 07:49:18 adam Exp $ +/* $Id: alvis.c,v 1.20 2007-10-29 16:57:52 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -72,16 +72,6 @@ struct filter_info { static const char *zebra_xslt_ns = ZEBRA_SCHEMA_XSLT_NS; -static void set_param_xml(const char **params, const char *name, - const char *value, ODR odr) -{ - while (*params) - params++; - params[0] = name; - params[1] = value; - params[2] = 0; -} - static void set_param_str(const char **params, const char *name, const char *value, ODR odr) { @@ -398,10 +388,10 @@ static void index_node(struct filter_info *tinfo, struct recExtractCtrl *ctrl, } if (name_str) { - int prev_type = recWord->index_type; /* save default type */ + const char *prev_type = recWord->index_type; /* save default type */ if (type_str && *type_str) - recWord->index_type = *type_str; /* type was given */ + recWord->index_type = (const char *) type_str; /* type was given */ recWord->index_name = name_str; index_cdata(tinfo, ctrl, ptr->children, recWord); @@ -487,7 +477,8 @@ static int extract_doc(struct filter_info *tinfo, struct recExtractCtrl *p, xmlDocDumpMemory(doc, &buf_out, &len_out); if (p->flagShowRecords) fwrite(buf_out, len_out, 1, stdout); - (*p->setStoreData)(p, buf_out, len_out); + if (p->setStoreData) + (*p->setStoreData)(p, buf_out, len_out); xmlFree(buf_out); xmlFreeDoc(doc); @@ -573,7 +564,7 @@ static int filter_extract(void *clientData, struct recExtractCtrl *p) struct filter_info *tinfo = clientData; odr_reset(tinfo->odr); - if (tinfo->split_level == 0) + if (tinfo->split_level == 0 || p->setStoreData == 0) return extract_full(tinfo, p); else return extract_split(tinfo, p);