ze-filter  (ze-filter-0.8.0-develop-180218)
zeLinkedList.h
Go to the documentation of this file.
1 /*
2  *
3  * ze-filter - Mail Server Filter for sendmail
4  *
5  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
6  *
7  * Auteur : Jose Marcio Martins da Cruz
8  * jose.marcio.mc@gmail.org
9  *
10  * Historique :
11  * Creation : janvier 2002
12  *
13  * This program is free software, but with restricted license :
14  *
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * More details about ze-filter license can be found at ze-filter
21  * web site : http://foss.jose-marcio.org
22  */
23 
24 
25 #ifndef __ZE_LINKEDLIST_H
26 
32 typedef struct LISTR_T LISTR_T;
33 
34 struct LISTR_T
35 {
38  char *key;
39  void *data;
40  size_t size;
41  int count;
42 };
43 
44 typedef void (*LISTCLEAR_F) (void *);
45 
46 LISTR_T *zeLinkedList_Add(LISTR_T *, char *, int, void *, size_t);
47 LISTR_T *zeLinkedList_Set(LISTR_T *, char *, int, void *, size_t);
48 bool zeLinkedList_Remove(LISTR_T *, char *, LISTCLEAR_F);
51 
52 int zeLinkedList_CountSet(LISTR_T *, char *, int);
53 int zeLinkedList_CountGet(LISTR_T *, char *);
54 int zeLinkedList_CountInc(LISTR_T *, char *);
55 
58 #define __ZE_LINKEDLIST_H
59 #endif
LISTR_T * prev
Definition: zeLinkedList.h:36
LISTR_T * zeLinkedList_Add(LISTR_T *, char *, int, void *, size_t)
Definition: zeLinkedList.c:34
int zeLinkedList_CountInc(LISTR_T *, char *)
Definition: zeLinkedList.c:256
bool zeLinkedList_Clear(LISTR_T *, LISTCLEAR_F)
Definition: zeLinkedList.c:195
void(* LISTCLEAR_F)(void *)
Definition: zeLinkedList.h:44
int count
Definition: zeLinkedList.h:41
char * key
Definition: zeLinkedList.h:38
int zeLinkedList_CountSet(LISTR_T *, char *, int)
Definition: zeLinkedList.c:219
bool zeLinkedList_Remove(LISTR_T *, char *, LISTCLEAR_F)
Definition: zeLinkedList.c:135
LISTR_T * zeLinkedList_Set(LISTR_T *, char *, int, void *, size_t)
Definition: zeLinkedList.c:94
LISTR_T * next
Definition: zeLinkedList.h:37
LISTR_T * zeLinkedList_Find(LISTR_T *, char *)
Definition: zeLinkedList.c:172
void * data
Definition: zeLinkedList.h:39
size_t size
Definition: zeLinkedList.h:40
int zeLinkedList_CountGet(LISTR_T *, char *)
Definition: zeLinkedList.c:239