Commit of 3.99.1 version

This commit is contained in:
Erick Gallesio
2019-10-31 12:04:33 +01:00
parent 5f74a25a3c
commit 3c98caa84e
158 changed files with 10002 additions and 8279 deletions
+9 -9
View File
@@ -11,11 +11,11 @@
# permission of the copyright holder.
# This software is provided ``as is'' without express or implied warranty.
#
# $Id: Makefile.in 1.4 Fri, 10 Apr 1998 09:13:18 +0200 eg $
# $Id: Makefile.in 1.5 Mon, 27 Apr 1998 13:39:00 +0000 eg $
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: ??-Sep-1993 ??:??
# Last file update: 10-Apr-1998 08:51
# Last file update: 27-Apr-1998 15:15
#
include ../config.make
@@ -119,9 +119,9 @@ install.stk: stk
chmod 0755 $(bindir)/stk-$(VERSION) $(bindir)/stk $(execdir)/stk
install.stk.libs:
-if [ ! -d $(execdir) ] ; then mkdir -p $(execdir); fi
$(CP) libstk.a $(execdir)
$(RANLIB) $(execdir)/libstk.a
-if [ ! -d $(ardir) ] ; then mkdir -p $(ardir); fi
$(CP) libstk.a $(ardir)
$(RANLIB) $(ardir)/libstk.a
-if [ ! -d $(incdir) ] ; then mkdir -p $(incdir); fi
$(CP) stk.h $(incdir)
@@ -136,14 +136,14 @@ install.snow: snow
chmod 0755 $(bindir)/snow-$(VERSION) $(bindir)/snow $(execdir)/snow
install.snow.libs:
-if [ ! -d $(execdir) ] ; then mkdir -p $(execdir); fi
$(CP) libsnow.a $(execdir)
$(RANLIB) $(execdir)/libsnow.a
-if [ ! -d $(ardir) ] ; then mkdir -p $(ardir); fi
$(CP) libsnow.a $(ardir)
$(RANLIB) $(ardir)/libsnow.a
-if [ ! -d $(incdir) ] ; then mkdir -p $(incdir); fi
$(CP) stk.h $(incdir)
clean:
@/bin/rm -f Makefile core *.o core config.* \
@/bin/rm -f core *.o core config.* \
stk libstk.a stk run-stk \
snow libsnow.a snow run-snow
+1 -1
View File
@@ -16,7 +16,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: cont.c 1.2 Mon, 09 Mar 1998 09:31:40 +0100 eg $
* $Id: cont.c 1.2 Mon, 09 Mar 1998 08:31:40 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 8-Nov-1993 11:34
+1 -1
View File
@@ -17,7 +17,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: dynload.c 1.2 Fri, 10 Apr 1998 09:13:18 +0200 eg $
* $Id: dynload.c 1.2 Fri, 10 Apr 1998 07:13:18 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 23-Jan-1994 19:09
+4 -2
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: env.c 1.4 Fri, 23 Jan 1998 18:46:19 +0100 eg $
* $Id: env.c 1.5 Mon, 20 Apr 1998 20:15:01 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 23-Oct-1993 21:37
* Last file update: 23-Jan-1998 09:57
* Last file update: 15-Apr-1998 17:43
*/
#include "stk.h"
@@ -252,6 +252,8 @@ PRIMITIVE STk_symbol_boundp(SCM x, SCM env)
return (tmp == UNBOUND) ? Ntruth : Truth;
}
PRIMITIVE STk_the_environment(SCM args, SCM env, int len)
{
if (len) Err("the-environement: Too much parameters", args);
+1 -1
View File
@@ -16,7 +16,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: error.c 1.4 Fri, 10 Apr 1998 09:13:18 +0200 eg $
* $Id: error.c 1.4 Fri, 10 Apr 1998 07:13:18 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 14-Nov-1993 14:58
+1 -1
View File
@@ -16,7 +16,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: eval.c 1.10 Fri, 10 Apr 1998 14:05:25 +0200 eg $
* $Id: eval.c 1.10 Fri, 10 Apr 1998 12:05:25 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 23-Oct-1993 21:37
+2 -2
View File
@@ -1,7 +1,7 @@
/*
* i o . c -- Low level I/O
*
* Copyright © 1993-1996 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright © 1993-1998 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* Permission to use, copy, and/or distribute this software and its
@@ -17,7 +17,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: ????
* Last file update: 19-Dec-1996 23:48
* Last file update: 26-Apr-1998 11:09
*/
#ifdef WIN32
+7 -4
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: module.c 1.7 Fri, 10 Apr 1998 14:05:25 +0200 eg $
* $Id: module.c 1.8 Mon, 20 Apr 1998 20:15:01 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 13-Mar-1997 20:11
* Last file update: 10-Apr-1998 10:47
* Last file update: 20-Apr-1998 19:36
*/
#include "stk.h"
@@ -423,8 +423,11 @@ PRIMITIVE STk_get_module(SCM env) /* subr */
PRIMITIVE STk_current_module(SCM l, SCM env, int len) /* fsubr */
{
/* FIXME: Cette fonction peut maintenant être déclarée void et utiliser
* le module courant
/* Find the module from the environment. This is important to
* compute the module from the environment (instead of just returning
* the value of STk_selected_module); otherwise closures would return
* a value which don't agree with their own environment (see it as a
* static current_environment).
*/
ENTER_PRIMITIVE("current-module");
if (len) Serror("no parameter required", l);
+6 -4
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: port.c 1.5 Sun, 22 Mar 1998 17:16:09 +0100 eg $
* $Id: port.c 1.6 Wed, 22 Apr 1998 21:52:02 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 17-Feb-1993 12:27
* Last file update: 21-Mar-1998 22:25
* Last file update: 22-Apr-1998 11:44
*
*/
#ifndef WIN32
@@ -715,9 +715,11 @@ PRIMITIVE STk_flush(SCM port)
int code;
port = verify_port("flush", port, F_WRITE|F_READ);
code = fflush(PORT_FILE(port));
if (code == EOF) Err("flush: cannot flush buffer", port);
if (! SPORTP(port)) {
if (fflush(PORT_FILE(port)) == EOF)
Err("flush: cannot flush buffer", port);
}
return UNDEFINED;
}
+1 -1
View File
@@ -16,7 +16,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: primitives.c 1.10 Fri, 10 Apr 1998 09:13:18 +0200 eg $
* $Id: primitives.c 1.10 Fri, 10 Apr 1998 07:13:18 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: ??????
+1 -1
View File
@@ -15,7 +15,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: print.c 1.3 Mon, 09 Mar 1998 09:31:40 +0100 eg $
* $Id: print.c 1.3 Mon, 09 Mar 1998 08:31:40 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: ??-Oct-1993 ??:??
+1 -1
View File
@@ -16,7 +16,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: proc.c 1.3 Mon, 09 Mar 1998 09:31:40 +0100 eg $
* $Id: proc.c 1.3 Mon, 09 Mar 1998 08:31:40 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 15-Nov-1993 22:02
+1 -1
View File
@@ -15,7 +15,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: read.c 1.3 Sun, 01 Feb 1998 23:14:16 +0100 eg $
* $Id: read.c 1.3 Sun, 01 Feb 1998 22:14:16 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: ??-Oct-1993 ??:??
+1 -1
View File
@@ -15,7 +15,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 10-Oct-1995 07:55
* Last file update: 10-Apr-1998 10:19
* Last file update: 26-Apr-1998 18:41
*
*/
+1 -1
View File
@@ -15,7 +15,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: slib.c 1.6 Fri, 10 Apr 1998 14:05:25 +0200 eg $
* $Id: slib.c 1.6 Fri, 10 Apr 1998 12:05:25 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: ??-Oct-1993 ??:??
+4 -2
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: stk.h 1.11 Fri, 10 Apr 1998 09:13:18 +0200 eg $
* $Id: stk.h 1.12 Wed, 22 Apr 1998 21:52:02 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 12-May-1993 10:34
* Last file update: 9-Apr-1998 10:57
* Last file update: 22-Apr-1998 11:34
*
******************************************************************************/
@@ -285,6 +285,7 @@ typedef struct obj* PRIMITIVE;
#define OPORTP(x) TYPEP(x,tc_oport)
#define ISPORTP(x) TYPEP(x,tc_isport)
#define OSPORTP(x) TYPEP(x,tc_osport)
#define SPORTP(x) (ISPORTP(x)||OSPORTP(x))
#define INTEGERP(x) TYPEP(x,tc_integer)
#define BIGNUMP(x) TYPEP(x,tc_bignum)
#define NUMBERP(x) (FLONUMP(x) || INTEGERP(x) || BIGNUMP(x))
@@ -314,6 +315,7 @@ typedef struct obj* PRIMITIVE;
#define NOPORTP(x) NTYPEP(x,tc_oport)
#define NISPORTP(x) NTYPEP(x,tc_isport)
#define NOSPORTP(x) NTYPEP(x,tc_osport)
#define NSPORTP(x) (!SPORTP(x))
#define NINTEGERP(x) NTYPEP(x,tc_integer)
#define NBIGNUMP(x) NTYPEP(x,tc_bignum)
#define NNUMBERP(x) (NFLONUMP(x) && NINTEGERP(x) && NBIGNUMP(x))
+3 -3
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: stklos.c 1.12 Sun, 22 Mar 1998 20:42:56 +0100 eg $
* $Id: stklos.c 1.13 Mon, 20 Apr 1998 20:15:01 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 9-Feb-1994 15:56
* Last file update: 22-Mar-1998 19:25
* Last file update: 13-Apr-1998 23:13
*/
#ifdef USE_STKLOS
@@ -1084,7 +1084,7 @@ static PRIMITIVE user_more_specificp(SCM m1, SCM m2, SCM targs)
static void select_STklos_module(void)
{
STk_selected_module = STklos = STk_make_module(Intern("stklos"));;
STk_selected_module = STklos = STk_make_module(Intern("stklos"));
}
+1 -1
View File
@@ -16,7 +16,7 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: str.c 1.1 Sat, 03 Jan 1998 13:46:25 +0100 eg $
* $Id: str.c 1.1 Sat, 03 Jan 1998 12:46:25 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: ??????
+21 -10
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: tcl-glue.c 1.4 Mon, 09 Mar 1998 21:45:18 +0100 eg $
* $Id: tcl-glue.c 1.5 Wed, 22 Apr 1998 21:52:02 +0000 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 6-Aug-1997 12:48
* Last file update: 9-Mar-1998 18:27
* Last file update: 22-Apr-1998 22:47
*
*/
@@ -145,14 +145,15 @@ int STk_valid_environment(char *s, void **env)
* the valid_procedure accepts closure AND strings for pre STk3.0
* compatibility reasons.
*/
unsigned long tmp;
int l = strlen(s);
char *p;
if (l == 0 || l == 2 && s[0] == '#' && s[1] == 'f') {
#ifdef USE_TK
*env = MOD_ENV(STk_Tk_module);
*env = STk_makeenv(MOD_ENV(STk_Tk_module), 0);
#else
*env = NIL;
*env = STk_globenv;
#endif
return TRUE;
}
@@ -163,8 +164,11 @@ int STk_valid_environment(char *s, void **env)
for (p = s + 2; *p; p++)
if (!isxdigit(*p)) return FALSE;
sscanf(s+2, "%lx", (unsigned long) env);
if (STk_valid_address((SCM) *env)) return TRUE;
sscanf(s+2, "%lx", &tmp);
if (STk_valid_address((SCM) tmp) && ENVP((SCM) tmp)) {
*(SCM *)env = (SCM) tmp;
return TRUE;
}
}
}
return FALSE;
@@ -177,8 +181,15 @@ char *STk_tcl_getvar(char *name, char *env)
if (!STk_valid_environment(env, (void **) &e)) return NULL;
V = *(STk_varlookup(Intern(name), e, 0));
return (V == UNBOUND) ? NULL : STk_convert_for_Tcl(V, &dumb);
V = *(STk_varlookup(Intern(name), e->storage_as.env.data, 0));
if (V == UNBOUND) {
/* We should probably complain here, but this would break old code */
STk_tcl_setvar(name, "", 0, env);
return "";
}
else
STk_convert_for_Tcl(V, &dumb);
}
@@ -222,7 +233,7 @@ char *STk_tcl_setvar(char *name, char *val, int flags, char *env)
var = Intern(name);
tmp = STk_varlookup(var, e, 0);
tmp = STk_varlookup(var, e->storage_as.env.data, 0);
if (*tmp == UNBOUND) {
if (var->cell_info & CELL_INFO_C_VAR) {
/* This is not an unbound variable but rather a C variable */
@@ -233,7 +244,7 @@ char *STk_tcl_setvar(char *name, char *val, int flags, char *env)
* Use big hammer here, since it occcurs only once (at most)
* for a given widget
*/
STk_eval(LIST3(Intern("define"), var, value), e);
STk_eval(LIST3(Intern("define"), var, value), e->storage_as.env.data);
return val;
}
*tmp = value;
+2 -2
View File
@@ -19,7 +19,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 8-Jul-1997 10:33
* Last file update: 10-Apr-1998 10:48
* Last file update: 26-Apr-1998 18:42
*
*/
@@ -174,7 +174,7 @@ Tcl_ListObjReplace(interp, listPtr, first, count, objc, objv)
/* Tcl_DecrRefCount(objs); */
}
else {
panic("EG: Problem in Tcl_ListObjReplace");
panic("Problem in Tcl_ListObjReplace");
}
}
+11 -17
View File
@@ -16,11 +16,11 @@
* This software is a derivative work of other copyrighted softwares; the
* copyright notices of these softwares are placed in the file COPYRIGHTS
*
* $Id: toplevel.c 1.4 Sun, 22 Mar 1998 17:16:09 +0100 eg $
* $Id: toplevel.c 1.5 Mon, 27 Apr 1998 08:44:17 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 6-Apr-1994 14:46
* Last file update: 21-Mar-1998 12:51
* Last file update: 26-Apr-1998 18:41
*/
#include "stk.h"
@@ -202,20 +202,6 @@ static void finish_initialisation(void)
*/
STk_user_init();
#if (defined(USE_TK) && !defined(WIN32))
/*
* Set up a handler for characters coming from stdin (Verify that we are
* interactive, because background interpreters are locked)
*/
if (STk_interactivep) {
Tcl_CreateFileHandler(fileno(STk_stdin),
TCL_READABLE,
(Tk_FileProc *) STk_StdinProc,
(ClientData) NULL);
}
#endif
/*
* See if we have the '-file' option
*/
@@ -232,12 +218,13 @@ static void finish_initialisation(void)
#endif
exit(0);
}
/*
* See if we've used the '-interactive' option; if so,
* - unbufferize stdout and stderr so that the interpreter can
* be used with Emacs and
* - print the STk banner
* - set the input handler
*/
if (STk_interactivep) {
static char *out, *err;
@@ -245,6 +232,13 @@ static void finish_initialisation(void)
out = STk_line_bufferize_io(STk_stdout);
err = STk_line_bufferize_io(STk_stderr);
print_banner();
#if (defined(USE_TK) && !defined(WIN32))
/* Set up a handler for characters coming from stdin */
Tcl_CreateFileHandler(fileno(STk_stdin),
TCL_READABLE,
(Tk_FileProc *) STk_StdinProc,
(ClientData) NULL);
#endif
}
fflush(stdout);
+5 -2
View File
@@ -19,7 +19,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 29-Mar-1994 10:57
* Last file update: 27-Feb-1998 21:07
* Last file update: 17-Apr-1998 12:17
*/
#ifndef WIN32
# include <unistd.h>
@@ -723,8 +723,11 @@ PRIMITIVE STk_rename_file(SCM filename1, SCM filename2)
PRIMITIVE STk_temporary_file_name(void)
{
char *s;
ENTER_PRIMITIVE("temporary-file-name");
return STk_makestring(tmpnam(NULL));
s = tmpnam(NULL);
return s ? STk_makestring(s) : Ntruth;
}
+1 -1
View File
@@ -14,7 +14,7 @@
* permission of the copyright holder.
* This software is provided ``as is'' without express or implied warranty.
*
* $Id: values.c 1.1 Fri, 10 Apr 1998 09:13:18 +0200 eg $
* $Id: values.c 1.1 Fri, 10 Apr 1998 07:13:18 +0000 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 8-Mar-1998 10:19