1 /* $Id: snippet.h,v 1.9 2007-08-21 11:06:46 adam Exp $
2 Copyright (C) 1995-2007
5 This file is part of the Zebra server.
7 Zebra is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef IDZEBRA_SNIPPET_H
24 #define IDZEBRA_SNIPPET_H
26 #include <idzebra/util.h>
30 struct zebra_snippet_word {
37 struct zebra_snippet_word *next;
38 struct zebra_snippet_word *prev;
41 typedef struct zebra_snippets zebra_snippets;
42 typedef struct zebra_snippet_word zebra_snippet_word;
45 zebra_snippets *zebra_snippets_create(void);
48 void zebra_snippets_destroy(zebra_snippets *l);
51 void zebra_snippets_append(zebra_snippets *l,
52 zint seqno, int ws, int ord, const char *term);
55 void zebra_snippets_appendn(zebra_snippets *l,
56 zint seqno, int ws, int ord,
57 const char *term, size_t term_len);
60 void zebra_snippets_append_match(zebra_snippets *l,
61 zint seqno, int ws, int ord,
62 const char *term, size_t term_len,
66 zebra_snippet_word *zebra_snippets_list(zebra_snippets *l);
69 const zebra_snippet_word *zebra_snippets_constlist(const zebra_snippets *l);
72 void zebra_snippets_log(const zebra_snippets *l, int log_level, int all);
75 zebra_snippets *zebra_snippets_window(const zebra_snippets *doc,
76 const zebra_snippets *hit,
80 void zebra_snippets_ring(zebra_snippets *doc, const zebra_snippets *hit,
81 int before, int after);
90 * indent-tabs-mode: nil
92 * vim: shiftwidth=4 tabstop=8 expandtab