From 3a8dd2b4677a7a85a51b4edc49e058da3e45f5d3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 24 Feb 2009 04:01:53 +0000 Subject: SCI: cleanup svn-id: r38826 --- engines/sci/include/list.h | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) (limited to 'engines/sci/include') 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 { \ -- cgit v1.2.3