Commit 0714863e authored by Erick's avatar Erick

Rename copy-tree to use the R7RS name (list-copy)

parent 20a74bd3
......@@ -18,7 +18,7 @@
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
;; Last file update: 21-Sep-2018 09:49 (eg)
;; Last file update: 5-Oct-2018 18:10 (eg)
;;
;; ======================================================================
......@@ -159,7 +159,7 @@ quoted in programs.])
(insertdoc 'list-set!)
(insertdoc 'member)
(insertdoc 'assoc)
(insertdoc 'copy-tree)
(insertdoc 'list-copy)
(insertdoc 'filter!)
(insertdoc 'remove!)
(insertdoc 'delete!))
......
;;;;
;;;; c o m p i l e r . s t k -- STklos Compiler
;;;;
;;;; Copyright © 2000-2016 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;; Copyright © 2000-2018 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 26-Feb-2000 10:47 (eg)
;;;; Last file update: 11-Mar-2016 12:34 (eg)
;;;; Last file update: 5-Oct-2018 18:09 (eg)
;;;;
(define-module STKLOS-COMPILER
......@@ -759,7 +759,7 @@ doc>
;; or a dotted list, add in the implied :rest
(unless (list? x)
(set! x (if (pair? x)
(let* ((new-x (copy-tree x))
(let* ((new-x (list-copy x))
(last (last-pair new-x)))
(set-cdr! last (list :rest (cdr last)))
new-x)
......
......@@ -22,7 +22,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 11-Jun-2002 17:54 (eg)
;;;; Last file update: 10-Sep-2018 17:18 (eg)
;;;; Last file update: 5-Oct-2018 18:01 (eg)
;;;;
......@@ -70,7 +70,10 @@
;; 05-May-2007 (v0.83)
;; current-second is now R7RS
;(define current-second current-seconds)
;(define current-second current-seconds)
;; 04-Jun-2008 (v0.99)
(define %build-path-from-shell-variable build-path-from-shell-variable)
;; 05-Oct-2017 (v1.21)
(define copy-tree list-copy)
This diff is collapsed.
/*
*
* e n v . c -- Environment management
* e n v . c -- Environment management
*
* Copyright © 1993-2011 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright © 1993-2018 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* This program is free software; you can redistribute it and/or modify
......@@ -22,7 +22,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 23-Oct-1993 21:37
* Last file update: 27-May-2011 22:15 (eg)
* Last file update: 5-Oct-2018 18:04 (eg)
*/
#include "stklos.h"
......@@ -63,29 +63,29 @@ static void error_bad_symbol(SCM symbol)
/*===========================================================================*\
*
* M O D U L E S
* M O D U L E S
*
\*===========================================================================*/
struct module_obj {
stk_header header;
SCM name; /* module name */
SCM exported_symbols; /* symbols declared as exported */
SCM imports; /* imported modules */
struct hash_table_obj hash; /* The associated hash table */
SCM name; /* module name */
SCM exported_symbols; /* symbols declared as exported */
SCM imports; /* imported modules */
struct hash_table_obj hash; /* The associated hash table */
};
#define MODULE_NAME(m) (((struct module_obj *) (m))->name)
#define MODULE_EXPORTS(m) (((struct module_obj *) (m))->exported_symbols)
#define MODULE_IMPORTS(m) (((struct module_obj *) (m))->imports)
#define MODULE_HASH_TABLE(m) (((struct module_obj *) (m))->hash)
#define MODULE_NAME(m) (((struct module_obj *) (m))->name)
#define MODULE_EXPORTS(m) (((struct module_obj *) (m))->exported_symbols)
#define MODULE_IMPORTS(m) (((struct module_obj *) (m))->imports)
#define MODULE_HASH_TABLE(m) (((struct module_obj *) (m))->hash)
#define VISIBLE_P(symb, mod) (((mod) == STk_STklos_module) || \
(STk_memq((symb), MODULE_EXPORTS(mod))!=STk_false))
#define VISIBLE_P(symb, mod) (((mod) == STk_STklos_module) || \
(STk_memq((symb), MODULE_EXPORTS(mod))!=STk_false))
SCM STk_STklos_module; /* The module whose name is STklos */
static SCM all_modules; /* List of all knowm modules */
SCM STk_STklos_module; /* The module whose name is STklos */
static SCM all_modules; /* List of all knowm modules */
static void print_module(SCM module, SCM port, int mode)
{
......@@ -100,9 +100,9 @@ static SCM STk_makemodule(SCM name)
register SCM z;
NEWCELL(z, module);
MODULE_NAME(z) = name;
MODULE_EXPORTS(z) = STk_nil;
MODULE_IMPORTS(z) = (name == STk_void)? STk_nil : LIST1(STk_STklos_module);
MODULE_NAME(z) = name;
MODULE_EXPORTS(z) = STk_nil;
MODULE_IMPORTS(z) = (name == STk_void)? STk_nil : LIST1(STk_STklos_module);
/* Initialize the associated hash table & store the module in the global list*/
STk_hashtable_init(&MODULE_HASH_TABLE(z), HASH_VAR_FLAG);
{
......@@ -154,7 +154,7 @@ DEFINE_PRIMITIVE("%select-module", select_module, subr1, (SCM module))
}
DEFINE_PRIMITIVE("%module-imports-set!", module_imports_set, subr2,
(SCM importer,SCM imported))
(SCM importer,SCM imported))
{
if (!MODULEP(importer)) error_bad_module(importer);
......@@ -168,7 +168,7 @@ DEFINE_PRIMITIVE("%module-imports-set!", module_imports_set, subr2,
}
DEFINE_PRIMITIVE("%module-exports-set!", module_exports_set, subr2,
(SCM exporter,SCM exported))
(SCM exporter,SCM exported))
{
if (!MODULEP(exporter)) error_bad_module(exporter);
if (!CONSP(exported)) error_bad_list(exported);
......@@ -288,8 +288,8 @@ DEFINE_PRIMITIVE("module-exports", module_exports, subr1, (SCM module))
/* STklos module is special: everything is exported ==> module-symbols */
return (module == STk_STklos_module) ?
STk_hash_keys(&MODULE_HASH_TABLE(module)) :
MODULE_EXPORTS(module);
STk_hash_keys(&MODULE_HASH_TABLE(module)) :
MODULE_EXPORTS(module);
}
......@@ -315,7 +315,7 @@ doc>
*/
DEFINE_PRIMITIVE("all-modules", all_modules, subr0, (void))
{
return STk_copy_tree(all_modules);
return STk_list_copy(all_modules);
}
......@@ -330,7 +330,7 @@ DEFINE_PRIMITIVE("all-modules", all_modules, subr0, (void))
doc>
*/
DEFINE_PRIMITIVE("symbol-value", symbol_value, subr23,
(SCM symbol, SCM module, SCM default_value))
(SCM symbol, SCM module, SCM default_value))
{
SCM res;
int i;
......@@ -349,7 +349,7 @@ DEFINE_PRIMITIVE("symbol-value", symbol_value, subr23,
DEFINE_PRIMITIVE("%redefine-module-exports", redefine_module_exports, subr12,
(SCM from, SCM to))
(SCM from, SCM to))
{
SCM lst, res;
int i;
......@@ -364,7 +364,7 @@ DEFINE_PRIMITIVE("%redefine-module-exports", redefine_module_exports, subr12,
if (from == STk_STklos_module)
lst = STk_hash_keys(&MODULE_HASH_TABLE(STk_STklos_module)); /* everybody */
else
lst = MODULE_EXPORTS(from); /* explicitly exported */
lst = MODULE_EXPORTS(from); /* explicitly exported */
for ( ; !NULLP(lst); lst = CDR(lst)) {
res = STk_hash_get_variable(&MODULE_HASH_TABLE(from), CAR(lst), &i);
......@@ -377,7 +377,7 @@ DEFINE_PRIMITIVE("%redefine-module-exports", redefine_module_exports, subr12,
/*===========================================================================*\
*
* E n v i r o n m e n t M a n a g e m e n t
* E n v i r o n m e n t M a n a g e m e n t
*
\*===========================================================================*/
......@@ -410,7 +410,7 @@ void STk_define_variable(SCM symbol, SCM value, SCM module)
DEFINE_PRIMITIVE("%symbol-define", symbol_define, subr3,
(SCM symbol, SCM value, SCM module))
(SCM symbol, SCM value, SCM module))
{
if (!SYMBOLP(symbol)) error_bad_symbol(symbol);
if (!MODULEP(module)) error_bad_module(module);
......@@ -420,7 +420,7 @@ DEFINE_PRIMITIVE("%symbol-define", symbol_define, subr3,
}
DEFINE_PRIMITIVE("%symbol-alias", symbol_alias, subr23,
(SCM new, SCM old, SCM module))
(SCM new, SCM old, SCM module))
{
SCM res, mod = STk_current_module();;
int i;
......@@ -442,7 +442,7 @@ DEFINE_PRIMITIVE("%symbol-alias", symbol_alias, subr23,
/*===========================================================================*\
* Lookup
* Lookup
\*===========================================================================*/
SCM STk_lookup(SCM symbol, SCM env, SCM *ref, int err_if_unbound)
......@@ -465,8 +465,8 @@ SCM STk_lookup(SCM symbol, SCM env, SCM *ref, int err_if_unbound)
module = CAR(l);
res = STk_hash_get_variable(&MODULE_HASH_TABLE(module), symbol, &i);
if (res && VISIBLE_P(symbol, module)) {
*ref = res;
return BOX_VALUE(CDR(res));
*ref = res;
return BOX_VALUE(CDR(res));
}
}
......@@ -480,14 +480,14 @@ SCM STk_lookup(SCM symbol, SCM env, SCM *ref, int err_if_unbound)
/*===========================================================================*\
*
* E n v i r o n m e n t P r i m i t i v e s
* E n v i r o n m e n t P r i m i t i v e s
*
\*===========================================================================*/
/* The stucture which describes the modules type */
static struct extended_type_descr xtype_module = {
"module", /* name */
print_module /* print function */
"module", /* name */
print_module /* print function */
};
......@@ -495,8 +495,8 @@ static struct extended_type_descr xtype_module = {
/* The stucture which describes the frame type */
static struct extended_type_descr xtype_frame = {
"frame", /* name */
NULL /* print function */
"frame", /* name */
NULL /* print function */
};
......
/*
*
* k e y w o r d . c -- Keywords management
* k e y w o r d . c -- Keywords management
*
* Copyright © 1993-2011 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright © 1993-2018 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* 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
......@@ -20,17 +20,17 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 19-Nov-1993 16:12
* Last file update: 27-Jul-2011 22:53 (eg)
* Last file update: 5-Oct-2018 18:04 (eg)
*/
#include "stklos.h"
#include "hash.h"
static struct hash_table_obj keyword_table; /* The keyword "obarray" */
static struct hash_table_obj keyword_table; /* The keyword "obarray" */
/*===========================================================================*\
* Utilities
* Utilities
\*===========================================================================*/
static void error_bad_keyword(SCM obj)
......@@ -53,7 +53,7 @@ static SCM make_uninterned_keyword(char *name)
SCM z;
NEWCELL(z, keyword);
SYMBOL_PNAME(z) = name; /* already duplicated in STk_makekey */
SYMBOL_PNAME(z) = name; /* already duplicated in STk_makekey */
BOXED_INFO(z) |= STk_symbol_flags(name);
return z;
}
......@@ -88,7 +88,7 @@ SCM STk_makekey(char *token)
/*===========================================================================*\
*
* PRIMITIVES
* PRIMITIVES
*
\*===========================================================================*/
......@@ -227,9 +227,9 @@ DEFINE_PRIMITIVE("key-set!", key_set, subr3, (SCM l, SCM key, SCM val))
for (i = 0; i < len; i+=2) {
if (!KEYWORDP(CAR(l))) error_bad_keyword(CAR(l));
if (strcmp(KEYWORD_PNAME(CAR(l)), KEYWORD_PNAME(key))==0) {
if (BOXED_INFO(l) & CONS_CONST) error_const_cell(l);
CAR(CDR(l)) = val;
return save;
if (BOXED_INFO(l) & CONS_CONST) error_const_cell(l);
CAR(CDR(l)) = val;
return save;
}
l = CDR(CDR(l));
}
......@@ -271,13 +271,13 @@ static SCM key_del(SCM l, SCM key)
for (i = 0; i < len; i+=2) {
if (!KEYWORDP(CAR(l))) error_bad_keyword(CAR(l));
if (strcmp(KEYWORD_PNAME(CAR(l)), KEYWORD_PNAME(key))==0) {
if (BOXED_INFO(l) & CONS_CONST) error_const_cell(l);
if (prev == l)
return CDR(CDR(l));
else {
CDR(prev) = CDR(CDR(l));
return save;
}
if (BOXED_INFO(l) & CONS_CONST) error_const_cell(l);
if (prev == l)
return CDR(CDR(l));
else {
CDR(prev) = CDR(CDR(l));
return save;
}
}
prev = CDR(l); l = CDR(prev);
}
......@@ -297,7 +297,7 @@ DEFINE_PRIMITIVE("key-delete!", dkey_delete, subr2, (SCM l, SCM key))
DEFINE_PRIMITIVE("key-delete", key_delete, subr2, (SCM l, SCM key))
{
return key_del(STk_copy_tree(l), key);
return key_del(STk_list_copy(l), key);
}
......
......@@ -22,7 +22,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: ??-Oct-1993 21:37
* Last file update: 22-Jun-2018 13:12 (eg)
* Last file update: 5-Oct-2018 18:08 (eg)
*/
#include "stklos.h"
......@@ -647,6 +647,22 @@ DEFINE_PRIMITIVE("assoc", assoc, subr23, (SCM obj, SCM alist, SCM cmp))
}
/*
<doc R7RS list-copy
* (list-copy obj)
*
* |list-copy| recursively copies trees of pairs. If |obj| is
* not a pair, it is returned; otherwise the result is a new pair whose
* |car| and |cdr| are obtained by calling |list-copy| on
* the |car| and |cdr| of |obj|, respectively.
doc>
*/
DEFINE_PRIMITIVE("list-copy", list_copy, subr1, (SCM l))
{
return CONSP(l) ? STk_cons(STk_list_copy(CAR(l)), STk_list_copy(CDR(l))): l;
}
/***
*
* Non standard functions
......@@ -701,21 +717,6 @@ DEFINE_PRIMITIVE("list*", list_star, vsubr, (int argc, SCM *argv))
}
/*
<doc EXT copy-tree
* (copy-tree obj)
*
* |Copy-tree| recursively copies trees of pairs. If |obj| is
* not a pair, it is returned; otherwise the result is a new pair whose
* |car| and |cdr| are obtained by calling |copy-tree| on
* the |car| and |cdr| of |obj|, respectively.
doc>
*/
DEFINE_PRIMITIVE("copy-tree", copy_tree, subr1, (SCM l))
{
return CONSP(l) ? STk_cons(STk_copy_tree(CAR(l)), STk_copy_tree(CDR(l))): l;
}
/*
<doc EXT last-pair
......@@ -1019,10 +1020,10 @@ int STk_init_list(void)
ADD_PRIMITIVE(assq);
ADD_PRIMITIVE(assv);
ADD_PRIMITIVE(assoc);
ADD_PRIMITIVE(list_copy);
ADD_PRIMITIVE(pair_mutable);
ADD_PRIMITIVE(list_star);
ADD_PRIMITIVE(copy_tree);
ADD_PRIMITIVE(last_pair);
ADD_PRIMITIVE(filter);
ADD_PRIMITIVE(dfilter);
......
......@@ -15,7 +15,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: ??-???-1994 ??:??
* Last file update: 21-Mar-2018 11:30 (eg)
* Last file update: 5-Oct-2018 18:03 (eg)
*
* Code for Win32 conributed by (Paul Anderson <paul@grammatech.com> and
* Sarah Calvo <sarah@grammatech.com>) has been deleted for now. It should be
......@@ -592,7 +592,7 @@ doc>
DEFINE_PRIMITIVE("process-list", proc_list, subr0, (void))
{
PURGE_PROCESS_TABLE();
return STk_copy_tree(all_processes);
return STk_list_copy(all_processes);
}
......
/*
* socket.c -- Socket acess for STklos
* socket.c -- Socket acess for STklos
*
* Copyright © 2003-2011 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
* Copyright © 2003-2018 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
*
*
* This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@essi.fr]
* Creation date: 3-Jan-2003 18:45 (eg)
* Last file update: 27-May-2011 22:55 (eg)
* Last file update: 5-Oct-2018 18:02 (eg)
*/
#include <sys/types.h>
......@@ -38,7 +38,7 @@
/*===========================================================================*\
*
* Definition of the socket type
* Definition of the socket type
*
\*===========================================================================*/
static void print_socket(SCM sock, SCM port, int mode)
......@@ -47,9 +47,9 @@ static void print_socket(SCM sock, SCM port, int mode)
SCM name = SOCKET_HOSTNAME(sock);
sprintf(buffer, "#[%s-socket %s:%ld (%d)]",
(SOCKET_TYPE(sock) == SOCKET_SERVER) ? "server" : "client",
((name == STk_false) ? "*none*" : (char *) STRING_CHARS(name)),
SOCKET_PORTNUM(sock), SOCKET_FD(sock));
(SOCKET_TYPE(sock) == SOCKET_SERVER) ? "server" : "client",
((name == STk_false) ? "*none*" : (char *) STRING_CHARS(name)),
SOCKET_PORTNUM(sock), SOCKET_FD(sock));
STk_puts(buffer, port);
}
......@@ -63,7 +63,7 @@ static void socket_finalizer(SCM socket);
/*===========================================================================*\
*
* UTILITIES
* UTILITIES
*
\*===========================================================================*/
......@@ -124,7 +124,7 @@ static void set_socket_io_ports(SCM sock, int line_buffered)
/*===========================================================================*\
*
* MAKE-SERVER-SOCKET
* MAKE-SERVER-SOCKET
*
\*===========================================================================*/
......@@ -162,7 +162,7 @@ DEFINE_PRIMITIVE("make-server-socket", make_server_socket, subr01, (SCM port))
/* Bind the socket to a name */
sin.sin_family = AF_INET;
sin.sin_port = htons(portnum);
sin.sin_port = htons(portnum);
sin.sin_addr.s_addr = INADDR_ANY;
if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
......@@ -185,16 +185,16 @@ DEFINE_PRIMITIVE("make-server-socket", make_server_socket, subr01, (SCM port))
/* Now we can create the socket object */
NEWCELL(z, socket);
SOCKET_PORTNUM(z) = ntohs(sin.sin_port);
SOCKET_PORTNUM(z) = ntohs(sin.sin_port);
SOCKET_HOSTNAME(z) = STk_false;
SOCKET_HOSTIP(z) = STk_false;
SOCKET_FD(z) = s;
SOCKET_TYPE(z) = SOCKET_SERVER;
SOCKET_IN(z) = STk_false;
SOCKET_OUT(z) = STk_false;
SOCKET_READY(z) = STk_false;
SOCKET_CHILDREN(z) = STk_nil;
SOCKET_USER_DATA(z) = NULL;
SOCKET_FD(z) = s;
SOCKET_TYPE(z) = SOCKET_SERVER;
SOCKET_IN(z) = STk_false;
SOCKET_OUT(z) = STk_false;
SOCKET_READY(z) = STk_false;
SOCKET_CHILDREN(z) = STk_nil;
SOCKET_USER_DATA(z) = NULL;
STk_register_finalizer(z, socket_finalizer);
......@@ -204,7 +204,7 @@ DEFINE_PRIMITIVE("make-server-socket", make_server_socket, subr01, (SCM port))
/*===========================================================================*\
*
* MAKE-CLIENT-SOCKET
* MAKE-CLIENT-SOCKET
*
\*===========================================================================*/
......@@ -261,10 +261,10 @@ static SCM internal_init_client_socket(SCM hostname, SCM port)
SOCKET_PORTNUM(z) = ntohs(server.sin_port); /* Query true value */
SOCKET_HOSTNAME(z) = STk_Cstring2string((char *) hp->h_name);
SOCKET_HOSTIP(z) = STk_Cstring2string((char *) inet_ntoa(server.sin_addr));
SOCKET_FD(z) = s;
SOCKET_FD(z) = s;
SOCKET_TYPE(z) = SOCKET_CLIENT;
SOCKET_IN(z) = STk_false;
SOCKET_OUT(z) = STk_false;
SOCKET_IN(z) = STk_false;
SOCKET_OUT(z) = STk_false;
SOCKET_READY(z) = STk_false;
SOCKET_PARENT(z) = STk_nil;
SOCKET_USER_DATA(z)= NULL;
......@@ -276,14 +276,14 @@ static SCM internal_init_client_socket(SCM hostname, SCM port)
DEFINE_PRIMITIVE("%initialize-client-socket", init_client_socket, subr2,
(SCM hostname, SCM port))
(SCM hostname, SCM port))
{
return internal_init_client_socket(hostname, port);
}
DEFINE_PRIMITIVE("make-client-socket", make_client_socket, subr23,
(SCM hostname, SCM port, SCM line_buffered))
(SCM hostname, SCM port, SCM line_buffered))
{
SCM sock;
......@@ -298,7 +298,7 @@ DEFINE_PRIMITIVE("make-client-socket", make_client_socket, subr23,
/*===========================================================================*\
*
* SOCKET-SHUTDOWN
* SOCKET-SHUTDOWN
*
\*===========================================================================*/
......@@ -339,7 +339,7 @@ DEFINE_PRIMITIVE("socket-shutdown", socket_shutdown, subr12, (SCM sock, SCM clos
if (SOCKET_TYPE(sock) == SOCKET_SERVER) { /* Shutdown associated client sockets */
SCM tmp;
for (tmp = STk_copy_tree(SOCKET_CHILDREN(sock)); !NULLP(tmp); tmp = CDR(tmp)){
for (tmp = STk_list_copy(SOCKET_CHILDREN(sock)); !NULLP(tmp); tmp = CDR(tmp)){
STk_socket_shutdown(CAR(tmp), closeit);
}
} else { /* Delete this socket from the server socket (if needed) */
......@@ -386,7 +386,7 @@ static void socket_finalizer(SCM socket)
/*===========================================================================*\
*
* SOCKET-ACCEPT
* SOCKET-ACCEPT
*
\*===========================================================================*/
......@@ -429,7 +429,7 @@ static void socket_finalizer(SCM socket)
doc>
*/
DEFINE_PRIMITIVE("socket-accept", socket_accept, subr12,
(SCM serv, SCM line_buffered))
(SCM serv, SCM line_buffered))
{
char *s;
struct sockaddr_in sin;
......@@ -454,10 +454,10 @@ DEFINE_PRIMITIVE("socket-accept", socket_accept, subr12,
SOCKET_PORTNUM(z) = SOCKET_PORTNUM(serv);
SOCKET_HOSTNAME(z) = STk_Cstring2string(host ? (char*)host->h_name : s);
SOCKET_HOSTIP(z) = STk_Cstring2string(s);
SOCKET_FD(z) = new_s;
SOCKET_FD(z) = new_s;
SOCKET_TYPE(z) = SOCKET_CLIENT;
SOCKET_IN(z) = STk_false;
SOCKET_OUT(z) = STk_false;
SOCKET_IN(z) = STk_false;
SOCKET_OUT(z) = STk_false;
SOCKET_READY(z) = STk_false;
SOCKET_PARENT(z) = serv;
SOCKET_USER_DATA(z)= NULL;
......@@ -475,7 +475,7 @@ DEFINE_PRIMITIVE("socket-accept", socket_accept, subr12,
/*===========================================================================*\
*
* SOCKET PRIMITIVES
* SOCKET PRIMITIVES
*
\*===========================================================================*/
......@@ -638,7 +638,7 @@ DEFINE_PRIMITIVE("socket-local-address", socket_local_addr, subr1, (SCM sock))
/*===========================================================================*\
*
* Initialization
* Initialization
*
\*===========================================================================*/
int STk_init_socket(void)
......
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 28-Dec-1999 22:58 (eg)
* Last file update: 13-Sep-2018 15:41 (eg)
* Last file update: 5-Oct-2018 18:03 (eg)
*/
......@@ -642,7 +642,7 @@ EXTERN_PRIMITIVE("list", list, vsubr, (int argc, SCM * argv));
EXTERN_PRIMITIVE("memq", memq, subr2, (SCM obj, SCM list));
EXTERN_PRIMITIVE("reverse", reverse, subr1, (SCM l));
EXTERN_PRIMITIVE("reverse!", dreverse, subr1, (SCM l));
EXTERN_PRIMITIVE("copy-tree", copy_tree, subr1, (SCM l));
EXTERN_PRIMITIVE("list-copy", list_copy, subr1, (SCM l));
EXTERN_PRIMITIVE("assq", assq, subr2, (SCM obj, SCM alist));
EXTERN_PRIMITIVE("assv", assv, subr2, (SCM obj, SCM alist));
EXTERN_PRIMITIVE("assoc", assoc, subr23, (SCM obj, SCM alist, SCM cmp));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment