1 Sun Dec 12 10:29:12 1999 Greg J. Badros <gjb@cs.washington.edu>
3 * *.c, scm_validate.h: Use SCM_VALIDATE_NIM, not SCM_VALIDATE_NIMP
4 (none of the other validate macros have the trailing P).
6 Sun Dec 12 10:07:29 1999 Greg J. Badros <gjb@cs.washington.edu>
8 * scm_validate.h: Added the FSF copyright to the top.
10 * strings.c: Use SCM_ASSERT_RANGE in a couple of places instead of
11 SCM_ASSERT w/ SCM_OUT_OF_RANGE.
13 Sat Dec 11 18:34:12 1999 Greg J. Badros <gjb@cs.washington.edu>
15 * Makefile.am: Added scm_validate.h to modinclude_HEADERS.
17 * *.c: Pervasive software-engineering-motivated rewrite of
18 function headers and argument checking. Switched SCM_PROC,
19 SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names
20 later, but was useful to keep old versions around while migrate)
21 that has docstrings and argument lists embedded in the GUILE_PROC
22 macro invocations that expand into a function header. Use lots of
23 new SCM_VALIDATE_* macros to simplify error checking and reduce
24 tons of redundancy. This is very similar to what I did for Scwm.
26 Note that none of the extraction of the docstrings, nor software
27 engineering checks of Scwm is yet added to Guile. I'll work on
28 that tomorrow, I expect.
30 * chars.c: Added docstrings for the primitives defined in here.
32 * snarf.h: Added GUILE_PROC, GUILE_PROC1. Added
33 SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC
34 still remains for now. Changed naming convention for the s_foo
35 string name of the primitive to be s_scm_foo for ease of use with
38 * scm_validate.h: Lots of new SCM_VALIDATE macros to simplify
39 argument checking through guile. Maybe some of these should be
40 folded into the header file for the types they check, but for now
41 it was easiest to just stick them all in one place.
43 1999-12-10 Greg Harvey <Greg.Harvey@thezone.net> (applied --12/10/99 gjb)
45 * smob.c (scm_smob_prehistory): initialize allocated smob
47 * tags.h: new tag: scm_tc16_allocated
49 * gc.c (scm_gc_for_newcell): set the car of the new cell
51 * pairs.h (SCM_NEWCELL): set the car to scm_tc16_allocated
52 (scm_gc_mark): mark allocated cells.
54 1999-12-09 Greg J. Badros <gjb@cs.washington.edu>
56 * strports.h, strports.c (scm_eval_0str): Fix constness. Some
57 thanks to Dirk Hermann.
59 * gh_eval.c (gh_eval_str, gh_eval_file, gh_eval_str_with_catch,
60 gh_eval_str_with_standard_handler,
61 gh_eval_str_with_stack_saving_handler): Fix constness. Some
62 thanks to Dirk Hermann.
64 * gh_data.c (gh_str02scm): Fix constness.
66 * gh.h: Fix constness of prototypes for the above.
68 * vectors.c: Include "unif.h" to avoid a warning about missing
69 prototype for scm_uniform_element_size().
71 1999-12-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
73 * vectors.c (scm_vector_length, scm_vector_ref, scm_vector_set_x):
74 Turned into primitive generics.
76 1999-12-04 Gary Houston <ghouston@freewire.co.uk>
78 * ports.c (scm_port_closed_p): new procedure, implements
79 "port-closed?" suggested by Bernard Urban.
80 ports.h: added prototype, removed the SCM_P macros.
82 1999-11-30 Gary Houston <ghouston@freewire.co.uk>
84 * unif.h: added some comments, removed the SCM_P macros.
86 1999-11-29 Gary Houston <ghouston@freewire.co.uk>
88 * vports.c (sf_write): use scm_makfromstr, not scm_makfrom0str
89 (thanks to Daniel Skarda).
91 1999-11-22 Jim Blandy <jimb@savonarola.red-bean.com>
93 * gscm.c, gscm.h: Deleted. They were unused.
95 1999-11-20 Gary Houston <ghouston@freewire.co.uk>
97 * unif.c (scm_list_to_uniform_array): call
98 scm_dimensions_to_uniform_array with a third argument of
99 SCM_UNDEFINED instead of SCM_EOL.
101 1999-11-19 Gary Houston <ghouston@freewire.co.uk>
103 * the following changes allow guile to be built with the array
104 "module" omitted. some of this stuff is just tc7 type support,
105 which wouldn't be needed if uniform array types were converted
108 * tag.c (scm_utag_bvect ... scm_utag_cvect): don't define unless
110 (scm_tag): don't check array types unless HAVE_ARRAYS.
112 * sort.c (scm_restricted_vector_sort_x, scm_sorted_p):
113 remove the unused array types.
114 * (scm_stable_sort, scm_sort): don't support vectors if not
115 HAVE_ARRAYS. a bit excessive.
117 * random.c (vector_scale, vector_sum_squares,
118 scm_random_solid_sphere_x, scm_random_hollow_sphere_x,
119 scm_random_normal_vector_x): don't define unless HAVE_ARRAYS.
121 * gh_data.c (makvect, gh_chars2byvect, gh_shorts2svect,
122 gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect, gh_doubles2dvect,
123 gh_uniform_vector_length, gh_uniform_vector_ref):
124 don't define unless HAVE_ARRAYS.
125 (gh_scm2chars, gh_scm2shorts, gh_scm2longs, gh_scm2floats,
127 don't check vector types if not HAVE_ARRAYS.
129 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), print.c (scm_iprin1),
130 gc.c (scm_gc_mark, scm_gc_sweep), objects.c (scm_class_of):
131 don't support the array types unless HAVE_ARRAYS is defined.
133 * tags.h: make nine tc7 types conditional on HAVE_ARRAYS.
135 * read.c (scm_lreadr): don't check for #* unless HAVE_ARRAYS is
136 defined (this should use read-hash-extend).
138 * ramap.c, unif.c: don't check whether ARRAYS is defined.
140 * vectors.c (scm_vector_set_length_x): moved here from unif.c. call
141 scm_uniform_element_size if HAVE_ARRAYS.
142 vectors.h: prototype too.
144 * unif.c (scm_uniform_element_size): new procedure.
146 * init.c (scm_boot_guile_1): don't call scm_init_ramap or
147 scm_init_unif unless HAVE_ARRAYS is defined.
149 * __scm.h: don't define ARRAYS.
151 * Makefile.am (EXTRA_libguile_la_SOURCES): unif.c and ramap.c
152 moved here from libguile_la_SOURCES.
154 1999-11-18 Gary Houston <ghouston@freewire.co.uk>
156 * socket.c (scm_htons, scm_ntohs, scm_htonl, scm_ntohl): new
157 functions for network data conversion.
159 * numbers.c (scm_num2long, scm_num2longlong):
160 throw out-of-range instead of wrong-type-arg if appropriate.
161 (scm_iint2str): handle -2^31 correctly.
162 (scm_num2long): handle -2^31 bignum correctly.
163 (scm_num2long_long): rewrite the bigdig case: basically copied
165 numbers.h: (SCM_BITSPERLONGLONG): deleted.
167 * unif.c (rapr1): use sprintf instead of intprint for unsigned
168 longs: intprint can't cope with large values.
170 * numbers.c (scm_num2ulong): check more consistently that the
171 input is not negative. if it is, throw out-of-range instead of
174 * ramap.c (scm_array_fill_int): don't limit fill to INUM for
175 uvect, ivect or llvect.
176 Check that fill doesn't overflow short uniform array.
178 * __scm.h: add another long to the definition of long_long and
181 * unif.c (scm_raprin1): use 'l' instead of "long_long" in the
182 print representation of llvect. read can't handle more than
184 (scm_dimensions_to_uniform_array): make "fill" an optional argument
185 instead of a rest argument.
187 * tags.h (scm_tc7_llvect): wasn't defined anywhere, so use the free
190 * __scm.h: don't mention LONGLONGS.
192 * unif.c, numbers.c, eq.c, gc.c, print.c, eval.c, ramap.c:
193 replace LONGLONGS with HAVE_LONG_LONGS as set by configure.
195 1999-11-17 Gary Houston <ghouston@freewire.co.uk>
197 * net_db.c (scm_inet_aton): throw errors using the misc-error key
198 instead of system-error. inet_aton doesn't set errno.
199 system-error isn't right in gethost either, since it's throwing
200 the value of h_errno instead of errno. so:
201 (scm_host_not_found_key, scm_try_again_key,
202 scm_no_recovery_key, scm_no_data_key): new error keys.
203 (scm_resolv_error): new procedure, use the new keys.
204 (scm_gethost): call scm_resolv_error not scm_syserror_msg.
206 1999-11-16 Gary Houston <ghouston@freewire.co.uk>
208 * error.c: (various): use scm_cons instead of scm_listify
209 to build short lists.
211 1999-11-03 Gary Houston <ghouston@freewire.co.uk>
213 * socket.c (scm_fill_sockaddr): zero the address structure before
214 use, in case it has a sin_len field and the OS doesn't like random
215 values (thanks to Bertrand Petit).
217 1999-10-26 Mark Galassi <rosalia@lanl.gov>
219 * gh.h, gh_data.c (gh_symbol2scm): changed gh_symbol2scm() to take
220 a const char * argument, upon suggestion from Lynn Winebarger.
222 1999-10-26 Gary Houston <ghouston@freewire.co.uk>
224 * strports.c (st_end_input): avoid dubious pointer arithmetic.
226 1999-10-24 Gary Houston <ghouston@freewire.co.uk>
228 * Move the responsibility for resetting port buffers from the
229 caller of the ptob seek procedure to the implementation. This
230 gives more control in general to the ptob seek: in particular the
231 change of 1999-10-20 can be made to work without breaking seek on
232 string ports. There's a comment in NEWS about upgrading port
235 * ports.c (scm_seek): don't reset the port buffers here.
237 * fports.c (fport_seek): reset the buffers, except for the
240 * strports.c (st_end_input): (bug fix): decrement pt->read_pos by
241 offset. check that it's not less than read_buf.
242 (st_seek): reset the buffers first, unless it's the 0 SEEK_CUR
243 case and currently reading.
245 1999-10-20 Gary Houston <ghouston@freewire.co.uk>
247 * ports.c (scm_seek): Add a special case for SEEK_CUR, offset 0,
248 so that unread chars are not needlessly discarded. (thanks to
251 1999-10-18 Gary Houston <ghouston@freewire.co.uk>
253 * fports.c (scm_fdes_to_port): always set rw_random if the fdes is
254 random access. rw_active needs to be maintained even for single
255 directional ports, otherwise scm_seek and probably other things are
256 broken. (thanks to Roland Orre).
258 * strports.c (scm_mkstrport): set rw_random to 1 unconditionally.
260 * ports.c (scm_add_to_port_table): initialise rw_random to 0.
262 * ports.h (scm_port): change the comments on rw_random and rw_active.
264 1999-10-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
266 * ioext.c: Added #include "feature.h".
268 These changes turns `delay' into a memoizing macro. This is
269 because it may be expanded before evaluation if it occurs at the
270 beginning of a body. (Thanks to Lauri Alanko.)
272 * eval.c, eval.h (scm_sym_delay): New global symbol.
274 * tags.h (SCM_IM_DELAY): New immediate symbol.
276 * print.c (scm_isymnames): Printed representation.
278 * eval.c (unmemocopy, SCM_CEVAL): Handle SCM_IM_DELAY.
279 (scm_m_delay): Turned into a memoizing macro.
281 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version.
283 1999-10-11 Jim Blandy <jimb@savonarola.red-bean.com>
285 * gh_data.c (gh_ints2scm, gh_doubles2scm): Make sure elements are
286 protected from GC while building the vector. (Thanks to Bernard
287 Urban and Greg Harvey.)
289 1999-10-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
291 * throw.c (handler_message): Display backtrace if backtraces
294 1999-10-05 Jim Blandy <jimb@savonarola.red-bean.com>
296 * Makefile.in, scmconfig.h.in: Deleted from CVS repository. Run
297 the autogen.sh script to create generated files like these.
299 * numbers.c (scm_string_to_number): Signal an error if radix is
300 less than two. (Thanks to Jorgen Schaefer.)
302 * print.c (scm_write, scm_display, scm_newline, scm_write_char):
303 Don't assume that the current output port is valid. Somebody
304 might close it. (Thanks to Bernard Urban.)
306 1999-10-02 Jim Blandy <jimb@zwingli.cygnus.com>
308 * scmconfig.h.in: Regenerated.
310 * Makefile.am (EXTRA_libguile_la_SOURCES): fix typo.
312 Mon Sep 27 17:15:14 1999 Greg J. Badros <gjb@cs.washington.edu>
314 * __scm.h: Fix a bunch of macros that were missing do-while(0)
317 * debug.c, eval.c: Fix buggy uses of SCM_ALLOW_INTS (missing
318 semicolon) exposed by the above change.
320 1999-09-27 Greg J. Badros <gjb@cs.washington.edu>
322 * stacks.c: Avoid compiler warning re: unitialized var.
324 * scmconfig.h.in: Added DEBUG_FREELIST
326 * pairs.h: Fix macro that was not do-while(0) sandwiched.
328 * gc.h, gc.c: Added scm_gc_set_debug_check_freelist_x,
331 1999-09-23 Gary Houston <ghouston@freewire.co.uk>
333 * ioext.c (scm_init_ioext): enable "i/o-extensions" feature here
334 instead of in scm_init_filesys.
336 * init.c (scm_boot_guile_1): don't call scm_init_posix or
337 scm_init_filesys unless HAVE_POSIX is defined.
338 don't call scm_init_netdb or scm_init_socket unless
339 HAVE_NETWORKING is defined.
341 * Makefile.am (EXTRA_libguile_la_SOURCES): filesys.c, posix.c,
342 net_db.c, socket.c: moved here from libguile_la_SOURCES.
344 1999-09-25 Jim Blandy <jimb@savonarola.red-bean.com>
346 * root.c (scm_make_root): Initialize all the fields of the new
347 root. GC could happen any time, you know. (Thanks to Greg
350 * numbers.c (scm_number_to_string): Signal an error if radix is
351 less than two. (Thanks to Jorgen Schaefer.)
353 * Makefile.am (EXTRA_libguile_la_SOURCES): Add memmove.c here,
354 so automake will actually generate rules for it.
355 * Makefile.in: Regenerated.
357 1999-09-21 Jim Blandy <jimb@savonarola.red-bean.com>
359 * backtrace.c: #include "_scm.h" before testing whether
360 HAVE_UNISTD_H is #defined.
362 1999-09-20 Jim Blandy <jimb@savonarola.red-bean.com>
364 * read.c (scm_read): Don't assume that scm_cur_inp is always open.
365 * ports.c (scm_read_char): Same.
366 * ioext.c (scm_read_line): Same.
367 (Thanks to Bernard Urban.)
369 1999-09-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
371 * vectors.c (scm_vector_move_right_x): Bugfix: Remove side effect
373 numbers.c: Removed #ifndef SCM_RECKLESS at places where type
374 checking may invoke a generic. (Thanks to Michael Livshin.)
376 * __scm.h (SCM_WTA_DISPATCH_0, SCM_GASSERT0): New macros.
378 * numbers.c (scm_max, scm_min, scm_sum, scm_difference,
379 scm_product, scm_divide): Bugfix: Don't pass SCM_UNDEFINED to the
380 generic function if the asubr is called with only one arg.
382 1999-09-20 Gary Houston <ghouston@freewire.co.uk>
384 * scmsigs.c (scm_sigaction): add SA_RESTART to flags only if
385 HAVE_RESTARTABLE_SYSCALLS.
386 (scm_init_scmsigs): use siginterrupt if it's available. not
387 everyone who has restartable syscalls has SA_RESTART it seems.
389 (scm_sigaction): use scm_num2long/scm_long2num when converting
390 SIG_DFL/SIG_IGN, in case it doesn't fit in an INUM. use
391 scm_integer_p to test the type.
393 1999-09-18 Gary Houston <ghouston@freewire.co.uk>
395 * _scm.h, scmsigs.c: replace HAVE_RESTARTS with
396 HAVE_RESTARTABLE_SYSCALLS.
398 * strports.c (scm_strport_to_string): create the string from
399 pt->read_buf instead of an expression that evaluates to the
402 * gdbint.c (gdb_print): don't just use SCM_CHARS to get a C string
403 from the port: the port's buffer may not be NUL terminated.
405 1999-09-16 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
407 * Makefile.am (.c.x): Added missing semicolon after `false'.
409 1999-09-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
411 * print.c (scm_iprin1): Turn `write' and `display' into
412 primitive generics and use their associated generic functions in
413 scm_iprin1 for GOOPS objects.
415 * backtrace.c: #include <unistd.h> if present.
417 1999-09-14 Jim Blandy <jimb@savonarola.red-bean.com>
419 * Makefile.am (.c.x): Don't create a subshell just to delete the
420 .x file and return false.
421 * Makefile.in: Regenerated.
423 1999-09-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
425 * feature.c (scm_create_hook): New function. Replaces
426 scm_make_named_hook which is now deprecated.
427 (scm_make_hook_with_name): New primitive.
428 (print_hook): Hooks now print in a fancy way.
430 1999-09-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
432 * __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,
433 dynwind.c, dynwind.h, eval.h, evalext.c, evalext.h, feature.c,
434 feature.h, hashtab.c, hashtab.h, objects.c, objects.h, print.c,
435 procs.c, procs.h, smob.c, smob.h, srcprop.c, strorder.c, struct.c,
436 struct.h: Updated copyright notices.
438 * srcprop.c (scm_source_property): Bugfix: Use SCM_NECONSP instead
439 of SCM_NCONSP. (Thanks to Greg Badros.)
441 * gsubr.c (scm_make_gsubr): Use scm_make_subr_opt for creation of
444 * eval.c, debug.h (SCM_BACKTRACE_WIDTH): New debug option: width.
446 * backtrace.c: Keep backtraces within specified width by
447 adaptively adjusting fancy printing parameters and cut output if
449 (scm_display_application): Check args.
451 1999-09-11 Jim Blandy <jimb@savonarola.red-bean.com>
453 Change the name of the objects returned by OPENDIR from
454 "directory" to "directory stream". A predicate named "directory?"
456 * filesys.c (scm_directory_stream_p): Renamed from scm_directory_p.
457 At the Scheme level, "directory?" -> "directory-stream?".
458 (scm_dir_print): Use the phrase "directory stream" in printed form.
459 * filesys.h (scm_directory_stream_p): Prototype renamed
462 * Makefile.am (CLEANFILES): Remove versiondat.h; that should only
463 be removed by `make distclean', since it's generated by configure.
464 * Makefile.in: Regenerated.
465 (Thanks to Robert Bihlmeyer.)
467 * strop.c (scm_substring_move_x): Signal an error if start1
468 doesn't come before end1. (Thanks to Karoly Lorentey).
470 * numbers.c (scm_istr2flo): Don't call SCM_INEXP without first
471 calling SCM_NIMP. (Thanks to Karoly Lorentey).
473 * version.c (scm_libguile_config_stamp): Deleted. See
474 corresponding change to ../ice-9/boot-9.scm.
475 * versiondat.h.in: Remove definition for GUILE_STAMP.
476 * version.h: Delete prototype.
477 * Makefile.in: Regenerated.
479 1999-09-11 Gary Houston <ghouston@easynet.co.uk>
481 * filesys.c (scm_directory_p): new procedure "directory?" Returns
482 a boolean indicating whether its argument is a directory
483 port as returned by opendir (thanks to Dirk Herrmann for the
486 1999-09-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
488 * backtrace.c (display_frame_expr): Don't print a newline.
489 (display_frame): Print the newline here instead.
490 (display_backtrace_body): Don't print "Backtrace:".
491 (scm_backtrace): Print "Backtrace:" here instead.
493 1999-09-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
495 * procs.c (scm_setter): Signal WTA if handed an entity or operator
498 * feature.c, feature.h: (scm_hook_p, scm_hook_empty_p): New
499 primitives. (Thanks to Greg Badros);
500 (scm_hook_to_list): New primitive; Hooks are now smobs.
502 1999-09-08 Gary Houston <ghouston@easynet.co.uk>
504 * stime.c (bdtime2c): rewrite the ASSERTs. Accept a value
505 of #f for the 10th vector element to avoid an exception
506 seen by Bernard Urban.
507 (scm_mktime): unneeded ASSERT removed.
509 1999-09-07 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
511 * eval.c (scm_map, scm_for_each): Converted to dispatch on generic
514 * __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros.
516 1999-09-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
518 * numbers.c: Converted comparison operations to dispatch on
519 generic if args don't match.
521 * Makefile.am (ETAGS_ARGS): Added support for GPROC and GPROC1.
523 1999-09-06 James Blandy <jimb@mule.m17n.org>
525 * guile-snarf.c: Deleted. Snarfing should respect CPP
526 conditionals, so it needs to actually run CPP. Bleah.
528 1999-09-05 James Blandy <jimb@mule.m17n.org>
530 Handle errors properly in guile-snarf. (Thanks to Han-Wen Nienhuys.)
531 * guile-snarf.in: Be sure to exit with an error if CPP does.
532 * Makefile.am (.c.x): Delete the .x file and exit with an error
533 status if guile-snarf exits with an error status.
534 * Makefile.in: Regenerated.
536 * snarf.h (SCM_GLOBAL_KEYWORD): Call scm_c_make_keyword, not
537 scm_makekey, which doesn't exist any more. Guess nobody's using
540 * guile-snarf.c: New implementation of guile-snarf, meant to be
541 more robust than the shell script. I think it's complete, but I
542 haven't tested it at all, and I haven't changed the build process
543 to actually use it. We should compare its output against that of
544 the existing shell script, for all source files.
546 * guile-snarf.c (parse_args): Abort if we haven't handled some
549 1999-09-03 James Blandy <jimb@mule.m17n.org>
551 * load.c (scm_search_path): If the filename has any extension at
552 all, ignore the entire list of extensions. Also, don't check whether
553 the file is accessible. If the file exists, accessible or not, we
554 should return it. Inaccessible files should cause an error later.
555 (Thanks to Keisuke Nishida for the suggestions.)
557 1999-09-02 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
559 * gc.c (cleanup, scm_init_storage): Use on_exit if present and
560 atexit not available. (sunos4.1.4 needs it.)
562 1999-09-01 James Blandy <jimb@mule.m17n.org>
564 I take it all back --- bcopy does handle overlapping source and
565 destination areas correctly. At least on every system I could
566 find. But it is better to use AC_REPLACE_FUNCS than to introduce
567 new CPP conditionals.
568 * memmove.c: New file, implementing memmove in terms of bcopy.
569 * scmconfig.h.in: Regenerated.
571 Allocators should use the `void *' type for generic pointers.
572 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Change
573 argument and return types.
574 * gc.h: Corresponding changes to prototypes.
577 1999-08-31 James Blandy <jimb@mule.m17n.org>
579 * numbers.c (scm_init_numbers): Claim to support the `complex'
580 feature, as expected by (ice-9 format). (Thanks to Ceri Storey.)
582 * Makefile.am (check-local): Set GUILE_LOAD_PATH so the tests can
583 find (ice-9 boot-9) when Guile was compiled in a separate
584 directory from the source. (Thanks to Rodney Brown.)
585 * Makefile.in: Regenerated.
587 * procs.c (scm_make_subr_opt): Fix typo. Remember to multiply
588 table lengths by the size of a single element when growing the
589 table. (Thanks to Bill Schottstaedt.)
591 1999-08-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
593 * eval.c (SCM_CEVAL): Duplicated the method dispatch code at the
594 SCM_IM_DISPATCH form instead of calling scm_mcache_lookup_cmethod
595 since that cuts down the time for type dispatch by 50%.
597 1999-08-30 James Blandy <jimb@mule.m17n.org>
599 * gh_data.c (gh_set_substr): Revert change of 1999-08-29; bcopy is
600 not a correct substitute for memmove, because it doesn't handle
601 overlapping source and destination areas on many platforms.
602 Overlaps are the primary reason to use memmove in the first place.
603 * ports.c (scm_ungetc): Same.
604 * strop.c (scm_substring_move_x): Same.
606 1999-08-30 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
608 * gc.c (scm_init_storage): Skip registration of cleanup on systems
609 which lack atexit. (Is it important that cleanup is made
610 properly? Maybe we should replace all `exit' with `scm_exit' and
613 * struct.c, struct.h (scm_struct_free_0, scm_struct_free_light,
614 scm_struct_free_standard, scm_struct_free_entity): Declared to
615 return scm_sizet instead of size_t.
617 * gdbint.c, strports.c: #include <unistd.h>. (SEEK_SET is defined
618 there on sunos4.1.4.)
620 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
622 * numbers.c (scm_lcm): Bugfix: BIGDIG --> SCM_BIGDIG;
623 Account for the case when second argument is unbound.
625 * strorder.c (scm_string_less_p, scm_string_ci_less_p): Bugfix.
626 (Thanks to Karoly Lorentey.)
628 * gh_data.c, ports.c, strop.c: Alternatively use bcopy if memmove
629 isn't present. (Thanks to Suzuki Toshiya.)
631 * ports.c: Use ANSI C prototypes in definitions. (Thanks to
634 * filesys.c (scm_stat2scm): Conditionally use S_ISLNK. (Thanks to
637 * dynl-dl.c (RTLD_GLOBAL): Define if non-existent. (Thanks to
638 Bernard Urban and Ian Grant.)
640 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version
641 again. (1.3.4 will be binary incompatible with 1.3.2 because of a
642 change in the representation of entities and operators.)
644 1999-08-29 Gary Houston <ghouston@easynet.co.uk>
646 * ports.c (scm_ungetc): bugfix: if putback_buf is NULL
647 don't allocate zero bytes (thanks to Bill Schottstaedt).
649 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
651 * procs.c (scm_setter): Converted to use generic dispatch.
653 * eval.c, eval.h: Bugfix: scm_sym_apply was not initialized
656 * load.c (scm_search_path): Don't try extensions which already are
657 present at the end of the filename.
658 (scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
660 * stacks.c (scm_sym_apply): Removed. (Thanks to Ken Raeburn.)
662 Cleanup and simplification of generic method dispatch.
663 Also, the quadruple representation of entity and operator
664 procedures has been replaced with single.
666 * tags.h (SCM_IM_HASH_DISPATCH): Removed.
668 * print.c (scm_isymnames): Removed #@hash-dispatch.
670 * objects.c, objects.h (scm_mcache_lookup_cmethod): Moved here
671 from eval.c; Support 0 arity methods.
672 (scm_set_object_procedure_x): Removed scm_sym_atdispatch;
673 (scm_apply_generic_env): Removed.
674 Replaced slots proc0-3 with procedure.
676 * objects.h (SCM_OPERATOR_PROC_0, SCM_OPERATOR_PROC_1,
677 SCM_OPERATOR_PROC_2, SCM_OPERATOR_PROC_3): Replaced by
678 SCM_OPERATOR_PROCEDURE.
679 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_1, SCM_ENTITY_PROC_2,
680 SCM_ENTITY_PROC_3): Replaced by SCM_ENTITY_PROCEDURE.
682 * struct.c, struct.h: Replace 4 procedure slots with one.
683 (scm_struct_i_procedure): Replaces scm_struct_i_procedure.
685 * gc.c (scm_gc_mark): Mark 1 procedure slot in entities instead of
688 * eval.c (scm_sym_args): Removed.
689 (SCM_CEVAL): Simplified entity application.
690 Moved dispatch code to objects.c.
692 * procprop.c (scm_i_procedure_arity): Bugfix: Handle generics.
694 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
696 * sort.c (closureless): Use scm_eval_body.
698 * eval.c (SCM_APPLY): Fixed serious evaluator bug: If a closure
699 with a symbol as last form was first called normally and then via
700 `map' or some other mechanism using primitive apply, an ILOC was
703 1999-08-26 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
705 This change extends the representation of primitive procedures
706 with more data fields, e.g. a place for documentation and true
707 procedure properties.
709 * procs.c, procs.h (scm_subr_entry): New type: Stores data
710 associated with subrs.
711 (SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS,
712 SCM_SUBR_DOC): New macros.
713 (scm_subr_table): New variable.
714 (scm_mark_subr_table): New function.
716 * init.c (scm_boot_guile_1): Call scm_init_subr_table.
718 * gc.c (scm_gc_mark): Don't mark subr names here.
719 (scm_igc): Call scm_mark_subr_table.
722 This change implements a scheme for letting a generic work as a
723 shadow for a primitive procedure. If the primitive procedure
724 can't dispatch on its arguments, control is left over to the
725 generic. Normal wrong type arg errors will be generated until the
726 user has hung the first method on the primitive.
728 * snarf.h (SCM_GPROC, SCM_GPROC1): New macros.
730 * procs.c, procs.h (scm_subr_p): New function (used internally).
732 * gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function.
734 * objects.c, objects.h (scm_primitive_generic): New class.
736 * objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros.
738 * print.c (scm_iprin1): Print primitive-generics.
740 * __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1,
741 SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros.
743 * eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta -->
744 SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point
745 primitives). NOTE: This means that it is now *required* to use
746 SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an
747 obscured representation that will be removed in the future anyway,
748 so backward compatibility is no problem here).
750 * numbers.c: Converted most numeric primitives (all but bit
751 comparison operations and bit operations) to dispatch on generic
755 Better support for applying generic functions.
757 * eval.c, eval.h (scm_eval_body): New function.
759 * objects.c (scm_call_generic_0, scm_call_generic_1,
760 scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New
764 Optimization of the generic function dispatch mechanism.
766 * eval.c (SCM_CEVAL): Apply the cmethod directly after having
767 called scm_memoize_method instead of doing a second lookup.
769 * objects.h (scm_memoize_method): Now returns the memoized cmethod.
774 * procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of
775 scm_sysintern so that the binding connected with the subr name
776 isn't cleared when we give set = 0.
779 1999-08-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
781 More transparent handling of ports with print states.
783 * print.h (SCM_PORT_WITH_PS_P, SCM_PORT_WITH_PS_PORT,
784 SCM_PORT_WITH_PS_PS): Represent ports with print states as a smob
785 instead of a pair of a port and a print state. We'll need to cons
786 once extra in scm_printer_apply but the type system will be
787 cleaner, it will mix better with GOOPS, and, it will be even more
788 transparent to the user.
790 * print.c (scm_get_print_state): New procedure: Given an output
791 port, return the print state associated to it in the current print
792 chain, if one exists;
793 (scm_port_with_print_state): New procedure: Associate a
794 print-state with a port.
795 (scm_valid_oport_value_p): Use SCM_PORT_WITH_PS_P;
796 (scm_printer_apply): Wrap port and pstate as a smob;
797 (print_state_printer): Removed.
799 * objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports.
801 * eval.c (scm_init_eval): Use scm_make_smob_type instead of
804 * ports.c (scm_output_port_p): Bugfix: Coerce output port before
805 testing (otherwise the port-print-state trick won't be transparent
806 to the user; one example where this caused problems was in the
807 (ice-9 format) module).
809 1999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
811 * eval.c (SCM_CEVAL): Let the SCM_IM_SLOT_SET_X form return
812 SCM_UNSPECIFIED instead of the set value.
814 1999-08-20 James Blandy <jimb@mule.m17n.org>
816 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.
818 * ports.h (enum scm_port_rw_active): New enum, containing
819 SCM_PORT_READ, SCM_PORT_WRITE, and SCM_PORT_NEITHER (instead of
820 zero). The debugger knows about enums, but doesn't know about
822 (typedef scm_port): Declare rw_active member to be an enum
824 * fports.c (fport_flush, fport_end_input): Use SCM_PORT_NEITHER
826 * ports.c (scm_add_to_port_table): Same.
827 * strports.c (st_flush, st_end_input): Same.
829 * ioext.c (scm_do_read_line, scm_read_line): Use scm_must_malloc,
830 scm_must_realloc, and scm_done_malloc as appropriate.
832 1999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
834 * sort.c (quicksort): Added condition to protect the algorithm
835 from crashing the interpreter if the less predicate is buggy.
837 1999-08-19 Gary Houston <ghouston@easynet.co.uk>
839 * fports.c (fport_write): fix line-buffering mode again.
840 (scm_open_file): recognise 'l' for line-buffering.
841 (scm_setvbuf): recognise _IOLBF for line-buffering.
843 1999-08-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
845 * Makefile.am (libguile_la_LDFLAGS): Increased the version number
848 * eval.c (SCM_APPLY), sort.c (closureless): Expand body when
851 1999-08-18 Gary Houston <ghouston@easynet.co.uk>
853 * fports.c (fport_write): use memcpy instead of strncpy, in case
854 the data contains NUL.
856 1999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
858 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
860 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
861 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
862 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
863 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
864 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
865 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
866 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
867 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
868 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
869 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
870 scm_sym_ as prefix for symbols.
872 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
874 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
875 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
876 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
877 scm_sym_atcall_cc): Made global.
879 1999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
881 * eval.c (scm_sym_args): Made global.
883 * objects.c (scm_set_object_procedure_x): Disallow setting of
884 procedures for pure generic functions.
886 1999-08-12 Gary Houston <ghouston@easynet.co.uk>
888 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
889 Scheme name from lseek to seek, but lseek was added recently so
890 it shouldn't be a big problem.
891 * ports.c, gdbint.c, ioext.c: changed callers.
893 1999-08-11 Gary Houston <ghouston@easynet.co.uk>
895 * fports.c (fport_input_waiting): if select is used, return 1
896 instead of whatever FD_ISSET expands to. maybe it will be useful
897 to interpret the value from the input_waiting ptob procedure as a
898 lower bound on the number of bytes available.
900 * Mikael asked for a few names to be changed...
902 * ports.c (scm_make_port_type): take the write procedure as the
903 second argument instead of the flush procedure.
904 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
905 fflush -> flush, read_flush -> end_input, fclose -> close,
906 fill_buffer -> fill_input, ftruncate -> truncate,
907 input_waiting_p -> input_waiting.
909 * ports.c (end_input_void_port): was read_flush_void_port.
910 (scm_set_port_end_input): was scm_set_port_flush_input.
911 (scm_set_port_flush): was scm_set_port_write.
912 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
913 (scm_end_input): was scm_read_flush.
914 (scm_fill_input): was scm_fill_buffer.
915 (scm_flush): was scm_fflush.
916 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
917 (fport_end_input): was local_read_flush.
918 (fport_flush): was local_fflush.
919 (fport_close): was local_fclose.
920 (fport_truncate): was local_ftruncate.
921 (fport_seek): was local_seek.
922 (fport_free): was local_free.
923 (fport_fill_input): was fport_fill_buffer.
924 * strports.c (st_end_input): was st_read_flush.
925 (st_truncate): was st_ftruncate.
926 * vports.c: (sf_flush): was sfflush.
927 (sf_close): was sfclose.
928 (sf_fill_input): was sf_fill_buffer.
930 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
933 1999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
935 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
936 forms now contain the expressions to be dispatched upon instead of
937 depending on a surrounding lambda or let; Generic function
938 dispatch has been optimized; `apply' on a generic function now
939 works a little bit strangely. It uses a trick so that the type
940 dispatch code in SCM_CEVAL can be reused.
942 * objects.h, objects.c (scm_apply_generic_env): Added (used by
944 (scm_operator_p): Added.
945 (scm_sym_atdispatch): Added.
946 (scm_set_object_procedure_x): Modified to handle the new style
948 (scm_object_procedures): New debugging procedure.
950 1999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
952 * eval.c, eval.h (scm_sym_args): Added.
954 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
956 * feature.c, feature.h (scm_c_run_hook): Added.
958 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
959 cdrxnoap and loopnoap instead of begin and loop.
961 1999-08-04 Gary Houston <ghouston@easynet.co.uk>
963 * ports.c (scm_putc, scm_puts),
964 * unif.c (scm_uniform_array_write): use scm_lfwrite.
965 * ports.c (scm_putc): change type of first argument from int to char.
967 1999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
969 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
970 SCM_IM_HASH_DISPATCH.
972 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
973 (scm_si_redfined, scm_si_hashsets): Moved.
975 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
976 flag which combines type and status info so that the class
977 redefinition protocol has zero cost during normal execution.
979 1999-08-03 Gary Houston <ghouston@easynet.co.uk>
981 * ports.h (scm_ptob_descriptor): include a write procedure again.
982 it's more efficient for unbuffered fports (e.g., sockets.)
984 * ports.c (scm_puts): use ptob->write.
985 * vports.c (scm_make_sfptob): set write proc in ptob.
986 * strports.c (scm_make_stptob): set write proc in ptob.
987 * ports.c (write_void_port): new procedure.
988 * vports.c (sf_write): new procedure.
989 * ports.c (scm_lfwrite): use ptob->write.
990 * strports.c (st_write): new procedure.
991 * fports.c (fport_write): new procedure.
992 (scm_make_fptob): set write in ptob to fport_write.
993 * ports.h: prototype for scm_set_port_write.
994 * ports.c (scm_make_port_type): initialise ptob write procedure.
995 (scm_set_port_write): new proc.
997 1999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
999 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
1000 until we've verified that it is actually a port. (Thanks to
1003 1999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1005 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
1006 code, particularly an unnecessary test (len != size, where len ==
1007 size). (Was this leftovers from debugging code, or have I missed
1008 something profound?)
1010 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
1011 size. (Thanks to James Dean Palmer.)
1013 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
1014 (Thanks to Lorentey Karoly.)
1016 1999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1018 * eval.c (scm_m_expand_body): Use scm_cons_source.
1020 * struct.c (scm_print_struct): Use vtable name.
1022 * print.c (scm_init_print): Set name of print state type.
1024 * stacks.c (scm_init_stacks): Set name of stack type.
1026 1999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1028 * eval.c (SCM_CEVAL): Removed old implementation of internal
1031 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
1033 * debug.c, debug.h (scm_reverse_lookup): Added.
1034 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
1035 internal procedure definitions; Don't use scm_i_inner_name.
1037 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
1038 New isym operations.
1040 * eval.h: Added prototypes for multi language support functions.
1042 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
1043 improper lists in the low-level representation, since that will
1044 cause a begin to be prepended at macro expansion.
1046 * eval.c (scm_cons_source): Version of cons which copies source
1047 properties from an existing cell.
1048 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
1050 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
1051 procedure source before calling scm_unmemocopy instead of faking
1054 1998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
1056 Ported `internal defines' fix from SCM. Original ChangeLog entry:
1058 1998-07-09 Radey Shouman <radey@colorage.com>
1060 * eval.c (ceval_1): Modifications to allow rewriting of interal
1061 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
1062 body of which it is the CAR is macro expanded by m_expand_body,
1063 which rewrites internal DEFINE.
1065 (m_expand_body): Added.
1067 (m_macroexp1): Added argument to control error checking:
1068 m_expand_body may speculatively expand forms in the wrong
1069 environments. Made argument number checks conditional on
1072 (m_body): Added, error checks bodies and inserts the ISYM tokens.
1074 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
1077 (m_cond): (m_case): (m_quote): Modified to avoid destructively
1078 changing their argument forms. Since m_expand_body
1079 speculatively macro expands forms the process must be
1082 (m_ident_eqp): Fixed to use proper environment.
1084 (renamed_ident): Added DEFER_INTS_EGC.
1086 Added prototypes for static functions.
1092 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
1093 is false, do not produce an error for unbound variables, return a
1094 pointer to cell_undef instead.
1096 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
1100 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
1101 destructively changing their argument forms. Since m_expand_body
1102 speculatively macro expands forms the process must be reversible.
1104 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
1105 SCM_IM_LET introduced by named lets.
1107 (scm_m_letstar): Use scm_m_body instead of bodycheck.
1109 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
1110 scm_letrec. scm_letrec1 does not check for a null binding and
1111 takes an additional argument to specify the ISYM of the body. Use
1112 scm_m_body instead of bodycheck.
1114 (scm_m_let): Use scm_m_body instead of bodycheck.
1116 (scm_m_expand_body, scm_macroexp): New.
1118 (unmemocopy): Account for ISYMs introduced by scm_m_body.
1120 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
1121 check=1. Throw error for internal defined that have not been
1122 rewritten by scm_m_expand_body.
1124 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
1125 Removed prototype for SCM_APPLY.
1127 * tags.h: Added extern declaration of scm_isymnames.
1129 1999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1131 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
1133 * lang.c: New file: Beginning of multi-language support.
1135 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
1137 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
1138 (scm_dynamic_wind): Added argument checking for the after guard so
1139 that we don't add garbage on the dynwind chain.
1140 (scm_swap_bindings): Added.
1142 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
1143 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
1144 (scm_isymnames): New isyms for multi-language support.
1146 * eval.c (scm_nil, scm_t): New symbols.
1147 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
1148 forms for multi-language support.
1150 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1152 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
1154 Renamed functions in the random function library interface
1155 from scm_i_XXX --> scm_c_XXX.
1157 1999-07-25 Gary Houston <ghouston@easynet.co.uk>
1159 * ports.c (scm_putc): fix line-buffering.
1161 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1163 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
1164 scm_set_ptob_XXX --> scm_set_port_XXX.
1166 1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1168 * ports.c, ports.h (scm_make_port_type): New interface for
1169 creation of port types (replaces scm_newptob). Just as for the
1170 smobs, we need to separate the internal representation of smob
1171 types from the interface, so that we easily can add new fields and
1172 rearrange things without caring about backward compatibility.
1173 This change was forced by the need in GOOPS to create classes
1174 representing port types.
1175 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
1176 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
1177 scm_set_ptob_seek, scm_set_ptob_truncate,
1178 scm_set_ptob_input_waiting_p): New setters.
1179 (scm_newptob): Rewritten to use scm_make_port_type. For backward
1181 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
1182 (scm_prinport): Removed.
1183 (scm_port_print): Added.
1184 (scm_print_port_mode): Added.
1185 (void_port_ptob, print_void_port, close_void_port, noop0):
1186 Removed. Removed #include "genio.h" Added #include "objects.h",
1189 * fports.c (prinfport): Moved code from ports.c.
1190 (local_free): Added.
1191 (scm_fptob): Removed. Instead use new interface.
1192 (scm_make_fptob): Added. (Need to create basic ports in a
1193 specific order in ports.c.)
1195 * strports.c (scm_stptob, prinstpt, noop0): Removed
1196 (scm_make_stptob): Added.
1198 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
1199 (scm_make_sfport): Added.
1201 * filesys.c (scm_dir_print): Don't use the port printing code.
1202 Instead provide specific directory printer.
1204 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
1206 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
1207 scm_ptob_descriptor.
1209 * smob.c (scm_smob_print): Handle non-existing type name nicely.
1210 Removed #include "genio.h"
1212 * objects.c (scm_make_port_classes): New function ptr.
1214 1999-07-24 Gary Houston <ghouston@easynet.co.uk>
1216 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
1218 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
1219 allow the 1st argument to be a fdes or filename as well as a
1220 port (as in the filesys.c version).
1222 * filesys.c (scm_truncate_file): removed.
1224 1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1226 * readline.c, readline.h: Removed.
1228 * objects.c, objects.h (scm_port_class): Added.
1229 (scm_class_of): Look up port class in scm_port_class.
1230 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
1231 SCM_INOUT_PCLASS_INDEX): Added.
1234 * Makefile.am: Removed genio.c, genio.x.
1238 1999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1240 * init.c: Make sure that scm_post_boot_init_modules is called only
1241 once. (Important when using a dumped image.; Thanks to Bernard
1244 1999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
1246 * guardians.c (scm_guardian_zombify): Separate scanning for
1247 zombies from marking the pairs of the free list.
1249 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
1250 use the macros. (Thanks to Michael Livshin.)
1252 * eval.c (scm_m_lambda): Let bodycheck check the body of the
1253 lambda. Let your sins be purified by the blood of the lambda.
1254 (Thanks to Eric Hanchrow.)
1256 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
1257 (Thanks to Valdis Kletnieks.)
1259 Fixes for EMX from Mikael Ståldal.
1261 * filesys.c: #include <io.h>, if we have it.
1262 * scmconfig.h.in: Regenerated.
1264 * stime.c (ftime): Delete declaration for this function --- let
1265 the system supply it.
1267 Cleanups from John Bley.
1269 * gdbint.c: Don't include <stdio.h> and "_scm.h" twice.
1271 * gsubr.c: Don't include "gsubr.h" twice.
1273 Cleanups for compilation on Irix 6, from David Kaelbling.
1275 * regex-posix.c (scm_regexp_error_msg): Change `rx' argument to
1276 regex_t pointer. This is what the callers have, mostly.
1277 (scm_regexp_exec): Don't forget to pass the `rx' argument to
1278 scm_regexp_error_msg.
1280 * scmsigs.c (scm_sigaction): Cast SIG_DFL and SIG_IGN to SCM, not
1281 int. That way, if we get a warning on this line, it's more likely
1282 that we're really missing bits we care about.
1284 * snarf.h (SCM_CONST_LONG): Remove trailing semicolon from
1287 * tags.h (SCM_IMP, SCM_NCONSP, SCM_NCELLP, SCM_ITAG3, SCM_TYP3,
1288 SCM_TYP7, SCM_TYP7S, SCM_TYP16, SCM_TYP16S, SCM_GCTYP16,
1289 SCM_GCMARKP, SCM_GC8MARKP): Don't cast to int. Either SCM or no
1290 cast at all is more appropriate in every case. At the moment, we
1291 assume everywhere that SCM is an integral type anyway.
1293 1999-07-14 Gary Houston <ghouston@easynet.co.uk>
1295 * unif.c (scm_uniform_array_read_x), ports.c (scm_getc): increment
1296 read_pos after scm_fill_buffer.
1298 * ioext.c (scm_do_read_line): simplify by ignoring the fill_buffer
1301 * vports.c (sf_fill_buffer), strports.c (stfill_buffer),
1302 fports.c (fport_fill_buffer): implement the interface change.
1304 * ports.c (scm_fill_buffer): interface change: no longer increments
1305 read_pos past the character that's returned. it seems clearer to
1306 leave it to the caller to decide what to do (thanks Jim).
1308 * vports.c (sf_fill_buffer): put the read char into the buffer
1309 as well as returning it.
1311 * ports.c (scm_grow_port_cbuf): residue of this deleted procedure
1314 1999-07-13 Gary Houston <ghouston@easynet.co.uk>
1316 * strports.c (scm_strprint_obj): simplify. start with initial
1318 (st_seek): don't allow string to be extended if seeking past
1319 the end of a read-only port.
1321 1999-07-12 Gary Houston <ghouston@easynet.co.uk>
1323 * strports.c (st_seek): change the resize checks.
1325 * ports.c (scm_ftruncate): throw error if offset works out negative.
1327 * strports.c (st_flush): increase string size in blocks of
1328 SCM_WRITE_BLOCK instead of 1. set read_end to read_pos if
1329 it's greater and reset read_buf_size.
1330 (scm_mkstrport): set rw_randow if only writing, since read_buf needs
1331 to be maintained for output ports too (it holds the written
1332 part of the string, while write_buf may have unwritten buffer
1334 (st_truncate): rewritten.
1335 (top of file): added a few notes.
1337 1999-07-10 Jim Blandy <jimb@savonarola.red-bean.com>
1339 Patch from Greg Badros:
1340 * snarf.h (SCM_PROC, SCM_PROC1): Use __cplusplus or
1341 GUILE_CPLUSPLUS_SNARF macros to force adding a cast to the last
1342 (function pointer) argument to scm_make_gsubr and scm_make_subr
1343 calls. This avoids warnings in C++ programs using guile-snarf.
1345 1999-07-06 Gary Houston <ghouston@easynet.co.uk>
1347 * strports.c (st_grow_port): set pt->read_pos. set
1348 pt->read_buf_size one less than pt->write_buf_size if there's
1349 an unwritten char at the end of the string. similarly for
1351 (st_resize_port): renamed from st_grow_port.
1352 (st_seek): simplify by assuming that pt->write_pos == pt->read_pos.
1353 seek from read_end instead of write_end for SEEK_END.
1354 (st_ftruncate): calculate current length using readbuf, not write
1356 (scm_strport_to_string): use read_buf_size for length.
1357 (stfill_buffer): don't re-initialise the readbuf.
1359 1999-07-05 Gary Houston <ghouston@easynet.co.uk>
1361 * strports.c (scm_strport_to_string): new procedure.
1362 (scm_call_with_output_string, scm_strprint_obj): use
1363 scm_strport_to_string.
1364 used SCM_INUM0 instead of SCM_MAKINUM (0) in a few places.
1366 1999-07-08 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1368 * symbols.c (scm_gensym): Bugfix. (Thanks to Johannes Hjorth.)
1370 Fri Jun 25 22:14:32 1999 Greg Badros <gjb@cs.washington.edu>
1372 * smob.c: added scm_make_smob_type_mfpe (), scm_set_smob_mfpe ();
1373 use scm_make_smob_type_mfpe to initialize "free", "flo", "bigpos",
1374 and "bigneg" smob types.
1376 * smob.h: Add do ... while(0) idiom to SCM_NEWSMOB. Added
1377 SCM_RETURN_NEWSMOB macro. Added protos for new functions in
1380 * *.c: Use scm_make_smob_type_mfpe, instead of scm_newsmob, and
1381 use SCM_NEWSMOB or SCM_RETURN_NEWSMOB in constructors instead of
1382 SCM_NEWCELL and setting the CAR/CDR by hand.
1384 1999-07-04 Gary Houston <ghouston@easynet.co.uk>
1386 * ports.c (scm_putc): call scm_read_flush.
1387 (scm_puts): likewise.
1388 (scm_lfwrite): likewise.
1389 (scm_lseek): likewise.
1390 (scm_ftruncate): likewise.
1391 * unif.c (scm_uniform_array_write): likewise.
1392 * ioext.c (scm_redirect_port): likewise.
1394 * ports.c (scm_fill_buffer): don't take pt argument. change callers.
1395 (read_flush_void_port): new proc, for void port ptob.
1397 * vports.c (sf_read_flush): likewise.
1398 * strports.c (st_read_flush): take offset arg.
1399 * fports.c (local_read_flush): use offset, don't reset putback
1402 * ports.h (scm_ptobfuns): let read_flush take an offset argument,
1403 which is the number of chars from the putback buffer.
1405 * ports.c (scm_read_flush): new procedure, resets the putback
1406 buffer before calling the ptob routine.
1408 * strports.c (scm_strprint_obj): bug fix: get pt from the port,
1409 not from the parameter obj. (Thanks to Eric Moore.)
1411 * ports.h: SCM_CRDY, SCM_CUC, SCM_CRDYP, SCM_SETRDY, SCM_CUNGET,
1412 SCM_CGETUN, SCM_CLRDY, SCM_TRY_CLRDY, SCM_N_READY_CHARS: deleted.
1414 * strings.c (scm_make_string): throw error if 2nd arg isn't
1417 * unif.c (scm_uniform_array_read_x): fix reading from a port.
1419 (scm_uniform_array_write): likewise.
1421 1999-06-29 Gary Houston <ghouston@easynet.co.uk>
1423 * ports.c (scm_drain_input): rewritten.
1425 * fports.c (local_fclose): check putback_buf.
1426 (local_read_flush): likewise.
1428 * ports.c (scm_remove_from_port_table): maybe free putback_buf.
1430 * ports.h (scm_port): replace cbuf/cbufend/cp with putback_buf/
1432 (SCM_INITIAL_PUTBACK_BUF_SIZE): renamed from SCM_INITIAL_CBUF_SIZE.
1434 * ports.c (scm_grow_port_cbuf): deleted.
1435 (scm_add_to_port_table): initialise putback_buf to 0. remove cbuf
1437 (scm_char_ready_p): check putback_buf
1438 (scm_fill_buffer): likewise.
1439 (scm_ungetc): rewritten.
1441 1999-06-27 Gary Houston <ghouston@easynet.co.uk>
1443 * fports.c (local_fclose): account for push-back buffer.
1445 * ports.c (scm_char_ready_p): check the push-back buffer in
1448 * ioext.c (scm_do_read_line): remove the extra code to handle
1449 the push-back buffer.
1451 * ports.c (scm_getc): don't use SCM_CRDYP etc.
1453 * ioext.c (scm_do_read_line): call scm_fill_buffer.
1455 * ports.c (scm_ungetc): don't call SCM_CUNGET. reset the
1456 read buffer pointers.
1457 scm_fill_buffer: new procedure.
1458 (scm_getc): call scm_fill_buffer.
1460 * ports.h (struct scm_port): saved_read_buf, saved_read_pos,
1461 saved_read_end: new fields.
1463 1999-06-24 Mikael Djurfeldt <mdj@orjan.nada.kth.se>
1465 * dynl-dl.c (sysdep_dynl_link): Added parenthesis around the
1466 trinary conditional in order for the flag computation to be
1469 1999-06-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1471 * struct.c, struct.h:
1473 In order to support different kinds of deallocation, a destructor
1474 slot has been added to struct vtables. This allows for structs
1475 containing pointers to other memory blocks.
1477 (scm_struct_i_free): New hidden struct slot. Holds destructor for
1478 instances to this vtable.
1479 (scm_struct_free_0): New destructor: Doesn't deallocate data.
1480 (scm_struct_free_light): New destructor: Deallocates a light
1481 struct (i.e. a struct without hidden slots).
1482 (scm_struct_free_standard): New destructor: Deallocates standard
1484 (scm_struct_free_entity): New destructor: Deallocates entity
1486 (SCM_SET_VTABLE_DESTRUCTOR): New macro.
1488 Changes to hidden slots:
1490 (scm_struct_i_size): scm_struct_i_flags now shares space with
1491 scm_struct_i_size which holds the size of light structs.
1492 (scm_struct_i_n_words): This slot has changed meaning. Previously
1493 it included hidden slots. Now it indicates visible slots.
1494 (scm_alloc_struct): Clear flags.
1495 (SCM_STRUCTF_MASK): 4 new flag positions added => 12 bits.
1497 (struct_num, scm_struct_i_tag): Removed.
1498 (scm_struct_vtable_tag): Base tag on the pointer to mallocated
1500 (scm_struct_ihashq): Base hash value on pointer to struct handle.
1502 * tag.c (scm_tag): Base tag on vtable pointer.
1504 * objects.c (scm_init_objects): Initialize destructor slot of the
1505 primordial entity class.
1507 * objects.h (SCM_SET_CLASS_DESTRUCTOR,
1508 SCM_SET_CLASS_INSTANCE_SIZE): New macros.
1510 * gc.c (scm_gc_sweep): Call struct free slot.
1512 * keywords.c, keywords.h (scm_c_make_keyword): New function.
1513 (We should remove the use of the prefix '-'.)
1515 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): New macros.
1517 * libguile.h: #include "objects.h"
1519 1999-06-22 Marius Vollmer <mvo@zagadka.ping.de>
1521 * dynl.c (DYNL_GLOBAL): New.
1522 (sysdep_dynl_link): Added `flags' argument.
1523 (kw_global, sym_global): New.
1524 (scm_dynamic_link): Handle keyword arguments. Pass suitable flags
1525 to sysdep_dynl_link.
1526 * dynl-dl.c (sysdep_dynl_link): Handle new `flags' argument by
1527 conditrionally adding RTLD_GLOBAL to DLOPEN_MODES.
1528 * dynl-shl.c (sysdep_dynl_link): Add and ignore new flags
1530 * dynl-dld.c (sysdep_dynl_link): Add and ignore new flags
1532 * dynl.h (scm_dynamic_link): Added rest argument.
1534 1999-06-21 Marius Vollmer <mvo@zagadka.ping.de>
1536 * dynl.c (sysdep_dynl_unlink, sysdep_dynl_func): Use const
1537 qualifier for char* argument, to match prototypes. Thanks to Mark
1540 1999-06-21 Jim Blandy <jimb@savonarola.red-bean.com>
1542 * dynl.c (no_dynl_error, sysdep_dynl_link, sysdep_dynl_unlink,
1543 sysdep_dynl_func): Use ANSI declarations, and const char *
1544 pointers. (Thanks to Mark Elbrecht.)
1546 1999-06-19 Jim Blandy <jimb@savonarola.red-bean.com>
1548 Patch from Greg Harvey:
1549 * eq.c, eval.c, list.c, ramap.c, vectors.c: Always write parens
1550 around the condition of an `if', `while', etc., even if the
1551 condition is a macro invocation that expands to something
1552 surrounded by parens. It's more readable.
1554 * eval.c (scm_map, scm_for_each): Verify that all arguments are
1555 proper lists, and of the appropriate lengths.
1556 (check_map_args): New function. (Thanks to Greg Harvey for the
1559 1999-06-19 Michael Livshin <mike@olan.com>
1561 * guardians.c (guardian_t): `next' - new field to be used for
1562 chaining the live guardians in a single-linked list during the GC
1564 (GUARDIAN_NEXT): convenience macro to access the `next' field.
1565 (guardians, guardians_size, n_guardians): deleted.
1566 (first_live_guardian, current_link_field): new globals used to
1567 point to the head of the live guardian list and current `next'
1568 field, respectively.
1569 (g_mark): append the guardian to the live guardian list.
1570 (scm_guardian_gc_init): zero the live guardian list.
1571 (scm_guardian_zombify): iterate through the live guardian list.
1573 (Applied by Jim Blandy.)
1575 1999-06-16 Jim Blandy <jimb@savonarola.red-bean.com>
1577 * gc.c (scm_mallocated): Just make this signed.
1578 (scm_igc): Check for underflow by seeing if this is negative.
1580 * gc.h (scm_mallocated): Fix declaration.
1581 (Thanks to Greg Harvey.)
1583 * ports.h: #include <sys/types.h>, to get a definition for `off_t'.
1585 1999-06-15 Jim Blandy <jimb@savonarola.red-bean.com>
1587 * stime.c (bdtime2c): Initialize lt->gmtoff and lt->tm_zone from
1588 sbd_time. (Thanks to Eric Hanchrow.)
1590 Fix from Ken Raeburn <raeburn@raeburn.org>:
1591 * weaks.c (scm_make_weak_vector): Add another extra slot before
1592 vector contents, to be used only during garbage collection.
1593 * weaks.h (SCM_WVECT_GC_CHAIN): New macro to access it.
1594 * gc.c (scm_weak_vectors): Now a SCM instead of a SCM*, and now
1596 (scm_weak_size, scm_n_weak): Deleted.
1597 (scm_igc): Use SCM_WVECT_GC_CHAIN to build up a chain of weak
1598 vectors without allocating new storage during GC, using
1599 scm_weak_vectors as the head of the chain.
1600 (scm_mark_weak_vector_spines): Walk SCM_WVECT_GC_CHAIN chain
1601 instead of stepping through an array.
1602 (scm_gc_sweep): Update offset used to find start of weak vector to
1604 (scm_init_storage): Set scm_weak_vectors to EOL.
1606 Fix from Ken Raeburn <raeburn@raeburn.org>:
1607 * gc.c (already_in_gc): New variable.
1608 (scm_igc): Set and clear already_in_gc; abort if it's set at
1611 1999-06-14 Jim Blandy <jimb@savonarola.red-bean.com>
1613 Fix from Gary Houston:
1614 * fports.c (local_seek): Signal an error if the seek fails.
1615 * ports.c (scm_lseek): Don't check return value of port's seek
1616 function; it's its job to signal an error if there's a problem.
1618 1999-06-12 Jim Blandy <jimb@savonarola.red-bean.com>
1620 * strports.c (scm_call_with_output_string): Don't include the
1621 extra character at the end of the string in the result.
1623 * ioext.c (scm_read_line): Switch to reading properly.
1625 * fports.c, fports.h, gc.c, gdbint.c, ioext.c, ports.c, ports.h,
1626 scmsigs.c, strports.c, vports.c: Install the sources which
1627 actually correspond to the changes described below. I got the
1628 ChangeLog entries and the patch from two different places...
1630 1999-06-09 Jim Blandy <jimb@savonarola.red-bean.com>
1632 * gc.c (scm_igc): Check for scm_mallocated underflow. Otherwise,
1633 it shows up as terrible performance, as we GC constantly.
1635 * ioext.c (scm_do_read_line): Rewritten to use memchr to find the
1636 newline. A bit faster, and definitely hairier.
1637 (scm_read_line): Count newlines here instead.
1639 * strings.c (scm_take_str): New function.
1640 (scm_take0str): Reimplement in terms of scm_take_str. * strings.h
1641 (scm_take_str): New declaration. * ioext.c (scm_read_line): Use
1642 scm_take_str, to avoid copying the string.
1644 Add some simple-minded support for line buffered ports.
1645 * ports.h (SCM_BUFLINE): New flag for ports.
1646 * init.c (scm_init_standard_ports): Request line-buffering on
1647 the standard output port.
1648 * ports.c (scm_mode_bits): Recognize 'l' as a request for line
1650 (scm_putc, scm_puts, scm_lfwrite): If the port is line-buffered,
1651 and there's a newline to be written, flush the port.
1653 Gary Houston's open-buffer port patches:
1655 1999-04-26 Gary Houston <ghouston@easynet.co.uk>
1657 * ports.c: (scm_lseek): clear buffers even if just reading current
1660 * fports.c (local_fclose): call local_fflush unconditionally.
1661 (various): don't use the scm_must... memory procs.
1663 1999-04-25 Gary Houston <ghouston@easynet.co.uk>
1665 * ports.h (scm_port): make read_pos a pointer to const.
1666 strports.c: take care of rw_active and rw_randow.
1667 fports.c: scm_fport_drain_input: removed. do it all in ports.c.
1668 strports.c (scm_mkstrport): check that pos is reasonable.
1669 ioext.c (scm_ftell, scm_fseek): use lseek.
1670 (SCM_CLEAR_BUFFERS): macro deleted.
1671 ioext.c (redirect_port: use ptob fflush, read_flush.
1672 ports.h (scm_ptobfuns): add ftruncate.
1673 ports.c (scm_newptob): set ftruncate.
1675 ports.c (scm_ftruncate): new procedure.
1676 fports.c (local_ftrunate), strports.c (str_ftruncate): new procs.
1677 strports.c (st_seek, st_grow_port): new procs.
1678 fports.h (scm_port): change size types from int to off_t.
1679 ports.c (scm_init_ports): initialise the seek symbols here
1680 instead of in ioext.c.
1681 strports.c (scm_call_with_output_string): start with an empty
1682 string, so seek and ftruncate can be used.
1684 gdbint.c: adjust string port usage.
1686 1999-04-24 Gary Houston <ghouston@easynet.co.uk>
1688 * ports.h (scm_ptobfuns): add a read_flush procedure which is the
1689 equivalent to fflush for the read buffer.
1690 * ports.c (scm_newptob): set read_flush.
1691 ports.c (void_port_ptob): set read_flush.
1692 fports.c (local_read_flush): new proc. add to ptob.
1693 strport.c (st_read_flush): likewise.
1694 vport.c (sf_read_flush): likewise.
1695 fports.h (struct scm_fport): remove random member. there's nothing
1696 left but fdes. leaving it as a struct to allow for future changes.
1697 fports.c: replace usage of scm_fport::random with scm_port::rw_random.
1698 ports.c: (scm_putc, scm_puts, scm_lfwrite): call the read_flush
1699 ptob proc if the read buffer is filled.
1701 1999-04-23 Gary Houston <ghouston@easynet.co.uk>
1703 * ports.h (scm_port): add a rw_random member and replace
1704 reading and writing members with rw_active member.
1705 SCM_PORT_READ/SCM_PORT_WRITE: new values.
1707 1999-04-22 Gary Houston <ghouston@easynet.co.uk>
1709 * ports.h (struct scm_port_table): add writing and reading members
1710 to replace write_needs_seek: it isn't good enough for non-fports.
1711 ports.c, ioext.c, fports.c: corresponding changes.
1712 (struct scm_port_table): give it a typedef and rename to scm_port.
1713 ports.c, fports.c, strports.c, vports.c, ioext.c, ports.h:
1714 corresponding changes.
1716 1999-04-20 Gary Houston <ghouston@easynet.co.uk>
1718 * ports.c (scm_newptob): bugfix: set seek member.
1719 * (scm_lseek): new procedure, using code from ioext.c:scm_fseek
1720 and generalised to all port types.
1722 1999-04-18 Gary Houston <ghouston@easynet.co.uk>
1724 * scmsigs.c (scm_init_scmsigs): set the SA_RESTART flag for all
1725 signals (it was only being done for handlers installed from Scheme).
1726 Otherwise (for example) SIGSTOP followed by SIGCONT on an interpreter
1727 waiting for input caused an EINTR error from read.
1729 1999-04-07 Gary Houston <ghouston@easynet.co.uk>
1731 * ports.h (struct scm_port_table): make all the char members
1732 unsigned, so they convert to int without becoming negative if large.
1734 1999-03-14 Gary Houston <ghouston@easynet.co.uk>
1736 * fports.c (scm_fdes_wait_for_input): forgot to check compilation
1737 with threads enabled. rename this procedure to
1738 fport_wait_for_input and take a port instead of a fdes.
1739 use scm_fport_input_waiting_p instead of scm_fdes_waiting_p.
1741 * readline.c (scm_readline): Applied a patch from Greg Harvey to
1742 get readline support working again: use fdopen to get FILE objects.
1744 1999-02-26 Gary Houston <ghouston@easynet.co.uk>
1746 * gc.c (scm_init_storage): install an atexit proc to flush the
1748 (cleanup): the new proc. it sets a global variable which can be
1749 checked by the ptob flush procs to avoid trying to throw
1750 exceptions during exit. not very pleasant but it seems more reliable.
1751 * fports.c (local_fflush): check terminating variable and if set
1752 don't throw exception.
1753 * CHECKME: that the atexit proc is installed if unexec used.
1755 * throw.c (scm_handle_by_message): don't flush all ports here.
1756 it still causes bus errors.
1758 * fports.h (SCM_FPORT_CLEAR_BUFFERS): rename to SCM_CLEAR_BUFFERS
1759 and move to ioext.c.
1761 * fports.c (scm_fdes_waiting_p): merged into fport_input_waiting_p.
1763 * ports.c (scm_char_ready_p): check the port buffer and call the
1764 ptob entry if needed.
1766 * ports.h (scm_ptobfuns): input_waiting_p added. change all the
1767 ptob initialisers. use it in char-ready
1769 * ioext.c (scm_do_read_line): moved from ports.c. make it static.
1771 * vports.c (sfflush): modified to write a char (since softports
1772 currently use shortbuf.)
1774 * fports.c (scm_standard_stream_to_port): moved to init.c and
1777 * init.c (scm_init_standard_ports): make stdout and stderr
1778 unbuffered if connected to a terminal. with stdio they
1779 were line-buffered by default.
1781 (scm_ptobfuns): fputc, fputs, fwrite, fgetc, fgets removed.
1784 * ports.h (scm_ptobfuns): change fflush return to void.
1785 change flush proc definitions.
1787 * strports.c (scm_call_with_output_string): get size from
1788 buffer instead of port stream.
1789 (st_flush): new proc.
1791 * ports.h (struct scm_port_table): added write_end member,
1792 as an optimisation. set it where write_buf_size is set.
1794 * ports.h (struct scm_port_table): change stream from void *
1795 back to SCM. SCM presumably must be large enough to hold a
1796 pointer (and probably vice versa but who knows.)
1797 (SCM_SSTREAM): deleted. change users back to SCM_STREAM.
1799 (scm_puts): rewritten
1800 * fports.c (local_ffwrite, local_fputs): removed.
1801 * strports.c (stputc, stputs, stwrite): dyked out (FIXME)
1802 * vports.c (sfputc, sfputs, sfwrite) likewise.
1803 * ports.c (write_void_port, puts_void_port): removed.
1804 (putc_void_port, getc_void_port, fgets_void_port): likewise.
1806 * ports.c (scm_lfwrite): rewritten using fport.c version.
1808 * fports.c (local_fputc): deleted.
1810 * ports.c (scm_add_to_port_table): initialise write_needs_seek.
1812 * ports.h (scm_ptobfuns): add seek function pointer.
1813 * fports.c: set it to local_seek, new procedure.
1816 * fports.h (SCM_MAYBE_DRAIN_INPUT): moved to ports.c.
1817 use ptob for seek. take ptob instead of fport arg.
1819 * ports.h (struct scm_port_table): new member write_needs_seek,
1820 replaces reading member in fport struct.
1822 * vports.c (sfgetc): store the getted char into the buffer.
1823 rename to sf_fill_buffer and install it for fill-buffer in ptob.
1824 the Scheme interface is still a procedure that gets a char.
1825 (scm_make_soft_port): set up the port buffer (shortbuf).
1827 * fports.c (local_fgetc, local_fgets): deleted.
1828 * strports.c (stgetc): likewise.
1829 * ports.c: scm_generic_fgets: likewise.
1831 * ports.h (scm_ptobfuns): add fill_buffer.
1832 * ports.c (scm_newptob): assign it.
1833 * strports.c (scm_mkstrport): set up the buffer.
1834 put just the string into the stream, not cons (pos stream).
1835 (stfill_buffer): new proc.
1837 * ports.h: fport buffer moved into port table: to be
1838 used for all port types.
1840 1998-12-20 Gary Houston <ghouston@easynet.co.uk>
1842 * throw.c (scm_handle_by_message): flush ports at exit.
1844 * socket.c (scm_sock_fd_to_port): use scm_fdes_to_port.
1845 (scm_getsockopt, scm_setsockopt, scm_shutdown, scm_connect,
1846 scm_bind, scm_listen, scm_accept, scm_getsockname,
1847 scm_getpeername, scm_recv, scm_send, scm_recvfrom,
1849 use SCM_FPORT_FDES. use SCM_OPFPORTP not SCM_FPORTP.
1851 * posix.c (scm_getgroups): use SCM_ALLOW/DEFER_INTS.
1852 (scm_ttyname): use SCM_FPORT_FDES.
1853 (scm_tcgetpgrp, scm_tcsetpgrp): likewise.
1855 * filesys.c (scm_chown): use SCM_FPORT_FDES.
1856 (scm_chmod, scm_stat, scm_truncate_file: likewise.
1858 * ioext.c (scm_isatty_p): use SCM_FPORT_FDES.
1859 (scm_fdes_to_ports): modified.
1860 (scm_fdopen): use scm_fdes_to_port.
1862 * ports.c (scm_init_ports): don't try to flush ports using
1863 atexit(). it's too late, errors will cause SEGV.
1865 * fports.c (scm_fport_buffer_add): new procedure.
1867 * fports.h (SCM_FDES_RANDOM_P): new macro. use it in
1868 scm_fdes_to_port and scm_redirect_port.
1870 * ioext.c (scm_redirect_port): use setvbuf to set buffers in the
1871 new port. reset fp->random.
1873 * fports.c (scm_fdes_to_port), ports.c (scm_void_port),
1874 filesys.c (scm_opendir):
1875 restore defer interrupts while the port is constructed.
1876 (scm_setvbuf): if mode is _IOFBF and size is not supplied,
1877 derive buffer size from fdes or use a default.
1878 (scm_fdes_to_port): use setvbuf instead of creating the buffers
1881 vports.c (various places): use SCM_SSTREAM.
1882 strports.c: likewise.
1883 * gdbint.c: likewise.
1884 * ports.h (SCM_SSTREAM): new macro.
1886 * fports.c (scm_input_waiting_p): use scm_return_first, since port
1887 may be removed from the stack by the tail call to scm_fdes_waiting_p.
1889 * fports.h (SCM_CLEAR_BUFFERS): new macro.
1891 * filesys.c (scm_fsync): use SCM_FDES.
1893 * ports.c (scm_force_output): call scm_fflush.
1895 * print.c (scm_newline): don't check errno for EPIPE (it wouldn't
1896 reach this point.) don't flush port (if scm_cur_outp).
1898 * fports.h (SCM_FPORT_FDES): new macro.
1900 * filesys.c (scm_fcntl): get fdes from fport.
1901 (set_element, get_element): likewise.
1903 * vports.c (sfflush): don't need to set errno.
1905 * ports.c: install scm_flush_all_ports to be run on exit.
1907 * filesys.c (scm_open): adjust port_mode for O_APPEND and O_CREAT.
1909 ports.c fports.c ioext.c posix.c socket.c net_db.c filesys.c:
1910 removed all uses of SCM_DEFER/ALLOW ints for now. they were mainly
1911 just protecting errno. some may need to be put back.
1913 * scmsigs.c (take_signal): save and restore errno while this
1916 *fports.c (print_pipe_port, local_pclose, scm_pipob): deleted.
1917 open-pipe, close-pipe are emulated in (ice-9 popen)
1918 ports.c (scm_ports_prehistory): don't init scm_pipob.
1919 ports.h (scm_tc16_pipe): deleted.
1920 posix.c (scm_open_pipe, scm_close_pipe): deleted.
1922 * ioext.c (scm_primitive_move_to_fdes): use fport.
1923 * fport.c (scm_fport_fill_buffer): flush write buffer if needed.
1924 change arg type from scm_fport to SCM port.
1925 fport.h (SCM_SETFDES): removed.
1926 (SCM_MAYBE_DRAIN_INPUT): new macro.
1928 * fport.h (struct scm_fport): added 'random'.
1929 fport.c (scm_open_file): set random if lseek works.
1931 * ioext.c (scm_dup_to_fdes): use SCM_FSTREAM.
1932 (scm_ftell): always use lseek and account for the buffer.
1933 (scm_fileno): use fport buffer.
1934 (scm_fseek): clear fport buffers. always use lseek.
1936 * posix.c (scm_pipe): use fport buffer.
1937 * unif.c: include fports.h instead of genio.h.
1938 * fports.c (scm_fdes_wait_for_input, scm_fport_fill_buffer): new
1940 (local_fgetc): use them.
1941 (local_ffwrite): use buffer.
1942 (local_fgets): use buffer.
1943 (scm_setbuf0): deleted.
1944 (scm_setvbuf): set the buffer.
1945 (scm_setfileno): deleted.
1946 (scm_evict_ports): set fdes directly.
1947 (scm_freopen): deleted. doesn't seem useful in Guile.
1948 (scm_stdio_to_port): deleted.
1949 fports.h (struct scm_fport): add shortbuf member to avoid separate
1950 code for unbuffered ports.
1951 (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP): moved
1954 * genio.c, genio.h: move contents into ports.c, ports.h. The
1955 division wasn't useful.
1957 * fports.c, fports.h (scm_fport_drain_input): new procedure.
1958 * ports.c (scm_drain_input): call scm_fport_drain_input.
1959 * scm_fdes_waiting_p: new procedure.
1960 * fports.c (scm_fdes_to_port): allocate read and/or write buffers.
1961 (scm_input_waiting_p): check the buffer.
1962 (local_fgetc, local_fflush, local_fputc): likewise.
1964 * fports.h (scm_fport): read/write_buf,_pos,_buf_end,,_buf_size:
1966 * init.c (scm_init_standard_ports): pass fdes instead of FILE *.
1968 * ports.c (scm_drain_input): new procedure.
1970 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY,
1971 pre_read, pre_write): removed.
1972 (local_fputc, local_fputs, local_ffwrite): use write, not stdio.
1973 (scm_standard_stream_to_port): change first arg from FILE * to
1975 (local_fflush): flush fdes, not FILE *.
1976 * fports.h (SCM_NOFTELL): removed.
1977 * genio.c, ports.c: don't include filesys.h.
1978 * genio.c (scm_getc): don't use scm_internal_select if FPORT.
1979 do it in fports.c:local_fgetc.
1980 * genio.c: don't use SCM_SYSCALL when calling ptob procedures.
1981 do it where it's needed in the port smobs.
1982 * filesys.c (scm_input_waiting_p): moved to fports.c, stdio
1983 buffer support removed. take SCM arg, not FILE *.
1984 * filesys.h: prototype moved too.
1985 * fports.c (scm_fdes_to_port): new procedure.
1986 (local_fgetc): use read not fgetc.
1987 (local_fclose): use close, not fclose.
1988 (local_fgets): use read, not fgets
1989 * fports.h: prototype for scm_fdes_to_port.
1990 * fports.h (scm_fport): new struct.
1991 * fports.c (scm_open_file): use open, not fopen.
1993 * ports.h (struct scm_port_table): change stream from SCM to void *.
1994 * ports.c (scm_add_to_port_table): check for memory allocation error.
1995 (scm_prinport): remove MSDOS hair.
1996 (scm_void_port): set stream to 0 instead of SCM_BOOL_F.
1997 (scm_close_port): don't throw errors: do it in fports.c.
1999 1999-06-04 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
2001 * numbers.c: Added #include "feature.h".
2003 1999-05-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2005 * smob.c, smob.h (scm_make_smob_type): New interface to smob
2006 types (supersedes scm_newsmob).
2007 (scm_set_smob_mark, scm_set_smob_free, scm_set_smob_print,
2008 scm_set_smob_equalp): New functions. Sets smob functions.
2009 (SCM_NEWSMOB): New macro. Creates smob objects.
2010 (scm_make_smob): New function. Creates smob objects and
2012 (scm_smob_free, scm_smob_print): Default free and print
2015 * Makefile.am: Removed markers.c, markers.x, markers.h.
2017 * markers.c, markers.h: Removed. (Contents moved to smob.c,
2020 * arbiters.c, async.c, regex-posix.c: Use new smob interface.
2022 * eval.c, fports.c, libguile.h, ports.c: Removed #include
2025 * fluids.c, guardians.c, srcprop.c, threads.c: Added #include
2028 * regex-posix.c, regex-posix.h: Renamed scm_tc16_regex_t -->
2031 1999-05-09 Jim Blandy <jimb@savonarola.red-bean.com>
2033 * strop.c (scm_string_capitalize_x): Use the SCM object `s' in
2034 error messages, not the uninitialized string `str'. Love that
2037 * strop.c (scm_substring_move_x): New function, which can handle
2038 arbitrary overlapping substrings.
2039 (substring-move-left!, substring-move-right!): These are
2040 now just synonyms for substring-move!.
2041 * strop.h (scm_substring_move_x): New prototype.
2042 (scm_substring_move_left_x, scm_substring_move_right_x):
2043 #define these as synonyms for scm_substring_move_x.
2045 Fixes, cleanups, and new functions from Greg Harvey.
2047 1999-05-03 Greg Harvey <Greg.Harvey@thezone.net>
2049 * strop.c (scm_string_capitalize_x, scm_string_capitalize): new
2050 functions; capitalize the first letter of each word in the
2051 argument string, and downcase the rest.
2052 (scm_string_ci_to_symbol): string->symbol, such that the same
2053 symbol is returned for any argument where the only difference
2054 between strings is in capitalization.
2055 (scm_string_upcase, scm_string_downcase): non-destructive
2058 1999-01-13 Greg Harvey <Greg.Harvey@thezone.net>
2060 * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
2061 changed to use memmove.
2062 * strop.c (scm_i_index): removed the pos arguments (it's only
2063 called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
2066 1999-01-11 Greg Harvey <Greg.Harvey@thezone.net>
2068 * strop.h: fixed prototypes.
2070 * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
2071 changed to have 5 required args, rather than 2 required, and 3 required
2072 rest args. Also modified to allow str1 & str2 to overlap.
2073 (scm_substring_fill_x): changed to 4 args, rather than 2 args and
2074 2 required rest args.
2076 1999-05-02 Jim Blandy <jimb@savonarola.red-bean.com>
2080 * Makefile.am (modinclude_HEADERS): Add kw.h, so the new version
2082 * Makefile.in: Regenerated.
2084 * numbers.c: If we're supporting floating-point, provide the
2087 * scmconfig.h.in: Regenerated; see today's change to
2090 1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
2092 * Makefile.in: Regenerated.
2094 Remove readline support, to avoid copyright confusion.
2095 * Makefile.am: Remove readline files from lists.
2096 * init.c: Don't initialize readline.
2097 * scmconfig.h.in: Regenerated.
2099 * numbers.c (s_bignum): Renamed to s_bignum, and made static.
2100 Libguile should not be exporting random little strings.
2101 * numbers.h (s_bignum): Extern declaration removed.
2103 More const changes from Ken Raeburn.
2104 * numbers.c (scm_s_bignum, fx): Now const.
2105 (scm_logtab, scm_ilentab, s_adjbig): Now static and const.
2106 * numbers.h (scm_s_bignum): Update declaration.
2107 * eval.c (bodycheck): Argument WHAT now points to const.
2108 * snarf.h (SCM_SYNTAX): Name is const.
2110 * eval.c (scm_i_let): Make this globally visible, to avoid dynamic
2111 linking crashes on NetBSD. (Thanks to Ken Raeburn.)
2113 1999-03-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2115 * numbers.c (isfinite): Define this macro if not defined: Return a
2116 non-zero value if X is finite. (From ISO C 9x standard.)
2117 (scm_inexact_to_exact): Bugfix: Don't pass NaNs to scm_dbl2big.
2118 (Thanks to Jon Trowbridge and Greg Harvey.)
2120 1999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2122 * keywords.c (scm_tc16_kw): Added for backward compatibility.
2123 Will be removed in next release.
2125 * Makefile.am (modinclude_HEADERS): Added kw.h;
2129 * libguile.h: #include "libguile/kw.h"
2131 1999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2133 * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED.
2135 1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2137 * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch.
2139 * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):
2140 Place the table argument last.
2142 1999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2144 * modules.c: #include "procprop.h"
2145 (scm_system_module_env_p): Assume root environment is no lookup
2148 * debug.c, eval.c, evalext.c, gdbint.c stacks.c:
2149 #include "modules.h".
2151 * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
2152 scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
2154 * eval.c, eval.h (scm_top_level_lookup_closure): Removed.
2156 1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2158 * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
2159 scm_misc_error when pos is a string. This allows for dispatching
2160 arbitrary error messages with one argument via SCM_ASSERT:
2161 SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
2163 1999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2165 * list.c (scm_reverse): Report an error if given a circular list
2166 instead of filling memory.
2167 * list.c (scm_reverse_x): Check args.
2169 1999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2171 Most of this batch of changes is about how to deal with extended
2172 types when an object system is loaded into Guile. A nice object
2173 system is capable of representing Guile's types as class objects.
2175 For example, we want a regular expression to be of class <regex>.
2176 But regular expressions are smobs which aren't under direct
2177 control of the object system, so there has to be some mechanism
2178 which informs the object system that a new class should be created
2179 which can represent the smob type. I call this a "wrapper class".
2181 * objects.c: #include "smob.h";
2182 (scm_class_keyword): Removed. (Class is automatically created by
2184 (scm_smob_class): Array of smob classes indexed by smobnum.
2185 (scm_make_extended_class): "Plugin" function pointer for creation
2186 of wrapper classes for smob and struct types.
2187 (scm_class_of): Handle compiled closures. (Currently regarded as
2189 Use scm_smob_class to handle smob types;
2190 Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
2191 through scm_smob_class;
2194 * smob.c (scm_newsmob): Also create a wrapper class if
2195 scm_smob_class has been initialized.
2197 * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
2198 type code and smobnum.
2200 * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
2201 (scm_struct_table): Weak key table with auxilliary information for
2202 struct types. Currently used for names and wrapper classes.
2203 (scm_struct_ihashq): Hash function for structs.
2204 (scm_struct_create_handle): Get/create entry in scm_struct_table.
2205 (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
2206 for accessing names of vtables. The record implementation in
2207 boot-9.scm currently uses the setter to record the name of record
2208 types. When the object system is initialized, it can use this
2209 information to create wrapper classes with suitable names.
2210 (scm_init_struct): Allocate scm_struct_table.
2211 (scm_alloc_struct): Don't initialize scm_struct_i_tag here.
2212 (struct tags are a finite resource and we might want to restrict
2213 the use of tags to vtables only. E.g., Goops only uses tags for
2215 (scm_make_struct): Use scm_struct_entity_n_extra_words instead of
2217 (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
2220 * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
2221 SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
2222 Used for access of struct table entries.
2224 * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
2225 (scm_hash_fold): New procedure. Used to process all entries in a
2226 hash table (in no particular order).
2228 Argh! For the umpteenth time I got compilation errors because of
2229 the "intuitive" name `kw'. This has to have an end:
2231 * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
2232 "kw" --> "keywords" everywhere.
2233 (I doubt that this will cause big compatibility problems since the
2234 application interface is unaffected.)
2236 * keywords.c, keywords.h: Files renamed from kw.c, kw.h.
2238 1999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2240 * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
2241 column inums to native form.
2243 Improvement of backtraces: Introduces a new stack narrowing
2244 specifier, #t, for the inner cut. (See further in the comments in
2245 stacks.c:narrow_stack ().)
2247 * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
2248 (Used to flag certain system procedures which shouldn't turn up in
2251 * eval.c (scm_sym_system_module): New symbol. (Used to flag
2252 modules which aren't "user" modules and the code of which
2253 shouldn't turn up in backtraces.)
2255 * eval.c, eval.h (scm_top_level_lookup_closure): New function:
2256 Extract the lookup closure from an environment.
2257 (scm_system_module_env_p): New function: Return non-#f if MODULE
2260 * stacks.c: #include "eval.h"; #include "procprop.h";
2261 (narrow_stack): Handle new narrowing specifier #t.
2263 * debug.c (scm_procedure_name): Use name property in the default
2266 * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
2268 * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
2270 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
2271 procedure throughout.
2273 * print.c (scm_iprin1): Removed extraneous space when printing
2274 procedure-with-setters.
2276 Entity and operator setter slots were introduced as a complement
2277 to the <procedure-with-setter> type in order to support entities
2278 and operators with setters in a reasonable and efficient way.
2279 * procs.c (scm_procedure, scm_setter): Handle entity and operator
2282 * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
2283 (struct scm_metaclass_operator): New setter slot.
2285 * gc.c (scm_gc_mark): Mark struct setter slot.
2287 * struct.c (scm_make_struct): Allocate one word more for
2288 entities and initialize the new slot.
2290 * struct.h (scm_struct_i_setter): New constant.
2292 1999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2294 * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
2295 directly through the instance.
2297 * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
2299 * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
2300 scm_struct_i_flags instead of scm_vtable_index_layout!
2302 * list.c (scm_list_star): New procedure.
2304 1999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2306 * debug.c (scm_init_debug): Added scheme level constant
2309 1999-02-12 Jim Blandy <jimb@savonarola.red-bean.com>
2311 * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS.
2313 * gc.c (scm_gc_sweep): Properly properly record the size of a
2314 freed structure. (Thanks to Greg Harvey.)
2316 1999-02-07 Jim Blandy <jimb@savonarola.red-bean.com>
2318 * gc.c (scm_gc_sweep): Properly record the size of a freed
2319 structure. (Thanks to Michael Livshin.)
2321 1999-02-06 Jim Blandy <jimb@savonarola.red-bean.com>
2323 Readline paren matching from Greg Harvey, with modifications from
2326 * readline.c (in_readline, reentry_barrier_mutex): Make these
2329 * readline.c: #include <sys/time.h> and "iselect.h", so we can
2330 control how long we're paused, and threads will run while we're
2332 (match_paren, find_matching_paren, init_bouncing_parens): New
2334 (scm_init_readline): Call init_bouncing_parens.
2335 (scm_readline_opts): Add the bounce-parens option.
2336 * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option.
2337 (SCM_N_READLINE_OPTIONS): Adjust.
2339 1999-02-06 Jim Blandy <jimb@zwingli.cygnus.com>
2341 All the below are changes from Ken Raeburn, to get Guile to use
2344 * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
2345 eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
2346 s_clauses, s_formals): Variables now const.
2348 * eval.c (promsmob): Now const.
2349 * macros.c (macrosmob): Now const.
2350 * smob.c (scm_newsmob): Smobfuns argument now points to const.
2351 (freecell, flob, bigob): Now const.
2353 * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
2354 error.c (scm_error, scm_syserror, scm_syserror_msg,
2355 scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
2356 scm_memory_error, scm_misc_error, scm_wta), macros.c
2357 (scm_make_synt), feature.c (scm_add_feature), filesys.c
2358 (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
2359 scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
2360 numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
2361 scm_num2long_long, scm_num2ulong),
2362 options.c (scm_options), posix.c (scm_convert_exec_args,
2363 environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
2364 ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
2365 (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
2366 (setzone, restorezone, bdtime2c), strop.c (scm_i_index),
2367 strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
2368 scm_intern_obarray, scm_intern, scm_intern0,
2369 scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
2370 scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
2371 indicating calling subr, error message text, reason for error,
2372 symbol name or feature name are now pointer to const.
2373 * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
2375 * procs.c (scm_init_iprocs): iproc argument now points to const.
2376 * pairs.c (cxrs): Now const.
2378 * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
2379 numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
2380 strports.h, symbols.h, unif.h: Update variable declarations and
2381 function prototypes for above changes.
2383 * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
2384 sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
2385 SYMB now point to const.
2387 1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2389 * print.c (scm_iprin1): Use scm_procedure_name instead of
2390 scm_procedure_property for compiled closures.
2392 * tags.h (scm_tc7_pws): New procedure type. Four representations
2393 for procedure-with-setters were considered before selecting this
2396 1. A closure where the CODE and ENV slots are used to represent
2397 the getter and a new SETTER slot is used for the setter. The
2398 original getter is stored as a `getter' procedure property. For
2399 closure getters, the CODE and ENV slots contains a copy of the
2400 getter's CODE and ENV slots. For subr getters, the CODE contains
2403 2. A compiled closure with a call to the getter in the cclo
2404 procedure. The getter and setter are stored in slots 1 and 2.
2406 3. An entity (i.e. a struct with an associated procedure) with a
2407 call to the getter in the entity procedure and the setter stored
2408 in slot 0. The original getter is stored in slot 1.
2410 4. A new primitive procedure type supported in the evaluator. The
2411 getter and setter are stored in a GETTER and SETTER slot. A call
2412 to this procedure type results in a retrieval of the getter and a
2413 jump back to the correct eval dispatcher.
2415 Representation 4 was selected because of efficiency and
2418 Rep 1 has the advantage that there is zero penalty for closure
2419 getters, but primitive getters will get considerable overhead
2420 because the procedure-with-getter will be a closure which calls
2423 Rep 3 has the advantage that a GOOPS accessor can be a subclass of
2424 <procedure-with-setter>, but together with rep 2 it suffers from a
2425 three level dispatch for non-GOOPS getters:
2427 cclo/struct --> dispatch proc --> getter
2429 This is because the dispatch procedure must take an extra initial
2430 argument (cclo for rep 2, struct for rep 3).
2432 Rep 4 has the single disadvantage that it uses up one tc7 type
2433 code, but the plan for uniform vectors will very likely free tc7
2434 codes, so this is probably no big problem. Also note that the
2435 GETTER and SETTER slots can live directly on the heap, using the
2436 new four-word cells.
2438 * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
2439 SCM_SETTER): New macros.
2440 (scm_procedure_with_setter_p, scm_make_procedure_with_setter,
2441 scm_getter, scm_setter): New procedures.
2443 * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
2445 * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
2448 * objects.c, objects.h (scm_class_of,
2449 scm_class_procedure_with_setter): Added.
2451 * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
2452 entry for scm_tc7_pws.
2454 * procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
2456 1999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2458 * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
2460 (scm_init_evalext): Call scm_make_gsubr for
2461 scm_m_generalized_set_x.
2463 * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
2465 * eval.h: Declare scm_s_set_x, scm_sym_set_x;
2467 * eval.c: Renamed "set" --> "set_x" in various names for
2468 consistency of name correspondence between Scheme and C;
2469 Renamed scm_i_set_x --> scm_sym_set_x and made global.
2470 Renamed s_set_x --> scm_s_set_x and made global.
2472 1999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2474 * random.c (scm_i_random_bignum): Made independent of endianness.
2476 1999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2478 * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
2479 (Thanks to Eric Hanchrow.)
2481 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2483 * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
2485 * random.c: Bugfix: Retrieve and store most significant 32 bits in
2486 different order if the machine is bigendian.
2487 (scm_init_random): Added safety check for bignum digit size.
2489 1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2491 * random.c, random.h (scm_i_make_rstate): New function: Makes
2492 scm_rstate from seed.
2493 (scm_copy_random_state, scm_seed_to_random_state): New functions.
2494 (scm_make_random_state): Removed.
2496 * random.c (scm_make_random_state): Use scm_i_make_rstate().
2498 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2500 * random.c: Bugfix: Retrieve and store most significant 32 bits in
2501 different order if the machine is bigendian.
2502 (scm_init_random): Added safety check for bignum digit size.
2504 1999-01-11 Roland Orre <mdj@mdj.nada.kth.se>
2506 * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements
2507 from first arg before equal elements in second arg in result.
2508 (scm_merge_list_step): Bugfix: Don't presume that arguments in a C
2509 function call are executed in a well defined order.
2511 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
2513 * alloca.c (alloca): Cast value returned by malloc. (Thanks to
2516 1999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2518 * random.c: Removed alloca includes.
2520 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
2522 * Makefile.in: This changed, for some reason I don't really
2523 understand, when I ran automake in the top level directory. This
2524 may be contamination by Cygnus internal releases. If you re-run
2525 automake and this change gets reverted, don't worry about it.
2527 1999-01-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2529 * sort.c, sort.h: New files: Implement slib's and scsh's sort
2530 interfaces. Author: Roland Orre.
2532 * Makefile.am: Added sort.c, sort.h, sort.x.
2534 * init.c: #include "sort.h";
2535 (scm_boot_guile_1): Call scm_init_sort ().
2537 * numbers.h: Added #include "libguile/print.h".
2539 * numbers.c: Formatted according to Guile conventions;
2540 Renamed s_bignum --> scm_s_bignum.
2542 * random.c, random.h: New files: Random number support.
2543 Interface same as slib's.
2545 * Makefile.am: Added random.c, random.h, random.x.
2547 * init.c: #include "random.h";
2548 (scm_boot_guile_1): Call scm_init_random ().
2550 1998-12-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2552 * Makefile.am: New files: guardians.c, guardians.x, guardians.h
2554 * guardians.c, guardians.h (scm_make_guardian,
2555 scm_guardian_gc_init, scm_guardian_zombify, scm_guard,
2556 scm_get_one_zombie, scm_init_guardian): This is an implementation
2557 of guardians as described in R. Kent Dybvig, Carl Bruggeman, and
2558 David Eby (1993) "Guardians in a Generation-Based Garbage
2559 Collector" ACM SIGPLAN Conference on Programming Language Design
2560 and Implementation, June 1993 ftp://ftp.cs.indiana.edu
2561 /pub/scheme-repository/doc/pubs/guardians.ps.gz
2562 Author: Michael N. Livshin.
2564 * gc.h (SCM_MARKEDP, SCM_NMARKEDP): New macros.
2566 * gc.c (scm_igc): Call scm_guardian_gc_init and
2567 scm_guardian_zombify.
2569 * init.c (scm_boot_guile_1): Call scm_init_guardian.
2571 1998-12-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2573 * macros.c (scm_makacro, scm_makmacro, scm_makmmacro): Added
2576 1998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2578 Move the procedure slots of entities to invisible slots (so that
2579 we can have operator class objects which themselves are entities).
2580 * struct.h (scm_struct_i_proc, scm_struct_i_flags,
2581 SCM_STRUCTF_ENTITY): New constants.
2583 * struct.c (scm_make_struct): Allocate "invisible" room for
2584 procedures if SCM_STRUCTF_ENTITY is set in vtable.
2586 * gc.c (scm_gc_mark): Mark entity procedures.
2588 * struct.c, struct.h (scm_alloc_struct): Renamed from alloc_struct
2590 (scm_struct_init): Renamed from init_struct and made global.
2592 * objects.h (SCM_ENTITY, scm_entity): Removed.
2593 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0,
2594 SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots.
2596 Mon Dec 14 18:10:12 1998 Maciej Stachowiak <mstachow@mit.edu>
2598 * snarf.h (SCM_SYNTAX): New macro to allow convenient declaration
2599 of syntactic forms, similar to SCM_PROC.
2600 * debug.c, eval.c, evalext.c: use SCM_SYNTAX to declare all special
2601 forms, and SCM_SYMBOL or SCM_GLOBAL_SYMBOL to delcare C variables
2602 for the name symbols when needed.
2604 1998-12-14 Jim Blandy <jimb@zwingli.cygnus.com>
2606 * Makefile.in: Regenerated.
2608 1998-12-05 Jim Blandy <jimb@zwingli.cygnus.com>
2610 * pairs.h (SCM_NEWCELL): When DEBUG_FREELIST is defined, don't
2611 take the address of _into; it might be a register. Just have
2612 scm_debug_newcell return the new cell.
2613 * gc.c (scm_debug_newcell): Just return the new cell, instead of
2614 taking the address of a place to store it as an argument.
2615 * gc.h (scm_debug_newcell): Change declaration.
2616 (Thanks to Greg Harvey.)
2618 1998-12-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2620 * ramap.c (array-copy-in-order!, array-map-in-order): New names.
2621 Replaces old names serial-array-copy! and serial-array-map!.
2623 * evalext.c (map-in-order): New name. Replaces serial-map.
2625 1998-12-05 Jim Blandy <jimb@totoro.red-bean.com>
2627 * smob.c (freeprint): New function.
2628 (freecell): Use it to print freed objects, for slightly easier
2631 1998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2633 * backtrace.c (display_frame): Made more robust. Doesn't throw an
2634 error if no source properties can be found for a frame. (Thanks
2635 to Christian Lynbech.)
2637 1998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2639 * objects.h: Removed slots direct_supers and direct_slots from the
2640 definitions of the rudimentary classes described by objects.h.
2642 * objects.c, objects.h (scm_entity_p): New procedure. Together
2643 with the predicates scm_procedure_p and scm_struct_p, this
2644 predicate makes it possible to differ between structs, entities
2647 * modules.c, modules.h (scm_resolve_module): New function.
2649 1998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2651 * objects.h (SCM_METACLASS_STANDARD_LAYOUT,
2652 SCM_METACLASS_OPERATOR_LAYOUT): Removed slots `direct_supers' and
2655 * objects.c (scm_entity_p): New procedure.
2657 * procprop.c (scm_i_procedure_arity): Bugfix: Return correct value
2658 for asubrs, rpsubrs, lsubrs and lsubr_2s.
2660 1998-11-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2662 * procprop.h (scm_i_procedure_arity): Added declaration.
2664 * procprop.c (scm_i_procedure_arity): Made global; New code to
2665 handle operators and entities.
2666 (scm_procedure_property): No need to call scm_procedure_p since
2667 scm_i_procedure_arity now does all necessary type checking.
2668 Added #include "objects.h".
2670 * feature.c (scm_remove_hook_x): Bugfix: Changed reference to
2671 s_add_hook_x --> s_remove_hook_x.
2672 (scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments.
2673 Added #include "procprop.h"
2675 * feature.c, feature.h (scm_reset_hook_x): New procedure.
2676 (scm_make_hook): Optional argument defines number of arguments to
2678 (scm_make_named_hook): Take number of args as second arg.
2679 (scm_run_hook): Renamed from scm_run_hooks (old name defined in
2680 boot-9.scm for a while); First arg is the hook. The rest are
2681 arguments passed on to the hook procedures.
2683 1998-11-23 Jim Blandy <jimb@zwingli.cygnus.com>
2685 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest,
2686 scm_logbit_p): Do the computation in ulongs. This is not as nice
2687 as doing it in bignums, but at least it's good enough for
2688 manipulating flags in 32-bit words. (Thanks to Jim Wilson.)
2690 * regex-posix.c (scm_regexp_exec): Reliably mark unmatched
2691 subexpressions. (Thanks to Charbel Jacquin.)
2693 1998-11-23 Mikael Djurfeldt <mdj@kenneth>
2695 * feature.c, feature.h (scm_make_hook, scm_add_hook_x,
2696 scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm.
2697 (scm_make_named_hook): New function.
2699 * feature.c: Added #include "eval.h".
2701 * modules.c (scm_make_module): Beautify the module.
2703 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2705 * modules.c, modules.h: New files: C interface to modules. (This
2706 is necessary in order to interface the object system to Guile
2707 properly. The guts of these modules will be replaced by the new
2708 module system in the future.)
2710 * init.c: Added #include "modules.h"
2711 (scm_boot_guile_1): Call scm_init_modules.
2712 (invoke_main_func): Call scm_post_boot_init_modules.
2714 * Makefile.am: Added modules.c, modules.x, modules.h.
2716 1998-11-22 Mikael Djurfeldt <mdj@kenneth>
2718 * procs.c: #include "objects.h"
2719 (scm_procedure_p): Return #t also on structs which are operators.
2721 * objects.c (scm_init_objects): Renamed <standard-metaclass>,
2722 <operator-metaclass> and <entity-class> to <standard-class>,
2723 <operator-class> and <entity> in order to conform with STKlos
2726 * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct
2727 which isn't an operator.
2728 (SCM_APPLY): Ditto, but jump to badproc.
2730 1998-11-21 Mikael Djurfeldt <mdj@kenneth>
2732 * eval.c (SCM_CEVAL): Allow structs implanted in code.
2733 Previously, structs implanted in code were interpreted as forms
2734 the operator of which was a gloc. We solve this by checking for
2735 the zero in the emulated vcell in the struct vtable. Since
2736 implanted structs always will look like forms with a gloc
2737 operator, execution will only be slowed down by maximally one
2738 extra test-and-branch per application.
2740 * evalext.c (scm_definedp): Removed check for isyms; Added a
2741 second optional argument: It is now possible to supply an
2742 evaluation environment in which to look for the symbol.
2744 1998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2746 * readline.c (scm_init_readline): Set
2747 rl_basic_word_break_characters. (Thanks to Ian Grant.)
2749 * coop.c (coop_condition_variable_wait): Removed
2750 (coop_condition_variable_wait_mutex): Folded logic of
2751 coop_mutex_unlock into coop_condition_variable_wait_mutex to
2752 prevent condvar signal lossage. Previously, another thread could
2753 start to run after unlocking the mutex but before putting the
2754 current thread on the wait queue. If that thread then would
2755 signal the first, the signal would be lost. (Thanks to Christian
2758 1998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2760 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
2763 1998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2765 * objects.c (scm_i_make_class_object): Renamed from
2766 make_class_object; exported; error checking moved to
2767 scm_make_class_object and scm_make_subclass_object.
2768 (scm_make_class_object, scm_make_subclass_object): Use
2769 scm_i_make_class_object.
2770 (scm_make_subclass_object): Let the subclass have same metaclass
2773 1998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2775 * debug.c (scm_debug_options): Bugfix: Set the value of
2776 scm_stack_checking_enabled_p after setting debug options;
2777 #include "stackchk.h". (Thanks to Richard Polton.)
2779 1998-11-13 Radey Shouman <rshouman@metro2000.com>
2781 * unif.c (scm_array_contents): removed unnecessary test for 0
2784 1998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2786 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
2787 Replaced by macro `collect' in boot-9.scm.
2789 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2791 * eval.c (scm_copy_tree): Copy source properties if existent.
2793 * debug.c (scm_start_stack): Copy source when evaluating. (If we
2794 don't, we may end up passing memoized source to a transformer.)
2796 1998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2798 * stack.c (get_applybody): Help function which lookups the first
2799 body form of the apply closure.
2800 (read_frames): Prevent the source of the first form of the apply
2801 closure from being recorded. This would only be confusing.
2803 * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP):
2804 Replaces SCM_MACROFRAME, SCM_MACROFRAMEP.
2806 * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP.
2808 * stacks.c (read_frame): Bugfix: Removed lingering `else'
2810 (read_frames): Use SCM_MACROEXPP.
2812 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2814 * stacks.c (read_frames): Skip gsubr frames in backtraces. (They
2815 don't contain interesting information since all arguments are
2816 present in the frame which applies the compiled closure anyway.);
2817 Skip the transformer application frames.
2819 * print.c (scm_iprin1): Print gsubrs as primitives.
2821 1998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2823 * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type.
2825 * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so
2826 that we can identify these in a backtrace. (This change doesn't
2827 introduce any significant speed penalty.)
2829 * eval.c: Added note about `serial-map' using scm_map.
2831 * read.c, read.h (scm_read_options, scm_read_opts): Removed
2832 readline options. They should reside in their own options array.
2834 * readline.c, readline.h (scm_readline_options,
2835 scm_readline_opts): Moved readline options here.
2837 1998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2839 * readline.c (scm_read_history, scm_write_history): Bugfix: Use
2840 SCM_ROCHARS instead of SCM_CHARS.
2842 * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP,
2843 not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS.
2845 1998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2847 * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL.
2848 This is quite important since the latter clears the
2849 FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at
2850 every single character read...
2852 1998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2854 * print.c (scm_iprin1): Removed suspect looking (and indeed
2855 malevolent) semicolon after test for user supplied closure print
2856 procedure. (Thanks to Telford Tendys.)
2858 * list.c (scm_sloppy_memq): Removed sloppy_mem_check.
2859 (scm_memq, scm_memv, scm_member): Do argument checking *before*
2860 starting to search the list. Removed call to sloppy_mem_check.
2862 * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New
2863 procedures: Same as scm_delq_x et al, but delete maximally one
2866 * options.c (scm_options, scm_init_options): GC-protect option
2867 values of type SCM. (Thanks to Telford Tendys.)
2869 1998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2871 * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead
2872 make sure that there always is a "real" scm_lookupcar.
2874 1998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2876 * read.c, read.h (scm_read_opts): New read options
2877 "history-length" and "history-file".
2878 (scm_read_options): Stifle history to history length.
2880 * readline.c (scm_read_history, scm_write_history): New procedures.
2882 1998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2884 * eval.h (scm_macro_eval_x): Removed declaration.
2886 * eval.c (scm_s_expression, scm_s_test, scm_s_body,
2887 scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals):
2888 Renamed and made global.
2890 * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM.
2891 (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR.
2893 * evalext.c, evalext.h: New files. Contain non-R5RS things
2894 having to do with evaluation.
2896 * evalext.c (scm_serial_map): New procedure: Version of `map'
2897 which guarantees that the procedure is applied to the lists in
2899 (scm_m_sequence_to_list): New syntax: Version of `begin' which
2900 returns a list of the results of the body forms instead of the
2901 result of the last body form.
2902 (scm_definedp, scm_m_undefine): Moved from eval.c
2904 * evalext.h (scm_m_sequence_to_list): Added declaration.
2906 * macros.c, macros.h: New files.
2907 (scm_procedure_to_syntax, scm_procedure_to_macro,
2908 scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type,
2909 scm_macro_name, scm_macro_transformer): Moved from eval.c
2910 (scm_make_synt): Moved from eval.c
2912 * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
2914 * init.c (scm_boot_guile_1): Added calls to scm_init_macros and
2917 * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
2919 * debug.c, print.c: Added #include "macros.h".
2921 1998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2923 This change adds the ability to use `unread-char' multiple times
2924 without interspersed reads and adds the new procedure
2925 `unread-string'. The change is optimized for the common case of
2926 unreading a single character. This is also the reason behind the
2927 choice to store characters in the port itself: in most cases no
2928 extra malloc is required.
2930 The amount of code in some macros in ports.h has been increased to
2931 the extent that they would fit better as C functions, but, since
2932 this code belongs to the port representation, such functions
2933 should be placed in ports.c which would cause calls back and forth
2934 between ports.c and genio.c. That is not good for performance.
2935 Also, keeping them as macros allows the compiler to do some
2936 optimizations which are needed to make the current interface
2937 (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient.
2939 One benchmark (Guile startup time) indicates an increase of
2940 loading speed of 1%. Another (reading (using `read') boot-9.scm
2941 10 times) shows no change in performance.
2943 (Caveat: Since Gary is redesigning I/O anyway, no big efforts were
2944 made to find a beautiful solution.)
2946 * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten.
2947 (SCM_TRY_CLRDY): New macro: Only clear the first unread
2948 character. (SCM_CLRDY clears all.)
2949 (SCM_N_READY_CHARS): New macro: Returns number of unread
2950 characters in a port. Returns wrong answer if SCM_CRDYP is false.
2951 (struct scm_port_table): New fields: `entry' contains port table
2952 index, `cp' points to last unread char, `cbuf' is the buffer for
2953 unread chars, `cbufend' points after end of the character buffer.
2955 * ports.h, ports.c (scm_unread_string): New procedure.
2956 (scm_grow_port_cbuf): New function.
2958 * ports.c (scm_add_to_port_table, scm_remove_from_port_table):
2960 (scm_generic_fgets), fports.c (local_fgets): Use a loop
2961 to read unread characters. Use SCM_TRY_CLRDY instead of
2964 * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position.
2966 * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY.
2968 * genio.c, genio.h (scm_ungets): New function.
2970 * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code
2973 1998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2975 * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed
2976 declarations. (Thanks to Russ McManus.)
2978 1998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2980 * numbers.c (num2long): As a software archeologist, I'm proud of
2981 this finding! :) Preliminary dating suggests an almost 4 year old
2982 remnant from the SCM ancestor. The sample has been removed from
2983 the finding site and is now safely stored in the repository.
2985 * numbers.h: Removed prototype for num2long.
2987 * unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
2989 * gh_data.c (gh_scm2doubles): Make it possible to pass result
2990 array as second arg.
2991 (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
2992 gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
2993 * gh.h: Updated and added prototypes.
2995 * gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
2997 1998-10-24 Jim Blandy <jimb@zwingli.cygnus.com>
2999 * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.)
3001 * guile-snarf.in: Never generate an empty file. (Thanks to
3004 * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1,
3005 gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1,
3006 gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1,
3007 gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0,
3008 gh_new_procedure5_0): Specify argument types, to appease C++
3009 compilers. (Thanks to Brad Bowman.)
3011 Bug reports from Russ McManus:
3012 * guile-snarf.in: If the CPP environment variable is set, use that
3013 as the C preprocessor, instead of the preprocessor autoconf
3015 * snarf.h (SCM_PROC): Cast the function pointer passed to
3016 scm_make_gsubr, to satisfy C++.
3018 * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch):
3019 Use the handler passed, instead of ignoring it and using
3020 gh_standard_handler. (Thanks to Etienne Bernard.)
3022 1998-10-20 Jim Blandy <jimb@zwingli.cygnus.com>
3024 * ports.h: Put text after #endif in comment. (Thanks to Nicolas
3027 1998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
3029 * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
3030 continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
3031 dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
3032 feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
3033 genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
3034 hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
3035 list.c, list.h, load.c, load.h, mallocs.c, markers.c,
3036 mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
3037 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
3038 procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
3039 regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
3040 script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
3041 srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
3042 strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
3043 symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
3044 vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
3047 * script.c (scm_compile_shell_switches): Define
3048 use-emacs-interface in the root module, so the repl code can see
3049 it. See today's change to top-repl in ice-9/boot-9.scm.
3051 * filesys.c (set_element, get_element): Make sure that `element'
3052 is a cell before applying SCM_FPORTP to it. (Thanks to Jost
3053 Boekemeier and Jorgen "forcer" Schaefer.)
3055 1998-10-18 Jim Blandy <jimb@zwingli.cygnus.com>
3057 * chars.c (scm_charnames): In ASCII character name table, make
3058 newlines print as #\newline by default, not #\nl.
3060 * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in
3061 alphabetical order. Oh thrills. But it helps me know how far
3062 along in the compilation I am.
3063 * Makefile.in: Regenerated.
3065 1998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3067 * unif.c (scm_raprin1): Changed print syntax for byte vectors from
3068 #bytes(...) to #y(...), and syntax for short vectors from
3069 #short(...) to #h(...). This may seem nutty, but, like the other
3070 uniform vectors, byte vectors and short vectors want to have the
3071 same print and read syntax (and, more basic, want to have read
3072 syntax!). Changing the read syntax to use multiple characters
3073 after the hash sign breaks with the conventions used in R5RS and
3074 the conventions used for the other uniform vectors. It also
3075 introduces complexity in the current reader, both on the C and
3076 Scheme levels. (The Right solution is probably to change the
3077 syntax and prototypes for uniform vectors entirely.)
3079 1998-10-17 Jim Blandy <jimb@savonarola.red-bean.com>
3081 Don't use local_fgets on sockets; ftell doesn't work on sockets.
3082 (Thanks to Jorgen "forcer" Schaefer.)
3083 * ports.h (SCM_NOFTELL): New flag.
3084 * fports.c (local_fgets): If it's set, use the generic fgets.
3085 * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
3087 1998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3089 * script.c (scm_compile_shell_switches): Add handling of -q switch
3090 (inhibit loading of user init file).
3091 (scm_shell_usage): Add usage text for -q switch.
3092 (scm_compile_shell_switches): Always load user init file first if
3093 it is loaded at all.
3095 1998-10-16 Jim Blandy <jimb@zwingli.cygnus.com>
3097 * stime.c: The CPP hair to determine a value for CLKTCK is weird,
3098 and is now broken under NetBSD. I can't fathom what it's trying
3099 to do, so I've replaced it with something that I do understand,
3100 which seems to work, and which isn't broken on NetBSD. "Progress?
3101 You Decide." (Thanks to Perry Metzger.)
3103 * regex-posix.c (scm_regexp_exec): Add a cast to remove a
3104 signed/unsigned comparison.
3106 1998-10-15 Jim Blandy <jimb@zwingli.cygnus.com>
3108 Warning fixes from Greg Harvey:
3109 * unif.c (scm_array_set_x): initializer for pos
3110 * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED)
3111 * struct.c (scm_struct_ref, scm_struct_set_x): Added
3112 initializers for field_type, since EGCS so desparately wants to
3114 * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons,
3115 scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes
3116 when GUILE_DEBUG is defined.
3117 * dynwind.h (scm_wind_chain): Same.
3118 * ports.h (scm_pt_size, scm_pt_member): Same.
3119 * print.h (scm_current_pstate): Same.
3120 * procs.h (scm_make_cclo): Same.
3122 1998-10-14 Jim Blandy <jimb@zwingli.cygnus.com>
3124 Handle short and long long uniform arrays properly. (Thanks to
3126 * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x,
3127 raeql_1): Add cases for scm_tc7_svect (short vectors) and
3128 scm_tc7_llvect (long long vectors).
3130 Change the way libguile and boot-9.scm are timestamped, to try to
3131 get rid of these spurious mismatch warnings. Now both
3132 libguile/versiondat.h and ice-9/version.scm are generated directly
3133 by the configuration process, rather than having version.scm
3134 generated directly, and libguile/versiondat.h generated by the
3135 Makefile, which is generated by configure. It seems that
3136 sometimes the Makefile would change, but versiondat.h depends on
3137 Makefile.in, not Makefile, so it wouldn't get rebuilt.
3138 * Makefile.am (versiondat.h): Target removed; this is generated
3139 directly by the configure script now.
3140 (BUILT_SOURCES): Remove versiondat.h.
3141 * versiondat.h.in: New file, transformed by the configure script
3143 * Makefile.in: Regenerated.
3145 * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,
3146 options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
3147 SCM_CAUTIOUS; this way, 1) there's only one version of each flag
3148 to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
3149 if we want to use them in a header file some day, we can. (Thanks
3150 to Michael Livshin.)
3152 * stime.c (scm_get_internal_real_time): Do the arithmetic using
3153 SCM numbers, so we won't have rollover problems; the range of a
3154 signed long in milliseconds is about 25 days. (Thanks to Karl
3157 Don't redefine sleep and usleep; fix this problem now.
3158 * coop.c (sleep, usleep): Remove declarations; we don't use or
3159 redefine these any more.
3160 (scm_thread_usleep, scm_thread_sleep): New functions which do the
3161 job of usleep and sleep in a thread-friendly way. We can use
3162 these in the rest of Guile. Define versions for systems both with
3163 and without iselect.
3164 * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations.
3165 * scmsigs.c (usleep): Clean up oddities declaring usleep; since
3166 we're just using it, not redefining it, we can use a K&R style
3168 (sleep): Declare this, too, if the system hasn't.
3169 (scm_sleep, scm_usleep): Use scm_thread_sleep and
3170 scm_uthread_sleep if they're available; otherwise, just call the
3172 * scmconfig.h.in: Regenerated.
3174 * coop.c (scm_thread_sleep): Make `slept' an unsigned long.
3176 * coop.c (coop_sleephelp): Remove ANSI #ifdef hair.
3178 1998-10-12 Jim Blandy <jimb@zwingli.cygnus.com>
3180 * threads.c: Doc fix.
3182 The argument type of usleep varies from system to system,
3183 as does the return type. We really shouldn't be redefining usleep
3184 at all, but I don't have time to clean that up before the 1.3.
3185 release. It's on the schedule for afterwards. (Thanks to Julian
3187 * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
3189 * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
3190 * scmconfig.h: Regenerated.
3192 * simpos.c (scm_software_type): Procedure deleted. This isn't the
3193 right way to handle system variation. Autoconf's approach is the
3195 * simpos.h (scm_software_type): Declaration deleted.
3197 * script.c (scm_find_executable): Don't test if unix is #defined
3198 here; first, NetBSD doesn't #define it, and second, it's the wrong
3199 way to go about these things. (Thanks to Perry Metzger.)
3200 (dld_find_executable): Delete this MSDOS support code. This isn't
3201 the way we want to support this; it needs to be rethunk at a
3204 * genio.c (scm_do_read_line): Don't just politely check that the
3205 line was either non-empty or EOF. Abort if it's empty and not
3208 1998-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
3210 * scmconfig.h.in: Regenerated.
3212 * libguile.h: Don't omit the dynamic linking functions. (Thanks
3215 * genio.c (scm_do_read_line): Count lines correctly when the file
3216 doesn't end in a newline.
3218 1998-10-10 Jim Blandy <jimb@zwingli.cygnus.com>
3220 * genio.c (scm_do_read_line): Maintain the line count correctly.
3221 (Thanks to Harvey J. Stein and Greg Harvey.)
3223 * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile
3226 * numbers.c (big2str): Protect t from garbage collection until
3227 we're done. (Thanks to Gary Houston.)
3229 1998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
3231 * Makefile.am (libguile_la_LDFLAGS): Increment shared library
3233 * Makefile.in: Regenerated.
3235 * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,
3236 scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
3239 Do magic to mix reads and writes on stdio FILE-based ports.
3240 (Thanks to Christian Lynbech.)
3241 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY):
3243 (pre_read, pre_write): New functions.
3244 (local_fgetc, local_fgets, local_ffwrite, local_fputc,
3245 local_fputs): Call them.
3246 (local_fflush): Mark the port as ready for reading and writing.
3247 (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE
3248 flags on new port objects. This might not be accurate --- who
3249 knows what state the FILE * is in when we get it --- but it won't
3250 do extraneous calls to fflush or fseek, so it's no worse than the
3251 behavior before this change.
3252 * ports.h: Add comment.
3254 Centralize the creation of port objects based on stdio FILE * in
3255 fports.c; don't just throw them together anywhere.
3256 * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
3257 what the rest of Guile wants. Don't set the revealed count;
3258 that's only appropriate for stdin, stdout, stderr.
3259 (scm_standard_stream_to_port): This function does set the revealed
3261 * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
3262 not scm_stdio_to_port.
3263 * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
3264 * fports.c (scm_open_file): Same.
3265 * posix.c (scm_pipe): Same.
3266 * socket.c (scm_sock_fd_to_port): Same.
3267 * ioext.c (scm_fdopen): Same.
3268 (scm_freopen): Moved from here to...
3269 * fports.c (scm_freopen): ... here. This is really something that
3270 munges the internals of an fport, so it should go here.
3271 * fports.h (scm_stdio_to_port): Adjust prototype.
3272 (scm_standard_stream_to_port, scm_freopen): New protoypes.
3273 * ioext.h (scm_freopen): Prototype removed.
3275 * filesys.c (set_element, get_element): This can work on both pipe
3276 and file ports, so use SCM_FPORTP to typecheck, instead of testing
3279 * scmconfig.h.in: Regenerated.
3281 Change the definition of the functions in scm_ptobfuns so that
3282 they get passed the port object, not the port's stream.
3283 * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
3284 * gc.c (scm_gc_sweep): Pass the port itself to the free function.
3285 * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
3286 Pass the port itself to the scm_ptobs function.
3287 * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
3288 scm_generic_fgets): Same.
3289 (putc_void_port, puts_void_port, write_void_port, flush_void_port,
3290 getc_void_port, fgets_void_port, close_void_port): Just change the
3291 argument names; these functions don't really do anything.
3292 * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
3293 local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
3294 port as an argument, and use SCM_STREAM to get the stdio FILE *.
3295 Also, use prototyped definitions, and get rid of the extra
3297 (scm_fptob, scm_pipob): We don't need casts here any more.
3298 * strports.c (prinstpt): Use prototype declarations.
3299 (stputc, stwrite, stputs, stgetc): Take the port as an argument,
3300 and use SCM_STREAM to get the string info. Also, use prototyped
3301 definitions, and get rid of the extra declarations.
3302 * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
3305 * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
3306 prototype; it's okay (preferred, even!) to use ANSI C in Guile.
3308 * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
3309 scm_fgets, for consistency.
3310 (scm_fptop, scm_pipob): References updated.
3312 1998-10-08 Jim Blandy <jimb@zwingli.cygnus.com>
3314 Include the source location in error messages for scripts.
3315 * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
3316 stack is still there when we catch the error.
3317 * throw.c (handler_message): If we are handling an error with a
3318 message, then put together the proper arguments and call
3319 scm_display_error, instead of scm_display_error_message. That
3320 displays source location, if it can find it.
3322 1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
3324 * gc.c (scm_unprotect_object): Change this so that calls to
3325 scm_protect_object and scm_unprotect_object nest properly.
3326 (scm_protect_object): Doc fixes.
3328 * strings.c (scm_string_set_x): Require the argument to be a
3329 writable string, not a substring or a symbol.
3330 * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
3331 (Thanks to John Redford and Charbel Jacquin.)
3333 * scmconfig.h.in: Regenerated; ../acconfig.h has changed.
3335 1998-10-07 Jim Blandy <jimb@totoro.red-bean.com>
3337 * eval.c (safe_setjmp): Remove this misunderstanding.
3338 (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
3341 1998-10-06 Jim Blandy <jimb@zwingli.cygnus.com>
3343 * libguile.h: Mark these as C declarations, for compilation by C++
3346 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
3347 __cplusplus clause. I seriously doubt this ever worked the way
3348 the author seems to have intended.
3350 1998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
3352 Utterly needless cleanups to hopelessly messy code.
3353 * ports.c: Doc fixes.
3354 (scm_fflush): Moved to ...
3355 * genio.c (scm_fflush): ... here, amongst all the other port
3356 method invocation functions.
3357 * genio.h, ports.h: The prototype moves too.
3359 1998-10-04 Jim Blandy <jimb@zwingli.cygnus.com>
3361 * backtrace.c (display_error_body): The current frame does not
3362 always have a parent frame; consider a function called directly
3363 from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej
3366 * alloca.c (alloca): Undo yesterday's changes, and simply call
3367 malloc directly for storage, and abort if we don't get what we
3368 want. The situation is much simpler --- just call malloc. Emacs
3369 has bizarre/evil requirements (signal handlers might malloc unless
3370 you set this global flag, so you have to set the flag around all
3371 calls to malloc) which we are certainly not going to conform to,
3372 so we can do the simple and obvious thing.
3374 * coop.c (coop_condition_variable_wait): Make this function
3375 static. It's only useful internally --- you should never just
3376 wait on a condition variable.
3377 * coop-defs.h (coop_condition_variable_wait): Delete prototype.
3379 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
3381 * unif.c (scm_array_set_x): Accept any kind of number as an
3382 element for a uniform vector of doubles. This is more consistent
3383 with Scheme's view of numbers. (Thanks to Miroslav Silovic.)
3385 * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
3386 works; I can't conveniently test it myself. (Thanks to Dvid
3387 Tillman for the bug report.)
3389 * init.c: Doc fixes.
3391 * init.c (invoke_main_func): Load the startup files (boot-9.scm)
3392 from here, not from scm_compile_shell_switches (which is a pretty
3393 dumb place to do it).
3394 (scm_load_startup_files): New function.
3395 (scm_ice_9_already_loaded): Variable moved to here from script.c.
3396 * script.c (scm_compile_shell_switches): Don't load the startup
3398 (scm_ice_9_already_loaded): Variable moved.
3399 * init.c (scm_load_startup_files): Prototype for new function.
3400 * gh_init.c (gh_enter): Doc fix.
3402 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
3404 Some anti-warning changes from Greg Harvey.
3405 * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler
3406 warnings when it doesn't understand our NORETURN declarations in
3408 * posix.c (scm_mknod): Similar.
3410 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
3412 * posix.c (scm_getpwuid): If we can't find an entry, return our
3413 own message, instead of using scm_syserror --- the getpwMUMBLE
3414 functions don't set `errno' to anything interesting.
3416 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
3418 Get rid of warnings from the cooperative threading system.
3419 * threads.h (scm_single_thread_p, scm_yield,
3420 scm_call_with_new_thread, scm_join_thread, scm_make_mutex,
3421 scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable,
3422 scm_wait_condition_variable, scm_signal_condition_variable): Add
3423 prototypes for these Scheme-visible functions.
3424 * coop-defs.h (coop_next_runnable_thread,
3425 coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread):
3426 Prototypes for these here, even though they're from iselect.c.
3427 (coop_condition_variable_wait, coop_join): Add prototypes.
3428 * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex,
3429 scm_threads_free_condvar): Make these smob functions static.
3430 * coop-threads.h (coop_init): Give this a real prototype.
3431 * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'.
3432 (coop_next_runnable_thread): No need to provide prototype; it's in
3435 * scmconfig.h.in: .detarenegeR
3437 * iselect.c, threads.c: Doc fixes.
3439 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
3441 * Makefile.in: Regenerated with a patched automake, to get
3442 dependency generation right when using EGCS.
3444 * inet_aton.c (inet_aton): Add prototype, to remove compiler
3445 warning. (Thanks to Robert Pluim.)
3447 * inet_aton.c (inet_aton): Reassure the compiler that the
3448 arguments to the <ctype.h> macros are all unsigned characters, not
3451 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
3453 Getting rid of more warnings...
3454 * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
3455 today's change to ../configure.in.
3456 * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
3457 * scmconfig.h.in: Regenertaded.de.,.__
3458 * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
3459 (scm_localtime, scm_mktime): Use a const char * to manipulate the
3462 * readline.c: Doc fix.
3463 (rl_cleanup_after_signal, rl_free_line_state): Make these static.
3464 * readline.h (scm_filename_completion_function): Add prototype.
3465 (scm_init_readline): Make this into a prototype.
3467 * readline.c (scm_filename_completion_function): Use SCM_PROC to
3468 declare this, instead of calling scm_make_subr manually.
3470 1998-10-02 Jim Blandy <jimb@savonarola.red-bean.com>
3472 * readline.h (scm_init_readline): Add prototype for this.
3473 (scm_init_readline): Make this a real prototype.
3475 1998-09-30 Jim Blandy <jimb@zwingli.cygnus.com>
3477 Warning fixes from Maciej Stachowiak:
3478 * backtrace.h (scm_display_application, scm_backtrace): Add
3480 * debug.c (scm_m_start_stack): Make this function static.
3481 * fluids.h (scm_fluid_p): Add prototype.
3482 * procprop.c (scm_i_procedure_arity): Make this function static.
3483 * regex-posix.c (scm_regexp_error_msg): Make this function static.
3484 * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl.
3485 * root.h (scm_dynamic_root): Add external prototype.
3486 * scmsigs.h (scm_usleep): Add external prototype.
3487 * script.h (scm_init_script): Use prototype, not K&R decl.
3488 * stacks.h (scm_stack_id): Add external prototype.
3489 * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
3491 1998-09-30 Mark Galassi <rosalia@cygnus.com>
3493 * gh.h: took out the definitions of vset and vref, since they are
3494 replaced by the proper vector routines that correspond to the R4RS
3497 1998-09-29 Jim Blandy <jimb@totoro.red-bean.com>
3499 * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros;
3500 these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a
3501 third argument, a C expression that should result in a SCM value,
3502 which is used to initialize the variable. Reimplemented
3503 SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej
3506 * version.h (scm_libguile_config_stamp): Add prototype.
3507 (From Maciej Stachowiak.)
3509 1998-09-26 Jim Blandy <jimb@zwingli.cygnus.com>
3511 * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when
3512 (force 9) is tried. (Thanks to Karl M. Hegbloom.)
3514 1998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
3516 * print.c (scm_iprin1): Rather than having one i, and using it in
3517 several places, declare a fresh i local to each block where it is
3518 used, and give it a signedness appropriate to its use in each case.
3519 (scm_iprlist): Same.
3521 * print.c (scm_iprin1): Add cast to avoid unsigned/signed
3522 comparison warnings.
3524 * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid
3525 signed/unsigned clashes.
3527 * posix.h (scm_tmpnam): Added prototype.
3529 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
3530 scm_make_subclass_object): Add external prototypes.
3532 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
3533 comparison is okay here.
3535 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
3537 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
3538 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
3540 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
3543 * load.c (swap_port): Make this function static.
3545 * load.c (scm_search_path): Make max_path_len and max_ext_len
3546 unsigned, since they're compared against string sizes.
3548 * load.c (init_build_info): Make i unsigned.
3550 * ioext.h (scm_read_line): Add prototype.
3552 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
3553 scm_hash_fn_remove_x): Make hash bucket index local variable k
3554 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
3555 accurately as possible.
3557 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
3558 comparisons, and range checking to make sure those casts are
3561 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
3562 signed/unsigned comparisons.
3564 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
3565 avoid signed/unsigned comparisons.
3566 * smob.h (scm_numsmob): Change extern declaration to match.
3568 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
3569 avoid signed/unsigned comparisons.
3570 * ports.h (scm_numptob): Change extern declaration to match.
3571 (scm_current_load_port, scm_set_port_line_x,
3572 scm_set_port_column_x): New prototypes.
3574 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
3575 test code, and it causes warnings.
3577 * gh.h (gh_int2scmb, gh_uniform_vector_length,
3578 gh_uniform_vector_ref): Added prototypes.
3580 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
3581 debugging support unconditionally. That's backtrace.c, stack.c,
3582 debug.c, and srcprop.c.
3583 (EXTRA_libguile_la_SOURCES): Omit those from here.
3584 * Makefile.in: Regenerated.
3586 1998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3588 * options.c (scm_options): Bugfix: Allow empty list of options!
3590 * debug.c, debug.h (scm_single_step): Removed.
3591 (scm_with_traps): New procedure. This procedure could easily be
3592 written in Scheme but needs to be highly optimized.
3594 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
3596 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
3597 Check SCM_TRAPS_P before trapping.
3599 1998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
3601 Changes to avoid signed/unsigned comparison warnings.
3602 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
3603 (scm_gc_sweep): Make n and j local to the blocks they're used in,
3604 so they can have appropriate types for each application. Make i
3605 signed. Use initializers in some spots. I'll probably pay for
3607 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
3608 (scm_must_realloc): Make nm unsigned.
3609 (init_heap_seg): Make new_seg_index and n_new_objects signed.
3610 (scm_init_storage): Use prototype-style definition, and make the
3612 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
3613 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
3615 * filesys.c (scm_readlink): Make local vars rv and size ints, to
3616 avoid signed/unsigned comparison warnings, and because the return
3617 value of readlink may be -1. Don't bother casting the third
3618 argument to readlink.
3620 * filesys.c (scm_dirname, scm_basename): Move these to their own
3621 page, at the end of the file.
3622 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
3624 * eval.h (scm_eval_options_interface): Add external prototype for this.
3625 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
3627 * eval.c (scm_lookupcar1): Make this static.
3629 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
3630 Make these prototype declarations, not K&R-style.
3632 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
3633 unsigned comparison warning.
3635 * appinit.c: File removed. It had a single function in it, empty,
3636 whose reason for existence is explained in no documentation or
3637 comment. I think it's there as a default for some Tcl-style
3638 initialization, but Tcl abandoned that approach a while ago.
3639 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
3640 (BUILT_SOURCES): Remove appinit.x.
3641 * Makefile.in: Regenerated.
3643 1998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
3645 * Makefile.in: Regenerated using the last public version of
3646 automake, not the hacked Cygnus version.
3648 1998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
3650 Remove Totoro kludge.
3651 * Makefile.in, scmconfig.h.in: Regenerated.
3652 * init.c, readline.c: Don't check if TOTORO is #defined.
3654 1998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
3656 * Makefile.am: Adjust for new thread configuration system.
3657 (INCLUDES): Include the value of THREAD_CPPFLAGS.
3658 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
3660 (THREAD_LIBS): Definition deleted; automake will generate such
3661 things automatically.
3662 * Makefile.in: Regenerated.
3664 1998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
3666 Simplify smob and port marking; set the mark bit in the generic
3667 marking code, and make marker routines only responsible for
3668 turning up outgoing pointers.
3669 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
3670 before calling the marking function. Don't call the marking
3671 function if it's zero.
3672 * markers.c (scm_mark0): Just return #f. This function isn't
3673 necessary at all now, but it's harmless to call it. We'll leave
3674 it in so other folks' code doesn't croak at link time.
3675 (scm_markcdr): Don't call SCM_SETGC8MARK.
3676 * async.c (mark_async): Don't call SCM_SETGC8MARK.
3677 * dynl.c (mark_dynl_obj): Same.
3678 * root.c (mark_root): Same.
3679 * srcprop.c (marksrcprops): Same.
3680 * unif.c (markra): Same.
3681 * variable.c (scm_markvar): Same.
3682 * ports.c (scm_markstream): Same.
3683 (void_port_ptob): Specify zero for our marking function.
3684 * debug.c (debugobjsmob): Same.
3685 * dynwind.c (guardsmob): Same.
3686 * filesys.c (dir_smob): Same.
3687 * fluids.c (fluid_smob): Same.
3688 * fports.c (scm_fptob, scm_pipob): Same.
3689 * mallocs.c (mallocsmob): Same.
3690 * regex-posix.c (regex_t_smob): Same.
3691 * smob.c (freecell, flob, bigob): Same.
3692 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
3693 * throw.c (jbsmob, lazy_catch_funs): Same.
3695 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3697 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
3698 scm_copy_tree on code in order not to let memoized code to leak
3699 out. Thus, scm_copy_tree needs to copy vectors as well since
3700 quasiquote can introduce evaluated code also inside vector
3703 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3705 * eval.c (scm_copy_tree): Removed ability to copy vectors.
3707 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
3708 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
3711 * unif.c: Say that ivect and uvect are of type signed and unsigned
3712 long instead of int in commentary so that it correctly describes
3715 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3717 * stime.c: Removed declaration of strptime. (It should be
3718 declared by the system headers. If it turns out that some systems
3719 don't, we'll handle that then.) (Thanks to Greg Troxel.)
3721 * stime.h: Renamed TIMEH --> STIMEH
3723 * backtrace.c (scm_display_error, scm_display_backtrace): In order
3724 to increase portability, don't use structure assignment.
3725 (Thanks to Nicolas Neuss.)
3727 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
3729 (finalize_fd_sets): Added empty statement after last case label.
3730 (Thanks to Nicolas Neuss.)
3732 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
3735 Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
3737 * init.c, readline.c: OK, I won't have these readline.x bug
3738 reports anymore. We've had them since April. The current reason
3739 is a completely unintelligible failure of totoro.red-bean.com to
3740 do the test for rl_getc_function in libreadline correctly. This
3741 kludge overrides the test if we're on totoro so that the snapshot
3742 generation process can work.
3744 * readline.c: Define a strdup replacement if not existent on system.
3746 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3748 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
3749 This change makes scm_make_vector R5RS compatible. We cannot keep
3750 the third argument since people want to be able to deduce the form
3751 of the C function call only by looking at R5RS. (At the same time
3752 we have removed some unnecessary complexity!)
3754 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
3755 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
3756 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
3757 argument in call to scm_make_vector.
3759 1998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3761 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
3762 This macro is useful in applications.
3764 1998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3766 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
3767 (scm_parse_path, scm_search_path): New Scheme level procedures.
3769 * load.h (scm_internal_parse_path, scm_parse_path,
3770 scm_search_path): Declared.
3772 1998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3774 * filesys.c (dirname, basename): New procedures.
3776 * init.c (scm_boot_guile_1): Removed condition around
3779 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
3780 new data type (guards) for representation of C level guards and
3781 data on the wind chain.
3782 (scm_internal_dynamic_wind): New function.
3784 * dynwind.h: Declare scm_internal_dynamic_wind.
3786 * root.h (scm_root_state): Added scm_cur_loadp.
3788 * root.c (mark_root): Added comment about cur_loadp.
3790 * load.c: #include "dynwind.h";
3791 (scm_primitive_load): Use scm_inner_dynamic_wind to update
3794 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
3796 * ports.c (current-load-port): New procedure.
3798 1998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3800 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
3801 not a tty, return #f.
3803 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
3804 to Julian Satchell and Roland Kaufmann.)
3806 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
3807 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
3809 1998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3811 * debug.h, debug.c (scm_start_stack): New function. Implements
3812 the guts of old scm_m_start_stack.
3814 * debug.c (scm_m_start_stack): Use scm_start_stack.
3816 * init.c (scm_start_stack, scm_restart_stack): Renamed to
3817 start_stack and restart_stack. (These have static scope.)
3819 1998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3821 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
3822 readline functions to come in release 2.3. (Thanks to Chet
3824 (handle_errors): Use the above functions.
3826 1998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3828 * readline.c: Improvements for readline support: Handle errors
3829 better; Implement before-read-hook.
3831 1998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3833 * init.c (scm_boot_guile_1), readline.c: Test for
3834 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
3835 assure that we have version >= 2.1.)
3837 1998-05-11 Mikael Djurfeldt <mdj@kenneth>
3839 * readline.c (scm_readline): Defer interrupts while we're calling
3842 * readline.c (scm_add_history): Bugfix: Do strdup before giving
3843 away the string to add_history.
3844 (completion_function): Do completion for readline. (Thanks to
3846 (scm_filename_completion_function): New procedure: Filename
3848 (current_input_getc): New function. Use this one instead of
3849 standard getc from readline.
3851 * throw.c, throw.h (scm_handle_by_throw): New function: This
3852 handler throws errors to next handler on the dynwind chain.
3854 1998-05-09 Mikael Djurfeldt <mdj@kenneth>
3856 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
3859 1998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3861 * procprop.c (scm_i_procedure_arity): New function. Returns arity
3863 (scm_procedure_properties): Modified to return arity together with
3865 (scm_procedure_property): Added the read-only property `arity'.
3866 (scm_set_procedure_property_x): It is an error to set the `arity'
3869 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
3870 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
3872 * procprop.h (scm_sym_arity): New symbol.
3874 * objects.c (scm_set_object_procedure_x): New procedure: Use this
3875 to set the dispatch procedure of an operator or entity object.
3877 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
3878 Made procedure slots read-only.
3880 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
3881 scm_tcs_cons_gloc case in zero args switch; Fixed args
3882 construction for operators in scm_tcs_cons_gloc case in two args
3885 1998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3887 * fluids.c: Removed use of assert.h (in order to avoid
3890 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
3892 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
3894 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
3895 change makes the evaluator safer at the cost of evaluation speed.
3896 It handles the case when the user has added a non-immediate
3897 improper end of the application form, e.g., `(+ 0 . x)'.
3898 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
3899 minimize the extra cost as much as possible. The new code is
3900 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
3901 problem with structs planted directly in the code (e.g. by a
3902 macro). This no longer causes segmentation fault. (Thanks to
3905 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
3906 arg `proc' in order to be able to throw errors; New argument
3909 * Removed extra #include "debug.h"
3911 1998-04-25 Mikael Djurfeldt <mdj@kenneth>
3913 * scmsigs.c: Declare usleep as returning void on some systems.
3914 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
3917 * coop.c (usleep): Return void on some systems.
3919 1998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3921 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
3923 * coop.c: Changed return type of usleep to int.
3925 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
3926 isn't found in the OS.
3928 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
3929 isn't enabled. (Thought that I had made this change ages ago...)
3931 * iselect.c: Declare bzero if not defined by OS.
3933 1998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3935 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
3936 condition. (Thanks to John Tobey.)
3938 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
3939 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
3942 * __scm.h: Start the long-term project of moving to POSIX threads.
3943 Phase 1: Classification of all critical sections.
3944 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
3945 for A sections. (See comments in __scm.h for details.)
3947 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
3948 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
3950 1998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3952 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
3953 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
3954 (libpath.h, versiondat.h): Replaced dependency on Makefile with
3955 dependencies on $(srcdir)/Makefile.in
3956 $(top_builddir)/config.status in order to avoid circularity.
3958 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
3959 from argc if argc was 0 initially.
3961 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
3962 in generation of libpath.h.
3964 1998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
3966 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
3967 libguile from 2 to 3.
3969 1998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
3971 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
3973 1998-04-13 Mikael Djurfeldt <mdj@kenneth>
3975 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
3976 scm_set_port_column_x, scm_port_filename,
3977 scm_set_port_filename_x): Removed optional arguments. Added
3978 proper argument checking.
3980 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
3981 stack size in machine words.
3983 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
3984 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
3985 to Ole Myren Röhne.)
3987 1998-04-12 Mikael Djurfeldt <mdj@kenneth>
3989 * socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
3990 UNIX_DOMAIN_SOCKETS. (Thanks to Lauri Alanko.)
3992 * gc.c (scm_gc_sweep): Count cells correctly. (Thanks to Ben
3995 * eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
3996 procedure apply: Copy argument lists before pushing them unto the
3997 environment so that the environment won't get mutated due to
3998 manipulation of procedure arguments. This should perhaps be
3999 regarded as a temporary solution until someone finds a more
4000 efficient one. (Thanks to Maciej Stachowiak.)
4002 1998-04-10 Mikael Djurfeldt <mdj@kenneth>
4004 * script.c (scm_compile_shell_switches): Use "guile" as default
4005 zero arg if argc is NULL.
4007 1998-04-02 Mikael Djurfeldt <mdj@nada.kth.se>
4009 * script.c (scm_compile_shell_switches): Allow NULL argv if argc
4010 is zero. (Thanks to Dirk Herrmann.)
4012 1998-03-30 Mikael Djurfeldt <mdj@nada.kth.se>
4014 * ports.c (scm_add_to_port_table): First line is now line 0
4015 (was 1). (Interface changed according to suggestion by Per
4018 * backtrace.c (display_header): Add 1 to line and column numbers
4019 when presenting them to the user.
4021 * eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
4022 from debug.c --> eval.c
4024 * eval.h, eval.c (scm_eval_options_interface): New options
4026 (SCM_EVAL_STACK): New option: Size of newly created stacks,
4027 i.e. stacks for new threads.
4029 * coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.
4031 * eval.c (unsafe_setjmp): Removed with #if 0.
4033 * gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
4036 * eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
4037 to avoid compiler warnings.
4039 * dynl-dl.c (sysdep_dynl_func): Only define usymb if needed.
4041 1998-03-28 Mikael Djurfeldt <mdj@nada.kth.se>
4043 * throw.c (handler_message): Print message on current error port
4044 instead of default error port. (Thanks to Maciej Stachowiak.)
4046 Mon Mar 2 21:35:02 1998 Gary Houston <ghouston@actrix.gen.nz>
4048 * ports.c (scm_add_to_port_table): allocate in units of
4049 struct scm_port_table *, not struct scm_port_table.
4050 * posix.c (scm_close_pipe): remove the port from the port table
4052 Thanks to Rob Engle for both fixes.
4054 1998-02-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4056 * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
4057 coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
4059 1998-02-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4061 * throw.h: Removed jmpbuf arg in scm_catch_body_t.
4063 * backtrace.c (display_error_body, display_backtrace_body),
4064 coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
4065 gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
4066 (invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
4067 scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
4070 * throw.c (scm_internal_catch, scm_internal_lazy_catch): Bodies
4071 don't receive the jmpbuf arg anylonger.
4072 (scm_catch): Don't accept a #f tag.
4073 (scm_throw): Check that key is a symbol.
4074 (scm_ithrow): Don't take a jmpbuf as key. Don't check key arg.
4076 Fri Jan 30 22:28:07 1998 Mikael Djurfeldt <mdj@kenneth>
4078 * async.c (async_pending): Removed declaration.
4080 1998-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4082 * dynwind.c (scm_wind_chain): New debug function.
4084 * coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
4085 scheme_handler_bootstrip, scheme_launch_thread, c_launch_data,
4086 c_body_bootstrip, c_handler_bootstrip, c_launch_thread): Add an
4087 extra layer of functions around the body and handler of a thread.
4088 This extra layer makes sure that the handler is called in the
4089 dynamic context of the surround (= empty dynwind list), but under
4090 the *dynamic root* of the body. We can not use the dynamic root
4091 of the surround since that root belongs to another thread => stack
4092 is not handled correctly. It may seem ugly to use this extra
4093 layer, but the extra cost in terms of execution time is really
4094 negligible compared to the total amount of time required to create
4095 a thread, and it would reduce maintainability to duplicate the
4096 crucial and complicated steps performed by cwdr.
4098 * __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
4099 (SCM_ALLOW_INTS): Added thread switching code before interrupts
4100 get re-enabled. The important effect of this is that interrupts
4101 are blocked during thread switching so that thread data structures
4102 don't risk getting messed up by an unfortunate signal.
4103 (SCM_REDEFER_INTS, SCM_REALLOW_INTS): It turned out that gcc-2.8.0
4104 seems to do more aggressive optimization which actually move
4105 instructions around in these macros in a fatal way. Therefore:
4106 Introduce Anthony's SCM_FENCE macro! (And I who thought he was
4107 just superstitious...)
4108 (SCM_TICK): Maybe do a context switch and take care of asyncs.
4109 This macro should be used instead of SCM_ASYNC_TICK since the
4110 latter doesn't do context switches any more.
4112 * eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
4113 instead of SCM_ASYNC_TICK.
4115 * coop.c, iselect.c: Since thread switches are now performed with
4116 interrupts masked, we can't use the old mechanism of delivering
4117 signals immediately when they arrive. Signals must instead be
4118 delivered when the asyncs run *after* the end of the critical
4119 section in scm_internal_select. But this also means after context
4120 switch so that the signal will be delivered to a different thread.
4121 To avoid this, I have changed the protocol of
4122 coop_wait_for_runnable_thread and friends so that they are allowed
4123 to return the original thread. So, if a signal arrives during
4124 scm_internal_select, we won't any longer be forced do a context
4125 switch, but can remain in the same thread and deliver the signal
4128 * async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
4129 scm_asyncs_pending and made it global.
4131 * iselect.c: Small fixes.
4133 * coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
4134 coop_condition_variable_init, coop_condition_variable_wait,
4135 coop_condition_variable_signal): Changed return type from `void'
4136 to `int'. This is to adhere closer to the pthreads interface.
4137 This, in turn, is part of an attempt to provide C versions of the
4138 mutex and condition variable primitives which can be part of a
4139 frontend to COOP or pthreads.
4141 * coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
4142 coop_condition_variable_destroy): New functions.
4144 * coop-threads.c (scm_wait_condition_variable): Use
4145 coop_condition_variable_wait_mutex.
4147 * coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
4148 Definitions moved to coop-defs.h.
4150 * coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
4151 scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
4152 scm_cond_destroy): New C interface to mutecis and cond vars.
4154 1998-01-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4156 * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.
4158 * iselect.c: Now several threads can wait on the same file
4159 descriptor. The behaviour is compatible with OS select: All
4160 threads waiting for the fd return with the same status.
4162 1998-01-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4164 * coop-threads.c, threads.h (scm_spawn_thread): New function.
4165 Can spawn a thread from application C code.
4167 1998-01-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4169 * gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
4170 gh_doubles2scm): New functions.
4172 1998-01-15 Mark Galassi <rosalia@nis.lanl.gov>
4174 * gh_eval.c (gh_eval_str): cleanup -- threw out the old
4175 commented-out version of gh_eval_str()
4177 Sun Jan 4 02:23:36 1998 Gary Houston <ghouston@actrix.gen.nz>
4179 * socket.c (scm_bind): free soka after use.
4181 Sat Jan 3 20:55:07 1998 Gary Houston <ghouston@actrix.gen.nz>
4183 * stime.c (tzvar): new variable.
4184 (setzone, restorezone, scm_localtime, scm_mktime, scm_strftime):
4185 avoid memory leaks when allocating.
4187 1998-01-03 Jim Blandy <jimb@totoro.red-bean.com>
4189 * iselect.h: Some systems require <sys/types.h> to get the FD_SET
4192 * gc.c, tags.h: Doc fixes.
4194 1998-01-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4196 * eval.c (macro-eval!): Removed. This function was a design bug.
4197 It allowed memoized code to leak out to the scheme level. Most
4198 things that you could do with `macro-eval!' can be done with
4201 1997-12-20 Tim Pierce <twp@skepsis.com>
4203 * fports.c (scm_pipob): Use scm_generic_fgets for line i/o, since
4204 scm_fgets now depends on ftell(3) to know how many bytes were
4207 1997-12-15 Tim Pierce <twp@skepsis.com>
4209 * gh_data.c (gh_scm2newstr, gh_get_substr): Use RO macros for
4210 dealing with strings.
4212 1997-12-13 Tim Pierce <twp@skepsis.com>
4214 Make %read-line more suitable for implementing read-line efficiently.
4215 * ioext.c (scm_read_line): Strip the terminating newline from a
4216 string, and return a cons of the string and its terminator.
4218 * fports.c, fports.h (scm_fgets): Add `len' argument. The length
4219 of the string that is read is stored in this memory location.
4220 * ports.c, ports.h (scm_generic_fgets, fgets_void_port): Same.
4221 * genio.c, genio.h (scm_do_read_line): Update caller.
4222 * ports.h (scm_ptobfuns): Update typedef.
4223 * fports.c (scm_fptob, scm_pipob): Update struct.
4225 1997-12-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4227 * filesys.c (set_element): Return file descriptor.
4228 (fill_select_type): Return the highest file descriptor.
4229 (scm_select): Tell select about the highest file descriptor. On
4230 some systems the SELECT_SET_SIZE can be as much as 128 bytes.
4231 Therefore the extra overhead for calculating the maximum fd seems
4232 to be more than compensated. Is this correct? In any case,
4233 scm_internal_select will be much faster with this info.
4234 (scm_select, fill_select_type, set_element): Don't accept any kind
4235 of object in the file descriptor list or vector.
4237 1997-12-07 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4239 * iselect.c (finalize_fd_sets): Bugfix.
4241 1997-12-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4243 * filesys.c (scm_select): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS
4244 when using scm_internal_select (since we might switch to another
4247 Sun Dec 7 01:43:56 1997 Gary Houston <ghouston@actrix.gen.nz>
4249 * simpos.c (scm_system): always define: use sysmissing if not
4250 available. Check for HAVE_SYSTEM instead of _Windows (does
4251 Windows lack system or does it have an unusable one?).
4252 Check for error conditions -1 and 127. Use SCM_DEFER_INTS.
4253 Let the argument be optional: if not supplied, call system(NULL).
4255 * ports.c (scm_close_port): relax the type check from OPPORTP to
4256 PORTP; closing a closed port is allowed.
4258 1997-12-04 Tim Pierce <twp@ppp39.Nantucket.net>
4260 * fports.c (scm_fgets): Return if the last char in a chunk is
4261 newline. When fgets returns a string whose length is `size-1', it
4262 is ambiguous whether a whole line was retrieved, so we must check
4263 explicitly whether a line terminator is present.
4265 1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4267 * print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
4268 before taking the CDR. (Thanks to Harald Meland.)
4270 * filesys.c (scm_stat): Slightly optimized.
4272 Wed Dec 3 12:23:06 1997 Jim Blandy <jimb@totoro.red-bean.com>
4274 * ports.c (scm_close_port): Make sure the port is open before
4277 * guile-snarf.in: Pass args through to gcc in a way that preserves
4278 whitespace boundaries. (Thanks to Greg Badros.)
4280 1997-12-02 Tim Pierce <twp@skepsis.com>
4282 * stacks.c (scm_frame_procedure): Reverse the logic in the return
4283 statement. (Thanks to Doug Evans for pointing this out.)
4285 1997-12-01 Tim Pierce <twp@skepsis.com>
4287 * scmconfig.h.in: Regenerated for USCORE change in ../acconfig.h.
4289 Sun Nov 30 11:29:18 1997 Mikael Djurfeldt <mdj@kenneth>
4291 * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
4292 errno macro expansion of this field name. (errno is a C
4293 preprocessor macro on some systems.)
4295 1997-11-29 Tim Pierce <twp@skepsis.com>
4297 * iselect.c: Doc fix.
4299 Sat Nov 29 01:16:53 1997 Mikael Djurfeldt <mdj@kenneth>
4301 * init.c (scm_start_stack): Removed initialization of
4302 scm_the_last_stack_var.
4304 * backtrace.h: Declare scm_the_last_stack_var.
4306 * backtrace.c: Define scm_the_last_stack_var.
4308 * root.c (mark_root): Don't mark the_last_stack_var.
4310 * root.h (scm_root_state): Removed the_last_stack_var.
4312 * throw.c: Added #include "fluids.h"
4313 (ss_handler): `the-last-stack' is now a fluid.
4315 * (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
4316 --> the_last_stack_fluid.
4318 * backtrace.c: Added #include "fluids.h"
4319 (scm_init_backtrace): Initialize `the-last-stack' to a fluid.
4320 (scm_backtrace): `the-last-stack' is now a fluid.
4322 * init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
4323 after scm_init_fluids.
4325 1997-11-28 Tim Pierce <twp@skepsis.com>
4327 * iselect.c: #ifdef USE_THREADS around thread-related includes.
4329 * dynl-dl.c (sysdep_dynl_func): Check both USCORE and
4330 DLSYM_ADDS_USCORE to decide whether to add an underscore.
4332 1997-11-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4334 * iselect.c (coop_next_runnable_thread,
4335 coop_wait_for_runnable_thread): Disable interrupts so that no
4336 async is executed before a potential error_revive.
4337 (scm_internal_select): Disable interrupts during the parts of the
4338 code which manipulate the sleep queue and the file descriptors.
4340 1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4342 * Makefile.am: Added iselect.c and iselect.h.
4344 * coop.c (coop_qinit): Initialize fields used by
4345 scm_internal_select.
4346 (coop_qget, coop_qget, coop_tmp_queue): Made global.
4347 (coop_next_runnable_thread): If GUILE_ISELECT enabled, use
4348 replacement in iselect.c.
4349 (coop_mutex_lock, coop_condition_variable_wait, coop_abort,
4350 coop_join): If GUILE_ISELECT enabled, use
4351 coop_wait_for_runnable_thread instead of
4352 coop_next_runnable_thread.
4353 (usleep, sleep): New replacements for system functions if
4354 GUILE_ISELECT is enabled.
4356 * coop-threads.h: Declare coop_wait_for_runnable_thread.
4358 * coop-defs.h (coop_t): Added fields used by scm_internal_select.
4360 * filesys.c: Added #include "iselect.h". Moved FD-macros to
4361 iselect.h. Implement Scheme level `select' using
4362 scm_internal_select. (See NEWS.)
4364 * genio.c (scm_getc): Block with scm_internal_select. (See NEWS.)
4366 * init.c: Call scm_init_iselect.
4368 * iselect.h, iselect.c: New files. Implements
4369 scm_internal_select. (See NEWS.)
4371 1997-11-27 Tim Pierce <twp@skepsis.com>
4373 Fix a memory leak in scm_read_line and a type cast bug in the ptob.
4374 * fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
4375 and scm_must_free, since ultimately the string returned will be copied
4376 by scm_makfrom0str anyway. Also, read any characters that may have
4377 been pushed onto the port with scm_ungetc.
4378 * ports.c (scm_generic_fgets): Same as for scm_fgets.
4379 * ioext.c (scm_read_line): Free string after Guilifying it.
4380 * ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
4382 1997-11-26 Anthony Green <green@hoser.cygnus.com>
4384 * gh_data.c (gh_set_substr): Strings can be longer than 256 bytes.
4386 * gh.h: Safely wrap prototypes for c++ usage.
4388 1997-11-25 Mark Galassi <rosalia@cygnus.com>
4390 * gh_test_repl.c (main_prog): changed invocation of gh_repl() to
4391 gh_repl (argc, argv).
4393 1997-11-24 Mark Galassi <rosalia@nis.lanl.gov>
4395 * gh_init.c (gh_repl): modified gh_repl() to accept argc and argv
4396 and to invoke scm_shell().
4397 (gh_launch_pad): took out the loading of boot-9.scm from here,
4398 since it is probably best to let the user control that. In fact,
4399 gh_repl() now invokes scm_shell() which does that.
4401 1997-11-23 Mark Galassi <rosalia@cygnus.com>
4403 * gh_test_repl.c (main_prog): added argc and argv to the gh_repl()
4406 1997-11-22 Tim Pierce <twp@twp.tezcat.com>
4408 * dynl-dl.c (sysdep_dynl_func): Fix memory leak created by
4409 yesterday's underscore patch. (Thanks to Marius Vollmer for
4412 1997-11-21 Tim Pierce <twp@twp.tezcat.com>
4414 * dynl-dl.c (sysdep_dynl_func): Prepend symb with underscore if
4415 DLSYM_ADDS_USCORE is not defined.
4417 1997-11-17 Mark Galassi <rosalia@nis.lanl.gov>
4419 * gh_data.c (gh_uniform_vector_length):
4420 (gh_uniform_vector_ref): started implementing the uniform types in
4423 1997-11-06 Mikael Djurfeldt <mdj@nada.kth.se>
4425 * regex-posix.c (scm_free_regex_t): Return size of regex_t instead
4426 of 0; size_t --> scm_size_t. Thanks to Bernard Urban.
4428 1997-10-26 Mikael Djurfeldt <mdj@nada.kth.se>
4430 * scmconfig.h.in: Updated (HAVE_LIBTERMCAP was added when
4431 configure.in was changed).
4433 Sun Oct 26 02:20:11 1997 Jim Blandy <jimb@totoro.red-bean.com>
4435 * Makefile.am (modinclude_HEADERS): Include readline.h here.
4436 * Makefile.in: Regenerated.
4438 1997-10-25 Marius Vollmer <mvo@zagadka.ping.de>
4440 * print.h (SCM_COERCE_OPORT): Renamed to SCM_COERCE_OUTPORT. An
4441 OPORT is an `open' port, not an output port.
4443 * filesys.c (scm_close, set_element, get_element, scm_chown,
4444 scm_chmod, scm_stat, scm_truncate_file, scm_fcntl, scm_fsync): Use
4445 SCM_COERCE_OUTPORT to cope with the printstate/port magic.
4446 * ports.c (scm_port_revealed, scm_set_port_revealed_x,
4447 scm_close_port, scm_port_line, scm_set_port_line_x,
4448 scm_port_column, scm_set_port_column_x, scm_port_filename,
4449 scm_set_port_filename_x, scm_port_mode,
4450 scm_close_all_ports_except, scm_set_current_output_port,
4451 scm_set_current_error_port): Likewise
4452 * ioext.c (scm_redirect_port, scm_dup_to_fdes, scm_freopen,
4453 scm_ftell, scm_fileno, scm_isatty_p, scm_primitive_move_to_fdes):
4455 * posix.c (scm_ttyname, scm_tcgetpgrp, scm_tcsetpgrp): Likewise
4456 * backtrace.c (display_backtrace_body): Likewise
4457 * fports (scm_setvbuf): Likewise
4458 * socket.c (scm_getsockopt, scm_setsockopt, scm_shutdown,
4459 scm_connect, scm_bind, scm_listen, scm_accept, scm_getsockname,
4460 scm_getpeername, scm_send, scm_sendto): Likewise
4461 * unif.c (scm_uniform_array_write): Likewise
4463 Sat Oct 25 02:52:58 1997 Jim Blandy <jimb@totoro.red-bean.com>
4465 Minor problems with substring-related tag changes.
4466 * symbols.h (SCM_SUBSTRP): Don't mask off the S bit; that's
4467 exactly what we want to leave in to detect substrings.
4468 (SCM_ROSTRINGP, ROUCHARS): Formatting tweaks.
4469 * tags.h: Fix diagrams and comments describing the S tag bit;
4470 remove vestigial remarks about the D tag bit.
4471 (SCM_TYP7, SCM_TYP7S): Rephrased for readability.
4472 * strings.c: Formatting tweaks.
4474 * load.c (scm_init_load_path): Check GUILE_LOAD_PATH environment
4475 variable first; then SCHEME_LOAD_PATH, with a warning message.
4476 (scm_parse_path): New function.
4477 * script.c: Doc fixes.
4479 Thu Oct 23 01:02:03 1997 Jim Blandy <jimb@totoro.red-bean.com>
4481 Readline support, from Daniel Risacher.
4482 * readline.c, readline.h: New files.
4483 * init.c: #include "readline.h".
4484 (scm_boot_guile_1): Call scm_init_readline, if we have it.
4485 * Makefile.am (libguile_la_SOURCES): Include readline.c.
4486 * Makefile.in: Regenerated.
4487 * scmconfig.h.in: Regenerated, after change to ../configure.
4489 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
4491 * gh.h: gh_vector_set -> gh_vector_set_x
4493 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
4495 * gh_data.c (gh_vector_set_x): changed name to make it consistent
4496 with the ! -> _x mapping when going from Scheme to C.
4498 1997-10-19 Mark Galassi <rosalia@cygnus.com>
4500 * gh.h (gh_reverse):
4508 (gh_assoc): added these gh_ functions implemented as macros.
4510 * gh_predicates.c (gh_null_p):
4511 (gh_string_equal_p): added these two missing predicates.
4513 * gh_list.c (gh_append):
4518 (gh_set_cdr_x): added these routines as I go through and try to
4519 complete the picture R4RS functions that should be mirrored in the
4522 Sat Oct 18 01:52:51 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4524 * tags.h (scm_tc7_substring): Changed the comment and code to
4525 conform with the changes below. Folks! We have suddenly two new
4526 free tc7 codes!!! Jummy, jummy!
4528 Tue Oct 14 22:03:06 1997 Tom Tromey <tromey@cygnus.com>
4530 * Makefile.in: Rebuilt.
4531 * Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
4533 (modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
4534 * unif.c (scm_vector_set_length_x): Don't handle multibyte
4536 * tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
4537 (scm_tag): Don't handle multibyte strings.
4538 * read.c: Don't include mbstrings.h.
4539 (scm_lreadr): Don't handle multibyte ports.
4540 * kw.c: Don't include mbstrings.h.
4541 * init.c: Don't include mbstrings.h.
4542 (scm_boot_guile_1): Don't init mbstrings module.
4543 * hash.c (scm_hasher): Don't handle mbstrings.
4544 * gscm.c (gscm_run_scm): Don't init mbstrings module.
4545 * gc.c (scm_gc_mark): Don't handle mbstrings.
4546 (scm_gc_sweep): Likewise.
4547 * eval.c (SCM_CEVAL): Don't handle mbstrings.
4548 * eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
4549 * tags.h (SCM_TYP7SD): Removed.
4550 (SCM_TYP7D): Removed.
4551 (scm_tc7_mb_string): Removed.
4552 (scm_tc7_mb_substring): Removed.
4553 * print.c (scm_iprin1): Handle char printing directly. Don't
4555 Don't include "mbstrings.h".
4556 * symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
4557 scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
4559 Don't include "mbstrings.h".
4560 * symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
4561 (SCM_SYMBOL_SLOTS): Define as 4.
4562 (SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
4563 * arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
4564 gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
4565 print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
4566 struct.c, threads.c, throw.c, unif.c, variable.c: Use new
4567 ("gen"-less) I/O function names.
4568 * ports.c (scm_add_to_port_table): Don't set port's
4570 * ports.h (scm_port_representation_type): Removed.
4571 (scm_string_representation_type): Removed.
4572 (struct scm_port_table ): Removed representation field.
4573 (SCM_PORT_REPRESENTATION): Removed.
4574 (SCM_SET_PORT_REPRESENTATION): Removed.
4575 * genio.h: Use new function names.
4576 * genio.c: Don't include "extchrs.h".
4577 (scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
4579 (scm_putc, scm_puts, scm_lfwrite): No longer static.
4580 (scm_getc): No longer static; handle line and column changes.
4581 (scm_ungetc): Renamed from scm_gen_ungetc.
4582 (scm_do_read_line): Renamed from scm_gen_read_line.
4583 * libguile.h: Don't include "extchrs.h" or "mbstrings.h"
4584 * extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
4586 1997-10-12 Mark Galassi <rosalia@cygnus.com>
4588 * gh_test_repl.c (c_vector_test): same as gh_test_c.c
4590 * gh_test_c.c (c_vector_test): some improvements on the vector
4593 * gh.h (gh_vector): this used to exist but do the wrong thing.
4594 Now it (almost) does the right thing, though it takes a list
4595 instead of the individual arguments. I need to see how it could
4597 (gh_list_to_vector): added this function as a macro. Corresponds
4598 to Scheme's (list->vector ...).
4599 (gh_vector_to_list): added this function as a macro. Corresponds
4600 to Scheme's (vector->list ...).
4602 * gh_data.c (gh_vector_ref): renamed from gh_vref to
4603 gh_vector_ref, so that it resembles the Scheme routines more.
4604 (gh_vector_set): renamed from gh_vset to gh_vector_set, so that it
4605 resembles the Scheme routines more.
4606 (gh_make_vector): this used to be (stupidly) called gh_vector().
4607 This is the right name, since it does the same thing as the Scheme
4608 (make-vector ...) procedure.
4610 Sun Oct 12 14:41:39 1997 Mikael Djurfeldt <mdj@kenneth>
4612 * ports.h: #include "libguile/print.h"
4614 * eval.c (SCM_CEVAL, scm_apply): Completed GOOPS support code;
4615 Some indentation fixes.
4617 * objects.h (SCM_METACLASS_STANDARD_LAYOUT): Printer field is no
4618 longer a user field; New field: class_flags.
4620 * objets.c, objects.h: New metaclass: scm_metaclass_operator.
4622 Tue Oct 7 09:37:24 1997 Mark Galassi <rosalia@cygnus.com>
4624 * gh_data.c (gh_bool2scm): new function which replaces
4625 gh_int2scmb(), which is now tagged as obsolete.
4627 1997-10-03 Mikael Djurfeldt <mdj@nada.kth.se>
4629 * print.h (SCM_PRINT_STATE_P): Removed SCM_NIMP test. (NIMP
4630 macros should by convention not test for NIMPness.)
4631 (SCM_COERCE_OPORT): Adjust indentation.
4633 * print.c (scm_valid_oport_value_p): Adjusted indentation; Added
4634 SCM_NIMP test before SCM_PRINT_STATE_P.
4636 * struct.c, struct.h, gc.c: Renamed:
4637 scm_struct_i_layout --> scm_vtable_index_layout
4638 scm_struct_i_vcell --> scm_vtable_index_vcell
4639 scm_struct_i_vtable --> scm_vtable_index_vtable
4640 scm_struct_i_printer --> scm_vtable_index_printer
4641 scm_struct_i_vtable_offset --> scm_vtable_offset_user
4643 * struct.c (scm_print_struct): Use new printer slot; Default
4644 printing: Also output hex code of vtable so that type identity
4645 will be indicated as well.
4646 (scm_init_struct): Updated required_vtable_fields to "pruosrpw";
4647 Removed struct_printer_var; Removed struct-vtable-offset;
4648 (vtable-index-layout, vtable-index-vtable, vtable-index-printer,
4649 vtable-offset-user): New constants.
4651 * struct.h (scm_struct_i_vtable_offset): Bumped from 3 to 4.
4652 (scm_struct_i_printer, SCM_STRUCT_PRINTER): New slot in vtables.
4653 If this slot contains a procedure, use that to print structures of
4654 the type represented by this vtable.
4656 * print.c (scm_iprin1): Don't print arguments of macro
4657 transformers. (They are always: exp env.); Bugfix: Unmemoize
4658 transformer source with correct environment.
4660 1997-10-02 Marius Vollmer <mvo@zagadka.ping.de>
4662 Streamlining of call-with-dynamic-root:
4664 * root.c (cwdr_inner_body, cwdr_body): Remove "inner" from name,
4665 there is now only one catch.
4666 (cwdr_outer_body): Removed.
4667 (cwdr_handler): New function.
4668 (scm_internal_cwdr): New function to perform the function of cwdr
4669 but take args that are more useful to C code. Also, the handler
4670 is now invoked *outside* of the new dynamic root, like the docs
4671 say. We no longer have to catch absolutely all errors, the caller
4672 is responsible for using a handler that does not throw, if he
4674 (cwdr): Reimplemented in terms of scm_internal_cwdr.
4675 * root.h (scm_internal_cwdr): New prototype.
4677 Even more but risky streamlining:
4679 * root.c (USE_STACKJMPBUF): New define to activate a stack-based
4680 allocation of the jumpbuf of a root continuation. The changes
4681 below are controlled by it. They are now deactivated.
4682 (scm_internal_cwdr): Allocate the scm_contregs on the stack. Set
4683 the JMPBUF of the scm_rootcont to NULL before returning.
4685 * gc.c (scm_gc_sweep): Free the SCM_VELTS of a scm_tc7_contin only
4686 when they are non-NULL.
4687 (scm_gc_mark): Likewise, mark only when non-NULL.
4689 Make dynamic linking work on Dec Unix. (Thanks to Clark McGrew)
4690 * dynl.c: Include "dynl-dl.c" also when HAVE_DLOPEN is defined.
4692 * gc.c (scm_done_malloc): New function.
4693 gc.h (scm_done_malloc): New prototype.
4695 * print.h (SCM_PRINT_STATE_P, SCM_COERCE_OPORT): New macros.
4696 (struct scm_print_state) [revealed]: New field.
4697 (scm_print_state_vtable): Make visible to the outside world for
4698 type checking purposes.
4699 (scm_valid_oport_value_p): New prototype.
4701 * print.c (scm_valid_oport_value_p): New function to check whether
4702 a certain value is acceptable as a port argument.
4703 (scm_print_state_vtable): New variable.
4704 (scm_free_print_state): Set `revealed' field to false.
4705 (scm_iprin1): Call user supplied closure printer with
4706 scm_printer_apply. Print in the traditional way when there isn't
4707 one or when it returns #f.
4708 (scm_prin1, scm_display, scm_write, scm_newline, scm_write_char):
4709 Accept a port/print-state pair in addition to just a port.
4710 (scm_prin1): Don't return the print_state to the pool when it has
4712 (scm_printer_apply): Set `revealed' field of print_state to true.
4713 (scm_init_print): Set scm_print_state_vtable.
4714 (print_state_fluid, print_state_fluid_num): Removed.
4716 * throw.h (scm_handle_by_proc_catching_all): New prototype
4717 throw.c (scm_handle_by_proc_catching_all): New function
4719 Mon Sep 29 23:54:09 1997 Jim Blandy <jimb@totoro.red-bean.com>
4721 * Makefile.in: Regenerated with automake 1.2c.
4723 Sun Sep 28 21:35:42 1997 Radey Shouman <shouman@zianet.com>
4725 * ramap.c (scm_array_index_map_x): Fixed for zero-rank arguments,
4726 was looping endlessly.
4728 Sun Sep 28 00:04:29 1997 Jim Blandy <jimb@totoro.red-bean.com>
4730 * strports.c (scm_eval_string): Don't close the port.
4732 * stime.c (bdtime2c): Use SCM_LENGTH, not scm_vector_length; the
4733 former returns a nice normal integer. (Thanks to Daniel
4736 Sat Sep 27 20:19:34 1997 Jim Blandy <jimb@totoro.red-bean.com>
4738 * Makefile.am (libpath.h): Include the value of the THREAD_LIBS
4739 makefile variable as a build parameter called LIBS. The
4740 build-guile program will use this, for the time being.
4741 * Makefile.in: Regenerated.
4743 Thanks to Shiro Kawai:
4744 * gc.c (scm_gc_mark): Pass NULL to scm_wta as the subroutine name.
4745 * ports.h (scm_ptobfuns): The fgets method returns a char *, not
4748 * Makefile.in: Regenerated with automake 1.2a.
4750 * script.c (scm_compile_shell_switches): If we hit the -c or --
4751 arguments, don't set the car of (command-line) to scm_usage_name,
4752 the prettified name of the guile executable; give it the full
4753 path, the way shells usually handle $0.
4755 Wed Sep 24 22:09:52 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4757 * ramap.c (scm_array_map): Renamed to scm_array_map_x. Removed
4758 Scheme-level name `array-map' and renamed `serial-array-map' to
4759 `serial-array-map!'.
4761 * backtrace.c: Introduced exception handlers which now enclose
4762 `display-error' and `display-backtrace' so that error reporting
4763 won't get into infinite loops if an error occurs during displaying
4764 of the error. This can very easily happen with user supplied
4765 print call-back routines.
4767 Tue Sep 23 12:43:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4769 * ramap.c: Added alias `array-map!' for `array-map'. (Probably,
4770 the names `serial-array-map' and `array-map' should be removed.)
4772 Mon Sep 22 01:21:54 1997 Mikael Djurfeldt <mdj@kenneth>
4774 * init.c (scm_boot_guile_1): Added scm_init_objects ().
4775 Added #include "objects.h"
4777 * eval.c (scm_makprom): Added SCM_DEFER_INTS and SCM_ALLOW_INTS.
4778 Add #include "feature.h".
4780 * Makefile.am (libguile_la_SOURCES): Added objects.c.
4781 (modinclude_HEADERS): Added objects.h.
4783 * ports.h (SCM_EOF_OBJECT_P): New macro predicate.
4784 This test is needed at many places in the code and should be
4785 abstracted. (Motivated by the need of this test in libguiletk.)
4787 * ports.c (scm_eof_object_p), vports.c (sfgetc), strports.c
4788 (scm_eval_string), load.c (scm_primitive_load,
4789 scm_read_and_eval_x), gh_eval.c (gh_eval_str):
4790 Use SCM_EOF_OBJECT_P.
4792 * eval.c (scm_init_eval): Add feature `delay'.
4794 Tue Sep 16 02:12:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4796 * scmhob.h: Removed.
4798 Mon Sep 15 20:42:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4800 * list.h (SCM_LISTn): New macros. Make list creation in C code
4801 prettier. The idea comes from STk.
4803 * sequences.h, sequences.c, append.h, append.c: Removed. These
4804 files implemented non-R4RS operations which would encourage
4805 non-portable programming style and less easy-to-read code.
4807 * Makefile.am (sequences.h, sequences.c, append.h, append.c):
4810 * libguile.h, eval.c, init.c, stime.c, unif.c: Removed #include
4811 sequences.h, #include append.h.
4813 * init.c (scm_boot_guile_1): Removed calls to scm_init_append and
4816 * gh.h, gh_list.c: Renamed gh_list_length --> gh_length.
4818 * list.h, list.c: Renamed scm_list_length --> scm_length, scm
4820 * stime.c (bdtime2c): Changed scm_obj_length --> scm_vector_length.
4822 Sat Sep 13 00:21:41 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4824 * eval.c: Added #include "objects.h"
4826 * tags.h (scm_tc16_object, scm_tc16_entity): Smobtags for objects
4829 * smob.c (scm_smob_prehistory): Create two objectsmobs with
4830 adjacent smob numbers.
4832 Thu Sep 11 00:59:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4834 * procprop.h: Added declaration of scm_i_inner_name.
4836 * gsubr.c: New global symbol scm_i_inner_name.
4838 * debug.c (scm_procedure_name): Try procedure property
4839 `inner-name' if `name' fails.
4841 * print.c (scm_iprin1): Use scm_macro_name.
4843 * eval.c (scm_m_define): Give names to macros as well; Only the
4844 first top-level definition gives a procedure/macro a name.
4845 Otherwise confusing names can turn up in backtraces.
4846 (SCM_CEVAL): SCM_IM_DEFINE: Set `inner-name' property instead of
4847 `name'; Give names to macros as well.
4849 * procs.c (scm_closure_p), print.c (scm_iprin1), eval.c
4850 (scm_macro_transformer): Use SCM_CLOSUREP instead of
4853 Wed Sep 10 20:52:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4855 * eval.c (macro?, macro-type, macro-name, macro-transformer): New
4857 (prinmacro): Removed. The code has been moved/merged into print.c
4858 in order to decrease code redundancy. We want macros to print in
4859 a way equivalent to procedures, and it would be silly to duplicate
4860 the required code. (We don't want to maintain two places.)
4861 (macrosmob): Print field is now a NULL pointer.
4863 * eval.h (scm_macro_p, scm_macro_type, scm_macro_name,
4864 scm_macro_transformer): New prototypes.
4865 (scm_tc16_macro): Declared.
4867 * print.c (scm_iprin1): Added code for printing of macros. Macros
4868 are now printed in a way equivalent to procedures.
4870 Sat Sep 6 12:20:42 1997 Mikael Djurfeldt <mdj@kenneth>
4872 * procs.h (scm_closure_p): Added declaration.
4874 Fri Sep 5 13:36:14 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4876 * gc.c (scm_gc_mark): Fixed "rogue pointer in heap" message:
4877 Shouldn't pass "heap" as the subr name.
4879 Tue Sep 2 18:14:30 1997 Jim Blandy <jimb@totoro.red-bean.com>
4881 * gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
4882 gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
4883 gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
4884 gh_equal_p): Use SCM_NFALSEP, instead of testing against
4885 SCM_BOOL_T. Any non-false value is true.
4887 Tue Sep 2 00:27:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4889 * symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
4890 scm_gensym): Added prototypes.
4892 * symbols.c (scm_gensym): New function. This will speed up
4893 certain types of applications (such as macro systems) which
4894 generate lots of symbols.
4896 Mon Sep 1 22:30:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4898 * numbers.c (logand, logior, logxor): Handle 0 or 1 arguments.
4900 Sat Aug 30 18:56:19 1997 Gary Houston <ghouston@actrix.gen.nz>
4902 * unif.c (scm_shap2ra): tighten the checking of the array dimension
4903 specifier, since (2) or (2 . 3) would cause SEGV.
4904 (scm_transpose_array): more argument checking fixes.
4906 Thu Aug 28 23:48:53 1997 Jim Blandy <jimb@totoro.red-bean.com>
4908 * Makefile.in: Regenerated.
4910 Wed Aug 27 17:44:44 1997 Jim Blandy <jimb@totoro.red-bean.com>
4912 * Makefile.in: Regenerated, so it uses "tar", not "gtar".
4914 Mon Aug 25 13:47:25 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4916 * error.c, error.h (scm_error_callback): Removed (see NEWS).
4918 Sun Aug 24 01:25:35 1997 Mikael Djurfeldt <mdj@kenneth>
4920 * regex-posix.c: If <regex.h> can't be found, try <rxposix.h> or
4921 <rx/rxposix.h>. (This is in order to accomodate for the GNU Rx
4924 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, ramap_1,
4925 ramap_2o, scm_array_index_map_x, raeql_1, scm_array_equal_p),
4926 unif.c (scm_vector_set_length_x, scm_uniform_vector_length,
4927 scm_array_p, scm_array_rank, scm_array_dimensions,
4928 scm_enclose_array, scm_array_in_bounds_p, scm_uniform_vector_ref,
4929 scm_cvref, scm_array_set_x, scm_array_contents, scm_array_to_list,
4930 scm_array_prototype): Added case scm_tc7_wvect.
4932 Sat Aug 23 18:45:44 1997 Gary Houston <ghouston@actrix.gen.nz>
4934 * errno.h: prototype for scm_strerror.
4935 * error.c (scm_strerror): new procedure.
4937 Mon Aug 18 14:58:22 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4939 * list.c (scm_list_append_x): Allow non-pair as last argument.
4940 This is consistent with the R4RS append and is probably the
4941 correct behaviour as specified by R2RS. (Thanks to Radey Shouman)
4943 Sat Aug 16 18:42:15 1997 Gary Houston <ghouston@actrix.gen.nz>
4945 * stime.h: prototype for scm_times.
4946 * stime.c (scm_times): new procedure.
4947 * ioext.c (scm_fseek): if the first argument is a file descriptor
4949 (scm_ftell): if the first argument is a file descriptor call lseek
4951 * filesys.h: prototypes for scm_open_fdes, scm_fsync.
4952 * filesys.c (scm_chmod): if the first argument is a file descriptor,
4954 (scm_chown): if the first argument is a port or file descriptor,
4956 (scm_truncate_file): new procedure.
4957 Add DEFER/ALLOW INTS to a few other procedures.
4958 (scm_fsync): new procedure.
4959 (scm_open_fdes): new procedure.
4960 (scm_open): use scm_open_fdes. If mode isn't specified, 666 will
4962 (scm_fcntl): the first argument can now be a file descriptor. The
4963 third argument is now optional.
4965 * posix.c (scm_execl, scm_execlp): make the filename argument
4966 compulsory, since omitting it causes SEGV.
4967 (scm_sync): return unspecified instead of #f.
4968 (scm_execle): new procedure.
4969 (environ_list_to_c): new procedure.
4970 (scm_environ): use environ_list_to_c. disable interrupts.
4971 (scm_convert_exec_args): take pos and subr arguments and
4972 improve error checking.
4974 1997-08-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4976 * stacks.c (scm_make_stack), coop-threads.c, mit-pthreads.c
4977 (scm_call_with_new_thread): Bugfix: SCM_WNA should go as third
4978 argument to SCM_ASSERT. Furthermore, the name of the function
4979 should be passed as first argument when signalling
4980 SCM_WNA. (Thanks to Thomas Morgan)
4982 * gsubr.c (scm_gsubr_apply): From Radey Shouman
4983 <shouman@zianet.com>: "The switch in scm_gsubr_apply that
4984 dispatches on the number of actual args has a default case
4985 reporting an internal error. This is a vestige from a version
4986 that mallocated a SCM vector to hold the arguments. In the
4987 current version this check is too late: if it ever happens we will
4988 have already overstepped the bounds of the array.
4990 Also, the patch [...] adds a check for too many actual arguments."
4992 mdj: Removed check for "internal programming error".
4994 Wed Aug 13 15:38:44 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4996 * gh_io.c (gh_write): New function.
4998 * gh_eval.c (catch_with_saved_stack): Removed. Replaced by:
4999 throw.c (scm_internal_stack_catch): New sibling to the other catch
5000 functions. Code moved from gh_eval.c.
5001 throw.h: Added header.
5002 gh_eval.c (gh_eval_str_with_stack_saving_handler): Renamed call to
5003 scm_internal_stack_catch.
5005 Tue Jul 29 01:03:08 1997 Gary Houston <ghouston@actrix.gen.nz>
5007 * ioext.h: fix up prototypes.
5008 * ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
5009 Scheme name is now dup->fdes.
5010 (scm_dup_to_fdes): make the second argument optional and
5011 fold in the functionality of scm_primitive_dup.
5012 (scm_primitive_dup): deleted.
5014 Mon Jul 28 05:24:42 1997 Gary Houston <ghouston@actrix.gen.nz>
5016 * fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
5017 * fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
5018 ultrix are defined. Use setvbuf instead of setbuf.
5019 (scm_setvbuf): new procedure.
5020 (scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
5021 (scm_setfileno): moved from ioext.c.
5022 (scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
5023 (top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.
5025 Sun Jul 27 10:54:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
5027 * fluids.c (scm_fluid_p): New function.
5028 * fluids.h (scm_fluid_p): New prototype.
5030 Sat Jul 26 21:33:37 1997 Marius Vollmer <mvo@zagadka.ping.de>
5032 * print.c (scm_iprin1): Enter printed structures into the print
5033 state as nested data while they are printed.
5034 (print_state_fluid, print_state_fluid_num): New variables.
5035 (scm_init_print): Initialize them.
5036 (scm_iprin): If print_state_fluid carries a print_state, use that
5037 instead of creating a new one.
5038 (scm_printer_apply, apply_stub, struct apply_data): New
5039 definitions to help with calling printer functions written in
5041 * print.h (scm_printer_apply): New prototype.
5043 * struct.c (scm_print_struct): Use scm_printer_apply to call the
5044 user defined struct printer.
5046 * dynwind.c (scm_dowinds): Handle fluids on the wind list.
5047 * fluids.h (scm_internal_with_fluids, scm_with_fluids,
5048 scm_swap_fluids, scm_swap_fluids_reverse): New prototypes.
5049 * fluids.c (scm_internal_with_fluids, scm_with_fluids,
5050 scm_swap_fluids, scm_swap_fluids_reverse): New functions.
5052 Fri Jul 25 12:05:46 1997 Marius Vollmer <mvo@zagadka.ping.de>
5054 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fixed use of
5055 SCM_ASSERT: arg comes before pos.
5057 Fri Jul 25 17:00:38 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5059 * eval.c (scm_apply): Handle the case when a tc7_sybr_2 is applied
5060 to a list of length zero correctly.
5062 Wed Jul 23 16:17:46 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5064 Supply an `fgets' method for port objects to do fast line i/o.
5065 * ioext.c (scm_read_line): New function.
5066 * genio.c (scm_gen_read_line): New function.
5067 * fports.c (scm_fgets): New function.
5068 (scm_fptob, scm_pipob): Add scm_fgets method.
5069 * ports.c (fgets_void_port, scm_generic_fgets): New functions.
5070 (void_port_ptob): Add void fgets method.
5071 (scm_newptob): Initialize fgets method from ptob struct.
5072 * ports.h (scm_ptobfuns): Add fgets method.
5073 * vports.c (scm_sfptob): Supply generic fgets method.
5074 * strports.c (scm_stptob): Supply generic fgets method.
5076 Mon Jul 21 04:03:42 1997 Gary Houston <ghouston@actrix.gen.nz>
5078 * ioext.h: removed scm_duplicate_port prototype.
5080 * ioext.c (scm_primitive_dup2): return the new file descriptor
5081 instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
5083 (scm_fdopen): bug fix: don't try to make port unbuffered until its
5084 stream has been set.
5085 (scm_duplicate_port): deleted, there's now an implementation in
5087 (scm_primitive_dup2): do nothing if newfd == oldfd.
5089 Sun Jul 20 03:55:49 1997 Gary Houston <ghouston@actrix.gen.nz>
5091 * filesys.c (scm_close): oops, don't call SCM_INUM twice on the
5094 * ioext.h: new prototypes.
5095 * ioext.c (scm_primitive_dup, scm_primitive_dup2): new procedures.
5097 * fluids.c (next_fluid_num): don't do
5098 SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.
5100 * ports.h: prototypes too.
5101 * ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.
5103 * fports.h: prototype too.
5104 * fports.c (scm_evict_ports): moved from ioext.c.
5106 Sat Jul 19 04:56:52 1997 Gary Houston <ghouston@actrix.gen.nz>
5108 * ports.c (scm_close_port): return a boolean instead of unspecified.
5109 throw an error if an error other than EBADF occurs.
5111 * filesys.h: scm_close prototype.
5112 * filesys.c (scm_close): new procedure, can close file descriptors
5113 and ports (scsh compatible).
5115 * ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
5118 Fri Jul 18 11:19:53 1997 Marius Vollmer <mvo@zagadka.ping.de>
5120 * fluids.c, fluid.h: New files.
5121 * Makefile.am (libguile_la_SOURCES): Added "fluids.c".
5122 (modinclude_HEADERS): Added "fluids.h"
5124 * init.c: Include "fluids.h". (scm_boot_guile_1): Added call to
5125 scm_init_fluids to initialize the fluid machine.
5126 (scm_start_stack): Initialize the fluids of the first root with
5127 scm_make_initial_fluids.
5129 * root.h: Added "fluids" member to scm_root_state.
5130 * root.c: Include "fluids.h". (scm_mark_root): Mark "fluids".
5131 (scm_make_root): Call scm_copy_fluids to make fluid bindings
5132 unique for the new root when it has a parent.
5134 * smob.h: Include "libguile/print.h" to make scm_print_state
5137 * dynl.c (free_dynl_obj): New function to free the dynamic object
5138 data. (dynl_smob): Use it.
5139 * dynl.c (scm_dynamic_link): Moved allocating of the memory for
5140 the dynamic object data below the linking of the object to avoid
5141 memory leak when the linking code throws an error. Now the code
5142 leaks a whole dynamically linked library when must_malloc throws,
5143 but that should be much less likely.
5145 Fri Jul 11 00:19:47 1997 Jim Blandy <jimb@floss.red-bean.com>
5147 Changes to compile under gnu-win32, from Marcus Daniels:
5148 * stime.c (tzset): If tzset isn't provided, make it a NOP.
5149 (scm_localtime): Change SCM_EOF to SCM_EOL.
5150 (scm_mktime): Likewise.
5151 * socket.c: Don't include sys/un.h unless autoconf tells
5152 us Unix domain sockets are available.
5153 (scm_fill_sockaddr): Ignore Unix domain code.
5154 (scm_addr_vector): Likewise.
5155 (scm_init_addr_buffer): Likewise.
5156 (scm_socketpair): Don't include unless socketpair was
5157 found during autoconf.
5158 * simpos.c (SYSTNAME): Treat cygwin like Unix.
5159 * scmsigs.c (scm_pause): Don't include unless pause was found
5161 * posix.c (scm_getgroups): Don't include unless support function
5162 was found during autoconf (in this case, getgroups).
5163 (scm_setpwent): For setpwent.
5164 (scm_setegid): For setegid.
5165 * net_db.c (scm_inet_netof): Don't include unless support
5166 function was found during autoconf (in this case, inet_netof).
5167 (scm_lnaof): For inet_lnaof.
5168 (scm_inet_makeaddr): For inet_makeaddr.
5169 (scm_getnet): For getnetent, getnetbyname, getnetbyaddr.
5170 (scm_getproto): For getprotoent.
5171 (scm_getserv): For getservent.
5172 (scm_sethost): For sethostent, endhostent.
5173 (scm_setnet): For setnetent, endnetent.
5174 (scm_setproto): For setprotoent, endprotoent.
5175 (scm_setserv): For setservent, endservent.
5176 * scmconfig.h.in: Regenerated.
5178 Thu Jul 10 00:22:24 1997 Jim Blandy <jimb@floss.red-bean.com>
5180 * stime.c (scm_localtime, scm_mktime): Pass SCM_EOL to
5181 scm_misc_error, not SCM_EOF.
5183 * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list of
5184 arguments for formatting the error message, not SCM_BOOL_F. I
5185 think this is left over from the (eq? '() #f) days.
5187 * read.c (recsexpr): Give this a dummy definition if
5188 DEBUG_EXTENSIONS isn't #defined.
5190 Fri Jul 4 23:42:17 1997 Marius Vollmer <mvo@zagadka.ping.de>
5192 * coop-threads.c (scm_wait_condition_variable): Lock mutex again
5195 Thu Jul 3 16:31:24 1997 Marius Vollmer <mvo@zagadka.ping.de>
5197 * root.c (cwdr_outer_body): Bugfix: Pass `c' instead of `&c' to
5200 Sat Jun 28 16:14:09 1997 Tim Pierce <twp@twp.tezcat.com>
5202 * Makefile.am (libguile_la_LIBADD): Remove @ALLOCA@, since
5203 alloca.lo will be included in @LIBLOBJS@. Something better than
5204 this should be possible.
5205 * Makefile.in: Regenerated.
5207 Sat Jun 28 03:40:15 1997 Gary Houston <ghouston@actrix.gen.nz>
5209 * simpos.h: prototype for scm_primitive_exit.
5210 * simpos.c (scm_primitive_exit): new procedure, terminates the
5211 process without unwinding the stack.
5213 Sat Jun 28 03:45:25 1997 Tim Pierce <twp@twp.tezcat.com>
5215 * regex-posix.c (scm_make_regexp): Make `flags' a variable-length
5216 argument and logior its components together, so the user doesn't
5217 have to do this explicitly. Also, if regexp/basic is supplied, then
5218 turn off REG_EXTENDED.
5219 (scm_init_regex_posix): New regexp/basic symbol.
5220 (REG_BASIC): #define this if it is not already present.
5222 Fri Jun 27 20:36:35 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5224 * Makefile.am (libguile_la_LIBADD): Include @ALLOCA@.
5225 (MOSTLYCLEANFILES): New target, changed from CLEANFILES.
5226 (CLEANFILES): New target, clean versiondat.h, libpath.h.
5227 (DISTCLEANFILES): New target, clean *.x.
5228 * Makefile.in: Regenerated.
5230 Tue Jun 24 00:29:07 1997 Jim Blandy <jimb@floss.red-bean.com>
5232 * script.c (scm_compile_shell_switches): Add 1997 to copyright
5233 years in usage message.
5235 * Makefile.am (libguile_la_LDFLAGS): Bump library version.
5236 * Makefile.in: Regenerated.
5238 * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub
5239 flag; I don't think we support it.
5240 (scm_make_regexp): Make sure the user doesn't pass the
5243 * regex-posix.c (scm_make_regexp, scm_regexp_exec): Add optional
5245 (scm_init_regex_posix): Define constants for the REG_mumble flags;
5246 name them according to the SCSH convention: regexp/mumble.
5248 * regex-posix.h (scm_make_regexp, scm_regexp_exec): Update prototypes.
5250 Mon Jun 23 18:44:49 1997 Jim Blandy <jimb@floss.red-bean.com>
5252 * Makefile.am (libpath.h): Include the values of all the standard
5253 Makefile directory variables. Print a message, but don't print
5255 (versiondat.h): Print a message, but don't print all the commands.
5256 * load.c: #include "alist.h".
5257 (init_build_info): New function.
5258 (scm_init_load): Call it.
5259 * Makefile.in: Regenerated.
5261 Sun Jun 22 19:12:58 1997 Jim Blandy <jimb@floss.red-bean.com>
5263 * root.c: Establish a reliable catch-all handler for the new root.
5264 After all the Scheme handler function might signal an error too,
5265 and we don't want to lose that.
5266 (cwdr_inner_body): Renamed from cwdr_body.
5267 (cwdr_outer_body): New function, to establish the user's handler,
5268 and pass control to cwdr_inner_body.
5269 (cwdr): Establish the reliable catch-all handler here, and pass
5270 control to cwdr_outer_body.
5271 (struct cwdr_body_data): New field, handler, to allow cwdr to pass
5272 the user's handler through to cwdr_outer_body.
5273 * throw.c (scm_handle_by_message): Move guts into....
5274 (handler_message): New static function.
5275 (scm_handle_by_message_noexit): New function.
5276 * throw.h (scm_handle_by_message_noexit): New prototype.
5278 * __scm.h: (SCM_FENCE): New macro: optimizer will not move code
5279 across this. Only works on GCC. Otherwise, we hope for the best.
5280 (SCM_DEFER_INTS, SCM_ALLOW_INTS): Use FENCE appropriately. I have
5281 the feeling that real thread systems will not need this...
5283 Sun Jun 22 15:46:35 1997 Jim Blandy <jimb@floss.red-bean.com>
5285 Try to detect when people are using one version of libguile and a
5286 different version of ice-9. People have been skewing things and
5287 sending in bug reports.
5288 * Makefile.am (versiondat.h): New file to generate.
5289 * version.c: #include "versiondat.h", to get version info.
5290 (scm_libguile_config_stamp): New function.
5291 * script.c: #include "version.h".
5292 (scm_compile_switches): Call scm_version to get version number.
5293 * scmconfig.h.in, Makefile.in: Regenerated.
5294 * Makefile.in: Regenerated.
5296 * Makefile.am (ETAGS_ARGS): Catch SCM_PROC, etc. so we can find
5297 primitive definitions under their Scheme names.
5299 * Makefile.am (libguile_la_LDFLAGS): Update library version to
5300 1:2. Helps avoid confusion between installed and uninstalled libs.
5302 * scmconfig.h.in: Regenerated. (Needed after June 3 change to
5305 * gdb_interface.h (GDB_INTERFACE): Remove semicolon and trailing
5306 backslash from definition; this should be used like: GDB_INTERFACE;
5308 Sun Jun 22 04:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5310 * ioext.c (scm_duplicate_port): bug fix: don't try to make the
5311 new port unbuffered until its stream has been set.
5313 Sat Jun 21 18:44:03 1997 Gary Houston <ghouston@actrix.gen.nz>
5315 * ports.h: new prototype.
5316 * ports.c (scm_flush_all_ports): new procedure, scsh compatible.
5318 Sat Jun 21 00:25:03 1997 Jim Blandy <jimb@floss.red-bean.com>
5320 Make things compile neatly under Sun's C compiler.
5321 * dynl.c (scm_dynamic_func): Cast return value from sysdep_dynl_func.
5322 * extchrs.c (xmbtowc): Make the second arg a normal char, not
5323 unsigned, because that's what the ANSI function takes.
5324 * extchrs.h (xmbtowc): Corresponding change to prototype.
5325 * genio.c (scm_gen_getc): Make buf plain chars. Nobody wants
5327 * mbstrings.c (scm_mb_ilength): Use ANSI arg syntax. Make DATA
5328 argument plain char *.
5329 * strings.c (scm_string): Use SCM_ROCHARS, since c is a plain
5331 * tag.c (scm_tag): Remove unreachable statement.
5332 * unif.c (scm_array_to_list): If we want to shift a 1 bit to the
5333 top of the word, it should be unsigned.
5335 * eval.c (scm_lookupcar1): Don't declare var2 unless USE_THREADS
5336 is defined, to avoid warnings; it's only used in the
5337 conflict-checking code. Which might go away anyway.
5338 (SCM_CEVAL): All goto's targeting the `dispatch' label are in
5339 conditionals; put the label definition in an #if too, to stifle
5342 * Makefile.am (EXTRA_DIST): Include ChangeLog-gh and
5343 ChangeLog-threads in the distribution.
5344 * Makefile.in: Regenerated.
5346 Fri Jun 20 10:03:41 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5348 * guile-snarf.in: Changed regexp to support CPPs that insert
5349 whitespace between lexical tokens (which munges the `%%%' snarf
5352 Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5354 * load.c (scm_init_load_path): Append $(datadir)/guile to
5355 %load-path, so modules do not have to be installed in Guile's
5356 current version directory.
5358 Mon Jun 16 17:20:55 1997 Marius Vollmer <mvo@zagadka.ping.de>
5360 * dynl.c (scm_dynamic_call, scm_dynamic_args_call): Wrap dynamic
5361 function call in SCM_DEFER_INTS/SCM_ALLOW_INTS.
5362 (scm_dynamic_link, scm_dynamic_unlink, scm_dynamic_func): Always
5363 call the sysdep functions with deferred ints.
5364 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c (sysdep_dynl_link,
5365 sysdep_dynl_unlink, sysdep_dynl_func): Expect to be called with
5366 deferred interrupts and insert SCM_ALLOW_INTS before throwing an
5369 * dynl.c (scm_dynamic_unlink, scm_dynamic_call): Return
5372 Sat Jun 14 19:00:58 1997 Gary Houston <ghouston@actrix.gen.nz>
5374 * scmsigs.c (sys_deliver_signals): add a comment about a probable bug.
5376 Wed Jun 11 00:33:00 1997 Jim Blandy <jimb@floss.red-bean.com>
5378 * Makefile.in: Regenerated after xtra_PLUGIN_guile_libs change in
5381 Sun Jun 8 14:37:26 1997 Marius Vollmer <mvo@zagadka.ping.de>
5383 * eval.c (scm_lookupcar1): New procedure to cope with a race
5384 condition during lookup (when using threads).
5385 (scm_lookupcar): Implement in terms of scm_lookupcar1.
5386 (SCM_CEVAL): Use scm_lookupcar1 instead of scm_lookupcar in one
5389 Fri Jun 6 19:05:07 1997 Jim Blandy <jimb@totoro.cyclic.com>
5391 * regex-posix.c (scm_regexp_exec): Use the `start' argument if
5392 supplied. (Change from Tim Pierce.)
5394 Thu Jun 5 16:38:19 1997 Marius Vollmer <mvo@zagadka.ping.de>
5396 * struct.c (init_struct): Forget to mention this in the "Wed Jun 4
5397 23:47:01 1997" changelog: Slots are now initialized with `#f' by
5398 default and not `()'. `#f' is the canonical non-value in Scheme,
5401 Wed Jun 4 23:47:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
5403 * struct.c (struct_printer): New variable that holds a handle on
5404 the Scheme variable *struct-printer*. This variable can be set by
5405 Scheme code to override the printing of structures.
5406 (scm_print_struct): If struct_printer is set, call it. If it is
5407 not set, or returns #f, print the structure in the old fashion.
5408 Include "eval.h" for scm_apply.
5410 Tue Jun 3 23:01:39 1997 Marius Vollmer <mvo@zagadka.ping.de>
5412 * struct.c (scm_struct_ref, scm_struct_set_x): Use
5413 scm_struct_i_n_words to get the number of fields, not
5414 -scm_struct_n_extra_words.
5416 On the route to fancier struct printing:
5417 * struct.c (scm_print_struct): New function to print a structure.
5418 Include "genio.h" to support it. This function doesn't do
5419 anything interesting right now, but I think it should be here
5421 * struct.h: Include "print.h" and add prototype for
5423 * print.c (scm_iprin1): Call scm_print_struct instead of trying to
5424 print structures ourself.
5426 Sun Jun 1 07:58:41 1997 Gary Houston <ghouston@actrix.gen.nz>
5428 * scmsigs.c (sys_deliver_signals): bug fix: reset got_signal[i]
5429 before applying the handler in case it doesn't return.
5431 Sat May 31 18:57:51 1997 Gary Houston <ghouston@actrix.gen.nz>
5433 * scmsigs.h, async.h: updated.
5435 * _scm.h: if HAVE_RESTARTS is defined then don't use a SYSCALL
5438 * posix.c (scm_uname): interpret only negative values as an error.
5439 Solaris normally returns a positive value.
5441 * script.c (scm_compile_shell_switches): if we are not going into
5442 an interactive repl, set scm_mask_ints to zero so that asyncs can
5445 * simpos.c (scm_system): don't ignore/unignore signals around
5448 * posix.c (scm_open_pipe): don't ignore/unignore signals around
5451 * init.c (scm_boot_guile_1): don't call scm_init_signals, it's
5452 done in boot-9.scm instead.
5454 * scmsigs.c, async.c: Major rewriting of signal handling code.
5455 (scm_sigaction): new procedure.
5456 (scm_sleep): don't wrap sleep in SCM_SYSCALL, it would mess up the
5458 (scm_raise): return unspecified, throw error on failure.
5460 Thu May 29 02:47:36 1997 Jim Blandy <jimb@floss.cyclic.com>
5462 * regex-posix.c (scm_init_regex_posix): Register the "regex"
5463 feature, to help boot-9.scm decide whether to import the regex
5466 Thu May 29 02:19:40 1997 Jim Blandy <jimb@floss.cyclic.com>
5468 * eval.c: Include scmconfig.h at the beginning of the file so that
5469 HAVE_ALLOCA_H may properly be defined. Thanks to Bill Janssen for
5472 * regex-posix.c: #include "_scm.h" before conditionally #including
5473 <regex.h>; the former defines HAVE_REGCOMP.
5475 * regex-posix.c: #include <regex.h> conditionally, so the file is
5476 CPP'able (for dependency scanning) even on systems that don't have
5479 Tue May 27 23:48:38 1997 Jim Blandy <jimb@floss.cyclic.com>
5481 Add new R4RS-compliant syntax for keywords.
5482 * read.c (scm_lreadr): Recognize `#:' as a prefix for keywords,
5483 regardless of the setting of the `keywords' read option.
5484 * kw.c (prin_kw): Print keywords using the `#:' syntax, so they
5485 can be re-read no matter what the setting of the `keywords' read
5488 Tue May 27 22:47:31 1997 Tim Pierce <twp@twp.tezcat.com>
5490 Add support for POSIX regular expressions.
5492 * regex-posix.c, regex-posix.h: New files. (Some code
5493 is taken liberally from rx/rgx.c in the old Guile dist.)
5495 * init.c: Include regex-posix.h.
5496 (scm_boot_guile_1): Call scm_init_regex_posix.
5498 * Makefile.am (EXTRA_libguile_la_SOURCES, modinclude_HEADERS):
5499 Add regex-posix.[ch] sources.
5500 * Makefile.in: Regenerated.
5502 * scmconfig.h.in: Add HAVE_REGCOMP macro. (automake is supposed
5503 to do this automatically? It didn't for me, bleh.)
5505 Mon May 26 18:51:29 1997 Jim Blandy <jimb@floss.cyclic.com>
5507 * fports.c (print_pipe_port): New function.
5508 (scm_fptob): Use print_pipe_port instead of scm_prinport; the
5509 latter doesn't even take the right arguments.
5511 * Makefile.am: Increment shared lib revision number. I think
5512 sometimes the uninstalled Guile finds the installed shared lib;
5513 Gord says doing this might help. As things turned out, I can't
5514 say whether it does.
5515 * Makefile.in: Regenerated.
5517 * gh_init.c (gh_enter): Cast c_main_prog to a void * before
5518 passing it as the closure argument to scm_boot_guile. (Bill
5521 * ports.c (print_void_port, putc_void_port, puts_void_port,
5522 write_void_port, flush_void_port, getc_void_port, close_void_port,
5523 noop0): Use ANSI prototypes instead of K&R declarations, so the
5524 initialization of void_port_ptob gets aggressively type-checked.
5525 Fix arguments of print_void_port and write_void_port. (Bill
5528 * COPYING, __scm.h, _scm.h, alist.c, alist.h, append.c, append.h,
5529 appinit.c, arbiters.c, arbiters.h, async.c, async.h, backtrace.c,
5530 backtrace.h, boolean.c, boolean.h, chars.c, chars.h,
5531 continuations.c, continuations.h, coop-defs.h, coop-threads.c,
5532 coop-threads.c.cygnus, coop-threads.h, coop-threads.h.cygnus,
5533 coop.c, debug.c, debug.h, dynl-dl.c, dynl-dld.c, dynl-shl.c,
5534 dynl-vms.c, dynl.c, dynl.h, dynwind.c, dynwind.h, eq.c, eq.h,
5535 error.c, error.h, eval.c, eval.h, extchrs.h, feature.c, feature.h,
5536 filesys.c, filesys.h, fports.c, fports.h, fsu-pthreads.h, gc.c,
5537 gc.h, gdbint.c, gdbint.h, genio.c, genio.h, gh.h, gh_data.c,
5538 gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c, gh_list.c,
5539 gh_predicates.c, gh_test_c.c, gh_test_repl.c, gscm.c, gscm.h,
5540 gsubr.c, gsubr.h, guile.c, hash.c, hash.h, hashtab.c, hashtab.h,
5541 init.c, init.h, ioext.c, ioext.h, kw.c, kw.h, libguile.h, list.c,
5542 list.h, load.c, load.h, mallocs.c, mallocs.h, markers.c,
5543 markers.h, mbstrings.c, mbstrings.h, mit-pthreads.c,
5544 mit-pthreads.h, net_db.c, net_db.h, numbers.c, numbers.h,
5545 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
5546 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
5547 procprop.h, procs.c, procs.h, putenv.c, ramap.c, ramap.h, read.c,
5548 read.h, root.c, root.h, scmhob.h, scmsigs.c, scmsigs.h, script.c,
5549 script.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c,
5550 smob.h, snarf.h, socket.c, socket.h, srcprop.c, srcprop.h,
5551 stackchk.c, stackchk.h, stacks.c, stacks.h, stime.c, stime.h,
5552 strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h,
5553 strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h,
5554 tag.c, tag.h, tags.h, threads.c, threads.h, throw.c, throw.h,
5555 unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h,
5556 version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: New
5559 Mon May 26 12:37:30 1997 Jim Blandy <jimb@floss.cyclic.com>
5561 * script.c (scm_find_executable): Use prototype-style definition
5562 here; apparently it's not quite right to have const in a prototype
5563 and then use a K&R declaration. I wonder if stuff like this will
5564 go away if we compile with -Wrequire-prototypes, or whatever that
5565 is... (Bernard URBAN)
5567 * scmhob.h: New text from Bernard URBAN.
5569 Sat May 17 17:14:36 1997 Jim Blandy <jimb@floss.cyclic.com>
5571 * script.c: Don't #define const on hpux. Configure takes care of
5572 this. (Thanks to Larry Schwimmer.)
5574 * script.c: Use the HAVE_UNISTD_H symbol provided by autoconf to
5575 decide whether to #include <unistd.h>, instead of listing a bunch
5576 of systems. Don't #include stdio twice. Removed dyked-out
5577 definition of scm_find_impl_file.
5579 Fri May 16 03:06:08 1997 Jim Blandy <jimb@floss.cyclic.com>
5581 * Makefile.am (libguile_la_LDFLAGS): Update libguile's shared
5582 library version info to 1:0.
5583 * Makefile.in: Regenerated.
5585 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
5586 gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
5587 gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
5588 init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
5589 script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
5590 throw.c: Update copyright years; these files have been worked on
5591 significantly in 1997, but only had copyright years for 1996.
5592 Also, change name of copyright holder on some from Mikael
5593 Djurfeldt to Free Software Foundation; he has signed papers
5594 assigning the changes to the FSF.
5596 * script.c (scm_shell_usage): Pass FATAL to exit. There's no
5597 reason not to give the user the option.
5599 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
5600 Return #f on end-of-file when scanning table (i.e. when called
5601 with no arguments). Try to catch errors, when we can.
5602 * posix.c (scm_getgrgid, scm_getpwuid): Same.
5604 * script.h (scm_shell_usage, scm_compile_shell_switches): New
5605 external declarations. These are useful.
5607 Thu May 15 05:21:36 1997 Gary Houston <ghouston@actrix.gen.nz>
5609 * posix.c: don't include <sys/select.h> or define macros for
5610 select, since they were not used in this file.
5612 * filesys.c (scm_select): make the fifth parameter microseconds,
5613 not milliseconds. let the fourth parameter be either a real value
5614 or an integer or #f. The first, second and third arguments can
5615 now be vectors: the type of the corresponding return set will be
5617 (set_element, get_element): new static procedures.
5619 Wed May 14 12:18:12 1997 Jim Blandy <jimb@floss.cyclic.com>
5621 * strports.c (scm_eval_string): New function.
5622 (scm_eval_0str): Trivially re-implemented in terms of
5624 * strports.h (scm_eval_string): New extern decl.
5626 * net_db.c (h_errno): Add extern decl for this.
5628 * fports.c (local_pclose): New function.
5629 (scm_pipob): Use it in the initializer here.
5632 * net_db.c (scm_gethost, scm_getproto, scm_getnet, scm_getserv):
5633 Use a meaningful error message when signalling an error. For
5634 this, scm_gethost must check h_errno rather than errno.
5636 Tue May 13 16:40:06 1997 Jim Blandy <jimb@floss.cyclic.com>
5638 * Makefile.in: Regenerated, using automake-1.1p.
5640 Tue May 13 04:34:52 1997 Gary Houston <ghouston@actrix.gen.nz>
5642 * socket.c (scm_addr_vector): use SCM_UNDEFINED in scm_listify,
5643 not SCM_UNSPECIFIED.
5645 * script.c (scm_compile_shell_switches): don't append (quit) if
5647 (scm_shell): call scm_exit_status and exit on the result of the
5650 Mon May 12 17:23:58 1997 Jim Blandy <jimb@floss.cyclic.com>
5652 Ensure that shared substrings are handled properly when passed to
5653 a system call or other foreign function. Many thanks to Tim
5655 * symbols.h (SCM_COERCE_SUBSTR): new macro.
5656 * filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir,
5657 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
5658 scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime,
5659 scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone,
5660 scm_strftime), vports.c (scm_make_soft_port), backtrace.c
5661 (scm_display_error_message): use RO macros when strings may be RO.
5662 * error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod,
5663 scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir,
5664 scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c
5665 (scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c
5666 (scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c
5667 (scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime,
5668 scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime,
5669 scm_strftime), vports.c (scm_make_soft_port): use
5670 SCM_COERCE_SUBSTR to make sure shared substrings are
5673 Mon May 12 15:33:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
5675 * error.c (scm_error): Add newline to error message.
5677 * init.c (scm_init_standard_ports): Doc fix.
5679 Thu May 8 14:38:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
5681 * dynl-shl.c: Completely replaced with new code from Bernard
5684 * script.c (scm_ice_9_already_loaded): New variable.
5685 (scm_compile_shell_switches): Use it.
5687 Mon May 5 20:35:08 1997 Gary Houston <ghouston@actrix.gen.nz>
5689 * filesys.c (scm_input_waiting_p): add missing third argument to
5692 * stime.c (scm_localtime): copy the result of localtime before
5693 calling gmtime in case they share a buffer.
5694 (scm_localtime, scm_mktime): throw an error if neither HAVE_TM_ZONE
5697 Fri May 2 19:07:11 1997 Gary Houston <ghouston@actrix.gen.nz>
5699 * eq.c (scm_equal_p): use SCM_TYP7SD (y) not SCM_TYP7SD (x).
5701 Thu May 1 17:01:45 1997 Jim Blandy <jimb@floss.cyclic.com>
5703 * Makefile.am (check-local): New target, which causes 'make check'
5704 to run gh_test_c and gh_test_repl, with some trivial input.
5705 * Makefile.in: Rgnrtd.
5707 Tue Apr 29 19:00:40 1997 Marius Vollmer <mvo@zagadka.ping.de>
5709 * dynl.c (print_dynl_obj): Indicate whether the dynamic object has
5712 Mon Apr 28 06:10:14 1997 Gary Houston <ghouston@actrix.gen.nz>
5714 * async.c (scm_sys_tick_async_thunk): commented out. I'm not
5715 sure how this was supposed to work.
5716 (scm_async_click): don't send SCM_TICK_SIGNAL.
5717 (scm_init_async): don't initialize %tick-thunk.
5719 * the following change doesn't affect the Scheme interface:
5720 gc-thunk is called at the end of garbage collection. however it's
5721 no longer implemented by pretending it's a signal.
5723 * gc.c (scm_gc_end): don't call scm_take_signal. instead mark the
5724 system async corresponding to scm_gc_thunk.
5725 * async.h: declare scm_gc_async.
5726 * async.c (scm_sys_gc_async_thunk): apply the thunk named by
5727 gc-thunk directly, instead of going through a signal handler.
5728 (scm_gc_async): new variable, points to the GC system-async.
5729 (scm_init_async): save the GC async as scm_gc_async instead
5730 of using system_signal_asyncs.
5731 (scm_gc_vcell): new variable, stores the gc-thunk vcell.
5733 Mon Apr 28 19:14:44 1997 Jim Blandy <jimb@floss.cyclic.com>
5735 * Makefile.am (libpath.h, cpp_err_symbols.c, cpp_sig_symbols.c):
5736 Don't screw up if we're interrupted.
5737 * Makefile.in: Regeneradet.
5739 Sun Apr 27 17:57:15 1997 Jim Blandy <jimb@floss.cyclic.com>
5741 * aclocal.m4: Removed; unnecessary, given changes of Apr 24.
5743 * Makefile.am (modincludedir): Use "ice-9" instead of "@module@";
5744 we're not using AM_INIT_GUILE_MODULE any more.
5745 * Makefile.in: Reneregated.
5747 Thu Apr 24 00:41:08 1997 Jim Blandy <jimb@floss.cyclic.com>
5749 Functions for finding variable bindings, grace à Tim Pierce.
5750 * gh_data.c (gh_lookup, gh_module_lookup): New functions.
5751 * gh.h (gh_lookup, gh_module_lookup): New prototypes.
5753 Get 'make dist' to work again.
5754 * Makefile.am (EXTRA_DIST): Remove PLUGIN files.
5755 * Makefile.in: Regenerated, like a surry without a fringe on top.
5757 Changes for reduced Guile distribution: one configure script,
5759 * configure.in, configure: Removed.
5760 * acconfig.h, acinclude.m4: Moved to parent directory, where the
5761 real configure script lives.
5762 * Makefile.in, scmconfig.h.in: Regenerated.
5764 * init.c: #include "script.h", to get prototype for script.c's
5767 Wed Apr 23 21:25:39 1997 Jim Blandy <jimb@floss.cyclic.com>
5769 * gh_data.c (gh_scm2newstr, gh_symbol2newstr): Use
5770 scm_must_malloc, not raw malloc.
5772 * script.c (scm_compile_shell_switches): Dyke out debugging output
5775 Mon Apr 21 05:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5777 * eq.c (scm_equal_p): use "SCM_TYP7SD", not "SCM (TYP7SD".
5779 * stime.c: include both <sys/times.h> and <sys/timeb.h> if the
5780 system has them. Hope this is safe. Previously
5781 sys/timeb.h was included if HAVE_FTIME was defined or if
5782 HAVE_SYS_TIMEB_H was defined but HAVE_SYS_TIMES_H was not,
5783 but IRIX iris 5.3 apparently has ftime but not sys/timeb.h.
5785 * ioext.c (scm_setfileno): add missing third argument to
5786 scm_misc_error call.
5788 Sun Apr 20 15:09:31 1997 Jim Blandy <jimb@totoro.cyclic.com>
5790 * eq.c (scm_equal_p): Correctly compare strings of different
5791 varieties. (Thanks to Tim Pierce.)
5793 Sat Apr 19 03:59:02 1997 Jim Blandy <jimb@floss.cyclic.com>
5795 * read.c (skip_scsh_block_comment): SCSH says the !# that ends a
5796 #! block comment must occur on a line all by itself.
5798 Move most of the guts of shell command processing into libguile,
5799 so guile.c can be very small (and eventuallly auto-generated. (I
5800 mean, generated mechanically, not self-generated. Hmm.))
5801 * guile.c, script.c, script.h: New source files.
5802 * init.c (scm_boot_guile_1): Call scm_init_script.
5803 * libguile.h: #include "script.h".
5804 * Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
5805 targets, for new executable.
5806 (libguile_la_SOURCES): Mention script.c.
5807 (modinclude_HEADERS): Add script.h.
5808 * configure.in: Always check for -lm, -lsocket, -lnsl, whether or
5809 not dynamic linking is enabled. This is because we're generating
5810 executables now. Move CY_AC_WITH_THREADS call after those, so the
5811 values of cy_cv_threads_libs captures the libs chosen above.
5812 * Makefile.in, configure, aclocal.m4: Regenerated.
5814 * Makefile.am (EXTRA_DIST): Don't distribute gscm.c or gscm.h.
5815 We don't maintain this interface any more, and it just confuses
5818 * alloca.c: #include <scmconfig.h>, not <config.h>.
5819 * Makefile.am (EXTRA_libguile_la_SOURCES): Mention alloca.c, so
5820 it'll get included in disties.
5822 Thu Apr 17 17:45:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
5824 * gscm.c, gscm.h: These aren't supported any more, and shouldn't
5825 be distributed, because they confuse people.
5826 * Makefile.am (EXTRA_DIST): Remove gscm.c, gscm.h.
5828 Sat Apr 19 11:56:18 1997 Tim Pierce <twp@twp.tezcat.com>
5830 * configure.in: check for presence of gethostent (not present on
5831 OpenBSD by default).
5832 * net_db.c (scm_gethost): Check HAVE_GETHOSTENT.
5833 * configure, scmconfig.h.in: Regenerated.
5835 Wed Apr 16 17:52:38 1997 Jim Blandy <jimb@floss.cyclic.com>
5837 * backtrace.c (scm_backtrace): Split message string across
5838 newlines properly. GCC is more tolerant of this than other
5841 Mon Apr 14 20:20:14 1997 Jim Blandy <jimb@floss.cyclic.com>
5843 Merge threads directory into libguile.
5844 * coop-defs.h, coop-threads.c, coop-threads.h, coop.c, threads.c,
5845 threads.h: New source files.
5846 * Makefile.am (EXTRA_libguile_la_SOURCES): Add threads.c.
5847 (noinst_HEADERS): Add coop-threads.c, coop-threads.h, coop.c
5849 (modinclude_HEADERS): Add threads.h, coop-defs.h.
5850 (EXTRA_DIST): Add fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
5851 coop-threads.c.cygnus, coop-threads.h.cygnus.
5852 * configure.in: If we're using threads, include threads.o in
5854 * _scm.h, libguile.h: threads.h lives in this directory now.
5855 * fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
5856 coop-threads.c.cygnus, coop-threads.h.cygnus: New files, not
5857 currently used, but brought along for information's sake.
5858 * ChangeLog-threads: log from old 'threads' directory.
5859 * Makefile.in, configure: Rebuilt.
5861 Mon Apr 14 20:15:29 1997 Jim Blandy <jimb@totoro.cyclic.com>
5863 * stime.c (scm_mktime): #ifndef HAVE_TM_ZONE, Use lt.tm_zone, not
5866 Mon Apr 14 01:32:57 1997 Jim Blandy <jimb@floss.cyclic.com>
5868 * gh_init.c (gh_standard_handler): Return SCM_BOOL_F, not garbage.
5870 Merge GH interface library into libguile.
5871 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
5872 gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c: New files.
5873 * Makefile.am (libguile_la_SOURCES): Add gh_data.c, gh_eval.c,
5874 gh_funcs.c, gh_init.c, gh_io.c, gh_list.c, gh_predicates.c. Move
5876 (EXTRA_libguile_la_SOURCES): ... here.
5877 (pkginclude_HEADERS): Add variable, to get gh.h installed.
5878 (THREAD_LIBS, check_ldadd, check_PROGRAMS, gh_test_c_SOURCES,
5879 gh_test_c_LDADD, gh_test_repl_SOURCES, gh_test_repl_LDADD):
5880 New variables, describing how to build the gh test programs.
5881 * configure.in: Check for -lm, -lsocket, -lnsl; we need this to
5882 build the test programs, and we probably should have been linking
5883 libguile.la against them all along, to support AIX shared libs.
5884 Add cflags for threads to CFLAGS; add libs for threads to new
5885 variable THREAD_LIBS, used in Makefile.am.
5886 * ChangeLog-gh: log from old `gh' subdirectory.
5887 * Makefile.in, configure, scmconfig.h.in: Rebuilt.
5889 Sun Apr 13 23:03:55 1997 Jim Blandy <jimb@floss.cyclic.com>
5891 * acconfig.h: Undo change of Apr 9; including the definition of
5892 PACKAGE in the guile headers conflicts with applications' own
5894 * scmconfig.h.in: Regenerated.
5896 Fri Apr 11 14:12:13 1997 Jim Blandy <jimb@floss.cyclic.com>
5898 * filesys.c (scm_fcntl): New function from Roland McGrath.
5899 (scm_init_filesys): New symbols for use with fcntl.
5900 * filesys.h: Added prototype.
5902 * eval.c (SCM_APPLY): Set debug apply frame argument list correctly
5903 when PROC is receiving no arguments.
5905 Fri Apr 11 19:39:32 1997 Jim Blandy <jimb@totoro.cyclic.com>
5907 * filesys.c (S_ISSOCK): Define this if it's missing, but we do
5908 have S_IFSOCK. This is the case under Ultrix.
5910 * posix.c (scm_status_exit_val, scm_status_exit_val,
5911 scm_status_term_sig, scm_status_stop_sig): Modified to work with
5912 Ultrix versions of WIFSTOPPED, etc., which assume that their
5913 arguments are lvalues (hmm).
5915 Thu Apr 10 15:10:07 1997 Jim Blandy <jimb@floss.cyclic.com>
5917 * eval.c: Doc fixes.
5919 * throw.c: Doc fixes; rearranged.
5921 * putenv.c: #include "libguile/scmconfig.h", not <config.h>.
5923 Wed Apr 9 18:01:20 1997 Jim Blandy <jimb@floss.cyclic.com>
5925 * acconfig.h: Added entry for PACKAGE.
5926 * scmconfig.h.in: Regenerated.
5928 Changes to work with automake-1.1n, which has better libtool support.
5929 * Makefile.am: Use lib_LTLIBRARIES instead of lib_PROGRAMS.
5930 Use libguile_la_LIBADD instead of libguile_la_LDADD. (What's the
5932 (libguile_la_SOURCES, modinclude_HEADERS, EXTRA_DIST): Format for
5934 * Makefile.in: Rebuild.
5936 Wed Apr 9 09:08:54 1997 Gary Houston <ghouston@actrix.gen.nz>
5938 * stime.c (scm_mktime): take an optional zone argument.
5939 (scm_localtime): check putenv return value.
5940 (scm_strftime, scm_strptime): moved from posix.c. move #include
5942 stime.h, posix.h: update prototypes.
5943 (bdtime2c, setzone, restorezone): new static procedures.
5944 (scm_mktime, scm_strftime): use them.
5945 (scm_strftime): don't call mktime before strftime. Use
5946 filltime for return value.
5947 (filltime): convert NULL zname to #f.
5948 (scm_strptime): return a count of characters consumed, not
5949 the remaining string.
5951 Sun Apr 6 05:44:11 1997 Gary Houston <ghouston@actrix.gen.nz>
5953 * stime.c (scm_localtime): check HAVE_TM_ZONE and HAVE_TZNAME.
5954 (scm_mktime): likewise.
5956 Uncomment localtime and mktime.
5958 * configure.in: add AC_STRUCT_TIMEZONE.
5960 Sat Apr 5 23:56:40 1997 Gary Houston <ghouston@actrix.gen.nz>
5962 * stime.c (scm_init_stime): don't define ticks/sec.
5963 (scm_gettimeofday): renamed from scm_time_plus_ticks (avoids multiple
5964 return value problem and is still portable.)
5966 Sat Apr 5 17:59:24 1997 Jim Blandy <jimb@floss.cyclic.com>
5968 * cpp_err_symbols.in: Renamed from cpp_err_symbols, to avoid
5969 make's implicit cpp_err_symbols: cpp_err_symbols.c rule.
5970 * cpp_sig_symbols.in: Renamed from cpp_sig_symbols.
5971 * Makefile.am (check_errnos, check_signals, cpp_sig_symbols.c,
5972 cpp_err_symbols.c): Corresponding changes.
5973 * Makefile.in: Regenerated.
5975 Sat Apr 5 02:39:02 1997 Gary Houston <ghouston@actrix.gen.nz>
5977 * posix.c (scm_putenv): don't check HAVE_PUTENV.
5978 * Makefile.am (EXTRA_libguile_la_SOURCES): add putenv.c.
5979 * configure.in: move putenv from AC_CHECK_FUNCS to AC_REPLACE_FUNCS.
5980 * putenv.c: new file, from sh-utils 1.12.
5982 * posix.c (scm_environ): use malloc in place of scm_must_malloc
5983 since allocation isn't for Scheme objects.
5984 (scm_putenv): copy strings before placing in the environment.
5986 * stime.c (scm_current_time): throw an error if time returns -1,
5987 instead of returning #f.
5988 (scm_get_internal_real_time, scm_get_internal_real_time): use
5989 scm_long2num for return value instead of SCM_MAKINUM.
5991 * stime.h: prototypes updated.
5993 * stime.c (scm_time_in_msec): apparently unused, deleted.
5995 Fri Apr 4 08:53:41 1997 Gary Houston <ghouston@actrix.gen.nz>
5997 * configure.in: check for gettimeofday.
5999 * stime.c (scm_time_plus_ticks): new procedure, an scsh interface
6000 which may be more usefully portable than a gettimeofday interface.
6002 Wed Apr 2 17:11:39 1997 Jim Blandy <jimb@totoro.cyclic.com>
6004 * Makefile.am (EXTRA_DIST): It's cpp_err_symbols, not
6006 * Makefile.in: Regenerated.
6008 Mon Mar 31 03:22:37 1997 Gary Houston <ghouston@actrix.gen.nz>
6010 * stime.c (filltime): recovered static procedure.
6011 (scm_localtime, scm_gmtime, scm_mktime, scm_tzset): recovered from
6014 * posix.h: add prototype for scm_close_pipe, remove prototypes for
6015 scm_open_input_pipe, scm_open_output_pipe, change scm_mknod prototype.
6017 * posix.c (scm_mknod): split the mode argument into type and perms
6018 arguments, like the extra fields returned by stat.
6020 * fports.c (scm_pipob): set the close, free and print procedures.
6021 (scm_close_pipe): new procedure.
6023 * posix.c (scm_open_input_pipe, scm_open_output_pipe): deleted,
6024 define them in boot-9.scm
6026 Wed Mar 26 04:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
6028 * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD
6029 wan't defined. Don't include fd.h.
6031 * Previously fd.h was regenerated whenever configure was run,
6032 forcing a couple of files to be recompiled.
6034 * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c.
6035 * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER.
6036 Check for _fileno as well as _file.
6038 * ioext.c: don't fd.h.
6039 * acconfig.h: remove duplicate HAVE_FD_SETTER and change the
6042 * Change the stratigy for getting information about errno
6043 (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of
6044 generating lists of symbols during the build process, which will
6045 not always work, include comprehensive lists in the distribution.
6046 To help keep the lists up to date, the "check_signals" and
6047 "check_errnos" make targets can be used.
6049 * configure.in: don't check for a command to extract errno codes.
6050 * Makefile.am: update file lists, remove errnos.list and errnos.c
6051 targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals,
6052 check_errnos targets.
6053 (CLEANFILES): remove errnos.c and errnos.list, add
6054 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new
6055 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
6056 * errnos.default: deleted.
6057 * cpp_signal.c: new file.
6058 * cpp_errno.c: renamed from errnos_get.c.
6059 * cpp_err_symbols, cpp_sig_symbols: new files.
6060 * cpp_cnvt.awk: renamed from errnos_cnvt_awk.
6061 * error.c (scm_init_error): #include cpp_err_symbols instead of
6063 * posix.c (scm_init_posix): don't intern signal symbols. #include
6066 Tue Mar 25 04:51:10 1997 Gary Houston <ghouston@actrix.gen.nz>
6068 * strop.c (scm_i_index): allow the lower bound to be equal to the
6069 length of the string, so a null string doesn't always give an error.
6071 * posix.h: new prototypes.
6072 * posix.c (scm_status_exit_val, scm_status_term_sig,
6073 scm_status_stop_sig): new functions, as in scsh. They break down
6074 process status values as returned by waitpid.
6076 Sat Mar 22 18:16:29 1997 Gary Houston <ghouston@actrix.gen.nz>
6078 * net_db.c (scm_gethost): don't check HAVE_GETHOSTENT, since
6079 configure doesn't know about it.
6081 Fri Mar 21 23:49:28 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6083 * snarf.h, backtrace.c: Name change SCM_GLOBAL --> SCM_VCELL.
6085 * snarf.h: Added new macros SCM_GLOBAL_SYMBOL and SCM_GLOBAL_VCELL
6086 which defines C variables with global linkage.
6088 Mon Mar 17 05:57:11 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6090 * snarf.h (SCM_PROC1): Bugfix: Use (void) rather than (...) for
6093 Sun Mar 16 11:43:49 1997 Mikael Djurfeldt <mdj@floss.cyclic.com>
6095 * eval.c (safe_setjmp): Temporarily use old setjmp until someone
6096 has time to check why this doesn't work well with continuations.
6098 Sun Mar 16 05:09:55 1997 Jim Blandy <jimb@totoro.cyclic.com>
6100 * Fix shell syntax error; some shells won't tolerate
6101 multiple "fi" statements on a single line. (Thanks to Fred Fish.)
6103 Sat Mar 15 01:11:40 1997 Gary Houston <ghouston@actrix.gen.nz>
6105 * posix.c (scm_uname): throw an error if uname fails instead
6108 * error.h (scm_errno, scm_perror): obsolete prototypes removed.
6110 * error.c (err_head, scm_errno, scm_perror): obsolete procedures
6113 * async.c (scm_ints_disabled): definition moved from error.c.
6115 Sat Mar 15 00:06:08 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6117 * acconfig.h: Removed PACKAGE.
6119 * scmconfig.h.in: Regenerated.
6121 * snarf.h: g++ says it's non-portable not to specify the first
6122 argument in a varargs declaration. I introduced the first
6123 argument by using preprocessor conditionals.
6125 Thu Mar 13 21:28:25 1997 Gary Houston <ghouston@actrix.gen.nz>
6127 * ioext.c (scm_read_delimited_x): use RO string macros for delims.
6128 (scm_freopen): use RO string macros for filename and modes.
6129 (scm_duplicate_port, scm_fdopen): use RO string macros for modes.
6131 * posix.c (scm_getgrgid): simplify conversion of name to C string.
6132 (scm_mknod): use RO string macros for path.
6134 * socket.c (scm_fill_sockaddr, scm_send, scm_sendto):
6135 use SCM_ROSTRINGP, SCM_ROCHARS, SCM_ROLENGTH.
6137 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
6138 use SCM_ROSTRINGP and SCM_ROCHARS.
6140 Thu Mar 13 18:31:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6142 * unif.c (scm_array_set_x): Cast ICHR (obj) to char if storing in
6145 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
6146 scm_array_index_map_x, raeql_1, scm_array_equal_p): Completed
6147 support for byte vectors.
6149 * print.c (scm_iprin1): Limit number of vector elements printed
6150 according to pstate->length.
6152 Thu Mar 13 00:12:35 1997 Gary Houston <ghouston@actrix.gen.nz>
6154 * backtrace.c (scm_display_error_message): don't segv if message
6157 * error.h: prototype for scm_error_scm.
6159 * error.c (scm_error_scm): new procedure, reimplements scm-error
6160 in C and uses scm_error.
6162 Tue Mar 11 03:51:00 1997 Gary Houston <ghouston@actrix.gen.nz>
6164 * read.c (scm_read_hash_extend): make scm_read_hash_procedures a
6165 pointer to the Scheme variable read-hash-procedures and intern it
6166 in scm_init_read. Modify scm_read_hash_extend and
6167 scm_get_hash_procedure to use the pointer.
6169 Mon Mar 10 06:28:54 1997 Gary Houston <ghouston@actrix.gen.nz>
6171 * read.h (SCM_N_READ_OPTIONS): increase SCM_N_READ_OPTIONS to 4.
6172 (SCM_KEYWORD_STYLE): defined.
6174 * read.c (scm_read_opts): add a keywords option. This isn't a
6175 boolean option, in case someone wants to add support for DSSSL
6177 Setup scm_keyword_prefix symbol.
6178 (scm_lreadr): Only process keywords if SCM_KEYWORD_STYLE is
6180 I've left keyword support disabled by default, since it doesn't
6181 seem to break the module system and it gives R4RS standard behaviour.
6182 It can be reactivated with (read-set! keywords 'prefix).
6184 Sun Mar 9 14:14:39 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6186 * arbiters.c (scm_make_arbiter): Bugfix: Must SCM_DEFER_INTS
6187 before constructing arbiter.
6189 * eval.c (scm_m_define): Bugfix: Check that the object is a
6190 closure before setting the procedure property!
6192 * ports.h: Removed prototype for scm_ungetc_char_ready_p.
6194 * ports.c: Removed `ungetc-char-ready?'.
6196 Sat Mar 8 00:27:05 1997 Gary Houston <ghouston@actrix.gen.nz>
6198 * read.c (scm_init_read): intitialise scm_read_hash_procedures
6199 (idea from Mikael: make it a pair so scm_permanent object only
6201 (scm_read_hash_extend): don't call scm_permanent_object.
6202 (ideas from Mikael): if chr is already in the list, replace its
6203 procedure instead of appending it again. If proc is #f, remove
6205 (scm_get_hash_procedure): take CDR of scm_read_hash_procedures.
6207 * strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.
6209 * gdbint.c (gdb_read): update scm_lreadr usage.
6211 * load.h: update prototypes.
6213 * load.c (scm_primitive_load, scm_read_and_eval_x,
6214 scm_primitive_load_path): remove case_insensitive_p, sharp arguments.
6216 * read.h: add prototype for scm_read_hash_extend. Change args for
6219 * read.c (scm_read_hash_procedures): new variable.
6220 (scm_read_hash_extend): new procedure.
6221 (scm_get_hash_procedure): new procedure.
6222 (scm_lreadr): use scm_get_hash_procedure instead of an argument
6223 for extended # processing.
6224 (scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen,
6225 scm_read_token): remove case_i, sharp arguments. Change callers.
6227 Fri Mar 7 08:58:21 1997 Gary Houston <ghouston@actrix.gen.nz>
6229 * read.h (SCM_N_READ_OPTIONS): increase to 3.
6230 (SCM_CASE_INSENSITIVE_P): define.
6232 * read.c: add case-insensitive option to scm_read_opts.
6233 (scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument
6234 to determine whether to convert symbol case.
6235 (default_case_i): definition removed.
6236 * read.c (scm_read_token): if case_i, downcase ic before doing
6239 Sat Mar 8 03:49:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6241 * configure.in: Added configuration option `guile-debug'.
6242 Configure with --enable-guile-debug if you want a bunch of extra
6243 functions used for debugging when developing Guile.
6245 * acconfig.h: Added new preprocessor symbol GUILE_DEBUG.
6247 * procs.c (make-cclo): New undocumented debugging procedure: Make
6248 compiled closure with internal procedure PROC and length LENGTH.
6249 Only compiled if GUILE_DEBUG is defined.
6251 * debug.c: Only include `debug-hang' if GUILE_DEBUG is defined.
6253 * print.c: Put #ifdef GUILE_DEBUG around `current-pstate'.
6255 * ports.c: Changed preprocessor symbol DEBUG --> GUILE_DEBUG.
6257 * eval.c (SCM_CEVAL): Added code sections for handling of rpsubrs
6258 with 3 or more args internally to the evaluator.
6260 Fri Mar 7 19:38:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6262 * eval.c (SCM_CEVAL): Added code sections for handling of asubrs
6263 with 3 or more args internally to the evaluator. This is mainly
6264 because we don't want to pass entry and exit points of the
6265 debug support twice, but it also seems to increase the speed of
6266 the evaluator for such calls (e. g. (+ 1 2 3)).
6268 * backtrace.c (scm_display_application): New procedure:
6269 display-application; Set fancy printing parameters individually
6270 for different types of display (backtrace, error, application).
6271 (These should of course be customizable!)
6273 * debug.h (SCM_RESET_DEBUG_MODE): Bugfix: The old code didn't
6274 clear the CHECK-flags.
6276 Thu Mar 6 00:53:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6278 * tags.h, eval.c (iqq): Fixes to comments about SCM_ECONSP.
6280 Wed Mar 5 23:31:21 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6282 * tags.h (SCM_ECONSP, SCM_NECONSP): Bugfix: Discriminate structs
6283 from pairs with a GLOC in the car.
6285 * symbols.c (msymbolize): Bugfix: Also initialize SCM_SYMBOL_HASH,
6286 otherwise `symbol-hash' will behave badly.
6287 (scm_symbol_hash): Bugfix: Must msymbolize if tc7_ssymbol, othwise
6288 we get segmentation fault!
6290 * symbols.c: Added #include "weaks.h". New functions:
6291 `builtin-bindings' and `builtin-weak-bindings'. (These will be
6292 moved to an extraneous library when we split libguile.)
6294 Tue Mar 4 19:50:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6296 * filesys.c (scm_stat): stat now takes fport arguments too as
6297 documented in the manual.
6299 Mon Mar 3 07:11:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6301 * debug.c (scm_single_step): Bugfix: Call continuation with
6302 scm_call_continuation instead of throwing to it.
6304 Mon Mar 3 09:07:56 1997 Gary Houston <ghouston@actrix.gen.nz>
6306 * ports.c (scm_char_ready_p): bug fix: in SCM_PROC char-ready's
6307 argument wasn't declared to be optional.
6309 Sun Mar 2 16:34:40 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6311 * stime.c (scm_init_stime): Add feature "current-time".
6313 Sun Mar 2 06:37:31 1997 Gary Houston <ghouston@actrix.gen.nz>
6315 * throw.h: prototype for scm_exit_status.
6316 * throw.c (scm_handle_by_message): if a 'quit is caught, use its
6317 args to derive an exit status. Allows (quit) to work from a
6319 (scm_exit_status): new function.
6322 Sat Mar 1 00:09:15 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6324 * eval.c (scm_deval): Removed some old code.
6325 (ENTER_APPLY): Bugfix: Reset apply-frame trap on trap as is done
6327 (ENTER_APPLY, scm_deval): Reset trace flag on apply-frame and
6330 * symbols.c (msymbolize): Bugfix: Must initialize property list to
6333 * procs.c: Introduce the existent C function scm_thunk_p at the
6334 Scheme level as well.
6336 Wed Feb 26 12:53:58 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6338 * symbols.c, symbols.h (scm_symbol_value0): New function. Can be
6339 used from C to easily lookup the value of a symbol in the current
6342 Tue Feb 25 00:14:10 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6344 * unif.c (scm_init_unif): Added #include "unif.x". (There are two
6345 scm_init_unif in this file. This will also fix a previous problem
6348 * configure.in: Added AM_MAINTAINER_MODE
6350 Fri Feb 21 23:07:26 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6352 * gdb_interface.h (GDB_INTERFACE): Added some (void *) casts to
6355 Fri Feb 21 18:00:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
6357 * Makefile.am (EXTRA_libguile_la_SOURCES): New variable to hold
6358 source files that are not always included in libguile but should
6359 have their dependencies calculated by automake. This variable is
6360 recognized by automake, no further magic is needed.
6361 (libguile_la_DEPENDENCIES): Changed to @LIBLOBJS@. Libtool wants
6362 to deal exclusively with *.lo files, as it seems. The *.o files
6363 are built automatically when the corresponding *.lo file gets
6366 Wed Feb 19 14:04:23 1997 Jim Blandy <jimb@floss.cyclic.com>
6368 * list.h (scm_list_cdr_ref): Delete prototype; function no longer
6371 Thu Feb 13 21:44:07 1997 Gary Houston <ghouston@actrix.gen.nz>
6373 * unif.c (scm_array_set_x): minor change to argument error checking.
6375 Tue Feb 11 18:19:47 1997 Jim Blandy <jimb@floss.cyclic.com>
6377 * Makefile.am (libguile_la_SOURCES): Remove backtrace.c, debug.c,
6378 inet_aton.c, srcprop.c, stacks.c, and strerror.c from this list.
6379 They should only be included in the library at configure.in's
6381 (libguile_la_LDADD): Include the appropriate .lo files here.
6382 (libguile_la_DEPENDENCIES): List the corresponding .o files here,
6383 so we know when to build them (and their .lo bretheren).
6384 * configure.in (LIBLOBJS): New substituted variable. We let
6385 configure decide which .o files to include in LIBOBJS, and then
6386 put the corresponding list of .lo files in LIBLOBJS. The latter
6387 is what we pass to libtool.
6388 * Makefile.in, configure: regenerated.
6390 Mon Feb 10 00:08:08 1997 Mikael Djurfeldt <mdj@kenneth>
6392 * symbols.c (scm_sysintern0): New function. Contains the core of
6393 old scm_sysintern but doesn't take a second value argument.
6394 (scm_sysintern): Now uses scm_sysintern0.
6395 (scm_sysintern_no_module_lookup): Renamed to
6396 scm_sysintern0_no_module_lookup and doesn't take a second value
6397 argument any longer.
6399 * symbols.h (scm_sysintern0: Added declaration.
6401 * options.c (scm_init_opts): Use scm_sysintern0 instead of
6402 scm_sysintern when interning option keys. Otherwise we risk
6403 destroying the values of already interned variables.
6405 * symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
6406 scheme-level boolean (use SCM_NFALSEP).
6408 * backtrace.c (scm_init_backtrace): Make Scheme-level variable
6410 (scm_backtrace): New function. (C version of old function from
6411 boot-9.scm) Motivation: Make it possible to display backtraces
6412 without depending on boot-9.scm. (I'm uncertain if this
6413 motivation is good enough...)
6415 * root.h (scm_root_state): Add member the_last_stack_var.
6416 (scm_the_stack_var): Defined to scm_root->the_last_stack_var.
6418 * root.c (mark_root): Mark scm_the_last_stack_var.
6420 * init.c (scm_start_stack): Initialize scm_the_last_stack_var to
6423 Sun Feb 9 18:04:41 1997 Mikael Djurfeldt <mdj@kenneth>
6425 * throw.c (mark_lazy_catch, free_lazy_catch): Removed.
6426 1. mark_lazy_catch didn't mark the smob.
6427 2. Both functions above have standard variants:
6428 (lazy_catch_funs): Changed mark_lazy_catch --> scm_mark0,
6429 free_lazy_catch --> scm_free0.
6431 Fri Feb 7 17:30:26 1997 Jim Blandy <jimb@floss.cyclic.com>
6433 * throw.c (scm_internal_lazy_catch): New function.
6434 (scm_lazy_catch): Rewritten to use it.
6435 (scm_ithrow): Handle the new lazy catch representation.
6436 Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
6437 that doesn't have a jmpbuf is a lazy catch clause.
6438 (tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
6439 free_lazy_catch, print_lazy_catch, lazy_catch_funs,
6440 make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
6442 (scm_init_throw): Register the new lazy-catch smob type.
6443 * throw.h (scm_internal_lazy_catch): decl for new function.
6445 * throw.c (scm_internal_catch): Doc fixes.
6447 * alloca.c: New file, needed to support the AC_FUNC_ALLOCA call in
6448 configure.in. Including this might cause problems if applications
6449 that link against libguile include their own copies of alloca, but
6450 if they're using autoconf, they should be adding libguile to LIBS
6451 before calling AC_FUNC_ALLOCA anyway, in which case they'll find
6452 the copy in libguile, and things will be okay. (I think.)
6454 Thu Feb 6 03:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
6456 * strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from
6458 strop.h: move prototypes too.
6460 Wed Feb 5 08:33:00 1997 Gary Houston <ghouston@actrix.gen.nz>
6462 * posix.c (scm_init_posix): don't intern EINTR since it's now done
6465 * ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
6466 etc. I deleted them from filesys.c long ago, but didn't
6467 notice they were here too (although ineffective since
6468 sys/stat.h wasn't included).
6470 Tue Feb 4 18:17:50 1997 Tom Tromey <tromey@cygnus.com>
6472 * eval.c: Don't define alloca in GCC case. gcc will automatically
6473 use __builtin_alloca if appropriate.
6475 Tue Feb 4 16:57:40 1997 Jim Blandy <jimb@floss.cyclic.com>
6477 * eval.c (safe_setjmp): New function: trivial wrapper for setjmp.
6478 (SCM_CEVAL, SCM_APPLY): Call it, instead of setjmp, to make sure
6479 that values of automatic variables are preserved. See comments
6480 for safe_setjmp for details.
6482 Change from Thomas Morgan:
6483 * variable.c: Include eq.h.
6484 (var_equal): New function.
6485 (variable_smob): Use var_equal as the discriminator for variables.
6487 * throw.c (s_throw): Remove extraneous declaration.
6489 * configure.in: Call AC_FUNC_ALLOCA, to see if we have alloca.
6490 * eval.c: Add necessary CPP cruft to support that.
6491 * configure, Makefile.in, scmconfig.h.in: regenerated.
6493 Change from Thomas Morgan:
6494 * procprop.c (scm_procedure_properties): Convert the Scheme
6495 boolean returned by scm_procedure_p into a C boolean before using
6496 it as a condition for SCM_ASSERT.
6497 (scm_procedure_property): Likewise.
6499 * simpos.c (SYSTNAME): Accept both 'unix' and '__unix' as
6500 indications of Unixness.
6503 Tue Feb 4 05:07:35 1997 Gary Houston <ghouston@actrix.gen.nz>
6505 * net_db.c (scm_lnaof): change scheme name from lnaof to inet-lnaof.
6507 Mon Feb 3 06:12:37 1997 Gary Houston <ghouston@actrix.gen.nz>
6509 * read.c (scm_lreadr): use scm_misc_error to improve one of the
6510 "unknown # object" error messages.
6512 * strop.c (scm_i_index, scm_i_rindex): combine into one procedure
6513 (scm_i_index) and declare it static. Add a 'direction' argument
6514 to indicate what way the search should go.
6515 (scm_i_index): throw out-of-range error instead of wrong-type-arg
6517 (scm_string_index, scm_string_rindex): adjust usage of scm_i_index.
6518 strop.h: remove scm_i_index, scm_i_rindex prototypes.
6520 Fri Jan 31 04:33:11 1997 Gary Houston <ghouston@actrix.gen.nz>
6522 * ioext.c, ioext.h: remove obsolete _sys_ from 9 procedure names.
6524 * posix.c (scm_fork): Scheme name changed from fork to primitive-fork,
6525 to avoid clash with various scsh forks.
6527 Thu Jan 30 20:14:09 1997 Mikael Djurfeldt <mdj@syk-0606.pdc.kth.se>
6529 The following two changes (ramap.c, throw.c) are motivated by the
6530 apparent unportability of forward declarations of static arrays of
6531 the form `static foo bar[];'.
6533 * ramap.c (scm_array_fill_x): Moved above scm_array_fill_int.
6534 (ra_rpsubrs, ra_asubrs): Moved to the top of array code.
6536 * throw.c (scm_throw): Moved above scm_ithrow.
6538 * options.h: Removed the extern declarations of scm_yes_sym and
6539 scm_no_sym since these are static.
6541 Fri Jan 24 06:16:32 1997 Gary Houston <ghouston@actrix.gen.nz>
6543 * ports.c: add SCM_PROC declarations for pt-size and pt-member.
6545 * Makefile.am: remove AWK=@AWK@.
6546 Add a rule for generating errnos.list.
6547 (CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.
6549 * configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
6550 don't extract errnos, just set a variable (avoids the
6551 need to recompile error.c just because configure is run.)
6553 * unif.h: update prototypes.
6554 * unif.c (scm_uniform_array_read,write): change the offset and
6555 length arguments to start and end, for consistency.
6557 * __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.
6559 * ioext.h: update prototypes.
6560 * ioext.c (scm_read_delimited_x): replaces scm_read_line and
6561 scm_read_line_x, it's a more general procedure using an
6562 interface from scsh. read-line and read-line! are now defined
6564 Note that the new read-line trims the terminator
6565 by default, previously it was appended to the returned string. An
6566 optional argument specifies how to process the terminator (scsh
6567 compatible). For the old behaviour: (read-line port 'concat).
6568 scm_read_line, scm_read_line_x: deleted. (read-line port 'split)
6569 returns a pair, but is converted to multiple values if the scsh
6572 socket.h: update prototypes.
6573 * socket.c (scm_recvfrom): for consistency with other procedures,
6574 take start and end as separate optional arguments.
6575 (scm_recv, scm_recvfrom): don't allow the second argument
6576 to be a size, only a buffer. Change the scheme names to
6577 recv! and recvfrom!. Don't return the buffer.
6579 * ioext.h, posix.h: move prototypes too.
6580 * ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
6581 moved back from posix.c to ioext.c. Also move #includes of "genio.h"
6582 "read.h" and "unif.h".
6583 * ioext.c: include "chars.h"
6585 Mon Jan 20 19:54:49 1997 Marius Vollmer <mvo@zagadka.ping.de>
6587 * dynl.c: The dynamic linking and module registration functions
6588 are now defined even when dynamic linking is not available for the
6589 host system. Some of their functionality can be done without
6590 dynamic linking; when it's really needed, they throw errors.
6592 Thu Jan 16 16:39:29 1997 Marius Vollmer <mvo@zagadka.ping.de>
6594 * configure.in: Only define DYNAMIC_LINKING when one of the system
6595 dependent functions is detected.
6596 * dynl.c (scm_dynamic_func): New function to get the address of a
6597 function in a dynamic object.
6598 (scm_dynamic_call, scm_dynamic_args_call): Accept the values
6599 produced by scm_dynamic_func as the thing to call.
6601 Sun Jan 12 21:09:42 1997 Marius Vollmer <mvo@zagadka.ping.de>
6603 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c: Restructured.
6604 (scm_register_module_xxx, scm_registered_modules,
6605 scm_clear_registered_modules): New functions.
6607 Sat Jan 11 21:37:15 1997 Marius Vollmer <mvo@zagadka.ping.de>
6609 * symbols.c (scm_sysintern): Renamed to
6610 scm_sysintern_no_module_lookup.
6611 (scm_sysintern): New function to take the place of the old
6612 scm_sysintern. It uses the current toplevel lookup closure to give
6613 the symbol its value. This is a temporary hack to put packages
6614 like gtcltk into their own module.
6615 (scm_can_use_top_level_lookup_closure_var): New variable to tell
6616 us whether `scm_top_level_lookup_closure_var' has been initialized
6618 * eval.c (scm_init_eval): Set it.
6620 Sat Jan 18 00:03:31 1997 Gary Houston <ghouston@actrix.gen.nz>
6622 * fports.c (scm_open_file): pass errno to scm_syserror_msg.
6623 * filesys.h: update prototypes. Remove macros: SCM_FD_P, SCM_FD_FLAGS,
6625 * filesys.c (scm_sys_stat, scm_sys_lstat): pass errno to
6627 (scm_sys_read_fd, scm_sys_write_fd, scm_sys_close, scm_sys_lseek,
6628 scm_sys_dup): deleted: FD capability will be added to other
6630 Remove support for the FD object type: scm_tc16_fd, scm_fd_print,
6631 scm_fd_free, fd_smob, scm_intern_fd.
6632 (scm_open): renamed from scm_sys_open. Return a port instead of
6633 an FD object. Make the mode argument optional.
6634 (scm_sys_create): deleted, it's just a special case of open.
6635 (scm_init_filesys): move interning of constants O_CREAT etc.,
6636 here (were previously using SCM_CONST_LONG macro).
6637 Add missing constants: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT.
6639 (numerous _sys_ procedures): remove gratuitous _sys_ from names.
6640 include "fports.h" and <stdio.h>
6641 (scm_stat, scm_select): don't support FD objects.
6643 * error.h: adjust scm_syserror_msg prototype.
6644 * error.c (scm_syserror_msg): take an extra argument for errno.
6645 Using the global value didn't always work, since it could be
6646 reset by procedure calls in the message or args arguments.
6648 * fports.c (scm_setbuf0): call setbuf even if FIONREAD is not defined.
6649 I don't understand why the check was there (and what about the
6652 * strop.c (scm_string_copy): allow shared substrings to be copied.
6654 * unif.h: corresponding change to prototypes.
6655 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write_x):
6656 recognize two new optional arguments: offset and length. Allow
6657 the port argument to be an integer (file descriptor, for scsh).
6658 Include <unistd.h> for "read" prototype.
6660 Tue Jan 14 02:42:02 1997 Gary Houston <ghouston@actrix.gen.nz>
6662 * socket.c: don't include filesys.h.
6664 Mon Jan 13 03:47:04 1997 Gary Houston <ghouston@actrix.gen.nz>
6666 * Makefile.am: add AWK=@AWK@ (?)
6668 * Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
6670 Add a rule to generate errnos.c from errnos.
6671 * error.c (scm_init_error): include errnos.c.
6672 * errnos_cnvt.awk: new file, converts the list of errno codes to
6674 * errnos_get.c: new file.
6675 * errnos.default: new file, contains errnos to try if they can't
6676 be extracted from errno.h.
6677 * configure.in: if using GCC, try and extract errno codes from
6681 Sat Jan 11 14:47:00 1997 Marius Vollmer <mvo@zagadka.ping.de>
6683 * configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
6684 * Makefile.am: Made libguile into a libtool library.
6685 * PLUGIN/guile.config: Removed "-L ../libguile" from xtra_cflags.
6686 Set libtool_libs to indicate that libguile is a libtool library.
6687 See guile/ChangeLog for details.
6688 * .cvsignore: ignore "*.lo", the libtool library objects.
6690 Wed Jan 8 06:54:54 1997 Gary Houston <ghouston@actrix.gen.nz>
6692 * net_db.c (scm_getserv): add missing SCM_ALLOW_INTS.
6693 use htons in getservbyport argument.
6695 Tue Jan 7 18:11:24 1997 Jim Blandy <jimb@floss.cyclic.com>
6697 * ports.h (SCM_PTOBNUM): Removed extraneous semicolon.
6698 * smob.h: (SCM_PTOBNUM): Removed entirely; this definition is a
6701 * objprop.c (scm_object_property): No need to take the CDR of the
6702 value returned by scm_object_properties, since Aug 20 change.
6704 * configure.in: When checking for struct linger, #include
6705 <sys/types.h> as well as <sys/socket.h>. I've never known
6706 <sys/types.h> to cause any portability problems, and Solaris's
6707 <sys/socket.h> needs it.
6708 * configure: Rebuilt.
6710 I think the Sun compiler has chosen a perverse way to interpret
6711 ANSI declarations combined with K&R definitions. We'll
6712 appease it a little bit. But when it invades France, we fight.
6713 * print.c (scm_iprlist): Change 'tlr' argument to an int.
6714 * print.h (scm_iprlist): Here too.
6715 * numbers.c (scm_divbigdig): Change definition to match
6716 declaration in numbers.h.
6717 * unif.c (scm_makflo): Change definition to match declaration in
6720 * init.c (scm_boot_guile): Don't return the value of
6721 scm_boot_guile_1. This function doesn't return a value;
6722 scm_boot_guile_1 doesn't return a value (or return at all).
6724 * eval.c (unmemocopy): Add a semicolon to appease the Sun
6727 * simpos.c (SYSTNAME): Add case for AIX; otherwise it won't
6728 compile. I have a feeling this function is a bad idea anyway ---
6729 one should always test for features, not systems.
6731 * smob.h (SCM_SMOBNUM, SCM_PTOBNUM): Remove extraneous
6732 semicolons. Only pure luck kept this from being noticed earlier.
6734 Tue Jan 7 15:04:06 1997 Mikael Djurfeldt <mdj@kenneth>
6736 * socket.c (scm_recvfrom): Added missing semicolon.
6738 Mon Jan 6 20:39:08 1997 Gary Houston <ghouston@actrix.gen.nz>
6740 * socket.c (scm_recvfrom): allow buff_or_size to be a list containing
6741 the buffer and start and end positions for scsh networking
6744 Sun Jan 5 13:53:53 1997 Jim Blandy <jimb@floss.cyclic.com>
6746 * configure.in: Revert previous change to this file; the problem
6747 is due to transient automake weirdness.
6748 * configure: Rebuilt.
6750 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in, not
6751 PLUGIN/guile.libs. configure generates the latter from the former.
6752 * Makefile.in: Rebuilt.
6754 * configure.in: Call AM_PROG_INSTALL; the automake manual says we
6755 need this if we install scripts, like guile-snarf.
6756 * configure: Rebuilt.
6758 Thu Jan 2 01:56:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
6760 * Makefile.am (EXTRA_DIST): Added DYNAMIC-LINKING
6762 Sat Dec 28 19:14:01 1996 Gary Houston <ghouston@actrix.gen.nz>
6764 * socket.c (scm_addr_vector): fix faulty scm_listify.
6766 Sat Dec 28 13:55:58 1996 Marius Vollmer <mvo@zagadka.ping.de>
6768 * read.c (scm_lreadr): Encountering EOF after skipping a SCSH
6769 style block comment is no longer considered an error.
6771 Fri Dec 27 13:44:23 1996 Marius Vollmer <mvo@zagadka.ping.de>
6773 * PLUGIN/guile.libs.in: New file.
6774 * PLUGIN/guile.libs: Removed from repository.
6775 * configure.in: Create PLUGIN/guile.libs from
6776 PLUGIN/guile.libs.in. This is for including additonal libraries
6777 needed for dynamic linking.
6778 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in
6779 instead of PLUGIN/guile.libs.
6781 * Makefile.am: Added explicit dependency "dynl.o: dynl.x".
6783 Sun Dec 22 23:06:14 1996 Jim Blandy <jimb@floss.cyclic.com>
6785 * list.c (scm_delq_x, scm_delv_x, scm_delete_x): Delete all
6786 occurrences of the given element from the list, not just the
6787 first. This is how the Emacs Lisp functions behave, how the
6788 analogous Common Lisp functions behave, and (I believe) how the
6789 older Maclisp functions worked. I realize that this change may
6790 break code, but it seemed better to break it before the Guile
6793 * gc.c (scm_protect_object, scm_unprotect_object): New functions.
6794 Their prototypes were already present in gc.h, but they weren't
6796 (scm_init_storage): Initialize scm_protects.
6797 * root.c (scm_protects): New element of scm_sys_protects.
6799 * net_db.h (scm_init_net_db): Fix spelling from scm_init_netdb.
6801 Sat Dec 21 15:38:32 1996 Jim Blandy <jimb@floss.cyclic.com>
6803 * libguile.h: Added #include "libguile/net_db.h".
6805 * libguile.h: Don't #include "libguile/libpath.h", contrary to Oct
6806 30 change. That file is only meant for communication between the
6807 configuration process and load.c. If code linked against libguile
6808 wants to get at the paths mentioned in libpath.h, it can call
6809 functions declared in load.h.
6811 Sat Dec 21 14:50:42 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6813 * libguile.h: Removed #include "libguile/fdsocket.h"
6815 * net_db.c: Added #include <sys/socket.h>.
6817 Sat Dec 21 00:33:03 1996 Gary Houston <ghouston@actrix.gen.nz>
6819 * filesys.c (scm_input_waiting_p): use select in preference to
6820 FIONREAD, since the latter doesn't detect EOF.
6821 Throw error if neither select nor FIONREAD available.
6823 * socket.c (scm_connect): take a port, not a fd object.
6824 (scm_fill_sockaddr): throw an error if fam is not recognised.
6825 (scm_bind): use scm_fill_sockaddr.
6826 (scm_listen): take a port, not a fd object.
6827 (scm_accept): take and return a port. return #f in the car if
6828 address can't be got
6829 (scm_sock_fd_to_port): new procedure.
6830 (scm_socket): use scm_sock_fd_to_port.
6831 (scm_addr_vector): throw error if unrecognised address type.
6832 take an extra argument with the calling procedure name.
6833 (scm_getsockname): take a port. return #f if address can't be got.
6834 (scm_getpeername): take a port. return #f if address can't be got.
6835 (scm_recvfrom): take a port. return #f for address component if can't
6837 (scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
6838 scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
6840 Fri Dec 20 23:06:53 1996 Jim Blandy <jimb@floss.cyclic.com>
6842 * throw.c (scm_internal_catch): Make body funcs and handler funcs
6843 use separate data pointers, to allow them to be designed
6844 independently and reused.
6845 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message):
6846 Renamed from catch_body, catch_handler, and uncaught_throw; made
6848 (struct scm_catch_body_data): Renamed from catch_body_data; moved
6850 (scm_catch): Use the above.
6851 (scm_throw): Don't bother printing a message for an uncaught
6852 throw; we establish a default handler in init.
6853 * throw.h (scm_internal_catch): Prototype updated.
6854 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message): New
6856 (struct scm_body_thunk_data): New structure, used as data
6857 argument to scm_body_thunk.
6858 * init.c (struct main_func_closure): New structure, packaging up
6859 the data to pass to the user's main function.
6860 (scm_boot_guile): Create one. Pass it to scm_boot_guile_1.
6861 (scm_boot_guile_1): Pass it through to invoke_main_func. Use
6862 scm_internal_catch to establish a catch-all handler, using
6863 scm_handle_by_message. This replaces the special-case code in
6865 (invoke_main_func): Body function for scm_internal_catch; invoke
6866 the user's main function, using the main_func_closure pointer to
6867 decide what to pass it.
6868 * root.c (struct cwdr_body_data): Remove handler_proc member.
6869 (cwdr): Use scm_handle_by_proc instead of cwdr_handler.
6870 (cwdr_handler): Removed.
6872 Thu Dec 19 00:00:26 1996 Gary Houston <ghouston@actrix.gen.nz>
6874 * socket.h (SCM_P): update bind prototype.
6875 * socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
6876 include "feature.h".
6877 (scm_socket): return a port, not a file descriptor object.
6878 include "fports.h" and <unistd.h>
6879 (scm_bind): take a port, not a file descriptor object.
6880 take an extra argument for address args.
6882 * net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
6883 INADDR_NONE, INADDR_LOOPBACK.
6885 Tue Dec 17 22:58:26 1996 Gary Houston <ghouston@actrix.gen.nz>
6887 * init.c: include net_db.h and not fdsocket.h.
6888 (scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.
6890 * Makefile.am: corresponding changes.
6891 * socket.h: renamed from fdsocket.h, fix names.
6892 * net_db.h: renamed from socket.h, fix names.
6893 * socket.c: renamed from fdsocket.c.
6894 remove _sys from procedure names.
6895 (scm_init_socket): rename from scm_init_fdsocket. include socket.x.
6896 add "socket" to features list.
6897 * net_db.c: renamed from socket.c.
6898 remove _sys from procedure names.
6899 (scm_init_net_db): rename from scm_init_socket. include net_db.x.
6900 add "net-db" to features list.
6901 include "net_db.h". don't include <sys/socket.h> or
6904 Thu Dec 19 14:03:24 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6906 * tags.h (scm_tags): Removed comma at end of last enumerator.
6908 Thu Dec 19 02:54:59 1996 Jim Blandy <jimb@floss.cyclic.com>
6910 Don't use GCC extensions to allocate space for debugging frames.
6911 (Here he goes again! Why do we put up with this?!)
6912 * debug.h (scm_debug_frame): Make the 'vect' member a pointer to
6913 an scm_debug_info structure, not an in-line array of them. Add
6914 'info' member, to say how many vect elements we've used, for eval
6916 * eval.c (SCM_CEVAL): Use alloca to allocate space for vect. Use
6917 a new variable debug_info_end to mark the end of vect, instead of
6918 the address of the 'info' pointer itself.
6919 [DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of
6920 &debug to scm_debug_frame *; debug is a real scm_debug_frame now.
6921 (SCM_APPLY): Explicitly allocate space for debug.vect.
6922 * debug.c (scm_m_start_stack): Same, for vframe.vect.
6923 * stacks.c: Adjusted for new debug frame structure.
6924 (RELOC_INFO, RELOC_FRAME): New macros.
6925 (stack_depth, read_frames): Use them, and new scm_debug_frame
6926 element 'info', instead of magically knowing that eval frames have
6927 an info pointer sitting after vect.
6928 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Use
6930 (scm_init_stacks): Formatting tweaks.
6932 Wed Dec 18 14:57:57 1996 Jim Blandy <jimb@floss.cyclic.com>
6934 Give GCC more control flow information, so it can be sure that
6935 variables aren't used uninitialized.
6936 * error.h (scm_error, scm_syserror, scm_syserror_msg,
6937 scm_sysmissing, scm_num_overflow, scm_out_of_range,
6938 scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
6939 scm_misc_error): Tell GCC that these functions never return.
6940 * struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
6941 out the field type, call abort if SCM_ASSERT returns, to placate
6943 * stacks.c (scm_make_stack, scm_last_stack_frame): abort if
6944 scm_wta ever returns. We can't handle this case anyway, and this
6945 gives the optimizer more information.
6946 * unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
6947 scm_wta ever returns.
6949 In some cases, the code is fine, but GCC isn't smart enough to
6950 figure that out; this usually happens when one variable is only
6951 initialized and used when a particular condition holds true, and
6952 we know that condition will never change within a given invocation
6953 of the function. In this case, we simply initialize the variables
6954 to placate the compiler, hopefully to a value which will cause a
6955 crash if it is ever actually used.
6956 * print.c (scm_iprin1): Initialize mw_pos.
6957 * read.c (scm_lreadrecparen): Initialize tl2, ans2.
6958 * throw.c (scm_ithrow): Initialize dynpair.
6959 * unif.c (scm_uniform_vector_ref): Initialize cra.
6960 * struct.c (init_struct): Initialize prot.
6961 * mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
6963 * strports.c (scm_eval_0str): Don't return uninitialized garbage
6964 if EXPR contains no expressions.
6966 Wed Dec 18 11:43:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
6968 * eval.c, debug.h: Revert changes of Dec 16 and Nov 21. They
6969 cause an infinite loop (???). So much for the algebraic
6970 equivalency of variable-sized arrays and alloca...
6972 Tue Dec 17 20:29:03 1996 Marius Vollmer <mvo@zagadka.ping.de>
6974 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
6975 a SCM boolean, not a C boolean.
6977 Sat Dec 14 23:21:45 1996 Marius Vollmer <mvo@zagadka.ping.de>
6979 * gc.c (SCM_MTRIGGER_HYSTERESIS): New memory management parameter.
6980 (scm_must_malloc, scm_must_realloc): Added a hysteresis to the
6981 rules for raising scm_mtrigger. Previously, unfortunate but not
6982 unlikely circumstances could result in almost constant invokation
6983 of the gc. Now, this situations should be less likely, but they
6984 are not prevented completely.
6986 Tue Dec 17 16:19:07 1996 Jim Blandy <jimb@totoro.cyclic.com>
6988 * numbers.c (scm_fuck): Procedure removed; looks like old test
6990 * numbers.h: Prototype removed.
6992 Mon Dec 16 18:20:32 1996 Jim Blandy <jimb@totoro.cyclic.com>
6994 * debug.h (scm_debug_frame): Change `vect' member from an in-line
6995 array to a pointer, to match my Nov 21 change in eval.c.
6997 Fri Dec 13 16:12:14 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6999 * libguile.h: Added #include "libguile/backtrace.h", #include
7000 "libguile/stacks.h".
7002 * strings.c (scm_string scm_make_string scm_string_ref
7003 scm_string_set_x scm_string_equal_p scm_string_append):
7004 Bugfix according to scm patch from Aubrey Jaffer:
7005 Corrected long-standing
7006 (not (eqv? (integer->char 128)
7007 (string-ref (make-string 1 (integer->char 128)) 0)))
7008 bug found by John Kozak <jk@noontide.demon.co.uk>.
7010 * strports.c, strports.h: Make scm_eval_0str return the value of
7011 the last expression evaluated (previously, it returned void).
7013 * strports.c, strports.h: New function: scm_read_0str. Does what
7016 Tue Dec 10 23:38:43 1996 Gary Houston <ghouston@actrix.gen.nz>
7018 * simpos.c (scm_getenv): return #f if string can't be found in the
7019 environment instead of throwing an exception, for compatibility
7020 with numerous other systems.
7022 Mon Dec 9 23:23:35 1996 Tom Tromey <tromey@cygnus.com>
7024 * Makefile.am (.c.x): Use guile-snarf.
7025 * configure.in (AC_OUTPUT): Generate guile-snarf; make it
7027 * guile-snarf.in: New file, resurrected from old guile-snarf.sh.
7029 Mon Dec 9 18:36:50 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
7031 * backtrace.c (scm_display_error_message): Made non-static, and
7032 renamed from display_error_message.
7033 * backtrace.h (scm_display_error_message): Added extern decl.
7034 * throw.c (uncaught_throw): Use it to display the error message.
7036 Mon Dec 9 10:10:38 1996 Tom Tromey <tromey@cygnus.com>
7038 * inet_aton.c: Use #if 0, not #ifdef 0.
7040 Mon Dec 9 06:36:48 1996 Gary Houston <ghouston@actrix.gen.nz>
7042 * ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
7043 to convert the returned value.
7044 (scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert
7045 the offset argument.
7047 Sun Dec 8 21:06:38 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
7049 Add new interface to catch/throw, usable from C as well as
7051 * throw.h (scm_catch_body_t, scm_catch_handler_t): New types.
7052 (scm_internal_catch): New function, replaces...
7053 (scm_catch_apply): Deleted.
7054 * throw.c (scm_catch_apply): Deleted; replaced with a more general
7055 mechanism which is a bit more code, but can be used nicely from C
7056 and implement the Scheme semantics as well.
7057 (scm_internal_catch): This is the replacement; it's named after
7058 the analogous function in Emacs.
7059 (scm_catch): Reimplemented in terms of the above.
7060 (struct catch_body_data, catch_body, catch_handler): New
7061 functions, used by scm_catch.
7062 * root.c (cwdr): Reimplemented in terms of scm_internal_catch.
7063 (struct cwdr_body_data, cwdr_body, cwdr_handler): New functions;
7064 support for new cwdr.
7066 * Makefile.am (libpath.h): Re-incorporate Mikael's changes of Wed
7069 Sun Dec 8 17:55:34 1996 Marius Vollmer <mvo@zagadka.ping.de>
7071 * acconfig.h: Added DYNAMIC_LINKING symbol.
7072 * configure.in: Add option and checks for dynamic linking.
7073 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c,
7074 dynl.h: New files for dynamic linking support.
7075 * Makefile.am (libguile_a_SOURCES):
7077 (modinclude_HEADERS): Added "dynl.h".
7078 (EXTRA_DIST): Added "dynl-dl.c", "dynl-dld.c", "dynl-shl.c" and
7080 * init.c (scm_boot_guile_1): Call
7081 scm_init_dynamic_linking to initialize dynamic linking support.
7083 Thu Dec 5 22:47:53 1996 Marius Vollmer <mvo@zagadka.ping.de>
7085 * init.c (scm_boot_guile_1): Moved `live' variable to the toplevel
7086 (as we Schemers say). It needs to be global, so that I can tweak
7087 it for the proper operation of unexec.
7088 (scm_boot_guile_1_live): New variable, see above.
7090 Sun Dec 1 00:00:49 1996 Tom Tromey <tromey@cygnus.com>
7092 * guile-snarf.sh: Removed.
7093 * PLUGIN/guile.libs: Added dependency for -lm.
7094 * acinclude.m4: Renamed from aclocal.m4.
7095 * PLUGIN/greet: Removed.
7096 * Makefile.am, aclocal.m4: New files.
7097 * configure.in: Updated for Automake.
7099 Thu Nov 28 00:23:55 1996 Marius Vollmer <mvo@zagadka.ping.de>
7101 * eval.c (scm_definedp): Use top_level_lookup_closure_var
7102 and not top_level_lookup_thunk_var.
7104 Wed Nov 27 22:04:19 1996 Jim Blandy <jimb@baalperazim.frob.com>
7106 * Makefile.in (ancillary): List ChangeLog-scm, not ChangeLog.scm.
7108 Wed Nov 27 14:14:56 1996 Marius Vollmer <mvo@zagadka.ping.de>
7110 * eval.c (scm_definedp): Incompatibly changed to be a builtin
7111 Scheme function, instead of syntax. Single argument is now a
7114 Thu Nov 21 20:26:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
7116 * ramap.c (scm_ra_sum, scm_ra_difference, scm_ra_product,
7117 scm_ra_divide): Properly terminate statements passed as arguments
7118 to IVDEP macros. (Thanks to Bernard Urban.)
7120 * eval.c (SCM_CEVAL): Use alloca, not GCC's extensions for arrays
7121 with non-constant sizes. (Thanks to Bernard Urban.)
7123 Thu Nov 21 11:17:42 1996 Jim Blandy <jimb@floss.cyclic.com>
7125 It's an "eval closure", not an "eval thunk." A thunk is a
7126 function of no arguments.
7127 * root.h (struct scm_root_state): Renamed
7128 top_level_lookup_closure_var from top_level_lookup_thunk_var.
7129 (scm_top_level_lookup_closure_var): Renamed from
7130 scm_top_level_lookup_thunk_var.
7131 * root.c (mark_root): Uses changed.
7132 * gdbint.c (gdb_eval, gdb_binding): Uses changed.
7133 * init.c (scm_start_stack): Uses changed.
7134 * eval.c (scm_eval, scm_eval_x, scm_init_eval): Rename uses.
7135 Change scheme-visible name to *top-level-lookup-closure* from
7136 *top-level-lookup-thunk*.
7138 Tue Nov 19 22:43:31 1996 Jim Blandy <jimb@totoro.cyclic.com>
7140 * gc.c (scm_igc, scm_gc_mark): Round up the size of the stack we
7141 pass to scm_mark_locations. (Thanks to Aubrey Jaffer.)
7143 Sun Nov 10 13:35:05 1996 Jim Blandy <jimb@floss.cyclic.com>
7145 * gc.c (struct scm_heap_seg_data): Doc fixes.
7147 * gc.c (scm_gc_sweep): Empty all segments' freelists before
7148 sweeping. Then, prepend each segment's free cells to its
7149 freelist, rather than wiping out the old value. (Thanks to Marius
7152 * gc.c (which_seg, scm_map_free_list, scm_newcell_count,
7153 scm_check_freelist, scm_debug_newcell): New functions and
7154 variables, for debugging freelist problems.
7155 * pairs.h (SCM_NEWCELL): New debugging version added.
7156 * gc.h (scm_debug_newcell): Added extern declaration, used by
7157 debugging version of SCM_NEWCELL.
7159 Sat Nov 9 19:02:46 1996 Jim Blandy <jimb@floss.cyclic.com>
7161 On some systems <libc.h> conflicts with <unistd.h>, and should not
7162 be #included at all.
7163 * aclocal.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): New autoconf macro.
7164 * acconfig.h (LIBC_H_WITH_UNISTD_H): New CPP symbol.
7165 * configure.in: Call it.
7166 * posix.c, filesys.c: Use its results to decide whether or not to
7168 * configure, scmconfig.h.in: Rebuilt with autoconf and
7171 Wed Nov 6 16:19:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
7173 * fports.c (scm_stdio_to_port, scm_open_file): Set the port's
7174 pointer to the stdio stream before calling scm_setbuf0, so the
7175 latter will be able to retrieve it. I'm surprised this didn't
7176 segfault earlier. (Thanks to Christopher Lee.)
7178 Wed Nov 6 16:01:20 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7180 * throw.c (scm_lazy_catch, scm_ithrow): Completed implementation
7183 Sat Nov 2 21:01:48 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7185 * stacks.c, stacks.h (scm_make_stack): Now takes arbitrary
7186 number of stack narrowing specifier pairs. The first specifier in
7187 a pair controls inner border, the second the outer border. A
7188 number means cut that number of frames, a procedure object means
7189 cut until that object is found in operator position in a frame.
7191 * root.c (cwdr): Bugfix.
7193 * read.c: Recording of positions disabled by default.
7195 * procs.c (scm_closure_p): New function.
7197 * posix.c (scm_tmpnam): New function.
7199 * load.c: Added #include "throw.h".
7200 (scm_sys_search_load_path): Bugfix: Don't add an extra '/' if path
7203 * load.c, load.h (scm_read_and_eval_x): New function.
7205 * eval.c: Renamed debug option "deval" to "debug".
7207 (scm_eval_x): `eval!' is no longer accessible from the scheme
7208 level. Motivation: We can't allow operations which introduce
7209 glocs into the scheme level. Guile's type system can't handle
7210 these as data. Use `eval' or `read-and-eval!' as replacement.
7212 * debug.c (scm_m_start_stack): Bugfix: Use SCM_ECONSP instead of
7213 SCM_CONSP since this is a macro!; Set vframe.prev to
7214 scm_last_debug_frame instead of 0. In this way we can look
7215 "above" the virtual start stack frame if we wish.
7216 (scm_debug_hang): New function: Useful for debugging Guile in
7217 certain tricky situations. Will probably be removed later...
7219 * debug.h: Changed semantics of debug option "backtrace". This
7220 option now only indicates whether we want automatic backtrace at
7223 Wed Oct 30 00:31:55 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7225 * ports.c: #include "filesys.h"
7226 (scm_char_ready_p): input_waiting renamed and moved to filesys.c.
7228 * filesys.c, filesys.h (scm_input_waiting_p): Moved from ports.c.
7229 Motivation: This is system specific code which is related to file
7230 I/O. It also may use select. Added code by Gary Houston to
7231 detect presence of character in stdio buffers.
7233 * libguile.h: #include "libguile/libpath.h"
7235 * Makefile.in (libpath.h): Renamed definition of: LIBRARY_PATH -->
7236 SCM_LIBRARY_DIR; Added definitions of: SCM_PKGDATA_DIR,
7237 SCM_SITE_DIR; Install libpath.h among the other include files.
7239 * load.c, load.h (scm_sys_package_data_dir): New function.
7241 Mon Oct 28 11:43:41 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7243 * stacks.h: Bugfix: Don't use tail-array length field as stack
7244 length field! This screwed GC.
7246 Tue Oct 22 01:01:00 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7248 * _scm.h: Added #ifndef around definition of macros min and max.
7250 * __scm.h: Added hooks for threads to plugin to in ints protection
7251 macros: SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER,
7252 SCM_THREAD_ALLOW_1, SCM_THREAD_ALLOW_2. Motivation: We don't want
7253 the main code in these macros duplicated and spread over multiple
7254 files. Renamed SCM_THREADS_SWITCHING_CODE ->
7255 SCM_THREAD_SWITCHING_CODE.
7257 Tue Oct 29 14:55:40 1996 Marius Vollmer <mvo@zagadka.ping.de>
7259 * snarf.h: New file.
7260 * guile-snarf.sh: New file.
7261 * Makefile.in (inner_h_files): Added snarf.h
7262 (ancillary, install, uninstall, distclean): Added actions for
7264 (.c.x): Use guile-snarf.
7265 (guile-snarf): New rule, to produce guile-snarf from guile-snarf.sh.
7266 (gen_c_files): Note that these depend on guile-snarf.
7267 * _scm.h: Removed the snarfing macros (SCM_PROC, etc). They are
7268 now in "snarf.h". Added #include "snarf.h" to get them.
7269 * libguile.h: Added #include "snarf.h".
7270 (Patches applied and tweaked by Jim Blandy.)
7272 Tue Oct 29 13:21:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
7274 * socket.c: Use K&R style declaration for 'close'; the GNU coding
7275 standards suggest against providing prototypes for system
7276 functions. Thanks to Greg Troxel.
7278 Mon Oct 28 16:48:32 1996 Jim Blandy <jimb@floss.cyclic.com>
7280 * strports.c (scm_eval_0str): New function.
7281 #include "read.h", to get prototype for scm_read.
7282 * Makefile.in (strports.o): Update dependencies.
7283 * strports.h: New prototype.
7285 * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
7286 scheme name from "int?" to "integer?". It seems to do the job.
7287 * numbers.h: Rename prototype too.
7288 * scmhob.h (intp): Change definition to refer to scm_integer_p. I
7291 * numbers.c (scm_less_p, scm_gr_p, scm_leq_p, scm_geq_p,
7292 scm_num_eq_p): Rename these according to R4RS conventions: call
7293 them <, <=, =, >, and >=, not <?, <=?, =?, >?, and >=?. En route
7294 to making libguile R4RS compliant without ice-9...
7296 * load.c (scm_sys_search_load_path): Search for files under all
7297 extensions listed in the %load-extensions variable. If FILENAME
7298 is absolute, return it unchanged, without searching the load path.
7299 (scm_loc_load_extensions): New variable, pointing to
7300 %load-extensions' value cell.
7301 (scm_init_load): Initialize it, and the value it points to.
7302 (scm_primitive_load_path): Improve error reporting.
7304 * load.c (scm_loc_load_hook): New variable, pointing to value cell
7305 of new Scheme variable %load-hook.
7306 (scm_primitive_load): Apply %load-hook to filename.
7308 Mon Oct 28 06:28:28 1996 Gary Houston <ghouston@actrix.gen.nz>
7310 * configure.in: add tests for figuring out whether buffered data
7311 is available in a FILE structure, which is needed by char-ready.
7313 * acconfig.h: define FILE_CNT_FIELD, FILE_CNT_GPTR and
7316 * simpos.c (scm_getenv): renamed from scm_sys_getenv. Throw
7317 exceptions using misc_error instead of syserror. It seems a bit
7318 odd to throw an exception if a string can't be found in the
7319 environment, but it's consistent with open-file, stat etc.
7320 (simpos.h): remove sys_ from getenv.
7322 * posix.c (scm_putenv): renamed from scm_sys_putenv. If an error
7323 occurs, throw an error instead of returning errno. Return value
7325 (numerous in posix.c and posix.h): removed superfluous sys_ from names.
7327 Sun Oct 27 01:22:04 1996 Gary Houston <ghouston@actrix.gen.nz>
7329 * filesys.c (scm_stat2scm): derive file type and permissions from
7330 the stat mode and append them to the returned vector.
7331 There isn't much overhead in doing this and it avoids the need to
7332 work with S_IRUSR et al. in Scheme.
7333 Define symbols scm_sym_regular etc.
7334 (scm_init_filesys): don't intern S_IRUSR etc.
7336 * load.c: change s_try_load and s_try_load_path to s_primitive_load
7337 and s_primitive_load_path.
7339 * eval.c, load.c, error.c (scm_wta): use scm_misc_error.
7341 * error.h: don't declare error symbols. prototype for scm_misc_error.
7343 * stackchk.c (scm_stack_overflow_key): defined here instead of in
7346 * error.c: use SCM_SYMBOL to set up error keys.
7347 scm_misc_error: new procedure.
7349 Fri Oct 25 01:56:30 1996 Jim Blandy <jimb@floss.cyclic.com>
7351 * read.c (scm_lreadr): Recognize SCSH-style block comments; text
7352 between `#!' and `!#' is ignored.
7353 (skip_scsh_block_comment): New function.
7355 * feature.c (scm_set_program_arguments): New argument, FIRST.
7356 * feature.h: Update prototype.
7357 * init.c (scm_boot_guile_1): Pass new argument to
7358 scm_set_program_arguments.
7360 Tue Oct 22 20:54:42 1996 Jim Blandy <jimb@floss.cyclic.com>
7362 * init.c (scm_start_stack): Don't initialize scm_progargs here.
7363 (scm_boot_guile): Call scm_set_program_arguments here, later than
7364 the old initialization.
7366 * init.c: (scm_boot_guile, scm_boot_guile_1): New, simplified
7367 initialization procedure.
7368 - Delete in, out, err arguments; there are other perfectly good
7369 ways to override these when desired.
7370 - Delete result argument; this function shouldn't ever return.
7371 - Rename init_func argument to main_func, for less confusion.
7372 - Delete boot_cmd argument; main_func is more general.
7373 -Add 'closure' argument, to help people pass data to main_func
7374 without resorting to global variables.
7375 - Abort if reentered; don't bother returning an error code.
7376 - Call scm_init_standard_ports to set up the default/current
7377 standard ports; no need to pass them to scm_start_stack.
7378 - Remove code to evaluate the boot_cmd, and start the repl; let
7379 the user do something like that in main_func if they want.
7380 - Remove code to package up a return value; main_func can do any
7382 - Call exit (0), instead of returning.
7383 (scm_start_stack): Don't initialize the I/O ports here; that's
7384 weird. Delete in, out, err arguments. Move guts to
7385 scm_init_standard_ports, scm_stdio_to_port.
7386 (scm_init_standard_ports): New function, to set up current and
7387 default standard ports.
7388 (scm_start_stack, scm_restart_stack): Make these static.
7389 * init.h (scm_boot_guile): Adjust declaration.
7390 (scm_start_stack, scm_restart_stack): Remove externally
7391 visible declarations for these.
7392 (enum scm_boot_status): Removed; now scm_boot_guile never returns.
7394 * fports.c (scm_stdio_to_port): New function. Its guts used to be
7395 written out several times in scm_start_stack.
7396 * fports.h: New declaration for the above.
7398 * feature.c (scm_set_program_arguments): New function.
7399 * feature.h: New declaration for the above.
7401 * ports.c: Formatting tweak.
7403 Sun Oct 20 03:29:32 1996 Mikael Djurfeldt <mdj@kenneth>
7405 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
7406 ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
7407 for obtaining the address of a car or cdr field. Motivation:
7408 &SCM_CXR make assumptions about the internal structure of the
7411 * eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
7412 Motivation: see SCM_CXRLOC.
7414 * pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
7415 srcprop.h, tags.h, throw.c, unif.c: Added new selectors
7416 SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
7417 Motivation: Safer use. Some other macros are defined in terms of
7418 these operations. If these are defined using the SCM_SETCXR
7419 (<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
7420 to inefficiency and an <e1> with side-effects could potentially
7421 break. Also, these particular operations are heavily utilized in
7422 the garbage collector. In unoptimized code there will be a
7425 * alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
7426 eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
7427 ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
7428 pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
7429 procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
7430 strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
7431 vports.c: Cleaned up use of pairs: Don't make any special
7432 assumptions about the internal structure of selectors and
7433 mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
7434 SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
7435 (Among other things, this change makes it easier to build Guile
7436 with certain compilers which have problems with casted lvalues.)
7438 Fri Oct 18 01:11:56 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7440 * stacks.c: Improve selection of relevant stack frames when making
7441 a stack object. Introduce one level of indirection in the stack
7442 object to make it possible to "narrow" to a certain region of the
7443 stack. This facilitates making use of more clever algorithms (not
7444 implemented) for selecting relevant frames and gives a cleaner
7445 design since selection of frames can be done independently of
7446 extraction of frames from the real stack.
7447 (scm_stack_id): Also take #t as argument which means look at
7450 * stacks.h: In struct scm_stack: Turn field frames into a pointer.
7451 Turn n_tail into an integer directly representing current number
7452 of frames in stack. Add field tail.
7454 * ports.c (scm_port_line_x, scm_port_column_x): New mutators.
7456 * debug.c (scm_make_memoized): Made it available at scheme level.
7457 (scm_unmemoize, scm_memoized_environment): Bugfix: Check for
7458 SCM_NIMP before applying heavier predicates in argument checking.
7459 (scm_local_eval): Also take memoized object as argument.
7461 * backtrace.c (scm_display_error): Just a safety measure: Stacks
7462 aren't created with zero length, but should such a strange
7463 creature suddenly turn up...
7465 Wed Oct 16 11:08:41 1996 Marius Vollmer <mvo@zagadka.ping.de>
7467 * hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
7468 `del', for the sake of C++ compilers. (Patch applied by JimB.)
7470 Tue Oct 15 17:06:13 1996 Jim Blandy <jimb@floss.cyclic.com>
7472 * variable.c (scm_make_variable): Make the name hint optional, as
7474 (anonymous_variable_sym): Renamed from variable_sym. All uses
7477 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
7478 from scm_sys_try_load and scm_sys_try_load_path. The Scheme name
7479 of scm_primitive_load_path was also changed to
7480 "primitive-load-path", from "%try-load-path". Callers changed.
7481 We'd like to respect the convention that a function named
7482 "try-mumble" should behave just like the function called "mumble",
7483 but return #f instead of signalling some error.
7484 * load.h: Rename prototypes.
7486 Tue Oct 15 05:34:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7488 * print.c (make_print_state, grow_print_state), print.h: Modified
7489 the print state representation: Don't use a tail array for
7490 recording of circular references. Resizing of the print state
7491 structure invalidates the print state pointer. To avoid passing
7492 around an indirect print state reference to all printing
7493 functions, we instead let the print state reference a resizable
7496 Mon Oct 14 19:25:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
7498 * alist.c (scm_sloppy_assq, scm_sloppy_assv, scm_sloppy_assoc):
7499 Don't crash when passed an improper list terminated by a
7500 non-immediate value.
7502 Mon Oct 14 19:08:33 1996 Jim Blandy <jimb@floss.cyclic.com>
7504 Allocate data for structures on an eight-byte boundary, as
7505 required by the tagging system.
7506 * struct.c (alloc_struct): New function.
7507 (scm_make_struct, scm_make_vtable_vtable): Call it.
7508 * struct.h (scm_struct_n_extra_words): Bump to 3.
7509 (scm_struct_i_ptr): New "field".
7510 * gc.c (scm_gc_sweep): When we need to free the data, use the
7511 information stored by alloc_struct to find the beginning of the
7512 block allocated to the structure, so we can free it.
7514 Mon Oct 14 17:07:55 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7516 * init.c (scm_boot_guile_1): Moved scm_init_struct in front of
7519 * debug.h (SCM_VOIDFRAME, SCM_VOIDFRAMEP): New macros.
7520 (scm_debug_info): New member: id.
7522 * stacks.c: Stacks are now represented as structs; Stacks have an
7523 id given to them by `start-stack'.
7524 (scm_last_stack_frame): Added predicates `stack?' and `frame?'.
7526 * stacks.h: Added declarations of scm_stack_p and scm_frame_p;
7527 Changed stack representation.
7529 * debug.c (scm_procedure_name): Try procedure property `name' for
7530 compiled closures aswell.
7532 * gc.c (scm_init_storage): Initialize scm_stand_in_procs to SCM_EOL.
7534 * eval.c: scm_i_name moved to gsubr.c
7535 (scm_m_define): Record names of all kinds of procedure
7536 objects. (Earlier, only closures were recorded.)
7538 * procprop.h: Added declaration of scm_i_name.
7540 * gsubr.c: Added global scm_i_name. Added #include "procprop.h".
7541 (scm_make_gsubr): Record names of compiled closures.
7543 Mon Oct 14 04:21:51 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7545 * debug.c, debug.h: Removed obsolete code.
7547 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
7548 stacks.c: Renamed regs --> scm_contregs.
7550 * print.c (scm_free_print_state): Cleanup print state before
7551 returning it to pool. It is better to do it here than in
7552 scm_prin1 since scm_prin1 is called often.
7554 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7555 s_set_source_property_x): Check that first argument is a pair or a
7558 * srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
7559 scm_i_line, scm_i_column and scm_i_breakpoint global.
7561 * init.c: Added #include "backtrace.h" and #include "stacks.h".
7562 (scm_boot_guile_1): Added calls to scm_init_backtrace and
7565 * debug.h: Added debug object smob declaration and macro
7568 * configure.in: Build with backtrace.o and stacks.o if debug
7571 * Makefile.in: Added entries for new files: backtrace.c,
7572 backtrace.h, stacks.c and stacks.h.
7574 * symbols.c (scm_sym2ovcell): Fixed documentation.
7576 * _scm.h (min, max): Added.
7578 * async.c: Moved `min' macro to _scm.h.
7580 * debug.h: New debug options SCM_BACKTRACE_MAXDEPTH and
7581 SCM_BACKTRACE_INDENT.
7583 * eval.c: Added new debug options `maxdepth' and `indent'.
7585 * print.c (make_print_state): Bugfix: Initialize pstate->ceiling.
7587 * print.h: Added selector SCM_PRINT_STATE.
7589 * print.c: New functions: scm_make_print_state,
7590 scm_free_print_state.
7592 * print.h: Added declarations for scm_make_print_state,
7593 scm_free_print_state.
7595 * debug.c (scm_m_start_stack): New acro.
7597 * debug.h: Small cleanup.
7599 * init.c (scm_boot_guile_1): Moved scm_init_debug below
7602 Sun Oct 13 20:14:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
7604 * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
7605 arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
7606 chars.c, chars.h, continuations.c, continuations.h, debug.c,
7607 debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
7608 eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
7609 filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
7610 gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
7611 hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
7612 kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
7613 markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
7614 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
7615 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
7616 procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
7617 root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
7618 simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
7619 stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
7620 strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
7621 struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
7622 unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
7623 version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
7624 declare functions with prototypes. (Patch thanks to Marius
7627 More prototype-related changes from Marius Vollmer:
7628 * gdb_interface.h: Wrapped header file in #ifdef/#endif
7629 * gscm.h (gscm_run_scm): Added prototype for `initfn' paramter.
7630 * ports.h (ptobfuns): Added prototypes. This means some casting in
7632 * fports.c: Added casts for initializations, since the functions
7633 are defined to take FILE * as their stream argument, not SCM.
7634 * fdsocket.c, fdsocket.h: Made `init_addr_buffer' static.
7635 * genio.c (scm_gen_puts): Changed `unsigned char *str_data' parameter
7636 to `char *str_data' to conform to prototype.
7638 Sat Oct 12 21:49:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7640 * error.c, eval.c, load.c, stackchk.c: use scm_error not lgh_error.
7642 * __scm.h (lgh_error): removed, lgh shouldn't be in libguile.
7644 * stime.c, stime.h: use SCM_P method.
7646 Sat Oct 12 16:16:25 1996 Jim Blandy <jimb@floss.cyclic.com>
7648 * eval.c (scm_nconc2last): Don't accept an empty list; apply must
7649 be given at least two arguments. Insist that lst's last element
7650 be a list, but don't make any requirements of its predecessors.
7652 Fri Oct 11 03:58:25 1996 Jim Blandy <jimb@floss.cyclic.com>
7654 * eval.c (scm_nconc2last): Revert last change; there seems to be
7655 other stuff going on here.
7657 Fri Oct 11 02:43:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
7659 * eval.c (scm_nconc2last): Make sure that each element of lst
7660 (which is a list of argument lists, except for the tail) is a
7661 proper list, i.e., finite and terminated by '().
7663 Thu Oct 10 21:09:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
7665 * unif.c (scm_ra_set_contp): Localize `inc' declaration.
7668 * struct.c (scm_make_struct, scm_make_vtable_vtable): Use the
7669 symbolic name for the tag, scm_tc3_cons_gloc, instead of just
7672 * vectors.c (scm_make_vector): Fill vectors with the undefined
7673 value, to help make Guile Scheme code more portable to other
7676 * symbols.c (scm_intern_obarray_soft, scm_sysintern): Doc fixes.
7677 * symbols.h, tags.h: Doc fixes.
7679 Wed Oct 9 19:39:29 1996 Jim Blandy <jimb@floss.cyclic.com>
7681 * async.c (scm_take_signal): Doc fixes.
7683 Mon Oct 7 22:30:34 1996 Jim Blandy <jimb@totoro.cyclic.com>
7685 * numbers.c (scm_divbigint): When the remainder is zero, we don't
7686 want to subtract it from the modulus; we just want to leave it
7689 Mon Oct 7 00:14:17 1996 Mikael Djurfeldt <mdj@kenneth>
7691 * init.c (scm_boot_guile_1): Bugfix: i --> base in argument to
7694 * throw.h (scm_catch_apply): Removed the `lazyp' argument.
7696 * throw.c (scm_catch_apply): Finished implementation of
7699 Sun Oct 6 05:26:05 1996 Gary Houston <ghouston@actrix.gen.nz>
7701 * filesys.c (scm_sys_select): move SCM_ALLOW_INTS past the sreturn
7703 (scm_init_filesys): set "i/o-extensions" feature.
7706 Sat Oct 5 12:22:00 1996 Jim Blandy <jimb@floss.cyclic.com>
7708 * Makefile.in (root.o): Correct dependencies.
7710 Sat Oct 5 18:40:42 1996 Mikael Djurfeldt <mdj@kenneth>
7712 * Makefile.in: Added dependency entry for root.o.
7714 * continuations.c, debug.[ch], eval.c, gscm.c init.c, root.c,
7715 throw.c: Renamed last_debug_info_frame -> scm_last_debug_frame.
7717 * init.c (scm_start_stack): Set initial root continuation number
7720 * procs.c: New function: scm_thunk_p.
7722 * procs.h: Added declarations of scm_thunk_p.
7724 * root.c: Renamed `call-with-new-root' -->
7725 `call-with-dynamic-root'.
7726 (cwdr): Removed allocation of new root state. This should be done
7727 separately by use of scm_make_root.
7728 (scm_apply_with_dynamic_root): New function: Does what it
7729 sounds like. Needed when spawning threads.
7731 * root.h: Added member last_debug_frame to root state.
7732 Added #include "libguile/debug.h"
7734 * throw.c: Renamed scm_catch --> scm_catch_apply and added more
7735 arguments. The motivation is that code in root.c needs catch
7736 functionality, and we want to avoid code duplication.
7737 New functions: scm_catch, scm_lazy_catch. These are wrappers for
7738 scm_catch_apply. scm_lazy_catch is intended to introduce catch
7739 handlers that run without popping the stack into the dynwind
7742 * throw.h: Added prototypes for scm_catch_apply and
7745 Thu Oct 3 11:12:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7747 * root.h (scm_root, scm_set_root): Decouple thread support details
7748 by introducing the selector SCM_THREAD_LOCAL_DATA and the mutator
7749 SCM_SET_THREAD_LOCAL_DATA.
7751 * print.c (scm_iprlist): Bugfix: Added SCM_ECONSP tests in hare
7752 and tortoise scanning loop.
7754 Thu Oct 3 00:04:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
7756 * Makefile.in: Rebuild dependencies.
7758 * libguile.h: #include "libguile/print.h" before "smob.h", since
7759 the latter uses the print_state structure.
7761 * throw.c (scm_ithrow): Use the correct variable when checking to
7762 see if a given element of scm_dynwinds is a valid catch.
7764 * throw.c (scm_ithrow): If scm_dynwinds has invalid list
7765 structure, abort; don't just silently ignore the garbage.
7767 * _scm.h: #include "print.h" here, since it seems to be used just
7769 * eval.c, gdbint.c, genio.h, numbers.h, smob.h, srcprop.c,
7770 strports.c, unif.h: Don't #include "print.h".
7772 Tue Oct 1 05:15:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7774 * feature.h (scm_loc_features): Removed external declaration.
7775 (Bug fix suggested by Petr Adamek <adamek@mit.edu>.)
7777 Tue Oct 1 00:00:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7779 * feature.c (scm_init_feature): Added threads feature (needs to be
7780 initialized here, since features doesn't exist when
7781 scm_init_threads is called).
7783 * libguile.h: Added #include "libguile/../threads/threads.h".
7784 (This is a kludge to get thread support working. This should be
7787 * configure.in, acconfig.h: Added flags for thread support.
7789 * scmsigs.c: Define `signal' to be `pthread_signal' if using
7792 * gc.c (scm_igc): Added SCM_THREAD_CRITICAL_SECTION_START and
7793 SCM_THREAD_CRITICAL_SECTION_END. Moved marking of root data to
7796 * _scm.h: Added conditional #include "threads.h"
7798 * __scm.h (SCM_ASYNC_TICK): Added call to macro
7799 SCM_THREADS_SWITCHING_CODE.
7801 * init.c (scm_start_stack): Call `scm_make_root' to dynamically
7802 allocate the basic dynamic root object.
7803 (scm_boot_guile): Added call to scm_init_root.
7805 * root.c, root.h: Added root smob.
7806 (cwdr, scm_call_with_new_root, scm_dynamic_root, scm_app_wdr): New
7807 functions: Implements dynamic roots mostly according to spec in
7808 SCM manual. Main difference is that the second argument is a
7809 throw handler rather than an error "thunk".
7811 * root.h: Added declaration of scm_init_root.
7813 * root.c: Added #include "genio.h", #include "smob.h", #include
7814 "pairs.h", #include "throw.h", #include "dynwind.h", #include
7816 (scm_init_root): Added #include "root.x".
7818 * throw.c: Added #include "stackchk.h"
7819 (scm_catch): Changed SCM_DEFER_INTS --> SCM_REDEFER_INTS and
7820 SCM_ALLOW_INTS --> SCM_REALLOW_INTS. This is so that scm_catch
7821 can be used in scm_call_with_new_root; Added reenabling of stack
7822 checking when catching a throw.
7824 Mon Sep 30 21:48:11 1996 Jim Blandy <jimb@totoro.cyclic.com>
7826 * list.c, list.h: Use SCM_P instead of CPP hair. Doc fixes.
7828 * list.c (scm_member, scm_memv, scm_memq): Return #f if a matching
7829 element is not found, as per R4RS.
7831 Sat Sep 28 18:13:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
7833 * list.c: Doc fixes throughout.
7835 Sat Sep 28 02:07:43 1996 Gary Houston <ghouston@actrix.gen.nz>
7837 * strings.c, strings.h: (scm_makfrom0str, scm_makefrom0str_opt:
7838 declare the char * to be const. Avoids a warning in rgx.c.
7840 * ports.h: spelling fix.
7842 * filesys.c (scm_sys_stat, scm_sys,lstat): include file name in
7845 * load.c (scm_sys_try_load_path): throw an error if file not found
7846 (like it says it in NEWS).
7848 Fri Sep 27 18:27:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
7850 * symbols.c (scm_intern_obarray_soft): Initialize the new symbol's
7851 PROPS slot to '(), not #f; it's an empty alist.
7853 * throw.h, throw.c: Use SCM_P instead of #if hair.
7855 Remove special support for uncaught throws; see throw.c for
7857 * throw.c (uncaught_throw): New function.
7858 (scm_ithrow): Call uncaught_throw if we don't find a throw
7859 target; don't mess with scm_bad_throw_vcell.
7860 (scm_bad_throw_vcell): Variable deleted.
7861 (scm_init_throw): Don't initialize it.
7863 * throw.c (scm_ithrow): Don't let outer key matches shadow inner
7866 Wed Sep 25 04:35:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
7868 * numbers.c (scm_istr2int): If the number is short (as most
7869 numbers are), just call scm_small_istr2int to deal with it.
7870 (scm_small_istr2int): New function, created by un-#ifdefing the
7871 non-bignum version of scm_istr2int and renaming it.
7873 Tue Sep 24 06:48:38 1996 Gary Houston <ghouston@actrix.gen.nz>
7875 * load.c (scm_sys_try_load): don't check whether value returned
7876 by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
7877 Change the Scheme name from %try-load to primitive-load.
7879 * error.c (scm_error): convert a NULL message to SCM_BOOL_F.
7880 Can avoid passing a message, allowing it to be derived in the
7881 error handler (e.g., if we want to throw to the key both from
7884 Mon Sep 23 00:42:15 1996 Mikael Djurfeldt <mdj@kenneth>
7886 * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
7887 references now have a new appearance which is more compact and
7888 also gives a clue about what the target of the reference is.
7889 By setting parameters in the print state, more fancy printing can
7890 be achieved. This is used by the (not yet commited) backtrace
7893 Sun Sep 22 17:10:06 1996 Mikael Djurfeldt <mdj@kenneth>
7895 * eval.c, numbers.h, unif.h, smob.h, srcprop.c: Added #include
7898 * print.c: Added #include "struct.h". Removed function
7901 * print.h: Modified prototypes for scm_iprlist, scm_prin1 and
7902 scm_iprin1. Removed prototype for scm_prlist.
7904 * arbiters.c (prinarb),
7905 async.c (print_async),
7906 debug.c (prindebugobj, prinmemoized),
7907 eval.c (prinprom, prinmacro),
7908 filesys.c (scm_fd_print, scm_dir_print),
7910 mallocs.c (prinmalloc),
7911 numbers.c, numbers.h (scm_floprint, scm_bigprint),
7912 smob.h (scm_smobfuns),
7913 srcprop.c (prinsrcprops),
7915 unif.c, unif.h (scm_raprin1, rapr1),
7916 variable.c (prin_var): Changed argument `int writing' to
7917 `scm_print_state *pstate'.
7919 * init.c (scm_boot_guile): Moved scm_init_struct upwards so
7920 that it will be called before scm_init_print.
7922 * print.c (scm_prin1): Print states are now allocated when calling
7923 scm_prin1 and then passed around to all printing functions as an
7924 argument. A cache `print_state_pool' enables reuse of print
7926 (scm_make_print_state): New function.
7927 (scm_iprin1): Adaption to print states.
7928 (scm_iprlist): An initial "hare and tortoise" scan brings down
7929 time complexity to O (depth * N). (Better time complexity will be
7930 achieved when the printing code is completely rewritten.)
7932 Fri Sep 20 22:01:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
7934 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): Use AC_CACHE_CHECK instead of
7935 AC_CACHE_VAL; #define UTIMBUF_NEEDS_POSIX outside AC_CACHE_VAL, so
7936 it gets done whether or not the cache variable has a value.
7938 Thu Sep 19 17:06:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
7940 Distinguish #f and ().
7941 * __scm.h: #undef SICP.
7942 * pairs.h (SCM_EOL): Delete this definition, equating it with
7944 * tags.h (SCM_EOL): Give it a new definition here; I think I found
7945 the value it used to have. Doc fixes, too.
7947 Thu Sep 19 15:33:51 1996 Mikael Djurfeldt <mdj@kenneth>
7949 * struct.c (scm_make_struct_layout, init_struct, scm_struct_ref,
7950 scm_struct_set_x), struct.h, gc.c (scm_gc_mark): Completed Tom
7951 Lord's implementation of structs, allowing for tail arrays as
7952 described in the manual. Also fixed some bugs. (Both the interface
7953 and the implementation should be improved.)
7955 * read.c (scm_init_read): Removed #ifdef READER_EXTENSIONS
7957 * print.c, print.h: Closures now print like #<procedure foo (x)>.
7958 People who whish to see the source can do `(print-enable 'source)'.
7959 Removed #ifdef DEBUG_EXTENSIONS.
7961 Thu Sep 19 00:00:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7963 * filesys.c (scsm_sys_stat): don't SIGSEGV if argument is an
7964 integer (assuming for now accepting an integer is a good thing).
7966 * error.c, fports.c: replace use of %S in lgh_error args with %s.
7967 %S will be used instead for write'ing arguments.
7969 * unif.c (scm_transpose_array): change arguments in the SCM_WNA
7970 asserts. fix a few other asserts.
7971 (scm_aind, scm_enclose_array, scm_array_in_bounds_p,
7972 scm_uniform_vector_ref, scm_array_set_x,
7973 scm_dimensions_to_unform_array): change args in
7974 SCM_WNA SCM_ASSERTS and change scm_wta's to scm_wrong_num_args.
7975 strop.c (scm_substring_move_left_x, scm_substring_move_right_x,
7976 scm_substring_fill_x): likewise.
7977 gsubr.c (scm_gsubr_apply): likewise.
7978 eval.c (SCM_APPLY): likewise.
7980 * eval.c (4 places): replace scm_everr with lgh_error or
7983 * error.c, error.h (scm_wrong_num_args, scm_wrong_type_arg,
7984 scm_memory_error): new procedures.
7985 scm_everr: deleted. can use scm_wta, dropping first two args.
7986 scm_error: convert NULL subr to SCM_BOOL_F.
7988 * __scm.h: don't define SCM_STACK_OVFLOW, SCM_EXIT, SCM_ARG6, SCM_ARG7,
7991 * stackchk.c (scm_report_stack_overflow): use lgh_error instead
7994 * error.c, error.h: new error keys: scm_arg_type_key,
7995 scm_args_number_key, scm_memory_alloc_key, scm_stack_overflow_key,
7997 scm_wta: reimplement using lgh_error instead of scm_everr.
7999 Wed Sep 18 17:13:35 1996 Mikael Djurfeldt <mdj@kenneth>
8001 * gdbint.c: scm_lread now has one more argument.
8003 * ports.c, ports.h: Name change: scm_\(line\|column\)_number -->
8004 scm_port_\1; Added mutator scm_set_port_filename_x (used when
8005 loading source from non-file ports, which, e. g., happens when
8006 using the Emacs interface).
8008 * fports.c (scm_open_file): Don't call scm_makfrom0str on a scheme
8011 * read.c: Added code for recording of positions of source code
8012 expressions; New functions: recsexpr, scm_lreadrecparen;
8013 _scm_make_srcprops --> scm_make_srcprops
8014 (scm_flush_ws): Removed updating of positions counters. This work
8015 is already done by scm_gen_getc
8017 * read.h: Added prototype for scm_lreadrecparen
8019 * print.c: Added #include "alist.h"
8021 * eval.c: Added #include "hash.h"
8023 * eq.c: Added #include "ramap.h"
8025 * options.c: Documentation fixes.
8027 * srcprop.c (scm_finish_srcprop): Bugfix: update ptr.
8028 (scm_init_srcprop): Adjusted size of initial source-whash. Name
8029 changes: tc16_srcprops --> scm_tc16_srcprops, _scm_make_srcprops
8030 --> scm_make_srcprops
8032 * srcprop.h: Name changes: tc16_srcprops --> scm_tc16_srcprops,
8033 _scm_make_srcprops --> scm_make_srcprops; Remove one layer of
8034 function calls in the definition of the whash access macros.
8036 Tue Sep 17 11:33:16 1996 Lee Iverson <leei@Canada.AI.SRI.COM>
8038 * init.c (scm_boot_guile): Add level of indirection to
8039 scm_boot_guile_1() to ensure that stack base pointer is properly
8040 initialized. There was no guarantee that variable i was the
8041 highest/lowest variable on stack (i.e. the call frame of
8042 scm_boot_guile was not completely protected from gc).
8044 Tue Sep 17 01:40:56 1996 Gary Houston <ghouston@actrix.gen.nz>
8046 * ports.h (scm_port_table): put back file_name, it will be used to
8047 support debugging. Undo related changes in fports.c, ioext.c,
8050 Sun Sep 15 03:58:29 1996 Gary Houston <ghouston@actrix.gen.nz>
8052 * ports.h (scm_port_table): remove file_name member for now, it seems
8054 * fports.c (scm_open_file): don't set file_name in PTAB.
8055 (prinfport): don't use file_name in PTAB.
8056 * ioext.c (scm_sys_duplicate_port): don't set file_name in PTAB.
8057 * ports.c (scm_add_to_port_table): don't intialize file_name.
8058 (scm_port_file_name): remove for now.
8059 * gc.c (scm_gc_mark): don't mark PTAB file_name.
8061 * fports.h (scm_mkfile): prototype deleted.
8062 * fports.c (scm_mkfile): merged into scm_open_file to simplify.
8064 * debug.c, unif.c: use scm_out_of_range instead of
8065 wta for range errors (ASSERT still needs work).
8067 * error.c, error.h (scm_out_of_range): new procedure.
8069 * error.c, error.h (scm_out_of_range_key): new key.
8071 * posix.c (scm_sync): #else was missing.
8073 * error.c, error.h: append _key to names scm_num_overflow and
8076 * __scm.h (SCM_SYSMISSING, SCM_NUM_OVERFLOW): use SCM_BOOL_F instead
8077 of consing an empty list.
8078 (SCM_SYSERROR etc.): move into error.c, make them procedures instead
8079 of macros, saves code and string space.
8080 error.c, fports.c, numbers.c, posix.c, ioext.c, filesys.c, socket.c,
8081 fdsocket.c, simpos.c: change names of SCM_SYSERROR etc., to
8082 lower case. Rename scm_syserror_m to scm_syserror_msg.
8083 error.h: prototypes for new procedures.
8085 Sat Sep 14 03:35:41 1996 Gary Houston <ghouston@actrix.gen.nz>
8087 * numbers.c: use SCM_NUM_OVERFLOW instead of scm_wta or ASSERT.
8089 * error.c, error.h: setup scm_num_overflow key.
8091 * __scm.h: SCM_NUM_OVERFLOW: macro for reporting numerical overflow.
8092 Remove definition of SCM_OVSCM_FLOW.
8094 * fports.c (scm_open_file): use SCM_SYSERROR_M.
8096 * __scm.h: SCM_SYSERROR_M: new macro for system errors with an
8097 explicit message and args.
8099 * error.c, error.h, __scm.h: change system_error_sym to
8102 * error.c (system_error_sym): remove leading %% from the Scheme name
8105 * __scm.h (SCM_SYSMISSING): Redefine using lgh_error.
8107 Fri Sep 13 12:58:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8109 * __scm.h, chars.c, debug.c, eval.c, eval.h, extchrs.c, extchrs.h,
8110 fdsocket.c, feature.c, mbstrings.c, mbstrings.h, numbers.c,
8111 numbers.h, print.c, scmhob.h, simpos.h, symbols.c, symbols.h,
8112 tags.h, throw.c, variable.h: Name cleanup. Lots of xxxSCM_yyy
8113 renamed. (These were introduced by unsupervised name
8116 Fri Sep 13 01:19:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8118 * print.c: Added code for detection of circular references during
8119 printing. (init_ref_stack, grow_ref_stack): New functions. Added
8120 a hook for printing of closures (accessible via print options).
8121 This leads to a split of calls to scm_iprin1 into two classes:
8122 elementary print operations (e. g. the code which prints a smob)
8123 still use scm_iprin1 while top level calls (like scm_display) use
8124 scm_prin1. scm_prin1 begins by clearing the data structure used
8125 to record reference information.
8127 * print.h: Added declarations of scm_prin1 and scm_prlist.
8129 * strports.c (scm_strprint_obj): scm_iprin1 --> scm_prin1
8131 * gscm.c (gscm_portprint_obj): scm_iprin1 --> scm_prin1
8133 * gscm.h (gscm_print_obj): scm_iprin1 --> scm_prin1
8135 * error.c (err_head): scm_iprin1 --> scm_prin1
8137 * debug.c: Adjusted header comment.
8141 Wed Sep 11 17:55:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
8143 * strerror.c: Doc fix.
8145 Thu Sep 12 00:00:32 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8147 * gdbint.c (gdb_read): Now possible to run during GC.
8148 (unmark_port, remark_port): New functions.
8150 * symbols.h (SCM_SETLENGTH): Use SCM_SETCAR.
8152 * read.c (scm_grow_tok_buf): Use scm_vector_set_length_x instead
8153 of allocating a new string object. Also, increase size by
8154 the factor 2 instead of 1.5.
8156 Wed Sep 11 15:10:38 1996 Petr Adamek <jimb@floss.cyclic.com>
8158 * __scm.h (SCM_P): Corrected to run under traditional C.
8160 * _scm.h (SCM_PROC): Extraneous semicolon (outside functions)
8163 * async.c: Calls to scm_sysintern corrected.
8165 * async.h (scm_async_clock): Redundant declaration removed.
8167 * continuations.c (scm_dynthrow): Redundant declaration removed.
8169 * debug.c (scm_single_step, scm_memoized, scm_lookup_soft):
8170 Definition typos corrected.
8172 * debug.h: Missing declarations of functions in debug.c added
8175 * eval.h (scm_eval_args, scm_deval_args, scm_m_undefine):
8176 Missing declarations to functions in eval.c added.
8178 * filesys.c: Possibly uninitialized variable rv.
8180 * gc.h (scm_object_addr, scm_unhash_name): Missing
8181 declarations of functions defined in gc.c added.
8183 * genio.c: Possible typos str_data -> wstr_data. ???
8185 * genio.c: Possibly unintended shadowing of local variable
8186 `int c' (gotos out of scope of inner `c'). ???
8188 * init.c: Uninitialized `SCM last' may be used.
8190 * ioext.h: (scm_sys_isatty_p): Typo.
8192 * list.h (scm_list_head): Missing prototype for function in
8195 * numbers.c (scm_two_doubles): Changed from extern to static
8196 (is used only within numbers.c).
8198 * numbers.h: Repeated declarations removed.
8200 * ports.h (scm_close_all_ports_except): Declaration for the
8201 function defined in ports.c added.
8203 * posix.h: Missing declarations added.
8205 * procs.h (scm_make_subr_opt): Missing declaration added.
8207 * socket.h (scm_sys_gethost): Missing declaration added.
8209 * socket.h: Redundant declarations removed (they are in fdsocket.h).
8211 * srcprop.h (scm_set_source_property_x, scm_finish_srcprop):
8212 Missing declarations added.
8214 * stime.h (scm_get_internal_real_time): Repeated declarations removed.
8216 * struct.c: Uninitialized variable `SCM answer' may be used.
8218 * unif.c (l2ra): Declaration prototype.
8220 * unif.c (scm_array_equal_p): Dummy definition removed (it is
8221 defined in ramap.c).
8223 * unif.h (scm_raprin1, scm_istr2bve, scm_array_equal_p):
8224 Redundant declarations removed (they are in ramap.h).
8226 * variable.h (scm_make_udvariable,
8227 scm_make_undefined_variable): Declaration corrected to
8228 correspond variable.c.
8230 * vectors.h (scm_vector_move_left_x, scm_vector_move_right_x):
8231 Missing declarations added.
8233 Wed Sep 11 14:38:50 1996 Jim Blandy <jimb@floss.cyclic.com>
8235 * Makefile.in (distclean): Don't forget to delete fd.h.
8237 Tue Sep 10 14:01:46 1996 Jim Blandy <jimb@floss.cyclic.com>
8239 * fd.h.in, tags.h: Trivial cleanups.
8241 * marksweep.c, marksweep.h: Deleted; marksweep.c was empty, and
8242 marksweep.h just declared functions from gc.c.
8243 * gc.h, libguile.h: Don't #include "marksweep.h".
8244 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
8245 marksweep.o, marksweep.h, marksweep.c, and marksweep.x. Other
8246 dependencies updated.
8248 * libguile.h: Don't #include "files.h"; it's been deleted.
8250 * files.c (scm_sys_delete_file): Moved to filesys.c.
8251 File is now empty; deleted.
8253 * filesys.c: scm_sys_delete_file is now here. Remove
8254 #if's; they seem to rely on remnants of an old portability
8255 regimen. If the problems come up again, solve them properly,
8256 using autoconf. Specifically: Don't test M_SYSV, and #define
8257 remove to be unlink if it's #defined; don't use remove just
8258 because HAVE_STDC_HEADERS is #defined.
8259 * filesys.h: Add declarations for scm_sys_delete_file.
8260 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
8261 files.o, files.h, files.c, and files.x.
8262 * init.c: Don't #include "files.h", and don't call scm_init_files.
8264 Use SCM_P instead of PROTO; the latter intrudes on the user's
8266 * params.h: Deleted; definition of SCM_P moved to...
8267 * __scm.h: ... here, where it replaces PROTO macro.
8268 * libguile.h, smob.h: Don't #include "params.h".
8269 * continuations.c, error.h, feature.h, gc.c, gc.h, init.h, load.h,
8270 smob.h: Fix prototypes accordingly.
8271 * Makefile.in: Update dependencies.
8272 (inner_h_files): Remove params.h.
8274 * gc.c: #include "gc.h"; every module should include its header,
8275 to let the compiler cross-check the declarations against the
8278 * eq.h, files.h, hashtab.h, load.h, mallocs.h, scmsigs.h,
8279 simpos.h: #include "libguile/__scm.h".
8281 Mon Sep 9 20:00:15 1996 Jim Blandy <jimb@floss.cyclic.com>
8283 * init.c: Don't forget to #include smob.h and init.h.
8284 * Makefile.in: Dependencies updated.
8286 * smob.h: Use PROTO instead of #if __STDC__.
8288 * continuations.c (scm_dynthrow): Use PROTO, not SCM_P.
8290 * __scm.h: Doc fixes.
8292 * __scm.h, libguile.h: Use "quotes" in the #includes, not
8293 <angles>; this allows `make depends' to work properly.
8295 * libguile.h: #include smob.h and pairs.h before the others; they
8296 define typedefs used by other headers.
8298 C files should #include only the header files they need, not
8299 libguile.h (which #includes all the header files); the pointless
8300 recompilation was wasting my time.
8301 * Makefile.in (all .o dependency lists): Regenerated.
8302 * libguile.h: Don't try to get a definition for size_t here...
8303 * __scm.h: Do it here.
8304 * _scm.h: Since this is the internal libguile header, put things
8305 here that all (or a majority) of the libguile files will want.
8306 Don't #include <libguile.h> here; that generates dependencies on
8307 way too much. Instead, get "__scm.h", "error.h", "pairs.h",
8308 "list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h",
8309 "boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and
8311 * alist.c: Get "eq.h", "list.h", "alist.h".
8312 * append.c: Get "append.h", "list.h".
8313 * arbiters.c: Get "arbiters.h", "smob.h".
8314 * async.c: Get "async.h", "smob.h", "throw.h", "eval.h".
8315 * boolean.c: Get "boolean.h".
8316 * chars.c: Get "chars.h".
8317 * continuations.c: Get "continuations.h", "dynwind.h", "debug.h",
8319 * debug.c: Get "debug.h", "feature.h", "read.h", "strports.h",
8320 "continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h",
8321 "genio.h", "throw.h", "eval.h".
8322 * dynwind.c: Get "dynwind.h", "alist.h", "eval.h".
8323 * eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h",
8325 * error.c: Get "error.h", "throw.h", "genio.h", "pairs.h".
8326 * eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h",
8327 "hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h",
8328 "continuations.h", "eq.h", "sequences.h", "alist.h", "append.h",
8330 * fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h".
8331 * feature.c: Get "feature.h".
8332 * files.c: Get "files.h".
8333 * filesys.c: Get "filesys.h", "smob.h", "genio.h".
8334 * fports.c: Get "fports.h", "markers.h".
8335 * gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h",
8336 "genio.h", "struct.h", "stackchk.h", "stime.h".
8337 * gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h",
8338 "read.h", "strports.h", "tag.h".
8339 * genio.c: Get "genio.h", "chars.h".
8340 * gsubr.c: Get "gsubr.h", "genio.h".
8341 * hash.c: Get "hash.h", "chars.h".
8342 * hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h".
8343 * init.c: Get everyone who has an scm_init_mumble function:
8344 "weaks.h", "vports.h", "version.h", "vectors.h", "variable.h",
8345 "unif.h", "throw.h", "tag.h", "symbols.h", "struct.h",
8346 "strports.h", "strorder.h", "strop.h", "strings.h", "stime.h",
8347 "stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h",
8348 "scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h",
8349 "print.h", "posix.h", "ports.h", "pairs.h", "options.h",
8350 "objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h",
8351 "list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h",
8352 "gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h",
8353 "feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h",
8354 "dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h",
8355 "async.h", "arbiters.h", "append.h", "alist.h".
8356 * ioext.c: Get "ioext.h", "fports.h".
8357 * kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h".
8358 * list.c: Get "list.h", "eq.h".
8359 * load.c: Get "load.h", "eval.h", "read.h", "fports.h".
8360 * mallocs.c: Get "smob.h", "genio.h".
8361 * markers.c: Get "markers.h".
8362 * mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h",
8364 * numbers.c: Get "unif.h", "genio.h".
8365 * objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h".
8366 * options.c: Get "options.h".
8367 * ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h",
8368 "markers.h", "chars.h", "genio.h".
8369 * posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h",
8370 "read.h", "scmsigs.h", "genio.h", "fports.h".
8371 * print.c: Get "print.h", "unif.h", "weaks.h", "read.h",
8372 "procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h",
8374 * procprop.c: Get "procprop.h", "eval.h", "alist.h".
8375 * procs.c: Get "procs.h".
8376 * ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h",
8377 "chars.h", "smob.h", "unif.h".
8378 * read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h",
8379 "eval.h", "genio.h", "chars.h".
8380 * root.c: Get "root.h", "stackchk.h".
8381 * scmsigs.c: Get "scmsigs.h".
8382 * sequences.c: Get "sequences.h".
8383 * simpos.c: Get "simpos.h", "scmsigs.h".
8384 * smob.c: Get "smob.h".
8385 * socket.c: Get "socket.h", "feature.h".
8386 * srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h",
8387 "alist.h", "smob.h".
8388 * stackchk.c: Get "stackchk.h", "genio.h".
8389 * stime.c: Get "stime.h"."libguile/continuations.h".
8390 * strings.c: Get "strings.h", "chars.h".
8391 * strop.c: Get "strop.h", "chars.h".
8392 * strorder.c: Get "strorder.h", "chars.h".
8393 * strports.c: Get "strports.h", "print.h", "eval.h", "unif.h".
8394 * struct.c: Get "struct.h", "chars.h".
8395 * symbols.c: Get "symbols.h", "mbstrings.h", "alist.h",
8396 "variable.h", "eval.h", "chars.h".
8397 * tag.c: Get "tag.h", "struct.h", "chars.h".
8398 * throw.c: Get "throw.h", "continuations.h", "debug.h",
8399 "dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h".
8400 * unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h",
8401 "smob.h", "genio.h", "eval.h", "chars.h".
8402 * variable.c: Get "variable.h", "smob.h", "genio.h".
8403 * vectors.c: Get "vectors.h", "eq.h".
8404 * version.c: Get "version.h".
8405 * vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h".
8406 * weaks.c: Get "weaks.h".
8408 * stackchk.h: #include "libguile/debug.h",
8410 * print.h, read.h: #include "options.h", since everyone who uses
8411 either of these files will need that.
8413 * smob.h: #include "ports.h", "genio.h", and "print.h", since
8414 anyone who uses this file will need them to define the smob
8415 printing functions. Also, get markers.h, since people will need
8416 to #define the mark functions.
8418 * smob.h (scm_ptobfuns, SCM_PTOBNUM): Definitions moved...
8419 * ports.h: ... to here.
8421 * ports.h (scm_port_table_size): Explicitly give type as 'int';
8422 don't rely on archaic C default type rules.
8424 * fports.h: #include "libguile/ports.h", since you need that in
8425 order to parse this.
8427 * genio.h: #include "libguile/print.h", because you need that to
8428 parse this; don't bother #including "ports.h", since print.h gets
8431 * error.h: Don't #include "pairs.h"; _scm.h will do that now.
8433 * eval.h (scm_top_level_lookup_thunk_var): Remove declaration for
8434 this; it's now a reference to an element of *scm_root.
8436 * debug.h: Don't #include "options.h"; the compiler won't be able
8437 to find that once the headers are installed; instead, #include
8438 "libguile/options.h".
8439 * gc.h: Same, with marksweep.h.
8440 * mbstrings.h: Same, with symbols.h.
8441 * scmhob.h: Same, with _scm.h.
8442 * smob.h: Same, with params.h.
8444 * Makefile.in (depends): Don't nuke scmconfig.h and the generated
8445 C files; there's no need for this, and it forces recompilations
8448 Sat Sep 7 06:57:23 1996 Gary Houston <ghouston@actrix.gen.nz>
8450 * error.c (scm_error): declare scm_error_callback.
8452 * error.h: prototype for scm_error_callback.
8454 * __scm.h: define lgh_error.
8455 (SCM_SYSERROR): redefine using lgh_error.
8457 Thu Sep 5 22:40:06 1996 Gary Houston <ghouston@actrix.gen.nz>
8459 * error.c (scm_error): new procedure.
8461 * error.h: prototype for scm_error.
8463 * Makefile.in (install): install scmconfig.h from the current
8464 directory, not $(srcdir).
8466 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
8468 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
8469 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
8470 feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
8471 hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
8472 mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
8473 posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
8474 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
8475 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8476 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
8477 vports.h, weaks.h: #include "libguile/__scm.h", not
8478 <libguile/__scm.h>. This allows 'gcc -MM' to determine which
8479 dependencies are within libguile properly.
8481 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
8483 * Makefile.in (.c.x): Simplify; there's no need to run this rule
8484 when scmconfig.h doesn't exist.
8486 * load.c (scm_sys_try_load): Correct spelling.
8488 * feature.c (scm_loc_features): Make this static.
8490 * Makefile.in (libpath.h): Omit trailing slash from path. We
8491 shouldn't require it of users, so why put it here?
8493 Move code to initialize and search %load-path from ice-9 to C
8494 code, so we can use the load-path to find the ice-9 boot code;
8495 this makes it easier to run Guile without installing it. See
8496 corresponding changes in guile/Makefile.in.
8497 * feature.c: Move stuff concerned with the load path to load.c.
8498 (scm_compiled_library_path): Deleted.
8499 Don't #include libpath.h here.
8500 * feature.h: Don't mention scm_compiled_library_path.
8501 * load.c: #include "libpath.h" here, as well as <sys/types.h>,
8502 <sys/stat.h>, and <unistd.h> (if present).
8503 (R_OK): #define if the system hasn't deigned to.
8504 (scm_loc_load_path): New variable.
8505 (scm_init_load_path, scm_sys_search_load_path,
8506 scm_sys_try_load_path): New functions.
8507 (scm_init_load): Initialize scm_loc_load_path to point to the
8508 value cell of the Scheme %load-path variable.
8509 * load.h: Add declarations for scm_sys_search_load_path,
8510 scm_sys_try_load_path.
8511 * init.c: Call scm_init_load_path.
8512 * Makefile.in (feature.o, load.o): Dependencies updated.
8514 * load.c, load.h: Rewrite using PROTO macro.
8516 Thu Sep 5 01:54:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8518 * gc.c (scm_cellp): New function: C predicate to determine if an
8519 SCM value can be regarded as a pointer to a cell on the heap.
8521 * gc.h: Added declaration of scm_cellp.
8523 * gdb_interface.h: New file: The GDB interface header from the GDB
8526 * gdbint.c: New file: GDB interface.
8528 * gdbint.h: New file: GDB interface.
8530 * libguile.h: Added #include <libguile/gdbint.h>.
8532 * init.c (scm_boot_guile): Added scm_init_gdbint.
8534 * Makefile.in: Added gdb_interface.h, gdbint.[hc].
8535 Added -I.. to INCLUDE_CFLAGS (otherwise the include files won't be
8536 found if object files and source are kept separate).
8538 Wed Sep 4 14:35:02 1996 Jim Blandy <jimb@floss.cyclic.com>
8540 * feature.h, feature.c: Use PROTO macro, instead of #if __STDC__.
8542 Wed Sep 4 01:30:47 1996 Jim Blandy <jimb@totoro.cyclic.com>
8544 * configure.in: Don't substitute the values of TCL_SRC_DIR and
8545 TK_SRC_DIR; they're not relevant any more.
8547 * Makefile.in (CC): Don't list -Wall here; it's a GCC-specific flag.
8548 * configure.in: Instead, put it in CFLAGS here, iff we're using GCC.
8550 Wed Sep 4 00:55:49 1996 Jim Blandy <jimb@floss.cyclic.com>
8552 * PLUGIN/guile.config (xtra_cflags): Include .. in the header
8553 search path, so we can find the <libguile/MUMBLE.h> headers.
8555 * Makefile.in (ancillary): List aclocal.m4, for 'make dist'.
8557 * Makefile.in (ALL_CFLAGS): Don't mention CFLAGS here; it's
8558 implicit in the .c.o rule.
8559 (.c.x): Don't mention ALL_CFLAGS here; its value is included in
8562 Put the library path in a header file, instead of passing it on
8563 the command line in every compilation.
8564 * Makefile.in (libpath.h): New target.
8565 (feature.o): Depend on libpath.h.
8566 (clean): Delete libpath.h.
8567 (ALL_CFLAGS): Don't use -DLIBRARY_PATH here. Instead ...
8568 * feature.c: ... #include "libpath.h" here.
8569 * .cvsignore: Ignore libpath.h.
8571 Don't install the unwashed masses of Guile header files in the
8572 main #include path; put most of them in a subdirectory called
8573 'libguile'. This avoids naming conflicts between Guile header
8574 files and system header files (of which there were a few).
8575 * Makefile.in (pkgincludedir): Deleted.
8576 (innerincludedir): New variable; this and $(includedir) are enough.
8577 (INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
8578 (installed_h_files): Divide this up. Now this variable lists
8579 those header files which should go into $(includedir) (i.e. appear
8580 directly in the #include path), and ...
8581 (inner_h_files): ... this new variable says which files appear in
8582 a subdirectory, and are referred to as <libguile/mumble.h>.
8583 (h_files): List them both.
8584 (install): Create innerincludedir, not pkgincludedir. Put
8585 the installed_h_files and inner_h_files in their proper places.
8586 (uninstall): Corresponding changes.
8587 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
8588 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
8589 feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
8590 ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
8591 mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
8592 print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
8593 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
8594 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8595 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
8596 vports.h, weaks.h: Find __scm.h in its new location.
8597 * __scm.h: Find scmconfig.h and tags.h in their new locations
8598 (they're both "inner" files).
8600 Tue Sep 3 20:27:35 1996 Jim Blandy <jimb@floss.cyclic.com>
8602 * Makefile.in (.c.x): Remove duplicate use of $(ALL_CFLAGS).
8604 Tue Sep 3 19:53:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
8606 * posix.c: Doc fixes.
8608 Mon Sep 2 15:22:40 1996 Jim Blandy <jimb@totoro.cyclic.com>
8610 * socket.c: Don't include a prototype for inet_aton; just use a
8611 K&R style declaration, to avoid warnings but minimize the chance
8612 of conflicts with the system.
8614 On NextStep, <utime.h> doesn't define struct utime, unless we
8615 #define _POSIX_SOURCE before #including it.
8616 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): New test.
8617 * acconfig.h: New comment text for above CPP symbol.
8618 * configure.in: Call it.
8619 * posix.c: #define _POSIX_SOURCE if it seems necessary.
8621 * configure.in (AC_CHECK_HEADERS): Include sys/utime.h and utime.h
8623 * posix.c: Check HAVE_SYS_UTIME_H and HAVE_UTIME_H, instead of
8624 testing for __EMX__.
8626 * posix.c: #include <libc.h>, if it exists.
8628 * posix.c: Cast the return result to GETGROUPS_T, not gid_t; we
8629 don't even know if the latter exists.
8631 * posix.c (s_sys_setpgid, s_sys_setsid, s_sys_ctermid,
8632 s_sys_tcgetpgrp, s_sys_tcsetpgrp): Renamed from s_setpgid,
8633 s_setsid, s_ctermid, s_tcgetpgrp, s_tcsetpgrp, for consistency.
8635 * posix.c (R_OK, W_OK, X_OK, F_OK): #define these if the system's
8637 (scm_init_posix): Use them when initializing the Scheme constants
8640 Fri Aug 30 16:01:30 1996 Jim Blandy <jimb@floss.cyclic.com>
8642 * Makefile.in (libdir, includedir, bindir): Use the
8643 autoconf-supplied values, instead of deriving them ourselves.
8644 (pkgincludedir, datadir, pkgdatadir): New variables.
8645 (install, uninstall): Put the header files in a special
8646 subdirectory, not in the main search path.
8648 * Makefile.in (ALL_CFLAGS): Provide the proper value for
8649 LIBRARY_PATH --- use $(pkgdatadir) instead of $(libdir).
8651 * Makefile.in (IMPLPATH): Deleted; never used.
8653 * Makefile.in (TCL_SRC_DIR, TK_SRC_DIR): Deleted; we don't depend
8654 on the Tcl/Tk source any more.
8655 (INCLUDE_CFLAGS): Remove references to the above.
8657 * Makefile.in (version.o): Corrected dependencies.
8659 Thu Aug 29 23:06:19 1996 Thomas Morgan <tmorgan@gnu.ai.mit.edu>
8661 * libguile.h: #include "version.h"
8663 * init.c (scm_boot_guile): Call scm_init_version.
8664 * gscm.c (gscm_run_scm): Call scm_init_version.
8666 * configure.in (GUILE_MAJOR_VERSION, GUILE_MINOR_VERSION,
8667 GUILE_VERSION): AC_DEFINE these.
8668 (acconfig.h): #undef the above symbols.
8670 * Makefile.in (libobjs): Add version.o.
8671 (installed_h_files): Add version.h.
8672 (c_files): Add version.c.
8673 (gen_c_files): Add version.x.
8674 (version.o): New rule.
8675 (alist.o, append.o, appinit.o, arbiters.o, async.o, boolean.o,
8676 chars.o, continuations.o, dynwind.o, eq.o, error.o, eval.o,
8677 fdsocket.o, feature.o, files.o, filesys.o, fports.o, gc.o,
8678 genio.o, gsubr.o, hash.o, hashtab.o, init.o, kw.o, list.o, load.o,
8679 mallocs.o, markers.o, marksweep.o, mbstrings.o, numbers.o,
8680 objprop.o, pairs.o, ports.o, posix.o, print.o, procprop.o,
8681 procs.o, ramap.o, read.o, root.o, scmsigs.o, sequences.o,
8682 simpos.o, smob.o, socket.o, stackchk.o, stime.o, strings.o,
8683 strop.o, strorder.o, strports.o, struct.o, symbols.o, tag.o,
8684 throw.o, unif.o, variable.o, vectors.o, version.o, vports.o,
8685 weaks.o): Add version.h to dependency lists.
8686 (markers.o): Remove duplicate rule.
8688 * version.h: New file.
8690 * version.c: New file.
8692 Thu Aug 29 15:21:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
8694 * symbols.c (scm_strhash): scm_downcase is now a function, not an
8695 array; use it appropriately. Since GCC is quite happy to
8696 subscript functions, it never warned us about this; we should use
8697 -Wpointer-arith in the future. I guess we never tested
8700 Wed Aug 28 18:52:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
8702 * socket.c: Doc and copyright fixes.
8704 Sat Aug 24 05:29:19 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8706 * debug.c: Fixed and improved gdb support.
8708 Fri Aug 23 18:00:16 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8710 * socket.c: Added declaration of inet_aton to avoid compiler
8711 warning. (Hope this solution is correct.)
8713 * stime.c: Added declaration of ftime. (This is missing in
8716 Fri Aug 23 02:03:32 1996 Gary Houston <ghouston@actrix.gen.nz>
8718 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
8720 * Makefile.in (c_files): add strerror.c.
8722 * strerror.c: new file from Emacs' sysdep.c.
8723 maybe configure should also check for sys_errlist.
8725 * configure.in (AC_REPLACE_FUNCS): add strerror.
8727 Fri Aug 23 03:02:46 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8729 * debug.c (scm_init_debug): Added initialization for
8730 scm_evaluator_traps.
8732 * debug.h, debug.c: Various name changes.
8733 (Mostly prefixing with SCM_.) Renamed "debug-options" -->
8734 "debug-options-interface". See commentary in options.c.
8736 * options.h, options.c: Options now have documentation strings.
8737 Also added a long explanatory commentary.
8739 * eval.c, print.h, print.c, read.h, read.c: Modifications to
8742 * gscm.c, init.c, root.c, throw.c: Bug fixes:
8743 last_debug_info_frame is now updated in all cases.
8745 * __scm.h, stackchk.h, stackchk.c: Guile now performs stack
8748 Thu Aug 22 17:34:17 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8750 * __scm.h: SCM_STACK_LIMIT removed (now a run-time option).
8751 Added option STACK_CHECKING.
8753 Tue Aug 20 18:48:40 1996 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8755 * Makefile.in: Added {debug,options,srcprop}.{h,c}
8757 * __scm.h: Removed symbols for debugging support.
8759 * acconfig.h: Added symbols for debugging support.
8761 * configure.in: Added user option for debugging support.
8762 --enable-debug will include the debugging code into libguile.a.
8764 * continuations.c (scm_make_cont): Enlarged the #if 0 around
8765 scm_relocate_chunk_to_heap.
8767 * debug.c: New file: low-level debugging support. It also
8768 includes support for debugging with gdb. (The extensions to gdb
8769 are written by Per Bothner at Cygnus.)
8771 * debug.h: New file: low-level debugging support.
8773 * eval.c: scm_m_set and SCM_IM_SET no longer supports multiple
8774 argument pairs. Extensive modifications to the debugging
8775 evaluator. Added "SECTION:" commentaries to clarify what happens
8776 when, during double compilation. Renamed EVALIMP --> EVALIM.
8777 Renamed EVAL --> XEVAL. Removed function evalcar. Defined
8778 evalcar to scm_eval_car. Added explanation of "EVAL" symbols to
8779 the beginning of the file. New procedure: scm_unmemocopy.
8780 Added some global state variables needed by the debugging
8781 evaluator: scm_ceval_ptr, last_debug_info_frame, debug_mode,
8782 check_entry, check_apply, check_exit, debug_options and
8783 evaluator_traps. New acro: undefine.
8785 * eval.h: Renamed EVAL --> XEVAL.
8787 * gc.c (scm_init_storage): Renamed scm_make_weak_hash_table
8788 --> scm_make_weak_key_hash_table.
8790 * init.c (scm_restart_stack, scm_boot_guile): Added initialization
8791 of SCM_DFRAME. Added calls to scm_init_{debug,options,srcprop}.
8793 * libguile.h: Conditionally include debug.h
8795 * objprop.c (scm_object_properties, scm_set_object_properties_x):
8796 scm_object_properties shouldn't return handle. `handle' now gets
8797 initialized in scm_set_object_properties_x. scm_object_properties
8798 doesn't any longer create an entry in scm_object_whash.
8800 * options.c: New file: handling of run time options.
8802 * options.h: New file: handling of run time options.
8804 * posix.c (scm_getpgrp): Cast pointer to getpgrp.
8806 * print.c: New procedure: scm_print_options
8808 * print.h: Defines for print options.
8810 * read.c: New procedure: scm_read_options
8812 * read.h: Defines for reader options.
8814 * root.h: Added scm_source_whash among scm_sys_protects.
8816 * srcprop.c: New file: source properties.
8818 * srcprop.h: New file: source properties.
8820 * throw.c (jbsmob): Jump buffers are now correctly allocated.
8821 (Bug found by A. Green.)
8823 * weak.c: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
8825 * weak.h: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
8827 Thu Aug 15 02:05:14 1996 Jim Blandy <jimb@totoro.cyclic.com>
8829 * libguile.h: #include "objprop.h"; I guess this was forgotten.
8831 * init.c (scm_boot_guile): Don't call scm_init_rgx; it's a plugin,
8832 and should be called by the final client.
8834 Wed Aug 14 21:41:37 1996 Jim Blandy <jimb@totoro.cyclic.com>
8836 * gc.h: Use the PROTO macro when declaring functions.
8837 * gc.c: Use the PROTO macro when declaring static functions.
8838 Remove the CPP hair around function definitions.
8840 * gc.c (scm_init_storage): Initialize scm_asyncs.
8842 * libguile.h: #include "__scm.h" before testing the STDC_HEADERS
8843 preprocessor symbol; "__scm.h" is where it might get #defined.
8844 * __scm.h: Similar: #include <scmconfig.h> before testing
8847 * __scm.h: It's HAVE_LIMITS_H, not HAVE_LIMITSH.
8849 Fri Aug 9 11:09:28 1996 Jim Blandy <jimb@totoro.cyclic.com>
8851 * init.c (scm_boot_guile): Add init_func argument; call
8852 (*init_func) instead of calling scm_appinit; it's ucky to
8853 hard-code names for the user's procedures.
8854 * init.h (scm_boot_guile): Adjust declaration.
8856 * __scm.h (PROTO): New macro, for declaring functions with
8859 * init.h (scm_start_stack, scm_restart_stack): Use PROTO;
8860 eliminate all the __STDC__ conditionals.
8861 (scm_boot_guile): Add declaration.
8862 * init.c (scm_start_stack, scm_restart_stack, scm_boot_guile):
8863 Remove __STDC__ conditionals around function definitions; the
8864 declarations in init.h will provide the same information, more
8867 * __scm.h (SCM_SYSMISSING): When we don't have ENOSYS, don't
8868 complain about it in the error message; the error message is
8869 adequate without that note, and there's nothing the user can do
8872 Wed Aug 7 14:14:46 1996 Jim Blandy <jimb@totoro.cyclic.com>
8874 * Makefile.in (ancillary): Drop def.sed.
8876 * posix.c (scm_init_posix): Use numeric values, rather than
8877 CPP symbols, when defining the scheme values R_OK, W_OK, X_OK, and
8878 F_OK. The symbols aren't available on some systems, and I'm
8879 pretty sure their values are fixed by common widespread practice.
8880 * ioext.c (scm_init_ioext): Code here defined them too; remove it.
8882 More functions unavailable on some systems.
8883 * configure.in (AC_CHECK_FUNCS): Add ctermid, setpgid, setsid,
8884 tcgetpgrp, tcsetpgrp, and waitpid to the list of functions to
8886 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
8887 * posix.c (scm_sys_ctermid, scm_sys_setpgid, scm_sys_setsid,
8888 scm_sys_tcgetpgrp, scm_sys_tcsetpgrp, scm_sys_waitpid): Put the
8889 bodies of these functions in "#ifdef HAVE_MUMBLE" clauses, with a
8890 stub that signals an error as the #else.
8892 * Makefile.in (ancillary): Drop acconfig-1.5.h; add acconfig.h.
8894 Wed Aug 7 06:28:42 1996 Gary Houston <ghouston@actrix.gen.nz>
8896 * Fixes motivated by Petr Adamek <adamek@mit.edu>:
8898 * unif.c: include ramap.h.
8900 * read.c (endif): case_insensative_p renamed case_insensitive_p.
8902 * ramap.h: rename scm_array_copy prototypes to scm_array_copy_x.
8904 * ports.c: include sys/ioctl.h.
8906 * scmconfig.h.in: add HAVE_SYS_IOCTL_H.
8908 * configure.in: check for sys/ioctl.h.
8910 * ports.c: include <malloc.h> not "malloc.h".
8912 * mallocs.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
8914 * fports.c: remove ttyname and tmpnam declarations.
8916 * posix.c: fewer ttyname declarations.
8918 * fports.c: include <string.h> not "string.h".
8920 * init.c, ioext.c: include string.h and unistd.h.
8922 * gc.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
8924 * async.c, strings.h, strports.c, struct.c, symbols.c, feature.c,
8925 genio.c, simpos.c, vports.c: include string.h.
8927 * socket.c, fdsocket.c: include string.h only if HAVE_STRING_H.
8929 * fdsocket.c (getsockopt, setsockopt): change type of optlen from
8931 (scm_addr_buffer_size): change type from scm_sizet to int.
8932 (accept, getsockname, getpeername, recvfrom): change type of tmp_size
8933 from scm_sizet to int.
8935 * error.c: include unistd.h.
8937 * __scm.h: (SCM_SYSMISSING): another version in case ENOSYS isn't
8940 * Makefile.in: remove references to .hd, .cd suffix and __scm.hd.
8942 * __scm.hd, def.sed: deleted.
8944 Tue Aug 6 14:49:08 1996 Jim Blandy <jimb@totoro.cyclic.com>
8946 Changes for NeXT, suggested by Robert Brown.
8947 * configure.in: Call AC_TYPE_MODE_T.
8948 (AC_CHECK_HEADERS): Add libc.h, to get more prototypes on the
8949 NeXT. Put header file list in alphabetical order.
8950 * configure, scmconfig.h.in: Regenerated.
8951 * filesys.c [HAVE_LIBC_H]: #include <libc.h>.
8953 * filesys.c [HAVE_STRING_H]: #include <string.h>, to get prototype
8956 * acconfig.h: New file, providing documentation for the CPP
8957 symbols defined in configure.in
8958 * acconfig-1.5.h: Removed; superceded by the above.
8960 Sat Aug 3 01:27:14 1996 Gary Houston <ghouston@actrix.gen.nz>
8962 * ioext.c (scm_sys_fdopen): fix the port-table assignment.
8964 * fports.c (scm_open_file): don't return #f, throw error.
8966 * ioext.c (fileno): renamed from %fileno.
8967 (soft-fileno): deleted.
8969 * ports.c (scm_port_revealed): don't need to check for -1 from
8971 (scm_set_port_revealed_x): return unspecified, not #f.
8973 * ioext.c (primitive-move->fdes): return #t or #f, not 1 or 0.
8975 * fdsocket.c: getsockopt, setsockopt: use HAVE_STRUCT_LINGER.
8977 * scmconfig.h.in: add HAVE_STRUCT_LINGER.
8979 * configure.in: check for struct linger, set HAVE_STRUCT_LINGER.
8981 Thu Aug 1 02:58:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
8983 * filesys.c, posix.c: #include <sys/types.h> before <sys/stat.h>.
8984 This is necessary on Ultrix, and doesn't hurt portability.
8986 * Makefile.in (dist-dir): New target, implementing a new dist system.
8987 (installed_h_files): Put in alphabetical order.
8988 Remove duplicate entries for markers.h and unif.h.
8989 (c_files): Remove duplicate entries for markers.c.
8990 (ancillary): Renamed from anillery; all uses changed. Remove
8991 PLUGIN; it's a directory, and needs special treatment in dist-dir.
8992 Remove all the ../doc/* files; doc/Makefile.in handles that.
8994 * Makefile.in (libobjs): Remove duplicate entry for markers.o.
8996 * Makefile.in (.c.x): Compensate for Ultrix's broken Bourne shell:
8997 every if must have an else, or else the whole command has a
8998 non-zero exit code whenever the if's condition is false.
9000 Thu Aug 1 08:22:24 1996 Gary Houston <ghouston@actrix.gen.nz>
9002 * posix.c: include string.h.
9004 Wed Jul 31 23:43:05 1996 Gary Houston <ghouston@actrix.gen.nz>
9006 * numbers.c: rename %expt -> $expt, %atan2 -> $atan2, as it must
9009 * posix.c, ioext.c, socket.c, fdsocket.c, files.c, filesys.c, simpos.c:
9010 Remove leading % from scheme names.
9011 Do not return error values, call SCM_SYSERROR or similar.
9013 * __scm.h (SCM_SYSERROR, SCM_SYSMISSING): new macros.
9015 Wed Jun 12 00:28:31 1996 Tom Lord <lord@beehive>
9017 * struct.c (scm_init_struct): new file.
9019 Fri Jun 7 14:02:00 1996 Tom Lord <lord@beehive>
9021 * list.c (scm_list_tail): list-cdr-ref is the same as list-tail.
9022 (scm_list_head): added list-head for rapidly chopping argument
9023 lists off of longer lists (and similar).
9025 Tue Jun 4 09:40:33 1996 Tom Lord <lord@beehive>
9027 * objprop.c (scm_object_property): assq the cdr of the whash
9028 handle for obj, not the handle itself.
9030 Mon Jun 3 17:19:30 1996 Tom Lord <lord@beehive>
9032 * gc.c (scm_mark_weak_vector_spines): Mark the spines (alists) of
9033 weak hash tables last of all marking to avoid an obscure gc bug.
9034 WARNING: circular lists stored in a weak hash table will hose us.
9036 Fri May 24 09:53:39 1996 Tom Lord <lord@beehive>
9038 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
9039 new functions similar to scm_substring_move_left_x and
9040 scm_substring_move_right_x.
9042 Wed May 22 20:07:01 1996 Tom Lord <lord@beehive>
9044 * init.c (scm_boot_guile): prevent gc with scm_block_gc not
9047 Wed May 15 16:13:29 1996 Tom Lord <lord@beehive>
9049 * ports.c (scm_unread_char): scm_gen_ungetc as a scheme procedure.
9051 Thu May 9 09:33:17 1996 Tom Lord <lord@beehive>
9053 * strports.c (scm_strprint_obj): convenience function. C for
9054 (lambda (obj) (call-with-output-string (lambda (p) (write obj p))))
9056 * guile-{tcl,tk}.[ch], events.[ch], keysyms.[ch], tcl-channels.[ch]
9057 removed to a separate library
9059 * init.c (scm_boot_guile): copied from guile-tcl.c.
9060 Initialization specific to tcl interpreters removed.
9062 Wed May 8 15:07:37 1996 Tom Lord <lord@beehive>
9064 * ports.c (scm_ports_prehistory): size malloced here doesn't
9065 matter so long as it is non-0 (got rid of "* 4").
9067 Tue May 7 11:43:37 1996 Tom Lord <lord@beehive>
9069 * gscm.h: gscm_mkarray eliminated (presumably was not being used
9070 since its definition was bogus).
9072 Mon May 6 13:02:56 1996 Tom Lord <lord@beehive>
9074 * mallocs.[ch]: back again (for rx at least).
9076 Wed Apr 17 08:54:20 1996 Tom Lord <lord@beehive>
9078 * ports.c: removed functions relating to the mapping between ports
9079 and descriptors. (That stuff is unix-specific and should be collected
9080 in a separate library).
9082 * ramap.c (scm_array_copy): return #<unspecified> not #<undefined>.
9083 (Tom Mckay@avanticorp.com)
9085 Mon Apr 15 14:16:55 1996 Tom Lord <lord@beehive>
9087 * gc.c (scm_gc_sweep): Immediates in weak vectors were not
9088 handled correctly (SCM_FREEP was applied to them) -- test for
9089 NIMP. Keys in weak hash tables were spuriously (though harmlessly)
9090 being overwritten with #f. (brown@grettir.bibliotech.com)
9092 Tue Apr 2 22:25:00 1996 Tom Lord <lord@beehive>
9094 * gc.c (scm_unhash_name): new procedure, unhash-name, flushes glocs
9095 for a specific symbol or for all symbols.
9097 Mon Apr 1 10:34:55 1996 Tom Lord <lord@beehive>
9099 * gc.c (scm_gc_mark): mark weak hash tables correctly (was getting weak
9100 keys and weak values confused).
9102 Thu Mar 14 22:20:20 1996 Tom Lord <lord@beehive>
9104 * list.c (scm_last_pair): map '()=>'()
9106 Wed Mar 13 16:43:34 1996 Tom Lord <lord@beehive>
9108 * pairs.c, hashtab.c, list.c, alist.c append.c, sequences.c:
9109 Generalized assoc and hash-table functions.
9110 Factored pairs.c into multiple files.
9112 Fri Mar 8 14:44:39 1996 Tom Lord <lord@beehive>
9114 * gscm.c (gscm_run_scm): got rid of objprop.
9116 Fri Mar 1 10:39:52 1996 Tom Lord <lord@beehive>
9118 * genio.c (scm_getc):
9119 NOTE: fgetc may not be interruptable.
9121 * procprop.c (scm_stand_in_scm_proc):
9122 NOTE: don't use a alist here.
9123 (scm_set_procedure_properties_x): fix type checking throughout this file.
9125 * gc.c (scm_gc_sweep): free heap segments with free, not must_free.
9127 * ports.c (scm_remove_from_port_table): adjust scm_mallocated
9128 after freeing part of the port table.
9130 Thu Feb 29 16:21:17 1996 Tom Lord <lord@beehive>
9132 * strports.c (scm_mkstrport):
9133 * vports.c (scm_make_soft_port): allocate a port table entry
9134 (possibly triggering gc) before setting the tag of the corresponding
9137 * pairs.c (scm_delq_x): never throw an error.
9139 * vectors.c (scm_make_vector): made the default vector fill argument
9140 into '() (much more useful than the previous value, "#unspecified")
9142 Mon Feb 26 17:19:09 1996 Tom Lord <lord@beehive>
9144 * ports.c (scm_add_to_port_table): Added fields
9145 to port table entries: file_name, line_num, col.
9146 Update these in open_file, gen_getc and gen_ungetc.
9147 Added procedures to access those fields.
9149 Sun Feb 25 00:10:36 1996 Tom Lord <lord@beehive>
9151 * procs.c (scm_make_subr_opt): new entry point for making
9154 Sat Feb 24 17:11:31 1996 Tom Lord <lord@beehive>
9156 * gc.h: SCM_STACK_GROWS_UP is now set by autoconf.
9158 Fri Feb 23 10:26:29 1996 Tom Lord <lord@beehive>
9160 * numbers.c (scm_exact_p): This function no longer
9161 implements "integer?".
9163 Thu Feb 22 20:56:16 1996 Tom Lord <lord@beehive>
9165 * gc.c (scm_gc_end): simulate a signal at the end of each GC.
9166 (scm_gc_stats): return an assoc of useful data. Replaces "room"
9167 and the stats reporting formerlly built into repl.
9169 * repl.[ch]: removed.
9170 GC statistics keeping moved to gc.c.
9171 Other statistics keeping can be done from Scheme.
9172 REPLS are now written in Scheme.
9174 Wed Feb 21 10:28:53 1996 Tom Lord <lord@beehive>
9176 * cnsvobj.c (gscm_is_gscm_obj): new file for old functions (icky
9177 conservatively marked objects).
9179 * throw.c (scm_ithrow): Unwind up to the right catch during a throw!
9181 * error.c (scm_init_error): init system_error_sym here, not in repl.c.
9183 * feature.c (scm_compiled_library_path): moved here from repl.c.
9184 This file is for stuff relating specifically to Scheme libraries
9187 * eval.c (scm_m_define): don't give warning about redefinition, don't
9190 NOTE: this should throw a resumable exception with parameters --
9191 the name, the top-level env, the variable, the definition, #t/#f: redefining builtin?
9193 * repl.c (scm_gc_begin/end): don't print a message, don't check verbosity.
9195 * error.c: scm_warn eliminated.
9197 * read.c (scm_lreadr): extra right paren gets an error, not a warning.
9199 * repl.c, marksweep.c, gc.c (various):
9200 lose exit_report, growth_mon.
9202 * gscm.c: got rid of verbosity functions.
9204 Tue Feb 20 00:19:10 1996 Tom Lord <lord@beehive>
9206 * throw.c (scm_ithrow): guard against the bad-throw hook changing
9207 between the call to procedurep and use.
9209 * error.c (scm_everr):
9211 * gsubr.c (scm_make_gsubr): use exit, not scm_quit. still wrong,
9214 * strports.c: don't reveal the port's string to the caller
9215 because it changes size.
9217 (stputc stwrite): check/change the strings length with interrupts
9220 * objprop.c (scm_set_object_property_x &c): use the generic
9221 hashing functions and be threadsafe.
9223 * eval.c (scm_unmemocar): do this operation in a thread-safe way.
9224 (per suggestion jaffer@gnu.ai.mit.edu).
9226 * mbstrings.c (scm_multi_byte_string): guard against argument list
9229 * strings.c (scm_make_string): loop cleanup
9231 * unif.c (scm_vector_set_length_x): scm_vector_set_length_x no longer
9234 * weaks.c (scm_weak_vector): guard against argument list
9237 * variable.c (scm_builtin_variable): check for/make a built-in
9240 * vectors.c (scm_vector): while filling the new array,
9241 guard against a list of fill elements that grows after
9242 the vector is allocated.
9244 * hashtab.c -- new file: general hash table
9245 functions. hash, hashq, hashv, hashx.
9247 * tags.h: made wvect an option bit of vector.
9249 Mon Feb 19 09:38:05 1996 Tom Lord <lord@beehive>
9251 * symbols.c: made the basic symbol table operations atomic.
9253 * root.c &c.: collected stack-specific global state.
9254 linum/colnum etc *should* be port-specific state.
9256 * struct.c (scm_init_struct): init the first struct type during
9257 initialization to fix a race condition.
9259 * continuations.c (scm_dynthrow): pass throwval in the 'regs'
9260 object, not in a global.
9261 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
9263 * throw.c (_scm_throw): Pass throwval on the stack, not in a global
9264 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
9266 * *.[ch]: namespace cleanup. Changed all (nearly) exported CPP
9267 and C symbols to begin with SCM_ or scm_.
9269 Sun Feb 18 15:55:38 1996 Tom Lord <lord@beehive>
9271 * gsubr.c (scm_gsubr_apply): statically allocate the
9272 array of arguments (bothner@cygnus.com).
9274 Sat Feb 17 20:20:40 1996 Tom Lord <lord@beehive>
9276 * scmsigs.c: Simplified to use async rountines.
9278 * async.c: New support for interrupt handlers.
9280 Thu Feb 15 11:39:09 1996 Tom Lord <lord@beehive>
9282 * symbols.c (scm_string_to_symbol et al.): number of tweaky changes to
9283 set the multi_byte flag correctly in symbols. This is wrong.
9284 intern_obbary_soft and msymbolize should take an extra parameter.
9285 Also, weird multibyte symbols don't print correctly.
9286 The weird symbol syntax is also a bit bogus (emacs doesn't quite
9289 Tue Feb 13 11:39:37 1996 Tom Lord <lord@beehive>
9291 * symbols.c (scm_string_to_obarray_symbol): obarray == #f means
9292 use the system symhash. == #t means create an uninterned symbol.
9294 Wed Feb 7 09:28:02 1996 Tom Lord <lord@beehive>
9296 * strings.c (scm_make_shared_substring): build'em.
9297 It might better to keep a table of these and use one
9298 less cons-pair per shared-substring.
9300 Tue Feb 6 17:45:21 1996 Tom Lord <lord@beehive>
9302 * strings.c (scm_string_shared_substring): create shared
9303 substrings. (Doesn't handle mb strings yet).
9305 * mbstrings.c (scm_print_mb_string): handle RO strings.
9307 * print.c (scm_iprin1): print substrings as their non-substring
9308 counterparts (dubious).
9310 * marksweep.c (scm_gc_mark scm_gc_sweep): handle RO and MB
9313 * hash.c (scm_hasher): hash RO and MB strings as bytestrings.
9315 * eval.c (SCM_CEVAL): self-evaluate RO and MB strings.
9317 * eq.c (scm_equal_p): handle RO and MB strings.
9319 * symbols.c (scm_string_to_symbol):
9320 (scm_string_to_obarray_symbol):
9321 * strop.c (scm_i_index):
9323 (scm_string_null_p):
9324 (scm_string_to_list):
9325 * strings.c (scm_string_length):
9328 (scm_string_append):
9329 * simpos.c (scm_system):
9331 * fports.c (scm_open_file):
9332 * strorder.c (scm_string_equal_p):
9333 (scm_string_ci_equal_p):
9334 (scm_string_less_p):
9335 (scm_string_ci_less_p):
9336 * pairs.c (scm_obj_length):
9337 * mbstrings.c (scm_multi_byte_string_length):
9339 Use RO string macros for RO strings.
9341 Tue Jan 30 09:19:08 1996 Tom Lord <lord@beehive>
9343 * Makefile.in (CFLAGS ALL_CFLAGS): be more standard.
9345 * strop.c (scm_i_rindex, scm_i_index): Don't use the BSD functions
9346 index/rindex. Do handle embedded \000 characters.
9348 Sun Jan 28 13:16:18 1996 Tom Lord <lord@beehive>
9350 * error.c (def_err_response): (int)scm_err_pos => (long)scm_err_pos
9351 Eliminate a (presumed) warning on some systems.
9353 * gscm.c (gscm_run_scm): SCM_INIT_PATH => GUILE_INIT_PATH
9354 (Mikael Djurfeldt <mdj@nada.kth.se>)
9356 Sat Jan 27 12:36:55 1996 Tom Lord <lord@beehive>
9358 * eval.c (scm_map): added argument type checking.
9359 (kawai@sail.t.u-tokyo.ac.jp)
9361 * gscm.c (gscm_set_procedure_properties_x): parameter "new" => "new_val"
9362 for C++. (Seth Alves <alves@gryphon.com>)
9364 (gscm_cstr): uses an uninitialized local variable causing
9365 segv. (kawai@sail.t.u-tokyo.ac.jp)
9368 * lvectors.c (scm_get_lvector_hook):
9369 In guile-ii, the lvector code was broken. It was fixed in guile-iii.
9370 It seems to me like if it is broken again in guile-iv...Here is a patch.
9371 "! || (LENGTH (keyvec) == 0))"
9372 (From: Mikael Djurfeldt <mdj@nada.kth.se>)
9375 * gscm.c (gscm_sys_default_verbosity):
9376 incorrectly declared for non-__STDC__
9377 (Tom_Mckay@avanticorp.com)
9379 * ports.c (scm_setfileno): Tweak the macro a bit
9380 to make it easier to port to systems that use
9381 more than a single structure field to hold a descriptor.
9383 * debug.c (change_mode): Avoid GNUCism "int foo[n];"
9384 Give a warning, not an error, for unrecognized modes.
9386 * eval.c (SCM_CEVAL):
9387 static char scm_s_for_each[];
9388 static char scm_s_map[];
9391 * strings.c (scm_string_p):
9392 static char s_string[];
9395 * struct.c (scm_sys_struct_set_x):
9396 static char s_sys_make_struct[];
9397 static char s_sys_struct_ref[];
9398 static char s_sys_struct_set_x[];
9399 Rearrange code to eliminate those forward decls for the sake of
9402 * variable.c (make_vcell_variable): static char s_make_variable[];
9405 * fports.c (scm_port_mode):
9406 chars modes[3] = "";
9410 (Tom_Mckay@avanticorp.com)
9413 * pairs.c (scm_set_cdr_x): non-__STDC__ declaration of
9414 scm_cons2(), scm_acons(), and scm_set_cdr_x() missing semicolon
9415 (Tom_Mckay@avanticorp.com)
9417 * numbers.c (scm_num_eq_p): Non-__STDC__ declaration of
9418 scm_num_eq_p() was scm_equal_p().
9419 (Tom_Mckay@avanticorp.com)
9421 * symbols.c (msymbolize): "CHARS(X) = " => "SETCHARS..."
9422 (Tom_Mckay@avanticorp.com)
9424 Fri Jan 26 14:03:01 1996 Tom Lord <lord@beehive>
9426 * weaks.c (scm_make_weak_vector): "VELTS(X) =" => "SETVELTS..."
9427 (Tom_Mckay@avanticorp.com)
9429 * strop.c (scm_substring_fill_x):
9430 Non-__STDC__ declaration of scm_substring_fill_x() missing semicolon
9431 (Tom_Mckay@avanticorp.com)
9433 * eval.c (SCM_APPLY): variables "debug_info" -> dbg_info.
9434 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
9436 * _scm.h (CxR functions): #define CxR SCM_CxR => #define CxR(X) SCM_CxR(X)
9437 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
9439 * lvectors.c (scm_lvector_set_x): avoid VELTS (VELTS (...)[..]) which
9440 can turn into an obscure gc bug.
9442 * chars.c (scm_char_p): fixed PROC call.
9444 * gscm.h (gscm_vset): use scm_vector_set_x not (the missing)
9447 Tue Jan 23 13:29:40 1996 Tom Lord <lord@beehive>
9449 * elisp.c (new file): dynamic scoping and other bits for
9450 elisp. Don't use this yet unless you specificly want to
9451 hack on elisp emulation.
9453 * dynwind.c (scm_dowinds): When entering or leaving a dynamic
9454 scope created by scm_with_dynamic_bindings_operation_x, swap
9455 the bindings of that scope with the corresponding globals.
9457 * continuations.c (scm_make_cont): when a continuation is captured,
9458 relocate the continuation stack chunks registered on the wind chain
9461 Sun Jan 21 19:31:17 1996 Tom Lord <lord@beehive>
9463 * eval.c (SCM_CEVAL): if the function position evaluates
9464 to a macro, process it accordingly. (Previously, macros were
9465 handled only if the function position was a symbol naming a
9466 variable bound to a macro).
9468 Sat Jan 20 23:21:37 1996 Tom Lord <lord@beehive>
9470 * eval.c (scm_m_set): allow multi-variable set! like
9473 Wed Dec 6 02:40:49 1995 Tom Lord <lord@beehive>
9475 * ports.h fports.c vports.c marksweep.c gc.c strports.c: moved the
9476 STREAM of ports into the port table and replaced it with a
9479 * repl.c (iprin1): added tc7_mb_string -- same as tc7_string.
9481 * marksweep.c (scm_gc_mark): added tc7_mb_string -- same as tc7_string.
9483 * mbstrings.c (new file): functions on multi-byte strings.
9485 * tags.h (scm_typ7_string, scm_typ7_mb_string): added a tag
9486 for multi-byte strings. Moved the string tag.
9488 * chars.h chars.c repl.c (many functions): made scm_upcase and
9489 scm_downcase functions that are safe for extended character sets.
9491 Changed the range of integer->char.
9493 Changed the type of SCM_ICHR.
9495 Tue May 16 17:49:58 1995 Mikael Djurfeldt <mdj@sanscalc.nada.kth.se>
9497 * guile.c: Changed init file name from "SCM_INIT_PATH" to
9500 Sun Aug 6 15:14:46 1995 Andrew McCallum <mccallum@vein.cs.rochester.edu>
9502 * guile.c (gscm_is_gscm_type): New function. (Without this how will we
9503 know that it's safe to pass an object to gscm_get_type?)
9504 (gscm_get_type): Fix tyop in error message.
9506 * variable.c (scm_variable_ref): fixed assertion test.
9507 (Robert STRANDH <strandh@labri.u-bordeaux.fr>)
9509 * gscm.h: fixed several prototypes, notably gscm_vref.
9510 Add gscm_is_eq and temporarily commented out gscm_eq (see
9511 the note in gscm.h near gscm_eq if this change effects your
9513 (Reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
9515 * pairs.c (scm_obj_length): see next entry.
9517 * gscm.h (gscm_obj_length): A way to get an integer
9518 length for lists, strings, symbols (treated as strings),
9519 and vectors. Returns -1 on error.
9521 * eq.c (scm_equal_p): fixed smob case.
9522 (William Gribble <grib@arlut.utexas.edu>)
9524 * Makefile.in (X_CFLAGS): defined.
9525 (William Gribble <grib@arlut.utexas.edu>)
9527 * gscm.h (gscm_2_double): provided now
9528 (reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
9530 Tue Jun 13 01:04:09 1995 gnu