[elinks-users] LIST_HEAD and *prev *next
Kalle Olavi Niemitalo
kon at iki.fi
Tue May 1 01:05:25 MDT 2007
Yan Seiner <yan at seiner.com> writes:
> Could someone please clue me in on how to use *prev and *next pointers
> for struct form_control?
It's a cyclic list and the sentinel is just a struct list_head
rather than a full struct form_control. Compare the pointer to
&form->items, or preferably use the macros in src/util/lists.h.
Please note bug 189 will require changing the representation of
lists in a future version.
> On another topic, I've commented out the find_form_state and subsequent
> free. I haven't been able to find a 'free_form_state' type of
> function. Could someone please clue me in on how to free the structure
> allocated with find_form_state?
find_form_state extends the array to which view_state.form_info
points, and destroy_vs eventually frees the whole array. Do you
have a specific reason to destroy the form_state before that?
Because you're hacking the C code, it might be better to take
this discussion to elinks-dev.
More information about the elinks-users
mailing list