source: npl/mailserver/dspam/dspam-3.10.2/src/list.h @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/* $Id: list.h,v 1.10 2011/06/28 00:13:48 sbajic Exp $ */
2
3/*
4 DSPAM
5 COPYRIGHT (C) 2002-2012 DSPAM PROJECT
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Affero General Public License as
9 published by the Free Software Foundation, either version 3 of the
10 License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU Affero General Public License for more details.
16
17 You should have received a copy of the GNU Affero General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20*/
21
22#include <stdio.h>
23#include <string.h>
24#ifdef HAVE_UNISTD_H
25#   include <unistd.h>
26#endif
27
28#ifndef _LIST_H
29#define _LIST_H
30
31struct bnr_list_node
32{
33  void *ptr;            /* Token name or pointer */
34  float value;          /* Token value (probability) */
35  int eliminated;       /* Token eliminated == 1 */
36  struct bnr_list_node *next;
37};
38
39struct bnr_list
40{
41  struct bnr_list_node *first;
42  struct bnr_list_node *insert; /* Next insertion point */
43  int items;
44  int nodetype;
45};
46
47struct bnr_list_c
48{
49  struct bnr_list_node *iter_index;
50};
51
52struct bnr_list_node *bnr_list_insert(
53  struct bnr_list *list,
54  void *data, float v);
55struct bnr_list_node *c_bnr_list_first(
56  struct bnr_list *list,
57  struct bnr_list_c *c);
58struct bnr_list_node *c_bnr_list_next(
59  struct bnr_list *list,
60  struct bnr_list_c *c);
61struct bnr_list *       bnr_list_create (int node_type);
62void                    bnr_list_destroy(struct bnr_list *list);
63
64#endif /* _LIST_H */
65
Note: See TracBrowser for help on using the repository browser.