summaryrefslogtreecommitdiffabout
path: root/libical/src/libical/pvl.h
Unidiff
Diffstat (limited to 'libical/src/libical/pvl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libical/pvl.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/libical/src/libical/pvl.h b/libical/src/libical/pvl.h
index 14a15a1..92ec546 100644
--- a/libical/src/libical/pvl.h
+++ b/libical/src/libical/pvl.h
@@ -7,35 +7,35 @@
7======================================================================*/ 7======================================================================*/
8 8
9 9
10#ifndef __PVL_H__ 10#ifndef __PVL_H__
11#define __PVL_H__ 11#define __PVL_H__
12 12
13typedef void* pvl_list; 13typedef struct pvl_list_t* pvl_list;
14typedef void* pvl_elem; 14typedef struct pvl_elem_t* pvl_elem;
15 15
16/* 16/**
17 struct pvl_elem_t 17 * This type is private. Always use pvl_elem instead. The struct would
18 * not even appear in this header except to make code in the USE_MACROS
19 * blocks work
20 */
18 21
19 This type is private. Always use pvl_elem instead. The struct would
20 not even appear in this header except to make code in the USE_MACROS
21 blocks work
22
23 */
24typedef struct pvl_elem_t 22typedef struct pvl_elem_t
25{ 23{
26 int MAGIC; /* Magic Identifier */ 24 int MAGIC; /**< Magic Identifier */
27 void *d; /* Pointer to data user is storing */ 25 void *d; /**< Pointer to data user is storing */
28 struct pvl_elem_t *next;/* Next element */ 26 struct pvl_elem_t *next;/**< Next element */
29 struct pvl_elem_t *prior;/* prior element */ 27 struct pvl_elem_t *prior;/**< Prior element */
30} pvl_elem_t; 28} pvl_elem_t;
31 29
32 30
33 31
34/* This global is incremented for each call to pvl_new_element(); it gives each 32/**
35 * list a unique identifer */ 33 * This global is incremented for each call to pvl_new_element(); it gives each
34 * list a unique identifer
35 */
36 36
37extern int pvl_elem_count; 37extern int pvl_elem_count;
38extern int pvl_list_count; 38extern int pvl_list_count;
39 39
40/* Create new lists or elements */ 40/* Create new lists or elements */
41pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior); 41pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior);
@@ -78,14 +78,17 @@ void* pvl_data(pvl_elem);
78 78
79/* Find an element for which a function returns true */ 79/* Find an element for which a function returns true */
80typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/ 80typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/
81pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v); 81pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v);
82pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v); 82pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v);
83 83
84/* Pass each element in the list to a function */ 84/**
85typedef void (*pvl_applyf)(void* a, void* b); /*a is list elem, b is other data*/ 85 * Pass each element in the list to a function
86 * a is list elem, b is other data
87 */
88typedef void (*pvl_applyf)(void* a, void* b);
86void pvl_apply(pvl_list l,pvl_applyf f, void *v); 89void pvl_apply(pvl_list l,pvl_applyf f, void *v);
87 90
88 91
89#endif /* __PVL_H__ */ 92#endif /* __PVL_H__ */
90 93
91 94