summaryrefslogtreecommitdiff
path: root/desktop/netsurf.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/netsurf.c')
-rw-r--r--desktop/netsurf.c29
1 files changed, 26 insertions, 3 deletions
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();