X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=util%2Fsnippet.c;h=0196def67f57867fce34d373fac80d34878e578b;hb=dfecbd92db8f9581ec24f1cd29c48198e1413546;hp=10e69c09bfa173db7c20bda88a11ae627e360b98;hpb=5623222cf968d493c2bc9506c42b8344de60c4e5;p=idzebra-moved-to-github.git diff --git a/util/snippet.c b/util/snippet.c index 10e69c0..0196def 100644 --- a/util/snippet.c +++ b/util/snippet.c @@ -1,8 +1,5 @@ -/* $Id: snippet.c,v 1.14 2007-08-21 13:27:04 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1995-2008 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 @@ -24,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include struct zebra_snippets { @@ -105,10 +103,15 @@ void zebra_snippets_log(const zebra_snippets *l, int log_level, int all) zebra_snippet_word *w; for (w = l->front; w; w = w->next) { + WRBUF wr_term = wrbuf_alloc(); + wrbuf_puts_escaped(wr_term, w->term); + if (all || w->mark) yaz_log(log_level, "term='%s'%s mark=%d seqno=" ZINT_FORMAT " ord=%d", - w->term, (w->match && !w->ws ? "*" : ""), w->mark, + wrbuf_cstr(wr_term), + (w->match && !w->ws ? "*" : ""), w->mark, w->seqno, w->ord); + wrbuf_destroy(wr_term); } }