aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
authorMax Horn2009-02-24 04:01:53 +0000
committerMax Horn2009-02-24 04:01:53 +0000
commit3a8dd2b4677a7a85a51b4edc49e058da3e45f5d3 (patch)
treec1e61f9f25dec9bcd9ca0bde8e3e6cf23fc162b9 /engines/sci/include
parent62126681f31e51edb4764214044232c29b09a1f2 (diff)
downloadscummvm-rg350-3a8dd2b4677a7a85a51b4edc49e058da3e45f5d3.tar.gz
scummvm-rg350-3a8dd2b4677a7a85a51b4edc49e058da3e45f5d3.tar.bz2
scummvm-rg350-3a8dd2b4677a7a85a51b4edc49e058da3e45f5d3.zip
SCI: cleanup
svn-id: r38826
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/list.h35
1 files changed, 7 insertions, 28 deletions
diff --git a/engines/sci/include/list.h b/engines/sci/include/list.h
index cc7c2530ed..7aa69c3d89 100644
--- a/engines/sci/include/list.h
+++ b/engines/sci/include/list.h
@@ -66,35 +66,17 @@ namespace Sci {
/* List definitions. */
#define LIST_HEAD(name, type) \
struct name { \
- struct type *lh_first; /* first element */ \
+ type *lh_first; /* first element */ \
}
-#define LIST_HEAD_INITIALIZER(head) \
- { NULL }
-
#define LIST_ENTRY(type) \
struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
+ type *le_next; /* next element */ \
+ type **le_prev; /* address of previous next element */ \
}
#define LIST_INIT(head) do { \
- (head)->lh_first = NULL; \
-} while (0)
-
-#define LIST_INSERT_AFTER(listelm, elm, field) do { \
- if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
- (listelm)->field.le_next->field.le_prev = \
- &(elm)->field.le_next; \
- (listelm)->field.le_next = (elm); \
- (elm)->field.le_prev = &(listelm)->field.le_next; \
-} while (0)
-
-#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.le_prev = (listelm)->field.le_prev; \
- (elm)->field.le_next = (listelm); \
- *(listelm)->field.le_prev = (elm); \
- (listelm)->field.le_prev = &(elm)->field.le_next; \
+ (head).lh_first = NULL; \
} while (0)
#define LIST_INSERT_HEAD(head, elm, field) do { \
@@ -125,16 +107,13 @@ struct { \
#define CLIST_HEAD(name, type) \
struct name { \
- struct type *clh_first; /* first element. */ \
+ type *clh_first; /* first element. */ \
}
-#define CLIST_HEAD_INITIALIZER(head) \
- { NULL }
-
#define CLIST_ENTRY(type) \
struct { \
- struct type *cle_next; /* next element. */ \
- struct type *cle_prev; /* previous element */ \
+ type *cle_next; /* next element. */ \
+ type *cle_prev; /* previous element */ \
}
#define CLIST_INIT(head) do { \