summaryrefslogtreecommitdiffhomepage
path: root/mixutils
diff options
context:
space:
mode:
Diffstat (limited to 'mixutils')
-rw-r--r--mixutils/mixvm.c17
-rw-r--r--mixutils/mixvm_loop.c7
2 files changed, 18 insertions, 6 deletions
diff --git a/mixutils/mixvm.c b/mixutils/mixvm.c
index aef9493..4014164 100644
--- a/mixutils/mixvm.c
+++ b/mixutils/mixvm.c
@@ -1,7 +1,9 @@
/* -*-c-*- -------------- mixvm.c :
* Main function for mixvm, the mix vm simulator
* ------------------------------------------------------------------
- * Copyright (C) 2000 Free Software Foundation, Inc.
+ * $Id: mixvm.c,v 1.5 2001/09/24 23:27:02 jao Exp $
+ * ------------------------------------------------------------------
+ * Copyright (C) 2000, 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,7 +37,8 @@
#endif /* HAVE_GETOPT_LONG */
extern void
-mix_vmloop (int argc, char *argv[], const gchar *code_file, gboolean use_emacs);
+mix_vmloop (int argc, char *argv[], gboolean initfile,
+ const gchar *code_file, gboolean use_emacs);
extern void
mix_vmrun (const gchar *code_file, gboolean dump);
@@ -47,6 +50,7 @@ enum {
RUN_OPT = 'r',
DUMP_OPT = 'd',
EMACS_OPT = 'e', /* used by mixvm-gud only */
+ NOINIT_OPT = 'q'
};
static const char *options_ = "vhurd"; /* no short opt for --emacs */
@@ -60,11 +64,12 @@ static struct option long_options_[] =
{"dump", no_argument, 0, DUMP_OPT},
/* pek: yo! */
{"emacs", no_argument, 0, EMACS_OPT},
+ {"noinit", no_argument, 0, NOINIT_OPT},
{0, 0, 0, 0}
};
static const gchar *USAGE_ =
-N_("Usage: %s [-vhurd] [--version] [--help] [--usage] [--run] [--dump] [MIX_FILE]\n");
+N_("Usage: %s [-vhurdq] [--version] [--help] [--noinit] [--usage] [--run] [--dump] [MIX_FILE]\n");
int
main (int argc, char **argv)
@@ -75,6 +80,7 @@ main (int argc, char **argv)
gboolean run = FALSE;
gboolean dump = FALSE;
gboolean emacs = FALSE;
+ gboolean initfile = TRUE;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
@@ -112,6 +118,9 @@ main (int argc, char **argv)
case EMACS_OPT:
emacs = TRUE;
break;
+ case NOINIT_OPT:
+ initfile = FALSE;
+ break;
default:
g_assert_not_reached ();
}
@@ -128,7 +137,7 @@ main (int argc, char **argv)
mix_init_lib ();
if (run) mix_vmrun(in, dump);
- else mix_vmloop (argc, argv, in, emacs);
+ else mix_vmloop (argc, argv, initfile, in, emacs);
mix_release_lib ();
diff --git a/mixutils/mixvm_loop.c b/mixutils/mixvm_loop.c
index f88acfb..74ea8f8 100644
--- a/mixutils/mixvm_loop.c
+++ b/mixutils/mixvm_loop.c
@@ -1,6 +1,8 @@
/* -*-c-*- -------------- mixvm_loop.c :
* Implementation of mix vm command loop.
* ------------------------------------------------------------------
+ * $Id: mixvm_loop.c,v 1.7 2001/09/24 23:27:02 jao Exp $
+ * ------------------------------------------------------------------
* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@@ -111,11 +113,12 @@ loop_ (int argc, char *argv[])
}
void
-mix_vmloop (int argc, char *argv[], const gchar *file, gboolean use_emacs)
+mix_vmloop (int argc, char *argv[], gboolean initfile,
+ const gchar *file, gboolean use_emacs)
{
#ifdef MAKE_GUILE
mix_vm_cmd_dispatcher_t *dis = init_mixvm_ (file, use_emacs);
- mixguile_init (argc, argv, loop_, dis);
+ mixguile_init (argc, argv, initfile, loop_, dis);
#else
(void) init_mixvm_ (file, use_emacs);
loop_ (argc, argv);