summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-06-10 11:23:24 (GMT)
committer Daniel Silverstone <dsilvers@digital-scurf.org>2017-06-10 11:54:57 (GMT)
commit58d03aeb6fe3519ef12a4cedcc3e47b8daaad9cc (patch)
tree6df979cefa33ce6dbf0eb80117b7b52140eb8b94
parentf357af4250c706c7f9dfaa36198cf918a58446ff (diff)
downloadnetsurf-58d03aeb6fe3519ef12a4cedcc3e47b8daaad9cc.tar.gz
netsurf-58d03aeb6fe3519ef12a4cedcc3e47b8daaad9cc.tar.bz2
Add ability to set options in monkey
-rw-r--r--frontends/monkey/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index be3460d..1bea024 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -208,6 +208,11 @@ static void quit_handler(int argc, char **argv)
monkey_done = true;
}
+static void monkey_options_handle_command(int argc, char **argv)
+{
+ nsoption_commandline(&argc, argv, nsoptions);
+}
+
/**
* Set option defaults for monkey frontend
*
@@ -379,7 +384,12 @@ main(int argc, char **argv)
ret = monkey_register_handler("WINDOW", monkey_window_handle_command);
if (ret != NSERROR_OK) {
- die("window handler fialed to register");
+ die("window handler failed to register");
+ }
+
+ ret = monkey_register_handler("OPTIONS", monkey_options_handle_command);
+ if (ret != NSERROR_OK) {
+ die("options handler failed to register");
}
fprintf(stdout, "GENERIC STARTED\n");