*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
dc16aa36
ML
12000-08-17 Michael Livshin <mlivshin@bigfoot.com>
2
3 this changes the Guile GC to use cards (aka "chunklets").
4
5 * tags.h: (SCM_GCTYPE16, SCM_GCCDR, SCM_GC[8]MARKP,
6 SCM_SETGC[8]MARK, SCM_CLRGC[8]MARK): moved from here into gc.h.
7 some (most) of these are probably going to be deprecated.
8
9 * gc.h (SCM_MARKEDP): simplified, there are no different mark bit
10 locations anymore.
11 (SCM_GC_CARD_*, SCM_C_BVEC_*): lots of new macros to deal with
12 cards and bvecs (bit-vectors).
13
14 * gc.c: (scm_default_init_heap_size_*): defined to take cards into
15 account, but keeping more or less the same values as previously.
16 added some simple helper macros.
17 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK): defined to take cards
18 into account.
19 (BVEC_*, scm_mark_space_t, current_mark_space, mark_space_ptr,
20 current_mark_space_offset, mark_space_head, get_bvec,
21 clear_mark_space): new functions and supporting variables, types
22 and macros that implement mark space management.
23 (scm_igc): clear the mark space (all of it) before beginning the
24 mark phase.
25 (scm_gc_mark): changed the tests for rogue cells, much simplified
26 throughout (no different mark bit locations to worry about now).
27 (scm_mark_locations): don't consider card header cells.
28 (scm_cellp): ditto.
29 (scm_gc_sweep): simplified.
30 (init_heap_seg): changed to take cards into account.
31
83238bc1
ML
322000-08-16 Michael Livshin <mlivshin@bigfoot.com>
33
34 * stime.c (scm_c_get_internal_run_time): new function, same as
35 scm_get_internal_run_time but returns a long. it's used by the GC
36 for timekeeping, since with scm_get_internal_run_time there is a
37 (extremely theoretical) possibility of consing.
38 (scm_get_internal_run_time): redefined in terms of
39 scm_c_get_internal_run_time.
40
41 * stime.h: added prototype for scm_c_get_internal_run_time.
42
43 * gc.c (scm_gc_stats): add more obscure stats, such as: mark time,
44 sweep time, total marked cells, total swept cells, and number of
45 times GC was invoked.
46 (gc_start_stats): renamed from scm_gc_start, made static, taught
47 to init the new stats.
48 (gc_end_stats): renamed from scm_gc_end, made static, taught to
49 calculate the new stats.
50 (scm_igc): don't call gc_start_stats unless we are sure that we
51 are indeed going to collect. also, added some timekeeping between
52 the mark and sweep phases.
53 (scm_gc_sweep): count number of cells we sweep as we go.
54
55 * gc.h: removed prototypes for scm_gc_{start,end}.
56
a94da0e0
MD
572000-08-13 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
58
59 * alist.c (scm_assq, scm_assv, scm_assoc): Report argument type
60 error for the alist rather than the sublist where the type
61 mismatch is discovered.
62
2a2a730b
NJ
632000-08-13 Neil Jerram <neil@ossau.uklinux.net>
64
65 * root.c (s_scm_call_with_dynamic_root): Docstring fix - rogue
66 newline.
83238bc1 67
f0a7af1a
NJ
682000-08-12 Neil Jerram <neil@ossau.uklinux.net>
69
2a2a730b
NJ
70 * numbers.c (scm_ash): Docstring fix - missing newlines.
71
72 * ports.c (scm_port_filename): Docstring fix - missing newline.
73
74 * strports.c (scm_eval_string): Docstring fix - missing newline.
75
ee826bae
NJ
76 * vports.c (s_scm_make_soft_port): Docstring updated so that
77 example is correct.
78
1670bef9
NJ
79 * strop.c: Docstring fixes - quotation marks and backslashes
80 needed quoting.
81
f0a7af1a
NJ
82 * numbers.c (s_scm_logand): Docstring fix - "@end lisp" inserted.
83
872e0c72
NJ
842000-08-11 Neil Jerram <neil@ossau.uklinux.net>
85
86 * macros.c: Remove surplus newlines from end of docstrings.
87
88 * list.c (scm_list_tail): Add @deffnx line to docstring for
89 list-cdr-ref.
83238bc1 90
872e0c72
NJ
91 * keywords.c: Docstring improvements in conjunction with new
92 reference manual doc on keywords.
93
94 * error.c (scm_error_scm): Fix texinfo syntax error in
95 docstring. (@code(~S) should be @code{~S}.)
96
97 * dynl.c: Remove surplus newlines from end of docstrings.
98
3a33a9b1
MD
992000-08-11 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
100
101 * eval.c (scm_eval): Backward incompatible change: Now takes an
102 environment specifier as second arg. `eval' hereby becomes R5RS
103 compatible.
104 (scm_i_eval_x, scm_i_eval): New functions (replace
105 scm_eval_3).
106 (scm_eval2, scm_eval_3): Deprecated.
107 (scm_top_level_lookup_closure_var): Deprecated.
108
109 * eval.h: #include "struct.h".
110
111 * evalext.c (scm_definedp): Have to work before module system is
112 booted.
113
114 * modules.h (SCM_MODULEP, SCM_VALIDATE_MODULE,
115 SCM_MODULE_OBARRAY, SCM_MODULE_USES, SCM_MODULE_BINDER,
116 SCM_MODULE_EVAL_CLOSURE): New macros.
117 (scm_module_index_obarray, scm_module_index_uses,
118 scm_module_index_binder, scm_module_index_eval_closure): New
119 constants; #include "validate.h".
83238bc1 120
3a33a9b1
MD
121 * modules.c (scm_module_tag, scm_module_system_booted_p): New
122 globals.
123 (scm_post_boot_init_modules): Initialize scm_module_tag.
124 (scm_interaction_environment): New primitive.
125
126 * symbols.c (scm_can_use_top_level_lookup_closure_var): Removed.
127 #include "modules.h".
128
129 * strports.c (scm_eval_string): Evaluate in
130 scm_interaction_environment ().
131
132 * script.c (scm_shell): Pass scm_the_root_module () as second arg
133 to new scm_eval_x.
134
135 * load.c (load): Use `scm_selected_module' to compute second arg
136 to new scm_i_eval_x; Don't call it if module system hasn't booted.
137 (scm_read_and_eval_x): Deprecated.
138 #include "modules.h".
139
140 * debug.c (scm_local_eval): Use scm_i_eval and scm_i_eval_x.
141 (scm_start_stack): Use scm_i_eval.
142
143 * strports.c: #include "modules.h".
1807c7b8
MD
144
145 * print.c (scm_simple_format): Be case-insensitive for ~A and ~S
146 directives.
147
1a2f1b90
MD
1482000-08-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
149
150 The following changes are intended to ensure that struct instances
151 are freed before their vtables. It's optimized for the most
152 common case, which is freeing of struct instances.
153
154 * gc.c (scm_gc_mark, scm_gc_sweep): Remove vcell = 1 magic.
155 (scm_structs_to_free): New variable.
156 (scm_gc_sweep): Hook up structs to free on the scm_structs_to_free
157 chain.
158
159 * struct.h (SCM_STRUCT_GC_CHAIN, SCM_SET_STRUCT_GC_CHAIN): New
160 macros.
161 (scm_structs_to_free, scm_struct_prehistory): Declare.
162
163 * struct.c (scm_make_struct, scm_make_vtable_vtable): Structs
164 handles are now double cells; Initialize SCM_STRUCT_GC_CHAIN to
165 0.
166 (scm_struct_gc_init, scm_free_structs): New GC C hooks.
167 (scm_struct_prehistory): Install them.
168
169 * init.c (scm_boot_guile_1): Call scm_struct_prehistory.
170
b054684d
MV
1712000-08-06 Marius Vollmer <mvo@zagadka.ping.de>
172
173 * read.c (scm_flush_ws): Include filename in error message when it
174 is not `#f'.
175
7ca38734
MV
1762000-08-05 Marius Vollmer <mvo@zagadka.ping.de>
177
178 * iselect.c: Include <unistd.h>. Thanks to Bertrand Petit!
179
b62cc1c2
MD
1802000-08-02 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
181
89e941f1
MD
182 * struct.c (scm_make_struct_layout, scm_make_struct,
183 scm_make_vtable_vtable): Updated documentation.
184
b62cc1c2
MD
185 * print.c (scm_simple_format): Bugfix: Coerce port before using
186 it.
187
3bc0c6df
GH
1882000-07-31 Gary Houston <ghouston@arglist.com>
189
cdaf0a20 190 * net_db.c: declare h_errno only if HAVE_H_ERRNO is not defined
3bc0c6df
GH
191 (thanks to Richard Kim for the bug report).
192
3ccd1860
MV
1932000-07-30 Marius Vollmer <mvo@zagadka.ping.de>
194
195 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
196 scm_assoc_remove_x): Use scm_delq1_x instead of scm_delq_x, since
197 using the latter is pointless.
198
11102992
DH
1992000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
200
201 * gc.c (scm_gc_sweep): Renamed local variable from 'free' to
202 'free_struct_data' to avoid confusion with stdlib's 'free'.
203
a75923bb
DH
2042000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
205
206 * vectors.c (scm_make_vector): Fix the initialization order of
207 the vector such that the type cell is initialized last.
208
f7620510
DH
2092000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
210
211 * struct.[ch] (scm_struct_init): Made static. Fixed not to rely
212 on the struct cell to be fully initialized.
213
214 * struct.c (scm_make_struct, scm_make_vtable_vtable): Fix the
215 initialization order of the struct such that the type cell is
216 initialized last.
217
17dd060d
MV
2182000-07-25 Marius Vollmer <mvo@zagadka.ping.de>
219
220 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
221 scm_assoc_remove_x): Remove only the first cell with a matching
222 key, not all.
223
b73bde31
MV
2242000-07-24 Marius Vollmer <mvo@zagadka.ping.de>
225
226 * stime.c (scm_strftime): Recognize a return value of zero from
227 strftime as buffer overflow and take care to detect a valid zero
228 length result regardless. Thanks to David Barts!
229
e85da7d9
MV
2302000-07-23 Marius Vollmer <mvo@zagadka.ping.de>
231
232 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
233 scm_assoc_remove_x): Remove all cells whose key is eq, eqv, or
234 equal (respectively) to the argument key, not all cells that are
235 eq, eqv, or equal to the first cell with the argument key. Thanks
236 to Neil Jerram!
83238bc1 237
78a3503e
DH
2382000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
239
240 * gc.h (SCM_FREE_CELL_CDR, SCM_SET_FREE_CELL_CDR), hooks.c
241 (make_hook), modules.c (OBARRAY, USES, BINDER): Pack and unpack
242 SCM values appropriately.
243
244 * modules.c (scm_standard_eval_closure): Don't pass an inum to
245 scm_makcclo, but rather a long value.
246
62850ef3
DH
2472000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
248
249 read.c (scm_lreadrecparen), srcprop.c (scm_set_source_property_x):
250 SCM_SETCDR and SCM_WHASHSET macros don't deliver a return value.
251 Thanks to Han-Wen Nienhuys for the bug report.
252
cc4feeca
DH
2532000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
254
255 * root.[ch] (scm_call_catching_errors): Deprecated.
256
257 * root.c (scm_init_root): Initialize the root smob type using the
258 standard initialization functions.
259
007e7c35
MV
2602000-07-17 Marius Vollmer <mvo@zagadka.ping.de>
261
262 * eval.c (unmemocopy): Don't rely on V being a list of at least
263 one element. Thanks to Bill Schottstaedt!
264
9d47a1e6
ML
2652000-07-15 Michael Livshin <mlivshin@bigfoot.com>
266
267 * gc.c (scm_done_free): new.
268 expanded comments about scm_done_malloc.
269
270 * gc.h: added prototype for scm_done_free
271
406c7d90
DH
2722000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
273
274 * gc.h (scm_take_stdin): Removed.
275
276 * gc.h (SCM_VALIDATE_CELL): Delegate cell checks to function
277 scm_assert_cell_valid to allow extensions to the checking
278 functionality without need to recompile everything.
279
280 * gc.[ch] (scm_assert_cell_valid, scm_set_debug_cell_accesses_x):
281 Added as conditionally compiled functions for the case that
282 SCM_DEBUG_CELL_ACCESSES is enabled.
283
284 * gc.c (debug_cells_p): Added to indicate whether compile-time
285 included cell access debugging is run-time enabled.
286
287 * gc.[ch] (scm_gc_running_p): Added to indicate that scm_igc is
288 being executed. Intended to be used instead of scm_gc_heap_lock
289 at most places.
290
291 * error.c (scm_error), gdbint.c (SCM_GC_P): Use scm_gc_running_p
292 instead of scm_gc_heap_lock.
293
294 * gc.c (scm_igc): Set scm_gc_running_p to true while running.
295
296 * gc.c (scm_mark_locations): Don't mark free cells.
297
298 * weaks.c (scm_scan_weak_vectors): Use SCM_FREE_CELL_P instead of
299 SCM_FREEP.
300
c4da09e2
DH
3012000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
302
303 * gc.c (scm_mark_locations): Minimized some variable scopes and
304 simplified the code a bit.
305
3f5d82cd
DH
3062000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
307
308 * gc.h (SCM_SET_FREE_CELL_TYPE, SCM_SET_FREE_CELL_CDR,
309 SCM_FREE_CELL_P, SCM_FREE_CELL_CDR): Added since free cells
310 should not be accessed via SCM_C[AD]R. Further, using dedicated
311 macros to access free cells allows all other cell accessing macros
312 to treat acesses to free cells as errors, thus enabling better
313 error checks for cell accesses. SCM_FREE_CELL_P is supposed to
314 replace SCM_FREEP some time.
315
316 * gc.h (SCM_NEWCELL, SCM_NEWCELL2), gc.c (map_free_list,
317 free_list_length, scm_check_freelist, scm_debug_newcell,
318 scm_debug_newcell2, freelist_length, scm_gc_for_newcell,
319 scm_gc_mark, scm_gc_sweep, init_heap_seg): Only use the dedicated
320 cell accessors when accessing free cells.
321
f706a58b
DH
3222000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
323
324 * gc.h (SCM_CELL_WORD, SCM_CELL_OBJECT): Treat the referenced
325 object as const in order to make the compiler warn about code like
326 SCM_CELL_WORD (x, n) = y. Instead, SCM_SET_CELL_WORD (x, n, y)
327 should be used.
328
329 (SCM_CELL_WORD_LOC, SCM_CARLOC, SCM_CDRLOC): Return the address
330 as an address to a non-const object, since these macros are used
331 to allow direct write access to objects.
332
cbaadf02
DH
3332000-07-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
334
335 * hashtab.c (scm_hash_fn_create_handle_x): Signal an error if the
336 given hash table has no slots.
337
a6c12a04
DH
3382000-07-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
339
b6efc951
DH
340 * gc.c (policy_on_error): Added in order to allow alloc_some_heap
341 to react to malloc failures in a context dependent way.
342
343 (scm_check_freelist): No need to flush streams before abort().
344
345 (scm_gc_for_newcell): Try to allocate new memory in three phases:
346 grow heap if preferred, if still no memory available collect
347 garbage, if still no memory available grow heap.
348
349 (heap_segment_table_size): Added to always reflect the actual
350 size of the heap segment table, because scm_n_heap_segs may differ
351 from the heap segment table size.
352
353 (alloc_some_heap): In case of malloc failure, react according to
354 the new policy_on_error parameter (either return to caller or
355 abort immediately). Further, keep heap_segment_table_size up to
356 date.
357
358 (scm_init_storage): Initialize heap_segment_table_size.
359
3602000-07-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
361
362 * gh.h: Don't include <stdio.h>. Thanks to Han-Wen Nienhuys for
a6c12a04
DH
363 the hint.
364
b63a956d
DH
3652000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
366
367 * __scm.h (SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
368 SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
369 SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
370 SCM_ORD_SIG, SCM_NUM_SIGS): Re-introduce these as deprecated
371 symbols.
372
373 * error.c (scm_wta): Re-introduce dispatching for SCM_OUTOFRANGE
374 and SCM_NALLOC, but as a deprecated feature.
375
a75a7aff
MD
3762000-06-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
377
38ec519c
MD
378 * debug.c: Added #include fluids.h.
379
a75a7aff
MD
380 * numbers.c (scm_gr_p, scm_leq_p, scm_geq_p): Turned into
381 primitive generics. (Thanks to Nicolas Neuss.)
382
c7387918
DH
3832000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
384
385 * gc.c (alloc_some_heap): Use scm_memory_error to indicate a
386 failed attempt to get additional memory from the system.
387
388 (scm_gc_for_newcell): Changed the control structure to make the
389 behaviour explicit for the case that gc is not able to free any
390 cells.
391
685c0d71
DH
3922000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
393
394 * __scm.h (SCM_OUTOFRANGE): Removed.
395
396 * error.c (scm_wta): Removed sick dispatch code for range
397 errors. (More sick dispatches still to be removed.)
398
399 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
400 scm_hash_fn_remove_x): Eliminate redundant test for if unsigned
401 value is non-negative. Use scm_out_of_range to signal range
402 errors.
403
404 * hooks.c (make_hook), unif.c (scm_aind): Use scm_out_of_range to
405 signal range errors.
406
407 * list.c (scm_list_ref, scm_list_set_x, scm_list_cdr_set_x): Fix
408 error reporting (now uses original input parameter to report wrong
409 type argument errors). Use SCM_OUT_OF_RANGE to report range
410 errors and SCM_WRONG_TYPE_ARG to report type errors.
411
412 * strings.c (scm_substring): Make range checks for negative
413 values explicit (former behaviour relied on an implicit
414 conversion from signed to unsigned). Don't use SCM_ASSERT for
415 range checks.
416
417 * unif.c (scm_aind, scm_transpose_array, scm_bit_set_star_x,
418 scm_bit_count_star): Use scm_out_of_range to signal range
419 errors.
420
421 * unif.c (scm_transpose_array, scm_bit_position), vectors.c
422 (scm_vector_ref, scm_vector_set_x, scm_vector_move_left_x,
423 scm_vector_move_right_x): Use SCM_ASSERT_RANGE to check ranges.
424
fdf25853
DH
4252000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
426
427 * validate.h (SCM_VALIDATE_INUM_MIN_COPY,
428 SCM_VALIDATE_INUM_MIN_DEF_COPY, SCM_VALIDATE_INUM_RANGE_COPY):
429 Perform all range checks based on the input value. The former way
430 of using the value that is assigned to the target variable fails
431 if the assignment to the target variable itself can change the
432 value because of type conversion.
433
434 (SCM_ASSERT_RANGE): Use scm_out_of_range to signal range errors.
435
627df128
MD
4362000-06-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
437
438 * gc.c (scm_gc_for_newcell): Behave gracefully also if scm_igc
439 doesn't yield any new cells. In theory this could happen if all
440 cells allocated with NEWCELL are either in use or conservatively
441 marked and all cluster spine cells are conservatively marked.
442 (Thanks to Dirk.)
443
2500356c
DH
4442000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
445
446 * __scm.h (SCM_NALLOC): Removed.
447
448 * error.c (scm_wta): Removed sick dispatch code for memory
449 errors. (More sick dispatches still to be removed.)
450
451 * numbers.c (scm_mkbig, scm_adjbig), ports.c (scm_make_port_type),
452 random.c (scm_i_copy_rstate, scm_c_make_rstate), smob.c
453 (scm_make_smob_type), srcprop.c (scm_make_srcprops), vectors.c
454 (scm_vector_set_length_x): Now using scm_memory_error to signal
455 memory errors.
456
9b166f12
DH
4572000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
458
459 * __scm.h: Removed some commented code and fixed some comments.
460
461 (SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL,
462 SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL,
463 SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS): Removed.
464
465 * async.c: Removed some commented code.
466
acf4331f
DH
4672000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
468
469 * gc.c (scm_gc_mark, scm_gc_sweep, scm_must_malloc,
470 scm_must_realloc, scm_must_free, alloc_some_heap): Use the
471 appropriate error signalling function.
472
fc3d7778
DH
4732000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
474
475 * root.h (scm_first_type): Removed.
476
4772000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
0a7a7445
DH
478
479 * gc.c (MIN_GC_YIELD): Removed.
480
150c200b
ML
4812000-06-28 Michael Livshin <mlivshin@bigfoot.com>
482
483 * gc.c (scm_gc_for_newcell): don't try to do GC if it's blocked,
484 allocate instead.
485
939794ce
DH
4862000-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
487
488 * async.c (scm_gc_async, scm_gc_vcell, scm_sys_gc_async_thunk):
489 Moved to gc.c.
490
491 (scm_init_async): Moved initialization for scm_gc_async and
492 scm_gc_vcell to gc.c. Moved initialization of scm_asyncs here
493 from gc.c.
494
495 * async.h (scm_gc_async): Not globally visible any more.
496
497 * gc.c (scm_gc_stats): Made callable even from within regions
498 where gc is blocked.
499
500 (scm_gc_end): Eliminate the hardcoding of the marking of the
501 scm_gc_async from the gc core.
502
503 (scm_init_storage): Don't initialize the scm_asyncs list here.
504 This is now done in asyncs.c.
505
506 (scm_gc_vcell): Moved here from async.c.
507
508 (gc_async): Renamed from scm_gc_async, moved here from async.c
509 and made static.
510
511 (gc_async_thunk): Renamed from scm_sys_gc_async_thunk and moved
512 here from async.c.
513
514 (mark_gc_async): New hook function for scm_after_gc_c_hook.
515
516 (scm_init_gc): Added initialization of scm_gc_vcell and
517 gc_async. Further, add mark_gc_async to scm_after_gc_c_hook.
518
519 * init.c (scm_boot_guile_1): scm_init_gc requires asyncs to be
520 initialized.
521
12acbbef
DH
5222000-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
523
524 * gc.c (scm_igc): Removed commented code that once was intended
525 to unprotect struct types with no instances.
526
527 * root.h (scm_type_obj_list): Removed.
528
73ea78af
DH
5292000-06-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
530
531 * async.c (scm_init_async): Switch to standard way of smob
532 initialization.
533
7f40b48a
ML
5342000-06-21 Michael Livshin <mlivshin@bigfoot.com>
535
536 * guile-doc-snarf.in: use cut instead of sed, that's much much
83238bc1
ML
537 faster. also, don't call basename more than needed. and, to gain
538 a couple of microseconds more, don't call cat needlessly. (thanks
7f40b48a
ML
539 to Brad Knotwell).
540
3c6d9d71
DH
5412000-06-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
542
543 * guile-snarf.awk.in, guile-snarf.in, snarf.h: Rename SCM__I to
544 SCM_SNARF_INIT_START, SCM__D to SCM_SNARF_DOC_START, SCM__S to
545 SCM_SNARF_DOCSTRING_START and SCM__E to SCM_SNARF_DOCSTRING_END.
546
2b6e0d2b
MD
5472000-06-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
548
549 * eval.c, eval.h (scm_top_level_lookup_closure_var): Added.
550 #include "libguile/fluids.h".
551
552 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): New macro which replaces
553 SCM_CDR (scm_top_level_lookup_closure_var) everywhere.
554
555 * root.h (scm_top_level_lookup_closure_var,
556 scm_system_transformer): Removed. (It's no sense in having the
557 *variable* be a "fluid".)
558
559 * root.c (mark_root): Removed marking of
560 s->top_level_lookup_closure_var and s->system_transformer.
561
562 * modules.c (scm_selected_module): the_module is now a fluid.
563
5bc9cbd2
MD
5642000-06-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
565
566 * gc.h, tags.h: Be kind to compilers which must see hash signs in
567 column 0. (Thanks to Ian Grant.)
568
569 * numbers.h: Put #ifdef HAVE_LONG_LONGS around declarations using
570 the long_long type. (Thanks to Bernard Urban.)
571
b5074b23
MD
5722000-06-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
573
574 * gc.c, gc.h (scm_default_init_heap_size_1,
575 scm_default_min_yield_1, scm_default_init_heap_size_2,
576 scm_default_min_yield_2, scm_default_max_segment_size): New global
577 variables. Can be customized by the application before booting
578 Guile. (We might want to be able to control these parameters
579 dynamically through the "options interface" in the future, but
580 note that that is additional functionality. Here we're giving
581 default values which the environment variables can override.)
582
583 * list.c (scm_cons_star): Updated comment.
584
585 * smob.h: Changed comments for scm_make_smob_type and
586 scm_make_smob_type_mfpe, warning that the latter might be
587 deprecated in a future release.
588
0a9e521f
MD
5892000-06-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
590
591 * list.[ch] (scm_cons_star/cons*): Renamed from
592 scm_list_star/list*.
593
594 * list.[ch] (scm_list_star/list*): Provided as a deprecated alias
595 for scm_cons_star/cons*.
596
597 * gc.c (scm_protect_object): Updated comment.
598
599 * numbers.h (SCM_NEWREAL, SCM_NEWCOMPLEX): Removed.
600
601 * tags.h (SCM_UNPACK_CAR, SCM_NDOUBLE_CELLP): Removed.
602
264871aa
MD
6032000-06-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
604
605 * init.c, init.h (scm_initialized_p): Renamed from `initialized'
606 and made global.
607
608 * gdbint.c (gdb_print): Print warning instead of calling scm_write
609 if Guile isn't yet initialized.
610
611 * print.c (scm_current_pstate, scm_make_print_state): Simplified
612 tests, using the assumption that Guile has been initialized.
613
3785f317
GB
614Sun Jun 18 14:45:21 2000 Greg J. Badros <gjb@cs.washington.edu>
615
616 * print.c (s_scm_current_pstate): Do not segfault when the
617 print_state_pool is unitialized in `current-pstate', and better
618 verify its state before altering it in scm_make_print_state().
619
6732de1b
ML
6202000-06-18 Michael Livshin <mlivshin@bigfoot.com>
621
622 * scmsigs.c (s_scm_sigaction): guard the SIGIOT case with an
623 #ifdef -- it's missing on at least one platform. (thanks to
624 Jan Nieuwenhuizen).
625
79494f15
DH
6262000-06-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
627
628 * list.c (list*): Added documentation from common-list.scm.
629
6a199940
DH
6302000-06-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
631
632 * gc.c (scm_unprotect_object): The reference count is guaranteed
633 to be a positive number.
634
3243bcc0
MD
6352000-06-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
636
637 * eval.c: Updated comment above scm_map.
638
26c9c3ce
MD
6392000-06-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
640
641 * gc.c (scm_protect_object): Avoid looking up the object handle
642 twice.
643 (scm_unprotect_object): Abort if scm_unprotect_object is called on
644 an unprotected object.
645
2dd6a83a
ML
6462000-06-14 Michael Livshin <mlivshin@bigfoot.com>
647
648 * gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to
649 Dirk Herrmann).
650
97ebbbca
MD
6512000-06-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
652
43fbd20f
MD
653 * socket.c (scm_getsockopt): Changed type for `optlen' from int to
654 size_t.
655 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
656 Ditto for `tmp_size'.
657 (scm_addr_buffer_size): Changed type from int to size_t.
658
659 * random.c: #include <string.h>. (Needed by memcpy.)
660
97ebbbca
MD
661 * guile-snarf.awk.in: Replace the dot_doc_file arg with "-",
662 indicating stdin, instead of "" and don't reset ARGC. This is a
663 workaround for `nawk' in AIX 4.3 on RS6000 but, as far as I know,
664 it is correct, and perhaps even better.
665
14d72d48
GH
6662000-06-14 Gary Houston <ghouston@arglist.com>
667
668 * scmsigs.c (scm_init_scmsigs): if HAVE_SIGINTERRUPT is not
669 defined, add SA_RESTART to the sigaction flags correctly
670 (thanks to Dale P. Smith).
671
d99783cb
MD
6722000-06-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
673
010d1e9d
MD
674 * strings.c: #include <string.h>. (Thanks to Bill Schottstaedt.)
675
676 * net_db.c (scm_resolv_error): Only use macro NETDB_INTERNAL if
677 defined. It isn't on sgi irix 5.3. (Thanks to Bill Schottstaedt.)
678
d99783cb
MD
679 * Makefile.am (.c.doc): Pipe output (the .x contents) to /dev/null.
680
c47e8cc1
MD
6812000-06-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
682
e36a0870
MD
683 * fports.c (scm_setvbuf): Use `free' instead of `scm_must_free'
684 since read and write buffers are allocated by `malloc'.
685
c47e8cc1
MD
686 * Makefile.am: Removed old test code.
687
688 * gh_test_c.c, gh_test_repl.c: Removed.
689
341f78c9
MD
6902000-06-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
691
a8861fa0
MD
692 * iselect.c (SCM_NLONGBITS): Add workaround for the Sun 4.2
693 compiler.
694
695 * inet_aton.c (inet_aton): Cast init value for `cp'.
696
697 * ramap.c (s_scm_array_fill_x): Cast `ve' properly in case
698 `scm_tc7_uvect'.
699
700 * symbols.c (scm_intern_obarray_soft,
701 scm_sysintern0_no_module_lookup): Cast `name' to unsigned char ptr
702 in calls to scm_strhash.
703
704 * strports.c (st_resize_port): Substituted SCM_UCHARS for
705 SCM_CHARS.
706 (st_write): Cast argument to strncpy to char ptr.
707 (scm_mkstrport): Substituted SCM_ROUCHARS for SCM_ROCHARS.
708 (scm_strport_to_string): Cast argument to scm_makfromstr to char
709 ptr.
710
711 * ports.c (scm_ungetc): Cast value to unsigned char ptr before
712 storing in putback_buf.
713 (scm_unread_string): Substituted SCM_ROCHARS for SCM_ROUCHARS.
714
715 * ioext.c (s_scm_read_line): Cast result of call to
716 scm_do_read_line to unsigned char ptr.
717
d230c130
MD
718 * gdbint.c (SEND_STRING): Cast argument to char pointer.
719
720 * fports.c (fport_flush): Declare `ptr' as unsigned char (was
721 char).
722
9c8dca4e
MD
723 * Makefile.am (DOT_DOC_FILES): List doc-files explicitly. (We
724 shouldn't use Make rules which aren't supported by most Make
725 programs.)
d230c130
MD
726 (OMIT_DEPENDENCIES): Defined to "libguile.h ltdl.h". (We don't
727 want these dependencies recorded, since they would get bogus
728 relative paths; libguile.h is only used in gh.h and guile.c.)
9c8dca4e
MD
729 (EXTRA_DOT_X_FILES, EXTRA_DOT_DOC_FILES): New variables.
730 (guile-procedures.txt): Depend on EXTRA_DOT_DOC_FILES.
731 (modinclude_HEADERS): Removed kw.h.
732
69fc343a
MD
733 * guile-snarf.in: Change regexp "^SCM__I" --> "^ *SCM__I".
734 (The preprocessor might insert spaces before the identifier.)
735
341f78c9
MD
736 * snarf.h (SCM_SNARF_HERE, SCM_SNARF_INIT, SCM_SNARF_DOCS):
737 Renamed from SCM_HERE, SCM_INIT, SCM_DOCS.
738
739 * smob.h (scm_smobfuns): Removed deprecated type.
740
741 * smob.c, smob.h (scm_newsmob): Removed deprecated function.
742 (Replaced by `scm_make_smob_type'.)
743
744 * keywords.c (scm_tc16_kw): Removed deprecated type.
745 (Replaced by scm_tc16_keyword.)
746
341f78c9
MD
747 * kw.h: Removed deprecated header file.
748
749 * evalext.c (serial-map): Removed deprected alias for scm_map.
750 (Has been replaced by `map-in-order'.)
751
752 * ramap.c (serial-array-copy!, serial-array-map!): Removed
753 depracted aliases. (Replaced by `array-copy-in-order!' and
754 `array-map-in-order'.)
755
4f60fa74
MD
7562000-06-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
757
758 * gc.h (SCM_VALIDATE_CELL): Rewritten.
759 (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD,
760 SCM_SET_CELL_OBJECT): Use new version of SCM_VALIDATE_CELL.
761 (Thanks to Han-Wen Nienhuys.)
762
adb2c53b
ML
7632000-06-10 Michael Livshin <mlivshin@bigfoot.com>
764
765 * guile-doc-snarf.in: don't pipe the CPP output right into sed --
766 write it to the temp file first and check the CPP return code.
767 (I introduced this bug earlier, and this probably caused people
768 with non-GNU C preprocessors to get empty *.x files and not to
769 have the build fail right away...).
770
771 * scmsigs.c (s_scm_sigaction): guard the SIGSYS case with an ifdef
772 -- at least my libc5-based Linux system doesn't define SIGSYS.
773
0abbd8f4
MD
7742000-06-08 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
775
aa169af8
MD
776 * snarf.h, guile-snarf.awk.in, guile-snarf.in: Replaced snarf
777 markers with identifiers (SCM__I, SCM__D, SCM__S, SCM__E).
778 (Thanks to Bernard Urban.)
0abbd8f4 779
a6596faa
MD
7802000-06-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
781
782 * modules.c (scm_system_module_env_p): Fixed detection of system
783 modules.
784
c29ee3e5
MV
7852000-06-06 Marius Vollmer <mvo@zagadka.ping.de>
786
787 * scmsigs.c (scm_sigaction): Silently ignore setting handlers for
788 `program error signals' because they can't currently be handled by
789 Scheme code.
790
2d9cdf4e
DH
7912000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
792
793 * procs.h (SCM_SET_SUBRF): Added.
794
795 * procs.c (scm_make_subr_opt): Don't assign to SCM_SUBRF, use
796 SCM_SET_SUBRF instead. Thanks to Bernard Urban for the bug
797 report.
798
4b479d98
DH
7992000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
800
801 * gc.h (SCM_CARLOC, SCM_CDRLOC): Don't take the address of a SCM
802 value.
803
804 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x,
805 scm_merge_list_step): Don't take the address of SCM_CAR. Use
806 SCM_CARLOC instead. Thanks to Bernard Urban for the bug report.
807
9a09deb1
DH
8082000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
809
810 * boolean.h (SCM_TRUE_P): Removed, as people might use it as a
811 replacement for !SCM_FALSEP.
812
813 * backtrace.c (display_error_body), boolean.h (SCM_BOOLP), gc.c
814 (scm_unhash_name), gh_data.c (gh_module_lookup), load.c
815 (scm_primitive_load), print.c (scm_simple_format), procs.c
816 (scm_procedure_documentation), procs.h (SCM_TOP_LEVEL), ramap.c
817 (scm_array_fill_int), scmsigs.c (scm_sigaction), stacks.c
818 (narrow_stack, scm_make_stack, scm_stack_id), symbols.c
819 (scm_string_to_obarray_symbol), throw.c (scm_catch,
820 scm_lazy_catch, scm_ithrow), unif.c (scm_make_uve, scm_array_p,
821 scm_array_set_x, scm_bit_set_star_x, scm_bit_count_star),
822 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_PROC): Replace
823 uses of SCM_TRUE_P (x) with SCM_EQ_P (x, SCM_BOOL_T).
824
2c4fc472
MD
8252000-06-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
826
542bfe1d
MD
827 * eval.c (scm_badformalsp): New static function.
828 (SCM_CEVAL): Check arguments for procedure-with-setter closures.
829 (Thanks to Keisuke Nishida.)
830
2c4fc472
MD
831 The major reason for Guile's slow loading speed has been the fact
832 that a chain of Scheme level procedures has been evaluated for
833 every top-level symbol lookup during the first pass through the
834 code.
83238bc1 835
2c4fc472
MD
836 The following is a kludge which I suggested four years ago, and
837 which I've repeatedly suggested since. Personally, I've never
838 been bothered by Guile's slow loading speed, so I thought I would
839 let someone else do it...
840
841 But since the new environments will be included first in
842 Guile-1.5, I thought it would make people happy to get the kludge
843 into 1.4.
83238bc1 844
2c4fc472
MD
845 * modules.c: Added #include "libguile/vectors.h";
846 Added #include "libguile/hashtab.h";
847 Added #include "libguile/struct.h";
848 Added #include "libguile/variable.h";
849 Capture Scheme level `module-make-local-var!' to be used in the
850 standard eval closure.
851 (scm_standard_eval_closure): New primitive.
852
853 * modules.h (scm_standard_eval_closure): Declare.
854
855 * eval.c (scm_lookupcar): Test for !SCM_CONSP (SCM_CAR (env))
856 instead of SCM_TRUE (scm_procedurep (SCM_CAR (env))).
857
858 * symbols.c (scm_sym2vcell): Bypass dispatch in the evaluator for
859 standard eval closures.
860
861 * variable.c: Code layout fixes.
862
96372e45
MD
8632000-06-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
864
865 * Makefile.am: Added LIBS line to libpath which accidentally
866 disappeared in the change of 2000-06-01.
867 (Thanks to Dale P. Smith.)
868
cc0bb1ef
MD
8692000-06-03 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
870
6784d5c0
MD
871 * scmsigs.c (scm_segfault): Removed. (Was probably added by
872 mistake since it is not mentioned in ChangeLog.)
873
cc0bb1ef
MD
874 * gc.h (SCM_VALIDATE_CELL): Cast result to (void) in order to
875 avoid compiler warnings in gcc. (Does this work for other
876 compilers?)
877
f8d4d8e5
MD
8782000-06-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
879
4ecf5aa3
MD
880 * gc.h (SCM_VALIDATE_CELL): Don't "use" the value returned by
881 abort ().
882 (SCM_CARLOC, SCM_CDRLOC): Define directly instead of using
883 SCM_CELL_OBJECT_0 and SCM_CELL_OBJECT_1. It's not correct to take
884 the address of these expressions since they use SCM_VALIDATE_CELL.
885 (Thanks to Bernard Urban.)
886
f8d4d8e5
MD
887 * dynl.c: Changed #include <ltdl.h> --> #include
888 "libltdl/ltdl.h". (Thanks to Bill Schottstaedt.)
889
b6fae158
CB
8902000-06-01 Craig Brozefsky <craig@red-bean.com>
891
892 * Makefile.am: libguile_la_LDFLAGS gets -version-info args
893 from GUILE-VERSION definition of LIBGUILE version. Added to
894 libpath.h definitions for guileversion and libguileversion which
895 both get their values from GUILE-VERSION definition.
896
7272f6d8
DH
8972000-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
898
899 * numbers.h (SCM_BIGP): Don't use SCM_SMOB_PREDICATE in header
900 file: Code using numbers should not be required to include
901 smob.h.
902
b2728432
DH
9032000-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
904
905 * coop-threads.c.cygnus, coop-threads.h.cygnus, fsu-pthreads.h,
906 mit-pthreads.c, mit-pthreads.h: Deleted.
907
908 * Makefile.am (EXTRA_DIST), scmsigs.c, threads.[ch]: Drop
909 references to deleted files and fsu/mit thread support in
910 general.
911
f8eaf8b9
DH
9122000-05-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
913
914 * hooks.c (symbol_name, scm_create_hook): Restored the original
915 behaviour of scm_create_hook. Changing it was bad as Carl
916 R. Witty has pointed out.
917
918 * gc.c (scm_init_gc): We can still rely on scm_create_hook to
919 protect the object.
920
e11f8b42
DH
9212000-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
922
923 * gc.c (scm_init_gc): Protect scm_after_gc_hook, since this will
924 soon not be done by scm_create_hook any longer.
925
926 * hooks.c (make_hook, print_hook, scm_create_hook,
927 scm_make_hook_with_name, scm_make_hook), hooks.h (SCM_HOOK_NAME,
928 SCM_HOOK_PROCEDURES, SCM_SET_HOOK_PROCEDURES,
929 scm_make_hook_with_name), init.c (scm_boot_guile_1): Hooks no
930 longer have names. As an intermediate solution, the name
931 predicate is emulated via object properties, but use of this
932 feature is deprecated.
933
934 * hooks.h (scm_free_hook): Removed, as it is never defined.
935
47457e8a
DH
9362000-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
937
894a712b
DH
938 * numbers.[ch] (SCM_POSFIXABLE, SCM_NEGFIXABLE, SCM_FIXABLE):
939 Un-deprecated since otherwise user code can't determine whether a
940 number fits into an inum any longer. The names should be changed
941 some time, though.
942
943 * numbers.c (scm_big2inum): Eliminated use of SCM_UNEGFIXABLE.
944
945 * tags.h (SCM_UNPACK_CAR): Deprecated.
946
9472000-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
948
949 * filesys.h (SCM_OPDIRP), fluids.h (SCM_FLUIDP, SCM_FLUID_NUM),
47457e8a
DH
950 fports.h (SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP), hooks.h
951 (SCM_HOOK_ARITY), keywords.h (SCM_KEYWORDP, SCM_KEYWORDSYM),
83238bc1 952 numbers.h (SCM_NUMP, SCM_BIGSIGN, SCM_BDIGITS, SCM_NUMDIGS):
47457e8a
DH
953 Replace SCM_UNPACK_CAR appropriately. Don't access cells via
954 SCM_{SET}?C[AD]R unless they are known to be cons cells.
955
956 * gc.c (scm_heap_seg_data_t, scm_mark_locations, scm_cellp,
957 init_heap_seg): Remove unused struct member variable 'valid'.
958
f9a64404
DH
9592000-05-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
960
961 * fports.c (fport_write), ports.c (scm_markstream, scm_port_mode,
962 scm_print_port_mode), ports.h (SCM_OPPORTP, SCM_OPINPORTP,
963 SCM_OPOUTPORTP, SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP),
964 procs.h (SCM_CLOSCAR), unif.h (SCM_ARRAY_NDIM, SCM_ARRAY_CONTP),
965 variable.h (SCM_VARIABLEP): Replace SCM_UNPACK_CAR
966 appropriately.
967
206d3de3
DH
9682000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
969
970 * gc.c (free_list_length), hash.c (scm_hasher), macros.c
971 (scm_macro_type), objects.c (scm_class_of), options.c
972 (scm_options), print.c (scm_iprin1), strports.c (st_seek), throw.c
973 (SCM_LAZY_CATCH_P): Replace SCM_UNPACK_CAR appropriately.
974
445f675c
DH
9752000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
976
977 * eval.c (scm_macroexp, SCM_CEVAL, scm_force), tags.h: Replace
978 SCM_UNPACK_CAR with SCM_CELL_TYPE or SCM_CELL_WORD_0.
979
980 * eval.c (scm_force): Add documentation.
981
982 * eval.c (scm_force, scm_cons_source): Don't access cells via
983 SCM_{SET}?C[AD]R unless they are known to be cons cells.
984
6ba93e5e
DH
9852000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
986
987 * strings.h (SCM_NSTRINGP, SCM_NRWSTRINGP), tags.h
988 (SCM_NDOUBLE_CELLP), vectors.h (SCM_NVECTORP): Deprecated.
989
990 * gc.c (scm_igc), gc.h (SCM_PTR_MASK, SCM_PTR_LT): Removed #ifdef
991 nosve #endif conditionally compiled code.
992
fe517a7d
ML
9932000-05-23 Michael Livshin <mlivshin@bigfoot.com>
994
995 * gc.c (scm_heap_seg_data_t): fixed comment for the `span' member.
996
a564e775
ML
9972000-05-22 Michael Livshin <mlivshin@bigfoot.com>
998
999 * guile-doc-snarf.in: put the preprocessed file through sed to
cf00e803
ML
1000 trim all lines to 1024 chars. I hope it doesn't break anybody's
1001 sed. we'll see. (note: this is lossy trimming, i.e. the spill
1002 isn't wrapped around but actually chopped off. this seemed to me
1003 safe because the current snarfer doesn't understand multi-line
1004 cookies anyway. in the long term, it would be nice not to depend
1005 on AWK for anything.)
a564e775 1006
83238bc1 1007 * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted
a564e775
ML
1008 the previous change to this macros, after deciding to torture the
1009 snarfer instead.
1010
686765af
ML
10112000-05-21 Michael Livshin <mlivshin@bigfoot.com>
1012
1013 * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): brought
cebd4392
ML
1014 the yucky, ugly and nasty conditional compilation back. sorry,
1015 but it was either that or requiring GAWK to build Guile.
1016 (lots of places): removed the code that implemented the old GC
1017 scheme.
686765af
ML
1018
1019 * init.c (scm_boot_guile_1): removed the code conditioned on
1020 !GUILE_NEW_GC_SCHEME.
1021
1022 * __scm.h: (GUILE_NEW_GC_SCHEME): removed.
1023
1024 * gc.c (scm_protect_object, scm_unprotect_object): change the
1025 implementation to more efficient (at least in the time complexity
1026 sense). the calls should now also be thread-safe -- I suspect
1027 that people expect them to be. (thanks to Han-Wen Nienhuys)
cebd4392
ML
1028 (lots of places): removed the code that implemented the old GC
1029 scheme.
686765af
ML
1030
1031 * hashtab.c (scm_hash_fn_create_handle_x): add missing
cebd4392
ML
1032 SCM_REALLOW_INTS before return. I really wonder about the
1033 possible interactions between hashtables, threads & GC. it
83238bc1 1034 doesn't look healthy at all.
686765af 1035
44e47754
DH
10362000-05-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1037
1038 * unif.c (scm_bit_count): Fixed the parameter checks. Thanks to
1039 Dale P. Smith.
1040
46d53380
DH
10412000-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1042
1043 * __scm.h (SCM_DEBUG_CELL_ACCESSES), gc.h (SCM_): Added as a new
1044 debug option to verify all accesses to cells actually access
1045 objects on the heap.
1046
1047 * gc.h (SCM_VALIDATE_CELL): Added. Only performs validation if
1048 SCM_DEBUG_CELL_ACCESSES is set to 1.
1049
1050 (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD,
1051 SCM_SET_CELL_OBJECT): Use SCM_VALIDATE_CELL to check every cell
1052 that is accessed.
1053
1a548472
DH
10542000-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1055
1056 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs,
1057 gh_scm2floats, gh_scm2doubles): Change !SCM_NIMP to SCM_IMP.
1058
1059 * gc.c (scm_cellp): Fixed and simplified.
1060
1061 * throw.c (JBJMPBUF, SETJBJMPBUF, SCM_JBDFRAME, SCM_SETJBDFRAME,
1062 make_jmpbuf, scm_init_throw): Now using double cells to represent
1063 jump buffers when using debug extensions.
1064
1065 (freejb): Removed.
1066
bcee10dd
DH
10672000-05-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1068
1069 * gh.h gh_data.c gh_funcs.c (gh_new_procedure*, gh_chars2byvect,
1070 gh_shorts2svect, gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect,
1071 gh_doubles2dvect, gh_doubles2scm, gh_define, gh_lookup,
1072 gh_module_lookup): Accept const pointers as parameters.
1073
1074 * gh.h gh_data.c (gh_int2scmb): Deprecated.
1075
10762000-05-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
af45e3b0
DH
1077
1078 * __scm.h (SCM_DEBUG_REST_ARGUMENT): Renamed from
1079 SCM_DEBUG_REST_ARGUMENTS in order to clarify that we don't test
1080 the actual arguments in the list, but rather the rest argument as
1081 a list of arguments.
1082
1083 * validate.h (SCM_VALIDATE_REST_ARGUMENT): Added.
1084
1085 * async.c (scm_noop), eval.c (scm_map, scm_for_each), list.c
1086 (scm_list_star, scm_append, scm_append_x), ports.c
1087 (scm_close_all_ports_except), ramap.c (scm_array_map_x,
1088 scm_array_for_each), regex-posix.c (scm_make_regexp), stacks.c
1089 (scm_make_stack), strings.c (scm_string_append), struct.c
1090 (scm_make_struct, scm_make_vtable_vtable): Validate rest arguments.
1091
1092 * dynl.c (DYNL_GLOBAL, sysdep_dynl_link, kw_global, sym_global,
1093 scm_dynamic_link, scm_init_dynamic_linking), dynl.h
1094 (scm_dynamic_link): Removed possibility to pass flags to
1095 scm_dynamic_link, as it had no effect anyway.
1096
1097 * filesys.c (scm_fcntl): Made single optional rest argument into
1098 a standard optional argument.
1099
1100 * hooks.c (scm_run_hook): A list of rest arguments is never
1101 SCM_UNBNDP.
1102
1103 * list.c (scm_append, scm_append_x), stacks.c (scm_make_stack),
1104 strings.c (scm_string_append): Don't perform half-hearted checks
1105 to see whether the rest argument forms a proper list any more, use
1106 SCM_VALIDATE_REST_ARGUMENTS instead.
1107
1108 * ports.c (scm_close_all_ports_except): Accept empty list of rest
1109 arguments.
1110
1111 * posix.c (scm_convert_exec_args), print.c (scm_simple_format):
1112 Simplify verification of rest argument.
1113
1114 * stacks.c (scm_make_stack), stacks.h (scm_make_stack), throw.c
1115 (ss_handler, handler_message): Make first mandatory rest argument
83238bc1 1116 of scm_make_stack into a standard mandatory argument.
af45e3b0
DH
1117
1118 * unif.c (scm_transpose_array, scm_enclose_array,
1119 scm_array_in_bounds_p), unif.h (scm_transpose_array,
1120 scm_enclose_array, scm_array_in_bounds_p): Make first mandatory
1121 rest argument into a standard mandatory argument.
1122
c8a54c4b
DH
11232000-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1124
1125 * __scm.h: Added SCM_DEBUG as default debug option. (Thanks to
1126 Keisuke Nishida for the suggestion.) Added debug option
1127 SCM_DEBUG_REST_ARGUMENTS.
1128
1129 * eval.c (scm_map, scm_for_each): Make sure all lists have the
1130 same length. Also, removed redundant parameter checks.
1131
56100716
DH
11322000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1133
1134 * Makefile.am: Let 'make clean' remove *.x and *.doc files.
1135
1136 * __scm.h: Improved explanation of giving options to make.
1137
1138 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS), tags.h
1139 (SCM_STRICT_TYPING, SCM_DEBUG_TYPING_STRICTNESS): Renamed
1140 SCM_STRICT_TYPING to SCM_DEBUG_TYPING_STRICTNESS and moved the
1141 corresponding declaration and comment to __scm.h.
1142
1143 * _scm.h (errno), gc.h (SCM_CELLPTR, SCM_PTR_LT), numbers.c
1144 (scm_remainder, scm_modulo), numbers.h (SCM_SRS, SCM_MAKINUM,
1145 SCM_INUM): Removed conditionally compiled code for Turbo C.
1146
1147 * gdbint.c (gdb_maybe_valid_type_p): Eliminated call to scm_tag.
1148 That check can be assumed to be redundant except for very rare
1149 conditions that actually indicate broken heap data.
1150
3c9f20f8
DH
11512000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1152
1153 * numbers.c (scm_logcount, scm_integer_length): Reordered
1154 dispatch sequence.
1155
8536a982
GH
11562000-05-15 Gary Houston <ghouston@arglist.com>
1157
1158 * stime.c (scm_strftime): don't reset TZ if zone is an empty
1159 string. append a "0" to the zone for TZ.
c8a54c4b 1160
78166ad5
DH
11612000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
1162
1163 * numbers.c (scm_logbit_p, scm_bit_extract): Reordered dispatch
1164 sequence.
1165
1166 (scm_bit_extract): Fixed handling of bignums.
1167
f5f2dcff
DH
11682000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
1169
1170 * async.c (scm_sys_gc_async_thunk), chars.h (SCM_ICHRP, SCM_ICHR,
1171 SCM_MAKICHR), continuations.h (SCM_SETJMPBUF), error.c
1172 (scm_sysmissing), error.h (scm_sysmissing), evalext.c
1173 ('serial-map), ioext.c (scm_fseek), ioext.h (scm_fseek),
1174 keywords.c (scm_tc16_kw, scm_init_keywords), ports.h (SCM_CRDY,
1175 SCM_INPORTP, SCM_OUTPORTP), ramap.c ('serial-array-copy!,
1176 'serial-array-map!), smob.c (scm_newsmob), smob.h (scm_smobfuns,
1177 scm_newsmob), tag.c (scm_tag), tag.h (scm_tag), tags.h
1178 (scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc): Wrapped
1179 deprecated code between #if (SCM_DEBUG_DEPRECATED == 0) #endif.
1180
1181 * fports.c (scm_fport_buffer_add), ports.c (scm_input_port_p,
1182 scm_output_port_p), print.c (scm_get_print_state), validate.h
1183 (SCM_VALIDATE_CHAR): Replace use of deprecated macros
1184 SCM_INPORTP, SCM_OUTPORTP, SCM_ICHRP by SCM_INPUT_PORT_P,
1185 SCM_OUTPUT_PORT_P, SCM_CHARP, respectively.
1186
07ccd85d
GH
11872000-05-14 Gary Houston <ghouston@arglist.com>
1188
32f1b9fd
GH
1189 * stime.c (scm_strftime): if HAVE_TM_ZONE is not defined, hack the
1190 TZ environment variable so that the %Z format returns the zone
1191 from the input vector instead of the system default.
1192
07ccd85d
GH
1193 from Keisuke Nishida:
1194 * fports.c (scm_setvbuf): minor docstring fix.
1195 * ports.h (scm_generic_fgets): obsolete prototype deleted.
1196
3a9809df
DH
11972000-05-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1198
1199 * __scm.h: Added new section for debugging options.
1200
1201 (SCM_DEBUG_DEPRECATED): If 1, no deprecated code is included to
1202 help developers to get rid of references to deprecated code.
1203
1204 * numbers.[ch] (SCM_POSFIXABLE, SCM_NEGFIXABLE, SCM_UNEGFIXABLE,
1205 SCM_FIXABLE, SCM_FLOBUFLEN): These macros are no longer provided
1206 as part of the interface and are marked as deprecated in the
1207 header file.
1208
1209 * numbers.c (scm_make_real, scm_make_complex): Inlined the
1210 corresponding macros SCM_NEWREAL and SCM_NEWCOMPLEX,
1211 respectively.
1212
1213 * numbers.h (SCM_NEWREAL, SCM_NEWCOMPLEX, SCM_INEXP, SCM_CPLXP,
1214 SCM_REAL, SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP,
1215 SCM_NO_BIGDIG, SCM_NUM2DBL, scm_dblproc): Deprecated.
1216
e828cb75
DH
12172000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1218
1219 * gc.h (scm_cell, SCM_CELL_WORD, SCM_CELL_OBJECT,
1220 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT): Scheme cells now consist
1221 of two scm_bits_t values instead of two SCM values, because it is
1222 legal for cell entries to hold values that are not scheme objects.
1223
1224 (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR):
1225 Use SCM_SETC[AD]R to modify contents of pairs.
1226
5986c47d
DH
12272000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1228
1229 * numbers.c (IS_INF, isfinite): Added FIXME comment.
1230
1231 (scm_abs, scm_magnitude): Make these two independent of each
1232 other. scm_abs now reports an error if given a complex argument.
1233
1234 (scm_istr2flo, scm_integer_p). Use SCM_REAL_VALUE instead of
1235 SCM_REALPART if the object is known to be real.
1236
1237 (scm_init_numbers): No need to use SCM_NEWREAL macro for speed
1238 here.
1239
1240 * numbers.h (SCM_SINGP): Set to 0 instead of SCM_BOOL_F.
1241
eb42e2f0
DH
12422000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1243
1244 * eq.c (scm_eqv_p): Separate handling of real and complex
1245 values. Remove #ifdef SCM_BIGDIG #endif test.
1246
1247 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_scm2floats,
1248 gh_scm2doubles), hash.c (scm_hasher), ramap.c (scm_array_fill_int,
1249 ramap_rp, scm_array_map_x), random.c (vector_scale,
1250 vector_sum_squares), unif.c (scm_make_uve, scm_array_p,
1251 scm_array_set_x): Use SCM_REAL_VALUE instead of SCM_REALPART if
1252 the object is known to be real. Use SCM_COMPLEXP instead of
1253 deprecated SCM_CPLXP. Use SCM_INEXACTP instead of deprecated
1254 SCM_INEXP.
1255
7235ee58
DH
12562000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1257
1258 * numbers.c: No need to include unif.h.
1259
1260 (IS_INF): Returned to old test for now: x == x + 1 will not work
1261 for large numbers due to rounding errors.
1262 Thanks to Kalle Olavi Niemitalo.
1263
bb628794
DH
12642000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1265
1266 * numbers.c (scm_divbigdig): Removed outdated comment.
1267
1268 (scm_number_to_string, scm_string_to_number, scm_number_p,
1269 scm_real_p, scm_integer_p, scm_inexact_p, scm_gr_p, scm_leq_p,
1270 scm_geq_p, scm_make_rectangular, scm_make_polar,
1271 scm_inexact_to_exact): Added comments.
1272
1273 (add1, scm_init_numbers): Removed add1.
1274
98cb6e75
DH
12752000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1276
1277 * numbers.c (IS_INF): The new test is x == x + 1. The old test
1278 x == x/2 did not work for zero values. Thanks to Han-Wen Nienhuys
1279 and Ivan Toshkov.
1280
1281 (scm_number_to_string, scm_sum, scm_difference, scm_two_doubles,
1282 scm_num2long, scm_num2long_long, scm_num2ulong): Reordered
1283 dispatch sequence.
1284
c45c2b6b
MV
12852000-05-09 Marius Vollmer <mvo@zagadka.ping.de>
1286
1287 * scmsigs.c (take_signal): Execute SCM_ASYNC_TICK for SIGSEGV,
1288 SIGILL and SIGBUS signals. These signals are not continuable and
1289 must be handled for real right away.
1290
c2ff8ab0
DH
12912000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1292
1293 * numbers.c (scm_zero_p, scm_positive_p, scm_negative_p,
1294 scm_real_part, scm_imag_part, scm_magnitude,
1295 scm_inexact_to_exact): Reordered dispatch sequence.
1296
1a450153
DH
12972000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1298
1299 * feature.c: No need to include "libguile/smob.h"
1300
1301 (scm_loc_features, features, scm_add_feature, scm_init_feature):
1302 Removed variable 'scm_loc_features' as a pointer to the SCM value
1303 holding the features list. Using variable 'features' instead,
1304 which holds the interned pair. Thus, SCM_SETCDR can be used
1305 instead of pointer trickery.
1306
665aeda3
DH
13072000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1308
1309 * alist.c (scm_acons): Use SCM{_SET}?_CELL_OBJECT as long as a
1310 cell is not known to be a valid pair.
1311
ab66ae47
DH
13122000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1313
1314 * eval.c (ASRTSYNTAX, scm_m_body, scm_m_letrec1): Removed
1315 ASRTSYNTAX. Using SCM_ASSYNT instead.
1316
1317 (scm_m_body): Don't create a redundant cons cell.
1318
1319 (scm_m_do): Removed redundant test 'bodycheck'.
1320
1321 (bodycheck): Removed.
1322
1323 * stacks.c (stack_depth, read_frame, read_frames): Removed
1324 redundant calculation of size, minimized some variable scopes.
1325
4983cbe4
DH
13262000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1327
1328 * pairs.c (scm_cons, scm_cons2): Use SCM{_SET}?_CELL_OBJECT as
1329 long as a cell is not known to be a valid pair.
1330
1331 (scm_pair_p): Eliminated redundant SCM_IMP test.
1332
44d3cb0d
DH
13332000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1334
1335 * eval.c (scm_m_body, scm_macroexp, unmemocopy, scm_eval_args,
1336 scm_deval_args): Eliminated redundant SCM_IMP tests.
1337
1338 * hashtab.c (scm_ihashx, scm_sloppy_assx, scm_delx_x), weaks.c
1339 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
1340 scm_make_doubly_weak_hash_table): Fixed critical sections.
1341 Thanks to Keisuke Nishida.
1342
9a00c9fc
DH
13432000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1344
1345 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest):
1346 Fixed some goto-related initialization bugs (introduced by me).
1347
b82c6ce0
DH
13482000-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1349
1350 * numbers.h (SCM_INUM0): Uses SCM_MAKINUM instead of SCM_PACK.
1351
1352 * dynl.c (dynl_obj, DYNL_OBJ, get_dynl_obj): Removed.
1353
1354 (DYNL_FILENAME, DYNL_HANDLE): Use SCM_CELL... macros instead of
1355 pointer trickery.
1356
1357 (SET_DYNL_HANDLE): Added.
1358
1359 (scm_dynamic_object_p): Simplified.
1360
1361 (scm_dynamic_unlink, scm_dynamic_func): Changed comment. Deliver
1362 better error message when accessing unlinked dynamic objects.
1363 Eliminated call to get_dynl_obj.
1364
106428b3
MV
13652000-05-03 Marius Vollmer <mvo@zagadka.ping.de>
1366
7eea5296 1367 * scmsigs.c (orig_handlers) [!HAVE_SIGACTION]: Fix declaration to
106428b3
MV
1368 be an array of function pointers instead of being a pointer to an
1369 array returning function. Thanks to Kalle Olavi Niemitalo!
1370
f4c627b3
DH
13712000-05-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
1372
1373 * numbers.c (scm_divbigbig, scm_divbigint), numbers.h
1374 (scm_divbigbig, scm_divbigint): Don't return zero any more to
1375 indicate that a division has a remainder, return SCM_UNDEFINED
1376 instead. It is improbable that anyone actually used these
1377 functions outside of numbers.c. For this reason and due to the
1378 change in behaviour the functions are static now. Thus, if
1379 surprisingly there are users of these functions they will at least
1380 get alarmed.
1381
1382 * numbers.c: Removed #ifdef SCM_BIGDIG #endif in those functions,
1383 that already have a clean dispatch order. Note: SCM_BIGDIG is
1384 always defined.
1385
1386 * numbers.c (scm_inexact_p): Simplified.
1387
1388 * numbers.c (scm_num_eq_p, scm_less_p, scm_max, scm_min,
1389 scm_product, scm_num2dbl, scm_angle): Reordered dispatch
1390 sequence, thereby fixing some comparisons of SCM values with
1391 integer constants.
1392
1393 * numbers.c (scm_divide): Division by zero of inums leads to an
1394 error now. (Formerly, an infinite number was returned.)
1395
1396 Respect the fact, that scm_divbigbig does now return SCM_UNDEFINED
1397 if a division has a remainder.
1398
3a6e6616
GH
13992000-05-02 Gary Houston <ghouston@arglist.com>
1400
1401 * Makefile.am (INCLUDES): add ${INCLTDL} (thanks to Tim Mooney).
1402
f8de44c1
DH
14032000-05-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
1404
1405 * numbers.c (scm_logtest, scm_division): Reordered dispatch
1406 sequence, thereby fixing some comparisons of SCM values with
1407 integer constants.
1408
1409 * numbers.h (scm_makdbl): Mark as deprecated at the point of
1410 declaration.
1411
1412 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_double2scm,
1413 gh_doubles2scm), numbers.c (scm_istr2flo, scm_max, scm_min,
1414 scm_sum, scm_difference, scm_product, scm_divide, scm_sys_expt,
1415 scm_sys_atan2, scm_make_rectangular, scm_make_polar,
1416 scm_real_part, scm_imag_part, scm_magnitude, scm_angle,
1417 scm_long2num, scm_long_long2num, scm_ulong2num), ramap.c
1418 (ramap_rp, scm_array_map_x), random.c (scm_random,
1419 scm_random_uniform, scm_random_normal_vector_x, scm_random_exp),
1420 struct.c (scm_struct_ref), unif.c (scm_array_to_list): Replace
1421 call to scm_makdbl with a call to scm_make_real or
1422 scm_make_complex, depending on whether the imaginary part is known
1423 to be zero.
1424
7f5fa419
GH
14252000-05-01 Gary Houston <ghouston@arglist.com>
1426
0607c109
GH
1427 * scmsigs.c: fix the definition of orig_handlers for the case
1428 that HAVE_SIGACTION is not defined (thanks to
1429 Kalle Olavi Niemitalo).
1430
7f5fa419
GH
1431 * Makefile.am: remove include_HEADERS (was libguile.h)
1432 libguile.h: moved to top level directory.
1433
09fb7599
DH
14342000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
1435
1436 * numbers.c (SCM_SWAP): Moved to the top of the file to allow for
1437 a wider use.
1438
1439 * numbers.c (scm_modulo, scm_gcd, scm_lcm, scm_logand, scm_logior,
1440 scm_logxor): Reordered dispatch sequence, thereby fixing some
1441 comparisons of SCM values with integer constants.
1442
1443 * number.c (scm_logtest): Removed some redundant SCM_{N}?IMP
83238bc1 1444 tests.
09fb7599 1445
89a7e495
DH
14462000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
1447
1448 * numbers.c (scm_quotient, scm_remainder): Removed code that was
1449 conditionally compiled based on BADIVSGNS. BADIVSGNS does not
1450 occur anywhere else throughout guile.
1451
1452 * numbers.c (scm_quotient): Fixed parameter number in error
1453 message.
1454
1455 * numbers.c (scm_remainder): Reordered dispatch sequence.
1456
a4fbabb3
GH
14572000-04-25 Gary Houston <ghouston@arglist.com>
1458
1459 * posix.c (scm_execlp): docstring fix (thanks to Martin
1460 Grabmueller).
1461
09e4d064
DH
14622000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1463
1464 * eval.c (undef_object): Made into a local static variable
1465 (suggested by Jost Boekemeier).
1466
e59bb516
DH
14672000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1468
1469 * pairs.c (cxrs, scm_init_pairs): Simplify initialization of
1470 c[ad]+r functions.
1471
1472 * procs.c (scm_init_iprocs), procs.h (scm_subr, scm_iproc,
1473 scm_dsubr, scm_init_iprocs): Removed.
1474
1475 * procs.h (SCM_SUBRF, SCM_DSUBRF): Access the cell words
1476 directly instead of casting a cell to a C struct.
1477
820920e6
MD
14782000-04-22 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1479
1480 Better modularization of GC extensions through new C level GC
1481 hooks:
83238bc1 1482
820920e6
MD
1483 * weaks.c (scm_weaks_prehistory): New function: Add
1484 scm_weak_vector_gc_init to scm_before_mark_c_hook; Add
1485 scm_mark_weak_vector_spines to scm_before_sweep_c_hook.
1486 (scm_scan_weak_vectors): New function; added to
1487 scm_after_sweep_c_hook.
1488
1489 * weaks.h (scm_weak_vectors, scm_weaks_prehistory): Added
1490 declarations.
1491
1492 * guardians.h (scm_guardian_gc_init, scm_guardian_zombify): Are
1493 now static.
1494
1495 * guardians.c (scm_guardian_gc_init): Turned into a hook function
1496 and added to scm_before_mark_c_hook.
1497 (scm_guardian_zombify): Turned into a hook function and added to
1498 scm_before_sweep_c_hook.
1499
1500 * async.c (scm_sys_gc_async_thunk): Run after-gc-hook.
1501 Added #include "libguile/gc.h".
1502
1503 * gc.h: Added #include "libguile/hooks.h".
1504
1505 * gc.c: Removed #include "libguile/guardians.h".
1506 (scm_before_gc_c_hook, scm_before_mark_c_hook,
1507 scm_before_sweep_c_hook, scm_after_sweep_c_hook,
1508 scm_after_gc_c_hook): New C level hooks.
1509 (scm_after_gc_hook): New Scheme level hook.
1510 (scm_gc_sweep): Moved scanning of weak vectors to weaks.c.
1511 (scm_igc): Moved initialization of scm_weak_vectors and the call
1512 to scm_guardian_gc_init to respective module.
1513 (scm_mark_weak_vector_spines): Moved to weaks.c;
1514 Call to scm_guardian_zombify moved to guardians.c;
1515 Run scm_before_gc_c_hook, scm_before_sweep_c_hook,
1516 scm_after_gc_c_hook at appropriate places.
1517 (scm_init_gc): Initialize scm_after_gc_hook.
1518
1519 * hooks.c, hooks.h (scm_make_hook_with_name): Removed deprecated
1520 function.
1521
1522 * init.c (scm_boot_guile_1): Added `scm_init_hooks'.
1523
1524 * Makefile.am: Added hooks.c, hooks.h, hooks.x.
1525
1526 * feature.c, feature.h: Broke out hook code into separate files.
1527
1528 * hooks.c, hooks.h: New files.
9764c29b 1529
a0599745
MD
1530 * *.*: Change includes so that they always use the "prefixes"
1531 libguile/, qt/, guile-readline/, or libltdl/.
1532 (Thanks to Tim Mooney.)
1533
1534 * Makefile.am (INCLUDES): Removed THREAD_CPPFLAGS and INCLTDL.
1535 (DEFS): Added. automake adds -I options to DEFS, and we don't
1536 want that.
1537 Removed all -I options except for the root source directory and
1538 the root build directory.
1539
f4b0c568
MD
1540 * numbers.c (scm_odd_p, scm_even_p): Use SCM_WRONG_TYPE_ARG
1541 instead of SCM_ASSERT (0, ...). (Some compilers will complain
1542 about control reaching end of function otherwise, and, besides,
1543 the new code is not less clear.)
1544
9764c29b 1545 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Added
83238bc1 1546 calls to malloc debugging functions.
9764c29b
MD
1547
1548 * init.c (scm_boot_guile_1): Added calls to debug-malloc init
1549 functions.
1550
1551 * Makefile.am: Added debug-malloc.c, debug-malloc.h,
1552 debug-malloc.x.
1553
1554 * debug-malloc.c, debug-malloc.h: New files.
1555
4219f20d
DH
15562000-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1557
1558 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p): Added
1559 documentation strings.
1560
1561 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p, scm_abs,
1562 scm_quotient): Reordered dispatch sequence to first handle
1563 immediates, second handle bignums and finally handle generic
1564 functions respectively signal wrong type arguments. Hopefully
1565 this will allow for easier separation when goops is integrated.
1566
195e6201
DH
15672000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1568
1569 * gc.c (which_seg): Use SCM2PTR to convert a non immediate SCM
1570 variable into a pointer to a heap cell.
1571
1572 * gc.c (scm_mark_locations, scm_cellp, init_heap_seg,
1573 scm_unhash_name): Remove redundant cast to SCM_CELLPTR.
1574
9e882eec
DH
15752000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1576
1577 * print.c (scm_iprin1): Don't assign zero to SCM values, use
1578 SCM_UNDEFINED instead.
1579
1580 * weaks.c (scm_make_weak_vector): Fix assignment of zero to a
1581 vector element. (Still to be improved)
1582
3201d763
DH
15832000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1584
1585 * eval.c (undef_cell): Removed, replaced by:
1586
1587 (undef_object): Added to replace undef_cell.
1588
1589 (scm_lookupcar, scm_lookupcar1): Use undef_object.
1590
1591 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
1592 scm_m_atbind, CHECK_EQVISH, SCM_CEVAL), procs.h (SCM_SETCODE):
1593 Don't perform arithmetic operations with SCM values.
1594
1595 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
1596 scm_m_atbind, scm_eval_args, scm_deval_args, SCM_CEVAL): Use
1597 symbolic names for the tc3 type codes.
1598
1599 * eval.c (scm_m_define, SCM_CEVAL, SCM_APPLY): Remove redundant
1600 cast to SCM.
1601
1602 * eval.c (scm_eval_args, scm_deval_args, SCM_CEVAL): Made the
1603 access of the struct vcell element explicit.
1604
f7c38587
MD
16052000-04-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1606
1607 * struct.c (scm_struct_free_light, scm_struct_free_standard,
1608 scm_struct_free_entity): Use `scm_must_free' instead of `free'.
1609
1610 * procs.c (scm_make_subr_opt): Tell scm_must_realloc that we're
1611 realloc:ing scm_subr_table ("what" instead of "who").
1612
1613 * numbers.c (scm_adjbig): Ditto.
1614
e8293eb6
GB
1615Tue Apr 18 08:22:41 2000 Greg J. Badros <gjb@cs.washington.edu>
1616
83238bc1
ML
1617 * validate.h: Do not cast to (unsigned) in SCM_VALIDATE_INUM_RANGE
1618 when testing high-end of the range. Mikael Djurfeldt noticed this
e8293eb6
GB
1619 anomaly -- thanks Mikael!
1620
baa702c8
DH
16212000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1622
1623 * unif.c (l2ra): Don't eliminate the call to scm_array_set_x
1624 itself, as was done in the previous 'patch'. (Thanks to Radey
1625 Shouman)
1626
fee7ef83
DH
16272000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1628
1629 * options.c (scm_options), read.c (recsexpr): Remove redundant
1630 SCM_IMP test.
1631
1632 * print.c (scm_iprin1): Made the access of the struct vcell
1633 element explicit.
1634
1635 * print.h (SCM_PRINT_CLOSURE): Added call to SCM_PACK.
1636
1637 * ramap.c (scm_ra_eqp, ra_compare), unif.c
1638 (scm_uniform_vector_ref, scm_cvref, rapr1): Separated accesses to
1639 unsigned long and signed long arrays and clarified the way the
1640 access is performed.
1641
1642 * ramap.c (scm_array_map_x, raeql), read.c (scm_lreadr), stacks.c
1643 (narrow_stack), unif.c (scm_cvref, scm_uniform_array_read_x,
1644 scm_raprin1): Use SCM_EQ_P to compare SCM values.
1645
1646 * strings.c (scm_makstr): Treat the msymbol slots as a field of
1647 scm_bits_t values.
1648
1649 * struct.h (SCM_SET_VTABLE_DESTRUCTOR): Treat the struct data as
1650 a field of scm_bits_t values.
1651
1652 * unif.c (l2ra): Don't test result of scm_array_set_x against
1653 zero: It is always SCM_UNSPECIFIED.
1654
9d0633a8
MD
16552000-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1656
1657 * script.c (scm_compile_shell_switches): Also enable
1658 record-positions when given the --debug option. (Thanks to Diego
1659 Dainese.)
1660
230d095f
DH
16612000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1662
1663 * print.c (ENTER_NESTED_DATA, print_circref, scm_iprlist):
1664 Compare SCM's with SCM_EQ_P.
1665
1666 * print.c (scm_make_print_state), srcprop.c
1667 (scm_source_properties): Use valid scheme object to initialize
1668 SCM variable.
1669
1670 * print.c (scm_iprin1): Remove redundant calls to SCM_UNPACK.
1671
c8045e8d
DH
16722000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1673
1674 * struct.c (scm_alloc_struct, scm_struct_free_0,
1675 scm_struct_free_light, scm_struct_free_standard,
1676 scm_struct_free_entity, scm_make_struct, scm_make_vtable_vtable),
1677 struct.h (scm_struct_free_t, scm_alloc_struct, scm_struct_free_0,
1678 scm_struct_free_light, scm_struct_free_standard,
1679 scm_struct_free_entity): Struct data regions (and thus also
1680 vtable data regions) are now C arrays of scm_bits_t elements.
1681
1682 * gc.c (scm_gc_mark, scm_gc_sweep, scm_unhash_name): Made the
1683 mixup of glocs and structs explicit.
1684
1685 * gc.c (scm_unprotect_object): Compare SCM's with SCM_EQ_P.
1686
b0c54567
DH
16872000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1688
1689 * eval.c (scm_unmemocar): Use macros to test for gloc cell.
1690 Minimize scope of variable 'ir'.
1691
1692 * eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):
1693 Added missing call to SCM_UNPACK.
1694
b9c90f11
MD
16952000-04-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1696
7aac9824 1697 * validate.h (SCM_VALIDATE_INUM_RANGE_COPY,
2891588b 1698 SCM_VALIDATE_NUMBER_COPY): New macros.
b9c90f11 1699
9ae58e2d
MD
17002000-04-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1701
1702 * script.c (scm_compile_shell_switches): Added --debug option.
1703
49e12eb3
MD
17042000-04-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1705
1706 * vectors.c (scm_vector_set_x): Return SCM_UNSPECIFIED (as
1707 specified by R5RS).
1708
7c1e0b12
MD
17092000-04-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1710
1711 * ports.h (SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P): New macros.
1712 (SCM_INPORTP, SCM_OUTPORTP): Marked as deprecated.
1713
1714 * validate.h (SCM_VALIDATE_INPUT_PORT, SCM_VALIDATE_OUTPUT_PORT):
1715 New macros.
1716 Cleanup of code layout.
1717
1718 * ports.c, ports.h (close-input-port, close-output-port): New R5RS
1719 procedures.
1720
01c8a3dd
DH
17212000-04-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1722
1723 * continuations.c (scm_make_cont, scm_dynthrow): Completely
1724 separated implementations for defined (CHEAP_CONTINUATIONS) and
1725 !defined (CHEAP_CONTINUATIONS). Also, now using memcpy for stack
1726 copying.
1727
1728 * continuations.c (grow_stack): Renamed from grow_throw.
1729
1730 * continuations.c (copy_stack_and_call): New static function.
1731
1732 * continuations.c (scm_dynthrow): Simplified and made static.
1733
1734 * continuations.h (scm_dynthrow): Made static.
1735
553f4414
MD
17362000-04-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1737
1738 * unif.c, unif.h (shared-array-root, shared-array-offset,
1739 shared-array-increments): New primitives.
1740
cf551a2b
DH
17412000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1742
1743 * gc.c (scm_gc_sweep): Simplify the computation of freed memory
1744 size for msymbols.
1745
1746 * symbols.h (SCM_SLOTS, SCM_SYMBOL_FUNC, SCM_SYMBOL_PROPS,
1747 SCM_SYMBOL_HASH): The msymbol slots are now a field of scm_bits_t
1748 values.
1749
1750 * symbols.h (SCM_SET_SYMBOL_FUNC, SCM_SET_SYMBOL_PROPS): New
1751 macros.
1752
1753 symbols.c (scm_intern_obarray_soft, msymbolize, scm_symbol_fset_x,
1754 scm_symbol_pset_x): Use them.
1755
83238bc1 1756 * symbols.c (scm_symbol_hash): Unpack to access SCM raw data.
cf551a2b 1757
12a8b769
DH
17582000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1759
1760 * ports.c (scm_port_print): The port data is read as raw data.
1761
1762 * ports.h (SCM_TC2PTOBNUM, SCM_PTOBNUM): Fix SCM/scm_bits_t
1763 mismatch.
1764
d8c40b9f
DH
17652000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1766
1767 * eval.c (SCM_CEVAL), objects.c (scm_mcache_lookup_cmethod,
1768 scm_make_subclass_object), objects.h (SCM_CLASS_FLAGS,
1769 SCM_ENTITY_PROCEDURE, SCM_ENTITY_SETTER), struct.c
1770 (scm_struct_init, scm_struct_vtable_p, scm_make_struct,
1771 scm_struct_ref, scm_struct_set_x), struct.h (SCM_STRUCT_DATA):
1772 The struct data is now an array of scm_bits_t variables.
1773
1774 * objects.h (SCM_SET_ENTITY_PROCEDURE): New macro.
1775
cf551a2b 1776 objects.c (scm_set_object_procedure_x): Use it.
d8c40b9f
DH
1777
1778 * struct.c (scm_struct_init): Unused variable 'data' removed.
1779
1780 (scm_struct_vtable_p): Redundant SCM_IMP tests removed.
1781
1c3e63f0
DH
17822000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1783
1784 * objects.h (SCM_OBJ_CLASS_FLAGS, SCM_OBJ_CLASS_REDEF), struct.h
1785 (SCM_STRUCT_VTABLE_DATA, SCM_STRUCT_LAYOUT, SCM_STRUCT_VTABLE,
1786 SCM_STRUCT_PRINTER): The struct vtable data is now an array of
1787 scm_bits_t variables.
1788
1789 * struct.h (SCM_SET_STRUCT_LAYOUT): New macro.
1790
cf551a2b 1791 struct.c (scm_make_vtable_vtable): Use it.
1c3e63f0 1792
bc66755e
DH
17932000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1794
1795 * symbols.c (scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
1796 scm_intern_obarray_soft, scm_sysintern0,
1797 scm_string_to_obarray_symbol, scm_intern_symbol,
1798 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
1799 scm_symbol_bound_p, scm_symbol_set_x): Don't use C operators to
1800 compare SCM values.
1801
828865c3
DH
18022000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1803
1804 * numbers.c (scm_quotient, scm_modulo): Reordered to handle the
1805 case of immediate numbers parameters first. Also, only use
1806 decoded numbers for numerical comparison.
83238bc1 1807
1cf49a85
MD
18082000-04-10 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1809
1810 * objects.h: Don't redeclare scm_call_generic_0 and
1811 scm_apply_generic. (Thanks to Tal Tversky.)
1812
dba97178
DH
18132000-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1814
1815 * hash.c (scm_hasher): Use symbolic names for the tc3 constants.
1816 Unpack SCM value to use it as a switch parameter. Don't cast SCM
1817 values to int values.
1818
3da01fa3
MD
18192000-04-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1820
1821 * coop.c (mother): Handled EINTR (the wait has been interrupted by
1822 a signal).
1823
451e591c
DH
18242000-04-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
1825
1826 * __scm.h (SCM_WTA_DISPATCH_[012n]): To test whether a SCM value
1827 contains a raw zero value it has to be unpacked.
1828
1829 * debug.c (with_traps_inner, scm_with_traps): Passing SCM values
1830 via void * requires unpacking / packing.
1831
1832 * stacks.h (SCM_STACKP): Remove unnecessary SCM_NIMP test and use
1833 SCM_EQ_P to compare SCM values.
1834
1835 * stacks.h (SCM_FRAME_VOID_P, SCM_FRAME_REAL_P, SCM_FRAME_PROC_P,
1836 SCM_FRAME_EVAL_ARGS_P, SCM_FRAME_OVERFLOW_P): Remove unnecessary
1837 call to SCM_UNPACK.
1838
1839 * tags.h (SCM_NECONSP): Define in terms of SCM_ECONSP
1840
1841 * tags.h (SCM_ECONSP): Clarify the test for glocs. This is still
1842 quite ugly.
1843
e94e3f21
ML
18442000-04-05 Michael Livshin <mlivshin@bigfoot.com>
1845
1846 * async.[ch]: unexpose low-level async access macros (thanks to
1847 Dirk Herrmann).
1848
1849 * validate.h: move async validation macros to async.c (nobody else
1850 needs them anyway), and rename them.
1851
843e4e9d
ML
18522000-04-04 Michael Livshin <mlivshin@bigfoot.com>
1853
1854 * async.h: kill the scm_async_t struct. having a heap cell
1855 pretending to be a C struct is not helthy, and is not needed here
1856 anyway, as asyncs happily fit in one heap cell.
1857
1858 * async.c: reflect the fact that asyncs are now represented by
1859 single heap cell each.
1860
873c35ee
GH
18612000-04-04 Gary Houston <ghouston@arglist.com>
1862
1863 * error.c (scm_syserror): save errno before doing anything else,
1864 since it's used in two expressions and may get mutated (thanks to
1865 Dirk Herrmann).
1866
4260a7fc
DH
18672000-04-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1868
1869 * debug.c (scm_procedure_source, scm_procedure_environment),
1870 gsubr.c (scm_make_gsubr_with_generic, scm_gsubr_apply), procs.c
1871 (scm_procedure, scm_setter): Return valid scheme value as dummy.
1872
1873 * filesys.c (scm_readdir, scm_rewinddir, scm_closedir,
1874 scm_dir_print, scm_dir_free), numbers.h (SCM_COMPLEX_REAL,
1875 SCM_COMPLEX_IMAG), regex-posix.h (SCM_RGX), throw.c (JBJMPBUF,
1876 SETJBJMPBUF, JBJMPBUF, SETJBJMPBUF, freejb, print_lazy_catch,
1877 scm_ithrow), unif.c (scm_uniform_vector_ref, scm_cvref,
1878 scm_array_set_x, rapr1), unif.h (SCM_ARRAY_V, SCM_ARRAY_BASE),
1879 vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS): Use
1880 SCM_{SET_}?CELL_WORD* to access cell entries with raw data.
1881
1882 * filesys.c (scm_closedir), numbers.c (scm_addbig), numbers.h
1883 (SCM_SETNUMDIGS), throw.c (JBACTIVE, SCM_JBDFRAME,
1884 SCM_SETJBDFRAME): Read and modify data bits in cell entry #0 using
1885 SCM_{SET_}?CELL_WORD_0.
1886
1887 * filesys.c (fill_select_type, retrieve_select_type, scm_select),
1888 numbers.c (scm_gcd, scm_lcm, scm_integer_expt, scm_zero_p,
1889 scm_product, scm_divide), posix.c (scm_getgrgid), ramap.c
1890 (scm_array_fill_int, racp), throw.c (scm_catch, scm_lazy_catch,
1891 scm_ithrow), unif.c (scm_make_uve, scm_array_p,
1892 scm_transpose_array, scm_array_set_x, scm_bit_set_star_x,
1893 scm_bit_count_star, l2ra), variable.c (prin_var,
1894 scm_make_variable, scm_make_undefined_variable,
1895 scm_builtin_variable), vectors.c (scm_vector_set_length_x),
1896 vports.c (sf_flush, sf_close): Don't use C operators to compare
1897 SCM values.
1898
1899 * numbers.c (scm_odd_p, scm_even_p), variable.c (prin_var): Must
1900 unpack SCM values to access their raw contents.
1901
1902 * numbers.c (big2str): Eliminate unnecessary casts to SCM.
1903
1904 * numbers.h (SCM_NEWREAL), regex-posix.h (SCM_RGXP), vports.c
1905 (scm_make_soft_port): Use SCM_{SET_}?CELL_TYPE to access the cell
1906 type information.
1907
1908 * throw.c (printjb): Eliminated unnecessary unpack.
1909
1910 * variable.c (make_vcell_variable): Smob data is of type
1911 scm_bits_t.
1912
5b15c3b4
MD
19132000-04-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1914
1915 * print.c: Removed promise to rewrite printer code before next
1916 release. :)
1917
395c8567
MD
19182000-04-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1919
1920 * iselect.c (add_fd_sets): Insert empty statement after label.
1921 (Thanks to Tim Mooney.)
1922
50fecba9
ML
19232000-04-03 Michael Livshin <mlivshin@bigfoot.com>
1924
1925 * guardians.c (scm_guardian_zombify): mark all zombies in a
1926 separate loop after processing all the currently known live
1927 guardians, so as to not introduce order dependencies (thanks to
f6e2fd8b 1928 Gary Houston). note that the order problems are still there if
843e4e9d 1929 some guardians are themselves zombies, but that's a sick case that
f6e2fd8b
ML
1930 I'm not going to worry about.
1931 also, make another outer loop to process zombified
50fecba9
ML
1932 guardians (which are uncovered while marking zombies).
1933
54778cd3
DH
19342000-04-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
1935
1936 * evalext.c (scm_definedp, scm_m_undefine), gc.c
1937 (scm_mark_weak_vector_spines, scm_gc_sweep), hashtab.c
1938 (scm_hashq_ref, scm_hashv_ref, scm_hash_ref, scm_hashx_ref),
1939 keywords.c (scm_make_keyword_from_dash_symbol), lang.c
1940 (scm_nil_eq), lang.h (SCM_NILP, SCM_NIL2EOL), load.c
1941 (scm_primitive_load), modules.c (scm_module_full_name), objects.c
1942 (scm_class_of, scm_mcache_lookup_cmethod, scm_make_class_object),
1943 ports.c (scm_close_all_ports_except), ports.h (SCM_EOF_OBJECT_P),
1944 print.c (scm_iprin1, scm_prin1, scm_iprlist, scm_simple_format),
1945 print.h (SCM_PRINT_STATE_P), procprop.c (scm_i_procedure_arity,
1946 scm_stand_in_scm_proc, scm_procedure_property,
1947 scm_set_procedure_property_x), procs.c
1948 (scm_procedure_documentation), read.c (scm_lreadr, scm_lreadparen,
1949 scm_lreadrecparen, scm_read_hash_extend), script.c
1950 (scm_compile_shell_switches), srcprop.c (scm_source_property,
1951 scm_set_source_property_x), srcprop.h (SCM_WHASHFOUNDP), stacks.c
1952 (read_frame, NEXT_FRAME, read_frames, narrow_stack,
1953 scm_make_stack, scm_stack_id), strop.c (scm_i_index,
1954 scm_string_index, scm_string_rindex), struct.c (scm_struct_init),
1955 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_INUM_DEF,
1956 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_PROC,
1957 SCM_VALIDATE_ARRAY): Don't use C operators to compare SCM values.
1958
1959 * feature.c (make_hook), keywords.c
1960 (scm_make_keyword_from_dash_symbol), macros.c (scm_makacro,
1961 scm_makmacro, scm_makmmacro), print.c (scm_iprin1,
1962 scm_printer_apply, scm_port_with_print_state): Smob data is of type
1963 scm_bits_t.
1964
1965 * feature.c (print_hook), gc.c (scm_object_address), hash.c
1966 (scm_ihashq, scm_ihashv), print.c (scm_iprin1, scm_ipruk), smob.c
843e4e9d 1967 (freeprint), struct.c (scm_print_struct): Must unpack
54778cd3
DH
1968 SCM values to access their raw contents.
1969
1970 * fluids.c (apply_thunk, scm_with_fluids), hashtab.c (fold_proc,
1971 scm_hash_fold), load.c (load, scm_primitive_load): Passing SCM
1972 values via void * requires unpacking / packing.
1973
1974 * fports.c (scm_fport_buffer_add, scm_setvbuf), procs.h
1975 (SCM_SUBRNUM, SCM_SET_SUBRNUM), srcprop.h (SRCPROPBRK, SRCBRKP):
1976 Read and modify data bits in cell entry #0 using
1977 SCM_{SET_}?CELL_WORD_0.
1978
1979 * fports.c (scm_fdes_to_port), gc.c (scm_gc_for_newcell,
1980 scm_gc_sweep, init_heap_seg), init.c (start_stack), ports.c
1981 (scm_void_port), procs.c (scm_make_subr_opt,
1982 scm_make_procedure_with_setter), root.c (scm_internal_cwdr),
1983 smob.c (scm_make_smob), strports.c (scm_mkstrport): Use
1984 SCM_SET_CELL_TYPE to write the cell type information.
1985
1986 * gc.c (scm_gc_mark): Use SCM_CELL_OBJECT* to access SCM values
1987 from cells that are no scheme pairs.
1988
1989 * gc.c (scm_gc_sweep), mallocs.c (prinmalloc), mallocs.h
1990 (SCM_MALLOCDATA, SCM_SETMALLOCDATA), print.c (scm_ipruk), random.h
1991 (SCM_RSTATE), root.h (SCM_ROOT_STATE), smob.c (scm_smob_free),
1992 srcprop.c (freesrcprops), srcprop.h (SRCPROPPOS, SRCPROPFNAME,
1993 SRCPROPCOPY, SRCPROPPLIST), struct.c (scm_make_struct,
1994 scm_make_vtable_vtable): Use SCM_{SET_}?CELL_WORD* to access cell
1995 entries with raw data.
1996
1997 * gc.c (scm_init_storage), sort.c (applyless), strop.c
1998 (scm_string_to_list): Eliminate unnecessary casts to SCM.
1999
2000 * mallocs.c (scm_malloc_obj): Store result of malloc as raw
2001 data.
2002
2003 * ports.c (scm_close_all_ports_except): Duplicate documentation
2004 text removed.
2005
2006 * print.c (scm_iprin1): Use SCM_ITAG3.
2007
2008 * procs.h (SCM_SET_SUBRNUM): Fix shift direction.
2009
2010 * snarf.h (SCM_GPROC, SCM_GPROC1, SCM_SYMBOL, SCM_GLOBAL_SYMBOL,
2011 SCM_KEYWORD, SCM_GLOBAL_KEYWORD, SCM_VCELL, SCM_GLOBAL_VCELL,
2012 SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): Don't initialize globals
2013 and static variables at their point of declaration, but rather in
2014 the init function.
2015
2016 * tags.h (SCM_PACK): Automatically cast to scm_bits_t.
2017
abeed821
GH
20182000-04-02 Gary Houston <ghouston@arglist.com>
2019
2020 * guardians.c (TCONC_IN, scm_make_guardian): set the CDR of the
2021 empty tconc pair to SCM_EOL instead of SCM_BOOL_F, avoiding the
2022 use of an improper list (which breaks g_print. g_print isn't
2023 used).
2024 guardians.c: Added more comments and modified the make-guardian
2025 docstring. Reordered a few procedures.
2026
cf498326
DH
20272000-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
2028
2029 * eval.c (scm_lookupcar1, scm_lookupcar, scm_m_case, scm_m_cond,
2030 scm_m_lambda, iqq, scm_m_define, scm_m_expand_body, unmemocopy,
2031 SCM_CEVAL), procs.h (SCM_TOP_LEVEL): Don't use C operators to
2032 compare SCM values.
2033
2034 (scm_makprom): Smob data is of type scm_bits_t.
2035
cffcab30
DH
20362000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
2037
2038 * backtrace.c (display_error_body), debug.c (scm_procedure_source,
2039 scm_reverse_lookup), dynl.c (scm_dynamic_link): Don't use C
2040 operators to compare SCM values.
2041
2042 * debug.c (scm_make_debugobj), debug.h (SCM_DEBUGOBJ_FRAME,
2043 SCM_SET_DEBUGOBJ_FRAME): Update SCM_{SET_}?DEBUGOBJ_FRAME to
2044 access raw cell data with SCM_{SET_}?CELL_WORD_1.
2045
2046 * debug.c (scm_make_debugobj): Don't use SCM_SETCAR to set types.
2047
2048 * debug.c (scm_make_memoized), dynl.c (scm_dynamic_link): Smob
2049 data is of type scm_bits_t.
2050
7fa93bf8
DH
20512000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
2052
2053 * gdbint.c (gdb_maybe_valid_type_p), guardians.c (TCONC_EMPTYP,
2054 scm_guardian_zombify): Use SCM_EQ_P to compare SCM values.
2055
2056 * guardians.c (GUARDIAN): Use SCM_CELL_WORD_1 for raw data.
2057
74a16888
DH
20582000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
2059
2060 * ports.h (scm_port): Change type of stream member to scm_bits_t.
2061
2062 * gdbint.c (unmark_port, remark_port), ports.c (scm_markstream),
2063 strports.c (st_resize_port, scm_mkstrport), vports (sf_flush,
2064 sf_write, sf_fill_input, sf_close, scm_make_soft_port): Since
2065 streams are now of type scm_bits_t, SCM streams have to be
2066 unpacked/packed.
2067
2068 * ports.h (SCM_SETPTAB_ENTRY, SCM_SETSTREAM): Cast input to
2069 scm_bits_t.
2070
b6cc0ef6
MD
20712000-03-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2072
6a878357
MD
2073 * coop-defs.h (struct coop_t): Added `sto'-field again because of
2074 binary compatibility---let's remove it next time we alter some
2075 major structure.
2076
b6cc0ef6
MD
2077 * coop.c (coop_quitting_p, coop_cond_create, coop_mutex_create,
2078 coop_mother, coop_child): New variables.
2079 (mother): New function.
2080 (coop_create): New thread spawning mechanism which uses a "mother
2081 thread". The "dummy" pthreads aren't healthy enough to give birth
2082 to new threads since Linux threads thinks they are asleep.
2083
2084 * coop-defs.h (struct coop_t): Removed dummy_mutex.
2085
2086 * coop-defs.h, coop-threads.c (struct coop_t): Eliminate
2087 `sto'-field when GUILE_PTHREAD_COMPAT is enabled.
2088
843524cc
DH
20892000-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2090
2091 * arbiters.c (scm_make_arbiter), async.c (scm_async), dynwind.c
2092 (scm_internal_dynamic_wind): Smob data is always of type
2093 scm_bits_t.
2094
2095 * arbiters.c (SCM_ARB_LOCKED, SCM_LOCK_ARB, SCM_UNLOCK_ARB):
2096 Access the locking information in cell entry 0 with
2097 SCM_{SET_}?CELL_WORD_0 instead of SCM_*CAR.
2098
2099 * async.c (scm_run_asyncs): Use SCM_NULLP to test for the empty
2100 list.
2101
2102 * dynwind.c (scm_dowinds): Use SCM_EQ_P to compare SCM values.
2103
2104 * ports.h (SCM_PTAB_ENTRY, SCM_SETPTAB_ENTRY): Access the ptab
2105 entry data using SCM_{SET_}?CELL_WORD_1 instead of SCM_{SET}?CDR.
2106
fbd485ba
DH
21072000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2108
2109 * alist.c (scm_sloppy_assq, scm_assq), eq.c (scm_eq_p, scm_eqv_p,
2110 scm_equal_p), list.c (scm_ilength, scm_last_pair, scm_reverse,
2111 scm_sloppy_memq, scm_delq_x, scm_delq1_x), tags.h (SCM_UNBNDP):
2112 Don't use C operators == and != to compare SCM values, use
2113 SCM_EQ_P instead.
2114
2115 * boolean.c (scm_boolean_p): Use SCM_BOOLP to determine whether a
2116 SCM value is equal to #t or #f.
2117
2118 * eq.c (scm_eqv_p, scm_equal_p): Don't use SCM_CAR to access the
2119 cell type entry of non immediate objects of unknown type. Use
2120 SCM_CELL_TYPE instead.
2121
2122 * gh_data.c (gh_scm2bool, gh_module_lookup), list.c
2123 (scm_sloppy_memv, scm_sloppy_member, scm_delv_x, scm_delete_x,
2124 scm_delv1_x, scm_delete1_x), scmsigs.c (scm_sigaction): Use
2125 SCM_FALSEP and SCM_TRUE_P to compare SCM values against #f and
2126 #t.
2127
2128 * list.c (scm_listify): Use SCM_UNBNDP to test for an unbound
2129 scheme value.
2130
64e3bf6c
MD
21312000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2132
0208baa0
MD
2133 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread,
2134 scm_make_mutex, scm_make_condition_variable): Cast data to
2135 scm_bits_t in SCM_SET_CELL_WORD and SCM_NEWSMOB macros.
2136
64e3bf6c
MD
2137 * coop.c (coop_create): Set `specific' field, not `data' to NULL.
2138
94113249
DH
21392000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2140
2141 * smob.h (SCM_NEWSMOB, SCM_NEWSMOB2, SCM_NEWSMOB3, SCM_SMOB_DATA,
2142 SCM_SET_SMOB_DATA, SCM_TC2SMOBNUM, SCM_SMOBNUM): To access smob
2143 data, use SCM_{SET_}?CELL_TYPE or SCM_{SET_}?WORD_[1-3].
2144
2145 Note that this implies that smob data has always to be passed as
2146 values of type scm_bits_t.
2147
1978b33e
MD
21482000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2149
2150 * threads.c (scm_init_threads): Pass 0 size to scm_make_smob_type
2151 for scm_tc16_thread. As the current COOP threads are written, GC
2152 is not supposed to manage storage for threads.
2153
2154 * error.c (scm_error): Don't try to throw an error if
2155 scm_gc_heap_lock is true.
2156
2157 * coop.c (coop_finish): New function. Called at exit.
2158 (coop_aborthelp): Free thread structures when threads die.
2159 Finished LinuxThreads compatibility support => COOP threads now
2160 mesh with LinuxThreads.
843e4e9d 2161
1978b33e
MD
2162 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread):
2163 Changed SETCDR --> SET_CELL_WORD_1.
2164
2165 * coop-threads.c (scheme_launch_thread): Set word 1 of handle to 0
2166 when thread dies.
2167
dd039d6d
DH
21682000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2169
2170 * boolean.h (SCM_TRUE_P): New macro.
2171
2172 * boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP), pairs.h
2173 (SCM_NULLP, SCM_NNULLP): Use SCM_EQ_P to compare SCM values.
2174
8b3bda20
DH
21752000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
2176
2177 * continuations.h (SCM_CONTREGS, SCM_SET_CONTREGS): New macros to
2178 access continuation data.
2179
2180 (SCM_SETJMPBUF): Deprecated. Use SCM_SET_CONTREGS instead.
2181
2182 (SCM_JMPBUF, SCM_DYNENV, SCM_THROW_VALUE, SCM_BASE, SCM_SEQ,
2183 SCM_DFRAME): Use SCM_CONTREGS instead of SCM_CHARS to access
2184 continuation data.
2185
843e4e9d 2186 * continuations.c (scm_make_cont), init.c (start_stack),
8b3bda20
DH
2187 root.c (scm_internal_cwdr): Use SCM_SET_CONTREGS instead of
2188 SCM_SETJMPBUF.
2189
3210f49a
DH
21902000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
2191
2192 * symbols.h (SCM_LENGTH, SCM_SETLENGTH): Access the length field
2193 of strings and symbols by using SCM_{SET_}?CELL_WORD_0.
2194
2195 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS): Use SCM_{SET_}?CELL_WORD_1
2196 to access the char * field of strings and symbols.
2197
2d67e390
DH
21982000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
2199
2200 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Use SCM_SET_CELL_TYPE to set
2201 the type entry of a new cell. Added a comment about things to
2202 remember when updating the list of free cells.
2203
2204 (SCM_FREEP, SCM_MARKEDP): Use SCM_CELL_TYPE to access the type
2205 entry of a cell.
2206
76a369d9
DH
22072000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
2208
2209 * pairs.h (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): Use
2210 SCM_CELL_OBJECT and SCM_SET_CELL_OBJECT. This change implies that
2211 with strict type checking enabled these macros will only work if
2212 given valid SCM parameters.
2213
3210f49a 2214 (SCM_GCCDR): Moved to tags.h.
76a369d9
DH
2215
2216 * tags.h (SCM_GCCDR): Moved here from pairs.h.
2217
2549a709
DH
22182000-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
2219
2220 * tags.h (SCM2PTR, PTR2SCM): Moved to gc.h.
2221
2222 * pairs.h (scm_cell, SCM_CELLPTR, SCM_CELL_WORD*, SCM_CELL_OBJECT*,
2223 SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*, SCM_CELL_TYPE,
2224 SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK, SCM_PTR_GT,
2225 SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC, SCM_NEWCELL,
2226 SCM_NEWCELL2): Moved to gc.h.
2227
2228 (SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR, SCM_SETAND_CDR,
2229 SCM_SETOR_CAR, SCM_SETOR_CDR): Moved to gc.h. These names should
2230 be changed, though, since the macros are not only pair related.
2231
2232 (SCMPTR): Deleted.
2233
2234 * gc.h (SCM2PTR, PTR2SCM, scm_cell, SCM_CELLPTR, SCM_CELL_WORD*,
2235 SCM_CELL_OBJECT*, SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*,
2236 SCM_CELL_TYPE, SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK,
2237 SCM_PTR_GT, SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC,
2238 SCM_NEWCELL, SCM_NEWCELL2, SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR,
2239 SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR): Moved here from
2240 tags.h and pairs.h.
2241
8d3356e7
DH
22422000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2243
2244 * tags.h (SCM_STRICT_TYPING): New macro that, if defined,
2245 activates strict compile time type checking for variables of
2246 type SCM.
2247 (SCM, SCM_PACK, SCM_UNPACK): Define according to whether
2248 SCM_STRICT_TYPING or SCM_VOIDP_TEST are defined.
2249 (SCM_EQ_P): Defined as a macro equivalent for eq?.
2250
96f6f4ae
DH
22512000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2252
2253 * tags.h (SCM_POINTERS_MUNGED): Removed.
2254
2255 * gc.c (scm_gc_sweep, init_heap_seg): Removed use of
2256 SCM_POINTERS_MUNGED, thus fixing some illegal casts to SCM.
2257
0cbaaf0b
DH
22582000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
2259
2260 * pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],
2261 SCM_SET_CELL_OBJECT, SCM_SET_CELL_OBJECT_[0-3], SCM_CELL_TYPE,
2262 SCM_SET_CELL_TYPE): Added a set of low level macros for accessing
2263 cell entries.
2264 (SCM_CELL_WORD_[0-3]): Renamed from the SCM_CELL_WORD[0-3].
2265
2266 * procs.h, procs.c: Instead of SCM_{SET_}?CELL_WORD[12], use the
2267 newly introduced SCM_{SET_}?CELL_OBJECT_[12] macros.
2268
7284d584
MD
22692000-03-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2270
2271 * tags.h: Disabled definition of SCM_VOIDP_TEST.
2272
2273 Defining SCM as void * introduces problems which haven't been
2274 handled yet. Developers who work with these issues can enable it
2275 in their working copies.
2276
2277 Disabling this definition exposes a set of newly introduced and
2278 older misuses of types which causes warning messages during
2279 compilation. We'll fix this successively.
2280
2281 * gc.c (scm_mark_locations): Changed * (SCM **) X --> * (SCM *) X
2282 in order to obtain a value of type SCM.
2283 (scm_cellp): Updated with new changes to scm_mark_locations.
2284
2285 * continuations.h (SCM_SETJMPBUF): Cast second arg into SCM.
2286
2f9055ea
MD
2287 * continuations.c (scm_make_cont): Removed cast of size_t into
2288 long.
2289
7284d584
MD
2290 * symbols.h (SCM_SETCHARS): Cast second arg into SCM.
2291
f81e080b
DH
22922000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
2293
2294 * numbers.h (SCM_SETNUMDIGS): Use SCM_BIGSIZEFIELD macro for
2295 shifting, not constant. Thanks to Dale P. Smith.
2296
2297 * numbers.c (scm_sum, scm_difference): Don't test a SCM value
2298 for being less than zero. Decode it to a C value first. Again,
2299 thank you Dale.
2300
1ff2fa6e
DH
23012000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
2302
2303 * numbers.h, ramap.c, struct.h, vectors.h: Don't use SCM2PTR for
2304 non scheme values. If raw data is stored in SCM variables, it has
2305 to be accessed using SCM_UNPACK until a better solution is found.
2306
3920465b
MD
23072000-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2308
6f29dc6d
MD
2309 * tags.h (SCM_ECONSP, SCM_NECONSP): More corrections of
2310 pointer-arithmetic induced by the SCM_PACK/UNPACK change.
2311
2312 * print.c (scm_iprin1): SCM_PACK/UNPACK corrections.
2313
2314 * gc.c (scm_gc_sweep): SCM_PACK/UNPACK corrections.
2315
2316 * eval.c (SCM_CEVAL, scm_unmemocar): SCM_PACK/UNPACK corrections.
2317
2318 * dynwind.c (scm_swap_bindings): SCM_PACK/UNPACK corrections.
2319
3920465b
MD
2320 * async.c, __scm.h: Removed lots of the old async click logic. It
2321 is possible to reinsert it by defining GUILE_OLD_ASYNC_CLICK in
2322 __scm.h. Let's try this out and dump the old code after the
2323 threads reorganization.
2324 (set-tick-rate, set-switch-rate): Conditionally removed.
2325
90cca6f9
MD
23262000-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2327
2328 * gc.c (scm_gc_mark): Bugfix 1: The recent SCM_PACK/UNPACK change
2329 made SCM values into pointers. This turned an arithmetic
2330 computation of the address of the vcell into a pointer-arithmetic
2331 one, thereby screwing up marking of structs.
2332 Bugfix 2: Removed incompletely introduced loop variable `j' used
2333 when protecting the tail array of a struct.
2334
8246bf3e
DH
23352000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2336
2337 * struct.h (SCM_STRUCT_DATA): Don't cast SCM values to pointers.
2338
95c9e176
DH
23392000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2340
2341 * symbols.h, symbols.c (scm_strhash): Declare the string
2342 parameter as constant, since it is not modified.
2343
2344 * symbols.c (scm_intern_obarray_soft,
2345 scm_sysintern0_no_module_lookup): Can now pass constant strings
2346 to scm_strhash without need for casting.
2347
7352d0b2
DH
23482000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2349
2350 * vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS): Don't cast SCM
2351 values to pointers. Use SCM2PTR instead.
2352
b00c8cdc 23532000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9b139b4e
DH
2354
2355 * async.c (scm_set_tick_rate, scm_set_switch_rate): Don't unpack
2356 results of SCM_INUM.
2357
df2d5178
MD
23582000-03-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2359
bd54e664
MD
2360 * init.c (scm_boot_guile_1): Renamed GUILE_GC_TRIGGER_1 -->
2361 GUILE_MIN_YIELD_1, GUILE_GC_TRIGGER_2 --> GUILE_MIN_YIELD_2.
2362 GUILE_MIN_YIELD_X now take *positive* fractions of heap size.
2363
2364 * gc.c, gc.h (SCM_MIN_YIELD_1, SCM_MIN_YIELD_2,
2365 min_yield_fraction, min_yield, adjust_min_yield): Renamed from
2366 SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2, gc_trigger_fraction,
2367 gc_trigger, adjust_gc_trigger.
2368
df2d5178
MD
2369 * gc.c (alloc_some_heap): Further improvement of minimal heap size
2370 prediction.
2371 (SCM_MAX): New macro.
2372 (scm_freelist_t): New field: collected_1. Previous amount of
2373 collected cells.
2374 (gc_sweep_freelist_finish): Trigger based on two last values of
2375 freelist->collected to avoid unnecessary allocation due to
2376 temporary peaks.
bd54e664
MD
2377 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2):
2378 Adjusted to 45000 cells, 40% and 40%. Gives quick startup
2379 without extra heap allocation.
df2d5178 2380
f2961ccd
DH
23812000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2382
2383 * numbers.h (SCM_MAKINUM): The parameter to SCM_MAKINUM should
2384 already be a C value. No need to unpack it.
2385
3210f49a 2386 * numbers.c (scm_long_long2num): Cast the parameter to scm_bits_t
f2961ccd
DH
2387 if we know it fits into an inum.
2388
2389 * ramap.c (ramap_rp): An scm_tc7_[ui]vect object does point to a
2390 field of long values. In contrast, SCM_VELTS accesses a field of
2391 SCM values.
2392
7b4cc831
MD
23932000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2394
f1d316dd
MD
2395 * gc.c (scm_gc_stats): Inserted explanation of local_scm_mtrigger
2396 etc.
80770ddc
MD
2397 (scm_gc_yield_1): New variable: Holds previous yield. Used to
2398 make better judgements.
f1083dd7
MD
2399 (gc_sweep_freelist_finish): Inserted explanation of use of
2400 gc_trigger.
f1d316dd
MD
2401
2402 * print.h, stacks.h, options.c, options.h: Changed C++
2403 commentaries to C.
7b4cc831 2404
7a710745
DH
24052000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2406
2407 * tags.h (SCM2PTR, PTR2SCM): Use SCM_PACK / SCM_UNPACK correctly.
2408
2409 * numbers.h (SCM_INUMP, SCM_MAKINUM, SCM_INUM0, SCM_COMPLEX_REAL,
2410 SCM_COMPLEX_IMAG, SCM_NUMP, SCM_BDIGITS): Use SCM_PACK /
2411 SCM_UNPACK / SCM2PTR correctly.
2412
1ef20c80
MD
24132000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2414
2415 * gc.c (adjust_gc_trigger): Improved documentation.
2416 (alloc_some_heap): Since gc_trigger is used against
2417 freelist->collected, this is the value which should be used to
2418 predict minimum growth.
2419
b464b970
DH
24202000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2421
2422 * eval.h: Fix mixup of packed/unpacked SCM values. (Thanks
2423 Thien-Thi Nguyen for the patch.)
2424
3ab9f56e
DH
24252000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2426
2427 * numbers.c (scm_ash): Fixed typing problems with the second
2428 parameter and added some documentation. (Thanks Thien-Thi Nguyen
2429 for indicating the problem.)
2430
05bc3265
MD
24312000-03-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2432
78a4915a
MD
2433 * gc.c, gc.h (scm_gc_yield): New variable.
2434 (adjust_gc_trigger): Use scm_gc_yield.
2435 (alloc_some_heap): Use scm_gc_yield instead of
2436 scm_gc_cells_collected.
2437
05bc3265
MD
2438 * coop-threads.c: Addd #include "root.h", #include "strings.h".
2439
2440 * debug.c: Added #include "root.h". (Thanks to Thien-Thi Nguyen.)
2441
2442 * gc.c (scm_gc_for_newcell, adjust_gc_trigger): Improved GC
2443 trigger adjustmeant: Take yield (freed cells) for all freelists
2444 into account.
2445 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Tuned
2446 to 50000 cell heap with 45% trigger.
2447 (scm_gc_cells_collected): Reintroduced.
2448 (SCM_HEAP_SIZE): New macro.
2449 (scm_gc_sweep): Reintroduced correct computation of
2450 scm_cells_allocated.
2451 (scm_freelist_t): Corrected commentary for field `cluster_size':
2452 Clustersize counts objects, not cells; New member
2453 `clusters_allocated'.
2454
89e00824
ML
24552000-03-19 Michael Livshin <mlivshin@bigfoot.com>
2456
2457 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
2458 indentation style.
2459
afcfc5bb
MD
24602000-03-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2461
2462 * threads.h: Added #include "libguile/throw.h". (Thanks to
2463 Thien-Thi Nguyen.)
2464
a00c95d9
ML
24652000-03-18 Michael Livshin <mlivshin@bigfoot.com>
2466
50fecba9
ML
2467 * tags.h: (SCM_DOUBLE_CELLP, SCM_NDOUBLE_CELLP): new macros (bad
2468 names, anyone got any better ones?)
a00c95d9
ML
2469
2470 * gc.h: (typedef struct scm_freelist_t) remove from here.
2471
50fecba9 2472 * gc.c: (CELL_UP, CELL_DN) made these macros take additional
a00c95d9
ML
2473 parameter (the span).
2474 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK) new macros.
50fecba9 2475 (typedef struct scm_freelist_t) moved here from gc.h, it had no
a00c95d9
ML
2476 business being externally visible.
2477 (typedef struct scm_heap_seg_data_t) renamed from
2478 scm_heap_seg_data, to be style-compliant.
2479 (scm_mark_locations) if the possible pointer points to a
50fecba9
ML
2480 double-cell, check that it's properly aligned.
2481 (init_heap_seg) align double-cells properly, work with the
2482 assumption that the segment size divides cleanly by cluster size.
a00c95d9
ML
2483 (round_to_cluster_size) new function.
2484 (alloc_some_heap, make_initial_segment) use round_to_cluster_size
2485 to satisfy the new init_heap_seg invariant.
2486
28b3236d
DH
24872000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2488
2489 * _scm.h: Don't include async.h everywhere...
2490
2491 * eq.c eval.c iselect.c: ... only include it here.
2492
ba11fd4c
DH
24932000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2494
2495 * _scm.h: Don't include root.h everywhere...
2496
2497 * async.c continuations.c eq.c eval.c evalext.c feature.c gc.c
2498 gdbint.c gsubr.c ioext.c keywords.c lang.c load.c macros.c
2499 numbers.c objprop.c ports.c print.c procprop.c ramap.c read.c
2500 srcprop.c stackchk.c stacks.c strports.c symbols.c unif.c
2501 variable.c vectors.c vports.c: ... only include it here.
2502
7ab3fdd5
DH
25032000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2504
2505 * _scm.h: Don't include strings.h everywhere...
2506
2507 * backtrace.c dynl.c error.c feature.c filesys.c fports.c gc.c
2508 gdbint.c ioext.c load.c net_db.c numbers.c objects.c options.c
2509 ports.c posix.c print.c procs.c random.c read.c regex-posix.c
2510 simpos.c socket.c stacks.c stime.c strop.c strports.c struct.c
2511 symbols.c unif.c vectors.c version.c vports.c: ... only include it
2512 here.
2513
f04d8caf
DH
25142000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2515
2516 * _scm.h: Don't include ports.h everywhere...
2517
2518 * arbiters.c backtrace.c debug.c dynl.c dynwind.c eval.c feature.c
2519 fluids.c gc.c gdbint.c guardians.c hash.c keywords.c mallocs.c
2520 numbers.c objects.c print.c read.c root.c smob.c srcprop.c
2521 stackchk.c strports.c struct.c throw.c variable.c: ... only
2522 include it here.
2523
003d1fd0
DH
25242000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2525
2526 * _scm.h: Don't include vectors.h everywhere...
2527
2528 * eq.c eval.c filesys.c gc.c gsubr.c guardians.c hash.c hashtab.c
2529 keywords.c net_db.c numbers.c objects.c posix.c print.c procprop.c
2530 procs.c ramap.c random.c read.c scmsigs.c socket.c sort.c stime.c
2531 strports.c symbols.c unif.c vports.c weaks.c: ... only include it
2532 here.
2533
0fa27efa
DH
25342000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2535
2536 * genio.h: removed. (Only content was '/* delete me */'.)
2537
2538 * Makefile.am arbiters.c backtrace.c debug.c dynl.c dynwind.c
2539 error.c filesys.c fluids.c gc.c gsubr.c guardians.c keywords.c
2540 libguile.h mallocs.c numbers.c print.c random.c read.c root.c
2541 srcprop.c stackchk.c struct.c threads.c throw.c variable.c:
2542 Removed reference to genio.h
2543
148f31de
MD
25442000-03-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2545
2546 * gc.c, gc.h: Cleanup of the change of 2000-03-15.
2547 Cluster sizes are now independent of GC trigger values.
2548 GUILE_GC_TRIGGER_n can now specify a relative trigger value:
2549 A negative integer gives fraction of total heap size in percent.
1eb489a2 2550 (SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Default values set to -40.
148f31de
MD
2551
2552 * init.c (scm_boot_guile_1): Introduced new variable
2553 GUILE_MAX_SEGMENT_SIZE; New environment variable names:
2554 GUILE_INIT_SEGMENT_SIZE_1, GUILE_GC_TRIGGER_1,
2555 GUILE_INIT_SEGMENT_SIZE_2, GUILE_GC_TRIGGER_2
2556
6d0f81dd 25572000-03-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
a00c95d9 2558
6d0f81dd
MD
2559 * __scm.h (GC_FREE_SEGMENTS): Disable this until we have made
2560 freeing of segment work with the new GC scheme. (Thanks to
bc2c8d98
MD
2561 Michael Livshin.) Oops, also happened to make GUILE_NEW_GC_SCHEME
2562 the default, but I'll let this change stay in CVS Guile since this
2563 code is not expected to contain serious bugs.
a00c95d9 2564
17351a6f 25652000-03-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
c5133dc9 2566
6c7c449e
MD
2567 * gc.c, gc.h (scm_map_free_list): Define also if GUILE_DEBUG is
2568 defined.
5a551542
MD
2569 (scm_free_list_length): New procedure (GUILE_DEBUG).
2570 Fixed a small but serious bug introduced by the previous change.
2571
17351a6f
MD
2572 * gc.c (scm_gc_sweep): Moved variable n_objects to inner sweep
2573 loop and declare as register.
6c7c449e 2574
c5133dc9
MD
2575 * gc.c (scm_gc_sweep): Sigh... forgot to clear private freelists
2576 after GC.
2577
3820581c
GB
2578Wed Mar 15 08:27:04 2000 Greg J. Badros <gjb@cs.washington.edu>
2579
2580 * fluids.c: Docstring patch from Keisuke Nishida. Some
2581 reindentation, too, and a couple formals renamed. Should
2582 fluid-set! return UNSPECIFIED instead of a value?
2583
2584Wed Mar 15 08:24:58 2000 Greg J. Badros <gjb@cs.washington.edu>
2585
2586 * Makefile.am: Separate out DOT_X_FILES and DOT_DOC_FILES, and
a00c95d9 2587 generate the latter from the concrete listing of the former. Then
3820581c
GB
2588 make guile-procedures.txt depend on DOT_DOC_FILES instead of
2589 *.doc, so that rebuilding it works.
2590
dd6390bf
GB
2591Wed Mar 15 08:12:14 2000 Greg J. Badros <gjb@cs.washington.edu>
2592
2593 * libguile.h: Include libguile/validate.h. Thanks Keisuke Nishida!
2594
2595 * guile-snarf.awk.in: Replace docstring line-ending \n" and \n\n"
2596 with nothing and \n, respectively. Thanks Keisuke Nishida for
2597 noticing this problem.
2598
4fdb0ae2
MD
25992000-03-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2600
2601 * __scm.h (GUILE_NEW_GC_SCHEME): Define this if you want to test a
2602 new way of allocating heap. It makes Guile fast, but still
2603 contains bugs.
2604
2605 * gc.c, gc.h, pairs.h, init.c: Implementation of a new way of
2606 allocating heap. The basic idea is to trigger GC every Nth
2607 allocated cell and grow heap when free list runs out. The scheme
2608 has been extended so that GC isn't triggered until all remaining
2609 cells are used. The implementation is also prepared for
2610 development in the direction of POSIX threads.
2611
2612 * gc.c (SCM_EXPHEAP): In order to grow by a factor of 1.5,
2613 SCM_EXPHEAP should return half of the heap size.
2614
3d8d1283
MD
26152000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2616
5f4edb86
MD
2617 The following change to init.c is only enabled if Guile was
2618 configured with --enable-guile-debug.
a00c95d9 2619
5f4edb86
MD
2620 * init.c (scm_i_getenv_int): New function.
2621 (scm_boot_guile_1): Use the environment variables
2622 GUILE_INIT_HEAP_SIZE, GUILE_INIT_HEAP_SIZE2 to select heap size if
2623 they exist. (This may be replaced by a Scheme level mechanism in
2624 the future.)
2625
3d8d1283 2626 * objprop.c (s_scm_set_object_property_x): Use scm_assq instead of
90e77861 2627 scm_assoc. (Thanks to Keisuke Nishida.)
3d8d1283 2628
b0e37c83
MD
26292000-03-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2630
2631 * eval.c, lang.c, lang.h (scm_lisp_nil, scm_lisp_t): Renamed from
2b260c0f 2632 scm_nil, scm_t. (Thanks to Keisuke Nishida.)
b0e37c83 2633
16d35552
MD
26342000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2635
5ebf0091
MD
2636 * init.c (scm_boot_guile_1): Use same initial segment size for
2637 1-word and 2-word segments. Having the smaller size causes Guile
2638 to GC too often. Obviously something needs to be done to allow
2639 for a smaller 2-word segment without this to happen. (The amount
2640 of heap for each type should be automatically adapted to the
2641 application somehow.)
2642
31ed4cff
MD
2643 [Almost all of these changes should be documented in the NEWS
2644 file.]
2645
cf2c7413
MD
2646 * gc.h (scm_freelist_t): New type.
2647
2648 * pairs.h (SCM_NEWCELL, SCM_NEWCELL2): Use new style freelists.
2649
2650 * gc.c (SCM_INIT_HEAP_SIZE): Changed from 32768 --> 40000 so that
2651 all of Guile basics fits into one segment and there suitable room
2652 for work.
2653 (SCM_EXPHEAP): Now takes an argument. Grow by a factor of 1.5
2654 instead of 2.
2655 (scm_freelist, scm_freelist2): Now of type scm_freelist_t.
2656 Freelists now contains information about object span, cells
2657 collected and amount of cells in heap segments belonging to the
2658 list.
2659 (scm_heap_size, scm_gc_cells_collected): Removed.
2660
2661 * init.c (scm_boot_guile_1): Make 2-word segment 8K (512 cells).
2662
16d35552
MD
2663 * Makefile.am (libguile_la_LDFLAGS): Bumped library version
2664 number.
2665
cf2c7413 2666 * __scm.h eq.c, eval.c, gc.c, gc.h, gh_data, hash.c, numbers.c,
16d35552
MD
2667 numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
2668 rewrite of handling of real and complex numbers.
2669 (SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
2670 removed along with the support for floats. (Float vectors are
2671 still supported.)
2672
2673 * tags.h (scm_tcs_bignums): Removed.
2674 (scm_tc16_bigpos, scm_tc16_bigneg): Replaced by scm_tc16_big.
2675 Use SCM_BIGSIGN(x) to test for sign!
2676 (scm_tc16_big): The new bignum type.
2677 (SCM_REAL_PART, SCM_IMAG_PART): Removed.
2678
2679 * numbers.h (SCM_BIGSIGN): Sign moved to bit 16.
2680 (scm_makdbl): Deprecated.
2681 (SCM_NEWREAL, SCM_NEWCOMPLEX): New macros.
2682 (SCM_SINGP): Deprecated.
2683 (SCM_FLO): Removed.
2684 (SCM_INEXP, SCM_CPLXP): Deprecated.
2685 (SCM_INEXACTP, SCM_COMPLEXP): New macros.
2686 (SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Renamed from
2687 SCM_REAL, SCM_IMAG (and now only valid for complex numbers).
2688 (SCM_REAL, SCM_IMAG): New, *deprecated*, selectors which work both
2689 for doubles and complex numbers.
2690 (SCM_REAL_VALUE): New selector for doubles.
2691 (scm_double_t, scm_complex_t): New types.
2692 (scm_dbl): Removed.
2693
2694 * numbers.c (scm_floprint, scm_floequal): Removed.
2695 (scm_print_real, scm_print_complex, scm_real_equalp,
2696 scm_complex_equalp): New functions.
2697
2698 * unif.c (scm_makflo): Removed.
2699
2700 * smob.h (SCM_SMOB_PREDICATE): New macro.
2701 (SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2, SCM_NEWSMOB3,
2702 SCM_RETURN_NEWSMOB3): New macros.
2703
27041999-11-21 Michael Livshin <mlivshin@bigfoot.com>
2705
2706 The following changes implement primitive support for double cells
2707 (i.e. four-word cells) and change the representation of some
2708 things to multi-cells instead of cons+malloc. (Applied and
2709 modified by mdj.)
2710
2711 * pairs.h (SCM_NEWCELL2): double-cell variants of SCM_NEWCELL.
2712 (SCM_CELL_WORD, SCM_CELL_WORDLOC, SCM_SET_CELL_WORD): primitive
2713 multi-cell access macros (used by the ones below).
2714 (SCM_CELL_WORD[0-3], SCM_SET_CELL_WORD[0-3]): multi-cell access
2715 macros.
2716
2717 * gc.c (scm_freelist2): multi-cell freelists.
2718 (inner_map_free_list): map_free_list, parameterized on ncells.
2719 "nn cells in segment mm" was misleading for ncells > 1; changed to
2720 "objects". still print cells too, though.
2721 (scm_map_free_list): rewritten using inner_map_free_list.
2722 (scm_check_freelist): get freelist as parameter, since now we have
2723 more than one.
2724 (scm_debug_newcell2): multi-cell variants of
2725 scm_debug_newcell.
2726 (scm_gc_for_newcell): take ncells and freelist pointer as
2727 parameters.
2728 (scm_gc_mark): add case for tc7_pws (procedures with setters are
2729 now double cells).
2730 (scm_gc_sweep): don't free the float data, since it's not malloced
2731 anymore.
2732 (init_heap_seg): didn't understand what n_new_objects stood for,
2733 so changed to n_new_cells.
2734 (make_initial_segment): new function, makes an initial segment
2735 according to given ncells.
2736 (scm_init_storage): call make_initial_segment, for ncells={1,2,3}.
2737
2738 * numbers.c (scm_makdbl): no malloc'ing needed, so the
2739 {DEFER,ALLOW}_INTS thing removed.
2740
2741 * numbers.h (struct scm_dbl): changed to represent a double cell,
2742 with the number in the second half.
16d35552
MD
2743
2744 * dynwind.c: changed the wind-guards representation to double
2745 cell.
2746
2747 * procs.c, procs.h: changed the procedure-with-setter representation
2748 to double cell.
2749
2750 * async.c, async.h: made async representation a double cell.
2751
16d35552 2752 * dynl.c: made dynamic_obj representation a double cell.
a00c95d9 2753
b70ecbd0
GH
27542000-03-13 Gary Houston <ghouston@arglist.com>
2755
2756 * ports.c (flush_void_port): renamed to flush_port_default.
2757 (end_input_void_port): renamed to end_input_default.
2758
2759 * init.c (scm_standard_stream_to_port): create a void port instead
2760 of opening /dev/null if the standard file descriptors are bad.
2761 advantages: no portability problems, doesn't waste a file descriptor,
2762 simplifies the code (thanks to Marius for the idea).
2763
2764 * vports.c (s_scm_make_soft_port): call scm_port_non_buffer.
2765
2766 * void ports: make reading from a void port give EOF instead of
2767 segv:
2768 * ports.c (s_scm_sys_make_void_port): modified docstring.
2769 (fill_input_void_port): new proc.
2770 (scm_init_ports): set up fill_input_void_port.
2771 * ports.c (scm_port_non_buffer): new proc.
2772 (scm_void_port): call scm_port_non_buffer.
2773
2774 * fports.c (scm_setvbuf): docstring: remove the fcntl documentation
2775 which was incorrectly appended.
2776
fdc7ea2d
MD
27772000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2778
2779 * guile-doc-snarf.in: Don't use absolute path for `sed'. (Note
2780 that we can't use autoconf for this. Autoconf itself relies on
26fba922 2781 the existence of `sed' somewhere on your path.) (Thanks to Dirk
fdc7ea2d 2782 Herrman.)
a00c95d9 2783
68933ba3
MD
27842000-03-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2785
b44a555a
MD
2786 * Makefile.am (libguile_la_SOURCES): Moved iselect.c here from
2787 EXTRA_libguile_la_SOURCES.
2788
2789 * iselect.h: Always declare scm_internal_select.
2790
2791 * iselect.c (scm_internal_select): Added SCM_ASYNC_TICK at the
2792 end. Also let scm_internal_select be a real function also when
2793 not using threads.
2794
68933ba3
MD
2795 * __scm.h (SCM_TICK): Oops! Forgot to put SCM_ASYNC_TICK here...
2796
c7f6ea11
MD
27972000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2798
2799 * __scm.h (SCM_ALLOW_INTS, SCM_REALLOW_INTS): Removed call to
2800 SCM_ASYNC_TICK. (This is a preparation for POSIX threads support,
2801 and kind of an experiment: Will this cause problems?)
2802
62dbc244
GB
2803Sun Mar 12 13:26:30 2000 Greg J. Badros <gjb@cs.washington.edu>
2804
2805 * Makefile.am: Added *.doc to DISTCLEANFILES.
2806
4f2f645d
GH
28072000-03-12 Gary Houston <ghouston@arglist.com>
2808
2809 * fports.c (scm_fdes_to_port): call fcntl F_GETFL to test that
2810 the fdes is valid before doing anything else. check that
2811 the file descriptor supports the modes required.
2812 (scm_fport_buffer_add): don't throw an error if fstat doesn't
2813 work: just use the default buffer size.
2814
2815 * throw.c: change an outdated comment about scm_internal_catch
2816 BODY: it doesn't take a jumpbuf arg.
2817
2818 * init.c (scm_standard_stream_to_port): install a handler in case
2819 scm_fdes_to_port throws an error. don't check here whether the
2820 file descriptor is valid, since scm_fdes_to_port will do that.
2821 set the revealed count depending on whether the port got the
2822 standard file descriptor.
2823 (stream_body_data): new type.
2824 (stream_body, stream_handler): new procs.
2825
7f782a0a
MD
28262000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2827
67673f75
MD
2828 * stacks.c, stacks.h, struct.c, tags.h, unif.c (scm_bits_t):
2829 Renamed from SCMWORD.
2830
2831 * tags.h (SCM_NCELLP): Removed (SCMWORD).
2832
f1267706 2833 * arbiters.c (SCM_ARB_LOCKED): Use SCM_UNPACK_CAR.
67673f75 2834
74a426ae
MD
2835 * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,
2836 feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
2837 hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
2838 objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
2839 procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
2840 stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
2841 throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
f1267706 2842 weaks.h (SCM_PACK, SCM_UNPACK, SCM_UNPACK_CAR): Renamed from
74a426ae
MD
2843 SCM_ASSCM, SCM_ASWORD, SCM_CARW).
2844
7f782a0a
MD
2845 * numbers.h (SCM_SRS, SCM_INUM): Corrected SCM_ASSCM/ASWORD fixes.
2846
2847 * alist.c, eval.c, net_db.c, posix.c, print.c, snarf.h, struct.c,
2848 tags.h: Fixed copyright notices.
2849
2850 * struct.c, coop-threads.c: SCM_ASSCM/ASWORD fixes.
0cd87628 2851
7f782a0a 28522000-03-12 Marius Vollmer <mvo@zagadka.ping.de>
a00c95d9 2853
0cd87628
MV
2854 * init.c (scm_standard_stream_to_port): Check whether the file
2855 descriptor is valid and substitute "/dev/null" when not.
a00c95d9 2856
f3b5e185
MD
28572000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2858
2859 * coop-defs.h (struct timespec): Conditionally defined.
2860
2861 * coop.c (coop_condition_variable_timed_wait_mutex): Use ETIMEDOUT
2862 instead of ETIME.
38eca29b
MD
2863
2864 * readline.c (match_paren): Bugfix: First arg to select is not
2865 number of descriptors but the number of the highest descriptor +
2866 1.
2867
2868 This is a preliminary attempt at a cleanup of the threads support
2869 code. It moves things to better places, makes arguments more
2870 consistent with the POSIX API (which is used in GNOME's glib), and
2871 adds new functionality.
a00c95d9 2872
38eca29b
MD
2873 * readline.c (scm_init_readline): Added new arg to scm_init_mutex.
2874
2875 * coop-defs.h (scm_mutex_trylock): New macro: alias for
2876 coop_mutex_trylock.
2877 (scm_cond_init): Changed definition to
2878 coop_new_condition_variable_init.
a00c95d9 2879
38eca29b
MD
2880 * coop.c: #include <errno.h>
2881 (coop_timeout_qinsert): Moved here from iselect.c
2882 (coop_new_mutex_init, coop_new_condition_variable_init): New
2883 functions. The strange names are temporary. Use scm_mutex_init
2884 and scm_cond_init instead.
2885 (coop_mutex_trylock): New function. Uses errno.h:EBUSY. errno.h
2886 is ANSI C, but should we check for individual error codes in
2887 configure.in?
2888 (coop_condition_variable_timed_wait_mutex): New function.
2889 (coop_key_create, coop_setspecific, coop_getspecific,
7f782a0a 2890 coop_key_delete): New functions.
38eca29b
MD
2891
2892 * iselect.c (coop_timout_qinsert): Moved to coop.c
2893
32e1616c
MD
28942000-03-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2895
2896 * pairs.h (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR,
2897 SCM_SETOR_CDR): Corrected SCM_ASSCM/WORD fixes.
2898
2899 * tags.h (SCM_VOIDP_TEST): Renamed from VOIDP_TEST.
2900 Layout cleanups.
2901
2902 * objects.h (SCM_CLASS_FLAGS, SCM_OBJ_CLASS_FLAGS,
2903 SCM_SET_CLASS_INSTANCE_SIZE), struct.h (SCM_STRUCT_VTABLE_DATA),
2904 proc.h (SCM_CLOSCAR): SCM_ASSCM/WORD fixes.
2905
2906 * eval.c (scm_lookupcar1): Inserted SCM_ASWORD in expressions
2907 dealing with ilocs.
2908
d5c39069
GB
29092000-03-11 Dale P. Smith <dpsm@en.com>, applied by Greg J. Badros, <gjb@cs.washington.edu>
2910
2911 * numbers.c (scm_copy_big_dec, scm_copy_smaller, scm_big_ior,
2912 scm_big_xor, scm_big_and, scm_big_test): Added new lowlevel bignum
2913 logical functions from SCM.
2914
2915 (logand, logior, logxor, logtest, logbit?): Extended scheme
2916 logical functions to use bignums from SCM.
2917
2918 (lognot): Removed call to `SCM_VALIDATE_INUM' that prevented
2919 lognot from using bignums.
2920
3e892913
GB
2921Thu Mar 9 11:33:25 2000 Greg J. Badros <gjb@cs.washington.edu>
2922
a00c95d9 2923 * vectors.h (SCM_VELTS_AS_STACKITEMS): Added this macro to help in
3e892913
GB
2924 eliminating some warnings.
2925
2926 * unif.c, strports.c, print.c, options.c: Fix some warnings on
2927 mis-use of SCM/long
2928
2929 * gc.c, gc.h: Added scm_return_first_int(), and added comment re:
2930 what the scm_return_first* functions do.
2931
7ac030d6
GB
29322000-03-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>, applied by Greg J. Badros, <gjb@cs.washington.edu>
2933
2934 * libguile/*.[ch]: make a distinction between SCM as a generic
2935 name for a Scheme object (now a void*), and SCM as 32 bit word for
2936 storing tags and immediates (now a long int). Introduced
2937 SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
2938 code in the process: arbiter.c (use macros), unif.c (scm_array_p),
a00c95d9 2939
f635d2d4
GB
2940Wed Mar 8 10:15:59 2000 Greg J. Badros <gjb@cs.washington.edu>
2941
2942 * numbers.c: Use SCM_VALIDATE_LONG_COPY, and longs, not ints, in
2943 various logXXX primitives. Thanks Eric Moore!
2944
9eaa7fb6
GB
2945Tue Mar 7 08:05:22 2000 Greg J. Badros <gjb@cs.washington.edu>
2946
2947 * run-test, remaining-docs-needed: Added these scripts. The
2948 second one is only temporary until the docstring additions are
2949 complete. run-test may best live on, but is here mostly for
2950 convenience and awareness for now.
2951
2952 * hash.c: Docs, minor cleanup patch from Dirk Herrman.
2953
49673698
GB
2954Thu Mar 2 16:06:58 2000 Greg J. Badros <gjb@cs.washington.edu>
2955
2956 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
2957 displaying the expected type. Use SCM_LISTn in a couple places
2958 instead of scm_cons-ing by hand.
2959
2960 * __scm.h: Added SCM_ASSERT_TYPE macro.
2961
2962 * validate.h, scm_validate.h: Added the former, as a renamed
2963 version of the latter with SCM_ASSERT_TYPE used in
2964 SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)
2965
2966 * Makefile.am: Rename scm_validate.h to validate.h.
2967
2968 * *.c, *.h: Include validate.h, not scm_validate.h (old name's
2969 prefix was superfluous).
2970
417bdef8
GB
2971Thu Mar 2 15:33:12 2000 Greg J. Badros <gjb@cs.washington.edu>
2972
2973 * hashtab.c: Improved documentation for lots of functions. Added
2974 handwritten docs for `hash-fold'.
2975
2976Thu Mar 2 15:13:25 2000 Greg J. Badros <gjb@cs.washington.edu>
2977
2978 * list.c: Added hand-written docs for `del{q,v,ete}1!'.
2979
26a760c6
GB
2980Thu Mar 2 12:38:30 2000 Greg J. Badros <gjb@cs.washington.edu>
2981
a00c95d9 2982 * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
26a760c6
GB
2983 added append docs from R4RS.
2984
2985 * strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
2986 Thanks Dirk Hermann!
2987
2988 * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
2989 deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann!
a00c95d9 2990
26a760c6
GB
2991 * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
2992 Drop use of SCM_P for function prototypes... assume an ANSI C
2993 compiler. Thanks Dirk Hermann!
2994
898942f8
GB
2995Sat Feb 19 12:20:12 2000 Greg J. Badros <gjb@cs.washington.edu>
2996
2997 * ports.c: Made `set-port-column!' and `set-port-line!' each
2998 return SCM_UNSPECIFIED instead of a (not-scheme-object) integer
2999 that caused a seg fault. Also fixed `set-port-column!'s
3000 docstring. Thanks Han-Wen Nienhuys for finding the bug!
3001
84a3df2c
GB
3002Sun Feb 13 19:11:42 2000 Greg J. Badros <gjb@cs.washington.edu>
3003
3004 * arbiters.c, eq.c, gc.c, guardians.c, list.c, ports.c, print.c,
a00c95d9 3005 regex-posix.c, scmsigs.c, stime.c, strings.c, variable.c, stime.c,
84a3df2c
GB
3006 strings.c, variable.c: Added lots of documentation, cleaned up
3007 some existing documentation. Occasionally changed formal params
3008 to match docs. Also folded an #ifdef into the inners of a
3009 primitive instead of having two copies of the primitive
3010 (`get-internal-real-time', from stime.c)
3011
3012Sun Feb 13 18:12:19 2000 Greg J. Badros <gjb@cs.washington.edu>
3013
3014 * ports.c: Added docs for primitives missing them. Written by
3015 hand.
3016
3f557de6
GB
3017Sun Feb 13 09:40:36 2000 Greg J. Badros <gjb@cs.washington.edu>
3018
3019 * guile-doc-snarf.in: Use ${AWK} -f guile-func-name-check, not
3020 just execing guile-func-name-check. Thanks Michael Livshin!
3021
ddcccdb3
GB
3022Thu Feb 10 11:43:23 2000 Greg J. Badros <gjb@cs.washington.edu>
3023
3024 * guile-snarf.awk.in: Tweak to work with Sun/HP awk, removed some
3025 dead code. Patch from Michael Livshin.
3026
3027 * guile-doc-snarf.in: Tweak to work with Sun/HP sh. Patch from
3028 Michael Livshin.
3029
720e8692
GH
30302000-02-09 Gary Houston <ghouston@arglist.com>
3031
3032 * init.c (scm_init_standard_ports): when stdout is a tty, make the
3033 current-output-port unbuffered by default. this is less confusing
3034 for interactive use. it was line-buffered because of a
3035 performance problem with unbuffered ports, but I think it will be
3036 OK now.
3037
43ff3170
GH
30382000-02-08 Gary Houston <ghouston@arglist.com>
3039
3040 * __scm.h: don't define long_long or ulong_long if HAVE_LONG_LONGS
3041 is not defined.
3042
3043 * stime.c (scm_localtime, scm_mktime): if neither HAVE_TM_ZONE nor
3044 HAVE_TZNAME are defined, use an empty string instead of giving two
3045 spurious compile-time errors.
3046
4ba47302
GB
3047Tue Feb 8 13:57:46 2000 Greg J. Badros <gjb@cs.washington.edu>
3048
3049 * ports.c: Doc patches from Richard Kim. Pasted from MIT Scheme.
3050 Thanks Richard!
3051
09a617f7
GB
3052Mon Feb 7 09:07:31 2000 Greg J. Badros <gjb@cs.washington.edu>
3053
3054 * macros.c: Doc patches from Richard Kim. Pasted from scm.texi.
3055
9dbcf010
GB
3056Sun Feb 6 20:26:21 2000 Greg J. Badros <gjb@cs.washington.edu>
3057
3058 * pairs.c: Doc patches from Richard Kim. Pasted from MIT Scheme
3059 (which is GNU GPL'd).
3060
bd9e24b3
GH
30612000-01-31 Gary Houston <ghouston@arglist.com>
3062
3063 * strings.h: don't use SCM_P. don't include <string.h>.
3064 * error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.
a00c95d9 3065
bd9e24b3
GH
3066 * strings.c (scm_string_ref): make the 2nd argument compulsory.
3067 previously it defaulted to zero for no good reason that I can see.
3068 use a local variable for SCM_INUM (k). replace
3069 SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.
3070
3071 (scm_makfromstr): cosmetic changes.
3072
3073 (scm_string): Accept only chars in the list, not strings, for
3074 conformance to R5RS (particularly for list->string, which is
3075 supposed to be the inverse of string->list.) remove
3076 SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
3077 scm_makstr handles the cell allocation. when reporting wrong-type
3078 arg, don't report the position as 1.
3079
3080 * posix.c (scm_init_posix): intern PIPE_BUF if it's defined.
3081
28d77376
GH
30822000-01-29 Gary Houston <ghouston@arglist.com>
3083
ae1b098b
GH
3084 * posix.c (scm_pipe): rewrote the docstring.
3085
28d77376
GH
3086 * filesys.c (scm_select, retrieve_select_type, get_element,
3087 fill_select_type, set_element): modified so that Scheme
3088 "select" tests port buffers for the ability to provide input
3089 or accept output. Previously only the underlying file descriptors
3090 were checked. Rewrote the docstring.
a00c95d9 3091
7f1497ce
GB
3092Thu Jan 27 10:14:25 2000 Greg J. Badros <gjb@cs.washington.edu>
3093
3094 * vectors.c, symbols.c, strorder.c: Documentation cut and pasted
3095 from Gregg Reynolds. Thanks Gregg!
3096
2288ff9b
GB
3097Thu Jan 27 09:59:38 2000 Greg J. Badros <gjb@cs.washington.edu>
3098
3099 * strop.c (scm_i_index): Obfuscated commented-out SCM_DEFINE by
3100 adding "x" prefix to the line so that guile-func-name-check
3101 doesn't complain unnecessarily.
3102
349af6dd
GB
3103Wed Jan 26 17:33:52 2000 Greg J. Badros <gjb@cs.washington.edu>
3104
3105 * throw.c: Factor out an #ifdef/#else/#endif choice more finely
3106 for maintainability.
3107
3108 * strop.c: Documentation added by Gregg A. Reynolds. Pasted in
3109 from qdocs, RnRs.
3110
a28eb127
GB
3111Wed Jan 26 10:02:11 2000 Greg J. Badros <gjb@cs.washington.edu>
3112
a00c95d9 3113 * tag.c: Added doc for `tag', but mark as deprecated since Mikael
a28eb127
GB
3114 suggests removing tag.c altogether (and using a new `class-of'
3115 instead).
3116
3117 * strings.c: Added documentation from Gregg A. Reynolds. Edited
3118 a bit by me to use FOO instead of @var{foo} and to have the
a00c95d9 3119 summary come before preconditions on input. Also dropped trailing
a28eb127
GB
3120 (rnrs) note.
3121
3122 * gsubr.c: Do not use SCM_DEFINE for `gsubr-apply'. Register the
3123 function with scm_make_subr_opt w/ last arg of 0 so it is not
3124 visible at the Scheme level. Mikael says that this is the right
3125 thing because the first arg to the proc is the guts of a compiled
3126 closure and shouldn't be exposed to the Scheme level.
3127
ac2259fc
GB
3128Tue Jan 25 17:15:47 2000 Greg J. Badros <gjb@cs.washington.edu>
3129
3130 * sort.c: typo in comment fixed.
3131
3132 * keywords.c: Added documentation.
3133
3134 * guardians.c: Added documentation (could be better).
3135
3136 * gc.c: Added docs for gc-set-debug-check-freelist.
3137
3138 * eq.c: Added docs for eq?, eqv? equal? abridged from R4RS.
3139
3140 * boolean.c: Added docs for `not', `boolean?' (by hand).
a00c95d9 3141
d928e0b4
GB
3142Tue Jan 25 13:28:56 2000 Greg J. Badros <gjb@cs.washington.edu>
3143
3144 * random.c: Added documentation, from SLIB page:
3145 http://angela.ctrl-c.liu.se/~calle/scheme/slib_toc.html
3146
3147Mon Jan 24 17:50:20 2000 Greg J. Badros <gjb@cs.washington.edu>
3148
3149 * variable.c, version.c: Added documentation, written by hand
3150 since I could not find anything already written that was
3151 relevant.
3152
d831b039
GH
31532000-01-23 Gary Houston <ghouston@arglist.com>
3154
a00c95d9 3155 * filesys.c (scm_chown): omit port/fdes support if HAVE_FCHOWN is
d831b039
GH
3156 not defined (thanks to Richard Y. Kim).
3157
88ec97ad
GB
3158Thu Jan 20 13:00:38 2000 Greg J. Badros <gjb@cs.washington.edu>
3159
3160 * Makefile.in: Removed, this is auto-generated.
3161
078e9092
GB
3162Thu Jan 20 11:33:47 2000 Dirk Hermann <dirk@ida.ing.tu-bs.de> --applied 01/20/00 gjb
3163
3164 * list.c: Put some variable initialization code at the point of
3165 declaration; Added a comment for list*; Formatting changes.
3166
3167 * load.c: use SCM_NNULLP to make sure the end of a list is not
3168 reached yet.
3169
e7a96050
MD
31702000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3171
a177af34
MD
3172 * backtrace.c (scm_display_error_message): Bugfix: Don't use
3173 result of scm_list_p as C boolean.
3174 (scm_display_error_message, scm_set_print_params_x): Use new
3175 validation macros. (Thanks to Dirk Herrmann.)
3176
d06bcb02
MD
3177 * net_db.c (scm_resolv_error): Cast result from hstrerror.
3178
3179 * strports.c (st_end_input): Inserted parenthesis to get operator
3180 grouping correct.
3181
3182 * list.h (scm_init_list): Removed SCM_P around prototypes.
3183
3184 * fports.c, list.c, numbers.c, ports.c, stime.c, symbols.c,
3185 filesys.c, posix.c: Converted docstrings to ANSI C format and
e7a96050
MD
3186 escaped " occurring inside string literals.
3187
682eefe9
MD
3188Tue Jan 18 13:21:08 2000 Mikael Djurfeldt <mdj@r11n07-s.pdc.kth.se>
3189
3190 * posix.c (scm_mknod): Escape " occuring inside docstring.
3191
56cfe22b
MD
31922000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3193
3194 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
3195 evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
3196 keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
3197 objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
3198 ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
3199 stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
3200 symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
3201 weaks.c: Converted docstrings to ANSI C format.
a00c95d9 3202
56cfe22b
MD
3203 * filesys.c (scm_chmod), simpos.c (scm_system), version
3204 (scm_version), vports (scm_make_soft_port): Escape " occuring
3205 inside docstring.
3206
fcb1720f
GB
3207Mon Jan 17 11:41:22 2000 Greg J. Badros <gjb@cs.washington.edu>
3208
3209 * scm_validate.h: Added SCM_VALIDATE_ULONG_COPY,
3210 SCM_VALIDATE_LONG_COPY
3211
3212 * numbers.c: Use SCM_VALIDATE_ULONG_COPY, instead of
3213 SCM_VALIDATE_INUM_COPY to let bigger numbers be used. Rename a
3214 couple of formal arguments (and fix their uses) to make arguments
3215 match the documentation.
3216
b9af3d0e
MS
32172000-01-14 <mstachow@alum.mit.edu>
3218
3219 * Makefile.am: Augment path when running guile-doc-snarf so
3220 guile-func-name-check is found.
3221
153511a7
GB
3222Fri Jan 14 09:34:55 2000 Greg J. Badros <gjb@cs.washington.edu>
3223
3224 * scm_validate.h (SCM_NUM2LONG_DEF): Fix this macro to just use
3225 def, not SCM_MAKINUM(def); thanks Janis Bzerins!
3226
59d5245f
GB
3227Wed Jan 12 00:06:53 2000 Greg J. Badros <gjb@cs.washington.edu>
3228
3229 * net_db.c (s_scm_inet_makeaddr): Use SCM_NUM2ULONG since that's
3230 the way guile-1.3.4 worked, but #if 0 out the version using
3231 SCM_VALIDATE_INUM_COPY for stricter testing.
3232
95aec69f
GB
3233Tue Jan 11 18:24:18 2000 Greg J. Badros <gjb@cs.washington.edu>
3234
3235 * guile-doc-snarf.in: Use new $fullfilename for running
3236 guile-func-name-check, and put "$fullfilename" and "$filename" in
3237 quotes at uses to make sure re-splitting on whitespace does not
a00c95d9 3238 occur (so filenames w/ embedded whitespace would work okay, though
95aec69f
GB
3239 I sure hope we never have to deal with that! :-) ). Thanks to
3240 Mikael for pointing out the source_dir != build_dir was broken.
3241
b7ac2837
GB
3242Tue Jan 11 17:42:40 2000 Greg J. Badros <gjb@cs.washington.edu>
3243
3244 * scm_validate.h: Added SCM_NUM2LONG_DEF macro. Make
3245 SCM_OUT_OF_RANGE use SCM_MAKINUM, not scm_long2num. Added
3246 SCM_COERCE_ROSTRING macro. Added SCM_VALIDATE_NONEMPTYLIST
3247 macro. Fix SCM_VALIDATE_STRINGORSUBSTR macro to not use SLOPPY
3248 variants.
3249
3250 * ports.c (scm_port_closed_p): Validate that the arg is a PORT,
3251 then return whether it's an open port (was validating that it was
3252 an open port -- this was a bug I introduced back in December, but
3253 my careful reading of diffs caught it).
3254
3255 * numbers.c: Recombine the two conditional-compilation paths for
3256 all the log* primitives -- they were split based on #ifndef
3257 scm_long2num; factored out a SCM_LOGOP_RETURN macro, and fixed
3258 some bugs and inconsistencies in the two sets of implementations.
3259 (scm_lognot) Fixed *atrocious* re-use of a SCM as an integer!
3260
3261 * ioext.c: Use SCM_ASSERT_RANGE in a couple places, and
3262 SCM_VALIDATE_INUM_COPY once where it should've been used.
3263
3264 * fluids.c (scm_internal_with_fluids): Use
3265 SCM_VALIDATE_LIST_COPYLEN.
3266
3267 * filesys.c: Use SCM_NUM2LONG instead of SCM_VALIDATE_INUM_COPY;
3268 this is questionable as it relaxes type safety, but other changes
3269 were useful and all SCM_NUM2LONG's should probably be
3270 revisited. Use SCM_OUT_OF_RANGE, SCM_WRONG_TYPE_ARG.
3271
3272 * evalext.c: line-break change on 1 line.
3273
3274 * eval.c (nconc2last): Takes a non-empty list as its first
3275 argument, not just a list.
3276
3277 * dynl.c: Use new SCM_COERCE_ROSTRING macro.
3278
3279Tue Jan 11 15:44:23 2000 Greg J. Badros <gjb@cs.washington.edu>
3280
3281 * dynl.c, feature.c, filesys.c, fports.c, list.c, load.c,
3282 net_db.c, sort.c, stacks.c, unif.c: Use SCM_WTA, SCM_MISC_ERROR
3283 where possible.
3284
3285 * symbols.c (scm_sysintern0): Fixed the function name in a
3286 scm_misc_error invocation.
3287
3288 * print.c (scm_simple_format): Do not need SCM_COERCE_SUBSTR, and
3289 use scm_return_first to ward off latent GC bug that Mikael caught.
3290
3291 * async.c: Use SCM_VALIDATE_ASYNC_COPY one place where it wasn't
3292 used before but should've been.
3293
d61f6b02
MD
32942000-01-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3295
3296 * snarf.h (SCM_PROC1): Replaced SCM (*) (...) with
3297 SCM_FUNC_CAST_ARBITRARY_ARGS.
3298
88423ab1
GB
3299Tue Jan 11 13:44:07 2000 Greg J. Badros <gjb@cs.washington.edu>
3300
3301 * guile-func-name-check.in: Added this script to statically check
3302 #define FUNC_NAME, #undef FUNC_NAME in the source.
3303
3304 * sort.c, posix.c: Fix #undef FUNC_NAME lines to not have trailing
3305 redundant comment, semicolon; caught by new guile-func-name-check
3306 script.
3307
3308 * debug.c: Fix mistaken #define FUNC_NAME for scm_make_iloc.
3309 Caught by new guile-func-name-check-script.
3310
3311 * Makefile.am: Added guile-func-name-check to bin_SCRIPTS
3312
3313 * ramap.c: Fix #if 0'd out code to be syntactically acceptable to
3314 guile-func-name-check.
3315
a00c95d9 3316 * guile-doc-snarf.in: Run guile-func-name-check on the file before
88423ab1
GB
3317 doing the snarf.
3318
7f15e635
GB
3319Tue Jan 11 11:31:10 2000 Greg J. Badros <gjb@cs.washington.edu>
3320
3321 * fports.c, ports.c, ports.h, strports.c, vports.c: Make write
3322 port function take const void*, not void*.
3323
bf121b59
GB
3324Tue Jan 11 11:18:07 2000 Greg J. Badros <gjb@cs.washington.edu>
3325
3326 * scm_validate.h, chars.c, ports.c, print.c, read.c, strings.c,
3327 strop.c: Use SCM_VALIDATE_ICHR, SCM_VALIDATE_ICHR_COPY instead of
3328 SCM_VALIDATE_CHAR, SCM_VALIDATE_CHAR_COPY. Change made for
3329 consistency with the other macros dealing with immediate
3330 characters. (Similar to INT -> INUM change a week or so ago).
3331
7965d98f
GB
3332Tue Jan 11 10:41:46 2000 Greg J. Badros <gjb@cs.washington.edu>
3333
3334 * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,
3335 net_db.c, read.c, socket.c: Update error messages to use ~A for
3336 %s, ~S for %S to work with new `simple-format' format and be
3337 standardized better.
3338
3339 * print.h, print.c (scm_simple_format): Added `simple-format'
3340 primitive. It's the old scm_display_error, with ARGS now a rest
a00c95d9 3341 parameter, and the destination first instead of last (and a couple
7965d98f
GB
3342 new capabilities inspired by `format' -- #t as destination means
3343 current-output-port, #f means return the formatted text as a
3344 string.
3345
3346 * gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.
3347
3348 * backtrace.c (scm_display_error_message): Rewrote to use
3349 scm_simple_format() procedure.
3350
3351 * __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
3352
f73d2411
MV
33532000-01-09 Marius Vollmer <mvo@zagadka.ping.de>
3354
3355 Finally applied the libltdl patch from Thomas Tanner, with slight
3356 modifications.
3357
3358 * DYNAMIC-LINKING: Removed because it is obsolete.
3359 * dynl.c: Use ANSI prototypes.
3360 (sysdep_dynl_link): Use lt_dlopenext instead of lt_dlopen.
3361 * scmconfig.h.in: Do not change, as it is automatically generated.
a00c95d9 3362
f73d2411
MV
3363 1999-07-25 Thomas Tanner <tanner@ffii.org>
3364
3365 * dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c: deleted
3366 (obsolete)
3367 * Makefile.am: likewise, add INCLTDL (libltdl headers) to
3368 INCLUDES, set dlpreopened files in LDFLAGS, link libguile
3369 against libltdl
3370 * dynl.c: use libltdl if DYNAMIC_LINKING is enabled,
3371 * guile.c: register preloaded modules
3372 * scmconfig.h.in: remove obsolete symbols
3373
38c1d3c4
GH
33742000-01-09 Gary Houston <ghouston@arglist.com>
3375
3376 * These changes should make it unnecessary to call tzset from
3377 Scheme after modifying the TZ environment variable, even if the
3378 system date facilities cache the value.
3379 * stime.c (setzone, scm_localtime): added comments.
3380 (tzset): don't define a noop tzset macro if HAVE_TZSET not defined.
3381 (setzone): don't call tzset.
3382 (restorezone): call tzset only if HAVE_TZSET is defined.
3383 (scm_tzset): don't define if HAVE_TZSET not defined. Change the
3384 doc string to indicate that this procedure isn't likely to do
3385 anything useful.
3386 (scm_localtime, scm_strftime, scm_mktime): call tzset if
3387 LOCALTIME_CACHE is defined.
3388
9359d657
MD
33892000-01-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3390
3391 * posix.c (scm_sync): Return SCM_UNSPECIFIED.
3392
f25f761d
GH
33932000-01-09 Gary Houston <ghouston@arglist.com>
3394
3395 * eval.c: define scm_unbound_variable_key ('unbound-variable).
3396 scm_lookupcar1: throw an error with key 'unbound-variable instead
3397 of 'misc-error when an unbound variable is encountered.
3398
a00c95d9 3399 * filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select,
f25f761d
GH
3400 scm_symlink, scm_readlink, scm_lstat),
3401 posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp,
3402 scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice,
3403 scm_sync),
a00c95d9 3404 simpos.c (scm_system),
f25f761d
GH
3405 stime.c (scm_times, scm_strptime):
3406 move the HAVE_XXX feature tests out of the procedure bodies.
3407 don't use SCM_SYSMISSING.
3408 scm_validate.h (SCM_SYSMISSING): removed.
3409 error.h, error.c (scm_sysmissing): comment that this is deprecated.
3410 see ChangeLog entry for 1999-12-28.
3411
a4dd2611
GB
3412Sat Jan 8 19:52:04 2000 Greg J. Badros <gjb@cs.washington.edu>
3413
3414 * scm_validate.h (SCM_VALIDATE_BOOL_COPY): Fix typo.
3415
3416Sat Jan 8 17:06:46 2000 Greg J. Badros <gjb@cs.washington.edu>
3417
3418 * backtrace.c: Fix spelling typo in a comment.
3419
3420 * snarf.h: Use new SCM_DOCS macro to encapsulate the non SCM_INIT
3421 text. Reformatted some of the expansions.
3422
5ac36451
GB
3423Fri Jan 7 15:50:46 2000 Greg J. Badros <gjb@cs.washington.edu>
3424
3425 * scm_validate.h (SCM_OUT_OF_RANGE): Use scm_out_of_range_pos to
3426 report the position of the argument.
3427
a00c95d9 3428 * error.h, error.c (scm_out_of_range_pos): Added this function to
5ac36451 3429 take extra "pos" argument, the position number of the errant
a00c95d9 3430 argument.
5ac36451
GB
3431
3432 * debug.c: Use SCM_OUT_OF_RANGE instead of scm_out_of_range.
3433
3434 * snarf.h: Use SCM_HERE and SCM_INIT as names, not SCM_NOTSNARF
3435 and SCM_SNARFING. Also put the %%% in the SCM_INIT since Mikael
3436 prefers that and I'm reasonably indifferent.
3437
3438Fri Jan 7 15:03:32 2000 Greg J. Badros <gjb@cs.washington.edu>
3439
3440 * snarf.h: Factor out differences between C++ and non-C++ into
3441 SCM_FUNC_CAST_ARBITRARY_ARGS macro. Modify all the snarf macro
3442 definitions to use SCM_NOTSNARF and SCM_SNARFING macros (like
3443 Mikael's macros, below, but changed names and SCM_SNARFING no
3444 longer expands to include %%% -- that must appear in the argument
3445 so that the token appears at the call-site as a reminder).
3446
088bb1d4
MD
34472000-01-07 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3448
3449 * snarf.h (SCM_INSITU, SCM_INIT): New snarf macros for use in user
3450 snarf macro definitions.
3451
636480e6
MD
34522000-01-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3453
3454 * chars.c (scm_integer_to_char): Use Greg's nice
3455 SCM_VALIDATE_INUM_RANGE macro for argument checking for closer
3456 adherence to R5RS.
3457
7c5628e2
GB
3458Thu Jan 6 11:48:49 2000 Greg J. Badros <gjb@cs.washington.edu>
3459
3460 * *.c, snarf.h: Replace GUILE_PROC1 with SCM_DEFINE1 throughout.
3461
2cc0f8cb
GB
3462Thu Jan 6 11:22:53 2000 Greg J. Badros <gjb@cs.washington.edu>
3463
3464 * Makefile.am (ETAGS_ARGS): Switch to SCM_DEFINE, SCM_DEFINE1
3465 instead of GUILE_PROC.
3466
3467Thu Jan 6 11:21:49 2000 Greg J. Badros <gjb@cs.washington.edu>
3468
a00c95d9 3469 * alist.c: Do not report mismatch errors on some uses of `tmp' (do
2cc0f8cb
GB
3470 this by using SCM_ARG2 instead of `2' in the SCM_VALIDATE_CONS
3471 macro call.
3472
9179dcdd
GB
3473Thu Jan 6 09:54:33 2000 Dirk Herrmann <dirk@ida.ing.tu-bs.de> --gjb applied
3474
3475 * scm_validate.h: Remove some redundant NIMP tests.
3476
3477 * alist.c: minimize scope of the tmp variables, and initialize
3478 them when declared. The strange SCM_NIMP tests are replaced by
3479 SCM_CONSP tests that more closely reflect the intended semantics.
3480 However, we don't get a performance penalty here, because the
3481 SCM_CONSP test was performed by the ALISTCELL test anyway. * The
3482 extremely ugly use of ASRTGO macros was removed: The calls to
3483 ASRTGO were not encapsulated by "#ifndef SCM_RECKLESS", but got a
3484 label parameter that only exists when SCM_RECKLESS is not defined.
3485 This works, because ASRTGO itself is defined in a way that it only
3486 makes use of the label parameter if SCM_RECKLESS is not defined
3487 (shudder!). Does guile make at all use of the possibility to
3488 define SCM_RECKLESS? * Codesize is likely to be reduced, since
3489 instead of two calls to SCM_ASSERT performed by the ALISTCELL test
3490 we now only get one test.
3491
3492 * list.c: Use SCM_NNULLP, not SCM_NIMP as appropriate. Also use
3493 SCM_NULLP instead of SCM_IMP. Drop use of "register" keyword on
3494 some variables in `list?'. Fix `reverse' and `reverse!'
3495 primitives to handle improper lists better.
3496
15b33280
GB
3497Wed Jan 5 11:24:53 2000 Greg J. Badros <gjb@cs.washington.edu>
3498
3499 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
3500 macros and SCM_DEFINE macros to match GNU coding standards.
3501
ca8cd130
GB
3502Wed Jan 5 11:04:24 2000 Greg J. Badros <gjb@cs.washington.edu>
3503
3504 * *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.
3505
fb764465
GB
3506Wed Jan 5 10:59:06 2000 Greg J. Badros <gjb@cs.washington.edu>
3507
3508 * *.[ch]: Replace SCM_VALIDATE_INT w/ SCM_VALIDATE_INUM for
3509 better consistency with the names of other SCM_VALIDATE_ macros
3510 and better conformance to guile naming policy.
3511
3512Wed Jan 5 10:50:39 2000 Greg J. Badros <gjb@cs.washington.edu>
3513
3514 * ports.c (s_scm_close_all_ports_except): Use SCM_ARG1 in a
3515 SCM_VALIDATE instead of 1 to avoid a check on the argument (since
3516 it's not the actual name of the formal).
1e484823
GB
3517
3518 * guile-snarf.awk.in: Do argument/number mismatch checking and
3519 print warnings in an Emacs compile-mode parseable format.
3520
3521 * struct.c: Use SCM_ASSERT_RANGE instead of SCM_ASSERT w/
3522 SCM_OUTOFRANGE as 3rd argument.
3523
3524 * random.c: Fix argument/number mismatch (that I introduced :-( ).
3525
3526 * __scm.h: Do not #define SCM_ARG* when snarfing;
3527 lets us distinguish between 1 and SCM_ARG1 when snarfing as only
3528 the former (using the number) requires the argument to match the
3529 formal in the current argument snarfing check.
3530
3531 * snarf.h: Give new definition of SCM_ASSERT when in
a00c95d9 3532 snarfing mode to output a lexically-identifiable sequence that the
1e484823
GB
3533 guile-snarf.awk script uses to verify argument/position matching.
3534
3535 * ramap.c: Remove extraneous #undef FUNC_NAME.
3536
53fc4636
GB
3537Wed Jan 5 08:36:38 2000 Greg J. Badros <gjb@cs.washington.edu>
3538
3539 * guile-doc-snarf.awk.in: Removed -- guile-snarf.awk.in is the
a00c95d9 3540 current version of the same functionality; it writes the .x output
53fc4636
GB
3541 to stdout instead of directly into the file.
3542
3543Wed Jan 5 08:15:04 2000 Greg J. Badros <gjb@cs.washington.edu>
3544
3545 * unif.c, symbols.c, strings.c, stacks.c, random.c, print.c,
3546 posix.c: Eliminated a bunch of SCM_NIMP(..)s that are now
3547 redundant with the safer macros. Patch from Dirk Hermann applied
3548 by hand. Thanks Dirk!
3549
3550 * scm_validate.h: Added SCM_VALIDATE_VECTOR_OR_DVECTOR for some
3551 uses in random.c.
3552
3553 * ramap.c: whitespace change.
3554
3b5345d9
GB
3555Tue Jan 4 14:21:35 2000 Greg J. Badros <gjb@cs.washington.edu>
3556
3557 * options.c, objects.c, keywords.c, gc.c: Some redundant SCM_NIMP
3558 removals from Dirk Hermann.
3559
3560 * alist.c: Rename formals to match the parameter names in the
3561 documentation, updates to documentation. Thanks Dirk Hermann!
3562
169aec65
MD
35632000-01-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3564
db62436e
MD
3565 * eval.c (SCM_CEVAL): Reverse order of
3566 scm_stack_checking_enabled_p and SCM_STACK_OVERFLOW_P
3567 (Thanks to Brad Knotwell.)
169aec65 3568
da43d822
GB
3569Mon Jan 3 08:30:02 2000 Greg Harvey <Greg.Harvey@thezone.net> (applied --01/03/00 gjb)
3570
3571 * gc.c (scm_debug_newcell): Added SCM_SETCAR of the newly
a00c95d9 3572 allocated cell.
da43d822
GB
3573
3574 * pairs.h: Added a comment about the need for the SCM_SETCAR in
3575 SCM_NEWCELL macro.
3576
3577Mon Jan 3 08:25:19 2000 Greg J. Badros <gjb@cs.washington.edu>
3578
3579 * dynl-vms.c, debug.c, coop-threads.c, backtrace.c, eval.c: More
3580 SCM_NIMP tests that were redundant are now eliminated. Patches
3581 from Dirk Hermann applied by hand.
3582
339999c7 3583The ChangeLog continues in the file: "ChangeLog-1996-1999"