*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
e1f20ec6
JB
11999-09-11 Jim Blandy <jimb@savonarola.red-bean.com>
2
91859184
JB
3 * Makefile.am (CLEANFILES): Remove versiondat.h; that should only
4 be removed by `make distclean', since it's generated by configure.
5 * Makefile.in: Regenerated.
6 (Thanks to Robert Bihlmeyer.)
7
b142c81d
JB
8 * strop.c (scm_substring_move_x): Signal an error if start1
9 doesn't come before end1. (Thanks to Karoly Lorentey).
10
11 * numbers.c (scm_istr2flo): Don't call SCM_INEXP without first
12 calling SCM_NIMP. (Thanks to Karoly Lorentey).
13
e1f20ec6
JB
14 * version.c (scm_libguile_config_stamp): Deleted. See
15 corresponding change to ../ice-9/boot-9.scm.
91859184 16 * versiondat.h.in: Remove definition for GUILE_STAMP.
e1f20ec6
JB
17 * version.h: Delete prototype.
18 * Makefile.in: Regenerated.
19
77242ff9
GH
201999-09-11 Gary Houston <ghouston@easynet.co.uk>
21
22 * filesys.c (scm_directory_p): new procedure "directory?" Returns
23 a boolean indicating whether its argument is a directory
24 port as returned by opendir (thanks to Dirk Herrmann for the
25 suggestion.)
26
08cc62c7
MD
271999-09-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
28
29 * backtrace.c (display_frame_expr): Don't print a newline.
30 (display_frame): Print the newline here instead.
f14d3ff8
MD
31 (display_backtrace_body): Don't print "Backtrace:".
32 (scm_backtrace): Print "Backtrace:" here instead.
08cc62c7 33
bc848f7f
MD
341999-09-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
35
d37e6569
MD
36 * procs.c (scm_setter): Signal WTA if handed an entity or operator
37 lacking a setter.
38
bc848f7f
MD
39 * feature.c, feature.h: (scm_hook_p, scm_hook_empty_p): New
40 primitives. (Thanks to Greg Badros);
41 (scm_hook_to_list): New primitive; Hooks are now smobs.
42
55a7fc62
GH
431999-09-08 Gary Houston <ghouston@easynet.co.uk>
44
45 * stime.c (bdtime2c): rewrite the ASSERTs. Accept a value
46 of #f for the 10th vector element to avoid an exception
47 seen by Bernard Urban.
48 (scm_mktime): unneeded ASSERT removed.
49
4f93d84c
MD
501999-09-07 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
51
52 * eval.c (scm_map, scm_for_each): Converted to dispatch on generic
53 if args don't match.
54
55 * __scm.h (SCM_WTA_DISPATCH_n, SCM_GASSERTn): New macros.
56
7e6e146e
MD
571999-09-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
58
6065fed8
MD
59 * numbers.c: Converted comparison operations to dispatch on
60 generic if args don't match.
61
7e6e146e
MD
62 * Makefile.am (ETAGS_ARGS): Added support for GPROC and GPROC1.
63
548c5135
JB
641999-09-06 James Blandy <jimb@mule.m17n.org>
65
66 * guile-snarf.c: Deleted. Snarfing should respect CPP
67 conditionals, so it needs to actually run CPP. Bleah.
68
2a94fc36
JB
691999-09-05 James Blandy <jimb@mule.m17n.org>
70
f9dbe074
JB
71 Handle errors properly in guile-snarf. (Thanks to Han-Wen Nienhuys.)
72 * guile-snarf.in: Be sure to exit with an error if CPP does.
73 * Makefile.am (.c.x): Delete the .x file and exit with an error
74 status if guile-snarf exits with an error status.
75 * Makefile.in: Regenerated.
76
9d743bfb
JB
77 * snarf.h (SCM_GLOBAL_KEYWORD): Call scm_c_make_keyword, not
78 scm_makekey, which doesn't exist any more. Guess nobody's using
79 this.
80
2a94fc36
JB
81 * guile-snarf.c: New implementation of guile-snarf, meant to be
82 more robust than the shell script. I think it's complete, but I
83 haven't tested it at all, and I haven't changed the build process
84 to actually use it. We should compare its output against that of
85 the existing shell script, for all source files.
86
9918cf63
JB
87 * guile-snarf.c (parse_args): Abort if we haven't handled some
88 character type.
89
afbbb69c
JB
901999-09-03 James Blandy <jimb@mule.m17n.org>
91
92 * load.c (scm_search_path): If the filename has any extension at
93 all, ignore the entire list of extensions. Also, don't check whether
94 the file is accessible. If the file exists, accessible or not, we
95 should return it. Inaccessible files should cause an error later.
96 (Thanks to Keisuke Nishida for the suggestions.)
97
655f19ab
MD
981999-09-02 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
99
100 * gc.c (cleanup, scm_init_storage): Use on_exit if present and
101 atexit not available. (sunos4.1.4 needs it.)
102
b074884f 1031999-09-01 James Blandy <jimb@mule.m17n.org>
94b4c096 104
b074884f
JB
105 I take it all back --- bcopy does handle overlapping source and
106 destination areas correctly. At least on every system I could
107 find. But it is better to use AC_REPLACE_FUNCS than to introduce
108 new CPP conditionals.
109 * memmove.c: New file, implementing memmove in terms of bcopy.
110 * scmconfig.h.in: Regenerated.
a4ea22c3
JB
111
112 Allocators should use the `void *' type for generic pointers.
113 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Change
114 argument and return types.
115 * gc.h: Corresponding changes to prototypes.
116 (Thanks to Forcer.)
117
b074884f
JB
1181999-08-31 James Blandy <jimb@mule.m17n.org>
119
120 * numbers.c (scm_init_numbers): Claim to support the `complex'
121 feature, as expected by (ice-9 format). (Thanks to Ceri Storey.)
122
dd67f90b
JB
123 * Makefile.am (check-local): Set GUILE_LOAD_PATH so the tests can
124 find (ice-9 boot-9) when Guile was compiled in a separate
125 directory from the source. (Thanks to Rodney Brown.)
126 * Makefile.in: Regenerated.
127
94b4c096
JB
128 * procs.c (scm_make_subr_opt): Fix typo. Remember to multiply
129 table lengths by the size of a single element when growing the
dd67f90b 130 table. (Thanks to Bill Schottstaedt.)
94b4c096 131
fa941d9e
MD
1321999-08-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
133
134 * eval.c (SCM_CEVAL): Duplicated the method dispatch code at the
135 SCM_IM_DISPATCH form instead of calling scm_mcache_lookup_cmethod
136 since that cuts down the time for type dispatch by 50%.
137
ebc4e6cc
JB
1381999-08-30 James Blandy <jimb@mule.m17n.org>
139
140 * gh_data.c (gh_set_substr): Revert change of 1999-08-29; bcopy is
141 not a correct substitute for memmove, because it doesn't handle
142 overlapping source and destination areas on many platforms.
143 Overlaps are the primary reason to use memmove in the first place.
144 * ports.c (scm_ungetc): Same.
145 * strop.c (scm_substring_move_x): Same.
146
a7098335
MD
1471999-08-30 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
148
149 * gc.c (scm_init_storage): Skip registration of cleanup on systems
150 which lack atexit. (Is it important that cleanup is made
151 properly? Maybe we should replace all `exit' with `scm_exit' and
152 call cleanup there?)
153
154 * struct.c, struct.h (scm_struct_free_0, scm_struct_free_light,
155 scm_struct_free_standard, scm_struct_free_entity): Declared to
156 return scm_sizet instead of size_t.
157
158 * gdbint.c, strports.c: #include <unistd.h>. (SEEK_SET is defined
159 there on sunos4.1.4.)
160
9a26d6f9
MD
1611999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
162
163 * numbers.c (scm_lcm): Bugfix: BIGDIG --> SCM_BIGDIG;
164 Account for the case when second argument is unbound.
165
166 * strorder.c (scm_string_less_p, scm_string_ci_less_p): Bugfix.
167 (Thanks to Karoly Lorentey.)
168
169 * gh_data.c, ports.c, strop.c: Alternatively use bcopy if memmove
b074884f 170 isn't present. (Thanks to Suzuki Toshiya.)
9a26d6f9
MD
171
172 * ports.c: Use ANSI C prototypes in definitions. (Thanks to
173 Bernard Urban.)
174
747117b0
MD
175 * filesys.c (scm_stat2scm): Conditionally use S_ISLNK. (Thanks to
176 Bernard Urban.)
9a26d6f9
MD
177
178 * dynl-dl.c (RTLD_GLOBAL): Define if non-existent. (Thanks to
179 Bernard Urban and Ian Grant.)
180
181 * Makefile.am (libguile_la_LDFLAGS): Bumped libguile version
182 again. (1.3.4 will be binary incompatible with 1.3.2 because of a
183 change in the representation of entities and operators.)
184
6e2e75db
GH
1851999-08-29 Gary Houston <ghouston@easynet.co.uk>
186
187 * ports.c (scm_ungetc): bugfix: if putback_buf is NULL
5c4fe34f 188 don't allocate zero bytes (thanks to Bill Schottstaedt).
6e2e75db 189
c5b738b5
MD
1901999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
191
a48a7629
MD
192 * procs.c (scm_setter): Converted to use generic dispatch.
193
194 * eval.c, eval.h: Bugfix: scm_sym_apply was not initialized
195 correctly.
196
197 * load.c (scm_search_path): Don't try extensions which already are
198 present at the end of the filename.
199 (scm_init_load): Check .scm first. (Thanks to Keisuke Nishida.)
200
201 * stacks.c (scm_sym_apply): Removed. (Thanks to Ken Raeburn.)
202
c5b738b5
MD
203 Cleanup and simplification of generic method dispatch.
204 Also, the quadruple representation of entity and operator
205 procedures has been replaced with single.
206
207 * tags.h (SCM_IM_HASH_DISPATCH): Removed.
208
209 * print.c (scm_isymnames): Removed #@hash-dispatch.
210
211 * objects.c, objects.h (scm_mcache_lookup_cmethod): Moved here
212 from eval.c; Support 0 arity methods.
213 (scm_set_object_procedure_x): Removed scm_sym_atdispatch;
214 (scm_apply_generic_env): Removed.
215 Replaced slots proc0-3 with procedure.
216
217 * objects.h (SCM_OPERATOR_PROC_0, SCM_OPERATOR_PROC_1,
218 SCM_OPERATOR_PROC_2, SCM_OPERATOR_PROC_3): Replaced by
219 SCM_OPERATOR_PROCEDURE.
220 (SCM_ENTITY_PROC_0, SCM_ENTITY_PROC_1, SCM_ENTITY_PROC_2,
221 SCM_ENTITY_PROC_3): Replaced by SCM_ENTITY_PROCEDURE.
222
223 * struct.c, struct.h: Replace 4 procedure slots with one.
224 (scm_struct_i_procedure): Replaces scm_struct_i_procedure.
225
226 * gc.c (scm_gc_mark): Mark 1 procedure slot in entities instead of
227 4.
228
229 * eval.c (scm_sym_args): Removed.
230 (SCM_CEVAL): Simplified entity application.
231 Moved dispatch code to objects.c.
232
233 * procprop.c (scm_i_procedure_arity): Bugfix: Handle generics.
234
375c11a3
MD
2351999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
236
237 * sort.c (closureless): Use scm_eval_body.
238
239 * eval.c (SCM_APPLY): Fixed serious evaluator bug: If a closure
240 with a symbol as last form was first called normally and then via
241 `map' or some other mechanism using primitive apply, an ILOC was
242 returned.
243
9de33deb
MD
2441999-08-26 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
245
246 This change extends the representation of primitive procedures
247 with more data fields, e.g. a place for documentation and true
248 procedure properties.
249
250 * procs.c, procs.h (scm_subr_entry): New type: Stores data
251 associated with subrs.
252 (SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS,
253 SCM_SUBR_DOC): New macros.
254 (scm_subr_table): New variable.
255 (scm_mark_subr_table): New function.
256
257 * init.c (scm_boot_guile_1): Call scm_init_subr_table.
258
259 * gc.c (scm_gc_mark): Don't mark subr names here.
260 (scm_igc): Call scm_mark_subr_table.
261
262
263 This change implements a scheme for letting a generic work as a
264 shadow for a primitive procedure. If the primitive procedure
265 can't dispatch on its arguments, control is left over to the
266 generic. Normal wrong type arg errors will be generated until the
267 user has hung the first method on the primitive.
268
269 * snarf.h (SCM_GPROC, SCM_GPROC1): New macros.
270
271 * procs.c, procs.h (scm_subr_p): New function (used internally).
272
273 * gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function.
274
275 * objects.c, objects.h (scm_primitive_generic): New class.
276
277 * objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros.
278
279 * print.c (scm_iprin1): Print primitive-generics.
280
281 * __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1,
282 SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros.
283
284 * eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta -->
285 SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point
286 primitives). NOTE: This means that it is now *required* to use
287 SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an
288 obscured representation that will be removed in the future anyway,
289 so backward compatibility is no problem here).
290
291 * numbers.c: Converted most numeric primitives (all but bit
292 comparison operations and bit operations) to dispatch on generic
293 if args don't match.
294
295
296 Better support for applying generic functions.
297
298 * eval.c, eval.h (scm_eval_body): New function.
299
300 * objects.c (scm_call_generic_0, scm_call_generic_1,
301 scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New
302 functions.
303
304
305 Optimization of the generic function dispatch mechanism.
306
307 * eval.c (SCM_CEVAL): Apply the cmethod directly after having
308 called scm_memoize_method instead of doing a second lookup.
309
310 * objects.h (scm_memoize_method): Now returns the memoized cmethod.
311
312
313 Bugfix
314
315 * procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of
316 scm_sysintern so that the binding connected with the subr name
317 isn't cleared when we give set = 0.
318
319
07910014
MD
3201999-08-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
321
9de33deb
MD
322 More transparent handling of ports with print states.
323
07910014
MD
324 * print.h (SCM_PORT_WITH_PS_P, SCM_PORT_WITH_PS_PORT,
325 SCM_PORT_WITH_PS_PS): Represent ports with print states as a smob
326 instead of a pair of a port and a print state. We'll need to cons
327 once extra in scm_printer_apply but the type system will be
328 cleaner, it will mix better with GOOPS, and, it will be even more
329 transparent to the user.
330
331 * print.c (scm_get_print_state): New procedure: Given an output
332 port, return the print state associated to it in the current print
333 chain, if one exists;
334 (scm_port_with_print_state): New procedure: Associate a
335 print-state with a port.
336 (scm_valid_oport_value_p): Use SCM_PORT_WITH_PS_P;
337 (scm_printer_apply): Wrap port and pstate as a smob;
338 (print_state_printer): Removed.
339
340 * objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports.
341
342 * eval.c (scm_init_eval): Use scm_make_smob_type instead of
343 scm_newsmob.
344
345 * ports.c (scm_output_port_p): Bugfix: Coerce output port before
346 testing (otherwise the port-print-state trick won't be transparent
347 to the user; one example where this caused problems was in the
348 (ice-9 format) module).
349
e2e470cf
MD
3501999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
351
352 * eval.c (SCM_CEVAL): Let the SCM_IM_SLOT_SET_X form return
353 SCM_UNSPECIFIED instead of the set value.
354
a343458d
JB
3551999-08-20 James Blandy <jimb@mule.m17n.org>
356
f8c9d497
JB
357 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.
358
a343458d
JB
359 * ports.h (enum scm_port_rw_active): New enum, containing
360 SCM_PORT_READ, SCM_PORT_WRITE, and SCM_PORT_NEITHER (instead of
361 zero). The debugger knows about enums, but doesn't know about
362 #defines.
363 (typedef scm_port): Declare rw_active member to be an enum
364 scm_port_rw_active.
365 * fports.c (fport_flush, fport_end_input): Use SCM_PORT_NEITHER
366 instead of zero.
367 * ports.c (scm_add_to_port_table): Same.
368 * strports.c (st_flush, st_end_input): Same.
369
370 * ioext.c (scm_do_read_line, scm_read_line): Use scm_must_malloc,
371 scm_must_realloc, and scm_done_malloc as appropriate.
372
dc4ddb33
MD
3731999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
374
375 * sort.c (quicksort): Added condition to protect the algorithm
376 from crashing the interpreter if the less predicate is buggy.
377
d3639214
GH
3781999-08-19 Gary Houston <ghouston@easynet.co.uk>
379
380 * fports.c (fport_write): fix line-buffering mode again.
381 (scm_open_file): recognise 'l' for line-buffering.
382 (scm_setvbuf): recognise _IOLBF for line-buffering.
383
3817c7ce
MD
3841999-08-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
385
266bf340
MD
386 * Makefile.am (libguile_la_LDFLAGS): Increased the version number
387 of libguile to 5.0.
388
3817c7ce
MD
389 * eval.c (SCM_APPLY), sort.c (closureless): Expand body when
390 evaluating closures.
391
162d88ca
GH
3921999-08-18 Gary Houston <ghouston@easynet.co.uk>
393
394 * fports.c (fport_write): use memcpy instead of strncpy, in case
395 the data contains NUL.
396
cce0d8d0
MD
3971999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
398
59c49e10
MD
399 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
400
cce0d8d0
MD
401 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
402 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
403 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
404 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
405 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
406 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
407 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
408 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
409 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
410 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
411 scm_sym_ as prefix for symbols.
412
413 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
414
415 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
416 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
417 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
418 scm_sym_atcall_cc): Made global.
419
8b7840b9
MD
4201999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
421
422 * eval.c (scm_sym_args): Made global.
423
424 * objects.c (scm_set_object_procedure_x): Disallow setting of
425 procedures for pure generic functions.
426
c94577b4
GH
4271999-08-12 Gary Houston <ghouston@easynet.co.uk>
428
429 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
430 Scheme name from lseek to seek, but lseek was added recently so
431 it shouldn't be a big problem.
432 * ports.c, gdbint.c, ioext.c: changed callers.
433
affc96b5
GH
4341999-08-11 Gary Houston <ghouston@easynet.co.uk>
435
436 * fports.c (fport_input_waiting): if select is used, return 1
437 instead of whatever FD_ISSET expands to. maybe it will be useful
438 to interpret the value from the input_waiting ptob procedure as a
439 lower bound on the number of bytes available.
440
441 * Mikael asked for a few names to be changed...
442
443 * ports.c (scm_make_port_type): take the write procedure as the
444 second argument instead of the flush procedure.
445 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
446 fflush -> flush, read_flush -> end_input, fclose -> close,
447 fill_buffer -> fill_input, ftruncate -> truncate,
448 input_waiting_p -> input_waiting.
449
450 * ports.c (end_input_void_port): was read_flush_void_port.
451 (scm_set_port_end_input): was scm_set_port_flush_input.
452 (scm_set_port_flush): was scm_set_port_write.
453 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
454 (scm_end_input): was scm_read_flush.
455 (scm_fill_input): was scm_fill_buffer.
456 (scm_flush): was scm_fflush.
457 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
458 (fport_end_input): was local_read_flush.
459 (fport_flush): was local_fflush.
460 (fport_close): was local_fclose.
461 (fport_truncate): was local_ftruncate.
462 (fport_seek): was local_seek.
463 (fport_free): was local_free.
464 (fport_fill_input): was fport_fill_buffer.
465 * strports.c (st_end_input): was st_read_flush.
466 (st_truncate): was st_ftruncate.
467 * vports.c: (sf_flush): was sfflush.
468 (sf_close): was sfclose.
469 (sf_fill_input): was sf_fill_buffer.
470
471 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
472 change callers.
473
df061ffc
MD
4741999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
475
476 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
477 forms now contain the expressions to be dispatched upon instead of
478 depending on a surrounding lambda or let; Generic function
479 dispatch has been optimized; `apply' on a generic function now
480 works a little bit strangely. It uses a trick so that the type
481 dispatch code in SCM_CEVAL can be reused.
482
483 * objects.h, objects.c (scm_apply_generic_env): Added (used by
484 apply).
485 (scm_operator_p): Added.
486 (scm_sym_atdispatch): Added.
487 (scm_set_object_procedure_x): Modified to handle the new style
488 generic functions.
489 (scm_object_procedures): New debugging procedure.
490
524da6b9
MD
4911999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
492
df061ffc
MD
493 * eval.c, eval.h (scm_sym_args): Added.
494
495 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
496
eba96884
MD
497 * feature.c, feature.h (scm_c_run_hook): Added.
498
524da6b9
MD
499 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
500 cdrxnoap and loopnoap instead of begin and loop.
501
265e6a4d
GH
5021999-08-04 Gary Houston <ghouston@easynet.co.uk>
503
504 * ports.c (scm_putc, scm_puts),
505 * unif.c (scm_uniform_array_write): use scm_lfwrite.
506 * ports.c (scm_putc): change type of first argument from int to char.
507
82cc1b11
MD
5081999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
509
510 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
511 SCM_IM_HASH_DISPATCH.
512
513 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
514 (scm_si_redfined, scm_si_hashsets): Moved.
515
516 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
517 flag which combines type and status info so that the class
518 redefinition protocol has zero cost during normal execution.
519
31703ab8
GH
5201999-08-03 Gary Houston <ghouston@easynet.co.uk>
521
522 * ports.h (scm_ptob_descriptor): include a write procedure again.
523 it's more efficient for unbuffered fports (e.g., sockets.)
524
525 * ports.c (scm_puts): use ptob->write.
526 * vports.c (scm_make_sfptob): set write proc in ptob.
527 * strports.c (scm_make_stptob): set write proc in ptob.
528 * ports.c (write_void_port): new procedure.
529 * vports.c (sf_write): new procedure.
530 * ports.c (scm_lfwrite): use ptob->write.
531 * strports.c (st_write): new procedure.
532 * fports.c (fport_write): new procedure.
533 (scm_make_fptob): set write in ptob to fport_write.
534 * ports.h: prototype for scm_set_port_write.
535 * ports.c (scm_make_port_type): initialise ptob write procedure.
536 (scm_set_port_write): new proc.
537
769f054d
JB
5381999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
539
540 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
541 until we've verified that it is actually a port. (Thanks to
542 Lorentey Karoly.)
543
5678aae0
MD
5441999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
545
9ffdde1c
MD
546 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
547 code, particularly an unnecessary test (len != size, where len ==
548 size). (Was this leftovers from debugging code, or have I missed
549 something profound?)
550
5678aae0
MD
551 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
552 size. (Thanks to James Dean Palmer.)
553
554 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
555 (Thanks to Lorentey Karoly.)
556
6e1fd264
MD
5571999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
558
559 * eval.c (scm_m_expand_body): Use scm_cons_source.
560
561 * struct.c (scm_print_struct): Use vtable name.
562
563 * print.c (scm_init_print): Set name of print state type.
564
565 * stacks.c (scm_init_stacks): Set name of stack type.
566
b09ef679
MD
5671999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
568
cb4832ae
MD
569 * eval.c (SCM_CEVAL): Removed old implementation of internal
570 define.
571
572 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
573
574 * debug.c, debug.h (scm_reverse_lookup): Added.
575 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
576 internal procedure definitions; Don't use scm_i_inner_name.
577
2a52b429
MD
578 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
579 New isym operations.
580
b09ef679
MD
581 * eval.h: Added prototypes for multi language support functions.
582
583 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
584 improper lists in the low-level representation, since that will
585 cause a begin to be prepended at macro expansion.
586
2a52b429
MD
587 * eval.c (scm_cons_source): Version of cons which copies source
588 properties from an existing cell.
6e1fd264 589 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
2a52b429
MD
590
591 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
592 procedure source before calling scm_unmemocopy instead of faking
593 an environment.
594
5951998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
596
597 Ported `internal defines' fix from SCM. Original ChangeLog entry:
598
599 1998-07-09 Radey Shouman <radey@colorage.com>
600
601 * eval.c (ceval_1): Modifications to allow rewriting of interal
602 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
603 body of which it is the CAR is macro expanded by m_expand_body,
604 which rewrites internal DEFINE.
605
606 (m_expand_body): Added.
607
608 (m_macroexp1): Added argument to control error checking:
609 m_expand_body may speculatively expand forms in the wrong
610 environments. Made argument number checks conditional on
611 RECKLESS.
612
613 (m_body): Added, error checks bodies and inserts the ISYM tokens.
614
615 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
616 call m_body.
617
618 (m_cond): (m_case): (m_quote): Modified to avoid destructively
619 changing their argument forms. Since m_expand_body
620 speculatively macro expands forms the process must be
621 reversible.
622
623 (m_ident_eqp): Fixed to use proper environment.
624
625 (renamed_ident): Added DEFER_INTS_EGC.
626
627 Added prototypes for static functions.
628
629 * eval.c
630
631 (undef_cell): New.
632
633 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
634 is false, do not produce an error for unbound variables, return a
635 pointer to cell_undef instead.
636
637 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
638
639 (scm_m_body): New.
640
641 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
642 destructively changing their argument forms. Since m_expand_body
643 speculatively macro expands forms the process must be reversible.
644
645 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
646 SCM_IM_LET introduced by named lets.
647
648 (scm_m_letstar): Use scm_m_body instead of bodycheck.
649
650 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
651 scm_letrec. scm_letrec1 does not check for a null binding and
652 takes an additional argument to specify the ISYM of the body. Use
653 scm_m_body instead of bodycheck.
654
655 (scm_m_let): Use scm_m_body instead of bodycheck.
656
657 (scm_m_expand_body, scm_macroexp): New.
658
659 (unmemocopy): Account for ISYMs introduced by scm_m_body.
660
661 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
662 check=1. Throw error for internal defined that have not been
663 rewritten by scm_m_expand_body.
664
665 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
666 Removed prototype for SCM_APPLY.
667
668 * tags.h: Added extern declaration of scm_isymnames.
b09ef679 669
a6ba4ef8
MD
6701999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
671
672 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
673
674 * lang.c: New file: Beginning of multi-language support.
675
676 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
677
678 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
679 (scm_dynamic_wind): Added argument checking for the after guard so
680 that we don't add garbage on the dynwind chain.
681 (scm_swap_bindings): Added.
682
683 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
684 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
685 (scm_isymnames): New isyms for multi-language support.
686
687 * eval.c (scm_nil, scm_t): New symbols.
688 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
689 forms for multi-language support.
690
259529f2
MD
6911999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
692
693 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
694 Added.
695 Renamed functions in the random function library interface
696 from scm_i_XXX --> scm_c_XXX.
697
1b9c3dae
GH
6981999-07-25 Gary Houston <ghouston@easynet.co.uk>
699
700 * ports.c (scm_putc): fix line-buffering.
701
544e9093
MD
7021999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
703
704 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
705 scm_set_ptob_XXX --> scm_set_port_XXX.
706
f15913d0
MD
7071999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
708
709 * ports.c, ports.h (scm_make_port_type): New interface for
710 creation of port types (replaces scm_newptob). Just as for the
711 smobs, we need to separate the internal representation of smob
712 types from the interface, so that we easily can add new fields and
713 rearrange things without caring about backward compatibility.
714 This change was forced by the need in GOOPS to create classes
715 representing port types.
716 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
717 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
718 scm_set_ptob_seek, scm_set_ptob_truncate,
719 scm_set_ptob_input_waiting_p): New setters.
720 (scm_newptob): Rewritten to use scm_make_port_type. For backward
721 compatibility.
722 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
723 (scm_prinport): Removed.
724 (scm_port_print): Added.
725 (scm_print_port_mode): Added.
726 (void_port_ptob, print_void_port, close_void_port, noop0):
727 Removed. Removed #include "genio.h" Added #include "objects.h",
728 #include "smobs.h"
729
730 * fports.c (prinfport): Moved code from ports.c.
731 (local_free): Added.
732 (scm_fptob): Removed. Instead use new interface.
733 (scm_make_fptob): Added. (Need to create basic ports in a
734 specific order in ports.c.)
735
736 * strports.c (scm_stptob, prinstpt, noop0): Removed
737 (scm_make_stptob): Added.
738
739 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
740 (scm_make_sfport): Added.
741
742 * filesys.c (scm_dir_print): Don't use the port printing code.
743 Instead provide specific directory printer.
744
745 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
746
747 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
748 scm_ptob_descriptor.
749
750 * smob.c (scm_smob_print): Handle non-existing type name nicely.
751 Removed #include "genio.h"
752
753 * objects.c (scm_make_port_classes): New function ptr.
754
69bc9ff3
GH
7551999-07-24 Gary Houston <ghouston@easynet.co.uk>
756
757 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
758
759 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
760 allow the 1st argument to be a fdes or filename as well as a
761 port (as in the filesys.c version).
762
763 * filesys.c (scm_truncate_file): removed.
764
096d0b15
MD
7651999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
766
767 * readline.c, readline.h: Removed.
768
769 * objects.c, objects.h (scm_port_class): Added.
770 (scm_class_of): Look up port class in scm_port_class.
771 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
772 SCM_INOUT_PCLASS_INDEX): Added.
773
f15913d0
MD
774
775 * Makefile.am: Removed genio.c, genio.x.
776
777 * genio.c: Removed.
778
aafe2718
MD
7791999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
780
781 * init.c: Make sure that scm_post_boot_init_modules is called only
782 once. (Important when using a dumped image.; Thanks to Bernard
783 Urban.)
784
3144e1a9
JB
7851999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
786
8e1e60f1
JB
787 * guardians.c (scm_guardian_zombify): Separate scanning for
788 zombies from marking the pairs of the free list.
789
a825bb0e
JB
790 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
791 use the macros. (Thanks to Michael Livshin.)
792
4d4c53ac
JB
793 * eval.c (scm_m_lambda): Let bodycheck check the body of the
794 lambda. Let your sins be purified by the blood of the lambda.
795 (Thanks to Eric Hanchrow.)
796
d9ad6919
JB
797 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
798 (Thanks to Valdis Kletnieks.)
799
3144e1a9 800