From 61a86ec81a14231915b2aeb5706dca13bf897ca2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 22 Aug 2001 00:42:13 +0000 Subject: mixguile: first version --- mixutils/Makefile.am | 13 ++++++++++++- mixutils/mixguile.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 mixutils/mixguile.c (limited to 'mixutils') 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 +#include +#include + +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 */ +} + + + -- cgit v1.2.3