1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 13:00:26 +02:00
Commit graph

8347 commits

Author SHA1 Message Date
Jim Blandy
0b1786d8f2 *** empty log message *** 1997-01-07 23:12:58 +00:00
Jim Blandy
579b5bc1ee * smob.h (SCM_SMOBNUM, SCM_PTOBNUM): Remove extraneous
semicolons.  Only pure luck kept this from being noticed earlier.
1997-01-07 23:12:09 +00:00
Jim Blandy
10a12f9fb4 * simpos.c (SYSTNAME): Add case for AIX; otherwise it won't
compile.  I have a feeling this function is a bad idea anyway ---
one should always test for features, not systems.
1997-01-07 23:11:51 +00:00
Mikael Djurfeldt
239294dafd * socket.c (scm_recvfrom): Added missing semicolon. 1997-01-07 13:08:17 +00:00
Jim Blandy
af8e756ec2 *** empty log message *** 1997-01-07 00:48:16 +00:00
Gary Houston
678b85324a * socket.c (scm_recvfrom): allow buff_or_size to be a list containing
the buffer and start and end positions for SCSH networking
implementation.
1997-01-06 20:58:37 +00:00
Jim Blandy
d6b51f8d50 * configure.in: Revert previous change to this file; the problem
is due to transient automake weirdness.
* configure: Rebuilt.
1997-01-06 00:35:30 +00:00
Jim Blandy
7a8188539f *** empty log message *** 1997-01-05 22:01:56 +00:00
Jim Blandy
2c19444693 * configure.in: Call AM_PROG_INSTALL; the automake manual says we
need this if we install scripts, like guile-snarf.
* configure: Rebuilt.
1997-01-05 22:01:37 +00:00
Mikael Djurfeldt
66b62aa457 Updated. 1997-01-02 14:25:36 +00:00
Marius Vollmer
ebd75e1b18 *** empty log message *** 1997-01-02 01:04:49 +00:00
Marius Vollmer
bf5f77277b * Makefile.am (EXTRA_DIST): Added DYNAMIC-LINKING 1997-01-02 01:03:04 +00:00
Marius Vollmer
a9f041b5e8 *** empty log message *** 1996-12-29 10:38:41 +00:00
Marius Vollmer
b6356af70f * read.c (scm_lreadr): Encountering EOF after skipping a SCSH
style block comment is no longer considered an error.
1996-12-29 10:37:58 +00:00
Gary Houston
4ecd21bc8c * socket.c (scm_addr_vector): fix faulty scm_listify. 1996-12-28 19:17:39 +00:00
Marius Vollmer
11cc7dafee *** empty log message *** 1996-12-27 15:49:01 +00:00
Marius Vollmer
5c98870009 * configure.in: Create PLUGIN/guile.libs from
PLUGIN/guile.libs.in.  This is for including additonal libraries
needed for dynamic linking.
* Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in
instead of PLUGIN/guile.libs.
1996-12-27 15:43:27 +00:00
Marius Vollmer
8f3baf5a7f * configure.in: Create PLUGIN/guile.libs from
PLUGIN/guile.libs.in.  This is for including additonal libraries
needed for dynamic linking.
* Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in
instead of PLUGIN/guile.libs.

* Makefile.am: Added explicit dependency "dynl.o: dynl.x".
1996-12-27 15:42:03 +00:00
Marius Vollmer
a2ce54aeff *** empty log message *** 1996-12-27 15:38:33 +00:00
Jim Blandy
506067f046 *** empty log message *** 1996-12-23 04:39:29 +00:00
Jim Blandy
373e4035df * net_db.h (scm_init_net_db): Fix spelling from scm_init_netdb. 1996-12-23 04:37:24 +00:00
Jim Blandy
164271a1d3 * * list.c (scm_delq_x, scm_delv_x, scm_delete_x): Delete all
occurrences of the given element from the list, not just the
	first.  This is how the Emacs Lisp functions behave, how the
	analogous Common Lisp functions behave, and (I believe) how the
	older Maclisp functions worked.  I realize that this change may
	break code, but it seemed better to break it before the Guile
	release than after.
1996-12-23 04:37:17 +00:00
Jim Blandy
ef290276ac * * gc.c (scm_protect_object, scm_unprotect_object): New functions.
Their prototypes were already present in gc.h, but they weren't
	implemented.
	(scm_init_storage): Initialize scm_protects.
	* root.c (scm_protects): New element of scm_sys_protects.
1996-12-23 04:37:03 +00:00
Jim Blandy
ce2a6727dc *** empty log message *** 1996-12-22 21:36:25 +00:00
Jim Blandy
6555893051 *** empty log message *** 1996-12-22 00:03:10 +00:00
Jim Blandy
04904fdf0b * libguile.h: Don't #include "libguile/libpath.h", contrary to Oct
30 change.  That file is only meant for communication between the
configuration process and load.c.  If code linked against libguile
wants to get at the paths mentioned in libpath.h, it can call
functions declared in load.h.
1996-12-22 00:02:42 +00:00
Jim Blandy
6f9dc845e7 *** empty log message *** 1996-12-21 20:40:17 +00:00
Jim Blandy
7d2969581e * libguile.h: Added #include "libguile/net_db.h". 1996-12-21 20:40:01 +00:00
Mikael Djurfeldt
1d361fe02b * libguile.h: Removed #include "libguile/fdsocket.h" 1996-12-21 13:55:29 +00:00
Mikael Djurfeldt
cae7644108 * net_db.c: Added #include <sys/socket.h>. 1996-12-21 13:52:08 +00:00
Mark Galassi
0b7a04e01b little temp changes to work with the new catch/throw stuff 1996-12-21 05:04:04 +00:00
Jim Blandy
dfff89a16a *** empty log message *** 1996-12-21 04:49:10 +00:00
Jim Blandy
816a6f06c8 * throw.c (scm_internal_catch): Make body funcs and handler funcs
use separate data pointers, to allow them to be designed
independently and reused.
(scm_body_thunk, scm_handle_by_proc, scm_handle_by_message):
Renamed from catch_body, catch_handler, and uncaught_throw; made
generically useful.
(struct scm_catch_body_data): Renamed from catch_body_data; moved
to throw.h.
(scm_catch): Use the above.
(scm_throw): Don't bother printing a message for an uncaught
throw; we establish a default handler in init.
* throw.h (scm_internal_catch): Prototype updated.
(scm_body_thunk, scm_handle_by_proc, scm_handle_by_message): New
decls.
(struct scm_body_thunk_data): New structure, used as data
argument to scm_body_thunk.
* init.c (struct main_func_closure): New structure, packaging up
the data to pass to the user's main function.
(scm_boot_guile): Create one.  Pass it to scm_boot_guile_1.
(scm_boot_guile_1): Pass it through to invoke_main_func.  Use
scm_internal_catch to establish a catch-all handler, using
scm_handle_by_message.  This replaces the special-case code in
scm_throw.
(invoke_main_func): Body function for scm_internal_catch; invoke
the user's main function, using the main_func_closure pointer to
decide what to pass it.
* root.c (struct cwdr_body_data): Remove handler_proc member.
(cwdr): Use scm_handle_by_proc instead of cwdr_handler.
(cwdr_handler): Removed.
1996-12-21 04:48:21 +00:00
Gary Houston
370312ae6e * filesys.c (scm_input_waiting_p): use select in preference to
FIONREAD, since the latter doesn't detect EOF.
Throw error if neither select nor FIONREAD available.

* socket.c (scm_connect): take a port, not a fd object.
(scm_fill_sockaddr): throw an error if fam is not recognised.
(scm_bind): use scm_fill_sockaddr.
(scm_listen): take a port, not a fd object.
(scm_accept): take and return a port.  return CDR in the car if
address can't be got
(scm_sock_fd_to_port): new procedure.
(scm_socket): use scm_sock_fd_to_port.
(scm_addr_vector): throw error if unrecognised address type.
take an extra argument with the calling procedure name.
(scm_getsockname): take a port.  return #f if address can't be got.
(scm_getpeername): take a port.  return #f if address can't be got.
(scm_recvfrom): take a port.  return #f for address component if can't
be got.
(scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
* socket.h (SCM_P): update bind prototype.
* socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
include "feature.h".
(scm_socket): return a port, not a file descriptor object.
include "fports.h" and <unistd.h>
(scm_bind): take a port, not a file descriptor object.
take an extra argument for address args.

* net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
INADDR_NONE, INADDR_LOOPBACK.
* init.c: include net_db.h and not fdsocket.h.
(scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.

* Makefile.am: corresponding changes.
* socket.h: renamed from fdsocket.h, fix names.
* net_db.h: renamed from socket.h, fix names.
* socket.c: renamed from fdsocket.c.
remove _sys from procedure names.
(scm_init_socket): rename from scm_init_fdsocket.  include socket.x.
add "socket" to features list.
* net_db.c: renamed from socket.c.
remove _sys from procedure names.
(scm_init_net_db): rename from scm_init_socket.  include net_db.x.
add "net-db" to features list.
include "net_db.h".  don't include <sys/socket.h> or
<sys/un.h>.
1996-12-21 04:13:54 +00:00
Mikael Djurfeldt
ae603deccd *** empty log message *** 1996-12-19 13:08:26 +00:00
Mikael Djurfeldt
4816f61591 * tags.h (scm_tags): Removed comma at end of last enumerator. 1996-12-19 13:08:17 +00:00
Jim Blandy
70d4fe698a *** empty log message *** 1996-12-19 07:55:48 +00:00
Jim Blandy
c0ab1b8d03 Don't use GCC extensions to allocate space for debugging frames.
(Here he goes again!  Why do we put up with this?!)
* debug.h (scm_debug_frame): Make the 'vect' member a pointer to
an scm_debug_info structure, not an in-line array of them.  Add
'info' member, to say how many vect elements we've used, for eval
frames.
* eval.c (SCM_CEVAL): Use alloca to allocate space for vect.  Use
a new variable debug_info_end to mark the end of vect, instead of
the address of the 'info' pointer itself.
[DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of
&debug to scm_debug_frame *; debug is a real scm_debug_frame now.
(SCM_APPLY): Explicitly allocate space for debug.vect.
* debug.c (scm_m_start_stack): Same, for vframe.vect.
* stacks.c: Adjusted for new debug frame structure.
(RELOC_INFO, RELOC_FRAME): New macros.
(stack_depth, read_frames): Use them, and new scm_debug_frame
element 'info', instead of magically knowing that eval frames have
an info pointer sitting after vect.
(scm_make_stack, scm_stack_id, scm_last_stack_frame): Use
RELOC_FRAME.
(scm_init_stacks): Formatting tweaks.
1996-12-19 07:55:42 +00:00
Jim Blandy
4d46a0279b *** empty log message *** 1996-12-18 21:42:26 +00:00
Jim Blandy
4dc2435aef In some cases, the code is fine, but GCC isn't smart enough to
figure that out; this usually happens when one variable is only
initialized and used when a particular condition holds true, and
we know that condition will never change within a given invocation
of the function.  In this case, we simply initialize the variables
to placate the compiler, hopefully to a value which will cause a
crash if it is ever actually used.
* print.c (scm_iprin1): Initialize mw_pos.
* read.c (scm_lreadrecparen): Initialize tl2, ans2.
* throw.c (scm_ithrow): Initialize dynpair.
* unif.c (scm_uniform_vector_ref): Initialize cra.
* struct.c (init_struct): Initialize prot.
* mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
1996-12-18 21:42:09 +00:00
Jim Blandy
35de7ebe4a Give GCC more control flow information, so it can be sure that
variables aren't used uninitialized.
* error.h (scm_error, scm_syserror, scm_syserror_msg,
scm_sysmissing, scm_num_overflow, scm_out_of_range,
scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
scm_misc_error): Tell GCC that these functions never return.
* struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
out the field type, call abort if SCM_ASSERT returns, to placate
the optimizer.
* stacks.c (scm_make_stack, scm_last_stack_frame): abort if
scm_wta ever returns.  We can't handle this case anyway, and this
gives the optimizer more information.
* unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
scm_wta ever returns.

In some cases, the code is fine, but GCC isn't smart enough to
figure that out; this usually happens when one variable is only
initialized and used when a particular condition holds true, and
we know that condition will never change within a given invocation
of the function.  In this case, we simply initialize the variables
to placate the compiler, hopefully to a value which will cause a
crash if it is ever actually used.
* print.c (scm_iprin1): Initialize mw_pos.
* read.c (scm_lreadrecparen): Initialize tl2, ans2.
* throw.c (scm_ithrow): Initialize dynpair.
* unif.c (scm_uniform_vector_ref): Initialize cra.
* struct.c (init_struct): Initialize prot.
* mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
1996-12-18 21:41:44 +00:00
Jim Blandy
407775cb81 * strports.c (scm_eval_0str): Don't return uninitialized garbage
if EXPR contains no expressions.
1996-12-18 21:40:21 +00:00
Jim Blandy
3323ad081e Give GCC more control flow information, so it can be sure that
variables aren't used uninitialized.
* error.h (scm_error, scm_syserror, scm_syserror_msg,
scm_sysmissing, scm_num_overflow, scm_out_of_range,
scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
scm_misc_error): Tell GCC that these functions never return.
* struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
out the field type, call abort if SCM_ASSERT returns, to placate
the optimizer.
* stacks.c (scm_make_stack, scm_last_stack_frame): abort if
scm_wta ever returns.  We can't handle this case anyway, and this
gives the optimizer more information.
* unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
scm_wta ever returns.
1996-12-18 21:39:44 +00:00
Jim Blandy
1b306e1623 *** empty log message *** 1996-12-18 16:50:19 +00:00
Jim Blandy
2c8f214468 * eval.c, debug.h: Revert changes of Dec 16 and Nov 21. They
cause an infinite loop (???).  So much for the algebraic
equivalency of variable-sized arrays and alloca...
1996-12-18 16:45:03 +00:00
Marius Vollmer
e4bcd6d945 *** empty log message *** 1996-12-18 09:43:23 +00:00
Marius Vollmer
6064dcc69e * gc.c (SCM_MTRIGGER_HYSTERESIS): New memory management parameter.
(scm_must_malloc, scm_must_realloc): Added a hysteresis to the
rules for raising scm_mtrigger. Previously, unfortunate but not
unlikely circumstances could result in almost constant invokation
of the gc. Now, this situations should be less likely, but they
are not prevented completely.
1996-12-18 09:42:39 +00:00
Marius Vollmer
016e2ce1d0 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
a SCM boolean, not a C boolean.
1996-12-18 09:40:46 +00:00
Jim Blandy
5e06e4dbb5 *** empty log message *** 1996-12-17 21:24:20 +00:00
Jim Blandy
9ab5a13fc7 * numbers.c (scm_fuck): Procedure removed; looks like old test code.
* numbers.h: Prototype removed.
1996-12-17 21:24:03 +00:00