summaryrefslogtreecommitdiffhomepage
path: root/mixutils
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-08-22 00:42:13 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-08-22 00:42:13 +0000
commit61a86ec81a14231915b2aeb5706dca13bf897ca2 (patch)
treeede5022a57a1bb57a576f9845ee48a6c18012eee /mixutils
parent24a852d8a28cd404d3afd43786cfef012a03d6f3 (diff)
downloadmdk-61a86ec81a14231915b2aeb5706dca13bf897ca2.tar.gz
mdk-61a86ec81a14231915b2aeb5706dca13bf897ca2.tar.bz2
mixguile: first version
Diffstat (limited to 'mixutils')
-rw-r--r--mixutils/Makefile.am13
-rw-r--r--mixutils/mixguile.c44
2 files changed, 56 insertions, 1 deletions
diff --git a/mixutils/Makefile.am b/mixutils/Makefile.am
index 317fbdc..7e1313d 100644
--- a/mixutils/Makefile.am
+++ b/mixutils/Makefile.am
@@ -12,8 +12,19 @@
INCLUDES = -I$(includedir)
LDADD = $(top_builddir)/mixlib/libmix.a $(top_builddir)/lib/libreplace.a \
- $(INTLLIBS)
+ $(top_builddir)/mixguile/libmixguile.a $(INTLLIBS)
+
+if MAKE_GUILE
+
+bin_PROGRAMS = mixasm mixvm mixguile
+mixguile_SOURCES = mixguile.c
+
+else
bin_PROGRAMS = mixasm mixvm
+
+endif
+
mixasm_SOURCES = mixasm.c mixasm_comp.h mixasm_comp.c
mixvm_SOURCES = mixvm.c mixvm_loop.c mixvm_command.h mixvm_command.c
+
diff --git a/mixutils/mixguile.c b/mixutils/mixguile.c
new file mode 100644
index 0000000..46a35f1
--- /dev/null
+++ b/mixutils/mixguile.c
@@ -0,0 +1,44 @@
+/* -*-c-*- -------------- mixguile.c :
+ * Main function for mixguile, the MIX Guile shell
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "01/08/22 01:20:01 jao"
+ * ------------------------------------------------------------------
+ * Copyright (C) 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <mixguile/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 */
+}
+
+
+