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
+2 -2
View File
@@ -270,7 +270,7 @@ menu_remove_item(Menu *menu, MenuItem *item)
item2 != NULL;
item2 = LL_GetNext(menu->data.menu.contents), i++) {
if (item == item2) {
LL_DeleteNode(menu->data.menu.contents);
LL_DeleteNode(menu->data.menu.contents, NEXT);
if (menu->data.menu.selector_pos >= i) {
menu->data.menu.selector_pos--;
if (menu->data.menu.scroll > 0)
@@ -295,7 +295,7 @@ menu_destroy_all_items(Menu *menu)
for (item = menu_getfirst_item(menu); item != NULL; item = menu_getfirst_item(menu)) {
menuitem_destroy(item);
LL_Remove(menu->data.menu.contents, item);
LL_Remove(menu->data.menu.contents, item, NEXT);
}
}