aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kernel/slist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/kernel/slist.h')
-rw-r--r--src/lib/kernel/slist.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/kernel/slist.h b/src/lib/kernel/slist.h
new file mode 100644
index 0000000..07b13c5
--- /dev/null
+++ b/src/lib/kernel/slist.h
@@ -0,0 +1,25 @@
+/* SList -- simple list for students */
+ typedef void * ListElement;
+
+ #ifndef _SList_H
+ #define _SList_H
+
+ struct Node;
+ typedef struct Node *PtrToNode;
+ typedef PtrToNode SList;
+ typedef PtrToNode Position;
+
+ SList MakeEmpty( SList L );
+ int IsEmpty( SList L );
+ int IsLast( Position P, SList L);
+ Position Find( ListElement X, SList L );
+ void Delete( ListElement X, SList L );
+ Position FindPrevious( ListElement X, SList L );
+ void Insert( ListElement X, SList L, Position P );
+ void DeleteList( SList L );
+ Position Header( SList L );
+ Position First( SList L );
+ Position Advance( Position P );
+ ListElement Retrieve( Position P );
+
+ #endif /* _SList_H */