Commit of 3.99.4 version

This commit is contained in:
Erick Gallesio
2019-10-31 12:13:40 +01:00
parent fd0f8b8984
commit 956ab227cc
317 changed files with 48894 additions and 20439 deletions
+8 -6
View File
@@ -13,9 +13,11 @@
* permission of the copyright holder.
* This software is provided ``as is'' without express or implied warranty.
*
* $Id: base64.c 1.3 Wed, 18 Nov 1998 16:16:26 +0100 eg $
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 20-Jul-1998 12:19
* Last file update: 20-Jul-1998 19:40
* Last file update: 10-Nov-1998 23:40
*/
#include <stk.h>
@@ -32,10 +34,10 @@ static void initialize_rev_table(void)
char *p;
int count = 0;
for (p = table; *p; p++) rev_table[*p] = count++;
for (p = table; *p; p++) rev_table[(int) *p] = count++;
}
static void encode(FILE *f, FILE *g)
static void encode(SCM f, SCM g)
{
int c, state, count, old;
@@ -65,7 +67,7 @@ static void encode(FILE *f, FILE *g)
}
}
static void decode(FILE *f, FILE *g)
static void decode(SCM f, SCM g)
{
static int initialized = 0;
int c, bits, group, j;
@@ -106,7 +108,7 @@ static PRIMITIVE base64_encode(SCM f, SCM g)
else
if (!OUTP(g)) Serror("bad output port", g);
encode(PORT_FILE(f), PORT_FILE(g));
encode(f, g);
return UNDEFINED;
}
@@ -120,7 +122,7 @@ static PRIMITIVE base64_decode(SCM f, SCM g)
else
if (!OUTP(g)) Serror("bad output port", g);
decode(PORT_FILE(f), PORT_FILE(g));
decode(f, g);
return UNDEFINED;
}
+6 -4
View File
@@ -16,10 +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: hash.c 1.4 Mon, 28 Dec 1998 23:05:11 +0100 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 17-Jan-1994 17:49
* Last file update: 15-Jul-1998 17:34
* Last file update: 27-Dec-1998 20:19
*/
#include <stk.h>
@@ -141,7 +142,7 @@ static SCM find_key(SCM obj, SCM alist, SCM comparison)
*/
static SCM remove_key(SCM obj, SCM alist, SCM comparison)
{
register SCM l, tmp;
register SCM l;
for(l=NIL; !NULLP(alist); alist=CDR(alist)) {
if (STk_apply(comparison, LIST2(obj, CAR(CAR(alist)))) == Ntruth)
@@ -446,11 +447,12 @@ static PRIMITIVE hash_table_stats(SCM ht)
*/
if (Tcl_FirstHashEntry(HASH_H(ht), &search)) {
s = Tcl_HashStats(HASH_H(ht));
fprintf(STk_stderr, "%s\n", s);
Puts(s, STk_curr_eport);
Putc('\n', STk_curr_eport);
free(s);
}
else
fprintf(STk_stderr, "Empty hash table\n");
Puts("Empty hash table\n", STk_curr_eport);
return UNDEFINED;
}
+7 -10
View File
@@ -13,11 +13,11 @@
* permission of the copyright holder.
* This software is provided ``as is'' without express or implied warranty.
*
*
* $Id: html.c 1.4 Mon, 28 Dec 1998 23:05:11 +0100 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 1-Sep-1995 23:10
* Last file update: 28-May-1998 21:57
* Last file update: 27-Dec-1998 20:20
*/
#include <ctype.h>
@@ -67,7 +67,7 @@ static struct char_type table [] = {
{"yacute", '\xfd'}, {"thorn", '\xfe'}, {"yuml", '\xff'},
{"", 0}};
static void skip_spaces(FILE *f)
static void skip_spaces(SCM f)
{
int c;
@@ -82,7 +82,7 @@ static void skip_spaces(FILE *f)
}
/* next_entity: Read an entity such as <A HREF=x.html> */
static SCM next_entity(FILE *f)
static SCM next_entity(SCM f)
{
Tcl_DString dStr1, dStr2;
int c;
@@ -120,7 +120,7 @@ static SCM next_entity(FILE *f)
/* Read an entity such as &amp; */
static void next_character(Tcl_DString *dStr, FILE *f)
static void next_character(Tcl_DString *dStr, SCM f)
{
char *t, ch, token[MAXTOKEN];
int c, i;
@@ -169,16 +169,13 @@ static void next_character(Tcl_DString *dStr, FILE *f)
}
static PRIMITIVE html_next_token(SCM iport) /* Return next HTML token */
static PRIMITIVE html_next_token(SCM f) /* Return next HTML token */
{
int c;
FILE *f;
ENTER_PRIMITIVE("%html:next-token");
if (!INP(iport)) Serror("bad port", iport);
f = PORT_FILE(iport);
if (!INP(f)) Serror("bad port", f);
if (Eof(f) || ((c = Getc(f)) == EOF)) return STk_eof_object;
+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: posix.c 1.2 Thu, 10 Sep 1998 23:44:28 +0200 eg $
* $Id: posix.c 1.3 Wed, 18 Nov 1998 16:16:26 +0100 eg $
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 14-Mar-1995 20:14
* Last file update: 10-Sep-1998 15:06
* Last file update: 10-Nov-1998 23:35
*
* This file contains also contains code additions from Shiro Kawai
* <shiro@sqush.squareusa.com>
@@ -221,7 +221,7 @@ static void display_Cpointer_tm(SCM obj, SCM port, int mode)
sprintf(STk_tkbuffer, "#<C-struct tm %02d/%02d/%02d %02d:%02d:%02d>",
p->tm_mon, p->tm_mday, p->tm_year,
p->tm_hour, p->tm_min, p->tm_sec);
Puts(STk_tkbuffer, PORT_FILE(port));
Puts(STk_tkbuffer, port);
}
static PRIMITIVE posix_time(void)
+2 -5
View File
@@ -350,7 +350,7 @@ static PRIMITIVE run_process(SCM l, int len)
execvp(*argv, argv);
/* Cannot exec if we are here */
fprintf(STk_stderr, "**** Cannot exec %s!\n", *argv);
Fprintf(STk_curr_eport, "**** Cannot exec %s!\n", *argv);
exit(1);
default: /* Father */
info->pid = pid;
@@ -374,8 +374,6 @@ static PRIMITIVE run_process(SCM l, int len)
sprintf(msg, "pipe-%s-%d", stdStreams[i], pid);
STk_disallow_sigint();
s = (char *) must_malloc(strlen(msg)+1);
strcpy(s, msg);
@@ -383,7 +381,6 @@ static PRIMITIVE run_process(SCM l, int len)
f,
(i==0) ? tc_oport : tc_iport,
0);
STk_allow_sigint();
}
}
}
@@ -566,7 +563,7 @@ static void free_process(SCM process)
static void process_display(SCM obj, SCM port, int mode)
{
sprintf(STk_tkbuffer, "#<process PID=%d>", PROCPID(obj));
Puts(STk_tkbuffer, PORT_FILE(port));
Puts(STk_tkbuffer, port);
}
+2 -6
View File
@@ -9,7 +9,7 @@
*
* Win32 support by Caleb Deupree <cdeupree@erinet.com>
*
* Last file update: 10-Sep-1998 15:17
* Last file update: 20-Dec-1998 10:34
*/
@@ -81,8 +81,6 @@ static void set_socket_io_ports(int s, SCM sock, char *who)
FILE *fs, *ft;
char buffer[200];
STk_disallow_sigint();
#ifdef WIN32
{
int r;
@@ -124,8 +122,6 @@ static void set_socket_io_ports(int s, SCM sock, char *who)
/* Create output port */
SOCKET(sock)->output = STk_Cfile2port(strdup(fname), ft, tc_oport, 0);
STk_allow_sigint();
}
/******************************************************************************
@@ -491,7 +487,7 @@ static void displ_socket(SCM sock, SCM port, int mode)
sprintf(STk_tkbuffer, "#[socket %s %d]",
(s->hostname == Ntruth)?"*none*": CHARS(s->hostname),
s->portnum);
Puts(STk_tkbuffer, PORT_FILE(port));
Puts(STk_tkbuffer, port);
}
static STk_extended_scheme_type socket_type = {