summaryrefslogtreecommitdiff
path: root/src/klist.h
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-10-07 00:36:34 +0200
committerjcid <devnull@localhost>2007-10-07 00:36:34 +0200
commit93715c46a99c96d6c866968312691ec9ab0f6a03 (patch)
tree573f19ec6aa740844f53a7c0eb7114f04096bf64 /src/klist.h
Initial revision
Diffstat (limited to 'src/klist.h')
-rw-r--r--src/klist.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/klist.h b/src/klist.h
new file mode 100644
index 00000000..53b2bc31
--- /dev/null
+++ b/src/klist.h
@@ -0,0 +1,40 @@
+#ifndef __KLIST_H__
+#define __KLIST_H__
+
+#include "../dlib/dlib.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef struct _KlistNode KlistNode_t;
+typedef struct _Klist Klist_t;
+
+struct _KlistNode {
+ int Key; /* primary key */
+ void *Data; /* data reference */
+};
+
+struct _Klist {
+ Dlist *List;
+ int Clean; /* check flag */
+ int Counter; /* counter (for making keys) */
+};
+
+
+/*
+ * Function prototypes
+ */
+void* a_Klist_get_data(Klist_t *Klist, int Key);
+int a_Klist_insert(Klist_t **Klist, void *Data);
+void a_Klist_remove(Klist_t *Klist, int Key);
+int a_Klist_length(Klist_t *Klist);
+void a_Klist_free(Klist_t **Klist);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __KLIST_H__ */