about summary refs log tree commit diff
path: root/Src/linklist.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/linklist.c')
-rw-r--r--Src/linklist.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/Src/linklist.c b/Src/linklist.c
index e449957da..ff1c84317 100644
--- a/Src/linklist.c
+++ b/Src/linklist.c
@@ -239,7 +239,7 @@ countlinknodes(LinkList list)
 }
 
 /**/
-void
+mod_export void
 rolllist(LinkList l, LinkNode nd)
 {
     l->last->next = l->first;
@@ -251,7 +251,7 @@ rolllist(LinkList l, LinkNode nd)
 }
 
 /**/
-LinkList
+mod_export LinkList
 newsizedlist(int size)
 {
     LinkList list;
@@ -271,3 +271,16 @@ newsizedlist(int size)
 
     return list;
 }
+
+/**/
+mod_export int
+listcontains(LinkList list, void *dat)
+{
+    LinkNode node;
+
+    for (node = firstnode(list); node; incnode(node))
+	if (getdata(node) == dat)
+	    return 1;
+
+    return 0;
+}