* dlg.h: Remove "last" field from Dlg_head, it's unneeded in a

circularly linked list.
This commit is contained in:
Pavel Roskin 2003-09-11 00:13:36 +00:00
parent 9ddc1c9cbc
commit 4d797a9f72
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2003-09-10 Pavel Roskin <proski@gnu.org>
* dlg.h: Remove "last" field from Dlg_head, it's unneeded in a
circularly linked list.
* screen.c (paint_dir): Don't make panel clean here.
(panel_update_contents): Do it here.
(panel_callback): Repaint the panel on focus.

View File

@ -257,8 +257,7 @@ int add_widget (Dlg_head *where, void *what)
where->current->next = where->current;
where->first = where->current;
where->current->prev = where->first;
where->last = where->current;
where->first->next = where->last;
where->first->next = where->current;
}
} else {
back = where->current;
@ -272,8 +271,7 @@ int add_widget (Dlg_head *where, void *what)
}
where->current->prev = where->first;
where->last = where->current;
where->first->next = where->last;
where->first->next = where->current;
}
where->current->dlg_id = where->count;

View File

@ -85,7 +85,7 @@ typedef struct Dlg_head {
/* Internal variables */
int count; /* number of widgets */
struct Widget_Item *current, *first, *last;
struct Widget_Item *current, *first;
dlg_cb_fn callback;
struct Widget_Item *initfocus;
void *previous_dialog; /* Pointer to the previously running Dlg_head */