bpt/guile.git
27 years agoIt's an "eval closure", not an "eval thunk." A thunk is a
Jim Blandy [Thu, 21 Nov 1996 16:28:39 +0000 (16:28 +0000)]
It's an "eval closure", not an "eval thunk."  A thunk is a
function of no arguments.
* root.h (struct scm_root_state): Renamed
top_level_lookup_closure_var from top_level_lookup_thunk_var.
(scm_top_level_lookup_closure_var): Renamed from
scm_top_level_lookup_thunk_var.
* root.c (mark_root): Uses changed.
* gdbint.c (gdb_eval, gdb_binding): Uses changed.
* init.c (scm_start_stack): Uses changed.
* eval.c (scm_eval, scm_eval_x, scm_init_eval): Rename uses.
Change scheme-visible name to *top-level-lookup-closure* from
*top-level-lookup-thunk*.

27 years ago*** empty log message ***
Jim Blandy [Thu, 21 Nov 1996 16:16:54 +0000 (16:16 +0000)]
*** empty log message ***

27 years agoIt's an "eval closure", not an "eval thunk." A thunk is a
Jim Blandy [Thu, 21 Nov 1996 16:16:46 +0000 (16:16 +0000)]
It's an "eval closure", not an "eval thunk."  A thunk is a
function of no arguments.
* boot-9.scm (module-type): Rename module field.
(make-module, eval-in-module, make-root-module,
set-current-module): Uses changed.
(module-eval-closure, set-module-eval-closure!,
root-module-closure): Renamed from module-eval-thunk,
set-module-eval-thunk!, root-module-thunk.
(set-current-module): Change uses of *top-level-lookup-thunk* to
*top-level-eval-closure*.

27 years agoRenamed to ChangeLog-scm from ChangeLog.scm, so it won't interfere with
Jim Blandy [Thu, 21 Nov 1996 16:03:02 +0000 (16:03 +0000)]
Renamed to ChangeLog-scm from ChangeLog.scm, so it won't interfere with
my greps any more.

27 years ago*** empty log message ***
Jim Blandy [Wed, 20 Nov 1996 21:06:20 +0000 (21:06 +0000)]
*** empty log message ***

27 years ago* slib.scm (slib-parent-dir): Use string-length, not length.
Jim Blandy [Wed, 20 Nov 1996 21:06:05 +0000 (21:06 +0000)]
* slib.scm (slib-parent-dir): Use string-length, not length.
(Thanks to Bernard Urban.)

27 years ago* gc.c (scm_igc, scm_gc_mark): Round up the size of the stack we
Jim Blandy [Wed, 20 Nov 1996 21:03:38 +0000 (21:03 +0000)]
* gc.c (scm_igc, scm_gc_mark): Round up the size of the stack we
pass to scm_mark_locations.  (Thanks to Aubrey Jaffer.)

27 years ago*** empty log message ***
Jim Blandy [Sun, 10 Nov 1996 22:43:46 +0000 (22:43 +0000)]
*** empty log message ***

27 years ago* configure.in, Makefile.in: The 'install' and 'uninstall'
Jim Blandy [Sun, 10 Nov 1996 22:42:02 +0000 (22:42 +0000)]
* configure.in, Makefile.in: The 'install' and 'uninstall'
Makefile targets should be affected by whether or not we have a
port to the current target architecture too, not just the 'all'
target.

27 years ago*** empty log message ***
Jim Blandy [Sun, 10 Nov 1996 20:48:17 +0000 (20:48 +0000)]
*** empty log message ***

27 years ago*** empty log message ***
Jim Blandy [Sun, 10 Nov 1996 20:46:46 +0000 (20:46 +0000)]
*** empty log message ***

27 years ago* gc.c (struct scm_heap_seg_data): Doc fixes.
Jim Blandy [Sun, 10 Nov 1996 20:46:21 +0000 (20:46 +0000)]
* gc.c (struct scm_heap_seg_data): Doc fixes.

* gc.c (scm_gc_sweep): Prepend each segment's free cells to its
freelist, rather than wiping out the old value.  (Thanks to Marius
Vollmer.)

* gc.c (which_seg, scm_map_free_list, scm_newcell_count,
scm_check_freelist, scm_debug_newcell): New functions and
variables, for debugging freelist problems.
* pairs.h (SCM_NEWCELL): New debugging version added.
* gc.h (scm_debug_newcell): Added extern declaration, used by
debugging version of SCM_NEWCELL.

27 years ago* gc.c (which_seg, scm_map_free_list, scm_newcell_count,
Jim Blandy [Sun, 10 Nov 1996 20:46:11 +0000 (20:46 +0000)]
* gc.c (which_seg, scm_map_free_list, scm_newcell_count,
scm_check_freelist, scm_debug_newcell): New functions and
variables, for debugging freelist problems.
* pairs.h (SCM_NEWCELL): New debugging version added.
* gc.h (scm_debug_newcell): Added extern declaration, used by
debugging version of SCM_NEWCELL.

27 years agospelling fix
Jim Blandy [Sun, 10 Nov 1996 03:11:46 +0000 (03:11 +0000)]
spelling fix

27 years ago*** empty log message ***
Jim Blandy [Sun, 10 Nov 1996 02:10:48 +0000 (02:10 +0000)]
*** empty log message ***

27 years ago*** empty log message ***
Jim Blandy [Sun, 10 Nov 1996 00:15:36 +0000 (00:15 +0000)]
*** empty log message ***

27 years ago* fports.c (scm_stdio_to_port, scm_open_file): Set the port's
Jim Blandy [Sun, 10 Nov 1996 00:15:21 +0000 (00:15 +0000)]
* fports.c (scm_stdio_to_port, scm_open_file): Set the port's
pointer to the stdio stream before calling scm_setbuf0, so the
latter will be able to retrieve it.  I'm surprised this didn't
segfault earlier.  (Thanks to Christopher Lee.)

27 years agoOn some systems <libc.h> conflicts with <unistd.h>, and should not
Jim Blandy [Sun, 10 Nov 1996 00:14:45 +0000 (00:14 +0000)]
On some systems <libc.h> conflicts with <unistd.h>, and should not
be #included at all.
* aclocal.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): New autoconf macro.
* configure.in: Call it.
* acconfig.h (LIBC_H_WITH_UNISTD_H): New CPP symbol.
* posix.c, filesys.c: Use its results to decide whether or not to
#include <libc.h>.
* configure, scmconfig.h.in: Rebuilt with autoconf and
autoheader.

27 years ago*** empty log message ***
Jim Blandy [Sat, 9 Nov 1996 23:32:27 +0000 (23:32 +0000)]
*** empty log message ***

27 years ago*** empty log message ***
Jim Blandy [Sat, 9 Nov 1996 23:30:58 +0000 (23:30 +0000)]
*** empty log message ***

27 years ago*** empty log message ***
Mikael Djurfeldt [Wed, 6 Nov 1996 15:05:20 +0000 (15:05 +0000)]
*** empty log message ***

27 years ago* throw.c (scm_lazy_catch, scm_ithrow): Completed implementation
Mikael Djurfeldt [Wed, 6 Nov 1996 15:05:00 +0000 (15:05 +0000)]
* throw.c (scm_lazy_catch, scm_ithrow): Completed implementation
of `lazy-catch'.

27 years ago*** empty log message ***
Mikael Djurfeldt [Sat, 2 Nov 1996 20:54:28 +0000 (20:54 +0000)]
*** empty log message ***

27 years ago* * stacks.c, stacks.h (scm_make_stack): Now takes arbitrary
Mikael Djurfeldt [Sat, 2 Nov 1996 20:54:19 +0000 (20:54 +0000)]
* * stacks.c, stacks.h (scm_make_stack): Now takes arbitrary
number of stack narrowing specifier pairs.  The first specifier in
a pair controls inner border, the second the outer border.  A
number means cut that number of frames, a procedure object means
cut until that object is found in operator position in a frame.

27 years ago* root.c (cwdr): Bugfix.
Mikael Djurfeldt [Sat, 2 Nov 1996 20:54:08 +0000 (20:54 +0000)]
* root.c (cwdr): Bugfix.

27 years ago* * read.c: Recording of positions disabled by default.
Mikael Djurfeldt [Sat, 2 Nov 1996 20:54:03 +0000 (20:54 +0000)]
* * read.c: Recording of positions disabled by default.

27 years ago* * procs.c (scm_closure_p): New function.
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:58 +0000 (20:53 +0000)]
* * procs.c (scm_closure_p): New function.

27 years ago* * posix.c (scm_tmpnam): New function.
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:53 +0000 (20:53 +0000)]
* * posix.c (scm_tmpnam): New function.

27 years ago* * load.c, load.h (scm_read_and_eval_x): New function.
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:47 +0000 (20:53 +0000)]
* * load.c, load.h (scm_read_and_eval_x): New function.

27 years ago * load.c: Added #include "throw.h".
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:42 +0000 (20:53 +0000)]
* load.c: Added #include "throw.h".

* * load.c, load.h (scm_read_and_eval_x): New function.

27 years ago* * eval.c: Renamed debug option "deval" to "debug".
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:32 +0000 (20:53 +0000)]
* * eval.c: Renamed debug option "deval" to "debug".

27 years ago* * debug.h: Changed semantics of debug option "backtrace". This
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:24 +0000 (20:53 +0000)]
* * debug.h: Changed semantics of debug option "backtrace".  This
option now only indicates whether we want automatic backtrace at
an error.

27 years ago* debug.c (scm_m_start_stack): Bugfix: Use SCM_ECONSP instead of
Mikael Djurfeldt [Sat, 2 Nov 1996 20:53:18 +0000 (20:53 +0000)]
* debug.c (scm_m_start_stack): Bugfix: Use SCM_ECONSP instead of
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...

27 years ago * _scm.h: Added #ifndef around definition of macros min and max.
Mikael Djurfeldt [Sat, 2 Nov 1996 20:52:58 +0000 (20:52 +0000)]
* _scm.h: Added #ifndef around definition of macros min and max.

27 years ago * __scm.h: Added hooks for threads to plugin to in ints protection
Mikael Djurfeldt [Sat, 2 Nov 1996 20:52:39 +0000 (20:52 +0000)]
* __scm.h: Added hooks for threads to plugin to in ints protection
  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.

27 years ago* slib.scm (slib:load): Adapt to the new behavior of
Mikael Djurfeldt [Sat, 2 Nov 1996 20:51:44 +0000 (20:51 +0000)]
* slib.scm (slib:load): Adapt to the new behavior of
primitive-load: It doesn't any longer try both with and without
".scm" extension.  (We don't want to use %search-load-path here.)

27 years ago* * boot-9.scm: The debugging evaluator and recording of positions
Mikael Djurfeldt [Sat, 2 Nov 1996 20:51:37 +0000 (20:51 +0000)]
* * boot-9.scm: The debugging evaluator and recording of positions
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.

27 years ago* * boot-9.scm: The debugging evaluator and recording of positions
Mikael Djurfeldt [Sat, 2 Nov 1996 20:51:30 +0000 (20:51 +0000)]
* * boot-9.scm: The debugging evaluator and recording of positions
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.

27 years ago * libguile.h: #include "libguile/libpath.h"
Mikael Djurfeldt [Wed, 30 Oct 1996 23:36:51 +0000 (23:36 +0000)]
* libguile.h: #include "libguile/libpath.h"

27 years ago * ports.c: #include "filesys.h"
Mikael Djurfeldt [Wed, 30 Oct 1996 23:35:06 +0000 (23:35 +0000)]
* ports.c: #include "filesys.h"
(scm_char_ready_p): input_waiting renamed and moved to filesys.c.

27 years ago * load.c, load.h (scm_sys_package_data_dir): New function.
Mikael Djurfeldt [Wed, 30 Oct 1996 23:34:33 +0000 (23:34 +0000)]
* load.c, load.h (scm_sys_package_data_dir): New function.

27 years ago * filesys.c, filesys.h (scm_input_waiting_p): Moved from ports.c.
Mikael Djurfeldt [Wed, 30 Oct 1996 23:31:11 +0000 (23:31 +0000)]
* filesys.c, filesys.h (scm_input_waiting_p): Moved from ports.c.
   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.

27 years ago* Makefile.in (libpath.h): Renamed definition of: LIBRARY_PATH -->
Mikael Djurfeldt [Wed, 30 Oct 1996 23:30:20 +0000 (23:30 +0000)]
* Makefile.in (libpath.h): Renamed definition of: LIBRARY_PATH -->
SCM_LIBRARY_DIR; Added definitions of: SCM_PKGDATA_DIR, SCM_SITE_DIR;
Install libpath.h among the other include files.

27 years ago*** empty log message ***
Mikael Djurfeldt [Wed, 30 Oct 1996 23:27:17 +0000 (23:27 +0000)]
*** empty log message ***

27 years ago* stacks.h: Bugfix: Don't use tail-array length field as stack
Mikael Djurfeldt [Wed, 30 Oct 1996 00:16:45 +0000 (00:16 +0000)]
* stacks.h: Bugfix: Don't use tail-array length field as stack
length field!  This screwed up GC.

27 years ago*** empty log message ***
Jim Blandy [Tue, 29 Oct 1996 20:53:19 +0000 (20:53 +0000)]
*** empty log message ***

27 years ago* socket.c: Use K&R style declaration for 'close'; the GNU coding
Jim Blandy [Tue, 29 Oct 1996 20:52:40 +0000 (20:52 +0000)]
* socket.c: Use K&R style declaration for 'close'; the GNU coding
standards suggest against providing prototypes for system
functions.  Thanks to Greg Troxel.

27 years ago* snarf.h: New file.
Jim Blandy [Tue, 29 Oct 1996 20:49:56 +0000 (20:49 +0000)]
* snarf.h: New file.
* 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.)

27 years ago*** empty log message ***
Jim Blandy [Tue, 29 Oct 1996 03:59:48 +0000 (03:59 +0000)]
*** empty log message ***

27 years ago* boot-9.scm (load-from-path): New function.
Jim Blandy [Tue, 29 Oct 1996 03:59:35 +0000 (03:59 +0000)]
* boot-9.scm (load-from-path): New function.

* boot-9.scm (try-load, basic-try-load, try-load-module,
try-load): Deleted.  I don't think they're being used.

27 years ago*** empty log message ***
Jim Blandy [Tue, 29 Oct 1996 03:48:55 +0000 (03:48 +0000)]
*** empty log message ***

27 years ago* Makefile.in (scm_files): Add r4rs.scm and test.scm to this list,
Jim Blandy [Tue, 29 Oct 1996 03:48:41 +0000 (03:48 +0000)]
* Makefile.in (scm_files): Add r4rs.scm and test.scm to this list,
so they'll get distributed.

27 years agoGet Guile to be a little less chatty by default. The new user
Jim Blandy [Tue, 29 Oct 1996 03:48:15 +0000 (03:48 +0000)]
Get Guile to be a little less chatty by default.  The new user
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.

27 years agoGet Guile to be a little less chatty by default. The new user
Jim Blandy [Tue, 29 Oct 1996 03:47:36 +0000 (03:47 +0000)]
Get Guile to be a little less chatty by default.  The new user
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.

27 years ago* test.scm: New file.
Jim Blandy [Tue, 29 Oct 1996 03:46:39 +0000 (03:46 +0000)]
* test.scm: New file.

27 years ago*** empty log message ***
Jim Blandy [Tue, 29 Oct 1996 03:08:16 +0000 (03:08 +0000)]
*** empty log message ***

27 years ago* * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
Jim Blandy [Tue, 29 Oct 1996 03:08:03 +0000 (03:08 +0000)]
* * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
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.

27 years ago* * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
Jim Blandy [Tue, 29 Oct 1996 03:07:53 +0000 (03:07 +0000)]
* * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
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...

27 years ago* strports.c (scm_eval_0str): New function.
Jim Blandy [Tue, 29 Oct 1996 03:06:26 +0000 (03:06 +0000)]
* strports.c (scm_eval_0str): New function.
#include "read.h", to get prototype for scm_read.
* Makefile.in (strports.o): Update dependencies.
* strports.h: New prototype.

27 years ago(load): Should call primitive-load-path, not primitive-load. Oops.
Jim Blandy [Mon, 28 Oct 1996 23:15:34 +0000 (23:15 +0000)]
(load): Should call primitive-load-path, not primitive-load.  Oops.

27 years ago*** empty log message ***
Jim Blandy [Mon, 28 Oct 1996 23:06:04 +0000 (23:06 +0000)]
*** empty log message ***

27 years ago* * load.c (scm_sys_search_load_path): Search for files under all
Jim Blandy [Mon, 28 Oct 1996 23:05:37 +0000 (23:05 +0000)]
* * load.c (scm_sys_search_load_path): Search for files under all
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.

27 years ago* boot-9.scm (load): Simplified; primitive-load does most of this
Jim Blandy [Mon, 28 Oct 1996 23:00:25 +0000 (23:00 +0000)]
* boot-9.scm (load): Simplified; primitive-load does most of this
work now.
(%load-announce-win): Removed; no longer used.  Set %load-hook to
call %load-announce.

27 years ago*** empty log message ***
Jim Blandy [Mon, 28 Oct 1996 19:37:04 +0000 (19:37 +0000)]
*** empty log message ***

27 years ago* configure.in: add tests for figuring out whether buffered data
Gary Houston [Mon, 28 Oct 1996 09:44:07 +0000 (09:44 +0000)]
* configure.in: add tests for figuring out whether buffered data
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.

27 years ago* boot-9.scm (stat:dev etc.) accessor functions for stat components.
Gary Houston [Sun, 27 Oct 1996 23:26:35 +0000 (23:26 +0000)]
* boot-9.scm (stat:dev etc.) accessor functions for stat components.
(file-is-directory?): use stat:type.

27 years ago* filesys.c (scm_stat2scm): derive file type and permissions from
Gary Houston [Sun, 27 Oct 1996 23:25:47 +0000 (23:25 +0000)]
* filesys.c (scm_stat2scm): derive file type and permissions from
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.

27 years ago* load.c: change s_try_load and s_try_load_path to s_primitive_load
Gary Houston [Sun, 27 Oct 1996 02:38:39 +0000 (02:38 +0000)]
* load.c: change s_try_load and s_try_load_path to s_primitive_load
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.

27 years ago*** empty log message ***
Jim Blandy [Fri, 25 Oct 1996 08:40:27 +0000 (08:40 +0000)]
*** empty log message ***

27 years ago* boot-9.scm (%read-sharp): Don't recognize the `#!' syntax here;
Jim Blandy [Fri, 25 Oct 1996 08:35:36 +0000 (08:35 +0000)]
* boot-9.scm (%read-sharp): Don't recognize the `#!' syntax here;
that's now taken care of in libguile, and in a way compatible with
SCSH (which this isn't).

27 years ago* read.c (scm_lreadr): Recognize SCSH-style block comments; text
Jim Blandy [Fri, 25 Oct 1996 08:30:26 +0000 (08:30 +0000)]
* read.c (scm_lreadr): Recognize SCSH-style block comments; text
between `#!' and `!#' is ignored.
(skip_scsh_block_comment): New function.

27 years ago* feature.c (scm_set_program_arguments): New argument, FIRST.
Jim Blandy [Fri, 25 Oct 1996 08:30:06 +0000 (08:30 +0000)]
* feature.c (scm_set_program_arguments): New argument, FIRST.
* feature.h: Update prototype.
* init.c (scm_boot_guile_1): Pass new argument to
scm_set_program_arguments.

27 years ago*** empty log message ***
Jim Blandy [Wed, 23 Oct 1996 02:15:20 +0000 (02:15 +0000)]
*** empty log message ***

27 years ago* ports.c: Formatting tweak.
Jim Blandy [Wed, 23 Oct 1996 02:15:04 +0000 (02:15 +0000)]
* ports.c: Formatting tweak.

27 years ago* init.c: (scm_boot_guile, scm_boot_guile_1): New, simplified
Jim Blandy [Wed, 23 Oct 1996 02:14:52 +0000 (02:14 +0000)]
* init.c: (scm_boot_guile, scm_boot_guile_1):  New, simplified
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.

27 years ago* init.c (scm_start_stack): Don't initialize scm_progargs here.
Jim Blandy [Wed, 23 Oct 1996 02:14:39 +0000 (02:14 +0000)]
* init.c (scm_start_stack): Don't initialize scm_progargs here.
(scm_boot_guile): Call scm_set_program_arguments here, later than
the old initialization.

* init.c: (scm_boot_guile, scm_boot_guile_1):  New, simplified
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.

27 years ago* * fports.c (scm_stdio_to_port): New function. Its guts used to be
Jim Blandy [Wed, 23 Oct 1996 02:14:18 +0000 (02:14 +0000)]
* * fports.c (scm_stdio_to_port): New function.  Its guts used to be
written out several times in scm_start_stack.
* fports.h: New declaration for the above.

27 years ago* * feature.c (scm_set_program_arguments): New function.
Jim Blandy [Wed, 23 Oct 1996 02:14:09 +0000 (02:14 +0000)]
* * feature.c (scm_set_program_arguments): New function.
* feature.h: New declaration for the above.

27 years ago*** empty log message ***
Jim Blandy [Mon, 21 Oct 1996 23:54:02 +0000 (23:54 +0000)]
*** empty log message ***

27 years ago* hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
Jim Blandy [Mon, 21 Oct 1996 23:53:40 +0000 (23:53 +0000)]
* hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
`del', for the sake of C++ compilers.  (Patch applied by JimB.)

27 years ago* boot-9.scm: Formatting tweaks.
Jim Blandy [Mon, 21 Oct 1996 23:53:01 +0000 (23:53 +0000)]
* boot-9.scm: Formatting tweaks.

27 years agoStarted moving gh.c to acknowledging conservative GC; gh_test core dumps,
Mark Galassi [Mon, 21 Oct 1996 17:28:13 +0000 (17:28 +0000)]
Started moving gh.c to acknowledging conservative GC; gh_test core dumps,
but at least it compiles for now.

27 years ago*** empty log message ***
Mikael Djurfeldt [Sun, 20 Oct 1996 03:31:40 +0000 (03:31 +0000)]
*** empty log message ***

27 years ago* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
Mikael Djurfeldt [Sun, 20 Oct 1996 03:31:08 +0000 (03:31 +0000)]
* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)

27 years ago* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
Mikael Djurfeldt [Sun, 20 Oct 1996 03:30:16 +0000 (03:30 +0000)]
* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
Motivation: see SCM_CXRLOC.

* pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
srcprop.h, tags.h, throw.c, unif.c: Added new selectors
SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
Motivation: Safer use.  Some other macros are defined in terms of
these operations.  If these are defined using the SCM_SETCXR
(<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
to inefficiency and an <e1> with side-effects could potentially
break.  Also, these particular operations are heavily utilized in
the garbage collector.  In unoptimized code there will be a
measurable speedup.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)

27 years ago* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
Mikael Djurfeldt [Sun, 20 Oct 1996 03:29:48 +0000 (03:29 +0000)]
* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
Motivation: see SCM_CXRLOC.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)

27 years ago* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
Mikael Djurfeldt [Sun, 20 Oct 1996 03:29:38 +0000 (03:29 +0000)]
* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)

27 years ago* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
Mikael Djurfeldt [Sun, 20 Oct 1996 03:29:01 +0000 (03:29 +0000)]
* pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field.  Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.

* pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
srcprop.h, tags.h, throw.c, unif.c: Added new selectors
SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
Motivation: Safer use.  Some other macros are defined in terms of
these operations.  If these are defined using the SCM_SETCXR
(<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
to inefficiency and an <e1> with side-effects could potentially
break.  Also, these particular operations are heavily utilized in
the garbage collector.  In unoptimized code there will be a
measurable speedup.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)

27 years ago* pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
Mikael Djurfeldt [Sun, 20 Oct 1996 03:28:34 +0000 (03:28 +0000)]
* pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
srcprop.h, tags.h, throw.c, unif.c: Added new selectors
SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
Motivation: Safer use.  Some other macros are defined in terms of
these operations.  If these are defined using the SCM_SETCXR
(<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
to inefficiency and an <e1> with side-effects could potentially
break.  Also, these particular operations are heavily utilized in
the garbage collector.  In unoptimized code there will be a
measurable speedup.

* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)

27 years agoAdding more stuff to get the docs to work.
Mark Galassi [Fri, 18 Oct 1996 22:44:47 +0000 (22:44 +0000)]
Adding more stuff to get the docs to work.

27 years agoAdjustment of load-stack selection.
Mikael Djurfeldt [Fri, 18 Oct 1996 00:15:09 +0000 (00:15 +0000)]
Adjustment of load-stack selection.

27 years agoBugfix: arg-list --> args in error handler.
Mikael Djurfeldt [Thu, 17 Oct 1996 23:56:31 +0000 (23:56 +0000)]
Bugfix: arg-list --> args in error handler.

27 years ago*** empty log message ***
Mikael Djurfeldt [Thu, 17 Oct 1996 23:43:30 +0000 (23:43 +0000)]
*** empty log message ***

27 years ago* boot-9.scm (handle-system-error): Added hooks before-error-hook,
Mikael Djurfeldt [Thu, 17 Oct 1996 23:43:23 +0000 (23:43 +0000)]
* boot-9.scm (handle-system-error): Added hooks before-error-hook,
after-error-hook, before-backtrace-hook and after-backtrace-hook
to the error handler.  E.g.: fancy emacs support could plug into
these.
(save-stack): New function.  The stack is now made differently
depending on the stack id.  (The motivation is to make a better
choice regarding what stack frames to present to the user.)
(error-catching-loop): Stack handling code moved outside into
save-stack.

27 years agoOops!
Mikael Djurfeldt [Thu, 17 Oct 1996 23:43:00 +0000 (23:43 +0000)]
Oops!

27 years ago* backtrace.c (scm_display_error): Just a safety measure: Stacks
Mikael Djurfeldt [Thu, 17 Oct 1996 23:32:47 +0000 (23:32 +0000)]
* backtrace.c (scm_display_error): Just a safety measure: Stacks
aren't created with zero length, but should such a strange
creature suddenly turn up...

27 years ago* debug.c (scm_make_memoized): Made it available at scheme level.
Mikael Djurfeldt [Thu, 17 Oct 1996 23:32:40 +0000 (23:32 +0000)]
* debug.c (scm_make_memoized): Made it available at scheme level.
(scm_unmemoize, scm_memoized_environment): Bugfix: Check for
SCM_NIMP before applying heavier predicates in argument checking.
(scm_local_eval): Also take memoized object as argument.

27 years ago* ports.c (scm_port_line_x, scm_port_column_x): New mutators.
Mikael Djurfeldt [Thu, 17 Oct 1996 23:32:32 +0000 (23:32 +0000)]
* ports.c (scm_port_line_x, scm_port_column_x): New mutators.

27 years ago* stacks.c: Improve selection of relevant stack frames when making
Mikael Djurfeldt [Thu, 17 Oct 1996 23:32:25 +0000 (23:32 +0000)]
* stacks.c: Improve selection of relevant stack frames when making
a stack object.  Introduce one level of indirection in the stack
object to make it possible to "narrow" to a certain region of the
stack.  This facilitates making use of more clever algorithms (not
implemented) for selecting relevant frames and gives a cleaner
design since selection of frames can be done independently of
extraction of frames from the real stack.
(scm_stack_id): Also take #t as argument which means look at
current stack.

27 years ago* stacks.h: In struct scm_stack: Turn field frames into a pointer.
Mikael Djurfeldt [Thu, 17 Oct 1996 23:32:15 +0000 (23:32 +0000)]
* stacks.h: In struct scm_stack: Turn field frames into a pointer.
Turn n_tail into an integer directly representing current number
of frames in stack.  Add field tail.