-/* $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) 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>
#include <yaz/log.h>
+#include <yaz/wrbuf.h>
#include <idzebra/snippet.h>
struct zebra_snippets {
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);
}
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab