Lely core libraries
2.3.4
dllist.c
Go to the documentation of this file.
1
24
#include "
util.h
"
25
#define LELY_UTIL_DLLIST_INLINE extern inline
26
#include <
lely/util/dllist.h
>
27
28
#include <assert.h>
29
30
int
31
dllist_contains
(
const
struct
dllist
*list,
const
struct
dlnode
*node)
32
{
33
assert(list);
34
35
if
(!node)
36
return
0;
37
38
dllist_foreach
(list, node_) {
39
if
(node_ == node)
40
return
1;
41
}
42
43
return
0;
44
}
dllist.h
dllist
A doubly-linked list.
Definition:
dllist.h:54
dllist_foreach
#define dllist_foreach(list, node)
Iterates in order over each node in a doubly-linked list.
Definition:
dllist.h:232
util.h
dllist_contains
int dllist_contains(const struct dllist *list, const struct dlnode *node)
Checks if a node is part of a doubly-linked list.
Definition:
dllist.c:31
dlnode
A node in a doubly-linked list.
Definition:
dllist.h:40
src
util
dllist.c
Generated by
1.8.17