bpt/guile.git
26 years ago* boot-9.scm: Antirevert Jim's readline code which he reverted
Mikael Djurfeldt [Tue, 12 May 1998 23:59:21 +0000 (23:59 +0000)]
* boot-9.scm: Antirevert Jim's readline code which he reverted
19971027 and adapt it to the current readline interface.

* boot-9.scm (top-repl): Only enable readline if not using the
Emacs interface; Only use repl prompt when using the readline port
from repl-read.  (We don't want to see it when calling `read'.)

* boot-9.scm (remove-hook!): Parenthesis bug.

26 years agoBugfixes for yesterdays revision.
Mikael Djurfeldt [Tue, 12 May 1998 21:41:44 +0000 (21:41 +0000)]
Bugfixes for yesterdays revision.

26 years ago* readline.c: Improvements for readline support: Handle errors
Mikael Djurfeldt [Tue, 12 May 1998 00:52:31 +0000 (00:52 +0000)]
* readline.c: Improvements for readline support: Handle errors
better; Implement before-read-hook.

26 years agoUpdated
Mikael Djurfeldt [Tue, 12 May 1998 00:49:26 +0000 (00:49 +0000)]
Updated

26 years ago* init.c (scm_boot_guile_1), readline.c: Test for
Mikael Djurfeldt [Tue, 12 May 1998 00:48:58 +0000 (00:48 +0000)]
* init.c (scm_boot_guile_1), readline.c: Test for
HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE.  (Need to
assure that we have version >= 2.1.)

26 years ago*** empty log message ***
Mikael Djurfeldt [Tue, 12 May 1998 00:48:38 +0000 (00:48 +0000)]
*** empty log message ***

26 years ago* configure.in: Added test for rl_getc_function. Warn if
Mikael Djurfeldt [Tue, 12 May 1998 00:48:15 +0000 (00:48 +0000)]
* configure.in: Added test for rl_getc_function.  Warn if
libreadline is found but not this function.

26 years ago* throw.c, throw.h (scm_handle_by_throw): New function: This
Mikael Djurfeldt [Mon, 11 May 1998 01:18:41 +0000 (01:18 +0000)]
* throw.c, throw.h (scm_handle_by_throw): New function: This
handler throws errors to next handler on the dynwind chain.

26 years agoscm_usleep: Don't define j if not used.
Mikael Djurfeldt [Mon, 11 May 1998 01:17:10 +0000 (01:17 +0000)]
scm_usleep: Don't define j if not used.

26 years ago* readline.c (scm_add_history): Bugfix: Do strdup before giving
Mikael Djurfeldt [Mon, 11 May 1998 01:16:15 +0000 (01:16 +0000)]
* readline.c (scm_add_history): Bugfix: Do strdup before giving
away the string to add_history.
(completion_function): Do completion for readline.
(scm_filename_completion_function): New procedure: Filename
completer.
(current_input_getc): New function.  Use this one instead of
standard getc from readline.

26 years ago* boot-9.scm: Load readline module if readline is present.
Mikael Djurfeldt [Mon, 11 May 1998 01:15:26 +0000 (01:15 +0000)]
* boot-9.scm: Load readline module if readline is present.

* readline.scm (apropos-completion-function): New procedure:
Symbolic completion.  (Thanks to Andrew Archibald!)

26 years agoAdded Andrew Archibald
Mikael Djurfeldt [Mon, 11 May 1998 01:14:23 +0000 (01:14 +0000)]
Added Andrew Archibald

26 years ago* configure.in: Replaced some AC_CHECK_FUNC --> AC_CHECK_FUNCS so
Mikael Djurfeldt [Wed, 6 May 1998 14:45:11 +0000 (14:45 +0000)]
* configure.in: Replaced some AC_CHECK_FUNC --> AC_CHECK_FUNCS so
that suitable HAVE_<function name> symbols get defined.

26 years agoFix
Mikael Djurfeldt [Mon, 4 May 1998 12:05:37 +0000 (12:05 +0000)]
Fix

26 years ago* boot-9.scm (process-define-module): Added keyword use-syntax.
Mikael Djurfeldt [Mon, 4 May 1998 11:44:13 +0000 (11:44 +0000)]
* boot-9.scm (process-define-module): Added keyword use-syntax.

26 years ago*** empty log message ***
Mikael Djurfeldt [Mon, 4 May 1998 11:33:35 +0000 (11:33 +0000)]
*** empty log message ***

26 years ago* procprop.h (scm_sym_arity): New symbol.
Mikael Djurfeldt [Mon, 4 May 1998 11:33:14 +0000 (11:33 +0000)]
* procprop.h (scm_sym_arity): New symbol.

26 years ago* procprop.c (scm_i_procedure_arity): New function. Returns arity
Mikael Djurfeldt [Mon, 4 May 1998 11:32:58 +0000 (11:32 +0000)]
* procprop.c (scm_i_procedure_arity): New function.  Returns arity
of procedure.
(scm_procedure_properties): Modified to return arity together with
other properties.
(scm_procedure_property): Added the read-only property `arity'.
(scm_set_procedure_property_x): It is an error to set the `arity'
property.

26 years ago* objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
Mikael Djurfeldt [Mon, 4 May 1998 11:32:44 +0000 (11:32 +0000)]
* objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
Made procedure slots read-only.

26 years ago* objects.c (scm_set_object_procedure_x): New procedure: Use this
Mikael Djurfeldt [Mon, 4 May 1998 11:32:30 +0000 (11:32 +0000)]
* objects.c (scm_set_object_procedure_x): New procedure: Use this
to set the dispatch procedure of an operator or entity object.

26 years ago* gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
Mikael Djurfeldt [Mon, 4 May 1998 11:32:05 +0000 (11:32 +0000)]
* gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
prefix SCM_; Made f_gsubr_apply global and added prefix scm_.

26 years ago* eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
Mikael Djurfeldt [Mon, 4 May 1998 11:31:45 +0000 (11:31 +0000)]
* eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
scm_tcs_cons_gloc case in zero args switch; Fixed args
construction for operators in scm_tcs_cons_gloc case in two args
switch.

26 years agoUpdated
Mikael Djurfeldt [Sat, 2 May 1998 22:27:11 +0000 (22:27 +0000)]
Updated

26 years ago* fluids.c: Removed use of assert.h (in order to avoid
Mikael Djurfeldt [Sat, 2 May 1998 22:26:44 +0000 (22:26 +0000)]
* fluids.c: Removed use of assert.h (in order to avoid
__eprintf).

* Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.

* dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.

26 years ago* eval.c (SCM_CEVAL): Do more thorough argument checking. This
Mikael Djurfeldt [Sat, 2 May 1998 16:26:21 +0000 (16:26 +0000)]
* eval.c (SCM_CEVAL): Do more thorough argument checking.  This
change makes the evaluator safer at the cost of evaluation speed.
It handles the case when the user has added a non-immediate
improper end of the application form, e.g., `(+ 0 . x)'.
(Earlier only cases like `(+ 0 . 0)' were handled.)  I've tried to
minimize the extra cost as much as possible.  The new code is
enclosed in #ifdef CAUTIOUS regions.  NOTE: This also fixes the
problem with structs planted directly in the code (e.g. by a
macro).  This no longer causes segmentation fault.  (Thanks to
Eric Hanchrow.)

* eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
arg `proc' in order to be able to throw errors; New argument
checking code.

26 years agoUpdated
Mikael Djurfeldt [Sat, 2 May 1998 16:25:31 +0000 (16:25 +0000)]
Updated

26 years ago*** empty log message ***
Mikael Djurfeldt [Fri, 24 Apr 1998 23:51:34 +0000 (23:51 +0000)]
*** empty log message ***

26 years ago* scmsigs.c: Declare usleep as returning void on some systems.
Mikael Djurfeldt [Fri, 24 Apr 1998 23:36:04 +0000 (23:36 +0000)]
* scmsigs.c: Declare usleep as returning void on some systems.
(scm_usleep): Return SCM_INUM0 on those systems.

* coop.c (usleep): Return void on some systems.

* configure.in: Define USLEEP_RETURNS_VOID on some systems.

26 years ago* Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
Mikael Djurfeldt [Mon, 20 Apr 1998 00:40:43 +0000 (00:40 +0000)]
* Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.

26 years ago* scmsigs.c (scm_usleep): New procedure; Declare usleep if it
Mikael Djurfeldt [Mon, 20 Apr 1998 00:40:09 +0000 (00:40 +0000)]
* scmsigs.c (scm_usleep): New procedure; Declare usleep if it
isn't found in the OS.

26 years agoUpdated
Mikael Djurfeldt [Mon, 20 Apr 1998 00:39:59 +0000 (00:39 +0000)]
Updated

26 years ago* iselect.h: #define scm_internal_select select if GUILE_ISELECT
Mikael Djurfeldt [Mon, 20 Apr 1998 00:39:45 +0000 (00:39 +0000)]
* iselect.h: #define scm_internal_select select if GUILE_ISELECT
isn't enabled.  (Thought that I had made this change ages ago...)

26 years ago* iselect.c: Declare bzero if not defined by OS.
Mikael Djurfeldt [Mon, 20 Apr 1998 00:39:31 +0000 (00:39 +0000)]
* iselect.c: Declare bzero if not defined by OS.

26 years ago* coop.c: Changed return type of usleep to int.
Mikael Djurfeldt [Mon, 20 Apr 1998 00:39:15 +0000 (00:39 +0000)]
* coop.c: Changed return type of usleep to int.

26 years ago* configure.in: Check for usleep; Define DECLARE_BZERO and
Mikael Djurfeldt [Mon, 20 Apr 1998 00:38:46 +0000 (00:38 +0000)]
* configure.in: Check for usleep;  Define DECLARE_BZERO and
DECLARE_USLEEP on Solaris 2.5 since it supplies those functions
without declaring them.

26 years ago* acconfig.h: Added DECLARE_BZERO, DECLARE_USLEEP
Mikael Djurfeldt [Mon, 20 Apr 1998 00:38:18 +0000 (00:38 +0000)]
* acconfig.h: Added DECLARE_BZERO, DECLARE_USLEEP

26 years ago* continuations.c (scm_make_cont), debug.c (scm_make_memoized,
Mikael Djurfeldt [Sun, 19 Apr 1998 20:16:36 +0000 (20:16 +0000)]
* continuations.c (scm_make_cont), debug.c (scm_make_memoized,
scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
A section.

* __scm.h: Start the long-term project of moving to POSIX threads.
Phase 1: Classification of all critical sections.
(SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
for A sections.  (See comments in __scm.h for details.)

26 years ago* dynl.c (scm_must_free_argv): Fixed memory leak due to negated
Mikael Djurfeldt [Sun, 19 Apr 1998 20:15:49 +0000 (20:15 +0000)]
* dynl.c (scm_must_free_argv): Fixed memory leak due to negated
condition.  (Thanks to John Tobey.)

* dynl.c: Only check that HAVE_DLOPEN is defined before loading
dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.

26 years ago* nonblocking.scm: Removed. libguile is now inherently
Mikael Djurfeldt [Sun, 19 Apr 1998 01:22:44 +0000 (01:22 +0000)]
* nonblocking.scm: Removed.  libguile is now inherently
nonblocking through the use of scm_internal_select.

* emacs.scm: Removed use of nonblocking.scm.

* gwish.scm, gtcl.scm: Removed.  tcltk.scm has made these
obsolete.

26 years ago* dynl.c: Only check that HAVE_DLOPEN is defined before loading
Mikael Djurfeldt [Sun, 19 Apr 1998 01:17:26 +0000 (01:17 +0000)]
* dynl.c: Only check that HAVE_DLOPEN is defined before loading
dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.

* configure.in: Define HAVE_DLOPEN also when HAVE_LIBDL is
defined.

26 years ago* dynl.c: Only check that HAVE_DLOPEN is defined before loading
Mikael Djurfeldt [Sun, 19 Apr 1998 00:36:12 +0000 (00:36 +0000)]
* dynl.c: Only check that HAVE_DLOPEN is defined before loading
dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.

* configure.in: Define HAVE_DLOPEN also when HAVE_LIBDL is
defined.

26 years ago* script.c (scm_compile_shell_switches): Bugfix: Don't discount i
Mikael Djurfeldt [Sat, 18 Apr 1998 21:58:47 +0000 (21:58 +0000)]
* script.c (scm_compile_shell_switches): Bugfix: Don't discount i
from argc if argc was 0 initially.

26 years ago* Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
Mikael Djurfeldt [Sat, 18 Apr 1998 21:58:24 +0000 (21:58 +0000)]
* Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
in generation of libpath.h.

26 years ago*** empty log message ***
Mikael Djurfeldt [Sat, 18 Apr 1998 21:57:51 +0000 (21:57 +0000)]
*** empty log message ***

26 years ago* Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
Mikael Djurfeldt [Sat, 18 Apr 1998 21:57:32 +0000 (21:57 +0000)]
* Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
(libpath.h, versiondat.h): Replaced dependency on Makefile with
dependencies on $(srcdir)/Makefile.in
$(top_builddir)/config.status in order to avoid circularity.

* configure.in (GUILE_LIBS): New variable.  Contains libraries
which libguile needs to be linked with.  Substituted into
libpath.h.

* threads.m4 (threads_package): Don't add $LDFLAGS and $LIBS to
$cy_cv_threads_libs.

26 years ago* qt.h.in: Declare return type of qt_abort as void.
Mikael Djurfeldt [Wed, 15 Apr 1998 12:28:14 +0000 (12:28 +0000)]
* qt.h.in: Declare return type of qt_abort as void.

26 years ago* Makefile.am (libguile_la_LDFLAGS): Bumped version number of
Mikael Djurfeldt [Wed, 15 Apr 1998 12:27:47 +0000 (12:27 +0000)]
* Makefile.am (libguile_la_LDFLAGS): Bumped version number of
libguile from 2 to 3.

26 years ago* runq.scm (runq-control): Corrected spelling of enqueue!.
Mikael Djurfeldt [Wed, 15 Apr 1998 08:30:19 +0000 (08:30 +0000)]
* runq.scm (runq-control): Corrected spelling of enqueue!.
(Thanks to Karl M. Hegbloom.)

26 years ago* Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
Mikael Djurfeldt [Tue, 14 Apr 1998 09:22:52 +0000 (09:22 +0000)]
* Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.

26 years agoSmall fix.
Mikael Djurfeldt [Tue, 14 Apr 1998 09:22:27 +0000 (09:22 +0000)]
Small fix.

26 years ago* unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
Mikael Djurfeldt [Sun, 12 Apr 1998 23:36:54 +0000 (23:36 +0000)]
* unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings.  (Thanks
to Ole Myren Röhne.)

26 years ago* ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
Mikael Djurfeldt [Sun, 12 Apr 1998 23:35:17 +0000 (23:35 +0000)]
* ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
scm_set_port_column_x, scm_port_filename,
scm_set_port_filename_x): Removed optional arguments.  Added
proper argument checking.

26 years ago* eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
Mikael Djurfeldt [Sun, 12 Apr 1998 23:34:43 +0000 (23:34 +0000)]
* eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
stack size in machine words.

26 years ago*** empty log message ***
Mikael Djurfeldt [Sun, 12 Apr 1998 23:33:48 +0000 (23:33 +0000)]
*** empty log message ***

26 years ago* socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
Mikael Djurfeldt [Sun, 12 Apr 1998 16:27:48 +0000 (16:27 +0000)]
* socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
UNIX_DOMAIN_SOCKETS.  (Thanks to Lauri Alanko.)

26 years ago* gc.c (scm_gc_sweep): Count cells correctly. (Thanks to Ben
Mikael Djurfeldt [Sun, 12 Apr 1998 10:23:20 +0000 (10:23 +0000)]
* gc.c (scm_gc_sweep): Count cells correctly.  (Thanks to Ben
Caradoc-Davies.)

26 years ago* eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
Mikael Djurfeldt [Sun, 12 Apr 1998 10:10:29 +0000 (10:10 +0000)]
* eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
procedure apply: Copy argument lists before pushing them unto the
environment so that the environment won't get mutated due to
manipulation of procedure arguments.  This should perhaps be
regarded as a temporary solution until someone finds a more
efficient one.  (Thanks to Maciej Stachowiak.)

26 years ago*** empty log message ***
Mikael Djurfeldt [Sun, 12 Apr 1998 10:08:04 +0000 (10:08 +0000)]
*** empty log message ***

26 years agotrivial
Mark Galassi [Sat, 11 Apr 1998 12:40:19 +0000 (12:40 +0000)]
trivial

26 years agoNew libtool: 1.2
Mikael Djurfeldt [Sat, 11 Apr 1998 10:00:13 +0000 (10:00 +0000)]
New libtool: 1.2
* ltconfig, ltmain.sh, config.sub, config.guess: Updated.
New automake: 1.3
* Makefile.in, aclocal.m4, configure: Regenerated.
* README: Mention new version numbers on libtool and automake.

26 years agoNew libtool: 1.2
Mikael Djurfeldt [Sat, 11 Apr 1998 09:51:40 +0000 (09:51 +0000)]
New libtool: 1.2
* ltconfig, ltmain.sh, config.sub, config.guess: Updated.
New automake: 1.3
* Makefile.in, aclocal.m4, configure: Regenerated.
* README: Mention new version numbers on libtool and automake.

26 years ago* script.c (scm_compile_shell_switches): Use "guile" as default
Mikael Djurfeldt [Fri, 10 Apr 1998 19:01:53 +0000 (19:01 +0000)]
* script.c (scm_compile_shell_switches): Use "guile" as default
zero arg if argc is NULL.

26 years ago* script.c (scm_compile_shell_switches): Allow NULL argv if argc
Mikael Djurfeldt [Thu, 2 Apr 1998 09:25:00 +0000 (09:25 +0000)]
* script.c (scm_compile_shell_switches): Allow NULL argv if argc
is zero.  (Thanks to Dirk Herrmann.)

26 years ago*** empty log message ***
Mikael Djurfeldt [Thu, 2 Apr 1998 09:24:34 +0000 (09:24 +0000)]
*** empty log message ***

26 years ago* boot-9.scm: Added new run-time option interface eval-options.
Mikael Djurfeldt [Mon, 30 Mar 1998 21:07:52 +0000 (21:07 +0000)]
* boot-9.scm: Added new run-time option interface eval-options.

26 years ago*** empty log message ***
Mikael Djurfeldt [Mon, 30 Mar 1998 21:04:09 +0000 (21:04 +0000)]
*** empty log message ***

26 years ago* gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
Mikael Djurfeldt [Mon, 30 Mar 1998 21:03:35 +0000 (21:03 +0000)]
* gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
warning.

* eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
to avoid compiler warnings.

* dynl-dl.c (sysdep_dynl_func): Only define usymb if needed.

26 years ago* eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
Mikael Djurfeldt [Mon, 30 Mar 1998 21:02:59 +0000 (21:02 +0000)]
* eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
from debug.c --> eval.c

* eval.h, eval.c (scm_eval_options_interface): New options
interface.
(SCM_EVAL_STACK): New option: Size of newly created stacks,
i.e. stacks for new threads.

* eval.c (unsafe_setjmp): Removed with #if 0.

* eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
to avoid compiler warnings.

26 years ago* coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.
Mikael Djurfeldt [Mon, 30 Mar 1998 21:02:31 +0000 (21:02 +0000)]
* coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.

26 years ago* ports.c (scm_add_to_port_table): First line is now line 0
Mikael Djurfeldt [Mon, 30 Mar 1998 19:31:52 +0000 (19:31 +0000)]
* ports.c (scm_add_to_port_table): First line is now line 0
(was 1).  (Interface changed according to suggestion by Per
Bothner.)

* backtrace.c (display_header): Add 1 to line and column numbers
when presenting them to the user.

26 years ago* ports.c (scm_add_to_port_table): First line is now line 0
Mikael Djurfeldt [Mon, 30 Mar 1998 19:22:16 +0000 (19:22 +0000)]
* ports.c (scm_add_to_port_table): First line is now line 0
(was 1).  (Interface changed according to suggestion by Per
Bothner.)

* backtrace.c (display_header): Add 1 to line and column numbers
when presenting them to the user.

26 years ago* throw.c (handler_message): Print message on current error port
Mikael Djurfeldt [Sat, 28 Mar 1998 20:26:17 +0000 (20:26 +0000)]
* throw.c (handler_message): Print message on current error port
instead of default error port.  (Thanks to Maciej Stachowiak.)

26 years ago* boot-9.scm (remove-hook!): New macro. (Thanks to Maciej
Mikael Djurfeldt [Sat, 28 Mar 1998 10:30:40 +0000 (10:30 +0000)]
* boot-9.scm (remove-hook!): New macro.  (Thanks to Maciej
Stachowiak.)

26 years ago * ports.c (scm_add_to_port_table): allocate in units of
Gary Houston [Tue, 3 Mar 1998 10:11:13 +0000 (10:11 +0000)]
* ports.c (scm_add_to_port_table): allocate in units of
struct scm_port_table *, not struct scm_port_table.
* posix.c (scm_close_pipe): remove the port from the port table
and mark as closed.
Thanks to Rob Engle for both fixes.

26 years agominor: remove some commented out old code
Mark Galassi [Sun, 1 Mar 1998 07:25:59 +0000 (07:25 +0000)]
minor: remove some commented out old code

26 years ago* iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
Mikael Djurfeldt [Fri, 6 Feb 1998 18:55:29 +0000 (18:55 +0000)]
* iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.

26 years ago* throw.h: Removed jmpbuf arg in scm_catch_body_t.
Mikael Djurfeldt [Mon, 2 Feb 1998 15:00:59 +0000 (15:00 +0000)]
* throw.h: Removed jmpbuf arg in scm_catch_body_t.

* backtrace.c (display_error_body, display_backtrace_body),
coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
(invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
functions.

* throw.c (scm_internal_catch, scm_internal_lazy_catch): Bodies
don't receive the jmpbuf arg anylonger.
(scm_catch): Don't accept a #f tag.
(scm_throw): Check that key is a symbol.
(scm_ithrow): Don't take a jmpbuf as key.  Don't check key arg.

26 years ago* backtrace.c (display_error_body, display_backtrace_body),
Mikael Djurfeldt [Mon, 2 Feb 1998 15:00:14 +0000 (15:00 +0000)]
* backtrace.c (display_error_body, display_backtrace_body),
coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
(invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
functions.

26 years ago*** empty log message ***
Mikael Djurfeldt [Mon, 2 Feb 1998 14:59:26 +0000 (14:59 +0000)]
*** empty log message ***

26 years ago*** empty log message ***
Mikael Djurfeldt [Sun, 1 Feb 1998 21:05:14 +0000 (21:05 +0000)]
*** empty log message ***

26 years ago * async.c (async_pending): Removed declaration.
Mikael Djurfeldt [Sat, 31 Jan 1998 13:30:10 +0000 (13:30 +0000)]
* async.c (async_pending): Removed declaration.

26 years ago* coop.c, iselect.c: Since thread switches are now performed with
Mikael Djurfeldt [Fri, 30 Jan 1998 21:08:26 +0000 (21:08 +0000)]
* coop.c, iselect.c: Since thread switches are now performed with
interrupts masked, we can't use the old mechanism of delivering
signals immediately when they arrive.  Signals must instead be
delivered when the asyncs run *after* the end of the critical
section in scm_internal_select.  But this also means after context
switch so that the signal will be delivered to a different thread.
To avoid this, I have changed the protocol of
coop_wait_for_runnable_thread and friends so that they are allowed
to return the original thread.  So, if a signal arrives during
scm_internal_select, we won't any longer be forced do a context
switch, but can remain in the same thread and deliver the signal
to it.

* iselect.c: Small fixes.

26 years ago* eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
Mikael Djurfeldt [Fri, 30 Jan 1998 21:07:51 +0000 (21:07 +0000)]
* eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
instead of SCM_ASYNC_TICK.

26 years ago* dynwind.c (scm_wind_chain): New debug function.
Mikael Djurfeldt [Fri, 30 Jan 1998 21:07:14 +0000 (21:07 +0000)]
*  dynwind.c (scm_wind_chain): New debug function.

26 years ago* coop.c, iselect.c: Since thread switches are now performed with
Mikael Djurfeldt [Fri, 30 Jan 1998 21:07:00 +0000 (21:07 +0000)]
* coop.c, iselect.c: Since thread switches are now performed with
interrupts masked, we can't use the old mechanism of delivering
signals immediately when they arrive.  Signals must instead be
delivered when the asyncs run *after* the end of the critical
section in scm_internal_select.  But this also means after context
switch so that the signal will be delivered to a different thread.
To avoid this, I have changed the protocol of
coop_wait_for_runnable_thread and friends so that they are allowed
to return the original thread.  So, if a signal arrives during
scm_internal_select, we won't any longer be forced do a context
switch, but can remain in the same thread and deliver the signal
to it.

* coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
coop_condition_variable_init, coop_condition_variable_wait,
coop_condition_variable_signal): Changed return type from `void'
to `int'.  This is to adhere closer to the pthreads interface.
This, in turn, is part of an attempt to provide C versions of the
mutex and condition variable primitives which can be part of a
frontend to COOP or pthreads.

* coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
coop_condition_variable_destroy): New functions.

26 years ago* coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
Mikael Djurfeldt [Fri, 30 Jan 1998 21:06:47 +0000 (21:06 +0000)]
* coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
scheme_handler_bootstrip, scheme_launch_thread, c_launch_data,
c_body_bootstrip, c_handler_bootstrip, c_launch_thread): Add an
extra layer of functions around the body and handler of a thread.
This extra layer makes sure that the handler is called in the
dynamic context of the surround (= empty dynwind list), but under
the *dynamic root* of the body.  We can not use the dynamic root
of the surround since that root belongs to another thread => stack
is not handled correctly.  It may seem ugly to use this extra
layer, but the extra cost in terms of execution time is really
negligible compared to the total amount of time required to create
a thread, and it would reduce maintainability to duplicate the
crucial and complicated steps performed by cwdr.

* coop-threads.c (scm_wait_condition_variable): Use
coop_condition_variable_wait_mutex.

26 years ago* async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
Mikael Djurfeldt [Fri, 30 Jan 1998 21:06:31 +0000 (21:06 +0000)]
* async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
scm_asyncs_pending and made it global.

26 years ago* __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
Mikael Djurfeldt [Fri, 30 Jan 1998 21:06:16 +0000 (21:06 +0000)]
* __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
(SCM_ALLOW_INTS): Added thread switching code before interrupts
get re-enabled.  The important effect of this is that interrupts
are blocked during thread switching so that thread data structures
don't risk getting messed up by an unfortunate signal.
(SCM_REDEFER_INTS, SCM_REALLOW_INTS): It turned out that gcc-2.8.0
seems to do more aggressive optimization which actually move
instructions around in these macros in a fatal way.  Therefore:
Introduce Anthony's SCM_FENCE macro!  (And I who thought he was
just superstitious...)
(SCM_TICK): Maybe do a context switch and take care of asyncs.
This macro should be used instead of SCM_ASYNC_TICK since the
latter doesn't do context switches any more.

26 years ago* threads.scm: Added simple error and signal handler.
Mikael Djurfeldt [Fri, 30 Jan 1998 21:05:53 +0000 (21:05 +0000)]
* threads.scm: Added simple error and signal handler.
(make-thread, begin-handler): Use this handler.  The most
important effect of this is that signals get unmasked.
Previously, when a signal was thrown signals remained masked
(signals get masked when a signal is taken) which influenced other
threads.

26 years agoSmall fix to scm_getc: Move FD_ZERO into the select loop
Mikael Djurfeldt [Fri, 30 Jan 1998 21:02:36 +0000 (21:02 +0000)]
Small fix to scm_getc: Move FD_ZERO into the select loop

26 years ago*** empty log message ***
Mikael Djurfeldt [Mon, 26 Jan 1998 01:43:43 +0000 (01:43 +0000)]
*** empty log message ***

26 years ago* coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
Mikael Djurfeldt [Mon, 26 Jan 1998 01:43:16 +0000 (01:43 +0000)]
* coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
coop_condition_variable_init, coop_condition_variable_wait,
coop_condition_variable_signal): Changed return type from `void'
to `int'.  This is to adhere closer to the pthreads interface.
This, in turn, is part of an attempt to provide C versions of the
mutex and condition variable primitives which can be part of a
frontend to COOP or pthreads.

* coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
coop_condition_variable_destroy): New functions.

* coop-threads.c (scm_wait_condition_variable): Use
coop_condition_variable_wait_mutex.

* coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
Definitions moved to coop-defs.h.

* coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
scm_cond_destroy): New C interface to mutecis and cond vars.

26 years ago* iselect.c: Small fixes.
Mikael Djurfeldt [Mon, 26 Jan 1998 01:42:43 +0000 (01:42 +0000)]
* iselect.c: Small fixes.

26 years ago* error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.
Mikael Djurfeldt [Sun, 25 Jan 1998 12:00:47 +0000 (12:00 +0000)]
* error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.

26 years ago* iselect.c: Now several threads can wait on the same file
Mikael Djurfeldt [Sat, 24 Jan 1998 01:50:43 +0000 (01:50 +0000)]
* iselect.c: Now several threads can wait on the same file
descriptor.  The behaviour is compatible with OS select: All
threads waiting for the fd return with the same status.

26 years agoUpdated
Mikael Djurfeldt [Sat, 24 Jan 1998 01:49:01 +0000 (01:49 +0000)]
Updated

26 years ago* coop-threads.c, threads.h (scm_spawn_thread): New function.
Mikael Djurfeldt [Fri, 23 Jan 1998 20:51:47 +0000 (20:51 +0000)]
* coop-threads.c, threads.h (scm_spawn_thread): New function.
Can spawn a thread from application C code.

26 years ago* gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
Mikael Djurfeldt [Tue, 20 Jan 1998 18:03:18 +0000 (18:03 +0000)]
* gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
gh_doubles2scm): New functions.

26 years ago* gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
Mikael Djurfeldt [Tue, 20 Jan 1998 17:57:01 +0000 (17:57 +0000)]
* gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
gh_doubles2scm): New functions.

26 years ago*** empty log message ***
Jim Blandy [Mon, 19 Jan 1998 21:22:13 +0000 (21:22 +0000)]
*** empty log message ***