diff options
Diffstat (limited to 'framebuffer')
-rw-r--r-- | framebuffer/Makefile.target | 4 | ||||
-rw-r--r-- | framebuffer/gui.c | 27 |
2 files changed, 18 insertions, 13 deletions
diff --git a/framebuffer/Makefile.target b/framebuffer/Makefile.target index 3ca054069..2a41f4128 100644 --- a/framebuffer/Makefile.target +++ b/framebuffer/Makefile.target @@ -17,6 +17,8 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE NETSURF_FEATURE_HUBBUB_CFLAGS := -DWITH_HUBBUB NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF +NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0 +NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0 CFLAGS += -Dnsframebuffer @@ -39,6 +41,8 @@ CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"' $(eval $(call pkg_config_find_and_add,ROSPRITE,librosprite,Sprite)) $(eval $(call pkg_config_find_and_add,BMP,libnsbmp,BMP)) $(eval $(call pkg_config_find_and_add,GIF,libnsgif,GIF)) +$(eval $(call pkg_config_find_and_add,MOZJS,mozjs185,JavaScript)) +$(eval $(call pkg_config_find_and_add,JS,mozilla-js,JavaScript)) CFLAGS += -std=c99 -g -I. -Dsmall $(WARNFLAGS) \ -D_BSD_SOURCE \ diff --git a/framebuffer/gui.c b/framebuffer/gui.c index b8bb5cede..0f3f7b921 100644 --- a/framebuffer/gui.c +++ b/framebuffer/gui.c @@ -476,26 +476,27 @@ process_cmdline(int argc, char** argv) return true; } +/* Documented in desktop/options.h */ +void gui_options_init_defaults(void) +{ + /* Set defaults for absent option strings */ + nsoption_setnull_charp(cookie_file, strdup("~/.netsurf/Cookies")); + nsoption_setnull_charp(cookie_jar, strdup("~/.netsurf/Cookies")); + + if (nsoption_charp(cookie_file) == NULL || + nsoption_charp(cookie_jar == NULL)) { + die("Failed initialising cookie options"); + } +} + static void gui_init(int argc, char** argv) { nsfb_t *nsfb; + /* Override, since we have no support for non-core SELECT menu */ nsoption_set_bool(core_select_menu, true); - if (nsoption_charp(cookie_file) == NULL) { - nsoption_set_charp(cookie_file, strdup("~/.netsurf/Cookies")); - LOG(("Using '%s' as Cookies file", nsoption_charp(cookie_file))); - } - - if (nsoption_charp(cookie_jar) == NULL) { - nsoption_set_charp(cookie_jar, strdup("~/.netsurf/Cookies")); - LOG(("Using '%s' as Cookie Jar file", nsoption_charp(cookie_jar))); - } - - if (nsoption_charp(cookie_file) == NULL || nsoption_charp(cookie_jar == NULL)) - die("Failed initialising cookie options"); - if (process_cmdline(argc,argv) != true) die("unable to process command line.\n"); |