|
From: <cli...@li...> - 2005-06-06 12:43:31
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/src lispbibl.d,1.637,1.638 pathname.d,1.371,1.372 ChangeLog,1.4662,1.4663 (Bruno Haible) 2. clisp/src pathname.d,1.372,1.373 ChangeLog,1.4663,1.4664 (Bruno Haible) 3. clisp/src pathname.d,1.373,1.374 lispbibl.d,1.638,1.639 ChangeLog,1.4664,1.4665 (Bruno Haible) 4. clisp/src lisparit.d,1.79,1.80 lispbibl.d,1.639,1.640 ChangeLog,1.4665,1.4666 (Bruno Haible) 5. clisp/src error.d,1.130,1.131 lispbibl.d,1.640,1.641 ChangeLog,1.4666,1.4667 (Bruno Haible) 6. clisp/src socket.d,1.92,1.93 lispbibl.d,1.641,1.642 ChangeLog,1.4667,1.4668 (Bruno Haible) 7. clisp/src stream.d,1.521,1.522 lispbibl.d,1.642,1.643 ChangeLog,1.4668,1.4669 (Bruno Haible) 8. clisp/src lispbibl.d,1.643,1.644 ChangeLog,1.4669,1.4670 (Bruno Haible) 9. clisp/src lispbibl.d,1.644,1.645 ChangeLog,1.4670,1.4671 (Bruno Haible) 10. clisp/src lispbibl.d,1.645,1.646 ChangeLog,1.4671,1.4672 (Bruno Haible) --__--__-- Message: 1 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src lispbibl.d,1.637,1.638 pathname.d,1.371,1.372 ChangeLog,1.4662,1.4663 Date: Mon, 06 Jun 2005 11:24:15 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2840/src Modified Files: lispbibl.d pathname.d ChangeLog Log Message: Declare if_does_not_exist_symbol, if_exists_symbol, since genclisph uses it. Index: pathname.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/pathname.d,v retrieving revision 1.371 retrieving revision 1.372 diff -u -d -r1.371 -r1.372 --- pathname.d 30 May 2005 13:21:41 -0000 1.371 +++ pathname.d 6 Jun 2005 11:24:09 -0000 1.372 @@ -6366,7 +6366,8 @@ } } -/* check the :IF-DOES-NOT-EXIST argument */ +/* check the :IF-DOES-NOT-EXIST argument + check_if_does_not_exist(argument) */ global if_does_not_exist_t check_if_does_not_exist (object if_not_exist) { if (!boundp(if_not_exist)) return IF_DOES_NOT_EXIST_UNBOUND; @@ -6384,6 +6385,9 @@ fehler(type_error,GETTEXT("~S: illegal ~S argument ~S")); } } + +/* Converts a :IF-DOES-NOT-EXIST enum item to a symbol. + if_does_not_exist_symbol(item)*/ global object if_does_not_exist_symbol (if_does_not_exist_t if_not_exist) { switch (if_not_exist) { case IF_DOES_NOT_EXIST_UNBOUND: return unbound; @@ -6394,7 +6398,8 @@ NOTREACHED; } -/* check the :IF-EXISTS argument */ +/* check the :IF-EXISTS argument + check_if_exists(argument) */ global if_exists_t check_if_exists (object if_exists) { if (!boundp(if_exists)) return IF_EXISTS_UNBOUND; @@ -6419,6 +6424,9 @@ fehler(type_error,GETTEXT("~S: illegal ~S argument ~S")); } } + +/* Converts a :IF-EXISTS enum item to a symbol. + if_exists_symbol(item) */ global object if_exists_symbol (if_exists_t if_exists) { switch (if_exists) { /* :IF-EXISTS */ case IF_EXISTS_UNBOUND: return unbound; @@ -6667,7 +6675,8 @@ pftimepoint = &filedata.ftCreationTime; \ convert_time(pftimepoint,timepointp); \ } -#define READDIR_entry_size() (((uint64)filedata.nFileSizeHigh<<32)|filedata.nFileSizeLow) + #define READDIR_entry_size() \ + (((uint64)filedata.nFileSizeHigh<<32)|filedata.nFileSizeLow) #endif #ifdef UNIX Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.637 retrieving revision 1.638 diff -u -d -r1.637 -r1.638 --- lispbibl.d 30 May 2005 13:07:52 -0000 1.637 +++ lispbibl.d 6 Jun 2005 11:24:08 -0000 1.638 @@ -13827,6 +13827,7 @@ extern direction_t check_direction (object dir); # check the :IF-DOES-NOT-EXIST argument +# check_if_does_not_exist(argument) # return one of the following: typedef enum { IF_DOES_NOT_EXIST_UNBOUND, @@ -13836,7 +13837,12 @@ } if_does_not_exist_t; extern if_does_not_exist_t check_if_does_not_exist (object if_not_exist); +# Converts a :IF-DOES-NOT-EXIST enum item to a symbol. +# if_does_not_exist_symbol(item) +extern object if_does_not_exist_symbol (if_does_not_exist_t if_not_exist); + # check the :IF-EXISTS argument +# check_if_exists(argument) # return one of the following: typedef enum { IF_EXISTS_UNBOUND, @@ -13850,6 +13856,10 @@ } if_exists_t; extern if_exists_t check_if_exists (object if_exists); +# Converts a :IF-EXISTS enum item to a symbol. +# if_exists_symbol(item) +extern object if_exists_symbol (if_exists_t if_exists); + # ##################### PREDBIBL for PREDTYPE.D ############################ # # UP: test for atomic equality EQL Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4662 retrieving revision 1.4663 diff -u -d -r1.4662 -r1.4663 --- ChangeLog 5 Jun 2005 22:59:33 -0000 1.4662 +++ ChangeLog 6 Jun 2005 11:24:12 -0000 1.4663 @@ -1,3 +1,8 @@ +2005-06-04 Bruno Haible <br...@cl...> + + * lispbibl.d (if_does_not_exist_symbol, if_exists_symbol): New + declarations. + 2005-06-05 Sam Steingold <sd...@gn...> * clispload.lsp (*expected-failures*): added MISC.598 (assumes --__--__-- Message: 2 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src pathname.d,1.372,1.373 ChangeLog,1.4663,1.4664 Date: Mon, 06 Jun 2005 11:25:57 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4646/src Modified Files: pathname.d ChangeLog Log Message: Remove useless assignment: STACK_4 is not used if !HAS_DEVICE. Index: pathname.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/pathname.d,v retrieving revision 1.372 retrieving revision 1.373 diff -u -d -r1.372 -r1.373 --- pathname.d 6 Jun 2005 11:24:09 -0000 1.372 +++ pathname.d 6 Jun 2005 11:25:53 -0000 1.373 @@ -3431,10 +3431,9 @@ { var object device = STACK_4; if (boundp(device)) { /* specified ? */ - if (nullp(device) /* NIL, :UNSPECIFIC Pathname -> OK */ - || eq(device,S(Kunspecific)) || xpathnamep(device)) { - STACK_4 = NIL; - } else { /* None of the desired cases -> error: */ + if (!(nullp(device) || eq(device,S(Kunspecific)) + || xpathnamep(device))) { /* NIL or :UNSPECIFIC or Pathname -> OK */ + /* None of the desired cases -> error: */ pushSTACK(STACK_4); pushSTACK(S(Kdevice)); goto fehler_arg; } } Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4663 retrieving revision 1.4664 diff -u -d -r1.4663 -r1.4664 --- ChangeLog 6 Jun 2005 11:24:12 -0000 1.4663 +++ ChangeLog 6 Jun 2005 11:25:53 -0000 1.4664 @@ -1,5 +1,10 @@ 2005-06-04 Bruno Haible <br...@cl...> + * pathname.d (MAKE-PATHNAME): Remove useless code introduced on + 2005-05-16. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (if_does_not_exist_symbol, if_exists_symbol): New declarations. --__--__-- Message: 3 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src pathname.d,1.373,1.374 lispbibl.d,1.638,1.639 ChangeLog,1.4664,1.4665 Date: Mon, 06 Jun 2005 11:30:43 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7280/src Modified Files: pathname.d lispbibl.d ChangeLog Log Message: Declare physical_namestring in lispbibl.d, since it's used in genclisph. Index: pathname.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/pathname.d,v retrieving revision 1.373 retrieving revision 1.374 diff -u -d -r1.373 -r1.374 --- pathname.d 6 Jun 2005 11:25:53 -0000 1.373 +++ pathname.d 6 Jun 2005 11:30:37 -0000 1.374 @@ -4974,8 +4974,11 @@ VALUES1(pathname); } -/* for modules: coerce to an absolute physical pathname and - return its namestring +/* Converts an object into an absolute physical pathname and returns its + namestring. + physical_namestring(thing) + > thing: an object + < result: the namestring of the pathname denoted by thing can trigger GC */ global maygc object physical_namestring (object thing) { var object pathname = coerce_pathname(thing); Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.638 retrieving revision 1.639 diff -u -d -r1.638 -r1.639 --- lispbibl.d 6 Jun 2005 11:24:08 -0000 1.638 +++ lispbibl.d 6 Jun 2005 11:30:37 -0000 1.639 @@ -13763,6 +13763,14 @@ can trigger GC */ extern maygc bool namestring_correctly_parseable_p (gcv_object_t *path_); +/* Converts an object into an absolute physical pathname and returns its + namestring. + physical_namestring(thing) + > thing: an object + < result: the namestring of the pathname denoted by thing + can trigger GC */ +extern maygc object physical_namestring (object thing); + # UP: Gives the directory-namestring in OS-format of a halfway checked # pathname assuming that the directory of the pathname exists. # assume_dir_exists() Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4664 retrieving revision 1.4665 diff -u -d -r1.4664 -r1.4665 --- ChangeLog 6 Jun 2005 11:25:53 -0000 1.4664 +++ ChangeLog 6 Jun 2005 11:30:37 -0000 1.4665 @@ -1,5 +1,10 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (physical_namestring): New declaration. + * pathname.d (physical_namestring): Improve documentation. + +2005-06-04 Bruno Haible <br...@cl...> + * pathname.d (MAKE-PATHNAME): Remove useless code introduced on 2005-05-16. --__--__-- Message: 4 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src lisparit.d,1.79,1.80 lispbibl.d,1.639,1.640 ChangeLog,1.4665,1.4666 Date: Mon, 06 Jun 2005 11:37:52 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11072/src Modified Files: lisparit.d lispbibl.d ChangeLog Log Message: Declare to_double, to_int in lispbibl.d. Add missing documentation. Index: lisparit.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lisparit.d,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- lisparit.d 14 May 2005 13:46:07 -0000 1.79 +++ lisparit.d 6 Jun 2005 11:37:31 -0000 1.80 @@ -422,20 +422,6 @@ return obj; } -/* coercions - used in modules - can trigger GC */ -global maygc double to_double (object x) { - double ret; - x = check_real(x); - DF_to_c_double(R_rationalp(x) ? RA_to_DF(x,true) : F_to_DF(x), - (dfloatjanus*)&ret); - return ret; -} -global maygc int to_int (object x) { - x = check_integer(x); - return I_to_L(x); -} - /* UP: Returns the decimal string representation of an integer >= 0. decimal_string(x) > object x: an integer >= 0 @@ -1109,6 +1095,28 @@ return R_float_F(obj); } +/* Converts a function's argument to a C 'double'. + to_double(obj) + > obj: an object, usually a real number + < result: its value as a C 'double' + can trigger GC */ +global maygc double to_double (object x) { + double ret; + x = check_real(x); + DF_to_c_double(R_to_DF(x), (dfloatjanus*)&ret); + return ret; +} + +/* Converts a function's argument to a C 'int'. + to_int(obj) + > obj: an object, usually an integer + < result: its value as a C 'int' + can trigger GC */ +global maygc int to_int (object x) { + x = check_integer(x); + return I_to_L(x); +} + LISPFUNNF(rational,1) { /* (RATIONAL real), CLTL p. 214 */ var object x = check_real(popSTACK()); Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.639 retrieving revision 1.640 diff -u -d -r1.639 -r1.640 --- lispbibl.d 6 Jun 2005 11:30:37 -0000 1.639 +++ lispbibl.d 6 Jun 2005 11:37:31 -0000 1.640 @@ -14943,6 +14943,20 @@ extern maygc object decimal_string (object x); # is used by PATHNAME +/* Converts a function's argument to a C 'double'. + to_double(obj) + > obj: an object, usually a real number + < result: its value as a C 'double' + can trigger GC */ +extern maygc double to_double (object x); + +/* Converts a function's argument to a C 'int'. + to_int(obj) + > obj: an object, usually an integer + < result: its value as a C 'int' + can trigger GC */ +extern maygc int to_int (object x); + # ###################### FOREIGNBIBL for FOREIGN.D ########################## # #ifdef DYNAMIC_FFI Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4665 retrieving revision 1.4666 diff -u -d -r1.4665 -r1.4666 --- ChangeLog 6 Jun 2005 11:30:37 -0000 1.4665 +++ ChangeLog 6 Jun 2005 11:37:31 -0000 1.4666 @@ -1,5 +1,11 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (to_double, to_int): New declarations. + * lisparit.d (to_double, to_int): Fix missing documentation. + (to_double): Simplify. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (physical_namestring): New declaration. * pathname.d (physical_namestring): Improve documentation. --__--__-- Message: 5 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src error.d,1.130,1.131 lispbibl.d,1.640,1.641 ChangeLog,1.4666,1.4667 Date: Mon, 06 Jun 2005 11:47:28 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16435/src Modified Files: error.d lispbibl.d ChangeLog Log Message: Declare check_classname in lispbibl.d, since genclisph needs it. Add missing documentation. Index: error.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/error.d,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- error.d 30 May 2005 13:03:09 -0000 1.130 +++ error.d 6 Jun 2005 11:47:14 -0000 1.131 @@ -397,23 +397,6 @@ funcall(S(correctable_error),2); } -/* Check that OBJ is of type TYPE and return it. - used only by modules at this time, thus not declared in lispbibl.d - can trigger GC */ -global maygc object check_classname (object obj, object type) { - while (!typep_classname(obj,type)) { - pushSTACK(type); /* save type */ - pushSTACK(NIL); /* no PLACE */ - pushSTACK(obj); /* TYPE-ERROR slot DATUM */ - pushSTACK(type); /* TYPE-ERROR slot EXPECTED-TYPE */ - pushSTACK(type); pushSTACK(obj); - pushSTACK(TheSubr(subr_self)->name); - check_value(type_error,GETTEXT("~S: ~S is not of type ~S")); - obj = value1; type = popSTACK(); - } - return obj; -} - #undef OS_error #undef OS_file_error #undef OS_filestream_error @@ -796,6 +779,25 @@ VALUES1(NIL); } +/* check_classname(obj,type) + > obj: an object + > classname: a symbol expected to name a class with "proper name" classname + < result: an object of the given type, either the same as obj or a replacement + can trigger GC */ +global maygc object check_classname (object obj, object type) { + while (!typep_classname(obj,type)) { + pushSTACK(type); /* save type */ + pushSTACK(NIL); /* no PLACE */ + pushSTACK(obj); /* TYPE-ERROR slot DATUM */ + pushSTACK(type); /* TYPE-ERROR slot EXPECTED-TYPE */ + pushSTACK(type); pushSTACK(obj); + pushSTACK(TheSubr(subr_self)->name); + check_value(type_error,GETTEXT("~S: ~S is not of type ~S")); + obj = value1; type = popSTACK(); + } + return obj; +} + #ifdef FOREIGN /* check_fpointer_replacement(obj,restart_p) > obj: an object Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.640 retrieving revision 1.641 diff -u -d -r1.640 -r1.641 --- lispbibl.d 6 Jun 2005 11:37:31 -0000 1.640 +++ lispbibl.d 6 Jun 2005 11:47:15 -0000 1.641 @@ -13159,6 +13159,13 @@ extern maygc void tast_break (void); # is used by EVAL, IO, SPVW, STREAM +/* check_classname(obj,type) + > obj: an object + > classname: a symbol expected to name a class with "proper name" classname + < result: an object of the given type, either the same as obj or a replacement + can trigger GC */ +extern maygc object check_classname (object obj, object type); + #ifdef FOREIGN /* check_fpointer(obj,restart_p) > obj: an object Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4666 retrieving revision 1.4667 diff -u -d -r1.4666 -r1.4667 --- ChangeLog 6 Jun 2005 11:37:31 -0000 1.4666 +++ ChangeLog 6 Jun 2005 11:47:25 -0000 1.4667 @@ -1,5 +1,10 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (check_classname): New declaration. + * error.d (check_classname): Fix documentation. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (to_double, to_int): New declarations. * lisparit.d (to_double, to_int): Fix missing documentation. (to_double): Simplify. --__--__-- Message: 6 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src socket.d,1.92,1.93 lispbibl.d,1.641,1.642 ChangeLog,1.4667,1.4668 Date: Mon, 06 Jun 2005 11:50:06 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17760/src Modified Files: socket.d lispbibl.d ChangeLog Log Message: Declare all exported functions in lispbibl.d. Some of them are needed by genclisph. Add missing documentation. Index: socket.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/socket.d,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- socket.d 9 May 2005 16:43:59 -0000 1.92 +++ socket.d 6 Jun 2005 11:50:01 -0000 1.93 @@ -168,6 +168,7 @@ #endif #endif +/* FIXME: Add documentation */ /* for syscalls & rawsock modules */ global object addr_to_string (short type, char *addr) { var char buffer[MAXHOSTNAMELEN]; @@ -264,7 +265,8 @@ #define CLOSESOCKET(fd) \ do { while ((closesocket(fd) < 0) && sock_errno_is(EINTR)) ; } while (0) -/* A wrapper around the connect() function. */ +/* A wrapper around the connect() function. + To be used inside begin/end_system_call() only. */ global int nonintr_connect (SOCKET fd, struct sockaddr * name, int namelen) { var int retval; do { @@ -342,6 +344,8 @@ (void)family; /* ignore */ return 0; } + +/* FIXME: Add documentation */ global object string_to_addr (const char* name) { object ret; begin_system_call(); @@ -349,6 +353,7 @@ end_system_call(); return ret; } + local int resolve_host1 (const void* addr, int addrlen, int family, void* ret) { *(struct hostent**)ret = (addrlen @@ -356,6 +361,8 @@ : gethostbyname((const char*)addr)); return 0; } + +/* FIXME: Add documentation */ global struct hostent* resolve_host (object arg) { var struct hostent* he; if (eq(arg,S(Kdefault))) { @@ -528,14 +535,6 @@ /* ========================== X server connection ======================== */ -/* connect_to_x_server(): - Attempts to connect to server, given host name and display number. - Returns file descriptor (network socket). Returns -1 and sets errno - if connection fails. - An empty hostname is interpreted as the most efficient local connection to - a server on the same machine (usually a UNIX domain socket). - hostname="unix" is interpreted as a UNIX domain connection. */ - #ifndef ENOSYS #define ENOSYS EINVAL #endif @@ -605,6 +604,14 @@ #define X_TCP_PORT 6000 /* from <X11/Xproto.h> */ #endif +/* connect_to_x_server(host,display) + Attempts to connect to server, given host name and display number. + Returns file descriptor (network socket). Returns -1 and sets errno + if connection fails. + An empty hostname is interpreted as the most efficient local connection to + a server on the same machine (usually a UNIX domain socket). + hostname="unix" is interpreted as a UNIX domain connection. + To be used inside begin/end_system_call() only. */ global SOCKET connect_to_x_server (const char* host, int display) { var SOCKET fd; /* file descriptor to return */ @@ -735,14 +742,12 @@ #endif } sockaddr_max_t; -/* Auxiliary function: - socket_getlocalname(socket_handle,hd) - socket_getlocalname_aux(socket_handle,hd) - return the IP name of the localhost for the given socket. */ - -/* Fills only hd->hostname and hd->port, not hd->truename. */ +/* socket_getlocalname_aux(socket_handle,hd) + Return the IP name of the localhost for the given socket. + Fills only hd->hostname and hd->port, not hd->truename. + To be used inside begin/end_system_call() only. */ local host_data_t * socket_getlocalname_aux (SOCKET socket_handle, - host_data_t * hd ) { + host_data_t * hd) { var sockaddr_max_t addr; var SOCKLEN_T addrlen = sizeof(sockaddr_max_t); if (getsockname(socket_handle,(struct sockaddr *)&addr,&addrlen) < 0) @@ -764,7 +769,10 @@ return hd; } -/* Fills all of *hd. */ +/* socket_getlocalname(socket_handle,hd) + Return the IP name of the localhost for the given socket. + Fills all of *hd. + To be used inside begin/end_system_call() only. */ global host_data_t * socket_getlocalname (SOCKET socket_handle, host_data_t * hd, bool resolve_p) { if (socket_getlocalname_aux(socket_handle,hd) == NULL) @@ -780,11 +788,10 @@ return hd; } -/* Auxiliary function: - socket_getpeername (socket_handle, hd) - returns the name of the host to which IP socket fd is connected. */ - -/* Fills all of *hd. */ +/* socket_getpeername(socket_handle,hd) + Returns the name of the host to which IP socket fd is connected. + Fills all of *hd. + To be used inside begin/end_system_call() only. */ global host_data_t * socket_getpeername (SOCKET socket_handle, host_data_t * hd, bool resolve_p) { var sockaddr_max_t addr; @@ -831,8 +838,6 @@ This can (and should) be done multiple times for the same socket_handle. */ -global SOCKET create_server_socket (host_data_t *hd, SOCKET sock, - unsigned int port); local SOCKET bindlisten_via_ip (struct sockaddr * addr, int addrlen, void* ignore) { var SOCKET fd; @@ -859,6 +864,7 @@ saving_sock_errno(CLOSESOCKET(fd)); return INVALID_SOCKET; } + global SOCKET create_server_socket (host_data_t *hd, SOCKET sock, unsigned int port) { var SOCKET fd; @@ -909,12 +915,10 @@ } /* Creation of sockets on the client side: - SOCKET fd = create_client_socket(hostname,port,void* timeout); + SOCKET fd = create_client_socket(hostname,port,timeout); creates a connection to a server (which must be waiting on the specified host and port). */ -global SOCKET create_client_socket (const char* hostname, unsigned int port, - void* timeout); local SOCKET connect_via_ip (struct sockaddr * addr, int addrlen, void* timeout) { /* <http://cr.yp.to/docs/connect.html>: @@ -964,9 +968,9 @@ return INVALID_SOCKET; } -global SOCKET create_client_socket (const char*hostname, unsigned intport, +global SOCKET create_client_socket (const char* hostname, unsigned int port, void* timeout) { - return with_host_port(hostname,(unsigned short)intport, + return with_host_port(hostname,(unsigned short)port, &connect_via_ip,timeout); } Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.641 retrieving revision 1.642 diff -u -d -r1.641 -r1.642 --- lispbibl.d 6 Jun 2005 11:47:15 -0000 1.641 +++ lispbibl.d 6 Jun 2005 11:50:01 -0000 1.642 @@ -14456,6 +14456,73 @@ extern bool check_charset (const char * code, object charset); # used in encoding.d +# ###################### SOCKBIBL for SOCKET.D ############################# # + +#if defined(UNIX) || defined(WIN32_NATIVE) +/* FIXME: Add documentation */ +extern object addr_to_string (short type, char *addr); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) +/* A wrapper around the connect() function. + To be used inside begin/end_system_call() only. */ +extern int nonintr_connect (SOCKET fd, struct sockaddr * name, int namelen); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(TCPCONN) +/* FIXME: Add documentation */ +extern object string_to_addr (const char* name); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(TCPCONN) +/* FIXME: Add documentation */ +extern struct hostent* resolve_host (object arg); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) +/* connect_to_x_server(host,display) + Attempts to connect to server, given host name and display number. + Returns file descriptor (network socket). Returns -1 and sets errno + if connection fails. + An empty hostname is interpreted as the most efficient local connection to + a server on the same machine (usually a UNIX domain socket). + hostname="unix" is interpreted as a UNIX domain connection. + To be used inside begin/end_system_call() only. */ +extern SOCKET connect_to_x_server (const char* host, int display); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(SOCKET_STREAMS) +/* socket_getlocalname(socket_handle,hd) + Return the IP name of the localhost for the given socket. + Fills all of *hd. + To be used inside begin/end_system_call() only. */ +extern host_data_t * socket_getlocalname (SOCKET socket_handle, host_data_t * hd, bool resolve_p); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(SOCKET_STREAMS) +/* socket_getpeername(socket_handle,hd) + Returns the name of the host to which IP socket fd is connected. + Fills all of *hd. + To be used inside begin/end_system_call() only. */ +extern host_data_t * socket_getpeername (SOCKET socket_handle, host_data_t * hd, bool resolve_p); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(SOCKET_STREAMS) +/* Creates a socket to which other processes can connect. */ +extern SOCKET create_server_socket (host_data_t *hd, SOCKET sock, +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(SOCKET_STREAMS) +/* Waits for a connection to another process. */ +extern SOCKET accept_connection (SOCKET socket_handle); +#endif + +#if (defined(UNIX) || defined(WIN32_NATIVE)) && defined(HAVE_GETHOSTBYNAME) && defined(SOCKET_STREAMS) +/* Creates a connection to a server (which must be waiting + on the specified host and port). */ +extern SOCKET create_client_socket (const char* hostname, unsigned int port, void* timeout); +#endif + # ####################### SYMBIBL for SYMBOL.D ############################# # # UP: Returns the gobal definition of a symbol's function, Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4667 retrieving revision 1.4668 diff -u -d -r1.4667 -r1.4668 --- ChangeLog 6 Jun 2005 11:47:25 -0000 1.4667 +++ ChangeLog 6 Jun 2005 11:50:01 -0000 1.4668 @@ -1,5 +1,15 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (addr_to_string, nonintr_connect, string_to_addr, + resolve_host, connect_to_x_server, socket_getlocalname, + socket_getpeername, create_server_socket, accept_connection, + create_client_socket): New declarations. + * socket.d: Improve documentation. + (create_server_socket, create_client_socket): Remove redundant + declarations. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (check_classname): New declaration. * error.d (check_classname): Fix documentation. --__--__-- Message: 7 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src stream.d,1.521,1.522 lispbibl.d,1.642,1.643 ChangeLog,1.4668,1.4669 Date: Mon, 06 Jun 2005 11:54:58 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20569/src Modified Files: stream.d lispbibl.d ChangeLog Log Message: Export open_file_stream_handle, file_stream_truename from lispbibl, since genclisph uses them. Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.642 retrieving revision 1.643 diff -u -d -r1.642 -r1.643 --- lispbibl.d 6 Jun 2005 11:50:01 -0000 1.642 +++ lispbibl.d 6 Jun 2005 11:54:53 -0000 1.643 @@ -14287,6 +14287,9 @@ extern maygc Handle stream_lend_handle (object stream, bool inputp, int * handletype); /* used by STREAM */ +/* FIXME: Add documentation */ +extern object open_file_stream_handle (object stream, Handle *fd); + /* Function: Reads several bytes from a stream. read_byte_array(&stream,&bytearray,start,len,persev) > stream: stream (on the STACK) @@ -14340,6 +14343,9 @@ extern object var_stream (object sym, uintB strmflags); # is used by IO, PACKAGE, ERROR, DEBUG, SPVW +/* FIXME: Add documentation */ +extern object file_stream_truename (object s); + # UP: makes a file-stream # make_file_stream(direction,append_flag,handle_fresh) # > STACK_5: Filename, a Pathname or NIL Index: stream.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/stream.d,v retrieving revision 1.521 retrieving revision 1.522 diff -u -d -r1.521 -r1.522 --- stream.d 31 May 2005 15:07:02 -0000 1.521 +++ stream.d 6 Jun 2005 11:54:40 -0000 1.522 @@ -5954,6 +5954,7 @@ # File-Stream in general # ====================== +/* FIXME: Add documentation */ /* for syscall module */ global object file_stream_truename (object s) { return FileStream_truename(s); } @@ -17095,6 +17096,7 @@ fehler(type_error,GETTEXT("~S: argument ~S is not an open file stream")); } +/* FIXME: Add documentation */ /* for syscall module */ global object open_file_stream_handle (object stream, Handle *fd) { stream = check_open_file_stream(stream,true); Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4668 retrieving revision 1.4669 diff -u -d -r1.4668 -r1.4669 --- ChangeLog 6 Jun 2005 11:50:01 -0000 1.4668 +++ ChangeLog 6 Jun 2005 11:54:53 -0000 1.4669 @@ -1,5 +1,10 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (open_file_stream_handle, file_stream_truename): New + declarations. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (addr_to_string, nonintr_connect, string_to_addr, resolve_host, connect_to_x_server, socket_getlocalname, socket_getpeername, create_server_socket, accept_connection, --__--__-- Message: 8 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src lispbibl.d,1.643,1.644 ChangeLog,1.4669,1.4670 Date: Mon, 06 Jun 2005 11:56:47 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21838/src Modified Files: lispbibl.d ChangeLog Log Message: Declare stream_handles(). Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.643 retrieving revision 1.644 diff -u -d -r1.643 -r1.644 --- lispbibl.d 6 Jun 2005 11:54:53 -0000 1.643 +++ lispbibl.d 6 Jun 2005 11:56:42 -0000 1.644 @@ -14372,6 +14372,10 @@ extern maygc object make_file_stream (direction_t direction, bool append_flag, bool handle_at_pos_0); # is used by PATHNAME +/* check whether the object is a handle stream or a socket-server + and return its socket-like handle(s) */ +extern void stream_handles (object obj, bool check_open, bool* char_p, SOCKET* in_sock, SOCKET* out_sock); + # Makes a Broadcast-Stream using a Stream stream. # make_broadcast1_stream(stream) # can trigger GC Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4669 retrieving revision 1.4670 diff -u -d -r1.4669 -r1.4670 --- ChangeLog 6 Jun 2005 11:54:53 -0000 1.4669 +++ ChangeLog 6 Jun 2005 11:56:42 -0000 1.4670 @@ -1,5 +1,9 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (stream_handles): New declaration. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (open_file_stream_handle, file_stream_truename): New declarations. --__--__-- Message: 9 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src lispbibl.d,1.644,1.645 ChangeLog,1.4670,1.4671 Date: Mon, 06 Jun 2005 11:58:00 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22344/src Modified Files: lispbibl.d ChangeLog Log Message: Declare my_realloc(). Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.644 retrieving revision 1.645 diff -u -d -r1.644 -r1.645 --- lispbibl.d 6 Jun 2005 11:56:42 -0000 1.644 +++ lispbibl.d 6 Jun 2005 11:57:54 -0000 1.645 @@ -9374,6 +9374,10 @@ extern void* my_malloc (size_t size); /* used by FOREIGN and modules */ +/* reallocate memory and check for success */ +extern void* my_realloc (void* ptr, size_t size); +/* used by modules */ + #if defined(GNU) && (SAFETY < 2) #ifdef HAVE_BUILTIN_STRLEN #define asciz_length(a) ((uintL)__builtin_strlen(a)) Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4670 retrieving revision 1.4671 diff -u -d -r1.4670 -r1.4671 --- ChangeLog 6 Jun 2005 11:56:42 -0000 1.4670 +++ ChangeLog 6 Jun 2005 11:57:54 -0000 1.4671 @@ -1,5 +1,9 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (my_realloc): New declaration. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (stream_handles): New declaration. 2005-06-04 Bruno Haible <br...@cl...> --__--__-- Message: 10 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src lispbibl.d,1.645,1.646 ChangeLog,1.4671,1.4672 Date: Mon, 06 Jun 2005 12:41:50 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15381/src Modified Files: lispbibl.d ChangeLog Log Message: Declare convert_time_from_universal, since it's exported by genclisph. Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.645 retrieving revision 1.646 diff -u -d -r1.645 -r1.646 --- lispbibl.d 6 Jun 2005 11:57:54 -0000 1.645 +++ lispbibl.d 6 Jun 2005 12:41:43 -0000 1.646 @@ -7985,6 +7985,15 @@ # is used by PATHNAME #endif +#ifdef UNIX +/* the inverse of convert_time_to_universal() */ +extern void convert_time_from_universal (object universal, time_t* time); +#endif +#ifdef WIN32_NATIVE +/* the inverse of convert_time_to_universal() */ +extern void convert_time_from_universal (object universal, FILETIME* time); +#endif + # UP: Initializes the time variables upon the LISP-System-Start. # init_time(); extern void init_time (void); Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4671 retrieving revision 1.4672 diff -u -d -r1.4671 -r1.4672 --- ChangeLog 6 Jun 2005 11:57:54 -0000 1.4671 +++ ChangeLog 6 Jun 2005 12:41:44 -0000 1.4672 @@ -1,5 +1,9 @@ 2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (convert_time_from_universal): New declaration. + +2005-06-04 Bruno Haible <br...@cl...> + * lispbibl.d (my_realloc): New declaration. 2005-06-04 Bruno Haible <br...@cl...> --__--__-- _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest |