/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 Index Data
+ Copyright (C) 1994-2011 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stddef.h>
#include <string.h>
#include <yaz/nmem.h>
if (all || w->mark)
yaz_log(log_level, "term='%s'%s mark=%d seqno=" ZINT_FORMAT " ord=%d",
- wrbuf_cstr(wr_term),
+ wrbuf_cstr(wr_term),
(w->match && !w->ws ? "*" : ""), w->mark,
w->seqno, w->ord);
wrbuf_destroy(wr_term);
hit_w = hit_w->next)
{
if (hit_w->ord == ord && hit_w->seqno == doc_w->seqno)
-
+
{
match = 1;
break;
}
zebra_snippets_append_match(result, doc_w->seqno,
doc_w->ws,
- ord, doc_w->term,
+ ord, doc_w->term,
strlen(doc_w->term), match);
}
}
doc_w->mark = 1;
break;
}
-
+
}
/* mark following terms */
if (doc_w)
zebra_snippet_word *w = doc_w->next;
while (w)
if (w->ord == ord
- && hit_w->seqno - before < w->seqno
+ && hit_w->seqno - before < w->seqno
&& hit_w->seqno + after > w->seqno)
{
w->mark = 1;
zebra_snippet_word *w = doc_w->prev;
while (w)
if (w->ord == ord
- && hit_w->seqno - before < w->seqno
+ && hit_w->seqno - before < w->seqno
&& hit_w->seqno + after > w->seqno)
{
w->mark = 1;
}
}
-
+
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab