* print.h (SCM_PORT_WITH_PS_P, SCM_PORT_WITH_PS_PORT,
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
e2e470cf
MD
11999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2
3 * eval.c (SCM_CEVAL): Let the SCM_IM_SLOT_SET_X form return
4 SCM_UNSPECIFIED instead of the set value.
5
a343458d
JB
61999-08-20 James Blandy <jimb@mule.m17n.org>
7
f8c9d497
JB
8 * load.c (scm_init_load_path): Remove support for SCHEME_LOAD_PATH.
9
a343458d
JB
10 * ports.h (enum scm_port_rw_active): New enum, containing
11 SCM_PORT_READ, SCM_PORT_WRITE, and SCM_PORT_NEITHER (instead of
12 zero). The debugger knows about enums, but doesn't know about
13 #defines.
14 (typedef scm_port): Declare rw_active member to be an enum
15 scm_port_rw_active.
16 * fports.c (fport_flush, fport_end_input): Use SCM_PORT_NEITHER
17 instead of zero.
18 * ports.c (scm_add_to_port_table): Same.
19 * strports.c (st_flush, st_end_input): Same.
20
21 * ioext.c (scm_do_read_line, scm_read_line): Use scm_must_malloc,
22 scm_must_realloc, and scm_done_malloc as appropriate.
23
dc4ddb33
MD
241999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
25
26 * sort.c (quicksort): Added condition to protect the algorithm
27 from crashing the interpreter if the less predicate is buggy.
28
d3639214
GH
291999-08-19 Gary Houston <ghouston@easynet.co.uk>
30
31 * fports.c (fport_write): fix line-buffering mode again.
32 (scm_open_file): recognise 'l' for line-buffering.
33 (scm_setvbuf): recognise _IOLBF for line-buffering.
34
3817c7ce
MD
351999-08-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
36
266bf340
MD
37 * Makefile.am (libguile_la_LDFLAGS): Increased the version number
38 of libguile to 5.0.
39
3817c7ce
MD
40 * eval.c (SCM_APPLY), sort.c (closureless): Expand body when
41 evaluating closures.
42
162d88ca
GH
431999-08-18 Gary Houston <ghouston@easynet.co.uk>
44
45 * fports.c (fport_write): use memcpy instead of strncpy, in case
46 the data contains NUL.
47
cce0d8d0
MD
481999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
49
59c49e10
MD
50 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
51
cce0d8d0
MD
52 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
53 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
54 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
55 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
56 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
57 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
58 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
59 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
60 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
61 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
62 scm_sym_ as prefix for symbols.
63
64 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
65
66 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
67 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
68 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
69 scm_sym_atcall_cc): Made global.
70
8b7840b9
MD
711999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
72
73 * eval.c (scm_sym_args): Made global.
74
75 * objects.c (scm_set_object_procedure_x): Disallow setting of
76 procedures for pure generic functions.
77
c94577b4
GH
781999-08-12 Gary Houston <ghouston@easynet.co.uk>
79
80 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
81 Scheme name from lseek to seek, but lseek was added recently so
82 it shouldn't be a big problem.
83 * ports.c, gdbint.c, ioext.c: changed callers.
84
affc96b5
GH
851999-08-11 Gary Houston <ghouston@easynet.co.uk>
86
87 * fports.c (fport_input_waiting): if select is used, return 1
88 instead of whatever FD_ISSET expands to. maybe it will be useful
89 to interpret the value from the input_waiting ptob procedure as a
90 lower bound on the number of bytes available.
91
92 * Mikael asked for a few names to be changed...
93
94 * ports.c (scm_make_port_type): take the write procedure as the
95 second argument instead of the flush procedure.
96 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
97 fflush -> flush, read_flush -> end_input, fclose -> close,
98 fill_buffer -> fill_input, ftruncate -> truncate,
99 input_waiting_p -> input_waiting.
100
101 * ports.c (end_input_void_port): was read_flush_void_port.
102 (scm_set_port_end_input): was scm_set_port_flush_input.
103 (scm_set_port_flush): was scm_set_port_write.
104 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
105 (scm_end_input): was scm_read_flush.
106 (scm_fill_input): was scm_fill_buffer.
107 (scm_flush): was scm_fflush.
108 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
109 (fport_end_input): was local_read_flush.
110 (fport_flush): was local_fflush.
111 (fport_close): was local_fclose.
112 (fport_truncate): was local_ftruncate.
113 (fport_seek): was local_seek.
114 (fport_free): was local_free.
115 (fport_fill_input): was fport_fill_buffer.
116 * strports.c (st_end_input): was st_read_flush.
117 (st_truncate): was st_ftruncate.
118 * vports.c: (sf_flush): was sfflush.
119 (sf_close): was sfclose.
120 (sf_fill_input): was sf_fill_buffer.
121
122 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
123 change callers.
124
df061ffc
MD
1251999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
126
127 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
128 forms now contain the expressions to be dispatched upon instead of
129 depending on a surrounding lambda or let; Generic function
130 dispatch has been optimized; `apply' on a generic function now
131 works a little bit strangely. It uses a trick so that the type
132 dispatch code in SCM_CEVAL can be reused.
133
134 * objects.h, objects.c (scm_apply_generic_env): Added (used by
135 apply).
136 (scm_operator_p): Added.
137 (scm_sym_atdispatch): Added.
138 (scm_set_object_procedure_x): Modified to handle the new style
139 generic functions.
140 (scm_object_procedures): New debugging procedure.
141
524da6b9
MD
1421999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
143
df061ffc
MD
144 * eval.c, eval.h (scm_sym_args): Added.
145
146 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
147
eba96884
MD
148 * feature.c, feature.h (scm_c_run_hook): Added.
149
524da6b9
MD
150 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
151 cdrxnoap and loopnoap instead of begin and loop.
152
265e6a4d
GH
1531999-08-04 Gary Houston <ghouston@easynet.co.uk>
154
155 * ports.c (scm_putc, scm_puts),
156 * unif.c (scm_uniform_array_write): use scm_lfwrite.
157 * ports.c (scm_putc): change type of first argument from int to char.
158
82cc1b11
MD
1591999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
160
161 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
162 SCM_IM_HASH_DISPATCH.
163
164 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
165 (scm_si_redfined, scm_si_hashsets): Moved.
166
167 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
168 flag which combines type and status info so that the class
169 redefinition protocol has zero cost during normal execution.
170
31703ab8
GH
1711999-08-03 Gary Houston <ghouston@easynet.co.uk>
172
173 * ports.h (scm_ptob_descriptor): include a write procedure again.
174 it's more efficient for unbuffered fports (e.g., sockets.)
175
176 * ports.c (scm_puts): use ptob->write.
177 * vports.c (scm_make_sfptob): set write proc in ptob.
178 * strports.c (scm_make_stptob): set write proc in ptob.
179 * ports.c (write_void_port): new procedure.
180 * vports.c (sf_write): new procedure.
181 * ports.c (scm_lfwrite): use ptob->write.
182 * strports.c (st_write): new procedure.
183 * fports.c (fport_write): new procedure.
184 (scm_make_fptob): set write in ptob to fport_write.
185 * ports.h: prototype for scm_set_port_write.
186 * ports.c (scm_make_port_type): initialise ptob write procedure.
187 (scm_set_port_write): new proc.
188
769f054d
JB
1891999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
190
191 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
192 until we've verified that it is actually a port. (Thanks to
193 Lorentey Karoly.)
194
5678aae0
MD
1951999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
196
9ffdde1c
MD
197 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
198 code, particularly an unnecessary test (len != size, where len ==
199 size). (Was this leftovers from debugging code, or have I missed
200 something profound?)
201
5678aae0
MD
202 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
203 size. (Thanks to James Dean Palmer.)
204
205 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
206 (Thanks to Lorentey Karoly.)
207
6e1fd264
MD
2081999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
209
210 * eval.c (scm_m_expand_body): Use scm_cons_source.
211
212 * struct.c (scm_print_struct): Use vtable name.
213
214 * print.c (scm_init_print): Set name of print state type.
215
216 * stacks.c (scm_init_stacks): Set name of stack type.
217
b09ef679
MD
2181999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
219
cb4832ae
MD
220 * eval.c (SCM_CEVAL): Removed old implementation of internal
221 define.
222
223 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
224
225 * debug.c, debug.h (scm_reverse_lookup): Added.
226 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
227 internal procedure definitions; Don't use scm_i_inner_name.
228
2a52b429
MD
229 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
230 New isym operations.
231
b09ef679
MD
232 * eval.h: Added prototypes for multi language support functions.
233
234 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
235 improper lists in the low-level representation, since that will
236 cause a begin to be prepended at macro expansion.
237
2a52b429
MD
238 * eval.c (scm_cons_source): Version of cons which copies source
239 properties from an existing cell.
6e1fd264 240 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
2a52b429
MD
241
242 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
243 procedure source before calling scm_unmemocopy instead of faking
244 an environment.
245
2461998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
247
248 Ported `internal defines' fix from SCM. Original ChangeLog entry:
249
250 1998-07-09 Radey Shouman <radey@colorage.com>
251
252 * eval.c (ceval_1): Modifications to allow rewriting of interal
253 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
254 body of which it is the CAR is macro expanded by m_expand_body,
255 which rewrites internal DEFINE.
256
257 (m_expand_body): Added.
258
259 (m_macroexp1): Added argument to control error checking:
260 m_expand_body may speculatively expand forms in the wrong
261 environments. Made argument number checks conditional on
262 RECKLESS.
263
264 (m_body): Added, error checks bodies and inserts the ISYM tokens.
265
266 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
267 call m_body.
268
269 (m_cond): (m_case): (m_quote): Modified to avoid destructively
270 changing their argument forms. Since m_expand_body
271 speculatively macro expands forms the process must be
272 reversible.
273
274 (m_ident_eqp): Fixed to use proper environment.
275
276 (renamed_ident): Added DEFER_INTS_EGC.
277
278 Added prototypes for static functions.
279
280 * eval.c
281
282 (undef_cell): New.
283
284 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
285 is false, do not produce an error for unbound variables, return a
286 pointer to cell_undef instead.
287
288 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
289
290 (scm_m_body): New.
291
292 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
293 destructively changing their argument forms. Since m_expand_body
294 speculatively macro expands forms the process must be reversible.
295
296 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
297 SCM_IM_LET introduced by named lets.
298
299 (scm_m_letstar): Use scm_m_body instead of bodycheck.
300
301 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
302 scm_letrec. scm_letrec1 does not check for a null binding and
303 takes an additional argument to specify the ISYM of the body. Use
304 scm_m_body instead of bodycheck.
305
306 (scm_m_let): Use scm_m_body instead of bodycheck.
307
308 (scm_m_expand_body, scm_macroexp): New.
309
310 (unmemocopy): Account for ISYMs introduced by scm_m_body.
311
312 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
313 check=1. Throw error for internal defined that have not been
314 rewritten by scm_m_expand_body.
315
316 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
317 Removed prototype for SCM_APPLY.
318
319 * tags.h: Added extern declaration of scm_isymnames.
b09ef679 320
a6ba4ef8
MD
3211999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
322
323 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
324
325 * lang.c: New file: Beginning of multi-language support.
326
327 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
328
329 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
330 (scm_dynamic_wind): Added argument checking for the after guard so
331 that we don't add garbage on the dynwind chain.
332 (scm_swap_bindings): Added.
333
334 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
335 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
336 (scm_isymnames): New isyms for multi-language support.
337
338 * eval.c (scm_nil, scm_t): New symbols.
339 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
340 forms for multi-language support.
341
259529f2
MD
3421999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
343
344 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
345 Added.
346 Renamed functions in the random function library interface
347 from scm_i_XXX --> scm_c_XXX.
348
1b9c3dae
GH
3491999-07-25 Gary Houston <ghouston@easynet.co.uk>
350
351 * ports.c (scm_putc): fix line-buffering.
352
544e9093
MD
3531999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
354
355 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
356 scm_set_ptob_XXX --> scm_set_port_XXX.
357
f15913d0
MD
3581999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
359
360 * ports.c, ports.h (scm_make_port_type): New interface for
361 creation of port types (replaces scm_newptob). Just as for the
362 smobs, we need to separate the internal representation of smob
363 types from the interface, so that we easily can add new fields and
364 rearrange things without caring about backward compatibility.
365 This change was forced by the need in GOOPS to create classes
366 representing port types.
367 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
368 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
369 scm_set_ptob_seek, scm_set_ptob_truncate,
370 scm_set_ptob_input_waiting_p): New setters.
371 (scm_newptob): Rewritten to use scm_make_port_type. For backward
372 compatibility.
373 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
374 (scm_prinport): Removed.
375 (scm_port_print): Added.
376 (scm_print_port_mode): Added.
377 (void_port_ptob, print_void_port, close_void_port, noop0):
378 Removed. Removed #include "genio.h" Added #include "objects.h",
379 #include "smobs.h"
380
381 * fports.c (prinfport): Moved code from ports.c.
382 (local_free): Added.
383 (scm_fptob): Removed. Instead use new interface.
384 (scm_make_fptob): Added. (Need to create basic ports in a
385 specific order in ports.c.)
386
387 * strports.c (scm_stptob, prinstpt, noop0): Removed
388 (scm_make_stptob): Added.
389
390 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
391 (scm_make_sfport): Added.
392
393 * filesys.c (scm_dir_print): Don't use the port printing code.
394 Instead provide specific directory printer.
395
396 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
397
398 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
399 scm_ptob_descriptor.
400
401 * smob.c (scm_smob_print): Handle non-existing type name nicely.
402 Removed #include "genio.h"
403
404 * objects.c (scm_make_port_classes): New function ptr.
405
69bc9ff3
GH
4061999-07-24 Gary Houston <ghouston@easynet.co.uk>
407
408 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
409
410 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
411 allow the 1st argument to be a fdes or filename as well as a
412 port (as in the filesys.c version).
413
414 * filesys.c (scm_truncate_file): removed.
415
096d0b15
MD
4161999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
417
418 * readline.c, readline.h: Removed.
419
420 * objects.c, objects.h (scm_port_class): Added.
421 (scm_class_of): Look up port class in scm_port_class.
422 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
423 SCM_INOUT_PCLASS_INDEX): Added.
424
f15913d0
MD
425
426 * Makefile.am: Removed genio.c, genio.x.
427
428 * genio.c: Removed.
429
aafe2718
MD
4301999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
431
432 * init.c: Make sure that scm_post_boot_init_modules is called only
433 once. (Important when using a dumped image.; Thanks to Bernard
434 Urban.)
435
3144e1a9
JB
4361999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
437
8e1e60f1
JB
438 * guardians.c (scm_guardian_zombify): Separate scanning for
439 zombies from marking the pairs of the free list.
440
a825bb0e
JB
441 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
442 use the macros. (Thanks to Michael Livshin.)
443
4d4c53ac
JB
444 * eval.c (scm_m_lambda): Let bodycheck check the body of the
445 lambda. Let your sins be purified by the blood of the lambda.
446 (Thanks to Eric Hanchrow.)
447
d9ad6919
JB
448 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
449 (Thanks to Valdis Kletnieks.)
450
3144e1a9 451