From e71691bae890040b83cfd54a2d9a1097d5026866 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 6 May 2011 20:40:09 +0000 Subject: Merge branches/jmb/content-factory to trunk svn path=/trunk/netsurf/; revision=12283 --- desktop/netsurf.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'desktop/netsurf.c') diff --git a/desktop/netsurf.c b/desktop/netsurf.c index 3707b1c72..9861e7e4a 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -36,12 +36,15 @@ #include "content/hlcache.h" #include "content/urldb.h" #include "css/css.h" +#include "image/image.h" #include "desktop/netsurf.h" #include "desktop/401login.h" #include "desktop/browser.h" #include "desktop/gui.h" #include "desktop/options.h" #include "desktop/searchweb.h" +#include "render/html.h" +#include "render/textplain.h" #include "utils/log.h" #include "utils/url.h" #include "utils/utf8.h" @@ -94,6 +97,7 @@ nserror netsurf_init(int *pargc, const char *options, const char *messages) { + nserror error; struct utsname utsname; nserror ret = NSERROR_OK; @@ -134,6 +138,22 @@ nserror netsurf_init(int *pargc, messages_load(messages); + error = css_init(); + if (error != NSERROR_OK) + return error; + + error = html_init(); + if (error != NSERROR_OK) + return error; + + error = image_init(); + if (error != NSERROR_OK) + return error; + + error = textplain_init(); + if (error != NSERROR_OK) + return error; + url_init(); setlocale(LC_ALL, "C"); @@ -176,9 +196,6 @@ void netsurf_exit(void) LOG(("Closing GUI")); gui_quit(); - /* Clean up after CSS */ - css_cleanup(); - LOG(("Closing search and related resources")); search_web_cleanup(); @@ -191,6 +208,12 @@ void netsurf_exit(void) LOG(("Closing fetches")); fetch_quit(); + /* Clean up after content handlers */ + textplain_fini(); + image_fini(); + html_fini(); + css_fini(); + LOG(("Closing utf8")); utf8_finalise(); -- cgit v1.2.3