From 8b36ae6c004286e5911706a4b02c6a2a5fedf2bf Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 3 Sep 2003 01:27:57 +0000 Subject: [PATCH] bunch of bug fixes. rather important part of the bot fixes (oops:) --- ruamoko/lib/List.r | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ruamoko/lib/List.r b/ruamoko/lib/List.r index 71e76cb09..528e2dab0 100644 --- a/ruamoko/lib/List.r +++ b/ruamoko/lib/List.r @@ -63,6 +63,7 @@ typedef struct list_bucket_s list_bucket_t; if (head) head.prev = &e.next; head = e; + count++; } -(void) addItemAtTail: (id) item @@ -73,6 +74,7 @@ typedef struct list_bucket_s list_bucket_t; e.prev = tail; tail[0] = e; tail = &e.next; + count++; } - (id) removeItem: (id) item @@ -85,6 +87,7 @@ typedef struct list_bucket_s list_bucket_t; if (e.next) e.next.prev = e.prev; obj_free (e); + count--; return item; } } @@ -103,7 +106,10 @@ typedef struct list_bucket_s list_bucket_t; e.prev[0] = e.next; if (e.next) e.next.prev = e.prev; + if (tail == &e.next) + tail = e.prev; obj_free (e); + count--; return obj; } @@ -120,6 +126,7 @@ typedef struct list_bucket_s list_bucket_t; if (e.next) e.next.prev = e.prev; obj_free (e); + count--; return obj; }