SCM_CONSP since this is a macro!; Set vframe.prev to
scm_last_debug_frame instead of 0. In this way we can look
"above" the virtual start stack frame if we wish.
(scm_debug_hang): New function: Useful for debugging Guile in
certain tricky situations. Will probably be removed later...
macros: SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER,
SCM_THREAD_ALLOW_1, SCM_THREAD_ALLOW_2. Motivation: We don't want
the main code in these macros duplicated and spread over multiple
files. Renamed SCM_THREADS_SWITCHING_CODE ->
SCM_THREAD_SWITCHING_CODE.
aren't enabled by default any longer (they are switched on in
debug.scm). But during development we want to have them also
* debug.scm: Enable debugging evaluator and recording of positions
by default.
aren't enabled by default any longer (they are switched on in
debug.scm). But during development we want to have them also
*inside* boot-9.scm. Therefore, two lines are added at the
beginning of boot-9.scm to enable these.
Motivation: This is system specific code which is related to file
I/O. It also may use select. Added code by Gary Houston to
detect presence of character in stdio buffers.
* guile-snarf.sh: New file.
* Makefile.in (inner_h_files): Added snarf.h
(ancillary, install, uninstall, distclean): Added actions for
guile-snarf.
(.c.x): Use guile-snarf.
(guile-snarf): New rule, to produce guile-snarf from guile-snarf.sh.
(gen_c_files): Note that these depend on guile-snarf.
* _scm.h: Removed the snarfing macros (SCM_PROC, etc). They are
now in "snarf.h". Added #include "snarf.h" to get them.
* configure.in: Added guile-snarf to AC_OUTPUT
* libguile.h: Added #include "snarf.h".
(Patches applied and tweaked by Jim Blandy.)
should see as little clutter as possible.
* r4rs.scm (%load-verbosely): Make this #f by default.
* boot-9.scm (scm-repl-verbose): Make this #f by default.
(scm-style-repl): Don't run 'pk' on the value passed to quit.
* r4rs.scm: New file.
* boot-9.scm: Load r4rs.scm, first thing.
(OPEN_READ, OPEN_WRITE, OPEN_BOTH, *null-device*, open-input-file,
open-output-file, open-io-file, close-input-port,
close-output-port, close-io-port, call-with-input-file,
call-with-output-file, with-input-from-port, with-output-to-port,
with-error-to-port, with-input-from-file, with-output-to-file,
with-error-to-file, with-input-from-string, with-output-to-string,
with-error-to-string, the-eof-object): Definitions moved to
r4rs.scm. Not all of them are R4RS, but those that are use those
that are not.
(load, %load-verbosely, %load-announce): Moved, along with code to
set %load-hook, to r4rs.scm.
should see as little clutter as possible.
* r4rs.scm (%load-verbosely): Make this #f by default.
* boot-9.scm (scm-repl-verbose): Make this #f by default.
(scm-style-repl): Don't run 'pk' on the value passed to quit.
* r4rs.scm: New file.
* boot-9.scm: Load r4rs.scm, first thing.
(OPEN_READ, OPEN_WRITE, OPEN_BOTH, *null-device*, open-input-file,
open-output-file, open-io-file, close-input-port,
close-output-port, close-io-port, call-with-input-file,
call-with-output-file, with-input-from-port, with-output-to-port,
with-error-to-port, with-input-from-file, with-output-to-file,
with-error-to-file, with-input-from-string, with-output-to-string,
with-error-to-string, the-eof-object): Definitions moved to
r4rs.scm. Not all of them are R4RS, but those that are use those
that are not.
(load, %load-verbosely, %load-announce): Moved, along with code to
set %load-hook, to r4rs.scm.
* boot-9.scm (integer?): Definition deleted, in favor of the one
present in libguile (which used to be called int?). I have no
idea why integer? didn't just call int? to begin with.
* boot-9.scm (<, <=, =, >, >=): Definitions in terms of <?, <=?,
=?, >?, and >=? deleted; they're defined that way by libguile now.
scheme name from "int?" to "integer?". It seems to do the job.
* numbers.h: Rename prototype too.
* scmhob.h (intp): Change definition to refer to scm_integer_p. I
hope this is right.
scheme name from "int?" to "integer?". It seems to do the job.
* numbers.h: Rename prototype too.
* scmhob.h (intp): Change definition to refer to scm_integer_p. I
hope this is right.
* * numbers.c (scm_less_p, scm_gr_p, scm_leq_p, scm_geq_p,
scm_num_eq_p): Rename these according to R4RS conventions: call
them <, <=, =, >, and >=, not <?, <=?, =?, >?, and >=?. En route
to making libguile R4RS compliant without ice-9...
extensions listed in the %load-extensions variable. If FILENAME
is absolute, return it unchanged, without searching the load path.
* (scm_loc_load_extensions): New variable, pointing to
%load-extensions' value cell.
(scm_init_load): Initialize it, and the value it points to.
(scm_primitive_load_path): Improve error reporting.
* * load.c (scm_loc_load_hook): New variable, pointing to value cell
of new Scheme variable %load-hook.
(scm_primitive_load): Apply %load-hook to filename.
is available in a FILE structure, which is needed by char-ready.
* acconfig.h: define FILE_CNT_FIELD, FILE_CNT_GPTR and
FILE_CNT_READPTR.
* simpos.c (scm_getenv): renamed from scm_sys_getenv. Throw
exceptions using misc_error instead of syserror. It seems a bit
odd to throw an exception if a string can't be found in the
environment, but it's consistent with open-file, stat etc.
(simpos.h): remove sys_ from getenv.
* posix.c (scm_putenv): renamed from scm_sys_putenv. If an error
occurs, throw an error instead of returning errno. Return value
is now unspecified.
(numerous in posix.c and posix.h): removed superfluous sys_ from names.
the stat mode and append them to the returned vector.
There isn't much overhead in doing this and it avoids the need to
work with S_IRUSR et al. in Scheme.
Define symbols scm_sym_regular etc.
(scm_init_filesys): don't intern S_IRUSR etc.
and s_primitive_load_path.
* eval.c, load.c, error.c (scm_wta): use scm_misc_error.
* error.h: don't declare error symbols. prototype for scm_misc_error.
* stackchk.c (scm_stack_overflow_key): defined here instead of in
error.c.
* error.c: use SCM_SYMBOL to set up error keys.
scm_misc_error: new procedure.
initialization procedure.
- Delete in, out, err arguments; there are other perfectly good
ways to override these when desired.
- Delete result argument; this function shouldn't ever return.
- Rename init_func argument to main_func, for less confusion.
- Delete boot_cmd argument; main_func is more general.
-Add 'closure' argument, to help people pass data to main_func
without resorting to global variables.
- Abort if reentered; don't bother returning an error code.
- Call scm_init_standard_ports to set up the default/current
standard ports; no need to pass them to scm_start_stack.
- Remove code to evaluate the boot_cmd, and start the repl; let
the user do something like that in main_func if they want.
- Remove code to package up a return value; main_func can do any
of that as needed.
- Call exit (0), instead of returning.
(scm_start_stack): Don't initialize the I/O ports here; that's
weird. Delete in, out, err arguments. Move guts to
scm_init_standard_ports, scm_stdio_to_port.
(scm_init_standard_ports): New function, to set up current and
default standard ports.
(scm_start_stack, scm_restart_stack): Make these static.
* init.h (scm_boot_guile): Adjust declaration.
(scm_start_stack, scm_restart_stack): Remove externally
visible declarations for these.
(enum scm_boot_status): Removed; now scm_boot_guile never returns.