* ports.c (scm_port_closed_p): new procedure, implements
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
60d0643d
GH
11999-12-04 Gary Houston <ghouston@freewire.co.uk>
2
3 * ports.c (scm_port_closed_p): new procedure, implements
4 "port-closed?" suggested by Bernard Urban.
5 ports.h: added prototype, removed the SCM_P macros.
6
1d7bdb25
GH
71999-11-30 Gary Houston <ghouston@freewire.co.uk>
8
9 * unif.h: added some comments, removed the SCM_P macros.
10
111999-11-29 Gary Houston <ghouston@freewire.co.uk>
12
13 * vports.c (sf_write): use scm_makfromstr, not scm_makfrom0str
14 (thanks to Daniel Skarda).
15
82b211bb
JB
161999-11-22 Jim Blandy <jimb@savonarola.red-bean.com>
17
18 * gscm.c, gscm.h: Deleted. They were unused.
19
d12feca3
GH
201999-11-20 Gary Houston <ghouston@freewire.co.uk>
21
22 * unif.c (scm_list_to_uniform_array): call
23 scm_dimensions_to_uniform_array with a third argument of
24 SCM_UNDEFINED instead of SCM_EOL.
25
afe5177e
GH
261999-11-19 Gary Houston <ghouston@freewire.co.uk>
27
28 * the following changes allow guile to be built with the array
29 "module" omitted. some of this stuff is just tc7 type support,
30 which wouldn't be needed if uniform array types were converted
31 to smobs.
32
33 * tag.c (scm_utag_bvect ... scm_utag_cvect): don't define unless
34 HAVE_ARRAYS.
35 (scm_tag): don't check array types unless HAVE_ARRAYS.
36
37 * sort.c (scm_restricted_vector_sort_x, scm_sorted_p):
38 remove the unused array types.
39 * (scm_stable_sort, scm_sort): don't support vectors if not
40 HAVE_ARRAYS. a bit excessive.
41
42 * random.c (vector_scale, vector_sum_squares,
43 scm_random_solid_sphere_x, scm_random_hollow_sphere_x,
44 scm_random_normal_vector_x): don't define unless HAVE_ARRAYS.
45
46 * gh_data.c (makvect, gh_chars2byvect, gh_shorts2svect,
47 gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect, gh_doubles2dvect,
48 gh_uniform_vector_length, gh_uniform_vector_ref):
49 don't define unless HAVE_ARRAYS.
50 (gh_scm2chars, gh_scm2shorts, gh_scm2longs, gh_scm2floats,
51 gh_scm2doubles):
52 don't check vector types if not HAVE_ARRAYS.
53
54 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), print.c (scm_iprin1),
55 gc.c (scm_gc_mark, scm_gc_sweep), objects.c (scm_class_of):
56 don't support the array types unless HAVE_ARRAYS is defined.
57
58 * tags.h: make nine tc7 types conditional on HAVE_ARRAYS.
59
60 * read.c (scm_lreadr): don't check for #* unless HAVE_ARRAYS is
61 defined (this should use read-hash-extend).
62
63 * ramap.c, unif.c: don't check whether ARRAYS is defined.
64
65 * vectors.c (scm_vector_set_length_x): moved here from unif.c. call
66 scm_uniform_element_size if HAVE_ARRAYS.
67 vectors.h: prototype too.
68
69 * unif.c (scm_uniform_element_size): new procedure.
70
71 * init.c (scm_boot_guile_1): don't call scm_init_ramap or
72 scm_init_unif unless HAVE_ARRAYS is defined.
73
74 * __scm.h: don't define ARRAYS.
75
76 * Makefile.am (EXTRA_libguile_la_SOURCES): unif.c and ramap.c
77 moved here from libguile_la_SOURCES.
78
5c11cc9d
GH
791999-11-18 Gary Houston <ghouston@freewire.co.uk>
80
81 * socket.c (scm_htons, scm_ntohs, scm_htonl, scm_ntohl): new
82 functions for network data conversion.
83
84 * numbers.c (scm_num2long, scm_num2longlong):
85 throw out-of-range instead of wrong-type-arg if appropriate.
86 (scm_iint2str): handle -2^31 correctly.
87 (scm_num2long): handle -2^31 bignum correctly.
88 (scm_num2long_long): rewrite the bigdig case: basically copied
89 from scm_num2long.
90 numbers.h: (SCM_BITSPERLONGLONG): deleted.
91
92 * unif.c (rapr1): use sprintf instead of intprint for unsigned
93 longs: intprint can't cope with large values.
94
95 * numbers.c (scm_num2ulong): check more consistently that the
96 input is not negative. if it is, throw out-of-range instead of
97 wrong-type-arg.
98
99 * ramap.c (scm_array_fill_int): don't limit fill to INUM for
100 uvect, ivect or llvect.
101 Check that fill doesn't overflow short uniform array.
102
103 * __scm.h: add another long to the definition of long_long and
104 ulong_long.
105
106 * unif.c (scm_raprin1): use 'l' instead of "long_long" in the
107 print representation of llvect. read can't handle more than
108 one character.
109 (scm_dimensions_to_uniform_array): make "fill" an optional argument
110 instead of a rest argument.
111
112 * tags.h (scm_tc7_llvect): wasn't defined anywhere, so use the free
113 tag 29 for now.
114
115 * __scm.h: don't mention LONGLONGS.
116
117 * unif.c, numbers.c, eq.c, gc.c, print.c, eval.c, ramap.c:
118 replace LONGLONGS with HAVE_LONG_LONGS as set by configure.
119
1201999-11-17 Gary Houston <ghouston@freewire.co.uk>
121
122 * net_db.c (scm_inet_aton): throw errors using the misc-error key
123 instead of system-error. inet_aton doesn't set errno.
124 system-error isn't right in gethost either, since it's throwing
125 the value of h_errno instead of errno. so:
126 (scm_host_not_found_key, scm_try_again_key,
127 scm_no_recovery_key, scm_no_data_key): new error keys.
128 (scm_resolv_error): new procedure, use the new keys.
129 (scm_gethost): call scm_resolv_error not scm_syserror_msg.
130
1311999-11-16 Gary Houston <ghouston@freewire.co.uk>
132
133 * error.c: (various): use scm_cons instead of scm_listify
134 to build short lists.
135
93a6b6f5
GH
1361999-11-03 Gary Houston <ghouston@freewire.co.uk>
137
138 * socket.c (scm_fill_sockaddr): zero the address structure before
139 use, in case it has a sin_len field and the OS doesn't like random
140 values (thanks to Bertrand Petit).
141
4921140c
MG
1421999-10-26 Mark Galassi <rosalia@lanl.gov>
143
144 * gh.h, gh_data.c (gh_symbol2scm): changed gh_symbol2scm() to take
145 a const char * argument, upon suggestion from Lynn Winebarger.
146
cd19d608
GH
1471999-10-26 Gary Houston <ghouston@freewire.co.uk>
148
149 * strports.c (st_end_input): avoid dubious pointer arithmetic.
150
7dcb364d
GH
1511999-10-24 Gary Houston <ghouston@freewire.co.uk>
152
153 * Move the responsibility for resetting port buffers from the
154 caller of the ptob seek procedure to the implementation. This
155 gives more control in general to the ptob seek: in particular the
156 change of 1999-10-20 can be made to work without breaking seek on
157 string ports. There's a comment in NEWS about upgrading port
158 types.
159
160 * ports.c (scm_seek): don't reset the port buffers here.
161
162 * fports.c (fport_seek): reset the buffers, except for the
163 0 SEEK_CUR case.
164
165 * strports.c (st_end_input): (bug fix): decrement pt->read_pos by
166 offset. check that it's not less than read_buf.
167 (st_seek): reset the buffers first, unless it's the 0 SEEK_CUR
168 case and currently reading.
169
e9c66ab0
GH
1701999-10-20 Gary Houston <ghouston@freewire.co.uk>
171
172 * ports.c (scm_seek): Add a special case for SEEK_CUR, offset 0,
173 so that unread chars are not needlessly discarded. (thanks to
174 Roland Orre).
175
0de97b83
GH
1761999-10-18 Gary Houston <ghouston@freewire.co.uk>
177
178 * fports.c (scm_fdes_to_port): always set rw_random if the fdes is
179 random access. rw_active needs to be maintained even for single
180 directional ports, otherwise scm_seek and probably other things are
181 broken. (thanks to Roland Orre).
182
183 * strports.c (scm_mkstrport): set rw_random to 1 unconditionally.
184
185 * ports.c (scm_add_to_port_table): initialise rw_random to 0.
186
187 * ports.h (scm_port): change the comments on rw_random and rw_active.
188
e173f7f1
MD
1891999-10-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
190
191 * ioext.c: Added #include "feature.h".
192
193 These changes turns `delay' into a memoizing macro. This is
194 because it may be expanded before evaluation if it occurs at the
195 beginning of a body. (Thanks to Lauri Alanko.)
196
197 * eval.c, eval.h (scm_sym_delay): New global symbol.
198
199 * tags.h (SCM_IM_DELAY): New immediate symbol.
200
201 * print.c (scm_isymnames): Printed representation.
202
203 * eval.c (unmemocopy, SCM_CEVAL): Handle SCM_IM_DELAY.
204 (scm_m_delay): Turned into a memoizing macro.
205
206 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version.
207
1ab45872
JB
2081999-10-11 Jim Blandy <jimb@savonarola.red-bean.com>
209
210 * gh_data.c (gh_ints2scm, gh_doubles2scm): Make sure elements are
211 protected from GC while building the vector. (Thanks to Bernard
212 Urban and Greg Harvey.)
213
0573ddae
MD
2141999-10-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
215
216 * throw.c (handler_message): Display backtrace if backtraces
217 enabled.
218
80f27102
JB
2191999-10-05 Jim Blandy <jimb@savonarola.red-bean.com>
220
0c1221ab
JB
221 * Makefile.in, scmconfig.h.in: Deleted from CVS repository. Run
222 the autogen.sh script to create generated files like these.
223
80f27102
JB
224 * numbers.c (scm_string_to_number): Signal an error if radix is
225 less than two. (Thanks to Jorgen Schaefer.)
226
227 * print.c (scm_write, scm_display, scm_newline, scm_write_char):
228 Don't assume that the current output port is valid. Somebody
229 might close it. (Thanks to Bernard Urban.)
230
dc4d930b
JB
2311999-10-02 Jim Blandy <jimb@zwingli.cygnus.com>
232
233 * scmconfig.h.in: Regenerated.
234
235 * Makefile.am (EXTRA_libguile_la_SOURCES): fix typo.
236
0b307a34
GB
237Mon Sep 27 17:15:14 1999 Greg J. Badros <gjb@cs.washington.edu>
238
239 * __scm.h: Fix a bunch of macros that were missing do-while(0)
240 sandwiches.
241
242 * debug.c, eval.c: Fix buggy uses of SCM_ALLOW_INTS (missing
243 semicolon) exposed by the above change.
244
15526538
GB
2451999-09-27 Greg J. Badros <gjb@cs.washington.edu>
246
247 * stacks.c: Avoid compiler warning re: unitialized var.
248
249 * scmconfig.h.in: Added DEBUG_FREELIST
250
251 * pairs.h: Fix macro that was not do-while(0) sandwiched.
252
253 * gc.h, gc.c: Added scm_gc_set_debug_check_freelist_x,
254 scm_map_free_list
255
52cfc69b
GH
2561999-09-23 Gary Houston <ghouston@freewire.co.uk>
257
258 * ioext.c (scm_init_ioext): enable "i/o-extensions" feature here
259 instead of in scm_init_filesys.
260
261 * init.c (scm_boot_guile_1): don't call scm_init_posix or
262 scm_init_filesys unless HAVE_POSIX is defined.
263 don't call scm_init_netdb or scm_init_socket unless
264 HAVE_NETWORKING is defined.
265
266 * Makefile.am (EXTRA_libguile_la_SOURCES): filesys.c, posix.c,
267 net_db.c, socket.c: moved here from libguile_la_SOURCES.
268
bab4e1cc
JB
2691999-09-25 Jim Blandy <jimb@savonarola.red-bean.com>
270
e59373d6
JB
271 * root.c (scm_make_root): Initialize all the fields of the new
272 root. GC could happen any time, you know. (Thanks to Greg
273 Harvey.)
274
8854e654
JB
275 * numbers.c (scm_number_to_string): Signal an error if radix is
276 less than two. (Thanks to Jorgen Schaefer.)
277
bab4e1cc
JB
278 * Makefile.am (EXTRA_libguile_la_SOURCES): Add memmove.c here,
279 so automake will actually generate rules for it.
280 * Makefile.in: Regenerated.
281
0dcad30f
JB
2821999-09-21 Jim Blandy <jimb@savonarola.red-bean.com>
283
284 * backtrace.c: #include "_scm.h" before testing whether
285 HAVE_UNISTD_H is #defined.
286
24e720c8
JB
2871999-09-20 Jim Blandy <jimb@savonarola.red-bean.com>
288
289 * read.c (scm_read): Don't assume that scm_cur_inp is always open.
290 * ports.c (scm_read_char): Same.
291 * ioext.c (scm_read_line): Same.
292 (Thanks to Bernard Urban.)
293
73ef98d6
MD
2941999-09-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
295
920ffdaa
MD
296 * vectors.c (scm_vector_move_right_x): Bugfix: Remove side effect
297 in SCM_ASSERT macro.
298 numbers.c: Removed #ifndef SCM_RECKLESS at places where type
299 checking may invoke a generic. (Thanks to Michael Livshin.)
300
73ef98d6 301 * __scm.h (SCM_WTA_DISPATCH_0, SCM_GASSERT0): New macros.
afe93bdb
MD
302
303 * numbers.c (scm_max, scm_min, scm_sum, scm_difference,
304 scm_product, scm_divide): Bugfix: Don't pass SCM_UNDEFINED to the
305 generic function if the asubr is called with only one arg.
306
7ee92fce
GH
3071999-09-20 Gary Houston <ghouston@freewire.co.uk>
308
309 * scmsigs.c (scm_sigaction): add SA_RESTART to flags only if
310 HAVE_RESTARTABLE_SYSCALLS.
311 (scm_init_scmsigs): use siginterrupt if it's available. not
312 everyone who has restartable syscalls has SA_RESTART it seems.
313
314 (scm_sigaction): use scm_num2long/scm_long2num when converting
315 SIG_DFL/SIG_IGN, in case it doesn't fit in an INUM. use
316 scm_integer_p to test the type.
317
e684c60f
GH
3181999-09-18 Gary Houston <ghouston@freewire.co.uk>
319
08b8c694
GH
320 * _scm.h, scmsigs.c: replace HAVE_RESTARTS with
321 HAVE_RESTARTABLE_SYSCALLS.
322
e684c60f
GH
323 * strports.c (scm_strport_to_string): create the string from
324 pt->read_buf instead of an expression that evaluates to the
325 same thing.
326
327 * gdbint.c (gdb_print): don't just use SCM_CHARS to get a C string
328 from the port: the port's buffer may not be NUL terminated.
329
8cc9503d
MD
3301999-09-16 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
331
332 * Makefile.am (.c.x): Added missing semicolon after `false'.
333
5eb548fc
MD
3341999-09-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
335
4b3324a3
MD
336 * print.c (scm_iprin1): Turn `write' and `display' into
337 primitive generics and use their associated generic functions in
338 scm_iprin1 for GOOPS objects.
339
5eb548fc
MD
340 * backtrace.c: #include <unistd.h> if present.
341
77e3c5be
JB
3421999-09-14 Jim Blandy <jimb@savonarola.red-bean.com>
343
344 * Makefile.am (.c.x): Don't create a subshell just to delete the
345 .x file and return false.
346 * Makefile.in: Regenerated.
347
ece41168
MD
3481999-09-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
349
350 * feature.c (scm_create_hook): New function. Replaces
351 scm_make_named_hook which is now deprecated.
352 (scm_make_hook_with_name): New primitive.
353 (print_hook): Hooks now print in a fancy way.
354
69fafe46
MD
3551999-09-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
356
2868a51c
MD
357 * __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,
358 dynwind.c, dynwind.h, eval.h, evalext.c, evalext.h, feature.c,
359 feature.h, hashtab.c, hashtab.h, objects.c, objects.h, print.c,
360 procs.c, procs.h, smob.c, smob.h, srcprop.c, strorder.c, struct.c,
30772a34 361 struct.h: Updated copyright notices.
2868a51c 362
69fafe46
MD
363 * srcprop.c (scm_source_property): Bugfix: Use SCM_NECONSP instead
364 of SCM_NCONSP. (Thanks to Greg Badros.)
365
366 * gsubr.c (scm_make_gsubr): Use scm_make_subr_opt for creation of
367 the self subr.
368
369 * eval.c, debug.h (SCM_BACKTRACE_WIDTH): New debug option: width.
370
371 * backtrace.c: Keep backtraces within specified width by
372 adaptively adjusting fancy printing parameters and cut output if
373 necessary.
374 (scm_display_application): Check args.
375
e1f20ec6
JB
3761999-09-11 Jim Blandy <jimb@savonarola.red-bean.com>
377
340a8770
JB
378 Change the name of the objects returned by OPENDIR from
379 "directory" to "directory stream". A predicate named "directory?"
380 would be confusing.
381 * filesys.c (scm_directory_stream_p): Renamed from scm_directory_p.
382 At the Scheme level, "directory?" -> "directory-stream?".
383 (scm_dir_print): Use the phrase "directory stream" in printed form.
384 * filesys.h (scm_directory_stream_p): Prototype renamed
385 accordingly.
386
91859184
JB
387 * Makefile.am (CLEANFILES): Remove versiondat.h; that should only
388 be removed by `make distclean', since it's generated by configure.
389 * Makefile.in: Regenerated.
390 (Thanks to Robert Bihlmeyer.)
391
b142c81d
JB
392 * strop.c (scm_substring_move_x): Signal an error if start1
393 doesn't come before end1. (Thanks to Karoly Lorentey).
394
395 * numbers.c (scm_istr2flo): Don't call SCM_INEXP without first
396 calling SCM_NIMP. (Thanks to Karoly Lorentey).
397
e1f20ec6
JB
398 * version.c (scm_libguile_config_stamp): Deleted. See
399 corresponding change to ../ice-9/boot-9.scm.
91859184 400 * versiondat.h.in: Remove definition for GUILE_STAMP.
e1f20ec6
JB
401 * version.h: Delete prototype.
402 * Makefile.in: Regenerated.
403
77242ff9
GH
4041999-09-11 Gary Houston <ghouston@easynet.co.uk>
405
406 * filesys.c (scm_directory_p): new procedure "directory?" Returns
407 a boolean indicating whether its argument is a directory
408 port as returned by opendir (thanks to Dirk Herrmann for the
409 suggestion.)
410
08cc62c7
MD
4111999-09-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
412
413 * backtrace.c (display_frame_expr): Don't print a newline.
414 (display_frame): Print the newline here instead.
f14d3ff8
MD
415 (display_backtrace_body): Don't print "Backtrace:".
416 (scm_backtrace): Print "Backtrace:" here instead.
08cc62c7 417
bc848f7f
MD
4181999-09-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
419
d37e6569
MD
420 * procs.c (scm_setter): Signal WTA if handed an entity or operator
421 lacking a setter.
422
bc848f7f
MD
423 * feature.c, feature.h: (scm_hook_p, scm_hook_empty_p): New
424 primitives. (Thanks to Greg Badros);
425 (scm_hook_to_list): New primitive; Hooks are now smobs.
426
55a7fc62
GH
4271999-09-08 Gary Houston <ghouston@easynet.co.uk>
428
429 * stime.c (bdtime2c): rewrite the ASSERTs. Accept a value
430 of #f for the 10th vector element to avoid an exception
431 seen by Bernard Urban.
432 (scm_mktime): unneeded ASSERT removed.
433
4f93d84c
MD
4341999-09-07 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
435
436 * eval.c (scm_map, scm_for_each): Converted to dispatch on generic
437 if args don't match.
438
439 * __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros.
440
7e6e146e
MD
4411999-09-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
442
6065fed8
MD
443 * numbers.c: Converted comparison operations to dispatch on
444 generic if args don't match.
445
7e6e146e
MD
446 * Makefile.am (ETAGS_ARGS): Added support for GPROC and GPROC1.
447
548c5135
JB
4481999-09-06 James Blandy <jimb@mule.m17n.org>
449
450 * guile-snarf.c: Deleted. Snarfing should respect CPP
451 conditionals, so it needs to actually run CPP. Bleah.
452
2a94fc36
JB
4531999-09-05 James Blandy <jimb@mule.m17n.org>
454
f9dbe074
JB
455 Handle errors properly in guile-snarf. (Thanks to Han-Wen Nienhuys.)
456 * guile-snarf.in: Be sure to exit with an error if CPP does.
457 * Makefile.am (.c.x): Delete the .x file and exit with an error
458 status if guile-snarf exits with an error status.
459 * Makefile.in: Regenerated.
460
9d743bfb
JB
461 * snarf.h (SCM_GLOBAL_KEYWORD): Call scm_c_make_keyword, not
462 scm_makekey, which doesn't exist any more. Guess nobody's using
463 this.
464
2a94fc36
JB
465 * guile-snarf.c: New implementation of guile-snarf, meant to be
466 more robust than the shell script. I think it's complete, but I
467 haven't tested it at all, and I haven't changed the build process
468 to actually use it. We should compare its output against that of
469 the existing shell script, for all source files.
470
9918cf63
JB
471 * guile-snarf.c (parse_args): Abort if we haven't handled some
472 character type.
473
afbbb69c
JB
4741999-09-03 James Blandy <jimb@mule.m17n.org>
475
476 * load.c (scm_search_path): If the filename has any extension at
477 all, ignore the entire list of extensions. Also, don't check whether
478 the file is accessible. If the file exists, accessible or not, we
479 should return it. Inaccessible files should cause an error later.
480 (Thanks to Keisuke Nishida for the suggestions.)
481
655f19ab
MD
4821999-09-02 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
483
484 * gc.c (cleanup, scm_init_storage): Use on_exit if present and
485 atexit not available. (sunos4.1.4 needs it.)
486
b074884f 4871999-09-01 James Blandy <jimb@mule.m17n.org>
94b4c096 488
b074884f
JB
489 I take it all back --- bcopy does handle overlapping source and
490 destination areas correctly. At least on every system I could
491 find. But it is better to use AC_REPLACE_FUNCS than to introduce
492 new CPP conditionals.
493 * memmove.c: New file, implementing memmove in terms of bcopy.
494 * scmconfig.h.in: Regenerated.
a4ea22c3
JB
495
496 Allocators should use the `void *' type for generic pointers.
497 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Change
498 argument and return types.
499 * gc.h: Corresponding changes to prototypes.
500 (Thanks to Forcer.)
501
b074884f
JB
5021999-08-31 James Blandy <jimb@mule.m17n.org>
503
504 * numbers.c (scm_init_numbers): Claim to support the `complex'
505 feature, as expected by (ice-9 format). (Thanks to Ceri Storey.)
506
dd67f90b
JB
507 * Makefile.am (check-local): Set GUILE_LOAD_PATH so the tests can
508 find (ice-9 boot-9) when Guile was compiled in a separate
509 directory from the source. (Thanks to Rodney Brown.)
510 * Makefile.in: Regenerated.
511
94b4c096
JB
512 * procs.c (scm_make_subr_opt): Fix typo. Remember to multiply
513 table lengths by the size of a single element when growing the
dd67f90b 514 table. (Thanks to Bill Schottstaedt.)
94b4c096 515
fa941d9e
MD
5161999-08-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
517
518 * eval.c (SCM_CEVAL): Duplicated the method dispatch code at the
519 SCM_IM_DISPATCH form instead of calling scm_mcache_lookup_cmethod
520 since that cuts down the time for type dispatch by 50%.
521
ebc4e6cc
JB
5221999-08-30 James Blandy <jimb@mule.m17n.org>
523
524 * gh_data.c (gh_set_substr): Revert change of 1999-08-29; bcopy is
525 not a correct substitute for memmove, because it doesn't handle
526 overlapping source and destination areas on many platforms.
527 Overlaps are the primary reason to use memmove in the first place.
528 * ports.c (scm_ungetc): Same.
529 * strop.c (scm_substring_move_x): Same.
530
a7098335
MD
5311999-08-30 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
532
533 * gc.c (scm_init_storage): Skip registration of cleanup on systems
534 which lack atexit. (Is it important that cleanup is made
535 properly? Maybe we should replace all `exit' with `scm_exit' and
536 call cleanup there?)
537
538 * struct.c, struct.h (scm_struct_free_0, scm_struct_free_light,
539 scm_struct_free_standard, scm_struct_free_entity): Declared to
540 return scm_sizet instead of size_t.
541
542 * gdbint.c, strports.c: #include <unistd.h>. (SEEK_SET is defined
543 there on sunos4.1.4.)
544
9a26d6f9
MD
5451999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
546
547 * numbers.c (scm_lcm): Bugfix: BIGDIG --> SCM_BIGDIG;
548 Account for the case when second argument is unbound.
549
550 * strorder.c (scm_string_less_p, scm_string_ci_less_p): Bugfix.
551 (Thanks to Karoly Lorentey.)
552
553 * gh_data.c, ports.c, strop.c: Alternatively use bcopy if memmove
b074884f 554 isn't present. (Thanks to Suzuki Toshiya.)
9a26d6f9
MD
555
556 * ports.c: Use ANSI C prototypes in definitions. (Thanks to
557 Bernard Urban.)
558
747117b0
MD
559 * filesys.c (scm_stat2scm): Conditionally use S_ISLNK. (Thanks to
560 Bernard Urban.)
9a26d6f9
MD
561
562 * dynl-dl.c (RTLD_GLOBAL): Define if non-existent. (Thanks to
563 Bernard Urban and Ian Grant.)
564
565 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version
566 again. (1.3.4 will be binary incompatible with 1.3.2 because of a
567 change in the representation of entities and operators.)
568
6e2e75db
GH
5691999-08-29 Gary Houston <ghouston@easynet.co.uk>
570
571 * ports.c (scm_ungetc): bugfix: if putback_buf is NULL
5c4fe34f 572 don't allocate zero bytes (thanks to Bill Schottstaedt).
6e2e75db 573
c5b738b5
MD
5741999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
575
a48a7629
MD
576 * procs.c (scm_setter): Converted to use generic dispatch.
577
578 * eval.c, eval.h: Bugfix: scm_sym_apply was not initialized
579 correctly.
580
581 * load.c (scm_search_path): Don't try extensions which already are
582 present at the end of the filename.
583 (scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
584
585 * stacks.c (scm_sym_apply): Removed. (Thanks to Ken Raeburn.)
586
c5b738b5
MD
587 Cleanup and simplification of generic method dispatch.
588 Also, the quadruple representation of entity and operator
589 procedures has been replaced with single.
590
591 * tags.h (SCM_IM_HASH_DISPATCH): Removed.
592
593 * print.c (scm_isymnames): Removed #@hash-dispatch.
594
595 * objects.c, objects.h (scm_mcache_lookup_cmethod): Moved here
596 from eval.c; Support 0 arity methods.
597 (scm_set_object_procedure_x): Removed scm_sym_atdispatch;
598 (scm_apply_generic_env): Removed.
599 Replaced slots proc0-3 with procedure.
600
601 * objects.h (SCM_OPERATOR_PROC_0, SCM_OPERATOR_PROC_1,
602 SCM_OPERATOR_PROC_2, SCM_OPERATOR_PROC_3): Replaced by
603 SCM_OPERATOR_PROCEDURE.
604 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_1, SCM_ENTITY_PROC_2,
605 SCM_ENTITY_PROC_3): Replaced by SCM_ENTITY_PROCEDURE.
606
607 * struct.c, struct.h: Replace 4 procedure slots with one.
608 (scm_struct_i_procedure): Replaces scm_struct_i_procedure.
609
610 * gc.c (scm_gc_mark): Mark 1 procedure slot in entities instead of
611 4.
612
613 * eval.c (scm_sym_args): Removed.
614 (SCM_CEVAL): Simplified entity application.
615 Moved dispatch code to objects.c.
616
617 * procprop.c (scm_i_procedure_arity): Bugfix: Handle generics.
618
375c11a3
MD
6191999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
620
621 * sort.c (closureless): Use scm_eval_body.
622
623 * eval.c (SCM_APPLY): Fixed serious evaluator bug: If a closure
624 with a symbol as last form was first called normally and then via
625 `map' or some other mechanism using primitive apply, an ILOC was
626 returned.
627
9de33deb
MD
6281999-08-26 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
629
630 This change extends the representation of primitive procedures
631 with more data fields, e.g. a place for documentation and true
632 procedure properties.
633
634 * procs.c, procs.h (scm_subr_entry): New type: Stores data
635 associated with subrs.
636 (SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS,
637 SCM_SUBR_DOC): New macros.
638 (scm_subr_table): New variable.
639 (scm_mark_subr_table): New function.
640
641 * init.c (scm_boot_guile_1): Call scm_init_subr_table.
642
643 * gc.c (scm_gc_mark): Don't mark subr names here.
644 (scm_igc): Call scm_mark_subr_table.
645
646
647 This change implements a scheme for letting a generic work as a
648 shadow for a primitive procedure. If the primitive procedure
649 can't dispatch on its arguments, control is left over to the
650 generic. Normal wrong type arg errors will be generated until the
651 user has hung the first method on the primitive.
652
653 * snarf.h (SCM_GPROC, SCM_GPROC1): New macros.
654
655 * procs.c, procs.h (scm_subr_p): New function (used internally).
656
657 * gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function.
658
659 * objects.c, objects.h (scm_primitive_generic): New class.
660
661 * objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros.
662
663 * print.c (scm_iprin1): Print primitive-generics.
664
665 * __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1,
666 SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros.
667
668 * eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta -->
669 SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point
670 primitives). NOTE: This means that it is now *required* to use
671 SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an
672 obscured representation that will be removed in the future anyway,
673 so backward compatibility is no problem here).
674
675 * numbers.c: Converted most numeric primitives (all but bit
676 comparison operations and bit operations) to dispatch on generic
677 if args don't match.
678
679
680 Better support for applying generic functions.
681
682 * eval.c, eval.h (scm_eval_body): New function.
683
684 * objects.c (scm_call_generic_0, scm_call_generic_1,
685 scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New
686 functions.
687
688
689 Optimization of the generic function dispatch mechanism.
690
691 * eval.c (SCM_CEVAL): Apply the cmethod directly after having
692 called scm_memoize_method instead of doing a second lookup.
693
694 * objects.h (scm_memoize_method): Now returns the memoized cmethod.
695
696
697 Bugfix
698
699 * procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of
700 scm_sysintern so that the binding connected with the subr name
701 isn't cleared when we give set = 0.
702
703
07910014
MD
7041999-08-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
705
9de33deb
MD
706 More transparent handling of ports with print states.
707
07910014
MD
708 * print.h (SCM_PORT_WITH_PS_P, SCM_PORT_WITH_PS_PORT,
709 SCM_PORT_WITH_PS_PS): Represent ports with print states as a smob
710 instead of a pair of a port and a print state. We'll need to cons
711 once extra in scm_printer_apply but the type system will be
712 cleaner, it will mix better with GOOPS, and, it will be even more
713 transparent to the user.
714
715 * print.c (scm_get_print_state): New procedure: Given an output
716 port, return the print state associated to it in the current print
717 chain, if one exists;
718 (scm_port_with_print_state): New procedure: Associate a
719 print-state with a port.
720 (scm_valid_oport_value_p): Use SCM_PORT_WITH_PS_P;
721 (scm_printer_apply): Wrap port and pstate as a smob;
722 (print_state_printer): Removed.
723
724 * objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports.
725
726 * eval.c (scm_init_eval): Use scm_make_smob_type instead of
727 scm_newsmob.
728
729 * ports.c (scm_output_port_p): Bugfix: Coerce output port before
730 testing (otherwise the port-print-state trick won't be transparent
731 to the user; one example where this caused problems was in the
732 (ice-9 format) module).
733
e2e470cf
MD
7341999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
735
736 * eval.c (SCM_CEVAL): Let the SCM_IM_SLOT_SET_X form return
737 SCM_UNSPECIFIED instead of the set value.
738
a343458d
JB
7391999-08-20 James Blandy <jimb@mule.m17n.org>
740
f8c9d497
JB
741 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.
742
a343458d
JB
743 * ports.h (enum scm_port_rw_active): New enum, containing
744 SCM_PORT_READ, SCM_PORT_WRITE, and SCM_PORT_NEITHER (instead of
745 zero). The debugger knows about enums, but doesn't know about
746 #defines.
747 (typedef scm_port): Declare rw_active member to be an enum
748 scm_port_rw_active.
749 * fports.c (fport_flush, fport_end_input): Use SCM_PORT_NEITHER
750 instead of zero.
751 * ports.c (scm_add_to_port_table): Same.
752 * strports.c (st_flush, st_end_input): Same.
753
754 * ioext.c (scm_do_read_line, scm_read_line): Use scm_must_malloc,
755 scm_must_realloc, and scm_done_malloc as appropriate.
756
dc4ddb33
MD
7571999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
758
759 * sort.c (quicksort): Added condition to protect the algorithm
760 from crashing the interpreter if the less predicate is buggy.
761
d3639214
GH
7621999-08-19 Gary Houston <ghouston@easynet.co.uk>
763
764 * fports.c (fport_write): fix line-buffering mode again.
765 (scm_open_file): recognise 'l' for line-buffering.
766 (scm_setvbuf): recognise _IOLBF for line-buffering.
767
3817c7ce
MD
7681999-08-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
769
266bf340
MD
770 * Makefile.am (libguile_la_LDFLAGS): Increased the version number
771 of libguile to 5.0.
772
3817c7ce
MD
773 * eval.c (SCM_APPLY), sort.c (closureless): Expand body when
774 evaluating closures.
775
162d88ca
GH
7761999-08-18 Gary Houston <ghouston@easynet.co.uk>
777
778 * fports.c (fport_write): use memcpy instead of strncpy, in case
779 the data contains NUL.
780
cce0d8d0
MD
7811999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
782
59c49e10
MD
783 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
784
cce0d8d0
MD
785 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
786 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
787 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
788 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
789 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
790 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
791 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
792 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
793 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
794 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
795 scm_sym_ as prefix for symbols.
796
797 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
798
799 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
800 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
801 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
802 scm_sym_atcall_cc): Made global.
803
8b7840b9
MD
8041999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
805
806 * eval.c (scm_sym_args): Made global.
807
808 * objects.c (scm_set_object_procedure_x): Disallow setting of
809 procedures for pure generic functions.
810
c94577b4
GH
8111999-08-12 Gary Houston <ghouston@easynet.co.uk>
812
813 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
814 Scheme name from lseek to seek, but lseek was added recently so
815 it shouldn't be a big problem.
816 * ports.c, gdbint.c, ioext.c: changed callers.
817
affc96b5
GH
8181999-08-11 Gary Houston <ghouston@easynet.co.uk>
819
820 * fports.c (fport_input_waiting): if select is used, return 1
821 instead of whatever FD_ISSET expands to. maybe it will be useful
822 to interpret the value from the input_waiting ptob procedure as a
823 lower bound on the number of bytes available.
824
825 * Mikael asked for a few names to be changed...
826
827 * ports.c (scm_make_port_type): take the write procedure as the
828 second argument instead of the flush procedure.
829 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
830 fflush -> flush, read_flush -> end_input, fclose -> close,
831 fill_buffer -> fill_input, ftruncate -> truncate,
832 input_waiting_p -> input_waiting.
833
834 * ports.c (end_input_void_port): was read_flush_void_port.
835 (scm_set_port_end_input): was scm_set_port_flush_input.
836 (scm_set_port_flush): was scm_set_port_write.
837 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
838 (scm_end_input): was scm_read_flush.
839 (scm_fill_input): was scm_fill_buffer.
840 (scm_flush): was scm_fflush.
841 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
842 (fport_end_input): was local_read_flush.
843 (fport_flush): was local_fflush.
844 (fport_close): was local_fclose.
845 (fport_truncate): was local_ftruncate.
846 (fport_seek): was local_seek.
847 (fport_free): was local_free.
848 (fport_fill_input): was fport_fill_buffer.
849 * strports.c (st_end_input): was st_read_flush.
850 (st_truncate): was st_ftruncate.
851 * vports.c: (sf_flush): was sfflush.
852 (sf_close): was sfclose.
853 (sf_fill_input): was sf_fill_buffer.
854
855 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
856 change callers.
857
df061ffc
MD
8581999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
859
860 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
861 forms now contain the expressions to be dispatched upon instead of
862 depending on a surrounding lambda or let; Generic function
863 dispatch has been optimized; `apply' on a generic function now
864 works a little bit strangely. It uses a trick so that the type
865 dispatch code in SCM_CEVAL can be reused.
866
867 * objects.h, objects.c (scm_apply_generic_env): Added (used by
868 apply).
869 (scm_operator_p): Added.
870 (scm_sym_atdispatch): Added.
871 (scm_set_object_procedure_x): Modified to handle the new style
872 generic functions.
873 (scm_object_procedures): New debugging procedure.
874
524da6b9
MD
8751999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
876
df061ffc
MD
877 * eval.c, eval.h (scm_sym_args): Added.
878
879 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
880
eba96884
MD
881 * feature.c, feature.h (scm_c_run_hook): Added.
882
524da6b9
MD
883 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
884 cdrxnoap and loopnoap instead of begin and loop.
885
265e6a4d
GH
8861999-08-04 Gary Houston <ghouston@easynet.co.uk>
887
888 * ports.c (scm_putc, scm_puts),
889 * unif.c (scm_uniform_array_write): use scm_lfwrite.
890 * ports.c (scm_putc): change type of first argument from int to char.
891
82cc1b11
MD
8921999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
893
894 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
895 SCM_IM_HASH_DISPATCH.
896
897 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
898 (scm_si_redfined, scm_si_hashsets): Moved.
899
900 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
901 flag which combines type and status info so that the class
902 redefinition protocol has zero cost during normal execution.
903
31703ab8
GH
9041999-08-03 Gary Houston <ghouston@easynet.co.uk>
905
906 * ports.h (scm_ptob_descriptor): include a write procedure again.
907 it's more efficient for unbuffered fports (e.g., sockets.)
908
909 * ports.c (scm_puts): use ptob->write.
910 * vports.c (scm_make_sfptob): set write proc in ptob.
911 * strports.c (scm_make_stptob): set write proc in ptob.
912 * ports.c (write_void_port): new procedure.
913 * vports.c (sf_write): new procedure.
914 * ports.c (scm_lfwrite): use ptob->write.
915 * strports.c (st_write): new procedure.
916 * fports.c (fport_write): new procedure.
917 (scm_make_fptob): set write in ptob to fport_write.
918 * ports.h: prototype for scm_set_port_write.
919 * ports.c (scm_make_port_type): initialise ptob write procedure.
920 (scm_set_port_write): new proc.
921
769f054d
JB
9221999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
923
924 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
925 until we've verified that it is actually a port. (Thanks to
926 Lorentey Karoly.)
927
5678aae0
MD
9281999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
929
9ffdde1c
MD
930 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
931 code, particularly an unnecessary test (len != size, where len ==
932 size). (Was this leftovers from debugging code, or have I missed
933 something profound?)
934
5678aae0
MD
935 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
936 size. (Thanks to James Dean Palmer.)
937
938 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
939 (Thanks to Lorentey Karoly.)
940
6e1fd264
MD
9411999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
942
943 * eval.c (scm_m_expand_body): Use scm_cons_source.
944
945 * struct.c (scm_print_struct): Use vtable name.
946
947 * print.c (scm_init_print): Set name of print state type.
948
949 * stacks.c (scm_init_stacks): Set name of stack type.
950
b09ef679
MD
9511999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
952
cb4832ae
MD
953 * eval.c (SCM_CEVAL): Removed old implementation of internal
954 define.
955
956 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
957
958 * debug.c, debug.h (scm_reverse_lookup): Added.
959 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
960 internal procedure definitions; Don't use scm_i_inner_name.
961
2a52b429
MD
962 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
963 New isym operations.
964
b09ef679
MD
965 * eval.h: Added prototypes for multi language support functions.
966
967 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
968 improper lists in the low-level representation, since that will
969 cause a begin to be prepended at macro expansion.
970
2a52b429
MD
971 * eval.c (scm_cons_source): Version of cons which copies source
972 properties from an existing cell.
6e1fd264 973 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
2a52b429
MD
974
975 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
976 procedure source before calling scm_unmemocopy instead of faking
977 an environment.
978
9791998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
980
981 Ported `internal defines' fix from SCM. Original ChangeLog entry:
982
983 1998-07-09 Radey Shouman <radey@colorage.com>
984
985 * eval.c (ceval_1): Modifications to allow rewriting of interal
986 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
987 body of which it is the CAR is macro expanded by m_expand_body,
988 which rewrites internal DEFINE.
989
990 (m_expand_body): Added.
991
992 (m_macroexp1): Added argument to control error checking:
993 m_expand_body may speculatively expand forms in the wrong
994 environments. Made argument number checks conditional on
995 RECKLESS.
996
997 (m_body): Added, error checks bodies and inserts the ISYM tokens.
998
999 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
1000 call m_body.
1001
1002 (m_cond): (m_case): (m_quote): Modified to avoid destructively
1003 changing their argument forms. Since m_expand_body
1004 speculatively macro expands forms the process must be
1005 reversible.
1006
1007 (m_ident_eqp): Fixed to use proper environment.
1008
1009 (renamed_ident): Added DEFER_INTS_EGC.
1010
1011 Added prototypes for static functions.
1012
1013 * eval.c
1014
1015 (undef_cell): New.
1016
1017 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
1018 is false, do not produce an error for unbound variables, return a
1019 pointer to cell_undef instead.
1020
1021 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
1022
1023 (scm_m_body): New.
1024
1025 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
1026 destructively changing their argument forms. Since m_expand_body
1027 speculatively macro expands forms the process must be reversible.
1028
1029 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
1030 SCM_IM_LET introduced by named lets.
1031
1032 (scm_m_letstar): Use scm_m_body instead of bodycheck.
1033
1034 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
1035 scm_letrec. scm_letrec1 does not check for a null binding and
1036 takes an additional argument to specify the ISYM of the body. Use
1037 scm_m_body instead of bodycheck.
1038
1039 (scm_m_let): Use scm_m_body instead of bodycheck.
1040
1041 (scm_m_expand_body, scm_macroexp): New.
1042
1043 (unmemocopy): Account for ISYMs introduced by scm_m_body.
1044
1045 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
1046 check=1. Throw error for internal defined that have not been
1047 rewritten by scm_m_expand_body.
1048
1049 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
1050 Removed prototype for SCM_APPLY.
1051
1052 * tags.h: Added extern declaration of scm_isymnames.
b09ef679 1053
a6ba4ef8
MD
10541999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1055
1056 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
1057
1058 * lang.c: New file: Beginning of multi-language support.
1059
1060 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
1061
1062 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
1063 (scm_dynamic_wind): Added argument checking for the after guard so
1064 that we don't add garbage on the dynwind chain.
1065 (scm_swap_bindings): Added.
1066
1067 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
1068 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
1069 (scm_isymnames): New isyms for multi-language support.
1070
1071 * eval.c (scm_nil, scm_t): New symbols.
1072 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
1073 forms for multi-language support.
1074
259529f2
MD
10751999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1076
1077 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
1078 Added.
1079 Renamed functions in the random function library interface
1080 from scm_i_XXX --> scm_c_XXX.
1081
1b9c3dae
GH
10821999-07-25 Gary Houston <ghouston@easynet.co.uk>
1083
1084 * ports.c (scm_putc): fix line-buffering.
1085
544e9093
MD
10861999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1087
1088 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
1089 scm_set_ptob_XXX --> scm_set_port_XXX.
1090
f15913d0
MD
10911999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1092
1093 * ports.c, ports.h (scm_make_port_type): New interface for
1094 creation of port types (replaces scm_newptob). Just as for the
1095 smobs, we need to separate the internal representation of smob
1096 types from the interface, so that we easily can add new fields and
1097 rearrange things without caring about backward compatibility.
1098 This change was forced by the need in GOOPS to create classes
1099 representing port types.
1100 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
1101 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
1102 scm_set_ptob_seek, scm_set_ptob_truncate,
1103 scm_set_ptob_input_waiting_p): New setters.
1104 (scm_newptob): Rewritten to use scm_make_port_type. For backward
1105 compatibility.
1106 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
1107 (scm_prinport): Removed.
1108 (scm_port_print): Added.
1109 (scm_print_port_mode): Added.
1110 (void_port_ptob, print_void_port, close_void_port, noop0):
1111 Removed. Removed #include "genio.h" Added #include "objects.h",
1112 #include "smobs.h"
1113
1114 * fports.c (prinfport): Moved code from ports.c.
1115 (local_free): Added.
1116 (scm_fptob): Removed. Instead use new interface.
1117 (scm_make_fptob): Added. (Need to create basic ports in a
1118 specific order in ports.c.)
1119
1120 * strports.c (scm_stptob, prinstpt, noop0): Removed
1121 (scm_make_stptob): Added.
1122
1123 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
1124 (scm_make_sfport): Added.
1125
1126 * filesys.c (scm_dir_print): Don't use the port printing code.
1127 Instead provide specific directory printer.
1128
1129 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
1130
1131 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
1132 scm_ptob_descriptor.
1133
1134 * smob.c (scm_smob_print): Handle non-existing type name nicely.
1135 Removed #include "genio.h"
1136
1137 * objects.c (scm_make_port_classes): New function ptr.
1138
69bc9ff3
GH
11391999-07-24 Gary Houston <ghouston@easynet.co.uk>
1140
1141 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
1142
1143 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
1144 allow the 1st argument to be a fdes or filename as well as a
1145 port (as in the filesys.c version).
1146
1147 * filesys.c (scm_truncate_file): removed.
1148
096d0b15
MD
11491999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1150
1151 * readline.c, readline.h: Removed.
1152
1153 * objects.c, objects.h (scm_port_class): Added.
1154 (scm_class_of): Look up port class in scm_port_class.
1155 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
1156 SCM_INOUT_PCLASS_INDEX): Added.
1157
f15913d0
MD
1158
1159 * Makefile.am: Removed genio.c, genio.x.
1160
1161 * genio.c: Removed.
1162
aafe2718
MD
11631999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
1164
1165 * init.c: Make sure that scm_post_boot_init_modules is called only
1166 once. (Important when using a dumped image.; Thanks to Bernard
1167 Urban.)
1168
3144e1a9
JB
11691999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
1170
8e1e60f1
JB
1171 * guardians.c (scm_guardian_zombify): Separate scanning for
1172 zombies from marking the pairs of the free list.
1173
a825bb0e
JB
1174 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
1175 use the macros. (Thanks to Michael Livshin.)
1176
4d4c53ac
JB
1177 * eval.c (scm_m_lambda): Let bodycheck check the body of the
1178 lambda. Let your sins be purified by the blood of the lambda.
1179 (Thanks to Eric Hanchrow.)
1180
d9ad6919
JB
1181 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
1182 (Thanks to Valdis Kletnieks.)
1183
3144e1a9 1184