extend deletion functions in LL.c, use them to make "bye" client command work

This commit is contained in:
marschap
2008-11-30 15:30:28 +00:00
parent a197581bd3
commit dcc643ec18
13 changed files with 79 additions and 51 deletions
+4 -3
View File
@@ -85,13 +85,13 @@ screenlist_remove(Screen *s)
screenlist_goto_next();
if (s == current_screen) {
/* Hmm, no other screen had same priority */
void *res = LL_Remove(screenlist, s);
void *res = LL_Remove(screenlist, s, NEXT);
/* And now once more */
screenlist_goto_next();
return (res == NULL) ? -1 : 0;
}
}
return (LL_Remove(screenlist, s) == NULL) ? -1 : 0;
return (LL_Remove(screenlist, s, NEXT) == NULL) ? -1 : 0;
}
@@ -221,7 +221,8 @@ screenlist_goto_next(void)
return -1;
/* Find current screen in screenlist */
for (s = LL_GetFirst(screenlist); s && s != current_screen; s = LL_GetNext(screenlist));
for (s = LL_GetFirst(screenlist); s && s != current_screen; s = LL_GetNext(screenlist))
;
/* One step forward */
s = LL_GetNext(screenlist);