Commit 01ebcdb5 authored by Erick Gallesio's avatar Erick Gallesio

* Current-{input,output,error}-port are now thread specific.

* Start the integration of Stephane Épardaud LURC stuff.
parent 2c423af9
2006-04-13 Erick Gallesio <eg@essi.fr>
* src/error.c, src/fport.c, src/gnu-getopt.c, src/hash.c,
* src/port.c, src/process.c, src/stklos.h:
Current-{input,output,error}-port are now thread specific.
* src/stklosconf.h.in, src/thread.c, src/thread.h, src/vm.h,
* lib/Lurc.d: Start the integration of Stephane pardaud LURC stuff.
2006-04-06 Erick Gallesio <eg@essi.fr>
* lib/bonus.stk (parameterize):
* src/lib.c
* src/parameter.c
* src/stklos.h
* src/thread.c
* src/vm.c
* lib/bonus.stk, src/lib.c, src/parameter.c, src/stklos.h,
* src/thread.c, src/vm.c,
* src/vm.h: New implementetaion of parameters. Paramateres can now
be assocaited to a thread. PARAMETERIZE permits to have a thread
specific dynamic environment.
......
......@@ -81,6 +81,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -95,6 +96,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -113,6 +115,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@/STklos
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
This diff is collapsed.
......@@ -2,7 +2,7 @@ dnl configure.in for STklos
dnl
dnl Author: Erick Gallesio [eg@unice.fr]
dnl Creation date: 28-Dec-1999 21:19 (eg)
dnl Last file update: 4-Jan-2006 16:18 (eg)
dnl Last file update: 13-Apr-2006 13:25 (eg)
AC_INIT(src/stklos.c)
......@@ -47,9 +47,66 @@ then
HAVE_DLOPEN="#define HAVE_DLOPEN 1"
fi
dnl Check for pthreads
AC_CHECK_LIB(pthread, pthread_create, LIBS="-lpthread $LIBS")
dnl
dnl To thread or not to thread ?
dnl
AC_ARG_ENABLE(threads,
[AC_HELP_STRING([--enable-threads=TYPE], [choose threading package (none,pthread,lurc)])],
THREADS=$enableval,
THREADS=none)
AC_LANG(C)
dnl This checks for the presence of a given CPP define in a fiven header file
AC_DEFUN(GC_CHECK_DEFINE, [
dnl $1: header file
dnl $2: CPP variable
dnl $3: then
dnl $4: else
AC_PREPROC_IFELSE([
#include <$1>
#ifndef $2
# error "$2 undefined"
#else
ok
#endif
],
[$3], [$4])
])
dnl Now look at what threads we want
case "$THREADS" in
no | none | single)
THREADS=none
AC_DEFINE(THREADS_NONE, [], [No thread support])
;;
posix | pthreads)
dnl Check for pthreads
AC_CHECK_LIB(pthread, pthread_create, LIBS="-lpthread $LIBS",
[AC_MSG_ERROR([Missing PThread library])])
THREADS=pthreads
AC_DEFINE(THREADS_PTHREADS, [], [PThread support])
;;
lurc)
dnl Check for lurc
AC_CHECK_LIB(lurc, lurc_thread_create, LIBS="-llurc $LIBS",
[AC_MSG_ERROR([Missing LURC library])])
AC_CHECK_HEADER([lurc.h], [], [AC_MSG_ERROR([Missing LURC header file])])
dnl Now check if it is compiled with GC support
AC_MSG_CHECKING([for LURC GC support])
GC_CHECK_DEFINE([lurc.h], [LURC_ENABLE_GC],
[AC_MSG_RESULT([ok])],
[AC_MSG_ERROR([Missing GC support in LURC])])
dnl That should be good
AC_DEFINE(THREADS_LURC, [], [LURC threads support])
;;
*)
AC_MSG_ERROR([Unknown thread system: $THREADS])
;;
esac
dnl Automake nightmare
AM_CONDITIONAL(PTHREADS, test "$THREADS" = pthreads)
AM_CONDITIONAL(LURC, test "$THREADS" = lurc)
AM_CONDITIONAL(NO_THREAD, test "$THREADS" = none)
dnl check for GMP pre-version 3.0
AC_CHECK_LIB(gmp, mpz_init_set, HAVE_GMP="yes", HAVE_GMP="no")
......@@ -68,7 +125,13 @@ AC_ARG_WITH(gmp-light,
dnl
dnl check for GC
dnl
AC_CHECK_LIB(gc, GC_malloc, HAVE_GC="yes", HAVE_GC="no", $LIBS)
if test "$THREADS" = lurc
then
AC_MSG_WARN([Using the bundled GC for LURC support])
HAVE_GC="no"
else
AC_CHECK_LIB(gc, GC_malloc, HAVE_GC="yes", HAVE_GC="no", $LIBS)
fi
# Test if the user want to force with our GC
AC_ARG_WITH(provided-gc,
......@@ -241,13 +304,15 @@ then
case `uname -s` in
Darwin*) echo "Force GC compilation without optimizations on MacOS";
(cd gc; CC="$CC" CFLAGS="-g" sh ./configure --prefix=$prefix \
--disable-threads) ;;
*) (cd gc; CC="$CC" CFLAGS="$CFLAGS" sh ./configure --prefix=$prefix) ;;
--disable-threads) || { echo "Cannot configure the GC"; exit; } ;;
*) (cd gc; CC="$CC" CFLAGS="$CFLAGS" sh ./configure --prefix=$prefix \
--enable-threads=$THREADS) || { echo "Cannot configure the GC"; exit; } ;;
esac
GC=gc
GCLIB="../gc/.libs/libgc.a"
GCINC="-I../gc"
GCINC="-I../gc/include"
AC_DEFINE(HAVE_GC, [], [Use system GC])
# Eventually add a distclean target to the GC Makefile
else
echo "Using the system Boehm-Demers-Weiser library"
......@@ -379,6 +444,13 @@ if test "$SVN_REPOSITORY" = "" ;then
SVN_URL="NOT_AVAILABLE"
fi
# LURC adjustment
LURCDIR=""
if test "$THREADS" = "lurc" ;then
LURCDIR=Lurc.d
fi
dnl Output files
AC_SUBST(VERSION)
......@@ -386,6 +458,7 @@ AC_SUBST(HAVE_DLOPEN)
AC_SUBST(OS_FLAVOUR)
AC_SUBST(GC)
AC_SUBST(GCLIB)
AC_SUBST(GCINC)
AC_SUBST(GMP)
AC_SUBST(GMPLIB)
AC_SUBST(GMPINC)
......@@ -416,6 +489,9 @@ AC_SUBST(PCRELIB)
AC_SUBST(PCREINC)
AC_SUBST(DEF_PCRE)
AC_SUBST(SVN_URL)
AC_SUBST(THREADS)
AC_SUBST(LURCDIR)
AC_OUTPUT(Makefile src/Makefile src/extraconf.h doc/Makefile
lib/Makefile gtklos/Makefile gtklos/gtklosconf.h
......@@ -423,7 +499,7 @@ AC_OUTPUT(Makefile src/Makefile src/extraconf.h doc/Makefile
utils/stklos-config utils/stklos-script
extensions/Makefile examples/Makefile
examples/images/Makefile lib/Match.d/Makefile
lib/SILex.d/Makefile lib/Lalr.d/Makefile
lib/SILex.d/Makefile lib/Lalr.d/Makefile lib/Lurc.d/Makefile
tests/Makefile extensions/extconf.h
doc/stklos.1 doc/stklos-config.1 doc/stklos-compile.1
doc/stklos-genlex.1 doc/stklos-install.1
......@@ -446,6 +522,7 @@ echo " GC library: " $gclib
echo " LDAP support: " $USE_LDAP
echo " GTK+ support: " $USE_GTK
echo " GNOME support: " $USE_GNOME
echo " Thread support: " $THREADS
echo " "
echo "If this is correct, you can just type 'make' now at your shell prompt."
echo "Otherwise, re-run 'configure' with correct options."
......
......@@ -82,6 +82,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -96,6 +97,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -114,6 +116,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -75,6 +75,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -89,6 +90,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -107,6 +109,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -75,6 +75,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -89,6 +90,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -107,6 +109,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -81,6 +81,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -95,6 +96,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -113,6 +115,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -82,6 +82,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -96,6 +97,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -114,6 +116,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -81,6 +81,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -95,6 +96,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -113,6 +115,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
# Makefile.am for STklos Lurc directory
#
# Author: Stephane Epardaud [Stephane.Epardaud@inria.fr]
# Creation date: 3-Apr-2006 10:30 (se)
# Last file update: 13-Apr-2006 17:31 (eg)
CC = @CC@
CFLAGS = @CFLAGS@
MGCINC = $(subst ../,../../,@GCINC@)
STKCONF = ../../utils/stklos-config
INCLUDES = -I../../src $(COMPFLAGS) $(MGCINC)
COMPILE = @CC@ @CFLAGS@ @SH_COMP_FLAGS@ $(INCLUDES)
shobjectdir=$(prefix)/lib/@PACKAGE@/@VERSION@
shobject_SCRIPTS = stklurc.@SH_SUFFIX@
noinst_LIBRARIES = libstklurc.a
libstklurc_a_SOURCES = lurc.c
# Scheme part
schemedir = $(prefix)/share/@PACKAGE@/@VERSION@
scheme_files = lurc.stk
scheme_DATA = $(scheme_files) lursk.ostk
stklurc.@SH_SUFFIX@: libstklurc.a
@CC@ @SH_LOAD_FLAGS@ stklurc.@SH_SUFFIX@ $(libstklurc_a_OBJECTS)
chmod 0755 stklurc.@SH_SUFFIX@
lurc.ostk: $(scheme_files)
../../utils/tmpcomp lurc.stk lurc.ostk
clean:
/bin/rm -f *.o *.ostk *.@SH_SUFFIX@ *.a *~
distclean: clean
This diff is collapsed.
#include <lurc.h>
#include <stklos.h>
//
// Signal type definition
static int tc_signal;
struct signal_obj {
stk_header header;
lurc_signal_t sig;
};
#define SIGNALP(p) (BOXED_TYPE_EQ((p), tc_signal))
#define SIGNAL_SIG(p) (((struct signal_obj *) (p))->sig)
static void print_signal(SCM signal, SCM port, int mode)
{
char *name = (char*)lurc_signal_name(&SIGNAL_SIG(signal));
STk_puts("#[signal ", port);
if (*name)
STk_puts(name, port);
else
STk_fprintf(port, "%lx", (unsigned long) signal);
STk_putc(']', port);
}
/* The stucture which describes the signal type */
static struct extended_type_descr xtype_signal = {
"lurc:signal", /* name */
print_signal /* print function */
};
//
// Errors
static void error_bad_signal(SCM obj)
{
STk_error("bad signal ~S", obj);
}
static void lurc_error(int ret)
{
STk_error("lurc error ~a", lurc_strerror(ret));
}
//
// Primitives
DEFINE_PRIMITIVE("lurc:signal?", lurc_signalp, subr1, (SCM obj))
{
return MAKE_BOOLEAN(SIGNALP(obj));
}
DEFINE_PRIMITIVE("lurc:signal-name", lurc_signal_name, subr1, (SCM sig))
{
char *name;
if (! SIGNALP(sig)) error_bad_signal(sig);
name = (char*)lurc_signal_name(&SIGNAL_SIG(sig));
if(name == NULL)
name = "";
return STk_Cstring2string(name);
}
static void signal_finalizer(SCM sig)
{
lurc_signal_destroy(&SIGNAL_SIG(sig));
}
static SCM do_make_signal(char *name)
{
SCM z;
lurc_signal_attr_t attr;
int ret;
if((ret = lurc_signal_attr_init(&attr)) != 0)
lurc_error(ret);
if((ret = lurc_signal_attr_setname(&attr, name)) != 0){
lurc_signal_attr_destroy(&attr);
lurc_error(ret);
}
NEWCELL(z, signal);
if((ret = lurc_signal_init(&SIGNAL_SIG(z), &attr)) != 0){
lurc_signal_attr_destroy(&attr);
lurc_error(ret);
}
if((ret = lurc_signal_attr_destroy(&attr)) != 0){
lurc_signal_destroy(&SIGNAL_SIG(z));
lurc_error(ret);
}
STk_register_finalizer(z, signal_finalizer);
return z;
}
DEFINE_PRIMITIVE("lurc:signal", lurc_make_signal, subr01, (SCM name))
{
SCM z;
char *s;
if (name) {
if (!STRINGP(name))
STk_error("bad signal name ~S", name);
s = STRING_CHARS(name);
}
else s = NULL;
z = do_make_signal(s);
return z;
}
static void
enter_context(void *arg){
SCM thunk = (SCM)arg;
STk_C_apply(thunk, 0);
}
DEFINE_PRIMITIVE("%lurc:when", lurc_when, subr2, (SCM sig, SCM thunk))
{
int ret;
if (STk_procedurep(thunk) == STk_false)
STk_error("bad thunk ~S", thunk);
if (! SIGNALP(sig)) error_bad_signal(sig);
if((ret = lurc_when(&SIGNAL_SIG(sig), enter_context, thunk)) != 0)
lurc_error(ret);
return STk_void;
}
DEFINE_PRIMITIVE("%lurc:watch", lurc_watch, subr2, (SCM sig, SCM thunk))
{
int ret;
SCM *vm;
if (STk_procedurep(thunk) == STk_false)
STk_error("bad thunk ~S", thunk);
if (! SIGNALP(sig)) error_bad_signal(sig);
vm = STk_save_vm();
if((ret = lurc_watch(&SIGNAL_SIG(sig), enter_context, thunk)) != 0){
STk_restore_vm(vm);
lurc_error(ret);
}
STk_restore_vm(vm);
return STk_void;
}
DEFINE_PRIMITIVE("lurc:emit", lurc_emit, subr1, (SCM sig))
{
int ret;
if (! SIGNALP(sig)) error_bad_signal(sig);
if((ret = lurc_signal_emit(&SIGNAL_SIG(sig))) != 0)
lurc_error(ret);
return STk_void;
}
DEFINE_PRIMITIVE("lurc:await", lurc_await, subr1, (SCM sig))
{
int ret;
if (! SIGNALP(sig)) error_bad_signal(sig);
if((ret = lurc_signal_await(&SIGNAL_SIG(sig))) != 0)
lurc_error(ret);
return STk_void;
}
DEFINE_PRIMITIVE("lurc:pause", lurc_pause, subr0, ())
{
int ret;
if((ret = lurc_pause()) != 0)
lurc_error(ret);
return STk_void;
}
//
// Module init
void test(void){
lurc_signal_t sig = lurc_signal("test");
int fail = 0;
printf("entering watch\n");
LURC_WATCH(&sig){
printf("in watch\n");
lurc_signal_emit(&sig);
printf("pausing\n");
lurc_pause();
fail = 1;
}
if(fail)
printf("TEST FAILED\n");
else
printf("test passed\n");
}
MODULE_ENTRY_START("lurc"){
tc_signal = STk_new_user_type();
/* Signal Type declaration */
DEFINE_XTYPE(signal, &xtype_signal);
ADD_PRIMITIVE(lurc_signalp);
ADD_PRIMITIVE(lurc_signal_name);
ADD_PRIMITIVE(lurc_make_signal);
ADD_PRIMITIVE(lurc_when);
ADD_PRIMITIVE(lurc_watch);
ADD_PRIMITIVE(lurc_await);
ADD_PRIMITIVE(lurc_emit);
ADD_PRIMITIVE(lurc_pause);
// test();
}MODULE_ENTRY_END;
(define-module lurc
(load "stklurc.so")
(export
lurc:when
%lurc:when
lurc:watch
%lurc:watch
lurc:emit
lurc:signal
lurc:signal?
lurc:signal-name
lurc:await
lurc:pause)
(define-macro (lurc:when sig e . rest)
`(%lurc:when ,sig (lambda () ,e ,@rest)))
(define-macro (lurc:watch sig e . rest)
`(%lurc:watch ,sig (lambda () ,e ,@rest)))
)
(select-module STklos)
(import lurc)
(provide "lurc")
\ No newline at end of file
......@@ -2,9 +2,9 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 7-Feb-2006 10:16 (eg)
# Last file update: 13-Apr-2006 13:20 (eg)
SUBDIRS = Match.d SILex.d Lalr.d
SUBDIRS = Match.d SILex.d Lalr.d @LURCDIR@
scheme_BOOT = assembler.stk \
bb.stk \
......
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 7-Feb-2006 10:16 (eg)
# Last file update: 13-Apr-2006 13:20 (eg)
SHELL = @SHELL@
srcdir = @srcdir@
......@@ -81,6 +81,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -95,6 +96,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -113,12 +115,13 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
SUBDIRS = Match.d SILex.d Lalr.d
SUBDIRS = Match.d SILex.d Lalr.d @LURCDIR@
scheme_BOOT = assembler.stk \
bb.stk \
......
......@@ -81,6 +81,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -95,6 +96,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -113,6 +115,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -81,6 +81,7 @@ DEPDIR = @DEPDIR@
EXAMPLES = @EXAMPLES@
EXECDIR = @EXECDIR@
GC = @GC@
GCINC = @GCINC@
GCLIB = @GCLIB@
GMP = @GMP@
GMPINC = @GMPINC@
......@@ -95,6 +96,7 @@ HAVE_GNOME = @HAVE_GNOME@
HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -113,6 +115,7 @@ SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 01-Jan-2000 15:04 (eg)
;;;; Last file update: 30-Mar-2006 16:10 (eg)
;;;; Last file update: 13-Apr-2006 11:50 (eg)
;;;;
(include "runtime.stk") ; Definition necessary for the bootstrap
......@@ -166,31 +166,28 @@
(unless no-init
(try-load (expand-file-name "~/.stklos/stklosrc")))
;; "--load" option
(when ld
;; "--load" option
(with-handler
(lambda (c) (%simple-fatal-exception-handler "loading file" ld c 7))
(load ld)))
(cond
;; "--file" option
(when file
(with-handler
(file (with-handler
(lambda (c) (%simple-fatal-exception-handler "executing file" file c 2))
(load file)
;; Try to execute the main procedure with the given arguments
(let ((ret-code (main (cons (program-name) (argv)))))