aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
authorMax Horn2009-02-24 04:30:41 +0000
committerMax Horn2009-02-24 04:30:41 +0000
commit82e0b2061317204411f338f74649b03b342cf2b8 (patch)
tree3c9292c4c7d30e8fd7c42ca6d36aca794e8be8ab /engines/sci/include
parent3a8dd2b4677a7a85a51b4edc49e058da3e45f5d3 (diff)
downloadscummvm-rg350-82e0b2061317204411f338f74649b03b342cf2b8.tar.gz
scummvm-rg350-82e0b2061317204411f338f74649b03b342cf2b8.tar.bz2
scummvm-rg350-82e0b2061317204411f338f74649b03b342cf2b8.zip
SCI: Turned circular list code into a small class
svn-id: r38827
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/list.h61
1 files changed, 0 insertions, 61 deletions
diff --git a/engines/sci/include/list.h b/engines/sci/include/list.h
index 7aa69c3d89..73a605c74c 100644
--- a/engines/sci/include/list.h
+++ b/engines/sci/include/list.h
@@ -103,67 +103,6 @@ struct { \
#define LIST_FIRST(head) ((head)->lh_first)
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-/* Circular list definitions. */
-
-#define CLIST_HEAD(name, type) \
-struct name { \
- type *clh_first; /* first element. */ \
-}
-
-#define CLIST_ENTRY(type) \
-struct { \
- type *cle_next; /* next element. */ \
- type *cle_prev; /* previous element */ \
-}
-
-#define CLIST_INIT(head) do { \
- (head)->clh_first = NULL; \
-} while (0)
-
-#define CLIST_INSERT_HEAD(head, elm, field) do { \
- if ((head)->clh_first == NULL) \
- (elm)->field.cle_next = (elm)->field.cle_prev = (elm); \
- else { \
- (elm)->field.cle_next = (head)->clh_first; \
- (elm)->field.cle_prev = \
- (head)->clh_first->field.cle_prev; \
- (head)->clh_first->field.cle_prev = (elm); \
- (elm)->field.cle_prev->field.cle_next = (elm); \
- } \
- (head)->clh_first = (elm); \
-} while (0)
-
-#define CLIST_INSERT_AFTER(listelm, elm, field) do { \
- (elm)->field.cle_prev = (listelm); \
- (elm)->field.cle_next = (listelm)->field.cle_next; \
- (listelm)->field.cle_next->field.cle_prev = (elm); \
- (listelm)->field.cle_next = (elm); \
-} while (0)
-
-#define CLIST_REMOVE(head, elm, field) do { \
- if ((elm)->field.cle_next == (elm)) \
- (head)->clh_first = NULL; \
- else { \
- if ((head)->clh_first == (elm)) \
- (head)->clh_first = (elm)->field.cle_next; \
- (elm)->field.cle_prev->field.cle_next = \
- (elm)->field.cle_next; \
- (elm)->field.cle_next->field.cle_prev = \
- (elm)->field.cle_prev; \
- } \
-} while (0)
-
-#define CLIST_FOREACH(var, head, field) \
- for ((var) = (head)->clh_first; \
- (var); \
- (var) = ((var)->field.cle_next == (head)->clh_first ? \
- NULL : (var)->field.cle_next))
-
-/* Circular list access methods. */
-#define CLIST_EMPTY(head) ((head)->clh_first == NULL)
-#define CLIST_FIRST(head) ((head)->clh_first)
-#define CLIST_NEXT(elm, field) ((elm)->field.cle_next)
-#define CLIST_PREV(elm, field) ((elm)->field.cle_prev)
} // End of namespace Sci