*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 1999-11-22 Jim Blandy <jimb@savonarola.red-bean.com>
2
3 * gscm.c, gscm.h: Deleted. They were unused.
4
5 1999-11-20 Gary Houston <ghouston@freewire.co.uk>
6
7 * unif.c (scm_list_to_uniform_array): call
8 scm_dimensions_to_uniform_array with a third argument of
9 SCM_UNDEFINED instead of SCM_EOL.
10
11 1999-11-19 Gary Houston <ghouston@freewire.co.uk>
12
13 * the following changes allow guile to be built with the array
14 "module" omitted. some of this stuff is just tc7 type support,
15 which wouldn't be needed if uniform array types were converted
16 to smobs.
17
18 * tag.c (scm_utag_bvect ... scm_utag_cvect): don't define unless
19 HAVE_ARRAYS.
20 (scm_tag): don't check array types unless HAVE_ARRAYS.
21
22 * sort.c (scm_restricted_vector_sort_x, scm_sorted_p):
23 remove the unused array types.
24 * (scm_stable_sort, scm_sort): don't support vectors if not
25 HAVE_ARRAYS. a bit excessive.
26
27 * random.c (vector_scale, vector_sum_squares,
28 scm_random_solid_sphere_x, scm_random_hollow_sphere_x,
29 scm_random_normal_vector_x): don't define unless HAVE_ARRAYS.
30
31 * gh_data.c (makvect, gh_chars2byvect, gh_shorts2svect,
32 gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect, gh_doubles2dvect,
33 gh_uniform_vector_length, gh_uniform_vector_ref):
34 don't define unless HAVE_ARRAYS.
35 (gh_scm2chars, gh_scm2shorts, gh_scm2longs, gh_scm2floats,
36 gh_scm2doubles):
37 don't check vector types if not HAVE_ARRAYS.
38
39 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), print.c (scm_iprin1),
40 gc.c (scm_gc_mark, scm_gc_sweep), objects.c (scm_class_of):
41 don't support the array types unless HAVE_ARRAYS is defined.
42
43 * tags.h: make nine tc7 types conditional on HAVE_ARRAYS.
44
45 * read.c (scm_lreadr): don't check for #* unless HAVE_ARRAYS is
46 defined (this should use read-hash-extend).
47
48 * ramap.c, unif.c: don't check whether ARRAYS is defined.
49
50 * vectors.c (scm_vector_set_length_x): moved here from unif.c. call
51 scm_uniform_element_size if HAVE_ARRAYS.
52 vectors.h: prototype too.
53
54 * unif.c (scm_uniform_element_size): new procedure.
55
56 * init.c (scm_boot_guile_1): don't call scm_init_ramap or
57 scm_init_unif unless HAVE_ARRAYS is defined.
58
59 * __scm.h: don't define ARRAYS.
60
61 * Makefile.am (EXTRA_libguile_la_SOURCES): unif.c and ramap.c
62 moved here from libguile_la_SOURCES.
63
64 1999-11-18 Gary Houston <ghouston@freewire.co.uk>
65
66 * socket.c (scm_htons, scm_ntohs, scm_htonl, scm_ntohl): new
67 functions for network data conversion.
68
69 * numbers.c (scm_num2long, scm_num2longlong):
70 throw out-of-range instead of wrong-type-arg if appropriate.
71 (scm_iint2str): handle -2^31 correctly.
72 (scm_num2long): handle -2^31 bignum correctly.
73 (scm_num2long_long): rewrite the bigdig case: basically copied
74 from scm_num2long.
75 numbers.h: (SCM_BITSPERLONGLONG): deleted.
76
77 * unif.c (rapr1): use sprintf instead of intprint for unsigned
78 longs: intprint can't cope with large values.
79
80 * numbers.c (scm_num2ulong): check more consistently that the
81 input is not negative. if it is, throw out-of-range instead of
82 wrong-type-arg.
83
84 * ramap.c (scm_array_fill_int): don't limit fill to INUM for
85 uvect, ivect or llvect.
86 Check that fill doesn't overflow short uniform array.
87
88 * __scm.h: add another long to the definition of long_long and
89 ulong_long.
90
91 * unif.c (scm_raprin1): use 'l' instead of "long_long" in the
92 print representation of llvect. read can't handle more than
93 one character.
94 (scm_dimensions_to_uniform_array): make "fill" an optional argument
95 instead of a rest argument.
96
97 * tags.h (scm_tc7_llvect): wasn't defined anywhere, so use the free
98 tag 29 for now.
99
100 * __scm.h: don't mention LONGLONGS.
101
102 * unif.c, numbers.c, eq.c, gc.c, print.c, eval.c, ramap.c:
103 replace LONGLONGS with HAVE_LONG_LONGS as set by configure.
104
105 1999-11-17 Gary Houston <ghouston@freewire.co.uk>
106
107 * net_db.c (scm_inet_aton): throw errors using the misc-error key
108 instead of system-error. inet_aton doesn't set errno.
109 system-error isn't right in gethost either, since it's throwing
110 the value of h_errno instead of errno. so:
111 (scm_host_not_found_key, scm_try_again_key,
112 scm_no_recovery_key, scm_no_data_key): new error keys.
113 (scm_resolv_error): new procedure, use the new keys.
114 (scm_gethost): call scm_resolv_error not scm_syserror_msg.
115
116 1999-11-16 Gary Houston <ghouston@freewire.co.uk>
117
118 * error.c: (various): use scm_cons instead of scm_listify
119 to build short lists.
120
121 1999-11-03 Gary Houston <ghouston@freewire.co.uk>
122
123 * socket.c (scm_fill_sockaddr): zero the address structure before
124 use, in case it has a sin_len field and the OS doesn't like random
125 values (thanks to Bertrand Petit).
126
127 1999-10-26 Mark Galassi <rosalia@lanl.gov>
128
129 * gh.h, gh_data.c (gh_symbol2scm): changed gh_symbol2scm() to take
130 a const char * argument, upon suggestion from Lynn Winebarger.
131
132 1999-10-26 Gary Houston <ghouston@freewire.co.uk>
133
134 * strports.c (st_end_input): avoid dubious pointer arithmetic.
135
136 1999-10-24 Gary Houston <ghouston@freewire.co.uk>
137
138 * Move the responsibility for resetting port buffers from the
139 caller of the ptob seek procedure to the implementation. This
140 gives more control in general to the ptob seek: in particular the
141 change of 1999-10-20 can be made to work without breaking seek on
142 string ports. There's a comment in NEWS about upgrading port
143 types.
144
145 * ports.c (scm_seek): don't reset the port buffers here.
146
147 * fports.c (fport_seek): reset the buffers, except for the
148 0 SEEK_CUR case.
149
150 * strports.c (st_end_input): (bug fix): decrement pt->read_pos by
151 offset. check that it's not less than read_buf.
152 (st_seek): reset the buffers first, unless it's the 0 SEEK_CUR
153 case and currently reading.
154
155 1999-10-20 Gary Houston <ghouston@freewire.co.uk>
156
157 * ports.c (scm_seek): Add a special case for SEEK_CUR, offset 0,
158 so that unread chars are not needlessly discarded. (thanks to
159 Roland Orre).
160
161 1999-10-18 Gary Houston <ghouston@freewire.co.uk>
162
163 * fports.c (scm_fdes_to_port): always set rw_random if the fdes is
164 random access. rw_active needs to be maintained even for single
165 directional ports, otherwise scm_seek and probably other things are
166 broken. (thanks to Roland Orre).
167
168 * strports.c (scm_mkstrport): set rw_random to 1 unconditionally.
169
170 * ports.c (scm_add_to_port_table): initialise rw_random to 0.
171
172 * ports.h (scm_port): change the comments on rw_random and rw_active.
173
174 1999-10-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
175
176 * ioext.c: Added #include "feature.h".
177
178 These changes turns `delay' into a memoizing macro. This is
179 because it may be expanded before evaluation if it occurs at the
180 beginning of a body. (Thanks to Lauri Alanko.)
181
182 * eval.c, eval.h (scm_sym_delay): New global symbol.
183
184 * tags.h (SCM_IM_DELAY): New immediate symbol.
185
186 * print.c (scm_isymnames): Printed representation.
187
188 * eval.c (unmemocopy, SCM_CEVAL): Handle SCM_IM_DELAY.
189 (scm_m_delay): Turned into a memoizing macro.
190
191 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version.
192
193 1999-10-11 Jim Blandy <jimb@savonarola.red-bean.com>
194
195 * gh_data.c (gh_ints2scm, gh_doubles2scm): Make sure elements are
196 protected from GC while building the vector. (Thanks to Bernard
197 Urban and Greg Harvey.)
198
199 1999-10-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
200
201 * throw.c (handler_message): Display backtrace if backtraces
202 enabled.
203
204 1999-10-05 Jim Blandy <jimb@savonarola.red-bean.com>
205
206 * Makefile.in, scmconfig.h.in: Deleted from CVS repository. Run
207 the autogen.sh script to create generated files like these.
208
209 * numbers.c (scm_string_to_number): Signal an error if radix is
210 less than two. (Thanks to Jorgen Schaefer.)
211
212 * print.c (scm_write, scm_display, scm_newline, scm_write_char):
213 Don't assume that the current output port is valid. Somebody
214 might close it. (Thanks to Bernard Urban.)
215
216 1999-10-02 Jim Blandy <jimb@zwingli.cygnus.com>
217
218 * scmconfig.h.in: Regenerated.
219
220 * Makefile.am (EXTRA_libguile_la_SOURCES): fix typo.
221
222 Mon Sep 27 17:15:14 1999 Greg J. Badros <gjb@cs.washington.edu>
223
224 * __scm.h: Fix a bunch of macros that were missing do-while(0)
225 sandwiches.
226
227 * debug.c, eval.c: Fix buggy uses of SCM_ALLOW_INTS (missing
228 semicolon) exposed by the above change.
229
230 1999-09-27 Greg J. Badros <gjb@cs.washington.edu>
231
232 * stacks.c: Avoid compiler warning re: unitialized var.
233
234 * scmconfig.h.in: Added DEBUG_FREELIST
235
236 * pairs.h: Fix macro that was not do-while(0) sandwiched.
237
238 * gc.h, gc.c: Added scm_gc_set_debug_check_freelist_x,
239 scm_map_free_list
240
241 1999-09-23 Gary Houston <ghouston@freewire.co.uk>
242
243 * ioext.c (scm_init_ioext): enable "i/o-extensions" feature here
244 instead of in scm_init_filesys.
245
246 * init.c (scm_boot_guile_1): don't call scm_init_posix or
247 scm_init_filesys unless HAVE_POSIX is defined.
248 don't call scm_init_netdb or scm_init_socket unless
249 HAVE_NETWORKING is defined.
250
251 * Makefile.am (EXTRA_libguile_la_SOURCES): filesys.c, posix.c,
252 net_db.c, socket.c: moved here from libguile_la_SOURCES.
253
254 1999-09-25 Jim Blandy <jimb@savonarola.red-bean.com>
255
256 * root.c (scm_make_root): Initialize all the fields of the new
257 root. GC could happen any time, you know. (Thanks to Greg
258 Harvey.)
259
260 * numbers.c (scm_number_to_string): Signal an error if radix is
261 less than two. (Thanks to Jorgen Schaefer.)
262
263 * Makefile.am (EXTRA_libguile_la_SOURCES): Add memmove.c here,
264 so automake will actually generate rules for it.
265 * Makefile.in: Regenerated.
266
267 1999-09-21 Jim Blandy <jimb@savonarola.red-bean.com>
268
269 * backtrace.c: #include "_scm.h" before testing whether
270 HAVE_UNISTD_H is #defined.
271
272 1999-09-20 Jim Blandy <jimb@savonarola.red-bean.com>
273
274 * read.c (scm_read): Don't assume that scm_cur_inp is always open.
275 * ports.c (scm_read_char): Same.
276 * ioext.c (scm_read_line): Same.
277 (Thanks to Bernard Urban.)
278
279 1999-09-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
280
281 * vectors.c (scm_vector_move_right_x): Bugfix: Remove side effect
282 in SCM_ASSERT macro.
283 numbers.c: Removed #ifndef SCM_RECKLESS at places where type
284 checking may invoke a generic. (Thanks to Michael Livshin.)
285
286 * __scm.h (SCM_WTA_DISPATCH_0, SCM_GASSERT0): New macros.
287
288 * numbers.c (scm_max, scm_min, scm_sum, scm_difference,
289 scm_product, scm_divide): Bugfix: Don't pass SCM_UNDEFINED to the
290 generic function if the asubr is called with only one arg.
291
292 1999-09-20 Gary Houston <ghouston@freewire.co.uk>
293
294 * scmsigs.c (scm_sigaction): add SA_RESTART to flags only if
295 HAVE_RESTARTABLE_SYSCALLS.
296 (scm_init_scmsigs): use siginterrupt if it's available. not
297 everyone who has restartable syscalls has SA_RESTART it seems.
298
299 (scm_sigaction): use scm_num2long/scm_long2num when converting
300 SIG_DFL/SIG_IGN, in case it doesn't fit in an INUM. use
301 scm_integer_p to test the type.
302
303 1999-09-18 Gary Houston <ghouston@freewire.co.uk>
304
305 * _scm.h, scmsigs.c: replace HAVE_RESTARTS with
306 HAVE_RESTARTABLE_SYSCALLS.
307
308 * strports.c (scm_strport_to_string): create the string from
309 pt->read_buf instead of an expression that evaluates to the
310 same thing.
311
312 * gdbint.c (gdb_print): don't just use SCM_CHARS to get a C string
313 from the port: the port's buffer may not be NUL terminated.
314
315 1999-09-16 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
316
317 * Makefile.am (.c.x): Added missing semicolon after `false'.
318
319 1999-09-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
320
321 * print.c (scm_iprin1): Turn `write' and `display' into
322 primitive generics and use their associated generic functions in
323 scm_iprin1 for GOOPS objects.
324
325 * backtrace.c: #include <unistd.h> if present.
326
327 1999-09-14 Jim Blandy <jimb@savonarola.red-bean.com>
328
329 * Makefile.am (.c.x): Don't create a subshell just to delete the
330 .x file and return false.
331 * Makefile.in: Regenerated.
332
333 1999-09-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
334
335 * feature.c (scm_create_hook): New function. Replaces
336 scm_make_named_hook which is now deprecated.
337 (scm_make_hook_with_name): New primitive.
338 (print_hook): Hooks now print in a fancy way.
339
340 1999-09-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
341
342 * __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,
343 dynwind.c, dynwind.h, eval.h, evalext.c, evalext.h, feature.c,
344 feature.h, hashtab.c, hashtab.h, objects.c, objects.h, print.c,
345 procs.c, procs.h, smob.c, smob.h, srcprop.c, strorder.c, struct.c,
346 struct.h: Updated copyright notices.
347
348 * srcprop.c (scm_source_property): Bugfix: Use SCM_NECONSP instead
349 of SCM_NCONSP. (Thanks to Greg Badros.)
350
351 * gsubr.c (scm_make_gsubr): Use scm_make_subr_opt for creation of
352 the self subr.
353
354 * eval.c, debug.h (SCM_BACKTRACE_WIDTH): New debug option: width.
355
356 * backtrace.c: Keep backtraces within specified width by
357 adaptively adjusting fancy printing parameters and cut output if
358 necessary.
359 (scm_display_application): Check args.
360
361 1999-09-11 Jim Blandy <jimb@savonarola.red-bean.com>
362
363 Change the name of the objects returned by OPENDIR from
364 "directory" to "directory stream". A predicate named "directory?"
365 would be confusing.
366 * filesys.c (scm_directory_stream_p): Renamed from scm_directory_p.
367 At the Scheme level, "directory?" -> "directory-stream?".
368 (scm_dir_print): Use the phrase "directory stream" in printed form.
369 * filesys.h (scm_directory_stream_p): Prototype renamed
370 accordingly.
371
372 * Makefile.am (CLEANFILES): Remove versiondat.h; that should only
373 be removed by `make distclean', since it's generated by configure.
374 * Makefile.in: Regenerated.
375 (Thanks to Robert Bihlmeyer.)
376
377 * strop.c (scm_substring_move_x): Signal an error if start1
378 doesn't come before end1. (Thanks to Karoly Lorentey).
379
380 * numbers.c (scm_istr2flo): Don't call SCM_INEXP without first
381 calling SCM_NIMP. (Thanks to Karoly Lorentey).
382
383 * version.c (scm_libguile_config_stamp): Deleted. See
384 corresponding change to ../ice-9/boot-9.scm.
385 * versiondat.h.in: Remove definition for GUILE_STAMP.
386 * version.h: Delete prototype.
387 * Makefile.in: Regenerated.
388
389 1999-09-11 Gary Houston <ghouston@easynet.co.uk>
390
391 * filesys.c (scm_directory_p): new procedure "directory?" Returns
392 a boolean indicating whether its argument is a directory
393 port as returned by opendir (thanks to Dirk Herrmann for the
394 suggestion.)
395
396 1999-09-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
397
398 * backtrace.c (display_frame_expr): Don't print a newline.
399 (display_frame): Print the newline here instead.
400 (display_backtrace_body): Don't print "Backtrace:".
401 (scm_backtrace): Print "Backtrace:" here instead.
402
403 1999-09-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
404
405 * procs.c (scm_setter): Signal WTA if handed an entity or operator
406 lacking a setter.
407
408 * feature.c, feature.h: (scm_hook_p, scm_hook_empty_p): New
409 primitives. (Thanks to Greg Badros);
410 (scm_hook_to_list): New primitive; Hooks are now smobs.
411
412 1999-09-08 Gary Houston <ghouston@easynet.co.uk>
413
414 * stime.c (bdtime2c): rewrite the ASSERTs. Accept a value
415 of #f for the 10th vector element to avoid an exception
416 seen by Bernard Urban.
417 (scm_mktime): unneeded ASSERT removed.
418
419 1999-09-07 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
420
421 * eval.c (scm_map, scm_for_each): Converted to dispatch on generic
422 if args don't match.
423
424 * __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros.
425
426 1999-09-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
427
428 * numbers.c: Converted comparison operations to dispatch on
429 generic if args don't match.
430
431 * Makefile.am (ETAGS_ARGS): Added support for GPROC and GPROC1.
432
433 1999-09-06 James Blandy <jimb@mule.m17n.org>
434
435 * guile-snarf.c: Deleted. Snarfing should respect CPP
436 conditionals, so it needs to actually run CPP. Bleah.
437
438 1999-09-05 James Blandy <jimb@mule.m17n.org>
439
440 Handle errors properly in guile-snarf. (Thanks to Han-Wen Nienhuys.)
441 * guile-snarf.in: Be sure to exit with an error if CPP does.
442 * Makefile.am (.c.x): Delete the .x file and exit with an error
443 status if guile-snarf exits with an error status.
444 * Makefile.in: Regenerated.
445
446 * snarf.h (SCM_GLOBAL_KEYWORD): Call scm_c_make_keyword, not
447 scm_makekey, which doesn't exist any more. Guess nobody's using
448 this.
449
450 * guile-snarf.c: New implementation of guile-snarf, meant to be
451 more robust than the shell script. I think it's complete, but I
452 haven't tested it at all, and I haven't changed the build process
453 to actually use it. We should compare its output against that of
454 the existing shell script, for all source files.
455
456 * guile-snarf.c (parse_args): Abort if we haven't handled some
457 character type.
458
459 1999-09-03 James Blandy <jimb@mule.m17n.org>
460
461 * load.c (scm_search_path): If the filename has any extension at
462 all, ignore the entire list of extensions. Also, don't check whether
463 the file is accessible. If the file exists, accessible or not, we
464 should return it. Inaccessible files should cause an error later.
465 (Thanks to Keisuke Nishida for the suggestions.)
466
467 1999-09-02 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
468
469 * gc.c (cleanup, scm_init_storage): Use on_exit if present and
470 atexit not available. (sunos4.1.4 needs it.)
471
472 1999-09-01 James Blandy <jimb@mule.m17n.org>
473
474 I take it all back --- bcopy does handle overlapping source and
475 destination areas correctly. At least on every system I could
476 find. But it is better to use AC_REPLACE_FUNCS than to introduce
477 new CPP conditionals.
478 * memmove.c: New file, implementing memmove in terms of bcopy.
479 * scmconfig.h.in: Regenerated.
480
481 Allocators should use the `void *' type for generic pointers.
482 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Change
483 argument and return types.
484 * gc.h: Corresponding changes to prototypes.
485 (Thanks to Forcer.)
486
487 1999-08-31 James Blandy <jimb@mule.m17n.org>
488
489 * numbers.c (scm_init_numbers): Claim to support the `complex'
490 feature, as expected by (ice-9 format). (Thanks to Ceri Storey.)
491
492 * Makefile.am (check-local): Set GUILE_LOAD_PATH so the tests can
493 find (ice-9 boot-9) when Guile was compiled in a separate
494 directory from the source. (Thanks to Rodney Brown.)
495 * Makefile.in: Regenerated.
496
497 * procs.c (scm_make_subr_opt): Fix typo. Remember to multiply
498 table lengths by the size of a single element when growing the
499 table. (Thanks to Bill Schottstaedt.)
500
501 1999-08-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
502
503 * eval.c (SCM_CEVAL): Duplicated the method dispatch code at the
504 SCM_IM_DISPATCH form instead of calling scm_mcache_lookup_cmethod
505 since that cuts down the time for type dispatch by 50%.
506
507 1999-08-30 James Blandy <jimb@mule.m17n.org>
508
509 * gh_data.c (gh_set_substr): Revert change of 1999-08-29; bcopy is
510 not a correct substitute for memmove, because it doesn't handle
511 overlapping source and destination areas on many platforms.
512 Overlaps are the primary reason to use memmove in the first place.
513 * ports.c (scm_ungetc): Same.
514 * strop.c (scm_substring_move_x): Same.
515
516 1999-08-30 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
517
518 * gc.c (scm_init_storage): Skip registration of cleanup on systems
519 which lack atexit. (Is it important that cleanup is made
520 properly? Maybe we should replace all `exit' with `scm_exit' and
521 call cleanup there?)
522
523 * struct.c, struct.h (scm_struct_free_0, scm_struct_free_light,
524 scm_struct_free_standard, scm_struct_free_entity): Declared to
525 return scm_sizet instead of size_t.
526
527 * gdbint.c, strports.c: #include <unistd.h>. (SEEK_SET is defined
528 there on sunos4.1.4.)
529
530 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
531
532 * numbers.c (scm_lcm): Bugfix: BIGDIG --> SCM_BIGDIG;
533 Account for the case when second argument is unbound.
534
535 * strorder.c (scm_string_less_p, scm_string_ci_less_p): Bugfix.
536 (Thanks to Karoly Lorentey.)
537
538 * gh_data.c, ports.c, strop.c: Alternatively use bcopy if memmove
539 isn't present. (Thanks to Suzuki Toshiya.)
540
541 * ports.c: Use ANSI C prototypes in definitions. (Thanks to
542 Bernard Urban.)
543
544 * filesys.c (scm_stat2scm): Conditionally use S_ISLNK. (Thanks to
545 Bernard Urban.)
546
547 * dynl-dl.c (RTLD_GLOBAL): Define if non-existent. (Thanks to
548 Bernard Urban and Ian Grant.)
549
550 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version
551 again. (1.3.4 will be binary incompatible with 1.3.2 because of a
552 change in the representation of entities and operators.)
553
554 1999-08-29 Gary Houston <ghouston@easynet.co.uk>
555
556 * ports.c (scm_ungetc): bugfix: if putback_buf is NULL
557 don't allocate zero bytes (thanks to Bill Schottstaedt).
558
559 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
560
561 * procs.c (scm_setter): Converted to use generic dispatch.
562
563 * eval.c, eval.h: Bugfix: scm_sym_apply was not initialized
564 correctly.
565
566 * load.c (scm_search_path): Don't try extensions which already are
567 present at the end of the filename.
568 (scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
569
570 * stacks.c (scm_sym_apply): Removed. (Thanks to Ken Raeburn.)
571
572 Cleanup and simplification of generic method dispatch.
573 Also, the quadruple representation of entity and operator
574 procedures has been replaced with single.
575
576 * tags.h (SCM_IM_HASH_DISPATCH): Removed.
577
578 * print.c (scm_isymnames): Removed #@hash-dispatch.
579
580 * objects.c, objects.h (scm_mcache_lookup_cmethod): Moved here
581 from eval.c; Support 0 arity methods.
582 (scm_set_object_procedure_x): Removed scm_sym_atdispatch;
583 (scm_apply_generic_env): Removed.
584 Replaced slots proc0-3 with procedure.
585
586 * objects.h (SCM_OPERATOR_PROC_0, SCM_OPERATOR_PROC_1,
587 SCM_OPERATOR_PROC_2, SCM_OPERATOR_PROC_3): Replaced by
588 SCM_OPERATOR_PROCEDURE.
589 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_1, SCM_ENTITY_PROC_2,
590 SCM_ENTITY_PROC_3): Replaced by SCM_ENTITY_PROCEDURE.
591
592 * struct.c, struct.h: Replace 4 procedure slots with one.
593 (scm_struct_i_procedure): Replaces scm_struct_i_procedure.
594
595 * gc.c (scm_gc_mark): Mark 1 procedure slot in entities instead of
596 4.
597
598 * eval.c (scm_sym_args): Removed.
599 (SCM_CEVAL): Simplified entity application.
600 Moved dispatch code to objects.c.
601
602 * procprop.c (scm_i_procedure_arity): Bugfix: Handle generics.
603
604 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
605
606 * sort.c (closureless): Use scm_eval_body.
607
608 * eval.c (SCM_APPLY): Fixed serious evaluator bug: If a closure
609 with a symbol as last form was first called normally and then via
610 `map' or some other mechanism using primitive apply, an ILOC was
611 returned.
612
613 1999-08-26 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
614
615 This change extends the representation of primitive procedures
616 with more data fields, e.g. a place for documentation and true
617 procedure properties.
618
619 * procs.c, procs.h (scm_subr_entry): New type: Stores data
620 associated with subrs.
621 (SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS,
622 SCM_SUBR_DOC): New macros.
623 (scm_subr_table): New variable.
624 (scm_mark_subr_table): New function.
625
626 * init.c (scm_boot_guile_1): Call scm_init_subr_table.
627
628 * gc.c (scm_gc_mark): Don't mark subr names here.
629 (scm_igc): Call scm_mark_subr_table.
630
631
632 This change implements a scheme for letting a generic work as a
633 shadow for a primitive procedure. If the primitive procedure
634 can't dispatch on its arguments, control is left over to the
635 generic. Normal wrong type arg errors will be generated until the
636 user has hung the first method on the primitive.
637
638 * snarf.h (SCM_GPROC, SCM_GPROC1): New macros.
639
640 * procs.c, procs.h (scm_subr_p): New function (used internally).
641
642 * gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function.
643
644 * objects.c, objects.h (scm_primitive_generic): New class.
645
646 * objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros.
647
648 * print.c (scm_iprin1): Print primitive-generics.
649
650 * __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1,
651 SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros.
652
653 * eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta -->
654 SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point
655 primitives). NOTE: This means that it is now *required* to use
656 SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an
657 obscured representation that will be removed in the future anyway,
658 so backward compatibility is no problem here).
659
660 * numbers.c: Converted most numeric primitives (all but bit
661 comparison operations and bit operations) to dispatch on generic
662 if args don't match.
663
664
665 Better support for applying generic functions.
666
667 * eval.c, eval.h (scm_eval_body): New function.
668
669 * objects.c (scm_call_generic_0, scm_call_generic_1,
670 scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New
671 functions.
672
673
674 Optimization of the generic function dispatch mechanism.
675
676 * eval.c (SCM_CEVAL): Apply the cmethod directly after having
677 called scm_memoize_method instead of doing a second lookup.
678
679 * objects.h (scm_memoize_method): Now returns the memoized cmethod.
680
681
682 Bugfix
683
684 * procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of
685 scm_sysintern so that the binding connected with the subr name
686 isn't cleared when we give set = 0.
687
688
689 1999-08-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
690
691 More transparent handling of ports with print states.
692
693 * print.h (SCM_PORT_WITH_PS_P, SCM_PORT_WITH_PS_PORT,
694 SCM_PORT_WITH_PS_PS): Represent ports with print states as a smob
695 instead of a pair of a port and a print state. We'll need to cons
696 once extra in scm_printer_apply but the type system will be
697 cleaner, it will mix better with GOOPS, and, it will be even more
698 transparent to the user.
699
700 * print.c (scm_get_print_state): New procedure: Given an output
701 port, return the print state associated to it in the current print
702 chain, if one exists;
703 (scm_port_with_print_state): New procedure: Associate a
704 print-state with a port.
705 (scm_valid_oport_value_p): Use SCM_PORT_WITH_PS_P;
706 (scm_printer_apply): Wrap port and pstate as a smob;
707 (print_state_printer): Removed.
708
709 * objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports.
710
711 * eval.c (scm_init_eval): Use scm_make_smob_type instead of
712 scm_newsmob.
713
714 * ports.c (scm_output_port_p): Bugfix: Coerce output port before
715 testing (otherwise the port-print-state trick won't be transparent
716 to the user; one example where this caused problems was in the
717 (ice-9 format) module).
718
719 1999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
720
721 * eval.c (SCM_CEVAL): Let the SCM_IM_SLOT_SET_X form return
722 SCM_UNSPECIFIED instead of the set value.
723
724 1999-08-20 James Blandy <jimb@mule.m17n.org>
725
726 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.
727
728 * ports.h (enum scm_port_rw_active): New enum, containing
729 SCM_PORT_READ, SCM_PORT_WRITE, and SCM_PORT_NEITHER (instead of
730 zero). The debugger knows about enums, but doesn't know about
731 #defines.
732 (typedef scm_port): Declare rw_active member to be an enum
733 scm_port_rw_active.
734 * fports.c (fport_flush, fport_end_input): Use SCM_PORT_NEITHER
735 instead of zero.
736 * ports.c (scm_add_to_port_table): Same.
737 * strports.c (st_flush, st_end_input): Same.
738
739 * ioext.c (scm_do_read_line, scm_read_line): Use scm_must_malloc,
740 scm_must_realloc, and scm_done_malloc as appropriate.
741
742 1999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
743
744 * sort.c (quicksort): Added condition to protect the algorithm
745 from crashing the interpreter if the less predicate is buggy.
746
747 1999-08-19 Gary Houston <ghouston@easynet.co.uk>
748
749 * fports.c (fport_write): fix line-buffering mode again.
750 (scm_open_file): recognise 'l' for line-buffering.
751 (scm_setvbuf): recognise _IOLBF for line-buffering.
752
753 1999-08-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
754
755 * Makefile.am (libguile_la_LDFLAGS): Increased the version number
756 of libguile to 5.0.
757
758 * eval.c (SCM_APPLY), sort.c (closureless): Expand body when
759 evaluating closures.
760
761 1999-08-18 Gary Houston <ghouston@easynet.co.uk>
762
763 * fports.c (fport_write): use memcpy instead of strncpy, in case
764 the data contains NUL.
765
766 1999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
767
768 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
769
770 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
771 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
772 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
773 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
774 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
775 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
776 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
777 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
778 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
779 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
780 scm_sym_ as prefix for symbols.
781
782 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
783
784 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
785 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
786 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
787 scm_sym_atcall_cc): Made global.
788
789 1999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
790
791 * eval.c (scm_sym_args): Made global.
792
793 * objects.c (scm_set_object_procedure_x): Disallow setting of
794 procedures for pure generic functions.
795
796 1999-08-12 Gary Houston <ghouston@easynet.co.uk>
797
798 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
799 Scheme name from lseek to seek, but lseek was added recently so
800 it shouldn't be a big problem.
801 * ports.c, gdbint.c, ioext.c: changed callers.
802
803 1999-08-11 Gary Houston <ghouston@easynet.co.uk>
804
805 * fports.c (fport_input_waiting): if select is used, return 1
806 instead of whatever FD_ISSET expands to. maybe it will be useful
807 to interpret the value from the input_waiting ptob procedure as a
808 lower bound on the number of bytes available.
809
810 * Mikael asked for a few names to be changed...
811
812 * ports.c (scm_make_port_type): take the write procedure as the
813 second argument instead of the flush procedure.
814 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
815 fflush -> flush, read_flush -> end_input, fclose -> close,
816 fill_buffer -> fill_input, ftruncate -> truncate,
817 input_waiting_p -> input_waiting.
818
819 * ports.c (end_input_void_port): was read_flush_void_port.
820 (scm_set_port_end_input): was scm_set_port_flush_input.
821 (scm_set_port_flush): was scm_set_port_write.
822 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
823 (scm_end_input): was scm_read_flush.
824 (scm_fill_input): was scm_fill_buffer.
825 (scm_flush): was scm_fflush.
826 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
827 (fport_end_input): was local_read_flush.
828 (fport_flush): was local_fflush.
829 (fport_close): was local_fclose.
830 (fport_truncate): was local_ftruncate.
831 (fport_seek): was local_seek.
832 (fport_free): was local_free.
833 (fport_fill_input): was fport_fill_buffer.
834 * strports.c (st_end_input): was st_read_flush.
835 (st_truncate): was st_ftruncate.
836 * vports.c: (sf_flush): was sfflush.
837 (sf_close): was sfclose.
838 (sf_fill_input): was sf_fill_buffer.
839
840 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
841 change callers.
842
843 1999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
844
845 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
846 forms now contain the expressions to be dispatched upon instead of
847 depending on a surrounding lambda or let; Generic function
848 dispatch has been optimized; `apply' on a generic function now
849 works a little bit strangely. It uses a trick so that the type
850 dispatch code in SCM_CEVAL can be reused.
851
852 * objects.h, objects.c (scm_apply_generic_env): Added (used by
853 apply).
854 (scm_operator_p): Added.
855 (scm_sym_atdispatch): Added.
856 (scm_set_object_procedure_x): Modified to handle the new style
857 generic functions.
858 (scm_object_procedures): New debugging procedure.
859
860 1999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
861
862 * eval.c, eval.h (scm_sym_args): Added.
863
864 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
865
866 * feature.c, feature.h (scm_c_run_hook): Added.
867
868 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
869 cdrxnoap and loopnoap instead of begin and loop.
870
871 1999-08-04 Gary Houston <ghouston@easynet.co.uk>
872
873 * ports.c (scm_putc, scm_puts),
874 * unif.c (scm_uniform_array_write): use scm_lfwrite.
875 * ports.c (scm_putc): change type of first argument from int to char.
876
877 1999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
878
879 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
880 SCM_IM_HASH_DISPATCH.
881
882 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
883 (scm_si_redfined, scm_si_hashsets): Moved.
884
885 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
886 flag which combines type and status info so that the class
887 redefinition protocol has zero cost during normal execution.
888
889 1999-08-03 Gary Houston <ghouston@easynet.co.uk>
890
891 * ports.h (scm_ptob_descriptor): include a write procedure again.
892 it's more efficient for unbuffered fports (e.g., sockets.)
893
894 * ports.c (scm_puts): use ptob->write.
895 * vports.c (scm_make_sfptob): set write proc in ptob.
896 * strports.c (scm_make_stptob): set write proc in ptob.
897 * ports.c (write_void_port): new procedure.
898 * vports.c (sf_write): new procedure.
899 * ports.c (scm_lfwrite): use ptob->write.
900 * strports.c (st_write): new procedure.
901 * fports.c (fport_write): new procedure.
902 (scm_make_fptob): set write in ptob to fport_write.
903 * ports.h: prototype for scm_set_port_write.
904 * ports.c (scm_make_port_type): initialise ptob write procedure.
905 (scm_set_port_write): new proc.
906
907 1999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
908
909 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
910 until we've verified that it is actually a port. (Thanks to
911 Lorentey Karoly.)
912
913 1999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
914
915 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
916 code, particularly an unnecessary test (len != size, where len ==
917 size). (Was this leftovers from debugging code, or have I missed
918 something profound?)
919
920 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
921 size. (Thanks to James Dean Palmer.)
922
923 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
924 (Thanks to Lorentey Karoly.)
925
926 1999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
927
928 * eval.c (scm_m_expand_body): Use scm_cons_source.
929
930 * struct.c (scm_print_struct): Use vtable name.
931
932 * print.c (scm_init_print): Set name of print state type.
933
934 * stacks.c (scm_init_stacks): Set name of stack type.
935
936 1999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
937
938 * eval.c (SCM_CEVAL): Removed old implementation of internal
939 define.
940
941 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
942
943 * debug.c, debug.h (scm_reverse_lookup): Added.
944 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
945 internal procedure definitions; Don't use scm_i_inner_name.
946
947 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
948 New isym operations.
949
950 * eval.h: Added prototypes for multi language support functions.
951
952 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
953 improper lists in the low-level representation, since that will
954 cause a begin to be prepended at macro expansion.
955
956 * eval.c (scm_cons_source): Version of cons which copies source
957 properties from an existing cell.
958 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
959
960 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
961 procedure source before calling scm_unmemocopy instead of faking
962 an environment.
963
964 1998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
965
966 Ported `internal defines' fix from SCM. Original ChangeLog entry:
967
968 1998-07-09 Radey Shouman <radey@colorage.com>
969
970 * eval.c (ceval_1): Modifications to allow rewriting of interal
971 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
972 body of which it is the CAR is macro expanded by m_expand_body,
973 which rewrites internal DEFINE.
974
975 (m_expand_body): Added.
976
977 (m_macroexp1): Added argument to control error checking:
978 m_expand_body may speculatively expand forms in the wrong
979 environments. Made argument number checks conditional on
980 RECKLESS.
981
982 (m_body): Added, error checks bodies and inserts the ISYM tokens.
983
984 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
985 call m_body.
986
987 (m_cond): (m_case): (m_quote): Modified to avoid destructively
988 changing their argument forms. Since m_expand_body
989 speculatively macro expands forms the process must be
990 reversible.
991
992 (m_ident_eqp): Fixed to use proper environment.
993
994 (renamed_ident): Added DEFER_INTS_EGC.
995
996 Added prototypes for static functions.
997
998 * eval.c
999
1000 (undef_cell): New.
1001
1002 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
1003 is false, do not produce an error for unbound variables, return a
1004 pointer to cell_undef instead.
1005
1006 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
1007
1008 (scm_m_body): New.
1009
1010 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
1011 destructively changing their argument forms. Since m_expand_body
1012 speculatively macro expands forms the process must be reversible.
1013
1014 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
1015 SCM_IM_LET introduced by named lets.
1016
1017 (scm_m_letstar): Use scm_m_body instead of bodycheck.
1018
1019 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
1020 scm_letrec. scm_letrec1 does not check for a null binding and
1021 takes an additional argument to specify the ISYM of the body. Use
1022 scm_m_body instead of bodycheck.
1023
1024 (scm_m_let): Use scm_m_body instead of bodycheck.
1025
1026 (scm_m_expand_body, scm_macroexp): New.
1027
1028 (unmemocopy): Account for ISYMs introduced by scm_m_body.
1029
1030 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
1031 check=1. Throw error for internal defined that have not been
1032 rewritten by scm_m_expand_body.
1033
1034 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
1035 Removed prototype for SCM_APPLY.
1036
1037 * tags.h: Added extern declaration of scm_isymnames.
1038
1039 1999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1040
1041 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
1042
1043 * lang.c: New file: Beginning of multi-language support.
1044
1045 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
1046
1047 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
1048 (scm_dynamic_wind): Added argument checking for the after guard so
1049 that we don't add garbage on the dynwind chain.
1050 (scm_swap_bindings): Added.
1051
1052 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
1053 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
1054 (scm_isymnames): New isyms for multi-language support.
1055
1056 * eval.c (scm_nil, scm_t): New symbols.
1057 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
1058 forms for multi-language support.
1059
1060 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1061
1062 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
1063 Added.
1064 Renamed functions in the random function library interface
1065 from scm_i_XXX --> scm_c_XXX.
1066
1067 1999-07-25 Gary Houston <ghouston@easynet.co.uk>
1068
1069 * ports.c (scm_putc): fix line-buffering.
1070
1071 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1072
1073 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
1074 scm_set_ptob_XXX --> scm_set_port_XXX.
1075
1076 1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1077
1078 * ports.c, ports.h (scm_make_port_type): New interface for
1079 creation of port types (replaces scm_newptob). Just as for the
1080 smobs, we need to separate the internal representation of smob
1081 types from the interface, so that we easily can add new fields and
1082 rearrange things without caring about backward compatibility.
1083 This change was forced by the need in GOOPS to create classes
1084 representing port types.
1085 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
1086 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
1087 scm_set_ptob_seek, scm_set_ptob_truncate,
1088 scm_set_ptob_input_waiting_p): New setters.
1089 (scm_newptob): Rewritten to use scm_make_port_type. For backward
1090 compatibility.
1091 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
1092 (scm_prinport): Removed.
1093 (scm_port_print): Added.
1094 (scm_print_port_mode): Added.
1095 (void_port_ptob, print_void_port, close_void_port, noop0):
1096 Removed. Removed #include "genio.h" Added #include "objects.h",
1097 #include "smobs.h"
1098
1099 * fports.c (prinfport): Moved code from ports.c.
1100 (local_free): Added.
1101 (scm_fptob): Removed. Instead use new interface.
1102 (scm_make_fptob): Added. (Need to create basic ports in a
1103 specific order in ports.c.)
1104
1105 * strports.c (scm_stptob, prinstpt, noop0): Removed
1106 (scm_make_stptob): Added.
1107
1108 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
1109 (scm_make_sfport): Added.
1110
1111 * filesys.c (scm_dir_print): Don't use the port printing code.
1112 Instead provide specific directory printer.
1113
1114 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
1115
1116 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
1117 scm_ptob_descriptor.
1118
1119 * smob.c (scm_smob_print): Handle non-existing type name nicely.
1120 Removed #include "genio.h"
1121
1122 * objects.c (scm_make_port_classes): New function ptr.
1123
1124 1999-07-24 Gary Houston <ghouston@easynet.co.uk>
1125
1126 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
1127
1128 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
1129 allow the 1st argument to be a fdes or filename as well as a
1130 port (as in the filesys.c version).
1131
1132 * filesys.c (scm_truncate_file): removed.
1133
1134 1999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1135
1136 * readline.c, readline.h: Removed.
1137
1138 * objects.c, objects.h (scm_port_class): Added.
1139 (scm_class_of): Look up port class in scm_port_class.
1140 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
1141 SCM_INOUT_PCLASS_INDEX): Added.
1142
1143
1144 * Makefile.am: Removed genio.c, genio.x.
1145
1146 * genio.c: Removed.
1147
1148 1999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1149
1150 * init.c: Make sure that scm_post_boot_init_modules is called only
1151 once. (Important when using a dumped image.; Thanks to Bernard
1152 Urban.)
1153
1154 1999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
1155
1156 * guardians.c (scm_guardian_zombify): Separate scanning for
1157 zombies from marking the pairs of the free list.
1158
1159 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
1160 use the macros. (Thanks to Michael Livshin.)
1161
1162 * eval.c (scm_m_lambda): Let bodycheck check the body of the
1163 lambda. Let your sins be purified by the blood of the lambda.
1164 (Thanks to Eric Hanchrow.)
1165
1166 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
1167 (Thanks to Valdis Kletnieks.)
1168
1169 Fixes for EMX from Mikael Ståldal.
1170
1171 * filesys.c: #include <io.h>, if we have it.
1172 * scmconfig.h.in: Regenerated.
1173
1174 * stime.c (ftime): Delete declaration for this function --- let
1175 the system supply it.
1176
1177 Cleanups from John Bley.
1178
1179 * gdbint.c: Don't include <stdio.h> and "_scm.h" twice.
1180
1181 * gsubr.c: Don't include "gsubr.h" twice.
1182
1183 Cleanups for compilation on Irix 6, from David Kaelbling.
1184
1185 * regex-posix.c (scm_regexp_error_msg): Change `rx' argument to
1186 regex_t pointer. This is what the callers have, mostly.
1187 (scm_regexp_exec): Don't forget to pass the `rx' argument to
1188 scm_regexp_error_msg.
1189
1190 * scmsigs.c (scm_sigaction): Cast SIG_DFL and SIG_IGN to SCM, not
1191 int. That way, if we get a warning on this line, it's more likely
1192 that we're really missing bits we care about.
1193
1194 * snarf.h (SCM_CONST_LONG): Remove trailing semicolon from
1195 definition.
1196
1197 * tags.h (SCM_IMP, SCM_NCONSP, SCM_NCELLP, SCM_ITAG3, SCM_TYP3,
1198 SCM_TYP7, SCM_TYP7S, SCM_TYP16, SCM_TYP16S, SCM_GCTYP16,
1199 SCM_GCMARKP, SCM_GC8MARKP): Don't cast to int. Either SCM or no
1200 cast at all is more appropriate in every case. At the moment, we
1201 assume everywhere that SCM is an integral type anyway.
1202
1203 1999-07-14 Gary Houston <ghouston@easynet.co.uk>
1204
1205 * unif.c (scm_uniform_array_read_x), ports.c (scm_getc): increment
1206 read_pos after scm_fill_buffer.
1207
1208 * ioext.c (scm_do_read_line): simplify by ignoring the fill_buffer
1209 return char.
1210
1211 * vports.c (sf_fill_buffer), strports.c (stfill_buffer),
1212 fports.c (fport_fill_buffer): implement the interface change.
1213
1214 * ports.c (scm_fill_buffer): interface change: no longer increments
1215 read_pos past the character that's returned. it seems clearer to
1216 leave it to the caller to decide what to do (thanks Jim).
1217
1218 * vports.c (sf_fill_buffer): put the read char into the buffer
1219 as well as returning it.
1220
1221 * ports.c (scm_grow_port_cbuf): residue of this deleted procedure
1222 deleted.
1223
1224 1999-07-13 Gary Houston <ghouston@easynet.co.uk>
1225
1226 * strports.c (scm_strprint_obj): simplify. start with initial
1227 buffer size of 0.
1228 (st_seek): don't allow string to be extended if seeking past
1229 the end of a read-only port.
1230
1231 1999-07-12 Gary Houston <ghouston@easynet.co.uk>
1232
1233 * strports.c (st_seek): change the resize checks.
1234
1235 * ports.c (scm_ftruncate): throw error if offset works out negative.
1236
1237 * strports.c (st_flush): increase string size in blocks of
1238 SCM_WRITE_BLOCK instead of 1. set read_end to read_pos if
1239 it's greater and reset read_buf_size.
1240 (scm_mkstrport): set rw_randow if only writing, since read_buf needs
1241 to be maintained for output ports too (it holds the written
1242 part of the string, while write_buf may have unwritten buffer
1243 chars.)
1244 (st_truncate): rewritten.
1245 (top of file): added a few notes.
1246
1247 1999-07-10 Jim Blandy <jimb@savonarola.red-bean.com>
1248
1249 Patch from Greg Badros:
1250 * snarf.h (SCM_PROC, SCM_PROC1): Use __cplusplus or
1251 GUILE_CPLUSPLUS_SNARF macros to force adding a cast to the last
1252 (function pointer) argument to scm_make_gsubr and scm_make_subr
1253 calls. This avoids warnings in C++ programs using guile-snarf.
1254
1255 1999-07-06 Gary Houston <ghouston@easynet.co.uk>
1256
1257 * strports.c (st_grow_port): set pt->read_pos. set
1258 pt->read_buf_size one less than pt->write_buf_size if there's
1259 an unwritten char at the end of the string. similarly for
1260 pt->read_end.
1261 (st_resize_port): renamed from st_grow_port.
1262 (st_seek): simplify by assuming that pt->write_pos == pt->read_pos.
1263 seek from read_end instead of write_end for SEEK_END.
1264 (st_ftruncate): calculate current length using readbuf, not write
1265 buf.
1266 (scm_strport_to_string): use read_buf_size for length.
1267 (stfill_buffer): don't re-initialise the readbuf.
1268
1269 1999-07-05 Gary Houston <ghouston@easynet.co.uk>
1270
1271 * strports.c (scm_strport_to_string): new procedure.
1272 (scm_call_with_output_string, scm_strprint_obj): use
1273 scm_strport_to_string.
1274 used SCM_INUM0 instead of SCM_MAKINUM (0) in a few places.
1275
1276 1999-07-08 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1277
1278 * symbols.c (scm_gensym): Bugfix. (Thanks to Johannes Hjorth.)
1279
1280 Fri Jun 25 22:14:32 1999 Greg Badros <gjb@cs.washington.edu>
1281
1282 * smob.c: added scm_make_smob_type_mfpe (), scm_set_smob_mfpe ();
1283 use scm_make_smob_type_mfpe to initialize "free", "flo", "bigpos",
1284 and "bigneg" smob types.
1285
1286 * smob.h: Add do ... while(0) idiom to SCM_NEWSMOB. Added
1287 SCM_RETURN_NEWSMOB macro. Added protos for new functions in
1288 smob.c.
1289
1290 * *.c: Use scm_make_smob_type_mfpe, instead of scm_newsmob, and
1291 use SCM_NEWSMOB or SCM_RETURN_NEWSMOB in constructors instead of
1292 SCM_NEWCELL and setting the CAR/CDR by hand.
1293
1294 1999-07-04 Gary Houston <ghouston@easynet.co.uk>
1295
1296 * ports.c (scm_putc): call scm_read_flush.
1297 (scm_puts): likewise.
1298 (scm_lfwrite): likewise.
1299 (scm_lseek): likewise.
1300 (scm_ftruncate): likewise.
1301 * unif.c (scm_uniform_array_write): likewise.
1302 * ioext.c (scm_redirect_port): likewise.
1303
1304 * ports.c (scm_fill_buffer): don't take pt argument. change callers.
1305 (read_flush_void_port): new proc, for void port ptob.
1306
1307 * vports.c (sf_read_flush): likewise.
1308 * strports.c (st_read_flush): take offset arg.
1309 * fports.c (local_read_flush): use offset, don't reset putback
1310 buffer here.
1311
1312 * ports.h (scm_ptobfuns): let read_flush take an offset argument,
1313 which is the number of chars from the putback buffer.
1314
1315 * ports.c (scm_read_flush): new procedure, resets the putback
1316 buffer before calling the ptob routine.
1317
1318 * strports.c (scm_strprint_obj): bug fix: get pt from the port,
1319 not from the parameter obj. (Thanks to Eric Moore.)
1320
1321 * ports.h: SCM_CRDY, SCM_CUC, SCM_CRDYP, SCM_SETRDY, SCM_CUNGET,
1322 SCM_CGETUN, SCM_CLRDY, SCM_TRY_CLRDY, SCM_N_READY_CHARS: deleted.
1323
1324 * strings.c (scm_make_string): throw error if 2nd arg isn't
1325 a char.
1326
1327 * unif.c (scm_uniform_array_read_x): fix reading from a port.
1328 allow non-fports.
1329 (scm_uniform_array_write): likewise.
1330
1331 1999-06-29 Gary Houston <ghouston@easynet.co.uk>
1332
1333 * ports.c (scm_drain_input): rewritten.
1334
1335 * fports.c (local_fclose): check putback_buf.
1336 (local_read_flush): likewise.
1337
1338 * ports.c (scm_remove_from_port_table): maybe free putback_buf.
1339
1340 * ports.h (scm_port): replace cbuf/cbufend/cp with putback_buf/
1341 putback_buf_size.
1342 (SCM_INITIAL_PUTBACK_BUF_SIZE): renamed from SCM_INITIAL_CBUF_SIZE.
1343
1344 * ports.c (scm_grow_port_cbuf): deleted.
1345 (scm_add_to_port_table): initialise putback_buf to 0. remove cbuf
1346 stuff.
1347 (scm_char_ready_p): check putback_buf
1348 (scm_fill_buffer): likewise.
1349 (scm_ungetc): rewritten.
1350
1351 1999-06-27 Gary Houston <ghouston@easynet.co.uk>
1352
1353 * fports.c (local_fclose): account for push-back buffer.
1354
1355 * ports.c (scm_char_ready_p): check the push-back buffer in
1356 a new way.
1357
1358 * ioext.c (scm_do_read_line): remove the extra code to handle
1359 the push-back buffer.
1360
1361 * ports.c (scm_getc): don't use SCM_CRDYP etc.
1362
1363 * ioext.c (scm_do_read_line): call scm_fill_buffer.
1364
1365 * ports.c (scm_ungetc): don't call SCM_CUNGET. reset the
1366 read buffer pointers.
1367 scm_fill_buffer: new procedure.
1368 (scm_getc): call scm_fill_buffer.
1369
1370 * ports.h (struct scm_port): saved_read_buf, saved_read_pos,
1371 saved_read_end: new fields.
1372
1373 1999-06-24 Mikael Djurfeldt <mdj@orjan.nada.kth.se>
1374
1375 * dynl-dl.c (sysdep_dynl_link): Added parenthesis around the
1376 trinary conditional in order for the flag computation to be
1377 correct.
1378
1379 1999-06-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1380
1381 * struct.c, struct.h:
1382
1383 In order to support different kinds of deallocation, a destructor
1384 slot has been added to struct vtables. This allows for structs
1385 containing pointers to other memory blocks.
1386
1387 (scm_struct_i_free): New hidden struct slot. Holds destructor for
1388 instances to this vtable.
1389 (scm_struct_free_0): New destructor: Doesn't deallocate data.
1390 (scm_struct_free_light): New destructor: Deallocates a light
1391 struct (i.e. a struct without hidden slots).
1392 (scm_struct_free_standard): New destructor: Deallocates standard
1393 structs.
1394 (scm_struct_free_entity): New destructor: Deallocates entity
1395 structs.
1396 (SCM_SET_VTABLE_DESTRUCTOR): New macro.
1397
1398 Changes to hidden slots:
1399
1400 (scm_struct_i_size): scm_struct_i_flags now shares space with
1401 scm_struct_i_size which holds the size of light structs.
1402 (scm_struct_i_n_words): This slot has changed meaning. Previously
1403 it included hidden slots. Now it indicates visible slots.
1404 (scm_alloc_struct): Clear flags.
1405 (SCM_STRUCTF_MASK): 4 new flag positions added => 12 bits.
1406
1407 (struct_num, scm_struct_i_tag): Removed.
1408 (scm_struct_vtable_tag): Base tag on the pointer to mallocated
1409 memory.
1410 (scm_struct_ihashq): Base hash value on pointer to struct handle.
1411
1412 * tag.c (scm_tag): Base tag on vtable pointer.
1413
1414 * objects.c (scm_init_objects): Initialize destructor slot of the
1415 primordial entity class.
1416
1417 * objects.h (SCM_SET_CLASS_DESTRUCTOR,
1418 SCM_SET_CLASS_INSTANCE_SIZE): New macros.
1419
1420 * gc.c (scm_gc_sweep): Call struct free slot.
1421
1422 * keywords.c, keywords.h (scm_c_make_keyword): New function.
1423 (We should remove the use of the prefix '-'.)
1424
1425 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): New macros.
1426
1427 * libguile.h: #include "objects.h"
1428
1429 1999-06-22 Marius Vollmer <mvo@zagadka.ping.de>
1430
1431 * dynl.c (DYNL_GLOBAL): New.
1432 (sysdep_dynl_link): Added `flags' argument.
1433 (kw_global, sym_global): New.
1434 (scm_dynamic_link): Handle keyword arguments. Pass suitable flags
1435 to sysdep_dynl_link.
1436 * dynl-dl.c (sysdep_dynl_link): Handle new `flags' argument by
1437 conditrionally adding RTLD_GLOBAL to DLOPEN_MODES.
1438 * dynl-shl.c (sysdep_dynl_link): Add and ignore new flags
1439 argument.
1440 * dynl-dld.c (sysdep_dynl_link): Add and ignore new flags
1441 argument.
1442 * dynl.h (scm_dynamic_link): Added rest argument.
1443
1444 1999-06-21 Marius Vollmer <mvo@zagadka.ping.de>
1445
1446 * dynl.c (sysdep_dynl_unlink, sysdep_dynl_func): Use const
1447 qualifier for char* argument, to match prototypes. Thanks to Mark
1448 Elbrecht.
1449
1450 1999-06-21 Jim Blandy <jimb@savonarola.red-bean.com>
1451
1452 * dynl.c (no_dynl_error, sysdep_dynl_link, sysdep_dynl_unlink,
1453 sysdep_dynl_func): Use ANSI declarations, and const char *
1454 pointers. (Thanks to Mark Elbrecht.)
1455
1456 1999-06-19 Jim Blandy <jimb@savonarola.red-bean.com>
1457
1458 Patch from Greg Harvey:
1459 * eq.c, eval.c, list.c, ramap.c, vectors.c: Always write parens
1460 around the condition of an `if', `while', etc., even if the
1461 condition is a macro invocation that expands to something
1462 surrounded by parens. It's more readable.
1463
1464 * eval.c (scm_map, scm_for_each): Verify that all arguments are
1465 proper lists, and of the appropriate lengths.
1466 (check_map_args): New function. (Thanks to Greg Harvey for the
1467 bug report.)
1468
1469 1999-06-19 Michael Livshin <mike@olan.com>
1470
1471 * guardians.c (guardian_t): `next' - new field to be used for
1472 chaining the live guardians in a single-linked list during the GC
1473 mark phase.
1474 (GUARDIAN_NEXT): convenience macro to access the `next' field.
1475 (guardians, guardians_size, n_guardians): deleted.
1476 (first_live_guardian, current_link_field): new globals used to
1477 point to the head of the live guardian list and current `next'
1478 field, respectively.
1479 (g_mark): append the guardian to the live guardian list.
1480 (scm_guardian_gc_init): zero the live guardian list.
1481 (scm_guardian_zombify): iterate through the live guardian list.
1482
1483 (Applied by Jim Blandy.)
1484
1485 1999-06-16 Jim Blandy <jimb@savonarola.red-bean.com>
1486
1487 * gc.c (scm_mallocated): Just make this signed.
1488 (scm_igc): Check for underflow by seeing if this is negative.
1489 Much cleaner.
1490 * gc.h (scm_mallocated): Fix declaration.
1491 (Thanks to Greg Harvey.)
1492
1493 * ports.h: #include <sys/types.h>, to get a definition for `off_t'.
1494
1495 1999-06-15 Jim Blandy <jimb@savonarola.red-bean.com>
1496
1497 * stime.c (bdtime2c): Initialize lt->gmtoff and lt->tm_zone from
1498 sbd_time. (Thanks to Eric Hanchrow.)
1499
1500 Fix from Ken Raeburn <raeburn@raeburn.org>:
1501 * weaks.c (scm_make_weak_vector): Add another extra slot before
1502 vector contents, to be used only during garbage collection.
1503 * weaks.h (SCM_WVECT_GC_CHAIN): New macro to access it.
1504 * gc.c (scm_weak_vectors): Now a SCM instead of a SCM*, and now
1505 static.
1506 (scm_weak_size, scm_n_weak): Deleted.
1507 (scm_igc): Use SCM_WVECT_GC_CHAIN to build up a chain of weak
1508 vectors without allocating new storage during GC, using
1509 scm_weak_vectors as the head of the chain.
1510 (scm_mark_weak_vector_spines): Walk SCM_WVECT_GC_CHAIN chain
1511 instead of stepping through an array.
1512 (scm_gc_sweep): Update offset used to find start of weak vector to
1513 free it.
1514 (scm_init_storage): Set scm_weak_vectors to EOL.
1515
1516 Fix from Ken Raeburn <raeburn@raeburn.org>:
1517 * gc.c (already_in_gc): New variable.
1518 (scm_igc): Set and clear already_in_gc; abort if it's set at
1519 entry.
1520
1521 1999-06-14 Jim Blandy <jimb@savonarola.red-bean.com>
1522
1523 Fix from Gary Houston:
1524 * fports.c (local_seek): Signal an error if the seek fails.
1525 * ports.c (scm_lseek): Don't check return value of port's seek
1526 function; it's its job to signal an error if there's a problem.
1527
1528 1999-06-12 Jim Blandy <jimb@savonarola.red-bean.com>
1529
1530 * strports.c (scm_call_with_output_string): Don't include the
1531 extra character at the end of the string in the result.
1532
1533 * ioext.c (scm_read_line): Switch to reading properly.
1534
1535 * fports.c, fports.h, gc.c, gdbint.c, ioext.c, ports.c, ports.h,
1536 scmsigs.c, strports.c, vports.c: Install the sources which
1537 actually correspond to the changes described below. I got the
1538 ChangeLog entries and the patch from two different places...
1539
1540 1999-06-09 Jim Blandy <jimb@savonarola.red-bean.com>
1541
1542 * gc.c (scm_igc): Check for scm_mallocated underflow. Otherwise,
1543 it shows up as terrible performance, as we GC constantly.
1544
1545 * ioext.c (scm_do_read_line): Rewritten to use memchr to find the
1546 newline. A bit faster, and definitely hairier.
1547 (scm_read_line): Count newlines here instead.
1548
1549 * strings.c (scm_take_str): New function.
1550 (scm_take0str): Reimplement in terms of scm_take_str. * strings.h
1551 (scm_take_str): New declaration. * ioext.c (scm_read_line): Use
1552 scm_take_str, to avoid copying the string.
1553
1554 Add some simple-minded support for line buffered ports.
1555 * ports.h (SCM_BUFLINE): New flag for ports.
1556 * init.c (scm_init_standard_ports): Request line-buffering on
1557 the standard output port.
1558 * ports.c (scm_mode_bits): Recognize 'l' as a request for line
1559 buffering.
1560 (scm_putc, scm_puts, scm_lfwrite): If the port is line-buffered,
1561 and there's a newline to be written, flush the port.
1562
1563 Gary Houston's open-buffer port patches:
1564
1565 1999-04-26 Gary Houston <ghouston@easynet.co.uk>
1566
1567 * ports.c: (scm_lseek): clear buffers even if just reading current
1568 position.
1569
1570 * fports.c (local_fclose): call local_fflush unconditionally.
1571 (various): don't use the scm_must... memory procs.
1572
1573 1999-04-25 Gary Houston <ghouston@easynet.co.uk>
1574
1575 * ports.h (scm_port): make read_pos a pointer to const.
1576 strports.c: take care of rw_active and rw_randow.
1577 fports.c: scm_fport_drain_input: removed. do it all in ports.c.
1578 strports.c (scm_mkstrport): check that pos is reasonable.
1579 ioext.c (scm_ftell, scm_fseek): use lseek.
1580 (SCM_CLEAR_BUFFERS): macro deleted.
1581 ioext.c (redirect_port: use ptob fflush, read_flush.
1582 ports.h (scm_ptobfuns): add ftruncate.
1583 ports.c (scm_newptob): set ftruncate.
1584 adjust ptob tables.
1585 ports.c (scm_ftruncate): new procedure.
1586 fports.c (local_ftrunate), strports.c (str_ftruncate): new procs.
1587 strports.c (st_seek, st_grow_port): new procs.
1588 fports.h (scm_port): change size types from int to off_t.
1589 ports.c (scm_init_ports): initialise the seek symbols here
1590 instead of in ioext.c.
1591 strports.c (scm_call_with_output_string): start with an empty
1592 string, so seek and ftruncate can be used.
1593
1594 gdbint.c: adjust string port usage.
1595
1596 1999-04-24 Gary Houston <ghouston@easynet.co.uk>
1597
1598 * ports.h (scm_ptobfuns): add a read_flush procedure which is the
1599 equivalent to fflush for the read buffer.
1600 * ports.c (scm_newptob): set read_flush.
1601 ports.c (void_port_ptob): set read_flush.
1602 fports.c (local_read_flush): new proc. add to ptob.
1603 strport.c (st_read_flush): likewise.
1604 vport.c (sf_read_flush): likewise.
1605 fports.h (struct scm_fport): remove random member. there's nothing
1606 left but fdes. leaving it as a struct to allow for future changes.
1607 fports.c: replace usage of scm_fport::random with scm_port::rw_random.
1608 ports.c: (scm_putc, scm_puts, scm_lfwrite): call the read_flush
1609 ptob proc if the read buffer is filled.
1610
1611 1999-04-23 Gary Houston <ghouston@easynet.co.uk>
1612
1613 * ports.h (scm_port): add a rw_random member and replace
1614 reading and writing members with rw_active member.
1615 SCM_PORT_READ/SCM_PORT_WRITE: new values.
1616
1617 1999-04-22 Gary Houston <ghouston@easynet.co.uk>
1618
1619 * ports.h (struct scm_port_table): add writing and reading members
1620 to replace write_needs_seek: it isn't good enough for non-fports.
1621 ports.c, ioext.c, fports.c: corresponding changes.
1622 (struct scm_port_table): give it a typedef and rename to scm_port.
1623 ports.c, fports.c, strports.c, vports.c, ioext.c, ports.h:
1624 corresponding changes.
1625
1626 1999-04-20 Gary Houston <ghouston@easynet.co.uk>
1627
1628 * ports.c (scm_newptob): bugfix: set seek member.
1629 * (scm_lseek): new procedure, using code from ioext.c:scm_fseek
1630 and generalised to all port types.
1631
1632 1999-04-18 Gary Houston <ghouston@easynet.co.uk>
1633
1634 * scmsigs.c (scm_init_scmsigs): set the SA_RESTART flag for all
1635 signals (it was only being done for handlers installed from Scheme).
1636 Otherwise (for example) SIGSTOP followed by SIGCONT on an interpreter
1637 waiting for input caused an EINTR error from read.
1638
1639 1999-04-07 Gary Houston <ghouston@easynet.co.uk>
1640
1641 * ports.h (struct scm_port_table): make all the char members
1642 unsigned, so they convert to int without becoming negative if large.
1643
1644 1999-03-14 Gary Houston <ghouston@easynet.co.uk>
1645
1646 * fports.c (scm_fdes_wait_for_input): forgot to check compilation
1647 with threads enabled. rename this procedure to
1648 fport_wait_for_input and take a port instead of a fdes.
1649 use scm_fport_input_waiting_p instead of scm_fdes_waiting_p.
1650
1651 * readline.c (scm_readline): Applied a patch from Greg Harvey to
1652 get readline support working again: use fdopen to get FILE objects.
1653
1654 1999-02-26 Gary Houston <ghouston@easynet.co.uk>
1655
1656 * gc.c (scm_init_storage): install an atexit proc to flush the
1657 ports.
1658 (cleanup): the new proc. it sets a global variable which can be
1659 checked by the ptob flush procs to avoid trying to throw
1660 exceptions during exit. not very pleasant but it seems more reliable.
1661 * fports.c (local_fflush): check terminating variable and if set
1662 don't throw exception.
1663 * CHECKME: that the atexit proc is installed if unexec used.
1664
1665 * throw.c (scm_handle_by_message): don't flush all ports here.
1666 it still causes bus errors.
1667
1668 * fports.h (SCM_FPORT_CLEAR_BUFFERS): rename to SCM_CLEAR_BUFFERS
1669 and move to ioext.c.
1670
1671 * fports.c (scm_fdes_waiting_p): merged into fport_input_waiting_p.
1672
1673 * ports.c (scm_char_ready_p): check the port buffer and call the
1674 ptob entry if needed.
1675
1676 * ports.h (scm_ptobfuns): input_waiting_p added. change all the
1677 ptob initialisers. use it in char-ready
1678
1679 * ioext.c (scm_do_read_line): moved from ports.c. make it static.
1680
1681 * vports.c (sfflush): modified to write a char (since softports
1682 currently use shortbuf.)
1683
1684 * fports.c (scm_standard_stream_to_port): moved to init.c and
1685 made static.
1686
1687 * init.c (scm_init_standard_ports): make stdout and stderr
1688 unbuffered if connected to a terminal. with stdio they
1689 were line-buffered by default.
1690
1691 (scm_ptobfuns): fputc, fputs, fwrite, fgetc, fgets removed.
1692 update ptob tables.
1693
1694 * ports.h (scm_ptobfuns): change fflush return to void.
1695 change flush proc definitions.
1696
1697 * strports.c (scm_call_with_output_string): get size from
1698 buffer instead of port stream.
1699 (st_flush): new proc.
1700
1701 * ports.h (struct scm_port_table): added write_end member,
1702 as an optimisation. set it where write_buf_size is set.
1703
1704 * ports.h (struct scm_port_table): change stream from void *
1705 back to SCM. SCM presumably must be large enough to hold a
1706 pointer (and probably vice versa but who knows.)
1707 (SCM_SSTREAM): deleted. change users back to SCM_STREAM.
1708
1709 (scm_puts): rewritten
1710 * fports.c (local_ffwrite, local_fputs): removed.
1711 * strports.c (stputc, stputs, stwrite): dyked out (FIXME)
1712 * vports.c (sfputc, sfputs, sfwrite) likewise.
1713 * ports.c (write_void_port, puts_void_port): removed.
1714 (putc_void_port, getc_void_port, fgets_void_port): likewise.
1715
1716 * ports.c (scm_lfwrite): rewritten using fport.c version.
1717
1718 * fports.c (local_fputc): deleted.
1719
1720 * ports.c (scm_add_to_port_table): initialise write_needs_seek.
1721
1722 * ports.h (scm_ptobfuns): add seek function pointer.
1723 * fports.c: set it to local_seek, new procedure.
1724
1725
1726 * fports.h (SCM_MAYBE_DRAIN_INPUT): moved to ports.c.
1727 use ptob for seek. take ptob instead of fport arg.
1728
1729 * ports.h (struct scm_port_table): new member write_needs_seek,
1730 replaces reading member in fport struct.
1731
1732 * vports.c (sfgetc): store the getted char into the buffer.
1733 rename to sf_fill_buffer and install it for fill-buffer in ptob.
1734 the Scheme interface is still a procedure that gets a char.
1735 (scm_make_soft_port): set up the port buffer (shortbuf).
1736
1737 * fports.c (local_fgetc, local_fgets): deleted.
1738 * strports.c (stgetc): likewise.
1739 * ports.c: scm_generic_fgets: likewise.
1740
1741 * ports.h (scm_ptobfuns): add fill_buffer.
1742 * ports.c (scm_newptob): assign it.
1743 * strports.c (scm_mkstrport): set up the buffer.
1744 put just the string into the stream, not cons (pos stream).
1745 (stfill_buffer): new proc.
1746
1747 * ports.h: fport buffer moved into port table: to be
1748 used for all port types.
1749
1750 1998-12-20 Gary Houston <ghouston@easynet.co.uk>
1751
1752 * throw.c (scm_handle_by_message): flush ports at exit.
1753
1754 * socket.c (scm_sock_fd_to_port): use scm_fdes_to_port.
1755 (scm_getsockopt, scm_setsockopt, scm_shutdown, scm_connect,
1756 scm_bind, scm_listen, scm_accept, scm_getsockname,
1757 scm_getpeername, scm_recv, scm_send, scm_recvfrom,
1758 scm_sendto,
1759 use SCM_FPORT_FDES. use SCM_OPFPORTP not SCM_FPORTP.
1760
1761 * posix.c (scm_getgroups): use SCM_ALLOW/DEFER_INTS.
1762 (scm_ttyname): use SCM_FPORT_FDES.
1763 (scm_tcgetpgrp, scm_tcsetpgrp): likewise.
1764
1765 * filesys.c (scm_chown): use SCM_FPORT_FDES.
1766 (scm_chmod, scm_stat, scm_truncate_file: likewise.
1767
1768 * ioext.c (scm_isatty_p): use SCM_FPORT_FDES.
1769 (scm_fdes_to_ports): modified.
1770 (scm_fdopen): use scm_fdes_to_port.
1771
1772 * ports.c (scm_init_ports): don't try to flush ports using
1773 atexit(). it's too late, errors will cause SEGV.
1774
1775 * fports.c (scm_fport_buffer_add): new procedure.
1776
1777 * fports.h (SCM_FDES_RANDOM_P): new macro. use it in
1778 scm_fdes_to_port and scm_redirect_port.
1779
1780 * ioext.c (scm_redirect_port): use setvbuf to set buffers in the
1781 new port. reset fp->random.
1782
1783 * fports.c (scm_fdes_to_port), ports.c (scm_void_port),
1784 filesys.c (scm_opendir):
1785 restore defer interrupts while the port is constructed.
1786 (scm_setvbuf): if mode is _IOFBF and size is not supplied,
1787 derive buffer size from fdes or use a default.
1788 (scm_fdes_to_port): use setvbuf instead of creating the buffers
1789 directly.
1790
1791 vports.c (various places): use SCM_SSTREAM.
1792 strports.c: likewise.
1793 * gdbint.c: likewise.
1794 * ports.h (SCM_SSTREAM): new macro.
1795
1796 * fports.c (scm_input_waiting_p): use scm_return_first, since port
1797 may be removed from the stack by the tail call to scm_fdes_waiting_p.
1798
1799 * fports.h (SCM_CLEAR_BUFFERS): new macro.
1800
1801 * filesys.c (scm_fsync): use SCM_FDES.
1802
1803 * ports.c (scm_force_output): call scm_fflush.
1804
1805 * print.c (scm_newline): don't check errno for EPIPE (it wouldn't
1806 reach this point.) don't flush port (if scm_cur_outp).
1807
1808 * fports.h (SCM_FPORT_FDES): new macro.
1809
1810 * filesys.c (scm_fcntl): get fdes from fport.
1811 (set_element, get_element): likewise.
1812
1813 * vports.c (sfflush): don't need to set errno.
1814
1815 * ports.c: install scm_flush_all_ports to be run on exit.
1816
1817 * filesys.c (scm_open): adjust port_mode for O_APPEND and O_CREAT.
1818
1819 ports.c fports.c ioext.c posix.c socket.c net_db.c filesys.c:
1820 removed all uses of SCM_DEFER/ALLOW ints for now. they were mainly
1821 just protecting errno. some may need to be put back.
1822
1823 * scmsigs.c (take_signal): save and restore errno while this
1824 proc runs.
1825
1826 *fports.c (print_pipe_port, local_pclose, scm_pipob): deleted.
1827 open-pipe, close-pipe are emulated in (ice-9 popen)
1828 ports.c (scm_ports_prehistory): don't init scm_pipob.
1829 ports.h (scm_tc16_pipe): deleted.
1830 posix.c (scm_open_pipe, scm_close_pipe): deleted.
1831
1832 * ioext.c (scm_primitive_move_to_fdes): use fport.
1833 * fport.c (scm_fport_fill_buffer): flush write buffer if needed.
1834 change arg type from scm_fport to SCM port.
1835 fport.h (SCM_SETFDES): removed.
1836 (SCM_MAYBE_DRAIN_INPUT): new macro.
1837
1838 * fport.h (struct scm_fport): added 'random'.
1839 fport.c (scm_open_file): set random if lseek works.
1840
1841 * ioext.c (scm_dup_to_fdes): use SCM_FSTREAM.
1842 (scm_ftell): always use lseek and account for the buffer.
1843 (scm_fileno): use fport buffer.
1844 (scm_fseek): clear fport buffers. always use lseek.
1845
1846 * posix.c (scm_pipe): use fport buffer.
1847 * unif.c: include fports.h instead of genio.h.
1848 * fports.c (scm_fdes_wait_for_input, scm_fport_fill_buffer): new
1849 procedures.
1850 (local_fgetc): use them.
1851 (local_ffwrite): use buffer.
1852 (local_fgets): use buffer.
1853 (scm_setbuf0): deleted.
1854 (scm_setvbuf): set the buffer.
1855 (scm_setfileno): deleted.
1856 (scm_evict_ports): set fdes directly.
1857 (scm_freopen): deleted. doesn't seem useful in Guile.
1858 (scm_stdio_to_port): deleted.
1859 fports.h (struct scm_fport): add shortbuf member to avoid separate
1860 code for unbuffered ports.
1861 (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP): moved
1862 from ports.h.
1863
1864 * genio.c, genio.h: move contents into ports.c, ports.h. The
1865 division wasn't useful.
1866
1867 * fports.c, fports.h (scm_fport_drain_input): new procedure.
1868 * ports.c (scm_drain_input): call scm_fport_drain_input.
1869 * scm_fdes_waiting_p: new procedure.
1870 * fports.c (scm_fdes_to_port): allocate read and/or write buffers.
1871 (scm_input_waiting_p): check the buffer.
1872 (local_fgetc, local_fflush, local_fputc): likewise.
1873
1874 * fports.h (scm_fport): read/write_buf,_pos,_buf_end,,_buf_size:
1875 new members.
1876 * init.c (scm_init_standard_ports): pass fdes instead of FILE *.
1877
1878 * ports.c (scm_drain_input): new procedure.
1879 ports.h: prototype.
1880 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY,
1881 pre_read, pre_write): removed.
1882 (local_fputc, local_fputs, local_ffwrite): use write, not stdio.
1883 (scm_standard_stream_to_port): change first arg from FILE * to
1884 int fdes.
1885 (local_fflush): flush fdes, not FILE *.
1886 * fports.h (SCM_NOFTELL): removed.
1887 * genio.c, ports.c: don't include filesys.h.
1888 * genio.c (scm_getc): don't use scm_internal_select if FPORT.
1889 do it in fports.c:local_fgetc.
1890 * genio.c: don't use SCM_SYSCALL when calling ptob procedures.
1891 do it where it's needed in the port smobs.
1892 * filesys.c (scm_input_waiting_p): moved to fports.c, stdio
1893 buffer support removed. take SCM arg, not FILE *.
1894 * filesys.h: prototype moved too.
1895 * fports.c (scm_fdes_to_port): new procedure.
1896 (local_fgetc): use read not fgetc.
1897 (local_fclose): use close, not fclose.
1898 (local_fgets): use read, not fgets
1899 * fports.h: prototype for scm_fdes_to_port.
1900 * fports.h (scm_fport): new struct.
1901 * fports.c (scm_open_file): use open, not fopen.
1902 #include fcntl.h
1903 * ports.h (struct scm_port_table): change stream from SCM to void *.
1904 * ports.c (scm_add_to_port_table): check for memory allocation error.
1905 (scm_prinport): remove MSDOS hair.
1906 (scm_void_port): set stream to 0 instead of SCM_BOOL_F.
1907 (scm_close_port): don't throw errors: do it in fports.c.
1908
1909 1999-06-04 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1910
1911 * numbers.c: Added #include "feature.h".
1912
1913 1999-05-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
1914
1915 * smob.c, smob.h (scm_make_smob_type): New interface to smob
1916 types (supersedes scm_newsmob).
1917 (scm_set_smob_mark, scm_set_smob_free, scm_set_smob_print,
1918 scm_set_smob_equalp): New functions. Sets smob functions.
1919 (SCM_NEWSMOB): New macro. Creates smob objects.
1920 (scm_make_smob): New function. Creates smob objects and
1921 mallocates memory.
1922 (scm_smob_free, scm_smob_print): Default free and print
1923 functions.
1924
1925 * Makefile.am: Removed markers.c, markers.x, markers.h.
1926
1927 * markers.c, markers.h: Removed. (Contents moved to smob.c,
1928 smob.h.)
1929
1930 * arbiters.c, async.c, regex-posix.c: Use new smob interface.
1931
1932 * eval.c, fports.c, libguile.h, ports.c: Removed #include
1933 "markers.h".
1934
1935 * fluids.c, guardians.c, srcprop.c, threads.c: Added #include
1936 "genio.h".
1937
1938 * regex-posix.c, regex-posix.h: Renamed scm_tc16_regex_t -->
1939 scm_tc16_regex.
1940
1941 1999-05-09 Jim Blandy <jimb@savonarola.red-bean.com>
1942
1943 * strop.c (scm_string_capitalize_x): Use the SCM object `s' in
1944 error messages, not the uninitialized string `str'. Love that
1945 typechecking.
1946
1947 * strop.c (scm_substring_move_x): New function, which can handle
1948 arbitrary overlapping substrings.
1949 (substring-move-left!, substring-move-right!): These are
1950 now just synonyms for substring-move!.
1951 * strop.h (scm_substring_move_x): New prototype.
1952 (scm_substring_move_left_x, scm_substring_move_right_x):
1953 #define these as synonyms for scm_substring_move_x.
1954
1955 Fixes, cleanups, and new functions from Greg Harvey.
1956
1957 1999-05-03 Greg Harvey <Greg.Harvey@thezone.net>
1958
1959 * strop.c (scm_string_capitalize_x, scm_string_capitalize): new
1960 functions; capitalize the first letter of each word in the
1961 argument string, and downcase the rest.
1962 (scm_string_ci_to_symbol): string->symbol, such that the same
1963 symbol is returned for any argument where the only difference
1964 between strings is in capitalization.
1965 (scm_string_upcase, scm_string_downcase): non-destructive
1966 versions.
1967
1968 1999-01-13 Greg Harvey <Greg.Harvey@thezone.net>
1969
1970 * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
1971 changed to use memmove.
1972 * strop.c (scm_i_index): removed the pos arguments (it's only
1973 called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
1974 SCM_ARG4).
1975
1976 1999-01-11 Greg Harvey <Greg.Harvey@thezone.net>
1977
1978 * strop.h: fixed prototypes.
1979
1980 * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
1981 changed to have 5 required args, rather than 2 required, and 3 required
1982 rest args. Also modified to allow str1 & str2 to overlap.
1983 (scm_substring_fill_x): changed to 4 args, rather than 2 args and
1984 2 required rest args.
1985
1986 1999-05-02 Jim Blandy <jimb@savonarola.red-bean.com>
1987
1988 * procs.h: Doc fix.
1989
1990 * Makefile.am (modinclude_HEADERS): Add kw.h, so the new version
1991 gets installed.
1992 * Makefile.in: Regenerated.
1993
1994 * numbers.c: If we're supporting floating-point, provide the
1995 feature "inexact".
1996
1997 * scmconfig.h.in: Regenerated; see today's change to
1998 ../configure.in.
1999
2000 1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
2001
2002 * Makefile.in: Regenerated.
2003
2004 Remove readline support, to avoid copyright confusion.
2005 * Makefile.am: Remove readline files from lists.
2006 * init.c: Don't initialize readline.
2007 * scmconfig.h.in: Regenerated.
2008
2009 * numbers.c (s_bignum): Renamed to s_bignum, and made static.
2010 Libguile should not be exporting random little strings.
2011 * numbers.h (s_bignum): Extern declaration removed.
2012
2013 More const changes from Ken Raeburn.
2014 * numbers.c (scm_s_bignum, fx): Now const.
2015 (scm_logtab, scm_ilentab, s_adjbig): Now static and const.
2016 * numbers.h (scm_s_bignum): Update declaration.
2017 * eval.c (bodycheck): Argument WHAT now points to const.
2018 * snarf.h (SCM_SYNTAX): Name is const.
2019
2020 * eval.c (scm_i_let): Make this globally visible, to avoid dynamic
2021 linking crashes on NetBSD. (Thanks to Ken Raeburn.)
2022
2023 1999-03-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2024
2025 * numbers.c (isfinite): Define this macro if not defined: Return a
2026 non-zero value if X is finite. (From ISO C 9x standard.)
2027 (scm_inexact_to_exact): Bugfix: Don't pass NaNs to scm_dbl2big.
2028 (Thanks to Jon Trowbridge and Greg Harvey.)
2029
2030 1999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2031
2032 * keywords.c (scm_tc16_kw): Added for backward compatibility.
2033 Will be removed in next release.
2034
2035 * Makefile.am (modinclude_HEADERS): Added kw.h;
2036
2037 * kw.h: New file.
2038
2039 * libguile.h: #include "libguile/kw.h"
2040
2041 1999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2042
2043 * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED.
2044
2045 1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2046
2047 * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch.
2048
2049 * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):
2050 Place the table argument last.
2051
2052 1999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2053
2054 * modules.c: #include "procprop.h"
2055 (scm_system_module_env_p): Assume root environment is no lookup
2056 closure is found.
2057
2058 * debug.c, eval.c, evalext.c, gdbint.c stacks.c:
2059 #include "modules.h".
2060
2061 * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
2062 scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
2063
2064 * eval.c, eval.h (scm_top_level_lookup_closure): Removed.
2065
2066 1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2067
2068 * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
2069 scm_misc_error when pos is a string. This allows for dispatching
2070 arbitrary error messages with one argument via SCM_ASSERT:
2071 SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
2072
2073 1999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2074
2075 * list.c (scm_reverse): Report an error if given a circular list
2076 instead of filling memory.
2077 * list.c (scm_reverse_x): Check args.
2078
2079 1999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2080
2081 Most of this batch of changes is about how to deal with extended
2082 types when an object system is loaded into Guile. A nice object
2083 system is capable of representing Guile's types as class objects.
2084
2085 For example, we want a regular expression to be of class <regex>.
2086 But regular expressions are smobs which aren't under direct
2087 control of the object system, so there has to be some mechanism
2088 which informs the object system that a new class should be created
2089 which can represent the smob type. I call this a "wrapper class".
2090
2091 * objects.c: #include "smob.h";
2092 (scm_class_keyword): Removed. (Class is automatically created by
2093 make_smob_classes.)
2094 (scm_smob_class): Array of smob classes indexed by smobnum.
2095 (scm_make_extended_class): "Plugin" function pointer for creation
2096 of wrapper classes for smob and struct types.
2097 (scm_class_of): Handle compiled closures. (Currently regarded as
2098 <procedure>.);
2099 Use scm_smob_class to handle smob types;
2100 Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
2101 through scm_smob_class;
2102 Handle structs.
2103
2104 * smob.c (scm_newsmob): Also create a wrapper class if
2105 scm_smob_class has been initialized.
2106
2107 * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
2108 type code and smobnum.
2109
2110 * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
2111 (scm_struct_table): Weak key table with auxilliary information for
2112 struct types. Currently used for names and wrapper classes.
2113 (scm_struct_ihashq): Hash function for structs.
2114 (scm_struct_create_handle): Get/create entry in scm_struct_table.
2115 (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
2116 for accessing names of vtables. The record implementation in
2117 boot-9.scm currently uses the setter to record the name of record
2118 types. When the object system is initialized, it can use this
2119 information to create wrapper classes with suitable names.
2120 (scm_init_struct): Allocate scm_struct_table.
2121 (scm_alloc_struct): Don't initialize scm_struct_i_tag here.
2122 (struct tags are a finite resource and we might want to restrict
2123 the use of tags to vtables only. E.g., Goops only uses tags for
2124 classes.)
2125 (scm_make_struct): Use scm_struct_entity_n_extra_words instead of
2126 magic number 5.
2127 (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
2128 number -1.
2129
2130 * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
2131 SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
2132 Used for access of struct table entries.
2133
2134 * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
2135 (scm_hash_fold): New procedure. Used to process all entries in a
2136 hash table (in no particular order).
2137
2138 Argh! For the umpteenth time I got compilation errors because of
2139 the "intuitive" name `kw'. This has to have an end:
2140
2141 * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
2142 "kw" --> "keywords" everywhere.
2143 (I doubt that this will cause big compatibility problems since the
2144 application interface is unaffected.)
2145
2146 * keywords.c, keywords.h: Files renamed from kw.c, kw.h.
2147
2148 1999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2149
2150 * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
2151 column inums to native form.
2152
2153 Improvement of backtraces: Introduces a new stack narrowing
2154 specifier, #t, for the inner cut. (See further in the comments in
2155 stacks.c:narrow_stack ().)
2156
2157 * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
2158 (Used to flag certain system procedures which shouldn't turn up in
2159 backtraces.)
2160
2161 * eval.c (scm_sym_system_module): New symbol. (Used to flag
2162 modules which aren't "user" modules and the code of which
2163 shouldn't turn up in backtraces.)
2164
2165 * eval.c, eval.h (scm_top_level_lookup_closure): New function:
2166 Extract the lookup closure from an environment.
2167 (scm_system_module_env_p): New function: Return non-#f if MODULE
2168 is a system module.
2169
2170 * stacks.c: #include "eval.h"; #include "procprop.h";
2171 (narrow_stack): Handle new narrowing specifier #t.
2172
2173 * debug.c (scm_procedure_name): Use name property in the default
2174 case.
2175
2176 * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
2177
2178 * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
2179
2180 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
2181 procedure throughout.
2182
2183 * print.c (scm_iprin1): Removed extraneous space when printing
2184 procedure-with-setters.
2185
2186 Entity and operator setter slots were introduced as a complement
2187 to the <procedure-with-setter> type in order to support entities
2188 and operators with setters in a reasonable and efficient way.
2189 * procs.c (scm_procedure, scm_setter): Handle entity and operator
2190 setter slots.
2191
2192 * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
2193 (struct scm_metaclass_operator): New setter slot.
2194
2195 * gc.c (scm_gc_mark): Mark struct setter slot.
2196
2197 * struct.c (scm_make_struct): Allocate one word more for
2198 entities and initialize the new slot.
2199
2200 * struct.h (scm_struct_i_setter): New constant.
2201
2202 1999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2203
2204 * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
2205 directly through the instance.
2206
2207 * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
2208
2209 * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
2210 scm_struct_i_flags instead of scm_vtable_index_layout!
2211
2212 * list.c (scm_list_star): New procedure.
2213
2214 1999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2215
2216 * debug.c (scm_init_debug): Added scheme level constant
2217 SCM_IM_DISPATCH.
2218
2219 1999-02-12 Jim Blandy <jimb@savonarola.red-bean.com>
2220
2221 * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS.
2222
2223 * gc.c (scm_gc_sweep): Properly properly record the size of a
2224 freed structure. (Thanks to Greg Harvey.)
2225
2226 1999-02-07 Jim Blandy <jimb@savonarola.red-bean.com>
2227
2228 * gc.c (scm_gc_sweep): Properly record the size of a freed
2229 structure. (Thanks to Michael Livshin.)
2230
2231 1999-02-06 Jim Blandy <jimb@savonarola.red-bean.com>
2232
2233 Readline paren matching from Greg Harvey, with modifications from
2234 Mikael Djurfeldt:
2235
2236 * readline.c (in_readline, reentry_barrier_mutex): Make these
2237 static.
2238
2239 * readline.c: #include <sys/time.h> and "iselect.h", so we can
2240 control how long we're paused, and threads will run while we're
2241 paused.
2242 (match_paren, find_matching_paren, init_bouncing_parens): New
2243 functions.
2244 (scm_init_readline): Call init_bouncing_parens.
2245 (scm_readline_opts): Add the bounce-parens option.
2246 * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option.
2247 (SCM_N_READLINE_OPTIONS): Adjust.
2248
2249 1999-02-06 Jim Blandy <jimb@zwingli.cygnus.com>
2250
2251 All the below are changes from Ken Raeburn, to get Guile to use
2252 const where it can.
2253
2254 * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
2255 eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
2256 s_clauses, s_formals): Variables now const.
2257
2258 * eval.c (promsmob): Now const.
2259 * macros.c (macrosmob): Now const.
2260 * smob.c (scm_newsmob): Smobfuns argument now points to const.
2261 (freecell, flob, bigob): Now const.
2262
2263 * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
2264 error.c (scm_error, scm_syserror, scm_syserror_msg,
2265 scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
2266 scm_memory_error, scm_misc_error, scm_wta), macros.c
2267 (scm_make_synt), feature.c (scm_add_feature), filesys.c
2268 (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
2269 scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
2270 numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
2271 scm_num2long_long, scm_num2ulong),
2272 options.c (scm_options), posix.c (scm_convert_exec_args,
2273 environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
2274 ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
2275 (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
2276 (setzone, restorezone, bdtime2c), strop.c (scm_i_index),
2277 strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
2278 scm_intern_obarray, scm_intern, scm_intern0,
2279 scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
2280 scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
2281 indicating calling subr, error message text, reason for error,
2282 symbol name or feature name are now pointer to const.
2283 * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
2284
2285 * procs.c (scm_init_iprocs): iproc argument now points to const.
2286 * pairs.c (cxrs): Now const.
2287
2288 * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
2289 numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
2290 strports.h, symbols.h, unif.h: Update variable declarations and
2291 function prototypes for above changes.
2292
2293 * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
2294 sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
2295 SYMB now point to const.
2296
2297 1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2298
2299 * print.c (scm_iprin1): Use scm_procedure_name instead of
2300 scm_procedure_property for compiled closures.
2301
2302 * tags.h (scm_tc7_pws): New procedure type. Four representations
2303 for procedure-with-setters were considered before selecting this
2304 one:
2305
2306 1. A closure where the CODE and ENV slots are used to represent
2307 the getter and a new SETTER slot is used for the setter. The
2308 original getter is stored as a `getter' procedure property. For
2309 closure getters, the CODE and ENV slots contains a copy of the
2310 getter's CODE and ENV slots. For subr getters, the CODE contains
2311 a call to the subr.
2312
2313 2. A compiled closure with a call to the getter in the cclo
2314 procedure. The getter and setter are stored in slots 1 and 2.
2315
2316 3. An entity (i.e. a struct with an associated procedure) with a
2317 call to the getter in the entity procedure and the setter stored
2318 in slot 0. The original getter is stored in slot 1.
2319
2320 4. A new primitive procedure type supported in the evaluator. The
2321 getter and setter are stored in a GETTER and SETTER slot. A call
2322 to this procedure type results in a retrieval of the getter and a
2323 jump back to the correct eval dispatcher.
2324
2325 Representation 4 was selected because of efficiency and
2326 simplicity.
2327
2328 Rep 1 has the advantage that there is zero penalty for closure
2329 getters, but primitive getters will get considerable overhead
2330 because the procedure-with-getter will be a closure which calls
2331 the getter.
2332
2333 Rep 3 has the advantage that a GOOPS accessor can be a subclass of
2334 <procedure-with-setter>, but together with rep 2 it suffers from a
2335 three level dispatch for non-GOOPS getters:
2336
2337 cclo/struct --> dispatch proc --> getter
2338
2339 This is because the dispatch procedure must take an extra initial
2340 argument (cclo for rep 2, struct for rep 3).
2341
2342 Rep 4 has the single disadvantage that it uses up one tc7 type
2343 code, but the plan for uniform vectors will very likely free tc7
2344 codes, so this is probably no big problem. Also note that the
2345 GETTER and SETTER slots can live directly on the heap, using the
2346 new four-word cells.
2347
2348 * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
2349 SCM_SETTER): New macros.
2350 (scm_procedure_with_setter_p, scm_make_procedure_with_setter,
2351 scm_getter, scm_setter): New procedures.
2352
2353 * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
2354
2355 * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
2356 scm_tc7_pws.
2357
2358 * objects.c, objects.h (scm_class_of,
2359 scm_class_procedure_with_setter): Added.
2360
2361 * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
2362 entry for scm_tc7_pws.
2363
2364 * procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
2365
2366 1999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2367
2368 * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
2369 macro.
2370 (scm_init_evalext): Call scm_make_gsubr for
2371 scm_m_generalized_set_x.
2372
2373 * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
2374
2375 * eval.h: Declare scm_s_set_x, scm_sym_set_x;
2376
2377 * eval.c: Renamed "set" --> "set_x" in various names for
2378 consistency of name correspondence between Scheme and C;
2379 Renamed scm_i_set_x --> scm_sym_set_x and made global.
2380 Renamed s_set_x --> scm_s_set_x and made global.
2381
2382 1999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2383
2384 * random.c (scm_i_random_bignum): Made independent of endianness.
2385
2386 1999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2387
2388 * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
2389 (Thanks to Eric Hanchrow.)
2390
2391 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2392
2393 * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
2394
2395 * random.c: Bugfix: Retrieve and store most significant 32 bits in
2396 different order if the machine is bigendian.
2397 (scm_init_random): Added safety check for bignum digit size.
2398
2399 1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2400
2401 * random.c, random.h (scm_i_make_rstate): New function: Makes
2402 scm_rstate from seed.
2403 (scm_copy_random_state, scm_seed_to_random_state): New functions.
2404 (scm_make_random_state): Removed.
2405
2406 * random.c (scm_make_random_state): Use scm_i_make_rstate().
2407
2408 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2409
2410 * random.c: Bugfix: Retrieve and store most significant 32 bits in
2411 different order if the machine is bigendian.
2412 (scm_init_random): Added safety check for bignum digit size.
2413
2414 1999-01-11 Roland Orre <mdj@mdj.nada.kth.se>
2415
2416 * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements
2417 from first arg before equal elements in second arg in result.
2418 (scm_merge_list_step): Bugfix: Don't presume that arguments in a C
2419 function call are executed in a well defined order.
2420
2421 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
2422
2423 * alloca.c (alloca): Cast value returned by malloc. (Thanks to
2424 Christian Lynbech.)
2425
2426 1999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2427
2428 * random.c: Removed alloca includes.
2429
2430 1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
2431
2432 * Makefile.in: This changed, for some reason I don't really
2433 understand, when I ran automake in the top level directory. This
2434 may be contamination by Cygnus internal releases. If you re-run
2435 automake and this change gets reverted, don't worry about it.
2436
2437 1999-01-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2438
2439 * sort.c, sort.h: New files: Implement slib's and scsh's sort
2440 interfaces. Author: Roland Orre.
2441
2442 * Makefile.am: Added sort.c, sort.h, sort.x.
2443
2444 * init.c: #include "sort.h";
2445 (scm_boot_guile_1): Call scm_init_sort ().
2446
2447 * numbers.h: Added #include "libguile/print.h".
2448
2449 * numbers.c: Formatted according to Guile conventions;
2450 Renamed s_bignum --> scm_s_bignum.
2451
2452 * random.c, random.h: New files: Random number support.
2453 Interface same as slib's.
2454
2455 * Makefile.am: Added random.c, random.h, random.x.
2456
2457 * init.c: #include "random.h";
2458 (scm_boot_guile_1): Call scm_init_random ().
2459
2460 1998-12-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2461
2462 * Makefile.am: New files: guardians.c, guardians.x, guardians.h
2463
2464 * guardians.c, guardians.h (scm_make_guardian,
2465 scm_guardian_gc_init, scm_guardian_zombify, scm_guard,
2466 scm_get_one_zombie, scm_init_guardian): This is an implementation
2467 of guardians as described in R. Kent Dybvig, Carl Bruggeman, and
2468 David Eby (1993) "Guardians in a Generation-Based Garbage
2469 Collector" ACM SIGPLAN Conference on Programming Language Design
2470 and Implementation, June 1993 ftp://ftp.cs.indiana.edu
2471 /pub/scheme-repository/doc/pubs/guardians.ps.gz
2472 Author: Michael N. Livshin.
2473
2474 * gc.h (SCM_MARKEDP, SCM_NMARKEDP): New macros.
2475
2476 * gc.c (scm_igc): Call scm_guardian_gc_init and
2477 scm_guardian_zombify.
2478
2479 * init.c (scm_boot_guile_1): Call scm_init_guardian.
2480
2481 1998-12-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2482
2483 * macros.c (scm_makacro, scm_makmacro, scm_makmmacro): Added
2484 argument checking.
2485
2486 1998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2487
2488 Move the procedure slots of entities to invisible slots (so that
2489 we can have operator class objects which themselves are entities).
2490 * struct.h (scm_struct_i_proc, scm_struct_i_flags,
2491 SCM_STRUCTF_ENTITY): New constants.
2492
2493 * struct.c (scm_make_struct): Allocate "invisible" room for
2494 procedures if SCM_STRUCTF_ENTITY is set in vtable.
2495
2496 * gc.c (scm_gc_mark): Mark entity procedures.
2497
2498 * struct.c, struct.h (scm_alloc_struct): Renamed from alloc_struct
2499 and made global.
2500 (scm_struct_init): Renamed from init_struct and made global.
2501
2502 * objects.h (SCM_ENTITY, scm_entity): Removed.
2503 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_0,
2504 SCM_ENTITY_PROC_3): Adjusted for new location of procedure slots.
2505
2506 Mon Dec 14 18:10:12 1998 Maciej Stachowiak <mstachow@mit.edu>
2507
2508 * snarf.h (SCM_SYNTAX): New macro to allow convenient declaration
2509 of syntactic forms, similar to SCM_PROC.
2510 * debug.c, eval.c, evalext.c: use SCM_SYNTAX to declare all special
2511 forms, and SCM_SYMBOL or SCM_GLOBAL_SYMBOL to delcare C variables
2512 for the name symbols when needed.
2513
2514 1998-12-14 Jim Blandy <jimb@zwingli.cygnus.com>
2515
2516 * Makefile.in: Regenerated.
2517
2518 1998-12-05 Jim Blandy <jimb@zwingli.cygnus.com>
2519
2520 * pairs.h (SCM_NEWCELL): When DEBUG_FREELIST is defined, don't
2521 take the address of _into; it might be a register. Just have
2522 scm_debug_newcell return the new cell.
2523 * gc.c (scm_debug_newcell): Just return the new cell, instead of
2524 taking the address of a place to store it as an argument.
2525 * gc.h (scm_debug_newcell): Change declaration.
2526 (Thanks to Greg Harvey.)
2527
2528 1998-12-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2529
2530 * ramap.c (array-copy-in-order!, array-map-in-order): New names.
2531 Replaces old names serial-array-copy! and serial-array-map!.
2532
2533 * evalext.c (map-in-order): New name. Replaces serial-map.
2534
2535 1998-12-05 Jim Blandy <jimb@totoro.red-bean.com>
2536
2537 * smob.c (freeprint): New function.
2538 (freecell): Use it to print freed objects, for slightly easier
2539 debugging.
2540
2541 1998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2542
2543 * backtrace.c (display_frame): Made more robust. Doesn't throw an
2544 error if no source properties can be found for a frame. (Thanks
2545 to Christian Lynbech.)
2546
2547 1998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2548
2549 * objects.h: Removed slots direct_supers and direct_slots from the
2550 definitions of the rudimentary classes described by objects.h.
2551
2552 * objects.c, objects.h (scm_entity_p): New procedure. Together
2553 with the predicates scm_procedure_p and scm_struct_p, this
2554 predicate makes it possible to differ between structs, entities
2555 and operators.
2556
2557 * modules.c, modules.h (scm_resolve_module): New function.
2558
2559 1998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2560
2561 * objects.h (SCM_METACLASS_STANDARD_LAYOUT,
2562 SCM_METACLASS_OPERATOR_LAYOUT): Removed slots `direct_supers' and
2563 `direct_slots'.
2564
2565 * objects.c (scm_entity_p): New procedure.
2566
2567 * procprop.c (scm_i_procedure_arity): Bugfix: Return correct value
2568 for asubrs, rpsubrs, lsubrs and lsubr_2s.
2569
2570 1998-11-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2571
2572 * procprop.h (scm_i_procedure_arity): Added declaration.
2573
2574 * procprop.c (scm_i_procedure_arity): Made global; New code to
2575 handle operators and entities.
2576 (scm_procedure_property): No need to call scm_procedure_p since
2577 scm_i_procedure_arity now does all necessary type checking.
2578 Added #include "objects.h".
2579
2580 * feature.c (scm_remove_hook_x): Bugfix: Changed reference to
2581 s_add_hook_x --> s_remove_hook_x.
2582 (scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments.
2583 Added #include "procprop.h"
2584
2585 * feature.c, feature.h (scm_reset_hook_x): New procedure.
2586 (scm_make_hook): Optional argument defines number of arguments to
2587 the hook.
2588 (scm_make_named_hook): Take number of args as second arg.
2589 (scm_run_hook): Renamed from scm_run_hooks (old name defined in
2590 boot-9.scm for a while); First arg is the hook. The rest are
2591 arguments passed on to the hook procedures.
2592
2593 1998-11-23 Jim Blandy <jimb@zwingli.cygnus.com>
2594
2595 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest,
2596 scm_logbit_p): Do the computation in ulongs. This is not as nice
2597 as doing it in bignums, but at least it's good enough for
2598 manipulating flags in 32-bit words. (Thanks to Jim Wilson.)
2599
2600 * regex-posix.c (scm_regexp_exec): Reliably mark unmatched
2601 subexpressions. (Thanks to Charbel Jacquin.)
2602
2603 1998-11-23 Mikael Djurfeldt <mdj@kenneth>
2604
2605 * feature.c, feature.h (scm_make_hook, scm_add_hook_x,
2606 scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm.
2607 (scm_make_named_hook): New function.
2608
2609 * feature.c: Added #include "eval.h".
2610
2611 * modules.c (scm_make_module): Beautify the module.
2612
2613 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2614
2615 * modules.c, modules.h: New files: C interface to modules. (This
2616 is necessary in order to interface the object system to Guile
2617 properly. The guts of these modules will be replaced by the new
2618 module system in the future.)
2619
2620 * init.c: Added #include "modules.h"
2621 (scm_boot_guile_1): Call scm_init_modules.
2622 (invoke_main_func): Call scm_post_boot_init_modules.
2623
2624 * Makefile.am: Added modules.c, modules.x, modules.h.
2625
2626 1998-11-22 Mikael Djurfeldt <mdj@kenneth>
2627
2628 * procs.c: #include "objects.h"
2629 (scm_procedure_p): Return #t also on structs which are operators.
2630
2631 * objects.c (scm_init_objects): Renamed <standard-metaclass>,
2632 <operator-metaclass> and <entity-class> to <standard-class>,
2633 <operator-class> and <entity> in order to conform with STKlos
2634 naming conventions.
2635
2636 * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct
2637 which isn't an operator.
2638 (SCM_APPLY): Ditto, but jump to badproc.
2639
2640 1998-11-21 Mikael Djurfeldt <mdj@kenneth>
2641
2642 * eval.c (SCM_CEVAL): Allow structs implanted in code.
2643 Previously, structs implanted in code were interpreted as forms
2644 the operator of which was a gloc. We solve this by checking for
2645 the zero in the emulated vcell in the struct vtable. Since
2646 implanted structs always will look like forms with a gloc
2647 operator, execution will only be slowed down by maximally one
2648 extra test-and-branch per application.
2649
2650 * evalext.c (scm_definedp): Removed check for isyms; Added a
2651 second optional argument: It is now possible to supply an
2652 evaluation environment in which to look for the symbol.
2653
2654 1998-11-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2655
2656 * readline.c (scm_init_readline): Set
2657 rl_basic_word_break_characters. (Thanks to Ian Grant.)
2658
2659 * coop.c (coop_condition_variable_wait): Removed
2660 (coop_condition_variable_wait_mutex): Folded logic of
2661 coop_mutex_unlock into coop_condition_variable_wait_mutex to
2662 prevent condvar signal lossage. Previously, another thread could
2663 start to run after unlocking the mutex but before putting the
2664 current thread on the wait queue. If that thread then would
2665 signal the first, the signal would be lost. (Thanks to Christian
2666 Lynbech.)
2667
2668 1998-11-17 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2669
2670 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
2671 Christian Lynbech.)
2672
2673 1998-11-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2674
2675 * objects.c (scm_i_make_class_object): Renamed from
2676 make_class_object; exported; error checking moved to
2677 scm_make_class_object and scm_make_subclass_object.
2678 (scm_make_class_object, scm_make_subclass_object): Use
2679 scm_i_make_class_object.
2680 (scm_make_subclass_object): Let the subclass have same metaclass
2681 as the superclass.
2682
2683 1998-11-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2684
2685 * debug.c (scm_debug_options): Bugfix: Set the value of
2686 scm_stack_checking_enabled_p after setting debug options;
2687 #include "stackchk.h". (Thanks to Richard Polton.)
2688
2689 1998-11-13 Radey Shouman <rshouman@metro2000.com>
2690
2691 * unif.c (scm_array_contents): removed unnecessary test for 0
2692 base.
2693
2694 1998-11-13 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2695
2696 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
2697 Replaced by macro `collect' in boot-9.scm.
2698
2699 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2700
2701 * eval.c (scm_copy_tree): Copy source properties if existent.
2702
2703 * debug.c (scm_start_stack): Copy source when evaluating. (If we
2704 don't, we may end up passing memoized source to a transformer.)
2705
2706 1998-11-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2707
2708 * stack.c (get_applybody): Help function which lookups the first
2709 body form of the apply closure.
2710 (read_frames): Prevent the source of the first form of the apply
2711 closure from being recorded. This would only be confusing.
2712
2713 * debug.h (SCM_SET_MACROEXP, SCM_CLEAR_MACROEXP, SCM_MACROEXPP):
2714 Replaces SCM_MACROFRAME, SCM_MACROFRAMEP.
2715
2716 * eval.c (SCM_CEVAL): Use SCM_SET/CLEAR_MACROEXP.
2717
2718 * stacks.c (read_frame): Bugfix: Removed lingering `else'
2719 statement.
2720 (read_frames): Use SCM_MACROEXPP.
2721
2722 1998-11-10 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2723
2724 * stacks.c (read_frames): Skip gsubr frames in backtraces. (They
2725 don't contain interesting information since all arguments are
2726 present in the frame which applies the compiled closure anyway.);
2727 Skip the transformer application frames.
2728
2729 * print.c (scm_iprin1): Print gsubrs as primitives.
2730
2731 1998-11-09 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2732
2733 * debug.h (SCM_MACROFRAME, SCM_MACROFRAMEP): New frame type.
2734
2735 * eval.c (SCM_CEVAL): Mark macro frames at `handle_a_macro' so
2736 that we can identify these in a backtrace. (This change doesn't
2737 introduce any significant speed penalty.)
2738
2739 * eval.c: Added note about `serial-map' using scm_map.
2740
2741 * read.c, read.h (scm_read_options, scm_read_opts): Removed
2742 readline options. They should reside in their own options array.
2743
2744 * readline.c, readline.h (scm_readline_options,
2745 scm_readline_opts): Moved readline options here.
2746
2747 1998-11-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2748
2749 * readline.c (scm_read_history, scm_write_history): Bugfix: Use
2750 SCM_ROCHARS instead of SCM_CHARS.
2751
2752 * ports.c (scm_unread_string): Bugfixes: Check for SCM_STRINGP,
2753 not SCM_ROSTRINGP; use SCM_ROUCHARS instead of SCM_UCHARS.
2754
2755 1998-11-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2756
2757 * ports.h (SCM_CUC): #define as ~SCM_CRDY instead of 0x001fffffL.
2758 This is quite important since the latter clears the
2759 FPORT_READ_SAFE and FPORT_WRITE_SAFE flags causing flushes at
2760 every single character read...
2761
2762 1998-11-03 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2763
2764 * print.c (scm_iprin1): Removed suspect looking (and indeed
2765 malevolent) semicolon after test for user supplied closure print
2766 procedure. (Thanks to Telford Tendys.)
2767
2768 * list.c (scm_sloppy_memq): Removed sloppy_mem_check.
2769 (scm_memq, scm_memv, scm_member): Do argument checking *before*
2770 starting to search the list. Removed call to sloppy_mem_check.
2771
2772 * list.c, list.h (scm_delq1_x, scm_delv1_x, scm_delete1_x): New
2773 procedures: Same as scm_delq_x et al, but delete maximally one
2774 element.
2775
2776 * options.c (scm_options, scm_init_options): GC-protect option
2777 values of type SCM. (Thanks to Telford Tendys.)
2778
2779 1998-11-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2780
2781 * eval.c: Don't #define scm_lookupcar to scm_lookupcar1. Instead
2782 make sure that there always is a "real" scm_lookupcar.
2783
2784 1998-11-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2785
2786 * read.c, read.h (scm_read_opts): New read options
2787 "history-length" and "history-file".
2788 (scm_read_options): Stifle history to history length.
2789
2790 * readline.c (scm_read_history, scm_write_history): New procedures.
2791
2792 1998-10-31 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2793
2794 * eval.h (scm_macro_eval_x): Removed declaration.
2795
2796 * eval.c (scm_s_expression, scm_s_test, scm_s_body,
2797 scm_s_bindings, scm_s_variable, scm_s_clauses, scm_s_formals):
2798 Renamed and made global.
2799
2800 * eval.c, eval.h (SCM_EVALIM): Renamed from EVALIM.
2801 (SCM_XEVAL, SCM_XEVALCAR): Renamed from XEVAL, XEVALCAR.
2802
2803 * evalext.c, evalext.h: New files. Contain non-R5RS things
2804 having to do with evaluation.
2805
2806 * evalext.c (scm_serial_map): New procedure: Version of `map'
2807 which guarantees that the procedure is applied to the lists in
2808 serial order.
2809 (scm_m_sequence_to_list): New syntax: Version of `begin' which
2810 returns a list of the results of the body forms instead of the
2811 result of the last body form.
2812 (scm_definedp, scm_m_undefine): Moved from eval.c
2813
2814 * evalext.h (scm_m_sequence_to_list): Added declaration.
2815
2816 * macros.c, macros.h: New files.
2817 (scm_procedure_to_syntax, scm_procedure_to_macro,
2818 scm_procedure_to_memoizing_macro, scm_macro_p, scm_macro_type,
2819 scm_macro_name, scm_macro_transformer): Moved from eval.c
2820 (scm_make_synt): Moved from eval.c
2821
2822 * procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
2823
2824 * init.c (scm_boot_guile_1): Added calls to scm_init_macros and
2825 scm_init_evalext.
2826
2827 * Makefile.am: Added evalext.c, evalext.h, macros.c, macros.h.
2828
2829 * debug.c, print.c: Added #include "macros.h".
2830
2831 1998-10-29 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2832
2833 This change adds the ability to use `unread-char' multiple times
2834 without interspersed reads and adds the new procedure
2835 `unread-string'. The change is optimized for the common case of
2836 unreading a single character. This is also the reason behind the
2837 choice to store characters in the port itself: in most cases no
2838 extra malloc is required.
2839
2840 The amount of code in some macros in ports.h has been increased to
2841 the extent that they would fit better as C functions, but, since
2842 this code belongs to the port representation, such functions
2843 should be placed in ports.c which would cause calls back and forth
2844 between ports.c and genio.c. That is not good for performance.
2845 Also, keeping them as macros allows the compiler to do some
2846 optimizations which are needed to make the current interface
2847 (SCM_CRDYP, SCM_CGETUN, SCM_TRY_CLRDY) efficient.
2848
2849 One benchmark (Guile startup time) indicates an increase of
2850 loading speed of 1%. Another (reading (using `read') boot-9.scm
2851 10 times) shows no change in performance.
2852
2853 (Caveat: Since Gary is redesigning I/O anyway, no big efforts were
2854 made to find a beautiful solution.)
2855
2856 * ports.h (SCM_CLRDY, SCM_CUNGET, SCM_CGETUN): Rewritten.
2857 (SCM_TRY_CLRDY): New macro: Only clear the first unread
2858 character. (SCM_CLRDY clears all.)
2859 (SCM_N_READY_CHARS): New macro: Returns number of unread
2860 characters in a port. Returns wrong answer if SCM_CRDYP is false.
2861 (struct scm_port_table): New fields: `entry' contains port table
2862 index, `cp' points to last unread char, `cbuf' is the buffer for
2863 unread chars, `cbufend' points after end of the character buffer.
2864
2865 * ports.h, ports.c (scm_unread_string): New procedure.
2866 (scm_grow_port_cbuf): New function.
2867
2868 * ports.c (scm_add_to_port_table, scm_remove_from_port_table):
2869 Handle new fields.
2870 (scm_generic_fgets), fports.c (local_fgets): Use a loop
2871 to read unread characters. Use SCM_TRY_CLRDY instead of
2872 SCM_CLRDY.
2873
2874 * ioext.c (scm_ftell): Use SCM_N_READY_CHARS to correct position.
2875
2876 * genio.c (scm_getc): Use SCM_TRY_CLRDY instead of SCM_CLRDY.
2877
2878 * genio.c, genio.h (scm_ungets): New function.
2879
2880 * genio.c (scm_puts): Removed mysterious TRANSCRIPT_SUPPORT code
2881 sections.
2882
2883 1998-10-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2884
2885 * threads.h (scm_thread_sleep, scm_thread_usleep): Fixed
2886 declarations. (Thanks to Russ McManus.)
2887
2888 1998-10-26 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2889
2890 * numbers.c (num2long): As a software archeologist, I'm proud of
2891 this finding! :) Preliminary dating suggests an almost 4 year old
2892 remnant from the SCM ancestor. The sample has been removed from
2893 the finding site and is now safely stored in the repository.
2894
2895 * numbers.h: Removed prototype for num2long.
2896
2897 * unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
2898
2899 * gh_data.c (gh_scm2doubles): Make it possible to pass result
2900 array as second arg.
2901 (gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
2902 gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
2903 * gh.h: Updated and added prototypes.
2904
2905 * gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
2906
2907 1998-10-24 Jim Blandy <jimb@zwingli.cygnus.com>
2908
2909 * gc.h: Remove all uses of SCM_P. (Thanks to Richard Polton.)
2910
2911 * guile-snarf.in: Never generate an empty file. (Thanks to
2912 Richard Polton.)
2913
2914 * gh.h (gh_enter, gh_new_procedure0_0, gh_new_procedure0_1,
2915 gh_new_procedure0_2, gh_new_procedure1_0, gh_new_procedure1_1,
2916 gh_new_procedure1_2, gh_new_procedure2_0, gh_new_procedure2_1,
2917 gh_new_procedure2_2, gh_new_procedure3_0, gh_new_procedure4_0,
2918 gh_new_procedure5_0): Specify argument types, to appease C++
2919 compilers. (Thanks to Brad Bowman.)
2920
2921 Bug reports from Russ McManus:
2922 * guile-snarf.in: If the CPP environment variable is set, use that
2923 as the C preprocessor, instead of the preprocessor autoconf
2924 found.
2925 * snarf.h (SCM_PROC): Cast the function pointer passed to
2926 scm_make_gsubr, to satisfy C++.
2927
2928 * gh_eval.c (gh_eval_str_with_catch, gh_eval_file_with_catch):
2929 Use the handler passed, instead of ignoring it and using
2930 gh_standard_handler. (Thanks to Etienne Bernard.)
2931
2932 1998-10-20 Jim Blandy <jimb@zwingli.cygnus.com>
2933
2934 * ports.h: Put text after #endif in comment. (Thanks to Nicolas
2935 Neuss.)
2936
2937 1998-10-19 Jim Blandy <jimb@zwingli.cygnus.com>
2938
2939 * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
2940 continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
2941 dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
2942 feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
2943 genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
2944 hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
2945 list.c, list.h, load.c, load.h, mallocs.c, markers.c,
2946 mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
2947 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
2948 procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
2949 regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
2950 script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
2951 srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
2952 strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
2953 symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
2954 vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
2955 copyright years.
2956
2957 * script.c (scm_compile_shell_switches): Define
2958 use-emacs-interface in the root module, so the repl code can see
2959 it. See today's change to top-repl in ice-9/boot-9.scm.
2960
2961 * filesys.c (set_element, get_element): Make sure that `element'
2962 is a cell before applying SCM_FPORTP to it. (Thanks to Jost
2963 Boekemeier and Jorgen "forcer" Schaefer.)
2964
2965 1998-10-18 Jim Blandy <jimb@zwingli.cygnus.com>
2966
2967 * chars.c (scm_charnames): In ASCII character name table, make
2968 newlines print as #\newline by default, not #\nl.
2969
2970 * Makefile.am (libguile_la_SOURCES, BUILT_SOURCES): Put these in
2971 alphabetical order. Oh thrills. But it helps me know how far
2972 along in the compilation I am.
2973 * Makefile.in: Regenerated.
2974
2975 1998-10-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2976
2977 * unif.c (scm_raprin1): Changed print syntax for byte vectors from
2978 #bytes(...) to #y(...), and syntax for short vectors from
2979 #short(...) to #h(...). This may seem nutty, but, like the other
2980 uniform vectors, byte vectors and short vectors want to have the
2981 same print and read syntax (and, more basic, want to have read
2982 syntax!). Changing the read syntax to use multiple characters
2983 after the hash sign breaks with the conventions used in R5RS and
2984 the conventions used for the other uniform vectors. It also
2985 introduces complexity in the current reader, both on the C and
2986 Scheme levels. (The Right solution is probably to change the
2987 syntax and prototypes for uniform vectors entirely.)
2988
2989 1998-10-17 Jim Blandy <jimb@savonarola.red-bean.com>
2990
2991 Don't use local_fgets on sockets; ftell doesn't work on sockets.
2992 (Thanks to Jorgen "forcer" Schaefer.)
2993 * ports.h (SCM_NOFTELL): New flag.
2994 * fports.c (local_fgets): If it's set, use the generic fgets.
2995 * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
2996
2997 1998-10-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
2998
2999 * script.c (scm_compile_shell_switches): Add handling of -q switch
3000 (inhibit loading of user init file).
3001 (scm_shell_usage): Add usage text for -q switch.
3002 (scm_compile_shell_switches): Always load user init file first if
3003 it is loaded at all.
3004
3005 1998-10-16 Jim Blandy <jimb@zwingli.cygnus.com>
3006
3007 * stime.c: The CPP hair to determine a value for CLKTCK is weird,
3008 and is now broken under NetBSD. I can't fathom what it's trying
3009 to do, so I've replaced it with something that I do understand,
3010 which seems to work, and which isn't broken on NetBSD. "Progress?
3011 You Decide." (Thanks to Perry Metzger.)
3012
3013 * regex-posix.c (scm_regexp_exec): Add a cast to remove a
3014 signed/unsigned comparison.
3015
3016 1998-10-15 Jim Blandy <jimb@zwingli.cygnus.com>
3017
3018 Warning fixes from Greg Harvey:
3019 * unif.c (scm_array_set_x): initializer for pos
3020 * throw.c (scm_ithrow): added initializer for jmpbuf (SCM_UNDEFINED)
3021 * struct.c (scm_struct_ref, scm_struct_set_x): Added
3022 initializers for field_type, since EGCS so desparately wants to
3023 play dumb
3024 * debug.h (scm_make_gloc, scm_gloc_p, scm_make_iloc, scm_memcons,
3025 scm_mem_to_proc, scm_proc_to_mem, scm_debug_hang): Added prototypes
3026 when GUILE_DEBUG is defined.
3027 * dynwind.h (scm_wind_chain): Same.
3028 * ports.h (scm_pt_size, scm_pt_member): Same.
3029 * print.h (scm_current_pstate): Same.
3030 * procs.h (scm_make_cclo): Same.
3031
3032 1998-10-14 Jim Blandy <jimb@zwingli.cygnus.com>
3033
3034 Handle short and long long uniform arrays properly. (Thanks to
3035 Clark McGrew.)
3036 * ramap.c (scm_ra_matchp, scm_array_fill_int, scm_array_index_map_x,
3037 raeql_1): Add cases for scm_tc7_svect (short vectors) and
3038 scm_tc7_llvect (long long vectors).
3039
3040 Change the way libguile and boot-9.scm are timestamped, to try to
3041 get rid of these spurious mismatch warnings. Now both
3042 libguile/versiondat.h and ice-9/version.scm are generated directly
3043 by the configuration process, rather than having version.scm
3044 generated directly, and libguile/versiondat.h generated by the
3045 Makefile, which is generated by configure. It seems that
3046 sometimes the Makefile would change, but versiondat.h depends on
3047 Makefile.in, not Makefile, so it wouldn't get rebuilt.
3048 * Makefile.am (versiondat.h): Target removed; this is generated
3049 directly by the configure script now.
3050 (BUILT_SOURCES): Remove versiondat.h.
3051 * versiondat.h.in: New file, transformed by the configure script
3052 into versiondat.h.
3053 * Makefile.in: Regenerated.
3054
3055 * (__scm.h, alist.c, eval.c, feature.c, gsubr.c, numbers.c,
3056 options.c): Rename RECKLESS -> SCM_RECKLESS, CAUTIOUS ->
3057 SCM_CAUTIOUS; this way, 1) there's only one version of each flag
3058 to define (we used to have both RECKLESS and SCM_RECKLESS), and 2)
3059 if we want to use them in a header file some day, we can. (Thanks
3060 to Michael Livshin.)
3061
3062 * stime.c (scm_get_internal_real_time): Do the arithmetic using
3063 SCM numbers, so we won't have rollover problems; the range of a
3064 signed long in milliseconds is about 25 days. (Thanks to Karl
3065 Hegbloom.)
3066
3067 Don't redefine sleep and usleep; fix this problem now.
3068 * coop.c (sleep, usleep): Remove declarations; we don't use or
3069 redefine these any more.
3070 (scm_thread_usleep, scm_thread_sleep): New functions which do the
3071 job of usleep and sleep in a thread-friendly way. We can use
3072 these in the rest of Guile. Define versions for systems both with
3073 and without iselect.
3074 * threads.h (scm_thread_usleep, scm_thread_sleep): New declarations.
3075 * scmsigs.c (usleep): Clean up oddities declaring usleep; since
3076 we're just using it, not redefining it, we can use a K&R style
3077 declaration here.
3078 (sleep): Declare this, too, if the system hasn't.
3079 (scm_sleep, scm_usleep): Use scm_thread_sleep and
3080 scm_uthread_sleep if they're available; otherwise, just call the
3081 system functions.
3082 * scmconfig.h.in: Regenerated.
3083
3084 * coop.c (scm_thread_sleep): Make `slept' an unsigned long.
3085
3086 * coop.c (coop_sleephelp): Remove ANSI #ifdef hair.
3087
3088 1998-10-12 Jim Blandy <jimb@zwingli.cygnus.com>
3089
3090 * threads.c: Doc fix.
3091
3092 The argument type of usleep varies from system to system,
3093 as does the return type. We really shouldn't be redefining usleep
3094 at all, but I don't have time to clean that up before the 1.3.
3095 release. It's on the schedule for afterwards. (Thanks to Julian
3096 Satchell.)
3097 * coop.c (usleep): Use USLEEP_ARG_TYPE in prototype and
3098 definition.
3099 * scmsigs.c (usleep): Use USLEEP_ARG_TYPE in prototype.
3100 * scmconfig.h: Regenerated.
3101
3102 * simpos.c (scm_software_type): Procedure deleted. This isn't the
3103 right way to handle system variation. Autoconf's approach is the
3104 way and the light.
3105 * simpos.h (scm_software_type): Declaration deleted.
3106
3107 * script.c (scm_find_executable): Don't test if unix is #defined
3108 here; first, NetBSD doesn't #define it, and second, it's the wrong
3109 way to go about these things. (Thanks to Perry Metzger.)
3110 (dld_find_executable): Delete this MSDOS support code. This isn't
3111 the way we want to support this; it needs to be rethunk at a
3112 larger scale.
3113
3114 * genio.c (scm_do_read_line): Don't just politely check that the
3115 line was either non-empty or EOF. Abort if it's empty and not
3116 EOF.
3117
3118 1998-10-11 Jim Blandy <jimb@zwingli.cygnus.com>
3119
3120 * scmconfig.h.in: Regenerated.
3121
3122 * libguile.h: Don't omit the dynamic linking functions. (Thanks
3123 to Greg Badros.)
3124
3125 * genio.c (scm_do_read_line): Count lines correctly when the file
3126 doesn't end in a newline.
3127
3128 1998-10-10 Jim Blandy <jimb@zwingli.cygnus.com>
3129
3130 * genio.c (scm_do_read_line): Maintain the line count correctly.
3131 (Thanks to Harvey J. Stein and Greg Harvey.)
3132
3133 * gc.c (scm_return_first): Remove #ifdef __STDC__ garbage; Guile
3134 requires ANSI now.
3135
3136 * numbers.c (big2str): Protect t from garbage collection until
3137 we're done. (Thanks to Gary Houston.)
3138
3139 1998-10-09 Jim Blandy <jimb@zwingli.cygnus.com>
3140
3141 * Makefile.am (libguile_la_LDFLAGS): Increment shared library
3142 version number.
3143 * Makefile.in: Regenerated.
3144
3145 * fports.h (scm_setbuf0, scm_setvbuf, scm_setfileno,
3146 scm_evict_ports, scm_open_file, scm_stdio_to_port): Get rid of
3147 SCM_P macro.
3148
3149 Do magic to mix reads and writes on stdio FILE-based ports.
3150 (Thanks to Christian Lynbech.)
3151 * fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY):
3152 New macros.
3153 (pre_read, pre_write): New functions.
3154 (local_fgetc, local_fgets, local_ffwrite, local_fputc,
3155 local_fputs): Call them.
3156 (local_fflush): Mark the port as ready for reading and writing.
3157 (scm_stdio_to_port): Set the FPORT_READ_SAFE, FPORT_WRITE_SAFE
3158 flags on new port objects. This might not be accurate --- who
3159 knows what state the FILE * is in when we get it --- but it won't
3160 do extraneous calls to fflush or fseek, so it's no worse than the
3161 behavior before this change.
3162 * ports.h: Add comment.
3163
3164 Centralize the creation of port objects based on stdio FILE * in
3165 fports.c; don't just throw them together anywhere.
3166 * fports.c (scm_stdio_to_port): Make NAME a SCM value, which is
3167 what the rest of Guile wants. Don't set the revealed count;
3168 that's only appropriate for stdin, stdout, stderr.
3169 (scm_standard_stream_to_port): This function does set the revealed
3170 count.
3171 * init.c (scm_init_standard_ports): Use scm_standard_stream_to_port,
3172 not scm_stdio_to_port.
3173 * filesys.c (scm_open): Call scm_stdio_to_port; don't write it out.
3174 * fports.c (scm_open_file): Same.
3175 * posix.c (scm_pipe): Same.
3176 * socket.c (scm_sock_fd_to_port): Same.
3177 * ioext.c (scm_fdopen): Same.
3178 (scm_freopen): Moved from here to...
3179 * fports.c (scm_freopen): ... here. This is really something that
3180 munges the internals of an fport, so it should go here.
3181 * fports.h (scm_stdio_to_port): Adjust prototype.
3182 (scm_standard_stream_to_port, scm_freopen): New protoypes.
3183 * ioext.h (scm_freopen): Prototype removed.
3184
3185 * filesys.c (set_element, get_element): This can work on both pipe
3186 and file ports, so use SCM_FPORTP to typecheck, instead of testing
3187 for scm_tc16_fport.
3188
3189 * scmconfig.h.in: Regenerated.
3190
3191 Change the definition of the functions in scm_ptobfuns so that
3192 they get passed the port object, not the port's stream.
3193 * ports.h (scm_ptobfuns): Rename all `stream' arguments to `port'.
3194 * gc.c (scm_gc_sweep): Pass the port itself to the free function.
3195 * genio.c (scm_putc, scm_puts, scm_lfwrite, scm_fflush, scm_getc):
3196 Pass the port itself to the scm_ptobs function.
3197 * ports.c (scm_close_port, scm_force_output, scm_flush_all_ports,
3198 scm_generic_fgets): Same.
3199 (putc_void_port, puts_void_port, write_void_port, flush_void_port,
3200 getc_void_port, fgets_void_port, close_void_port): Just change the
3201 argument names; these functions don't really do anything.
3202 * fports.c (local_fgetc, local_fgets, local_fclose, local_fflush,
3203 local_fputc, local_fputs, local_ffwrite, local_pclose): Take the
3204 port as an argument, and use SCM_STREAM to get the stdio FILE *.
3205 Also, use prototyped definitions, and get rid of the extra
3206 declarations.
3207 (scm_fptob, scm_pipob): We don't need casts here any more.
3208 * strports.c (prinstpt): Use prototype declarations.
3209 (stputc, stwrite, stputs, stgetc): Take the port as an argument,
3210 and use SCM_STREAM to get the string info. Also, use prototyped
3211 definitions, and get rid of the extra declarations.
3212 * vports.c (sfputc, sfwrite, sfputs, sfflush, sfgetc, sfclose,
3213 noop0): Same.
3214
3215 * ports.h (scm_ptobfuns): Replace uses of SCM_P with a straight
3216 prototype; it's okay (preferred, even!) to use ANSI C in Guile.
3217
3218 * fports.c (local_fgetc, local_fgets): Renamed from scm_fgetc and
3219 scm_fgets, for consistency.
3220 (scm_fptop, scm_pipob): References updated.
3221
3222 1998-10-08 Jim Blandy <jimb@zwingli.cygnus.com>
3223
3224 Include the source location in error messages for scripts.
3225 * init.c (scm_boot_guile_1): Use scm_internal_lazy_catch, so the
3226 stack is still there when we catch the error.
3227 * throw.c (handler_message): If we are handling an error with a
3228 message, then put together the proper arguments and call
3229 scm_display_error, instead of scm_display_error_message. That
3230 displays source location, if it can find it.
3231
3232 1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
3233
3234 * gc.c (scm_unprotect_object): Change this so that calls to
3235 scm_protect_object and scm_unprotect_object nest properly.
3236 (scm_protect_object): Doc fixes.
3237
3238 * strings.c (scm_string_set_x): Require the argument to be a
3239 writable string, not a substring or a symbol.
3240 * strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.
3241 (Thanks to John Redford and Charbel Jacquin.)
3242
3243 * scmconfig.h.in: Regenerated; ../acconfig.h has changed.
3244
3245 1998-10-07 Jim Blandy <jimb@totoro.red-bean.com>
3246
3247 * eval.c (safe_setjmp): Remove this misunderstanding.
3248 (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Replace with references to
3249 ordinary setjmp.
3250
3251 1998-10-06 Jim Blandy <jimb@zwingli.cygnus.com>
3252
3253 * libguile.h: Mark these as C declarations, for compilation by C++
3254 compilers.
3255
3256 * snarf.h (SCM_PROC, SCM_PROC1): Remove very odd code in #ifdef
3257 __cplusplus clause. I seriously doubt this ever worked the way
3258 the author seems to have intended.
3259
3260 1998-10-05 Jim Blandy <jimb@zwingli.cygnus.com>
3261
3262 Utterly needless cleanups to hopelessly messy code.
3263 * ports.c: Doc fixes.
3264 (scm_fflush): Moved to ...
3265 * genio.c (scm_fflush): ... here, amongst all the other port
3266 method invocation functions.
3267 * genio.h, ports.h: The prototype moves too.
3268
3269 1998-10-04 Jim Blandy <jimb@zwingli.cygnus.com>
3270
3271 * backtrace.c (display_error_body): The current frame does not
3272 always have a parent frame; consider a function called directly
3273 from the MAIN_FUNC passed to scm_boot_guile. (Thanks to Maciej
3274 Stachowiak.)
3275
3276 * alloca.c (alloca): Undo yesterday's changes, and simply call
3277 malloc directly for storage, and abort if we don't get what we
3278 want. The situation is much simpler --- just call malloc. Emacs
3279 has bizarre/evil requirements (signal handlers might malloc unless
3280 you set this global flag, so you have to set the flag around all
3281 calls to malloc) which we are certainly not going to conform to,
3282 so we can do the simple and obvious thing.
3283
3284 * coop.c (coop_condition_variable_wait): Make this function
3285 static. It's only useful internally --- you should never just
3286 wait on a condition variable.
3287 * coop-defs.h (coop_condition_variable_wait): Delete prototype.
3288
3289 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
3290
3291 * unif.c (scm_array_set_x): Accept any kind of number as an
3292 element for a uniform vector of doubles. This is more consistent
3293 with Scheme's view of numbers. (Thanks to Miroslav Silovic.)
3294
3295 * alloca.c: Use scm_must_malloc to obtain storage. Hopefully this
3296 works; I can't conveniently test it myself. (Thanks to Dvid
3297 Tillman for the bug report.)
3298
3299 * init.c: Doc fixes.
3300
3301 * init.c (invoke_main_func): Load the startup files (boot-9.scm)
3302 from here, not from scm_compile_shell_switches (which is a pretty
3303 dumb place to do it).
3304 (scm_load_startup_files): New function.
3305 (scm_ice_9_already_loaded): Variable moved to here from script.c.
3306 * script.c (scm_compile_shell_switches): Don't load the startup
3307 files here.
3308 (scm_ice_9_already_loaded): Variable moved.
3309 * init.c (scm_load_startup_files): Prototype for new function.
3310 * gh_init.c (gh_enter): Doc fix.
3311
3312 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
3313
3314 Some anti-warning changes from Greg Harvey.
3315 * gh_data.c (gh_scm2doubles): Initialize m, to avoid compiler
3316 warnings when it doesn't understand our NORETURN declarations in
3317 error.h.
3318 * posix.c (scm_mknod): Similar.
3319
3320 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
3321
3322 * posix.c (scm_getpwuid): If we can't find an entry, return our
3323 own message, instead of using scm_syserror --- the getpwMUMBLE
3324 functions don't set `errno' to anything interesting.
3325
3326 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
3327
3328 Get rid of warnings from the cooperative threading system.
3329 * threads.h (scm_single_thread_p, scm_yield,
3330 scm_call_with_new_thread, scm_join_thread, scm_make_mutex,
3331 scm_lock_mutex, scm_unlock_mutex, scm_make_condition_variable,
3332 scm_wait_condition_variable, scm_signal_condition_variable): Add
3333 prototypes for these Scheme-visible functions.
3334 * coop-defs.h (coop_next_runnable_thread,
3335 coop_wait_for_runnable_thread_now, coop_wait_for_runnable_thread):
3336 Prototypes for these here, even though they're from iselect.c.
3337 (coop_condition_variable_wait, coop_join): Add prototypes.
3338 * coop-threads.c (scm_threads_free_thread, scm_threads_free_mutex,
3339 scm_threads_free_condvar): Make these smob functions static.
3340 * coop-threads.h (coop_init): Give this a real prototype.
3341 * coop.c: #include <unistd.h>, if we have it, for `usleep' and `sleep'.
3342 (coop_next_runnable_thread): No need to provide prototype; it's in
3343 coop-defs.h.
3344
3345 * scmconfig.h.in: .detarenegeR
3346
3347 * iselect.c, threads.c: Doc fixes.
3348
3349 1998-10-03 Jim Blandy <jimb@zwingli.cygnus.com>
3350
3351 * Makefile.in: Regenerated with a patched automake, to get
3352 dependency generation right when using EGCS.
3353
3354 * inet_aton.c (inet_aton): Add prototype, to remove compiler
3355 warning. (Thanks to Robert Pluim.)
3356
3357 * inet_aton.c (inet_aton): Reassure the compiler that the
3358 arguments to the <ctype.h> macros are all unsigned characters, not
3359 signed characters.
3360
3361 1998-10-03 Jim Blandy <jimb@savonarola.red-bean.com>
3362
3363 Getting rid of more warnings...
3364 * iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
3365 today's change to ../configure.in.
3366 * scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
3367 * scmconfig.h.in: Regenertaded.de.,.__
3368 * stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
3369 (scm_localtime, scm_mktime): Use a const char * to manipulate the
3370 time zone name.
3371
3372 * readline.c: Doc fix.
3373 (rl_cleanup_after_signal, rl_free_line_state): Make these static.
3374 * readline.h (scm_filename_completion_function): Add prototype.
3375 (scm_init_readline): Make this into a prototype.
3376
3377 * readline.c (scm_filename_completion_function): Use SCM_PROC to
3378 declare this, instead of calling scm_make_subr manually.
3379
3380 1998-10-02 Jim Blandy <jimb@savonarola.red-bean.com>
3381
3382 * readline.h (scm_init_readline): Add prototype for this.
3383 (scm_init_readline): Make this a real prototype.
3384
3385 1998-09-30 Jim Blandy <jimb@zwingli.cygnus.com>
3386
3387 Warning fixes from Maciej Stachowiak:
3388 * backtrace.h (scm_display_application, scm_backtrace): Add
3389 prototypes.
3390 * debug.c (scm_m_start_stack): Make this function static.
3391 * fluids.h (scm_fluid_p): Add prototype.
3392 * procprop.c (scm_i_procedure_arity): Make this function static.
3393 * regex-posix.c (scm_regexp_error_msg): Make this function static.
3394 * regex-posix.h (scm_init_regex_posix): Use prototype, not K&R decl.
3395 * root.h (scm_dynamic_root): Add external prototype.
3396 * scmsigs.h (scm_usleep): Add external prototype.
3397 * script.h (scm_init_script): Use prototype, not K&R decl.
3398 * stacks.h (scm_stack_id): Add external prototype.
3399 * symbols.h (scm_sysintern0_no_module_lookup): Add external prototype.
3400
3401 1998-09-30 Mark Galassi <rosalia@cygnus.com>
3402
3403 * gh.h: took out the definitions of vset and vref, since they are
3404 replaced by the proper vector routines that correspond to the R4RS
3405 procedures.
3406
3407 1998-09-29 Jim Blandy <jimb@totoro.red-bean.com>
3408
3409 * snarf.h (SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): New macros;
3410 these are analogous to SCM_VCELL and SCM_GLOBAL_VCELL but take a
3411 third argument, a C expression that should result in a SCM value,
3412 which is used to initialize the variable. Reimplemented
3413 SCM_CONST_LONG in terms of SCM_VCELL_INIT. (Thanks to Maciej
3414 Stachowiak.)
3415
3416 * version.h (scm_libguile_config_stamp): Add prototype.
3417 (From Maciej Stachowiak.)
3418
3419 1998-09-26 Jim Blandy <jimb@zwingli.cygnus.com>
3420
3421 * eval.c (scm_force): Assert that x is SCM_NIMP to fix segv when
3422 (force 9) is tried. (Thanks to Karl M. Hegbloom.)
3423
3424 1998-09-06 Jim Blandy <jimb@zwingli.cygnus.com>
3425
3426 * print.c (scm_iprin1): Rather than having one i, and using it in
3427 several places, declare a fresh i local to each block where it is
3428 used, and give it a signedness appropriate to its use in each case.
3429 (scm_iprlist): Same.
3430
3431 * print.c (scm_iprin1): Add cast to avoid unsigned/signed
3432 comparison warnings.
3433
3434 * print.c (ENTER_NESTED_DATA): Make i an unsigned long, to avoid
3435 signed/unsigned clashes.
3436
3437 * posix.h (scm_tmpnam): Added prototype.
3438
3439 * objects.h (scm_set_object_procedure_x, scm_make_class_object,
3440 scm_make_subclass_object): Add external prototypes.
3441
3442 * numbers.c (scm_mkbig): Add cast, and note that signed/unsigned
3443 comparison is okay here.
3444
3445 * numbers.c (scm_istr2int): Add cast; len is known to be positive.
3446
3447 * numbers.c (scm_bigcomp): Clarify logic, and avoid relying on the
3448 (true, but confusing) fact that -1 == ((unsigned) 0 - 1).
3449
3450 * numbers.c (scm_adjbig): Make nsiz an scm_sizet, to avoid mixing
3451 signed/unsigned.
3452
3453 * load.c (swap_port): Make this function static.
3454
3455 * load.c (scm_search_path): Make max_path_len and max_ext_len
3456 unsigned, since they're compared against string sizes.
3457
3458 * load.c (init_build_info): Make i unsigned.
3459
3460 * ioext.h (scm_read_line): Add prototype.
3461
3462 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
3463 scm_hash_fn_remove_x): Make hash bucket index local variable k
3464 unsigned. Use scm_ulong2num to pass it to SCM_ASSERT as
3465 accurately as possible.
3466
3467 * gh_data.c (gh_set_substr): Add casts to avoid signed/unsigned
3468 comparisons, and range checking to make sure those casts are
3469 harmless.
3470
3471 * stackchk.h (SCM_STACK_OVERFLOW_P): Change definition to avoid
3472 signed/unsigned comparisons.
3473
3474 * smob.c (scm_numsmob): Make this an int, not an scm_sizet, to
3475 avoid signed/unsigned comparisons.
3476 * smob.h (scm_numsmob): Change extern declaration to match.
3477
3478 * ports.c (scm_numptob): Make this an int, not an scm_sizet, to
3479 avoid signed/unsigned comparisons.
3480 * ports.h (scm_numptob): Change extern declaration to match.
3481 (scm_current_load_port, scm_set_port_line_x,
3482 scm_set_port_column_x): New prototypes.
3483
3484 * gsubr.c (GSUBR_TEST): Don't #define this. Nobody's using the
3485 test code, and it causes warnings.
3486
3487 * gh.h (gh_int2scmb, gh_uniform_vector_length,
3488 gh_uniform_vector_ref): Added prototypes.
3489
3490 * Makefile.am (libguile_la_SOURCES): Include Scheme-level
3491 debugging support unconditionally. That's backtrace.c, stack.c,
3492 debug.c, and srcprop.c.
3493 (EXTRA_libguile_la_SOURCES): Omit those from here.
3494 * Makefile.in: Regenerated.
3495
3496 1998-08-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3497
3498 * options.c (scm_options): Bugfix: Allow empty list of options!
3499
3500 * debug.c, debug.h (scm_single_step): Removed.
3501 (scm_with_traps): New procedure. This procedure could easily be
3502 written in Scheme but needs to be highly optimized.
3503
3504 * eval.h, eval.c: New evaluator trap flag: SCM_TRAPS_P.
3505
3506 * eval.c (SCM_CEVAL, SCM_APPLY): Removed resetting of trap flags.
3507 Check SCM_TRAPS_P before trapping.
3508
3509 1998-07-30 Jim Blandy <jimb@zwingli.cygnus.com>
3510
3511 Changes to avoid signed/unsigned comparison warnings.
3512 * gc.c (scm_mtrigger, scm_heap_size): Make these unsigned longs.
3513 (scm_gc_sweep): Make n and j local to the blocks they're used in,
3514 so they can have appropriate types for each application. Make i
3515 signed. Use initializers in some spots. I'll probably pay for
3516 all this tweaking.
3517 (scm_must_malloc, scm_must_realloc): Use scm_sizet for size args.
3518 (scm_must_realloc): Make nm unsigned.
3519 (init_heap_seg): Make new_seg_index and n_new_objects signed.
3520 (scm_init_storage): Use prototype-style definition, and make the
3521 argument unsigned.
3522 * gc.h (scm_heap_size, scm_mtrigger, scm_must_malloc,
3523 scm_must_realloc, scm_init_storage): Adjust prototype accordingly.
3524
3525 * filesys.c (scm_readlink): Make local vars rv and size ints, to
3526 avoid signed/unsigned comparison warnings, and because the return
3527 value of readlink may be -1. Don't bother casting the third
3528 argument to readlink.
3529
3530 * filesys.c (scm_dirname, scm_basename): Move these to their own
3531 page, at the end of the file.
3532 * filesys.h (scm_dirname, scm_basename): Add prototypes for these.
3533
3534 * eval.h (scm_eval_options_interface): Add external prototype for this.
3535 * eval.c (scm_eval_options_interface): Use prototype-style def'n.
3536
3537 * eval.c (scm_lookupcar1): Make this static.
3538
3539 * dynl.h (scm_registered_modules, scm_clear_registered_modules):
3540 Make these prototype declarations, not K&R-style.
3541
3542 * chars.c (scm_tables_prehistory): Add cast, to remove signed/
3543 unsigned comparison warning.
3544
3545 * appinit.c: File removed. It had a single function in it, empty,
3546 whose reason for existence is explained in no documentation or
3547 comment. I think it's there as a default for some Tcl-style
3548 initialization, but Tcl abandoned that approach a while ago.
3549 * Makefile.am (libguile_la_SOURCES): Remove appinit.c.
3550 (BUILT_SOURCES): Remove appinit.x.
3551 * Makefile.in: Regenerated.
3552
3553 1998-07-29 Jim Blandy <jimb@zwingli.cygnus.com>
3554
3555 * Makefile.in: Regenerated using the last public version of
3556 automake, not the hacked Cygnus version.
3557
3558 1998-07-28 Jim Blandy <jimb@zwingli.cygnus.com>
3559
3560 Remove Totoro kludge.
3561 * Makefile.in, scmconfig.h.in: Regenerated.
3562 * init.c, readline.c: Don't check if TOTORO is #defined.
3563
3564 1998-07-26 Jim Blandy <jimb@zwingli.cygnus.com>
3565
3566 * Makefile.am: Adjust for new thread configuration system.
3567 (INCLUDES): Include the value of THREAD_CPPFLAGS.
3568 (guile_LDADD, check_ldadd): THREAD_LIBS_LOCAL has been renamed from
3569 THREAD_LIBS.
3570 (THREAD_LIBS): Definition deleted; automake will generate such
3571 things automatically.
3572 * Makefile.in: Regenerated.
3573
3574 1998-07-23 Jim Blandy <jimb@zwingli.cygnus.com>
3575
3576 Simplify smob and port marking; set the mark bit in the generic
3577 marking code, and make marker routines only responsible for
3578 turning up outgoing pointers.
3579 * gc.c (scm_gc_mark): Set the mark bit on ports and smobs here,
3580 before calling the marking function. Don't call the marking
3581 function if it's zero.
3582 * markers.c (scm_mark0): Just return #f. This function isn't
3583 necessary at all now, but it's harmless to call it. We'll leave
3584 it in so other folks' code doesn't croak at link time.
3585 (scm_markcdr): Don't call SCM_SETGC8MARK.
3586 * async.c (mark_async): Don't call SCM_SETGC8MARK.
3587 * dynl.c (mark_dynl_obj): Same.
3588 * root.c (mark_root): Same.
3589 * srcprop.c (marksrcprops): Same.
3590 * unif.c (markra): Same.
3591 * variable.c (scm_markvar): Same.
3592 * ports.c (scm_markstream): Same.
3593 (void_port_ptob): Specify zero for our marking function.
3594 * debug.c (debugobjsmob): Same.
3595 * dynwind.c (guardsmob): Same.
3596 * filesys.c (dir_smob): Same.
3597 * fluids.c (fluid_smob): Same.
3598 * fports.c (scm_fptob, scm_pipob): Same.
3599 * mallocs.c (mallocsmob): Same.
3600 * regex-posix.c (regex_t_smob): Same.
3601 * smob.c (freecell, flob, bigob): Same.
3602 * threads.c (thread_smob, mutex_smob, condvar_smob): Same.
3603 * throw.c (jbsmob, lazy_catch_funs): Same.
3604
3605 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3606
3607 * eval.c (scm_copy_tree): Reverted last change: `eval' uses
3608 scm_copy_tree on code in order not to let memoized code to leak
3609 out. Thus, scm_copy_tree needs to copy vectors as well since
3610 quasiquote can introduce evaluated code also inside vector
3611 constants.
3612
3613 1998-07-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3614
3615 * eval.c (scm_copy_tree): Removed ability to copy vectors.
3616
3617 * gh_data.c, gh.h (gh_ints2scm, gh_longs2ivect,
3618 gh_ulongs2uvect): New procedures. (Complements gh_doubles2scm and
3619 gh_doubles2dvect.)
3620
3621 * unif.c: Say that ivect and uvect are of type signed and unsigned
3622 long instead of int in commentary so that it correctly describes
3623 the implementation.
3624
3625 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3626
3627 * stime.c: Removed declaration of strptime. (It should be
3628 declared by the system headers. If it turns out that some systems
3629 don't, we'll handle that then.) (Thanks to Greg Troxel.)
3630
3631 * stime.h: Renamed TIMEH --> STIMEH
3632
3633 * backtrace.c (scm_display_error, scm_display_backtrace): In order
3634 to increase portability, don't use structure assignment.
3635 (Thanks to Nicolas Neuss.)
3636
3637 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
3638 portability.
3639 (finalize_fd_sets): Added empty statement after last case label.
3640 (Thanks to Nicolas Neuss.)
3641
3642 * gc.c (scm_igc): Changed //-comment into /*-comment. (Thanks to
3643 Nicolas Neuss.)
3644
3645 Sat Jul 11 22:08:21 1998 Mikael Djurfeldt <mdj@totoro.red-bean.com>
3646
3647 * init.c, readline.c: OK, I won't have these readline.x bug
3648 reports anymore. We've had them since April. The current reason
3649 is a completely unintelligible failure of totoro.red-bean.com to
3650 do the test for rl_getc_function in libreadline correctly. This
3651 kludge overrides the test if we're on totoro so that the snapshot
3652 generation process can work.
3653
3654 * readline.c: Define a strdup replacement if not existent on system.
3655
3656 1998-07-12 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3657
3658 * vectors.c, vectors.h (scm_make_vector): Removed third argument.
3659 This change makes scm_make_vector R5RS compatible. We cannot keep
3660 the third argument since people want to be able to deduce the form
3661 of the C function call only by looking at R5RS. (At the same time
3662 we have removed some unnecessary complexity!)
3663
3664 * eval.c, filesys.c, fluids.c, gc.c, gh_data.c, init.c, kw.c,
3665 net_db.c, posix.c, print.c, regex-posix.c, scmsigs.c, socket.c,
3666 stime.c, symbols.c, unif.c, vectors.c, weaks.c: Removed third
3667 argument in call to scm_make_vector.
3668
3669 1998-07-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3670
3671 * numbers.h (SCM_NUM2DBL): New macro. Complements SCM_NUMBERP.
3672 This macro is useful in applications.
3673
3674 1998-06-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3675
3676 * load.c (scm_internal_parse_path): Renamed from scm_parse_path.
3677 (scm_parse_path, scm_search_path): New Scheme level procedures.
3678
3679 * load.h (scm_internal_parse_path, scm_parse_path,
3680 scm_search_path): Declared.
3681
3682 1998-06-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3683
3684 * filesys.c (dirname, basename): New procedures.
3685
3686 * init.c (scm_boot_guile_1): Removed condition around
3687 scm_init_options.
3688
3689 * dynwind.c: #include "genio.h"; #include "smob.h"; Implemented a
3690 new data type (guards) for representation of C level guards and
3691 data on the wind chain.
3692 (scm_internal_dynamic_wind): New function.
3693
3694 * dynwind.h: Declare scm_internal_dynamic_wind.
3695
3696 * root.h (scm_root_state): Added scm_cur_loadp.
3697
3698 * root.c (mark_root): Added comment about cur_loadp.
3699
3700 * load.c: #include "dynwind.h";
3701 (scm_primitive_load): Use scm_inner_dynamic_wind to update
3702 scm_cur_loadp.
3703
3704 * init.c (scm_init_standard_ports): Initialize scm_def_loadp.
3705
3706 * ports.c (current-load-port): New procedure.
3707
3708 1998-06-09 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3709
3710 * ioext.c (scm_isatty_p): Accept any kind of data as argument. If
3711 not a tty, return #f.
3712
3713 * regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
3714 to Julian Satchell and Roland Kaufmann.)
3715
3716 * gh.h (gh_memv, gh_member): Fixed typos in macro definitions.
3717 (gh_write): Added declaration. (Thanks to Eiichi Takamori.)
3718
3719 1998-06-07 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
3720
3721 * debug.h, debug.c (scm_start_stack): New function. Implements
3722 the guts of old scm_m_start_stack.
3723
3724 * debug.c (scm_m_start_stack): Use scm_start_stack.
3725
3726 * init.c (scm_start_stack, scm_restart_stack): Renamed to
3727 start_stack and restart_stack. (These have static scope.)
3728
3729 1998-05-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3730
3731 * readline.c (rl_cleanup_after_signals, rl_free_line_state): New
3732 readline functions to come in release 2.3. (Thanks to Chet
3733 Ramey.)
3734 (handle_errors): Use the above functions.
3735
3736 1998-05-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3737
3738 * readline.c: Improvements for readline support: Handle errors
3739 better; Implement before-read-hook.
3740
3741 1998-05-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3742
3743 * init.c (scm_boot_guile_1), readline.c: Test for
3744 HAVE_RL_GETC_FUNCTION instead of HAVE_LIBREADLINE. (Need to
3745 assure that we have version >= 2.1.)
3746
3747 1998-05-11 Mikael Djurfeldt <mdj@kenneth>
3748
3749 * readline.c (scm_readline): Defer interrupts while we're calling
3750 readline.
3751
3752 * readline.c (scm_add_history): Bugfix: Do strdup before giving
3753 away the string to add_history.
3754 (completion_function): Do completion for readline. (Thanks to
3755 Andrew Archibald.)
3756 (scm_filename_completion_function): New procedure: Filename
3757 completer.
3758 (current_input_getc): New function. Use this one instead of
3759 standard getc from readline.
3760
3761 * throw.c, throw.h (scm_handle_by_throw): New function: This
3762 handler throws errors to next handler on the dynwind chain.
3763
3764 1998-05-09 Mikael Djurfeldt <mdj@kenneth>
3765
3766 * scmsigs.c (scm_usleep): Bugfix: Don't define j if it isn't
3767 used.
3768
3769 1998-05-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3770
3771 * procprop.c (scm_i_procedure_arity): New function. Returns arity
3772 of procedure.
3773 (scm_procedure_properties): Modified to return arity together with
3774 other properties.
3775 (scm_procedure_property): Added the read-only property `arity'.
3776 (scm_set_procedure_property_x): It is an error to set the `arity'
3777 property.
3778
3779 * gsubr.h, gsubr.c: Moved macros from gsubr.c to gsubr.h and added
3780 prefix SCM_; Made f_gsubr_apply global and added prefix scm_.
3781
3782 * procprop.h (scm_sym_arity): New symbol.
3783
3784 * objects.c (scm_set_object_procedure_x): New procedure: Use this
3785 to set the dispatch procedure of an operator or entity object.
3786
3787 * objects.h (SCM_METACLASS_OPERATOR_LAYOUT, SCM_ENTITY_LAYOUT):
3788 Made procedure slots read-only.
3789
3790 * eval.c (SCM_CEVAL): Moved scm_tc7_contin case above
3791 scm_tcs_cons_gloc case in zero args switch; Fixed args
3792 construction for operators in scm_tcs_cons_gloc case in two args
3793 switch.
3794
3795 1998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3796
3797 * fluids.c: Removed use of assert.h (in order to avoid
3798 __eprintf).
3799
3800 * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
3801
3802 * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
3803
3804 * eval.c (SCM_CEVAL): Do more thorough argument checking. This
3805 change makes the evaluator safer at the cost of evaluation speed.
3806 It handles the case when the user has added a non-immediate
3807 improper end of the application form, e.g., `(+ 0 . x)'.
3808 (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
3809 minimize the extra cost as much as possible. The new code is
3810 enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
3811 problem with structs planted directly in the code (e.g. by a
3812 macro). This no longer causes segmentation fault. (Thanks to
3813 Eric Hanchrow.)
3814
3815 * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
3816 arg `proc' in order to be able to throw errors; New argument
3817 checking code.
3818
3819 * Removed extra #include "debug.h"
3820
3821 1998-04-25 Mikael Djurfeldt <mdj@kenneth>
3822
3823 * scmsigs.c: Declare usleep as returning void on some systems.
3824 (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
3825 Satchell.)
3826
3827 * coop.c (usleep): Return void on some systems.
3828
3829 1998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3830
3831 * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
3832
3833 * coop.c: Changed return type of usleep to int.
3834
3835 * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
3836 isn't found in the OS.
3837
3838 * iselect.h: #define scm_internal_select select if GUILE_ISELECT
3839 isn't enabled. (Thought that I had made this change ages ago...)
3840
3841 * iselect.c: Declare bzero if not defined by OS.
3842
3843 1998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3844
3845 * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
3846 condition. (Thanks to John Tobey.)
3847
3848 * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
3849 scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
3850 A section.
3851
3852 * __scm.h: Start the long-term project of moving to POSIX threads.
3853 Phase 1: Classification of all critical sections.
3854 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
3855 for A sections. (See comments in __scm.h for details.)
3856
3857 * dynl.c: Only check that HAVE_DLOPEN is defined before loading
3858 dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
3859
3860 1998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3861
3862 * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
3863 cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
3864 (libpath.h, versiondat.h): Replaced dependency on Makefile with
3865 dependencies on $(srcdir)/Makefile.in
3866 $(top_builddir)/config.status in order to avoid circularity.
3867
3868 * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
3869 from argc if argc was 0 initially.
3870
3871 * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
3872 in generation of libpath.h.
3873
3874 1998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
3875
3876 * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
3877 libguile from 2 to 3.
3878
3879 1998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
3880
3881 * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
3882
3883 1998-04-13 Mikael Djurfeldt <mdj@kenneth>
3884
3885 * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
3886 scm_set_port_column_x, scm_port_filename,
3887 scm_set_port_filename_x): Removed optional arguments. Added
3888 proper argument checking.
3889
3890 * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
3891 stack size in machine words.
3892
3893 * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
3894 rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
3895 to Ole Myren Röhne.)
3896
3897 1998-04-12 Mikael Djurfeldt <mdj@kenneth>
3898
3899 * socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
3900 UNIX_DOMAIN_SOCKETS. (Thanks to Lauri Alanko.)
3901
3902 * gc.c (scm_gc_sweep): Count cells correctly. (Thanks to Ben
3903 Caradoc-Davies.)
3904
3905 * eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
3906 procedure apply: Copy argument lists before pushing them unto the
3907 environment so that the environment won't get mutated due to
3908 manipulation of procedure arguments. This should perhaps be
3909 regarded as a temporary solution until someone finds a more
3910 efficient one. (Thanks to Maciej Stachowiak.)
3911
3912 1998-04-10 Mikael Djurfeldt <mdj@kenneth>
3913
3914 * script.c (scm_compile_shell_switches): Use "guile" as default
3915 zero arg if argc is NULL.
3916
3917 1998-04-02 Mikael Djurfeldt <mdj@nada.kth.se>
3918
3919 * script.c (scm_compile_shell_switches): Allow NULL argv if argc
3920 is zero. (Thanks to Dirk Herrmann.)
3921
3922 1998-03-30 Mikael Djurfeldt <mdj@nada.kth.se>
3923
3924 * ports.c (scm_add_to_port_table): First line is now line 0
3925 (was 1). (Interface changed according to suggestion by Per
3926 Bothner.)
3927
3928 * backtrace.c (display_header): Add 1 to line and column numbers
3929 when presenting them to the user.
3930
3931 * eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
3932 from debug.c --> eval.c
3933
3934 * eval.h, eval.c (scm_eval_options_interface): New options
3935 interface.
3936 (SCM_EVAL_STACK): New option: Size of newly created stacks,
3937 i.e. stacks for new threads.
3938
3939 * coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.
3940
3941 * eval.c (unsafe_setjmp): Removed with #if 0.
3942
3943 * gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
3944 warning.
3945
3946 * eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
3947 to avoid compiler warnings.
3948
3949 * dynl-dl.c (sysdep_dynl_func): Only define usymb if needed.
3950
3951 1998-03-28 Mikael Djurfeldt <mdj@nada.kth.se>
3952
3953 * throw.c (handler_message): Print message on current error port
3954 instead of default error port. (Thanks to Maciej Stachowiak.)
3955
3956 Mon Mar 2 21:35:02 1998 Gary Houston <ghouston@actrix.gen.nz>
3957
3958 * ports.c (scm_add_to_port_table): allocate in units of
3959 struct scm_port_table *, not struct scm_port_table.
3960 * posix.c (scm_close_pipe): remove the port from the port table
3961 and mark as closed.
3962 Thanks to Rob Engle for both fixes.
3963
3964 1998-02-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3965
3966 * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
3967 coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
3968
3969 1998-02-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3970
3971 * throw.h: Removed jmpbuf arg in scm_catch_body_t.
3972
3973 * backtrace.c (display_error_body, display_backtrace_body),
3974 coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
3975 gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
3976 (invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
3977 scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
3978 functions.
3979
3980 * throw.c (scm_internal_catch, scm_internal_lazy_catch): Bodies
3981 don't receive the jmpbuf arg anylonger.
3982 (scm_catch): Don't accept a #f tag.
3983 (scm_throw): Check that key is a symbol.
3984 (scm_ithrow): Don't take a jmpbuf as key. Don't check key arg.
3985
3986 Fri Jan 30 22:28:07 1998 Mikael Djurfeldt <mdj@kenneth>
3987
3988 * async.c (async_pending): Removed declaration.
3989
3990 1998-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3991
3992 * dynwind.c (scm_wind_chain): New debug function.
3993
3994 * coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
3995 scheme_handler_bootstrip, scheme_launch_thread, c_launch_data,
3996 c_body_bootstrip, c_handler_bootstrip, c_launch_thread): Add an
3997 extra layer of functions around the body and handler of a thread.
3998 This extra layer makes sure that the handler is called in the
3999 dynamic context of the surround (= empty dynwind list), but under
4000 the *dynamic root* of the body. We can not use the dynamic root
4001 of the surround since that root belongs to another thread => stack
4002 is not handled correctly. It may seem ugly to use this extra
4003 layer, but the extra cost in terms of execution time is really
4004 negligible compared to the total amount of time required to create
4005 a thread, and it would reduce maintainability to duplicate the
4006 crucial and complicated steps performed by cwdr.
4007
4008 * __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
4009 (SCM_ALLOW_INTS): Added thread switching code before interrupts
4010 get re-enabled. The important effect of this is that interrupts
4011 are blocked during thread switching so that thread data structures
4012 don't risk getting messed up by an unfortunate signal.
4013 (SCM_REDEFER_INTS, SCM_REALLOW_INTS): It turned out that gcc-2.8.0
4014 seems to do more aggressive optimization which actually move
4015 instructions around in these macros in a fatal way. Therefore:
4016 Introduce Anthony's SCM_FENCE macro! (And I who thought he was
4017 just superstitious...)
4018 (SCM_TICK): Maybe do a context switch and take care of asyncs.
4019 This macro should be used instead of SCM_ASYNC_TICK since the
4020 latter doesn't do context switches any more.
4021
4022 * eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
4023 instead of SCM_ASYNC_TICK.
4024
4025 * coop.c, iselect.c: Since thread switches are now performed with
4026 interrupts masked, we can't use the old mechanism of delivering
4027 signals immediately when they arrive. Signals must instead be
4028 delivered when the asyncs run *after* the end of the critical
4029 section in scm_internal_select. But this also means after context
4030 switch so that the signal will be delivered to a different thread.
4031 To avoid this, I have changed the protocol of
4032 coop_wait_for_runnable_thread and friends so that they are allowed
4033 to return the original thread. So, if a signal arrives during
4034 scm_internal_select, we won't any longer be forced do a context
4035 switch, but can remain in the same thread and deliver the signal
4036 to it.
4037
4038 * async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
4039 scm_asyncs_pending and made it global.
4040
4041 * iselect.c: Small fixes.
4042
4043 * coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
4044 coop_condition_variable_init, coop_condition_variable_wait,
4045 coop_condition_variable_signal): Changed return type from `void'
4046 to `int'. This is to adhere closer to the pthreads interface.
4047 This, in turn, is part of an attempt to provide C versions of the
4048 mutex and condition variable primitives which can be part of a
4049 frontend to COOP or pthreads.
4050
4051 * coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
4052 coop_condition_variable_destroy): New functions.
4053
4054 * coop-threads.c (scm_wait_condition_variable): Use
4055 coop_condition_variable_wait_mutex.
4056
4057 * coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
4058 Definitions moved to coop-defs.h.
4059
4060 * coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
4061 scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
4062 scm_cond_destroy): New C interface to mutecis and cond vars.
4063
4064 1998-01-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4065
4066 * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.
4067
4068 * iselect.c: Now several threads can wait on the same file
4069 descriptor. The behaviour is compatible with OS select: All
4070 threads waiting for the fd return with the same status.
4071
4072 1998-01-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4073
4074 * coop-threads.c, threads.h (scm_spawn_thread): New function.
4075 Can spawn a thread from application C code.
4076
4077 1998-01-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4078
4079 * gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
4080 gh_doubles2scm): New functions.
4081
4082 1998-01-15 Mark Galassi <rosalia@nis.lanl.gov>
4083
4084 * gh_eval.c (gh_eval_str): cleanup -- threw out the old
4085 commented-out version of gh_eval_str()
4086
4087 Sun Jan 4 02:23:36 1998 Gary Houston <ghouston@actrix.gen.nz>
4088
4089 * socket.c (scm_bind): free soka after use.
4090
4091 Sat Jan 3 20:55:07 1998 Gary Houston <ghouston@actrix.gen.nz>
4092
4093 * stime.c (tzvar): new variable.
4094 (setzone, restorezone, scm_localtime, scm_mktime, scm_strftime):
4095 avoid memory leaks when allocating.
4096
4097 1998-01-03 Jim Blandy <jimb@totoro.red-bean.com>
4098
4099 * iselect.h: Some systems require <sys/types.h> to get the FD_SET
4100 macro definitions.
4101
4102 * gc.c, tags.h: Doc fixes.
4103
4104 1998-01-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4105
4106 * eval.c (macro-eval!): Removed. This function was a design bug.
4107 It allowed memoized code to leak out to the scheme level. Most
4108 things that you could do with `macro-eval!' can be done with
4109 `local-eval'.
4110
4111 1997-12-20 Tim Pierce <twp@skepsis.com>
4112
4113 * fports.c (scm_pipob): Use scm_generic_fgets for line i/o, since
4114 scm_fgets now depends on ftell(3) to know how many bytes were
4115 read. Sigh.
4116
4117 1997-12-15 Tim Pierce <twp@skepsis.com>
4118
4119 * gh_data.c (gh_scm2newstr, gh_get_substr): Use RO macros for
4120 dealing with strings.
4121
4122 1997-12-13 Tim Pierce <twp@skepsis.com>
4123
4124 Make %read-line more suitable for implementing read-line efficiently.
4125 * ioext.c (scm_read_line): Strip the terminating newline from a
4126 string, and return a cons of the string and its terminator.
4127
4128 * fports.c, fports.h (scm_fgets): Add `len' argument. The length
4129 of the string that is read is stored in this memory location.
4130 * ports.c, ports.h (scm_generic_fgets, fgets_void_port): Same.
4131 * genio.c, genio.h (scm_do_read_line): Update caller.
4132 * ports.h (scm_ptobfuns): Update typedef.
4133 * fports.c (scm_fptob, scm_pipob): Update struct.
4134
4135 1997-12-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4136
4137 * filesys.c (set_element): Return file descriptor.
4138 (fill_select_type): Return the highest file descriptor.
4139 (scm_select): Tell select about the highest file descriptor. On
4140 some systems the SELECT_SET_SIZE can be as much as 128 bytes.
4141 Therefore the extra overhead for calculating the maximum fd seems
4142 to be more than compensated. Is this correct? In any case,
4143 scm_internal_select will be much faster with this info.
4144 (scm_select, fill_select_type, set_element): Don't accept any kind
4145 of object in the file descriptor list or vector.
4146
4147 1997-12-07 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4148
4149 * iselect.c (finalize_fd_sets): Bugfix.
4150
4151 1997-12-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4152
4153 * filesys.c (scm_select): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS
4154 when using scm_internal_select (since we might switch to another
4155 thread).
4156
4157 Sun Dec 7 01:43:56 1997 Gary Houston <ghouston@actrix.gen.nz>
4158
4159 * simpos.c (scm_system): always define: use sysmissing if not
4160 available. Check for HAVE_SYSTEM instead of _Windows (does
4161 Windows lack system or does it have an unusable one?).
4162 Check for error conditions -1 and 127. Use SCM_DEFER_INTS.
4163 Let the argument be optional: if not supplied, call system(NULL).
4164
4165 * ports.c (scm_close_port): relax the type check from OPPORTP to
4166 PORTP; closing a closed port is allowed.
4167
4168 1997-12-04 Tim Pierce <twp@ppp39.Nantucket.net>
4169
4170 * fports.c (scm_fgets): Return if the last char in a chunk is
4171 newline. When fgets returns a string whose length is `size-1', it
4172 is ambiguous whether a whole line was retrieved, so we must check
4173 explicitly whether a line terminator is present.
4174
4175 1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4176
4177 * print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
4178 before taking the CDR. (Thanks to Harald Meland.)
4179
4180 * filesys.c (scm_stat): Slightly optimized.
4181
4182 Wed Dec 3 12:23:06 1997 Jim Blandy <jimb@totoro.red-bean.com>
4183
4184 * ports.c (scm_close_port): Make sure the port is open before
4185 trying to close it.
4186
4187 * guile-snarf.in: Pass args through to gcc in a way that preserves
4188 whitespace boundaries. (Thanks to Greg Badros.)
4189
4190 1997-12-02 Tim Pierce <twp@skepsis.com>
4191
4192 * stacks.c (scm_frame_procedure): Reverse the logic in the return
4193 statement. (Thanks to Doug Evans for pointing this out.)
4194
4195 1997-12-01 Tim Pierce <twp@skepsis.com>
4196
4197 * scmconfig.h.in: Regenerated for USCORE change in ../acconfig.h.
4198
4199 Sun Nov 30 11:29:18 1997 Mikael Djurfeldt <mdj@kenneth>
4200
4201 * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
4202 errno macro expansion of this field name. (errno is a C
4203 preprocessor macro on some systems.)
4204
4205 1997-11-29 Tim Pierce <twp@skepsis.com>
4206
4207 * iselect.c: Doc fix.
4208
4209 Sat Nov 29 01:16:53 1997 Mikael Djurfeldt <mdj@kenneth>
4210
4211 * init.c (scm_start_stack): Removed initialization of
4212 scm_the_last_stack_var.
4213
4214 * backtrace.h: Declare scm_the_last_stack_var.
4215
4216 * backtrace.c: Define scm_the_last_stack_var.
4217
4218 * root.c (mark_root): Don't mark the_last_stack_var.
4219
4220 * root.h (scm_root_state): Removed the_last_stack_var.
4221
4222 * throw.c: Added #include "fluids.h"
4223 (ss_handler): `the-last-stack' is now a fluid.
4224
4225 * (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
4226 --> the_last_stack_fluid.
4227
4228 * backtrace.c: Added #include "fluids.h"
4229 (scm_init_backtrace): Initialize `the-last-stack' to a fluid.
4230 (scm_backtrace): `the-last-stack' is now a fluid.
4231
4232 * init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
4233 after scm_init_fluids.
4234
4235 1997-11-28 Tim Pierce <twp@skepsis.com>
4236
4237 * iselect.c: #ifdef USE_THREADS around thread-related includes.
4238
4239 * dynl-dl.c (sysdep_dynl_func): Check both USCORE and
4240 DLSYM_ADDS_USCORE to decide whether to add an underscore.
4241
4242 1997-11-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4243
4244 * iselect.c (coop_next_runnable_thread,
4245 coop_wait_for_runnable_thread): Disable interrupts so that no
4246 async is executed before a potential error_revive.
4247 (scm_internal_select): Disable interrupts during the parts of the
4248 code which manipulate the sleep queue and the file descriptors.
4249
4250 1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4251
4252 * Makefile.am: Added iselect.c and iselect.h.
4253
4254 * coop.c (coop_qinit): Initialize fields used by
4255 scm_internal_select.
4256 (coop_qget, coop_qget, coop_tmp_queue): Made global.
4257 (coop_next_runnable_thread): If GUILE_ISELECT enabled, use
4258 replacement in iselect.c.
4259 (coop_mutex_lock, coop_condition_variable_wait, coop_abort,
4260 coop_join): If GUILE_ISELECT enabled, use
4261 coop_wait_for_runnable_thread instead of
4262 coop_next_runnable_thread.
4263 (usleep, sleep): New replacements for system functions if
4264 GUILE_ISELECT is enabled.
4265
4266 * coop-threads.h: Declare coop_wait_for_runnable_thread.
4267
4268 * coop-defs.h (coop_t): Added fields used by scm_internal_select.
4269
4270 * filesys.c: Added #include "iselect.h". Moved FD-macros to
4271 iselect.h. Implement Scheme level `select' using
4272 scm_internal_select. (See NEWS.)
4273
4274 * genio.c (scm_getc): Block with scm_internal_select. (See NEWS.)
4275
4276 * init.c: Call scm_init_iselect.
4277
4278 * iselect.h, iselect.c: New files. Implements
4279 scm_internal_select. (See NEWS.)
4280
4281 1997-11-27 Tim Pierce <twp@skepsis.com>
4282
4283 Fix a memory leak in scm_read_line and a type cast bug in the ptob.
4284 * fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
4285 and scm_must_free, since ultimately the string returned will be copied
4286 by scm_makfrom0str anyway. Also, read any characters that may have
4287 been pushed onto the port with scm_ungetc.
4288 * ports.c (scm_generic_fgets): Same as for scm_fgets.
4289 * ioext.c (scm_read_line): Free string after Guilifying it.
4290 * ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
4291
4292 1997-11-26 Anthony Green <green@hoser.cygnus.com>
4293
4294 * gh_data.c (gh_set_substr): Strings can be longer than 256 bytes.
4295
4296 * gh.h: Safely wrap prototypes for c++ usage.
4297
4298 1997-11-25 Mark Galassi <rosalia@cygnus.com>
4299
4300 * gh_test_repl.c (main_prog): changed invocation of gh_repl() to
4301 gh_repl (argc, argv).
4302
4303 1997-11-24 Mark Galassi <rosalia@nis.lanl.gov>
4304
4305 * gh_init.c (gh_repl): modified gh_repl() to accept argc and argv
4306 and to invoke scm_shell().
4307 (gh_launch_pad): took out the loading of boot-9.scm from here,
4308 since it is probably best to let the user control that. In fact,
4309 gh_repl() now invokes scm_shell() which does that.
4310
4311 1997-11-23 Mark Galassi <rosalia@cygnus.com>
4312
4313 * gh_test_repl.c (main_prog): added argc and argv to the gh_repl()
4314 invocation.
4315
4316 1997-11-22 Tim Pierce <twp@twp.tezcat.com>
4317
4318 * dynl-dl.c (sysdep_dynl_func): Fix memory leak created by
4319 yesterday's underscore patch. (Thanks to Marius Vollmer for
4320 spotting this.)
4321
4322 1997-11-21 Tim Pierce <twp@twp.tezcat.com>
4323
4324 * dynl-dl.c (sysdep_dynl_func): Prepend symb with underscore if
4325 DLSYM_ADDS_USCORE is not defined.
4326
4327 1997-11-17 Mark Galassi <rosalia@nis.lanl.gov>
4328
4329 * gh_data.c (gh_uniform_vector_length):
4330 (gh_uniform_vector_ref): started implementing the uniform types in
4331 the gh_ interface.
4332
4333 1997-11-06 Mikael Djurfeldt <mdj@nada.kth.se>
4334
4335 * regex-posix.c (scm_free_regex_t): Return size of regex_t instead
4336 of 0; size_t --> scm_size_t. Thanks to Bernard Urban.
4337
4338 1997-10-26 Mikael Djurfeldt <mdj@nada.kth.se>
4339
4340 * scmconfig.h.in: Updated (HAVE_LIBTERMCAP was added when
4341 configure.in was changed).
4342
4343 Sun Oct 26 02:20:11 1997 Jim Blandy <jimb@totoro.red-bean.com>
4344
4345 * Makefile.am (modinclude_HEADERS): Include readline.h here.
4346 * Makefile.in: Regenerated.
4347
4348 1997-10-25 Marius Vollmer <mvo@zagadka.ping.de>
4349
4350 * print.h (SCM_COERCE_OPORT): Renamed to SCM_COERCE_OUTPORT. An
4351 OPORT is an `open' port, not an output port.
4352
4353 * filesys.c (scm_close, set_element, get_element, scm_chown,
4354 scm_chmod, scm_stat, scm_truncate_file, scm_fcntl, scm_fsync): Use
4355 SCM_COERCE_OUTPORT to cope with the printstate/port magic.
4356 * ports.c (scm_port_revealed, scm_set_port_revealed_x,
4357 scm_close_port, scm_port_line, scm_set_port_line_x,
4358 scm_port_column, scm_set_port_column_x, scm_port_filename,
4359 scm_set_port_filename_x, scm_port_mode,
4360 scm_close_all_ports_except, scm_set_current_output_port,
4361 scm_set_current_error_port): Likewise
4362 * ioext.c (scm_redirect_port, scm_dup_to_fdes, scm_freopen,
4363 scm_ftell, scm_fileno, scm_isatty_p, scm_primitive_move_to_fdes):
4364 Likewise
4365 * posix.c (scm_ttyname, scm_tcgetpgrp, scm_tcsetpgrp): Likewise
4366 * backtrace.c (display_backtrace_body): Likewise
4367 * fports (scm_setvbuf): Likewise
4368 * socket.c (scm_getsockopt, scm_setsockopt, scm_shutdown,
4369 scm_connect, scm_bind, scm_listen, scm_accept, scm_getsockname,
4370 scm_getpeername, scm_send, scm_sendto): Likewise
4371 * unif.c (scm_uniform_array_write): Likewise
4372
4373 Sat Oct 25 02:52:58 1997 Jim Blandy <jimb@totoro.red-bean.com>
4374
4375 Minor problems with substring-related tag changes.
4376 * symbols.h (SCM_SUBSTRP): Don't mask off the S bit; that's
4377 exactly what we want to leave in to detect substrings.
4378 (SCM_ROSTRINGP, ROUCHARS): Formatting tweaks.
4379 * tags.h: Fix diagrams and comments describing the S tag bit;
4380 remove vestigial remarks about the D tag bit.
4381 (SCM_TYP7, SCM_TYP7S): Rephrased for readability.
4382 * strings.c: Formatting tweaks.
4383
4384 * load.c (scm_init_load_path): Check GUILE_LOAD_PATH environment
4385 variable first; then SCHEME_LOAD_PATH, with a warning message.
4386 (scm_parse_path): New function.
4387 * script.c: Doc fixes.
4388
4389 Thu Oct 23 01:02:03 1997 Jim Blandy <jimb@totoro.red-bean.com>
4390
4391 Readline support, from Daniel Risacher.
4392 * readline.c, readline.h: New files.
4393 * init.c: #include "readline.h".
4394 (scm_boot_guile_1): Call scm_init_readline, if we have it.
4395 * Makefile.am (libguile_la_SOURCES): Include readline.c.
4396 * Makefile.in: Regenerated.
4397 * scmconfig.h.in: Regenerated, after change to ../configure.
4398
4399 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
4400
4401 * gh.h: gh_vector_set -> gh_vector_set_x
4402
4403 1997-10-20 Mark Galassi <rosalia@nis.lanl.gov>
4404
4405 * gh_data.c (gh_vector_set_x): changed name to make it consistent
4406 with the ! -> _x mapping when going from Scheme to C.
4407
4408 1997-10-19 Mark Galassi <rosalia@cygnus.com>
4409
4410 * gh.h (gh_reverse):
4411 (gh_list_tail):
4412 (gh_list_ref):
4413 (gh_memq):
4414 (gh_memv):
4415 (gh_member):
4416 (gh_assq):
4417 (gh_assv):
4418 (gh_assoc): added these gh_ functions implemented as macros.
4419
4420 * gh_predicates.c (gh_null_p):
4421 (gh_string_equal_p): added these two missing predicates.
4422
4423 * gh_list.c (gh_append):
4424 (gh_append2):
4425 (gh_append3):
4426 (gh_append4):
4427 (gh_set_car_x):
4428 (gh_set_cdr_x): added these routines as I go through and try to
4429 complete the picture R4RS functions that should be mirrored in the
4430 gh_ interface.
4431
4432 Sat Oct 18 01:52:51 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4433
4434 * tags.h (scm_tc7_substring): Changed the comment and code to
4435 conform with the changes below. Folks! We have suddenly two new
4436 free tc7 codes!!! Jummy, jummy!
4437
4438 Tue Oct 14 22:03:06 1997 Tom Tromey <tromey@cygnus.com>
4439
4440 * Makefile.in: Rebuilt.
4441 * Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
4442 mbstrings.c.
4443 (modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
4444 * unif.c (scm_vector_set_length_x): Don't handle multibyte
4445 strings.
4446 * tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
4447 (scm_tag): Don't handle multibyte strings.
4448 * read.c: Don't include mbstrings.h.
4449 (scm_lreadr): Don't handle multibyte ports.
4450 * kw.c: Don't include mbstrings.h.
4451 * init.c: Don't include mbstrings.h.
4452 (scm_boot_guile_1): Don't init mbstrings module.
4453 * hash.c (scm_hasher): Don't handle mbstrings.
4454 * gscm.c (gscm_run_scm): Don't init mbstrings module.
4455 * gc.c (scm_gc_mark): Don't handle mbstrings.
4456 (scm_gc_sweep): Likewise.
4457 * eval.c (SCM_CEVAL): Don't handle mbstrings.
4458 * eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
4459 * tags.h (SCM_TYP7SD): Removed.
4460 (SCM_TYP7D): Removed.
4461 (scm_tc7_mb_string): Removed.
4462 (scm_tc7_mb_substring): Removed.
4463 * print.c (scm_iprin1): Handle char printing directly. Don't
4464 handle mbstrings.
4465 Don't include "mbstrings.h".
4466 * symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
4467 scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
4468 multi-byte flag.
4469 Don't include "mbstrings.h".
4470 * symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
4471 (SCM_SYMBOL_SLOTS): Define as 4.
4472 (SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
4473 * arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
4474 gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
4475 print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
4476 struct.c, threads.c, throw.c, unif.c, variable.c: Use new
4477 ("gen"-less) I/O function names.
4478 * ports.c (scm_add_to_port_table): Don't set port's
4479 representation.
4480 * ports.h (scm_port_representation_type): Removed.
4481 (scm_string_representation_type): Removed.
4482 (struct scm_port_table ): Removed representation field.
4483 (SCM_PORT_REPRESENTATION): Removed.
4484 (SCM_SET_PORT_REPRESENTATION): Removed.
4485 * genio.h: Use new function names.
4486 * genio.c: Don't include "extchrs.h".
4487 (scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
4488 Removed.
4489 (scm_putc, scm_puts, scm_lfwrite): No longer static.
4490 (scm_getc): No longer static; handle line and column changes.
4491 (scm_ungetc): Renamed from scm_gen_ungetc.
4492 (scm_do_read_line): Renamed from scm_gen_read_line.
4493 * libguile.h: Don't include "extchrs.h" or "mbstrings.h"
4494 * extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
4495
4496 1997-10-12 Mark Galassi <rosalia@cygnus.com>
4497
4498 * gh_test_repl.c (c_vector_test): same as gh_test_c.c
4499
4500 * gh_test_c.c (c_vector_test): some improvements on the vector
4501 routines test.
4502
4503 * gh.h (gh_vector): this used to exist but do the wrong thing.
4504 Now it (almost) does the right thing, though it takes a list
4505 instead of the individual arguments. I need to see how it could
4506 be done right.
4507 (gh_list_to_vector): added this function as a macro. Corresponds
4508 to Scheme's (list->vector ...).
4509 (gh_vector_to_list): added this function as a macro. Corresponds
4510 to Scheme's (vector->list ...).
4511
4512 * gh_data.c (gh_vector_ref): renamed from gh_vref to
4513 gh_vector_ref, so that it resembles the Scheme routines more.
4514 (gh_vector_set): renamed from gh_vset to gh_vector_set, so that it
4515 resembles the Scheme routines more.
4516 (gh_make_vector): this used to be (stupidly) called gh_vector().
4517 This is the right name, since it does the same thing as the Scheme
4518 (make-vector ...) procedure.
4519
4520 Sun Oct 12 14:41:39 1997 Mikael Djurfeldt <mdj@kenneth>
4521
4522 * ports.h: #include "libguile/print.h"
4523
4524 * eval.c (SCM_CEVAL, scm_apply): Completed GOOPS support code;
4525 Some indentation fixes.
4526
4527 * objects.h (SCM_METACLASS_STANDARD_LAYOUT): Printer field is no
4528 longer a user field; New field: class_flags.
4529
4530 * objets.c, objects.h: New metaclass: scm_metaclass_operator.
4531
4532 Tue Oct 7 09:37:24 1997 Mark Galassi <rosalia@cygnus.com>
4533
4534 * gh_data.c (gh_bool2scm): new function which replaces
4535 gh_int2scmb(), which is now tagged as obsolete.
4536
4537 1997-10-03 Mikael Djurfeldt <mdj@nada.kth.se>
4538
4539 * print.h (SCM_PRINT_STATE_P): Removed SCM_NIMP test. (NIMP
4540 macros should by convention not test for NIMPness.)
4541 (SCM_COERCE_OPORT): Adjust indentation.
4542
4543 * print.c (scm_valid_oport_value_p): Adjusted indentation; Added
4544 SCM_NIMP test before SCM_PRINT_STATE_P.
4545
4546 * struct.c, struct.h, gc.c: Renamed:
4547 scm_struct_i_layout --> scm_vtable_index_layout
4548 scm_struct_i_vcell --> scm_vtable_index_vcell
4549 scm_struct_i_vtable --> scm_vtable_index_vtable
4550 scm_struct_i_printer --> scm_vtable_index_printer
4551 scm_struct_i_vtable_offset --> scm_vtable_offset_user
4552
4553 * struct.c (scm_print_struct): Use new printer slot; Default
4554 printing: Also output hex code of vtable so that type identity
4555 will be indicated as well.
4556 (scm_init_struct): Updated required_vtable_fields to "pruosrpw";
4557 Removed struct_printer_var; Removed struct-vtable-offset;
4558 (vtable-index-layout, vtable-index-vtable, vtable-index-printer,
4559 vtable-offset-user): New constants.
4560
4561 * struct.h (scm_struct_i_vtable_offset): Bumped from 3 to 4.
4562 (scm_struct_i_printer, SCM_STRUCT_PRINTER): New slot in vtables.
4563 If this slot contains a procedure, use that to print structures of
4564 the type represented by this vtable.
4565
4566 * print.c (scm_iprin1): Don't print arguments of macro
4567 transformers. (They are always: exp env.); Bugfix: Unmemoize
4568 transformer source with correct environment.
4569
4570 1997-10-02 Marius Vollmer <mvo@zagadka.ping.de>
4571
4572 Streamlining of call-with-dynamic-root:
4573
4574 * root.c (cwdr_inner_body, cwdr_body): Remove "inner" from name,
4575 there is now only one catch.
4576 (cwdr_outer_body): Removed.
4577 (cwdr_handler): New function.
4578 (scm_internal_cwdr): New function to perform the function of cwdr
4579 but take args that are more useful to C code. Also, the handler
4580 is now invoked *outside* of the new dynamic root, like the docs
4581 say. We no longer have to catch absolutely all errors, the caller
4582 is responsible for using a handler that does not throw, if he
4583 wants that.
4584 (cwdr): Reimplemented in terms of scm_internal_cwdr.
4585 * root.h (scm_internal_cwdr): New prototype.
4586
4587 Even more but risky streamlining:
4588
4589 * root.c (USE_STACKJMPBUF): New define to activate a stack-based
4590 allocation of the jumpbuf of a root continuation. The changes
4591 below are controlled by it. They are now deactivated.
4592 (scm_internal_cwdr): Allocate the scm_contregs on the stack. Set
4593 the JMPBUF of the scm_rootcont to NULL before returning.
4594
4595 * gc.c (scm_gc_sweep): Free the SCM_VELTS of a scm_tc7_contin only
4596 when they are non-NULL.
4597 (scm_gc_mark): Likewise, mark only when non-NULL.
4598
4599 Make dynamic linking work on Dec Unix. (Thanks to Clark McGrew)
4600 * dynl.c: Include "dynl-dl.c" also when HAVE_DLOPEN is defined.
4601
4602 * gc.c (scm_done_malloc): New function.
4603 gc.h (scm_done_malloc): New prototype.
4604
4605 * print.h (SCM_PRINT_STATE_P, SCM_COERCE_OPORT): New macros.
4606 (struct scm_print_state) [revealed]: New field.
4607 (scm_print_state_vtable): Make visible to the outside world for
4608 type checking purposes.
4609 (scm_valid_oport_value_p): New prototype.
4610
4611 * print.c (scm_valid_oport_value_p): New function to check whether
4612 a certain value is acceptable as a port argument.
4613 (scm_print_state_vtable): New variable.
4614 (scm_free_print_state): Set `revealed' field to false.
4615 (scm_iprin1): Call user supplied closure printer with
4616 scm_printer_apply. Print in the traditional way when there isn't
4617 one or when it returns #f.
4618 (scm_prin1, scm_display, scm_write, scm_newline, scm_write_char):
4619 Accept a port/print-state pair in addition to just a port.
4620 (scm_prin1): Don't return the print_state to the pool when it has
4621 been `revealed'.
4622 (scm_printer_apply): Set `revealed' field of print_state to true.
4623 (scm_init_print): Set scm_print_state_vtable.
4624 (print_state_fluid, print_state_fluid_num): Removed.
4625
4626 * throw.h (scm_handle_by_proc_catching_all): New prototype
4627 throw.c (scm_handle_by_proc_catching_all): New function
4628
4629 Mon Sep 29 23:54:09 1997 Jim Blandy <jimb@totoro.red-bean.com>
4630
4631 * Makefile.in: Regenerated with automake 1.2c.
4632
4633 Sun Sep 28 21:35:42 1997 Radey Shouman <shouman@zianet.com>
4634
4635 * ramap.c (scm_array_index_map_x): Fixed for zero-rank arguments,
4636 was looping endlessly.
4637
4638 Sun Sep 28 00:04:29 1997 Jim Blandy <jimb@totoro.red-bean.com>
4639
4640 * strports.c (scm_eval_string): Don't close the port.
4641
4642 * stime.c (bdtime2c): Use SCM_LENGTH, not scm_vector_length; the
4643 former returns a nice normal integer. (Thanks to Daniel
4644 Risacher.)
4645
4646 Sat Sep 27 20:19:34 1997 Jim Blandy <jimb@totoro.red-bean.com>
4647
4648 * Makefile.am (libpath.h): Include the value of the THREAD_LIBS
4649 makefile variable as a build parameter called LIBS. The
4650 build-guile program will use this, for the time being.
4651 * Makefile.in: Regenerated.
4652
4653 Thanks to Shiro Kawai:
4654 * gc.c (scm_gc_mark): Pass NULL to scm_wta as the subroutine name.
4655 * ports.h (scm_ptobfuns): The fgets method returns a char *, not
4656 an SCM.
4657
4658 * Makefile.in: Regenerated with automake 1.2a.
4659
4660 * script.c (scm_compile_shell_switches): If we hit the -c or --
4661 arguments, don't set the car of (command-line) to scm_usage_name,
4662 the prettified name of the guile executable; give it the full
4663 path, the way shells usually handle $0.
4664
4665 Wed Sep 24 22:09:52 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4666
4667 * ramap.c (scm_array_map): Renamed to scm_array_map_x. Removed
4668 Scheme-level name `array-map' and renamed `serial-array-map' to
4669 `serial-array-map!'.
4670
4671 * backtrace.c: Introduced exception handlers which now enclose
4672 `display-error' and `display-backtrace' so that error reporting
4673 won't get into infinite loops if an error occurs during displaying
4674 of the error. This can very easily happen with user supplied
4675 print call-back routines.
4676
4677 Tue Sep 23 12:43:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4678
4679 * ramap.c: Added alias `array-map!' for `array-map'. (Probably,
4680 the names `serial-array-map' and `array-map' should be removed.)
4681
4682 Mon Sep 22 01:21:54 1997 Mikael Djurfeldt <mdj@kenneth>
4683
4684 * init.c (scm_boot_guile_1): Added scm_init_objects ().
4685 Added #include "objects.h"
4686
4687 * eval.c (scm_makprom): Added SCM_DEFER_INTS and SCM_ALLOW_INTS.
4688 Add #include "feature.h".
4689
4690 * Makefile.am (libguile_la_SOURCES): Added objects.c.
4691 (modinclude_HEADERS): Added objects.h.
4692
4693 * ports.h (SCM_EOF_OBJECT_P): New macro predicate.
4694 This test is needed at many places in the code and should be
4695 abstracted. (Motivated by the need of this test in libguiletk.)
4696
4697 * ports.c (scm_eof_object_p), vports.c (sfgetc), strports.c
4698 (scm_eval_string), load.c (scm_primitive_load,
4699 scm_read_and_eval_x), gh_eval.c (gh_eval_str):
4700 Use SCM_EOF_OBJECT_P.
4701
4702 * eval.c (scm_init_eval): Add feature `delay'.
4703
4704 Tue Sep 16 02:12:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4705
4706 * scmhob.h: Removed.
4707
4708 Mon Sep 15 20:42:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4709
4710 * list.h (SCM_LISTn): New macros. Make list creation in C code
4711 prettier. The idea comes from STk.
4712
4713 * sequences.h, sequences.c, append.h, append.c: Removed. These
4714 files implemented non-R4RS operations which would encourage
4715 non-portable programming style and less easy-to-read code.
4716
4717 * Makefile.am (sequences.h, sequences.c, append.h, append.c):
4718 Removed.
4719
4720 * libguile.h, eval.c, init.c, stime.c, unif.c: Removed #include
4721 sequences.h, #include append.h.
4722
4723 * init.c (scm_boot_guile_1): Removed calls to scm_init_append and
4724 scm_init_sequences.
4725
4726 * gh.h, gh_list.c: Renamed gh_list_length --> gh_length.
4727
4728 * list.h, list.c: Renamed scm_list_length --> scm_length, scm
4729
4730 * stime.c (bdtime2c): Changed scm_obj_length --> scm_vector_length.
4731
4732 Sat Sep 13 00:21:41 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4733
4734 * eval.c: Added #include "objects.h"
4735
4736 * tags.h (scm_tc16_object, scm_tc16_entity): Smobtags for objects
4737 and entities.
4738
4739 * smob.c (scm_smob_prehistory): Create two objectsmobs with
4740 adjacent smob numbers.
4741
4742 Thu Sep 11 00:59:17 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4743
4744 * procprop.h: Added declaration of scm_i_inner_name.
4745
4746 * gsubr.c: New global symbol scm_i_inner_name.
4747
4748 * debug.c (scm_procedure_name): Try procedure property
4749 `inner-name' if `name' fails.
4750
4751 * print.c (scm_iprin1): Use scm_macro_name.
4752
4753 * eval.c (scm_m_define): Give names to macros as well; Only the
4754 first top-level definition gives a procedure/macro a name.
4755 Otherwise confusing names can turn up in backtraces.
4756 (SCM_CEVAL): SCM_IM_DEFINE: Set `inner-name' property instead of
4757 `name'; Give names to macros as well.
4758
4759 * procs.c (scm_closure_p), print.c (scm_iprin1), eval.c
4760 (scm_macro_transformer): Use SCM_CLOSUREP instead of
4761 scm_closure_p.
4762
4763 Wed Sep 10 20:52:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4764
4765 * eval.c (macro?, macro-type, macro-name, macro-transformer): New
4766 procedures;
4767 (prinmacro): Removed. The code has been moved/merged into print.c
4768 in order to decrease code redundancy. We want macros to print in
4769 a way equivalent to procedures, and it would be silly to duplicate
4770 the required code. (We don't want to maintain two places.)
4771 (macrosmob): Print field is now a NULL pointer.
4772
4773 * eval.h (scm_macro_p, scm_macro_type, scm_macro_name,
4774 scm_macro_transformer): New prototypes.
4775 (scm_tc16_macro): Declared.
4776
4777 * print.c (scm_iprin1): Added code for printing of macros. Macros
4778 are now printed in a way equivalent to procedures.
4779
4780 Sat Sep 6 12:20:42 1997 Mikael Djurfeldt <mdj@kenneth>
4781
4782 * procs.h (scm_closure_p): Added declaration.
4783
4784 Fri Sep 5 13:36:14 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4785
4786 * gc.c (scm_gc_mark): Fixed "rogue pointer in heap" message:
4787 Shouldn't pass "heap" as the subr name.
4788
4789 Tue Sep 2 18:14:30 1997 Jim Blandy <jimb@totoro.red-bean.com>
4790
4791 * gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
4792 gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
4793 gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
4794 gh_equal_p): Use SCM_NFALSEP, instead of testing against
4795 SCM_BOOL_T. Any non-false value is true.
4796
4797 Tue Sep 2 00:27:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4798
4799 * symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
4800 scm_gensym): Added prototypes.
4801
4802 * symbols.c (scm_gensym): New function. This will speed up
4803 certain types of applications (such as macro systems) which
4804 generate lots of symbols.
4805
4806 Mon Sep 1 22:30:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4807
4808 * numbers.c (logand, logior, logxor): Handle 0 or 1 arguments.
4809
4810 Sat Aug 30 18:56:19 1997 Gary Houston <ghouston@actrix.gen.nz>
4811
4812 * unif.c (scm_shap2ra): tighten the checking of the array dimension
4813 specifier, since (2) or (2 . 3) would cause SEGV.
4814 (scm_transpose_array): more argument checking fixes.
4815
4816 Thu Aug 28 23:48:53 1997 Jim Blandy <jimb@totoro.red-bean.com>
4817
4818 * Makefile.in: Regenerated.
4819
4820 Wed Aug 27 17:44:44 1997 Jim Blandy <jimb@totoro.red-bean.com>
4821
4822 * Makefile.in: Regenerated, so it uses "tar", not "gtar".
4823
4824 Mon Aug 25 13:47:25 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4825
4826 * error.c, error.h (scm_error_callback): Removed (see NEWS).
4827
4828 Sun Aug 24 01:25:35 1997 Mikael Djurfeldt <mdj@kenneth>
4829
4830 * regex-posix.c: If <regex.h> can't be found, try <rxposix.h> or
4831 <rx/rxposix.h>. (This is in order to accomodate for the GNU Rx
4832 library.)
4833
4834 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, ramap_1,
4835 ramap_2o, scm_array_index_map_x, raeql_1, scm_array_equal_p),
4836 unif.c (scm_vector_set_length_x, scm_uniform_vector_length,
4837 scm_array_p, scm_array_rank, scm_array_dimensions,
4838 scm_enclose_array, scm_array_in_bounds_p, scm_uniform_vector_ref,
4839 scm_cvref, scm_array_set_x, scm_array_contents, scm_array_to_list,
4840 scm_array_prototype): Added case scm_tc7_wvect.
4841
4842 Sat Aug 23 18:45:44 1997 Gary Houston <ghouston@actrix.gen.nz>
4843
4844 * errno.h: prototype for scm_strerror.
4845 * error.c (scm_strerror): new procedure.
4846
4847 Mon Aug 18 14:58:22 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4848
4849 * list.c (scm_list_append_x): Allow non-pair as last argument.
4850 This is consistent with the R4RS append and is probably the
4851 correct behaviour as specified by R2RS. (Thanks to Radey Shouman)
4852
4853 Sat Aug 16 18:42:15 1997 Gary Houston <ghouston@actrix.gen.nz>
4854
4855 * stime.h: prototype for scm_times.
4856 * stime.c (scm_times): new procedure.
4857 * ioext.c (scm_fseek): if the first argument is a file descriptor
4858 call lseek.
4859 (scm_ftell): if the first argument is a file descriptor call lseek
4860 (sic).
4861 * filesys.h: prototypes for scm_open_fdes, scm_fsync.
4862 * filesys.c (scm_chmod): if the first argument is a file descriptor,
4863 call fchmod.
4864 (scm_chown): if the first argument is a port or file descriptor,
4865 call fchown.
4866 (scm_truncate_file): new procedure.
4867 Add DEFER/ALLOW INTS to a few other procedures.
4868 (scm_fsync): new procedure.
4869 (scm_open_fdes): new procedure.
4870 (scm_open): use scm_open_fdes. If mode isn't specified, 666 will
4871 now be used.
4872 (scm_fcntl): the first argument can now be a file descriptor. The
4873 third argument is now optional.
4874
4875 * posix.c (scm_execl, scm_execlp): make the filename argument
4876 compulsory, since omitting it causes SEGV.
4877 (scm_sync): return unspecified instead of #f.
4878 (scm_execle): new procedure.
4879 (environ_list_to_c): new procedure.
4880 (scm_environ): use environ_list_to_c. disable interrupts.
4881 (scm_convert_exec_args): take pos and subr arguments and
4882 improve error checking.
4883
4884 1997-08-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4885
4886 * stacks.c (scm_make_stack), coop-threads.c, mit-pthreads.c
4887 (scm_call_with_new_thread): Bugfix: SCM_WNA should go as third
4888 argument to SCM_ASSERT. Furthermore, the name of the function
4889 should be passed as first argument when signalling
4890 SCM_WNA. (Thanks to Thomas Morgan)
4891
4892 * gsubr.c (scm_gsubr_apply): From Radey Shouman
4893 <shouman@zianet.com>: "The switch in scm_gsubr_apply that
4894 dispatches on the number of actual args has a default case
4895 reporting an internal error. This is a vestige from a version
4896 that mallocated a SCM vector to hold the arguments. In the
4897 current version this check is too late: if it ever happens we will
4898 have already overstepped the bounds of the array.
4899
4900 Also, the patch [...] adds a check for too many actual arguments."
4901
4902 mdj: Removed check for "internal programming error".
4903
4904 Wed Aug 13 15:38:44 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4905
4906 * gh_io.c (gh_write): New function.
4907
4908 * gh_eval.c (catch_with_saved_stack): Removed. Replaced by:
4909 throw.c (scm_internal_stack_catch): New sibling to the other catch
4910 functions. Code moved from gh_eval.c.
4911 throw.h: Added header.
4912 gh_eval.c (gh_eval_str_with_stack_saving_handler): Renamed call to
4913 scm_internal_stack_catch.
4914
4915 Tue Jul 29 01:03:08 1997 Gary Houston <ghouston@actrix.gen.nz>
4916
4917 * ioext.h: fix up prototypes.
4918 * ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
4919 Scheme name is now dup->fdes.
4920 (scm_dup_to_fdes): make the second argument optional and
4921 fold in the functionality of scm_primitive_dup.
4922 (scm_primitive_dup): deleted.
4923
4924 Mon Jul 28 05:24:42 1997 Gary Houston <ghouston@actrix.gen.nz>
4925
4926 * fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
4927 * fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
4928 ultrix are defined. Use setvbuf instead of setbuf.
4929 (scm_setvbuf): new procedure.
4930 (scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
4931 (scm_setfileno): moved from ioext.c.
4932 (scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
4933 (top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.
4934
4935 Sun Jul 27 10:54:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
4936
4937 * fluids.c (scm_fluid_p): New function.
4938 * fluids.h (scm_fluid_p): New prototype.
4939
4940 Sat Jul 26 21:33:37 1997 Marius Vollmer <mvo@zagadka.ping.de>
4941
4942 * print.c (scm_iprin1): Enter printed structures into the print
4943 state as nested data while they are printed.
4944 (print_state_fluid, print_state_fluid_num): New variables.
4945 (scm_init_print): Initialize them.
4946 (scm_iprin): If print_state_fluid carries a print_state, use that
4947 instead of creating a new one.
4948 (scm_printer_apply, apply_stub, struct apply_data): New
4949 definitions to help with calling printer functions written in
4950 Scheme.
4951 * print.h (scm_printer_apply): New prototype.
4952
4953 * struct.c (scm_print_struct): Use scm_printer_apply to call the
4954 user defined struct printer.
4955
4956 * dynwind.c (scm_dowinds): Handle fluids on the wind list.
4957 * fluids.h (scm_internal_with_fluids, scm_with_fluids,
4958 scm_swap_fluids, scm_swap_fluids_reverse): New prototypes.
4959 * fluids.c (scm_internal_with_fluids, scm_with_fluids,
4960 scm_swap_fluids, scm_swap_fluids_reverse): New functions.
4961
4962 Fri Jul 25 12:05:46 1997 Marius Vollmer <mvo@zagadka.ping.de>
4963
4964 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fixed use of
4965 SCM_ASSERT: arg comes before pos.
4966
4967 Fri Jul 25 17:00:38 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4968
4969 * eval.c (scm_apply): Handle the case when a tc7_sybr_2 is applied
4970 to a list of length zero correctly.
4971
4972 Wed Jul 23 16:17:46 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
4973
4974 Supply an `fgets' method for port objects to do fast line i/o.
4975 * ioext.c (scm_read_line): New function.
4976 * genio.c (scm_gen_read_line): New function.
4977 * fports.c (scm_fgets): New function.
4978 (scm_fptob, scm_pipob): Add scm_fgets method.
4979 * ports.c (fgets_void_port, scm_generic_fgets): New functions.
4980 (void_port_ptob): Add void fgets method.
4981 (scm_newptob): Initialize fgets method from ptob struct.
4982 * ports.h (scm_ptobfuns): Add fgets method.
4983 * vports.c (scm_sfptob): Supply generic fgets method.
4984 * strports.c (scm_stptob): Supply generic fgets method.
4985
4986 Mon Jul 21 04:03:42 1997 Gary Houston <ghouston@actrix.gen.nz>
4987
4988 * ioext.h: removed scm_duplicate_port prototype.
4989
4990 * ioext.c (scm_primitive_dup2): return the new file descriptor
4991 instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
4992 is convenient.
4993 (scm_fdopen): bug fix: don't try to make port unbuffered until its
4994 stream has been set.
4995 (scm_duplicate_port): deleted, there's now an implementation in
4996 boot-9.scm.
4997 (scm_primitive_dup2): do nothing if newfd == oldfd.
4998
4999 Sun Jul 20 03:55:49 1997 Gary Houston <ghouston@actrix.gen.nz>
5000
5001 * filesys.c (scm_close): oops, don't call SCM_INUM twice on the
5002 argument.
5003
5004 * ioext.h: new prototypes.
5005 * ioext.c (scm_primitive_dup, scm_primitive_dup2): new procedures.
5006
5007 * fluids.c (next_fluid_num): don't do
5008 SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.
5009
5010 * ports.h: prototypes too.
5011 * ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.
5012
5013 * fports.h: prototype too.
5014 * fports.c (scm_evict_ports): moved from ioext.c.
5015
5016 Sat Jul 19 04:56:52 1997 Gary Houston <ghouston@actrix.gen.nz>
5017
5018 * ports.c (scm_close_port): return a boolean instead of unspecified.
5019 throw an error if an error other than EBADF occurs.
5020
5021 * filesys.h: scm_close prototype.
5022 * filesys.c (scm_close): new procedure, can close file descriptors
5023 and ports (scsh compatible).
5024
5025 * ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
5026 optional argument.
5027
5028 Fri Jul 18 11:19:53 1997 Marius Vollmer <mvo@zagadka.ping.de>
5029
5030 * fluids.c, fluid.h: New files.
5031 * Makefile.am (libguile_la_SOURCES): Added "fluids.c".
5032 (modinclude_HEADERS): Added "fluids.h"
5033
5034 * init.c: Include "fluids.h". (scm_boot_guile_1): Added call to
5035 scm_init_fluids to initialize the fluid machine.
5036 (scm_start_stack): Initialize the fluids of the first root with
5037 scm_make_initial_fluids.
5038
5039 * root.h: Added "fluids" member to scm_root_state.
5040 * root.c: Include "fluids.h". (scm_mark_root): Mark "fluids".
5041 (scm_make_root): Call scm_copy_fluids to make fluid bindings
5042 unique for the new root when it has a parent.
5043
5044 * smob.h: Include "libguile/print.h" to make scm_print_state
5045 visible.
5046
5047 * dynl.c (free_dynl_obj): New function to free the dynamic object
5048 data. (dynl_smob): Use it.
5049 * dynl.c (scm_dynamic_link): Moved allocating of the memory for
5050 the dynamic object data below the linking of the object to avoid
5051 memory leak when the linking code throws an error. Now the code
5052 leaks a whole dynamically linked library when must_malloc throws,
5053 but that should be much less likely.
5054
5055 Fri Jul 11 00:19:47 1997 Jim Blandy <jimb@floss.red-bean.com>
5056
5057 Changes to compile under gnu-win32, from Marcus Daniels:
5058 * stime.c (tzset): If tzset isn't provided, make it a NOP.
5059 (scm_localtime): Change SCM_EOF to SCM_EOL.
5060 (scm_mktime): Likewise.
5061 * socket.c: Don't include sys/un.h unless autoconf tells
5062 us Unix domain sockets are available.
5063 (scm_fill_sockaddr): Ignore Unix domain code.
5064 (scm_addr_vector): Likewise.
5065 (scm_init_addr_buffer): Likewise.
5066 (scm_socketpair): Don't include unless socketpair was
5067 found during autoconf.
5068 * simpos.c (SYSTNAME): Treat cygwin like Unix.
5069 * scmsigs.c (scm_pause): Don't include unless pause was found
5070 during autoconf.
5071 * posix.c (scm_getgroups): Don't include unless support function
5072 was found during autoconf (in this case, getgroups).
5073 (scm_setpwent): For setpwent.
5074 (scm_setegid): For setegid.
5075 * net_db.c (scm_inet_netof): Don't include unless support
5076 function was found during autoconf (in this case, inet_netof).
5077 (scm_lnaof): For inet_lnaof.
5078 (scm_inet_makeaddr): For inet_makeaddr.
5079 (scm_getnet): For getnetent, getnetbyname, getnetbyaddr.
5080 (scm_getproto): For getprotoent.
5081 (scm_getserv): For getservent.
5082 (scm_sethost): For sethostent, endhostent.
5083 (scm_setnet): For setnetent, endnetent.
5084 (scm_setproto): For setprotoent, endprotoent.
5085 (scm_setserv): For setservent, endservent.
5086 * scmconfig.h.in: Regenerated.
5087
5088 Thu Jul 10 00:22:24 1997 Jim Blandy <jimb@floss.red-bean.com>
5089
5090 * stime.c (scm_localtime, scm_mktime): Pass SCM_EOL to
5091 scm_misc_error, not SCM_EOF.
5092
5093 * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list of
5094 arguments for formatting the error message, not SCM_BOOL_F. I
5095 think this is left over from the (eq? '() #f) days.
5096
5097 * read.c (recsexpr): Give this a dummy definition if
5098 DEBUG_EXTENSIONS isn't #defined.
5099
5100 Fri Jul 4 23:42:17 1997 Marius Vollmer <mvo@zagadka.ping.de>
5101
5102 * coop-threads.c (scm_wait_condition_variable): Lock mutex again
5103 after waiting.
5104
5105 Thu Jul 3 16:31:24 1997 Marius Vollmer <mvo@zagadka.ping.de>
5106
5107 * root.c (cwdr_outer_body): Bugfix: Pass `c' instead of `&c' to
5108 scm_internal_catch.
5109
5110 Sat Jun 28 16:14:09 1997 Tim Pierce <twp@twp.tezcat.com>
5111
5112 * Makefile.am (libguile_la_LIBADD): Remove @ALLOCA@, since
5113 alloca.lo will be included in @LIBLOBJS@. Something better than
5114 this should be possible.
5115 * Makefile.in: Regenerated.
5116
5117 Sat Jun 28 03:40:15 1997 Gary Houston <ghouston@actrix.gen.nz>
5118
5119 * simpos.h: prototype for scm_primitive_exit.
5120 * simpos.c (scm_primitive_exit): new procedure, terminates the
5121 process without unwinding the stack.
5122
5123 Sat Jun 28 03:45:25 1997 Tim Pierce <twp@twp.tezcat.com>
5124
5125 * regex-posix.c (scm_make_regexp): Make `flags' a variable-length
5126 argument and logior its components together, so the user doesn't
5127 have to do this explicitly. Also, if regexp/basic is supplied, then
5128 turn off REG_EXTENDED.
5129 (scm_init_regex_posix): New regexp/basic symbol.
5130 (REG_BASIC): #define this if it is not already present.
5131
5132 Fri Jun 27 20:36:35 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5133
5134 * Makefile.am (libguile_la_LIBADD): Include @ALLOCA@.
5135 (MOSTLYCLEANFILES): New target, changed from CLEANFILES.
5136 (CLEANFILES): New target, clean versiondat.h, libpath.h.
5137 (DISTCLEANFILES): New target, clean *.x.
5138 * Makefile.in: Regenerated.
5139
5140 Tue Jun 24 00:29:07 1997 Jim Blandy <jimb@floss.red-bean.com>
5141
5142 * script.c (scm_compile_shell_switches): Add 1997 to copyright
5143 years in usage message.
5144
5145 * Makefile.am (libguile_la_LDFLAGS): Bump library version.
5146 * Makefile.in: Regenerated.
5147
5148 * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub
5149 flag; I don't think we support it.
5150 (scm_make_regexp): Make sure the user doesn't pass the
5151 regexp/nosub flag.
5152
5153 * regex-posix.c (scm_make_regexp, scm_regexp_exec): Add optional
5154 FLAGS arguments.
5155 (scm_init_regex_posix): Define constants for the REG_mumble flags;
5156 name them according to the SCSH convention: regexp/mumble.
5157
5158 * regex-posix.h (scm_make_regexp, scm_regexp_exec): Update prototypes.
5159
5160 Mon Jun 23 18:44:49 1997 Jim Blandy <jimb@floss.red-bean.com>
5161
5162 * Makefile.am (libpath.h): Include the values of all the standard
5163 Makefile directory variables. Print a message, but don't print
5164 all the commands.
5165 (versiondat.h): Print a message, but don't print all the commands.
5166 * load.c: #include "alist.h".
5167 (init_build_info): New function.
5168 (scm_init_load): Call it.
5169 * Makefile.in: Regenerated.
5170
5171 Sun Jun 22 19:12:58 1997 Jim Blandy <jimb@floss.red-bean.com>
5172
5173 * root.c: Establish a reliable catch-all handler for the new root.
5174 After all the Scheme handler function might signal an error too,
5175 and we don't want to lose that.
5176 (cwdr_inner_body): Renamed from cwdr_body.
5177 (cwdr_outer_body): New function, to establish the user's handler,
5178 and pass control to cwdr_inner_body.
5179 (cwdr): Establish the reliable catch-all handler here, and pass
5180 control to cwdr_outer_body.
5181 (struct cwdr_body_data): New field, handler, to allow cwdr to pass
5182 the user's handler through to cwdr_outer_body.
5183 * throw.c (scm_handle_by_message): Move guts into....
5184 (handler_message): New static function.
5185 (scm_handle_by_message_noexit): New function.
5186 * throw.h (scm_handle_by_message_noexit): New prototype.
5187
5188 * __scm.h: (SCM_FENCE): New macro: optimizer will not move code
5189 across this. Only works on GCC. Otherwise, we hope for the best.
5190 (SCM_DEFER_INTS, SCM_ALLOW_INTS): Use FENCE appropriately. I have
5191 the feeling that real thread systems will not need this...
5192
5193 Sun Jun 22 15:46:35 1997 Jim Blandy <jimb@floss.red-bean.com>
5194
5195 Try to detect when people are using one version of libguile and a
5196 different version of ice-9. People have been skewing things and
5197 sending in bug reports.
5198 * Makefile.am (versiondat.h): New file to generate.
5199 * version.c: #include "versiondat.h", to get version info.
5200 (scm_libguile_config_stamp): New function.
5201 * script.c: #include "version.h".
5202 (scm_compile_switches): Call scm_version to get version number.
5203 * scmconfig.h.in, Makefile.in: Regenerated.
5204 * Makefile.in: Regenerated.
5205
5206 * Makefile.am (ETAGS_ARGS): Catch SCM_PROC, etc. so we can find
5207 primitive definitions under their Scheme names.
5208
5209 * Makefile.am (libguile_la_LDFLAGS): Update library version to
5210 1:2. Helps avoid confusion between installed and uninstalled libs.
5211
5212 * scmconfig.h.in: Regenerated. (Needed after June 3 change to
5213 ../configure.in.)
5214
5215 * gdb_interface.h (GDB_INTERFACE): Remove semicolon and trailing
5216 backslash from definition; this should be used like: GDB_INTERFACE;
5217
5218 Sun Jun 22 04:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5219
5220 * ioext.c (scm_duplicate_port): bug fix: don't try to make the
5221 new port unbuffered until its stream has been set.
5222
5223 Sat Jun 21 18:44:03 1997 Gary Houston <ghouston@actrix.gen.nz>
5224
5225 * ports.h: new prototype.
5226 * ports.c (scm_flush_all_ports): new procedure, scsh compatible.
5227
5228 Sat Jun 21 00:25:03 1997 Jim Blandy <jimb@floss.red-bean.com>
5229
5230 Make things compile neatly under Sun's C compiler.
5231 * dynl.c (scm_dynamic_func): Cast return value from sysdep_dynl_func.
5232 * extchrs.c (xmbtowc): Make the second arg a normal char, not
5233 unsigned, because that's what the ANSI function takes.
5234 * extchrs.h (xmbtowc): Corresponding change to prototype.
5235 * genio.c (scm_gen_getc): Make buf plain chars. Nobody wants
5236 uchars here.
5237 * mbstrings.c (scm_mb_ilength): Use ANSI arg syntax. Make DATA
5238 argument plain char *.
5239 * strings.c (scm_string): Use SCM_ROCHARS, since c is a plain
5240 char.
5241 * tag.c (scm_tag): Remove unreachable statement.
5242 * unif.c (scm_array_to_list): If we want to shift a 1 bit to the
5243 top of the word, it should be unsigned.
5244
5245 * eval.c (scm_lookupcar1): Don't declare var2 unless USE_THREADS
5246 is defined, to avoid warnings; it's only used in the
5247 conflict-checking code. Which might go away anyway.
5248 (SCM_CEVAL): All goto's targeting the `dispatch' label are in
5249 conditionals; put the label definition in an #if too, to stifle
5250 warnings.
5251
5252 * Makefile.am (EXTRA_DIST): Include ChangeLog-gh and
5253 ChangeLog-threads in the distribution.
5254 * Makefile.in: Regenerated.
5255
5256 Fri Jun 20 10:03:41 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5257
5258 * guile-snarf.in: Changed regexp to support CPPs that insert
5259 whitespace between lexical tokens (which munges the `%%%' snarf
5260 cookie).
5261
5262 Tue Jun 17 13:49:56 1997 Tim Pierce <twpierce@bio-5.bsd.uchicago.edu>
5263
5264 * load.c (scm_init_load_path): Append $(datadir)/guile to
5265 %load-path, so modules do not have to be installed in Guile's
5266 current version directory.
5267
5268 Mon Jun 16 17:20:55 1997 Marius Vollmer <mvo@zagadka.ping.de>
5269
5270 * dynl.c (scm_dynamic_call, scm_dynamic_args_call): Wrap dynamic
5271 function call in SCM_DEFER_INTS/SCM_ALLOW_INTS.
5272 (scm_dynamic_link, scm_dynamic_unlink, scm_dynamic_func): Always
5273 call the sysdep functions with deferred ints.
5274 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c (sysdep_dynl_link,
5275 sysdep_dynl_unlink, sysdep_dynl_func): Expect to be called with
5276 deferred interrupts and insert SCM_ALLOW_INTS before throwing an
5277 error.
5278
5279 * dynl.c (scm_dynamic_unlink, scm_dynamic_call): Return
5280 SCM_UNSPECIFIED.
5281
5282 Sat Jun 14 19:00:58 1997 Gary Houston <ghouston@actrix.gen.nz>
5283
5284 * scmsigs.c (sys_deliver_signals): add a comment about a probable bug.
5285
5286 Wed Jun 11 00:33:00 1997 Jim Blandy <jimb@floss.red-bean.com>
5287
5288 * Makefile.in: Regenerated after xtra_PLUGIN_guile_libs change in
5289 ../configure.in.
5290
5291 Sun Jun 8 14:37:26 1997 Marius Vollmer <mvo@zagadka.ping.de>
5292
5293 * eval.c (scm_lookupcar1): New procedure to cope with a race
5294 condition during lookup (when using threads).
5295 (scm_lookupcar): Implement in terms of scm_lookupcar1.
5296 (SCM_CEVAL): Use scm_lookupcar1 instead of scm_lookupcar in one
5297 place.
5298
5299 Fri Jun 6 19:05:07 1997 Jim Blandy <jimb@totoro.cyclic.com>
5300
5301 * regex-posix.c (scm_regexp_exec): Use the `start' argument if
5302 supplied. (Change from Tim Pierce.)
5303
5304 Thu Jun 5 16:38:19 1997 Marius Vollmer <mvo@zagadka.ping.de>
5305
5306 * struct.c (init_struct): Forget to mention this in the "Wed Jun 4
5307 23:47:01 1997" changelog: Slots are now initialized with `#f' by
5308 default and not `()'. `#f' is the canonical non-value in Scheme,
5309 right?
5310
5311 Wed Jun 4 23:47:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
5312
5313 * struct.c (struct_printer): New variable that holds a handle on
5314 the Scheme variable *struct-printer*. This variable can be set by
5315 Scheme code to override the printing of structures.
5316 (scm_print_struct): If struct_printer is set, call it. If it is
5317 not set, or returns #f, print the structure in the old fashion.
5318 Include "eval.h" for scm_apply.
5319
5320 Tue Jun 3 23:01:39 1997 Marius Vollmer <mvo@zagadka.ping.de>
5321
5322 * struct.c (scm_struct_ref, scm_struct_set_x): Use
5323 scm_struct_i_n_words to get the number of fields, not
5324 -scm_struct_n_extra_words.
5325
5326 On the route to fancier struct printing:
5327 * struct.c (scm_print_struct): New function to print a structure.
5328 Include "genio.h" to support it. This function doesn't do
5329 anything interesting right now, but I think it should be here
5330 anyway.
5331 * struct.h: Include "print.h" and add prototype for
5332 scm_print_struct.
5333 * print.c (scm_iprin1): Call scm_print_struct instead of trying to
5334 print structures ourself.
5335
5336 Sun Jun 1 07:58:41 1997 Gary Houston <ghouston@actrix.gen.nz>
5337
5338 * scmsigs.c (sys_deliver_signals): bug fix: reset got_signal[i]
5339 before applying the handler in case it doesn't return.
5340
5341 Sat May 31 18:57:51 1997 Gary Houston <ghouston@actrix.gen.nz>
5342
5343 * scmsigs.h, async.h: updated.
5344
5345 * _scm.h: if HAVE_RESTARTS is defined then don't use a SYSCALL
5346 loop.
5347
5348 * posix.c (scm_uname): interpret only negative values as an error.
5349 Solaris normally returns a positive value.
5350
5351 * script.c (scm_compile_shell_switches): if we are not going into
5352 an interactive repl, set scm_mask_ints to zero so that asyncs can
5353 run.
5354
5355 * simpos.c (scm_system): don't ignore/unignore signals around
5356 the "system" call.
5357
5358 * posix.c (scm_open_pipe): don't ignore/unignore signals around
5359 the "popen" call.
5360
5361 * init.c (scm_boot_guile_1): don't call scm_init_signals, it's
5362 done in boot-9.scm instead.
5363
5364 * scmsigs.c, async.c: Major rewriting of signal handling code.
5365 (scm_sigaction): new procedure.
5366 (scm_sleep): don't wrap sleep in SCM_SYSCALL, it would mess up the
5367 timing.
5368 (scm_raise): return unspecified, throw error on failure.
5369
5370 Thu May 29 02:47:36 1997 Jim Blandy <jimb@floss.cyclic.com>
5371
5372 * regex-posix.c (scm_init_regex_posix): Register the "regex"
5373 feature, to help boot-9.scm decide whether to import the regex
5374 module.
5375
5376 Thu May 29 02:19:40 1997 Jim Blandy <jimb@floss.cyclic.com>
5377
5378 * eval.c: Include scmconfig.h at the beginning of the file so that
5379 HAVE_ALLOCA_H may properly be defined. Thanks to Bill Janssen for
5380 pointing this out.
5381
5382 * regex-posix.c: #include "_scm.h" before conditionally #including
5383 <regex.h>; the former defines HAVE_REGCOMP.
5384
5385 * regex-posix.c: #include <regex.h> conditionally, so the file is
5386 CPP'able (for dependency scanning) even on systems that don't have
5387 a <regex.h> header.
5388
5389 Tue May 27 23:48:38 1997 Jim Blandy <jimb@floss.cyclic.com>
5390
5391 Add new R4RS-compliant syntax for keywords.
5392 * read.c (scm_lreadr): Recognize `#:' as a prefix for keywords,
5393 regardless of the setting of the `keywords' read option.
5394 * kw.c (prin_kw): Print keywords using the `#:' syntax, so they
5395 can be re-read no matter what the setting of the `keywords' read
5396 option.
5397
5398 Tue May 27 22:47:31 1997 Tim Pierce <twp@twp.tezcat.com>
5399
5400 Add support for POSIX regular expressions.
5401
5402 * regex-posix.c, regex-posix.h: New files. (Some code
5403 is taken liberally from rx/rgx.c in the old Guile dist.)
5404
5405 * init.c: Include regex-posix.h.
5406 (scm_boot_guile_1): Call scm_init_regex_posix.
5407
5408 * Makefile.am (EXTRA_libguile_la_SOURCES, modinclude_HEADERS):
5409 Add regex-posix.[ch] sources.
5410 * Makefile.in: Regenerated.
5411
5412 * scmconfig.h.in: Add HAVE_REGCOMP macro. (automake is supposed
5413 to do this automatically? It didn't for me, bleh.)
5414
5415 Mon May 26 18:51:29 1997 Jim Blandy <jimb@floss.cyclic.com>
5416
5417 * fports.c (print_pipe_port): New function.
5418 (scm_fptob): Use print_pipe_port instead of scm_prinport; the
5419 latter doesn't even take the right arguments.
5420
5421 * Makefile.am: Increment shared lib revision number. I think
5422 sometimes the uninstalled Guile finds the installed shared lib;
5423 Gord says doing this might help. As things turned out, I can't
5424 say whether it does.
5425 * Makefile.in: Regenerated.
5426
5427 * gh_init.c (gh_enter): Cast c_main_prog to a void * before
5428 passing it as the closure argument to scm_boot_guile. (Bill
5429 Janssen)
5430
5431 * ports.c (print_void_port, putc_void_port, puts_void_port,
5432 write_void_port, flush_void_port, getc_void_port, close_void_port,
5433 noop0): Use ANSI prototypes instead of K&R declarations, so the
5434 initialization of void_port_ptob gets aggressively type-checked.
5435 Fix arguments of print_void_port and write_void_port. (Bill
5436 Janssen)
5437
5438 * COPYING, __scm.h, _scm.h, alist.c, alist.h, append.c, append.h,
5439 appinit.c, arbiters.c, arbiters.h, async.c, async.h, backtrace.c,
5440 backtrace.h, boolean.c, boolean.h, chars.c, chars.h,
5441 continuations.c, continuations.h, coop-defs.h, coop-threads.c,
5442 coop-threads.c.cygnus, coop-threads.h, coop-threads.h.cygnus,
5443 coop.c, debug.c, debug.h, dynl-dl.c, dynl-dld.c, dynl-shl.c,
5444 dynl-vms.c, dynl.c, dynl.h, dynwind.c, dynwind.h, eq.c, eq.h,
5445 error.c, error.h, eval.c, eval.h, extchrs.h, feature.c, feature.h,
5446 filesys.c, filesys.h, fports.c, fports.h, fsu-pthreads.h, gc.c,
5447 gc.h, gdbint.c, gdbint.h, genio.c, genio.h, gh.h, gh_data.c,
5448 gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c, gh_list.c,
5449 gh_predicates.c, gh_test_c.c, gh_test_repl.c, gscm.c, gscm.h,
5450 gsubr.c, gsubr.h, guile.c, hash.c, hash.h, hashtab.c, hashtab.h,
5451 init.c, init.h, ioext.c, ioext.h, kw.c, kw.h, libguile.h, list.c,
5452 list.h, load.c, load.h, mallocs.c, mallocs.h, markers.c,
5453 markers.h, mbstrings.c, mbstrings.h, mit-pthreads.c,
5454 mit-pthreads.h, net_db.c, net_db.h, numbers.c, numbers.h,
5455 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
5456 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
5457 procprop.h, procs.c, procs.h, putenv.c, ramap.c, ramap.h, read.c,
5458 read.h, root.c, root.h, scmhob.h, scmsigs.c, scmsigs.h, script.c,
5459 script.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c,
5460 smob.h, snarf.h, socket.c, socket.h, srcprop.c, srcprop.h,
5461 stackchk.c, stackchk.h, stacks.c, stacks.h, stime.c, stime.h,
5462 strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h,
5463 strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h,
5464 tag.c, tag.h, tags.h, threads.c, threads.h, throw.c, throw.h,
5465 unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h,
5466 version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: New
5467 address for FSF.
5468
5469 Mon May 26 12:37:30 1997 Jim Blandy <jimb@floss.cyclic.com>
5470
5471 * script.c (scm_find_executable): Use prototype-style definition
5472 here; apparently it's not quite right to have const in a prototype
5473 and then use a K&R declaration. I wonder if stuff like this will
5474 go away if we compile with -Wrequire-prototypes, or whatever that
5475 is... (Bernard URBAN)
5476
5477 * scmhob.h: New text from Bernard URBAN.
5478
5479 Sat May 17 17:14:36 1997 Jim Blandy <jimb@floss.cyclic.com>
5480
5481 * script.c: Don't #define const on hpux. Configure takes care of
5482 this. (Thanks to Larry Schwimmer.)
5483
5484 * script.c: Use the HAVE_UNISTD_H symbol provided by autoconf to
5485 decide whether to #include <unistd.h>, instead of listing a bunch
5486 of systems. Don't #include stdio twice. Removed dyked-out
5487 definition of scm_find_impl_file.
5488
5489 Fri May 16 03:06:08 1997 Jim Blandy <jimb@floss.cyclic.com>
5490
5491 * Makefile.am (libguile_la_LDFLAGS): Update libguile's shared
5492 library version info to 1:0.
5493 * Makefile.in: Regenerated.
5494
5495 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
5496 gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
5497 gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
5498 init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
5499 script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
5500 throw.c: Update copyright years; these files have been worked on
5501 significantly in 1997, but only had copyright years for 1996.
5502 Also, change name of copyright holder on some from Mikael
5503 Djurfeldt to Free Software Foundation; he has signed papers
5504 assigning the changes to the FSF.
5505
5506 * script.c (scm_shell_usage): Pass FATAL to exit. There's no
5507 reason not to give the user the option.
5508
5509 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
5510 Return #f on end-of-file when scanning table (i.e. when called
5511 with no arguments). Try to catch errors, when we can.
5512 * posix.c (scm_getgrgid, scm_getpwuid): Same.
5513
5514 * script.h (scm_shell_usage, scm_compile_shell_switches): New
5515 external declarations. These are useful.
5516
5517 Thu May 15 05:21:36 1997 Gary Houston <ghouston@actrix.gen.nz>
5518
5519 * posix.c: don't include <sys/select.h> or define macros for
5520 select, since they were not used in this file.
5521
5522 * filesys.c (scm_select): make the fifth parameter microseconds,
5523 not milliseconds. let the fourth parameter be either a real value
5524 or an integer or #f. The first, second and third arguments can
5525 now be vectors: the type of the corresponding return set will be
5526 the same.
5527 (set_element, get_element): new static procedures.
5528
5529 Wed May 14 12:18:12 1997 Jim Blandy <jimb@floss.cyclic.com>
5530
5531 * strports.c (scm_eval_string): New function.
5532 (scm_eval_0str): Trivially re-implemented in terms of
5533 scm_eval_string.
5534 * strports.h (scm_eval_string): New extern decl.
5535
5536 * net_db.c (h_errno): Add extern decl for this.
5537
5538 * fports.c (local_pclose): New function.
5539 (scm_pipob): Use it in the initializer here.
5540
5541 From Tim Pierce:
5542 * net_db.c (scm_gethost, scm_getproto, scm_getnet, scm_getserv):
5543 Use a meaningful error message when signalling an error. For
5544 this, scm_gethost must check h_errno rather than errno.
5545
5546 Tue May 13 16:40:06 1997 Jim Blandy <jimb@floss.cyclic.com>
5547
5548 * Makefile.in: Regenerated, using automake-1.1p.
5549
5550 Tue May 13 04:34:52 1997 Gary Houston <ghouston@actrix.gen.nz>
5551
5552 * socket.c (scm_addr_vector): use SCM_UNDEFINED in scm_listify,
5553 not SCM_UNSPECIFIED.
5554
5555 * script.c (scm_compile_shell_switches): don't append (quit) if
5556 interactive.
5557 (scm_shell): call scm_exit_status and exit on the result of the
5558 evaluation.
5559
5560 Mon May 12 17:23:58 1997 Jim Blandy <jimb@floss.cyclic.com>
5561
5562 Ensure that shared substrings are handled properly when passed to
5563 a system call or other foreign function. Many thanks to Tim
5564 Pierce!
5565 * symbols.h (SCM_COERCE_SUBSTR): new macro.
5566 * filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir,
5567 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
5568 scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime,
5569 scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone,
5570 scm_strftime), vports.c (scm_make_soft_port), backtrace.c
5571 (scm_display_error_message): use RO macros when strings may be RO.
5572 * error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod,
5573 scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir,
5574 scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c
5575 (scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c
5576 (scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c
5577 (scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime,
5578 scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime,
5579 scm_strftime), vports.c (scm_make_soft_port): use
5580 SCM_COERCE_SUBSTR to make sure shared substrings are
5581 null-terminated.
5582
5583 Mon May 12 15:33:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
5584
5585 * error.c (scm_error): Add newline to error message.
5586
5587 * init.c (scm_init_standard_ports): Doc fix.
5588
5589 Thu May 8 14:38:01 1997 Marius Vollmer <mvo@zagadka.ping.de>
5590
5591 * dynl-shl.c: Completely replaced with new code from Bernard
5592 URBAN.
5593
5594 * script.c (scm_ice_9_already_loaded): New variable.
5595 (scm_compile_shell_switches): Use it.
5596
5597 Mon May 5 20:35:08 1997 Gary Houston <ghouston@actrix.gen.nz>
5598
5599 * filesys.c (scm_input_waiting_p): add missing third argument to
5600 scm_misc_error.
5601
5602 * stime.c (scm_localtime): copy the result of localtime before
5603 calling gmtime in case they share a buffer.
5604 (scm_localtime, scm_mktime): throw an error if neither HAVE_TM_ZONE
5605 nor HAVE_TZNAME.
5606
5607 Fri May 2 19:07:11 1997 Gary Houston <ghouston@actrix.gen.nz>
5608
5609 * eq.c (scm_equal_p): use SCM_TYP7SD (y) not SCM_TYP7SD (x).
5610
5611 Thu May 1 17:01:45 1997 Jim Blandy <jimb@floss.cyclic.com>
5612
5613 * Makefile.am (check-local): New target, which causes 'make check'
5614 to run gh_test_c and gh_test_repl, with some trivial input.
5615 * Makefile.in: Rgnrtd.
5616
5617 Tue Apr 29 19:00:40 1997 Marius Vollmer <mvo@zagadka.ping.de>
5618
5619 * dynl.c (print_dynl_obj): Indicate whether the dynamic object has
5620 been unlinked.
5621
5622 Mon Apr 28 06:10:14 1997 Gary Houston <ghouston@actrix.gen.nz>
5623
5624 * async.c (scm_sys_tick_async_thunk): commented out. I'm not
5625 sure how this was supposed to work.
5626 (scm_async_click): don't send SCM_TICK_SIGNAL.
5627 (scm_init_async): don't initialize %tick-thunk.
5628
5629 * the following change doesn't affect the Scheme interface:
5630 gc-thunk is called at the end of garbage collection. however it's
5631 no longer implemented by pretending it's a signal.
5632
5633 * gc.c (scm_gc_end): don't call scm_take_signal. instead mark the
5634 system async corresponding to scm_gc_thunk.
5635 * async.h: declare scm_gc_async.
5636 * async.c (scm_sys_gc_async_thunk): apply the thunk named by
5637 gc-thunk directly, instead of going through a signal handler.
5638 (scm_gc_async): new variable, points to the GC system-async.
5639 (scm_init_async): save the GC async as scm_gc_async instead
5640 of using system_signal_asyncs.
5641 (scm_gc_vcell): new variable, stores the gc-thunk vcell.
5642
5643 Mon Apr 28 19:14:44 1997 Jim Blandy <jimb@floss.cyclic.com>
5644
5645 * Makefile.am (libpath.h, cpp_err_symbols.c, cpp_sig_symbols.c):
5646 Don't screw up if we're interrupted.
5647 * Makefile.in: Regeneradet.
5648
5649 Sun Apr 27 17:57:15 1997 Jim Blandy <jimb@floss.cyclic.com>
5650
5651 * aclocal.m4: Removed; unnecessary, given changes of Apr 24.
5652
5653 * Makefile.am (modincludedir): Use "ice-9" instead of "@module@";
5654 we're not using AM_INIT_GUILE_MODULE any more.
5655 * Makefile.in: Reneregated.
5656
5657 Thu Apr 24 00:41:08 1997 Jim Blandy <jimb@floss.cyclic.com>
5658
5659 Functions for finding variable bindings, grace à Tim Pierce.
5660 * gh_data.c (gh_lookup, gh_module_lookup): New functions.
5661 * gh.h (gh_lookup, gh_module_lookup): New prototypes.
5662
5663 Get 'make dist' to work again.
5664 * Makefile.am (EXTRA_DIST): Remove PLUGIN files.
5665 * Makefile.in: Regenerated, like a surry without a fringe on top.
5666
5667 Changes for reduced Guile distribution: one configure script,
5668 no plugins.
5669 * configure.in, configure: Removed.
5670 * acconfig.h, acinclude.m4: Moved to parent directory, where the
5671 real configure script lives.
5672 * Makefile.in, scmconfig.h.in: Regenerated.
5673
5674 * init.c: #include "script.h", to get prototype for script.c's
5675 init function.
5676
5677 Wed Apr 23 21:25:39 1997 Jim Blandy <jimb@floss.cyclic.com>
5678
5679 * gh_data.c (gh_scm2newstr, gh_symbol2newstr): Use
5680 scm_must_malloc, not raw malloc.
5681
5682 * script.c (scm_compile_shell_switches): Dyke out debugging output
5683 code.
5684
5685 Mon Apr 21 05:00:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5686
5687 * eq.c (scm_equal_p): use "SCM_TYP7SD", not "SCM (TYP7SD".
5688
5689 * stime.c: include both <sys/times.h> and <sys/timeb.h> if the
5690 system has them. Hope this is safe. Previously
5691 sys/timeb.h was included if HAVE_FTIME was defined or if
5692 HAVE_SYS_TIMEB_H was defined but HAVE_SYS_TIMES_H was not,
5693 but IRIX iris 5.3 apparently has ftime but not sys/timeb.h.
5694
5695 * ioext.c (scm_setfileno): add missing third argument to
5696 scm_misc_error call.
5697
5698 Sun Apr 20 15:09:31 1997 Jim Blandy <jimb@totoro.cyclic.com>
5699
5700 * eq.c (scm_equal_p): Correctly compare strings of different
5701 varieties. (Thanks to Tim Pierce.)
5702
5703 Sat Apr 19 03:59:02 1997 Jim Blandy <jimb@floss.cyclic.com>
5704
5705 * read.c (skip_scsh_block_comment): SCSH says the !# that ends a
5706 #! block comment must occur on a line all by itself.
5707
5708 Move most of the guts of shell command processing into libguile,
5709 so guile.c can be very small (and eventuallly auto-generated. (I
5710 mean, generated mechanically, not self-generated. Hmm.))
5711 * guile.c, script.c, script.h: New source files.
5712 * init.c (scm_boot_guile_1): Call scm_init_script.
5713 * libguile.h: #include "script.h".
5714 * Makefile.am (bin_PROGRAMS, guile_SOURCES, guile_LDADD): New
5715 targets, for new executable.
5716 (libguile_la_SOURCES): Mention script.c.
5717 (modinclude_HEADERS): Add script.h.
5718 * configure.in: Always check for -lm, -lsocket, -lnsl, whether or
5719 not dynamic linking is enabled. This is because we're generating
5720 executables now. Move CY_AC_WITH_THREADS call after those, so the
5721 values of cy_cv_threads_libs captures the libs chosen above.
5722 * Makefile.in, configure, aclocal.m4: Regenerated.
5723
5724 * Makefile.am (EXTRA_DIST): Don't distribute gscm.c or gscm.h.
5725 We don't maintain this interface any more, and it just confuses
5726 people.
5727
5728 * alloca.c: #include <scmconfig.h>, not <config.h>.
5729 * Makefile.am (EXTRA_libguile_la_SOURCES): Mention alloca.c, so
5730 it'll get included in disties.
5731
5732 Thu Apr 17 17:45:10 1997 Jim Blandy <jimb@totoro.cyclic.com>
5733
5734 * gscm.c, gscm.h: These aren't supported any more, and shouldn't
5735 be distributed, because they confuse people.
5736 * Makefile.am (EXTRA_DIST): Remove gscm.c, gscm.h.
5737
5738 Sat Apr 19 11:56:18 1997 Tim Pierce <twp@twp.tezcat.com>
5739
5740 * configure.in: check for presence of gethostent (not present on
5741 OpenBSD by default).
5742 * net_db.c (scm_gethost): Check HAVE_GETHOSTENT.
5743 * configure, scmconfig.h.in: Regenerated.
5744
5745 Wed Apr 16 17:52:38 1997 Jim Blandy <jimb@floss.cyclic.com>
5746
5747 * backtrace.c (scm_backtrace): Split message string across
5748 newlines properly. GCC is more tolerant of this than other
5749 compilers.
5750
5751 Mon Apr 14 20:20:14 1997 Jim Blandy <jimb@floss.cyclic.com>
5752
5753 Merge threads directory into libguile.
5754 * coop-defs.h, coop-threads.c, coop-threads.h, coop.c, threads.c,
5755 threads.h: New source files.
5756 * Makefile.am (EXTRA_libguile_la_SOURCES): Add threads.c.
5757 (noinst_HEADERS): Add coop-threads.c, coop-threads.h, coop.c
5758 here; see comment.
5759 (modinclude_HEADERS): Add threads.h, coop-defs.h.
5760 (EXTRA_DIST): Add fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
5761 coop-threads.c.cygnus, coop-threads.h.cygnus.
5762 * configure.in: If we're using threads, include threads.o in
5763 LIBOBJS.
5764 * _scm.h, libguile.h: threads.h lives in this directory now.
5765 * fsu-pthreads.h, mit-pthreads.c, mit-pthreads.h,
5766 coop-threads.c.cygnus, coop-threads.h.cygnus: New files, not
5767 currently used, but brought along for information's sake.
5768 * ChangeLog-threads: log from old 'threads' directory.
5769 * Makefile.in, configure: Rebuilt.
5770
5771 Mon Apr 14 20:15:29 1997 Jim Blandy <jimb@totoro.cyclic.com>
5772
5773 * stime.c (scm_mktime): #ifndef HAVE_TM_ZONE, Use lt.tm_zone, not
5774 lt->tm_zone.
5775
5776 Mon Apr 14 01:32:57 1997 Jim Blandy <jimb@floss.cyclic.com>
5777
5778 * gh_init.c (gh_standard_handler): Return SCM_BOOL_F, not garbage.
5779
5780 Merge GH interface library into libguile.
5781 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
5782 gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c: New files.
5783 * Makefile.am (libguile_la_SOURCES): Add gh_data.c, gh_eval.c,
5784 gh_funcs.c, gh_init.c, gh_io.c, gh_list.c, gh_predicates.c. Move
5785 _scm.h to ...
5786 (EXTRA_libguile_la_SOURCES): ... here.
5787 (pkginclude_HEADERS): Add variable, to get gh.h installed.
5788 (THREAD_LIBS, check_ldadd, check_PROGRAMS, gh_test_c_SOURCES,
5789 gh_test_c_LDADD, gh_test_repl_SOURCES, gh_test_repl_LDADD):
5790 New variables, describing how to build the gh test programs.
5791 * configure.in: Check for -lm, -lsocket, -lnsl; we need this to
5792 build the test programs, and we probably should have been linking
5793 libguile.la against them all along, to support AIX shared libs.
5794 Add cflags for threads to CFLAGS; add libs for threads to new
5795 variable THREAD_LIBS, used in Makefile.am.
5796 * ChangeLog-gh: log from old `gh' subdirectory.
5797 * Makefile.in, configure, scmconfig.h.in: Rebuilt.
5798
5799 Sun Apr 13 23:03:55 1997 Jim Blandy <jimb@floss.cyclic.com>
5800
5801 * acconfig.h: Undo change of Apr 9; including the definition of
5802 PACKAGE in the guile headers conflicts with applications' own
5803 definitions.
5804 * scmconfig.h.in: Regenerated.
5805
5806 Fri Apr 11 14:12:13 1997 Jim Blandy <jimb@floss.cyclic.com>
5807
5808 * filesys.c (scm_fcntl): New function from Roland McGrath.
5809 (scm_init_filesys): New symbols for use with fcntl.
5810 * filesys.h: Added prototype.
5811
5812 * eval.c (SCM_APPLY): Set debug apply frame argument list correctly
5813 when PROC is receiving no arguments.
5814
5815 Fri Apr 11 19:39:32 1997 Jim Blandy <jimb@totoro.cyclic.com>
5816
5817 * filesys.c (S_ISSOCK): Define this if it's missing, but we do
5818 have S_IFSOCK. This is the case under Ultrix.
5819
5820 * posix.c (scm_status_exit_val, scm_status_exit_val,
5821 scm_status_term_sig, scm_status_stop_sig): Modified to work with
5822 Ultrix versions of WIFSTOPPED, etc., which assume that their
5823 arguments are lvalues (hmm).
5824
5825 Thu Apr 10 15:10:07 1997 Jim Blandy <jimb@floss.cyclic.com>
5826
5827 * eval.c: Doc fixes.
5828
5829 * throw.c: Doc fixes; rearranged.
5830
5831 * putenv.c: #include "libguile/scmconfig.h", not <config.h>.
5832
5833 Wed Apr 9 18:01:20 1997 Jim Blandy <jimb@floss.cyclic.com>
5834
5835 * acconfig.h: Added entry for PACKAGE.
5836 * scmconfig.h.in: Regenerated.
5837
5838 Changes to work with automake-1.1n, which has better libtool support.
5839 * Makefile.am: Use lib_LTLIBRARIES instead of lib_PROGRAMS.
5840 Use libguile_la_LIBADD instead of libguile_la_LDADD. (What's the
5841 difference here?)
5842 (libguile_la_SOURCES, modinclude_HEADERS, EXTRA_DIST): Format for
5843 readability.
5844 * Makefile.in: Rebuild.
5845
5846 Wed Apr 9 09:08:54 1997 Gary Houston <ghouston@actrix.gen.nz>
5847
5848 * stime.c (scm_mktime): take an optional zone argument.
5849 (scm_localtime): check putenv return value.
5850 (scm_strftime, scm_strptime): moved from posix.c. move #include
5851 sequences.h too.
5852 stime.h, posix.h: update prototypes.
5853 (bdtime2c, setzone, restorezone): new static procedures.
5854 (scm_mktime, scm_strftime): use them.
5855 (scm_strftime): don't call mktime before strftime. Use
5856 filltime for return value.
5857 (filltime): convert NULL zname to #f.
5858 (scm_strptime): return a count of characters consumed, not
5859 the remaining string.
5860
5861 Sun Apr 6 05:44:11 1997 Gary Houston <ghouston@actrix.gen.nz>
5862
5863 * stime.c (scm_localtime): check HAVE_TM_ZONE and HAVE_TZNAME.
5864 (scm_mktime): likewise.
5865 Declare *tzname[].
5866 Uncomment localtime and mktime.
5867
5868 * configure.in: add AC_STRUCT_TIMEZONE.
5869
5870 Sat Apr 5 23:56:40 1997 Gary Houston <ghouston@actrix.gen.nz>
5871
5872 * stime.c (scm_init_stime): don't define ticks/sec.
5873 (scm_gettimeofday): renamed from scm_time_plus_ticks (avoids multiple
5874 return value problem and is still portable.)
5875
5876 Sat Apr 5 17:59:24 1997 Jim Blandy <jimb@floss.cyclic.com>
5877
5878 * cpp_err_symbols.in: Renamed from cpp_err_symbols, to avoid
5879 make's implicit cpp_err_symbols: cpp_err_symbols.c rule.
5880 * cpp_sig_symbols.in: Renamed from cpp_sig_symbols.
5881 * Makefile.am (check_errnos, check_signals, cpp_sig_symbols.c,
5882 cpp_err_symbols.c): Corresponding changes.
5883 * Makefile.in: Regenerated.
5884
5885 Sat Apr 5 02:39:02 1997 Gary Houston <ghouston@actrix.gen.nz>
5886
5887 * posix.c (scm_putenv): don't check HAVE_PUTENV.
5888 * Makefile.am (EXTRA_libguile_la_SOURCES): add putenv.c.
5889 * configure.in: move putenv from AC_CHECK_FUNCS to AC_REPLACE_FUNCS.
5890 * putenv.c: new file, from sh-utils 1.12.
5891
5892 * posix.c (scm_environ): use malloc in place of scm_must_malloc
5893 since allocation isn't for Scheme objects.
5894 (scm_putenv): copy strings before placing in the environment.
5895
5896 * stime.c (scm_current_time): throw an error if time returns -1,
5897 instead of returning #f.
5898 (scm_get_internal_real_time, scm_get_internal_real_time): use
5899 scm_long2num for return value instead of SCM_MAKINUM.
5900
5901 * stime.h: prototypes updated.
5902
5903 * stime.c (scm_time_in_msec): apparently unused, deleted.
5904
5905 Fri Apr 4 08:53:41 1997 Gary Houston <ghouston@actrix.gen.nz>
5906
5907 * configure.in: check for gettimeofday.
5908
5909 * stime.c (scm_time_plus_ticks): new procedure, an scsh interface
5910 which may be more usefully portable than a gettimeofday interface.
5911
5912 Wed Apr 2 17:11:39 1997 Jim Blandy <jimb@totoro.cyclic.com>
5913
5914 * Makefile.am (EXTRA_DIST): It's cpp_err_symbols, not
5915 cpp_err_signals.
5916 * Makefile.in: Regenerated.
5917
5918 Mon Mar 31 03:22:37 1997 Gary Houston <ghouston@actrix.gen.nz>
5919
5920 * stime.c (filltime): recovered static procedure.
5921 (scm_localtime, scm_gmtime, scm_mktime, scm_tzset): recovered from
5922 an earlier Guile.
5923
5924 * posix.h: add prototype for scm_close_pipe, remove prototypes for
5925 scm_open_input_pipe, scm_open_output_pipe, change scm_mknod prototype.
5926
5927 * posix.c (scm_mknod): split the mode argument into type and perms
5928 arguments, like the extra fields returned by stat.
5929
5930 * fports.c (scm_pipob): set the close, free and print procedures.
5931 (scm_close_pipe): new procedure.
5932
5933 * posix.c (scm_open_input_pipe, scm_open_output_pipe): deleted,
5934 define them in boot-9.scm
5935
5936 Wed Mar 26 04:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
5937
5938 * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD
5939 wan't defined. Don't include fd.h.
5940
5941 * Previously fd.h was regenerated whenever configure was run,
5942 forcing a couple of files to be recompiled.
5943
5944 * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c.
5945 * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER.
5946 Check for _fileno as well as _file.
5947 Don't output fd.h.
5948 * ioext.c: don't fd.h.
5949 * acconfig.h: remove duplicate HAVE_FD_SETTER and change the
5950 other to FD_SETTER.
5951
5952 * Change the stratigy for getting information about errno
5953 (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of
5954 generating lists of symbols during the build process, which will
5955 not always work, include comprehensive lists in the distribution.
5956 To help keep the lists up to date, the "check_signals" and
5957 "check_errnos" make targets can be used.
5958
5959 * configure.in: don't check for a command to extract errno codes.
5960 * Makefile.am: update file lists, remove errnos.list and errnos.c
5961 targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals,
5962 check_errnos targets.
5963 (CLEANFILES): remove errnos.c and errnos.list, add
5964 cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new
5965 cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
5966 * errnos.default: deleted.
5967 * cpp_signal.c: new file.
5968 * cpp_errno.c: renamed from errnos_get.c.
5969 * cpp_err_symbols, cpp_sig_symbols: new files.
5970 * cpp_cnvt.awk: renamed from errnos_cnvt_awk.
5971 * error.c (scm_init_error): #include cpp_err_symbols instead of
5972 errnos.c.
5973 * posix.c (scm_init_posix): don't intern signal symbols. #include
5974 cpp_sig_symbols.c.
5975
5976 Tue Mar 25 04:51:10 1997 Gary Houston <ghouston@actrix.gen.nz>
5977
5978 * strop.c (scm_i_index): allow the lower bound to be equal to the
5979 length of the string, so a null string doesn't always give an error.
5980
5981 * posix.h: new prototypes.
5982 * posix.c (scm_status_exit_val, scm_status_term_sig,
5983 scm_status_stop_sig): new functions, as in scsh. They break down
5984 process status values as returned by waitpid.
5985
5986 Sat Mar 22 18:16:29 1997 Gary Houston <ghouston@actrix.gen.nz>
5987
5988 * net_db.c (scm_gethost): don't check HAVE_GETHOSTENT, since
5989 configure doesn't know about it.
5990
5991 Fri Mar 21 23:49:28 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5992
5993 * snarf.h, backtrace.c: Name change SCM_GLOBAL --> SCM_VCELL.
5994
5995 * snarf.h: Added new macros SCM_GLOBAL_SYMBOL and SCM_GLOBAL_VCELL
5996 which defines C variables with global linkage.
5997
5998 Mon Mar 17 05:57:11 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5999
6000 * snarf.h (SCM_PROC1): Bugfix: Use (void) rather than (...) for
6001 zero arg subrs.
6002
6003 Sun Mar 16 11:43:49 1997 Mikael Djurfeldt <mdj@floss.cyclic.com>
6004
6005 * eval.c (safe_setjmp): Temporarily use old setjmp until someone
6006 has time to check why this doesn't work well with continuations.
6007
6008 Sun Mar 16 05:09:55 1997 Jim Blandy <jimb@totoro.cyclic.com>
6009
6010 * Fix shell syntax error; some shells won't tolerate
6011 multiple "fi" statements on a single line. (Thanks to Fred Fish.)
6012
6013 Sat Mar 15 01:11:40 1997 Gary Houston <ghouston@actrix.gen.nz>
6014
6015 * posix.c (scm_uname): throw an error if uname fails instead
6016 of returning errno.
6017
6018 * error.h (scm_errno, scm_perror): obsolete prototypes removed.
6019
6020 * error.c (err_head, scm_errno, scm_perror): obsolete procedures
6021 removed.
6022
6023 * async.c (scm_ints_disabled): definition moved from error.c.
6024
6025 Sat Mar 15 00:06:08 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6026
6027 * acconfig.h: Removed PACKAGE.
6028
6029 * scmconfig.h.in: Regenerated.
6030
6031 * snarf.h: g++ says it's non-portable not to specify the first
6032 argument in a varargs declaration. I introduced the first
6033 argument by using preprocessor conditionals.
6034
6035 Thu Mar 13 21:28:25 1997 Gary Houston <ghouston@actrix.gen.nz>
6036
6037 * ioext.c (scm_read_delimited_x): use RO string macros for delims.
6038 (scm_freopen): use RO string macros for filename and modes.
6039 (scm_duplicate_port, scm_fdopen): use RO string macros for modes.
6040
6041 * posix.c (scm_getgrgid): simplify conversion of name to C string.
6042 (scm_mknod): use RO string macros for path.
6043
6044 * socket.c (scm_fill_sockaddr, scm_send, scm_sendto):
6045 use SCM_ROSTRINGP, SCM_ROCHARS, SCM_ROLENGTH.
6046
6047 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
6048 use SCM_ROSTRINGP and SCM_ROCHARS.
6049
6050 Thu Mar 13 18:31:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6051
6052 * unif.c (scm_array_set_x): Cast ICHR (obj) to char if storing in
6053 a scm_tc7_byvect.
6054
6055 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
6056 scm_array_index_map_x, raeql_1, scm_array_equal_p): Completed
6057 support for byte vectors.
6058
6059 * print.c (scm_iprin1): Limit number of vector elements printed
6060 according to pstate->length.
6061
6062 Thu Mar 13 00:12:35 1997 Gary Houston <ghouston@actrix.gen.nz>
6063
6064 * backtrace.c (scm_display_error_message): don't segv if message
6065 is an immediate.
6066
6067 * error.h: prototype for scm_error_scm.
6068
6069 * error.c (scm_error_scm): new procedure, reimplements scm-error
6070 in C and uses scm_error.
6071
6072 Tue Mar 11 03:51:00 1997 Gary Houston <ghouston@actrix.gen.nz>
6073
6074 * read.c (scm_read_hash_extend): make scm_read_hash_procedures a
6075 pointer to the Scheme variable read-hash-procedures and intern it
6076 in scm_init_read. Modify scm_read_hash_extend and
6077 scm_get_hash_procedure to use the pointer.
6078
6079 Mon Mar 10 06:28:54 1997 Gary Houston <ghouston@actrix.gen.nz>
6080
6081 * read.h (SCM_N_READ_OPTIONS): increase SCM_N_READ_OPTIONS to 4.
6082 (SCM_KEYWORD_STYLE): defined.
6083
6084 * read.c (scm_read_opts): add a keywords option. This isn't a
6085 boolean option, in case someone wants to add support for DSSSL
6086 keywords too.
6087 Setup scm_keyword_prefix symbol.
6088 (scm_lreadr): Only process keywords if SCM_KEYWORD_STYLE is
6089 set to 'prefix.
6090 I've left keyword support disabled by default, since it doesn't
6091 seem to break the module system and it gives R4RS standard behaviour.
6092 It can be reactivated with (read-set! keywords 'prefix).
6093
6094 Sun Mar 9 14:14:39 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6095
6096 * arbiters.c (scm_make_arbiter): Bugfix: Must SCM_DEFER_INTS
6097 before constructing arbiter.
6098
6099 * eval.c (scm_m_define): Bugfix: Check that the object is a
6100 closure before setting the procedure property!
6101
6102 * ports.h: Removed prototype for scm_ungetc_char_ready_p.
6103
6104 * ports.c: Removed `ungetc-char-ready?'.
6105
6106 Sat Mar 8 00:27:05 1997 Gary Houston <ghouston@actrix.gen.nz>
6107
6108 * read.c (scm_init_read): intitialise scm_read_hash_procedures
6109 (idea from Mikael: make it a pair so scm_permanent object only
6110 called once.)
6111 (scm_read_hash_extend): don't call scm_permanent_object.
6112 (ideas from Mikael): if chr is already in the list, replace its
6113 procedure instead of appending it again. If proc is #f, remove
6114 it from the list.
6115 (scm_get_hash_procedure): take CDR of scm_read_hash_procedures.
6116
6117 * strports.c (scm_read_0str, scm_eval_0str): update scm_read usage.
6118
6119 * gdbint.c (gdb_read): update scm_lreadr usage.
6120
6121 * load.h: update prototypes.
6122
6123 * load.c (scm_primitive_load, scm_read_and_eval_x,
6124 scm_primitive_load_path): remove case_insensitive_p, sharp arguments.
6125
6126 * read.h: add prototype for scm_read_hash_extend. Change args for
6127 other prototypes.
6128
6129 * read.c (scm_read_hash_procedures): new variable.
6130 (scm_read_hash_extend): new procedure.
6131 (scm_get_hash_procedure): new procedure.
6132 (scm_lreadr): use scm_get_hash_procedure instead of an argument
6133 for extended # processing.
6134 (scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen,
6135 scm_read_token): remove case_i, sharp arguments. Change callers.
6136
6137 Fri Mar 7 08:58:21 1997 Gary Houston <ghouston@actrix.gen.nz>
6138
6139 * read.h (SCM_N_READ_OPTIONS): increase to 3.
6140 (SCM_CASE_INSENSITIVE_P): define.
6141
6142 * read.c: add case-insensitive option to scm_read_opts.
6143 (scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument
6144 to determine whether to convert symbol case.
6145 (default_case_i): definition removed.
6146 * read.c (scm_read_token): if case_i, downcase ic before doing
6147 anything with it.
6148
6149 Sat Mar 8 03:49:03 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6150
6151 * configure.in: Added configuration option `guile-debug'.
6152 Configure with --enable-guile-debug if you want a bunch of extra
6153 functions used for debugging when developing Guile.
6154
6155 * acconfig.h: Added new preprocessor symbol GUILE_DEBUG.
6156
6157 * procs.c (make-cclo): New undocumented debugging procedure: Make
6158 compiled closure with internal procedure PROC and length LENGTH.
6159 Only compiled if GUILE_DEBUG is defined.
6160
6161 * debug.c: Only include `debug-hang' if GUILE_DEBUG is defined.
6162
6163 * print.c: Put #ifdef GUILE_DEBUG around `current-pstate'.
6164
6165 * ports.c: Changed preprocessor symbol DEBUG --> GUILE_DEBUG.
6166
6167 * eval.c (SCM_CEVAL): Added code sections for handling of rpsubrs
6168 with 3 or more args internally to the evaluator.
6169
6170 Fri Mar 7 19:38:18 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6171
6172 * eval.c (SCM_CEVAL): Added code sections for handling of asubrs
6173 with 3 or more args internally to the evaluator. This is mainly
6174 because we don't want to pass entry and exit points of the
6175 debug support twice, but it also seems to increase the speed of
6176 the evaluator for such calls (e. g. (+ 1 2 3)).
6177
6178 * backtrace.c (scm_display_application): New procedure:
6179 display-application; Set fancy printing parameters individually
6180 for different types of display (backtrace, error, application).
6181 (These should of course be customizable!)
6182
6183 * debug.h (SCM_RESET_DEBUG_MODE): Bugfix: The old code didn't
6184 clear the CHECK-flags.
6185
6186 Thu Mar 6 00:53:02 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6187
6188 * tags.h, eval.c (iqq): Fixes to comments about SCM_ECONSP.
6189
6190 Wed Mar 5 23:31:21 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6191
6192 * tags.h (SCM_ECONSP, SCM_NECONSP): Bugfix: Discriminate structs
6193 from pairs with a GLOC in the car.
6194
6195 * symbols.c (msymbolize): Bugfix: Also initialize SCM_SYMBOL_HASH,
6196 otherwise `symbol-hash' will behave badly.
6197 (scm_symbol_hash): Bugfix: Must msymbolize if tc7_ssymbol, othwise
6198 we get segmentation fault!
6199
6200 * symbols.c: Added #include "weaks.h". New functions:
6201 `builtin-bindings' and `builtin-weak-bindings'. (These will be
6202 moved to an extraneous library when we split libguile.)
6203
6204 Tue Mar 4 19:50:07 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6205
6206 * filesys.c (scm_stat): stat now takes fport arguments too as
6207 documented in the manual.
6208
6209 Mon Mar 3 07:11:33 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6210
6211 * debug.c (scm_single_step): Bugfix: Call continuation with
6212 scm_call_continuation instead of throwing to it.
6213
6214 Mon Mar 3 09:07:56 1997 Gary Houston <ghouston@actrix.gen.nz>
6215
6216 * ports.c (scm_char_ready_p): bug fix: in SCM_PROC char-ready's
6217 argument wasn't declared to be optional.
6218
6219 Sun Mar 2 16:34:40 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6220
6221 * stime.c (scm_init_stime): Add feature "current-time".
6222
6223 Sun Mar 2 06:37:31 1997 Gary Houston <ghouston@actrix.gen.nz>
6224
6225 * throw.h: prototype for scm_exit_status.
6226 * throw.c (scm_handle_by_message): if a 'quit is caught, use its
6227 args to derive an exit status. Allows (quit) to work from a
6228 script.
6229 (scm_exit_status): new function.
6230 #include "eq.h".
6231
6232 Sat Mar 1 00:09:15 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6233
6234 * eval.c (scm_deval): Removed some old code.
6235 (ENTER_APPLY): Bugfix: Reset apply-frame trap on trap as is done
6236 with the others.
6237 (ENTER_APPLY, scm_deval): Reset trace flag on apply-frame and
6238 exit-frame traps.
6239
6240 * symbols.c (msymbolize): Bugfix: Must initialize property list to
6241 SCM_EOL.
6242
6243 * procs.c: Introduce the existent C function scm_thunk_p at the
6244 Scheme level as well.
6245
6246 Wed Feb 26 12:53:58 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6247
6248 * symbols.c, symbols.h (scm_symbol_value0): New function. Can be
6249 used from C to easily lookup the value of a symbol in the current
6250 module.
6251
6252 Tue Feb 25 00:14:10 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6253
6254 * unif.c (scm_init_unif): Added #include "unif.x". (There are two
6255 scm_init_unif in this file. This will also fix a previous problem
6256 with guile-snarf.)
6257
6258 * configure.in: Added AM_MAINTAINER_MODE
6259
6260 Fri Feb 21 23:07:26 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6261
6262 * gdb_interface.h (GDB_INTERFACE): Added some (void *) casts to
6263 avoid warnings.
6264
6265 Fri Feb 21 18:00:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
6266
6267 * Makefile.am (EXTRA_libguile_la_SOURCES): New variable to hold
6268 source files that are not always included in libguile but should
6269 have their dependencies calculated by automake. This variable is
6270 recognized by automake, no further magic is needed.
6271 (libguile_la_DEPENDENCIES): Changed to @LIBLOBJS@. Libtool wants
6272 to deal exclusively with *.lo files, as it seems. The *.o files
6273 are built automatically when the corresponding *.lo file gets
6274 built.
6275
6276 Wed Feb 19 14:04:23 1997 Jim Blandy <jimb@floss.cyclic.com>
6277
6278 * list.h (scm_list_cdr_ref): Delete prototype; function no longer
6279 exists.
6280
6281 Thu Feb 13 21:44:07 1997 Gary Houston <ghouston@actrix.gen.nz>
6282
6283 * unif.c (scm_array_set_x): minor change to argument error checking.
6284
6285 Tue Feb 11 18:19:47 1997 Jim Blandy <jimb@floss.cyclic.com>
6286
6287 * Makefile.am (libguile_la_SOURCES): Remove backtrace.c, debug.c,
6288 inet_aton.c, srcprop.c, stacks.c, and strerror.c from this list.
6289 They should only be included in the library at configure.in's
6290 discretion.
6291 (libguile_la_LDADD): Include the appropriate .lo files here.
6292 (libguile_la_DEPENDENCIES): List the corresponding .o files here,
6293 so we know when to build them (and their .lo bretheren).
6294 * configure.in (LIBLOBJS): New substituted variable. We let
6295 configure decide which .o files to include in LIBOBJS, and then
6296 put the corresponding list of .lo files in LIBLOBJS. The latter
6297 is what we pass to libtool.
6298 * Makefile.in, configure: regenerated.
6299
6300 Mon Feb 10 00:08:08 1997 Mikael Djurfeldt <mdj@kenneth>
6301
6302 * symbols.c (scm_sysintern0): New function. Contains the core of
6303 old scm_sysintern but doesn't take a second value argument.
6304 (scm_sysintern): Now uses scm_sysintern0.
6305 (scm_sysintern_no_module_lookup): Renamed to
6306 scm_sysintern0_no_module_lookup and doesn't take a second value
6307 argument any longer.
6308
6309 * symbols.h (scm_sysintern0: Added declaration.
6310
6311 * options.c (scm_init_opts): Use scm_sysintern0 instead of
6312 scm_sysintern when interning option keys. Otherwise we risk
6313 destroying the values of already interned variables.
6314
6315 * symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
6316 scheme-level boolean (use SCM_NFALSEP).
6317
6318 * backtrace.c (scm_init_backtrace): Make Scheme-level variable
6319 `the-last-stack'.
6320 (scm_backtrace): New function. (C version of old function from
6321 boot-9.scm) Motivation: Make it possible to display backtraces
6322 without depending on boot-9.scm. (I'm uncertain if this
6323 motivation is good enough...)
6324
6325 * root.h (scm_root_state): Add member the_last_stack_var.
6326 (scm_the_stack_var): Defined to scm_root->the_last_stack_var.
6327
6328 * root.c (mark_root): Mark scm_the_last_stack_var.
6329
6330 * init.c (scm_start_stack): Initialize scm_the_last_stack_var to
6331 SCM_BOOL_F.
6332
6333 Sun Feb 9 18:04:41 1997 Mikael Djurfeldt <mdj@kenneth>
6334
6335 * throw.c (mark_lazy_catch, free_lazy_catch): Removed.
6336 1. mark_lazy_catch didn't mark the smob.
6337 2. Both functions above have standard variants:
6338 (lazy_catch_funs): Changed mark_lazy_catch --> scm_mark0,
6339 free_lazy_catch --> scm_free0.
6340
6341 Fri Feb 7 17:30:26 1997 Jim Blandy <jimb@floss.cyclic.com>
6342
6343 * throw.c (scm_internal_lazy_catch): New function.
6344 (scm_lazy_catch): Rewritten to use it.
6345 (scm_ithrow): Handle the new lazy catch representation.
6346 Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
6347 that doesn't have a jmpbuf is a lazy catch clause.
6348 (tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
6349 free_lazy_catch, print_lazy_catch, lazy_catch_funs,
6350 make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
6351 smob.
6352 (scm_init_throw): Register the new lazy-catch smob type.
6353 * throw.h (scm_internal_lazy_catch): decl for new function.
6354
6355 * throw.c (scm_internal_catch): Doc fixes.
6356
6357 * alloca.c: New file, needed to support the AC_FUNC_ALLOCA call in
6358 configure.in. Including this might cause problems if applications
6359 that link against libguile include their own copies of alloca, but
6360 if they're using autoconf, they should be adding libguile to LIBS
6361 before calling AC_FUNC_ALLOCA anyway, in which case they'll find
6362 the copy in libguile, and things will be okay. (I think.)
6363
6364 Thu Feb 6 03:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
6365
6366 * strop.c (scm_string_upcase_x, scm_string_downcase_x): moved from
6367 unif.c.
6368 strop.h: move prototypes too.
6369
6370 Wed Feb 5 08:33:00 1997 Gary Houston <ghouston@actrix.gen.nz>
6371
6372 * posix.c (scm_init_posix): don't intern EINTR since it's now done
6373 elsewhere.
6374
6375 * ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
6376 etc. I deleted them from filesys.c long ago, but didn't
6377 notice they were here too (although ineffective since
6378 sys/stat.h wasn't included).
6379
6380 Tue Feb 4 18:17:50 1997 Tom Tromey <tromey@cygnus.com>
6381
6382 * eval.c: Don't define alloca in GCC case. gcc will automatically
6383 use __builtin_alloca if appropriate.
6384
6385 Tue Feb 4 16:57:40 1997 Jim Blandy <jimb@floss.cyclic.com>
6386
6387 * eval.c (safe_setjmp): New function: trivial wrapper for setjmp.
6388 (SCM_CEVAL, SCM_APPLY): Call it, instead of setjmp, to make sure
6389 that values of automatic variables are preserved. See comments
6390 for safe_setjmp for details.
6391
6392 Change from Thomas Morgan:
6393 * variable.c: Include eq.h.
6394 (var_equal): New function.
6395 (variable_smob): Use var_equal as the discriminator for variables.
6396
6397 * throw.c (s_throw): Remove extraneous declaration.
6398
6399 * configure.in: Call AC_FUNC_ALLOCA, to see if we have alloca.
6400 * eval.c: Add necessary CPP cruft to support that.
6401 * configure, Makefile.in, scmconfig.h.in: regenerated.
6402
6403 Change from Thomas Morgan:
6404 * procprop.c (scm_procedure_properties): Convert the Scheme
6405 boolean returned by scm_procedure_p into a C boolean before using
6406 it as a condition for SCM_ASSERT.
6407 (scm_procedure_property): Likewise.
6408
6409 * simpos.c (SYSTNAME): Accept both 'unix' and '__unix' as
6410 indications of Unixness.
6411 * stime.c: Same.
6412
6413 Tue Feb 4 05:07:35 1997 Gary Houston <ghouston@actrix.gen.nz>
6414
6415 * net_db.c (scm_lnaof): change scheme name from lnaof to inet-lnaof.
6416
6417 Mon Feb 3 06:12:37 1997 Gary Houston <ghouston@actrix.gen.nz>
6418
6419 * read.c (scm_lreadr): use scm_misc_error to improve one of the
6420 "unknown # object" error messages.
6421
6422 * strop.c (scm_i_index, scm_i_rindex): combine into one procedure
6423 (scm_i_index) and declare it static. Add a 'direction' argument
6424 to indicate what way the search should go.
6425 (scm_i_index): throw out-of-range error instead of wrong-type-arg
6426 if indices are bad.
6427 (scm_string_index, scm_string_rindex): adjust usage of scm_i_index.
6428 strop.h: remove scm_i_index, scm_i_rindex prototypes.
6429
6430 Fri Jan 31 04:33:11 1997 Gary Houston <ghouston@actrix.gen.nz>
6431
6432 * ioext.c, ioext.h: remove obsolete _sys_ from 9 procedure names.
6433
6434 * posix.c (scm_fork): Scheme name changed from fork to primitive-fork,
6435 to avoid clash with various scsh forks.
6436
6437 Thu Jan 30 20:14:09 1997 Mikael Djurfeldt <mdj@syk-0606.pdc.kth.se>
6438
6439 The following two changes (ramap.c, throw.c) are motivated by the
6440 apparent unportability of forward declarations of static arrays of
6441 the form `static foo bar[];'.
6442
6443 * ramap.c (scm_array_fill_x): Moved above scm_array_fill_int.
6444 (ra_rpsubrs, ra_asubrs): Moved to the top of array code.
6445
6446 * throw.c (scm_throw): Moved above scm_ithrow.
6447
6448 * options.h: Removed the extern declarations of scm_yes_sym and
6449 scm_no_sym since these are static.
6450
6451 Fri Jan 24 06:16:32 1997 Gary Houston <ghouston@actrix.gen.nz>
6452
6453 * ports.c: add SCM_PROC declarations for pt-size and pt-member.
6454
6455 * Makefile.am: remove AWK=@AWK@.
6456 Add a rule for generating errnos.list.
6457 (CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.
6458
6459 * configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
6460 don't extract errnos, just set a variable (avoids the
6461 need to recompile error.c just because configure is run.)
6462
6463 * unif.h: update prototypes.
6464 * unif.c (scm_uniform_array_read,write): change the offset and
6465 length arguments to start and end, for consistency.
6466
6467 * __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.
6468
6469 * ioext.h: update prototypes.
6470 * ioext.c (scm_read_delimited_x): replaces scm_read_line and
6471 scm_read_line_x, it's a more general procedure using an
6472 interface from scsh. read-line and read-line! are now defined
6473 in boot-9.scm.
6474 Note that the new read-line trims the terminator
6475 by default, previously it was appended to the returned string. An
6476 optional argument specifies how to process the terminator (scsh
6477 compatible). For the old behaviour: (read-line port 'concat).
6478 scm_read_line, scm_read_line_x: deleted. (read-line port 'split)
6479 returns a pair, but is converted to multiple values if the scsh
6480 module is loaded.
6481
6482 socket.h: update prototypes.
6483 * socket.c (scm_recvfrom): for consistency with other procedures,
6484 take start and end as separate optional arguments.
6485 (scm_recv, scm_recvfrom): don't allow the second argument
6486 to be a size, only a buffer. Change the scheme names to
6487 recv! and recvfrom!. Don't return the buffer.
6488
6489 * ioext.h, posix.h: move prototypes too.
6490 * ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
6491 moved back from posix.c to ioext.c. Also move #includes of "genio.h"
6492 "read.h" and "unif.h".
6493 * ioext.c: include "chars.h"
6494
6495 Mon Jan 20 19:54:49 1997 Marius Vollmer <mvo@zagadka.ping.de>
6496
6497 * dynl.c: The dynamic linking and module registration functions
6498 are now defined even when dynamic linking is not available for the
6499 host system. Some of their functionality can be done without
6500 dynamic linking; when it's really needed, they throw errors.
6501
6502 Thu Jan 16 16:39:29 1997 Marius Vollmer <mvo@zagadka.ping.de>
6503
6504 * configure.in: Only define DYNAMIC_LINKING when one of the system
6505 dependent functions is detected.
6506 * dynl.c (scm_dynamic_func): New function to get the address of a
6507 function in a dynamic object.
6508 (scm_dynamic_call, scm_dynamic_args_call): Accept the values
6509 produced by scm_dynamic_func as the thing to call.
6510
6511 Sun Jan 12 21:09:42 1997 Marius Vollmer <mvo@zagadka.ping.de>
6512
6513 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c: Restructured.
6514 (scm_register_module_xxx, scm_registered_modules,
6515 scm_clear_registered_modules): New functions.
6516
6517 Sat Jan 11 21:37:15 1997 Marius Vollmer <mvo@zagadka.ping.de>
6518
6519 * symbols.c (scm_sysintern): Renamed to
6520 scm_sysintern_no_module_lookup.
6521 (scm_sysintern): New function to take the place of the old
6522 scm_sysintern. It uses the current toplevel lookup closure to give
6523 the symbol its value. This is a temporary hack to put packages
6524 like gtcltk into their own module.
6525 (scm_can_use_top_level_lookup_closure_var): New variable to tell
6526 us whether `scm_top_level_lookup_closure_var' has been initialized
6527 and is usable.
6528 * eval.c (scm_init_eval): Set it.
6529
6530 Sat Jan 18 00:03:31 1997 Gary Houston <ghouston@actrix.gen.nz>
6531
6532 * fports.c (scm_open_file): pass errno to scm_syserror_msg.
6533 * filesys.h: update prototypes. Remove macros: SCM_FD_P, SCM_FD_FLAGS,
6534 SCM_FD.
6535 * filesys.c (scm_sys_stat, scm_sys_lstat): pass errno to
6536 scm_syserror_msg.
6537 (scm_sys_read_fd, scm_sys_write_fd, scm_sys_close, scm_sys_lseek,
6538 scm_sys_dup): deleted: FD capability will be added to other
6539 procedures.
6540 Remove support for the FD object type: scm_tc16_fd, scm_fd_print,
6541 scm_fd_free, fd_smob, scm_intern_fd.
6542 (scm_open): renamed from scm_sys_open. Return a port instead of
6543 an FD object. Make the mode argument optional.
6544 (scm_sys_create): deleted, it's just a special case of open.
6545 (scm_init_filesys): move interning of constants O_CREAT etc.,
6546 here (were previously using SCM_CONST_LONG macro).
6547 Add missing constants: O_RDONLY, O_WRONLY, O_RDWR, O_CREAT.
6548 don't newsmob fd.
6549 (numerous _sys_ procedures): remove gratuitous _sys_ from names.
6550 include "fports.h" and <stdio.h>
6551 (scm_stat, scm_select): don't support FD objects.
6552
6553 * error.h: adjust scm_syserror_msg prototype.
6554 * error.c (scm_syserror_msg): take an extra argument for errno.
6555 Using the global value didn't always work, since it could be
6556 reset by procedure calls in the message or args arguments.
6557
6558 * fports.c (scm_setbuf0): call setbuf even if FIONREAD is not defined.
6559 I don't understand why the check was there (and what about the
6560 ultrix check?)
6561
6562 * strop.c (scm_string_copy): allow shared substrings to be copied.
6563
6564 * unif.h: corresponding change to prototypes.
6565 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write_x):
6566 recognize two new optional arguments: offset and length. Allow
6567 the port argument to be an integer (file descriptor, for scsh).
6568 Include <unistd.h> for "read" prototype.
6569
6570 Tue Jan 14 02:42:02 1997 Gary Houston <ghouston@actrix.gen.nz>
6571
6572 * socket.c: don't include filesys.h.
6573
6574 Mon Jan 13 03:47:04 1997 Gary Houston <ghouston@actrix.gen.nz>
6575
6576 * Makefile.am: add AWK=@AWK@ (?)
6577
6578 * Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
6579 errnos_get.c.
6580 Add a rule to generate errnos.c from errnos.
6581 * error.c (scm_init_error): include errnos.c.
6582 * errnos_cnvt.awk: new file, converts the list of errno codes to
6583 C expressions.
6584 * errnos_get.c: new file.
6585 * errnos.default: new file, contains errnos to try if they can't
6586 be extracted from errno.h.
6587 * configure.in: if using GCC, try and extract errno codes from
6588 errno.h.
6589 Added AC_PROG_AWK.
6590
6591 Sat Jan 11 14:47:00 1997 Marius Vollmer <mvo@zagadka.ping.de>
6592
6593 * configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
6594 * Makefile.am: Made libguile into a libtool library.
6595 * PLUGIN/guile.config: Removed "-L ../libguile" from xtra_cflags.
6596 Set libtool_libs to indicate that libguile is a libtool library.
6597 See guile/ChangeLog for details.
6598 * .cvsignore: ignore "*.lo", the libtool library objects.
6599
6600 Wed Jan 8 06:54:54 1997 Gary Houston <ghouston@actrix.gen.nz>
6601
6602 * net_db.c (scm_getserv): add missing SCM_ALLOW_INTS.
6603 use htons in getservbyport argument.
6604
6605 Tue Jan 7 18:11:24 1997 Jim Blandy <jimb@floss.cyclic.com>
6606
6607 * ports.h (SCM_PTOBNUM): Removed extraneous semicolon.
6608 * smob.h: (SCM_PTOBNUM): Removed entirely; this definition is a
6609 duplicate.
6610
6611 * objprop.c (scm_object_property): No need to take the CDR of the
6612 value returned by scm_object_properties, since Aug 20 change.
6613
6614 * configure.in: When checking for struct linger, #include
6615 <sys/types.h> as well as <sys/socket.h>. I've never known
6616 <sys/types.h> to cause any portability problems, and Solaris's
6617 <sys/socket.h> needs it.
6618 * configure: Rebuilt.
6619
6620 I think the Sun compiler has chosen a perverse way to interpret
6621 ANSI declarations combined with K&R definitions. We'll
6622 appease it a little bit. But when it invades France, we fight.
6623 * print.c (scm_iprlist): Change 'tlr' argument to an int.
6624 * print.h (scm_iprlist): Here too.
6625 * numbers.c (scm_divbigdig): Change definition to match
6626 declaration in numbers.h.
6627 * unif.c (scm_makflo): Change definition to match declaration in
6628 unif.h.
6629
6630 * init.c (scm_boot_guile): Don't return the value of
6631 scm_boot_guile_1. This function doesn't return a value;
6632 scm_boot_guile_1 doesn't return a value (or return at all).
6633
6634 * eval.c (unmemocopy): Add a semicolon to appease the Sun
6635 compiler.
6636
6637 * simpos.c (SYSTNAME): Add case for AIX; otherwise it won't
6638 compile. I have a feeling this function is a bad idea anyway ---
6639 one should always test for features, not systems.
6640
6641 * smob.h (SCM_SMOBNUM, SCM_PTOBNUM): Remove extraneous
6642 semicolons. Only pure luck kept this from being noticed earlier.
6643
6644 Tue Jan 7 15:04:06 1997 Mikael Djurfeldt <mdj@kenneth>
6645
6646 * socket.c (scm_recvfrom): Added missing semicolon.
6647
6648 Mon Jan 6 20:39:08 1997 Gary Houston <ghouston@actrix.gen.nz>
6649
6650 * socket.c (scm_recvfrom): allow buff_or_size to be a list containing
6651 the buffer and start and end positions for scsh networking
6652 implementation.
6653
6654 Sun Jan 5 13:53:53 1997 Jim Blandy <jimb@floss.cyclic.com>
6655
6656 * configure.in: Revert previous change to this file; the problem
6657 is due to transient automake weirdness.
6658 * configure: Rebuilt.
6659
6660 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in, not
6661 PLUGIN/guile.libs. configure generates the latter from the former.
6662 * Makefile.in: Rebuilt.
6663
6664 * configure.in: Call AM_PROG_INSTALL; the automake manual says we
6665 need this if we install scripts, like guile-snarf.
6666 * configure: Rebuilt.
6667
6668 Thu Jan 2 01:56:38 1997 Marius Vollmer <mvo@zagadka.ping.de>
6669
6670 * Makefile.am (EXTRA_DIST): Added DYNAMIC-LINKING
6671
6672 Sat Dec 28 19:14:01 1996 Gary Houston <ghouston@actrix.gen.nz>
6673
6674 * socket.c (scm_addr_vector): fix faulty scm_listify.
6675
6676 Sat Dec 28 13:55:58 1996 Marius Vollmer <mvo@zagadka.ping.de>
6677
6678 * read.c (scm_lreadr): Encountering EOF after skipping a SCSH
6679 style block comment is no longer considered an error.
6680
6681 Fri Dec 27 13:44:23 1996 Marius Vollmer <mvo@zagadka.ping.de>
6682
6683 * PLUGIN/guile.libs.in: New file.
6684 * PLUGIN/guile.libs: Removed from repository.
6685 * configure.in: Create PLUGIN/guile.libs from
6686 PLUGIN/guile.libs.in. This is for including additonal libraries
6687 needed for dynamic linking.
6688 * Makefile.am (EXTRA_DIST): Distribute PLUGIN/guile.libs.in
6689 instead of PLUGIN/guile.libs.
6690
6691 * Makefile.am: Added explicit dependency "dynl.o: dynl.x".
6692
6693 Sun Dec 22 23:06:14 1996 Jim Blandy <jimb@floss.cyclic.com>
6694
6695 * list.c (scm_delq_x, scm_delv_x, scm_delete_x): Delete all
6696 occurrences of the given element from the list, not just the
6697 first. This is how the Emacs Lisp functions behave, how the
6698 analogous Common Lisp functions behave, and (I believe) how the
6699 older Maclisp functions worked. I realize that this change may
6700 break code, but it seemed better to break it before the Guile
6701 release than after.
6702
6703 * gc.c (scm_protect_object, scm_unprotect_object): New functions.
6704 Their prototypes were already present in gc.h, but they weren't
6705 implemented.
6706 (scm_init_storage): Initialize scm_protects.
6707 * root.c (scm_protects): New element of scm_sys_protects.
6708
6709 * net_db.h (scm_init_net_db): Fix spelling from scm_init_netdb.
6710
6711 Sat Dec 21 15:38:32 1996 Jim Blandy <jimb@floss.cyclic.com>
6712
6713 * libguile.h: Added #include "libguile/net_db.h".
6714
6715 * libguile.h: Don't #include "libguile/libpath.h", contrary to Oct
6716 30 change. That file is only meant for communication between the
6717 configuration process and load.c. If code linked against libguile
6718 wants to get at the paths mentioned in libpath.h, it can call
6719 functions declared in load.h.
6720
6721 Sat Dec 21 14:50:42 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6722
6723 * libguile.h: Removed #include "libguile/fdsocket.h"
6724
6725 * net_db.c: Added #include <sys/socket.h>.
6726
6727 Sat Dec 21 00:33:03 1996 Gary Houston <ghouston@actrix.gen.nz>
6728
6729 * filesys.c (scm_input_waiting_p): use select in preference to
6730 FIONREAD, since the latter doesn't detect EOF.
6731 Throw error if neither select nor FIONREAD available.
6732
6733 * socket.c (scm_connect): take a port, not a fd object.
6734 (scm_fill_sockaddr): throw an error if fam is not recognised.
6735 (scm_bind): use scm_fill_sockaddr.
6736 (scm_listen): take a port, not a fd object.
6737 (scm_accept): take and return a port. return #f in the car if
6738 address can't be got
6739 (scm_sock_fd_to_port): new procedure.
6740 (scm_socket): use scm_sock_fd_to_port.
6741 (scm_addr_vector): throw error if unrecognised address type.
6742 take an extra argument with the calling procedure name.
6743 (scm_getsockname): take a port. return #f if address can't be got.
6744 (scm_getpeername): take a port. return #f if address can't be got.
6745 (scm_recvfrom): take a port. return #f for address component if can't
6746 be got.
6747 (scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
6748 scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
6749
6750 Fri Dec 20 23:06:53 1996 Jim Blandy <jimb@floss.cyclic.com>
6751
6752 * throw.c (scm_internal_catch): Make body funcs and handler funcs
6753 use separate data pointers, to allow them to be designed
6754 independently and reused.
6755 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message):
6756 Renamed from catch_body, catch_handler, and uncaught_throw; made
6757 generically useful.
6758 (struct scm_catch_body_data): Renamed from catch_body_data; moved
6759 to throw.h.
6760 (scm_catch): Use the above.
6761 (scm_throw): Don't bother printing a message for an uncaught
6762 throw; we establish a default handler in init.
6763 * throw.h (scm_internal_catch): Prototype updated.
6764 (scm_body_thunk, scm_handle_by_proc, scm_handle_by_message): New
6765 decls.
6766 (struct scm_body_thunk_data): New structure, used as data
6767 argument to scm_body_thunk.
6768 * init.c (struct main_func_closure): New structure, packaging up
6769 the data to pass to the user's main function.
6770 (scm_boot_guile): Create one. Pass it to scm_boot_guile_1.
6771 (scm_boot_guile_1): Pass it through to invoke_main_func. Use
6772 scm_internal_catch to establish a catch-all handler, using
6773 scm_handle_by_message. This replaces the special-case code in
6774 scm_throw.
6775 (invoke_main_func): Body function for scm_internal_catch; invoke
6776 the user's main function, using the main_func_closure pointer to
6777 decide what to pass it.
6778 * root.c (struct cwdr_body_data): Remove handler_proc member.
6779 (cwdr): Use scm_handle_by_proc instead of cwdr_handler.
6780 (cwdr_handler): Removed.
6781
6782 Thu Dec 19 00:00:26 1996 Gary Houston <ghouston@actrix.gen.nz>
6783
6784 * socket.h (SCM_P): update bind prototype.
6785 * socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
6786 include "feature.h".
6787 (scm_socket): return a port, not a file descriptor object.
6788 include "fports.h" and <unistd.h>
6789 (scm_bind): take a port, not a file descriptor object.
6790 take an extra argument for address args.
6791
6792 * net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
6793 INADDR_NONE, INADDR_LOOPBACK.
6794
6795 Tue Dec 17 22:58:26 1996 Gary Houston <ghouston@actrix.gen.nz>
6796
6797 * init.c: include net_db.h and not fdsocket.h.
6798 (scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.
6799
6800 * Makefile.am: corresponding changes.
6801 * socket.h: renamed from fdsocket.h, fix names.
6802 * net_db.h: renamed from socket.h, fix names.
6803 * socket.c: renamed from fdsocket.c.
6804 remove _sys from procedure names.
6805 (scm_init_socket): rename from scm_init_fdsocket. include socket.x.
6806 add "socket" to features list.
6807 * net_db.c: renamed from socket.c.
6808 remove _sys from procedure names.
6809 (scm_init_net_db): rename from scm_init_socket. include net_db.x.
6810 add "net-db" to features list.
6811 include "net_db.h". don't include <sys/socket.h> or
6812 <sys/un.h>.
6813
6814 Thu Dec 19 14:03:24 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6815
6816 * tags.h (scm_tags): Removed comma at end of last enumerator.
6817
6818 Thu Dec 19 02:54:59 1996 Jim Blandy <jimb@floss.cyclic.com>
6819
6820 Don't use GCC extensions to allocate space for debugging frames.
6821 (Here he goes again! Why do we put up with this?!)
6822 * debug.h (scm_debug_frame): Make the 'vect' member a pointer to
6823 an scm_debug_info structure, not an in-line array of them. Add
6824 'info' member, to say how many vect elements we've used, for eval
6825 frames.
6826 * eval.c (SCM_CEVAL): Use alloca to allocate space for vect. Use
6827 a new variable debug_info_end to mark the end of vect, instead of
6828 the address of the 'info' pointer itself.
6829 [DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of
6830 &debug to scm_debug_frame *; debug is a real scm_debug_frame now.
6831 (SCM_APPLY): Explicitly allocate space for debug.vect.
6832 * debug.c (scm_m_start_stack): Same, for vframe.vect.
6833 * stacks.c: Adjusted for new debug frame structure.
6834 (RELOC_INFO, RELOC_FRAME): New macros.
6835 (stack_depth, read_frames): Use them, and new scm_debug_frame
6836 element 'info', instead of magically knowing that eval frames have
6837 an info pointer sitting after vect.
6838 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Use
6839 RELOC_FRAME.
6840 (scm_init_stacks): Formatting tweaks.
6841
6842 Wed Dec 18 14:57:57 1996 Jim Blandy <jimb@floss.cyclic.com>
6843
6844 Give GCC more control flow information, so it can be sure that
6845 variables aren't used uninitialized.
6846 * error.h (scm_error, scm_syserror, scm_syserror_msg,
6847 scm_sysmissing, scm_num_overflow, scm_out_of_range,
6848 scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
6849 scm_misc_error): Tell GCC that these functions never return.
6850 * struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
6851 out the field type, call abort if SCM_ASSERT returns, to placate
6852 the optimizer.
6853 * stacks.c (scm_make_stack, scm_last_stack_frame): abort if
6854 scm_wta ever returns. We can't handle this case anyway, and this
6855 gives the optimizer more information.
6856 * unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
6857 scm_wta ever returns.
6858
6859 In some cases, the code is fine, but GCC isn't smart enough to
6860 figure that out; this usually happens when one variable is only
6861 initialized and used when a particular condition holds true, and
6862 we know that condition will never change within a given invocation
6863 of the function. In this case, we simply initialize the variables
6864 to placate the compiler, hopefully to a value which will cause a
6865 crash if it is ever actually used.
6866 * print.c (scm_iprin1): Initialize mw_pos.
6867 * read.c (scm_lreadrecparen): Initialize tl2, ans2.
6868 * throw.c (scm_ithrow): Initialize dynpair.
6869 * unif.c (scm_uniform_vector_ref): Initialize cra.
6870 * struct.c (init_struct): Initialize prot.
6871 * mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
6872
6873 * strports.c (scm_eval_0str): Don't return uninitialized garbage
6874 if EXPR contains no expressions.
6875
6876 Wed Dec 18 11:43:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
6877
6878 * eval.c, debug.h: Revert changes of Dec 16 and Nov 21. They
6879 cause an infinite loop (???). So much for the algebraic
6880 equivalency of variable-sized arrays and alloca...
6881
6882 Tue Dec 17 20:29:03 1996 Marius Vollmer <mvo@zagadka.ping.de>
6883
6884 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
6885 a SCM boolean, not a C boolean.
6886
6887 Sat Dec 14 23:21:45 1996 Marius Vollmer <mvo@zagadka.ping.de>
6888
6889 * gc.c (SCM_MTRIGGER_HYSTERESIS): New memory management parameter.
6890 (scm_must_malloc, scm_must_realloc): Added a hysteresis to the
6891 rules for raising scm_mtrigger. Previously, unfortunate but not
6892 unlikely circumstances could result in almost constant invokation
6893 of the gc. Now, this situations should be less likely, but they
6894 are not prevented completely.
6895
6896 Tue Dec 17 16:19:07 1996 Jim Blandy <jimb@totoro.cyclic.com>
6897
6898 * numbers.c (scm_fuck): Procedure removed; looks like old test
6899 code.
6900 * numbers.h: Prototype removed.
6901
6902 Mon Dec 16 18:20:32 1996 Jim Blandy <jimb@totoro.cyclic.com>
6903
6904 * debug.h (scm_debug_frame): Change `vect' member from an in-line
6905 array to a pointer, to match my Nov 21 change in eval.c.
6906
6907 Fri Dec 13 16:12:14 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
6908
6909 * libguile.h: Added #include "libguile/backtrace.h", #include
6910 "libguile/stacks.h".
6911
6912 * strings.c (scm_string scm_make_string scm_string_ref
6913 scm_string_set_x scm_string_equal_p scm_string_append):
6914 Bugfix according to scm patch from Aubrey Jaffer:
6915 Corrected long-standing
6916 (not (eqv? (integer->char 128)
6917 (string-ref (make-string 1 (integer->char 128)) 0)))
6918 bug found by John Kozak <jk@noontide.demon.co.uk>.
6919
6920 * strports.c, strports.h: Make scm_eval_0str return the value of
6921 the last expression evaluated (previously, it returned void).
6922
6923 * strports.c, strports.h: New function: scm_read_0str. Does what
6924 it sounds like.
6925
6926 Tue Dec 10 23:38:43 1996 Gary Houston <ghouston@actrix.gen.nz>
6927
6928 * simpos.c (scm_getenv): return #f if string can't be found in the
6929 environment instead of throwing an exception, for compatibility
6930 with numerous other systems.
6931
6932 Mon Dec 9 23:23:35 1996 Tom Tromey <tromey@cygnus.com>
6933
6934 * Makefile.am (.c.x): Use guile-snarf.
6935 * configure.in (AC_OUTPUT): Generate guile-snarf; make it
6936 executable.
6937 * guile-snarf.in: New file, resurrected from old guile-snarf.sh.
6938
6939 Mon Dec 9 18:36:50 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
6940
6941 * backtrace.c (scm_display_error_message): Made non-static, and
6942 renamed from display_error_message.
6943 * backtrace.h (scm_display_error_message): Added extern decl.
6944 * throw.c (uncaught_throw): Use it to display the error message.
6945
6946 Mon Dec 9 10:10:38 1996 Tom Tromey <tromey@cygnus.com>
6947
6948 * inet_aton.c: Use #if 0, not #ifdef 0.
6949
6950 Mon Dec 9 06:36:48 1996 Gary Houston <ghouston@actrix.gen.nz>
6951
6952 * ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
6953 to convert the returned value.
6954 (scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert
6955 the offset argument.
6956
6957 Sun Dec 8 21:06:38 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
6958
6959 Add new interface to catch/throw, usable from C as well as
6960 Scheme.
6961 * throw.h (scm_catch_body_t, scm_catch_handler_t): New types.
6962 (scm_internal_catch): New function, replaces...
6963 (scm_catch_apply): Deleted.
6964 * throw.c (scm_catch_apply): Deleted; replaced with a more general
6965 mechanism which is a bit more code, but can be used nicely from C
6966 and implement the Scheme semantics as well.
6967 (scm_internal_catch): This is the replacement; it's named after
6968 the analogous function in Emacs.
6969 (scm_catch): Reimplemented in terms of the above.
6970 (struct catch_body_data, catch_body, catch_handler): New
6971 functions, used by scm_catch.
6972 * root.c (cwdr): Reimplemented in terms of scm_internal_catch.
6973 (struct cwdr_body_data, cwdr_body, cwdr_handler): New functions;
6974 support for new cwdr.
6975
6976 * Makefile.am (libpath.h): Re-incorporate Mikael's changes of Wed
6977 Oct 30.
6978
6979 Sun Dec 8 17:55:34 1996 Marius Vollmer <mvo@zagadka.ping.de>
6980
6981 * acconfig.h: Added DYNAMIC_LINKING symbol.
6982 * configure.in: Add option and checks for dynamic linking.
6983 * dynl.c, dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c,
6984 dynl.h: New files for dynamic linking support.
6985 * Makefile.am (libguile_a_SOURCES):
6986 Added "dynl.c".
6987 (modinclude_HEADERS): Added "dynl.h".
6988 (EXTRA_DIST): Added "dynl-dl.c", "dynl-dld.c", "dynl-shl.c" and
6989 "dynl-vms.c".
6990 * init.c (scm_boot_guile_1): Call
6991 scm_init_dynamic_linking to initialize dynamic linking support.
6992
6993 Thu Dec 5 22:47:53 1996 Marius Vollmer <mvo@zagadka.ping.de>
6994
6995 * init.c (scm_boot_guile_1): Moved `live' variable to the toplevel
6996 (as we Schemers say). It needs to be global, so that I can tweak
6997 it for the proper operation of unexec.
6998 (scm_boot_guile_1_live): New variable, see above.
6999
7000 Sun Dec 1 00:00:49 1996 Tom Tromey <tromey@cygnus.com>
7001
7002 * guile-snarf.sh: Removed.
7003 * PLUGIN/guile.libs: Added dependency for -lm.
7004 * acinclude.m4: Renamed from aclocal.m4.
7005 * PLUGIN/greet: Removed.
7006 * Makefile.am, aclocal.m4: New files.
7007 * configure.in: Updated for Automake.
7008
7009 Thu Nov 28 00:23:55 1996 Marius Vollmer <mvo@zagadka.ping.de>
7010
7011 * eval.c (scm_definedp): Use top_level_lookup_closure_var
7012 and not top_level_lookup_thunk_var.
7013
7014 Wed Nov 27 22:04:19 1996 Jim Blandy <jimb@baalperazim.frob.com>
7015
7016 * Makefile.in (ancillary): List ChangeLog-scm, not ChangeLog.scm.
7017
7018 Wed Nov 27 14:14:56 1996 Marius Vollmer <mvo@zagadka.ping.de>
7019
7020 * eval.c (scm_definedp): Incompatibly changed to be a builtin
7021 Scheme function, instead of syntax. Single argument is now a
7022 symbol.
7023
7024 Thu Nov 21 20:26:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
7025
7026 * ramap.c (scm_ra_sum, scm_ra_difference, scm_ra_product,
7027 scm_ra_divide): Properly terminate statements passed as arguments
7028 to IVDEP macros. (Thanks to Bernard Urban.)
7029
7030 * eval.c (SCM_CEVAL): Use alloca, not GCC's extensions for arrays
7031 with non-constant sizes. (Thanks to Bernard Urban.)
7032
7033 Thu Nov 21 11:17:42 1996 Jim Blandy <jimb@floss.cyclic.com>
7034
7035 It's an "eval closure", not an "eval thunk." A thunk is a
7036 function of no arguments.
7037 * root.h (struct scm_root_state): Renamed
7038 top_level_lookup_closure_var from top_level_lookup_thunk_var.
7039 (scm_top_level_lookup_closure_var): Renamed from
7040 scm_top_level_lookup_thunk_var.
7041 * root.c (mark_root): Uses changed.
7042 * gdbint.c (gdb_eval, gdb_binding): Uses changed.
7043 * init.c (scm_start_stack): Uses changed.
7044 * eval.c (scm_eval, scm_eval_x, scm_init_eval): Rename uses.
7045 Change scheme-visible name to *top-level-lookup-closure* from
7046 *top-level-lookup-thunk*.
7047
7048 Tue Nov 19 22:43:31 1996 Jim Blandy <jimb@totoro.cyclic.com>
7049
7050 * gc.c (scm_igc, scm_gc_mark): Round up the size of the stack we
7051 pass to scm_mark_locations. (Thanks to Aubrey Jaffer.)
7052
7053 Sun Nov 10 13:35:05 1996 Jim Blandy <jimb@floss.cyclic.com>
7054
7055 * gc.c (struct scm_heap_seg_data): Doc fixes.
7056
7057 * gc.c (scm_gc_sweep): Empty all segments' freelists before
7058 sweeping. Then, prepend each segment's free cells to its
7059 freelist, rather than wiping out the old value. (Thanks to Marius
7060 Vollmer.)
7061
7062 * gc.c (which_seg, scm_map_free_list, scm_newcell_count,
7063 scm_check_freelist, scm_debug_newcell): New functions and
7064 variables, for debugging freelist problems.
7065 * pairs.h (SCM_NEWCELL): New debugging version added.
7066 * gc.h (scm_debug_newcell): Added extern declaration, used by
7067 debugging version of SCM_NEWCELL.
7068
7069 Sat Nov 9 19:02:46 1996 Jim Blandy <jimb@floss.cyclic.com>
7070
7071 On some systems <libc.h> conflicts with <unistd.h>, and should not
7072 be #included at all.
7073 * aclocal.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): New autoconf macro.
7074 * acconfig.h (LIBC_H_WITH_UNISTD_H): New CPP symbol.
7075 * configure.in: Call it.
7076 * posix.c, filesys.c: Use its results to decide whether or not to
7077 #include <libc.h>.
7078 * configure, scmconfig.h.in: Rebuilt with autoconf and
7079 autoheader.
7080
7081 Wed Nov 6 16:19:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
7082
7083 * fports.c (scm_stdio_to_port, scm_open_file): Set the port's
7084 pointer to the stdio stream before calling scm_setbuf0, so the
7085 latter will be able to retrieve it. I'm surprised this didn't
7086 segfault earlier. (Thanks to Christopher Lee.)
7087
7088 Wed Nov 6 16:01:20 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7089
7090 * throw.c (scm_lazy_catch, scm_ithrow): Completed implementation
7091 of `lazy-catch'.
7092
7093 Sat Nov 2 21:01:48 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7094
7095 * stacks.c, stacks.h (scm_make_stack): Now takes arbitrary
7096 number of stack narrowing specifier pairs. The first specifier in
7097 a pair controls inner border, the second the outer border. A
7098 number means cut that number of frames, a procedure object means
7099 cut until that object is found in operator position in a frame.
7100
7101 * root.c (cwdr): Bugfix.
7102
7103 * read.c: Recording of positions disabled by default.
7104
7105 * procs.c (scm_closure_p): New function.
7106
7107 * posix.c (scm_tmpnam): New function.
7108
7109 * load.c: Added #include "throw.h".
7110 (scm_sys_search_load_path): Bugfix: Don't add an extra '/' if path
7111 ends with '/'.
7112
7113 * load.c, load.h (scm_read_and_eval_x): New function.
7114
7115 * eval.c: Renamed debug option "deval" to "debug".
7116
7117 (scm_eval_x): `eval!' is no longer accessible from the scheme
7118 level. Motivation: We can't allow operations which introduce
7119 glocs into the scheme level. Guile's type system can't handle
7120 these as data. Use `eval' or `read-and-eval!' as replacement.
7121
7122 * debug.c (scm_m_start_stack): Bugfix: Use SCM_ECONSP instead of
7123 SCM_CONSP since this is a macro!; Set vframe.prev to
7124 scm_last_debug_frame instead of 0. In this way we can look
7125 "above" the virtual start stack frame if we wish.
7126 (scm_debug_hang): New function: Useful for debugging Guile in
7127 certain tricky situations. Will probably be removed later...
7128
7129 * debug.h: Changed semantics of debug option "backtrace". This
7130 option now only indicates whether we want automatic backtrace at
7131 an error.
7132
7133 Wed Oct 30 00:31:55 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7134
7135 * ports.c: #include "filesys.h"
7136 (scm_char_ready_p): input_waiting renamed and moved to filesys.c.
7137
7138 * filesys.c, filesys.h (scm_input_waiting_p): Moved from ports.c.
7139 Motivation: This is system specific code which is related to file
7140 I/O. It also may use select. Added code by Gary Houston to
7141 detect presence of character in stdio buffers.
7142
7143 * libguile.h: #include "libguile/libpath.h"
7144
7145 * Makefile.in (libpath.h): Renamed definition of: LIBRARY_PATH -->
7146 SCM_LIBRARY_DIR; Added definitions of: SCM_PKGDATA_DIR,
7147 SCM_SITE_DIR; Install libpath.h among the other include files.
7148
7149 * load.c, load.h (scm_sys_package_data_dir): New function.
7150
7151 Mon Oct 28 11:43:41 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7152
7153 * stacks.h: Bugfix: Don't use tail-array length field as stack
7154 length field! This screwed GC.
7155
7156 Tue Oct 22 01:01:00 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7157
7158 * _scm.h: Added #ifndef around definition of macros min and max.
7159
7160 * __scm.h: Added hooks for threads to plugin to in ints protection
7161 macros: SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER,
7162 SCM_THREAD_ALLOW_1, SCM_THREAD_ALLOW_2. Motivation: We don't want
7163 the main code in these macros duplicated and spread over multiple
7164 files. Renamed SCM_THREADS_SWITCHING_CODE ->
7165 SCM_THREAD_SWITCHING_CODE.
7166
7167 Tue Oct 29 14:55:40 1996 Marius Vollmer <mvo@zagadka.ping.de>
7168
7169 * snarf.h: New file.
7170 * guile-snarf.sh: New file.
7171 * Makefile.in (inner_h_files): Added snarf.h
7172 (ancillary, install, uninstall, distclean): Added actions for
7173 guile-snarf.
7174 (.c.x): Use guile-snarf.
7175 (guile-snarf): New rule, to produce guile-snarf from guile-snarf.sh.
7176 (gen_c_files): Note that these depend on guile-snarf.
7177 * _scm.h: Removed the snarfing macros (SCM_PROC, etc). They are
7178 now in "snarf.h". Added #include "snarf.h" to get them.
7179 * libguile.h: Added #include "snarf.h".
7180 (Patches applied and tweaked by Jim Blandy.)
7181
7182 Tue Oct 29 13:21:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
7183
7184 * socket.c: Use K&R style declaration for 'close'; the GNU coding
7185 standards suggest against providing prototypes for system
7186 functions. Thanks to Greg Troxel.
7187
7188 Mon Oct 28 16:48:32 1996 Jim Blandy <jimb@floss.cyclic.com>
7189
7190 * strports.c (scm_eval_0str): New function.
7191 #include "read.h", to get prototype for scm_read.
7192 * Makefile.in (strports.o): Update dependencies.
7193 * strports.h: New prototype.
7194
7195 * numbers.c (scm_integer_p): Renamed from scm_int_p; change its
7196 scheme name from "int?" to "integer?". It seems to do the job.
7197 * numbers.h: Rename prototype too.
7198 * scmhob.h (intp): Change definition to refer to scm_integer_p. I
7199 hope this is right.
7200
7201 * numbers.c (scm_less_p, scm_gr_p, scm_leq_p, scm_geq_p,
7202 scm_num_eq_p): Rename these according to R4RS conventions: call
7203 them <, <=, =, >, and >=, not <?, <=?, =?, >?, and >=?. En route
7204 to making libguile R4RS compliant without ice-9...
7205
7206 * load.c (scm_sys_search_load_path): Search for files under all
7207 extensions listed in the %load-extensions variable. If FILENAME
7208 is absolute, return it unchanged, without searching the load path.
7209 (scm_loc_load_extensions): New variable, pointing to
7210 %load-extensions' value cell.
7211 (scm_init_load): Initialize it, and the value it points to.
7212 (scm_primitive_load_path): Improve error reporting.
7213
7214 * load.c (scm_loc_load_hook): New variable, pointing to value cell
7215 of new Scheme variable %load-hook.
7216 (scm_primitive_load): Apply %load-hook to filename.
7217
7218 Mon Oct 28 06:28:28 1996 Gary Houston <ghouston@actrix.gen.nz>
7219
7220 * configure.in: add tests for figuring out whether buffered data
7221 is available in a FILE structure, which is needed by char-ready.
7222
7223 * acconfig.h: define FILE_CNT_FIELD, FILE_CNT_GPTR and
7224 FILE_CNT_READPTR.
7225
7226 * simpos.c (scm_getenv): renamed from scm_sys_getenv. Throw
7227 exceptions using misc_error instead of syserror. It seems a bit
7228 odd to throw an exception if a string can't be found in the
7229 environment, but it's consistent with open-file, stat etc.
7230 (simpos.h): remove sys_ from getenv.
7231
7232 * posix.c (scm_putenv): renamed from scm_sys_putenv. If an error
7233 occurs, throw an error instead of returning errno. Return value
7234 is now unspecified.
7235 (numerous in posix.c and posix.h): removed superfluous sys_ from names.
7236
7237 Sun Oct 27 01:22:04 1996 Gary Houston <ghouston@actrix.gen.nz>
7238
7239 * filesys.c (scm_stat2scm): derive file type and permissions from
7240 the stat mode and append them to the returned vector.
7241 There isn't much overhead in doing this and it avoids the need to
7242 work with S_IRUSR et al. in Scheme.
7243 Define symbols scm_sym_regular etc.
7244 (scm_init_filesys): don't intern S_IRUSR etc.
7245
7246 * load.c: change s_try_load and s_try_load_path to s_primitive_load
7247 and s_primitive_load_path.
7248
7249 * eval.c, load.c, error.c (scm_wta): use scm_misc_error.
7250
7251 * error.h: don't declare error symbols. prototype for scm_misc_error.
7252
7253 * stackchk.c (scm_stack_overflow_key): defined here instead of in
7254 error.c.
7255
7256 * error.c: use SCM_SYMBOL to set up error keys.
7257 scm_misc_error: new procedure.
7258
7259 Fri Oct 25 01:56:30 1996 Jim Blandy <jimb@floss.cyclic.com>
7260
7261 * read.c (scm_lreadr): Recognize SCSH-style block comments; text
7262 between `#!' and `!#' is ignored.
7263 (skip_scsh_block_comment): New function.
7264
7265 * feature.c (scm_set_program_arguments): New argument, FIRST.
7266 * feature.h: Update prototype.
7267 * init.c (scm_boot_guile_1): Pass new argument to
7268 scm_set_program_arguments.
7269
7270 Tue Oct 22 20:54:42 1996 Jim Blandy <jimb@floss.cyclic.com>
7271
7272 * init.c (scm_start_stack): Don't initialize scm_progargs here.
7273 (scm_boot_guile): Call scm_set_program_arguments here, later than
7274 the old initialization.
7275
7276 * init.c: (scm_boot_guile, scm_boot_guile_1): New, simplified
7277 initialization procedure.
7278 - Delete in, out, err arguments; there are other perfectly good
7279 ways to override these when desired.
7280 - Delete result argument; this function shouldn't ever return.
7281 - Rename init_func argument to main_func, for less confusion.
7282 - Delete boot_cmd argument; main_func is more general.
7283 -Add 'closure' argument, to help people pass data to main_func
7284 without resorting to global variables.
7285 - Abort if reentered; don't bother returning an error code.
7286 - Call scm_init_standard_ports to set up the default/current
7287 standard ports; no need to pass them to scm_start_stack.
7288 - Remove code to evaluate the boot_cmd, and start the repl; let
7289 the user do something like that in main_func if they want.
7290 - Remove code to package up a return value; main_func can do any
7291 of that as needed.
7292 - Call exit (0), instead of returning.
7293 (scm_start_stack): Don't initialize the I/O ports here; that's
7294 weird. Delete in, out, err arguments. Move guts to
7295 scm_init_standard_ports, scm_stdio_to_port.
7296 (scm_init_standard_ports): New function, to set up current and
7297 default standard ports.
7298 (scm_start_stack, scm_restart_stack): Make these static.
7299 * init.h (scm_boot_guile): Adjust declaration.
7300 (scm_start_stack, scm_restart_stack): Remove externally
7301 visible declarations for these.
7302 (enum scm_boot_status): Removed; now scm_boot_guile never returns.
7303
7304 * fports.c (scm_stdio_to_port): New function. Its guts used to be
7305 written out several times in scm_start_stack.
7306 * fports.h: New declaration for the above.
7307
7308 * feature.c (scm_set_program_arguments): New function.
7309 * feature.h: New declaration for the above.
7310
7311 * ports.c: Formatting tweak.
7312
7313 Sun Oct 20 03:29:32 1996 Mikael Djurfeldt <mdj@kenneth>
7314
7315 * pairs.h, eval.c, eval.h, feature.c, gc.c, list.c, load.c,
7316 ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
7317 for obtaining the address of a car or cdr field. Motivation:
7318 &SCM_CXR make assumptions about the internal structure of the
7319 SCM_CXR selectors.
7320
7321 * eval.h, eval.c: Added new selector SCM_GLOC_VAL_LOC.
7322 Motivation: see SCM_CXRLOC.
7323
7324 * pairs.h, eval.c, gc.c, init.c, ioext.c, ports.c, ports.h,
7325 srcprop.h, tags.h, throw.c, unif.c: Added new selectors
7326 SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR and SCM_SETOR_CDR.
7327 Motivation: Safer use. Some other macros are defined in terms of
7328 these operations. If these are defined using the SCM_SETCXR
7329 (<e1>, SCM_CXR (<e1>) <op> <e2>) pattern a complex <e1> will lead
7330 to inefficiency and an <e1> with side-effects could potentially
7331 break. Also, these particular operations are heavily utilized in
7332 the garbage collector. In unoptimized code there will be a
7333 measurable speedup.
7334
7335 * alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
7336 eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
7337 ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
7338 pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
7339 procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
7340 strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
7341 vports.c: Cleaned up use of pairs: Don't make any special
7342 assumptions about the internal structure of selectors and
7343 mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
7344 SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
7345 (Among other things, this change makes it easier to build Guile
7346 with certain compilers which have problems with casted lvalues.)
7347
7348 Fri Oct 18 01:11:56 1996 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
7349
7350 * stacks.c: Improve selection of relevant stack frames when making
7351 a stack object. Introduce one level of indirection in the stack
7352 object to make it possible to "narrow" to a certain region of the
7353 stack. This facilitates making use of more clever algorithms (not
7354 implemented) for selecting relevant frames and gives a cleaner
7355 design since selection of frames can be done independently of
7356 extraction of frames from the real stack.
7357 (scm_stack_id): Also take #t as argument which means look at
7358 current stack.
7359
7360 * stacks.h: In struct scm_stack: Turn field frames into a pointer.
7361 Turn n_tail into an integer directly representing current number
7362 of frames in stack. Add field tail.
7363
7364 * ports.c (scm_port_line_x, scm_port_column_x): New mutators.
7365
7366 * debug.c (scm_make_memoized): Made it available at scheme level.
7367 (scm_unmemoize, scm_memoized_environment): Bugfix: Check for
7368 SCM_NIMP before applying heavier predicates in argument checking.
7369 (scm_local_eval): Also take memoized object as argument.
7370
7371 * backtrace.c (scm_display_error): Just a safety measure: Stacks
7372 aren't created with zero length, but should such a strange
7373 creature suddenly turn up...
7374
7375 Wed Oct 16 11:08:41 1996 Marius Vollmer <mvo@zagadka.ping.de>
7376
7377 * hashtab.h (scm_hashx_remove_x): Renamed `delete' parameter to
7378 `del', for the sake of C++ compilers. (Patch applied by JimB.)
7379
7380 Tue Oct 15 17:06:13 1996 Jim Blandy <jimb@floss.cyclic.com>
7381
7382 * variable.c (scm_make_variable): Make the name hint optional, as
7383 documented.
7384 (anonymous_variable_sym): Renamed from variable_sym. All uses
7385 changed.
7386
7387 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
7388 from scm_sys_try_load and scm_sys_try_load_path. The Scheme name
7389 of scm_primitive_load_path was also changed to
7390 "primitive-load-path", from "%try-load-path". Callers changed.
7391 We'd like to respect the convention that a function named
7392 "try-mumble" should behave just like the function called "mumble",
7393 but return #f instead of signalling some error.
7394 * load.h: Rename prototypes.
7395
7396 Tue Oct 15 05:34:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7397
7398 * print.c (make_print_state, grow_print_state), print.h: Modified
7399 the print state representation: Don't use a tail array for
7400 recording of circular references. Resizing of the print state
7401 structure invalidates the print state pointer. To avoid passing
7402 around an indirect print state reference to all printing
7403 functions, we instead let the print state reference a resizable
7404 vector.
7405
7406 Mon Oct 14 19:25:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
7407
7408 * alist.c (scm_sloppy_assq, scm_sloppy_assv, scm_sloppy_assoc):
7409 Don't crash when passed an improper list terminated by a
7410 non-immediate value.
7411
7412 Mon Oct 14 19:08:33 1996 Jim Blandy <jimb@floss.cyclic.com>
7413
7414 Allocate data for structures on an eight-byte boundary, as
7415 required by the tagging system.
7416 * struct.c (alloc_struct): New function.
7417 (scm_make_struct, scm_make_vtable_vtable): Call it.
7418 * struct.h (scm_struct_n_extra_words): Bump to 3.
7419 (scm_struct_i_ptr): New "field".
7420 * gc.c (scm_gc_sweep): When we need to free the data, use the
7421 information stored by alloc_struct to find the beginning of the
7422 block allocated to the structure, so we can free it.
7423
7424 Mon Oct 14 17:07:55 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7425
7426 * init.c (scm_boot_guile_1): Moved scm_init_struct in front of
7427 scm_init_stacks.
7428
7429 * debug.h (SCM_VOIDFRAME, SCM_VOIDFRAMEP): New macros.
7430 (scm_debug_info): New member: id.
7431
7432 * stacks.c: Stacks are now represented as structs; Stacks have an
7433 id given to them by `start-stack'.
7434 (scm_last_stack_frame): Added predicates `stack?' and `frame?'.
7435
7436 * stacks.h: Added declarations of scm_stack_p and scm_frame_p;
7437 Changed stack representation.
7438
7439 * debug.c (scm_procedure_name): Try procedure property `name' for
7440 compiled closures aswell.
7441
7442 * gc.c (scm_init_storage): Initialize scm_stand_in_procs to SCM_EOL.
7443
7444 * eval.c: scm_i_name moved to gsubr.c
7445 (scm_m_define): Record names of all kinds of procedure
7446 objects. (Earlier, only closures were recorded.)
7447
7448 * procprop.h: Added declaration of scm_i_name.
7449
7450 * gsubr.c: Added global scm_i_name. Added #include "procprop.h".
7451 (scm_make_gsubr): Record names of compiled closures.
7452
7453 Mon Oct 14 04:21:51 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7454
7455 * debug.c, debug.h: Removed obsolete code.
7456
7457 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
7458 stacks.c: Renamed regs --> scm_contregs.
7459
7460 * print.c (scm_free_print_state): Cleanup print state before
7461 returning it to pool. It is better to do it here than in
7462 scm_prin1 since scm_prin1 is called often.
7463
7464 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7465 s_set_source_property_x): Check that first argument is a pair or a
7466 memoized object.
7467
7468 * srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
7469 scm_i_line, scm_i_column and scm_i_breakpoint global.
7470
7471 * init.c: Added #include "backtrace.h" and #include "stacks.h".
7472 (scm_boot_guile_1): Added calls to scm_init_backtrace and
7473 scm_init_stacks.
7474
7475 * debug.h: Added debug object smob declaration and macro
7476 definitions.
7477
7478 * configure.in: Build with backtrace.o and stacks.o if debug
7479 support enabled.
7480
7481 * Makefile.in: Added entries for new files: backtrace.c,
7482 backtrace.h, stacks.c and stacks.h.
7483
7484 * symbols.c (scm_sym2ovcell): Fixed documentation.
7485
7486 * _scm.h (min, max): Added.
7487
7488 * async.c: Moved `min' macro to _scm.h.
7489
7490 * debug.h: New debug options SCM_BACKTRACE_MAXDEPTH and
7491 SCM_BACKTRACE_INDENT.
7492
7493 * eval.c: Added new debug options `maxdepth' and `indent'.
7494
7495 * print.c (make_print_state): Bugfix: Initialize pstate->ceiling.
7496
7497 * print.h: Added selector SCM_PRINT_STATE.
7498
7499 * print.c: New functions: scm_make_print_state,
7500 scm_free_print_state.
7501
7502 * print.h: Added declarations for scm_make_print_state,
7503 scm_free_print_state.
7504
7505 * debug.c (scm_m_start_stack): New acro.
7506
7507 * debug.h: Small cleanup.
7508
7509 * init.c (scm_boot_guile_1): Moved scm_init_debug below
7510 scm_init_eval.
7511
7512 Sun Oct 13 20:14:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
7513
7514 * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
7515 arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
7516 chars.c, chars.h, continuations.c, continuations.h, debug.c,
7517 debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
7518 eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
7519 filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
7520 gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
7521 hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
7522 kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
7523 markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
7524 objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
7525 ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
7526 procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
7527 root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
7528 simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
7529 stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
7530 strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
7531 struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
7532 unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
7533 version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
7534 declare functions with prototypes. (Patch thanks to Marius
7535 Vollmer.)
7536
7537 More prototype-related changes from Marius Vollmer:
7538 * gdb_interface.h: Wrapped header file in #ifdef/#endif
7539 * gscm.h (gscm_run_scm): Added prototype for `initfn' paramter.
7540 * ports.h (ptobfuns): Added prototypes. This means some casting in
7541 fports.c.
7542 * fports.c: Added casts for initializations, since the functions
7543 are defined to take FILE * as their stream argument, not SCM.
7544 * fdsocket.c, fdsocket.h: Made `init_addr_buffer' static.
7545 * genio.c (scm_gen_puts): Changed `unsigned char *str_data' parameter
7546 to `char *str_data' to conform to prototype.
7547
7548 Sat Oct 12 21:49:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7549
7550 * error.c, eval.c, load.c, stackchk.c: use scm_error not lgh_error.
7551
7552 * __scm.h (lgh_error): removed, lgh shouldn't be in libguile.
7553
7554 * stime.c, stime.h: use SCM_P method.
7555
7556 Sat Oct 12 16:16:25 1996 Jim Blandy <jimb@floss.cyclic.com>
7557
7558 * eval.c (scm_nconc2last): Don't accept an empty list; apply must
7559 be given at least two arguments. Insist that lst's last element
7560 be a list, but don't make any requirements of its predecessors.
7561
7562 Fri Oct 11 03:58:25 1996 Jim Blandy <jimb@floss.cyclic.com>
7563
7564 * eval.c (scm_nconc2last): Revert last change; there seems to be
7565 other stuff going on here.
7566
7567 Fri Oct 11 02:43:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
7568
7569 * eval.c (scm_nconc2last): Make sure that each element of lst
7570 (which is a list of argument lists, except for the tail) is a
7571 proper list, i.e., finite and terminated by '().
7572
7573 Thu Oct 10 21:09:13 1996 Jim Blandy <jimb@totoro.cyclic.com>
7574
7575 * unif.c (scm_ra_set_contp): Localize `inc' declaration.
7576 Clarifies flow.
7577
7578 * struct.c (scm_make_struct, scm_make_vtable_vtable): Use the
7579 symbolic name for the tag, scm_tc3_cons_gloc, instead of just
7580 saying "1".
7581
7582 * vectors.c (scm_make_vector): Fill vectors with the undefined
7583 value, to help make Guile Scheme code more portable to other
7584 Schemes.
7585
7586 * symbols.c (scm_intern_obarray_soft, scm_sysintern): Doc fixes.
7587 * symbols.h, tags.h: Doc fixes.
7588
7589 Wed Oct 9 19:39:29 1996 Jim Blandy <jimb@floss.cyclic.com>
7590
7591 * async.c (scm_take_signal): Doc fixes.
7592
7593 Mon Oct 7 22:30:34 1996 Jim Blandy <jimb@totoro.cyclic.com>
7594
7595 * numbers.c (scm_divbigint): When the remainder is zero, we don't
7596 want to subtract it from the modulus; we just want to leave it
7597 alone.
7598
7599 Mon Oct 7 00:14:17 1996 Mikael Djurfeldt <mdj@kenneth>
7600
7601 * init.c (scm_boot_guile_1): Bugfix: i --> base in argument to
7602 `scm_init_threads'.
7603
7604 * throw.h (scm_catch_apply): Removed the `lazyp' argument.
7605
7606 * throw.c (scm_catch_apply): Finished implementation of
7607 `lazy-catch'.
7608
7609 Sun Oct 6 05:26:05 1996 Gary Houston <ghouston@actrix.gen.nz>
7610
7611 * filesys.c (scm_sys_select): move SCM_ALLOW_INTS past the sreturn
7612 check.
7613 (scm_init_filesys): set "i/o-extensions" feature.
7614 include feature.h.
7615
7616 Sat Oct 5 12:22:00 1996 Jim Blandy <jimb@floss.cyclic.com>
7617
7618 * Makefile.in (root.o): Correct dependencies.
7619
7620 Sat Oct 5 18:40:42 1996 Mikael Djurfeldt <mdj@kenneth>
7621
7622 * Makefile.in: Added dependency entry for root.o.
7623
7624 * continuations.c, debug.[ch], eval.c, gscm.c init.c, root.c,
7625 throw.c: Renamed last_debug_info_frame -> scm_last_debug_frame.
7626
7627 * init.c (scm_start_stack): Set initial root continuation number
7628 to 0.
7629
7630 * procs.c: New function: scm_thunk_p.
7631
7632 * procs.h: Added declarations of scm_thunk_p.
7633
7634 * root.c: Renamed `call-with-new-root' -->
7635 `call-with-dynamic-root'.
7636 (cwdr): Removed allocation of new root state. This should be done
7637 separately by use of scm_make_root.
7638 (scm_apply_with_dynamic_root): New function: Does what it
7639 sounds like. Needed when spawning threads.
7640
7641 * root.h: Added member last_debug_frame to root state.
7642 Added #include "libguile/debug.h"
7643
7644 * throw.c: Renamed scm_catch --> scm_catch_apply and added more
7645 arguments. The motivation is that code in root.c needs catch
7646 functionality, and we want to avoid code duplication.
7647 New functions: scm_catch, scm_lazy_catch. These are wrappers for
7648 scm_catch_apply. scm_lazy_catch is intended to introduce catch
7649 handlers that run without popping the stack into the dynwind
7650 chain.
7651
7652 * throw.h: Added prototypes for scm_catch_apply and
7653 scm_lazy_catch.
7654
7655 Thu Oct 3 11:12:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7656
7657 * root.h (scm_root, scm_set_root): Decouple thread support details
7658 by introducing the selector SCM_THREAD_LOCAL_DATA and the mutator
7659 SCM_SET_THREAD_LOCAL_DATA.
7660
7661 * print.c (scm_iprlist): Bugfix: Added SCM_ECONSP tests in hare
7662 and tortoise scanning loop.
7663
7664 Thu Oct 3 00:04:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
7665
7666 * Makefile.in: Rebuild dependencies.
7667
7668 * libguile.h: #include "libguile/print.h" before "smob.h", since
7669 the latter uses the print_state structure.
7670
7671 * throw.c (scm_ithrow): Use the correct variable when checking to
7672 see if a given element of scm_dynwinds is a valid catch.
7673
7674 * throw.c (scm_ithrow): If scm_dynwinds has invalid list
7675 structure, abort; don't just silently ignore the garbage.
7676
7677 * _scm.h: #include "print.h" here, since it seems to be used just
7678 about everywhere.
7679 * eval.c, gdbint.c, genio.h, numbers.h, smob.h, srcprop.c,
7680 strports.c, unif.h: Don't #include "print.h".
7681
7682 Tue Oct 1 05:15:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7683
7684 * feature.h (scm_loc_features): Removed external declaration.
7685 (Bug fix suggested by Petr Adamek <adamek@mit.edu>.)
7686
7687 Tue Oct 1 00:00:10 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
7688
7689 * feature.c (scm_init_feature): Added threads feature (needs to be
7690 initialized here, since features doesn't exist when
7691 scm_init_threads is called).
7692
7693 * libguile.h: Added #include "libguile/../threads/threads.h".
7694 (This is a kludge to get thread support working. This should be
7695 fixed.)
7696
7697 * configure.in, acconfig.h: Added flags for thread support.
7698
7699 * scmsigs.c: Define `signal' to be `pthread_signal' if using
7700 mit-pthreads.
7701
7702 * gc.c (scm_igc): Added SCM_THREAD_CRITICAL_SECTION_START and
7703 SCM_THREAD_CRITICAL_SECTION_END. Moved marking of root data to
7704 root.c:mark_root.
7705
7706 * _scm.h: Added conditional #include "threads.h"
7707
7708 * __scm.h (SCM_ASYNC_TICK): Added call to macro
7709 SCM_THREADS_SWITCHING_CODE.
7710
7711 * init.c (scm_start_stack): Call `scm_make_root' to dynamically
7712 allocate the basic dynamic root object.
7713 (scm_boot_guile): Added call to scm_init_root.
7714
7715 * root.c, root.h: Added root smob.
7716 (cwdr, scm_call_with_new_root, scm_dynamic_root, scm_app_wdr): New
7717 functions: Implements dynamic roots mostly according to spec in
7718 SCM manual. Main difference is that the second argument is a
7719 throw handler rather than an error "thunk".
7720
7721 * root.h: Added declaration of scm_init_root.
7722
7723 * root.c: Added #include "genio.h", #include "smob.h", #include
7724 "pairs.h", #include "throw.h", #include "dynwind.h", #include
7725 "eval.h"
7726 (scm_init_root): Added #include "root.x".
7727
7728 * throw.c: Added #include "stackchk.h"
7729 (scm_catch): Changed SCM_DEFER_INTS --> SCM_REDEFER_INTS and
7730 SCM_ALLOW_INTS --> SCM_REALLOW_INTS. This is so that scm_catch
7731 can be used in scm_call_with_new_root; Added reenabling of stack
7732 checking when catching a throw.
7733
7734 Mon Sep 30 21:48:11 1996 Jim Blandy <jimb@totoro.cyclic.com>
7735
7736 * list.c, list.h: Use SCM_P instead of CPP hair. Doc fixes.
7737
7738 * list.c (scm_member, scm_memv, scm_memq): Return #f if a matching
7739 element is not found, as per R4RS.
7740
7741 Sat Sep 28 18:13:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
7742
7743 * list.c: Doc fixes throughout.
7744
7745 Sat Sep 28 02:07:43 1996 Gary Houston <ghouston@actrix.gen.nz>
7746
7747 * strings.c, strings.h: (scm_makfrom0str, scm_makefrom0str_opt:
7748 declare the char * to be const. Avoids a warning in rgx.c.
7749
7750 * ports.h: spelling fix.
7751
7752 * filesys.c (scm_sys_stat, scm_sys,lstat): include file name in
7753 error messages.
7754
7755 * load.c (scm_sys_try_load_path): throw an error if file not found
7756 (like it says it in NEWS).
7757
7758 Fri Sep 27 18:27:01 1996 Jim Blandy <jimb@totoro.cyclic.com>
7759
7760 * symbols.c (scm_intern_obarray_soft): Initialize the new symbol's
7761 PROPS slot to '(), not #f; it's an empty alist.
7762
7763 * throw.h, throw.c: Use SCM_P instead of #if hair.
7764
7765 Remove special support for uncaught throws; see throw.c for
7766 rationale.
7767 * throw.c (uncaught_throw): New function.
7768 (scm_ithrow): Call uncaught_throw if we don't find a throw
7769 target; don't mess with scm_bad_throw_vcell.
7770 (scm_bad_throw_vcell): Variable deleted.
7771 (scm_init_throw): Don't initialize it.
7772
7773 * throw.c (scm_ithrow): Don't let outer key matches shadow inner
7774 #t catches.
7775
7776 Wed Sep 25 04:35:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
7777
7778 * numbers.c (scm_istr2int): If the number is short (as most
7779 numbers are), just call scm_small_istr2int to deal with it.
7780 (scm_small_istr2int): New function, created by un-#ifdefing the
7781 non-bignum version of scm_istr2int and renaming it.
7782
7783 Tue Sep 24 06:48:38 1996 Gary Houston <ghouston@actrix.gen.nz>
7784
7785 * load.c (scm_sys_try_load): don't check whether value returned
7786 by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
7787 Change the Scheme name from %try-load to primitive-load.
7788
7789 * error.c (scm_error): convert a NULL message to SCM_BOOL_F.
7790 Can avoid passing a message, allowing it to be derived in the
7791 error handler (e.g., if we want to throw to the key both from
7792 Scheme and C).
7793
7794 Mon Sep 23 00:42:15 1996 Mikael Djurfeldt <mdj@kenneth>
7795
7796 * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
7797 references now have a new appearance which is more compact and
7798 also gives a clue about what the target of the reference is.
7799 By setting parameters in the print state, more fancy printing can
7800 be achieved. This is used by the (not yet commited) backtrace
7801 code.
7802
7803 Sun Sep 22 17:10:06 1996 Mikael Djurfeldt <mdj@kenneth>
7804
7805 * eval.c, numbers.h, unif.h, smob.h, srcprop.c: Added #include
7806 "print.h"
7807
7808 * print.c: Added #include "struct.h". Removed function
7809 scm_prlist.
7810
7811 * print.h: Modified prototypes for scm_iprlist, scm_prin1 and
7812 scm_iprin1. Removed prototype for scm_prlist.
7813
7814 * arbiters.c (prinarb),
7815 async.c (print_async),
7816 debug.c (prindebugobj, prinmemoized),
7817 eval.c (prinprom, prinmacro),
7818 filesys.c (scm_fd_print, scm_dir_print),
7819 kw.c (print_kw),
7820 mallocs.c (prinmalloc),
7821 numbers.c, numbers.h (scm_floprint, scm_bigprint),
7822 smob.h (scm_smobfuns),
7823 srcprop.c (prinsrcprops),
7824 throw.c (prinjb),
7825 unif.c, unif.h (scm_raprin1, rapr1),
7826 variable.c (prin_var): Changed argument `int writing' to
7827 `scm_print_state *pstate'.
7828
7829 * init.c (scm_boot_guile): Moved scm_init_struct upwards so
7830 that it will be called before scm_init_print.
7831
7832 * print.c (scm_prin1): Print states are now allocated when calling
7833 scm_prin1 and then passed around to all printing functions as an
7834 argument. A cache `print_state_pool' enables reuse of print
7835 states.
7836 (scm_make_print_state): New function.
7837 (scm_iprin1): Adaption to print states.
7838 (scm_iprlist): An initial "hare and tortoise" scan brings down
7839 time complexity to O (depth * N). (Better time complexity will be
7840 achieved when the printing code is completely rewritten.)
7841
7842 Fri Sep 20 22:01:36 1996 Jim Blandy <jimb@totoro.cyclic.com>
7843
7844 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): Use AC_CACHE_CHECK instead of
7845 AC_CACHE_VAL; #define UTIMBUF_NEEDS_POSIX outside AC_CACHE_VAL, so
7846 it gets done whether or not the cache variable has a value.
7847
7848 Thu Sep 19 17:06:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
7849
7850 Distinguish #f and ().
7851 * __scm.h: #undef SICP.
7852 * pairs.h (SCM_EOL): Delete this definition, equating it with
7853 SCM_BOOL_F.
7854 * tags.h (SCM_EOL): Give it a new definition here; I think I found
7855 the value it used to have. Doc fixes, too.
7856
7857 Thu Sep 19 15:33:51 1996 Mikael Djurfeldt <mdj@kenneth>
7858
7859 * struct.c (scm_make_struct_layout, init_struct, scm_struct_ref,
7860 scm_struct_set_x), struct.h, gc.c (scm_gc_mark): Completed Tom
7861 Lord's implementation of structs, allowing for tail arrays as
7862 described in the manual. Also fixed some bugs. (Both the interface
7863 and the implementation should be improved.)
7864
7865 * read.c (scm_init_read): Removed #ifdef READER_EXTENSIONS
7866
7867 * print.c, print.h: Closures now print like #<procedure foo (x)>.
7868 People who whish to see the source can do `(print-enable 'source)'.
7869 Removed #ifdef DEBUG_EXTENSIONS.
7870
7871 Thu Sep 19 00:00:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7872
7873 * filesys.c (scsm_sys_stat): don't SIGSEGV if argument is an
7874 integer (assuming for now accepting an integer is a good thing).
7875
7876 * error.c, fports.c: replace use of %S in lgh_error args with %s.
7877 %S will be used instead for write'ing arguments.
7878
7879 * unif.c (scm_transpose_array): change arguments in the SCM_WNA
7880 asserts. fix a few other asserts.
7881 (scm_aind, scm_enclose_array, scm_array_in_bounds_p,
7882 scm_uniform_vector_ref, scm_array_set_x,
7883 scm_dimensions_to_unform_array): change args in
7884 SCM_WNA SCM_ASSERTS and change scm_wta's to scm_wrong_num_args.
7885 strop.c (scm_substring_move_left_x, scm_substring_move_right_x,
7886 scm_substring_fill_x): likewise.
7887 gsubr.c (scm_gsubr_apply): likewise.
7888 eval.c (SCM_APPLY): likewise.
7889
7890 * eval.c (4 places): replace scm_everr with lgh_error or
7891 scm_wrong_num_args.
7892
7893 * error.c, error.h (scm_wrong_num_args, scm_wrong_type_arg,
7894 scm_memory_error): new procedures.
7895 scm_everr: deleted. can use scm_wta, dropping first two args.
7896 scm_error: convert NULL subr to SCM_BOOL_F.
7897
7898 * __scm.h: don't define SCM_STACK_OVFLOW, SCM_EXIT, SCM_ARG6, SCM_ARG7,
7899 SCM_ARGERR.
7900
7901 * stackchk.c (scm_report_stack_overflow): use lgh_error instead
7902 of scm_wta.
7903
7904 * error.c, error.h: new error keys: scm_arg_type_key,
7905 scm_args_number_key, scm_memory_alloc_key, scm_stack_overflow_key,
7906 scm_misc_error_key.
7907 scm_wta: reimplement using lgh_error instead of scm_everr.
7908
7909 Wed Sep 18 17:13:35 1996 Mikael Djurfeldt <mdj@kenneth>
7910
7911 * gdbint.c: scm_lread now has one more argument.
7912
7913 * ports.c, ports.h: Name change: scm_\(line\|column\)_number -->
7914 scm_port_\1; Added mutator scm_set_port_filename_x (used when
7915 loading source from non-file ports, which, e. g., happens when
7916 using the Emacs interface).
7917
7918 * fports.c (scm_open_file): Don't call scm_makfrom0str on a scheme
7919 object.
7920
7921 * read.c: Added code for recording of positions of source code
7922 expressions; New functions: recsexpr, scm_lreadrecparen;
7923 _scm_make_srcprops --> scm_make_srcprops
7924 (scm_flush_ws): Removed updating of positions counters. This work
7925 is already done by scm_gen_getc
7926
7927 * read.h: Added prototype for scm_lreadrecparen
7928
7929 * print.c: Added #include "alist.h"
7930
7931 * eval.c: Added #include "hash.h"
7932
7933 * eq.c: Added #include "ramap.h"
7934
7935 * options.c: Documentation fixes.
7936
7937 * srcprop.c (scm_finish_srcprop): Bugfix: update ptr.
7938 (scm_init_srcprop): Adjusted size of initial source-whash. Name
7939 changes: tc16_srcprops --> scm_tc16_srcprops, _scm_make_srcprops
7940 --> scm_make_srcprops
7941
7942 * srcprop.h: Name changes: tc16_srcprops --> scm_tc16_srcprops,
7943 _scm_make_srcprops --> scm_make_srcprops; Remove one layer of
7944 function calls in the definition of the whash access macros.
7945
7946 Tue Sep 17 11:33:16 1996 Lee Iverson <leei@Canada.AI.SRI.COM>
7947
7948 * init.c (scm_boot_guile): Add level of indirection to
7949 scm_boot_guile_1() to ensure that stack base pointer is properly
7950 initialized. There was no guarantee that variable i was the
7951 highest/lowest variable on stack (i.e. the call frame of
7952 scm_boot_guile was not completely protected from gc).
7953
7954 Tue Sep 17 01:40:56 1996 Gary Houston <ghouston@actrix.gen.nz>
7955
7956 * ports.h (scm_port_table): put back file_name, it will be used to
7957 support debugging. Undo related changes in fports.c, ioext.c,
7958 ports.c, gc.c.
7959
7960 Sun Sep 15 03:58:29 1996 Gary Houston <ghouston@actrix.gen.nz>
7961
7962 * ports.h (scm_port_table): remove file_name member for now, it seems
7963 undesirable.
7964 * fports.c (scm_open_file): don't set file_name in PTAB.
7965 (prinfport): don't use file_name in PTAB.
7966 * ioext.c (scm_sys_duplicate_port): don't set file_name in PTAB.
7967 * ports.c (scm_add_to_port_table): don't intialize file_name.
7968 (scm_port_file_name): remove for now.
7969 * gc.c (scm_gc_mark): don't mark PTAB file_name.
7970
7971 * fports.h (scm_mkfile): prototype deleted.
7972 * fports.c (scm_mkfile): merged into scm_open_file to simplify.
7973
7974 * debug.c, unif.c: use scm_out_of_range instead of
7975 wta for range errors (ASSERT still needs work).
7976
7977 * error.c, error.h (scm_out_of_range): new procedure.
7978
7979 * error.c, error.h (scm_out_of_range_key): new key.
7980
7981 * posix.c (scm_sync): #else was missing.
7982
7983 * error.c, error.h: append _key to names scm_num_overflow and
7984 scm_system_error.
7985
7986 * __scm.h (SCM_SYSMISSING, SCM_NUM_OVERFLOW): use SCM_BOOL_F instead
7987 of consing an empty list.
7988 (SCM_SYSERROR etc.): move into error.c, make them procedures instead
7989 of macros, saves code and string space.
7990 error.c, fports.c, numbers.c, posix.c, ioext.c, filesys.c, socket.c,
7991 fdsocket.c, simpos.c: change names of SCM_SYSERROR etc., to
7992 lower case. Rename scm_syserror_m to scm_syserror_msg.
7993 error.h: prototypes for new procedures.
7994
7995 Sat Sep 14 03:35:41 1996 Gary Houston <ghouston@actrix.gen.nz>
7996
7997 * numbers.c: use SCM_NUM_OVERFLOW instead of scm_wta or ASSERT.
7998
7999 * error.c, error.h: setup scm_num_overflow key.
8000
8001 * __scm.h: SCM_NUM_OVERFLOW: macro for reporting numerical overflow.
8002 Remove definition of SCM_OVSCM_FLOW.
8003
8004 * fports.c (scm_open_file): use SCM_SYSERROR_M.
8005
8006 * __scm.h: SCM_SYSERROR_M: new macro for system errors with an
8007 explicit message and args.
8008
8009 * error.c, error.h, __scm.h: change system_error_sym to
8010 scm_system_error.
8011
8012 * error.c (system_error_sym): remove leading %% from the Scheme name
8013 "%%system-error".
8014
8015 * __scm.h (SCM_SYSMISSING): Redefine using lgh_error.
8016
8017 Fri Sep 13 12:58:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8018
8019 * __scm.h, chars.c, debug.c, eval.c, eval.h, extchrs.c, extchrs.h,
8020 fdsocket.c, feature.c, mbstrings.c, mbstrings.h, numbers.c,
8021 numbers.h, print.c, scmhob.h, simpos.h, symbols.c, symbols.h,
8022 tags.h, throw.c, variable.h: Name cleanup. Lots of xxxSCM_yyy
8023 renamed. (These were introduced by unsupervised name
8024 substitution.)
8025
8026 Fri Sep 13 01:19:08 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8027
8028 * print.c: Added code for detection of circular references during
8029 printing. (init_ref_stack, grow_ref_stack): New functions. Added
8030 a hook for printing of closures (accessible via print options).
8031 This leads to a split of calls to scm_iprin1 into two classes:
8032 elementary print operations (e. g. the code which prints a smob)
8033 still use scm_iprin1 while top level calls (like scm_display) use
8034 scm_prin1. scm_prin1 begins by clearing the data structure used
8035 to record reference information.
8036
8037 * print.h: Added declarations of scm_prin1 and scm_prlist.
8038
8039 * strports.c (scm_strprint_obj): scm_iprin1 --> scm_prin1
8040
8041 * gscm.c (gscm_portprint_obj): scm_iprin1 --> scm_prin1
8042
8043 * gscm.h (gscm_print_obj): scm_iprin1 --> scm_prin1
8044
8045 * error.c (err_head): scm_iprin1 --> scm_prin1
8046
8047 * debug.c: Adjusted header comment.
8048
8049 * tags.h: Typo.
8050
8051 Wed Sep 11 17:55:59 1996 Jim Blandy <jimb@totoro.cyclic.com>
8052
8053 * strerror.c: Doc fix.
8054
8055 Thu Sep 12 00:00:32 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8056
8057 * gdbint.c (gdb_read): Now possible to run during GC.
8058 (unmark_port, remark_port): New functions.
8059
8060 * symbols.h (SCM_SETLENGTH): Use SCM_SETCAR.
8061
8062 * read.c (scm_grow_tok_buf): Use scm_vector_set_length_x instead
8063 of allocating a new string object. Also, increase size by
8064 the factor 2 instead of 1.5.
8065
8066 Wed Sep 11 15:10:38 1996 Petr Adamek <jimb@floss.cyclic.com>
8067
8068 * __scm.h (SCM_P): Corrected to run under traditional C.
8069
8070 * _scm.h (SCM_PROC): Extraneous semicolon (outside functions)
8071 removed.
8072
8073 * async.c: Calls to scm_sysintern corrected.
8074
8075 * async.h (scm_async_clock): Redundant declaration removed.
8076
8077 * continuations.c (scm_dynthrow): Redundant declaration removed.
8078
8079 * debug.c (scm_single_step, scm_memoized, scm_lookup_soft):
8080 Definition typos corrected.
8081
8082 * debug.h: Missing declarations of functions in debug.c added
8083 (lots).
8084
8085 * eval.h (scm_eval_args, scm_deval_args, scm_m_undefine):
8086 Missing declarations to functions in eval.c added.
8087
8088 * filesys.c: Possibly uninitialized variable rv.
8089
8090 * gc.h (scm_object_addr, scm_unhash_name): Missing
8091 declarations of functions defined in gc.c added.
8092
8093 * genio.c: Possible typos str_data -> wstr_data. ???
8094
8095 * genio.c: Possibly unintended shadowing of local variable
8096 `int c' (gotos out of scope of inner `c'). ???
8097
8098 * init.c: Uninitialized `SCM last' may be used.
8099
8100 * ioext.h: (scm_sys_isatty_p): Typo.
8101
8102 * list.h (scm_list_head): Missing prototype for function in
8103 list.c added.
8104
8105 * numbers.c (scm_two_doubles): Changed from extern to static
8106 (is used only within numbers.c).
8107
8108 * numbers.h: Repeated declarations removed.
8109
8110 * ports.h (scm_close_all_ports_except): Declaration for the
8111 function defined in ports.c added.
8112
8113 * posix.h: Missing declarations added.
8114
8115 * procs.h (scm_make_subr_opt): Missing declaration added.
8116
8117 * socket.h (scm_sys_gethost): Missing declaration added.
8118
8119 * socket.h: Redundant declarations removed (they are in fdsocket.h).
8120
8121 * srcprop.h (scm_set_source_property_x, scm_finish_srcprop):
8122 Missing declarations added.
8123
8124 * stime.h (scm_get_internal_real_time): Repeated declarations removed.
8125
8126 * struct.c: Uninitialized variable `SCM answer' may be used.
8127
8128 * unif.c (l2ra): Declaration prototype.
8129
8130 * unif.c (scm_array_equal_p): Dummy definition removed (it is
8131 defined in ramap.c).
8132
8133 * unif.h (scm_raprin1, scm_istr2bve, scm_array_equal_p):
8134 Redundant declarations removed (they are in ramap.h).
8135
8136 * variable.h (scm_make_udvariable,
8137 scm_make_undefined_variable): Declaration corrected to
8138 correspond variable.c.
8139
8140 * vectors.h (scm_vector_move_left_x, scm_vector_move_right_x):
8141 Missing declarations added.
8142
8143 Wed Sep 11 14:38:50 1996 Jim Blandy <jimb@floss.cyclic.com>
8144
8145 * Makefile.in (distclean): Don't forget to delete fd.h.
8146
8147 Tue Sep 10 14:01:46 1996 Jim Blandy <jimb@floss.cyclic.com>
8148
8149 * fd.h.in, tags.h: Trivial cleanups.
8150
8151 * marksweep.c, marksweep.h: Deleted; marksweep.c was empty, and
8152 marksweep.h just declared functions from gc.c.
8153 * gc.h, libguile.h: Don't #include "marksweep.h".
8154 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
8155 marksweep.o, marksweep.h, marksweep.c, and marksweep.x. Other
8156 dependencies updated.
8157
8158 * libguile.h: Don't #include "files.h"; it's been deleted.
8159
8160 * files.c (scm_sys_delete_file): Moved to filesys.c.
8161 File is now empty; deleted.
8162 * files.h: Deleted.
8163 * filesys.c: scm_sys_delete_file is now here. Remove
8164 #if's; they seem to rely on remnants of an old portability
8165 regimen. If the problems come up again, solve them properly,
8166 using autoconf. Specifically: Don't test M_SYSV, and #define
8167 remove to be unlink if it's #defined; don't use remove just
8168 because HAVE_STDC_HEADERS is #defined.
8169 * filesys.h: Add declarations for scm_sys_delete_file.
8170 * Makefile.in (libobjs, inner_h_files, c_files, gen_c_files): Omit
8171 files.o, files.h, files.c, and files.x.
8172 * init.c: Don't #include "files.h", and don't call scm_init_files.
8173
8174 Use SCM_P instead of PROTO; the latter intrudes on the user's
8175 namespace.
8176 * params.h: Deleted; definition of SCM_P moved to...
8177 * __scm.h: ... here, where it replaces PROTO macro.
8178 * libguile.h, smob.h: Don't #include "params.h".
8179 * continuations.c, error.h, feature.h, gc.c, gc.h, init.h, load.h,
8180 smob.h: Fix prototypes accordingly.
8181 * Makefile.in: Update dependencies.
8182 (inner_h_files): Remove params.h.
8183
8184 * gc.c: #include "gc.h"; every module should include its header,
8185 to let the compiler cross-check the declarations against the
8186 definitions.
8187
8188 * eq.h, files.h, hashtab.h, load.h, mallocs.h, scmsigs.h,
8189 simpos.h: #include "libguile/__scm.h".
8190
8191 Mon Sep 9 20:00:15 1996 Jim Blandy <jimb@floss.cyclic.com>
8192
8193 * init.c: Don't forget to #include smob.h and init.h.
8194 * Makefile.in: Dependencies updated.
8195
8196 * smob.h: Use PROTO instead of #if __STDC__.
8197
8198 * continuations.c (scm_dynthrow): Use PROTO, not SCM_P.
8199
8200 * __scm.h: Doc fixes.
8201
8202 * __scm.h, libguile.h: Use "quotes" in the #includes, not
8203 <angles>; this allows `make depends' to work properly.
8204
8205 * libguile.h: #include smob.h and pairs.h before the others; they
8206 define typedefs used by other headers.
8207
8208 C files should #include only the header files they need, not
8209 libguile.h (which #includes all the header files); the pointless
8210 recompilation was wasting my time.
8211 * Makefile.in (all .o dependency lists): Regenerated.
8212 * libguile.h: Don't try to get a definition for size_t here...
8213 * __scm.h: Do it here.
8214 * _scm.h: Since this is the internal libguile header, put things
8215 here that all (or a majority) of the libguile files will want.
8216 Don't #include <libguile.h> here; that generates dependencies on
8217 way too much. Instead, get "__scm.h", "error.h", "pairs.h",
8218 "list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h",
8219 "boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and
8220 "async.h".
8221 * alist.c: Get "eq.h", "list.h", "alist.h".
8222 * append.c: Get "append.h", "list.h".
8223 * arbiters.c: Get "arbiters.h", "smob.h".
8224 * async.c: Get "async.h", "smob.h", "throw.h", "eval.h".
8225 * boolean.c: Get "boolean.h".
8226 * chars.c: Get "chars.h".
8227 * continuations.c: Get "continuations.h", "dynwind.h", "debug.h",
8228 "stackchk.h".
8229 * debug.c: Get "debug.h", "feature.h", "read.h", "strports.h",
8230 "continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h",
8231 "genio.h", "throw.h", "eval.h".
8232 * dynwind.c: Get "dynwind.h", "alist.h", "eval.h".
8233 * eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h",
8234 "stackchk.h".
8235 * error.c: Get "error.h", "throw.h", "genio.h", "pairs.h".
8236 * eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h",
8237 "hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h",
8238 "continuations.h", "eq.h", "sequences.h", "alist.h", "append.h",
8239 "debug.h".
8240 * fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h".
8241 * feature.c: Get "feature.h".
8242 * files.c: Get "files.h".
8243 * filesys.c: Get "filesys.h", "smob.h", "genio.h".
8244 * fports.c: Get "fports.h", "markers.h".
8245 * gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h",
8246 "genio.h", "struct.h", "stackchk.h", "stime.h".
8247 * gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h",
8248 "read.h", "strports.h", "tag.h".
8249 * genio.c: Get "genio.h", "chars.h".
8250 * gsubr.c: Get "gsubr.h", "genio.h".
8251 * hash.c: Get "hash.h", "chars.h".
8252 * hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h".
8253 * init.c: Get everyone who has an scm_init_mumble function:
8254 "weaks.h", "vports.h", "version.h", "vectors.h", "variable.h",
8255 "unif.h", "throw.h", "tag.h", "symbols.h", "struct.h",
8256 "strports.h", "strorder.h", "strop.h", "strings.h", "stime.h",
8257 "stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h",
8258 "scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h",
8259 "print.h", "posix.h", "ports.h", "pairs.h", "options.h",
8260 "objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h",
8261 "list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h",
8262 "gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h",
8263 "feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h",
8264 "dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h",
8265 "async.h", "arbiters.h", "append.h", "alist.h".
8266 * ioext.c: Get "ioext.h", "fports.h".
8267 * kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h".
8268 * list.c: Get "list.h", "eq.h".
8269 * load.c: Get "load.h", "eval.h", "read.h", "fports.h".
8270 * mallocs.c: Get "smob.h", "genio.h".
8271 * markers.c: Get "markers.h".
8272 * mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h",
8273 "chars.h".
8274 * numbers.c: Get "unif.h", "genio.h".
8275 * objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h".
8276 * options.c: Get "options.h".
8277 * ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h",
8278 "markers.h", "chars.h", "genio.h".
8279 * posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h",
8280 "read.h", "scmsigs.h", "genio.h", "fports.h".
8281 * print.c: Get "print.h", "unif.h", "weaks.h", "read.h",
8282 "procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h",
8283 "chars.h".
8284 * procprop.c: Get "procprop.h", "eval.h", "alist.h".
8285 * procs.c: Get "procs.h".
8286 * ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h",
8287 "chars.h", "smob.h", "unif.h".
8288 * read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h",
8289 "eval.h", "genio.h", "chars.h".
8290 * root.c: Get "root.h", "stackchk.h".
8291 * scmsigs.c: Get "scmsigs.h".
8292 * sequences.c: Get "sequences.h".
8293 * simpos.c: Get "simpos.h", "scmsigs.h".
8294 * smob.c: Get "smob.h".
8295 * socket.c: Get "socket.h", "feature.h".
8296 * srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h",
8297 "alist.h", "smob.h".
8298 * stackchk.c: Get "stackchk.h", "genio.h".
8299 * stime.c: Get "stime.h"."libguile/continuations.h".
8300 * strings.c: Get "strings.h", "chars.h".
8301 * strop.c: Get "strop.h", "chars.h".
8302 * strorder.c: Get "strorder.h", "chars.h".
8303 * strports.c: Get "strports.h", "print.h", "eval.h", "unif.h".
8304 * struct.c: Get "struct.h", "chars.h".
8305 * symbols.c: Get "symbols.h", "mbstrings.h", "alist.h",
8306 "variable.h", "eval.h", "chars.h".
8307 * tag.c: Get "tag.h", "struct.h", "chars.h".
8308 * throw.c: Get "throw.h", "continuations.h", "debug.h",
8309 "dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h".
8310 * unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h",
8311 "smob.h", "genio.h", "eval.h", "chars.h".
8312 * variable.c: Get "variable.h", "smob.h", "genio.h".
8313 * vectors.c: Get "vectors.h", "eq.h".
8314 * version.c: Get "version.h".
8315 * vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h".
8316 * weaks.c: Get "weaks.h".
8317
8318 * stackchk.h: #include "libguile/debug.h",
8319
8320 * print.h, read.h: #include "options.h", since everyone who uses
8321 either of these files will need that.
8322
8323 * smob.h: #include "ports.h", "genio.h", and "print.h", since
8324 anyone who uses this file will need them to define the smob
8325 printing functions. Also, get markers.h, since people will need
8326 to #define the mark functions.
8327
8328 * smob.h (scm_ptobfuns, SCM_PTOBNUM): Definitions moved...
8329 * ports.h: ... to here.
8330
8331 * ports.h (scm_port_table_size): Explicitly give type as 'int';
8332 don't rely on archaic C default type rules.
8333
8334 * fports.h: #include "libguile/ports.h", since you need that in
8335 order to parse this.
8336
8337 * genio.h: #include "libguile/print.h", because you need that to
8338 parse this; don't bother #including "ports.h", since print.h gets
8339 that.
8340
8341 * error.h: Don't #include "pairs.h"; _scm.h will do that now.
8342
8343 * eval.h (scm_top_level_lookup_thunk_var): Remove declaration for
8344 this; it's now a reference to an element of *scm_root.
8345
8346 * debug.h: Don't #include "options.h"; the compiler won't be able
8347 to find that once the headers are installed; instead, #include
8348 "libguile/options.h".
8349 * gc.h: Same, with marksweep.h.
8350 * mbstrings.h: Same, with symbols.h.
8351 * scmhob.h: Same, with _scm.h.
8352 * smob.h: Same, with params.h.
8353
8354 * Makefile.in (depends): Don't nuke scmconfig.h and the generated
8355 C files; there's no need for this, and it forces recompilations
8356 unnecessarily.
8357
8358 Sat Sep 7 06:57:23 1996 Gary Houston <ghouston@actrix.gen.nz>
8359
8360 * error.c (scm_error): declare scm_error_callback.
8361
8362 * error.h: prototype for scm_error_callback.
8363
8364 * __scm.h: define lgh_error.
8365 (SCM_SYSERROR): redefine using lgh_error.
8366
8367 Thu Sep 5 22:40:06 1996 Gary Houston <ghouston@actrix.gen.nz>
8368
8369 * error.c (scm_error): new procedure.
8370
8371 * error.h: prototype for scm_error.
8372
8373 * Makefile.in (install): install scmconfig.h from the current
8374 directory, not $(srcdir).
8375
8376 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
8377
8378 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
8379 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
8380 feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
8381 hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
8382 mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
8383 posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
8384 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
8385 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8386 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
8387 vports.h, weaks.h: #include "libguile/__scm.h", not
8388 <libguile/__scm.h>. This allows 'gcc -MM' to determine which
8389 dependencies are within libguile properly.
8390
8391 Thu Sep 5 11:38:07 1996 Jim Blandy <jimb@floss.cyclic.com>
8392
8393 * Makefile.in (.c.x): Simplify; there's no need to run this rule
8394 when scmconfig.h doesn't exist.
8395
8396 * load.c (scm_sys_try_load): Correct spelling.
8397
8398 * feature.c (scm_loc_features): Make this static.
8399
8400 * Makefile.in (libpath.h): Omit trailing slash from path. We
8401 shouldn't require it of users, so why put it here?
8402
8403 Move code to initialize and search %load-path from ice-9 to C
8404 code, so we can use the load-path to find the ice-9 boot code;
8405 this makes it easier to run Guile without installing it. See
8406 corresponding changes in guile/Makefile.in.
8407 * feature.c: Move stuff concerned with the load path to load.c.
8408 (scm_compiled_library_path): Deleted.
8409 Don't #include libpath.h here.
8410 * feature.h: Don't mention scm_compiled_library_path.
8411 * load.c: #include "libpath.h" here, as well as <sys/types.h>,
8412 <sys/stat.h>, and <unistd.h> (if present).
8413 (R_OK): #define if the system hasn't deigned to.
8414 (scm_loc_load_path): New variable.
8415 (scm_init_load_path, scm_sys_search_load_path,
8416 scm_sys_try_load_path): New functions.
8417 (scm_init_load): Initialize scm_loc_load_path to point to the
8418 value cell of the Scheme %load-path variable.
8419 * load.h: Add declarations for scm_sys_search_load_path,
8420 scm_sys_try_load_path.
8421 * init.c: Call scm_init_load_path.
8422 * Makefile.in (feature.o, load.o): Dependencies updated.
8423
8424 * load.c, load.h: Rewrite using PROTO macro.
8425
8426 Thu Sep 5 01:54:33 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8427
8428 * gc.c (scm_cellp): New function: C predicate to determine if an
8429 SCM value can be regarded as a pointer to a cell on the heap.
8430
8431 * gc.h: Added declaration of scm_cellp.
8432
8433 * gdb_interface.h: New file: The GDB interface header from the GDB
8434 distribution.
8435
8436 * gdbint.c: New file: GDB interface.
8437
8438 * gdbint.h: New file: GDB interface.
8439
8440 * libguile.h: Added #include <libguile/gdbint.h>.
8441
8442 * init.c (scm_boot_guile): Added scm_init_gdbint.
8443
8444 * Makefile.in: Added gdb_interface.h, gdbint.[hc].
8445 Added -I.. to INCLUDE_CFLAGS (otherwise the include files won't be
8446 found if object files and source are kept separate).
8447
8448 Wed Sep 4 14:35:02 1996 Jim Blandy <jimb@floss.cyclic.com>
8449
8450 * feature.h, feature.c: Use PROTO macro, instead of #if __STDC__.
8451
8452 Wed Sep 4 01:30:47 1996 Jim Blandy <jimb@totoro.cyclic.com>
8453
8454 * configure.in: Don't substitute the values of TCL_SRC_DIR and
8455 TK_SRC_DIR; they're not relevant any more.
8456
8457 * Makefile.in (CC): Don't list -Wall here; it's a GCC-specific flag.
8458 * configure.in: Instead, put it in CFLAGS here, iff we're using GCC.
8459
8460 Wed Sep 4 00:55:49 1996 Jim Blandy <jimb@floss.cyclic.com>
8461
8462 * PLUGIN/guile.config (xtra_cflags): Include .. in the header
8463 search path, so we can find the <libguile/MUMBLE.h> headers.
8464
8465 * Makefile.in (ancillary): List aclocal.m4, for 'make dist'.
8466
8467 * Makefile.in (ALL_CFLAGS): Don't mention CFLAGS here; it's
8468 implicit in the .c.o rule.
8469 (.c.x): Don't mention ALL_CFLAGS here; its value is included in
8470 $(CC) already.
8471
8472 Put the library path in a header file, instead of passing it on
8473 the command line in every compilation.
8474 * Makefile.in (libpath.h): New target.
8475 (feature.o): Depend on libpath.h.
8476 (clean): Delete libpath.h.
8477 (ALL_CFLAGS): Don't use -DLIBRARY_PATH here. Instead ...
8478 * feature.c: ... #include "libpath.h" here.
8479 * .cvsignore: Ignore libpath.h.
8480
8481 Don't install the unwashed masses of Guile header files in the
8482 main #include path; put most of them in a subdirectory called
8483 'libguile'. This avoids naming conflicts between Guile header
8484 files and system header files (of which there were a few).
8485 * Makefile.in (pkgincludedir): Deleted.
8486 (innerincludedir): New variable; this and $(includedir) are enough.
8487 (INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
8488 (installed_h_files): Divide this up. Now this variable lists
8489 those header files which should go into $(includedir) (i.e. appear
8490 directly in the #include path), and ...
8491 (inner_h_files): ... this new variable says which files appear in
8492 a subdirectory, and are referred to as <libguile/mumble.h>.
8493 (h_files): List them both.
8494 (install): Create innerincludedir, not pkgincludedir. Put
8495 the installed_h_files and inner_h_files in their proper places.
8496 (uninstall): Corresponding changes.
8497 * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
8498 continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
8499 feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
8500 ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
8501 mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
8502 print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
8503 sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
8504 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8505 tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
8506 vports.h, weaks.h: Find __scm.h in its new location.
8507 * __scm.h: Find scmconfig.h and tags.h in their new locations
8508 (they're both "inner" files).
8509
8510 Tue Sep 3 20:27:35 1996 Jim Blandy <jimb@floss.cyclic.com>
8511
8512 * Makefile.in (.c.x): Remove duplicate use of $(ALL_CFLAGS).
8513
8514 Tue Sep 3 19:53:00 1996 Jim Blandy <jimb@totoro.cyclic.com>
8515
8516 * posix.c: Doc fixes.
8517
8518 Mon Sep 2 15:22:40 1996 Jim Blandy <jimb@totoro.cyclic.com>
8519
8520 * socket.c: Don't include a prototype for inet_aton; just use a
8521 K&R style declaration, to avoid warnings but minimize the chance
8522 of conflicts with the system.
8523
8524 On NextStep, <utime.h> doesn't define struct utime, unless we
8525 #define _POSIX_SOURCE before #including it.
8526 * aclocal.m4 (GUILE_STRUCT_UTIMBUF): New test.
8527 * acconfig.h: New comment text for above CPP symbol.
8528 * configure.in: Call it.
8529 * posix.c: #define _POSIX_SOURCE if it seems necessary.
8530
8531 * configure.in (AC_CHECK_HEADERS): Include sys/utime.h and utime.h
8532 in the list.
8533 * posix.c: Check HAVE_SYS_UTIME_H and HAVE_UTIME_H, instead of
8534 testing for __EMX__.
8535
8536 * posix.c: #include <libc.h>, if it exists.
8537
8538 * posix.c: Cast the return result to GETGROUPS_T, not gid_t; we
8539 don't even know if the latter exists.
8540
8541 * posix.c (s_sys_setpgid, s_sys_setsid, s_sys_ctermid,
8542 s_sys_tcgetpgrp, s_sys_tcsetpgrp): Renamed from s_setpgid,
8543 s_setsid, s_ctermid, s_tcgetpgrp, s_tcsetpgrp, for consistency.
8544
8545 * posix.c (R_OK, W_OK, X_OK, F_OK): #define these if the system's
8546 header files don't.
8547 (scm_init_posix): Use them when initializing the Scheme constants
8548 of the same name.
8549
8550 Fri Aug 30 16:01:30 1996 Jim Blandy <jimb@floss.cyclic.com>
8551
8552 * Makefile.in (libdir, includedir, bindir): Use the
8553 autoconf-supplied values, instead of deriving them ourselves.
8554 (pkgincludedir, datadir, pkgdatadir): New variables.
8555 (install, uninstall): Put the header files in a special
8556 subdirectory, not in the main search path.
8557
8558 * Makefile.in (ALL_CFLAGS): Provide the proper value for
8559 LIBRARY_PATH --- use $(pkgdatadir) instead of $(libdir).
8560
8561 * Makefile.in (IMPLPATH): Deleted; never used.
8562
8563 * Makefile.in (TCL_SRC_DIR, TK_SRC_DIR): Deleted; we don't depend
8564 on the Tcl/Tk source any more.
8565 (INCLUDE_CFLAGS): Remove references to the above.
8566
8567 * Makefile.in (version.o): Corrected dependencies.
8568
8569 Thu Aug 29 23:06:19 1996 Thomas Morgan <tmorgan@gnu.ai.mit.edu>
8570
8571 * libguile.h: #include "version.h"
8572
8573 * init.c (scm_boot_guile): Call scm_init_version.
8574 * gscm.c (gscm_run_scm): Call scm_init_version.
8575
8576 * configure.in (GUILE_MAJOR_VERSION, GUILE_MINOR_VERSION,
8577 GUILE_VERSION): AC_DEFINE these.
8578 (acconfig.h): #undef the above symbols.
8579
8580 * Makefile.in (libobjs): Add version.o.
8581 (installed_h_files): Add version.h.
8582 (c_files): Add version.c.
8583 (gen_c_files): Add version.x.
8584 (version.o): New rule.
8585 (alist.o, append.o, appinit.o, arbiters.o, async.o, boolean.o,
8586 chars.o, continuations.o, dynwind.o, eq.o, error.o, eval.o,
8587 fdsocket.o, feature.o, files.o, filesys.o, fports.o, gc.o,
8588 genio.o, gsubr.o, hash.o, hashtab.o, init.o, kw.o, list.o, load.o,
8589 mallocs.o, markers.o, marksweep.o, mbstrings.o, numbers.o,
8590 objprop.o, pairs.o, ports.o, posix.o, print.o, procprop.o,
8591 procs.o, ramap.o, read.o, root.o, scmsigs.o, sequences.o,
8592 simpos.o, smob.o, socket.o, stackchk.o, stime.o, strings.o,
8593 strop.o, strorder.o, strports.o, struct.o, symbols.o, tag.o,
8594 throw.o, unif.o, variable.o, vectors.o, version.o, vports.o,
8595 weaks.o): Add version.h to dependency lists.
8596 (markers.o): Remove duplicate rule.
8597
8598 * version.h: New file.
8599
8600 * version.c: New file.
8601
8602 Thu Aug 29 15:21:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
8603
8604 * symbols.c (scm_strhash): scm_downcase is now a function, not an
8605 array; use it appropriately. Since GCC is quite happy to
8606 subscript functions, it never warned us about this; we should use
8607 -Wpointer-arith in the future. I guess we never tested
8608 case-insensitivity.
8609
8610 Wed Aug 28 18:52:22 1996 Jim Blandy <jimb@totoro.cyclic.com>
8611
8612 * socket.c: Doc and copyright fixes.
8613
8614 Sat Aug 24 05:29:19 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8615
8616 * debug.c: Fixed and improved gdb support.
8617
8618 Fri Aug 23 18:00:16 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8619
8620 * socket.c: Added declaration of inet_aton to avoid compiler
8621 warning. (Hope this solution is correct.)
8622
8623 * stime.c: Added declaration of ftime. (This is missing in
8624 Solaris 2 headers.)
8625
8626 Fri Aug 23 02:03:32 1996 Gary Houston <ghouston@actrix.gen.nz>
8627
8628 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
8629
8630 * Makefile.in (c_files): add strerror.c.
8631
8632 * strerror.c: new file from Emacs' sysdep.c.
8633 maybe configure should also check for sys_errlist.
8634
8635 * configure.in (AC_REPLACE_FUNCS): add strerror.
8636
8637 Fri Aug 23 03:02:46 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8638
8639 * debug.c (scm_init_debug): Added initialization for
8640 scm_evaluator_traps.
8641
8642 * debug.h, debug.c: Various name changes.
8643 (Mostly prefixing with SCM_.) Renamed "debug-options" -->
8644 "debug-options-interface". See commentary in options.c.
8645
8646 * options.h, options.c: Options now have documentation strings.
8647 Also added a long explanatory commentary.
8648
8649 * eval.c, print.h, print.c, read.h, read.c: Modifications to
8650 run-time options.
8651
8652 * gscm.c, init.c, root.c, throw.c: Bug fixes:
8653 last_debug_info_frame is now updated in all cases.
8654
8655 * __scm.h, stackchk.h, stackchk.c: Guile now performs stack
8656 checking.
8657
8658 Thu Aug 22 17:34:17 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
8659
8660 * __scm.h: SCM_STACK_LIMIT removed (now a run-time option).
8661 Added option STACK_CHECKING.
8662
8663 Tue Aug 20 18:48:40 1996 Mikael Djurfeldt <djurfeldt@nada.kth.se>
8664
8665 * Makefile.in: Added {debug,options,srcprop}.{h,c}
8666
8667 * __scm.h: Removed symbols for debugging support.
8668
8669 * acconfig.h: Added symbols for debugging support.
8670
8671 * configure.in: Added user option for debugging support.
8672 --enable-debug will include the debugging code into libguile.a.
8673
8674 * continuations.c (scm_make_cont): Enlarged the #if 0 around
8675 scm_relocate_chunk_to_heap.
8676
8677 * debug.c: New file: low-level debugging support. It also
8678 includes support for debugging with gdb. (The extensions to gdb
8679 are written by Per Bothner at Cygnus.)
8680
8681 * debug.h: New file: low-level debugging support.
8682
8683 * eval.c: scm_m_set and SCM_IM_SET no longer supports multiple
8684 argument pairs. Extensive modifications to the debugging
8685 evaluator. Added "SECTION:" commentaries to clarify what happens
8686 when, during double compilation. Renamed EVALIMP --> EVALIM.
8687 Renamed EVAL --> XEVAL. Removed function evalcar. Defined
8688 evalcar to scm_eval_car. Added explanation of "EVAL" symbols to
8689 the beginning of the file. New procedure: scm_unmemocopy.
8690 Added some global state variables needed by the debugging
8691 evaluator: scm_ceval_ptr, last_debug_info_frame, debug_mode,
8692 check_entry, check_apply, check_exit, debug_options and
8693 evaluator_traps. New acro: undefine.
8694
8695 * eval.h: Renamed EVAL --> XEVAL.
8696
8697 * gc.c (scm_init_storage): Renamed scm_make_weak_hash_table
8698 --> scm_make_weak_key_hash_table.
8699
8700 * init.c (scm_restart_stack, scm_boot_guile): Added initialization
8701 of SCM_DFRAME. Added calls to scm_init_{debug,options,srcprop}.
8702
8703 * libguile.h: Conditionally include debug.h
8704
8705 * objprop.c (scm_object_properties, scm_set_object_properties_x):
8706 scm_object_properties shouldn't return handle. `handle' now gets
8707 initialized in scm_set_object_properties_x. scm_object_properties
8708 doesn't any longer create an entry in scm_object_whash.
8709
8710 * options.c: New file: handling of run time options.
8711
8712 * options.h: New file: handling of run time options.
8713
8714 * posix.c (scm_getpgrp): Cast pointer to getpgrp.
8715
8716 * print.c: New procedure: scm_print_options
8717
8718 * print.h: Defines for print options.
8719
8720 * read.c: New procedure: scm_read_options
8721
8722 * read.h: Defines for reader options.
8723
8724 * root.h: Added scm_source_whash among scm_sys_protects.
8725
8726 * srcprop.c: New file: source properties.
8727
8728 * srcprop.h: New file: source properties.
8729
8730 * throw.c (jbsmob): Jump buffers are now correctly allocated.
8731 (Bug found by A. Green.)
8732
8733 * weak.c: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
8734
8735 * weak.h: Renamed scm_weak_hash_table --> scm_weak_key_hash_table.
8736
8737 Thu Aug 15 02:05:14 1996 Jim Blandy <jimb@totoro.cyclic.com>
8738
8739 * libguile.h: #include "objprop.h"; I guess this was forgotten.
8740
8741 * init.c (scm_boot_guile): Don't call scm_init_rgx; it's a plugin,
8742 and should be called by the final client.
8743
8744 Wed Aug 14 21:41:37 1996 Jim Blandy <jimb@totoro.cyclic.com>
8745
8746 * gc.h: Use the PROTO macro when declaring functions.
8747 * gc.c: Use the PROTO macro when declaring static functions.
8748 Remove the CPP hair around function definitions.
8749
8750 * gc.c (scm_init_storage): Initialize scm_asyncs.
8751
8752 * libguile.h: #include "__scm.h" before testing the STDC_HEADERS
8753 preprocessor symbol; "__scm.h" is where it might get #defined.
8754 * __scm.h: Similar: #include <scmconfig.h> before testing
8755 HAVE_LIMITS_H.
8756
8757 * __scm.h: It's HAVE_LIMITS_H, not HAVE_LIMITSH.
8758
8759 Fri Aug 9 11:09:28 1996 Jim Blandy <jimb@totoro.cyclic.com>
8760
8761 * init.c (scm_boot_guile): Add init_func argument; call
8762 (*init_func) instead of calling scm_appinit; it's ucky to
8763 hard-code names for the user's procedures.
8764 * init.h (scm_boot_guile): Adjust declaration.
8765
8766 * __scm.h (PROTO): New macro, for declaring functions with
8767 prototypes.
8768
8769 * init.h (scm_start_stack, scm_restart_stack): Use PROTO;
8770 eliminate all the __STDC__ conditionals.
8771 (scm_boot_guile): Add declaration.
8772 * init.c (scm_start_stack, scm_restart_stack, scm_boot_guile):
8773 Remove __STDC__ conditionals around function definitions; the
8774 declarations in init.h will provide the same information, more
8775 usefully.
8776
8777 * __scm.h (SCM_SYSMISSING): When we don't have ENOSYS, don't
8778 complain about it in the error message; the error message is
8779 adequate without that note, and there's nothing the user can do
8780 about it.
8781
8782 Wed Aug 7 14:14:46 1996 Jim Blandy <jimb@totoro.cyclic.com>
8783
8784 * Makefile.in (ancillary): Drop def.sed.
8785
8786 * posix.c (scm_init_posix): Use numeric values, rather than
8787 CPP symbols, when defining the scheme values R_OK, W_OK, X_OK, and
8788 F_OK. The symbols aren't available on some systems, and I'm
8789 pretty sure their values are fixed by common widespread practice.
8790 * ioext.c (scm_init_ioext): Code here defined them too; remove it.
8791
8792 More functions unavailable on some systems.
8793 * configure.in (AC_CHECK_FUNCS): Add ctermid, setpgid, setsid,
8794 tcgetpgrp, tcsetpgrp, and waitpid to the list of functions to
8795 check for.
8796 * configure, scmconfig.h.in: Updated, using autoconf and autoheader.
8797 * posix.c (scm_sys_ctermid, scm_sys_setpgid, scm_sys_setsid,
8798 scm_sys_tcgetpgrp, scm_sys_tcsetpgrp, scm_sys_waitpid): Put the
8799 bodies of these functions in "#ifdef HAVE_MUMBLE" clauses, with a
8800 stub that signals an error as the #else.
8801
8802 * Makefile.in (ancillary): Drop acconfig-1.5.h; add acconfig.h.
8803
8804 Wed Aug 7 06:28:42 1996 Gary Houston <ghouston@actrix.gen.nz>
8805
8806 * Fixes motivated by Petr Adamek <adamek@mit.edu>:
8807
8808 * unif.c: include ramap.h.
8809
8810 * read.c (endif): case_insensative_p renamed case_insensitive_p.
8811
8812 * ramap.h: rename scm_array_copy prototypes to scm_array_copy_x.
8813
8814 * ports.c: include sys/ioctl.h.
8815
8816 * scmconfig.h.in: add HAVE_SYS_IOCTL_H.
8817
8818 * configure.in: check for sys/ioctl.h.
8819
8820 * ports.c: include <malloc.h> not "malloc.h".
8821
8822 * mallocs.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
8823
8824 * fports.c: remove ttyname and tmpnam declarations.
8825
8826 * posix.c: fewer ttyname declarations.
8827
8828 * fports.c: include <string.h> not "string.h".
8829
8830 * init.c, ioext.c: include string.h and unistd.h.
8831
8832 * gc.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
8833
8834 * async.c, strings.h, strports.c, struct.c, symbols.c, feature.c,
8835 genio.c, simpos.c, vports.c: include string.h.
8836
8837 * socket.c, fdsocket.c: include string.h only if HAVE_STRING_H.
8838
8839 * fdsocket.c (getsockopt, setsockopt): change type of optlen from
8840 scm_sizet to int.
8841 (scm_addr_buffer_size): change type from scm_sizet to int.
8842 (accept, getsockname, getpeername, recvfrom): change type of tmp_size
8843 from scm_sizet to int.
8844
8845 * error.c: include unistd.h.
8846
8847 * __scm.h: (SCM_SYSMISSING): another version in case ENOSYS isn't
8848 defined.
8849
8850 * Makefile.in: remove references to .hd, .cd suffix and __scm.hd.
8851
8852 * __scm.hd, def.sed: deleted.
8853
8854 Tue Aug 6 14:49:08 1996 Jim Blandy <jimb@totoro.cyclic.com>
8855
8856 Changes for NeXT, suggested by Robert Brown.
8857 * configure.in: Call AC_TYPE_MODE_T.
8858 (AC_CHECK_HEADERS): Add libc.h, to get more prototypes on the
8859 NeXT. Put header file list in alphabetical order.
8860 * configure, scmconfig.h.in: Regenerated.
8861 * filesys.c [HAVE_LIBC_H]: #include <libc.h>.
8862
8863 * filesys.c [HAVE_STRING_H]: #include <string.h>, to get prototype
8864 for strerror.
8865
8866 * acconfig.h: New file, providing documentation for the CPP
8867 symbols defined in configure.in
8868 * acconfig-1.5.h: Removed; superceded by the above.
8869
8870 Sat Aug 3 01:27:14 1996 Gary Houston <ghouston@actrix.gen.nz>
8871
8872 * ioext.c (scm_sys_fdopen): fix the port-table assignment.
8873
8874 * fports.c (scm_open_file): don't return #f, throw error.
8875
8876 * ioext.c (fileno): renamed from %fileno.
8877 (soft-fileno): deleted.
8878
8879 * ports.c (scm_port_revealed): don't need to check for -1 from
8880 scm_revealed_count.
8881 (scm_set_port_revealed_x): return unspecified, not #f.
8882
8883 * ioext.c (primitive-move->fdes): return #t or #f, not 1 or 0.
8884
8885 * fdsocket.c: getsockopt, setsockopt: use HAVE_STRUCT_LINGER.
8886
8887 * scmconfig.h.in: add HAVE_STRUCT_LINGER.
8888
8889 * configure.in: check for struct linger, set HAVE_STRUCT_LINGER.
8890
8891 Thu Aug 1 02:58:39 1996 Jim Blandy <jimb@totoro.cyclic.com>
8892
8893 * filesys.c, posix.c: #include <sys/types.h> before <sys/stat.h>.
8894 This is necessary on Ultrix, and doesn't hurt portability.
8895
8896 * Makefile.in (dist-dir): New target, implementing a new dist system.
8897 (installed_h_files): Put in alphabetical order.
8898 Remove duplicate entries for markers.h and unif.h.
8899 (c_files): Remove duplicate entries for markers.c.
8900 (ancillary): Renamed from anillery; all uses changed. Remove
8901 PLUGIN; it's a directory, and needs special treatment in dist-dir.
8902 Remove all the ../doc/* files; doc/Makefile.in handles that.
8903
8904 * Makefile.in (libobjs): Remove duplicate entry for markers.o.
8905
8906 * Makefile.in (.c.x): Compensate for Ultrix's broken Bourne shell:
8907 every if must have an else, or else the whole command has a
8908 non-zero exit code whenever the if's condition is false.
8909
8910 Thu Aug 1 08:22:24 1996 Gary Houston <ghouston@actrix.gen.nz>
8911
8912 * posix.c: include string.h.
8913
8914 Wed Jul 31 23:43:05 1996 Gary Houston <ghouston@actrix.gen.nz>
8915
8916 * numbers.c: rename %expt -> $expt, %atan2 -> $atan2, as it must
8917 have been once.
8918
8919 * posix.c, ioext.c, socket.c, fdsocket.c, files.c, filesys.c, simpos.c:
8920 Remove leading % from scheme names.
8921 Do not return error values, call SCM_SYSERROR or similar.
8922
8923 * __scm.h (SCM_SYSERROR, SCM_SYSMISSING): new macros.
8924
8925 Wed Jun 12 00:28:31 1996 Tom Lord <lord@beehive>
8926
8927 * struct.c (scm_init_struct): new file.
8928
8929 Fri Jun 7 14:02:00 1996 Tom Lord <lord@beehive>
8930
8931 * list.c (scm_list_tail): list-cdr-ref is the same as list-tail.
8932 (scm_list_head): added list-head for rapidly chopping argument
8933 lists off of longer lists (and similar).
8934
8935 Tue Jun 4 09:40:33 1996 Tom Lord <lord@beehive>
8936
8937 * objprop.c (scm_object_property): assq the cdr of the whash
8938 handle for obj, not the handle itself.
8939
8940 Mon Jun 3 17:19:30 1996 Tom Lord <lord@beehive>
8941
8942 * gc.c (scm_mark_weak_vector_spines): Mark the spines (alists) of
8943 weak hash tables last of all marking to avoid an obscure gc bug.
8944 WARNING: circular lists stored in a weak hash table will hose us.
8945
8946 Fri May 24 09:53:39 1996 Tom Lord <lord@beehive>
8947
8948 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
8949 new functions similar to scm_substring_move_left_x and
8950 scm_substring_move_right_x.
8951
8952 Wed May 22 20:07:01 1996 Tom Lord <lord@beehive>
8953
8954 * init.c (scm_boot_guile): prevent gc with scm_block_gc not
8955 scm_gc_heap_lock!
8956
8957 Wed May 15 16:13:29 1996 Tom Lord <lord@beehive>
8958
8959 * ports.c (scm_unread_char): scm_gen_ungetc as a scheme procedure.
8960
8961 Thu May 9 09:33:17 1996 Tom Lord <lord@beehive>
8962
8963 * strports.c (scm_strprint_obj): convenience function. C for
8964 (lambda (obj) (call-with-output-string (lambda (p) (write obj p))))
8965
8966 * guile-{tcl,tk}.[ch], events.[ch], keysyms.[ch], tcl-channels.[ch]
8967 removed to a separate library
8968
8969 * init.c (scm_boot_guile): copied from guile-tcl.c.
8970 Initialization specific to tcl interpreters removed.
8971
8972 Wed May 8 15:07:37 1996 Tom Lord <lord@beehive>
8973
8974 * ports.c (scm_ports_prehistory): size malloced here doesn't
8975 matter so long as it is non-0 (got rid of "* 4").
8976
8977 Tue May 7 11:43:37 1996 Tom Lord <lord@beehive>
8978
8979 * gscm.h: gscm_mkarray eliminated (presumably was not being used
8980 since its definition was bogus).
8981
8982 Mon May 6 13:02:56 1996 Tom Lord <lord@beehive>
8983
8984 * mallocs.[ch]: back again (for rx at least).
8985
8986 Wed Apr 17 08:54:20 1996 Tom Lord <lord@beehive>
8987
8988 * ports.c: removed functions relating to the mapping between ports
8989 and descriptors. (That stuff is unix-specific and should be collected
8990 in a separate library).
8991
8992 * ramap.c (scm_array_copy): return #<unspecified> not #<undefined>.
8993 (Tom Mckay@avanticorp.com)
8994
8995 Mon Apr 15 14:16:55 1996 Tom Lord <lord@beehive>
8996
8997 * gc.c (scm_gc_sweep): Immediates in weak vectors were not
8998 handled correctly (SCM_FREEP was applied to them) -- test for
8999 NIMP. Keys in weak hash tables were spuriously (though harmlessly)
9000 being overwritten with #f. (brown@grettir.bibliotech.com)
9001
9002 Tue Apr 2 22:25:00 1996 Tom Lord <lord@beehive>
9003
9004 * gc.c (scm_unhash_name): new procedure, unhash-name, flushes glocs
9005 for a specific symbol or for all symbols.
9006
9007 Mon Apr 1 10:34:55 1996 Tom Lord <lord@beehive>
9008
9009 * gc.c (scm_gc_mark): mark weak hash tables correctly (was getting weak
9010 keys and weak values confused).
9011
9012 Thu Mar 14 22:20:20 1996 Tom Lord <lord@beehive>
9013
9014 * list.c (scm_last_pair): map '()=>'()
9015
9016 Wed Mar 13 16:43:34 1996 Tom Lord <lord@beehive>
9017
9018 * pairs.c, hashtab.c, list.c, alist.c append.c, sequences.c:
9019 Generalized assoc and hash-table functions.
9020 Factored pairs.c into multiple files.
9021
9022 Fri Mar 8 14:44:39 1996 Tom Lord <lord@beehive>
9023
9024 * gscm.c (gscm_run_scm): got rid of objprop.
9025
9026 Fri Mar 1 10:39:52 1996 Tom Lord <lord@beehive>
9027
9028 * genio.c (scm_getc):
9029 NOTE: fgetc may not be interruptable.
9030
9031 * procprop.c (scm_stand_in_scm_proc):
9032 NOTE: don't use a alist here.
9033 (scm_set_procedure_properties_x): fix type checking throughout this file.
9034
9035 * gc.c (scm_gc_sweep): free heap segments with free, not must_free.
9036
9037 * ports.c (scm_remove_from_port_table): adjust scm_mallocated
9038 after freeing part of the port table.
9039
9040 Thu Feb 29 16:21:17 1996 Tom Lord <lord@beehive>
9041
9042 * strports.c (scm_mkstrport):
9043 * vports.c (scm_make_soft_port): allocate a port table entry
9044 (possibly triggering gc) before setting the tag of the corresponding
9045 ports handle.
9046
9047 * pairs.c (scm_delq_x): never throw an error.
9048
9049 * vectors.c (scm_make_vector): made the default vector fill argument
9050 into '() (much more useful than the previous value, "#unspecified")
9051
9052 Mon Feb 26 17:19:09 1996 Tom Lord <lord@beehive>
9053
9054 * ports.c (scm_add_to_port_table): Added fields
9055 to port table entries: file_name, line_num, col.
9056 Update these in open_file, gen_getc and gen_ungetc.
9057 Added procedures to access those fields.
9058
9059 Sun Feb 25 00:10:36 1996 Tom Lord <lord@beehive>
9060
9061 * procs.c (scm_make_subr_opt): new entry point for making
9062 anonymous subrs.
9063
9064 Sat Feb 24 17:11:31 1996 Tom Lord <lord@beehive>
9065
9066 * gc.h: SCM_STACK_GROWS_UP is now set by autoconf.
9067
9068 Fri Feb 23 10:26:29 1996 Tom Lord <lord@beehive>
9069
9070 * numbers.c (scm_exact_p): This function no longer
9071 implements "integer?".
9072
9073 Thu Feb 22 20:56:16 1996 Tom Lord <lord@beehive>
9074
9075 * gc.c (scm_gc_end): simulate a signal at the end of each GC.
9076 (scm_gc_stats): return an assoc of useful data. Replaces "room"
9077 and the stats reporting formerlly built into repl.
9078
9079 * repl.[ch]: removed.
9080 GC statistics keeping moved to gc.c.
9081 Other statistics keeping can be done from Scheme.
9082 REPLS are now written in Scheme.
9083
9084 Wed Feb 21 10:28:53 1996 Tom Lord <lord@beehive>
9085
9086 * cnsvobj.c (gscm_is_gscm_obj): new file for old functions (icky
9087 conservatively marked objects).
9088
9089 * throw.c (scm_ithrow): Unwind up to the right catch during a throw!
9090
9091 * error.c (scm_init_error): init system_error_sym here, not in repl.c.
9092
9093 * feature.c (scm_compiled_library_path): moved here from repl.c.
9094 This file is for stuff relating specifically to Scheme libraries
9095 like slib.
9096
9097 * eval.c (scm_m_define): don't give warning about redefinition, don't
9098 check verbosity.
9099
9100 NOTE: this should throw a resumable exception with parameters --
9101 the name, the top-level env, the variable, the definition, #t/#f: redefining builtin?
9102
9103 * repl.c (scm_gc_begin/end): don't print a message, don't check verbosity.
9104
9105 * error.c: scm_warn eliminated.
9106
9107 * read.c (scm_lreadr): extra right paren gets an error, not a warning.
9108
9109 * repl.c, marksweep.c, gc.c (various):
9110 lose exit_report, growth_mon.
9111
9112 * gscm.c: got rid of verbosity functions.
9113
9114 Tue Feb 20 00:19:10 1996 Tom Lord <lord@beehive>
9115
9116 * throw.c (scm_ithrow): guard against the bad-throw hook changing
9117 between the call to procedurep and use.
9118
9119 * error.c (scm_everr):
9120 * gc.c (fixconfig):
9121 * gsubr.c (scm_make_gsubr): use exit, not scm_quit. still wrong,
9122 but less so.
9123
9124 * strports.c: don't reveal the port's string to the caller
9125 because it changes size.
9126
9127 (stputc stwrite): check/change the strings length with interrupts
9128 blocked.
9129
9130 * objprop.c (scm_set_object_property_x &c): use the generic
9131 hashing functions and be threadsafe.
9132
9133 * eval.c (scm_unmemocar): do this operation in a thread-safe way.
9134 (per suggestion jaffer@gnu.ai.mit.edu).
9135
9136 * mbstrings.c (scm_multi_byte_string): guard against argument list
9137 changing length.
9138
9139 * strings.c (scm_make_string): loop cleanup
9140
9141 * unif.c (scm_vector_set_length_x): scm_vector_set_length_x no longer
9142 a scheme function.
9143
9144 * weaks.c (scm_weak_vector): guard against argument list
9145 changing length.
9146
9147 * variable.c (scm_builtin_variable): check for/make a built-in
9148 variable automicly.
9149
9150 * vectors.c (scm_vector): while filling the new array,
9151 guard against a list of fill elements that grows after
9152 the vector is allocated.
9153
9154 * hashtab.c -- new file: general hash table
9155 functions. hash, hashq, hashv, hashx.
9156
9157 * tags.h: made wvect an option bit of vector.
9158
9159 Mon Feb 19 09:38:05 1996 Tom Lord <lord@beehive>
9160
9161 * symbols.c: made the basic symbol table operations atomic.
9162
9163 * root.c &c.: collected stack-specific global state.
9164 linum/colnum etc *should* be port-specific state.
9165
9166 * struct.c (scm_init_struct): init the first struct type during
9167 initialization to fix a race condition.
9168
9169 * continuations.c (scm_dynthrow): pass throwval in the 'regs'
9170 object, not in a global.
9171 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
9172
9173 * throw.c (_scm_throw): Pass throwval on the stack, not in a global
9174 (suggested by green@cygnus, jaffer@gnu.ai.mit.edu)
9175
9176 * *.[ch]: namespace cleanup. Changed all (nearly) exported CPP
9177 and C symbols to begin with SCM_ or scm_.
9178
9179 Sun Feb 18 15:55:38 1996 Tom Lord <lord@beehive>
9180
9181 * gsubr.c (scm_gsubr_apply): statically allocate the
9182 array of arguments (bothner@cygnus.com).
9183
9184 Sat Feb 17 20:20:40 1996 Tom Lord <lord@beehive>
9185
9186 * scmsigs.c: Simplified to use async rountines.
9187
9188 * async.c: New support for interrupt handlers.
9189
9190 Thu Feb 15 11:39:09 1996 Tom Lord <lord@beehive>
9191
9192 * symbols.c (scm_string_to_symbol et al.): number of tweaky changes to
9193 set the multi_byte flag correctly in symbols. This is wrong.
9194 intern_obbary_soft and msymbolize should take an extra parameter.
9195 Also, weird multibyte symbols don't print correctly.
9196 The weird symbol syntax is also a bit bogus (emacs doesn't quite
9197 cope).
9198
9199 Tue Feb 13 11:39:37 1996 Tom Lord <lord@beehive>
9200
9201 * symbols.c (scm_string_to_obarray_symbol): obarray == #f means
9202 use the system symhash. == #t means create an uninterned symbol.
9203
9204 Wed Feb 7 09:28:02 1996 Tom Lord <lord@beehive>
9205
9206 * strings.c (scm_make_shared_substring): build'em.
9207 It might better to keep a table of these and use one
9208 less cons-pair per shared-substring.
9209
9210 Tue Feb 6 17:45:21 1996 Tom Lord <lord@beehive>
9211
9212 * strings.c (scm_string_shared_substring): create shared
9213 substrings. (Doesn't handle mb strings yet).
9214
9215 * mbstrings.c (scm_print_mb_string): handle RO strings.
9216
9217 * print.c (scm_iprin1): print substrings as their non-substring
9218 counterparts (dubious).
9219
9220 * marksweep.c (scm_gc_mark scm_gc_sweep): handle RO and MB
9221 strings.
9222
9223 * hash.c (scm_hasher): hash RO and MB strings as bytestrings.
9224
9225 * eval.c (SCM_CEVAL): self-evaluate RO and MB strings.
9226
9227 * eq.c (scm_equal_p): handle RO and MB strings.
9228
9229 * symbols.c (scm_string_to_symbol):
9230 (scm_string_to_obarray_symbol):
9231 * strop.c (scm_i_index):
9232 (scm_i_rindex):
9233 (scm_string_null_p):
9234 (scm_string_to_list):
9235 * strings.c (scm_string_length):
9236 (scm_string_ref):
9237 (scm_substring):
9238 (scm_string_append):
9239 * simpos.c (scm_system):
9240 (scm_getenv):
9241 * fports.c (scm_open_file):
9242 * strorder.c (scm_string_equal_p):
9243 (scm_string_ci_equal_p):
9244 (scm_string_less_p):
9245 (scm_string_ci_less_p):
9246 * pairs.c (scm_obj_length):
9247 * mbstrings.c (scm_multi_byte_string_length):
9248
9249 Use RO string macros for RO strings.
9250
9251 Tue Jan 30 09:19:08 1996 Tom Lord <lord@beehive>
9252
9253 * Makefile.in (CFLAGS ALL_CFLAGS): be more standard.
9254
9255 * strop.c (scm_i_rindex, scm_i_index): Don't use the BSD functions
9256 index/rindex. Do handle embedded \000 characters.
9257
9258 Sun Jan 28 13:16:18 1996 Tom Lord <lord@beehive>
9259
9260 * error.c (def_err_response): (int)scm_err_pos => (long)scm_err_pos
9261 Eliminate a (presumed) warning on some systems.
9262
9263 * gscm.c (gscm_run_scm): SCM_INIT_PATH => GUILE_INIT_PATH
9264 (Mikael Djurfeldt <mdj@nada.kth.se>)
9265
9266 Sat Jan 27 12:36:55 1996 Tom Lord <lord@beehive>
9267
9268 * eval.c (scm_map): added argument type checking.
9269 (kawai@sail.t.u-tokyo.ac.jp)
9270
9271 * gscm.c (gscm_set_procedure_properties_x): parameter "new" => "new_val"
9272 for C++. (Seth Alves <alves@gryphon.com>)
9273
9274 (gscm_cstr): uses an uninitialized local variable causing
9275 segv. (kawai@sail.t.u-tokyo.ac.jp)
9276
9277
9278 * lvectors.c (scm_get_lvector_hook):
9279 In guile-ii, the lvector code was broken. It was fixed in guile-iii.
9280 It seems to me like if it is broken again in guile-iv...Here is a patch.
9281 "! || (LENGTH (keyvec) == 0))"
9282 (From: Mikael Djurfeldt <mdj@nada.kth.se>)
9283
9284
9285 * gscm.c (gscm_sys_default_verbosity):
9286 incorrectly declared for non-__STDC__
9287 (Tom_Mckay@avanticorp.com)
9288
9289 * ports.c (scm_setfileno): Tweak the macro a bit
9290 to make it easier to port to systems that use
9291 more than a single structure field to hold a descriptor.
9292
9293 * debug.c (change_mode): Avoid GNUCism "int foo[n];"
9294 Give a warning, not an error, for unrecognized modes.
9295
9296 * eval.c (SCM_CEVAL):
9297 static char scm_s_for_each[];
9298 static char scm_s_map[];
9299 not needed.
9300
9301 * strings.c (scm_string_p):
9302 static char s_string[];
9303 (see next entry)
9304
9305 * struct.c (scm_sys_struct_set_x):
9306 static char s_sys_make_struct[];
9307 static char s_sys_struct_ref[];
9308 static char s_sys_struct_set_x[];
9309 Rearrange code to eliminate those forward decls for the sake of
9310 broken compilers.
9311
9312 * variable.c (make_vcell_variable): static char s_make_variable[];
9313 isn't needed.
9314
9315 * fports.c (scm_port_mode):
9316 chars modes[3] = "";
9317 to
9318 chars modes[3];
9319 modes[0] = '\0';
9320 (Tom_Mckay@avanticorp.com)
9321
9322
9323 * pairs.c (scm_set_cdr_x): non-__STDC__ declaration of
9324 scm_cons2(), scm_acons(), and scm_set_cdr_x() missing semicolon
9325 (Tom_Mckay@avanticorp.com)
9326
9327 * numbers.c (scm_num_eq_p): Non-__STDC__ declaration of
9328 scm_num_eq_p() was scm_equal_p().
9329 (Tom_Mckay@avanticorp.com)
9330
9331 * symbols.c (msymbolize): "CHARS(X) = " => "SETCHARS..."
9332 (Tom_Mckay@avanticorp.com)
9333
9334 Fri Jan 26 14:03:01 1996 Tom Lord <lord@beehive>
9335
9336 * weaks.c (scm_make_weak_vector): "VELTS(X) =" => "SETVELTS..."
9337 (Tom_Mckay@avanticorp.com)
9338
9339 * strop.c (scm_substring_fill_x):
9340 Non-__STDC__ declaration of scm_substring_fill_x() missing semicolon
9341 (Tom_Mckay@avanticorp.com)
9342
9343 * eval.c (SCM_APPLY): variables "debug_info" -> dbg_info.
9344 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
9345
9346 * _scm.h (CxR functions): #define CxR SCM_CxR => #define CxR(X) SCM_CxR(X)
9347 Works around a compiler bug on some machines. (Tom_Mckay@avanticorp.com)
9348
9349 * lvectors.c (scm_lvector_set_x): avoid VELTS (VELTS (...)[..]) which
9350 can turn into an obscure gc bug.
9351
9352 * chars.c (scm_char_p): fixed PROC call.
9353
9354 * gscm.h (gscm_vset): use scm_vector_set_x not (the missing)
9355 scm_vector_set.
9356
9357 Tue Jan 23 13:29:40 1996 Tom Lord <lord@beehive>
9358
9359 * elisp.c (new file): dynamic scoping and other bits for
9360 elisp. Don't use this yet unless you specificly want to
9361 hack on elisp emulation.
9362
9363 * dynwind.c (scm_dowinds): When entering or leaving a dynamic
9364 scope created by scm_with_dynamic_bindings_operation_x, swap
9365 the bindings of that scope with the corresponding globals.
9366
9367 * continuations.c (scm_make_cont): when a continuation is captured,
9368 relocate the continuation stack chunks registered on the wind chain
9369 to the heap.
9370
9371 Sun Jan 21 19:31:17 1996 Tom Lord <lord@beehive>
9372
9373 * eval.c (SCM_CEVAL): if the function position evaluates
9374 to a macro, process it accordingly. (Previously, macros were
9375 handled only if the function position was a symbol naming a
9376 variable bound to a macro).
9377
9378 Sat Jan 20 23:21:37 1996 Tom Lord <lord@beehive>
9379
9380 * eval.c (scm_m_set): allow multi-variable set! like
9381 (set! x 1 y 2 z 3).
9382
9383 Wed Dec 6 02:40:49 1995 Tom Lord <lord@beehive>
9384
9385 * ports.h fports.c vports.c marksweep.c gc.c strports.c: moved the
9386 STREAM of ports into the port table and replaced it with a
9387 port-table index.
9388
9389 * repl.c (iprin1): added tc7_mb_string -- same as tc7_string.
9390
9391 * marksweep.c (scm_gc_mark): added tc7_mb_string -- same as tc7_string.
9392
9393 * mbstrings.c (new file): functions on multi-byte strings.
9394
9395 * tags.h (scm_typ7_string, scm_typ7_mb_string): added a tag
9396 for multi-byte strings. Moved the string tag.
9397
9398 * chars.h chars.c repl.c (many functions): made scm_upcase and
9399 scm_downcase functions that are safe for extended character sets.
9400
9401 Changed the range of integer->char.
9402
9403 Changed the type of SCM_ICHR.
9404
9405 Tue May 16 17:49:58 1995 Mikael Djurfeldt <mdj@sanscalc.nada.kth.se>
9406
9407 * guile.c: Changed init file name from "SCM_INIT_PATH" to
9408 "GUILE_INIT_PATH"
9409
9410 Sun Aug 6 15:14:46 1995 Andrew McCallum <mccallum@vein.cs.rochester.edu>
9411
9412 * guile.c (gscm_is_gscm_type): New function. (Without this how will we
9413 know that it's safe to pass an object to gscm_get_type?)
9414 (gscm_get_type): Fix tyop in error message.
9415
9416 * variable.c (scm_variable_ref): fixed assertion test.
9417 (Robert STRANDH <strandh@labri.u-bordeaux.fr>)
9418
9419 * gscm.h: fixed several prototypes, notably gscm_vref.
9420 Add gscm_is_eq and temporarily commented out gscm_eq (see
9421 the note in gscm.h near gscm_eq if this change effects your
9422 code).
9423 (Reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
9424
9425 * pairs.c (scm_obj_length): see next entry.
9426
9427 * gscm.h (gscm_obj_length): A way to get an integer
9428 length for lists, strings, symbols (treated as strings),
9429 and vectors. Returns -1 on error.
9430
9431 * eq.c (scm_equal_p): fixed smob case.
9432 (William Gribble <grib@arlut.utexas.edu>)
9433
9434 * Makefile.in (X_CFLAGS): defined.
9435 (William Gribble <grib@arlut.utexas.edu>)
9436
9437 * gscm.h (gscm_2_double): provided now
9438 (reported by Mark Galassi <rosalia@sstcx1.lanl.gov>)
9439
9440 Tue Jun 13 01:04:09 1995 gnu
9441 * Vrooom!
9442
9443