1 1999-09-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3 * feature.c, feature.h: (scm_hook_p, scm_hook_empty_p): New
4 primitives. (Thanks to Greg Badros);
5 (scm_hook_to_list): New primitive; Hooks are now smobs.
7 1999-09-08 Gary Houston <ghouston@easynet.co.uk>
9 * stime.c (bdtime2c): rewrite the ASSERTs. Accept a value
10 of #f for the 10th vector element to avoid an exception
11 seen by Bernard Urban.
12 (scm_mktime): unneeded ASSERT removed.
14 1999-09-07 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
16 * eval.c (scm_map, scm_for_each): Converted to dispatch on generic
19 * __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros.
21 1999-09-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
23 * numbers.c: Converted comparison operations to dispatch on
24 generic if args don't match.
26 * Makefile.am (ETAGS_ARGS): Added support for GPROC and GPROC1.
28 1999-09-06 James Blandy <jimb@mule.m17n.org>
30 * guile-snarf.c: Deleted. Snarfing should respect CPP
31 conditionals, so it needs to actually run CPP. Bleah.
33 1999-09-05 James Blandy <jimb@mule.m17n.org>
35 Handle errors properly in guile-snarf. (Thanks to Han-Wen Nienhuys.)
36 * guile-snarf.in: Be sure to exit with an error if CPP does.
37 * Makefile.am (.c.x): Delete the .x file and exit with an error
38 status if guile-snarf exits with an error status.
39 * Makefile.in: Regenerated.
41 * snarf.h (SCM_GLOBAL_KEYWORD): Call scm_c_make_keyword, not
42 scm_makekey, which doesn't exist any more. Guess nobody's using
45 * guile-snarf.c: New implementation of guile-snarf, meant to be
46 more robust than the shell script. I think it's complete, but I
47 haven't tested it at all, and I haven't changed the build process
48 to actually use it. We should compare its output against that of
49 the existing shell script, for all source files.
51 * guile-snarf.c (parse_args): Abort if we haven't handled some
54 1999-09-03 James Blandy <jimb@mule.m17n.org>
56 * load.c (scm_search_path): If the filename has any extension at
57 all, ignore the entire list of extensions. Also, don't check whether
58 the file is accessible. If the file exists, accessible or not, we
59 should return it. Inaccessible files should cause an error later.
60 (Thanks to Keisuke Nishida for the suggestions.)
62 1999-09-02 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
64 * gc.c (cleanup, scm_init_storage): Use on_exit if present and
65 atexit not available. (sunos4.1.4 needs it.)
67 1999-09-01 James Blandy <jimb@mule.m17n.org>
69 I take it all back --- bcopy does handle overlapping source and
70 destination areas correctly. At least on every system I could
71 find. But it is better to use AC_REPLACE_FUNCS than to introduce
73 * memmove.c: New file, implementing memmove in terms of bcopy.
74 * scmconfig.h.in: Regenerated.
76 Allocators should use the `void *' type for generic pointers.
77 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Change
78 argument and return types.
79 * gc.h: Corresponding changes to prototypes.
82 1999-08-31 James Blandy <jimb@mule.m17n.org>
84 * numbers.c (scm_init_numbers): Claim to support the `complex'
85 feature, as expected by (ice-9 format). (Thanks to Ceri Storey.)
87 * Makefile.am (check-local): Set GUILE_LOAD_PATH so the tests can
88 find (ice-9 boot-9) when Guile was compiled in a separate
89 directory from the source. (Thanks to Rodney Brown.)
90 * Makefile.in: Regenerated.
92 * procs.c (scm_make_subr_opt): Fix typo. Remember to multiply
93 table lengths by the size of a single element when growing the
94 table. (Thanks to Bill Schottstaedt.)
96 1999-08-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
98 * eval.c (SCM_CEVAL): Duplicated the method dispatch code at the
99 SCM_IM_DISPATCH form instead of calling scm_mcache_lookup_cmethod
100 since that cuts down the time for type dispatch by 50%.
102 1999-08-30 James Blandy <jimb@mule.m17n.org>
104 * gh_data.c (gh_set_substr): Revert change of 1999-08-29; bcopy is
105 not a correct substitute for memmove, because it doesn't handle
106 overlapping source and destination areas on many platforms.
107 Overlaps are the primary reason to use memmove in the first place.
108 * ports.c (scm_ungetc): Same.
109 * strop.c (scm_substring_move_x): Same.
111 1999-08-30 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
113 * gc.c (scm_init_storage): Skip registration of cleanup on systems
114 which lack atexit. (Is it important that cleanup is made
115 properly? Maybe we should replace all `exit' with `scm_exit' and
118 * struct.c, struct.h (scm_struct_free_0, scm_struct_free_light,
119 scm_struct_free_standard, scm_struct_free_entity): Declared to
120 return scm_sizet instead of size_t.
122 * gdbint.c, strports.c: #include <unistd.h>. (SEEK_SET is defined
123 there on sunos4.1.4.)
125 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
127 * numbers.c (scm_lcm): Bugfix: BIGDIG --> SCM_BIGDIG;
128 Account for the case when second argument is unbound.
130 * strorder.c (scm_string_less_p, scm_string_ci_less_p): Bugfix.
131 (Thanks to Karoly Lorentey.)
133 * gh_data.c, ports.c, strop.c: Alternatively use bcopy if memmove
134 isn't present. (Thanks to Suzuki Toshiya.)
136 * ports.c: Use ANSI C prototypes in definitions. (Thanks to
139 * filesys.c (scm_stat2scm): Conditionally use S_ISLNK. (Thanks to
142 * dynl-dl.c (RTLD_GLOBAL): Define if non-existent. (Thanks to
143 Bernard Urban and Ian Grant.)
145 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version
146 again. (1.3.4 will be binary incompatible with 1.3.2 because of a
147 change in the representation of entities and operators.)
149 1999-08-29 Gary Houston <ghouston@easynet.co.uk>
151 * ports.c (scm_ungetc): bugfix: if putback_buf is NULL
152 don't allocate zero bytes (thanks to Bill Schottstaedt).
154 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
156 * procs.c (scm_setter): Converted to use generic dispatch.
158 * eval.c, eval.h: Bugfix: scm_sym_apply was not initialized
161 * load.c (scm_search_path): Don't try extensions which already are
162 present at the end of the filename.
163 (scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
165 * stacks.c (scm_sym_apply): Removed. (Thanks to Ken Raeburn.)
167 Cleanup and simplification of generic method dispatch.
168 Also, the quadruple representation of entity and operator
169 procedures has been replaced with single.
171 * tags.h (SCM_IM_HASH_DISPATCH): Removed.
173 * print.c (scm_isymnames): Removed #@hash-dispatch.
175 * objects.c, objects.h (scm_mcache_lookup_cmethod): Moved here
176 from eval.c; Support 0 arity methods.
177 (scm_set_object_procedure_x): Removed scm_sym_atdispatch;
178 (scm_apply_generic_env): Removed.
179 Replaced slots proc0-3 with procedure.
181 * objects.h (SCM_OPERATOR_PROC_0, SCM_OPERATOR_PROC_1,
182 SCM_OPERATOR_PROC_2, SCM_OPERATOR_PROC_3): Replaced by
183 SCM_OPERATOR_PROCEDURE.
184 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_1, SCM_ENTITY_PROC_2,
185 SCM_ENTITY_PROC_3): Replaced by SCM_ENTITY_PROCEDURE.
187 * struct.c, struct.h: Replace 4 procedure slots with one.
188 (scm_struct_i_procedure): Replaces scm_struct_i_procedure.
190 * gc.c (scm_gc_mark): Mark 1 procedure slot in entities instead of
193 * eval.c (scm_sym_args): Removed.
194 (SCM_CEVAL): Simplified entity application.
195 Moved dispatch code to objects.c.
197 * procprop.c (scm_i_procedure_arity): Bugfix: Handle generics.
199 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
201 * sort.c (closureless): Use scm_eval_body.
203 * eval.c (SCM_APPLY): Fixed serious evaluator bug: If a closure
204 with a symbol as last form was first called normally and then via
205 `map' or some other mechanism using primitive apply, an ILOC was
208 1999-08-26 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
210 This change extends the representation of primitive procedures
211 with more data fields, e.g. a place for documentation and true
212 procedure properties.
214 * procs.c, procs.h (scm_subr_entry): New type: Stores data
215 associated with subrs.
216 (SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS,
217 SCM_SUBR_DOC): New macros.
218 (scm_subr_table): New variable.
219 (scm_mark_subr_table): New function.
221 * init.c (scm_boot_guile_1): Call scm_init_subr_table.
223 * gc.c (scm_gc_mark): Don't mark subr names here.
224 (scm_igc): Call scm_mark_subr_table.
227 This change implements a scheme for letting a generic work as a
228 shadow for a primitive procedure. If the primitive procedure
229 can't dispatch on its arguments, control is left over to the
230 generic. Normal wrong type arg errors will be generated until the
231 user has hung the first method on the primitive.
233 * snarf.h (SCM_GPROC, SCM_GPROC1): New macros.
235 * procs.c, procs.h (scm_subr_p): New function (used internally).
237 * gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function.
239 * objects.c, objects.h (scm_primitive_generic): New class.
241 * objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros.
243 * print.c (scm_iprin1): Print primitive-generics.
245 * __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1,
246 SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros.
248 * eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta -->
249 SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point
250 primitives). NOTE: This means that it is now *required* to use
251 SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an
252 obscured representation that will be removed in the future anyway,
253 so backward compatibility is no problem here).
255 * numbers.c: Converted most numeric primitives (all but bit
256 comparison operations and bit operations) to dispatch on generic
260 Better support for applying generic functions.
262 * eval.c, eval.h (scm_eval_body): New function.
264 * objects.c (scm_call_generic_0, scm_call_generic_1,
265 scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New
269 Optimization of the generic function dispatch mechanism.
271 * eval.c (SCM_CEVAL): Apply the cmethod directly after having
272 called scm_memoize_method instead of doing a second lookup.
274 * objects.h (scm_memoize_method): Now returns the memoized cmethod.
279 * procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of
280 scm_sysintern so that the binding connected with the subr name
281 isn't cleared when we give set = 0.
284 1999-08-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
286 More transparent handling of ports with print states.
288 * print.h (SCM_PORT_WITH_PS_P, SCM_PORT_WITH_PS_PORT,
289 SCM_PORT_WITH_PS_PS): Represent ports with print states as a smob
290 instead of a pair of a port and a print state. We'll need to cons
291 once extra in scm_printer_apply but the type system will be
292 cleaner, it will mix better with GOOPS, and, it will be even more
293 transparent to the user.
295 * print.c (scm_get_print_state): New procedure: Given an output
296 port, return the print state associated to it in the current print
297 chain, if one exists;
298 (scm_port_with_print_state): New procedure: Associate a
299 print-state with a port.
300 (scm_valid_oport_value_p): Use SCM_PORT_WITH_PS_P;
301 (scm_printer_apply): Wrap port and pstate as a smob;
302 (print_state_printer): Removed.
304 * objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports.
306 * eval.c (scm_init_eval): Use scm_make_smob_type instead of
309 * ports.c (scm_output_port_p): Bugfix: Coerce output port before
310 testing (otherwise the port-print-state trick won't be transparent
311 to the user; one example where this caused problems was in the
312 (ice-9 format) module).
314 1999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
316 * eval.c (SCM_CEVAL): Let the SCM_IM_SLOT_SET_X form return
317 SCM_UNSPECIFIED instead of the set value.
319 1999-08-20 James Blandy <jimb@mule.m17n.org>
321 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.
323 * ports.h (enum scm_port_rw_active): New enum, containing
324 SCM_PORT_READ, SCM_PORT_WRITE, and SCM_PORT_NEITHER (instead of
325 zero). The debugger knows about enums, but doesn't know about
327 (typedef scm_port): Declare rw_active member to be an enum
329 * fports.c (fport_flush, fport_end_input): Use SCM_PORT_NEITHER
331 * ports.c (scm_add_to_port_table): Same.
332 * strports.c (st_flush, st_end_input): Same.
334 * ioext.c (scm_do_read_line, scm_read_line): Use scm_must_malloc,
335 scm_must_realloc, and scm_done_malloc as appropriate.
337 1999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
339 * sort.c (quicksort): Added condition to protect the algorithm
340 from crashing the interpreter if the less predicate is buggy.
342 1999-08-19 Gary Houston <ghouston@easynet.co.uk>
344 * fports.c (fport_write): fix line-buffering mode again.
345 (scm_open_file): recognise 'l' for line-buffering.
346 (scm_setvbuf): recognise _IOLBF for line-buffering.
348 1999-08-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
350 * Makefile.am (libguile_la_LDFLAGS): Increased the version number
353 * eval.c (SCM_APPLY), sort.c (closureless): Expand body when
356 1999-08-18 Gary Houston <ghouston@easynet.co.uk>
358 * fports.c (fport_write): use memcpy instead of strncpy, in case
359 the data contains NUL.
361 1999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
363 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
365 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
366 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
367 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
368 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
369 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
370 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
371 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
372 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
373 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
374 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
375 scm_sym_ as prefix for symbols.
377 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
379 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
380 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
381 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
382 scm_sym_atcall_cc): Made global.
384 1999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
386 * eval.c (scm_sym_args): Made global.
388 * objects.c (scm_set_object_procedure_x): Disallow setting of
389 procedures for pure generic functions.
391 1999-08-12 Gary Houston <ghouston@easynet.co.uk>
393 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
394 Scheme name from lseek to seek, but lseek was added recently so
395 it shouldn't be a big problem.
396 * ports.c, gdbint.c, ioext.c: changed callers.
398 1999-08-11 Gary Houston <ghouston@easynet.co.uk>
400 * fports.c (fport_input_waiting): if select is used, return 1
401 instead of whatever FD_ISSET expands to. maybe it will be useful
402 to interpret the value from the input_waiting ptob procedure as a
403 lower bound on the number of bytes available.
405 * Mikael asked for a few names to be changed...
407 * ports.c (scm_make_port_type): take the write procedure as the
408 second argument instead of the flush procedure.
409 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
410 fflush -> flush, read_flush -> end_input, fclose -> close,
411 fill_buffer -> fill_input, ftruncate -> truncate,
412 input_waiting_p -> input_waiting.
414 * ports.c (end_input_void_port): was read_flush_void_port.
415 (scm_set_port_end_input): was scm_set_port_flush_input.
416 (scm_set_port_flush): was scm_set_port_write.
417 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
418 (scm_end_input): was scm_read_flush.
419 (scm_fill_input): was scm_fill_buffer.
420 (scm_flush): was scm_fflush.
421 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
422 (fport_end_input): was local_read_flush.
423 (fport_flush): was local_fflush.
424 (fport_close): was local_fclose.
425 (fport_truncate): was local_ftruncate.
426 (fport_seek): was local_seek.
427 (fport_free): was local_free.
428 (fport_fill_input): was fport_fill_buffer.
429 * strports.c (st_end_input): was st_read_flush.
430 (st_truncate): was st_ftruncate.
431 * vports.c: (sf_flush): was sfflush.
432 (sf_close): was sfclose.
433 (sf_fill_input): was sf_fill_buffer.
435 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
438 1999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
440 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
441 forms now contain the expressions to be dispatched upon instead of
442 depending on a surrounding lambda or let; Generic function
443 dispatch has been optimized; `apply' on a generic function now
444 works a little bit strangely. It uses a trick so that the type
445 dispatch code in SCM_CEVAL can be reused.
447 * objects.h, objects.c (scm_apply_generic_env): Added (used by
449 (scm_operator_p): Added.
450 (scm_sym_atdispatch): Added.
451 (scm_set_object_procedure_x): Modified to handle the new style
453 (scm_object_procedures): New debugging procedure.
455 1999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
457 * eval.c, eval.h (scm_sym_args): Added.
459 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
461 * feature.c, feature.h (scm_c_run_hook): Added.
463 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
464 cdrxnoap and loopnoap instead of begin and loop.
466 1999-08-04 Gary Houston <ghouston@easynet.co.uk>
468 * ports.c (scm_putc, scm_puts),
469 * unif.c (scm_uniform_array_write): use scm_lfwrite.
470 * ports.c (scm_putc): change type of first argument from int to char.
472 1999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
474 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
475 SCM_IM_HASH_DISPATCH.
477 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
478 (scm_si_redfined, scm_si_hashsets): Moved.
480 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
481 flag which combines type and status info so that the class
482 redefinition protocol has zero cost during normal execution.
484 1999-08-03 Gary Houston <ghouston@easynet.co.uk>
486 * ports.h (scm_ptob_descriptor): include a write procedure again.
487 it's more efficient for unbuffered fports (e.g., sockets.)
489 * ports.c (scm_puts): use ptob->write.
490 * vports.c (scm_make_sfptob): set write proc in ptob.
491 * strports.c (scm_make_stptob): set write proc in ptob.
492 * ports.c (write_void_port): new procedure.
493 * vports.c (sf_write): new procedure.
494 * ports.c (scm_lfwrite): use ptob->write.
495 * strports.c (st_write): new procedure.
496 * fports.c (fport_write): new procedure.
497 (scm_make_fptob): set write in ptob to fport_write.
498 * ports.h: prototype for scm_set_port_write.
499 * ports.c (scm_make_port_type): initialise ptob write procedure.
500 (scm_set_port_write): new proc.
502 1999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
504 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
505 until we've verified that it is actually a port. (Thanks to
508 1999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
510 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
511 code, particularly an unnecessary test (len != size, where len ==
512 size). (Was this leftovers from debugging code, or have I missed
515 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
516 size. (Thanks to James Dean Palmer.)
518 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
519 (Thanks to Lorentey Karoly.)
521 1999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
523 * eval.c (scm_m_expand_body): Use scm_cons_source.
525 * struct.c (scm_print_struct): Use vtable name.
527 * print.c (scm_init_print): Set name of print state type.
529 * stacks.c (scm_init_stacks): Set name of stack type.
531 1999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
533 * eval.c (SCM_CEVAL): Removed old implementation of internal
536 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
538 * debug.c, debug.h (scm_reverse_lookup): Added.
539 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
540 internal procedure definitions; Don't use scm_i_inner_name.
542 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
545 * eval.h: Added prototypes for multi language support functions.
547 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
548 improper lists in the low-level representation, since that will
549 cause a begin to be prepended at macro expansion.
551 * eval.c (scm_cons_source): Version of cons which copies source
552 properties from an existing cell.
553 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
555 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
556 procedure source before calling scm_unmemocopy instead of faking
559 1998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
561 Ported `internal defines' fix from SCM. Original ChangeLog entry:
563 1998-07-09 Radey Shouman <radey@colorage.com>
565 * eval.c (ceval_1): Modifications to allow rewriting of interal
566 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
567 body of which it is the CAR is macro expanded by m_expand_body,
568 which rewrites internal DEFINE.
570 (m_expand_body): Added.
572 (m_macroexp1): Added argument to control error checking:
573 m_expand_body may speculatively expand forms in the wrong
574 environments. Made argument number checks conditional on
577 (m_body): Added, error checks bodies and inserts the ISYM tokens.
579 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
582 (m_cond): (m_case): (m_quote): Modified to avoid destructively
583 changing their argument forms. Since m_expand_body
584 speculatively macro expands forms the process must be
587 (m_ident_eqp): Fixed to use proper environment.
589 (renamed_ident): Added DEFER_INTS_EGC.
591 Added prototypes for static functions.
597 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
598 is false, do not produce an error for unbound variables, return a
599 pointer to cell_undef instead.
601 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
605 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
606 destructively changing their argument forms. Since m_expand_body
607 speculatively macro expands forms the process must be reversible.
609 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
610 SCM_IM_LET introduced by named lets.
612 (scm_m_letstar): Use scm_m_body instead of bodycheck.
614 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
615 scm_letrec. scm_letrec1 does not check for a null binding and
616 takes an additional argument to specify the ISYM of the body. Use
617 scm_m_body instead of bodycheck.
619 (scm_m_let): Use scm_m_body instead of bodycheck.
621 (scm_m_expand_body, scm_macroexp): New.
623 (unmemocopy): Account for ISYMs introduced by scm_m_body.
625 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
626 check=1. Throw error for internal defined that have not been
627 rewritten by scm_m_expand_body.
629 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
630 Removed prototype for SCM_APPLY.
632 * tags.h: Added extern declaration of scm_isymnames.
634 1999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
636 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
638 * lang.c: New file: Beginning of multi-language support.
640 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
642 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
643 (scm_dynamic_wind): Added argument checking for the after guard so
644 that we don't add garbage on the dynwind chain.
645 (scm_swap_bindings): Added.
647 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
648 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
649 (scm_isymnames): New isyms for multi-language support.
651 * eval.c (scm_nil, scm_t): New symbols.
652 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
653 forms for multi-language support.
655 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
657 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
659 Renamed functions in the random function library interface
660 from scm_i_XXX --> scm_c_XXX.
662 1999-07-25 Gary Houston <ghouston@easynet.co.uk>
664 * ports.c (scm_putc): fix line-buffering.
666 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
668 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
669 scm_set_ptob_XXX --> scm_set_port_XXX.
671 1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
673 * ports.c, ports.h (scm_make_port_type): New interface for
674 creation of port types (replaces scm_newptob). Just as for the
675 smobs, we need to separate the internal representation of smob
676 types from the interface, so that we easily can add new fields and
677 rearrange things without caring about backward compatibility.
678 This change was forced by the need in GOOPS to create classes
679 representing port types.
680 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
681 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
682 scm_set_ptob_seek, scm_set_ptob_truncate,
683 scm_set_ptob_input_waiting_p): New setters.
684 (scm_newptob): Rewritten to use scm_make_port_type. For backward
686 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
687 (scm_prinport): Removed.
688 (scm_port_print): Added.
689 (scm_print_port_mode): Added.
690 (void_port_ptob, print_void_port, close_void_port, noop0):
691 Removed. Removed #include "genio.h" Added #include "objects.h",
694 * fports.c (prinfport): Moved code from ports.c.
696 (scm_fptob): Removed. Instead use new interface.
697 (scm_make_fptob): Added. (Need to create basic ports in a
698 specific order in ports.c.)
700 * strports.c (scm_stptob, prinstpt, noop0): Removed
701 (scm_make_stptob): Added.
703 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
704 (scm_make_sfport): Added.
706 * filesys.c (scm_dir_print): Don't use the port printing code.
707 Instead provide specific directory printer.
709 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
711 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
714 * smob.c (scm_smob_print): Handle non-existing type name nicely.
715 Removed #include "genio.h"
717 * objects.c (scm_make_port_classes): New function ptr.
719 1999-07-24 Gary Houston <ghouston@easynet.co.uk>
721 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
723 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
724 allow the 1st argument to be a fdes or filename as well as a
725 port (as in the filesys.c version).
727 * filesys.c (scm_truncate_file): removed.
729 1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
731 * readline.c, readline.h: Removed.
733 * objects.c, objects.h (scm_port_class): Added.
734 (scm_class_of): Look up port class in scm_port_class.
735 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
736 SCM_INOUT_PCLASS_INDEX): Added.
739 * Makefile.am: Removed genio.c, genio.x.
743 1999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
745 * init.c: Make sure that scm_post_boot_init_modules is called only
746 once. (Important when using a dumped image.; Thanks to Bernard
749 1999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
751 * guardians.c (scm_guardian_zombify): Separate scanning for
752 zombies from marking the pairs of the free list.
754 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
755 use the macros. (Thanks to Michael Livshin.)
757 * eval.c (scm_m_lambda): Let bodycheck check the body of the
758 lambda. Let your sins be purified by the blood of the lambda.
759 (Thanks to Eric Hanchrow.)
761 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
762 (Thanks to Valdis Kletnieks.)
764 Fixes for EMX from Mikael Ståldal.
766 * filesys.c: #include <io.h>, if we have it.
767 * scmconfig.h.in: Regenerated.
769 * stime.c (ftime): Delete declaration for this function --- let
770 the system supply it.
772 Cleanups from John Bley.
774 * gdbint.c: Don't include <stdio.h> and "_scm.h" twice.
776 * gsubr.c: Don't include "gsubr.h" twice.
778 Cleanups for compilation on Irix 6, from David Kaelbling.
780 * regex-posix.c (scm_regexp_error_msg): Change `rx' argument to
781 regex_t pointer. This is what the callers have, mostly.
782 (scm_regexp_exec): Don't forget to pass the `rx' argument to
783 scm_regexp_error_msg.
785 * scmsigs.c (scm_sigaction): Cast SIG_DFL and SIG_IGN to SCM, not
786 int. That way, if we get a warning on this line, it's more likely
787 that we're really missing bits we care about.
789 * snarf.h (SCM_CONST_LONG): Remove trailing semicolon from
792 * tags.h (SCM_IMP, SCM_NCONSP, SCM_NCELLP, SCM_ITAG3, SCM_TYP3,
793 SCM_TYP7, SCM_TYP7S, SCM_TYP16, SCM_TYP16S, SCM_GCTYP16,
794 SCM_GCMARKP, SCM_GC8MARKP): Don't cast to int. Either SCM or no
795 cast at all is more appropriate in every case. At the moment, we
796 assume everywhere that SCM is an integral type anyway.
798 1999-07-14 Gary Houston <ghouston@easynet.co.uk>
800 * unif.c (scm_uniform_array_read_x), ports.c (scm_getc): increment
801 read_pos after scm_fill_buffer.
803 * ioext.c (scm_do_read_line): simplify by ignoring the fill_buffer
806 * vports.c (sf_fill_buffer), strports.c (stfill_buffer),
807 fports.c (fport_fill_buffer): implement the interface change.
809 * ports.c (scm_fill_buffer): interface change: no longer increments
810 read_pos past the character that's returned. it seems clearer to
811 leave it to the caller to decide what to do (thanks Jim).
813 * vports.c (sf_fill_buffer): put the read char into the buffer
814 as well as returning it.
816 * ports.c (scm_grow_port_cbuf): residue of this deleted procedure
819 1999-07-13 Gary Houston <ghouston@easynet.co.uk>
821 * strports.c (scm_strprint_obj): simplify. start with initial
823 (st_seek): don't allow string to be extended if seeking past
824 the end of a read-only port.
826 1999-07-12 Gary Houston <ghouston@easynet.co.uk>
828 * strports.c (st_seek): change the resize checks.
830 * ports.c (scm_ftruncate): throw error if offset works out negative.
832 * strports.c (st_flush): increase string size in blocks of
833 SCM_WRITE_BLOCK instead of 1. set read_end to read_pos if
834 it's greater and reset read_buf_size.
835 (scm_mkstrport): set rw_randow if only writing, since read_buf needs
836 to be maintained for output ports too (it holds the written
837 part of the string, while write_buf may have unwritten buffer
839 (st_truncate): rewritten.
840 (top of file): added a few notes.
842 1999-07-10 Jim Blandy <jimb@savonarola.red-bean.com>
844 Patch from Greg Badros:
845 * snarf.h (SCM_PROC, SCM_PROC1): Use __cplusplus or
846 GUILE_CPLUSPLUS_SNARF macros to force adding a cast to the last
847 (function pointer) argument to scm_make_gsubr and scm_make_subr
848 calls. This avoids warnings in C++ programs using guile-snarf.
850 1999-07-06 Gary Houston <ghouston@easynet.co.uk>
852 * strports.c (st_grow_port): set pt->read_pos. set
853 pt->read_buf_size one less than pt->write_buf_size if there's
854 an unwritten char at the end of the string. similarly for
856 (st_resize_port): renamed from st_grow_port.
857 (st_seek): simplify by assuming that pt->write_pos == pt->read_pos.
858 seek from read_end instead of write_end for SEEK_END.
859 (st_ftruncate): calculate current length using readbuf, not write
861 (scm_strport_to_string): use read_buf_size for length.
862 (stfill_buffer): don't re-initialise the readbuf.
864 1999-07-05 Gary Houston <ghouston@easynet.co.uk>
866 * strports.c (scm_strport_to_string): new procedure.
867 (scm_call_with_output_string, scm_strprint_obj): use
868 scm_strport_to_string.
869 used SCM_INUM0 instead of SCM_MAKINUM (0) in a few places.
871 1999-07-08 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
873 * symbols.c (scm_gensym): Bugfix. (Thanks to Johannes Hjorth.)
875 Fri Jun 25 22:14:32 1999 Greg Badros <gjb@cs.washington.edu>
877 * smob.c: added scm_make_smob_type_mfpe (), scm_set_smob_mfpe ();
878 use scm_make_smob_type_mfpe to initialize "free", "flo", "bigpos",
879 and "bigneg" smob types.
881 * smob.h: Add do ... while(0) idiom to SCM_NEWSMOB. Added
882 SCM_RETURN_NEWSMOB macro. Added protos for new functions in
885 * *.c: Use scm_make_smob_type_mfpe, instead of scm_newsmob, and
886 use SCM_NEWSMOB or SCM_RETURN_NEWSMOB in constructors instead of
887 SCM_NEWCELL and setting the CAR/CDR by hand.
889 1999-07-04 Gary Houston <ghouston@easynet.co.uk>
891 * ports.c (scm_putc): call scm_read_flush.
892 (scm_puts): likewise.
893 (scm_lfwrite): likewise.
894 (scm_lseek): likewise.
895 (scm_ftruncate): likewise.
896 * unif.c (scm_uniform_array_write): likewise.
897 * ioext.c (scm_redirect_port): likewise.
899 * ports.c (scm_fill_buffer): don't take pt argument. change callers.
900 (read_flush_void_port): new proc, for void port ptob.
902 * vports.c (sf_read_flush): likewise.
903 * strports.c (st_read_flush): take offset arg.
904 * fports.c (local_read_flush): use offset, don't reset putback
907 * ports.h (scm_ptobfuns): let read_flush take an offset argument,
908 which is the number of chars from the putback buffer.
910 * ports.c (scm_read_flush): new procedure, resets the putback
911 buffer before calling the ptob routine.
913 * strports.c (scm_strprint_obj): bug fix: get pt from the port,
914 not from the parameter obj. (Thanks to Eric Moore.)
916 * ports.h: SCM_CRDY, SCM_CUC, SCM_CRDYP, SCM_SETRDY, SCM_CUNGET,
917 SCM_CGETUN, SCM_CLRDY, SCM_TRY_CLRDY, SCM_N_READY_CHARS: deleted.
919 * strings.c (scm_make_string): throw error if 2nd arg isn't
922 * unif.c (scm_uniform_array_read_x): fix reading from a port.
924 (scm_uniform_array_write): likewise.
926 1999-06-29 Gary Houston <ghouston@easynet.co.uk>
928 * ports.c (scm_drain_input): rewritten.
930 * fports.c (local_fclose): check putback_buf.
931 (local_read_flush): likewise.
933 * ports.c (scm_remove_from_port_table): maybe free putback_buf.
935 * ports.h (scm_port): replace cbuf/cbufend/cp with putback_buf/
937 (SCM_INITIAL_PUTBACK_BUF_SIZE): renamed from SCM_INITIAL_CBUF_SIZE.
939 * ports.c (scm_grow_port_cbuf): deleted.
940 (scm_add_to_port_table): initialise putback_buf to 0. remove cbuf
942 (scm_char_ready_p): check putback_buf
943 (scm_fill_buffer): likewise.
944 (scm_ungetc): rewritten.
946 1999-06-27 Gary Houston <ghouston@easynet.co.uk>
948 * fports.c (local_fclose): account for push-back buffer.
950 * ports.c (scm_char_ready_p): check the push-back buffer in
953 * ioext.c (scm_do_read_line): remove the extra code to handle
954 the push-back buffer.
956 * ports.c (scm_getc): don't use SCM_CRDYP etc.
958 * ioext.c (scm_do_read_line): call scm_fill_buffer.
960 * ports.c (scm_ungetc): don't call SCM_CUNGET. reset the
961 read buffer pointers.
962 scm_fill_buffer: new procedure.
963 (scm_getc): call scm_fill_buffer.
965 * ports.h (struct scm_port): saved_read_buf, saved_read_pos,
966 saved_read_end: new fields.
968 1999-06-24 Mikael Djurfeldt <mdj@orjan.nada.kth.se>
970 * dynl-dl.c (sysdep_dynl_link): Added parenthesis around the
971 trinary conditional in order for the flag computation to be
974 1999-06-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
976 * struct.c, struct.h:
978 In order to support different kinds of deallocation, a destructor
979 slot has been added to struct vtables. This allows for structs
980 containing pointers to other memory blocks.
982 (scm_struct_i_free): New hidden struct slot. Holds destructor for
983 instances to this vtable.
984 (scm_struct_free_0): New destructor: Doesn't deallocate data.
985 (scm_struct_free_light): New destructor: Deallocates a light
986 struct (i.e. a struct without hidden slots).
987 (scm_struct_free_standard): New destructor: Deallocates standard
989 (scm_struct_free_entity): New destructor: Deallocates entity
991 (SCM_SET_VTABLE_DESTRUCTOR): New macro.
993 Changes to hidden slots:
995 (scm_struct_i_size): scm_struct_i_flags now shares space with
996 scm_struct_i_size which holds the size of light structs.
997 (scm_struct_i_n_words): This slot has changed meaning. Previously
998 it included hidden slots. Now it indicates visible slots.
999 (scm_alloc_struct): Clear flags.
1000 (SCM_STRUCTF_MASK): 4 new flag positions added => 12 bits.
1002 (struct_num, scm_struct_i_tag): Removed.
1003 (scm_struct_vtable_tag): Base tag on the pointer to mallocated
1005 (scm_struct_ihashq): Base hash value on pointer to struct handle.
1007 * tag.c (scm_tag): Base tag on vtable pointer.
1009 * objects.c (scm_init_objects): Initialize destructor slot of the
1010 primordial entity class.
1012 * objects.h (SCM_SET_CLASS_DESTRUCTOR,
1013 SCM_SET_CLASS_INSTANCE_SIZE): New macros.
1015 * gc.c (scm_gc_sweep): Call struct free slot.
1017 * keywords.c, keywords.h (scm_c_make_keyword): New function.
1018 (We should remove the use of the prefix '-'.)
1020 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): New macros.
1022 * libguile.h: #include "objects.h"
1024 1999-06-22 Marius Vollmer <mvo@zagadka.ping.de>
1026 * dynl.c (DYNL_GLOBAL): New.
1027 (sysdep_dynl_link): Added `flags' argument.
1028 (kw_global, sym_global): New.
1029 (scm_dynamic_link): Handle keyword arguments. Pass suitable flags
1030 to sysdep_dynl_link.
1031 * dynl-dl.c (sysdep_dynl_link): Handle new `flags' argument by
1032 conditrionally adding RTLD_GLOBAL to DLOPEN_MODES.
1033 * dynl-shl.c (sysdep_dynl_link): Add and ignore new flags
1035 * dynl-dld.c (sysdep_dynl_link): Add and ignore new flags
1037 * dynl.h (scm_dynamic_link): Added rest argument.
1039 1999-06-21 Marius Vollmer <mvo@zagadka.ping.de>
1041 * dynl.c (sysdep_dynl_unlink, sysdep_dynl_func): Use const
1042 qualifier for char* argument, to match prototypes. Thanks to Mark
1045 1999-06-21 Jim Blandy <jimb@savonarola.red-bean.com>
1047 * dynl.c (no_dynl_error, sysdep_dynl_link, sysdep_dynl_unlink,
1048 sysdep_dynl_func): Use ANSI declarations, and const char *
1049 pointers. (Thanks to Mark Elbrecht.)
1051 1999-06-19 Jim Blandy <jimb@savonarola.red-bean.com>
1053 Patch from Greg Harvey:
1054 * eq.c, eval.c, list.c, ramap.c, vectors.c: Always write parens
1055 around the condition of an `if', `while', etc., even if the
1056 condition is a macro invocation that expands to something
1057 surrounded by parens. It's more readable.
1059 * eval.c (scm_map, scm_for_each): Verify that all arguments are
1060 proper lists, and of the appropriate lengths.
1061 (check_map_args): New function. (Thanks to Greg Harvey for the
1064 1999-06-19 Michael Livshin <mike@olan.com>
1066 * guardians.c (guardian_t): `next' - new field to be used for
1067 chaining the live guardians in a single-linked list during the GC
1069 (GUARDIAN_NEXT): convenience macro to access the `next' field.
1070 (guardians, guardians_size, n_guardians): deleted.
1071 (first_live_guardian, current_link_field): new globals used to
1072 point to the head of the live guardian list and current `next'
1073 field, respectively.
1074 (g_mark): append the guardian to the live guardian list.
1075 (scm_guardian_gc_init): zero the live guardian list.
1076 (scm_guardian_zombify): iterate through the live guardian list.
1078 (Applied by Jim Blandy.)
1080 1999-06-16 Jim Blandy <jimb@savonarola.red-bean.com>
1082 * gc.c (scm_mallocated): Just make this signed.
1083 (scm_igc): Check for underflow by seeing if this is negative.
1085 * gc.h (scm_mallocated): Fix declaration.
1086 (Thanks to Greg Harvey.)
1088 * ports.h: #include <sys/types.h>, to get a definition for `off_t'.
1090 1999-06-15 Jim Blandy <jimb@savonarola.red-bean.com>
1092 * stime.c (bdtime2c): Initialize lt->gmtoff and lt->tm_zone from
1093 sbd_time. (Thanks to Eric Hanchrow.)
1095 Fix from Ken Raeburn <raeburn@raeburn.org>:
1096 * weaks.c (scm_make_weak_vector): Add another extra slot before
1097 vector contents, to be used only during garbage collection.
1098 * weaks.h (SCM_WVECT_GC_CHAIN): New macro to access it.
1099 * gc.c (scm_weak_vectors): Now a SCM instead of a SCM*, and now
1101 (scm_weak_size, scm_n_weak): Deleted.
1102 (scm_igc): Use SCM_WVECT_GC_CHAIN to build up a chain of weak
1103 vectors without allocating new storage during GC, using
1104 scm_weak_vectors as the head of the chain.
1105 (scm_mark_weak_vector_spines): Walk SCM_WVECT_GC_CHAIN chain
1106 instead of stepping through an array.
1107 (scm_gc_sweep): Update offset used to find start of weak vector to
1109 (scm_init_storage): Set scm_weak_vectors to EOL.
1111 Fix from Ken Raeburn <raeburn@raeburn.org>:
1112 * gc.c (already_in_gc): New variable.
1113 (scm_igc): Set and clear already_in_gc; abort if it's set at
1116 1999-06-14 Jim Blandy <jimb@savonarola.red-bean.com>
1118 Fix from Gary Houston:
1119 * fports.c (local_seek): Signal an error if the seek fails.
1120 * ports.c (scm_lseek): Don't check return value of port's seek
1121 function; it's its job to signal an error if there's a problem.
1123 1999-06-12 Jim Blandy <jimb@savonarola.red-bean.com>
1125 * strports.c (scm_call_with_output_string): Don't include the
1126 extra character at the end of the string in the result.
1128 * ioext.c (scm_read_line): Switch to reading properly.
1130 * fports.c, fports.h, gc.c, gdbint.c, ioext.c, ports.c, ports.h,
1131 scmsigs.c, strports.c, vports.c: Install the sources which
1132 actually correspond to the changes described below. I got the
1133 ChangeLog entries and the patch from two different places...
1135 1999-06-09 Jim Blandy <jimb@savonarola.red-bean.com>
1137 * gc.c (scm_igc): Check for scm_mallocated underflow. Otherwise,
1138 it shows up as terrible performance, as we GC constantly.
1140 * ioext.c (scm_do_read_line): Rewritten to use memchr to find the
1141 newline. A bit faster, and definitely hairier.
1142 (scm_read_line): Count newlines here instead.
1144 * strings.c (scm_take_str): New function.
1145 (scm_take0str): Reimplement in terms of scm_take_str. * strings.h
1146 (scm_take_str): New declaration. * ioext.c (scm_read_line): Use
1147 scm_take_str, to avoid copying the string.
1149 Add some simple-minded support for line buffered ports.
1150 * ports.h (SCM_BUFLINE): New flag for ports.
1151 * init.c (scm_init_standard_ports): Request line-buffering on
1152 the standard output port.
1153 * ports.c (scm_mode_bits): Recognize 'l' as a request for line
1155 (scm_putc, scm_puts, scm_lfwrite): If the port is line-buffered,
1156 and there's a newline to be written, flush the port.
1158 Gary Houston's open-buffer port patches:
1160 1999-04-26 Gary Houston <ghouston@easynet.co.uk>
1162 * ports.c: (scm_lseek): clear buffers even if just reading current
1165 * fports.c (local_fclose): call local_fflush unconditionally.
1166 (various): don't use the scm_must... memory procs.
1168 1999-04-25 Gary Houston <ghouston@easynet.co.uk>
1170 * ports.h (scm_port): make read_pos a pointer to const.
1171 strports.c: take care of rw_active and rw_randow.
1172 fports.c: scm_fport_drain_input: removed. do it all in ports.c.
1173 strports.c (scm_mkstrport): check that pos is reasonable.
1174 ioext.c (scm_ftell, scm_fseek): use lseek.
1175 (SCM_CLEAR_BUFFERS): macro deleted.
1176 ioext.c (redirect_port: use ptob fflush, read_flush.
1177 ports.h (scm_ptobfuns): add ftruncate.
1178 ports.c (scm_newptob): set ftruncate.
1180 ports.c (scm_ftruncate): new procedure.
1181 fports.c (local_ftrunate), strports.c (str_ftruncate): new procs.
1182 strports.c (st_seek, st_grow_port): new procs.
1183 fports.h (scm_port): change size types from int to off_t.
1184 ports.c (scm_init_ports): initialise the seek symbols here
1185 instead of in ioext.c.
1186 strports.c (scm_call_with_output_string): start with an empty
1187 string, so seek and ftruncate can be used.
1189 gdbint.c: adjust string port usage.
1191 1999-04-24 Gary Houston <ghouston@easynet.co.uk>
1193 * ports.h (scm_ptobfuns): add a read_flush procedure which is the
1194 equivalent to fflush for the read buffer.
1195 * ports.c (scm_newptob): set read_flush.
1196 ports.c (void_port_ptob): set read_flush.
1197 fports.c (local_read_flush): new proc. add to ptob.
1198 strport.c (st_read_flush): likewise.
1199 vport.c (sf_read_flush): likewise.
1200 fports.h (struct scm_fport): remove random member. there's nothing
1201 left but fdes. leaving it as a struct to allow for future changes.
1202 fports.c: replace usage of scm_fport::random with scm_port::rw_random.
1203 ports.c: (scm_putc, scm_puts, scm_lfwrite): call the read_flush
1204 ptob proc if the read buffer is filled.
1206 1999-04-23 Gary Houston <ghouston@easynet.co.uk>
1208 * ports.h (scm_port): add a rw_random member and replace
1209 reading and writing members with rw_active member.
1210 SCM_PORT_READ/SCM_PORT_WRITE: new values.
1212 1999-04-22 Gary Houston <ghouston@easynet.co.uk>
1214 * ports.h (struct scm_port_table): add writing and reading members
1215 to replace write_needs_seek: it isn't good enough for non-fports.
1216 ports.c, ioext.c, fports.c: corresponding changes.
1217 (struct scm_port_table): give it a typedef and rename to scm_port.
1218 ports.c, fports.c, strports.c, vports.c, ioext.c, ports.h:
1219 corresponding changes.
1221 1999-04-20 Gary Houston <ghouston@easynet.co.uk>
1223 * ports.c (scm_newptob): bugfix: set seek member.
1224 * (scm_lseek): new procedure, using code from ioext.c:scm_fseek
1225 and generalised to all port types.
1227 1999-04-18 Gary Houston <ghouston@easynet.co.uk>
1229 * scmsigs.c (scm_init_scmsigs): set the SA_RESTART flag for all
1230 signals (it was only being done for handlers installed from Scheme).
1231 Otherwise (for example) SIGSTOP followed by SIGCONT on an interpreter
1232 waiting for input caused an EINTR error from read.
1234 1999-04-07 Gary Houston <ghouston@easynet.co.uk>
1236 * ports.h (struct scm_port_table): make all the char members
1237 unsigned, so they convert to int without becoming negative if large.
1239 1999-03-14 Gary Houston <ghouston@easynet.co.uk>
1241 * fports.c (scm_fdes_wait_for_input): forgot to check compilation
1242 with threads enabled. rename this procedure to
1243 fport_wait_for_input and take a port instead of a fdes.
1244 use scm_fport_input_waiting_p instead of scm_fdes_waiting_p.
1246 * readline.c (scm_readline): Applied a patch from Greg Harvey to
1247 get readline support working again: use fdopen to get FILE objects.
1249 1999-02-26 Gary Houston <ghouston@easynet.co.uk>
1251 * gc.c (scm_init_storage): install an atexit proc to flush the
1253 (cleanup): the new proc. it sets a global variable which can be
1254 checked by the ptob flush procs to avoid trying to throw
1255 exceptions during exit. not very pleasant but it seems more reliable.
1256 * fports.c (local_fflush): check terminating variable and if set
1257 don't throw exception.
1258 * CHECKME: that the atexit proc is installed if unexec used.
1260 * throw.c (scm_handle_by_message): don't flush all ports here.
1261 it still causes bus errors.
1263 * fports.h (SCM_FPORT_CLEAR_BUFFERS): rename to SCM_CLEAR_BUFFERS
1264 and move to ioext.c.
1266 * fports.c (scm_fdes_waiting_p): merged into fport_input_waiting_p.
1268 * ports.c (scm_char_ready_p): check the port buffer and call the
1269 ptob entry if needed.
1271 * ports.h (scm_ptobfuns): input_waiting_p added. change all the
1272 ptob initialisers. use it in char-ready
1274 * ioext.c (scm_do_read_line): moved from ports.c. make it static.
1276 * vports.c (sfflush): modified to write a char (since softports
1277 currently use shortbuf.)
1279 * fports.c (scm_standard_stream_to_port): moved to init.c and
1282 * init.c (scm_init_standard_ports): make stdout and stderr
1283 unbuffered if connected to a terminal. with stdio they
1284 were line-buffered by default.
1286 (scm_ptobfuns): fputc, fputs, fwrite, fgetc, fgets removed.
1289 * ports.h (scm_ptobfuns): change fflush return to void.
1290 change flush proc definitions.
1292 * strports.c (scm_call_with_output_string): get size from
1293 buffer instead of port stream.
1294 (st_flush): new proc.
1296 * ports.h (struct scm_port_table): added write_end member,
1297 as an optimisation. set it where write_buf_size is set.
1299 * ports.h (struct scm_port_table): change stream from void *
1300 back to SCM. SCM presumably must be large enough to hold a
1301 pointer (and probably vice versa but who knows.)
1302 (SCM_SSTREAM): deleted. change users back to SCM_STREAM.
1304 (scm_puts): rewritten
1305 * fports.c (local_ffwrite, local_fputs): removed.
1306 * strports.c (stputc, stputs, stwrite): dyked out (FIXME)
1307 * vports.c (sfputc, sfputs, sfwrite) likewise.
1308 * ports.c (write_void_port, puts_void_port): removed.
1309 (putc_void_port, getc_void_port, fgets_void_port): likewise.
1311 * ports.c (scm_lfwrite): rewritten using fport.c version.
1313 * fports.c (local_fputc): deleted.
1315 * ports.c (scm_add_to_port_table): initialise write_needs_seek.
1317 * ports.h (scm_ptobfuns): add seek function pointer.
1318 * fports.c: set it to local_seek, new procedure.
1321 * fports.h (SCM_MAYBE_DRAIN_INPUT): moved to ports.c.
1322 use ptob for seek. take ptob instead of fport arg.
1324 * ports.h (struct scm_port_table): new member write_needs_seek,
1325 replaces reading member in fport struct.
1327 * vports.c (sfgetc): store the getted char into the buffer.
1328 rename to sf_fill_buffer and install it for fill-buffer in ptob.
1329 the Scheme interface is still a procedure that gets a char.
1330 (scm_make_soft_port): set up the port buffer (shortbuf).
1332 * fports.c (local_fgetc, local_fgets): deleted.
1333 * strports.c (stgetc): likewise.
1334 * ports.c: scm_generic_fgets: likewise.
1336 * ports.h (scm_ptobfuns): add fill_buffer.
1337 * ports.c (scm_newptob): assign it.
1338 * strports.c (scm_mkstrport): set up the buffer.
1339 put just the string into the stream, not cons (pos stream).
1340 (stfill_buffer): new proc.
1342 * ports.h: fport buffer moved into port table: to be
1343 used for all port types.
1345 1998-12-20 Gary Houston <ghouston@easynet.co.uk>
1347 * throw.c (scm_handle_by_message): flush ports at exit.
1349 * socket.c (scm_sock_fd_to_port): use scm_fdes_to_port.
1350 (scm_getsockopt, scm_setsockopt, scm_shutdown, scm_connect,
1351 scm_bind, scm_listen, scm_accept, scm_getsockname,
1352 scm_getpeername, scm_recv, scm_send, scm_recvfrom,
1354 use SCM_FPORT_FDES. use SCM_OPFPORTP not SCM_FPORTP.
1356 * posix.c (scm_getgroups): use SCM_ALLOW/DEFER_INTS.
1357 (scm_ttyname): use SCM_FPORT_FDES.
1358 (scm_tcgetpgrp, scm_tcsetpgrp): likewise.
1360 * filesys.c (scm_chown): use SCM_FPORT_FDES.
1361 (scm_chmod, scm_stat, scm_truncate_file: likewise.
1363 * ioext.c (scm_isatty_p): use SCM_FPORT_FDES.
1364 (scm_fdes_to_ports): modified.
1365 (scm_fdopen): use scm_fdes_to_port.
1367 * ports.c (scm_init_ports): don't try to flush ports using
1368 atexit(). it's too late, errors will cause SEGV.
1370 * fports.c (scm_fport_buffer_add): new procedure.
1372 * fports.h (SCM_FDES_RANDOM_P): new macro. use it in
1373 scm_fdes_to_port and scm_redirect_port.
1375 * ioext.c (scm_redirect_port): use setvbuf to set buffers in the
1376 new port. reset fp->random.
1378 * fports.c (scm_fdes_to_port), ports.c (scm_void_port),
1379 filesys.c (scm_opendir):
1380 restore defer interrupts while the port is constructed.
1381 (scm_setvbuf): if mode is _IOFBF and size is not supplied,
1382 derive buffer size from fdes or use a default.
1383 (scm_fdes_to_port): use setvbuf instead of creating the buffers
1386 vports.c (various places): use SCM_SSTREAM.
1387 strports.c: likewise.
1388 * gdbint.c: likewise.
1389 * ports.h (SCM_SSTREAM): new macro.
1391 * fports.c (scm_input_waiting_p): use scm_return_first, since port
1392 may be removed from the stack by the tail call to scm_fdes_waiting_p.
1394 * fports.h (SCM_CLEAR_BUFFERS): new macro.
1396 * filesys.c (scm_fsync): use SCM_FDES.
1398 * ports.c (scm_force_output): call scm_fflush.
1400 * print.c (scm_newline): don't check errno for EPIPE (it wouldn't
1401 reach this point.) don't flush port (if scm_cur_outp).
1403 * fports.h (SCM_FPORT_FDES): new macro.
1405 * filesys.c (scm_fcntl): get fdes from fport.
1406 (set_element, get_element): likewise.
1408 * vports.c (sfflush): don't need to set errno.
1410 * ports.c: install scm_flush_all_ports to be run on exit.
1412 * filesys.c (scm_open): adjust port_mode for O_APPEND and O_CREAT.
1414 ports.c fports.c ioext.c posix.c socket.c net_db.c filesys.c:
1415 removed all uses of SCM_DEFER/ALLOW ints for now. they were mainly
1416 just protecting errno. some may need to be put back.
1418 * scmsigs.c (take_signal): save and restore errno while this
1421 *fports.c (print_pipe_port, local_pclose, scm_pipob): deleted.
1422 open-pipe, close-pipe are emulated in (ice-9 popen)
1423 ports.c (scm_ports_prehistory): don't init scm_pipob.
1424 ports.h (scm_tc16_pipe): deleted.
1425 posix.c (scm_open_pipe, scm_close_pipe): deleted.
1427 * ioext.c (scm_primitive_move_to_fdes): use fport.
1428 * fport.c (scm_fport_fill_buffer): flush write buffer if needed.
1429 change arg type from scm_fport to SCM port.
1430 fport.h (SCM_SETFDES): removed.
1431 (SCM_MAYBE_DRAIN_INPUT): new macro.
1433 * fport.h (struct scm_fport): added 'random'.
1434 fport.c (scm_open_file): set random if lseek works.
1436 * ioext.c (scm_dup_to_fdes): use SCM_FSTREAM.
1437 (scm_ftell): always use lseek and account for the buffer.
1438 (scm_fileno): use fport buffer.
1439 (scm_fseek): clear fport buffers. always use lseek.
1441 * posix.c (scm_pipe): use fport buffer.
1442 * unif.c: include fports.h instead of genio.h.
1443 * fports.c (scm_fdes_wait_for_input, scm_fport_fill_buffer): new
1445 (local_fgetc): use them.
1446 (local_ffwrite): use buffer.
1447 (local_fgets): use buffer.
1448 (scm_setbuf0): deleted.
1449 (scm_setvbuf): set the buffer.
1450 (scm_setfileno): deleted.
1451 (scm_evict_ports): set fdes directly.
1452 (scm_freopen): deleted. doesn't seem useful in Guile.
1453 (scm_stdio_to_port): deleted.
1454 fports.h (struct scm_fport): add shortbuf member to avoid separate
1455 code for unbuffered ports.
1456 (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP): moved
1459 * genio.c, genio.h: move contents into ports.c, ports.h. The
1460 division wasn't useful.
1462 * fports.c, fports.h (scm_fport_drain_input): new procedure.
1463 * ports.c (scm_drain_input): call scm_fport_drain_input.
1464 * scm_fdes_waiting_p: new procedure.
1465 * fports.c (scm_fdes_to_port): allocate read and/or write buffers.
1466 (scm_input_waiting_p): check the buffer.
1467 (local_fgetc, local_fflush, local_fputc): likewise.
1469 * fports.h (scm_fport): read/write_buf,_pos,_buf_end,,_buf_size:
1471 * init.c (scm_init_standard_ports): pass fdes instead of FILE *.
1473 * ports.c (scm_drain_input): new procedure.
1475 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY,
1476 pre_read, pre_write): removed.
1477 (local_fputc, local_fputs, local_ffwrite): use write, not stdio.
1478 (scm_standard_stream_to_port): change first arg from FILE * to
1480 (local_fflush): flush fdes, not FILE *.
1481 * fports.h (SCM_NOFTELL): removed.
1482 * genio.c, ports.c: don't include filesys.h.
1483 * genio.c (scm_getc): don't use scm_internal_select if FPORT.
1484 do it in fports.c:local_fgetc.
1485 * genio.c: don't use SCM_SYSCALL when calling ptob procedures.
1486 do it where it's needed in the port smobs.
1487 * filesys.c (scm_input_waiting_p): moved to fports.c, stdio
1488 buffer support removed. take SCM arg, not FILE *.
1489 * filesys.h: prototype moved too.
1490 * fports.c (scm_fdes_to_port): new procedure.
1491 (local_fgetc): use read not fgetc.
1492 (local_fclose): use close, not fclose.
1493 (local_fgets): use read, not fgets
1494 * fports.h: prototype for scm_fdes_to_port.
1495 * fports.h (scm_fport): new struct.
1496 * fports.c (scm_open_file): use open, not fopen.
1498 * ports.h (struct scm_port_table): change stream from SCM to void *.
1499 * ports.c (scm_add_to_port_table): check for memory allocation error.
1500 (scm_prinport): remove MSDOS hair.
1501 (scm_void_port): set stream to 0 instead of SCM_BOOL_F.
1502 (scm_close_port): don't throw errors: do it in fports.c.
1504 1999-06-04 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1506 * numbers.c: Added #include "feature.h".
1508 1999-05-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1510 * smob.c, smob.h (scm_make_smob_type): New interface to smob
1511 types (supersedes scm_newsmob).
1512 (scm_set_smob_mark, scm_set_smob_free, scm_set_smob_print,
1513 scm_set_smob_equalp): New functions. Sets smob functions.
1514 (SCM_NEWSMOB): New macro. Creates smob objects.
1515 (scm_make_smob): New function. Creates smob objects and
1517 (scm_smob_free, scm_smob_print): Default free and print
1520 * Makefile.am: Removed markers.c, markers.x, markers.h.
1522 * markers.c, markers.h: Removed. (Contents moved to smob.c,
1525 * arbiters.c, async.c, regex-posix.c: Use new smob interface.
1527 * eval.c, fports.c, libguile.h, ports.c: Removed #include
1530 * fluids.c, guardians.c, srcprop.c, threads.c: Added #include
1533 * regex-posix.c, regex-posix.h: Renamed scm_tc16_regex_t -->
1536 1999-05-09 Jim Blandy <jimb@savonarola.red-bean.com>
1538 * strop.c (scm_string_capitalize_x): Use the SCM object `s' in
1539 error messages, not the uninitialized string `str'. Love that
1542 * strop.c (scm_substring_move_x): New function, which can handle
1543 arbitrary overlapping substrings.
1544 (substring-move-left!, substring-move-right!): These are
1545 now just synonyms for substring-move!.
1546 * strop.h (scm_substring_move_x): New prototype.
1547 (scm_substring_move_left_x, scm_substring_move_right_x):
1548 #define these as synonyms for scm_substring_move_x.
1550 Fixes, cleanups, and new functions from Greg Harvey.
1552 1999-05-03 Greg Harvey <Greg.Harvey@thezone.net>
1554 * strop.c (scm_string_capitalize_x, scm_string_capitalize): new
1555 functions; capitalize the first letter of each word in the
1556 argument string, and downcase the rest.
1557 (scm_string_ci_to_symbol): string->symbol, such that the same
1558 symbol is returned for any argument where the only difference
1559 between strings is in capitalization.
1560 (scm_string_upcase, scm_string_downcase): non-destructive
1563 1999-01-13 Greg Harvey <Greg.Harvey@thezone.net>
1565 * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
1566 changed to use memmove.
1567 * strop.c (scm_i_index): removed the pos arguments (it's only
1568 called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
1571 1999-01-11 Greg Harvey <Greg.Harvey@thezone.net>
1573 * strop.h: fixed prototypes.
1575 * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
1576 changed to have 5 required args, rather than 2 required, and 3 required
1577 rest args. Also modified to allow str1 & str2 to overlap.
1578 (scm_substring_fill_x): changed to 4 args, rather than 2 args and
1579 2 required rest args.
1581 1999-05-02 Jim Blandy <jimb@savonarola.red-bean.com>
1585 * Makefile.am (modinclude_HEADERS): Add kw.h, so the new version
1587 * Makefile.in: Regenerated.
1589 * numbers.c: If we're supporting floating-point, provide the
1592 * scmconfig.h.in: Regenerated; see today's change to
1595 1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
1597 * Makefile.in: Regenerated.
1599 Remove readline support, to avoid copyright confusion.
1600 * Makefile.am: Remove readline files from lists.
1601 * init.c: Don't initialize readline.
1602 * scmconfig.h.in: Regenerated.
1604 * numbers.c (s_bignum): Renamed to s_bignum, and made static.
1605 Libguile should not be exporting random little strings.
1606 * numbers.h (s_bignum): Extern declaration removed.
1608 More const changes from Ken Raeburn.
1609 * numbers.c (scm_s_bignum, fx): Now const.
1610 (scm_logtab, scm_ilentab, s_adjbig): Now static and const.
1611 * numbers.h (scm_s_bignum): Update declaration.
1612 * eval.c (bodycheck): Argument WHAT now points to const.
1613 * snarf.h (SCM_SYNTAX): Name is const.
1615 * eval.c (scm_i_let): Make this globally visible, to avoid dynamic
1616 linking crashes on NetBSD. (Thanks to Ken Raeburn.)
1618 1999-03-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1620 * numbers.c (isfinite): Define this macro if not defined: Return a
1621 non-zero value if X is finite. (From ISO C 9x standard.)
1622 (scm_inexact_to_exact): Bugfix: Don't pass NaNs to scm_dbl2big.
1623 (Thanks to Jon Trowbridge and Greg Harvey.)
1625 1999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1627 * keywords.c (scm_tc16_kw): Added for backward compatibility.
1628 Will be removed in next release.
1630 * Makefile.am (modinclude_HEADERS): Added kw.h;
1634 * libguile.h: #include "libguile/kw.h"
1636 1999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1638 * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED.
1640 1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1642 * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch.
1644 * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):
1645 Place the table argument last.
1647 1999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1649 * modules.c: #include "procprop.h"
1650 (scm_system_module_env_p): Assume root environment is no lookup
1653 * debug.c, eval.c, evalext.c, gdbint.c stacks.c:
1654 #include "modules.h".
1656 * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
1657 scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
1659 * eval.c, eval.h (scm_top_level_lookup_closure): Removed.
1661 1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1663 * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
1664 scm_misc_error when pos is a string. This allows for dispatching
1665 arbitrary error messages with one argument via SCM_ASSERT:
1666 SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
1668 1999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1670 * list.c (scm_reverse): Report an error if given a circular list
1671 instead of filling memory.
1672 * list.c (scm_reverse_x): Check args.
1674 1999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1676 Most of this batch of changes is about how to deal with extended
1677 types when an object system is loaded into Guile. A nice object
1678 system is capable of representing Guile's types as class objects.
1680 For example, we want a regular expression to be of class <regex>.
1681 But regular expressions are smobs which aren't under direct
1682 control of the object system, so there has to be some mechanism
1683 which informs the object system that a new class should be created
1684 which can represent the smob type. I call this a "wrapper class".
1686 * objects.c: #include "smob.h";
1687 (scm_class_keyword): Removed. (Class is automatically created by
1689 (scm_smob_class): Array of smob classes indexed by smobnum.
1690 (scm_make_extended_class): "Plugin" function pointer for creation
1691 of wrapper classes for smob and struct types.
1692 (scm_class_of): Handle compiled closures. (Currently regarded as
1694 Use scm_smob_class to handle smob types;
1695 Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
1696 through scm_smob_class;
1699 * smob.c (scm_newsmob): Also create a wrapper class if
1700 scm_smob_class has been initialized.
1702 * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
1703 type code and smobnum.
1705 * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
1706 (scm_struct_table): Weak key table with auxilliary information for
1707 struct types. Currently used for names and wrapper classes.
1708 (scm_struct_ihashq): Hash function for structs.
1709 (scm_struct_create_handle): Get/create entry in scm_struct_table.
1710 (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
1711 for accessing names of vtables. The record implementation in
1712 boot-9.scm currently uses the setter to record the name of record
1713 types. When the object system is initialized, it can use this
1714 information to create wrapper classes with suitable names.
1715 (scm_init_struct): Allocate scm_struct_table.
1716 (scm_alloc_struct): Don't initialize scm_struct_i_tag here.
1717 (struct tags are a finite resource and we might want to restrict
1718 the use of tags to vtables only. E.g., Goops only uses tags for
1720 (scm_make_struct): Use scm_struct_entity_n_extra_words instead of
1722 (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
1725 * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
1726 SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
1727 Used for access of struct table entries.
1729 * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
1730 (scm_hash_fold): New procedure. Used to process all entries in a
1731 hash table (in no particular order).
1733 Argh! For the umpteenth time I got compilation errors because of
1734 the "intuitive" name `kw'. This has to have an end:
1736 * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
1737 "kw" --> "keywords" everywhere.
1738 (I doubt that this will cause big compatibility problems since the
1739 application interface is unaffected.)
1741 * keywords.c, keywords.h: Files renamed from kw.c, kw.h.
1743 1999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1745 * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
1746 column inums to native form.
1748 Improvement of backtraces: Introduces a new stack narrowing
1749 specifier, #t, for the inner cut. (See further in the comments in
1750 stacks.c:narrow_stack ().)
1752 * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
1753 (Used to flag certain system procedures which shouldn't turn up in
1756 * eval.c (scm_sym_system_module): New symbol. (Used to flag
1757 modules which aren't "user" modules and the code of which
1758 shouldn't turn up in backtraces.)
1760 * eval.c, eval.h (scm_top_level_lookup_closure): New function:
1761 Extract the lookup closure from an environment.
1762 (scm_system_module_env_p): New function: Return non-#f if MODULE
1765 * stacks.c: #include "eval.h"; #include "procprop.h";
1766 (narrow_stack): Handle new narrowing specifier #t.
1768 * debug.c (scm_procedure_name): Use name property in the default
1771 * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
1773 * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
1775 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
1776 procedure throughout.
1778 * print.c (scm_iprin1): Removed extraneous space when printing
1779 procedure-with-setters.
1781 Entity and operator setter slots were introduced as a complement
1782 to the <procedure-with-setter> type in order to support entities
1783 and operators with setters in a reasonable and efficient way.
1784 * procs.c (scm_procedure, scm_setter): Handle entity and operator
1787 * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
1788 (struct scm_metaclass_operator): New setter slot.
1790 * gc.c (scm_gc_mark): Mark struct setter slot.
1792 * struct.c (scm_make_struct): Allocate one word more for
1793 entities and initialize the new slot.
1795 * struct.h (scm_struct_i_setter): New constant.
1797 1999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1799 * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
1800 directly through the instance.
1802 * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
1804 * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
1805 scm_struct_i_flags instead of scm_vtable_index_layout!
1807 * list.c (scm_list_star): New procedure.
1809 1999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1811 * debug.c (scm_init_debug): Added scheme level constant
1814 1999-02-12 Jim Blandy <jimb@savonarola.red-bean.com>
1816 * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS.
1818 * gc.c (scm_gc_sweep): Properly properly record the size of a
1819 freed structure. (Thanks to Greg Harvey.)
1821 1999-02-07 Jim Blandy <jimb@savonarola.red-bean.com>
1823 * gc.c (scm_gc_sweep): Properly record the size of a freed
1824 structure. (Thanks to Michael Livshin.)
1826 1999-02-06 Jim Blandy <jimb@savonarola.red-bean.com>
1828 Readline paren matching from Greg Harvey, with modifications from
1831 * readline.c (in_readline, reentry_barrier_mutex): Make these
1834 * readline.c: #include <sys/time.h> and "iselect.h", so we can
1835 control how long we're paused, and threads will run while we're
1837 (match_paren, find_matching_paren, init_bouncing_parens): New
1839 (scm_init_readline): Call init_bouncing_parens.
1840 (scm_readline_opts): Add the bounce-parens option.
1841 * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option.
1842 (SCM_N_READLINE_OPTIONS): Adjust.
1844 1999-02-06 Jim Blandy <jimb@zwingli.cygnus.com>
1846 All the below are changes from Ken Raeburn, to get Guile to use
1849 * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
1850 eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
1851 s_clauses, s_formals): Variables now const.
1853 * eval.c (promsmob): Now const.
1854 * macros.c (macrosmob): Now const.
1855 * smob.c (scm_newsmob): Smobfuns argument now points to const.
1856 (freecell, flob, bigob): Now const.
1858 * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
1859 error.c (scm_error, scm_syserror, scm_syserror_msg,
1860 scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
1861 scm_memory_error, scm_misc_error, scm_wta), macros.c
1862 (scm_make_synt), feature.c (scm_add_feature), filesys.c
1863 (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
1864 scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
1865 numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
1866 scm_num2long_long, scm_num2ulong),
1867 options.c (scm_options), posix.c (scm_convert_exec_args,
1868 environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
1869 ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
1870 (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
1871 (setzone, restorezone, bdtime2c), strop.c (scm_i_index),
1872 strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
1873 scm_intern_obarray, scm_intern, scm_intern0,
1874 scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
1875 scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
1876 indicating calling subr, error message text, reason for error,
1877 symbol name or feature name are now pointer to const.
1878 * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
1880 * procs.c (scm_init_iprocs): iproc argument now points to const.
1881 * pairs.c (cxrs): Now const.
1883 * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
1884 numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
1885 strports.h, symbols.h, unif.h: Update variable declarations and
1886 function prototypes for above changes.
1888 * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
1889 sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
1890 SYMB now point to const.
1892 1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1894 * print.c (scm_iprin1): Use scm_procedure_name instead of
1895 scm_procedure_property for compiled closures.
1897 * tags.h (scm_tc7_pws): New procedure type. Four representations
1898 for procedure-with-setters were considered before selecting this
1901 1. A closure where the CODE and ENV slots are used to represent
1902 the getter and a new SETTER slot is used for the setter. The
1903 original getter is stored as a `getter' procedure property. For
1904 closure getters, the CODE and ENV slots contains a copy of the
1905 getter's CODE and ENV slots. For subr getters, the CODE contains
1908 2. A compiled closure with a call to the getter in the cclo
1909 procedure. The getter and setter are stored in slots 1 and 2.
1911 3. An entity (i.e. a struct with an associated procedure) with a
1912 call to the getter in the entity procedure and the setter stored
1913 in slot 0. The original getter is stored in slot 1.
1915 4. A new primitive procedure type supported in the evaluator. The
1916 getter and setter are stored in a GETTER and SETTER slot. A call
1917 to this procedure type results in a retrieval of the getter and a
1918 jump back to the correct eval dispatcher.
1920 Representation 4 was selected because of efficiency and
1923 Rep 1 has the advantage that there is zero penalty for closure
1924 getters, but primitive getters will get considerable overhead
1925 because the procedure-with-getter will be a closure which calls
1928 Rep 3 has the advantage that a GOOPS accessor can be a subclass of
1929 <procedure-with-setter>, but together with rep 2 it suffers from a
1930 three level dispatch for non-GOOPS getters:
1932 cclo/struct --> dispatch proc --> getter
1934 This is because the dispatch procedure must take an extra initial
1935 argument (cclo for rep 2, struct for rep 3).
1937 Rep 4 has the single disadvantage that it uses up one tc7 type
1938 code, but the plan for uniform vectors will very likely free tc7
1939 codes, so this is probably no big problem. Also note that the
1940 GETTER and SETTER slots can live directly on the heap, using the
1941 new four-word cells.
1943 * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
1944 SCM_SETTER): New macros.
1945 (scm_procedure_with_setter_p, scm_make_procedure_with_setter,
1946 scm_getter, scm_setter): New procedures.
1948 * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
1950 * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
1953 * objects.c, objects.h (scm_class_of,
1954 scm_class_procedure_with_setter): Added.
1956 * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
1957 entry for scm_tc7_pws.
1959 * procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
1961 1999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1963 * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
1965 (scm_init_evalext): Call scm_make_gsubr for
1966 scm_m_generalized_set_x.
1968 * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
1970 * eval.h: Declare scm_s_set_x, scm_sym_set_x;
1972 * eval.c: Renamed "set" --> "set_x" in various names for
1973 consistency of name correspondence between Scheme and C;
1974 Renamed scm_i_set_x --> scm_sym_set_x and made global.
1975 Renamed s_set_x --> scm_s_set_x and made global.
1977 1999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1979 * random.c (scm_i_random_bignum): Made independent of endianness.
1981 1999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1983 * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
1984 (Thanks to Eric Hanchrow.)
1986 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1988 * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
1990 * random.c: Bugfix: Retrieve and store most significant 32 bits in
1991 different order if the machine is bigendian.
1992 (scm_init_random): Added safety check for bignum digit size.
1994 1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1996 * random.c, random.h (scm_i_make_rstate): New function: Makes
1997 scm_rstate from seed.
1998 (scm_copy_random_state, scm_seed_to_random_state): New functions.
1999 (scm_make_random_state): Removed.
2001 * random.c (scm_make_random_state): Use scm_i_make_rstate().
2003 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2005 * random.c: Bugfix: Retrieve and store most significant 32 bits in
2006 different order if the machine is bigendian.
2007 (scm_init_random): Added safety check for bignum digit size.
2009 1999-01-11 Roland Orre <mdj@mdj.nada.kth.se>
2011 * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements
2012 from first arg before equal elements in second arg in result.
2013 (scm_merge_list_step): Bugfix: Don't presume that arguments in a C
2014 function call are executed in a well defined order.
2016 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
2018 * alloca.c (alloca): Cast value returned by malloc. (Thanks to
2021 1999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2023 * random.c: Removed alloca includes.
2025 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
2027 * Makefile.in: This changed, for some reason I don't really
2028 understand, when I ran automake in the top level directory. This
2029 may be contamination by Cygnus internal releases. If you re-run
2030 automake and this change gets reverted, don't worry about it.
2032 1999-01-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2034 * sort.c, sort.h: New files: Implement slib's and scsh's sort
2035 interfaces. Author: Roland Orre.
2037 * Makefile.am: Added sort.c, sort.h, sort.x.
2039 * init.c: #include "sort.h";
2040 (scm_boot_guile_1): Call scm_init_sort ().
2042 * numbers.h: Added #include "libguile/print.h".
2044 * numbers.c: Formatted according to Guile conventions;
2045 Renamed s_bignum --> scm_s_bignum.
2047 * random.c, random.h: New files: Random number support.
2048 Interface same as slib's.
2050 * Makefile.am: Added random.c, random.h, random.x.
2052 * init.c: #include "random.h";
2053 (scm_boot_guile_1): Call scm_init_random ().
2055 1998-12-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2057 * Makefile.am: New files: guardians.c, guardians.x, guardians.h
2059 * guardians.c, guardians.h (scm_make_guardian,
2060 scm_guardian_gc_init, scm_guardian_zombify, scm_guard,
2061 scm_get_one_zombie, scm_init_guardian): This is an implementation
2062 of guardians as described in R. Kent Dybvig, Carl Bruggeman, and
2063 David Eby (1993) "Guardians in a Generation-Based Garbage
2064 Collector" ACM SIGPLAN Conference on Programming Language Design
2065 and Implementation, June 1993 ftp://ftp.cs.indiana.edu
2066 /pub/scheme-repository/doc/pubs/guardians.ps.gz
2067 Author: Michael N. Livshin.
2069 * gc.h (SCM_MARKEDP, SCM_NMARKEDP): New macros.
2071 * gc.c (scm_igc): Call scm_guardian_gc_init and
2072 scm_guardian_zombify.
2074 * init.c (scm_boot_guile_1): Call scm_init_guardian.
2076 1998-12-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2078 * macros.c (scm_makacro, scm_makmacro, scm_makmmacro): Added
2081 1998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2083 Move the procedure slots of entities to invisible slots (so that
2084 we can have operator class objects which themselves are entities).
2085 * struct.h (scm_struct_i_proc, scm_struct_i_flags,
2086 SCM_STRUCTF_ENTITY): New constants.
2088 * struct.c (scm_make_struct): Allocate "invisible" room for
2089 procedures if SCM_STRUCTF_ENTITY is set in vtable.
2091 * gc.c (scm_gc_mark): Mark entity procedures.
2093 * struct.c, struct.h (scm_alloc_struct): Renamed from alloc_struct
2095 (scm_struct_init): Renamed from init_struct and made global.
2097 * objects.h (SCM_ENTITY, scm_entity): Removed.
2098 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0,
2099 SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots.
2101 Mon Dec 14 18:10:12 1998 Maciej Stachowiak <mstachow@mit.edu>
2103 * snarf.h (SCM_SYNTAX): New macro to allow convenient declaration
2104 of syntactic forms, similar to SCM_PROC.
2105 * debug.c, eval.c, evalext.c: use SCM_SYNTAX to declare all special
2106 forms, and SCM_SYMBOL or SCM_GLOBAL_SYMBOL to delcare C variables
2107 for the name symbols when needed.
2109 1998-12-14 Jim Blandy <jimb@zwingli.cygnus.com>
2111 * Makefile.in: Regenerated.
2113 1998-12-05 Jim Blandy <jimb@zwingli.cygnus.com>
2115 * pairs.h (SCM_NEWCELL): When DEBUG_FREELIST is defined, don't
2116 take the address of _into; it might be a register. Just have
2117 scm_debug_newcell return the new cell.
2118 * gc.c (scm_debug_newcell): Just return the new cell, instead of
2119 taking the address of a place to store it as an argument.
2120 * gc.h (scm_debug_newcell): Change declaration.
2121 (Thanks to Greg Harvey.)
2123 1998-12-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2125 * ramap.c (array-copy-in-order!, array-map-in-order): New names.
2126 Replaces old names serial-array-copy! and serial-array-map!.
2128 * evalext.c (map-in-order): New name. Replaces serial-map.
2130 1998-12-05 Jim Blandy <jimb@totoro.red-bean.com>
2132 * smob.c (freeprint): New function.
2133 (freecell): Use it to print freed objects, for slightly easier
2136 1998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2138 * backtrace.c (display_frame): Made more robust. Doesn't throw an
2139 error if no source properties can be found for a frame. (Thanks
2140 to Christian Lynbech.)
2142 1998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2144 * objects.h: Removed slots direct_supers and direct_slots from the
2145 definitions of the rudimentary classes described by objects.h.
2147 * objects.c, objects.h (scm_entity_p): New procedure. Together
2148 with the predicates scm_procedure_p and scm_struct_p, this
2149 predicate makes it possible to differ between structs, entities
2152 * modules.c, modules.h (scm_resolve_module): New function.
2154 1998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2156 * objects.h (SCM_METACLASS_STANDARD_LAYOUT,
2157 SCM_METACLASS_OPERATOR_LAYOUT): Removed slots `direct_supers' and
2160 * objects.c (scm_entity_p): New procedure.
2162 * procprop.c (scm_i_procedure_arity): Bugfix: Return correct value
2163 for asubrs, rpsubrs, lsubrs and lsubr_2s.
2165 1998-11-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2167 * procprop.h (scm_i_procedure_arity): Added declaration.
2169 * procprop.c (scm_i_procedure_arity): Made global; New code to
2170 handle operators and entities.
2171 (scm_procedure_property): No need to call scm_procedure_p since
2172 scm_i_procedure_arity now does all necessary type checking.
2173 Added #include "objects.h".
2175 * feature.c (scm_remove_hook_x): Bugfix: Changed reference to
2176 s_add_hook_x --> s_remove_hook_x.
2177 (scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments.
2178 Added #include "procprop.h"
2180 * feature.c, feature.h (scm_reset_hook_x): New procedure.
2181 (scm_make_hook): Optional argument defines number of arguments to
2183 (scm_make_named_hook): Take number of args as second arg.
2184 (scm_run_hook): Renamed from scm_run_hooks (old name defined in
2185 boot-9.scm for a while); First arg is the hook. The rest are
2186 arguments passed on to the hook procedures.
2188 1998-11-23 Jim Blandy <jimb@zwingli.cygnus.com>
2190 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest,
2191 scm_logbit_p): Do the computation in ulongs. This is not as nice
2192 as doing it in bignums, but at least it's good enough for
2193 manipulating flags in 32-bit words. (Thanks to Jim Wilson.)
2195 * regex-posix.c (scm_regexp_exec): Reliably mark unmatched
2196 subexpressions. (Thanks to Charbel Jacquin.)
2198 1998-11-23 Mikael Djurfeldt <mdj@kenneth>
2200 * feature.c, feature.h (scm_make_hook, scm_add_hook_x,
2201 scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm.
2202 (scm_make_named_hook): New function.
2204 * feature.c: Added #include "eval.h".
2206 * modules.c (scm_make_module): Beautify the module.
2208 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2210 * modules.c, modules.h: New files: C interface to modules. (This
2211 is necessary in order to interface the object system to Guile
2212 properly. The guts of these modules will be replaced by the new
2213 module system in the future.)
2215 * init.c: Added #include "modules.h"
2216 (scm_boot_guile_1): Call scm_init_modules.
2217 (invoke_main_func): Call scm_post_boot_init_modules.
2219 * Makefile.am: Added modules.c, modules.x, modules.h.
2221 1998-11-22 Mikael Djurfeldt <mdj@kenneth>
2223 * procs.c: #include "objects.h"
2224 (scm_procedure_p): Return #t also on structs which are operators.
2226 * objects.c (scm_init_objects): Renamed <standard-metaclass>,
2227 <operator-metaclass> and <entity-class> to <standard-class>,
2228 <operator-class> and <entity> in order to conform with STKlos
2231 * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct
2232 which isn't an operator.
2233 (SCM_APPLY): Ditto, but jump to badproc.
2235 1998-11-21 Mikael Djurfeldt <mdj@kenneth>
2237 * eval.c (SCM_CEVAL): Allow structs implanted in code.
2238 Previously, structs implanted in code were interpreted as forms
2239 the operator of which was a gloc. We solve this by checking for
2240 the zero in the emulated vcell in the struct vtable. Since
2241 implanted structs always will look like forms with a gloc
2242 operator, execution will only be slowed down by maximally one
2243 extra test-and-branch per application.
2245 * evalext.c (scm_definedp): Removed check for isyms; Added a
2246 second optional argument: It is now possible to supply an
2247 evaluation environment in which to look for the symbol.
2249 1998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2251 * readline.c (scm_init_readline): Set
2252 rl_basic_word_break_characters. (Thanks to Ian Grant.)
2254 * coop.c (coop_condition_variable_wait): Removed
2255 (coop_condition_variable_wait_mutex): Folded logic of
2256 coop_mutex_unlock into coop_condition_variable_wait_mutex to
2257 prevent condvar signal lossage. Previously, another thread could
2258 start to run after unlocking the mutex but before putting the
2259 current thread on the wait queue. If that thread then would
2260 signal the first, the signal would be lost. (Thanks to Christian
2263 1998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2265 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
2268 1998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2270 * objects.c (scm_i_make_class_object): Renamed from
2271 make_class_object; exported; error checking moved to
2272 scm_make_class_object and scm_make_subclass_object.
2273 (scm_make_class_object, scm_make_subclass_object): Use
2274 scm_i_make_class_object.
2275 (scm_make_subclass_object): Let the subclass have same metaclass
2278 1998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2280 * debug.c (scm_debug_options): Bugfix: Set the value of
2281 scm_stack_checking_enabled_p after setting debug options;
2282 #include "stackchk.h". (Thanks to Richard Polton.)
2284 1998-11-13 Radey Shouman <rshouman@metro2000.com>
2286 * unif.c (scm_array_contents): removed unnecessary test for 0
2289 1998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2291 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
2292 Replaced by macro `collect' in boot-9.scm.
2294 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2296 * eval.c (scm_copy_tree): Copy source properties if existent.
2298 * debug.c (scm_start_stack): Copy source when evaluating. (If we
2299 don't, we may end up passing memoized source to a transformer.)
2301 1998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2303 * stack.c (get_applybody): Help function which lookups the first
2304 body form of the apply closure.
2305 (read_frames): Prevent the source of the first form of the apply
2306 closure from being recorded. This would only be confusing.
2308 * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP):
2309 Replaces SCM_MACROFRAME, SCM_MACROFRAMEP.
2311 * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP.
2313 * stacks.c (read_frame): Bugfix: Removed lingering `else'
2315 (read_frames): Use SCM_MACROEXPP.
2317 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2319 * stacks.c (read_frames): Skip gsubr frames in backtraces. (They
2320 don't contain interesting information since all arguments are
2321 present in the frame which applies the compiled closure anyway.);
2322 Skip the transformer application frames.
2324 * print.c (scm_iprin1): Print gsubrs as primitives.
2326 1998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2328 * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type.
2330 * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so
2331 that we can identify these in a backtrace. (This change doesn't
2332 introduce any significant speed penalty.)
2334 * eval.c: Added note about `serial-map' using scm_map.
2336 * read.c, read.h (scm_read_options, scm_read_opts): Removed
2337 readline options. They should reside in their own options array.
2339 * readline.c, readline.h (scm_readline_options,
2340 scm_readline_opts): Moved readline options here.
2342 1998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2344 * readline.c (scm_read_history, scm_write_history): Bugfix: Use
2345 SCM_ROCHARS instead of SCM_CHARS.
2347 * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP,
2348 not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS.
2350 1998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2352 * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL.
2353 This is quite important since the latter clears the
2354 FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at
2355 every single character read...
2357 1998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2359 * print.c (scm_iprin1): Removed suspect looking (and indeed
2360 malevolent) semicolon after test for user supplied closure print
2361 procedure. (Thanks to Telford Tendys.)
2363 * list.c (scm_sloppy_memq): Removed sloppy_mem_check.
2364 (scm_memq, scm_memv, scm_member): Do argument checking *before*
2365 starting to search the list. Removed call to sloppy_mem_check.
2367 * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New
2368 procedures: Same as scm_delq_x et al, but delete maximally one
2371 * options.c (scm_options, scm_init_options): GC-protect option
2372 values of type SCM. (Thanks to Telford Tendys.)
2374 1998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2376 * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead
2377 make sure that there always is a "real" scm_lookupcar.
2379 1998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2381 * read.c, read.h (scm_read_opts): New read options
2382 "history-length" and "history-file".
2383 (scm_read_options): Stifle history to history length.
2385 * readline.c (scm_read_history, scm_write_history): New procedures.
2387 1998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2389 * eval.h (scm_macro_eval_x): Removed declaration.
2391 * eval.c (scm_s_expression, scm_s_test, scm_s_body,
2392 scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals):
2393 Renamed and made global.
2395 * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM.
2396 (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR.
2398 * evalext.c, evalext.h: New files. Contain non-R5RS things
2399 having to do with evaluation.
2401 * evalext.c (scm_serial_map): New procedure: Version of `map'
2402 which guarantees that the procedure is applied to the lists in
2404 (scm_m_sequence_to_list): New syntax: Version of `begin' which
2405 returns a list of the results of the body forms instead of the
2406 result of the last body form.
2407 (scm_definedp, scm_m_undefine): Moved from eval.c
2409 * evalext.h (scm_m_sequence_to_list): Added declaration.
2411 * macros.c, macros.h: New files.
2412 (scm_procedure_to_syntax, scm_procedure_to_macro,
2413 scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type,
2414 scm_macro_name, scm_macro_transformer): Moved from eval.c
2415 (scm_make_synt): Moved from eval.c
2417 * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
2419 * init.c (scm_boot_guile_1): Added calls to scm_init_macros and
2422 * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
2424 * debug.c, print.c: Added #include "macros.h".
2426 1998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2428 This change adds the ability to use `unread-char' multiple times
2429 without interspersed reads and adds the new procedure
2430 `unread-string'. The change is optimized for the common case of
2431 unreading a single character. This is also the reason behind the
2432 choice to store characters in the port itself: in most cases no
2433 extra malloc is required.
2435 The amount of code in some macros in ports.h has been increased to
2436 the extent that they would fit better as C functions, but, since
2437 this code belongs to the port representation, such functions
2438 should be placed in ports.c which would cause calls back and forth
2439 between ports.c and genio.c. That is not good for performance.
2440 Also, keeping them as macros allows the compiler to do some
2441 optimizations which are needed to make the current interface
2442 (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient.
2444 One benchmark (Guile startup time) indicates an increase of
2445 loading speed of 1%. Another (reading (using `read') boot-9.scm
2446 10 times) shows no change in performance.
2448 (Caveat: Since Gary is redesigning I/O anyway, no big efforts were
2449 made to find a beautiful solution.)
2451 * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten.
2452 (SCM_TRY_CLRDY): New macro: Only clear the first unread
2453 character. (SCM_CLRDY clears all.)
2454 (SCM_N_READY_CHARS): New macro: Returns number of unread
2455 characters in a port. Returns wrong answer if SCM_CRDYP is false.
2456 (struct scm_port_table): New fields: `entry' contains port table
2457 index, `cp' points to last unread char, `cbuf' is the buffer for
2458 unread chars, `cbufend' points after end of the character buffer.
2460 * ports.h, ports.c (scm_unread_string): New procedure.
2461 (scm_grow_port_cbuf): New function.
2463 * ports.c (scm_add_to_port_table, scm_remove_from_port_table):
2465 (scm_generic_fgets), fports.c (local_fgets): Use a loop
2466 to read unread characters. Use SCM_TRY_CLRDY instead of
2469 * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position.
2471 * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY.
2473 * genio.c, genio.h (scm_ungets): New function.
2475 * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code
2478 1998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2480 * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed
2481 declarations. (Thanks to Russ McManus.)
2483 1998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2485 * numbers.c (num2long): As a software archeologist, I'm proud of
2486 this finding! :) Preliminary dating suggests an almost 4 year old
2487 remnant from the SCM ancestor. The sample has been removed from
2488 the finding site and is now safely stored in the repository.
2490 * numbers.h: Removed prototype for num2long.
2492 * unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
2494 * gh_data.c (gh_scm2doubles): Make it possible to pass result
2495 array as second arg.
2496 (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
2497 gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
2498 * gh.h: Updated and added prototypes.
2500 * gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
2502 1998-10-24 Jim Blandy <jimb@zwingli.cygnus.com>
2504 * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.)
2506 * guile-snarf.in: Never generate an empty file. (Thanks to
2509 * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1,
2510 gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1,
2511 gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1,
2512 gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0,
2513 gh_new_procedure5_0): Specify argument types, to appease C++
2514 compilers. (Thanks to Brad Bowman.)
2516 Bug reports from Russ McManus:
2517 * guile-snarf.in: If the CPP environment variable is set, use that
2518 as the C preprocessor, instead of the preprocessor autoconf
2520 * snarf.h (SCM_PROC): Cast the function pointer passed to
2521 scm_make_gsubr, to satisfy C++.
2523 * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch):
2524 Use the handler passed, instead of ignoring it and using
2525 gh_standard_handler. (Thanks to Etienne Bernard.)
2527 1998-10-20 Jim Blandy <jimb@zwingli.cygnus.com>
2529 * ports.h: Put text after #endif in comment. (Thanks to Nicolas
2532 1998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
2534 * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
2535 continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
2536 dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
2537 feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
2538 genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
2539 hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
2540 list.c, list.h, load.c, load.h, mallocs.c, markers.c,
2541 mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
2542 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
2543 procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
2544 regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
2545 script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
2546 srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
2547 strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
2548 symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
2549 vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
2552 * script.c (scm_compile_shell_switches): Define
2553 use-emacs-interface in the root module, so the repl code can see
2554 it. See today's change to top-repl in ice-9/boot-9.scm.
2556 * filesys.c (set_element, get_element): Make sure that `element'
2557 is a cell before applying SCM_FPORTP to it. (Thanks to Jost
2558 Boekemeier and Jorgen "forcer" Schaefer.)
2560 1998-10-18 Jim Blandy <jimb@zwingli.cygnus.com>
2562 * chars.c (scm_charnames): In ASCII character name table, make
2563 newlines print as #\newline by default, not #\nl.
2565 * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in
2566 alphabetical order. Oh thrills. But it helps me know how far
2567 along in the compilation I am.
2568 * Makefile.in: Regenerated.
2570 1998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2572 * unif.c (scm_raprin1): Changed print syntax for byte vectors from
2573 #bytes(...) to #y(...), and syntax for short vectors from
2574 #short(...) to #h(...). This may seem nutty, but, like the other
2575 uniform vectors, byte vectors and short vectors want to have the
2576 same print and read syntax (and, more basic, want to have read
2577 syntax!). Changing the read syntax to use multiple characters
2578 after the hash sign breaks with the conventions used in R5RS and
2579 the conventions used for the other uniform vectors. It also
2580 introduces complexity in the current reader, both on the C and
2581 Scheme levels. (The Right solution is probably to change the
2582 syntax and prototypes for uniform vectors entirely.)
2584 1998-10-17 Jim Blandy <jimb@savonarola.red-bean.com>
2586 Don't use local_fgets on sockets; ftell doesn't work on sockets.
2587 (Thanks to Jorgen "forcer" Schaefer.)
2588 * ports.h (SCM_NOFTELL): New flag.
2589 * fports.c (local_fgets): If it's set, use the generic fgets.
2590 * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
2592 1998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2594 * script.c (scm_compile_shell_switches): Add handling of -q switch
2595 (inhibit loading of user init file).
2596 (scm_shell_usage): Add usage text for -q switch.
2597 (scm_compile_shell_switches): Always load user init file first if
2598 it is loaded at all.
2600 1998-10-16 Jim Blandy <jimb@zwingli.cygnus.com>
2602 * stime.c: The CPP hair to determine a value for CLKTCK is weird,
2603 and is now broken under NetBSD. I can't fathom what it's trying
2604 to do, so I've replaced it with something that I do understand,
2605 which seems to work, and which isn't broken on NetBSD. "Progress?
2606 You Decide." (Thanks to Perry Metzger.)
2608 * regex-posix.c (scm_regexp_exec): Add a cast to remove a
2609 signed/unsigned comparison.
2611 1998-10-15 Jim Blandy <jimb@zwingli.cygnus.com>
2613 Warning fixes from Greg Harvey:
2614 * unif.c (scm_array_set_x): initializer for pos
2615 * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED)
2616 * struct.c (scm_struct_ref, scm_struct_set_x): Added
2617 initializers for field_type, since EGCS so desparately wants to
2619 * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons,
2620 scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes
2621 when GUILE_DEBUG is defined.
2622 * dynwind.h (scm_wind_chain): Same.
2623 * ports.h (scm_pt_size, scm_pt_member): Same.
2624 * print.h (scm_current_pstate): Same.
2625 * procs.h (scm_make_cclo): Same.
2627 1998-10-14 Jim Blandy <jimb@zwingli.cygnus.com>
2629 Handle short and long long uniform arrays properly. (Thanks to
2631 * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x,
2632 raeql_1): Add cases for scm_tc7_svect (short vectors) and
2633 scm_tc7_llvect (long long vectors).
2635 Change the way libguile and boot-9.scm are timestamped, to try to
2636 get rid of these spurious mismatch warnings. Now both
2637 libguile/versiondat.h and ice-9/version.scm are generated directly
2638 by the configuration process, rather than having version.scm
2639 generated directly, and libguile/versiondat.h generated by the
2640 Makefile, which is generated by configure. It seems that
2641 sometimes the Makefile would change, but versiondat.h depends on
2642 Makefile.in, not Makefile, so it wouldn't get rebuilt.
2643 * Makefile.am (versiondat.h): Target removed; this is generated
2644 directly by the configure script now.
2645 (BUILT_SOURCES): Remove versiondat.h.
2646 * versiondat.h.in: New file, transformed by the configure script
2648 * Makefile.in: Regenerated.
2650 * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,
2651 options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
2652 SCM_CAUTIOUS; this way, 1) there's only one version of each flag
2653 to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
2654 if we want to use them in a header file some day, we can. (Thanks
2655 to Michael Livshin.)
2657 * stime.c (scm_get_internal_real_time): Do the arithmetic using
2658 SCM numbers, so we won't have rollover problems; the range of a
2659 signed long in milliseconds is about 25 days. (Thanks to Karl
2662 Don't redefine sleep and usleep; fix this problem now.
2663 * coop.c (sleep, usleep): Remove declarations; we don't use or
2664 redefine these any more.
2665 (scm_thread_usleep, scm_thread_sleep): New functions which do the
2666 job of usleep and sleep in a thread-friendly way. We can use
2667 these in the rest of Guile. Define versions for systems both with
2668 and without iselect.
2669 * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations.
2670 * scmsigs.c (usleep): Clean up oddities declaring usleep; since
2671 we're just using it, not redefining it, we can use a K&R style
2673 (sleep): Declare this, too, if the system hasn't.
2674 (scm_sleep, scm_usleep): Use scm_thread_sleep and
2675 scm_uthread_sleep if they're available; otherwise, just call the
2677 * scmconfig.h.in: Regenerated.
2679 * coop.c (scm_thread_sleep): Make `slept' an unsigned long.
2681 * coop.c (coop_sleephelp): Remove ANSI #ifdef hair.
2683 1998-10-12 Jim Blandy <jimb@zwingli.cygnus.com>
2685 * threads.c: Doc fix.
2687 The argument type of usleep varies from system to system,
2688 as does the return type. We really shouldn't be redefining usleep
2689 at all, but I don't have time to clean that up before the 1.3.
2690 release. It's on the schedule for afterwards. (Thanks to Julian
2692 * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
2694 * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
2695 * scmconfig.h: Regenerated.
2697 * simpos.c (scm_software_type): Procedure deleted. This isn't the
2698 right way to handle system variation. Autoconf's approach is the
2700 * simpos.h (scm_software_type): Declaration deleted.
2702 * script.c (scm_find_executable): Don't test if unix is #defined
2703 here; first, NetBSD doesn't #define it, and second, it's the wrong
2704 way to go about these things. (Thanks to Perry Metzger.)
2705 (dld_find_executable): Delete this MSDOS support code. This isn't
2706 the way we want to support this; it needs to be rethunk at a
2709 * genio.c (scm_do_read_line): Don't just politely check that the
2710 line was either non-empty or EOF. Abort if it's empty and not
2713 1998-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
2715 * scmconfig.h.in: Regenerated.
2717 * libguile.h: Don't omit the dynamic linking functions. (Thanks
2720 * genio.c (scm_do_read_line): Count lines correctly when the file
2721 doesn't end in a newline.
2723 1998-10-10 Jim Blandy <jimb@zwingli.cygnus.com>
2725 * genio.c (scm_do_read_line): Maintain the line count correctly.
2726 (Thanks to Harvey J. Stein and Greg Harvey.)
2728 * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile
2731 * numbers.c (big2str): Protect t from garbage collection until
2732 we're done. (Thanks to Gary Houston.)
2734 1998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
2736 * Makefile.am (libguile_la_LDFLAGS): Increment shared library
2738 * Makefile.in: Regenerated.
2740 * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,
2741 scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
2744 Do magic to mix reads and writes on stdio FILE-based ports.
2745 (Thanks to Christian Lynbech.)
2746 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY):
2748 (pre_read, pre_write): New functions.
2749 (local_fgetc, local_fgets, local_ffwrite, local_fputc,
2750 local_fputs): Call them.
2751 (local_fflush): Mark the port as ready for reading and writing.
2752 (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE
2753 flags on new port objects. This might not be accurate --- who
2754 knows what state the FILE * is in when we get it --- but it won't
2755 do extraneous calls to fflush or fseek, so it's no worse than the
2756 behavior before this change.
2757 * ports.h: Add comment.
2759 Centralize the creation of port objects based on stdio FILE * in
2760 fports.c; don't just throw them together anywhere.
2761 * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
2762 what the rest of Guile wants. Don't set the revealed count;
2763 that's only appropriate for stdin, stdout, stderr.
2764 (scm_standard_stream_to_port): This function does set the revealed
2766 * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
2767 not scm_stdio_to_port.
2768 * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
2769 * fports.c (scm_open_file): Same.
2770 * posix.c (scm_pipe): Same.
2771 * socket.c (scm_sock_fd_to_port): Same.
2772 * ioext.c (scm_fdopen): Same.
2773 (scm_freopen): Moved from here to...
2774 * fports.c (scm_freopen): ... here. This is really something that
2775 munges the internals of an fport, so it should go here.
2776 * fports.h (scm_stdio_to_port): Adjust prototype.
2777 (scm_standard_stream_to_port, scm_freopen): New protoypes.
2778 * ioext.h (scm_freopen): Prototype removed.
2780 * filesys.c (set_element, get_element): This can work on both pipe
2781 and file ports, so use SCM_FPORTP to typecheck, instead of testing
2784 * scmconfig.h.in: Regenerated.
2786 Change the definition of the functions in scm_ptobfuns so that
2787 they get passed the port object, not the port's stream.
2788 * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
2789 * gc.c (scm_gc_sweep): Pass the port itself to the free function.
2790 * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
2791 Pass the port itself to the scm_ptobs function.
2792 * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
2793 scm_generic_fgets): Same.
2794 (putc_void_port, puts_void_port, write_void_port, flush_void_port,
2795 getc_void_port, fgets_void_port, close_void_port): Just change the
2796 argument names; these functions don't really do anything.
2797 * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
2798 local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
2799 port as an argument, and use SCM_STREAM to get the stdio FILE *.
2800 Also, use prototyped definitions, and get rid of the extra
2802 (scm_fptob, scm_pipob): We don't need casts here any more.
2803 * strports.c (prinstpt): Use prototype declarations.
2804 (stputc, stwrite, stputs, stgetc): Take the port as an argument,
2805 and use SCM_STREAM to get the string info. Also, use prototyped
2806 definitions, and get rid of the extra declarations.
2807 * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
2810 * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
2811 prototype; it's okay (preferred, even!) to use ANSI C in Guile.
2813 * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
2814 scm_fgets, for consistency.
2815 (scm_fptop, scm_pipob): References updated.
2817 1998-10-08 Jim Blandy <jimb@zwingli.cygnus.com>
2819 Include the source location in error messages for scripts.
2820 * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
2821 stack is still there when we catch the error.
2822 * throw.c (handler_message): If we are handling an error with a
2823 message, then put together the proper arguments and call
2824 scm_display_error, instead of scm_display_error_message. That
2825 displays source location, if it can find it.
2827 1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
2829 * gc.c (scm_unprotect_object): Change this so that calls to
2830 scm_protect_object and scm_unprotect_object nest properly.
2831 (scm_protect_object): Doc fixes.
2833 * strings.c (scm_string_set_x): Require the argument to be a
2834 writable string, not a substring or a symbol.
2835 * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
2836 (Thanks to John Redford and Charbel Jacquin.)
2838 * scmconfig.h.in: Regenerated; ../acconfig.h has changed.
2840 1998-10-07 Jim Blandy <jimb@totoro.red-bean.com>
2842 * eval.c (safe_setjmp): Remove this misunderstanding.
2843 (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
2846 1998-10-06 Jim Blandy <jimb@zwingli.cygnus.com>
2848 * libguile.h: Mark these as C declarations, for compilation by C++
2851 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
2852 __cplusplus clause. I seriously doubt this ever worked the way
2853 the author seems to have intended.
2855 1998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
2857 Utterly needless cleanups to hopelessly messy code.
2858 * ports.c: Doc fixes.
2859 (scm_fflush): Moved to ...
2860 * genio.c (scm_fflush): ... here, amongst all the other port
2861 method invocation functions.
2862 * genio.h, ports.h: The prototype moves too.
2864 1998-10-04 Jim Blandy <jimb@zwingli.cygnus.com>
2866 * backtrace.c (display_error_body): The current frame does not
2867 always have a parent frame; consider a function called directly
2868 from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej
2871 * alloca.c (alloca): Undo yesterday's changes, and simply call
2872 malloc directly for storage, and abort if we don't get what we
2873 want. The situation is much simpler --- just call malloc. Emacs
2874 has bizarre/evil requirements (signal handlers might malloc unless
2875 you set this global flag, so you have to set the flag around all
2876 calls to malloc) which we are certainly not going to conform to,
2877 so we can do the simple and obvious thing.
2879 * coop.c (coop_condition_variable_wait): Make this function
2880 static. It's only useful internally --- you should never just
2881 wait on a condition variable.
2882 * coop-defs.h (coop_condition_variable_wait): Delete prototype.
2884 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
2886 * unif.c (scm_array_set_x): Accept any kind of number as an
2887 element for a uniform vector of doubles. This is more consistent
2888 with Scheme's view of numbers. (Thanks to Miroslav Silovic.)
2890 * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
2891 works; I can't conveniently test it myself. (Thanks to Dvid
2892 Tillman for the bug report.)
2894 * init.c: Doc fixes.
2896 * init.c (invoke_main_func): Load the startup files (boot-9.scm)
2897 from here, not from scm_compile_shell_switches (which is a pretty
2898 dumb place to do it).
2899 (scm_load_startup_files): New function.
2900 (scm_ice_9_already_loaded): Variable moved to here from script.c.
2901 * script.c (scm_compile_shell_switches): Don't load the startup
2903 (scm_ice_9_already_loaded): Variable moved.
2904 * init.c (scm_load_startup_files): Prototype for new function.
2905 * gh_init.c (gh_enter): Doc fix.
2907 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
2909 Some anti-warning changes from Greg Harvey.
2910 * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler
2911 warnings when it doesn't understand our NORETURN declarations in
2913 * posix.c (scm_mknod): Similar.
2915 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
2917 * posix.c (scm_getpwuid): If we can't find an entry, return our
2918 own message, instead of using scm_syserror --- the getpwMUMBLE
2919 functions don't set `errno' to anything interesting.
2921 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
2923 Get rid of warnings from the cooperative threading system.
2924 * threads.h (scm_single_thread_p, scm_yield,
2925 scm_call_with_new_thread, scm_join_thread, scm_make_mutex,
2926 scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable,
2927 scm_wait_condition_variable, scm_signal_condition_variable): Add
2928 prototypes for these Scheme-visible functions.
2929 * coop-defs.h (coop_next_runnable_thread,
2930 coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread):
2931 Prototypes for these here, even though they're from iselect.c.
2932 (coop_condition_variable_wait, coop_join): Add prototypes.
2933 * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex,
2934 scm_threads_free_condvar): Make these smob functions static.
2935 * coop-threads.h (coop_init): Give this a real prototype.
2936 * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'.
2937 (coop_next_runnable_thread): No need to provide prototype; it's in
2940 * scmconfig.h.in: .detarenegeR
2942 * iselect.c, threads.c: Doc fixes.
2944 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
2946 * Makefile.in: Regenerated with a patched automake, to get
2947 dependency generation right when using EGCS.
2949 * inet_aton.c (inet_aton): Add prototype, to remove compiler
2950 warning. (Thanks to Robert Pluim.)
2952 * inet_aton.c (inet_aton): Reassure the compiler that the
2953 arguments to the <ctype.h> macros are all unsigned characters, not
2956 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
2958 Getting rid of more warnings...
2959 * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
2960 today's change to ../configure.in.
2961 * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
2962 * scmconfig.h.in: Regenertaded.de.,.__
2963 * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
2964 (scm_localtime, scm_mktime): Use a const char * to manipulate the
2967 * readline.c: Doc fix.
2968 (rl_cleanup_after_signal, rl_free_line_state): Make these static.
2969 * readline.h (scm_filename_completion_function): Add prototype.
2970 (scm_init_readline): Make this into a prototype.
2972 * readline.c (scm_filename_completion_function): Use SCM_PROC to
2973 declare this, instead of calling scm_make_subr manually.
2975 1998-10-02 Jim Blandy <jimb@savonarola.red-bean.com>
2977 * readline.h (scm_init_readline): Add prototype for this.
2978 (scm_init_readline): Make this a real prototype.
2980 1998-09-30 Jim Blandy <jimb@zwingli.cygnus.com>
2982 Warning fixes from Maciej Stachowiak:
2983 * backtrace.h (scm_display_application, scm_backtrace): Add
2985 * debug.c (scm_m_start_stack): Make this function static.
2986 * fluids.h (scm_fluid_p): Add prototype.
2987 * procprop.c (scm_i_procedure_arity): Make this function static.
2988 * regex-posix.c (scm_regexp_error_msg): Make this function static.
2989 * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl.
2990 * root.h (scm_dynamic_root): Add external prototype.
2991 * scmsigs.h (scm_usleep): Add external prototype.
2992 * script.h (scm_init_script): Use prototype, not K&R decl.
2993 * stacks.h (scm_stack_id): Add external prototype.
2994 * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
2996 1998-09-30 Mark Galassi <rosalia@cygnus.com>
2998 * gh.h: took out the definitions of vset and vref, since they are
2999 replaced by the proper vector routines that correspond to the R4RS
3002 1998-09-29 Jim Blandy <jimb@totoro.red-bean.com>
3004 * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros;
3005 these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a
3006 third argument, a C expression that should result in a SCM value,
3007 which is used to initialize the variable. Reimplemented
3008 SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej
3011 * version.h (scm_libguile_config_stamp): Add prototype.
3012 (From Maciej Stachowiak.)
3014 1998-09-26 Jim Blandy <jimb@zwingli.cygnus.com>
3016 * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when
3017 (force 9) is tried. (Thanks to Karl M. Hegbloom.)
3019 1998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
3021 * print.c (scm_iprin1): Rather than having one i, and using it in
3022 several places, declare a fresh i local to each block where it is
3023 used, and give it a signedness appropriate to its use in each case.
3024 (scm_iprlist): Same.
3026 * print.c (scm_iprin1): Add cast to avoid unsigned/signed
3027 comparison warnings.
3029 * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid
3030 signed/unsigned clashes.
3032 * posix.h (scm_tmpnam): Added prototype.
3034 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
3035 scm_make_subclass_object): Add external prototypes.
3037 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
3038 comparison is okay here.
3040 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
3042 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
3043 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
3045 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
3048 * load.c (swap_port): Make this function static.
3050 * load.c (scm_search_path): Make max_path_len and max_ext_len
3051 unsigned, since they're compared against string sizes.
3053 * load.c (init_build_info): Make i unsigned.
3055 * ioext.h (scm_read_line): Add prototype.
3057 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
3058 scm_hash_fn_remove_x): Make hash bucket index local variable k
3059 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
3060 accurately as possible.
3062 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
3063 comparisons, and range checking to make sure those casts are
3066 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
3067 signed/unsigned comparisons.
3069 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
3070 avoid signed/unsigned comparisons.
3071 * smob.h (scm_numsmob): Change extern declaration to match.
3073 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
3074 avoid signed/unsigned comparisons.
3075 * ports.h (scm_numptob): Change extern declaration to match.
3076 (scm_current_load_port, scm_set_port_line_x,
3077 scm_set_port_column_x): New prototypes.
3079 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
3080 test code, and it causes warnings.
3082 * gh.h (gh_int2scmb, gh_uniform_vector_length,
3083 gh_uniform_vector_ref): Added prototypes.
3085 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
3086 debugging support unconditionally. That's backtrace.c, stack.c,
3087 debug.c, and srcprop.c.
3088 (EXTRA_libguile_la_SOURCES): Omit those from here.
3089 * Makefile.in: Regenerated.
3091 1998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3093 * options.c (scm_options): Bugfix: Allow empty list of options!
3095 * debug.c, debug.h (scm_single_step): Removed.
3096 (scm_with_traps): New procedure. This procedure could easily be
3097 written in Scheme but needs to be highly optimized.
3099 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
3101 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
3102 Check SCM_TRAPS_P before trapping.
3104 1998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
3106 Changes to avoid signed/unsigned comparison warnings.
3107 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
3108 (scm_gc_sweep): Make n and j local to the blocks they're used in,
3109 so they can have appropriate types for each application. Make i
3110 signed. Use initializers in some spots. I'll probably pay for
3112 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
3113 (scm_must_realloc): Make nm unsigned.
3114 (init_heap_seg): Make new_seg_index and n_new_objects signed.
3115 (scm_init_storage): Use prototype-style definition, and make the
3117 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
3118 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
3120 * filesys.c (scm_readlink): Make local vars rv and size ints, to
3121 avoid signed/unsigned comparison warnings, and because the return
3122 value of readlink may be -1. Don't bother casting the third
3123 argument to readlink.
3125 * filesys.c (scm_dirname, scm_basename): Move these to their own
3126 page, at the end of the file.
3127 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
3129 * eval.h (scm_eval_options_interface): Add external prototype for this.
3130 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
3132 * eval.c (scm_lookupcar1): Make this static.
3134 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
3135 Make these prototype declarations, not K&R-style.
3137 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
3138 unsigned comparison warning.
3140 * appinit.c: File removed. It had a single function in it, empty,
3141 whose reason for existence is explained in no documentation or
3142 comment. I think it's there as a default for some Tcl-style
3143 initialization, but Tcl abandoned that approach a while ago.
3144 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
3145 (BUILT_SOURCES): Remove appinit.x.
3146 * Makefile.in: Regenerated.
3148 1998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
3150 * Makefile.in: Regenerated using the last public version of
3151 automake, not the hacked Cygnus version.
3153 1998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
3155 Remove Totoro kludge.
3156 * Makefile.in, scmconfig.h.in: Regenerated.
3157 * init.c, readline.c: Don't check if TOTORO is #defined.
3159 1998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
3161 * Makefile.am: Adjust for new thread configuration system.
3162 (INCLUDES): Include the value of THREAD_CPPFLAGS.
3163 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
3165 (THREAD_LIBS): Definition deleted; automake will generate such
3166 things automatically.
3167 * Makefile.in: Regenerated.
3169 1998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
3171 Simplify smob and port marking; set the mark bit in the generic
3172 marking code, and make marker routines only responsible for
3173 turning up outgoing pointers.
3174 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
3175 before calling the marking function. Don't call the marking
3176 function if it's zero.
3177 * markers.c (scm_mark0): Just return #f. This function isn't
3178 necessary at all now, but it's harmless to call it. We'll leave
3179 it in so other folks' code doesn't croak at link time.
3180 (scm_markcdr): Don't call SCM_SETGC8MARK.
3181 * async.c (mark_async): Don't call SCM_SETGC8MARK.
3182 * dynl.c (mark_dynl_obj): Same.
3183 * root.c (mark_root): Same.
3184 * srcprop.c (marksrcprops): Same.
3185 * unif.c (markra): Same.
3186 * variable.c (scm_markvar): Same.
3187 * ports.c (scm_markstream): Same.
3188 (void_port_ptob): Specify zero for our marking function.
3189 * debug.c (debugobjsmob): Same.
3190 * dynwind.c (guardsmob): Same.
3191 * filesys.c (dir_smob): Same.
3192 * fluids.c (fluid_smob): Same.
3193 * fports.c (scm_fptob, scm_pipob): Same.
3194 * mallocs.c (mallocsmob): Same.
3195 * regex-posix.c (regex_t_smob): Same.
3196 * smob.c (freecell, flob, bigob): Same.
3197 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
3198 * throw.c (jbsmob, lazy_catch_funs): Same.
3200 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3202 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
3203 scm_copy_tree on code in order not to let memoized code to leak
3204 out. Thus, scm_copy_tree needs to copy vectors as well since
3205 quasiquote can introduce evaluated code also inside vector
3208 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3210 * eval.c (scm_copy_tree): Removed ability to copy vectors.
3212 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
3213 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
3216 * unif.c: Say that ivect and uvect are of type signed and unsigned
3217 long instead of int in commentary so that it correctly describes
3220 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3222 * stime.c: Removed declaration of strptime. (It should be
3223 declared by the system headers. If it turns out that some systems
3224 don't, we'll handle that then.) (Thanks to Greg Troxel.)
3226 * stime.h: Renamed TIMEH --> STIMEH
3228 * backtrace.c (scm_display_error, scm_display_backtrace): In order
3229 to increase portability, don't use structure assignment.
3230 (Thanks to Nicolas Neuss.)
3232 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
3234 (finalize_fd_sets): Added empty statement after last case label.
3235 (Thanks to Nicolas Neuss.)
3237 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
3240 Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
3242 * init.c, readline.c: OK, I won't have these readline.x bug
3243 reports anymore. We've had them since April. The current reason
3244 is a completely unintelligible failure of totoro.red-bean.com to
3245 do the test for rl_getc_function in libreadline correctly. This
3246 kludge overrides the test if we're on totoro so that the snapshot
3247 generation process can work.
3249 * readline.c: Define a strdup replacement if not existent on system.
3251 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3253 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
3254 This change makes scm_make_vector R5RS compatible. We cannot keep
3255 the third argument since people want to be able to deduce the form
3256 of the C function call only by looking at R5RS. (At the same time
3257 we have removed some unnecessary complexity!)
3259 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
3260 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
3261 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
3262 argument in call to scm_make_vector.
3264 1998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3266 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
3267 This macro is useful in applications.
3269 1998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3271 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
3272 (scm_parse_path, scm_search_path): New Scheme level procedures.
3274 * load.h (scm_internal_parse_path, scm_parse_path,
3275 scm_search_path): Declared.
3277 1998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3279 * filesys.c (dirname, basename): New procedures.
3281 * init.c (scm_boot_guile_1): Removed condition around
3284 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
3285 new data type (guards) for representation of C level guards and
3286 data on the wind chain.
3287 (scm_internal_dynamic_wind): New function.
3289 * dynwind.h: Declare scm_internal_dynamic_wind.
3291 * root.h (scm_root_state): Added scm_cur_loadp.
3293 * root.c (mark_root): Added comment about cur_loadp.
3295 * load.c: #include "dynwind.h";
3296 (scm_primitive_load): Use scm_inner_dynamic_wind to update
3299 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
3301 * ports.c (current-load-port): New procedure.
3303 1998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3305 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
3306 not a tty, return #f.
3308 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
3309 to Julian Satchell and Roland Kaufmann.)
3311 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
3312 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
3314 1998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3316 * debug.h, debug.c (scm_start_stack): New function. Implements
3317 the guts of old scm_m_start_stack.
3319 * debug.c (scm_m_start_stack): Use scm_start_stack.
3321 * init.c (scm_start_stack, scm_restart_stack): Renamed to
3322 start_stack and restart_stack. (These have static scope.)
3324 1998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3326 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
3327 readline functions to come in release 2.3. (Thanks to Chet
3329 (handle_errors): Use the above functions.
3331 1998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3333 * readline.c: Improvements for readline support: Handle errors
3334 better; Implement before-read-hook.
3336 1998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3338 * init.c (scm_boot_guile_1), readline.c: Test for
3339 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
3340 assure that we have version >= 2.1.)
3342 1998-05-11 Mikael Djurfeldt <mdj@kenneth>
3344 * readline.c (scm_readline): Defer interrupts while we're calling
3347 * readline.c (scm_add_history): Bugfix: Do strdup before giving
3348 away the string to add_history.
3349 (completion_function): Do completion for readline. (Thanks to
3351 (scm_filename_completion_function): New procedure: Filename
3353 (current_input_getc): New function. Use this one instead of
3354 standard getc from readline.
3356 * throw.c, throw.h (scm_handle_by_throw): New function: This
3357 handler throws errors to next handler on the dynwind chain.
3359 1998-05-09 Mikael Djurfeldt <mdj@kenneth>
3361 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
3364 1998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3366 * procprop.c (scm_i_procedure_arity): New function. Returns arity
3368 (scm_procedure_properties): Modified to return arity together with
3370 (scm_procedure_property): Added the read-only property `arity'.
3371 (scm_set_procedure_property_x): It is an error to set the `arity'
3374 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
3375 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
3377 * procprop.h (scm_sym_arity): New symbol.
3379 * objects.c (scm_set_object_procedure_x): New procedure: Use this
3380 to set the dispatch procedure of an operator or entity object.
3382 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
3383 Made procedure slots read-only.
3385 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
3386 scm_tcs_cons_gloc case in zero args switch; Fixed args
3387 construction for operators in scm_tcs_cons_gloc case in two args
3390 1998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3392 * fluids.c: Removed use of assert.h (in order to avoid
3395 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
3397 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
3399 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
3400 change makes the evaluator safer at the cost of evaluation speed.
3401 It handles the case when the user has added a non-immediate
3402 improper end of the application form, e.g., `(+ 0 . x)'.
3403 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
3404 minimize the extra cost as much as possible. The new code is
3405 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
3406 problem with structs planted directly in the code (e.g. by a
3407 macro). This no longer causes segmentation fault. (Thanks to
3410 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
3411 arg `proc' in order to be able to throw errors; New argument
3414 * Removed extra #include "debug.h"
3416 1998-04-25 Mikael Djurfeldt <mdj@kenneth>
3418 * scmsigs.c: Declare usleep as returning void on some systems.
3419 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
3422 * coop.c (usleep): Return void on some systems.
3424 1998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3426 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
3428 * coop.c: Changed return type of usleep to int.
3430 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
3431 isn't found in the OS.
3433 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
3434 isn't enabled. (Thought that I had made this change ages ago...)
3436 * iselect.c: Declare bzero if not defined by OS.
3438 1998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3440 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
3441 condition. (Thanks to John Tobey.)
3443 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
3444 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
3447 * __scm.h: Start the long-term project of moving to POSIX threads.
3448 Phase 1: Classification of all critical sections.
3449 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
3450 for A sections. (See comments in __scm.h for details.)
3452 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
3453 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
3455 1998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3457 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
3458 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
3459 (libpath.h, versiondat.h): Replaced dependency on Makefile with
3460 dependencies on $(srcdir)/Makefile.in
3461 $(top_builddir)/config.status in order to avoid circularity.
3463 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
3464 from argc if argc was 0 initially.
3466 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
3467 in generation of libpath.h.
3469 1998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
3471 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
3472 libguile from 2 to 3.
3474 1998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
3476 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
3478 1998-04-13 Mikael Djurfeldt <mdj@kenneth>
3480 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
3481 scm_set_port_column_x, scm_port_filename,
3482 scm_set_port_filename_x): Removed optional arguments. Added
3483 proper argument checking.
3485 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
3486 stack size in machine words.
3488 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
3489 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
3490 to Ole Myren Röhne.)
3492 1998-04-12 Mikael Djurfeldt <mdj@kenneth>
3494 * socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
3495 UNIX_DOMAIN_SOCKETS. (Thanks to Lauri Alanko.)
3497 * gc.c (scm_gc_sweep): Count cells correctly. (Thanks to Ben
3500 * eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
3501 procedure apply: Copy argument lists before pushing them unto the
3502 environment so that the environment won't get mutated due to
3503 manipulation of procedure arguments. This should perhaps be
3504 regarded as a temporary solution until someone finds a more
3505 efficient one. (Thanks to Maciej Stachowiak.)
3507 1998-04-10 Mikael Djurfeldt <mdj@kenneth>
3509 * script.c (scm_compile_shell_switches): Use "guile" as default
3510 zero arg if argc is NULL.
3512 1998-04-02 Mikael Djurfeldt <mdj@nada.kth.se>
3514 * script.c (scm_compile_shell_switches): Allow NULL argv if argc
3515 is zero. (Thanks to Dirk Herrmann.)
3517 1998-03-30 Mikael Djurfeldt <mdj@nada.kth.se>
3519 * ports.c (scm_add_to_port_table): First line is now line 0
3520 (was 1). (Interface changed according to suggestion by Per
3523 * backtrace.c (display_header): Add 1 to line and column numbers
3524 when presenting them to the user.
3526 * eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
3527 from debug.c --> eval.c
3529 * eval.h, eval.c (scm_eval_options_interface): New options
3531 (SCM_EVAL_STACK): New option: Size of newly created stacks,
3532 i.e. stacks for new threads.
3534 * coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.
3536 * eval.c (unsafe_setjmp): Removed with #if 0.
3538 * gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
3541 * eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
3542 to avoid compiler warnings.
3544 * dynl-dl.c (sysdep_dynl_func): Only define usymb if needed.
3546 1998-03-28 Mikael Djurfeldt <mdj@nada.kth.se>
3548 * throw.c (handler_message): Print message on current error port
3549 instead of default error port. (Thanks to Maciej Stachowiak.)
3551 Mon Mar 2 21:35:02 1998 Gary Houston <ghouston@actrix.gen.nz>
3553 * ports.c (scm_add_to_port_table): allocate in units of
3554 struct scm_port_table *, not struct scm_port_table.
3555 * posix.c (scm_close_pipe): remove the port from the port table
3557 Thanks to Rob Engle for both fixes.
3559 1998-02-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3561 * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
3562 coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
3564 1998-02-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3566 * throw.h: Removed jmpbuf arg in scm_catch_body_t.
3568 * backtrace.c (display_error_body, display_backtrace_body),
3569 coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
3570 gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
3571 (invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
3572 scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
3575 * throw.c (scm_internal_catch, scm_internal_lazy_catch): Bodies
3576 don't receive the jmpbuf arg anylonger.
3577 (scm_catch): Don't accept a #f tag.
3578 (scm_throw): Check that key is a symbol.
3579 (scm_ithrow): Don't take a jmpbuf as key. Don't check key arg.
3581 Fri Jan 30 22:28:07 1998 Mikael Djurfeldt <mdj@kenneth>
3583 * async.c (async_pending): Removed declaration.
3585 1998-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3587 * dynwind.c (scm_wind_chain): New debug function.
3589 * coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
3590 scheme_handler_bootstrip, scheme_launch_thread, c_launch_data,
3591 c_body_bootstrip, c_handler_bootstrip, c_launch_thread): Add an
3592 extra layer of functions around the body and handler of a thread.
3593 This extra layer makes sure that the handler is called in the
3594 dynamic context of the surround (= empty dynwind list), but under
3595 the *dynamic root* of the body. We can not use the dynamic root
3596 of the surround since that root belongs to another thread => stack
3597 is not handled correctly. It may seem ugly to use this extra
3598 layer, but the extra cost in terms of execution time is really
3599 negligible compared to the total amount of time required to create
3600 a thread, and it would reduce maintainability to duplicate the
3601 crucial and complicated steps performed by cwdr.
3603 * __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
3604 (SCM_ALLOW_INTS): Added thread switching code before interrupts
3605 get re-enabled. The important effect of this is that interrupts
3606 are blocked during thread switching so that thread data structures
3607 don't risk getting messed up by an unfortunate signal.
3608 (SCM_REDEFER_INTS, SCM_REALLOW_INTS): It turned out that gcc-2.8.0
3609 seems to do more aggressive optimization which actually move
3610 instructions around in these macros in a fatal way. Therefore:
3611 Introduce Anthony's SCM_FENCE macro! (And I who thought he was
3612 just superstitious...)
3613 (SCM_TICK): Maybe do a context switch and take care of asyncs.
3614 This macro should be used instead of SCM_ASYNC_TICK since the
3615 latter doesn't do context switches any more.
3617 * eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
3618 instead of SCM_ASYNC_TICK.
3620 * coop.c, iselect.c: Since thread switches are now performed with
3621 interrupts masked, we can't use the old mechanism of delivering
3622 signals immediately when they arrive. Signals must instead be
3623 delivered when the asyncs run *after* the end of the critical
3624 section in scm_internal_select. But this also means after context
3625 switch so that the signal will be delivered to a different thread.
3626 To avoid this, I have changed the protocol of
3627 coop_wait_for_runnable_thread and friends so that they are allowed
3628 to return the original thread. So, if a signal arrives during
3629 scm_internal_select, we won't any longer be forced do a context
3630 switch, but can remain in the same thread and deliver the signal
3633 * async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
3634 scm_asyncs_pending and made it global.
3636 * iselect.c: Small fixes.
3638 * coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
3639 coop_condition_variable_init, coop_condition_variable_wait,
3640 coop_condition_variable_signal): Changed return type from `void'
3641 to `int'. This is to adhere closer to the pthreads interface.
3642 This, in turn, is part of an attempt to provide C versions of the
3643 mutex and condition variable primitives which can be part of a
3644 frontend to COOP or pthreads.
3646 * coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
3647 coop_condition_variable_destroy): New functions.
3649 * coop-threads.c (scm_wait_condition_variable): Use
3650 coop_condition_variable_wait_mutex.
3652 * coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
3653 Definitions moved to coop-defs.h.
3655 * coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
3656 scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
3657 scm_cond_destroy): New C interface to mutecis and cond vars.
3659 1998-01-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3661 * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.
3663 * iselect.c: Now several threads can wait on the same file
3664 descriptor. The behaviour is compatible with OS select: All
3665 threads waiting for the fd return with the same status.
3667 1998-01-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3669 * coop-threads.c, threads.h (scm_spawn_thread): New function.
3670 Can spawn a thread from application C code.
3672 1998-01-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3674 * gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
3675 gh_doubles2scm): New functions.
3677 1998-01-15 Mark Galassi <rosalia@nis.lanl.gov>
3679 * gh_eval.c (gh_eval_str): cleanup -- threw out the old
3680 commented-out version of gh_eval_str()
3682 Sun Jan 4 02:23:36 1998 Gary Houston <ghouston@actrix.gen.nz>
3684 * socket.c (scm_bind): free soka after use.
3686 Sat Jan 3 20:55:07 1998 Gary Houston <ghouston@actrix.gen.nz>
3688 * stime.c (tzvar): new variable.
3689 (setzone, restorezone, scm_localtime, scm_mktime, scm_strftime):
3690 avoid memory leaks when allocating.
3692 1998-01-03 Jim Blandy <jimb@totoro.red-bean.com>
3694 * iselect.h: Some systems require <sys/types.h> to get the FD_SET
3697 * gc.c, tags.h: Doc fixes.
3699 1998-01-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3701 * eval.c (macro-eval!): Removed. This function was a design bug.
3702 It allowed memoized code to leak out to the scheme level. Most
3703 things that you could do with `macro-eval!' can be done with
3706 1997-12-20 Tim Pierce <twp@skepsis.com>
3708 * fports.c (scm_pipob): Use scm_generic_fgets for line i/o, since
3709 scm_fgets now depends on ftell(3) to know how many bytes were
3712 1997-12-15 Tim Pierce <twp@skepsis.com>
3714 * gh_data.c (gh_scm2newstr, gh_get_substr): Use RO macros for
3715 dealing with strings.
3717 1997-12-13 Tim Pierce <twp@skepsis.com>
3719 Make %read-line more suitable for implementing read-line efficiently.
3720 * ioext.c (scm_read_line): Strip the terminating newline from a
3721 string, and return a cons of the string and its terminator.
3723 * fports.c, fports.h (scm_fgets): Add `len' argument. The length
3724 of the string that is read is stored in this memory location.
3725 * ports.c, ports.h (scm_generic_fgets, fgets_void_port): Same.
3726 * genio.c, genio.h (scm_do_read_line): Update caller.
3727 * ports.h (scm_ptobfuns): Update typedef.
3728 * fports.c (scm_fptob, scm_pipob): Update struct.
3730 1997-12-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3732 * filesys.c (set_element): Return file descriptor.
3733 (fill_select_type): Return the highest file descriptor.
3734 (scm_select): Tell select about the highest file descriptor. On
3735 some systems the SELECT_SET_SIZE can be as much as 128 bytes.
3736 Therefore the extra overhead for calculating the maximum fd seems
3737 to be more than compensated. Is this correct? In any case,
3738 scm_internal_select will be much faster with this info.
3739 (scm_select, fill_select_type, set_element): Don't accept any kind
3740 of object in the file descriptor list or vector.
3742 1997-12-07 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3744 * iselect.c (finalize_fd_sets): Bugfix.
3746 1997-12-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3748 * filesys.c (scm_select): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS
3749 when using scm_internal_select (since we might switch to another
3752 Sun Dec 7 01:43:56 1997 Gary Houston <ghouston@actrix.gen.nz>
3754 * simpos.c (scm_system): always define: use sysmissing if not
3755 available. Check for HAVE_SYSTEM instead of _Windows (does
3756 Windows lack system or does it have an unusable one?).
3757 Check for error conditions -1 and 127. Use SCM_DEFER_INTS.
3758 Let the argument be optional: if not supplied, call system(NULL).
3760 * ports.c (scm_close_port): relax the type check from OPPORTP to
3761 PORTP; closing a closed port is allowed.
3763 1997-12-04 Tim Pierce <twp@ppp39.Nantucket.net>
3765 * fports.c (scm_fgets): Return if the last char in a chunk is
3766 newline. When fgets returns a string whose length is `size-1', it
3767 is ambiguous whether a whole line was retrieved, so we must check
3768 explicitly whether a line terminator is present.
3770 1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3772 * print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
3773 before taking the CDR. (Thanks to Harald Meland.)
3775 * filesys.c (scm_stat): Slightly optimized.
3777 Wed Dec 3 12:23:06 1997 Jim Blandy <jimb@totoro.red-bean.com>
3779 * ports.c (scm_close_port): Make sure the port is open before
3782 * guile-snarf.in: Pass args through to gcc in a way that preserves
3783 whitespace boundaries. (Thanks to Greg Badros.)
3785 1997-12-02 Tim Pierce <twp@skepsis.com>
3787 * stacks.c (scm_frame_procedure): Reverse the logic in the return
3788 statement. (Thanks to Doug Evans for pointing this out.)
3790 1997-12-01 Tim Pierce <twp@skepsis.com>
3792 * scmconfig.h.in: Regenerated for USCORE change in ../acconfig.h.
3794 Sun Nov 30 11:29:18 1997 Mikael Djurfeldt <mdj@kenneth>
3796 * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
3797 errno macro expansion of this field name. (errno is a C
3798 preprocessor macro on some systems.)
3800 1997-11-29 Tim Pierce <twp@skepsis.com>
3802 * iselect.c: Doc fix.
3804 Sat Nov 29 01:16:53 1997 Mikael Djurfeldt <mdj@kenneth>
3806 * init.c (scm_start_stack): Removed initialization of
3807 scm_the_last_stack_var.
3809 * backtrace.h: Declare scm_the_last_stack_var.
3811 * backtrace.c: Define scm_the_last_stack_var.
3813 * root.c (mark_root): Don't mark the_last_stack_var.
3815 * root.h (scm_root_state): Removed the_last_stack_var.
3817 * throw.c: Added #include "fluids.h"
3818 (ss_handler): `the-last-stack' is now a fluid.
3820 * (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
3821 --> the_last_stack_fluid.
3823 * backtrace.c: Added #include "fluids.h"
3824 (scm_init_backtrace): Initialize `the-last-stack' to a fluid.
3825 (scm_backtrace): `the-last-stack' is now a fluid.
3827 * init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
3828 after scm_init_fluids.
3830 1997-11-28 Tim Pierce <twp@skepsis.com>
3832 * iselect.c: #ifdef USE_THREADS around thread-related includes.
3834 * dynl-dl.c (sysdep_dynl_func): Check both USCORE and
3835 DLSYM_ADDS_USCORE to decide whether to add an underscore.
3837 1997-11-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3839 * iselect.c (coop_next_runnable_thread,
3840 coop_wait_for_runnable_thread): Disable interrupts so that no
3841 async is executed before a potential error_revive.
3842 (scm_internal_select): Disable interrupts during the parts of the
3843 code which manipulate the sleep queue and the file descriptors.
3845 1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3847 * Makefile.am: Added iselect.c and iselect.h.
3849 * coop.c (coop_qinit): Initialize fields used by
3850 scm_internal_select.
3851 (coop_qget, coop_qget, coop_tmp_queue): Made global.
3852 (coop_next_runnable_thread): If GUILE_ISELECT enabled, use
3853 replacement in iselect.c.
3854 (coop_mutex_lock, coop_condition_variable_wait, coop_abort,
3855 coop_join): If GUILE_ISELECT enabled, use
3856 coop_wait_for_runnable_thread instead of
3857 coop_next_runnable_thread.
3858 (usleep, sleep): New replacements for system functions if
3859 GUILE_ISELECT is enabled.
3861 * coop-threads.h: Declare coop_wait_for_runnable_thread.
3863 * coop-defs.h (coop_t): Added fields used by scm_internal_select.
3865 * filesys.c: Added #include "iselect.h". Moved FD-macros to
3866 iselect.h. Implement Scheme level `select' using
3867 scm_internal_select. (See NEWS.)
3869 * genio.c (scm_getc): Block with scm_internal_select. (See NEWS.)
3871 * init.c: Call scm_init_iselect.
3873 * iselect.h, iselect.c: New files. Implements
3874 scm_internal_select. (See NEWS.)
3876 1997-11-27 Tim Pierce <twp@skepsis.com>
3878 Fix a memory leak in scm_read_line and a type cast bug in the ptob.
3879 * fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
3880 and scm_must_free, since ultimately the string returned will be copied
3881 by scm_makfrom0str anyway. Also, read any characters that may have
3882 been pushed onto the port with scm_ungetc.
3883 * ports.c (scm_generic_fgets): Same as for scm_fgets.
3884 * ioext.c (scm_read_line): Free string after Guilifying it.
3885 * ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
3887 1997-11-26 Anthony Green <green@hoser.cygnus.com>
3889 * gh_data.c (gh_set_substr): Strings can be longer than 256 bytes.
3891 * gh.h: Safely wrap prototypes for c++ usage.
3893 1997-11-25 Mark Galassi <rosalia@cygnus.com>
3895 * gh_test_repl.c (main_prog): changed invocation of gh_repl() to
3896 gh_repl (argc, argv).
3898 1997-11-24 Mark Galassi <rosalia@nis.lanl.gov>
3900 * gh_init.c (gh_repl): modified gh_repl() to accept argc and argv
3901 and to invoke scm_shell().
3902 (gh_launch_pad): took out the loading of boot-9.scm from here,
3903 since it is probably best to let the user control that. In fact,
3904 gh_repl() now invokes scm_shell() which does that.
3906 1997-11-23 Mark Galassi <rosalia@cygnus.com>
3908 * gh_test_repl.c (main_prog): added argc and argv to the gh_repl()
3911 1997-11-22 Tim Pierce <twp@twp.tezcat.com>
3913 * dynl-dl.c (sysdep_dynl_func): Fix memory leak created by
3914 yesterday's underscore patch. (Thanks to Marius Vollmer for
3917 1997-11-21 Tim Pierce <twp@twp.tezcat.com>
3919 * dynl-dl.c (sysdep_dynl_func): Prepend symb with underscore if
3920 DLSYM_ADDS_USCORE is not defined.
3922 1997-11-17 Mark Galassi <rosalia@nis.lanl.gov>
3924 * gh_data.c (gh_uniform_vector_length):
3925 (gh_uniform_vector_ref): started implementing the uniform types in
3928 1997-11-06 Mikael Djurfeldt <mdj@nada.kth.se>
3930 * regex-posix.c (scm_free_regex_t): Return size of regex_t instead
3931 of 0; size_t --> scm_size_t. Thanks to Bernard Urban.
3933 1997-10-26 Mikael Djurfeldt <mdj@nada.kth.se>
3935 * scmconfig.h.in: Updated (HAVE_LIBTERMCAP was added when
3936 configure.in was changed).
3938 Sun Oct 26 02:20:11 1997 Jim Blandy <jimb@totoro.red-bean.com>
3940 * Makefile.am (modinclude_HEADERS): Include readline.h here.
3941 * Makefile.in: Regenerated.
3943 1997-10-25 Marius Vollmer <mvo@zagadka.ping.de>
3945 * print.h (SCM_COERCE_OPORT): Renamed to SCM_COERCE_OUTPORT. An
3946 OPORT is an `open' port, not an output port.
3948 * filesys.c (scm_close, set_element, get_element, scm_chown,
3949 scm_chmod, scm_stat, scm_truncate_file, scm_fcntl, scm_fsync): Use
3950 SCM_COERCE_OUTPORT to cope with the printstate/port magic.
3951 * ports.c (scm_port_revealed, scm_set_port_revealed_x,
3952 scm_close_port, scm_port_line, scm_set_port_line_x,
3953 scm_port_column, scm_set_port_column_x, scm_port_filename,
3954 scm_set_port_filename_x, scm_port_mode,
3955 scm_close_all_ports_except, scm_set_current_output_port,
3956 scm_set_current_error_port): Likewise
3957 * ioext.c (scm_redirect_port, scm_dup_to_fdes, scm_freopen,
3958 scm_ftell, scm_fileno, scm_isatty_p, scm_primitive_move_to_fdes):
3960 * posix.c (scm_ttyname, scm_tcgetpgrp, scm_tcsetpgrp): Likewise
3961 * backtrace.c (display_backtrace_body): Likewise
3962 * fports (scm_setvbuf): Likewise
3963 * socket.c (scm_getsockopt, scm_setsockopt, scm_shutdown,
3964 scm_connect, scm_bind, scm_listen, scm_accept, scm_getsockname,
3965 scm_getpeername, scm_send, scm_sendto): Likewise
3966 * unif.c (scm_uniform_array_write): Likewise
3968 Sat Oct 25 02:52:58 1997 Jim Blandy <jimb@totoro.red-bean.com>
3970 Minor problems with substring-related tag changes.
3971 * symbols.h (SCM_SUBSTRP): Don't mask off the S bit; that's
3972 exactly what we want to leave in to detect substrings.
3973 (SCM_ROSTRINGP, ROUCHARS): Formatting tweaks.
3974 * tags.h: Fix diagrams and comments describing the S tag bit;
3975 remove vestigial remarks about the D tag bit.
3976 (SCM_TYP7, SCM_TYP7S): Rephrased for readability.
3977 * strings.c: Formatting tweaks.
3979 * load.c (scm_init_load_path): Check GUILE_LOAD_PATH environment
3980 variable first; then SCHEME_LOAD_PATH, with a warning message.
3981 (scm_parse_path): New function.
3982 * script.c: Doc fixes.
3984 Thu Oct 23 01:02:03 1997 Jim Blandy <jimb@totoro.red-bean.com>
3986 Readline support, from Daniel Risacher.
3987 * readline.c, readline.h: New files.
3988 * init.c: #include "readline.h".
3989 (scm_boot_guile_1): Call scm_init_readline, if we have it.
3990 * Makefile.am (libguile_la_SOURCES): Include readline.c.
3991 * Makefile.in: Regenerated.
3992 * scmconfig.h.in: Regenerated, after change to ../configure.
3994 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
3996 * gh.h: gh_vector_set -> gh_vector_set_x
3998 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
4000 * gh_data.c (gh_vector_set_x): changed name to make it consistent
4001 with the ! -> _x mapping when going from Scheme to C.
4003 1997-10-19 Mark Galassi <rosalia@cygnus.com>
4005 * gh.h (gh_reverse):
4013 (gh_assoc): added these gh_ functions implemented as macros.
4015 * gh_predicates.c (gh_null_p):
4016 (gh_string_equal_p): added these two missing predicates.
4018 * gh_list.c (gh_append):
4023 (gh_set_cdr_x): added these routines as I go through and try to
4024 complete the picture R4RS functions that should be mirrored in the
4027 Sat Oct 18 01:52:51 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4029 * tags.h (scm_tc7_substring): Changed the comment and code to
4030 conform with the changes below. Folks! We have suddenly two new
4031 free tc7 codes!!! Jummy, jummy!
4033 Tue Oct 14 22:03:06 1997 Tom Tromey <tromey@cygnus.com>
4035 * Makefile.in: Rebuilt.
4036 * Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
4038 (modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
4039 * unif.c (scm_vector_set_length_x): Don't handle multibyte
4041 * tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
4042 (scm_tag): Don't handle multibyte strings.
4043 * read.c: Don't include mbstrings.h.
4044 (scm_lreadr): Don't handle multibyte ports.
4045 * kw.c: Don't include mbstrings.h.
4046 * init.c: Don't include mbstrings.h.
4047 (scm_boot_guile_1): Don't init mbstrings module.
4048 * hash.c (scm_hasher): Don't handle mbstrings.
4049 * gscm.c (gscm_run_scm): Don't init mbstrings module.
4050 * gc.c (scm_gc_mark): Don't handle mbstrings.
4051 (scm_gc_sweep): Likewise.
4052 * eval.c (SCM_CEVAL): Don't handle mbstrings.
4053 * eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
4054 * tags.h (SCM_TYP7SD): Removed.
4055 (SCM_TYP7D): Removed.
4056 (scm_tc7_mb_string): Removed.
4057 (scm_tc7_mb_substring): Removed.
4058 * print.c (scm_iprin1): Handle char printing directly. Don't
4060 Don't include "mbstrings.h".
4061 * symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
4062 scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
4064 Don't include "mbstrings.h".
4065 * symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
4066 (SCM_SYMBOL_SLOTS): Define as 4.
4067 (SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
4068 * arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
4069 gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
4070 print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
4071 struct.c, threads.c, throw.c, unif.c, variable.c: Use new
4072 ("gen"-less) I/O function names.
4073 * ports.c (scm_add_to_port_table): Don't set port's
4075 * ports.h (scm_port_representation_type): Removed.
4076 (scm_string_representation_type): Removed.
4077 (struct scm_port_table ): Removed representation field.
4078 (SCM_PORT_REPRESENTATION): Removed.
4079 (SCM_SET_PORT_REPRESENTATION): Removed.
4080 * genio.h: Use new function names.
4081 * genio.c: Don't include "extchrs.h".
4082 (scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
4084 (scm_putc, scm_puts, scm_lfwrite): No longer static.
4085 (scm_getc): No longer static; handle line and column changes.
4086 (scm_ungetc): Renamed from scm_gen_ungetc.
4087 (scm_do_read_line): Renamed from scm_gen_read_line.
4088 * libguile.h: Don't include "extchrs.h" or "mbstrings.h"
4089 * extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
4091 1997-10-12 Mark Galassi <rosalia@cygnus.com>
4093 * gh_test_repl.c (c_vector_test): same as gh_test_c.c
4095 * gh_test_c.c (c_vector_test): some improvements on the vector
4098 * gh.h (gh_vector): this used to exist but do the wrong thing.
4099 Now it (almost) does the right thing, though it takes a list
4100 instead of the individual arguments. I need to see how it could
4102 (gh_list_to_vector): added this function as a macro. Corresponds
4103 to Scheme's (list->vector ...).
4104 (gh_vector_to_list): added this function as a macro. Corresponds
4105 to Scheme's (vector->list ...).
4107 * gh_data.c (gh_vector_ref): renamed from gh_vref to
4108 gh_vector_ref, so that it resembles the Scheme routines more.
4109 (gh_vector_set): renamed from gh_vset to gh_vector_set, so that it
4110 resembles the Scheme routines more.
4111 (gh_make_vector): this used to be (stupidly) called gh_vector().
4112 This is the right name, since it does the same thing as the Scheme
4113 (make-vector ...) procedure.
4115 Sun Oct 12 14:41:39 1997 Mikael Djurfeldt <mdj@kenneth>
4117 * ports.h: #include "libguile/print.h"
4119 * eval.c (SCM_CEVAL, scm_apply): Completed GOOPS support code;
4120 Some indentation fixes.
4122 * objects.h (SCM_METACLASS_STANDARD_LAYOUT): Printer field is no
4123 longer a user field; New field: class_flags.
4125 * objets.c, objects.h: New metaclass: scm_metaclass_operator.
4127 Tue Oct 7 09:37:24 1997 Mark Galassi <rosalia@cygnus.com>
4129 * gh_data.c (gh_bool2scm): new function which replaces
4130 gh_int2scmb(), which is now tagged as obsolete.
4132 1997-10-03 Mikael Djurfeldt <mdj@nada.kth.se>
4134 * print.h (SCM_PRINT_STATE_P): Removed SCM_NIMP test. (NIMP
4135 macros should by convention not test for NIMPness.)
4136 (SCM_COERCE_OPORT): Adjust indentation.
4138 * print.c (scm_valid_oport_value_p): Adjusted indentation; Added
4139 SCM_NIMP test before SCM_PRINT_STATE_P.
4141 * struct.c, struct.h, gc.c: Renamed:
4142 scm_struct_i_layout --> scm_vtable_index_layout
4143 scm_struct_i_vcell --> scm_vtable_index_vcell
4144 scm_struct_i_vtable --> scm_vtable_index_vtable
4145 scm_struct_i_printer --> scm_vtable_index_printer
4146 scm_struct_i_vtable_offset --> scm_vtable_offset_user
4148 * struct.c (scm_print_struct): Use new printer slot; Default
4149 printing: Also output hex code of vtable so that type identity
4150 will be indicated as well.
4151 (scm_init_struct): Updated required_vtable_fields to "pruosrpw";
4152 Removed struct_printer_var; Removed struct-vtable-offset;
4153 (vtable-index-layout, vtable-index-vtable, vtable-index-printer,
4154 vtable-offset-user): New constants.
4156 * struct.h (scm_struct_i_vtable_offset): Bumped from 3 to 4.
4157 (scm_struct_i_printer, SCM_STRUCT_PRINTER): New slot in vtables.
4158 If this slot contains a procedure, use that to print structures of
4159 the type represented by this vtable.
4161 * print.c (scm_iprin1): Don't print arguments of macro
4162 transformers. (They are always: exp env.); Bugfix: Unmemoize
4163 transformer source with correct environment.
4165 1997-10-02 Marius Vollmer <mvo@zagadka.ping.de>
4167 Streamlining of call-with-dynamic-root:
4169 * root.c (cwdr_inner_body, cwdr_body): Remove "inner" from name,
4170 there is now only one catch.
4171 (cwdr_outer_body): Removed.
4172 (cwdr_handler): New function.
4173 (scm_internal_cwdr): New function to perform the function of cwdr
4174 but take args that are more useful to C code. Also, the handler
4175 is now invoked *outside* of the new dynamic root, like the docs
4176 say. We no longer have to catch absolutely all errors, the caller
4177 is responsible for using a handler that does not throw, if he
4179 (cwdr): Reimplemented in terms of scm_internal_cwdr.
4180 * root.h (scm_internal_cwdr): New prototype.
4182 Even more but risky streamlining:
4184 * root.c (USE_STACKJMPBUF): New define to activate a stack-based
4185 allocation of the jumpbuf of a root continuation. The changes
4186 below are controlled by it. They are now deactivated.
4187 (scm_internal_cwdr): Allocate the scm_contregs on the stack. Set
4188 the JMPBUF of the scm_rootcont to NULL before returning.
4190 * gc.c (scm_gc_sweep): Free the SCM_VELTS of a scm_tc7_contin only
4191 when they are non-NULL.
4192 (scm_gc_mark): Likewise, mark only when non-NULL.
4194 Make dynamic linking work on Dec Unix. (Thanks to Clark McGrew)
4195 * dynl.c: Include "dynl-dl.c" also when HAVE_DLOPEN is defined.
4197 * gc.c (scm_done_malloc): New function.
4198 gc.h (scm_done_malloc): New prototype.
4200 * print.h (SCM_PRINT_STATE_P, SCM_COERCE_OPORT): New macros.
4201 (struct scm_print_state) [revealed]: New field.
4202 (scm_print_state_vtable): Make visible to the outside world for
4203 type checking purposes.
4204 (scm_valid_oport_value_p): New prototype.
4206 * print.c (scm_valid_oport_value_p): New function to check whether
4207 a certain value is acceptable as a port argument.
4208 (scm_print_state_vtable): New variable.
4209 (scm_free_print_state): Set `revealed' field to false.
4210 (scm_iprin1): Call user supplied closure printer with
4211 scm_printer_apply. Print in the traditional way when there isn't
4212 one or when it returns #f.
4213 (scm_prin1, scm_display, scm_write, scm_newline, scm_write_char):
4214 Accept a port/print-state pair in addition to just a port.
4215 (scm_prin1): Don't return the print_state to the pool when it has
4217 (scm_printer_apply): Set `revealed' field of print_state to true.
4218 (scm_init_print): Set scm_print_state_vtable.
4219 (print_state_fluid, print_state_fluid_num): Removed.
4221 * throw.h (scm_handle_by_proc_catching_all): New prototype
4222 throw.c (scm_handle_by_proc_catching_all): New function
4224 Mon Sep 29 23:54:09 1997 Jim Blandy <jimb@totoro.red-bean.com>
4226 * Makefile.in: Regenerated with automake 1.2c.
4228 Sun Sep 28 21:35:42 1997 Radey Shouman <shouman@zianet.com>
4230 * ramap.c (scm_array_index_map_x): Fixed for zero-rank arguments,
4231 was looping endlessly.
4233 Sun Sep 28 00:04:29 1997 Jim Blandy <jimb@totoro.red-bean.com>
4235 * strports.c (scm_eval_string): Don't close the port.
4237 * stime.c (bdtime2c): Use SCM_LENGTH, not scm_vector_length; the
4238 former returns a nice normal integer. (Thanks to Daniel
4241 Sat Sep 27 20:19:34 1997 Jim Blandy <jimb@totoro.red-bean.com>
4243 * Makefile.am (libpath.h): Include the value of the THREAD_LIBS
4244 makefile variable as a build parameter called LIBS. The
4245 build-guile program will use this, for the time being.
4246 * Makefile.in: Regenerated.
4248 Thanks to Shiro Kawai:
4249 * gc.c (scm_gc_mark): Pass NULL to scm_wta as the subroutine name.
4250 * ports.h (scm_ptobfuns): The fgets method returns a char *, not
4253 * Makefile.in: Regenerated with automake 1.2a.
4255 * script.c (scm_compile_shell_switches): If we hit the -c or --
4256 arguments, don't set the car of (command-line) to scm_usage_name,
4257 the prettified name of the guile executable; give it the full
4258 path, the way shells usually handle $0.
4260 Wed Sep 24 22:09:52 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4262 * ramap.c (scm_array_map): Renamed to scm_array_map_x. Removed
4263 Scheme-level name `array-map' and renamed `serial-array-map' to
4264 `serial-array-map!'.
4266 * backtrace.c: Introduced exception handlers which now enclose
4267 `display-error' and `display-backtrace' so that error reporting
4268 won't get into infinite loops if an error occurs during displaying
4269 of the error. This can very easily happen with user supplied
4270 print call-back routines.
4272 Tue Sep 23 12:43:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4274 * ramap.c: Added alias `array-map!' for `array-map'. (Probably,
4275 the names `serial-array-map' and `array-map' should be removed.)
4277 Mon Sep 22 01:21:54 1997 Mikael Djurfeldt <mdj@kenneth>
4279 * init.c (scm_boot_guile_1): Added scm_init_objects ().
4280 Added #include "objects.h"
4282 * eval.c (scm_makprom): Added SCM_DEFER_INTS and SCM_ALLOW_INTS.
4283 Add #include "feature.h".
4285 * Makefile.am (libguile_la_SOURCES): Added objects.c.
4286 (modinclude_HEADERS): Added objects.h.
4288 * ports.h (SCM_EOF_OBJECT_P): New macro predicate.
4289 This test is needed at many places in the code and should be
4290 abstracted. (Motivated by the need of this test in libguiletk.)
4292 * ports.c (scm_eof_object_p), vports.c (sfgetc), strports.c
4293 (scm_eval_string), load.c (scm_primitive_load,
4294 scm_read_and_eval_x), gh_eval.c (gh_eval_str):
4295 Use SCM_EOF_OBJECT_P.
4297 * eval.c (scm_init_eval): Add feature `delay'.
4299 Tue Sep 16 02:12:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4301 * scmhob.h: Removed.
4303 Mon Sep 15 20:42:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4305 * list.h (SCM_LISTn): New macros. Make list creation in C code
4306 prettier. The idea comes from STk.
4308 * sequences.h, sequences.c, append.h, append.c: Removed. These
4309 files implemented non-R4RS operations which would encourage
4310 non-portable programming style and less easy-to-read code.
4312 * Makefile.am (sequences.h, sequences.c, append.h, append.c):
4315 * libguile.h, eval.c, init.c, stime.c, unif.c: Removed #include
4316 sequences.h, #include append.h.
4318 * init.c (scm_boot_guile_1): Removed calls to scm_init_append and
4321 * gh.h, gh_list.c: Renamed gh_list_length --> gh_length.
4323 * list.h, list.c: Renamed scm_list_length --> scm_length, scm
4325 * stime.c (bdtime2c): Changed scm_obj_length --> scm_vector_length.
4327 Sat Sep 13 00:21:41 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4329 * eval.c: Added #include "objects.h"
4331 * tags.h (scm_tc16_object, scm_tc16_entity): Smobtags for objects
4334 * smob.c (scm_smob_prehistory): Create two objectsmobs with
4335 adjacent smob numbers.
4337 Thu Sep 11 00:59:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4339 * procprop.h: Added declaration of scm_i_inner_name.
4341 * gsubr.c: New global symbol scm_i_inner_name.
4343 * debug.c (scm_procedure_name): Try procedure property
4344 `inner-name' if `name' fails.
4346 * print.c (scm_iprin1): Use scm_macro_name.
4348 * eval.c (scm_m_define): Give names to macros as well; Only the
4349 first top-level definition gives a procedure/macro a name.
4350 Otherwise confusing names can turn up in backtraces.
4351 (SCM_CEVAL): SCM_IM_DEFINE: Set `inner-name' property instead of
4352 `name'; Give names to macros as well.
4354 * procs.c (scm_closure_p), print.c (scm_iprin1), eval.c
4355 (scm_macro_transformer): Use SCM_CLOSUREP instead of
4358 Wed Sep 10 20:52:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4360 * eval.c (macro?, macro-type, macro-name, macro-transformer): New
4362 (prinmacro): Removed. The code has been moved/merged into print.c
4363 in order to decrease code redundancy. We want macros to print in
4364 a way equivalent to procedures, and it would be silly to duplicate
4365 the required code. (We don't want to maintain two places.)
4366 (macrosmob): Print field is now a NULL pointer.
4368 * eval.h (scm_macro_p, scm_macro_type, scm_macro_name,
4369 scm_macro_transformer): New prototypes.
4370 (scm_tc16_macro): Declared.
4372 * print.c (scm_iprin1): Added code for printing of macros. Macros
4373 are now printed in a way equivalent to procedures.
4375 Sat Sep 6 12:20:42 1997 Mikael Djurfeldt <mdj@kenneth>
4377 * procs.h (scm_closure_p): Added declaration.
4379 Fri Sep 5 13:36:14 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4381 * gc.c (scm_gc_mark): Fixed "rogue pointer in heap" message:
4382 Shouldn't pass "heap" as the subr name.
4384 Tue Sep 2 18:14:30 1997 Jim Blandy <jimb@totoro.red-bean.com>
4386 * gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
4387 gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
4388 gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
4389 gh_equal_p): Use SCM_NFALSEP, instead of testing against
4390 SCM_BOOL_T. Any non-false value is true.
4392 Tue Sep 2 00:27:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4394 * symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
4395 scm_gensym): Added prototypes.
4397 * symbols.c (scm_gensym): New function. This will speed up
4398 certain types of applications (such as macro systems) which
4399 generate lots of symbols.
4401 Mon Sep 1 22:30:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4403 * numbers.c (logand, logior, logxor): Handle 0 or 1 arguments.
4405 Sat Aug 30 18:56:19 1997 Gary Houston <ghouston@actrix.gen.nz>
4407 * unif.c (scm_shap2ra): tighten the checking of the array dimension
4408 specifier, since (2) or (2 . 3) would cause SEGV.
4409 (scm_transpose_array): more argument checking fixes.
4411 Thu Aug 28 23:48:53 1997 Jim Blandy <jimb@totoro.red-bean.com>
4413 * Makefile.in: Regenerated.
4415 Wed Aug 27 17:44:44 1997 Jim Blandy <jimb@totoro.red-bean.com>
4417 * Makefile.in: Regenerated, so it uses "tar", not "gtar".
4419 Mon Aug 25 13:47:25 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4421 * error.c, error.h (scm_error_callback): Removed (see NEWS).
4423 Sun Aug 24 01:25:35 1997 Mikael Djurfeldt <mdj@kenneth>
4425 * regex-posix.c: If <regex.h> can't be found, try <rxposix.h> or
4426 <rx/rxposix.h>. (This is in order to accomodate for the GNU Rx
4429 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, ramap_1,
4430 ramap_2o, scm_array_index_map_x, raeql_1, scm_array_equal_p),
4431 unif.c (scm_vector_set_length_x, scm_uniform_vector_length,
4432 scm_array_p, scm_array_rank, scm_array_dimensions,
4433 scm_enclose_array, scm_array_in_bounds_p, scm_uniform_vector_ref,
4434 scm_cvref, scm_array_set_x, scm_array_contents, scm_array_to_list,
4435 scm_array_prototype): Added case scm_tc7_wvect.
4437 Sat Aug 23 18:45:44 1997 Gary Houston <ghouston@actrix.gen.nz>
4439 * errno.h: prototype for scm_strerror.
4440 * error.c (scm_strerror): new procedure.
4442 Mon Aug 18 14:58:22 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4444 * list.c (scm_list_append_x): Allow non-pair as last argument.
4445 This is consistent with the R4RS append and is probably the
4446 correct behaviour as specified by R2RS. (Thanks to Radey Shouman)
4448 Sat Aug 16 18:42:15 1997 Gary Houston <ghouston@actrix.gen.nz>
4450 * stime.h: prototype for scm_times.
4451 * stime.c (scm_times): new procedure.
4452 * ioext.c (scm_fseek): if the first argument is a file descriptor
4454 (scm_ftell): if the first argument is a file descriptor call lseek
4456 * filesys.h: prototypes for scm_open_fdes, scm_fsync.
4457 * filesys.c (scm_chmod): if the first argument is a file descriptor,
4459 (scm_chown): if the first argument is a port or file descriptor,
4461 (scm_truncate_file): new procedure.
4462 Add DEFER/ALLOW INTS to a few other procedures.
4463 (scm_fsync): new procedure.
4464 (scm_open_fdes): new procedure.
4465 (scm_open): use scm_open_fdes. If mode isn't specified, 666 will
4467 (scm_fcntl): the first argument can now be a file descriptor. The
4468 third argument is now optional.
4470 * posix.c (scm_execl, scm_execlp): make the filename argument
4471 compulsory, since omitting it causes SEGV.
4472 (scm_sync): return unspecified instead of #f.
4473 (scm_execle): new procedure.
4474 (environ_list_to_c): new procedure.
4475 (scm_environ): use environ_list_to_c. disable interrupts.
4476 (scm_convert_exec_args): take pos and subr arguments and
4477 improve error checking.
4479 1997-08-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4481 * stacks.c (scm_make_stack), coop-threads.c, mit-pthreads.c
4482 (scm_call_with_new_thread): Bugfix: SCM_WNA should go as third
4483 argument to SCM_ASSERT. Furthermore, the name of the function
4484 should be passed as first argument when signalling
4485 SCM_WNA. (Thanks to Thomas Morgan)
4487 * gsubr.c (scm_gsubr_apply): From Radey Shouman
4488 <shouman@zianet.com>: "The switch in scm_gsubr_apply that
4489 dispatches on the number of actual args has a default case
4490 reporting an internal error. This is a vestige from a version
4491 that mallocated a SCM vector to hold the arguments. In the
4492 current version this check is too late: if it ever happens we will
4493 have already overstepped the bounds of the array.
4495 Also, the patch [...] adds a check for too many actual arguments."
4497 mdj: Removed check for "internal programming error".
4499 Wed Aug 13 15:38:44 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4501 * gh_io.c (gh_write): New function.
4503 * gh_eval.c (catch_with_saved_stack): Removed. Replaced by:
4504 throw.c (scm_internal_stack_catch): New sibling to the other catch
4505 functions. Code moved from gh_eval.c.
4506 throw.h: Added header.
4507 gh_eval.c (gh_eval_str_with_stack_saving_handler): Renamed call to
4508 scm_internal_stack_catch.
4510 Tue Jul 29 01:03:08 1997 Gary Houston <ghouston@actrix.gen.nz>
4512 * ioext.h: fix up prototypes.
4513 * ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
4514 Scheme name is now dup->fdes.
4515 (scm_dup_to_fdes): make the second argument optional and
4516 fold in the functionality of scm_primitive_dup.
4517 (scm_primitive_dup): deleted.
4519 Mon Jul 28 05:24:42 1997 Gary Houston <ghouston@actrix.gen.nz>
4521 * fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
4522 * fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
4523 ultrix are defined. Use setvbuf instead of setbuf.
4524 (scm_setvbuf): new procedure.
4525 (scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
4526 (scm_setfileno): moved from ioext.c.
4527 (scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
4528 (top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.
4530 Sun Jul 27 10:54:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
4532 * fluids.c (scm_fluid_p): New function.
4533 * fluids.h (scm_fluid_p): New prototype.
4535 Sat Jul 26 21:33:37 1997 Marius Vollmer <mvo@zagadka.ping.de>
4537 * print.c (scm_iprin1): Enter printed structures into the print
4538 state as nested data while they are printed.
4539 (print_state_fluid, print_state_fluid_num): New variables.
4540 (scm_init_print): Initialize them.
4541 (scm_iprin): If print_state_fluid carries a print_state, use that
4542 instead of creating a new one.
4543 (scm_printer_apply, apply_stub, struct apply_data): New
4544 definitions to help with calling printer functions written in
4546 * print.h (scm_printer_apply): New prototype.
4548 * struct.c (scm_print_struct): Use scm_printer_apply to call the
4549 user defined struct printer.
4551 * dynwind.c (scm_dowinds): Handle fluids on the wind list.
4552 * fluids.h (scm_internal_with_fluids, scm_with_fluids,
4553 scm_swap_fluids, scm_swap_fluids_reverse): New prototypes.
4554 * fluids.c (scm_internal_with_fluids, scm_with_fluids,
4555 scm_swap_fluids, scm_swap_fluids_reverse): New functions.
4557 Fri Jul 25 12:05:46 1997 Marius Vollmer <mvo@zagadka.ping.de>
4559 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fixed use of
4560 SCM_ASSERT: arg comes before pos.
4562 Fri Jul 25 17:00:38 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4564 * eval.c (scm_apply): Handle the case when a tc7_sybr_2 is applied
4565 to a list of length zero correctly.
4567 Wed Jul 23 16:17:46 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
4569 Supply an `fgets' method for port objects to do fast line i/o.
4570 * ioext.c (scm_read_line): New function.
4571 * genio.c (scm_gen_read_line): New function.
4572 * fports.c (scm_fgets): New function.
4573 (scm_fptob, scm_pipob): Add scm_fgets method.
4574 * ports.c (fgets_void_port, scm_generic_fgets): New functions.
4575 (void_port_ptob): Add void fgets method.
4576 (scm_newptob): Initialize fgets method from ptob struct.
4577 * ports.h (scm_ptobfuns): Add fgets method.
4578 * vports.c (scm_sfptob): Supply generic fgets method.
4579 * strports.c (scm_stptob): Supply generic fgets method.
4581 Mon Jul 21 04:03:42 1997 Gary Houston <ghouston@actrix.gen.nz>
4583 * ioext.h: removed scm_duplicate_port prototype.
4585 * ioext.c (scm_primitive_dup2): return the new file descriptor
4586 instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
4588 (scm_fdopen): bug fix: don't try to make port unbuffered until its
4589 stream has been set.
4590 (scm_duplicate_port): deleted, there's now an implementation in
4592 (scm_primitive_dup2): do nothing if newfd == oldfd.
4594 Sun Jul 20 03:55:49 1997 Gary Houston <ghouston@actrix.gen.nz>
4596 * filesys.c (scm_close): oops, don't call SCM_INUM twice on the
4599 * ioext.h: new prototypes.
4600 * ioext.c (scm_primitive_dup, scm_primitive_dup2): new procedures.
4602 * fluids.c (next_fluid_num): don't do
4603 SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.
4605 * ports.h: prototypes too.
4606 * ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.
4608 * fports.h: prototype too.
4609 * fports.c (scm_evict_ports): moved from ioext.c.
4611 Sat Jul 19 04:56:52 1997 Gary Houston <ghouston@actrix.gen.nz>
4613 * ports.c (scm_close_port): return a boolean instead of unspecified.
4614 throw an error if an error other than EBADF occurs.
4616 * filesys.h: scm_close prototype.
4617 * filesys.c (scm_close): new procedure, can close file descriptors
4618 and ports (scsh compatible).
4620 * ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
4623 Fri Jul 18 11:19:53 1997 Marius Vollmer <mvo@zagadka.ping.de>
4625 * fluids.c, fluid.h: New files.
4626 * Makefile.am (libguile_la_SOURCES): Added "fluids.c".
4627 (modinclude_HEADERS): Added "fluids.h"
4629 * init.c: Include "fluids.h". (scm_boot_guile_1): Added call to
4630 scm_init_fluids to initialize the fluid machine.
4631 (scm_start_stack): Initialize the fluids of the first root with
4632 scm_make_initial_fluids.
4634 * root.h: Added "fluids" member to scm_root_state.
4635 * root.c: Include "fluids.h". (scm_mark_root): Mark "fluids".
4636 (scm_make_root): Call scm_copy_fluids to make fluid bindings
4637 unique for the new root when it has a parent.
4639 * smob.h: Include "libguile/print.h" to make scm_print_state
4642 * dynl.c (free_dynl_obj): New function to free the dynamic object
4643 data. (dynl_smob): Use it.
4644 * dynl.c (scm_dynamic_link): Moved allocating of the memory for
4645 the dynamic object data below the linking of the object to avoid
4646 memory leak when the linking code throws an error. Now the code
4647 leaks a whole dynamically linked library when must_malloc throws,
4648 but that should be much less likely.
4650 Fri Jul 11 00:19:47 1997 Jim Blandy <jimb@floss.red-bean.com>
4652 Changes to compile under gnu-win32, from Marcus Daniels:
4653 * stime.c (tzset): If tzset isn't provided, make it a NOP.
4654 (scm_localtime): Change SCM_EOF to SCM_EOL.
4655 (scm_mktime): Likewise.
4656 * socket.c: Don't include sys/un.h unless autoconf tells
4657 us Unix domain sockets are available.
4658 (scm_fill_sockaddr): Ignore Unix domain code.
4659 (scm_addr_vector): Likewise.
4660 (scm_init_addr_buffer): Likewise.
4661 (scm_socketpair): Don't include unless socketpair was
4662 found during autoconf.
4663 * simpos.c (SYSTNAME): Treat cygwin like Unix.
4664 * scmsigs.c (scm_pause): Don't include unless pause was found
4666 * posix.c (scm_getgroups): Don't include unless support function
4667 was found during autoconf (in this case, getgroups).
4668 (scm_setpwent): For setpwent.
4669 (scm_setegid): For setegid.
4670 * net_db.c (scm_inet_netof): Don't include unless support
4671 function was found during autoconf (in this case, inet_netof).
4672 (scm_lnaof): For inet_lnaof.
4673 (scm_inet_makeaddr): For inet_makeaddr.
4674 (scm_getnet): For getnetent, getnetbyname, getnetbyaddr.
4675 (scm_getproto): For getprotoent.
4676 (scm_getserv): For getservent.
4677 (scm_sethost): For sethostent, endhostent.
4678 (scm_setnet): For setnetent, endnetent.
4679 (scm_setproto): For setprotoent, endprotoent.
4680 (scm_setserv): For setservent, endservent.
4681 * scmconfig.h.in: Regenerated.
4683 Thu Jul 10 00:22:24 1997 Jim Blandy <jimb@floss.red-bean.com>
4685 * stime.c (scm_localtime, scm_mktime): Pass SCM_EOL to
4686 scm_misc_error, not SCM_EOF.
4688 * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list of
4689 arguments for formatting the error message, not SCM_BOOL_F. I
4690 think this is left over from the (eq? '() #f) days.
4692 * read.c (recsexpr): Give this a dummy definition if
4693 DEBUG_EXTENSIONS isn't #defined.
4695 Fri Jul 4 23:42:17 1997 Marius Vollmer <mvo@zagadka.ping.de>
4697 * coop-threads.c (scm_wait_condition_variable): Lock mutex again
4700 Thu Jul 3 16:31:24 1997 Marius Vollmer <mvo@zagadka.ping.de>
4702 * root.c (cwdr_outer_body): Bugfix: Pass `c' instead of `&c' to
4705 Sat Jun 28 16:14:09 1997 Tim Pierce <twp@twp.tezcat.com>
4707 * Makefile.am (libguile_la_LIBADD): Remove @ALLOCA@, since
4708 alloca.lo will be included in @LIBLOBJS@. Something better than
4709 this should be possible.
4710 * Makefile.in: Regenerated.
4712 Sat Jun 28 03:40:15 1997 Gary Houston <ghouston@actrix.gen.nz>
4714 * simpos.h: prototype for scm_primitive_exit.
4715 * simpos.c (scm_primitive_exit): new procedure, terminates the
4716 process without unwinding the stack.
4718 Sat Jun 28 03:45:25 1997 Tim Pierce <twp@twp.tezcat.com>
4720 * regex-posix.c (scm_make_regexp): Make `flags' a variable-length
4721 argument and logior its components together, so the user doesn't
4722 have to do this explicitly. Also, if regexp/basic is supplied, then
4723 turn off REG_EXTENDED.
4724 (scm_init_regex_posix): New regexp/basic symbol.
4725 (REG_BASIC): #define this if it is not already present.
4727 Fri Jun 27 20:36:35 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
4729 * Makefile.am (libguile_la_LIBADD): Include @ALLOCA@.
4730 (MOSTLYCLEANFILES): New target, changed from CLEANFILES.
4731 (CLEANFILES): New target, clean versiondat.h, libpath.h.
4732 (DISTCLEANFILES): New target, clean *.x.
4733 * Makefile.in: Regenerated.
4735 Tue Jun 24 00:29:07 1997 Jim Blandy <jimb@floss.red-bean.com>
4737 * script.c (scm_compile_shell_switches): Add 1997 to copyright
4738 years in usage message.
4740 * Makefile.am (libguile_la_LDFLAGS): Bump library version.
4741 * Makefile.in: Regenerated.
4743 * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub
4744 flag; I don't think we support it.
4745 (scm_make_regexp): Make sure the user doesn't pass the
4748 * regex-posix.c (scm_make_regexp, scm_regexp_exec): Add optional
4750 (scm_init_regex_posix): Define constants for the REG_mumble flags;
4751 name them according to the SCSH convention: regexp/mumble.
4753 * regex-posix.h (scm_make_regexp, scm_regexp_exec): Update prototypes.
4755 Mon Jun 23 18:44:49 1997 Jim Blandy <jimb@floss.red-bean.com>
4757 * Makefile.am (libpath.h): Include the values of all the standard
4758 Makefile directory variables. Print a message, but don't print
4760 (versiondat.h): Print a message, but don't print all the commands.
4761 * load.c: #include "alist.h".
4762 (init_build_info): New function.
4763 (scm_init_load): Call it.
4764 * Makefile.in: Regenerated.
4766 Sun Jun 22 19:12:58 1997 Jim Blandy <jimb@floss.red-bean.com>
4768 * root.c: Establish a reliable catch-all handler for the new root.
4769 After all the Scheme handler function might signal an error too,
4770 and we don't want to lose that.
4771 (cwdr_inner_body): Renamed from cwdr_body.
4772 (cwdr_outer_body): New function, to establish the user's handler,
4773 and pass control to cwdr_inner_body.
4774 (cwdr): Establish the reliable catch-all handler here, and pass
4775 control to cwdr_outer_body.
4776 (struct cwdr_body_data): New field, handler, to allow cwdr to pass
4777 the user's handler through to cwdr_outer_body.
4778 * throw.c (scm_handle_by_message): Move guts into....
4779 (handler_message): New static function.
4780 (scm_handle_by_message_noexit): New function.
4781 * throw.h (scm_handle_by_message_noexit): New prototype.
4783 * __scm.h: (SCM_FENCE): New macro: optimizer will not move code
4784 across this. Only works on GCC. Otherwise, we hope for the best.
4785 (SCM_DEFER_INTS, SCM_ALLOW_INTS): Use FENCE appropriately. I have
4786 the feeling that real thread systems will not need this...
4788 Sun Jun 22 15:46:35 1997 Jim Blandy <jimb@floss.red-bean.com>
4790 Try to detect when people are using one version of libguile and a
4791 different version of ice-9. People have been skewing things and
4792 sending in bug reports.
4793 * Makefile.am (versiondat.h): New file to generate.
4794 * version.c: #include "versiondat.h", to get version info.
4795 (scm_libguile_config_stamp): New function.
4796 * script.c: #include "version.h".
4797 (scm_compile_switches): Call scm_version to get version number.
4798 * scmconfig.h.in, Makefile.in: Regenerated.
4799 * Makefile.in: Regenerated.
4801 * Makefile.am (ETAGS_ARGS): Catch SCM_PROC, etc. so we can find
4802 primitive definitions under their Scheme names.
4804 * Makefile.am (libguile_la_LDFLAGS): Update library version to
4805 1:2. Helps avoid confusion between installed and uninstalled libs.
4807 * scmconfig.h.in: Regenerated. (Needed after June 3 change to
4810 * gdb_interface.h (GDB_INTERFACE): Remove semicolon and trailing
4811 backslash from definition; this should be used like: GDB_INTERFACE;
4813 Sun Jun 22 04:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
4815 * ioext.c (scm_duplicate_port): bug fix: don't try to make the
4816 new port unbuffered until its stream has been set.
4818 Sat Jun 21 18:44:03 1997 Gary Houston <ghouston@actrix.gen.nz>
4820 * ports.h: new prototype.
4821 * ports.c (scm_flush_all_ports): new procedure, scsh compatible.
4823 Sat Jun 21 00:25:03 1997 Jim Blandy <jimb@floss.red-bean.com>
4825 Make things compile neatly under Sun's C compiler.
4826 * dynl.c (scm_dynamic_func): Cast return value from sysdep_dynl_func.
4827 * extchrs.c (xmbtowc): Make the second arg a normal char, not
4828 unsigned, because that's what the ANSI function takes.
4829 * extchrs.h (xmbtowc): Corresponding change to prototype.
4830 * genio.c (scm_gen_getc): Make buf plain chars. Nobody wants
4832 * mbstrings.c (scm_mb_ilength): Use ANSI arg syntax. Make DATA
4833 argument plain char *.
4834 * strings.c (scm_string): Use SCM_ROCHARS, since c is a plain
4836 * tag.c (scm_tag): Remove unreachable statement.
4837 * unif.c (scm_array_to_list): If we want to shift a 1 bit to the
4838 top of the word, it should be unsigned.
4840 * eval.c (scm_lookupcar1): Don't declare var2 unless USE_THREADS
4841 is defined, to avoid warnings; it's only used in the
4842 conflict-checking code. Which might go away anyway.
4843 (SCM_CEVAL): All goto's targeting the `dispatch' label are in
4844 conditionals; put the label definition in an #if too, to stifle
4847 * Makefile.am (EXTRA_DIST): Include ChangeLog-gh and
4848 ChangeLog-threads in the distribution.
4849 * Makefile.in: Regenerated.
4851 Fri Jun 20 10:03:41 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
4853 * guile-snarf.in: Changed regexp to support CPPs that insert
4854 whitespace between lexical tokens (which munges the `%%%' snarf
4857 Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
4859 * load.c (scm_init_load_path): Append $(datadir)/guile to
4860 %load-path, so modules do not have to be installed in Guile's
4861 current version directory.
4863 Mon Jun 16 17:20:55 1997 Marius Vollmer <mvo@zagadka.ping.de>
4865 * dynl.c (scm_dynamic_call, scm_dynamic_args_call): Wrap dynamic
4866 function call in SCM_DEFER_INTS/SCM_ALLOW_INTS.
4867 (scm_dynamic_link, scm_dynamic_unlink, scm_dynamic_func): Always
4868 call the sysdep functions with deferred ints.
4869 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c (sysdep_dynl_link,
4870 sysdep_dynl_unlink, sysdep_dynl_func): Expect to be called with
4871 deferred interrupts and insert SCM_ALLOW_INTS before throwing an
4874 * dynl.c (scm_dynamic_unlink, scm_dynamic_call): Return
4877 Sat Jun 14 19:00:58 1997 Gary Houston <ghouston@actrix.gen.nz>
4879 * scmsigs.c (sys_deliver_signals): add a comment about a probable bug.
4881 Wed Jun 11 00:33:00 1997 Jim Blandy <jimb@floss.red-bean.com>
4883 * Makefile.in: Regenerated after xtra_PLUGIN_guile_libs change in
4886 Sun Jun 8 14:37:26 1997 Marius Vollmer <mvo@zagadka.ping.de>
4888 * eval.c (scm_lookupcar1): New procedure to cope with a race
4889 condition during lookup (when using threads).
4890 (scm_lookupcar): Implement in terms of scm_lookupcar1.
4891 (SCM_CEVAL): Use scm_lookupcar1 instead of scm_lookupcar in one
4894 Fri Jun 6 19:05:07 1997 Jim Blandy <jimb@totoro.cyclic.com>
4896 * regex-posix.c (scm_regexp_exec): Use the `start' argument if
4897 supplied. (Change from Tim Pierce.)
4899 Thu Jun 5 16:38:19 1997 Marius Vollmer <mvo@zagadka.ping.de>
4901 * struct.c (init_struct): Forget to mention this in the "Wed Jun 4
4902 23:47:01 1997" changelog: Slots are now initialized with `#f' by
4903 default and not `()'. `#f' is the canonical non-value in Scheme,
4906 Wed Jun 4 23:47:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
4908 * struct.c (struct_printer): New variable that holds a handle on
4909 the Scheme variable *struct-printer*. This variable can be set by
4910 Scheme code to override the printing of structures.
4911 (scm_print_struct): If struct_printer is set, call it. If it is
4912 not set, or returns #f, print the structure in the old fashion.
4913 Include "eval.h" for scm_apply.
4915 Tue Jun 3 23:01:39 1997 Marius Vollmer <mvo@zagadka.ping.de>
4917 * struct.c (scm_struct_ref, scm_struct_set_x): Use
4918 scm_struct_i_n_words to get the number of fields, not
4919 -scm_struct_n_extra_words.
4921 On the route to fancier struct printing:
4922 * struct.c (scm_print_struct): New function to print a structure.
4923 Include "genio.h" to support it. This function doesn't do
4924 anything interesting right now, but I think it should be here
4926 * struct.h: Include "print.h" and add prototype for
4928 * print.c (scm_iprin1): Call scm_print_struct instead of trying to
4929 print structures ourself.
4931 Sun Jun 1 07:58:41 1997 Gary Houston <ghouston@actrix.gen.nz>
4933 * scmsigs.c (sys_deliver_signals): bug fix: reset got_signal[i]
4934 before applying the handler in case it doesn't return.
4936 Sat May 31 18:57:51 1997 Gary Houston <ghouston@actrix.gen.nz>
4938 * scmsigs.h, async.h: updated.
4940 * _scm.h: if HAVE_RESTARTS is defined then don't use a SYSCALL
4943 * posix.c (scm_uname): interpret only negative values as an error.
4944 Solaris normally returns a positive value.
4946 * script.c (scm_compile_shell_switches): if we are not going into
4947 an interactive repl, set scm_mask_ints to zero so that asyncs can
4950 * simpos.c (scm_system): don't ignore/unignore signals around
4953 * posix.c (scm_open_pipe): don't ignore/unignore signals around
4956 * init.c (scm_boot_guile_1): don't call scm_init_signals, it's
4957 done in boot-9.scm instead.
4959 * scmsigs.c, async.c: Major rewriting of signal handling code.
4960 (scm_sigaction): new procedure.
4961 (scm_sleep): don't wrap sleep in SCM_SYSCALL, it would mess up the
4963 (scm_raise): return unspecified, throw error on failure.
4965 Thu May 29 02:47:36 1997 Jim Blandy <jimb@floss.cyclic.com>
4967 * regex-posix.c (scm_init_regex_posix): Register the "regex"
4968 feature, to help boot-9.scm decide whether to import the regex
4971 Thu May 29 02:19:40 1997 Jim Blandy <jimb@floss.cyclic.com>
4973 * eval.c: Include scmconfig.h at the beginning of the file so that
4974 HAVE_ALLOCA_H may properly be defined. Thanks to Bill Janssen for
4977 * regex-posix.c: #include "_scm.h" before conditionally #including
4978 <regex.h>; the former defines HAVE_REGCOMP.
4980 * regex-posix.c: #include <regex.h> conditionally, so the file is
4981 CPP'able (for dependency scanning) even on systems that don't have
4984 Tue May 27 23:48:38 1997 Jim Blandy <jimb@floss.cyclic.com>
4986 Add new R4RS-compliant syntax for keywords.
4987 * read.c (scm_lreadr): Recognize `#:' as a prefix for keywords,
4988 regardless of the setting of the `keywords' read option.
4989 * kw.c (prin_kw): Print keywords using the `#:' syntax, so they
4990 can be re-read no matter what the setting of the `keywords' read
4993 Tue May 27 22:47:31 1997 Tim Pierce <twp@twp.tezcat.com>
4995 Add support for POSIX regular expressions.
4997 * regex-posix.c, regex-posix.h: New files. (Some code
4998 is taken liberally from rx/rgx.c in the old Guile dist.)
5000 * init.c: Include regex-posix.h.
5001 (scm_boot_guile_1): Call scm_init_regex_posix.
5003 * Makefile.am (EXTRA_libguile_la_SOURCES, modinclude_HEADERS):
5004 Add regex-posix.[ch] sources.
5005 * Makefile.in: Regenerated.
5007 * scmconfig.h.in: Add HAVE_REGCOMP macro. (automake is supposed
5008 to do this automatically? It didn't for me, bleh.)
5010 Mon May 26 18:51:29 1997 Jim Blandy <jimb@floss.cyclic.com>
5012 * fports.c (print_pipe_port): New function.
5013 (scm_fptob): Use print_pipe_port instead of scm_prinport; the
5014 latter doesn't even take the right arguments.
5016 * Makefile.am: Increment shared lib revision number. I think
5017 sometimes the uninstalled Guile finds the installed shared lib;
5018 Gord says doing this might help. As things turned out, I can't
5019 say whether it does.
5020 * Makefile.in: Regenerated.
5022 * gh_init.c (gh_enter): Cast c_main_prog to a void * before
5023 passing it as the closure argument to scm_boot_guile. (Bill
5026 * ports.c (print_void_port, putc_void_port, puts_void_port,
5027 write_void_port, flush_void_port, getc_void_port, close_void_port,
5028 noop0): Use ANSI prototypes instead of K&R declarations, so the
5029 initialization of void_port_ptob gets aggressively type-checked.
5030 Fix arguments of print_void_port and write_void_port. (Bill
5033 * COPYING, __scm.h, _scm.h, alist.c, alist.h, append.c, append.h,
5034 appinit.c, arbiters.c, arbiters.h, async.c, async.h, backtrace.c,
5035 backtrace.h, boolean.c, boolean.h, chars.c, chars.h,
5036 continuations.c, continuations.h, coop-defs.h, coop-threads.c,
5037 coop-threads.c.cygnus, coop-threads.h, coop-threads.h.cygnus,
5038 coop.c, debug.c, debug.h, dynl-dl.c, dynl-dld.c, dynl-shl.c,
5039 dynl-vms.c, dynl.c, dynl.h, dynwind.c, dynwind.h, eq.c, eq.h,
5040 error.c, error.h, eval.c, eval.h, extchrs.h, feature.c, feature.h,
5041 filesys.c, filesys.h, fports.c, fports.h, fsu-pthreads.h, gc.c,
5042 gc.h, gdbint.c, gdbint.h, genio.c, genio.h, gh.h, gh_data.c,
5043 gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c, gh_list.c,
5044 gh_predicates.c, gh_test_c.c, gh_test_repl.c, gscm.c, gscm.h,
5045 gsubr.c, gsubr.h, guile.c, hash.c, hash.h, hashtab.c, hashtab.h,
5046 init.c, init.h, ioext.c, ioext.h, kw.c, kw.h, libguile.h, list.c,
5047 list.h, load.c, load.h, mallocs.c, mallocs.h, markers.c,
5048 markers.h, mbstrings.c, mbstrings.h, mit-pthreads.c,
5049 mit-pthreads.h, net_db.c, net_db.h, numbers.c, numbers.h,
5050 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
5051 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
5052 procprop.h, procs.c, procs.h, putenv.c, ramap.c, ramap.h, read.c,
5053 read.h, root.c, root.h, scmhob.h, scmsigs.c, scmsigs.h, script.c,
5054 script.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c,
5055 smob.h, snarf.h, socket.c, socket.h, srcprop.c, srcprop.h,
5056 stackchk.c, stackchk.h, stacks.c, stacks.h, stime.c, stime.h,
5057 strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h,
5058 strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h,
5059 tag.c, tag.h, tags.h, threads.c, threads.h, throw.c, throw.h,
5060 unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h,
5061 version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: New
5064 Mon May 26 12:37:30 1997 Jim Blandy <jimb@floss.cyclic.com>
5066 * script.c (scm_find_executable): Use prototype-style definition
5067 here; apparently it's not quite right to have const in a prototype
5068 and then use a K&R declaration. I wonder if stuff like this will
5069 go away if we compile with -Wrequire-prototypes, or whatever that
5070 is... (Bernard URBAN)
5072 * scmhob.h: New text from Bernard URBAN.
5074 Sat May 17 17:14:36 1997 Jim Blandy <jimb@floss.cyclic.com>
5076 * script.c: Don't #define const on hpux. Configure takes care of
5077 this. (Thanks to Larry Schwimmer.)
5079 * script.c: Use the HAVE_UNISTD_H symbol provided by autoconf to
5080 decide whether to #include <unistd.h>, instead of listing a bunch
5081 of systems. Don't #include stdio twice. Removed dyked-out
5082 definition of scm_find_impl_file.
5084 Fri May 16 03:06:08 1997 Jim Blandy <jimb@floss.cyclic.com>
5086 * Makefile.am (libguile_la_LDFLAGS): Update libguile's shared
5087 library version info to 1:0.
5088 * Makefile.in: Regenerated.
5090 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
5091 gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
5092 gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
5093 init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
5094 script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
5095 throw.c: Update copyright years; these files have been worked on
5096 significantly in 1997, but only had copyright years for 1996.
5097 Also, change name of copyright holder on some from Mikael
5098 Djurfeldt to Free Software Foundation; he has signed papers
5099 assigning the changes to the FSF.
5101 * script.c (scm_shell_usage): Pass FATAL to exit. There's no
5102 reason not to give the user the option.
5104 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
5105 Return #f on end-of-file when scanning table (i.e. when called
5106 with no arguments). Try to catch errors, when we can.
5107 * posix.c (scm_getgrgid, scm_getpwuid): Same.
5109 * script.h (scm_shell_usage, scm_compile_shell_switches): New
5110 external declarations. These are useful.
5112 Thu May 15 05:21:36 1997 Gary Houston <ghouston@actrix.gen.nz>
5114 * posix.c: don't include <sys/select.h> or define macros for
5115 select, since they were not used in this file.
5117 * filesys.c (scm_select): make the fifth parameter microseconds,
5118 not milliseconds. let the fourth parameter be either a real value
5119 or an integer or #f. The first, second and third arguments can
5120 now be vectors: the type of the corresponding return set will be
5122 (set_element, get_element): new static procedures.
5124 Wed May 14 12:18:12 1997 Jim Blandy <jimb@floss.cyclic.com>
5126 * strports.c (scm_eval_string): New function.
5127 (scm_eval_0str): Trivially re-implemented in terms of
5129 * strports.h (scm_eval_string): New extern decl.
5131 * net_db.c (h_errno): Add extern decl for this.
5133 * fports.c (local_pclose): New function.
5134 (scm_pipob): Use it in the initializer here.
5137 * net_db.c (scm_gethost, scm_getproto, scm_getnet, scm_getserv):
5138 Use a meaningful error message when signalling an error. For
5139 this, scm_gethost must check h_errno rather than errno.
5141 Tue May 13 16:40:06 1997 Jim Blandy <jimb@floss.cyclic.com>
5143 * Makefile.in: Regenerated, using automake-1.1p.
5145 Tue May 13 04:34:52 1997 Gary Houston <ghouston@actrix.gen.nz>
5147 * socket.c (scm_addr_vector): use SCM_UNDEFINED in scm_listify,
5148 not SCM_UNSPECIFIED.
5150 * script.c (scm_compile_shell_switches): don't append (quit) if
5152 (scm_shell): call scm_exit_status and exit on the result of the
5155 Mon May 12 17:23:58 1997 Jim Blandy <jimb@floss.cyclic.com>
5157 Ensure that shared substrings are handled properly when passed to
5158 a system call or other foreign function. Many thanks to Tim
5160 * symbols.h (SCM_COERCE_SUBSTR): new macro.
5161 * filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir,
5162 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
5163 scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime,
5164 scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone,
5165 scm_strftime), vports.c (scm_make_soft_port), backtrace.c
5166 (scm_display_error_message): use RO macros when strings may be RO.
5167 * error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod,
5168 scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir,
5169 scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c
5170 (scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c
5171 (scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c
5172 (scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime,
5173 scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime,
5174 scm_strftime), vports.c (scm_make_soft_port): use
5175 SCM_COERCE_SUBSTR to make sure shared substrings are
5178 Mon May 12 15:33:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
5180 * error.c (scm_error): Add newline to error message.
5182 * init.c (scm_init_standard_ports): Doc fix.
5184 Thu May 8 14:38:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
5186 * dynl-shl.c: Completely replaced with new code from Bernard
5189 * script.c (scm_ice_9_already_loaded): New variable.
5190 (scm_compile_shell_switches): Use it.
5192 Mon May 5 20:35:08 1997 Gary Houston <ghouston@actrix.gen.nz>
5194 * filesys.c (scm_input_waiting_p): add missing third argument to
5197 * stime.c (scm_localtime): copy the result of localtime before
5198 calling gmtime in case they share a buffer.
5199 (scm_localtime, scm_mktime): throw an error if neither HAVE_TM_ZONE
5202 Fri May 2 19:07:11 1997 Gary Houston <ghouston@actrix.gen.nz>
5204 * eq.c (scm_equal_p): use SCM_TYP7SD (y) not SCM_TYP7SD (x).
5206 Thu May 1 17:01:45 1997 Jim Blandy <jimb@floss.cyclic.com>
5208 * Makefile.am (check-local): New target, which causes 'make check'
5209 to run gh_test_c and gh_test_repl, with some trivial input.
5210 * Makefile.in: Rgnrtd.
5212 Tue Apr 29 19:00:40 1997 Marius Vollmer <mvo@zagadka.ping.de>
5214 * dynl.c (print_dynl_obj): Indicate whether the dynamic object has
5217 Mon Apr 28 06:10:14 1997 Gary Houston <ghouston@actrix.gen.nz>
5219 * async.c (scm_sys_tick_async_thunk): commented out. I'm not
5220 sure how this was supposed to work.
5221 (scm_async_click): don't send SCM_TICK_SIGNAL.
5222 (scm_init_async): don't initialize %tick-thunk.
5224 * the following change doesn't affect the Scheme interface:
5225 gc-thunk is called at the end of garbage collection. however it's
5226 no longer implemented by pretending it's a signal.
5228 * gc.c (scm_gc_end): don't call scm_take_signal. instead mark the
5229 system async corresponding to scm_gc_thunk.
5230 * async.h: declare scm_gc_async.
5231 * async.c (scm_sys_gc_async_thunk): apply the thunk named by
5232 gc-thunk directly, instead of going through a signal handler.
5233 (scm_gc_async): new variable, points to the GC system-async.
5234 (scm_init_async): save the GC async as scm_gc_async instead
5235 of using system_signal_asyncs.
5236 (scm_gc_vcell): new variable, stores the gc-thunk vcell.
5238 Mon Apr 28 19:14:44 1997 Jim Blandy <jimb@floss.cyclic.com>
5240 * Makefile.am (libpath.h, cpp_err_symbols.c, cpp_sig_symbols.c):
5241 Don't screw up if we're interrupted.
5242 * Makefile.in: Regeneradet.
5244 Sun Apr 27 17:57:15 1997 Jim Blandy <jimb@floss.cyclic.com>
5246 * aclocal.m4: Removed; unnecessary, given changes of Apr 24.
5248 * Makefile.am (modincludedir): Use "ice-9" instead of "@module@";
5249 we're not using AM_INIT_GUILE_MODULE any more.
5250 * Makefile.in: Reneregated.
5252 Thu Apr 24 00:41:08 1997 Jim Blandy <jimb@floss.cyclic.com>
5254 Functions for finding variable bindings, grace à Tim Pierce.
5255 * gh_data.c (gh_lookup, gh_module_lookup): New functions.
5256 * gh.h (gh_lookup, gh_module_lookup): New prototypes.
5258 Get 'make dist' to work again.
5259 * Makefile.am (EXTRA_DIST): Remove PLUGIN files.
5260 * Makefile.in: Regenerated, like a surry without a fringe on top.
5262 Changes for reduced Guile distribution: one configure script,
5264 * configure.in, configure: Removed.
5265 * acconfig.h, acinclude.m4: Moved to parent directory, where the
5266 real configure script lives.
5267 * Makefile.in, scmconfig.h.in: Regenerated.
5269 * init.c: #include "script.h", to get prototype for script.c's
5272 Wed Apr 23 21:25:39 1997 Jim Blandy <jimb@floss.cyclic.com>
5274 * gh_data.c (gh_scm2newstr, gh_symbol2newstr): Use
5275 scm_must_malloc, not raw malloc.
5277 * script.c (scm_compile_shell_switches): Dyke out debugging output
5280 Mon Apr 21 05:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5282 * eq.c (scm_equal_p): use "SCM_TYP7SD", not "SCM (TYP7SD".
5284 * stime.c: include both <sys/times.h> and <sys/timeb.h> if the
5285 system has them. Hope this is safe. Previously
5286 sys/timeb.h was included if HAVE_FTIME was defined or if
5287 HAVE_SYS_TIMEB_H was defined but HAVE_SYS_TIMES_H was not,
5288 but IRIX iris 5.3 apparently has ftime but not sys/timeb.h.
5290 * ioext.c (scm_setfileno): add missing third argument to
5291 scm_misc_error call.
5293 Sun Apr 20 15:09:31 1997 Jim Blandy <jimb@totoro.cyclic.com>
5295 * eq.c (scm_equal_p): Correctly compare strings of different
5296 varieties. (Thanks to Tim Pierce.)
5298 Sat Apr 19 03:59:02 1997 Jim Blandy <jimb@floss.cyclic.com>
5300 * read.c (skip_scsh_block_comment): SCSH says the !# that ends a
5301 #! block comment must occur on a line all by itself.
5303 Move most of the guts of shell command processing into libguile,
5304 so guile.c can be very small (and eventuallly auto-generated. (I
5305 mean, generated mechanically, not self-generated. Hmm.))
5306 * guile.c, script.c, script.h: New source files.
5307 * init.c (scm_boot_guile_1): Call scm_init_script.
5308 * libguile.h: #include "script.h".
5309 * Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
5310 targets, for new executable.
5311 (libguile_la_SOURCES): Mention script.c.
5312 (modinclude_HEADERS): Add script.h.
5313 * configure.in: Always check for -lm, -lsocket, -lnsl, whether or
5314 not dynamic linking is enabled. This is because we're generating
5315 executables now. Move CY_AC_WITH_THREADS call after those, so the
5316 values of cy_cv_threads_libs captures the libs chosen above.
5317 * Makefile.in, configure, aclocal.m4: Regenerated.
5319 * Makefile.am (EXTRA_DIST): Don't distribute gscm.c or gscm.h.
5320 We don't maintain this interface any more, and it just confuses
5323 * alloca.c: #include <scmconfig.h>, not <config.h>.
5324 * Makefile.am (EXTRA_libguile_la_SOURCES): Mention alloca.c, so
5325 it'll get included in disties.
5327 Thu Apr 17 17:45:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
5329 * gscm.c, gscm.h: These aren't supported any more, and shouldn't
5330 be distributed, because they confuse people.
5331 * Makefile.am (EXTRA_DIST): Remove gscm.c, gscm.h.
5333 Sat Apr 19 11:56:18 1997 Tim Pierce <twp@twp.tezcat.com>
5335 * configure.in: check for presence of gethostent (not present on
5336 OpenBSD by default).
5337 * net_db.c (scm_gethost): Check HAVE_GETHOSTENT.
5338 * configure, scmconfig.h.in: Regenerated.
5340 Wed Apr 16 17:52:38 1997 Jim Blandy <jimb@floss.cyclic.com>
5342 * backtrace.c (scm_backtrace): Split message string across
5343 newlines properly. GCC is more tolerant of this than other
5346 Mon Apr 14 20:20:14 1997 Jim Blandy <jimb@floss.cyclic.com>
5348 Merge threads directory into libguile.
5349 * coop-defs.h, coop-threads.c, coop-threads.h, coop.c, threads.c,
5350 threads.h: New source files.
5351 * Makefile.am (EXTRA_libguile_la_SOURCES): Add threads.c.
5352 (noinst_HEADERS): Add coop-threads.c, coop-threads.h, coop.c
5354 (modinclude_HEADERS): Add threads.h, coop-defs.h.
5355 (EXTRA_DIST): Add fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
5356 coop-threads.c.cygnus, coop-threads.h.cygnus.
5357 * configure.in: If we're using threads, include threads.o in
5359 * _scm.h, libguile.h: threads.h lives in this directory now.
5360 * fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
5361 coop-threads.c.cygnus, coop-threads.h.cygnus: New files, not
5362 currently used, but brought along for information's sake.
5363 * ChangeLog-threads: log from old 'threads' directory.
5364 * Makefile.in, configure: Rebuilt.
5366 Mon Apr 14 20:15:29 1997 Jim Blandy <jimb@totoro.cyclic.com>
5368 * stime.c (scm_mktime): #ifndef HAVE_TM_ZONE, Use lt.tm_zone, not
5371 Mon Apr 14 01:32:57 1997 Jim Blandy <jimb@floss.cyclic.com>
5373 * gh_init.c (gh_standard_handler): Return SCM_BOOL_F, not garbage.
5375 Merge GH interface library into libguile.
5376 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
5377 gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c: New files.
5378 * Makefile.am (libguile_la_SOURCES): Add gh_data.c, gh_eval.c,
5379 gh_funcs.c, gh_init.c, gh_io.c, gh_list.c, gh_predicates.c. Move
5381 (EXTRA_libguile_la_SOURCES): ... here.
5382 (pkginclude_HEADERS): Add variable, to get gh.h installed.
5383 (THREAD_LIBS, check_ldadd, check_PROGRAMS, gh_test_c_SOURCES,
5384 gh_test_c_LDADD, gh_test_repl_SOURCES, gh_test_repl_LDADD):
5385 New variables, describing how to build the gh test programs.
5386 * configure.in: Check for -lm, -lsocket, -lnsl; we need this to
5387 build the test programs, and we probably should have been linking
5388 libguile.la against them all along, to support AIX shared libs.
5389 Add cflags for threads to CFLAGS; add libs for threads to new
5390 variable THREAD_LIBS, used in Makefile.am.
5391 * ChangeLog-gh: log from old `gh' subdirectory.
5392 * Makefile.in, configure, scmconfig.h.in: Rebuilt.
5394 Sun Apr 13 23:03:55 1997 Jim Blandy <jimb@floss.cyclic.com>
5396 * acconfig.h: Undo change of Apr 9; including the definition of
5397 PACKAGE in the guile headers conflicts with applications' own
5399 * scmconfig.h.in: Regenerated.
5401 Fri Apr 11 14:12:13 1997 Jim Blandy <jimb@floss.cyclic.com>
5403 * filesys.c (scm_fcntl): New function from Roland McGrath.
5404 (scm_init_filesys): New symbols for use with fcntl.
5405 * filesys.h: Added prototype.
5407 * eval.c (SCM_APPLY): Set debug apply frame argument list correctly
5408 when PROC is receiving no arguments.
5410 Fri Apr 11 19:39:32 1997 Jim Blandy <jimb@totoro.cyclic.com>
5412 * filesys.c (S_ISSOCK): Define this if it's missing, but we do
5413 have S_IFSOCK. This is the case under Ultrix.
5415 * posix.c (scm_status_exit_val, scm_status_exit_val,
5416 scm_status_term_sig, scm_status_stop_sig): Modified to work with
5417 Ultrix versions of WIFSTOPPED, etc., which assume that their
5418 arguments are lvalues (hmm).
5420 Thu Apr 10 15:10:07 1997 Jim Blandy <jimb@floss.cyclic.com>
5422 * eval.c: Doc fixes.
5424 * throw.c: Doc fixes; rearranged.
5426 * putenv.c: #include "libguile/scmconfig.h", not <config.h>.
5428 Wed Apr 9 18:01:20 1997 Jim Blandy <jimb@floss.cyclic.com>
5430 * acconfig.h: Added entry for PACKAGE.
5431 * scmconfig.h.in: Regenerated.
5433 Changes to work with automake-1.1n, which has better libtool support.
5434 * Makefile.am: Use lib_LTLIBRARIES instead of lib_PROGRAMS.
5435 Use libguile_la_LIBADD instead of libguile_la_LDADD. (What's the
5437 (libguile_la_SOURCES, modinclude_HEADERS, EXTRA_DIST): Format for
5439 * Makefile.in: Rebuild.
5441 Wed Apr 9 09:08:54 1997 Gary Houston <ghouston@actrix.gen.nz>
5443 * stime.c (scm_mktime): take an optional zone argument.
5444 (scm_localtime): check putenv return value.
5445 (scm_strftime, scm_strptime): moved from posix.c. move #include
5447 stime.h, posix.h: update prototypes.
5448 (bdtime2c, setzone, restorezone): new static procedures.
5449 (scm_mktime, scm_strftime): use them.
5450 (scm_strftime): don't call mktime before strftime. Use
5451 filltime for return value.
5452 (filltime): convert NULL zname to #f.
5453 (scm_strptime): return a count of characters consumed, not
5454 the remaining string.
5456 Sun Apr 6 05:44:11 1997 Gary Houston <ghouston@actrix.gen.nz>
5458 * stime.c (scm_localtime): check HAVE_TM_ZONE and HAVE_TZNAME.
5459 (scm_mktime): likewise.
5461 Uncomment localtime and mktime.
5463 * configure.in: add AC_STRUCT_TIMEZONE.
5465 Sat Apr 5 23:56:40 1997 Gary Houston <ghouston@actrix.gen.nz>
5467 * stime.c (scm_init_stime): don't define ticks/sec.
5468 (scm_gettimeofday): renamed from scm_time_plus_ticks (avoids multiple
5469 return value problem and is still portable.)
5471 Sat Apr 5 17:59:24 1997 Jim Blandy <jimb@floss.cyclic.com>
5473 * cpp_err_symbols.in: Renamed from cpp_err_symbols, to avoid
5474 make's implicit cpp_err_symbols: cpp_err_symbols.c rule.
5475 * cpp_sig_symbols.in: Renamed from cpp_sig_symbols.
5476 * Makefile.am (check_errnos, check_signals, cpp_sig_symbols.c,
5477 cpp_err_symbols.c): Corresponding changes.
5478 * Makefile.in: Regenerated.
5480 Sat Apr 5 02:39:02 1997 Gary Houston <ghouston@actrix.gen.nz>
5482 * posix.c (scm_putenv): don't check HAVE_PUTENV.
5483 * Makefile.am (EXTRA_libguile_la_SOURCES): add putenv.c.
5484 * configure.in: move putenv from AC_CHECK_FUNCS to AC_REPLACE_FUNCS.
5485 * putenv.c: new file, from sh-utils 1.12.
5487 * posix.c (scm_environ): use malloc in place of scm_must_malloc
5488 since allocation isn't for Scheme objects.
5489 (scm_putenv): copy strings before placing in the environment.
5491 * stime.c (scm_current_time): throw an error if time returns -1,
5492 instead of returning #f.
5493 (scm_get_internal_real_time, scm_get_internal_real_time): use
5494 scm_long2num for return value instead of SCM_MAKINUM.
5496 * stime.h: prototypes updated.
5498 * stime.c (scm_time_in_msec): apparently unused, deleted.
5500 Fri Apr 4 08:53:41 1997 Gary Houston <ghouston@actrix.gen.nz>
5502 * configure.in: check for gettimeofday.
5504 * stime.c (scm_time_plus_ticks): new procedure, an scsh interface
5505 which may be more usefully portable than a gettimeofday interface.
5507 Wed Apr 2 17:11:39 1997 Jim Blandy <jimb@totoro.cyclic.com>
5509 * Makefile.am (EXTRA_DIST): It's cpp_err_symbols, not
5511 * Makefile.in: Regenerated.
5513 Mon Mar 31 03:22:37 1997 Gary Houston <ghouston@actrix.gen.nz>
5515 * stime.c (filltime): recovered static procedure.
5516 (scm_localtime, scm_gmtime, scm_mktime, scm_tzset): recovered from
5519 * posix.h: add prototype for scm_close_pipe, remove prototypes for
5520 scm_open_input_pipe, scm_open_output_pipe, change scm_mknod prototype.
5522 * posix.c (scm_mknod): split the mode argument into type and perms
5523 arguments, like the extra fields returned by stat.
5525 * fports.c (scm_pipob): set the close, free and print procedures.
5526 (scm_close_pipe): new procedure.
5528 * posix.c (scm_open_input_pipe, scm_open_output_pipe): deleted,
5529 define them in boot-9.scm
5531 Wed Mar 26 04:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5533 * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD
5534 wan't defined. Don't include fd.h.
5536 * Previously fd.h was regenerated whenever configure was run,
5537 forcing a couple of files to be recompiled.
5539 * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c.
5540 * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER.
5541 Check for _fileno as well as _file.
5543 * ioext.c: don't fd.h.
5544 * acconfig.h: remove duplicate HAVE_FD_SETTER and change the
5547 * Change the stratigy for getting information about errno
5548 (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of
5549 generating lists of symbols during the build process, which will
5550 not always work, include comprehensive lists in the distribution.
5551 To help keep the lists up to date, the "check_signals" and
5552 "check_errnos" make targets can be used.
5554 * configure.in: don't check for a command to extract errno codes.
5555 * Makefile.am: update file lists, remove errnos.list and errnos.c
5556 targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals,
5557 check_errnos targets.
5558 (CLEANFILES): remove errnos.c and errnos.list, add
5559 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new
5560 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
5561 * errnos.default: deleted.
5562 * cpp_signal.c: new file.
5563 * cpp_errno.c: renamed from errnos_get.c.
5564 * cpp_err_symbols, cpp_sig_symbols: new files.
5565 * cpp_cnvt.awk: renamed from errnos_cnvt_awk.
5566 * error.c (scm_init_error): #include cpp_err_symbols instead of
5568 * posix.c (scm_init_posix): don't intern signal symbols. #include
5571 Tue Mar 25 04:51:10 1997 Gary Houston <ghouston@actrix.gen.nz>
5573 * strop.c (scm_i_index): allow the lower bound to be equal to the
5574 length of the string, so a null string doesn't always give an error.
5576 * posix.h: new prototypes.
5577 * posix.c (scm_status_exit_val, scm_status_term_sig,
5578 scm_status_stop_sig): new functions, as in scsh. They break down
5579 process status values as returned by waitpid.
5581 Sat Mar 22 18:16:29 1997 Gary Houston <ghouston@actrix.gen.nz>
5583 * net_db.c (scm_gethost): don't check HAVE_GETHOSTENT, since
5584 configure doesn't know about it.
5586 Fri Mar 21 23:49:28 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5588 * snarf.h, backtrace.c: Name change SCM_GLOBAL --> SCM_VCELL.
5590 * snarf.h: Added new macros SCM_GLOBAL_SYMBOL and SCM_GLOBAL_VCELL
5591 which defines C variables with global linkage.
5593 Mon Mar 17 05:57:11 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5595 * snarf.h (SCM_PROC1): Bugfix: Use (void) rather than (...) for
5598 Sun Mar 16 11:43:49 1997 Mikael Djurfeldt <mdj@floss.cyclic.com>
5600 * eval.c (safe_setjmp): Temporarily use old setjmp until someone
5601 has time to check why this doesn't work well with continuations.
5603 Sun Mar 16 05:09:55 1997 Jim Blandy <jimb@totoro.cyclic.com>
5605 * Fix shell syntax error; some shells won't tolerate
5606 multiple "fi" statements on a single line. (Thanks to Fred Fish.)
5608 Sat Mar 15 01:11:40 1997 Gary Houston <ghouston@actrix.gen.nz>
5610 * posix.c (scm_uname): throw an error if uname fails instead
5613 * error.h (scm_errno, scm_perror): obsolete prototypes removed.
5615 * error.c (err_head, scm_errno, scm_perror): obsolete procedures
5618 * async.c (scm_ints_disabled): definition moved from error.c.
5620 Sat Mar 15 00:06:08 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5622 * acconfig.h: Removed PACKAGE.
5624 * scmconfig.h.in: Regenerated.
5626 * snarf.h: g++ says it's non-portable not to specify the first
5627 argument in a varargs declaration. I introduced the first
5628 argument by using preprocessor conditionals.
5630 Thu Mar 13 21:28:25 1997 Gary Houston <ghouston@actrix.gen.nz>
5632 * ioext.c (scm_read_delimited_x): use RO string macros for delims.
5633 (scm_freopen): use RO string macros for filename and modes.
5634 (scm_duplicate_port, scm_fdopen): use RO string macros for modes.
5636 * posix.c (scm_getgrgid): simplify conversion of name to C string.
5637 (scm_mknod): use RO string macros for path.
5639 * socket.c (scm_fill_sockaddr, scm_send, scm_sendto):
5640 use SCM_ROSTRINGP, SCM_ROCHARS, SCM_ROLENGTH.
5642 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
5643 use SCM_ROSTRINGP and SCM_ROCHARS.
5645 Thu Mar 13 18:31:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5647 * unif.c (scm_array_set_x): Cast ICHR (obj) to char if storing in
5650 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
5651 scm_array_index_map_x, raeql_1, scm_array_equal_p): Completed
5652 support for byte vectors.
5654 * print.c (scm_iprin1): Limit number of vector elements printed
5655 according to pstate->length.
5657 Thu Mar 13 00:12:35 1997 Gary Houston <ghouston@actrix.gen.nz>
5659 * backtrace.c (scm_display_error_message): don't segv if message
5662 * error.h: prototype for scm_error_scm.
5664 * error.c (scm_error_scm): new procedure, reimplements scm-error
5665 in C and uses scm_error.
5667 Tue Mar 11 03:51:00 1997 Gary Houston <ghouston@actrix.gen.nz>
5669 * read.c (scm_read_hash_extend): make scm_read_hash_procedures a
5670 pointer to the Scheme variable read-hash-procedures and intern it
5671 in scm_init_read. Modify scm_read_hash_extend and
5672 scm_get_hash_procedure to use the pointer.
5674 Mon Mar 10 06:28:54 1997 Gary Houston <ghouston@actrix.gen.nz>
5676 * read.h (SCM_N_READ_OPTIONS): increase SCM_N_READ_OPTIONS to 4.
5677 (SCM_KEYWORD_STYLE): defined.
5679 * read.c (scm_read_opts): add a keywords option. This isn't a
5680 boolean option, in case someone wants to add support for DSSSL
5682 Setup scm_keyword_prefix symbol.
5683 (scm_lreadr): Only process keywords if SCM_KEYWORD_STYLE is
5685 I've left keyword support disabled by default, since it doesn't
5686 seem to break the module system and it gives R4RS standard behaviour.
5687 It can be reactivated with (read-set! keywords 'prefix).
5689 Sun Mar 9 14:14:39 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5691 * arbiters.c (scm_make_arbiter): Bugfix: Must SCM_DEFER_INTS
5692 before constructing arbiter.
5694 * eval.c (scm_m_define): Bugfix: Check that the object is a
5695 closure before setting the procedure property!
5697 * ports.h: Removed prototype for scm_ungetc_char_ready_p.
5699 * ports.c: Removed `ungetc-char-ready?'.
5701 Sat Mar 8 00:27:05 1997 Gary Houston <ghouston@actrix.gen.nz>
5703 * read.c (scm_init_read): intitialise scm_read_hash_procedures
5704 (idea from Mikael: make it a pair so scm_permanent object only
5706 (scm_read_hash_extend): don't call scm_permanent_object.
5707 (ideas from Mikael): if chr is already in the list, replace its
5708 procedure instead of appending it again. If proc is #f, remove
5710 (scm_get_hash_procedure): take CDR of scm_read_hash_procedures.
5712 * strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.
5714 * gdbint.c (gdb_read): update scm_lreadr usage.
5716 * load.h: update prototypes.
5718 * load.c (scm_primitive_load, scm_read_and_eval_x,
5719 scm_primitive_load_path): remove case_insensitive_p, sharp arguments.
5721 * read.h: add prototype for scm_read_hash_extend. Change args for
5724 * read.c (scm_read_hash_procedures): new variable.
5725 (scm_read_hash_extend): new procedure.
5726 (scm_get_hash_procedure): new procedure.
5727 (scm_lreadr): use scm_get_hash_procedure instead of an argument
5728 for extended # processing.
5729 (scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen,
5730 scm_read_token): remove case_i, sharp arguments. Change callers.
5732 Fri Mar 7 08:58:21 1997 Gary Houston <ghouston@actrix.gen.nz>
5734 * read.h (SCM_N_READ_OPTIONS): increase to 3.
5735 (SCM_CASE_INSENSITIVE_P): define.
5737 * read.c: add case-insensitive option to scm_read_opts.
5738 (scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument
5739 to determine whether to convert symbol case.
5740 (default_case_i): definition removed.
5741 * read.c (scm_read_token): if case_i, downcase ic before doing
5744 Sat Mar 8 03:49:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5746 * configure.in: Added configuration option `guile-debug'.
5747 Configure with --enable-guile-debug if you want a bunch of extra
5748 functions used for debugging when developing Guile.
5750 * acconfig.h: Added new preprocessor symbol GUILE_DEBUG.
5752 * procs.c (make-cclo): New undocumented debugging procedure: Make
5753 compiled closure with internal procedure PROC and length LENGTH.
5754 Only compiled if GUILE_DEBUG is defined.
5756 * debug.c: Only include `debug-hang' if GUILE_DEBUG is defined.
5758 * print.c: Put #ifdef GUILE_DEBUG around `current-pstate'.
5760 * ports.c: Changed preprocessor symbol DEBUG --> GUILE_DEBUG.
5762 * eval.c (SCM_CEVAL): Added code sections for handling of rpsubrs
5763 with 3 or more args internally to the evaluator.
5765 Fri Mar 7 19:38:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5767 * eval.c (SCM_CEVAL): Added code sections for handling of asubrs
5768 with 3 or more args internally to the evaluator. This is mainly
5769 because we don't want to pass entry and exit points of the
5770 debug support twice, but it also seems to increase the speed of
5771 the evaluator for such calls (e. g. (+ 1 2 3)).
5773 * backtrace.c (scm_display_application): New procedure:
5774 display-application; Set fancy printing parameters individually
5775 for different types of display (backtrace, error, application).
5776 (These should of course be customizable!)
5778 * debug.h (SCM_RESET_DEBUG_MODE): Bugfix: The old code didn't
5779 clear the CHECK-flags.
5781 Thu Mar 6 00:53:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5783 * tags.h, eval.c (iqq): Fixes to comments about SCM_ECONSP.
5785 Wed Mar 5 23:31:21 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5787 * tags.h (SCM_ECONSP, SCM_NECONSP): Bugfix: Discriminate structs
5788 from pairs with a GLOC in the car.
5790 * symbols.c (msymbolize): Bugfix: Also initialize SCM_SYMBOL_HASH,
5791 otherwise `symbol-hash' will behave badly.
5792 (scm_symbol_hash): Bugfix: Must msymbolize if tc7_ssymbol, othwise
5793 we get segmentation fault!
5795 * symbols.c: Added #include "weaks.h". New functions:
5796 `builtin-bindings' and `builtin-weak-bindings'. (These will be
5797 moved to an extraneous library when we split libguile.)
5799 Tue Mar 4 19:50:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5801 * filesys.c (scm_stat): stat now takes fport arguments too as
5802 documented in the manual.
5804 Mon Mar 3 07:11:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5806 * debug.c (scm_single_step): Bugfix: Call continuation with
5807 scm_call_continuation instead of throwing to it.
5809 Mon Mar 3 09:07:56 1997 Gary Houston <ghouston@actrix.gen.nz>
5811 * ports.c (scm_char_ready_p): bug fix: in SCM_PROC char-ready's
5812 argument wasn't declared to be optional.
5814 Sun Mar 2 16:34:40 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5816 * stime.c (scm_init_stime): Add feature "current-time".
5818 Sun Mar 2 06:37:31 1997 Gary Houston <ghouston@actrix.gen.nz>
5820 * throw.h: prototype for scm_exit_status.
5821 * throw.c (scm_handle_by_message): if a 'quit is caught, use its
5822 args to derive an exit status. Allows (quit) to work from a
5824 (scm_exit_status): new function.
5827 Sat Mar 1 00:09:15 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5829 * eval.c (scm_deval): Removed some old code.
5830 (ENTER_APPLY): Bugfix: Reset apply-frame trap on trap as is done
5832 (ENTER_APPLY, scm_deval): Reset trace flag on apply-frame and
5835 * symbols.c (msymbolize): Bugfix: Must initialize property list to
5838 * procs.c: Introduce the existent C function scm_thunk_p at the
5839 Scheme level as well.
5841 Wed Feb 26 12:53:58 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5843 * symbols.c, symbols.h (scm_symbol_value0): New function. Can be
5844 used from C to easily lookup the value of a symbol in the current
5847 Tue Feb 25 00:14:10 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5849 * unif.c (scm_init_unif): Added #include "unif.x". (There are two
5850 scm_init_unif in this file. This will also fix a previous problem
5853 * configure.in: Added AM_MAINTAINER_MODE
5855 Fri Feb 21 23:07:26 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5857 * gdb_interface.h (GDB_INTERFACE): Added some (void *) casts to
5860 Fri Feb 21 18:00:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
5862 * Makefile.am (EXTRA_libguile_la_SOURCES): New variable to hold
5863 source files that are not always included in libguile but should
5864 have their dependencies calculated by automake. This variable is
5865 recognized by automake, no further magic is needed.
5866 (libguile_la_DEPENDENCIES): Changed to @LIBLOBJS@. Libtool wants
5867 to deal exclusively with *.lo files, as it seems. The *.o files
5868 are built automatically when the corresponding *.lo file gets
5871 Wed Feb 19 14:04:23 1997 Jim Blandy <jimb@floss.cyclic.com>
5873 * list.h (scm_list_cdr_ref): Delete prototype; function no longer
5876 Thu Feb 13 21:44:07 1997 Gary Houston <ghouston@actrix.gen.nz>
5878 * unif.c (scm_array_set_x): minor change to argument error checking.
5880 Tue Feb 11 18:19:47 1997 Jim Blandy <jimb@floss.cyclic.com>
5882 * Makefile.am (libguile_la_SOURCES): Remove backtrace.c, debug.c,
5883 inet_aton.c, srcprop.c, stacks.c, and strerror.c from this list.
5884 They should only be included in the library at configure.in's
5886 (libguile_la_LDADD): Include the appropriate .lo files here.
5887 (libguile_la_DEPENDENCIES): List the corresponding .o files here,
5888 so we know when to build them (and their .lo bretheren).
5889 * configure.in (LIBLOBJS): New substituted variable. We let
5890 configure decide which .o files to include in LIBOBJS, and then
5891 put the corresponding list of .lo files in LIBLOBJS. The latter
5892 is what we pass to libtool.
5893 * Makefile.in, configure: regenerated.
5895 Mon Feb 10 00:08:08 1997 Mikael Djurfeldt <mdj@kenneth>
5897 * symbols.c (scm_sysintern0): New function. Contains the core of
5898 old scm_sysintern but doesn't take a second value argument.
5899 (scm_sysintern): Now uses scm_sysintern0.
5900 (scm_sysintern_no_module_lookup): Renamed to
5901 scm_sysintern0_no_module_lookup and doesn't take a second value
5902 argument any longer.
5904 * symbols.h (scm_sysintern0: Added declaration.
5906 * options.c (scm_init_opts): Use scm_sysintern0 instead of
5907 scm_sysintern when interning option keys. Otherwise we risk
5908 destroying the values of already interned variables.
5910 * symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
5911 scheme-level boolean (use SCM_NFALSEP).
5913 * backtrace.c (scm_init_backtrace): Make Scheme-level variable
5915 (scm_backtrace): New function. (C version of old function from
5916 boot-9.scm) Motivation: Make it possible to display backtraces
5917 without depending on boot-9.scm. (I'm uncertain if this
5918 motivation is good enough...)
5920 * root.h (scm_root_state): Add member the_last_stack_var.
5921 (scm_the_stack_var): Defined to scm_root->the_last_stack_var.
5923 * root.c (mark_root): Mark scm_the_last_stack_var.
5925 * init.c (scm_start_stack): Initialize scm_the_last_stack_var to
5928 Sun Feb 9 18:04:41 1997 Mikael Djurfeldt <mdj@kenneth>
5930 * throw.c (mark_lazy_catch, free_lazy_catch): Removed.
5931 1. mark_lazy_catch didn't mark the smob.
5932 2. Both functions above have standard variants:
5933 (lazy_catch_funs): Changed mark_lazy_catch --> scm_mark0,
5934 free_lazy_catch --> scm_free0.
5936 Fri Feb 7 17:30:26 1997 Jim Blandy <jimb@floss.cyclic.com>
5938 * throw.c (scm_internal_lazy_catch): New function.
5939 (scm_lazy_catch): Rewritten to use it.
5940 (scm_ithrow): Handle the new lazy catch representation.
5941 Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
5942 that doesn't have a jmpbuf is a lazy catch clause.
5943 (tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
5944 free_lazy_catch, print_lazy_catch, lazy_catch_funs,
5945 make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
5947 (scm_init_throw): Register the new lazy-catch smob type.
5948 * throw.h (scm_internal_lazy_catch): decl for new function.
5950 * throw.c (scm_internal_catch): Doc fixes.
5952 * alloca.c: New file, needed to support the AC_FUNC_ALLOCA call in
5953 configure.in. Including this might cause problems if applications
5954 that link against libguile include their own copies of alloca, but
5955 if they're using autoconf, they should be adding libguile to LIBS
5956 before calling AC_FUNC_ALLOCA anyway, in which case they'll find
5957 the copy in libguile, and things will be okay. (I think.)
5959 Thu Feb 6 03:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5961 * strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from
5963 strop.h: move prototypes too.
5965 Wed Feb 5 08:33:00 1997 Gary Houston <ghouston@actrix.gen.nz>
5967 * posix.c (scm_init_posix): don't intern EINTR since it's now done
5970 * ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
5971 etc. I deleted them from filesys.c long ago, but didn't
5972 notice they were here too (although ineffective since
5973 sys/stat.h wasn't included).
5975 Tue Feb 4 18:17:50 1997 Tom Tromey <tromey@cygnus.com>
5977 * eval.c: Don't define alloca in GCC case. gcc will automatically
5978 use __builtin_alloca if appropriate.
5980 Tue Feb 4 16:57:40 1997 Jim Blandy <jimb@floss.cyclic.com>
5982 * eval.c (safe_setjmp): New function: trivial wrapper for setjmp.
5983 (SCM_CEVAL, SCM_APPLY): Call it, instead of setjmp, to make sure
5984 that values of automatic variables are preserved. See comments
5985 for safe_setjmp for details.
5987 Change from Thomas Morgan:
5988 * variable.c: Include eq.h.
5989 (var_equal): New function.
5990 (variable_smob): Use var_equal as the discriminator for variables.
5992 * throw.c (s_throw): Remove extraneous declaration.
5994 * configure.in: Call AC_FUNC_ALLOCA, to see if we have alloca.
5995 * eval.c: Add necessary CPP cruft to support that.
5996 * configure, Makefile.in, scmconfig.h.in: regenerated.
5998 Change from Thomas Morgan:
5999 * procprop.c (scm_procedure_properties): Convert the Scheme
6000 boolean returned by scm_procedure_p into a C boolean before using
6001 it as a condition for SCM_ASSERT.
6002 (scm_procedure_property): Likewise.
6004 * simpos.c (SYSTNAME): Accept both 'unix' and '__unix' as
6005 indications of Unixness.
6008 Tue Feb 4 05:07:35 1997 Gary Houston <ghouston@actrix.gen.nz>
6010 * net_db.c (scm_lnaof): change scheme name from lnaof to inet-lnaof.
6012 Mon Feb 3 06:12:37 1997 Gary Houston <ghouston@actrix.gen.nz>
6014 * read.c (scm_lreadr): use scm_misc_error to improve one of the
6015 "unknown # object" error messages.
6017 * strop.c (scm_i_index, scm_i_rindex): combine into one procedure
6018 (scm_i_index) and declare it static. Add a 'direction' argument
6019 to indicate what way the search should go.
6020 (scm_i_index): throw out-of-range error instead of wrong-type-arg
6022 (scm_string_index, scm_string_rindex): adjust usage of scm_i_index.
6023 strop.h: remove scm_i_index, scm_i_rindex prototypes.
6025 Fri Jan 31 04:33:11 1997 Gary Houston <ghouston@actrix.gen.nz>
6027 * ioext.c, ioext.h: remove obsolete _sys_ from 9 procedure names.
6029 * posix.c (scm_fork): Scheme name changed from fork to primitive-fork,
6030 to avoid clash with various scsh forks.
6032 Thu Jan 30 20:14:09 1997 Mikael Djurfeldt <mdj@syk-0606.pdc.kth.se>
6034 The following two changes (ramap.c, throw.c) are motivated by the
6035 apparent unportability of forward declarations of static arrays of
6036 the form `static foo bar[];'.
6038 * ramap.c (scm_array_fill_x): Moved above scm_array_fill_int.
6039 (ra_rpsubrs, ra_asubrs): Moved to the top of array code.
6041 * throw.c (scm_throw): Moved above scm_ithrow.
6043 * options.h: Removed the extern declarations of scm_yes_sym and
6044 scm_no_sym since these are static.
6046 Fri Jan 24 06:16:32 1997 Gary Houston <ghouston@actrix.gen.nz>
6048 * ports.c: add SCM_PROC declarations for pt-size and pt-member.
6050 * Makefile.am: remove AWK=@AWK@.
6051 Add a rule for generating errnos.list.
6052 (CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.
6054 * configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
6055 don't extract errnos, just set a variable (avoids the
6056 need to recompile error.c just because configure is run.)
6058 * unif.h: update prototypes.
6059 * unif.c (scm_uniform_array_read,write): change the offset and
6060 length arguments to start and end, for consistency.
6062 * __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.
6064 * ioext.h: update prototypes.
6065 * ioext.c (scm_read_delimited_x): replaces scm_read_line and
6066 scm_read_line_x, it's a more general procedure using an
6067 interface from scsh. read-line and read-line! are now defined
6069 Note that the new read-line trims the terminator
6070 by default, previously it was appended to the returned string. An
6071 optional argument specifies how to process the terminator (scsh
6072 compatible). For the old behaviour: (read-line port 'concat).
6073 scm_read_line, scm_read_line_x: deleted. (read-line port 'split)
6074 returns a pair, but is converted to multiple values if the scsh
6077 socket.h: update prototypes.
6078 * socket.c (scm_recvfrom): for consistency with other procedures,
6079 take start and end as separate optional arguments.
6080 (scm_recv, scm_recvfrom): don't allow the second argument
6081 to be a size, only a buffer. Change the scheme names to
6082 recv! and recvfrom!. Don't return the buffer.
6084 * ioext.h, posix.h: move prototypes too.
6085 * ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
6086 moved back from posix.c to ioext.c. Also move #includes of "genio.h"
6087 "read.h" and "unif.h".
6088 * ioext.c: include "chars.h"
6090 Mon Jan 20 19:54:49 1997 Marius Vollmer <mvo@zagadka.ping.de>
6092 * dynl.c: The dynamic linking and module registration functions
6093 are now defined even when dynamic linking is not available for the
6094 host system. Some of their functionality can be done without
6095 dynamic linking; when it's really needed, they throw errors.
6097 Thu Jan 16 16:39:29 1997 Marius Vollmer <mvo@zagadka.ping.de>
6099 * configure.in: Only define DYNAMIC_LINKING when one of the system
6100 dependent functions is detected.
6101 * dynl.c (scm_dynamic_func): New function to get the address of a
6102 function in a dynamic object.
6103 (scm_dynamic_call, scm_dynamic_args_call): Accept the values
6104 produced by scm_dynamic_func as the thing to call.
6106 Sun Jan 12 21:09:42 1997 Marius Vollmer <mvo@zagadka.ping.de>
6108 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c: Restructured.
6109 (scm_register_module_xxx, scm_registered_modules,
6110 scm_clear_registered_modules): New functions.
6112 Sat Jan 11 21:37:15 1997 Marius Vollmer <mvo@zagadka.ping.de>
6114 * symbols.c (scm_sysintern): Renamed to
6115 scm_sysintern_no_module_lookup.
6116 (scm_sysintern): New function to take the place of the old
6117 scm_sysintern. It uses the current toplevel lookup closure to give
6118 the symbol its value. This is a temporary hack to put packages
6119 like gtcltk into their own module.
6120 (scm_can_use_top_level_lookup_closure_var): New variable to tell
6121 us whether `scm_top_level_lookup_closure_var' has been initialized
6123 * eval.c (scm_init_eval): Set it.
6125 Sat Jan 18 00:03:31 1997 Gary Houston <ghouston@actrix.gen.nz>
6127 * fports.c (scm_open_file): pass errno to scm_syserror_msg.
6128 * filesys.h: update prototypes. Remove macros: SCM_FD_P, SCM_FD_FLAGS,
6130 * filesys.c (scm_sys_stat, scm_sys_lstat): pass errno to
6132 (scm_sys_read_fd, scm_sys_write_fd, scm_sys_close, scm_sys_lseek,
6133 scm_sys_dup): deleted: FD capability will be added to other
6135 Remove support for the FD object type: scm_tc16_fd, scm_fd_print,
6136 scm_fd_free, fd_smob, scm_intern_fd.
6137 (scm_open): renamed from scm_sys_open. Return a port instead of
6138 an FD object. Make the mode argument optional.
6139 (scm_sys_create): deleted, it's just a special case of open.
6140 (scm_init_filesys): move interning of constants O_CREAT etc.,
6141 here (were previously using SCM_CONST_LONG macro).
6142 Add missing constants: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT.
6144 (numerous _sys_ procedures): remove gratuitous _sys_ from names.
6145 include "fports.h" and <stdio.h>
6146 (scm_stat, scm_select): don't support FD objects.
6148 * error.h: adjust scm_syserror_msg prototype.
6149 * error.c (scm_syserror_msg): take an extra argument for errno.
6150 Using the global value didn't always work, since it could be
6151 reset by procedure calls in the message or args arguments.
6153 * fports.c (scm_setbuf0): call setbuf even if FIONREAD is not defined.
6154 I don't understand why the check was there (and what about the
6157 * strop.c (scm_string_copy): allow shared substrings to be copied.
6159 * unif.h: corresponding change to prototypes.
6160 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write_x):
6161 recognize two new optional arguments: offset and length. Allow
6162 the port argument to be an integer (file descriptor, for scsh).
6163 Include <unistd.h> for "read" prototype.
6165 Tue Jan 14 02:42:02 1997 Gary Houston <ghouston@actrix.gen.nz>
6167 * socket.c: don't include filesys.h.
6169 Mon Jan 13 03:47:04 1997 Gary Houston <ghouston@actrix.gen.nz>
6171 * Makefile.am: add AWK=@AWK@ (?)
6173 * Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
6175 Add a rule to generate errnos.c from errnos.
6176 * error.c (scm_init_error): include errnos.c.
6177 * errnos_cnvt.awk: new file, converts the list of errno codes to
6179 * errnos_get.c: new file.
6180 * errnos.default: new file, contains errnos to try if they can't
6181 be extracted from errno.h.
6182 * configure.in: if using GCC, try and extract errno codes from
6186 Sat Jan 11 14:47:00 1997 Marius Vollmer <mvo@zagadka.ping.de>
6188 * configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
6189 * Makefile.am: Made libguile into a libtool library.
6190 * PLUGIN/guile.config: Removed "-L ../libguile" from xtra_cflags.
6191 Set libtool_libs to indicate that libguile is a libtool library.
6192 See guile/ChangeLog for details.
6193 * .cvsignore: ignore "*.lo", the libtool library objects.
6195 Wed Jan 8 06:54:54 1997 Gary Houston <ghouston@actrix.gen.nz>
6197 * net_db.c (scm_getserv): add missing SCM_ALLOW_INTS.
6198 use htons in getservbyport argument.
6200 Tue Jan 7 18:11:24 1997 Jim Blandy <jimb@floss.cyclic.com>
6202 * ports.h (SCM_PTOBNUM): Removed extraneous semicolon.
6203 * smob.h: (SCM_PTOBNUM): Removed entirely; this definition is a
6206 * objprop.c (scm_object_property): No need to take the CDR of the
6207 value returned by scm_object_properties, since Aug 20 change.
6209 * configure.in: When checking for struct linger, #include
6210 <sys/types.h> as well as <sys/socket.h>. I've never known
6211 <sys/types.h> to cause any portability problems, and Solaris's
6212 <sys/socket.h> needs it.
6213 * configure: Rebuilt.
6215 I think the Sun compiler has chosen a perverse way to interpret
6216 ANSI declarations combined with K&R definitions. We'll
6217 appease it a little bit. But when it invades France, we fight.
6218 * print.c (scm_iprlist): Change 'tlr' argument to an int.
6219 * print.h (scm_iprlist): Here too.
6220 * numbers.c (scm_divbigdig): Change definition to match
6221 declaration in numbers.h.
6222 * unif.c (scm_makflo): Change definition to match declaration in
6225 * init.c (scm_boot_guile): Don't return the value of
6226 scm_boot_guile_1. This function doesn't return a value;
6227 scm_boot_guile_1 doesn't return a value (or return at all).
6229 * eval.c (unmemocopy): Add a semicolon to appease the Sun
6232 * simpos.c (SYSTNAME): Add case for AIX; otherwise it won't
6233 compile. I have a feeling this function is a bad idea anyway ---
6234 one should always test for features, not systems.
6236 * smob.h (SCM_SMOBNUM, SCM_PTOBNUM): Remove extraneous
6237 semicolons. Only pure luck kept this from being noticed earlier.
6239 Tue Jan 7 15:04:06 1997 Mikael Djurfeldt <mdj@kenneth>
6241 * socket.c (scm_recvfrom): Added missing semicolon.
6243 Mon Jan 6 20:39:08 1997 Gary Houston <ghouston@actrix.gen.nz>
6245 * socket.c (scm_recvfrom): allow buff_or_size to be a list containing
6246 the buffer and start and end positions for scsh networking
6249 Sun Jan 5 13:53:53 1997 Jim Blandy <jimb@floss.cyclic.com>
6251 * configure.in: Revert previous change to this file; the problem
6252 is due to transient automake weirdness.
6253 * configure: Rebuilt.
6255 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in, not
6256 PLUGIN/guile.libs. configure generates the latter from the former.
6257 * Makefile.in: Rebuilt.
6259 * configure.in: Call AM_PROG_INSTALL; the automake manual says we
6260 need this if we install scripts, like guile-snarf.
6261 * configure: Rebuilt.
6263 Thu Jan 2 01:56:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
6265 * Makefile.am (EXTRA_DIST): Added DYNAMIC-LINKING
6267 Sat Dec 28 19:14:01 1996 Gary Houston <ghouston@actrix.gen.nz>
6269 * socket.c (scm_addr_vector): fix faulty scm_listify.
6271 Sat Dec 28 13:55:58 1996 Marius Vollmer <mvo@zagadka.ping.de>
6273 * read.c (scm_lreadr): Encountering EOF after skipping a SCSH
6274 style block comment is no longer considered an error.
6276 Fri Dec 27 13:44:23 1996 Marius Vollmer <mvo@zagadka.ping.de>
6278 * PLUGIN/guile.libs.in: New file.
6279 * PLUGIN/guile.libs: Removed from repository.
6280 * configure.in: Create PLUGIN/guile.libs from
6281 PLUGIN/guile.libs.in. This is for including additonal libraries
6282 needed for dynamic linking.
6283 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in
6284 instead of PLUGIN/guile.libs.
6286 * Makefile.am: Added explicit dependency "dynl.o: dynl.x".
6288 Sun Dec 22 23:06:14 1996 Jim Blandy <jimb@floss.cyclic.com>
6290 * list.c (scm_delq_x, scm_delv_x, scm_delete_x): Delete all
6291 occurrences of the given element from the list, not just the
6292 first. This is how the Emacs Lisp functions behave, how the
6293 analogous Common Lisp functions behave, and (I believe) how the
6294 older Maclisp functions worked. I realize that this change may
6295 break code, but it seemed better to break it before the Guile
6298 * gc.c (scm_protect_object, scm_unprotect_object): New functions.
6299 Their prototypes were already present in gc.h, but they weren't
6301 (scm_init_storage): Initialize scm_protects.
6302 * root.c (scm_protects): New element of scm_sys_protects.
6304 * net_db.h (scm_init_net_db): Fix spelling from scm_init_netdb.
6306 Sat Dec 21 15:38:32 1996 Jim Blandy <jimb@floss.cyclic.com>
6308 * libguile.h: Added #include "libguile/net_db.h".
6310 * libguile.h: Don't #include "libguile/libpath.h", contrary to Oct
6311 30 change. That file is only meant for communication between the
6312 configuration process and load.c. If code linked against libguile
6313 wants to get at the paths mentioned in libpath.h, it can call
6314 functions declared in load.h.
6316 Sat Dec 21 14:50:42 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6318 * libguile.h: Removed #include "libguile/fdsocket.h"
6320 * net_db.c: Added #include <sys/socket.h>.
6322 Sat Dec 21 00:33:03 1996 Gary Houston <ghouston@actrix.gen.nz>
6324 * filesys.c (scm_input_waiting_p): use select in preference to
6325 FIONREAD, since the latter doesn't detect EOF.
6326 Throw error if neither select nor FIONREAD available.
6328 * socket.c (scm_connect): take a port, not a fd object.
6329 (scm_fill_sockaddr): throw an error if fam is not recognised.
6330 (scm_bind): use scm_fill_sockaddr.
6331 (scm_listen): take a port, not a fd object.
6332 (scm_accept): take and return a port. return #f in the car if
6333 address can't be got
6334 (scm_sock_fd_to_port): new procedure.
6335 (scm_socket): use scm_sock_fd_to_port.
6336 (scm_addr_vector): throw error if unrecognised address type.
6337 take an extra argument with the calling procedure name.
6338 (scm_getsockname): take a port. return #f if address can't be got.
6339 (scm_getpeername): take a port. return #f if address can't be got.
6340 (scm_recvfrom): take a port. return #f for address component if can't
6342 (scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
6343 scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
6345 Fri Dec 20 23:06:53 1996 Jim Blandy <jimb@floss.cyclic.com>
6347 * throw.c (scm_internal_catch): Make body funcs and handler funcs
6348 use separate data pointers, to allow them to be designed
6349 independently and reused.
6350 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message):
6351 Renamed from catch_body, catch_handler, and uncaught_throw; made
6353 (struct scm_catch_body_data): Renamed from catch_body_data; moved
6355 (scm_catch): Use the above.
6356 (scm_throw): Don't bother printing a message for an uncaught
6357 throw; we establish a default handler in init.
6358 * throw.h (scm_internal_catch): Prototype updated.
6359 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message): New
6361 (struct scm_body_thunk_data): New structure, used as data
6362 argument to scm_body_thunk.
6363 * init.c (struct main_func_closure): New structure, packaging up
6364 the data to pass to the user's main function.
6365 (scm_boot_guile): Create one. Pass it to scm_boot_guile_1.
6366 (scm_boot_guile_1): Pass it through to invoke_main_func. Use
6367 scm_internal_catch to establish a catch-all handler, using
6368 scm_handle_by_message. This replaces the special-case code in
6370 (invoke_main_func): Body function for scm_internal_catch; invoke
6371 the user's main function, using the main_func_closure pointer to
6372 decide what to pass it.
6373 * root.c (struct cwdr_body_data): Remove handler_proc member.
6374 (cwdr): Use scm_handle_by_proc instead of cwdr_handler.
6375 (cwdr_handler): Removed.
6377 Thu Dec 19 00:00:26 1996 Gary Houston <ghouston@actrix.gen.nz>
6379 * socket.h (SCM_P): update bind prototype.
6380 * socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
6381 include "feature.h".
6382 (scm_socket): return a port, not a file descriptor object.
6383 include "fports.h" and <unistd.h>
6384 (scm_bind): take a port, not a file descriptor object.
6385 take an extra argument for address args.
6387 * net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
6388 INADDR_NONE, INADDR_LOOPBACK.
6390 Tue Dec 17 22:58:26 1996 Gary Houston <ghouston@actrix.gen.nz>
6392 * init.c: include net_db.h and not fdsocket.h.
6393 (scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.
6395 * Makefile.am: corresponding changes.
6396 * socket.h: renamed from fdsocket.h, fix names.
6397 * net_db.h: renamed from socket.h, fix names.
6398 * socket.c: renamed from fdsocket.c.
6399 remove _sys from procedure names.
6400 (scm_init_socket): rename from scm_init_fdsocket. include socket.x.
6401 add "socket" to features list.
6402 * net_db.c: renamed from socket.c.
6403 remove _sys from procedure names.
6404 (scm_init_net_db): rename from scm_init_socket. include net_db.x.
6405 add "net-db" to features list.
6406 include "net_db.h". don't include <sys/socket.h> or
6409 Thu Dec 19 14:03:24 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6411 * tags.h (scm_tags): Removed comma at end of last enumerator.
6413 Thu Dec 19 02:54:59 1996 Jim Blandy <jimb@floss.cyclic.com>
6415 Don't use GCC extensions to allocate space for debugging frames.
6416 (Here he goes again! Why do we put up with this?!)
6417 * debug.h (scm_debug_frame): Make the 'vect' member a pointer to
6418 an scm_debug_info structure, not an in-line array of them. Add
6419 'info' member, to say how many vect elements we've used, for eval
6421 * eval.c (SCM_CEVAL): Use alloca to allocate space for vect. Use
6422 a new variable debug_info_end to mark the end of vect, instead of
6423 the address of the 'info' pointer itself.
6424 [DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of
6425 &debug to scm_debug_frame *; debug is a real scm_debug_frame now.
6426 (SCM_APPLY): Explicitly allocate space for debug.vect.
6427 * debug.c (scm_m_start_stack): Same, for vframe.vect.
6428 * stacks.c: Adjusted for new debug frame structure.
6429 (RELOC_INFO, RELOC_FRAME): New macros.
6430 (stack_depth, read_frames): Use them, and new scm_debug_frame
6431 element 'info', instead of magically knowing that eval frames have
6432 an info pointer sitting after vect.
6433 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Use
6435 (scm_init_stacks): Formatting tweaks.
6437 Wed Dec 18 14:57:57 1996 Jim Blandy <jimb@floss.cyclic.com>
6439 Give GCC more control flow information, so it can be sure that
6440 variables aren't used uninitialized.
6441 * error.h (scm_error, scm_syserror, scm_syserror_msg,
6442 scm_sysmissing, scm_num_overflow, scm_out_of_range,
6443 scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
6444 scm_misc_error): Tell GCC that these functions never return.
6445 * struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
6446 out the field type, call abort if SCM_ASSERT returns, to placate
6448 * stacks.c (scm_make_stack, scm_last_stack_frame): abort if
6449 scm_wta ever returns. We can't handle this case anyway, and this
6450 gives the optimizer more information.
6451 * unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
6452 scm_wta ever returns.
6454 In some cases, the code is fine, but GCC isn't smart enough to
6455 figure that out; this usually happens when one variable is only
6456 initialized and used when a particular condition holds true, and
6457 we know that condition will never change within a given invocation
6458 of the function. In this case, we simply initialize the variables
6459 to placate the compiler, hopefully to a value which will cause a
6460 crash if it is ever actually used.
6461 * print.c (scm_iprin1): Initialize mw_pos.
6462 * read.c (scm_lreadrecparen): Initialize tl2, ans2.
6463 * throw.c (scm_ithrow): Initialize dynpair.
6464 * unif.c (scm_uniform_vector_ref): Initialize cra.
6465 * struct.c (init_struct): Initialize prot.
6466 * mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
6468 * strports.c (scm_eval_0str): Don't return uninitialized garbage
6469 if EXPR contains no expressions.
6471 Wed Dec 18 11:43:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
6473 * eval.c, debug.h: Revert changes of Dec 16 and Nov 21. They
6474 cause an infinite loop (???). So much for the algebraic
6475 equivalency of variable-sized arrays and alloca...
6477 Tue Dec 17 20:29:03 1996 Marius Vollmer <mvo@zagadka.ping.de>
6479 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
6480 a SCM boolean, not a C boolean.
6482 Sat Dec 14 23:21:45 1996 Marius Vollmer <mvo@zagadka.ping.de>
6484 * gc.c (SCM_MTRIGGER_HYSTERESIS): New memory management parameter.
6485 (scm_must_malloc, scm_must_realloc): Added a hysteresis to the
6486 rules for raising scm_mtrigger. Previously, unfortunate but not
6487 unlikely circumstances could result in almost constant invokation
6488 of the gc. Now, this situations should be less likely, but they
6489 are not prevented completely.
6491 Tue Dec 17 16:19:07 1996 Jim Blandy <jimb@totoro.cyclic.com>
6493 * numbers.c (scm_fuck): Procedure removed; looks like old test
6495 * numbers.h: Prototype removed.
6497 Mon Dec 16 18:20:32 1996 Jim Blandy <jimb@totoro.cyclic.com>
6499 * debug.h (scm_debug_frame): Change `vect' member from an in-line
6500 array to a pointer, to match my Nov 21 change in eval.c.
6502 Fri Dec 13 16:12:14 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6504 * libguile.h: Added #include "libguile/backtrace.h", #include
6505 "libguile/stacks.h".
6507 * strings.c (scm_string scm_make_string scm_string_ref
6508 scm_string_set_x scm_string_equal_p scm_string_append):
6509 Bugfix according to scm patch from Aubrey Jaffer:
6510 Corrected long-standing
6511 (not (eqv? (integer->char 128)
6512 (string-ref (make-string 1 (integer->char 128)) 0)))
6513 bug found by John Kozak <jk@noontide.demon.co.uk>.
6515 * strports.c, strports.h: Make scm_eval_0str return the value of
6516 the last expression evaluated (previously, it returned void).
6518 * strports.c, strports.h: New function: scm_read_0str. Does what
6521 Tue Dec 10 23:38:43 1996 Gary Houston <ghouston@actrix.gen.nz>
6523 * simpos.c (scm_getenv): return #f if string can't be found in the
6524 environment instead of throwing an exception, for compatibility
6525 with numerous other systems.
6527 Mon Dec 9 23:23:35 1996 Tom Tromey <tromey@cygnus.com>
6529 * Makefile.am (.c.x): Use guile-snarf.
6530 * configure.in (AC_OUTPUT): Generate guile-snarf; make it
6532 * guile-snarf.in: New file, resurrected from old guile-snarf.sh.
6534 Mon Dec 9 18:36:50 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
6536 * backtrace.c (scm_display_error_message): Made non-static, and
6537 renamed from display_error_message.
6538 * backtrace.h (scm_display_error_message): Added extern decl.
6539 * throw.c (uncaught_throw): Use it to display the error message.
6541 Mon Dec 9 10:10:38 1996 Tom Tromey <tromey@cygnus.com>
6543 * inet_aton.c: Use #if 0, not #ifdef 0.
6545 Mon Dec 9 06:36:48 1996 Gary Houston <ghouston@actrix.gen.nz>
6547 * ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
6548 to convert the returned value.
6549 (scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert
6550 the offset argument.
6552 Sun Dec 8 21:06:38 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
6554 Add new interface to catch/throw, usable from C as well as
6556 * throw.h (scm_catch_body_t, scm_catch_handler_t): New types.
6557 (scm_internal_catch): New function, replaces...
6558 (scm_catch_apply): Deleted.
6559 * throw.c (scm_catch_apply): Deleted; replaced with a more general
6560 mechanism which is a bit more code, but can be used nicely from C
6561 and implement the Scheme semantics as well.
6562 (scm_internal_catch): This is the replacement; it's named after
6563 the analogous function in Emacs.
6564 (scm_catch): Reimplemented in terms of the above.
6565 (struct catch_body_data, catch_body, catch_handler): New
6566 functions, used by scm_catch.
6567 * root.c (cwdr): Reimplemented in terms of scm_internal_catch.
6568 (struct cwdr_body_data, cwdr_body, cwdr_handler): New functions;
6569 support for new cwdr.
6571 * Makefile.am (libpath.h): Re-incorporate Mikael's changes of Wed
6574 Sun Dec 8 17:55:34 1996 Marius Vollmer <mvo@zagadka.ping.de>
6576 * acconfig.h: Added DYNAMIC_LINKING symbol.
6577 * configure.in: Add option and checks for dynamic linking.
6578 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c,
6579 dynl.h: New files for dynamic linking support.
6580 * Makefile.am (libguile_a_SOURCES):
6582 (modinclude_HEADERS): Added "dynl.h".
6583 (EXTRA_DIST): Added "dynl-dl.c", "dynl-dld.c", "dynl-shl.c" and
6585 * init.c (scm_boot_guile_1): Call
6586 scm_init_dynamic_linking to initialize dynamic linking support.
6588 Thu Dec 5 22:47:53 1996 Marius Vollmer <mvo@zagadka.ping.de>
6590 * init.c (scm_boot_guile_1): Moved `live' variable to the toplevel
6591 (as we Schemers say). It needs to be global, so that I can tweak
6592 it for the proper operation of unexec.
6593 (scm_boot_guile_1_live): New variable, see above.
6595 Sun Dec 1 00:00:49 1996 Tom Tromey <tromey@cygnus.com>
6597 * guile-snarf.sh: Removed.
6598 * PLUGIN/guile.libs: Added dependency for -lm.
6599 * acinclude.m4: Renamed from aclocal.m4.
6600 * PLUGIN/greet: Removed.
6601 * Makefile.am, aclocal.m4: New files.
6602 * configure.in: Updated for Automake.
6604 Thu Nov 28 00:23:55 1996 Marius Vollmer <mvo@zagadka.ping.de>
6606 * eval.c (scm_definedp): Use top_level_lookup_closure_var
6607 and not top_level_lookup_thunk_var.
6609 Wed Nov 27 22:04:19 1996 Jim Blandy <jimb@baalperazim.frob.com>
6611 * Makefile.in (ancillary): List ChangeLog-scm, not ChangeLog.scm.
6613 Wed Nov 27 14:14:56 1996 Marius Vollmer <mvo@zagadka.ping.de>
6615 * eval.c (scm_definedp): Incompatibly changed to be a builtin
6616 Scheme function, instead of syntax. Single argument is now a
6619 Thu Nov 21 20:26:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
6621 * ramap.c (scm_ra_sum, scm_ra_difference, scm_ra_product,
6622 scm_ra_divide): Properly terminate statements passed as arguments
6623 to IVDEP macros. (Thanks to Bernard Urban.)
6625 * eval.c (SCM_CEVAL): Use alloca, not GCC's extensions for arrays
6626 with non-constant sizes. (Thanks to Bernard Urban.)
6628 Thu Nov 21 11:17:42 1996 Jim Blandy <jimb@floss.cyclic.com>
6630 It's an "eval closure", not an "eval thunk." A thunk is a
6631 function of no arguments.
6632 * root.h (struct scm_root_state): Renamed
6633 top_level_lookup_closure_var from top_level_lookup_thunk_var.
6634 (scm_top_level_lookup_closure_var): Renamed from
6635 scm_top_level_lookup_thunk_var.
6636 * root.c (mark_root): Uses changed.
6637 * gdbint.c (gdb_eval, gdb_binding): Uses changed.
6638 * init.c (scm_start_stack): Uses changed.
6639 * eval.c (scm_eval, scm_eval_x, scm_init_eval): Rename uses.
6640 Change scheme-visible name to *top-level-lookup-closure* from
6641 *top-level-lookup-thunk*.
6643 Tue Nov 19 22:43:31 1996 Jim Blandy <jimb@totoro.cyclic.com>
6645 * gc.c (scm_igc, scm_gc_mark): Round up the size of the stack we
6646 pass to scm_mark_locations. (Thanks to Aubrey Jaffer.)
6648 Sun Nov 10 13:35:05 1996 Jim Blandy <jimb@floss.cyclic.com>
6650 * gc.c (struct scm_heap_seg_data): Doc fixes.
6652 * gc.c (scm_gc_sweep): Empty all segments' freelists before
6653 sweeping. Then, prepend each segment's free cells to its
6654 freelist, rather than wiping out the old value. (Thanks to Marius
6657 * gc.c (which_seg, scm_map_free_list, scm_newcell_count,
6658 scm_check_freelist, scm_debug_newcell): New functions and
6659 variables, for debugging freelist problems.
6660 * pairs.h (SCM_NEWCELL): New debugging version added.
6661 * gc.h (scm_debug_newcell): Added extern declaration, used by
6662 debugging version of SCM_NEWCELL.
6664 Sat Nov 9 19:02:46 1996 Jim Blandy <jimb@floss.cyclic.com>
6666 On some systems <libc.h> conflicts with <unistd.h>, and should not
6667 be #included at all.
6668 * aclocal.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): New autoconf macro.
6669 * acconfig.h (LIBC_H_WITH_UNISTD_H): New CPP symbol.
6670 * configure.in: Call it.
6671 * posix.c, filesys.c: Use its results to decide whether or not to
6673 * configure, scmconfig.h.in: Rebuilt with autoconf and
6676 Wed Nov 6 16:19:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
6678 * fports.c (scm_stdio_to_port, scm_open_file): Set the port's
6679 pointer to the stdio stream before calling scm_setbuf0, so the
6680 latter will be able to retrieve it. I'm surprised this didn't
6681 segfault earlier. (Thanks to Christopher Lee.)
6683 Wed Nov 6 16:01:20 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6685 * throw.c (scm_lazy_catch, scm_ithrow): Completed implementation
6688 Sat Nov 2 21:01:48 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6690 * stacks.c, stacks.h (scm_make_stack): Now takes arbitrary
6691 number of stack narrowing specifier pairs. The first specifier in
6692 a pair controls inner border, the second the outer border. A
6693 number means cut that number of frames, a procedure object means
6694 cut until that object is found in operator position in a frame.
6696 * root.c (cwdr): Bugfix.
6698 * read.c: Recording of positions disabled by default.
6700 * procs.c (scm_closure_p): New function.
6702 * posix.c (scm_tmpnam): New function.
6704 * load.c: Added #include "throw.h".
6705 (scm_sys_search_load_path): Bugfix: Don't add an extra '/' if path
6708 * load.c, load.h (scm_read_and_eval_x): New function.
6710 * eval.c: Renamed debug option "deval" to "debug".
6712 (scm_eval_x): `eval!' is no longer accessible from the scheme
6713 level. Motivation: We can't allow operations which introduce
6714 glocs into the scheme level. Guile's type system can't handle
6715 these as data. Use `eval' or `read-and-eval!' as replacement.
6717 * debug.c (scm_m_start_stack): Bugfix: Use SCM_ECONSP instead of
6718 SCM_CONSP since this is a macro!; Set vframe.prev to
6719 scm_last_debug_frame instead of 0. In this way we can look
6720 "above" the virtual start stack frame if we wish.
6721 (scm_debug_hang): New function: Useful for debugging Guile in
6722 certain tricky situations. Will probably be removed later...
6724 * debug.h: Changed semantics of debug option "backtrace". This
6725 option now only indicates whether we want automatic backtrace at
6728 Wed Oct 30 00:31:55 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6730 * ports.c: #include "filesys.h"
6731 (scm_char_ready_p): input_waiting renamed and moved to filesys.c.
6733 * filesys.c, filesys.h (scm_input_waiting_p): Moved from ports.c.
6734 Motivation: This is system specific code which is related to file
6735 I/O. It also may use select. Added code by Gary Houston to
6736 detect presence of character in stdio buffers.
6738 * libguile.h: #include "libguile/libpath.h"
6740 * Makefile.in (libpath.h): Renamed definition of: LIBRARY_PATH -->
6741 SCM_LIBRARY_DIR; Added definitions of: SCM_PKGDATA_DIR,
6742 SCM_SITE_DIR; Install libpath.h among the other include files.
6744 * load.c, load.h (scm_sys_package_data_dir): New function.
6746 Mon Oct 28 11:43:41 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6748 * stacks.h: Bugfix: Don't use tail-array length field as stack
6749 length field! This screwed GC.
6751 Tue Oct 22 01:01:00 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6753 * _scm.h: Added #ifndef around definition of macros min and max.
6755 * __scm.h: Added hooks for threads to plugin to in ints protection
6756 macros: SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER,
6757 SCM_THREAD_ALLOW_1, SCM_THREAD_ALLOW_2. Motivation: We don't want
6758 the main code in these macros duplicated and spread over multiple
6759 files. Renamed SCM_THREADS_SWITCHING_CODE ->
6760 SCM_THREAD_SWITCHING_CODE.
6762 Tue Oct 29 14:55:40 1996 Marius Vollmer <mvo@zagadka.ping.de>
6764 * snarf.h: New file.
6765 * guile-snarf.sh: New file.
6766 * Makefile.in (inner_h_files): Added snarf.h
6767 (ancillary, install, uninstall, distclean): Added actions for
6769 (.c.x): Use guile-snarf.
6770 (guile-snarf): New rule, to produce guile-snarf from guile-snarf.sh.
6771 (gen_c_files): Note that these depend on guile-snarf.
6772 * _scm.h: Removed the snarfing macros (SCM_PROC, etc). They are
6773 now in "snarf.h". Added #include "snarf.h" to get them.
6774 * libguile.h: Added #include "snarf.h".
6775 (Patches applied and tweaked by Jim Blandy.)
6777 Tue Oct 29 13:21:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
6779 * socket.c: Use K&R style declaration for 'close'; the GNU coding
6780 standards suggest against providing prototypes for system
6781 functions. Thanks to Greg Troxel.
6783 Mon Oct 28 16:48:32 1996 Jim Blandy <jimb@floss.cyclic.com>
6785 * strports.c (scm_eval_0str): New function.
6786 #include "read.h", to get prototype for scm_read.
6787 * Makefile.in (strports.o): Update dependencies.
6788 * strports.h: New prototype.
6790 * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
6791 scheme name from "int?" to "integer?". It seems to do the job.
6792 * numbers.h: Rename prototype too.
6793 * scmhob.h (intp): Change definition to refer to scm_integer_p. I
6796 * numbers.c (scm_less_p, scm_gr_p, scm_leq_p, scm_geq_p,
6797 scm_num_eq_p): Rename these according to R4RS conventions: call
6798 them <, <=, =, >, and >=, not <?, <=?, =?, >?, and >=?. En route
6799 to making libguile R4RS compliant without ice-9...
6801 * load.c (scm_sys_search_load_path): Search for files under all
6802 extensions listed in the %load-extensions variable. If FILENAME
6803 is absolute, return it unchanged, without searching the load path.
6804 (scm_loc_load_extensions): New variable, pointing to
6805 %load-extensions' value cell.
6806 (scm_init_load): Initialize it, and the value it points to.
6807 (scm_primitive_load_path): Improve error reporting.
6809 * load.c (scm_loc_load_hook): New variable, pointing to value cell
6810 of new Scheme variable %load-hook.
6811 (scm_primitive_load): Apply %load-hook to filename.
6813 Mon Oct 28 06:28:28 1996 Gary Houston <ghouston@actrix.gen.nz>
6815 * configure.in: add tests for figuring out whether buffered data
6816 is available in a FILE structure, which is needed by char-ready.
6818 * acconfig.h: define FILE_CNT_FIELD, FILE_CNT_GPTR and
6821 * simpos.c (scm_getenv): renamed from scm_sys_getenv. Throw
6822 exceptions using misc_error instead of syserror. It seems a bit
6823 odd to throw an exception if a string can't be found in the
6824 environment, but it's consistent with open-file, stat etc.
6825 (simpos.h): remove sys_ from getenv.
6827 * posix.c (scm_putenv): renamed from scm_sys_putenv. If an error
6828 occurs, throw an error instead of returning errno. Return value
6830 (numerous in posix.c and posix.h): removed superfluous sys_ from names.
6832 Sun Oct 27 01:22:04 1996 Gary Houston <ghouston@actrix.gen.nz>
6834 * filesys.c (scm_stat2scm): derive file type and permissions from
6835 the stat mode and append them to the returned vector.
6836 There isn't much overhead in doing this and it avoids the need to
6837 work with S_IRUSR et al. in Scheme.
6838 Define symbols scm_sym_regular etc.
6839 (scm_init_filesys): don't intern S_IRUSR etc.
6841 * load.c: change s_try_load and s_try_load_path to s_primitive_load
6842 and s_primitive_load_path.
6844 * eval.c, load.c, error.c (scm_wta): use scm_misc_error.
6846 * error.h: don't declare error symbols. prototype for scm_misc_error.
6848 * stackchk.c (scm_stack_overflow_key): defined here instead of in
6851 * error.c: use SCM_SYMBOL to set up error keys.
6852 scm_misc_error: new procedure.
6854 Fri Oct 25 01:56:30 1996 Jim Blandy <jimb@floss.cyclic.com>
6856 * read.c (scm_lreadr): Recognize SCSH-style block comments; text
6857 between `#!' and `!#' is ignored.
6858 (skip_scsh_block_comment): New function.
6860 * feature.c (scm_set_program_arguments): New argument, FIRST.
6861 * feature.h: Update prototype.
6862 * init.c (scm_boot_guile_1): Pass new argument to
6863 scm_set_program_arguments.
6865 Tue Oct 22 20:54:42 1996 Jim Blandy <jimb@floss.cyclic.com>
6867 * init.c (scm_start_stack): Don't initialize scm_progargs here.
6868 (scm_boot_guile): Call scm_set_program_arguments here, later than
6869 the old initialization.
6871 * init.c: (scm_boot_guile, scm_boot_guile_1): New, simplified
6872 initialization procedure.
6873 - Delete in, out, err arguments; there are other perfectly good
6874 ways to override these when desired.
6875 - Delete result argument; this function shouldn't ever return.
6876 - Rename init_func argument to main_func, for less confusion.
6877 - Delete boot_cmd argument; main_func is more general.
6878 -Add 'closure' argument, to help people pass data to main_func
6879 without resorting to global variables.
6880 - Abort if reentered; don't bother returning an error code.
6881 - Call scm_init_standard_ports to set up the default/current
6882 standard ports; no need to pass them to scm_start_stack.
6883 - Remove code to evaluate the boot_cmd, and start the repl; let
6884 the user do something like that in main_func if they want.
6885 - Remove code to package up a return value; main_func can do any
6887 - Call exit (0), instead of returning.
6888 (scm_start_stack): Don't initialize the I/O ports here; that's
6889 weird. Delete in, out, err arguments. Move guts to
6890 scm_init_standard_ports, scm_stdio_to_port.
6891 (scm_init_standard_ports): New function, to set up current and
6892 default standard ports.
6893 (scm_start_stack, scm_restart_stack): Make these static.
6894 * init.h (scm_boot_guile): Adjust declaration.
6895 (scm_start_stack, scm_restart_stack): Remove externally
6896 visible declarations for these.
6897 (enum scm_boot_status): Removed; now scm_boot_guile never returns.
6899 * fports.c (scm_stdio_to_port): New function. Its guts used to be
6900 written out several times in scm_start_stack.
6901 * fports.h: New declaration for the above.
6903 * feature.c (scm_set_program_arguments): New function.
6904 * feature.h: New declaration for the above.
6906 * ports.c: Formatting tweak.
6908 Sun Oct 20 03:29:32 1996 Mikael Djurfeldt <mdj@kenneth>
6910 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
6911 ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
6912 for obtaining the address of a car or cdr field. Motivation:
6913 &SCM_CXR make assumptions about the internal structure of the
6916 * eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
6917 Motivation: see SCM_CXRLOC.
6919 * pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
6920 srcprop.h, tags.h, throw.c, unif.c: Added new selectors
6921 SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
6922 Motivation: Safer use. Some other macros are defined in terms of
6923 these operations. If these are defined using the SCM_SETCXR
6924 (<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
6925 to inefficiency and an <e1> with side-effects could potentially
6926 break. Also, these particular operations are heavily utilized in
6927 the garbage collector. In unoptimized code there will be a
6930 * alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
6931 eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
6932 ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
6933 pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
6934 procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
6935 strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
6936 vports.c: Cleaned up use of pairs: Don't make any special
6937 assumptions about the internal structure of selectors and
6938 mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
6939 SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
6940 (Among other things, this change makes it easier to build Guile
6941 with certain compilers which have problems with casted lvalues.)
6943 Fri Oct 18 01:11:56 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6945 * stacks.c: Improve selection of relevant stack frames when making
6946 a stack object. Introduce one level of indirection in the stack
6947 object to make it possible to "narrow" to a certain region of the
6948 stack. This facilitates making use of more clever algorithms (not
6949 implemented) for selecting relevant frames and gives a cleaner
6950 design since selection of frames can be done independently of
6951 extraction of frames from the real stack.
6952 (scm_stack_id): Also take #t as argument which means look at
6955 * stacks.h: In struct scm_stack: Turn field frames into a pointer.
6956 Turn n_tail into an integer directly representing current number
6957 of frames in stack. Add field tail.
6959 * ports.c (scm_port_line_x, scm_port_column_x): New mutators.
6961 * debug.c (scm_make_memoized): Made it available at scheme level.
6962 (scm_unmemoize, scm_memoized_environment): Bugfix: Check for
6963 SCM_NIMP before applying heavier predicates in argument checking.
6964 (scm_local_eval): Also take memoized object as argument.
6966 * backtrace.c (scm_display_error): Just a safety measure: Stacks
6967 aren't created with zero length, but should such a strange
6968 creature suddenly turn up...
6970 Wed Oct 16 11:08:41 1996 Marius Vollmer <mvo@zagadka.ping.de>
6972 * hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
6973 `del', for the sake of C++ compilers. (Patch applied by JimB.)
6975 Tue Oct 15 17:06:13 1996 Jim Blandy <jimb@floss.cyclic.com>
6977 * variable.c (scm_make_variable): Make the name hint optional, as
6979 (anonymous_variable_sym): Renamed from variable_sym. All uses
6982 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
6983 from scm_sys_try_load and scm_sys_try_load_path. The Scheme name
6984 of scm_primitive_load_path was also changed to
6985 "primitive-load-path", from "%try-load-path". Callers changed.
6986 We'd like to respect the convention that a function named
6987 "try-mumble" should behave just like the function called "mumble",
6988 but return #f instead of signalling some error.
6989 * load.h: Rename prototypes.
6991 Tue Oct 15 05:34:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
6993 * print.c (make_print_state, grow_print_state), print.h: Modified
6994 the print state representation: Don't use a tail array for
6995 recording of circular references. Resizing of the print state
6996 structure invalidates the print state pointer. To avoid passing
6997 around an indirect print state reference to all printing
6998 functions, we instead let the print state reference a resizable
7001 Mon Oct 14 19:25:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
7003 * alist.c (scm_sloppy_assq, scm_sloppy_assv, scm_sloppy_assoc):
7004 Don't crash when passed an improper list terminated by a
7005 non-immediate value.
7007 Mon Oct 14 19:08:33 1996 Jim Blandy <jimb@floss.cyclic.com>
7009 Allocate data for structures on an eight-byte boundary, as
7010 required by the tagging system.
7011 * struct.c (alloc_struct): New function.
7012 (scm_make_struct, scm_make_vtable_vtable): Call it.
7013 * struct.h (scm_struct_n_extra_words): Bump to 3.
7014 (scm_struct_i_ptr): New "field".
7015 * gc.c (scm_gc_sweep): When we need to free the data, use the
7016 information stored by alloc_struct to find the beginning of the
7017 block allocated to the structure, so we can free it.
7019 Mon Oct 14 17:07:55 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7021 * init.c (scm_boot_guile_1): Moved scm_init_struct in front of
7024 * debug.h (SCM_VOIDFRAME, SCM_VOIDFRAMEP): New macros.
7025 (scm_debug_info): New member: id.
7027 * stacks.c: Stacks are now represented as structs; Stacks have an
7028 id given to them by `start-stack'.
7029 (scm_last_stack_frame): Added predicates `stack?' and `frame?'.
7031 * stacks.h: Added declarations of scm_stack_p and scm_frame_p;
7032 Changed stack representation.
7034 * debug.c (scm_procedure_name): Try procedure property `name' for
7035 compiled closures aswell.
7037 * gc.c (scm_init_storage): Initialize scm_stand_in_procs to SCM_EOL.
7039 * eval.c: scm_i_name moved to gsubr.c
7040 (scm_m_define): Record names of all kinds of procedure
7041 objects. (Earlier, only closures were recorded.)
7043 * procprop.h: Added declaration of scm_i_name.
7045 * gsubr.c: Added global scm_i_name. Added #include "procprop.h".
7046 (scm_make_gsubr): Record names of compiled closures.
7048 Mon Oct 14 04:21:51 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7050 * debug.c, debug.h: Removed obsolete code.
7052 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
7053 stacks.c: Renamed regs --> scm_contregs.
7055 * print.c (scm_free_print_state): Cleanup print state before
7056 returning it to pool. It is better to do it here than in
7057 scm_prin1 since scm_prin1 is called often.
7059 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7060 s_set_source_property_x): Check that first argument is a pair or a
7063 * srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
7064 scm_i_line, scm_i_column and scm_i_breakpoint global.
7066 * init.c: Added #include "backtrace.h" and #include "stacks.h".
7067 (scm_boot_guile_1): Added calls to scm_init_backtrace and
7070 * debug.h: Added debug object smob declaration and macro
7073 * configure.in: Build with backtrace.o and stacks.o if debug
7076 * Makefile.in: Added entries for new files: backtrace.c,
7077 backtrace.h, stacks.c and stacks.h.
7079 * symbols.c (scm_sym2ovcell): Fixed documentation.
7081 * _scm.h (min, max): Added.
7083 * async.c: Moved `min' macro to _scm.h.
7085 * debug.h: New debug options SCM_BACKTRACE_MAXDEPTH and
7086 SCM_BACKTRACE_INDENT.
7088 * eval.c: Added new debug options `maxdepth' and `indent'.
7090 * print.c (make_print_state): Bugfix: Initialize pstate->ceiling.
7092 * print.h: Added selector SCM_PRINT_STATE.
7094 * print.c: New functions: scm_make_print_state,
7095 scm_free_print_state.
7097 * print.h: Added declarations for scm_make_print_state,
7098 scm_free_print_state.
7100 * debug.c (scm_m_start_stack): New acro.
7102 * debug.h: Small cleanup.
7104 * init.c (scm_boot_guile_1): Moved scm_init_debug below
7107 Sun Oct 13 20:14:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
7109 * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
7110 arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
7111 chars.c, chars.h, continuations.c, continuations.h, debug.c,
7112 debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
7113 eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
7114 filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
7115 gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
7116 hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
7117 kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
7118 markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
7119 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
7120 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
7121 procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
7122 root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
7123 simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
7124 stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
7125 strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
7126 struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
7127 unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
7128 version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
7129 declare functions with prototypes. (Patch thanks to Marius
7132 More prototype-related changes from Marius Vollmer:
7133 * gdb_interface.h: Wrapped header file in #ifdef/#endif
7134 * gscm.h (gscm_run_scm): Added prototype for `initfn' paramter.
7135 * ports.h (ptobfuns): Added prototypes. This means some casting in
7137 * fports.c: Added casts for initializations, since the functions
7138 are defined to take FILE * as their stream argument, not SCM.
7139 * fdsocket.c, fdsocket.h: Made `init_addr_buffer' static.
7140 * genio.c (scm_gen_puts): Changed `unsigned char *str_data' parameter
7141 to `char *str_data' to conform to prototype.
7143 Sat Oct 12 21:49:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7145 * error.c, eval.c, load.c, stackchk.c: use scm_error not lgh_error.
7147 * __scm.h (lgh_error): removed, lgh shouldn't be in libguile.
7149 * stime.c, stime.h: use SCM_P method.
7151 Sat Oct 12 16:16:25 1996 Jim Blandy <jimb@floss.cyclic.com>
7153 * eval.c (scm_nconc2last): Don't accept an empty list; apply must
7154 be given at least two arguments. Insist that lst's last element
7155 be a list, but don't make any requirements of its predecessors.
7157 Fri Oct 11 03:58:25 1996 Jim Blandy <jimb@floss.cyclic.com>
7159 * eval.c (scm_nconc2last): Revert last change; there seems to be
7160 other stuff going on here.
7162 Fri Oct 11 02:43:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
7164 * eval.c (scm_nconc2last): Make sure that each element of lst
7165 (which is a list of argument lists, except for the tail) is a
7166 proper list, i.e., finite and terminated by '().
7168 Thu Oct 10 21:09:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
7170 * unif.c (scm_ra_set_contp): Localize `inc' declaration.
7173 * struct.c (scm_make_struct, scm_make_vtable_vtable): Use the
7174 symbolic name for the tag, scm_tc3_cons_gloc, instead of just
7177 * vectors.c (scm_make_vector): Fill vectors with the undefined
7178 value, to help make Guile Scheme code more portable to other
7181 * symbols.c (scm_intern_obarray_soft, scm_sysintern): Doc fixes.
7182 * symbols.h, tags.h: Doc fixes.
7184 Wed Oct 9 19:39:29 1996 Jim Blandy <jimb@floss.cyclic.com>
7186 * async.c (scm_take_signal): Doc fixes.
7188 Mon Oct 7 22:30:34 1996 Jim Blandy <jimb@totoro.cyclic.com>
7190 * numbers.c (scm_divbigint): When the remainder is zero, we don't
7191 want to subtract it from the modulus; we just want to leave it
7194 Mon Oct 7 00:14:17 1996 Mikael Djurfeldt <mdj@kenneth>
7196 * init.c (scm_boot_guile_1): Bugfix: i --> base in argument to
7199 * throw.h (scm_catch_apply): Removed the `lazyp' argument.
7201 * throw.c (scm_catch_apply): Finished implementation of
7204 Sun Oct 6 05:26:05 1996 Gary Houston <ghouston@actrix.gen.nz>
7206 * filesys.c (scm_sys_select): move SCM_ALLOW_INTS past the sreturn
7208 (scm_init_filesys): set "i/o-extensions" feature.
7211 Sat Oct 5 12:22:00 1996 Jim Blandy <jimb@floss.cyclic.com>
7213 * Makefile.in (root.o): Correct dependencies.
7215 Sat Oct 5 18:40:42 1996 Mikael Djurfeldt <mdj@kenneth>
7217 * Makefile.in: Added dependency entry for root.o.
7219 * continuations.c, debug.[ch], eval.c, gscm.c init.c, root.c,
7220 throw.c: Renamed last_debug_info_frame -> scm_last_debug_frame.
7222 * init.c (scm_start_stack): Set initial root continuation number
7225 * procs.c: New function: scm_thunk_p.
7227 * procs.h: Added declarations of scm_thunk_p.
7229 * root.c: Renamed `call-with-new-root' -->
7230 `call-with-dynamic-root'.
7231 (cwdr): Removed allocation of new root state. This should be done
7232 separately by use of scm_make_root.
7233 (scm_apply_with_dynamic_root): New function: Does what it
7234 sounds like. Needed when spawning threads.
7236 * root.h: Added member last_debug_frame to root state.
7237 Added #include "libguile/debug.h"
7239 * throw.c: Renamed scm_catch --> scm_catch_apply and added more
7240 arguments. The motivation is that code in root.c needs catch
7241 functionality, and we want to avoid code duplication.
7242 New functions: scm_catch, scm_lazy_catch. These are wrappers for
7243 scm_catch_apply. scm_lazy_catch is intended to introduce catch
7244 handlers that run without popping the stack into the dynwind
7247 * throw.h: Added prototypes for scm_catch_apply and
7250 Thu Oct 3 11:12:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7252 * root.h (scm_root, scm_set_root): Decouple thread support details
7253 by introducing the selector SCM_THREAD_LOCAL_DATA and the mutator
7254 SCM_SET_THREAD_LOCAL_DATA.
7256 * print.c (scm_iprlist): Bugfix: Added SCM_ECONSP tests in hare
7257 and tortoise scanning loop.
7259 Thu Oct 3 00:04:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
7261 * Makefile.in: Rebuild dependencies.
7263 * libguile.h: #include "libguile/print.h" before "smob.h", since
7264 the latter uses the print_state structure.
7266 * throw.c (scm_ithrow): Use the correct variable when checking to
7267 see if a given element of scm_dynwinds is a valid catch.
7269 * throw.c (scm_ithrow): If scm_dynwinds has invalid list
7270 structure, abort; don't just silently ignore the garbage.
7272 * _scm.h: #include "print.h" here, since it seems to be used just
7274 * eval.c, gdbint.c, genio.h, numbers.h, smob.h, srcprop.c,
7275 strports.c, unif.h: Don't #include "print.h".
7277 Tue Oct 1 05:15:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7279 * feature.h (scm_loc_features): Removed external declaration.
7280 (Bug fix suggested by Petr Adamek <adamek@mit.edu>.)
7282 Tue Oct 1 00:00:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7284 * feature.c (scm_init_feature): Added threads feature (needs to be
7285 initialized here, since features doesn't exist when
7286 scm_init_threads is called).
7288 * libguile.h: Added #include "libguile/../threads/threads.h".
7289 (This is a kludge to get thread support working. This should be
7292 * configure.in, acconfig.h: Added flags for thread support.
7294 * scmsigs.c: Define `signal' to be `pthread_signal' if using
7297 * gc.c (scm_igc): Added SCM_THREAD_CRITICAL_SECTION_START and
7298 SCM_THREAD_CRITICAL_SECTION_END. Moved marking of root data to
7301 * _scm.h: Added conditional #include "threads.h"
7303 * __scm.h (SCM_ASYNC_TICK): Added call to macro
7304 SCM_THREADS_SWITCHING_CODE.
7306 * init.c (scm_start_stack): Call `scm_make_root' to dynamically
7307 allocate the basic dynamic root object.
7308 (scm_boot_guile): Added call to scm_init_root.
7310 * root.c, root.h: Added root smob.
7311 (cwdr, scm_call_with_new_root, scm_dynamic_root, scm_app_wdr): New
7312 functions: Implements dynamic roots mostly according to spec in
7313 SCM manual. Main difference is that the second argument is a
7314 throw handler rather than an error "thunk".
7316 * root.h: Added declaration of scm_init_root.
7318 * root.c: Added #include "genio.h", #include "smob.h", #include
7319 "pairs.h", #include "throw.h", #include "dynwind.h", #include
7321 (scm_init_root): Added #include "root.x".
7323 * throw.c: Added #include "stackchk.h"
7324 (scm_catch): Changed SCM_DEFER_INTS --> SCM_REDEFER_INTS and
7325 SCM_ALLOW_INTS --> SCM_REALLOW_INTS. This is so that scm_catch
7326 can be used in scm_call_with_new_root; Added reenabling of stack
7327 checking when catching a throw.
7329 Mon Sep 30 21:48:11 1996 Jim Blandy <jimb@totoro.cyclic.com>
7331 * list.c, list.h: Use SCM_P instead of CPP hair. Doc fixes.
7333 * list.c (scm_member, scm_memv, scm_memq): Return #f if a matching
7334 element is not found, as per R4RS.
7336 Sat Sep 28 18:13:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
7338 * list.c: Doc fixes throughout.
7340 Sat Sep 28 02:07:43 1996 Gary Houston <ghouston@actrix.gen.nz>
7342 * strings.c, strings.h: (scm_makfrom0str, scm_makefrom0str_opt:
7343 declare the char * to be const. Avoids a warning in rgx.c.
7345 * ports.h: spelling fix.
7347 * filesys.c (scm_sys_stat, scm_sys,lstat): include file name in
7350 * load.c (scm_sys_try_load_path): throw an error if file not found
7351 (like it says it in NEWS).
7353 Fri Sep 27 18:27:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
7355 * symbols.c (scm_intern_obarray_soft): Initialize the new symbol's
7356 PROPS slot to '(), not #f; it's an empty alist.
7358 * throw.h, throw.c: Use SCM_P instead of #if hair.
7360 Remove special support for uncaught throws; see throw.c for
7362 * throw.c (uncaught_throw): New function.
7363 (scm_ithrow): Call uncaught_throw if we don't find a throw
7364 target; don't mess with scm_bad_throw_vcell.
7365 (scm_bad_throw_vcell): Variable deleted.
7366 (scm_init_throw): Don't initialize it.
7368 * throw.c (scm_ithrow): Don't let outer key matches shadow inner
7371 Wed Sep 25 04:35:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
7373 * numbers.c (scm_istr2int): If the number is short (as most
7374 numbers are), just call scm_small_istr2int to deal with it.
7375 (scm_small_istr2int): New function, created by un-#ifdefing the
7376 non-bignum version of scm_istr2int and renaming it.
7378 Tue Sep 24 06:48:38 1996 Gary Houston <ghouston@actrix.gen.nz>
7380 * load.c (scm_sys_try_load): don't check whether value returned
7381 by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
7382 Change the Scheme name from %try-load to primitive-load.
7384 * error.c (scm_error): convert a NULL message to SCM_BOOL_F.
7385 Can avoid passing a message, allowing it to be derived in the
7386 error handler (e.g., if we want to throw to the key both from
7389 Mon Sep 23 00:42:15 1996 Mikael Djurfeldt <mdj@kenneth>
7391 * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
7392 references now have a new appearance which is more compact and
7393 also gives a clue about what the target of the reference is.
7394 By setting parameters in the print state, more fancy printing can
7395 be achieved. This is used by the (not yet commited) backtrace
7398 Sun Sep 22 17:10:06 1996 Mikael Djurfeldt <mdj@kenneth>
7400 * eval.c, numbers.h, unif.h, smob.h, srcprop.c: Added #include
7403 * print.c: Added #include "struct.h". Removed function
7406 * print.h: Modified prototypes for scm_iprlist, scm_prin1 and
7407 scm_iprin1. Removed prototype for scm_prlist.
7409 * arbiters.c (prinarb),
7410 async.c (print_async),
7411 debug.c (prindebugobj, prinmemoized),
7412 eval.c (prinprom, prinmacro),
7413 filesys.c (scm_fd_print, scm_dir_print),
7415 mallocs.c (prinmalloc),
7416 numbers.c, numbers.h (scm_floprint, scm_bigprint),
7417 smob.h (scm_smobfuns),
7418 srcprop.c (prinsrcprops),
7420 unif.c, unif.h (scm_raprin1, rapr1),
7421 variable.c (prin_var): Changed argument `int writing' to
7422 `scm_print_state *pstate'.
7424 * init.c (scm_boot_guile): Moved scm_init_struct upwards so
7425 that it will be called before scm_init_print.
7427 * print.c (scm_prin1): Print states are now allocated when calling
7428 scm_prin1 and then passed around to all printing functions as an
7429 argument. A cache `print_state_pool' enables reuse of print
7431 (scm_make_print_state): New function.
7432 (scm_iprin1): Adaption to print states.
7433 (scm_iprlist): An initial "hare and tortoise" scan brings down
7434 time complexity to O (depth * N). (Better time complexity will be
7435 achieved when the printing code is completely rewritten.)
7437 Fri Sep 20 22:01:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
7439 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): Use AC_CACHE_CHECK instead of
7440 AC_CACHE_VAL; #define UTIMBUF_NEEDS_POSIX outside AC_CACHE_VAL, so
7441 it gets done whether or not the cache variable has a value.
7443 Thu Sep 19 17:06:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
7445 Distinguish #f and ().
7446 * __scm.h: #undef SICP.
7447 * pairs.h (SCM_EOL): Delete this definition, equating it with
7449 * tags.h (SCM_EOL): Give it a new definition here; I think I found
7450 the value it used to have. Doc fixes, too.
7452 Thu Sep 19 15:33:51 1996 Mikael Djurfeldt <mdj@kenneth>
7454 * struct.c (scm_make_struct_layout, init_struct, scm_struct_ref,
7455 scm_struct_set_x), struct.h, gc.c (scm_gc_mark): Completed Tom
7456 Lord's implementation of structs, allowing for tail arrays as
7457 described in the manual. Also fixed some bugs. (Both the interface
7458 and the implementation should be improved.)
7460 * read.c (scm_init_read): Removed #ifdef READER_EXTENSIONS
7462 * print.c, print.h: Closures now print like #<procedure foo (x)>.
7463 People who whish to see the source can do `(print-enable 'source)'.
7464 Removed #ifdef DEBUG_EXTENSIONS.
7466 Thu Sep 19 00:00:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7468 * filesys.c (scsm_sys_stat): don't SIGSEGV if argument is an
7469 integer (assuming for now accepting an integer is a good thing).
7471 * error.c, fports.c: replace use of %S in lgh_error args with %s.
7472 %S will be used instead for write'ing arguments.
7474 * unif.c (scm_transpose_array): change arguments in the SCM_WNA
7475 asserts. fix a few other asserts.
7476 (scm_aind, scm_enclose_array, scm_array_in_bounds_p,
7477 scm_uniform_vector_ref, scm_array_set_x,
7478 scm_dimensions_to_unform_array): change args in
7479 SCM_WNA SCM_ASSERTS and change scm_wta's to scm_wrong_num_args.
7480 strop.c (scm_substring_move_left_x, scm_substring_move_right_x,
7481 scm_substring_fill_x): likewise.
7482 gsubr.c (scm_gsubr_apply): likewise.
7483 eval.c (SCM_APPLY): likewise.
7485 * eval.c (4 places): replace scm_everr with lgh_error or
7488 * error.c, error.h (scm_wrong_num_args, scm_wrong_type_arg,
7489 scm_memory_error): new procedures.
7490 scm_everr: deleted. can use scm_wta, dropping first two args.
7491 scm_error: convert NULL subr to SCM_BOOL_F.
7493 * __scm.h: don't define SCM_STACK_OVFLOW, SCM_EXIT, SCM_ARG6, SCM_ARG7,
7496 * stackchk.c (scm_report_stack_overflow): use lgh_error instead
7499 * error.c, error.h: new error keys: scm_arg_type_key,
7500 scm_args_number_key, scm_memory_alloc_key, scm_stack_overflow_key,
7502 scm_wta: reimplement using lgh_error instead of scm_everr.
7504 Wed Sep 18 17:13:35 1996 Mikael Djurfeldt <mdj@kenneth>
7506 * gdbint.c: scm_lread now has one more argument.
7508 * ports.c, ports.h: Name change: scm_\(line\|column\)_number -->
7509 scm_port_\1; Added mutator scm_set_port_filename_x (used when
7510 loading source from non-file ports, which, e. g., happens when
7511 using the Emacs interface).
7513 * fports.c (scm_open_file): Don't call scm_makfrom0str on a scheme
7516 * read.c: Added code for recording of positions of source code
7517 expressions; New functions: recsexpr, scm_lreadrecparen;
7518 _scm_make_srcprops --> scm_make_srcprops
7519 (scm_flush_ws): Removed updating of positions counters. This work
7520 is already done by scm_gen_getc
7522 * read.h: Added prototype for scm_lreadrecparen
7524 * print.c: Added #include "alist.h"
7526 * eval.c: Added #include "hash.h"
7528 * eq.c: Added #include "ramap.h"
7530 * options.c: Documentation fixes.
7532 * srcprop.c (scm_finish_srcprop): Bugfix: update ptr.
7533 (scm_init_srcprop): Adjusted size of initial source-whash. Name
7534 changes: tc16_srcprops --> scm_tc16_srcprops, _scm_make_srcprops
7535 --> scm_make_srcprops
7537 * srcprop.h: Name changes: tc16_srcprops --> scm_tc16_srcprops,
7538 _scm_make_srcprops --> scm_make_srcprops; Remove one layer of
7539 function calls in the definition of the whash access macros.
7541 Tue Sep 17 11:33:16 1996 Lee Iverson <leei@Canada.AI.SRI.COM>
7543 * init.c (scm_boot_guile): Add level of indirection to
7544 scm_boot_guile_1() to ensure that stack base pointer is properly
7545 initialized. There was no guarantee that variable i was the
7546 highest/lowest variable on stack (i.e. the call frame of
7547 scm_boot_guile was not completely protected from gc).
7549 Tue Sep 17 01:40:56 1996 Gary Houston <ghouston@actrix.gen.nz>
7551 * ports.h (scm_port_table): put back file_name, it will be used to
7552 support debugging. Undo related changes in fports.c, ioext.c,
7555 Sun Sep 15 03:58:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7557 * ports.h (scm_port_table): remove file_name member for now, it seems
7559 * fports.c (scm_open_file): don't set file_name in PTAB.
7560 (prinfport): don't use file_name in PTAB.
7561 * ioext.c (scm_sys_duplicate_port): don't set file_name in PTAB.
7562 * ports.c (scm_add_to_port_table): don't intialize file_name.
7563 (scm_port_file_name): remove for now.
7564 * gc.c (scm_gc_mark): don't mark PTAB file_name.
7566 * fports.h (scm_mkfile): prototype deleted.
7567 * fports.c (scm_mkfile): merged into scm_open_file to simplify.
7569 * debug.c, unif.c: use scm_out_of_range instead of
7570 wta for range errors (ASSERT still needs work).
7572 * error.c, error.h (scm_out_of_range): new procedure.
7574 * error.c, error.h (scm_out_of_range_key): new key.
7576 * posix.c (scm_sync): #else was missing.
7578 * error.c, error.h: append _key to names scm_num_overflow and
7581 * __scm.h (SCM_SYSMISSING, SCM_NUM_OVERFLOW): use SCM_BOOL_F instead
7582 of consing an empty list.
7583 (SCM_SYSERROR etc.): move into error.c, make them procedures instead
7584 of macros, saves code and string space.
7585 error.c, fports.c, numbers.c, posix.c, ioext.c, filesys.c, socket.c,
7586 fdsocket.c, simpos.c: change names of SCM_SYSERROR etc., to
7587 lower case. Rename scm_syserror_m to scm_syserror_msg.
7588 error.h: prototypes for new procedures.
7590 Sat Sep 14 03:35:41 1996 Gary Houston <ghouston@actrix.gen.nz>
7592 * numbers.c: use SCM_NUM_OVERFLOW instead of scm_wta or ASSERT.
7594 * error.c, error.h: setup scm_num_overflow key.
7596 * __scm.h: SCM_NUM_OVERFLOW: macro for reporting numerical overflow.
7597 Remove definition of SCM_OVSCM_FLOW.
7599 * fports.c (scm_open_file): use SCM_SYSERROR_M.
7601 * __scm.h: SCM_SYSERROR_M: new macro for system errors with an
7602 explicit message and args.
7604 * error.c, error.h, __scm.h: change system_error_sym to
7607 * error.c (system_error_sym): remove leading %% from the Scheme name
7610 * __scm.h (SCM_SYSMISSING): Redefine using lgh_error.
7612 Fri Sep 13 12:58:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7614 * __scm.h, chars.c, debug.c, eval.c, eval.h, extchrs.c, extchrs.h,
7615 fdsocket.c, feature.c, mbstrings.c, mbstrings.h, numbers.c,
7616 numbers.h, print.c, scmhob.h, simpos.h, symbols.c, symbols.h,
7617 tags.h, throw.c, variable.h: Name cleanup. Lots of xxxSCM_yyy
7618 renamed. (These were introduced by unsupervised name
7621 Fri Sep 13 01:19:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7623 * print.c: Added code for detection of circular references during
7624 printing. (init_ref_stack, grow_ref_stack): New functions. Added
7625 a hook for printing of closures (accessible via print options).
7626 This leads to a split of calls to scm_iprin1 into two classes:
7627 elementary print operations (e. g. the code which prints a smob)
7628 still use scm_iprin1 while top level calls (like scm_display) use
7629 scm_prin1. scm_prin1 begins by clearing the data structure used
7630 to record reference information.
7632 * print.h: Added declarations of scm_prin1 and scm_prlist.
7634 * strports.c (scm_strprint_obj): scm_iprin1 --> scm_prin1
7636 * gscm.c (gscm_portprint_obj): scm_iprin1 --> scm_prin1
7638 * gscm.h (gscm_print_obj): scm_iprin1 --> scm_prin1
7640 * error.c (err_head): scm_iprin1 --> scm_prin1
7642 * debug.c: Adjusted header comment.
7646 Wed Sep 11 17:55:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
7648 * strerror.c: Doc fix.
7650 Thu Sep 12 00:00:32 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7652 * gdbint.c (gdb_read): Now possible to run during GC.
7653 (unmark_port, remark_port): New functions.
7655 * symbols.h (SCM_SETLENGTH): Use SCM_SETCAR.
7657 * read.c (scm_grow_tok_buf): Use scm_vector_set_length_x instead
7658 of allocating a new string object. Also, increase size by
7659 the factor 2 instead of 1.5.
7661 Wed Sep 11 15:10:38 1996 Petr Adamek <jimb@floss.cyclic.com>
7663 * __scm.h (SCM_P): Corrected to run under traditional C.
7665 * _scm.h (SCM_PROC): Extraneous semicolon (outside functions)
7668 * async.c: Calls to scm_sysintern corrected.
7670 * async.h (scm_async_clock): Redundant declaration removed.
7672 * continuations.c (scm_dynthrow): Redundant declaration removed.
7674 * debug.c (scm_single_step, scm_memoized, scm_lookup_soft):
7675 Definition typos corrected.
7677 * debug.h: Missing declarations of functions in debug.c added
7680 * eval.h (scm_eval_args, scm_deval_args, scm_m_undefine):
7681 Missing declarations to functions in eval.c added.
7683 * filesys.c: Possibly uninitialized variable rv.
7685 * gc.h (scm_object_addr, scm_unhash_name): Missing
7686 declarations of functions defined in gc.c added.
7688 * genio.c: Possible typos str_data -> wstr_data. ???
7690 * genio.c: Possibly unintended shadowing of local variable
7691 `int c' (gotos out of scope of inner `c'). ???
7693 * init.c: Uninitialized `SCM last' may be used.
7695 * ioext.h: (scm_sys_isatty_p): Typo.
7697 * list.h (scm_list_head): Missing prototype for function in
7700 * numbers.c (scm_two_doubles): Changed from extern to static
7701 (is used only within numbers.c).
7703 * numbers.h: Repeated declarations removed.
7705 * ports.h (scm_close_all_ports_except): Declaration for the
7706 function defined in ports.c added.
7708 * posix.h: Missing declarations added.
7710 * procs.h (scm_make_subr_opt): Missing declaration added.
7712 * socket.h (scm_sys_gethost): Missing declaration added.
7714 * socket.h: Redundant declarations removed (they are in fdsocket.h).
7716 * srcprop.h (scm_set_source_property_x, scm_finish_srcprop):
7717 Missing declarations added.
7719 * stime.h (scm_get_internal_real_time): Repeated declarations removed.
7721 * struct.c: Uninitialized variable `SCM answer' may be used.
7723 * unif.c (l2ra): Declaration prototype.
7725 * unif.c (scm_array_equal_p): Dummy definition removed (it is
7726 defined in ramap.c).
7728 * unif.h (scm_raprin1, scm_istr2bve, scm_array_equal_p):
7729 Redundant declarations removed (they are in ramap.h).
7731 * variable.h (scm_make_udvariable,
7732 scm_make_undefined_variable): Declaration corrected to
7733 correspond variable.c.
7735 * vectors.h (scm_vector_move_left_x, scm_vector_move_right_x):
7736 Missing declarations added.
7738 Wed Sep 11 14:38:50 1996 Jim Blandy <jimb@floss.cyclic.com>
7740 * Makefile.in (distclean): Don't forget to delete fd.h.
7742 Tue Sep 10 14:01:46 1996 Jim Blandy <jimb@floss.cyclic.com>
7744 * fd.h.in, tags.h: Trivial cleanups.
7746 * marksweep.c, marksweep.h: Deleted; marksweep.c was empty, and
7747 marksweep.h just declared functions from gc.c.
7748 * gc.h, libguile.h: Don't #include "marksweep.h".
7749 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
7750 marksweep.o, marksweep.h, marksweep.c, and marksweep.x. Other
7751 dependencies updated.
7753 * libguile.h: Don't #include "files.h"; it's been deleted.
7755 * files.c (scm_sys_delete_file): Moved to filesys.c.
7756 File is now empty; deleted.
7758 * filesys.c: scm_sys_delete_file is now here. Remove
7759 #if's; they seem to rely on remnants of an old portability
7760 regimen. If the problems come up again, solve them properly,
7761 using autoconf. Specifically: Don't test M_SYSV, and #define
7762 remove to be unlink if it's #defined; don't use remove just
7763 because HAVE_STDC_HEADERS is #defined.
7764 * filesys.h: Add declarations for scm_sys_delete_file.
7765 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
7766 files.o, files.h, files.c, and files.x.
7767 * init.c: Don't #include "files.h", and don't call scm_init_files.
7769 Use SCM_P instead of PROTO; the latter intrudes on the user's
7771 * params.h: Deleted; definition of SCM_P moved to...
7772 * __scm.h: ... here, where it replaces PROTO macro.
7773 * libguile.h, smob.h: Don't #include "params.h".
7774 * continuations.c, error.h, feature.h, gc.c, gc.h, init.h, load.h,
7775 smob.h: Fix prototypes accordingly.
7776 * Makefile.in: Update dependencies.
7777 (inner_h_files): Remove params.h.
7779 * gc.c: #include "gc.h"; every module should include its header,
7780 to let the compiler cross-check the declarations against the
7783 * eq.h, files.h, hashtab.h, load.h, mallocs.h, scmsigs.h,
7784 simpos.h: #include "libguile/__scm.h".
7786 Mon Sep 9 20:00:15 1996 Jim Blandy <jimb@floss.cyclic.com>
7788 * init.c: Don't forget to #include smob.h and init.h.
7789 * Makefile.in: Dependencies updated.
7791 * smob.h: Use PROTO instead of #if __STDC__.
7793 * continuations.c (scm_dynthrow): Use PROTO, not SCM_P.
7795 * __scm.h: Doc fixes.
7797 * __scm.h, libguile.h: Use "quotes" in the #includes, not
7798 <angles>; this allows `make depends' to work properly.
7800 * libguile.h: #include smob.h and pairs.h before the others; they
7801 define typedefs used by other headers.
7803 C files should #include only the header files they need, not
7804 libguile.h (which #includes all the header files); the pointless
7805 recompilation was wasting my time.
7806 * Makefile.in (all .o dependency lists): Regenerated.
7807 * libguile.h: Don't try to get a definition for size_t here...
7808 * __scm.h: Do it here.
7809 * _scm.h: Since this is the internal libguile header, put things
7810 here that all (or a majority) of the libguile files will want.
7811 Don't #include <libguile.h> here; that generates dependencies on
7812 way too much. Instead, get "__scm.h", "error.h", "pairs.h",
7813 "list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h",
7814 "boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and
7816 * alist.c: Get "eq.h", "list.h", "alist.h".
7817 * append.c: Get "append.h", "list.h".
7818 * arbiters.c: Get "arbiters.h", "smob.h".
7819 * async.c: Get "async.h", "smob.h", "throw.h", "eval.h".
7820 * boolean.c: Get "boolean.h".
7821 * chars.c: Get "chars.h".
7822 * continuations.c: Get "continuations.h", "dynwind.h", "debug.h",
7824 * debug.c: Get "debug.h", "feature.h", "read.h", "strports.h",
7825 "continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h",
7826 "genio.h", "throw.h", "eval.h".
7827 * dynwind.c: Get "dynwind.h", "alist.h", "eval.h".
7828 * eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h",
7830 * error.c: Get "error.h", "throw.h", "genio.h", "pairs.h".
7831 * eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h",
7832 "hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h",
7833 "continuations.h", "eq.h", "sequences.h", "alist.h", "append.h",
7835 * fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h".
7836 * feature.c: Get "feature.h".
7837 * files.c: Get "files.h".
7838 * filesys.c: Get "filesys.h", "smob.h", "genio.h".
7839 * fports.c: Get "fports.h", "markers.h".
7840 * gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h",
7841 "genio.h", "struct.h", "stackchk.h", "stime.h".
7842 * gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h",
7843 "read.h", "strports.h", "tag.h".
7844 * genio.c: Get "genio.h", "chars.h".
7845 * gsubr.c: Get "gsubr.h", "genio.h".
7846 * hash.c: Get "hash.h", "chars.h".
7847 * hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h".
7848 * init.c: Get everyone who has an scm_init_mumble function:
7849 "weaks.h", "vports.h", "version.h", "vectors.h", "variable.h",
7850 "unif.h", "throw.h", "tag.h", "symbols.h", "struct.h",
7851 "strports.h", "strorder.h", "strop.h", "strings.h", "stime.h",
7852 "stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h",
7853 "scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h",
7854 "print.h", "posix.h", "ports.h", "pairs.h", "options.h",
7855 "objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h",
7856 "list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h",
7857 "gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h",
7858 "feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h",
7859 "dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h",
7860 "async.h", "arbiters.h", "append.h", "alist.h".
7861 * ioext.c: Get "ioext.h", "fports.h".
7862 * kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h".
7863 * list.c: Get "list.h", "eq.h".
7864 * load.c: Get "load.h", "eval.h", "read.h", "fports.h".
7865 * mallocs.c: Get "smob.h", "genio.h".
7866 * markers.c: Get "markers.h".
7867 * mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h",
7869 * numbers.c: Get "unif.h", "genio.h".
7870 * objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h".
7871 * options.c: Get "options.h".
7872 * ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h",
7873 "markers.h", "chars.h", "genio.h".
7874 * posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h",
7875 "read.h", "scmsigs.h", "genio.h", "fports.h".
7876 * print.c: Get "print.h", "unif.h", "weaks.h", "read.h",
7877 "procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h",
7879 * procprop.c: Get "procprop.h", "eval.h", "alist.h".
7880 * procs.c: Get "procs.h".
7881 * ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h",
7882 "chars.h", "smob.h", "unif.h".
7883 * read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h",
7884 "eval.h", "genio.h", "chars.h".
7885 * root.c: Get "root.h", "stackchk.h".
7886 * scmsigs.c: Get "scmsigs.h".
7887 * sequences.c: Get "sequences.h".
7888 * simpos.c: Get "simpos.h", "scmsigs.h".
7889 * smob.c: Get "smob.h".
7890 * socket.c: Get "socket.h", "feature.h".
7891 * srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h",
7892 "alist.h", "smob.h".
7893 * stackchk.c: Get "stackchk.h", "genio.h".
7894 * stime.c: Get "stime.h"."libguile/continuations.h".
7895 * strings.c: Get "strings.h", "chars.h".
7896 * strop.c: Get "strop.h", "chars.h".
7897 * strorder.c: Get "strorder.h", "chars.h".
7898 * strports.c: Get "strports.h", "print.h", "eval.h", "unif.h".
7899 * struct.c: Get "struct.h", "chars.h".
7900 * symbols.c: Get "symbols.h", "mbstrings.h", "alist.h",
7901 "variable.h", "eval.h", "chars.h".
7902 * tag.c: Get "tag.h", "struct.h", "chars.h".
7903 * throw.c: Get "throw.h", "continuations.h", "debug.h",
7904 "dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h".
7905 * unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h",
7906 "smob.h", "genio.h", "eval.h", "chars.h".
7907 * variable.c: Get "variable.h", "smob.h", "genio.h".
7908 * vectors.c: Get "vectors.h", "eq.h".
7909 * version.c: Get "version.h".
7910 * vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h".
7911 * weaks.c: Get "weaks.h".
7913 * stackchk.h: #include "libguile/debug.h",
7915 * print.h, read.h: #include "options.h", since everyone who uses
7916 either of these files will need that.
7918 * smob.h: #include "ports.h", "genio.h", and "print.h", since
7919 anyone who uses this file will need them to define the smob
7920 printing functions. Also, get markers.h, since people will need
7921 to #define the mark functions.
7923 * smob.h (scm_ptobfuns, SCM_PTOBNUM): Definitions moved...
7924 * ports.h: ... to here.
7926 * ports.h (scm_port_table_size): Explicitly give type as 'int';
7927 don't rely on archaic C default type rules.
7929 * fports.h: #include "libguile/ports.h", since you need that in
7930 order to parse this.
7932 * genio.h: #include "libguile/print.h", because you need that to
7933 parse this; don't bother #including "ports.h", since print.h gets
7936 * error.h: Don't #include "pairs.h"; _scm.h will do that now.
7938 * eval.h (scm_top_level_lookup_thunk_var): Remove declaration for
7939 this; it's now a reference to an element of *scm_root.
7941 * debug.h: Don't #include "options.h"; the compiler won't be able
7942 to find that once the headers are installed; instead, #include
7943 "libguile/options.h".
7944 * gc.h: Same, with marksweep.h.
7945 * mbstrings.h: Same, with symbols.h.
7946 * scmhob.h: Same, with _scm.h.
7947 * smob.h: Same, with params.h.
7949 * Makefile.in (depends): Don't nuke scmconfig.h and the generated
7950 C files; there's no need for this, and it forces recompilations
7953 Sat Sep 7 06:57:23 1996 Gary Houston <ghouston@actrix.gen.nz>
7955 * error.c (scm_error): declare scm_error_callback.
7957 * error.h: prototype for scm_error_callback.
7959 * __scm.h: define lgh_error.
7960 (SCM_SYSERROR): redefine using lgh_error.
7962 Thu Sep 5 22:40:06 1996 Gary Houston <ghouston@actrix.gen.nz>
7964 * error.c (scm_error): new procedure.
7966 * error.h: prototype for scm_error.
7968 * Makefile.in (install): install scmconfig.h from the current
7969 directory, not $(srcdir).
7971 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
7973 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
7974 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
7975 feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
7976 hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
7977 mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
7978 posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
7979 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
7980 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
7981 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
7982 vports.h, weaks.h: #include "libguile/__scm.h", not
7983 <libguile/__scm.h>. This allows 'gcc -MM' to determine which
7984 dependencies are within libguile properly.
7986 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
7988 * Makefile.in (.c.x): Simplify; there's no need to run this rule
7989 when scmconfig.h doesn't exist.
7991 * load.c (scm_sys_try_load): Correct spelling.
7993 * feature.c (scm_loc_features): Make this static.
7995 * Makefile.in (libpath.h): Omit trailing slash from path. We
7996 shouldn't require it of users, so why put it here?
7998 Move code to initialize and search %load-path from ice-9 to C
7999 code, so we can use the load-path to find the ice-9 boot code;
8000 this makes it easier to run Guile without installing it. See
8001 corresponding changes in guile/Makefile.in.
8002 * feature.c: Move stuff concerned with the load path to load.c.
8003 (scm_compiled_library_path): Deleted.
8004 Don't #include libpath.h here.
8005 * feature.h: Don't mention scm_compiled_library_path.
8006 * load.c: #include "libpath.h" here, as well as <sys/types.h>,
8007 <sys/stat.h>, and <unistd.h> (if present).
8008 (R_OK): #define if the system hasn't deigned to.
8009 (scm_loc_load_path): New variable.
8010 (scm_init_load_path, scm_sys_search_load_path,
8011 scm_sys_try_load_path): New functions.
8012 (scm_init_load): Initialize scm_loc_load_path to point to the
8013 value cell of the Scheme %load-path variable.
8014 * load.h: Add declarations for scm_sys_search_load_path,
8015 scm_sys_try_load_path.
8016 * init.c: Call scm_init_load_path.
8017 * Makefile.in (feature.o, load.o): Dependencies updated.
8019 * load.c, load.h: Rewrite using PROTO macro.
8021 Thu Sep 5 01:54:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8023 * gc.c (scm_cellp): New function: C predicate to determine if an
8024 SCM value can be regarded as a pointer to a cell on the heap.
8026 * gc.h: Added declaration of scm_cellp.
8028 * gdb_interface.h: New file: The GDB interface header from the GDB
8031 * gdbint.c: New file: GDB interface.
8033 * gdbint.h: New file: GDB interface.
8035 * libguile.h: Added #include <libguile/gdbint.h>.
8037 * init.c (scm_boot_guile): Added scm_init_gdbint.
8039 * Makefile.in: Added gdb_interface.h, gdbint.[hc].
8040 Added -I.. to INCLUDE_CFLAGS (otherwise the include files won't be
8041 found if object files and source are kept separate).
8043 Wed Sep 4 14:35:02 1996 Jim Blandy <jimb@floss.cyclic.com>
8045 * feature.h, feature.c: Use PROTO macro, instead of #if __STDC__.
8047 Wed Sep 4 01:30:47 1996 Jim Blandy <jimb@totoro.cyclic.com>
8049 * configure.in: Don't substitute the values of TCL_SRC_DIR and
8050 TK_SRC_DIR; they're not relevant any more.
8052 * Makefile.in (CC): Don't list -Wall here; it's a GCC-specific flag.
8053 * configure.in: Instead, put it in CFLAGS here, iff we're using GCC.
8055 Wed Sep 4 00:55:49 1996 Jim Blandy <jimb@floss.cyclic.com>
8057 * PLUGIN/guile.config (xtra_cflags): Include .. in the header
8058 search path, so we can find the <libguile/MUMBLE.h> headers.
8060 * Makefile.in (ancillary): List aclocal.m4, for 'make dist'.
8062 * Makefile.in (ALL_CFLAGS): Don't mention CFLAGS here; it's
8063 implicit in the .c.o rule.
8064 (.c.x): Don't mention ALL_CFLAGS here; its value is included in
8067 Put the library path in a header file, instead of passing it on
8068 the command line in every compilation.
8069 * Makefile.in (libpath.h): New target.
8070 (feature.o): Depend on libpath.h.
8071 (clean): Delete libpath.h.
8072 (ALL_CFLAGS): Don't use -DLIBRARY_PATH here. Instead ...
8073 * feature.c: ... #include "libpath.h" here.
8074 * .cvsignore: Ignore libpath.h.
8076 Don't install the unwashed masses of Guile header files in the
8077 main #include path; put most of them in a subdirectory called
8078 'libguile'. This avoids naming conflicts between Guile header
8079 files and system header files (of which there were a few).
8080 * Makefile.in (pkgincludedir): Deleted.
8081 (innerincludedir): New variable; this and $(includedir) are enough.
8082 (INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
8083 (installed_h_files): Divide this up. Now this variable lists
8084 those header files which should go into $(includedir) (i.e. appear
8085 directly in the #include path), and ...
8086 (inner_h_files): ... this new variable says which files appear in
8087 a subdirectory, and are referred to as <libguile/mumble.h>.
8088 (h_files): List them both.
8089 (install): Create innerincludedir, not pkgincludedir. Put
8090 the installed_h_files and inner_h_files in their proper places.
8091 (uninstall): Corresponding changes.
8092 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
8093 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
8094 feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
8095 ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
8096 mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
8097 print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
8098 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
8099 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8100 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
8101 vports.h, weaks.h: Find __scm.h in its new location.
8102 * __scm.h: Find scmconfig.h and tags.h in their new locations
8103 (they're both "inner" files).
8105 Tue Sep 3 20:27:35 1996 Jim Blandy <jimb@floss.cyclic.com>
8107 * Makefile.in (.c.x): Remove duplicate use of $(ALL_CFLAGS).
8109 Tue Sep 3 19:53:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
8111 * posix.c: Doc fixes.
8113 Mon Sep 2 15:22:40 1996 Jim Blandy <jimb@totoro.cyclic.com>
8115 * socket.c: Don't include a prototype for inet_aton; just use a
8116 K&R style declaration, to avoid warnings but minimize the chance
8117 of conflicts with the system.
8119 On NextStep, <utime.h> doesn't define struct utime, unless we
8120 #define _POSIX_SOURCE before #including it.
8121 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): New test.
8122 * acconfig.h: New comment text for above CPP symbol.
8123 * configure.in: Call it.
8124 * posix.c: #define _POSIX_SOURCE if it seems necessary.
8126 * configure.in (AC_CHECK_HEADERS): Include sys/utime.h and utime.h
8128 * posix.c: Check HAVE_SYS_UTIME_H and HAVE_UTIME_H, instead of
8129 testing for __EMX__.
8131 * posix.c: #include <libc.h>, if it exists.
8133 * posix.c: Cast the return result to GETGROUPS_T, not gid_t; we
8134 don't even know if the latter exists.
8136 * posix.c (s_sys_setpgid, s_sys_setsid, s_sys_ctermid,
8137 s_sys_tcgetpgrp, s_sys_tcsetpgrp): Renamed from s_setpgid,
8138 s_setsid, s_ctermid, s_tcgetpgrp, s_tcsetpgrp, for consistency.
8140 * posix.c (R_OK, W_OK, X_OK, F_OK): #define these if the system's
8142 (scm_init_posix): Use them when initializing the Scheme constants
8145 Fri Aug 30 16:01:30 1996 Jim Blandy <jimb@floss.cyclic.com>
8147 * Makefile.in (libdir, includedir, bindir): Use the
8148 autoconf-supplied values, instead of deriving them ourselves.
8149 (pkgincludedir, datadir, pkgdatadir): New variables.
8150 (install, uninstall): Put the header files in a special
8151 subdirectory, not in the main search path.
8153 * Makefile.in (ALL_CFLAGS): Provide the proper value for
8154 LIBRARY_PATH --- use $(pkgdatadir) instead of $(libdir).
8156 * Makefile.in (IMPLPATH): Deleted; never used.
8158 * Makefile.in (TCL_SRC_DIR, TK_SRC_DIR): Deleted; we don't depend
8159 on the Tcl/Tk source any more.
8160 (INCLUDE_CFLAGS): Remove references to the above.
8162 * Makefile.in (version.o): Corrected dependencies.
8164 Thu Aug 29 23:06:19 1996 Thomas Morgan <tmorgan@gnu.ai.mit.edu>
8166 * libguile.h: #include "version.h"
8168 * init.c (scm_boot_guile): Call scm_init_version.
8169 * gscm.c (gscm_run_scm): Call scm_init_version.
8171 * configure.in (GUILE_MAJOR_VERSION, GUILE_MINOR_VERSION,
8172 GUILE_VERSION): AC_DEFINE these.
8173 (acconfig.h): #undef the above symbols.
8175 * Makefile.in (libobjs): Add version.o.
8176 (installed_h_files): Add version.h.
8177 (c_files): Add version.c.
8178 (gen_c_files): Add version.x.
8179 (version.o): New rule.
8180 (alist.o, append.o, appinit.o, arbiters.o, async.o, boolean.o,
8181 chars.o, continuations.o, dynwind.o, eq.o, error.o, eval.o,
8182 fdsocket.o, feature.o, files.o, filesys.o, fports.o, gc.o,
8183 genio.o, gsubr.o, hash.o, hashtab.o, init.o, kw.o, list.o, load.o,
8184 mallocs.o, markers.o, marksweep.o, mbstrings.o, numbers.o,
8185 objprop.o, pairs.o, ports.o, posix.o, print.o, procprop.o,
8186 procs.o, ramap.o, read.o, root.o, scmsigs.o, sequences.o,
8187 simpos.o, smob.o, socket.o, stackchk.o, stime.o, strings.o,
8188 strop.o, strorder.o, strports.o, struct.o, symbols.o, tag.o,
8189 throw.o, unif.o, variable.o, vectors.o, version.o, vports.o,
8190 weaks.o): Add version.h to dependency lists.
8191 (markers.o): Remove duplicate rule.
8193 * version.h: New file.
8195 * version.c: New file.
8197 Thu Aug 29 15:21:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
8199 * symbols.c (scm_strhash): scm_downcase is now a function, not an
8200 array; use it appropriately. Since GCC is quite happy to
8201 subscript functions, it never warned us about this; we should use
8202 -Wpointer-arith in the future. I guess we never tested
8205 Wed Aug 28 18:52:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
8207 * socket.c: Doc and copyright fixes.
8209 Sat Aug 24 05:29:19 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8211 * debug.c: Fixed and improved gdb support.
8213 Fri Aug 23 18:00:16 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8215 * socket.c: Added declaration of inet_aton to avoid compiler
8216 warning. (Hope this solution is correct.)
8218 * stime.c: Added declaration of ftime. (This is missing in
8221 Fri Aug 23 02:03:32 1996 Gary Houston <ghouston@actrix.gen.nz>
8223 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
8225 * Makefile.in (c_files): add strerror.c.
8227 * strerror.c: new file from Emacs' sysdep.c.
8228 maybe configure should also check for sys_errlist.
8230 * configure.in (AC_REPLACE_FUNCS): add strerror.
8232 Fri Aug 23 03:02:46 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8234 * debug.c (scm_init_debug): Added initialization for
8235 scm_evaluator_traps.
8237 * debug.h, debug.c: Various name changes.
8238 (Mostly prefixing with SCM_.) Renamed "debug-options" -->
8239 "debug-options-interface". See commentary in options.c.
8241 * options.h, options.c: Options now have documentation strings.
8242 Also added a long explanatory commentary.
8244 * eval.c, print.h, print.c, read.h, read.c: Modifications to
8247 * gscm.c, init.c, root.c, throw.c: Bug fixes:
8248 last_debug_info_frame is now updated in all cases.
8250 * __scm.h, stackchk.h, stackchk.c: Guile now performs stack
8253 Thu Aug 22 17:34:17 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8255 * __scm.h: SCM_STACK_LIMIT removed (now a run-time option).
8256 Added option STACK_CHECKING.
8258 Tue Aug 20 18:48:40 1996 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8260 * Makefile.in: Added {debug,options,srcprop}.{h,c}
8262 * __scm.h: Removed symbols for debugging support.
8264 * acconfig.h: Added symbols for debugging support.
8266 * configure.in: Added user option for debugging support.
8267 --enable-debug will include the debugging code into libguile.a.
8269 * continuations.c (scm_make_cont): Enlarged the #if 0 around
8270 scm_relocate_chunk_to_heap.
8272 * debug.c: New file: low-level debugging support. It also
8273 includes support for debugging with gdb. (The extensions to gdb
8274 are written by Per Bothner at Cygnus.)
8276 * debug.h: New file: low-level debugging support.
8278 * eval.c: scm_m_set and SCM_IM_SET no longer supports multiple
8279 argument pairs. Extensive modifications to the debugging
8280 evaluator. Added "SECTION:" commentaries to clarify what happens
8281 when, during double compilation. Renamed EVALIMP --> EVALIM.
8282 Renamed EVAL --> XEVAL. Removed function evalcar. Defined
8283 evalcar to scm_eval_car. Added explanation of "EVAL" symbols to
8284 the beginning of the file. New procedure: scm_unmemocopy.
8285 Added some global state variables needed by the debugging
8286 evaluator: scm_ceval_ptr, last_debug_info_frame, debug_mode,
8287 check_entry, check_apply, check_exit, debug_options and
8288 evaluator_traps. New acro: undefine.
8290 * eval.h: Renamed EVAL --> XEVAL.
8292 * gc.c (scm_init_storage): Renamed scm_make_weak_hash_table
8293 --> scm_make_weak_key_hash_table.
8295 * init.c (scm_restart_stack, scm_boot_guile): Added initialization
8296 of SCM_DFRAME. Added calls to scm_init_{debug,options,srcprop}.
8298 * libguile.h: Conditionally include debug.h
8300 * objprop.c (scm_object_properties, scm_set_object_properties_x):
8301 scm_object_properties shouldn't return handle. `handle' now gets
8302 initialized in scm_set_object_properties_x. scm_object_properties
8303 doesn't any longer create an entry in scm_object_whash.
8305 * options.c: New file: handling of run time options.
8307 * options.h: New file: handling of run time options.
8309 * posix.c (scm_getpgrp): Cast pointer to getpgrp.
8311 * print.c: New procedure: scm_print_options
8313 * print.h: Defines for print options.
8315 * read.c: New procedure: scm_read_options
8317 * read.h: Defines for reader options.
8319 * root.h: Added scm_source_whash among scm_sys_protects.
8321 * srcprop.c: New file: source properties.
8323 * srcprop.h: New file: source properties.
8325 * throw.c (jbsmob): Jump buffers are now correctly allocated.
8326 (Bug found by A. Green.)
8328 * weak.c: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
8330 * weak.h: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
8332 Thu Aug 15 02:05:14 1996 Jim Blandy <jimb@totoro.cyclic.com>
8334 * libguile.h: #include "objprop.h"; I guess this was forgotten.
8336 * init.c (scm_boot_guile): Don't call scm_init_rgx; it's a plugin,
8337 and should be called by the final client.
8339 Wed Aug 14 21:41:37 1996 Jim Blandy <jimb@totoro.cyclic.com>
8341 * gc.h: Use the PROTO macro when declaring functions.
8342 * gc.c: Use the PROTO macro when declaring static functions.
8343 Remove the CPP hair around function definitions.
8345 * gc.c (scm_init_storage): Initialize scm_asyncs.
8347 * libguile.h: #include "__scm.h" before testing the STDC_HEADERS
8348 preprocessor symbol; "__scm.h" is where it might get #defined.
8349 * __scm.h: Similar: #include <scmconfig.h> before testing
8352 * __scm.h: It's HAVE_LIMITS_H, not HAVE_LIMITSH.
8354 Fri Aug 9 11:09:28 1996 Jim Blandy <jimb@totoro.cyclic.com>
8356 * init.c (scm_boot_guile): Add init_func argument; call
8357 (*init_func) instead of calling scm_appinit; it's ucky to
8358 hard-code names for the user's procedures.
8359 * init.h (scm_boot_guile): Adjust declaration.
8361 * __scm.h (PROTO): New macro, for declaring functions with
8364 * init.h (scm_start_stack, scm_restart_stack): Use PROTO;
8365 eliminate all the __STDC__ conditionals.
8366 (scm_boot_guile): Add declaration.
8367 * init.c (scm_start_stack, scm_restart_stack, scm_boot_guile):
8368 Remove __STDC__ conditionals around function definitions; the
8369 declarations in init.h will provide the same information, more
8372 * __scm.h (SCM_SYSMISSING): When we don't have ENOSYS, don't
8373 complain about it in the error message; the error message is
8374 adequate without that note, and there's nothing the user can do
8377 Wed Aug 7 14:14:46 1996 Jim Blandy <jimb@totoro.cyclic.com>
8379 * Makefile.in (ancillary): Drop def.sed.
8381 * posix.c (scm_init_posix): Use numeric values, rather than
8382 CPP symbols, when defining the scheme values R_OK, W_OK, X_OK, and
8383 F_OK. The symbols aren't available on some systems, and I'm
8384 pretty sure their values are fixed by common widespread practice.
8385 * ioext.c (scm_init_ioext): Code here defined them too; remove it.
8387 More functions unavailable on some systems.
8388 * configure.in (AC_CHECK_FUNCS): Add ctermid, setpgid, setsid,
8389 tcgetpgrp, tcsetpgrp, and waitpid to the list of functions to
8391 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
8392 * posix.c (scm_sys_ctermid, scm_sys_setpgid, scm_sys_setsid,
8393 scm_sys_tcgetpgrp, scm_sys_tcsetpgrp, scm_sys_waitpid): Put the
8394 bodies of these functions in "#ifdef HAVE_MUMBLE" clauses, with a
8395 stub that signals an error as the #else.
8397 * Makefile.in (ancillary): Drop acconfig-1.5.h; add acconfig.h.
8399 Wed Aug 7 06:28:42 1996 Gary Houston <ghouston@actrix.gen.nz>
8401 * Fixes motivated by Petr Adamek <adamek@mit.edu>:
8403 * unif.c: include ramap.h.
8405 * read.c (endif): case_insensative_p renamed case_insensitive_p.
8407 * ramap.h: rename scm_array_copy prototypes to scm_array_copy_x.
8409 * ports.c: include sys/ioctl.h.
8411 * scmconfig.h.in: add HAVE_SYS_IOCTL_H.
8413 * configure.in: check for sys/ioctl.h.
8415 * ports.c: include <malloc.h> not "malloc.h".
8417 * mallocs.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
8419 * fports.c: remove ttyname and tmpnam declarations.
8421 * posix.c: fewer ttyname declarations.
8423 * fports.c: include <string.h> not "string.h".
8425 * init.c, ioext.c: include string.h and unistd.h.
8427 * gc.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
8429 * async.c, strings.h, strports.c, struct.c, symbols.c, feature.c,
8430 genio.c, simpos.c, vports.c: include string.h.
8432 * socket.c, fdsocket.c: include string.h only if HAVE_STRING_H.
8434 * fdsocket.c (getsockopt, setsockopt): change type of optlen from
8436 (scm_addr_buffer_size): change type from scm_sizet to int.
8437 (accept, getsockname, getpeername, recvfrom): change type of tmp_size
8438 from scm_sizet to int.
8440 * error.c: include unistd.h.
8442 * __scm.h: (SCM_SYSMISSING): another version in case ENOSYS isn't
8445 * Makefile.in: remove references to .hd, .cd suffix and __scm.hd.
8447 * __scm.hd, def.sed: deleted.
8449 Tue Aug 6 14:49:08 1996 Jim Blandy <jimb@totoro.cyclic.com>
8451 Changes for NeXT, suggested by Robert Brown.
8452 * configure.in: Call AC_TYPE_MODE_T.
8453 (AC_CHECK_HEADERS): Add libc.h, to get more prototypes on the
8454 NeXT. Put header file list in alphabetical order.
8455 * configure, scmconfig.h.in: Regenerated.
8456 * filesys.c [HAVE_LIBC_H]: #include <libc.h>.
8458 * filesys.c [HAVE_STRING_H]: #include <string.h>, to get prototype
8461 * acconfig.h: New file, providing documentation for the CPP
8462 symbols defined in configure.in
8463 * acconfig-1.5.h: Removed; superceded by the above.
8465 Sat Aug 3 01:27:14 1996 Gary Houston <ghouston@actrix.gen.nz>
8467 * ioext.c (scm_sys_fdopen): fix the port-table assignment.
8469 * fports.c (scm_open_file): don't return #f, throw error.
8471 * ioext.c (fileno): renamed from %fileno.
8472 (soft-fileno): deleted.
8474 * ports.c (scm_port_revealed): don't need to check for -1 from
8476 (scm_set_port_revealed_x): return unspecified, not #f.
8478 * ioext.c (primitive-move->fdes): return #t or #f, not 1 or 0.
8480 * fdsocket.c: getsockopt, setsockopt: use HAVE_STRUCT_LINGER.
8482 * scmconfig.h.in: add HAVE_STRUCT_LINGER.
8484 * configure.in: check for struct linger, set HAVE_STRUCT_LINGER.
8486 Thu Aug 1 02:58:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
8488 * filesys.c, posix.c: #include <sys/types.h> before <sys/stat.h>.
8489 This is necessary on Ultrix, and doesn't hurt portability.
8491 * Makefile.in (dist-dir): New target, implementing a new dist system.
8492 (installed_h_files): Put in alphabetical order.
8493 Remove duplicate entries for markers.h and unif.h.
8494 (c_files): Remove duplicate entries for markers.c.
8495 (ancillary): Renamed from anillery; all uses changed. Remove
8496 PLUGIN; it's a directory, and needs special treatment in dist-dir.
8497 Remove all the ../doc/* files; doc/Makefile.in handles that.
8499 * Makefile.in (libobjs): Remove duplicate entry for markers.o.
8501 * Makefile.in (.c.x): Compensate for Ultrix's broken Bourne shell:
8502 every if must have an else, or else the whole command has a
8503 non-zero exit code whenever the if's condition is false.
8505 Thu Aug 1 08:22:24 1996 Gary Houston <ghouston@actrix.gen.nz>
8507 * posix.c: include string.h.
8509 Wed Jul 31 23:43:05 1996 Gary Houston <ghouston@actrix.gen.nz>
8511 * numbers.c: rename %expt -> $expt, %atan2 -> $atan2, as it must
8514 * posix.c, ioext.c, socket.c, fdsocket.c, files.c, filesys.c, simpos.c:
8515 Remove leading % from scheme names.
8516 Do not return error values, call SCM_SYSERROR or similar.
8518 * __scm.h (SCM_SYSERROR, SCM_SYSMISSING): new macros.
8520 Wed Jun 12 00:28:31 1996 Tom Lord <lord@beehive>
8522 * struct.c (scm_init_struct): new file.
8524 Fri Jun 7 14:02:00 1996 Tom Lord <lord@beehive>
8526 * list.c (scm_list_tail): list-cdr-ref is the same as list-tail.
8527 (scm_list_head): added list-head for rapidly chopping argument
8528 lists off of longer lists (and similar).
8530 Tue Jun 4 09:40:33 1996 Tom Lord <lord@beehive>
8532 * objprop.c (scm_object_property): assq the cdr of the whash
8533 handle for obj, not the handle itself.
8535 Mon Jun 3 17:19:30 1996 Tom Lord <lord@beehive>
8537 * gc.c (scm_mark_weak_vector_spines): Mark the spines (alists) of
8538 weak hash tables last of all marking to avoid an obscure gc bug.
8539 WARNING: circular lists stored in a weak hash table will hose us.
8541 Fri May 24 09:53:39 1996 Tom Lord <lord@beehive>
8543 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8544 new functions similar to scm_substring_move_left_x and
8545 scm_substring_move_right_x.
8547 Wed May 22 20:07:01 1996 Tom Lord <lord@beehive>
8549 * init.c (scm_boot_guile): prevent gc with scm_block_gc not
8552 Wed May 15 16:13:29 1996 Tom Lord <lord@beehive>
8554 * ports.c (scm_unread_char): scm_gen_ungetc as a scheme procedure.
8556 Thu May 9 09:33:17 1996 Tom Lord <lord@beehive>
8558 * strports.c (scm_strprint_obj): convenience function. C for
8559 (lambda (obj) (call-with-output-string (lambda (p) (write obj p))))
8561 * guile-{tcl,tk}.[ch], events.[ch], keysyms.[ch], tcl-channels.[ch]
8562 removed to a separate library
8564 * init.c (scm_boot_guile): copied from guile-tcl.c.
8565 Initialization specific to tcl interpreters removed.
8567 Wed May 8 15:07:37 1996 Tom Lord <lord@beehive>
8569 * ports.c (scm_ports_prehistory): size malloced here doesn't
8570 matter so long as it is non-0 (got rid of "* 4").
8572 Tue May 7 11:43:37 1996 Tom Lord <lord@beehive>
8574 * gscm.h: gscm_mkarray eliminated (presumably was not being used
8575 since its definition was bogus).
8577 Mon May 6 13:02:56 1996 Tom Lord <lord@beehive>
8579 * mallocs.[ch]: back again (for rx at least).
8581 Wed Apr 17 08:54:20 1996 Tom Lord <lord@beehive>
8583 * ports.c: removed functions relating to the mapping between ports
8584 and descriptors. (That stuff is unix-specific and should be collected
8585 in a separate library).
8587 * ramap.c (scm_array_copy): return #<unspecified> not #<undefined>.
8588 (Tom Mckay@avanticorp.com)
8590 Mon Apr 15 14:16:55 1996 Tom Lord <lord@beehive>
8592 * gc.c (scm_gc_sweep): Immediates in weak vectors were not
8593 handled correctly (SCM_FREEP was applied to them) -- test for
8594 NIMP. Keys in weak hash tables were spuriously (though harmlessly)
8595 being overwritten with #f. (brown@grettir.bibliotech.com)
8597 Tue Apr 2 22:25:00 1996 Tom Lord <lord@beehive>
8599 * gc.c (scm_unhash_name): new procedure, unhash-name, flushes glocs
8600 for a specific symbol or for all symbols.
8602 Mon Apr 1 10:34:55 1996 Tom Lord <lord@beehive>
8604 * gc.c (scm_gc_mark): mark weak hash tables correctly (was getting weak
8605 keys and weak values confused).
8607 Thu Mar 14 22:20:20 1996 Tom Lord <lord@beehive>
8609 * list.c (scm_last_pair): map '()=>'()
8611 Wed Mar 13 16:43:34 1996 Tom Lord <lord@beehive>
8613 * pairs.c, hashtab.c, list.c, alist.c append.c, sequences.c:
8614 Generalized assoc and hash-table functions.
8615 Factored pairs.c into multiple files.
8617 Fri Mar 8 14:44:39 1996 Tom Lord <lord@beehive>
8619 * gscm.c (gscm_run_scm): got rid of objprop.
8621 Fri Mar 1 10:39:52 1996 Tom Lord <lord@beehive>
8623 * genio.c (scm_getc):
8624 NOTE: fgetc may not be interruptable.
8626 * procprop.c (scm_stand_in_scm_proc):
8627 NOTE: don't use a alist here.
8628 (scm_set_procedure_properties_x): fix type checking throughout this file.
8630 * gc.c (scm_gc_sweep): free heap segments with free, not must_free.
8632 * ports.c (scm_remove_from_port_table): adjust scm_mallocated
8633 after freeing part of the port table.
8635 Thu Feb 29 16:21:17 1996 Tom Lord <lord@beehive>
8637 * strports.c (scm_mkstrport):
8638 * vports.c (scm_make_soft_port): allocate a port table entry
8639 (possibly triggering gc) before setting the tag of the corresponding
8642 * pairs.c (scm_delq_x): never throw an error.
8644 * vectors.c (scm_make_vector): made the default vector fill argument
8645 into '() (much more useful than the previous value, "#unspecified")
8647 Mon Feb 26 17:19:09 1996 Tom Lord <lord@beehive>
8649 * ports.c (scm_add_to_port_table): Added fields
8650 to port table entries: file_name, line_num, col.
8651 Update these in open_file, gen_getc and gen_ungetc.
8652 Added procedures to access those fields.
8654 Sun Feb 25 00:10:36 1996 Tom Lord <lord@beehive>
8656 * procs.c (scm_make_subr_opt): new entry point for making
8659 Sat Feb 24 17:11:31 1996 Tom Lord <lord@beehive>
8661 * gc.h: SCM_STACK_GROWS_UP is now set by autoconf.
8663 Fri Feb 23 10:26:29 1996 Tom Lord <lord@beehive>
8665 * numbers.c (scm_exact_p): This function no longer
8666 implements "integer?".
8668 Thu Feb 22 20:56:16 1996 Tom Lord <lord@beehive>
8670 * gc.c (scm_gc_end): simulate a signal at the end of each GC.
8671 (scm_gc_stats): return an assoc of useful data. Replaces "room"
8672 and the stats reporting formerlly built into repl.
8674 * repl.[ch]: removed.
8675 GC statistics keeping moved to gc.c.
8676 Other statistics keeping can be done from Scheme.
8677 REPLS are now written in Scheme.
8679 Wed Feb 21 10:28:53 1996 Tom Lord <lord@beehive>
8681 * cnsvobj.c (gscm_is_gscm_obj): new file for old functions (icky
8682 conservatively marked objects).
8684 * throw.c (scm_ithrow): Unwind up to the right catch during a throw!
8686 * error.c (scm_init_error): init system_error_sym here, not in repl.c.
8688 * feature.c (scm_compiled_library_path): moved here from repl.c.
8689 This file is for stuff relating specifically to Scheme libraries
8692 * eval.c (scm_m_define): don't give warning about redefinition, don't
8695 NOTE: this should throw a resumable exception with parameters --
8696 the name, the top-level env, the variable, the definition, #t/#f: redefining builtin?
8698 * repl.c (scm_gc_begin/end): don't print a message, don't check verbosity.
8700 * error.c: scm_warn eliminated.
8702 * read.c (scm_lreadr): extra right paren gets an error, not a warning.
8704 * repl.c, marksweep.c, gc.c (various):
8705 lose exit_report, growth_mon.
8707 * gscm.c: got rid of verbosity functions.
8709 Tue Feb 20 00:19:10 1996 Tom Lord <lord@beehive>
8711 * throw.c (scm_ithrow): guard against the bad-throw hook changing
8712 between the call to procedurep and use.
8714 * error.c (scm_everr):
8716 * gsubr.c (scm_make_gsubr): use exit, not scm_quit. still wrong,
8719 * strports.c: don't reveal the port's string to the caller
8720 because it changes size.
8722 (stputc stwrite): check/change the strings length with interrupts
8725 * objprop.c (scm_set_object_property_x &c): use the generic
8726 hashing functions and be threadsafe.
8728 * eval.c (scm_unmemocar): do this operation in a thread-safe way.
8729 (per suggestion jaffer@gnu.ai.mit.edu).
8731 * mbstrings.c (scm_multi_byte_string): guard against argument list
8734 * strings.c (scm_make_string): loop cleanup
8736 * unif.c (scm_vector_set_length_x): scm_vector_set_length_x no longer
8739 * weaks.c (scm_weak_vector): guard against argument list
8742 * variable.c (scm_builtin_variable): check for/make a built-in
8745 * vectors.c (scm_vector): while filling the new array,
8746 guard against a list of fill elements that grows after
8747 the vector is allocated.
8749 * hashtab.c -- new file: general hash table
8750 functions. hash, hashq, hashv, hashx.
8752 * tags.h: made wvect an option bit of vector.
8754 Mon Feb 19 09:38:05 1996 Tom Lord <lord@beehive>
8756 * symbols.c: made the basic symbol table operations atomic.
8758 * root.c &c.: collected stack-specific global state.
8759 linum/colnum etc *should* be port-specific state.
8761 * struct.c (scm_init_struct): init the first struct type during
8762 initialization to fix a race condition.
8764 * continuations.c (scm_dynthrow): pass throwval in the 'regs'
8765 object, not in a global.
8766 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
8768 * throw.c (_scm_throw): Pass throwval on the stack, not in a global
8769 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
8771 * *.[ch]: namespace cleanup. Changed all (nearly) exported CPP
8772 and C symbols to begin with SCM_ or scm_.
8774 Sun Feb 18 15:55:38 1996 Tom Lord <lord@beehive>
8776 * gsubr.c (scm_gsubr_apply): statically allocate the
8777 array of arguments (bothner@cygnus.com).
8779 Sat Feb 17 20:20:40 1996 Tom Lord <lord@beehive>
8781 * scmsigs.c: Simplified to use async rountines.
8783 * async.c: New support for interrupt handlers.
8785 Thu Feb 15 11:39:09 1996 Tom Lord <lord@beehive>
8787 * symbols.c (scm_string_to_symbol et al.): number of tweaky changes to
8788 set the multi_byte flag correctly in symbols. This is wrong.
8789 intern_obbary_soft and msymbolize should take an extra parameter.
8790 Also, weird multibyte symbols don't print correctly.
8791 The weird symbol syntax is also a bit bogus (emacs doesn't quite
8794 Tue Feb 13 11:39:37 1996 Tom Lord <lord@beehive>
8796 * symbols.c (scm_string_to_obarray_symbol): obarray == #f means
8797 use the system symhash. == #t means create an uninterned symbol.
8799 Wed Feb 7 09:28:02 1996 Tom Lord <lord@beehive>
8801 * strings.c (scm_make_shared_substring): build'em.
8802 It might better to keep a table of these and use one
8803 less cons-pair per shared-substring.
8805 Tue Feb 6 17:45:21 1996 Tom Lord <lord@beehive>
8807 * strings.c (scm_string_shared_substring): create shared
8808 substrings. (Doesn't handle mb strings yet).
8810 * mbstrings.c (scm_print_mb_string): handle RO strings.
8812 * print.c (scm_iprin1): print substrings as their non-substring
8813 counterparts (dubious).
8815 * marksweep.c (scm_gc_mark scm_gc_sweep): handle RO and MB
8818 * hash.c (scm_hasher): hash RO and MB strings as bytestrings.
8820 * eval.c (SCM_CEVAL): self-evaluate RO and MB strings.
8822 * eq.c (scm_equal_p): handle RO and MB strings.
8824 * symbols.c (scm_string_to_symbol):
8825 (scm_string_to_obarray_symbol):
8826 * strop.c (scm_i_index):
8828 (scm_string_null_p):
8829 (scm_string_to_list):
8830 * strings.c (scm_string_length):
8833 (scm_string_append):
8834 * simpos.c (scm_system):
8836 * fports.c (scm_open_file):
8837 * strorder.c (scm_string_equal_p):
8838 (scm_string_ci_equal_p):
8839 (scm_string_less_p):
8840 (scm_string_ci_less_p):
8841 * pairs.c (scm_obj_length):
8842 * mbstrings.c (scm_multi_byte_string_length):
8844 Use RO string macros for RO strings.
8846 Tue Jan 30 09:19:08 1996 Tom Lord <lord@beehive>
8848 * Makefile.in (CFLAGS ALL_CFLAGS): be more standard.
8850 * strop.c (scm_i_rindex, scm_i_index): Don't use the BSD functions
8851 index/rindex. Do handle embedded \000 characters.
8853 Sun Jan 28 13:16:18 1996 Tom Lord <lord@beehive>
8855 * error.c (def_err_response): (int)scm_err_pos => (long)scm_err_pos
8856 Eliminate a (presumed) warning on some systems.
8858 * gscm.c (gscm_run_scm): SCM_INIT_PATH => GUILE_INIT_PATH
8859 (Mikael Djurfeldt <mdj@nada.kth.se>)
8861 Sat Jan 27 12:36:55 1996 Tom Lord <lord@beehive>
8863 * eval.c (scm_map): added argument type checking.
8864 (kawai@sail.t.u-tokyo.ac.jp)
8866 * gscm.c (gscm_set_procedure_properties_x): parameter "new" => "new_val"
8867 for C++. (Seth Alves <alves@gryphon.com>)
8869 (gscm_cstr): uses an uninitialized local variable causing
8870 segv. (kawai@sail.t.u-tokyo.ac.jp)
8873 * lvectors.c (scm_get_lvector_hook):
8874 In guile-ii, the lvector code was broken. It was fixed in guile-iii.
8875 It seems to me like if it is broken again in guile-iv...Here is a patch.
8876 "! || (LENGTH (keyvec) == 0))"
8877 (From: Mikael Djurfeldt <mdj@nada.kth.se>)
8880 * gscm.c (gscm_sys_default_verbosity):
8881 incorrectly declared for non-__STDC__
8882 (Tom_Mckay@avanticorp.com)
8884 * ports.c (scm_setfileno): Tweak the macro a bit
8885 to make it easier to port to systems that use
8886 more than a single structure field to hold a descriptor.
8888 * debug.c (change_mode): Avoid GNUCism "int foo[n];"
8889 Give a warning, not an error, for unrecognized modes.
8891 * eval.c (SCM_CEVAL):
8892 static char scm_s_for_each[];
8893 static char scm_s_map[];
8896 * strings.c (scm_string_p):
8897 static char s_string[];
8900 * struct.c (scm_sys_struct_set_x):
8901 static char s_sys_make_struct[];
8902 static char s_sys_struct_ref[];
8903 static char s_sys_struct_set_x[];
8904 Rearrange code to eliminate those forward decls for the sake of
8907 * variable.c (make_vcell_variable): static char s_make_variable[];
8910 * fports.c (scm_port_mode):
8911 chars modes[3] = "";
8915 (Tom_Mckay@avanticorp.com)
8918 * pairs.c (scm_set_cdr_x): non-__STDC__ declaration of
8919 scm_cons2(), scm_acons(), and scm_set_cdr_x() missing semicolon
8920 (Tom_Mckay@avanticorp.com)
8922 * numbers.c (scm_num_eq_p): Non-__STDC__ declaration of
8923 scm_num_eq_p() was scm_equal_p().
8924 (Tom_Mckay@avanticorp.com)
8926 * symbols.c (msymbolize): "CHARS(X) = " => "SETCHARS..."
8927 (Tom_Mckay@avanticorp.com)
8929 Fri Jan 26 14:03:01 1996 Tom Lord <lord@beehive>
8931 * weaks.c (scm_make_weak_vector): "VELTS(X) =" => "SETVELTS..."
8932 (Tom_Mckay@avanticorp.com)
8934 * strop.c (scm_substring_fill_x):
8935 Non-__STDC__ declaration of scm_substring_fill_x() missing semicolon
8936 (Tom_Mckay@avanticorp.com)
8938 * eval.c (SCM_APPLY): variables "debug_info" -> dbg_info.
8939 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
8941 * _scm.h (CxR functions): #define CxR SCM_CxR => #define CxR(X) SCM_CxR(X)
8942 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
8944 * lvectors.c (scm_lvector_set_x): avoid VELTS (VELTS (...)[..]) which
8945 can turn into an obscure gc bug.
8947 * chars.c (scm_char_p): fixed PROC call.
8949 * gscm.h (gscm_vset): use scm_vector_set_x not (the missing)
8952 Tue Jan 23 13:29:40 1996 Tom Lord <lord@beehive>
8954 * elisp.c (new file): dynamic scoping and other bits for
8955 elisp. Don't use this yet unless you specificly want to
8956 hack on elisp emulation.
8958 * dynwind.c (scm_dowinds): When entering or leaving a dynamic
8959 scope created by scm_with_dynamic_bindings_operation_x, swap
8960 the bindings of that scope with the corresponding globals.
8962 * continuations.c (scm_make_cont): when a continuation is captured,
8963 relocate the continuation stack chunks registered on the wind chain
8966 Sun Jan 21 19:31:17 1996 Tom Lord <lord@beehive>
8968 * eval.c (SCM_CEVAL): if the function position evaluates
8969 to a macro, process it accordingly. (Previously, macros were
8970 handled only if the function position was a symbol naming a
8971 variable bound to a macro).
8973 Sat Jan 20 23:21:37 1996 Tom Lord <lord@beehive>
8975 * eval.c (scm_m_set): allow multi-variable set! like
8978 Wed Dec 6 02:40:49 1995 Tom Lord <lord@beehive>
8980 * ports.h fports.c vports.c marksweep.c gc.c strports.c: moved the
8981 STREAM of ports into the port table and replaced it with a
8984 * repl.c (iprin1): added tc7_mb_string -- same as tc7_string.
8986 * marksweep.c (scm_gc_mark): added tc7_mb_string -- same as tc7_string.
8988 * mbstrings.c (new file): functions on multi-byte strings.
8990 * tags.h (scm_typ7_string, scm_typ7_mb_string): added a tag
8991 for multi-byte strings. Moved the string tag.
8993 * chars.h chars.c repl.c (many functions): made scm_upcase and
8994 scm_downcase functions that are safe for extended character sets.
8996 Changed the range of integer->char.
8998 Changed the type of SCM_ICHR.
9000 Tue May 16 17:49:58 1995 Mikael Djurfeldt <mdj@sanscalc.nada.kth.se>
9002 * guile.c: Changed init file name from "SCM_INIT_PATH" to
9005 Sun Aug 6 15:14:46 1995 Andrew McCallum <mccallum@vein.cs.rochester.edu>
9007 * guile.c (gscm_is_gscm_type): New function. (Without this how will we
9008 know that it's safe to pass an object to gscm_get_type?)
9009 (gscm_get_type): Fix tyop in error message.
9011 * variable.c (scm_variable_ref): fixed assertion test.
9012 (Robert STRANDH <strandh@labri.u-bordeaux.fr>)
9014 * gscm.h: fixed several prototypes, notably gscm_vref.
9015 Add gscm_is_eq and temporarily commented out gscm_eq (see
9016 the note in gscm.h near gscm_eq if this change effects your
9018 (Reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
9020 * pairs.c (scm_obj_length): see next entry.
9022 * gscm.h (gscm_obj_length): A way to get an integer
9023 length for lists, strings, symbols (treated as strings),
9024 and vectors. Returns -1 on error.
9026 * eq.c (scm_equal_p): fixed smob case.
9027 (William Gribble <grib@arlut.utexas.edu>)
9029 * Makefile.in (X_CFLAGS): defined.
9030 (William Gribble <grib@arlut.utexas.edu>)
9032 * gscm.h (gscm_2_double): provided now
9033 (reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
9035 Tue Jun 13 01:04:09 1995 gnu