1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00
Commit graph

558 commits

Author SHA1 Message Date
Mikael Djurfeldt
77a6036bd1 * symbols.c (msymbolize): Bugfix: Must initialize property list to
SCM_EOL.
1997-02-28 23:10:00 +00:00
Mikael Djurfeldt
f76c22afd3 * procs.c: Introduce the existent C function scm_thunk_p at the
Scheme level as well.
1997-02-28 21:37:30 +00:00
Mikael Djurfeldt
1dd28b3d65 * symbols.c, symbols.h (scm_symbol_value0): New function. Can be
used from C to easily lookup the value of a symbol in the current
module.
1997-02-26 12:08:26 +00:00
Mikael Djurfeldt
15ae1beecf * configure.in: Added AM_MAINTAINER_MODE
Makefile.in, aclocal.m4, configure: Regenerated
1997-02-24 23:35:55 +00:00
Mikael Djurfeldt
175475a8fc * unif.c (scm_init_unif): Added #include "unif.x". (There are two
scm_init_unif in this file.  This will also fix a previous problem
with guile-snarf.)
1997-02-24 23:21:23 +00:00
Mikael Djurfeldt
01c77a0aa2 * gdb_interface.h (GDB_INTERFACE): Added some (void *) casts to avoid
warnings.
1997-02-21 23:02:01 +00:00
Marius Vollmer
a7580a9738 *** empty log message *** 1997-02-21 18:22:50 +00:00
Marius Vollmer
78bda5f34f * Makefile.am (EXTRA_libguile_la_SOURCES): New variable to hold
source files that are not always included in libguile but should
have their dependencies calculated by automake.  This variable is
recognized by automake, no further magic is needed.
(libguile_la_DEPENDENCIES): Changed to @LIBLOBJS@.  Libtool wants
to deal exclusively with *.lo files, as it seems.  The *.o files
are built automatically when the corresponding *.lo file gets
built.
1997-02-21 18:21:53 +00:00
Jim Blandy
413b4ab645 *** empty log message *** 1997-02-19 19:05:24 +00:00
Jim Blandy
9d0fddf0e4 * list.h (scm_list_cdr_ref): Delete prototype; function no longer
exists.
1997-02-19 19:05:11 +00:00
Gary Houston
0aa0871fc1 * unif.c (scm_array_set_x): minor change to argument error checking. 1997-02-15 18:49:59 +00:00
Jim Blandy
9dcf6a0294 * Makefile.am (libguile_la_SOURCES): Remove backtrace.c, debug.c,
inet_aton.c, srcprop.c, stacks.c, and strerror.c from this list.
They should only be included in the library at configure.in's
discretion.
(libguile_la_LDADD): Include the appropriate .lo files here.
(libguile_la_DEPENDENCIES): List the corresponding .o files here,
so we know when to build them (and their .lo bretheren).
* configure.in (LIBLOBJS): New substituted variable.  We let
configure decide which .o files to include in LIBOBJS, and then
put the corresponding list of .lo files in LIBLOBJS.  The latter
is what we pass to libtool.
* Makefile.in, configure: regenerated.
1997-02-11 23:25:55 +00:00
Mikael Djurfeldt
5aab5d961c * symbols.c (scm_sysintern0): New function. Contains the core of
old scm_sysintern but doesn't take a second value argument.
(scm_sysintern): Now uses scm_sysintern0.
(scm_sysintern_no_module_lookup): Renamed to
scm_sysintern0_no_module_lookup and doesn't take a second value
argument any longer.

* symbols.h (scm_sysintern0: Added declaration.

* options.c (scm_init_opts): Use scm_sysintern0 instead of
scm_sysintern when interning option keys.  Otherwise we risk
destroying the values of already interned variables.

* symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
scheme-level boolean (use SCM_NFALSEP).

* backtrace.c (scm_init_backtrace): Make Scheme-level variable
`the-last-stack'.
(scm_backtrace): New function. (C version of old function from
boot-9.scm) Motivation: Make it possible to display backtraces
without depending on boot-9.scm.  (I'm uncertain if this
motivation is good enough...)

* root.h (scm_root_state): Add member the_last_stack_var.
(scm_the_stack_var): Defined to scm_root->the_last_stack_var.

* root.c (mark_root): Mark scm_the_last_stack_var.

* init.c (scm_start_stack): Initialize scm_the_last_stack_var to
SCM_BOOL_F.
1997-02-10 01:01:54 +00:00
Mikael Djurfeldt
3197e30d2e * throw.c (mark_lazy_catch, free_lazy_catch): Removed.
1. mark_lazy_catch didn't mark the smob.
2. Both functions above have standard variants:
(lazy_catch_funs): Changed mark_lazy_catch --> scm_mark0,
free_lazy_catch --> scm_free0.
1997-02-09 16:21:49 +00:00
Jim Blandy
2e4fe934c1 *** empty log message *** 1997-02-07 22:41:10 +00:00
Jim Blandy
ccbfefb7cf * throw.c (scm_internal_lazy_catch): New function.
(scm_lazy_catch): Rewritten to use it.
(scm_ithrow): Handle the new lazy catch representation.
Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
that doesn't have a jmpbuf is a lazy catch clause.
(tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
free_lazy_catch, print_lazy_catch, lazy_catch_funs,
make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
smob.
(scm_init_throw): Register the new lazy-catch smob type.
* throw.h (scm_internal_lazy_catch): decl for new function.
1997-02-07 22:38:27 +00:00
Jim Blandy
3eed34754c * throw.c (scm_internal_lazy_catch): New function.
(scm_lazy_catch): Rewritten to use it.
(scm_ithrow): Handle the new lazy catch representation.
Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
that doesn't have a jmpbuf is a lazy catch clause.
(tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
free_lazy_catch, print_lazy_catch, lazy_catch_funs,
make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
smob.
(scm_init_throw): Register the new lazy-catch smob type.
* throw.h (scm_internal_lazy_catch): decl for new function.

* throw.c (scm_internal_catch): Doc fixes.
1997-02-07 22:38:20 +00:00
Jim Blandy
2b6b80bc0b * alloca.c: New file, needed to support the AC_FUNC_ALLOCA call in
configure.in.  Including this might cause problems if applications
that link against libguile include their own copies of alloca, but
if they're using autoconf, they should be adding libguile to LIBS
before calling AC_FUNC_ALLOCA anyway, in which case they'll find
the copy in libguile, and things will be okay.  (I think.)
1997-02-07 22:37:10 +00:00
Gary Houston
c101e39e41 * strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from
unif.c.
strop.h: move prototypes too.
* posix.c (scm_init_posix): don't intern EINTR since it's now done
elsewhere.

* ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
etc.  I deleted them from filesys.c long ago, but didn't
notice they were here too (although ineffective since
sys/stat.h wasn't included).
1997-02-06 07:05:08 +00:00
Tom Tromey
5862b540cd * eval.c: Don't define alloca in GCC case. gcc will automatically
use __builtin_alloca if appropriate.
1997-02-05 18:19:57 +00:00
Jim Blandy
c687fa59a0 *** empty log message *** 1997-02-04 23:30:20 +00:00
Jim Blandy
c4ac4d8862 * eval.c (safe_setjmp): New function: trivial wrapper for setjmp.
(SCM_CEVAL, SCM_APPLY): Call it, instead of setjmp, to make sure
that values of automatic variables are preserved.  See comments
for safe_setjmp for details.
1997-02-04 23:30:07 +00:00
Jim Blandy
c4314b4ff4 *** empty log message *** 1997-02-04 22:22:19 +00:00
Jim Blandy
a7254b728d Change from Thomas Morgan:
* variable.c: Include eq.h.
(var_equal): New function.
(variable_smob): Use var_equal as the discriminator for variables.
1997-02-04 22:21:37 +00:00
Jim Blandy
995a6fd817 * throw.c (s_throw): Remove extraneous declaration. 1997-02-04 22:21:31 +00:00
Jim Blandy
bd4b91edbb *** empty log message *** 1997-02-04 22:13:52 +00:00
Jim Blandy
cda553163a * simpos.c (SYSTNAME): Accept both 'unix' and '__unix' as
indications of Unixness.
* stime.c: Same.
1997-02-04 22:00:42 +00:00
Jim Blandy
abda0c5959 * configure.in: Call AC_FUNC_ALLOCA, to see if we have alloca.
* eval.c: Add necessary CPP cruft to support that.
* configure, Makefile.in, scmconfig.h.in: regenerated.
1997-02-04 22:00:30 +00:00
Jim Blandy
5ede70d071 *** empty log message *** 1997-02-04 21:59:53 +00:00
Jim Blandy
4f4383ab5c Change from Thomas Morgan:
* procprop.c (scm_procedure_properties): Convert the Scheme
boolean returned by scm_procedure_p into a C boolean before using
it as a condition for SCM_ASSERT.
(scm_procedure_property): Likewise.
1997-02-04 21:59:40 +00:00
Jim Blandy
48b96f4b04 * configure.in: Call AC_FUNC_ALLOCA, to see if we have alloca.
* eval.c: Add necessary CPP cruft to support that.
* configure, Makefile.in: regenerated.
1997-02-04 21:59:23 +00:00
Gary Houston
03bc438643 * * net_db.c (scm_lnaof): change scheme name from lnaof to inet-lnaof.
* read.c (scm_lreadr): use scm_misc_error to improve one of the
	"unknown # object" error messages.

	* strop.c (scm_i_index, scm_i_rindex): combine into one procedure
	(scm_i_index) and declare it static.  Add a 'direction' argument
	to indicate what way the search should go.
	(scm_i_index): throw out-of-range error instead	of wrong-type-arg
	if indices are bad.
	(scm_string_index, scm_string_rindex): adjust usage of scm_i_index.
	strop.h: remove scm_i_index, scm_i_rindex prototypes.
1997-02-04 05:27:57 +00:00
Gary Houston
063e05bed8 * ioext.c, ioext.h: remove obsolete _sys_ from 9 procedure names.
*	* posix.c (scm_fork): Scheme name changed from fork to primitive-fork,
	to avoid clash with various scsh forks.
1997-01-31 04:36:24 +00:00
Mikael Djurfeldt
ad31050811 The following two changes (ramap.c, throw.c) are motivated by the
apparent unportability of forward declarations of static arrays of
the form `static foo bar[];'.

* ramap.c (scm_array_fill_x): Moved above scm_array_fill_int.
(ra_rpsubrs, ra_asubrs): Moved to the top of array code.

* throw.c (scm_throw): Moved above scm_ithrow.

* options.h: Removed the extern declarations of scm_yes_sym and
scm_no_sym since these are static.
1997-01-30 20:25:09 +00:00
Mark Galassi
87f2fb7223 small manual stuff 1997-01-28 14:46:20 +00:00
Gary Houston
1146b6cda2 * ports.c: add SCM_PROC declarations for pt-size and pt-member.
* Makefile.am: remove AWK=@AWK@.
	Add a rule for generating errnos.list.
	(CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.

	* configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
	don't extract errnos, just set a variable (avoids the
	need to recompile error.c just because configure is run.)

	* unif.h: update prototypes.
	* unif.c (scm_uniform_array_read,write): change the offset and
	length arguments to start and end, for consistency.

	* __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.

	* ioext.h: update prototypes.
*	* ioext.c (scm_read_delimited_x): replaces scm_read_line and
	scm_read_line_x, it's a more general procedure using an
	interface from scsh.  read-line and read-line! are now defined
	in boot-9.scm.
*  	Note that the new read-line trims the terminator
	by default, previously it was appended to the returned string.  An
	optional argument specifies how to process the terminator (scsh
	compatible).  For the old behaviour: (read-line port 'concat).
	scm_read_line, scm_read_line_x: deleted.  (read-line port 'split)
	returns a pair, but is converted to multiple values if the scsh
	module is loaded.

	socket.h: update prototypes.
	* socket.c (scm_recvfrom): for consistency with other procedures,
	take start and end as separate optional arguments.
*	(scm_recv, scm_recvfrom): don't allow the second argument
	to be a size, only a buffer.  Change the scheme names to
	recv! and recvfrom!.  Don't return the buffer.

	* ioext.h, posix.h: move prototypes too.
	* ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
	moved back from posix.c to ioext.c.  Also move #includes of "genio.h"
	"read.h" and "unif.h".
	* ioext.c: include "chars.h"
1997-01-25 18:23:49 +00:00
Marius Vollmer
a063340e82 added lost entries after getting confused about a conflict 1997-01-22 22:35:21 +00:00
Mark Galassi
ad93808a69 added newdoc tree 1997-01-21 15:27:49 +00:00
Marius Vollmer
96599e6aaf * dynl.c: The dynamic linking and module registration functions
are now defined even when dynamic linking is not available for the
host system.  Some of their functionality can be done without
dynamic linking; when it's really needed, they throw errors.
1997-01-20 19:11:41 +00:00
Gary Houston
3d8d56dfac * init.scm (index, rindex): replace versions in utilities.scm with
primitives.
	load errno.scm.

	* netconst.scm: undefine maybe-define and maybe-define-so after use.
	* errno.scm: new file.

	* fports.c (scm_open_file): pass errno to scm_syserror_msg.
	* filesys.h: update prototypes.  Remove macros: SCM_FD_P, SCM_FD_FLAGS,
	SCM_FD.
	* filesys.c (scm_sys_stat, scm_sys_lstat): pass errno to
	scm_syserror_msg.
*	(scm_sys_read_fd, scm_sys_write_fd, scm_sys_close, scm_sys_lseek,
	scm_sys_dup): deleted: FD capability will be added to other
	procedures.
*	Remove support for the FD object type: scm_tc16_fd, scm_fd_print,
	scm_fd_free, fd_smob, scm_intern_fd.
*	(scm_open): renamed from scm_sys_open.  Return a port instead of
	an FD object.  Make the mode argument optional.
*	(scm_sys_create): deleted, it's just a special case of open.
	(scm_init_filesys): move interning of constants O_CREAT etc.,
	here (were previously using SCM_CONST_LONG macro).
	Add missing constants: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT.
	don't newsmob fd.
	(numerous _sys_ procedures): remove gratuitous _sys_ from names.
	include "fports.h" and <stdio.h>
	(scm_stat, scm_select): don't support FD objects.

	* error.h: adjust scm_syserror_msg prototype.
	* error.c (scm_syserror_msg): take an extra argument for errno.
	Using the global value didn't always work, since it could be
	reset by procedure calls in the message or args arguments.

	* fports.c (scm_setbuf0): call setbuf even if FIONREAD is not defined.
	I don't understand why the check was there (and what about the
	ultrix check?)

	* strop.c (scm_string_copy): allow shared substrings to be copied.

	* unif.h: corresponding change to prototypes.
	* unif.c (scm_uniform_array_read_x, scm_uniform_array_write_x):
	recognize two new optional arguments: offset and length.  Allow
	the port argument to be an integer (file descriptor, for scsh).
	Include <unistd.h> for "read" prototype.
1997-01-18 17:51:33 +00:00
Jim Blandy
3f81f8f238 *** empty log message *** 1997-01-18 16:48:23 +00:00
Marius Vollmer
08f3ac022a *** empty log message *** 1997-01-18 11:51:03 +00:00
Marius Vollmer
9b8d32883e * symbols.c (scm_sysintern): Renamed to
scm_sysintern_no_module_lookup.
(scm_sysintern): New function to take the place of the old
scm_sysintern. It uses the current toplevel lookup closure to give
the symbol its value.  This is a temporary hack to put packages
like gtcltk into their own module.
(scm_can_use_top_level_lookup_closure_var): New variable to tell
us whether `scm_top_level_lookup_closure_var' has been initialized
and is usable.
* eval.c (scm_init_eval): Set it.
1997-01-18 11:49:35 +00:00
Marius Vollmer
80bc78903a * dynl.c (scm_dynamic_func): New function to get the address of a
function in a dynamic object.
(scm_dynamic_call, scm_dynamic_args_call): Accept the values
produced by scm_dynamic_func as the thing to call.

* dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c: Restructured.
(scm_register_module_xxx, scm_registered_modules,
scm_clear_registered_modules): New functions.
1997-01-18 11:40:31 +00:00
Marius Vollmer
d914fd5fbf * configure.in: Only define DYNAMIC_LINKING when one of the system
dependent functions is detected.
1997-01-18 11:38:15 +00:00
Jim Blandy
e53cfd29f0 *** empty log message *** 1997-01-14 17:55:17 +00:00
Gary Houston
be9edf15fb * Makefile.am: add AWK=@AWK@ (?) 1997-01-13 06:22:51 +00:00
Gary Houston
ee78fbb067 * Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
errnos_get.c.
Add a rule to generate errnos.c from errnos.
* error.c (scm_init_error): include errnos.c.
* errnos_cnvt.awk: new file, converts the list of errno codes to
C expressions.
* errnos_get.c: new file.
* errnos.default: new file, contains errnos to try if they can't
be extracted from errno.h.
* configure.in: if using GCC, try and extract errno codes from
errno.h.
Added AC_PROG_AWK.
1997-01-13 04:05:27 +00:00
Marius Vollmer
b9e19a2773 *** empty log message *** 1997-01-11 19:01:21 +00:00
Marius Vollmer
1bb9f4dbf6 * configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
* Makefile.am: Made libguile into a libtool library.
* PLUGIN/guile.config: Removed "-L ../libguile" from xtra_cflags.
Set libtool_libs to indicate that libguile is a libtool library.
See guile/ChangeLog for details.
* .cvsignore: ignore "*.lo", the libtool library objects.
1997-01-11 19:00:04 +00:00