summaryrefslogtreecommitdiffhomepage
path: root/mixguile/mixguile_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixguile/mixguile_main.c')
-rw-r--r--mixguile/mixguile_main.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/mixguile/mixguile_main.c b/mixguile/mixguile_main.c
index de9bfa4..183dfaf 100644
--- a/mixguile/mixguile_main.c
+++ b/mixguile/mixguile_main.c
@@ -25,20 +25,19 @@
#include <stdio.h>
#include "mixguile.h"
-static void
-inner_main_ (int argc, char *argv[])
-{
- mix_vm_cmd_dispatcher_t *dis = mix_vm_cmd_dispatcher_new (stdout, stderr);
- mixguile_set_cmd_dispatcher (dis);
- mixguile_enter_repl (argc, argv);
-}
-
int
main (int argc, char *argv[])
{
- mixguile_init (argc, argv, inner_main_);
- return EXIT_SUCCESS; /* never reached */
-}
-
+ const gchar *CONFIG_FILE = "mixvm.config";
+ mix_config_t *config;
+ mix_vm_cmd_dispatcher_t *dis;
+
+
+ mix_init_lib ();
+ config = mix_config_new (NULL, CONFIG_FILE);
+ dis = mix_vm_cmd_dispatcher_new_with_config (stdout, stderr, config);
+ mixguile_init (argc, argv, mixguile_enter_repl, dis);
+ return EXIT_SUCCESS; /* never reached */
+}