From 16b11e7238dea2c74a713b6f601d5f506bdaadcf Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 10 May 2014 10:22:10 +0100 Subject: ensure operations tables are registered as early as possible. --- monkey/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'monkey') diff --git a/monkey/main.c b/monkey/main.c index 53fda7021..fe703f226 100644 --- a/monkey/main.c +++ b/monkey/main.c @@ -118,13 +118,18 @@ main(int argc, char **argv) char *options; char buf[PATH_MAX]; nserror ret; - struct gui_table monkey_gui_table = { + struct netsurf_table monkey_table = { .browser = &monkey_browser_table, .window = monkey_window_table, .download = monkey_download_table, .fetch = monkey_fetch_table, }; + ret = netsurf_register(&monkey_table); + if (ret != NSERROR_OK) { + die("NetSurf operation table failed registration"); + } + /* Unbuffer stdin/out/err */ setbuf(stdin, NULL); setbuf(stdout, NULL); @@ -150,7 +155,7 @@ main(int argc, char **argv) /* common initialisation */ messages = filepath_find(respaths, "Messages"); - ret = netsurf_init(messages, &monkey_gui_table); + ret = netsurf_init(messages); free(messages); if (ret != NSERROR_OK) { die("NetSurf failed to initialise"); -- cgit v1.2.3