Previously, it was a pointer to a separately allocated struct attributes,
of which only the LIST_HEAD members were actually used.
All init_list calls now operate on struct list_head.
This change may also reduce memory usage for reading bookmarks.
Also, add the server in the done_handler_T of the "OK" button,
rather than in the widget_handler_T of the "Server name" field
(which check_dialog calls). This change implies that the dialog
is closed even if an error occurs while adding the server, but
that seems to be customary elsewhere in ELinks too.
src/cookies/dialogs.c (set_server): Set up a struct cookie and pass it
to accept_cookie, instead of calling set_cookie which might ask the user
to confirm. (This change also removes a dubious use of struct uri.)
src/cookies/cookies.c (get_cookie_server): No longer static.
src/cookies/cookies.h (get_cookie_server): Declare.
With regular comments in the definition of the structure itself,
and with xgettext:c-format comments in constants of that type,
if xgettext would otherwise guess wrong; so that translators
will know they'll have to double any percent signs they add.
I didn't regenerate PO files, though.
In html_subscript, html_subscript_close, html_superscript, html_quote, and
html_quote_close, use put_chrs instead of html_context->put_chars_f.
Element handlers should use put_chrs so that it can correctly handle
whitespace and stuff.
Instead of saving the old link colours when selecting a link and using that
to restore them when unselecting it, just copy the data from the document.
- Eliminate struct link_bg and the .link_bg and .link_bg_n members
of struct document_view.
- Eliminate the free_link routine and don't call it from draw_doc,
clear_link, or detach_formatted.
- Add a .old_current_link member to struct view_state and initialise it in
init_vs.
- Don't save link_bg in draw_current_link.
- Rewrite clear_link to use the document data instead of link_bg.
- Modify init_link_drawing not to allocate ling_bg and to return a pointer
to a static variable for the template character.
Introduce html_subscript_close callback. Draw opening and closing brackets
and carets for subscript and superscript text directly in the element
handlers rather than performing weirdness in the renderer. This both
improves readability and fixes bug 284, misplaced brackets with subscripts.
Add close callbacks html_html_close, html_style_close, and
html_xmp_close. end_element now calls the element close callback instead
of performing special handling for certain tags.
src/bfu/menu.c (scroll_menu): Let neither menu->selected nor pos
become -2.
src/bfu/menu.c (menu_mouse_handler): Call set_menu_selection directly
rather than via scroll_menu, as sel is already known to be selectable.
(Not required for fixing the bug.)
src/bfu/menu.c (menu_search_handler): Break infinite loops also if
menu->selected is -1 initially.
src/bfu/menu.c (menu_handler): Instead of tweaking menu->selected
directly, let scroll_menu do it.