diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-11 08:26:59 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-11 08:26:59 +0000 |
commit | 7d482d33bfc0c3eb497a28158eb5ea1ca4ff5082 (patch) | |
tree | 7faafaebda5917aa123d537bbbf28d0e5283d65b | |
parent | 6aa30c0bb3388061c2c7cd24045243fb7a1acd2e (diff) | |
download | netsurf-7d482d33bfc0c3eb497a28158eb5ea1ca4ff5082.tar.gz netsurf-7d482d33bfc0c3eb497a28158eb5ea1ca4ff5082.tar.bz2 |
Initialise and finalise hubbub correctly on RISC OS.
svn path=/trunk/netsurf/; revision=5021
-rw-r--r-- | riscos/gui.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index f68b836a6..3f7a60527 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -33,6 +33,9 @@ #include <unixlib/sigstate.h> #include <unixlib/local.h> #include <curl/curl.h> +#ifdef WITH_HUBBUB +#include <hubbub/hubbub.h> +#endif #include "oslib/font.h" #include "oslib/help.h" #include "oslib/hourglass.h" @@ -275,6 +278,12 @@ static void ro_msg_save_desktop(wimp_message *message); static void ro_msg_window_info(wimp_message *message); static void ro_gui_view_source_bounce(wimp_message *message); +#ifdef WITH_HUBBUB +static void *myrealloc(void *ptr, size_t len, void *pw) +{ + return realloc(ptr, len); +} +#endif /** * Initialise the gui (RISC OS specific part). @@ -315,6 +324,12 @@ void gui_init(int argc, char** argv) ro_plot_patterned_lines = false; } +#ifdef WITH_HUBBUB + if (hubbub_initialise("NetSurf:Resources.Aliases", myrealloc, NULL) != + HUBBUB_OK) + die("Failed to initialise HTML parsing library."); +#endif + /* Read in the options */ options_read("NetSurf:Choices"); @@ -772,6 +787,10 @@ void gui_quit(void) xwimp_close_down(task_handle); free(default_stylesheet_url); free(adblock_stylesheet_url); +#ifdef WITH_HUBBUB + /* We don't care if this fails */ + hubbub_finalise(myrealloc, NULL); +#endif xhourglass_off(); } |